diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php
index e92ef38ee97..98f10481edc 100644
--- a/htdocs/admin/fournisseur.php
+++ b/htdocs/admin/fournisseur.php
@@ -116,6 +116,25 @@ if ($action == 'specimen') // For orders
}
}
+if ($action == 'updateMaskInvoice')
+{
+ $maskconstinvoice=GETPOST('maskconstinvoice','alpha');
+ $maskinvoice=GETPOST('maskinvoice','alpha');
+
+ if ($maskconstinvoice) $res = dolibarr_set_const($db,$maskconstinvoice,$maskinvoice,'chaine',0,'',$conf->entity);
+
+ if (! $res > 0) $error++;
+
+ if (! $error)
+ {
+ $mesg = "".$langs->trans("SetupSaved")."";
+ }
+ else
+ {
+ $mesg = "".$langs->trans("Error")."";
+ }
+}
+
if ($action == 'specimenfacture') // For invoices
{
$modele=GETPOST('module','alpha');
@@ -521,6 +540,109 @@ foreach ($dirmodels as $reldir)
print '
';
+// Supplier invoice numbering model
+
+print_titre($langs->trans("InvoicesNumberingModels"));
+
+print '
| '.$langs->trans("Name").' | '; +print ''.$langs->trans("Description").' | '; +print ''.$langs->trans("Example").' | '; +print ''.$langs->trans("Status").' | '; +print ''.$langs->trans("Info").' | '; +print "
| '.$module->nom." | \n"; + print $module->info(); + print ' | '; + + // Show example of numbering model + print '';
+ $tmp=$module->getExample();
+ if (preg_match('/^Error/',$tmp)) {
+ $langs->load("errors"); print ' '.$langs->trans($tmp).' ';
+ }
+ elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
+ else print $tmp;
+ print ' | '."\n";
+
+ print ''; + if ($conf->global->INVOICE_SUPPLIER_ADDON == "$file") + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + print ' | '; + + $invoice=new FactureFournisseur($db); + $invoice->initAsSpecimen(); + + // Info + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ' | '; + + print '