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',
'alpha');
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++;
81 if ($action ==
'specimen')
83 $modele=
GETPOST(
'module',
'alpha');
86 $facture->initAsSpecimen();
89 $file=
''; $classname=
''; $filefound=0;
90 $dirmodels=array_merge(array(
'/'),(array) $conf->modules_parts[
'models']);
91 foreach($dirmodels as $reldir)
93 $file=
dol_buildpath($reldir.
"core/modules/facture/doc/pdf_".$modele.
".modules.php",0);
94 if (file_exists($file))
97 $classname =
"pdf_".$modele;
106 $module =
new $classname($db);
108 if ($module->write_file($facture,$langs) > 0)
110 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=facture&file=SPECIMEN.pdf");
122 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
127 else if ($action ==
'set')
132 else if ($action ==
'del')
137 if ($conf->global->FACTURE_ADDON_PDF ==
"$value")
dolibarr_del_const($db,
'FACTURE_ADDON_PDF',$conf->entity);
142 else if ($action ==
'setdoc')
148 $conf->global->FACTURE_ADDON_PDF = $value;
159 else if ($action ==
'setmod')
167 if ($action ==
'setribchq')
172 $res =
dolibarr_set_const($db,
"FACTURE_RIB_NUMBER",$rib,
'chaine',0,
'',$conf->entity);
173 $res =
dolibarr_set_const($db,
"FACTURE_CHQ_NUMBER",$chq,
'chaine',0,
'',$conf->entity);
175 if (! $res > 0) $error++;
187 if ($action ==
'set_FACTURE_DRAFT_WATERMARK')
189 $draft =
GETPOST(
'FACTURE_DRAFT_WATERMARK',
'alpha');
191 $res =
dolibarr_set_const($db,
"FACTURE_DRAFT_WATERMARK",trim($draft),
'chaine',0,
'',$conf->entity);
193 if (! $res > 0) $error++;
205 if ($action ==
'set_INVOICE_FREE_TEXT')
207 $freetext =
GETPOST(
'INVOICE_FREE_TEXT',
'none');
209 $res =
dolibarr_set_const($db,
"INVOICE_FREE_TEXT",$freetext,
'chaine',0,
'',$conf->entity);
211 if (! $res > 0) $error++;
223 if ($action ==
'setforcedate')
225 $forcedate =
GETPOST(
'forcedate',
'alpha');
227 $res =
dolibarr_set_const($db,
"FAC_FORCE_DATE_VALIDATION",$forcedate,
'chaine',0,
'',$conf->entity);
229 if (! $res > 0) $error++;
241 if ($action ==
'setDefaultPDFModulesByType')
243 $invoicetypemodels =
GETPOST(
'invoicetypemodels');
245 if(!empty($invoicetypemodels) && is_array($invoicetypemodels))
249 foreach ($invoicetypemodels as $type => $value)
251 $res =
dolibarr_set_const($db,
'FACTURE_ADDON_PDF_'.intval($type),$value,
'chaine',0,
'',$conf->entity);
252 if (! $res > 0) $error++;
271 $dirmodels=array_merge(array(
'/'),(array) $conf->modules_parts[
'models']);
273 llxHeader(
"",$langs->trans(
"BillsSetup"),
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura');
278 $linkback=
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
282 dol_fiche_head($head,
'general', $langs->trans(
"Invoices"), -1,
'invoice');
290 print '<table class="noborder" width="100%">';
291 print
'<tr class="liste_titre">';
292 print
'<td>'.$langs->trans(
"Name").
'</td>';
293 print
'<td>'.$langs->trans(
"Description").
'</td>';
294 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
295 print
'<td align="center" width="60">'.$langs->trans(
"Status").
'</td>';
296 print
'<td align="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
301 foreach ($dirmodels as $reldir)
306 $handle = opendir($dir);
307 if (is_resource($handle))
309 while (($file = readdir($handle))!==
false)
311 if (! is_dir($dir.$file) || (substr($file, 0, 1) <>
'.' && substr($file, 0, 3) <>
'CVS'))
314 $classname = preg_replace(
'/\.php$/',
'',$file);
316 if (! is_file($dir.$filebis))
318 $filebis = $file.
"/".$file.
".modules.php";
319 $classname =
"mod_facture_".$file;
322 preg_match(
'/\-(.*)_(.*)$/',$classname,$reg);
323 if (! empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code))
continue;
325 $classname = preg_replace(
'/\-.*$/',
'',$classname);
326 if (! class_exists($classname) && is_readable($dir.$filebis) && (preg_match(
'/mod_/',$filebis) || preg_match(
'/mod_/',$classname)) && substr($filebis,
dol_strlen($filebis)-3, 3) ==
'php')
329 require_once $dir.$filebis;
331 $module =
new $classname($db);
334 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
continue;
335 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
continue;
337 if ($module->isEnabled())
339 print
'<tr class="oddeven"><td width="100">';
340 echo preg_replace(
'/\-.*$/',
'',preg_replace(
'/mod_facture_/',
'',preg_replace(
'/\.php$/',
'',$file)));
343 print $module->info();
348 print
'<td class="nowrap">';
349 $tmp=$module->getExample();
350 if (preg_match(
'/^Error/',$tmp)) print
'<div class="error">'.$langs->trans($tmp).
'</div>';
351 elseif ($tmp==
'NotConfigured') print $langs->trans($tmp);
355 print '<td align="center">';
357 if ($conf->global->FACTURE_ADDON == $file || $conf->global->FACTURE_ADDON.'.php' == $file)
359 print
img_picto($langs->trans(
"Activated"),
'switch_on');
363 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&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>';
368 $facture->initAsSpecimen();
372 $htmltooltip.=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
374 $nextval=$module->getNextValue($mysoc,$facture);
375 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
376 $htmltooltip.=$langs->trans(
"NextValueForInvoices").
': ';
378 if (preg_match(
'/^Error/',$nextval) || $nextval==
'NotConfigured')
379 $nextval = $langs->trans($nextval);
380 $htmltooltip.=$nextval.
'<br>';
382 $htmltooltip.=$langs->trans($module->error).
'<br>';
387 $nextval=$module->getNextValue($mysoc,$facture);
388 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
389 $htmltooltip.=$langs->trans(
"NextValueForReplacements").
': ';
391 if (preg_match(
'/^Error/',$nextval) || $nextval==
'NotConfigured')
392 $nextval = $langs->trans($nextval);
393 $htmltooltip.=$nextval.
'<br>';
395 $htmltooltip.=$langs->trans($module->error).
'<br>';
401 $nextval=$module->getNextValue($mysoc,$facture);
402 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
403 $htmltooltip.=$langs->trans(
"NextValueForCreditNotes").
': ';
405 if (preg_match(
'/^Error/',$nextval) || $nextval==
'NotConfigured')
406 $nextval = $langs->trans($nextval);
407 $htmltooltip.=$nextval.
'<br>';
409 $htmltooltip.=$langs->trans($module->error).
'<br>';
414 $nextval=$module->getNextValue($mysoc,$facture);
415 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
416 $htmltooltip.=$langs->trans(
"NextValueForDeposit").
': ';
418 if (preg_match(
'/^Error/',$nextval) || $nextval==
'NotConfigured')
419 $nextval = $langs->trans($nextval);
420 $htmltooltip.=$nextval;
422 $htmltooltip.=$langs->trans($module->error);
426 print
'<td align="center">';
427 print $form->textwithpicto(
'',$htmltooltip,1,0);
429 if ($conf->global->FACTURE_ADDON.
'.php' == $file)
459 $sql.=
" FROM ".MAIN_DB_PREFIX.
"document_model";
460 $sql.=
" WHERE type = '".$type.
"'";
461 $sql.=
" AND entity = ".$conf->entity;
466 $num_rows=$db->num_rows(
$resql);
467 while ($i < $num_rows)
469 $array = $db->fetch_array(
$resql);
470 array_push($def, $array[0]);
479 print
'<table class="noborder" width="100%">';
480 print
'<tr class="liste_titre">';
481 print
'<td>'.$langs->trans(
"Name").
'</td>';
482 print
'<td>'.$langs->trans(
"Description").
'</td>';
483 print
'<td align="center" width="60">'.$langs->trans(
"Status").
'</td>';
484 print
'<td align="center" width="60">'.$langs->trans(
"Default").
'</td>';
485 print
'<td align="center" width="32">'.$langs->trans(
"ShortInfo").
'</td>';
486 print
'<td align="center" width="32">'.$langs->trans(
"Preview").
'</td>';
491 $activatedModels = array();
493 foreach ($dirmodels as $reldir)
495 foreach (array(
'',
'/doc') as $valdir)
497 $dir =
dol_buildpath($reldir.
"core/modules/facture".$valdir);
501 $handle=opendir($dir);
502 if (is_resource($handle))
504 while (($file = readdir($handle))!==
false)
511 foreach($filelist as $file)
513 if (preg_match(
'/\.modules\.php$/i',$file) && preg_match(
'/^(pdf_|doc_)/',$file))
515 if (file_exists($dir.
'/'.$file))
517 $name = substr($file, 4,
dol_strlen($file) -16);
518 $classname = substr($file, 0,
dol_strlen($file) -12);
520 require_once $dir.
'/'.$file;
521 $module =
new $classname($db);
524 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
525 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
527 if ($modulequalified)
529 print
'<tr class="oddeven"><td width="100">';
530 print (empty($module->name)?$name:$module->name);
532 if (method_exists($module,
'info')) print $module->info($langs);
533 else print $module->description;
537 if (in_array($name, $def))
539 print
'<td align="center">'.
"\n";
540 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&value='.$name.
'">';
541 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
547 print
"<td align=\"center\">\n";
548 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"SetAsDefault"),
'switch_off').
'</a>';
553 print
"<td align=\"center\">";
554 if ($conf->global->FACTURE_ADDON_PDF ==
"$name")
556 print
img_picto($langs->trans(
"Default"),
'on');
560 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"SetAsDefault"),
'off').
'</a>';
565 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
566 $htmltooltip.=
'<br>'.$langs->trans(
"Type").
': '.($module->type?$module->type:$langs->trans(
"Unknown"));
567 if ($module->type ==
'pdf')
569 $htmltooltip.=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
571 $htmltooltip.=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
572 $htmltooltip.=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo,1,1);
573 $htmltooltip.=
'<br>'.$langs->trans(
"PaymentMode").
': '.
yn($module->option_modereg,1,1);
574 $htmltooltip.=
'<br>'.$langs->trans(
"PaymentConditions").
': '.
yn($module->option_condreg,1,1);
575 $htmltooltip.=
'<br>'.$langs->trans(
"Discounts").
': '.
yn($module->option_escompte,1,1);
576 $htmltooltip.=
'<br>'.$langs->trans(
"CreditNote").
': '.
yn($module->option_credit_note,1,1);
577 $htmltooltip.=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang,1,1);
578 $htmltooltip.=
'<br>'.$langs->trans(
"WatermarkOnDraftInvoices").
': '.
yn($module->option_draft_watermark,1,1);
581 print
'<td align="center">';
582 print $form->textwithpicto(
'',$htmltooltip,1,0);
586 print
'<td align="center">';
587 if ($module->type ==
'pdf')
589 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
593 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
608 if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT))
614 print
load_fiche_titre($langs->trans(
"BillsPDFModulesAccordindToInvoiceType"),
'',
'');
615 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'#default-pdf-modules-by-type-table" method="POST">';
616 print
'<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'" />';
617 print
'<input type="hidden" name="action" value="setDefaultPDFModulesByType" >';
618 print
'<table id="default-pdf-modules-by-type-table" class="noborder" width="100%">';
619 print
'<tr class="liste_titre">';
620 print
'<td>'.$langs->trans(
"Type").
'</td>';
621 print
'<td>'.$langs->trans(
"Name").
'</td>';
622 print
'<td align="right"><input type="submit" class="button" value="'.$langs->trans(
"Modify").
'"></td>';
631 if (! empty($conf->global->INVOICE_USE_SITUATION))
636 foreach ($listtype as $type => $trans)
638 $thisTypeConfName =
'FACTURE_ADDON_PDF_'.$type;
639 $current = !empty($conf->global->{$thisTypeConfName})?$conf->global->{$thisTypeConfName}:$conf->global->FACTURE_ADDON_PDF;
641 print
'<td>'.$trans.
'</td>';
654 print
load_fiche_titre($langs->trans(
"SuggestedPaymentModesIfNotDefinedInInvoice"),
'',
'');
656 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
657 print
'<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'" />';
659 print
'<table class="noborder" width="100%">';
661 print
'<tr class="liste_titre">';
663 print
'<input type="hidden" name="action" value="setribchq">';
664 print $langs->trans(
"PaymentMode").
'</td>';
665 print
'<td align="right"><input type="submit" class="button" value="'.$langs->trans(
"Modify").
'"></td>';
668 print
'<tr class="oddeven">';
669 print
"<td>".$langs->trans(
"SuggestPaymentByRIBOnAccount").
"</td>";
671 if (! empty($conf->banque->enabled))
673 $sql =
"SELECT rowid, label";
674 $sql.=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
675 $sql.=
" WHERE clos = 0";
676 $sql.=
" AND courant = 1";
677 $sql.=
" AND entity IN (".getEntity(
'bank_account').
")";
681 $num = $db->num_rows(
$resql);
685 print
'<select name="rib" class="flat" id="rib">';
686 print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
689 $row = $db->fetch_row(
$resql);
691 print
'<option value="'.$row[0].
'"';
692 print $conf->global->FACTURE_RIB_NUMBER == $row[0] ?
' selected':
'';
693 print
'>'.$row[1].
'</option>';
701 print
"<i>".$langs->trans(
"NoActiveBankAccountDefined").
"</i>";
707 print $langs->trans(
"BankModuleNotActive");
711 print
'<tr class="oddeven">';
712 print
"<td>".$langs->trans(
"SuggestPaymentByChequeToAddress").
"</td>";
714 print
'<select class="flat" name="chq" id="chq">';
715 print
'<option value="0">'.$langs->trans(
"DoNotSuggestPaymentMode").
'</option>';
716 print
'<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER?
' selected':
'').
'>'.$langs->trans(
"MenuCompanySetup").
' ('.($mysoc->name?$mysoc->name:$langs->trans(
"NotDefined")).
')</option>';
718 $sql =
"SELECT rowid, label";
719 $sql.=
" FROM ".MAIN_DB_PREFIX.
"bank_account";
720 $sql.=
" WHERE clos = 0";
721 $sql.=
" AND courant = 1";
722 $sql.=
" AND entity IN (".getEntity(
'bank_account').
")";
727 $num = $db->num_rows(
$resql);
732 $row = $db->fetch_row(
$resql);
734 print
'<option value="'.$row[0].
'"';
735 print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ?
' selected':
'';
736 print
'>'.$langs->trans(
"OwnerOfBankAccount",$row[1]).
'</option>';
750 print
'<table class="noborder" width="100%">';
751 print
'<tr class="liste_titre">';
752 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
753 print
'<td align="center" width="60">'.$langs->trans(
"Value").
'</td>';
754 print
'<td width="80"> </td>';
758 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
759 print
'<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'" />';
760 print
'<input type="hidden" name="action" value="setforcedate" />';
761 print
'<tr class="oddeven"><td>';
762 print $langs->trans(
"ForceInvoiceDate");
763 print
'</td><td width="60" align="center">';
764 print $form->selectyesno(
"forcedate",$conf->global->FAC_FORCE_DATE_VALIDATION,1);
765 print
'</td><td align="right">';
766 print
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" />';
767 print
"</td></tr>\n";
771 $substitutionarray[
'__(AnyTranslationKey)__']=$langs->trans(
"Translation");
772 $htmltext =
'<i>'.$langs->trans(
"AvailableVariables").
':<br>';
773 foreach($substitutionarray as $key => $val) $htmltext.=$key.
'<br>';
776 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
777 print
'<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'" />';
778 print
'<input type="hidden" name="action" value="set_INVOICE_FREE_TEXT" />';
779 print
'<tr class="oddeven"><td colspan="2">';
780 print $form->textwithpicto($langs->trans(
"FreeLegalTextOnInvoices"), $langs->trans(
"AddCRIfTooLong").
'<br><br>'.$htmltext, 1,
'help',
'', 0, 2,
'freetexttooltip').
'<br>';
781 $variablename=
'INVOICE_FREE_TEXT';
782 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
784 print
'<textarea name="'.$variablename.
'" class="flat" cols="120">'.$conf->global->$variablename.
'</textarea>';
788 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
789 $doleditor=
new DolEditor($variablename, $conf->global->$variablename,
'',80,
'dolibarr_notes');
790 print $doleditor->Create();
792 print
'</td><td align="right">';
793 print
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" />';
794 print
"</td></tr>\n";
798 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
799 print
'<input type="hidden" name="token" value="'.$_SESSION[
'newtoken'].
'" />';
800 print
'<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />';
801 print
'<tr class="oddeven"><td>';
802 print $form->textwithpicto($langs->trans(
"WatermarkOnDraftBill"), $htmltext, 1,
'help',
'', 0, 2,
'watermarktooltip').
'<br>';
804 print
'<td><input size="50" class="flat" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.
'" />';
805 print
'</td><td align="right">';
806 print
'<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'" />';
807 print
"</td></tr>\n";
819 print
'<table class="noborder" width="100%">'.
"\n";
820 print
'<tr class="liste_titre">'.
"\n";
821 print
'<td>'.$langs->trans(
"Name").
'</td>'.
"\n";
822 print
'<td>'.$langs->trans(
"Value").
'</td>'.
"\n";
824 print
'<tr '.$bc[
false].
'>'.
"\n";
825 print
'<td width="140">'.$langs->trans(
"PathDirectory").
'</td>'.
"\n";
826 print
'<td>'.$conf->facture->dir_output.
'</td>'.
"\n";
836 print
'<table class="noborder" width="100%">';
837 print
'<tr class="liste_titre">';
838 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
839 print
'<td align="center" width="60"></td>';
840 print
'<td width="80"> </td>';
843 print
'<tr class="oddeven"><td colspan="2">';
844 print $langs->trans(
"YouMayFindNotificationsFeaturesIntoModuleNotification").
'<br>';
845 print
'</td><td align="right">';
846 print
"</td></tr>\n";
delDocumentModel($name, $type)
Delete document model used by doc generator.
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
const TYPE_STANDARD
Standard invoice.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
print
Draft customers invoices.
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
if(! empty($conf->facture->enabled) && $user->rights->facture->lire) if(! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) if(! empty($conf->don->enabled) && $user->rights->societe->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) && $user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
const TYPE_REPLACEMENT
Replacement invoice.
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.
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
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.
if(! GETPOST('transkey', 'alphanohtml') &&! GETPOST('transphrase', 'alphanohtml')) else
View.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
dol_fiche_end($notab=0)
Show tab footer of a card.
if(GETPOST('cancel', 'alpha')) if(! GETPOST( 'confirmmassaction', 'alpha') &&$massaction !='presend' &&$massaction !='confirm_presend')
Draft customers invoices.
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).
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Class to manage a WYSIWYG editor.
Class to manage invoices.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='')
Show picto whatever it's its name (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='')
Show tab header of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_htmloutput_mesg($mesgstring='', $mesgarray=array(), $style='ok', $keepembedded=0)
Print formated messages to output (Used to show messages on html output).