35require
'../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
51$langs->loadLangs(array(
'admin',
'errors',
'other',
'bills'));
57$action =
GETPOST(
'action',
'aZ09');
58$value =
GETPOST(
'value',
'alpha');
59$modulepart =
GETPOST(
'modulepart',
'aZ09');
61$label =
GETPOST(
'label',
'alpha');
62$scandir =
GETPOST(
'scan_dir',
'alpha');
73include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
75if ($action ==
'updateMask') {
76 $maskconstinvoice =
GETPOST(
'maskconstinvoice',
'aZ09');
77 $maskconstreplacement =
GETPOST(
'maskconstreplacement',
'aZ09');
78 $maskconstcredit =
GETPOST(
'maskconstcredit',
'aZ09');
79 $maskconstdeposit =
GETPOST(
'maskconstdeposit',
'aZ09');
80 $maskinvoice =
GETPOST(
'maskinvoice',
'alpha');
81 $maskreplacement =
GETPOST(
'maskreplacement',
'alpha');
82 $maskcredit =
GETPOST(
'maskcredit',
'alpha');
83 $maskdeposit =
GETPOST(
'maskdeposit',
'alpha');
85 if ($maskconstinvoice && preg_match(
'/_MASK_/', $maskconstinvoice)) {
88 if ($maskconstreplacement && preg_match(
'/_MASK_/', $maskconstreplacement)) {
91 if ($maskconstcredit && preg_match(
'/_MASK_/', $maskconstcredit)) {
94 if ($maskconstdeposit && preg_match(
'/_MASK_/', $maskconstdeposit)) {
107} elseif ($action ==
'specimen') {
108 $modele =
GETPOST(
'module',
'alpha');
111 $facture->initAsSpecimen();
116 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
117 foreach ($dirmodels as $reldir) {
118 $file =
dol_buildpath($reldir.
"core/modules/facture/doc/pdf_".$modele.
".modules.php", 0);
119 if (file_exists($file)) {
120 $classname =
"pdf_".$modele;
125 if ($classname !==
'') {
128 $module =
new $classname($db);
130 '@phan-var-force ModelePDFFactures $module';
132 if ($module->write_file($facture, $langs) > 0) {
133 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=facture&file=SPECIMEN.pdf");
141 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
143} elseif ($action ==
'set') {
146} elseif ($action ==
'del') {
153} elseif ($action ==
'setdoc') {
158 $conf->global->FACTURE_ADDON_PDF = $value;
166} elseif ($action ==
'setmod') {
170} elseif ($action ==
'setribchq') {
171 $rib =
GETPOST(
'rib',
'alpha');
172 $chq =
GETPOST(
'chq',
'alpha');
186} elseif ($action ==
'set_FACTURE_DRAFT_WATERMARK') {
187 $draft =
GETPOST(
'FACTURE_DRAFT_WATERMARK',
'alpha');
200} elseif ($action ==
'set_INVOICE_FREE_TEXT') {
201 $freetext =
GETPOST(
'INVOICE_FREE_TEXT',
'restricthtml');
214} elseif ($action ==
'setforcedate') {
215 $forcedate =
GETPOST(
'forcedate',
'alpha');
228} elseif ($action ==
'setDefaultPDFModulesByType') {
229 $invoicetypemodels =
GETPOST(
'invoicetypemodels');
231 if (!empty($invoicetypemodels) && is_array($invoicetypemodels)) {
234 foreach ($invoicetypemodels as $type => $value) {
247} elseif ($action ==
'set_INVOICE_CHECK_POSTERIOR_DATE') {
248 $check_posterior_date =
GETPOSTINT(
'INVOICE_CHECK_POSTERIOR_DATE');
249 $res =
dolibarr_set_const($db,
'INVOICE_CHECK_POSTERIOR_DATE', $check_posterior_date,
'chaine', 0,
'',
$conf->entity);
253} elseif (preg_match(
'/set_(.*)/', $action, $reg)) {
266 header(
"Location: " . $_SERVER[
"PHP_SELF"]);
269} elseif (preg_match(
'/del_(.*)/', $action, $reg)) {
281 header(
"Location: " . $_SERVER[
"PHP_SELF"]);
291$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
293llxHeader(
"", $langs->trans(
"BillsSetup"),
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura',
'', 0, 0,
'',
'',
'',
'mod-admin page-invoice');
295$form =
new Form($db);
298$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
299print
load_fiche_titre($langs->trans(
"BillsSetup"), $linkback,
'title_setup');
308print
'<div class="div-table-responsive-no-min">';
309print
'<table class="noborder centpercent">';
310print
'<tr class="liste_titre">';
311print
'<td>'.$langs->trans(
"Name").
'</td>';
312print
'<td>'.$langs->trans(
"Description").
'</td>';
313print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
314print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
315print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
320$arrayofmodules = array();
322foreach ($dirmodels as $reldir) {
325 $handle = opendir($dir);
326 if (is_resource($handle)) {
327 while (($file = readdir($handle)) !==
false) {
328 if (!is_dir($dir.$file) || (substr($file, 0, 1) !=
'.' && substr($file, 0, 3) !=
'CVS')) {
330 $classname = preg_replace(
'/\.php$/',
'', $file);
332 if (!is_file($dir.$filebis)) {
333 $filebis = $file.
"/".$file.
".modules.php";
334 $classname =
"mod_facture_".$file;
338 preg_match(
'/\-(.*)_(.*)$/', $classname, $reg);
339 if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) {
343 $classname = preg_replace(
'/\-.*$/',
'', $classname);
344 if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match(
'/mod_/', $filebis) || preg_match(
'/mod_/', $classname)) && substr($filebis,
dol_strlen($filebis) - 3, 3) ==
'php') {
346 require_once $dir.$filebis;
348 $module =
new $classname($db);
350 '@phan-var-force ModeleNumRefFactures $module';
352 $arrayofmodules[] = $module;
363foreach ($arrayofmodules as $module) {
364 $file = strtolower($module->getName($langs));
365 if (!preg_match(
'/^mod_facture_/', $file)) {
366 $file =
'mod_facture_'.$file;
370 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
373 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
380 if ($module->isEnabled()) {
381 print
'<tr class="oddeven"><td width="100">';
382 print preg_replace(
'/\-.*$/',
'', preg_replace(
'/mod_facture_/',
'', $module->getName($langs)));
384 print $module->info($langs);
388 print
'<td class="nowrap">';
389 $tmp = $module->getExample();
390 if (preg_match(
'/^Error/', $tmp)) {
391 $langs->load(
"errors");
392 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
393 } elseif ($tmp ==
'NotConfigured') {
394 print
'<span class="opacitymedium">'.$langs->trans($tmp).
'</span>';
400 print
'<td class="center">';
402 print
img_picto($langs->trans(
"Activated"),
'switch_on');
404 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>';
409 $facture->initAsSpecimen();
414 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
416 $nextval = $module->getNextValue($mysoc, $facture);
417 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
418 $htmltooltip .= $langs->trans(
"NextValueForInvoices").
': ';
420 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
421 $nextval = $langs->trans($nextval);
423 $htmltooltip .= $nextval.
'<br>';
425 $htmltooltip .= $langs->trans($module->error).
'<br>';
431 $nextval = $module->getNextValue($mysoc, $facture);
432 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
433 $htmltooltip .= $langs->trans(
"NextValueForReplacements").
': ';
435 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
436 $nextval = $langs->trans($nextval);
438 $htmltooltip .= $nextval.
'<br>';
440 $htmltooltip .= $langs->trans($module->error).
'<br>';
446 $nextval = $module->getNextValue($mysoc, $facture);
447 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
448 $htmltooltip .= $langs->trans(
"NextValueForCreditNotes").
': ';
450 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
451 $nextval = $langs->trans($nextval);
453 $htmltooltip .= $nextval.
'<br>';
455 $htmltooltip .= $langs->trans($module->error).
'<br>';
460 $nextval = $module->getNextValue($mysoc, $facture);
461 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
462 $htmltooltip .= $langs->trans(
"NextValueForDeposit").
': ';
464 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
465 $nextval = $langs->trans($nextval);
467 $htmltooltip .= $nextval;
469 $htmltooltip .= $langs->trans($module->error);
473 print
'<td class="center">';
474 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
477 if (!empty($module->error)) {
503$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
504$sql .=
" WHERE type = '".$db->escape($type).
"'";
505$sql .=
" AND entity = ".$conf->entity;
506$resql = $db->query($sql);
509 $num_rows = $db->num_rows($resql);
510 while ($i < $num_rows) {
511 $array = $db->fetch_array($resql);
512 if (is_array($array)) {
513 array_push($def, $array[0]);
521print
'<div class="div-table-responsive-no-min">';
522print
'<table class="noborder centpercent">';
523print
'<tr class="liste_titre">';
524print
'<td>'.$langs->trans(
"Name").
'</td>';
525print
'<td>'.$langs->trans(
"Description").
'</td>';
526print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
527print
'<td class="center" width="60">'.$langs->trans(
"Default").
'</td>';
528print
'<td class="center" width="32">'.$langs->trans(
"ShortInfo").
'</td>';
529print
'<td class="center" width="32">'.$langs->trans(
"Preview").
'</td>';
534$activatedModels = array();
536foreach ($dirmodels as $reldir) {
537 foreach (array(
'',
'/doc') as $valdir) {
538 $realpath = $reldir.
"core/modules/facture".$valdir;
542 $handle = opendir($dir);
543 if (is_resource($handle)) {
545 while (($file = readdir($handle)) !==
false) {
551 foreach ($filelist as $file) {
552 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
553 if (file_exists($dir.
'/'.$file)) {
554 $name = substr($file, 4,
dol_strlen($file) - 16);
555 $classname = substr($file, 0,
dol_strlen($file) - 12);
557 require_once $dir.
'/'.$file;
558 $module =
new $classname($db);
560 '@phan-var-force ModelePDFFactures $module';
562 $modulequalified = 1;
563 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
564 $modulequalified = 0;
566 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
567 $modulequalified = 0;
569 if ($module->version ==
'disabled') {
570 $modulequalified = 0;
573 if ($modulequalified) {
574 print
'<tr class="oddeven"><td width="100">';
575 print(empty($module->name) ? $name : $module->
name);
577 if (method_exists($module,
'info')) {
578 print $module->info($langs);
580 print $module->description;
585 if (in_array($name, $def)) {
586 print
'<td class="center">'.
"\n";
587 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
588 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
592 print
'<td class="center">'.
"\n";
593 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>';
598 print
'<td class="center">';
600 print
img_picto($langs->trans(
"Default"),
'on');
602 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>';
607 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
608 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
609 if ($module->type ==
'pdf') {
610 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
612 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
614 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
615 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
616 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentMode").
': '.
yn($module->option_modereg, 1, 1);
617 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentConditions").
': '.
yn($module->option_condreg, 1, 1);
618 $htmltooltip .=
'<br>'.$langs->trans(
"Discounts").
': '.
yn($module->option_escompte, 1, 1);
619 $htmltooltip .=
'<br>'.$langs->trans(
"CreditNote").
': '.
yn($module->option_credit_note, 1, 1);
620 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
621 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraftInvoices").
': '.
yn($module->option_draft_watermark, 1, 1);
624 print
'<td class="center">';
625 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
629 print
'<td class="center">';
630 if ($module->type ==
'pdf') {
631 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
633 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
654 print
load_fiche_titre($langs->trans(
"BillsPDFModulesAccordindToInvoiceType"),
'',
'');
656 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#default-pdf-modules-by-type-table" method="POST">';
657 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
658 print
'<input type="hidden" name="action" value="setDefaultPDFModulesByType" >';
659 print
'<input type="hidden" name="page_y" value="" />';
661 print
'<div class="div-table-responsive-no-min">';
662 print
'<table id="default-pdf-modules-by-type-table" class="noborder centpercent">';
663 print
'<tr class="liste_titre">';
664 print
'<td>'.$langs->trans(
"Type").
'</td>';
665 print
'<td>'.$langs->trans(
"Name").
'</td>';
666 print
'<td class="right"><input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'"></td>';
679 foreach ($listtype as $type => $trans) {
680 $thisTypeConfName =
'FACTURE_ADDON_PDF_'.$type;
683 print
'<td>'.$trans.
'</td>';
698print
load_fiche_titre($langs->trans(
"SuggestedPaymentModesIfNotDefinedInInvoice"),
'',
'');
700print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
701print
'<input type="hidden" name="token" value="'.newToken().
'" />';
702print
'<input type="hidden" name="page_y" value="" />';
704print
'<div class="div-table-responsive-no-min">';
705print
'<table class="noborder centpercent">';
707print
'<tr class="liste_titre">';
709print
'<input type="hidden" name="action" value="setribchq">';
710print $langs->trans(
"PaymentMode").
'</td>';
711print
'<td class="right"><input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'"></td>';
714print
'<tr class="oddeven">';
715print
"<td>".$langs->trans(
"SuggestPaymentByRIBOnAccount").
"</td>";
717if (isModEnabled(
'bank')) {
718 $sql =
"SELECT rowid, label, clos";
719 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
720 $sql .=
" WHERE courant = 1";
721 $sql .=
" AND entity IN (".getEntity(
'bank_account').
")";
722 $resql = $db->query($sql);
724 $num = $db->num_rows($resql);
727 print
'<select name="rib" class="flat" id="rib">';
728 print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
730 $obj = $db->fetch_object($resql);
732 print
'<option value="'.$obj->rowid.
'"';
734 if (!empty($obj->clos)) {
737 print
'>'.dol_escape_htmltag($obj->label).
'</option>';
744 print
'<span class="opacitymedium">'.$langs->trans(
"NoActiveBankAccountDefined").
'</span>';
748 print $langs->trans(
"BankModuleNotActive");
754print
'<tr class="oddeven">';
755print
"<td>".$langs->trans(
"SuggestPaymentByChequeToAddress").
"</td>";
757print
'<select class="flat" name="chq" id="chq">';
758print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
759print
'<option value="-1"'.($FACTURE_CHQ_NUMBER == -1 ?
' selected' :
'').
'>'.$langs->trans(
"MenuCompanySetup").
' ('.($mysoc->name ? $mysoc->name : $langs->trans(
"NotDefined")).
')</option>';
761$sql =
"SELECT rowid, label";
762$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
763$sql .=
" WHERE clos = 0";
764$sql .=
" AND courant = 1";
765$sql .=
" AND entity IN (".getEntity(
'bank_account').
")";
767$resql = $db->query($sql);
769 $num = $db->num_rows($resql);
772 $row = $db->fetch_row($resql);
774 print
'<option value="'.$row[0].
'"';
775 print $FACTURE_CHQ_NUMBER == $row[0] ?
' selected' :
'';
776 print
'>'.$langs->trans(
"OwnerOfBankAccount", $row[1]).
'</option>';
788if ($mysoc->country_code ==
'BE') {
789 print
'<tr class="oddeven"><td>' . $langs->trans(
"InvoicePaymentManageStructuredCommunication") .
' ';
790 print $form->textwithpicto(
'', $langs->trans(
"InvoicePaymentManageStructuredCommunicationHelp"), 1,
'help') .
'</td>';
791 print
'<td class="left" colspan="2">';
792 print ajax_constantonoff(
'INVOICE_PAYMENT_ENABLE_STRUCTURED_COMMUNICATION');
805print
'<div class="div-table-responsive-no-min">';
806print
'<table class="noborder centpercent">';
807print
'<tr class="liste_titre">';
808print
'<td>'.$langs->trans(
"Parameters").
'</td>';
809print
'<td class="center" width="60"></td>';
810print
'<td width="80"> </td>';
814print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
815print
'<input type="hidden" name="token" value="'.newToken().
'" />';
816print
'<input type="hidden" name="action" value="setforcedate" />';
817print
'<input type="hidden" name="page_y" value="" />';
818print
'<tr class="oddeven"><td>';
819print $langs->trans(
"ForceInvoiceDate");
820print
'</td><td width="60" class="center">';
821print $form->selectyesno(
"forcedate",
getDolGlobalInt(
'FAC_FORCE_DATE_VALIDATION', 0), 1);
822print
'</td><td class="right">';
823print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'" />';
828$substitutionarray[
'__(AnyTranslationKey)__'] = $langs->trans(
"Translation");
829$htmltext =
'<i>'.$langs->trans(
"AvailableVariables").
':<br>';
830foreach ($substitutionarray as $key => $val) {
831 $htmltext .= $key.
'<br>';
835print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
836print
'<input type="hidden" name="token" value="'.newToken().
'" />';
837print
'<input type="hidden" name="action" value="set_INVOICE_FREE_TEXT" />';
838print
'<input type="hidden" name="page_y" value="" />';
839print
'<tr class="oddeven"><td colspan="2">';
840print $form->textwithpicto($langs->trans(
"FreeLegalTextOnInvoices"), $langs->trans(
"AddCRIfTooLong").
'<br><br>'.$htmltext, 1,
'help',
'', 0, 2,
'freetexttooltip').
'<br>';
841$variablename =
'INVOICE_FREE_TEXT';
843 print
'<textarea name="'.$variablename.
'" class="flat" cols="120">'.
getDolGlobalString($variablename).
'</textarea>';
845 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
847 print $doleditor->Create();
849print
'</td><td class="right">';
850print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'" />';
855print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
856print
'<input type="hidden" name="token" value="'.newToken().
'" />';
857print
'<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />';
858print
'<input type="hidden" name="page_y" value="" />';
859print
'<tr class="oddeven"><td>';
860print $form->textwithpicto($langs->trans(
"WatermarkOnDraftBill"), $htmltext, 1,
'help',
'', 0, 2,
'watermarktooltip').
'<br>';
862print
'<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(
getDolGlobalString(
'FACTURE_DRAFT_WATERMARK')).
'">';
863print
'</td><td class="right">';
864print
'<input type="submit" class="button button-edit reposition" value="'.$langs->trans(
"Modify").
'" />';
869print
'<tr class="oddeven"><td>'.$langs->trans(
"InvoiceCheckPosteriorDate").
' ' ;
870print $form->textwithpicto(
'', $langs->trans(
"InvoiceCheckPosteriorDateHelp"), 1,
'help') .
'</td>';
871print
'<td class="left" colspan="2">';
872print ajax_constantonoff(
'INVOICE_CHECK_POSTERIOR_DATE');
877print
'<tr class="oddeven">';
878print
'<td>'.$langs->trans(
"AllowExternalDownload").
'</td>';
879print
'<td class="left" colspan="2">';
880print ajax_constantonoff(
'INVOICE_ALLOW_EXTERNAL_DOWNLOAD', array(),
null, 0, 0, 0, 2, 0, 1);
901print
'<div class="div-table-responsive-no-min">';
902print
'<table class="noborder centpercent">'.
"\n";
903print
'<tr class="liste_titre">'.
"\n";
904print
'<td>'.$langs->trans(
"Name").
'</td>'.
"\n";
905print
'<td></td>'.
"\n";
907print
'<tr class="oddeven">'.
"\n";
908print
'<td width="140">'.$langs->trans(
"PathDirectory").
'</td>'.
"\n";
909print
'<td>'.$conf->facture->dir_output.
'</td>'.
"\n";
920print
'<div class="div-table-responsive-no-min">';
921print
'<table class="noborder centpercent">';
922print
'<tr class="liste_titre">';
923print
'<td>'.$langs->trans(
"Parameter").
'</td>';
924print
'<td class="center" width="60"></td>';
925print
'<td width="80"> </td>';
927print
'<tr class="oddeven"><td colspan="2">';
928print $langs->trans(
"YouMayFindNotificationsFeaturesIntoModuleNotification").
'<br>';
929print
'</td><td class="right">';
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.