29 require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/modules_project.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/task/modules_task.php';
31 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
37 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
38 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
39 require_once DOL_DOCUMENT_ROOT.
'/core/lib/doc.lib.php';
40 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
41 if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
42 if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
43 if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture-rec.class.php';
44 if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
45 if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
46 if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
47 if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
48 if (!empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
49 if (!empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.
'/compta/deplacement/class/deplacement.class.php';
50 if (!empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
68 public $phpmin = array(5, 6);
74 public $version =
'dolibarr';
84 global $conf, $langs, $mysoc;
87 $langs->loadLangs(array(
"main",
"companies"));
90 $this->
name =
"ODT templates";
91 $this->
description = $langs->trans(
"DocumentModelOdt");
92 $this->scandir =
'PROJECT_TASK_ADDON_PDF_ODT_PATH';
96 $this->page_largeur = 0;
97 $this->page_hauteur = 0;
98 $this->format = array($this->page_largeur, $this->page_hauteur);
99 $this->marge_gauche = 0;
100 $this->marge_droite = 0;
101 $this->marge_haute = 0;
102 $this->marge_basse = 0;
104 $this->option_logo = 1;
105 $this->option_tva = 0;
106 $this->option_modereg = 0;
107 $this->option_condreg = 0;
108 $this->option_codeproduitservice = 0;
109 $this->option_multilang = 0;
110 $this->option_escompte = 0;
111 $this->option_credit_note = 0;
112 $this->option_freetext = 1;
113 $this->option_draft_watermark = 0;
116 $this->emetteur = $mysoc;
117 if (!$this->emetteur->pays_code) $this->emetteur->pays_code = substr($langs->defaultlang, -2);
133 global $conf, $extrafields;
136 $array_key.
'_id'=>$object->id,
137 $array_key.
'_ref'=>$object->ref,
138 $array_key.
'_title'=>$object->title,
139 $array_key.
'_description'=>$object->description,
140 $array_key.
'_date_creation'=>
dol_print_date($object->date_c,
'day'),
141 $array_key.
'_date_modification'=>
dol_print_date($object->date_m,
'day'),
142 $array_key.
'_date_start'=>
dol_print_date($object->date_start,
'day'),
144 $array_key.
'_note_private'=>$object->note_private,
145 $array_key.
'_note_public'=>$object->note_public,
146 $array_key.
'_public'=>$object->public,
147 $array_key.
'_statut'=>$object->getLibStatut()
151 if (is_array($object->array_options) && count($object->array_options))
153 $object->fetch_optionals();
173 global $conf, $extrafields;
176 'task_ref'=>$task->ref,
177 'task_fk_project'=>$task->fk_project,
178 'task_projectref'=>$task->projectref,
179 'task_projectlabel'=>$task->projectlabel,
180 'task_label'=>$task->label,
181 'task_description'=>$task->description,
182 'task_fk_parent'=>$task->fk_parent,
183 'task_duration'=>$task->duration_effective,
185 'task_planned_workload'=>$task->planned_workload,
186 'task_planned_workload_formated'=>
convertSecondToTime($task->planned_workload,
'allhourmin'),
187 'task_progress'=>$task->progress,
188 'task_public'=>$task->public,
191 'task_note_private'=>$task->note_private,
192 'task_note_public'=>$task->note_public
196 if (is_array($task->array_options) && count($task->array_options))
198 $task->fetch_optionals();
220 'projcontacts_id'=>$contact[
'id'],
221 'projcontacts_rowid'=>$contact[
'rowid'],
222 'projcontacts_role'=>$contact[
'libelle'],
223 'projcontacts_lastname'=>$contact[
'lastname'],
224 'projcontacts_firstname'=>$contact[
'firstname'],
225 'projcontacts_fullcivname'=>$contact[
'fullname'],
226 'projcontacts_socname'=>$contact[
'socname'],
227 'projcontacts_email'=>$contact[
'email']
245 'projfile_name'=>$file[
'name'],
247 'projfile_size'=>$file[
'size']
265 'projref_type'=>$refdetail[
'type'],
266 'projref_ref'=>$refdetail[
'ref'],
268 'projref_socname'=>$refdetail[
'socname'],
269 'projref_amountht'=>
price($refdetail[
'amountht'], 0, $outputlangs),
270 'projref_amountttc'=>
price($refdetail[
'amountttc'], 0, $outputlangs),
271 'projref_status'=>$refdetail[
'status']
289 'taskressource_rowid'=>$taskressource[
'rowid'],
290 'taskressource_role'=>$taskressource[
'libelle'],
291 'taskressource_lastname'=>$taskressource[
'lastname'],
292 'taskressource_firstname'=>$taskressource[
'firstname'],
293 'taskressource_fullcivname'=>$taskressource[
'fullname'],
294 'taskressource_socname'=>$taskressource[
'socname'],
295 'taskressource_email'=>$taskressource[
'email']
313 'tasktime_rowid'=>$tasktime[
'rowid'],
314 'tasktime_task_date'=>
dol_print_date($tasktime[
'task_date'],
'day'),
316 'tasktime_note'=>$tasktime[
'note'],
317 'tasktime_fk_user'=>$tasktime[
'fk_user'],
318 'tasktime_user_name'=>$tasktime[
'name'],
319 'tasktime_user_first'=>$tasktime[
'firstname'],
320 'tasktime_fullcivname'=>$tasktime[
'fullcivname']
338 'tasksfile_name'=>$file[
'name'],
340 'tasksfile_size'=>$file[
'size']
353 global $conf, $langs;
356 $langs->loadLangs(array(
"errors",
"companies"));
358 $form =
new Form($this->
db);
361 $texte .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
362 $texte .=
'<input type="hidden" name="token" value="'.newToken().
'">';
363 $texte .=
'<input type="hidden" name="action" value="setModuleOptions">';
364 $texte .=
'<input type="hidden" name="param1" value="PROJECT_TASK_ADDON_PDF_ODT_PATH">';
365 $texte .=
'<table class="nobordernopadding" width="100%">';
368 $texte .=
'<tr><td>';
369 $texttitle = $langs->trans(
"ListOfDirectories");
370 $listofdir = explode(
',', preg_replace(
'/[\r\n]+/',
',', trim($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH)));
371 $listoffiles = array();
372 foreach ($listofdir as $key=>$tmpdir)
374 $tmpdir = trim($tmpdir);
375 $tmpdir = preg_replace(
'/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir);
377 unset($listofdir[$key]);
continue;
379 if (!is_dir($tmpdir)) $texttitle .=
img_warning($langs->trans(
"ErrorDirNotFound", $tmpdir), 0);
381 $tmpfiles =
dol_dir_list($tmpdir,
'files', 0,
'\.(ods|odt)');
382 if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles);
385 $texthelp = $langs->trans(
"ListOfDirectoriesForModelGenODT");
387 $texthelp .=
'<br>'.$langs->trans(
"FollowingSubstitutionKeysCanBeUsed").
'<br>';
388 $texthelp .= $langs->transnoentitiesnoconv(
"FullListOnOnlineDocumentation");
390 $texte .= $form->textwithpicto($texttitle, $texthelp, 1,
'help',
'', 1);
391 $texte .=
'<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
392 $texte .=
'<textarea class="flat" cols="60" name="value1">';
393 $texte .= $conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH;
394 $texte .=
'</textarea>';
395 $texte .=
'</div><div style="display: inline-block; vertical-align: middle;">';
396 $texte .=
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" name="Button">';
397 $texte .=
'<br></div></div>';
400 $nbofiles = count($listoffiles);
401 if (!empty($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH))
403 $texte .= $langs->trans(
"NumberOfModelFilesFound").
': <b>';
412 $texte .=
'<div id="div_'.get_class($this).
'" class="hiddenx">';
414 foreach ($listoffiles as $file) {
415 $texte .=
'- '.$file[
'name'].
' <a href="'.DOL_URL_ROOT.
'/document.php?modulepart=doctemplates&file=tasks/'.urlencode(basename($file[
'name'])).
'">'.
img_picto(
'',
'listlight').
'</a><br>';
422 $texte .=
'<td rowspan="2" class="tdtop hideonsmartphone">';
423 $texte .= $langs->trans(
"ExampleOfDirectoriesForModelGen");
427 $texte .=
'</table>';
442 public function write_file($object, $outputlangs, $srctemplatepath)
445 global $user, $langs, $conf, $mysoc, $hookmanager;
447 if (empty($srctemplatepath))
449 dol_syslog(
"doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING);
453 if (!is_object($outputlangs)) $outputlangs = $langs;
454 $sav_charset_output = $outputlangs->charset_output;
455 $outputlangs->charset_output =
'UTF-8';
458 $outputlangs->loadLangs(array(
"main",
"dict",
"companies",
"projects"));
460 if ($conf->projet->dir_output)
463 if (!is_object($object))
466 $object =
new Task($this->
db);
467 $result = $object->fetch($id);
475 $project->fetch($object->fk_project);
476 $project->fetch_thirdparty();
478 $dir = $conf->projet->dir_output.
"/".$project->ref.
"/";
480 if (!preg_match(
'/specimen/i', $objectref)) $dir .=
"/".$objectref;
481 $file = $dir.
"/".$objectref.
".odt";
483 if (!file_exists($dir))
487 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
493 if (file_exists($dir))
496 $newfile = basename($srctemplatepath);
497 $newfiletmp = preg_replace(
'/\.(ods|odt)/i',
'', $newfile);
498 $newfiletmp = preg_replace(
'/template_/i',
'', $newfiletmp);
499 $newfiletmp = preg_replace(
'/modele_/i',
'', $newfiletmp);
500 $newfiletmp = $objectref.
'_'.$newfiletmp;
502 $file = $dir.
'/'.$newfiletmp.
'.odt';
510 $socobject = $project->thirdparty;
513 $substitutionarray = array(
514 '__FROM_NAME__' => $this->emetteur->name,
515 '__FROM_EMAIL__' => $this->emetteur->email,
519 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs,
'substitutionarray'=>&$tmparray);
520 $reshook = $hookmanager->executeHooks(
'ODTSubstitution', $parameters, $this, $action);
523 require_once ODTPHP_PATH.
'odf.php';
525 $odfHandler =
new odf(
528 'PATH_TO_TMP' => $conf->projet->dir_temp,
529 'ZIP_PROXY' =>
'PclZipProxy',
530 'DELIMITER_LEFT' =>
'{',
531 'DELIMITER_RIGHT' =>
'}'
536 $this->error = $e->getMessage();
555 $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other);
558 foreach ($tmparray as $key=>$value)
561 if (preg_match(
'/logo$/', $key))
563 if (file_exists($value)) $odfHandler->setImage($key, $value);
564 else $odfHandler->setVars($key,
'ErrorFileNotFound',
true,
'UTF-8');
567 $odfHandler->setVars($key, $value,
true,
'UTF-8');
569 }
catch (OdfException $e) {
578 if (!empty($project->fk_soc)) $socid = $project->fk_soc;
580 $tmparray = $this->get_substitutionarray_tasks($object, $outputlangs);
582 foreach ($tmparray as $key => $val)
585 $odfHandler->setVars($key, $val,
true,
'UTF-8');
586 }
catch (OdfException $e) {
588 }
catch (SegmentException $e) {
594 $sourcearray = array(
'internal',
'external');
595 $contact_arrray = array();
596 foreach ($sourcearray as $source) {
597 $contact_temp = $object->liste_contact(-1, $source);
598 if ((is_array($contact_temp) && count($contact_temp) > 0))
600 $contact_arrray = array_merge($contact_arrray, $contact_temp);
603 if ((is_array($contact_arrray) && count($contact_arrray) > 0))
605 $listlinestaskres = $odfHandler->setSegment(
'tasksressources');
607 foreach ($contact_arrray as $contact)
609 if ($contact[
'source'] ==
'internal') {
610 $objectdetail =
new User($this->
db);
611 $objectdetail->fetch($contact[
'id']);
612 $contact[
'socname'] = $mysoc->name;
613 } elseif ($contact[
'source'] ==
'external') {
615 $objectdetail->fetch($contact[
'id']);
618 $soc->fetch($contact[
'socid']);
619 $contact[
'socname'] = $soc->name;
621 $contact[
'fullname'] = $objectdetail->getFullName($outputlangs, 1);
625 foreach ($tmparray as $key => $val)
628 $listlinestaskres->setVars($key, $val,
true,
'UTF-8');
629 }
catch (OdfException $e) {
631 }
catch (SegmentException $e) {
635 $listlinestaskres->merge();
637 $odfHandler->mergeSegment($listlinestaskres);
641 $sql =
"SELECT t.rowid, t.task_date, t.task_duration, t.fk_user, t.note";
642 $sql .=
", u.lastname, u.firstname";
643 $sql .=
" FROM ".MAIN_DB_PREFIX.
"projet_task_time as t";
644 $sql .=
" , ".MAIN_DB_PREFIX.
"user as u";
645 $sql .=
" WHERE t.fk_task =".$object->id;
646 $sql .=
" AND t.fk_user = u.rowid";
647 $sql .=
" ORDER BY t.task_date DESC";
655 $listlinestasktime = $odfHandler->setSegment(
'taskstimes');
658 $row = $this->
db->fetch_array(
$resql);
659 if (!empty($row[
'fk_user'])) {
660 $objectdetail =
new User($this->
db);
661 $objectdetail->fetch($row[
'fk_user']);
663 $row[
'fullcivname'] = $objectdetail->getFullName($outputlangs, 1);
665 $row[
'fullcivname'] =
'';
670 foreach ($tmparray as $key => $val)
673 $listlinestasktime->setVars($key, $val,
true,
'UTF-8');
674 }
catch (OdfException $e)
677 }
catch (SegmentException $e)
682 $listlinestasktime->merge();
687 $odfHandler->mergeSegment($listlinestasktime);
692 $listtasksfiles = $odfHandler->setSegment(
'tasksfiles');
695 $filearray =
dol_dir_list($upload_dir,
"files", 0,
'',
'(\.meta|_preview.*\.png)$',
'name', SORT_ASC, 1);
698 foreach ($filearray as $filedetail)
702 foreach ($tmparray as $key => $val)
705 $listtasksfiles->setVars($key, $val,
true,
'UTF-8');
706 }
catch (OdfException $e)
709 }
catch (SegmentException $e)
714 $listtasksfiles->merge();
718 $odfHandler->mergeSegment($listtasksfiles);
719 }
catch (OdfException $e)
721 $this->error = $e->getMessage();
730 $listlines = $odfHandler->setSegment(
'projectfiles');
733 $filearray =
dol_dir_list($upload_dir,
"files", 0,
'',
'(\.meta|_preview.*\.png)$',
'name', SORT_ASC, 1);
736 foreach ($filearray as $filedetail)
741 foreach ($tmparray as $key => $val)
744 $listlines->setVars($key, $val,
true,
'UTF-8');
745 }
catch (OdfException $e)
748 }
catch (SegmentException $e)
755 $odfHandler->mergeSegment($listlines);
756 }
catch (OdfException $e)
758 $this->error = $e->getMessage();
764 $sourcearray = array(
'internal',
'external');
765 $contact_arrray = array();
766 foreach ($sourcearray as $source) {
767 $contact_temp = $project->liste_contact(-1, $source);
768 if ((is_array($contact_temp) && count($contact_temp) > 0))
770 $contact_arrray = array_merge($contact_arrray, $contact_temp);
773 if ((is_array($contact_arrray) && count($contact_arrray) > 0))
776 $listlines = $odfHandler->setSegment(
'projectcontacts');
778 foreach ($contact_arrray as $contact)
780 if ($contact[
'source'] ==
'internal') {
781 $objectdetail =
new User($this->
db);
782 $objectdetail->fetch($contact[
'id']);
783 $contact[
'socname'] = $mysoc->name;
784 } elseif ($contact[
'source'] ==
'external') {
786 $objectdetail->fetch($contact[
'id']);
789 $soc->fetch($contact[
'socid']);
790 $contact[
'socname'] = $soc->name;
792 $contact[
'fullname'] = $objectdetail->getFullName($outputlangs, 1);
796 foreach ($tmparray as $key => $val)
799 $listlines->setVars($key, $val,
true,
'UTF-8');
800 }
catch (OdfException $e)
803 }
catch (SegmentException $e)
810 $odfHandler->mergeSegment($listlines);
811 }
catch (OdfException $e)
813 $this->error = $e->getMessage();
821 $parameters = array(
'odfHandler'=>&$odfHandler,
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs,
'substitutionarray'=>&$tmparray);
822 $reshook = $hookmanager->executeHooks(
'beforeODTSave', $parameters, $this, $action);
826 if (!empty($conf->global->MAIN_ODT_AS_PDF)) {
828 $odfHandler->exportAsAttachedPDF($file);
830 $this->error = $e->getMessage();
836 $odfHandler->saveToDisk($file);
838 $this->error = $e->getMessage();
843 $parameters = array(
'odfHandler'=>&$odfHandler,
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs,
'substitutionarray'=>&$tmparray);
844 $reshook = $hookmanager->executeHooks(
'afterODTCreation', $parameters, $this, $action);
846 if (!empty($conf->global->MAIN_UMASK))
847 @chmod($file, octdec($conf->global->MAIN_UMASK));
851 $this->result = array(
'fullpath'=>$file);
855 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
get_substitutionarray_tasks($task, $outputlangs, $array_key= 'task')
Define array with couple substitution key => substitution value.
get_substitutionarray_tasksressource($taskressource, $outputlangs)
Define array with couple substitution key => substitution value.
</td > param sortfield sortorder printFieldListOption< tdclass="liste_titremaxwidthsearchright"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration center DesiredStock p desiredstock right StockLimitShort p seuil_stock_alerte right stock_physique right stock_real_warehouse right Ordered right StockToBuy right SupplierRef right param sortfield sortorder printFieldListTitle warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow StockTooLow help help help< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"> stock</td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive=true)
Define array with couple substitution key => substitution value.
Parent class for projects models.
Class to manage Dolibarr users.
get_substitutionarray_user($user, $outputlangs)
Define array with couple substitution key => substitution value.
get_substitutionarray_object($object, $outputlangs, $array_key= 'object')
Define array with couple substitution key => substitution value.
Class to build documents using ODF templates generator.
$conf db name
Only used if Module[ID]Name translation string is not found.
info($langs)
Return description of a module.
$conf db
API class for accounts.
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null)
Return array of possible common substitutions.
get_substitutionarray_task_file($file, $outputlangs)
Define array with couple substitution key => substitution value.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage projects.
__construct($db)
Constructor.
get_substitutionarray_project_file($file, $outputlangs)
Define array with couple substitution key => substitution value.
get_substitutionarray_thirdparty($object, $outputlangs, $array_key= 'company')
Define array with couple substitution key => substitution value.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
get_substitutionarray_mysoc($mysoc, $outputlangs)
Define array with couple substitution key => substitution value.
get_substitutionarray_project_contacts($contact, $outputlangs)
Define array with couple substitution key => substitution value.
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0)
Scan a directory and return a list of files/directories.
get_substitutionarray_taskstime($tasktime, $outputlangs)
Define array with couple substitution key => substitution value.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
fill_substitutionarray_with_extrafields($object, $array_to_fill, $extrafields, $array_key, $outputlangs)
Fill array with couple extrafield key => extrafield value.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
get_substitutionarray_project_reference($refdetail, $outputlangs)
Define array with couple substitution key => substitution value.
get_substitutionarray_other($outputlangs)
Define array with couple substitution key => substitution value.
write_file($object, $outputlangs, $srctemplatepath)
Function to build a document on disk using the generic odt module.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
dol_mkdir($dir, $dataroot= '', $newmask=null)
Creation of a directory (this can create recursive subdir)
convertSecondToTime($iSecond, $format= 'all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...