diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 9c45c135ac3..a1be784f249 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -393,7 +393,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } } // Make substitutions into odt of thirdparty - $tmparray=$this->get_substitutionarray_thirdparty($socobject,$outputlangs); + if ($socobject->element == 'contact') { + $tmparray = $this->get_substitutionarray_contact($socobject, $outputlangs); + } else { + $tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs); + } foreach($tmparray as $key=>$value) { try {