Fix : Invoice PDF was not showing ref when created from a shipment. Now shows refs and dates of shipment and oreder related
This commit is contained in:
parent
71ee974ddb
commit
d61e5bae93
@ -1583,6 +1583,25 @@ function pdf_getLinkedObjects($object,$outputlangs)
|
|||||||
$linkedobjects[$objecttype]['date_value'] = dol_print_date($objects[$i]->date,'day','',$outputlangs);
|
$linkedobjects[$objecttype]['date_value'] = dol_print_date($objects[$i]->date,'day','',$outputlangs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ($objecttype == 'shipping')
|
||||||
|
{
|
||||||
|
$outputlangs->load('orders');
|
||||||
|
$outputlangs->load('sendings');
|
||||||
|
|
||||||
|
$num=count($objects);
|
||||||
|
for ($i=0;$i<$num;$i++)
|
||||||
|
{
|
||||||
|
$objects[$i]->fetchObjectLinked();
|
||||||
|
$order = $objects[$i]->linkedObjects['commande'][0];
|
||||||
|
|
||||||
|
$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder") . ' / ' . $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]['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);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if ($objecttype == 'contrat')
|
else if ($objecttype == 'contrat')
|
||||||
{
|
{
|
||||||
$outputlangs->load('contracts');
|
$outputlangs->load('contracts');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user