mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
Fix: Add more ODT tags
This commit is contained in:
@@ -51,7 +51,14 @@ abstract class CommonDocGenerator
|
||||
'myuser_firstname'=>$user->firstname,
|
||||
'myuser_login'=>$user->login,
|
||||
'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_email'=>$user->email,
|
||||
'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
|
||||
*
|
||||
|
||||
@@ -117,6 +117,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
'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_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'=>($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,
|
||||
@@ -415,7 +416,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$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_other=$this->get_substitutionarray_other($user,$outputlangs);
|
||||
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user