Merge pull request #1691 from atm-maxime/3.6
Fix : Invoice PDF was not showing ref when created from a shipment. Now ...
This commit is contained in:
commit
6fc3111216
@ -1583,6 +1583,25 @@ function pdf_getLinkedObjects($object,$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')
|
||||
{
|
||||
$outputlangs->load('contracts');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user