35require
'../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
50$langs->loadLangs(array(
'admin',
'errors',
'other',
'bills'));
56$action =
GETPOST(
'action',
'aZ09');
57$value =
GETPOST(
'value',
'alpha');
58$modulepart =
GETPOST(
'modulepart',
'aZ09');
60$label =
GETPOST(
'label',
'alpha');
61$scandir =
GETPOST(
'scan_dir',
'alpha');
72include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
74if ($action ==
'updateMask') {
75 $maskconstinvoice =
GETPOST(
'maskconstinvoice',
'aZ09');
76 $maskconstreplacement =
GETPOST(
'maskconstreplacement',
'aZ09');
77 $maskconstcredit =
GETPOST(
'maskconstcredit',
'aZ09');
78 $maskconstdeposit =
GETPOST(
'maskconstdeposit',
'aZ09');
79 $maskinvoice =
GETPOST(
'maskinvoice',
'alpha');
80 $maskreplacement =
GETPOST(
'maskreplacement',
'alpha');
81 $maskcredit =
GETPOST(
'maskcredit',
'alpha');
82 $maskdeposit =
GETPOST(
'maskdeposit',
'alpha');
84 if ($maskconstinvoice && preg_match(
'/_MASK_/', $maskconstinvoice)) {
87 if ($maskconstreplacement && preg_match(
'/_MASK_/', $maskconstreplacement)) {
90 if ($maskconstcredit && preg_match(
'/_MASK_/', $maskconstcredit)) {
93 if ($maskconstdeposit && preg_match(
'/_MASK_/', $maskconstdeposit)) {
106} elseif ($action ==
'specimen') {
107 $modele =
GETPOST(
'module',
'alpha');
110 $facture->initAsSpecimen();
115 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
116 foreach ($dirmodels as $reldir) {
117 $file =
dol_buildpath($reldir.
"core/modules/facture/doc/pdf_".$modele.
".modules.php", 0);
118 if (file_exists($file)) {
119 $classname =
"pdf_".$modele;
124 if ($classname !==
'') {
127 $module =
new $classname(
$db);
129 '@phan-var-force ModelePDFFactures $module';
131 if ($module->write_file($facture, $langs) > 0) {
132 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=facture&file=SPECIMEN.pdf");
140 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
142} elseif ($action ==
'set') {
145} elseif ($action ==
'del') {
152} elseif ($action ==
'setdoc') {
157 $conf->global->FACTURE_ADDON_PDF = $value;
165} elseif ($action ==
'setmod') {
169} elseif ($action ==
'setribchq') {
170 $rib =
GETPOST(
'rib',
'alpha');
171 $chq =
GETPOST(
'chq',
'alpha');
185} elseif ($action ==
'set_FACTURE_DRAFT_WATERMARK') {
186 $draft =
GETPOST(
'FACTURE_DRAFT_WATERMARK',
'alpha');
199} elseif ($action ==
'set_INVOICE_FREE_TEXT') {
200 $freetext =
GETPOST(
'INVOICE_FREE_TEXT',
'restricthtml');
213} elseif ($action ==
'setforcedate') {
214 $forcedate =
GETPOST(
'forcedate',
'alpha');
227} elseif ($action ==
'setDefaultPDFModulesByType') {
228 $invoicetypemodels =
GETPOST(
'invoicetypemodels');
230 if (!empty($invoicetypemodels) && is_array($invoicetypemodels)) {
233 foreach ($invoicetypemodels as $type => $value) {
246} elseif ($action ==
'set_INVOICE_CHECK_POSTERIOR_DATE') {
247 $check_posterior_date =
GETPOSTINT(
'INVOICE_CHECK_POSTERIOR_DATE');
252} elseif (preg_match(
'/set_(.*)/', $action, $reg)) {
265 header(
"Location: " . $_SERVER[
"PHP_SELF"]);
268} elseif (preg_match(
'/del_(.*)/', $action, $reg)) {
280 header(
"Location: " . $_SERVER[
"PHP_SELF"]);
290$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
292$title = $langs->trans(
"BillsSetup");
294llxHeader(
"", $title,
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura',
'', 0, 0,
'',
'',
'',
'mod-admin page-invoice');
299$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
310print
'<div class="div-table-responsive-no-min">';
311print
'<table class="noborder centpercent">';
312print
'<tr class="liste_titre">';
313print
'<td>'.$langs->trans(
"Name").
'</td>';
314print
'<td>'.$langs->trans(
"Description").
'</td>';
315print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
316print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
317print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
322$arrayofmodules = array();
324foreach ($dirmodels as $reldir) {
327 $handle = opendir($dir);
328 if (is_resource($handle)) {
329 while (($file = readdir($handle)) !==
false) {
330 if (!is_dir($dir.$file) || (substr($file, 0, 1) !=
'.' && substr($file, 0, 3) !=
'CVS')) {
332 $classname = preg_replace(
'/\.php$/',
'', $file);
334 if (!is_file($dir.$filebis)) {
335 $filebis = $file.
"/".$file.
".modules.php";
336 $classname =
"mod_facture_".$file;
340 preg_match(
'/\-(.*)_(.*)$/', $classname, $reg);
341 if (!empty($reg[2]) && $reg[2] != strtoupper(
$mysoc->country_code)) {
345 $classname = preg_replace(
'/\-.*$/',
'', $classname);
346 if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match(
'/mod_/', $filebis) || preg_match(
'/mod_/', $classname)) && substr($filebis,
dol_strlen($filebis) - 3, 3) ==
'php') {
348 require_once $dir.$filebis;
350 $module =
new $classname(
$db);
352 '@phan-var-force ModeleNumRefFactures $module';
354 $arrayofmodules[] = $module;
365'@phan-var-force ModeleNumRefFactures[] $arrayofmodules';
367foreach ($arrayofmodules as $module) {
368 $file = strtolower($module->getName($langs));
369 if (!preg_match(
'/^mod_facture_/', $file)) {
370 $file =
'mod_facture_'.$file;
374 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
377 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
384 if ($module->isEnabled()) {
385 print
'<tr class="oddeven"><td width="100">';
386 print preg_replace(
'/\-.*$/',
'', preg_replace(
'/mod_facture_/',
'', $module->getName($langs)));
388 print $module->info($langs);
392 print
'<td class="nowrap">';
393 $tmp = $module->getExample();
394 if (preg_match(
'/^Error/', $tmp)) {
395 $langs->load(
"errors");
396 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
397 } elseif ($tmp ==
'NotConfigured') {
398 print
'<span class="opacitymedium">'.$langs->trans($tmp).
'</span>';
404 print
'<td class="center">';
406 print
img_picto($langs->trans(
"Activated"),
'switch_on');
408 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.newToken().
'&value='.preg_replace(
'/\.php$/',
'', $file).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
413 $facture->initAsSpecimen();
418 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
420 $nextval = $module->getNextValue(
$mysoc, $facture);
421 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
422 $htmltooltip .= $langs->trans(
"NextValueForInvoices").
': ';
424 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
425 $nextval = $langs->trans($nextval);
427 $htmltooltip .= $nextval.
'<br>';
429 $htmltooltip .= $langs->trans($module->error).
'<br>';
435 $nextval = $module->getNextValue(
$mysoc, $facture);
436 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
437 $htmltooltip .= $langs->trans(
"NextValueForReplacements").
': ';
439 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
440 $nextval = $langs->trans($nextval);
442 $htmltooltip .= $nextval.
'<br>';
444 $htmltooltip .= $langs->trans($module->error).
'<br>';
450 $nextval = $module->getNextValue(
$mysoc, $facture);
451 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
452 $htmltooltip .= $langs->trans(
"NextValueForCreditNotes").
': ';
454 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
455 $nextval = $langs->trans($nextval);
457 $htmltooltip .= $nextval.
'<br>';
459 $htmltooltip .= $langs->trans($module->error).
'<br>';
464 $nextval = $module->getNextValue(
$mysoc, $facture);
465 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
466 $htmltooltip .= $langs->trans(
"NextValueForDeposit").
': ';
468 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
469 $nextval = $langs->trans($nextval);
471 $htmltooltip .= $nextval;
473 $htmltooltip .= $langs->trans($module->error);
477 print
'<td class="center">';
478 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
481 if (!empty($module->error)) {
507$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
508$sql .=
" WHERE type = '".$db->escape($type).
"'";
509$sql .=
" AND entity = ".((int)
$conf->entity);
510$resql =
$db->query($sql);
513 $num_rows =
$db->num_rows($resql);
514 while ($i < $num_rows) {
515 $array =
$db->fetch_array($resql);
516 if (is_array($array)) {
517 array_push($def, $array[0]);
525print
'<div class="div-table-responsive-no-min">';
526print
'<table class="noborder centpercent">';
527print
'<tr class="liste_titre">';
528print
'<td>'.$langs->trans(
"Name").
'</td>';
529print
'<td>'.$langs->trans(
"Description").
'</td>';
530print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
531print
'<td class="center" width="60">'.$langs->trans(
"Default").
'</td>';
532print
'<td class="center" width="32">'.$langs->trans(
"ShortInfo").
'</td>';
533print
'<td class="center" width="32">'.$langs->trans(
"Preview").
'</td>';
538$activatedModels = array();
540foreach ($dirmodels as $reldir) {
541 foreach (array(
'',
'/doc') as $valdir) {
542 $realpath = $reldir.
"core/modules/facture".$valdir;
546 $handle = opendir($dir);
547 if (is_resource($handle)) {
549 while (($file = readdir($handle)) !==
false) {
555 foreach ($filelist as $file) {
556 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
557 if (file_exists($dir.
'/'.$file)) {
558 $name = substr($file, 4,
dol_strlen($file) - 16);
559 $classname = substr($file, 0,
dol_strlen($file) - 12);
561 require_once $dir.
'/'.$file;
562 $module =
new $classname(
$db);
564 '@phan-var-force ModelePDFFactures $module';
567 $modulequalified = 1;
568 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
569 $modulequalified = 0;
571 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
572 $modulequalified = 0;
574 if ($module->version ==
'disabled') {
575 $modulequalified = 0;
578 if ($modulequalified) {
579 print
'<tr class="oddeven"><td width="100">';
580 print(empty($module->name) ? $name : $module->
name);
582 if (method_exists($module,
'info')) {
583 print $module->info($langs);
585 print $module->description;
590 if (in_array($name, $def)) {
591 print
'<td class="center">'.
"\n";
592 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'">';
593 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
597 print
'<td class="center">'.
"\n";
598 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"SetAsDefault"),
'switch_off').
'</a>';
603 print
'<td class="center">';
605 print
img_picto($langs->trans(
"Default"),
'on');
607 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"SetAsDefault"),
'off').
'</a>';
612 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
613 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
614 if ($module->type ==
'pdf') {
615 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
617 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
619 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
620 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
621 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentMode").
': '.
yn($module->option_modereg, 1, 1);
622 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentConditions").
': '.
yn($module->option_condreg, 1, 1);
623 $htmltooltip .=
'<br>'.$langs->trans(
"Discounts").
': '.
yn($module->option_escompte, 1, 1);
624 $htmltooltip .=
'<br>'.$langs->trans(
"CreditNote").
': '.
yn($module->option_credit_note, 1, 1);
625 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
626 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraftInvoices").
': '.
yn($module->option_draft_watermark, 1, 1);
629 print
'<td class="center">';
630 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
634 print
'<td class="center">';
635 if ($module->type ==
'pdf') {
636 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
638 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
659 print
load_fiche_titre($langs->trans(
"BillsPDFModulesAccordindToInvoiceType"),
'',
'');
661 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#default-pdf-modules-by-type-table" method="POST">';
662 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
663 print
'<input type="hidden" name="action" value="setDefaultPDFModulesByType" >';
664 print
'<input type="hidden" name="page_y" value="" />';
666 print
'<div class="div-table-responsive-no-min">';
667 print
'<table id="default-pdf-modules-by-type-table" class="noborder centpercent">';
668 print
'<tr class="liste_titre">';
669 print
'<td>'.$langs->trans(
"Type").
'</td>';
670 print
'<td>'.$langs->trans(
"Name").
'</td>';
671 print
'<td class="right"><input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'"></td>';
684 foreach ($listtype as $type => $trans) {
685 $thisTypeConfName =
'FACTURE_ADDON_PDF_'.$type;
688 print
'<td>'.$trans.
'</td>';
703print
load_fiche_titre($langs->trans(
"SuggestedPaymentModesIfNotDefinedInInvoice"),
'',
'');
705print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
706print
'<input type="hidden" name="token" value="'.newToken().
'" />';
707print
'<input type="hidden" name="page_y" value="" />';
709print
'<div class="div-table-responsive-no-min">';
710print
'<table class="noborder centpercent">';
712print
'<tr class="liste_titre">';
714print
'<input type="hidden" name="action" value="setribchq">';
715print $langs->trans(
"PaymentMode").
'</td>';
716print
'<td class="right"></td>';
719print
'<tr class="oddeven">';
720print
"<td>".$langs->trans(
"SuggestPaymentByRIBOnAccount").
"</td>";
723 $sql =
"SELECT rowid, label, clos";
724 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
725 $sql .=
" WHERE courant = 1";
726 $sql .=
" AND entity IN (".getEntity(
'bank_account').
")";
727 $resql =
$db->query($sql);
729 $num =
$db->num_rows($resql);
732 print
'<select name="rib" class="flat" id="rib">';
733 print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
735 $obj =
$db->fetch_object($resql);
737 print
'<option value="'.$obj->rowid.
'"';
739 if (!empty($obj->clos)) {
742 print
'>'.dol_escape_htmltag($obj->label).
'</option>';
749 print
'<span class="opacitymedium">'.$langs->trans(
"NoActiveBankAccountDefined").
'</span>';
753 print $langs->trans(
"BankModuleNotActive");
759print
'<tr class="oddeven">';
760print
"<td>".$langs->trans(
"SuggestPaymentByChequeToAddress").
"</td>";
762print
'<select class="flat" name="chq" id="chq">';
763print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
764print
'<option value="-1"'.($FACTURE_CHQ_NUMBER == -1 ?
' selected' :
'').
'>'.$langs->trans(
"MenuCompanySetup").
' ('.(
$mysoc->name ?
$mysoc->name : $langs->trans(
"NotDefined")).
')</option>';
766$sql =
"SELECT rowid, label";
767$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
768$sql .=
" WHERE clos = 0";
769$sql .=
" AND courant = 1";
770$sql .=
" AND entity IN (".getEntity(
'bank_account').
")";
772$resql =
$db->query($sql);
774 $num =
$db->num_rows($resql);
777 $row =
$db->fetch_row($resql);
779 print
'<option value="'.$row[0].
'"';
780 print $FACTURE_CHQ_NUMBER == $row[0] ?
' selected' :
'';
781 print
'>'.$langs->trans(
"OwnerOfBankAccount", $row[1]).
'</option>';
793if (
$mysoc->country_code ==
'BE') {
794 print
'<tr class="oddeven"><td>' . $langs->trans(
"InvoicePaymentManageStructuredCommunication") .
' ';
795 print $form->textwithpicto(
'', $langs->trans(
"InvoicePaymentManageStructuredCommunicationHelp"), 1,
'help') .
'</td>';
796 print
'<td class="left" colspan="2">';
797 print ajax_constantonoff(
'INVOICE_PAYMENT_ENABLE_STRUCTURED_COMMUNICATION');
805print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'">';
814print
'<div class="div-table-responsive-no-min">';
815print
'<table class="noborder centpercent">';
816print
'<tr class="liste_titre">';
817print
'<td>'.$langs->trans(
"Parameters").
'</td>';
818print
'<td class="center"></td>';
819print
'<td width="80"> </td>';
823$substitutionarray[
'__(AnyTranslationKey)__'] = $langs->trans(
"Translation");
824$htmltext =
'<i>'.$langs->trans(
"AvailableVariables").
':<br>';
825foreach ($substitutionarray as $key => $val) {
826 $htmltext .= $key.
'<br>';
830print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
831print
'<input type="hidden" name="token" value="'.newToken().
'" />';
832print
'<input type="hidden" name="action" value="set_INVOICE_FREE_TEXT" />';
833print
'<input type="hidden" name="page_y" value="" />';
834print
'<tr class="oddeven"><td colspan="2">';
835print $form->textwithpicto($langs->trans(
"FreeLegalTextOnInvoices"), $langs->trans(
"AddCRIfTooLong").
'<br><br>'.$htmltext, 1,
'help',
'', 0, 2,
'freetexttooltip').
'<br>';
836$variablename =
'INVOICE_FREE_TEXT';
838 print
'<textarea name="'.$variablename.
'" class="flat" cols="120">'.
getDolGlobalString($variablename).
'</textarea>';
840 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
842 print $doleditor->Create();
844print
'</td><td class="right">';
845print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'" />';
850print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
851print
'<input type="hidden" name="token" value="'.newToken().
'" />';
852print
'<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />';
853print
'<input type="hidden" name="page_y" value="" />';
854print
'<tr class="oddeven"><td>';
855print $form->textwithpicto($langs->trans(
"WatermarkOnDraftBill"), $htmltext, 1,
'help',
'', 0, 2,
'watermarktooltip').
'<br>';
857print
'<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(
getDolGlobalString(
'FACTURE_DRAFT_WATERMARK')).
'">';
858print
'</td><td class="right">';
859print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'" />';
865print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
866print
'<input type="hidden" name="token" value="'.newToken().
'" />';
867print
'<input type="hidden" name="action" value="setforcedate" />';
868print
'<input type="hidden" name="page_y" value="" />';
869print
'<tr class="oddeven"><td>';
870print $langs->trans(
"ForceInvoiceDate");
872print $form->selectyesno(
"forcedate",
getDolGlobalInt(
'FAC_FORCE_DATE_VALIDATION', 0), 1);
873print
'</td><td class="right">';
874print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'" />';
878print
'<tr class="oddeven"><td>'.$langs->trans(
"InvoiceCheckPosteriorDate").
' ' ;
879print $form->textwithpicto(
'', $langs->trans(
"InvoiceCheckPosteriorDateHelp"), 1,
'help') .
'</td>';
880print
'<td class="left" colspan="2">';
882print ajax_constantonoff(
'INVOICE_CHECK_POSTERIOR_DATE');
889print
'<tr class="oddeven">';
890print
'<td>'.$langs->trans(
"AllowExternalDownload").
'</td>';
891print
'<td class="left" colspan="2">';
892print ajax_constantonoff(
'INVOICE_ALLOW_EXTERNAL_DOWNLOAD', array(),
null, 0, 0, 0, 2, 0, 1);
897print
'<tr class="oddeven">';
898print
'<td>'.img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"Notifications").
'</td>';
899print
'<td colspan="2">';
900print $langs->trans(
"YouMayFindNotificationsFeaturesIntoModuleNotification");
904print
'<tr class="oddeven">';
905print
'<td>'.img_picto(
'',
'pdf',
'class="pictofixedwidth"').$langs->trans(
"MoreOptionsRelatedToPDF").
'</td>';
906print
'<td colspan="2">';
907print
img_picto(
'',
'url',
'class="pictofixedwidth"').
'<a href="'.DOL_URL_ROOT.
'/admin/pdf_other.php">'.$langs->trans(
"SeeInPDFSetupPage").
'</a>';
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $idforemptyvalue='-1', $morecss='')
Convert a html select field into an ajax combobox.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage a WYSIWYG editor.
Class to manage invoices.
const TYPE_REPLACEMENT
Replacement invoice.
const TYPE_STANDARD
Standard invoice.
const TYPE_SITUATION
Situation invoice.
const TYPE_DEPOSIT
Deposit invoice.
const TYPE_CREDIT_NOTE
Credit note invoice.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_htmloutput_mesg($mesgstring='', $mesgarray=array(), $style='ok', $keepembedded=0)
Print formatted messages to output (Used to show messages on html output).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
invoice_admin_prepare_head()
Return array head with list of tabs to view object information.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0, $include=null)
Return array of possible substitutions for PDF content (without external module substitutions).
$conf db name
Only used if Module[ID]Name translation string is not found.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.