From c66823d72fe76881274d8798daf90f07d504dc45 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 14 Oct 2018 17:07:38 +0200 Subject: [PATCH] Fix numbering of supplier credit notes (issue #9624) --- htdocs/admin/supplier_invoice.php | 7 +++++-- .../mod_facture_fournisseur_tulip.php | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 75a917dd185..5dbe26596fe 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -56,9 +56,12 @@ $specimenthirdparty->initAsSpecimen(); if ($action == 'updateMask') { $maskconstinvoice=GETPOST('maskconstinvoice','alpha'); - $maskvalue=GETPOST('maskinvoice','alpha'); + $maskconstcredit=GETPOST('maskconstcredit','alpha'); + $maskinvoice=GETPOST('maskinvoice','alpha'); + $maskcredit=GETPOST('maskcredit','alpha'); - if ($maskconstinvoice) $res = dolibarr_set_const($db,$maskconstinvoice,$maskvalue,'chaine',0,'',$conf->entity); + if ($maskconstinvoice) $res = dolibarr_set_const($db,$maskconstinvoice,$maskinvoice,'chaine',0,'',$conf->entity); + if ($maskconstcredit) $res = dolibarr_set_const($db,$maskconstcredit,$maskcredit,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 2e155c04df8..7c595fe4e9d 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -72,14 +72,18 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $tooltip.=$langs->trans("GenericMaskCodes5"); // Parametrage du prefix - $texte.= ''.$langs->trans("Mask"); - //$texte.= ' ('.$langs->trans("InvoiceStandard").')'; + $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; $texte.= ':'; $texte.= ''.$form->textwithpicto('',$tooltip,1,1).''; $texte.= '  '; $texte.= ''; + + // Parametrage du prefix des avoirs + $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; + $texte.= ''.$form->textwithpicto('',$tooltip,1,1).''; + $texte.= ''; if ($conf->global->MAIN_FEATURE_LEVEL >= 2) { @@ -88,10 +92,6 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $texte.= ''.$form->textwithpicto('',$tooltip,1,1).''; $texte.= ''; - // Parametrage du prefix des avoirs - $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; - $texte.= ''.$form->textwithpicto('',$tooltip,1,1).''; - $texte.= ''; // Parametrage du prefix des acomptes $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):';