mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Start to introduce common substitution rules for odt substitutions
This commit is contained in:
@@ -354,21 +354,22 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
{
|
||||
}
|
||||
|
||||
// Make substitutions into odt
|
||||
// Define substitution array
|
||||
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
|
||||
$array_object_from_properties=$this->get_substitutionarray_each_var_object($object, $outputlangs);
|
||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||
$array_user=$this->get_substitutionarray_user($user,$outputlangs);
|
||||
$array_soc=$this->get_substitutionarray_mysoc($mysoc,$outputlangs);
|
||||
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||
$array_other=$this->get_substitutionarray_other($outputlangs);
|
||||
// retrieve contact information for use in order as contact_xxx tags
|
||||
$array_thirdparty_contact = array();
|
||||
if ($usecontact)
|
||||
$array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
|
||||
// retrieve contact information for use in order as contact_xxx tags
|
||||
$array_thirdparty_contact = array();
|
||||
if ($usecontact) $array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
|
||||
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact);
|
||||
$tmparray = array_merge($substitutionarray,$array_object_from_properties,$array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||
$reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user