Fix: Add more ODT tags
This commit is contained in:
parent
8f331adff6
commit
4c47393b51
@ -51,7 +51,14 @@ abstract class CommonDocGenerator
|
|||||||
'myuser_firstname'=>$user->firstname,
|
'myuser_firstname'=>$user->firstname,
|
||||||
'myuser_login'=>$user->login,
|
'myuser_login'=>$user->login,
|
||||||
'myuser_phone'=>$user->office_phone,
|
'myuser_phone'=>$user->office_phone,
|
||||||
'myuser_fax'=>$user->office_fax,
|
'myuser_address'=>$user->address,
|
||||||
|
'myuser_zip'=>$user->zip,
|
||||||
|
'myuser_town'=>$user->town,
|
||||||
|
'myuser_country'=>$user->country,
|
||||||
|
'myuser_country_code'=>$user->country_code,
|
||||||
|
'myuser_state'=>$user->state,
|
||||||
|
'myuser_state_code'=>$user->state_code,
|
||||||
|
'myuser_fax'=>$user->office_fax,
|
||||||
'myuser_mobile'=>$user->user_mobile,
|
'myuser_mobile'=>$user->user_mobile,
|
||||||
'myuser_email'=>$user->email,
|
'myuser_email'=>$user->email,
|
||||||
'myuser_web'=>'' // url not exist in $user object
|
'myuser_web'=>'' // url not exist in $user object
|
||||||
@ -190,6 +197,28 @@ abstract class CommonDocGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define array with couple subtitution key => subtitution value
|
||||||
|
*
|
||||||
|
* @param Translate $outputlangs Language object for output
|
||||||
|
* @return array Array of substitution key->code
|
||||||
|
*/
|
||||||
|
function get_substitutionarray_other($outputlangs)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$now=dol_now('gmt'); // gmt
|
||||||
|
$array_other = array(
|
||||||
|
'current_date'=>dol_print_date($now,'day','tzuser'),
|
||||||
|
'current_datehour'=>dol_print_date($now,'dayhour','tzuser'),
|
||||||
|
'current_server_date'=>dol_print_date($now,'day','tzserver'),
|
||||||
|
'current_server_datehour'=>dol_print_date($now,'dayhour','tzserver'),
|
||||||
|
);
|
||||||
|
|
||||||
|
return $array_other;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define array with couple substitution key => substitution value
|
* Define array with couple substitution key => substitution value
|
||||||
*
|
*
|
||||||
|
|||||||
@ -117,6 +117,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
||||||
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
|
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
|
||||||
'object_date_validation'=>dol_print_date($object->date_validation,'dayhour'),
|
'object_date_validation'=>dol_print_date($object->date_validation,'dayhour'),
|
||||||
|
'object_date_delivery_planed'=>dol_print_date($object->date_livraison,'dayhour'),
|
||||||
'object_payment_mode_code'=>$object->mode_reglement_code,
|
'object_payment_mode_code'=>$object->mode_reglement_code,
|
||||||
'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
||||||
'object_payment_term_code'=>$object->cond_reglement_code,
|
'object_payment_term_code'=>$object->cond_reglement_code,
|
||||||
@ -415,6 +416,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
||||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||||
$array_propal=is_object($propal_object)?$this->get_substitutionarray_propal($propal_object,$outputlangs,'propal'):array();
|
$array_propal=is_object($propal_object)?$this->get_substitutionarray_propal($propal_object,$outputlangs,'propal'):array();
|
||||||
|
$array_other=$this->get_substitutionarray_other($user,$outputlangs);
|
||||||
|
|
||||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal);
|
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal);
|
||||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user