Invoice References

Hi,
I want to modify the pdf.crabe.module.php.
Can some one explain me how to insert the Ref.Client / Ref.Order / and the Ref. Shipment (and the related dats) to different line
instead of in on line…

I suppose that all this ref. are connected in the pdf_writeLinkedObjects and pdf_getLinkedObjects (pdf.lib.php) .

Thank you for help me.
Br
Giorgio

hi,
it’s my firt time i try to modify the pdf-output and read your problem.
i searched the file but you did write wrong, the 1st . is a _
but in the file i miss your variables Ref.Client…

I would try to set the xy-coordinates bevore output these values using
$pdf->SetXY($curX, $curY+yourdistance);
then the output
then the position back to the point bevore you modifyed
$pdf->SetXY($curX, $curY);

but i never did bevore, i did not test, i’m a newby !!!

if you have a solution, please post it here, thanks !!

:slight_smile: Wolfgang

Hi,

finaly I found that the referece of the linked object are register in /htdocs/core/lib/lib.pdf.php

/**
* Return linked objects
*
* @param object $object Object
* @param Translate $outputlangs Object lang for output
* @return array Linked objects
*/

I hid references in the line 1651 - 1658 as I wish to show for example :
// $linkedobjects[$objecttype][‘ref_title’] = $outputlangs->transnoentities(“RefOrder”) . ’ / ’ . $outputlangs->transnoentities(“RefSending”);
$linkedobjects[$objecttype][‘ref_title’] = $outputlangs->transnoentities(“RefSending”);
// $linkedobjects[$objecttype][‘ref_value’] = $outputlangs->transnoentities($order->ref) . ($order->ref_client ? ’ (’.$order->ref_client.’)’ : ‘’);
// $linkedobjects[$objecttype][‘ref_value’].= ’ / ’ . $outputlangs->transnoentities($objects[$i]->ref);
$linkedobjects[$objecttype][‘ref_value’].= $outputlangs->transnoentities($objects[$i]->ref);
// $linkedobjects[$objecttype][‘date_title’] = $outputlangs->transnoentities(“OrderDate”) . ’ / ’ . $outputlangs->transnoentities(“DateSending”);
//$linkedobjects[$objecttype][‘date_value’] = dol_print_date($order->date,‘day’,’’,$outputlangs);
$linkedobjects[$objecttype][‘date_value’].= ’ / ’ . dol_print_date($objects[$i]->date_delivery,‘day’,’’,$outputlangs);

And that’s it!

Br
Giorgio