From e1a7de32e1de44875c3078c3c6579ef9c06143c4 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 18 Oct 2020 15:36:04 +0200 Subject: [PATCH 1/2] NEW add alert before change thirdparty in takepos With some prices rules, change thirdparty should only done before add products to draft invoice. We can't block it but display an alert can be done for users --- htdocs/societe/list.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index b1cd367f258..fde106d91bb 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -610,6 +610,10 @@ if (!empty($type)) if ($type == 'f') $label = 'NewSupplier'; } +if ($contextpage = 'poslist' && ( !empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { +print get_htmloutput_mesg(img_warning('default') . ' ' . $langs->trans("BecarefullChangeThirdpartyBeforeAddProductToInvoice"), '', 'warning', 1); +} + // Show the new button only when this page is not opend from the Extended POS (pop-up window) // but allow it too, when a user has the rights to create a new customer if ($contextpage != 'poslist') From 18b71e2fa6ebaf25c2c6212411d0c6d6ca075646 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 18 Oct 2020 13:38:00 +0000 Subject: [PATCH 2/2] Fixing style errors. --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index fde106d91bb..4007851ccb2 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -611,7 +611,7 @@ if (!empty($type)) } if ($contextpage = 'poslist' && ( !empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { -print get_htmloutput_mesg(img_warning('default') . ' ' . $langs->trans("BecarefullChangeThirdpartyBeforeAddProductToInvoice"), '', 'warning', 1); + print get_htmloutput_mesg(img_warning('default') . ' ' . $langs->trans("BecarefullChangeThirdpartyBeforeAddProductToInvoice"), '', 'warning', 1); } // Show the new button only when this page is not opend from the Extended POS (pop-up window)