30 require
'../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
37 $langs->loadLangs(array(
'admin',
'errors',
'other',
'bills'));
41 $action =
GETPOST(
'action',
'aZ09');
42 $value =
GETPOST(
'value',
'alpha');
43 $label =
GETPOST(
'label',
'alpha');
44 $scandir =
GETPOST(
'scan_dir',
'alpha');
52 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
54 if ($action ==
'updateMask')
56 $maskconstinvoice =
GETPOST(
'maskconstinvoice',
'alpha');
57 $maskconstreplacement =
GETPOST(
'maskconstreplacement',
'alpha');
58 $maskconstcredit =
GETPOST(
'maskconstcredit',
'alpha');
59 $maskconstdeposit =
GETPOST(
'maskconstdeposit',
'alpha');
60 $maskinvoice =
GETPOST(
'maskinvoice',
'alpha');
61 $maskreplacement =
GETPOST(
'maskreplacement',
'alpha');
62 $maskcredit =
GETPOST(
'maskcredit',
'alpha');
63 $maskdeposit =
GETPOST(
'maskdeposit',
'alpha');
64 if ($maskconstinvoice) $res =
dolibarr_set_const($db, $maskconstinvoice, $maskinvoice,
'chaine', 0,
'', $conf->entity);
65 if ($maskconstreplacement) $res =
dolibarr_set_const($db, $maskconstreplacement, $maskreplacement,
'chaine', 0,
'', $conf->entity);
66 if ($maskconstcredit) $res =
dolibarr_set_const($db, $maskconstcredit, $maskcredit,
'chaine', 0,
'', $conf->entity);
67 if ($maskconstdeposit) $res =
dolibarr_set_const($db, $maskconstdeposit, $maskdeposit,
'chaine', 0,
'', $conf->entity);
69 if (!($res > 0)) $error++;
77 } elseif ($action ==
'specimen')
79 $modele =
GETPOST(
'module',
'alpha');
82 $facture->initAsSpecimen();
85 $file =
''; $classname =
''; $filefound = 0;
86 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
87 foreach ($dirmodels as $reldir)
89 $file =
dol_buildpath($reldir.
"core/modules/facture/doc/pdf_".$modele.
".modules.php", 0);
90 if (file_exists($file))
93 $classname =
"pdf_".$modele;
102 $module =
new $classname($db);
104 if ($module->write_file($facture, $langs) > 0)
106 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=facture&file=SPECIMEN.pdf");
114 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
118 elseif ($action ==
'set')
121 } elseif ($action ==
'del')
126 if ($conf->global->FACTURE_ADDON_PDF ==
"$value")
dolibarr_del_const($db,
'FACTURE_ADDON_PDF', $conf->entity);
130 elseif ($action ==
'setdoc')
132 if (
dolibarr_set_const($db,
"FACTURE_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity))
136 $conf->global->FACTURE_ADDON_PDF = $value;
145 } elseif ($action ==
'setmod')
151 } elseif ($action ==
'setribchq')
153 $rib =
GETPOST(
'rib',
'alpha');
154 $chq =
GETPOST(
'chq',
'alpha');
156 $res =
dolibarr_set_const($db,
"FACTURE_RIB_NUMBER", $rib,
'chaine', 0,
'', $conf->entity);
157 $res =
dolibarr_set_const($db,
"FACTURE_CHQ_NUMBER", $chq,
'chaine', 0,
'', $conf->entity);
159 if (!($res > 0)) $error++;
167 } elseif ($action ==
'set_FACTURE_DRAFT_WATERMARK')
169 $draft =
GETPOST(
'FACTURE_DRAFT_WATERMARK',
'alpha');
171 $res =
dolibarr_set_const($db,
"FACTURE_DRAFT_WATERMARK", trim($draft),
'chaine', 0,
'', $conf->entity);
173 if (!($res > 0)) $error++;
181 } elseif ($action ==
'set_INVOICE_FREE_TEXT')
183 $freetext =
GETPOST(
'INVOICE_FREE_TEXT',
'restricthtml');
185 $res =
dolibarr_set_const($db,
"INVOICE_FREE_TEXT", $freetext,
'chaine', 0,
'', $conf->entity);
187 if (!($res > 0)) $error++;
195 } elseif ($action ==
'setforcedate')
197 $forcedate =
GETPOST(
'forcedate',
'alpha');
199 $res =
dolibarr_set_const($db,
"FAC_FORCE_DATE_VALIDATION", $forcedate,
'chaine', 0,
'', $conf->entity);
201 if (!($res > 0)) $error++;
209 } elseif ($action ==
'setDefaultPDFModulesByType')
211 $invoicetypemodels =
GETPOST(
'invoicetypemodels');
213 if (!empty($invoicetypemodels) && is_array($invoicetypemodels))
217 foreach ($invoicetypemodels as $type => $value)
219 $res =
dolibarr_set_const($db,
'FACTURE_ADDON_PDF_'.intval($type), $value,
'chaine', 0,
'', $conf->entity);
220 if (!($res > 0)) $error++;
237 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
239 llxHeader(
"", $langs->trans(
"BillsSetup"),
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura');
241 $form =
new Form($db);
244 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
256 print '<table class="noborder centpercent">';
257 print
'<tr class="liste_titre">';
258 print
'<td>'.$langs->trans(
"Name").
'</td>';
259 print
'<td>'.$langs->trans(
"Description").
'</td>';
260 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
261 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
262 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
267 foreach ($dirmodels as $reldir)
272 $handle = opendir($dir);
273 if (is_resource($handle))
275 while (($file = readdir($handle)) !==
false)
277 if (!is_dir($dir.$file) || (substr($file, 0, 1) <>
'.' && substr($file, 0, 3) <>
'CVS'))
280 $classname = preg_replace(
'/\.php$/',
'', $file);
282 if (!is_file($dir.$filebis))
284 $filebis = $file.
"/".$file.
".modules.php";
285 $classname =
"mod_facture_".$file;
288 preg_match(
'/\-(.*)_(.*)$/', $classname, $reg);
289 if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code))
continue;
291 $classname = preg_replace(
'/\-.*$/',
'', $classname);
292 if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match(
'/mod_/', $filebis) || preg_match(
'/mod_/', $classname)) && substr($filebis,
dol_strlen($filebis) - 3, 3) ==
'php')
295 require_once $dir.$filebis;
297 $module =
new $classname($db);
300 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
continue;
301 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
continue;
303 if ($module->isEnabled())
305 print
'<tr class="oddeven"><td width="100">';
306 echo preg_replace(
'/\-.*$/',
'', preg_replace(
'/mod_facture_/',
'', preg_replace(
'/\.php$/',
'', $file)));
309 print $module->info();
314 print
'<td class="nowrap">';
315 $tmp = $module->getExample();
316 if (preg_match(
'/^Error/', $tmp)) {
317 $langs->load(
"errors");
318 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
319 } elseif ($tmp ==
'NotConfigured') print $langs->trans($tmp);
323 print '<td class="center">';
325 if ($conf->global->FACTURE_ADDON == $file || $conf->global->FACTURE_ADDON.'.php' == $file)
327 print
img_picto($langs->trans(
"Activated"),
'switch_on');
329 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&value='.preg_replace(
'/\.php$/',
'', $file).
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
334 $facture->initAsSpecimen();
338 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
340 $nextval = $module->getNextValue($mysoc, $facture);
341 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
342 $htmltooltip .= $langs->trans(
"NextValueForInvoices").
': ';
344 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured')
345 $nextval = $langs->trans($nextval);
346 $htmltooltip .= $nextval.
'<br>';
348 $htmltooltip .= $langs->trans($module->error).
'<br>';
353 $nextval = $module->getNextValue($mysoc, $facture);
354 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
355 $htmltooltip .= $langs->trans(
"NextValueForReplacements").
': ';
357 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured')
358 $nextval = $langs->trans($nextval);
359 $htmltooltip .= $nextval.
'<br>';
361 $htmltooltip .= $langs->trans($module->error).
'<br>';
367 $nextval = $module->getNextValue($mysoc, $facture);
368 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
369 $htmltooltip .= $langs->trans(
"NextValueForCreditNotes").
': ';
371 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured')
372 $nextval = $langs->trans($nextval);
373 $htmltooltip .= $nextval.
'<br>';
375 $htmltooltip .= $langs->trans($module->error).
'<br>';
380 $nextval = $module->getNextValue($mysoc, $facture);
381 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
382 $htmltooltip .= $langs->trans(
"NextValueForDeposit").
': ';
384 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured')
385 $nextval = $langs->trans($nextval);
386 $htmltooltip .= $nextval;
388 $htmltooltip .= $langs->trans($module->error);
392 print
'<td class="center">';
393 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
395 if ($conf->global->FACTURE_ADDON.
'.php' == $file)
425 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
426 $sql .=
" WHERE type = '".$db->escape($type).
"'";
427 $sql .=
" AND entity = ".$conf->entity;
428 $resql = $db->query($sql);
432 $num_rows = $db->num_rows(
$resql);
433 while ($i < $num_rows)
435 $array = $db->fetch_array(
$resql);
436 array_push($def, $array[0]);
443 print
'<table class="noborder centpercent">';
444 print
'<tr class="liste_titre">';
445 print
'<td>'.$langs->trans(
"Name").
'</td>';
446 print
'<td>'.$langs->trans(
"Description").
'</td>';
447 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
448 print
'<td class="center" width="60">'.$langs->trans(
"Default").
'</td>';
449 print
'<td class="center" width="32">'.$langs->trans(
"ShortInfo").
'</td>';
450 print
'<td class="center" width="32">'.$langs->trans(
"Preview").
'</td>';
455 $activatedModels = array();
457 foreach ($dirmodels as $reldir)
459 foreach (array(
'',
'/doc') as $valdir)
461 $realpath = $reldir.
"core/modules/facture".$valdir;
466 $handle = opendir($dir);
467 if (is_resource($handle))
469 while (($file = readdir($handle)) !==
false)
476 foreach ($filelist as $file)
478 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file))
480 if (file_exists($dir.
'/'.$file))
482 $name = substr($file, 4,
dol_strlen($file) - 16);
483 $classname = substr($file, 0,
dol_strlen($file) - 12);
485 require_once $dir.
'/'.$file;
486 $module =
new $classname($db);
488 $modulequalified = 1;
489 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0;
490 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0;
492 if ($modulequalified)
494 print
'<tr class="oddeven"><td width="100">';
495 print (empty($module->name) ? $name : $module->name);
497 if (method_exists($module,
'info')) print $module->info($langs);
498 else print $module->description;
502 if (in_array($name, $def))
504 print
'<td class="center">'.
"\n";
505 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.$name.
'">';
506 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
510 print
'<td class="center">'.
"\n";
511 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"SetAsDefault"),
'switch_off').
'</a>';
516 print
'<td class="center">';
517 if ($conf->global->FACTURE_ADDON_PDF ==
"$name")
519 print
img_picto($langs->trans(
"Default"),
'on');
521 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"SetAsDefault"),
'off').
'</a>';
526 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
527 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
528 if ($module->type ==
'pdf')
530 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
532 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
534 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
535 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
536 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentMode").
': '.
yn($module->option_modereg, 1, 1);
537 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentConditions").
': '.
yn($module->option_condreg, 1, 1);
538 $htmltooltip .=
'<br>'.$langs->trans(
"Discounts").
': '.
yn($module->option_escompte, 1, 1);
539 $htmltooltip .=
'<br>'.$langs->trans(
"CreditNote").
': '.
yn($module->option_credit_note, 1, 1);
540 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
541 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraftInvoices").
': '.
yn($module->option_draft_watermark, 1, 1);
544 print
'<td class="center">';
545 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
549 print
'<td class="center">';
550 if ($module->type ==
'pdf')
552 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
554 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
569 if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT))
575 print
load_fiche_titre($langs->trans(
"BillsPDFModulesAccordindToInvoiceType"),
'',
'');
576 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#default-pdf-modules-by-type-table" method="POST">';
577 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
578 print
'<input type="hidden" name="action" value="setDefaultPDFModulesByType" >';
579 print
'<table id="default-pdf-modules-by-type-table" class="noborder centpercent">';
580 print
'<tr class="liste_titre">';
581 print
'<td>'.$langs->trans(
"Type").
'</td>';
582 print
'<td>'.$langs->trans(
"Name").
'</td>';
583 print
'<td class="right"><input type="submit" class="button" value="'.$langs->trans(
"Modify").
'"></td>';
592 if (!empty($conf->global->INVOICE_USE_SITUATION))
597 foreach ($listtype as $type => $trans)
599 $thisTypeConfName =
'FACTURE_ADDON_PDF_'.$type;
600 $current = !empty($conf->global->{$thisTypeConfName}) ? $conf->global->{$thisTypeConfName}:$conf->global->FACTURE_ADDON_PDF;
602 print
'<td>'.$trans.
'</td>';
615 print
load_fiche_titre($langs->trans(
"SuggestedPaymentModesIfNotDefinedInInvoice"),
'',
'');
617 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
618 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
620 print
'<table class="noborder centpercent">';
622 print
'<tr class="liste_titre">';
624 print
'<input type="hidden" name="action" value="setribchq">';
625 print $langs->trans(
"PaymentMode").
'</td>';
626 print
'<td class="right"><input type="submit" class="button" value="'.$langs->trans(
"Modify").
'"></td>';
629 print
'<tr class="oddeven">';
630 print
"<td>".$langs->trans(
"SuggestPaymentByRIBOnAccount").
"</td>";
632 if (!empty($conf->banque->enabled))
634 $sql =
"SELECT rowid, label";
635 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
636 $sql .=
" WHERE clos = 0";
637 $sql .=
" AND courant = 1";
638 $sql .=
" AND entity IN (".getEntity(
'bank_account').
")";
639 $resql = $db->query($sql);
642 $num = $db->num_rows(
$resql);
646 print
'<select name="rib" class="flat" id="rib">';
647 print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
650 $row = $db->fetch_row(
$resql);
652 print
'<option value="'.$row[0].
'"';
653 print $conf->global->FACTURE_RIB_NUMBER == $row[0] ?
' selected' :
'';
654 print
'>'.$row[1].
'</option>';
660 print
'<span class="opacitymedium">'.$langs->trans(
"NoActiveBankAccountDefined").
'</span>';
664 print $langs->trans(
"BankModuleNotActive");
668 print
'<tr class="oddeven">';
669 print
"<td>".$langs->trans(
"SuggestPaymentByChequeToAddress").
"</td>";
671 print
'<select class="flat" name="chq" id="chq">';
672 print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
673 print
'<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ?
' selected' :
'').
'>'.$langs->trans(
"MenuCompanySetup").
' ('.($mysoc->name ? $mysoc->name : $langs->trans(
"NotDefined")).
')</option>';
675 $sql =
"SELECT rowid, label";
676 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
677 $sql .=
" WHERE clos = 0";
678 $sql .=
" AND courant = 1";
679 $sql .=
" AND entity IN (".getEntity(
'bank_account').
")";
681 $resql = $db->query($sql);
684 $num = $db->num_rows(
$resql);
688 $row = $db->fetch_row(
$resql);
690 print
'<option value="'.$row[0].
'"';
691 print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ?
' selected' :
'';
692 print
'>'.$langs->trans(
"OwnerOfBankAccount", $row[1]).
'</option>';
706 print
'<table class="noborder centpercent">';
707 print
'<tr class="liste_titre">';
708 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
709 print
'<td class="center" width="60">'.$langs->trans(
"Value").
'</td>';
710 print
'<td width="80"> </td>';
714 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
715 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
716 print
'<input type="hidden" name="action" value="setforcedate" />';
717 print
'<tr class="oddeven"><td>';
718 print $langs->trans(
"ForceInvoiceDate");
719 print
'</td><td width="60" class="center">';
720 print $form->selectyesno(
"forcedate", $conf->global->FAC_FORCE_DATE_VALIDATION, 1);
721 print
'</td><td class="right">';
722 print
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" />';
723 print
"</td></tr>\n";
727 $substitutionarray[
'__(AnyTranslationKey)__'] = $langs->trans(
"Translation");
728 $htmltext =
'<i>'.$langs->trans(
"AvailableVariables").
':<br>';
729 foreach ($substitutionarray as $key => $val) $htmltext .= $key.
'<br>';
732 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
733 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
734 print
'<input type="hidden" name="action" value="set_INVOICE_FREE_TEXT" />';
735 print
'<tr class="oddeven"><td colspan="2">';
736 print $form->textwithpicto($langs->trans(
"FreeLegalTextOnInvoices"), $langs->trans(
"AddCRIfTooLong").
'<br><br>'.$htmltext, 1,
'help',
'', 0, 2,
'freetexttooltip').
'<br>';
737 $variablename =
'INVOICE_FREE_TEXT';
738 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
740 print
'<textarea name="'.$variablename.
'" class="flat" cols="120">'.$conf->global->$variablename.
'</textarea>';
742 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
743 $doleditor =
new DolEditor($variablename, $conf->global->$variablename,
'', 80,
'dolibarr_notes');
744 print $doleditor->Create();
746 print
'</td><td class="right">';
747 print
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" />';
748 print
"</td></tr>\n";
752 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
753 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
754 print
'<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />';
755 print
'<tr class="oddeven"><td>';
756 print $form->textwithpicto($langs->trans(
"WatermarkOnDraftBill"), $htmltext, 1,
'help',
'', 0, 2,
'watermarktooltip').
'<br>';
758 print
'<td><input size="50" class="flat" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.
'" />';
759 print
'</td><td class="right">';
760 print
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" />';
761 print
"</td></tr>\n";
773 print
'<div class="div-table-responsive-no-min">';
774 print
'<table class="noborder centpercent">'.
"\n";
775 print
'<tr class="liste_titre">'.
"\n";
776 print
'<td>'.$langs->trans(
"Name").
'</td>'.
"\n";
777 print
'<td>'.$langs->trans(
"Value").
'</td>'.
"\n";
779 print
'<tr class="oddeven">'.
"\n";
780 print
'<td width="140">'.$langs->trans(
"PathDirectory").
'</td>'.
"\n";
781 print
'<td>'.$conf->facture->dir_output.
'</td>'.
"\n";
792 print
'<div class="div-table-responsive-no-min">';
793 print
'<table class="noborder centpercent">';
794 print
'<tr class="liste_titre">';
795 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
796 print
'<td class="center" width="60"></td>';
797 print
'<td width="80"> </td>';
799 print
'<tr class="oddeven"><td colspan="2">';
800 print $langs->trans(
"YouMayFindNotificationsFeaturesIntoModuleNotification").
'<br>';
801 print
'</td><td class="right">';
802 print
"</td></tr>\n";
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
delDocumentModel($name, $type)
Delete document model used by doc generator.
const TYPE_STANDARD
Standard invoice.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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).
addDocumentModel($name, $type, $label= '', $description= '')
Add document model used by doc generator.
const TYPE_REPLACEMENT
Replacement invoice.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
invoice_admin_prepare_head()
Return array head with list of tabs to view object informations.
const TYPE_SITUATION
Situation invoice.
const TYPE_CREDIT_NOTE
Credit note invoice.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
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.
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
const TYPE_DEPOSIT
Deposit invoice.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0)
Return array of possible substitutions for PDF content (without external module substitutions).
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
dol_htmloutput_mesg($mesgstring= '', $mesgarray=array(), $style= 'ok', $keepembedded=0)
Print formated messages to output (Used to show messages on html output).
print
Draft customers invoices.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
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...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
print $_SERVER["PHP_SELF"] n
Edit parameters.
Class to manage a WYSIWYG editor.
Class to manage invoices.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.