Skip to content
Snippets Groups Projects
Commit 2f7be8d2 authored by Florian Henry's avatar Florian Henry
Browse files

Add hook for substitution

parent af40d27e
No related branches found
No related tags found
No related merge requests found
...@@ -125,7 +125,7 @@ class doc_generic_project_odt extends ModelePDFProjects ...@@ -125,7 +125,7 @@ class doc_generic_project_odt extends ModelePDFProjects
'object_note_private'=>$object->note_private, 'object_note_private'=>$object->note_private,
'object_note_public'=>$object->note_public, 'object_note_public'=>$object->note_public,
'object_public'=>$object->public, 'object_public'=>$object->public,
'object_statut'=>html_entity_decode($object->getLibStatut()) 'object_statut'=>$object->getLibStatut()
); );
} }
...@@ -478,7 +478,6 @@ class doc_generic_project_odt extends ModelePDFProjects ...@@ -478,7 +478,6 @@ class doc_generic_project_odt extends ModelePDFProjects
// Make substitutions into odt of user info // Make substitutions into odt of user info
$tmparray=$this->get_substitutionarray_user($user,$outputlangs); $tmparray=$this->get_substitutionarray_user($user,$outputlangs);
//var_dump($tmparray); exit;
foreach($tmparray as $key=>$value) foreach($tmparray as $key=>$value)
{ {
try { try {
...@@ -805,7 +804,6 @@ class doc_generic_project_odt extends ModelePDFProjects ...@@ -805,7 +804,6 @@ class doc_generic_project_odt extends ModelePDFProjects
$contact['fullname']=$objectdetail->getFullName($outputlangs,1); $contact['fullname']=$objectdetail->getFullName($outputlangs,1);
$tmparray=$this->get_substitutionarray_project_contacts($contact,$outputlangs); $tmparray=$this->get_substitutionarray_project_contacts($contact,$outputlangs);
complete_substitutions_array($tmparray, $outputlangs, $contact, $contact, "completesubstitutionarray_lines");
foreach($tmparray as $key => $val) foreach($tmparray as $key => $val)
{ {
try try
...@@ -937,7 +935,7 @@ class doc_generic_project_odt extends ModelePDFProjects ...@@ -937,7 +935,7 @@ class doc_generic_project_odt extends ModelePDFProjects
$ref_array['amountttc']=''; $ref_array['amountttc']='';
} }
$ref_array['status']=html_entity_decode($element->getLibStatut(0)); $ref_array['status']=$element->getLibStatut(0);
$tmparray=$this->get_substitutionarray_project_reference($ref_array,$outputlangs); $tmparray=$this->get_substitutionarray_project_reference($ref_array,$outputlangs);
...@@ -976,6 +974,7 @@ class doc_generic_project_odt extends ModelePDFProjects ...@@ -976,6 +974,7 @@ class doc_generic_project_odt extends ModelePDFProjects
// Write new file // Write new file
$odfHandler->saveToDisk($file); $odfHandler->saveToDisk($file);
//$odfHandler->exportAsAttachedPDF($file);
if (! empty($conf->global->MAIN_UMASK)) if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK)); @chmod($file, octdec($conf->global->MAIN_UMASK));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment