Add missing tag order_ref and order_ref_customer on shipments for ODT
generation.
This commit is contained in:
parent
e0d656e0c8
commit
025cbe8557
@ -743,6 +743,12 @@ abstract class CommonDocGenerator
|
||||
$array_shipment = $this->fill_substitutionarray_with_extrafields($object, $array_shipment, $extrafields, $array_key, $outputlangs);
|
||||
}
|
||||
|
||||
// Add infor from $object->xxx where xxx has been loaded by fetch_origin() of shipment
|
||||
if (!empty($object->commande) && is_object($object->commande)) {
|
||||
$array_shipment['order_ref'] = $object->commande->ref;
|
||||
$array_shipment['order_ref_customer'] = $object->commande->ref_customer;
|
||||
}
|
||||
|
||||
return $array_shipment;
|
||||
}
|
||||
|
||||
|
||||
@ -454,6 +454,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
|
||||
// Replace tags of object + external modules
|
||||
$tmparray = $this->get_substitutionarray_shipment($object, $outputlangs);
|
||||
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user