From a220d43bd6c612945a590dc1a2dfe4b78fce5ea1 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 1 Dec 2019 01:41:13 +0100 Subject: [PATCH 1/4] Fix #11849 : missing price2num in discount split --- htdocs/comm/remx.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index eb1c14a4beb..aa9307df8d2 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -61,8 +61,10 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) - $amount_ttc_1=GETPOST('amount_ttc_1'); - $amount_ttc_2=GETPOST('amount_ttc_2'); + $amount_ttc_1 = GETPOST('amount_ttc_1'); + $amount_ttc_1 = price2num($amount_ttc_1); + $amount_ttc_2 = GETPOST('amount_ttc_2'); + $amount_ttc_2 = price2num($amount_ttc_2); $error=0; $remid=GETPOST("remid")?GETPOST("remid"):0; From 270f4c250025b45e434c25729c860b83c187390c Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 1 Dec 2019 09:26:54 +0100 Subject: [PATCH 2/4] Fix #12044 : with replenish function, use product supplier desc in order --- htdocs/product/stock/replenish.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 87d60263e4f..a31a184731f 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -147,7 +147,13 @@ if ($action == 'order' && isset($_POST['valid'])) { $productsupplier->getMultiLangs(); } - $line->desc = $productsupplier->description; + + // if we use supplier description of the products + if(!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) { + $desc = $productsupplier->desc_supplier; + } else $desc = $productsupplier->description; + + $line->desc = $desc; if (! empty($conf->global->MAIN_MULTILANGS)) { // TODO Get desc in language of thirdparty From d76608729b212dc23e85bb6c6b31f65dfbc0e68c Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 1 Dec 2019 10:50:28 +0100 Subject: [PATCH 3/4] Fix #12569 : update qty on expensereport prevented decimals --- htdocs/expensereport/card.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index e2d1b29772d..6bfbe405b40 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2076,12 +2076,12 @@ else $i = 0;$total = 0; print ''; - print ''.$langs->trans('LineNb').''; - //print ''.$langs->trans('Piece').''; - print ''.$langs->trans('Date').''; + print ''.$langs->trans('LineNb').''; + //print ''.$langs->trans('Piece').''; + print ''.$langs->trans('Date').''; if (! empty($conf->projet->enabled)) print ''.$langs->trans('Project').''; if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) print ''.$langs->trans('CarCategory').''; - print ''.$langs->trans('Type').''; + print ''.$langs->trans('Type').''; print ''.$langs->trans('Description').''; print ''.$langs->trans('VAT').''; print ''.$langs->trans('PriceUTTC').''; @@ -2106,16 +2106,16 @@ else { print ''; - print ''; + print ''; print $numline; print ''; - /*print ''; + /*print ''; print img_picto($langs->trans("Document"), "object_generic"); print ' '.$piece_comptable.''; print '';*/ - print ''.dol_print_date($db->jdate($line->date), 'day').''; + print ''.dol_print_date($db->jdate($line->date), 'day').''; if (! empty($conf->projet->enabled)) { print ''; @@ -2170,7 +2170,9 @@ else { print ''; - print ''; + print ''; + print $numline; + print ''; // Select date print ''; @@ -2215,7 +2217,7 @@ else // Quantity print ''; - print ''; + print ''; print ''; if ($action != 'editline') @@ -2224,7 +2226,7 @@ else print ''.$langs->trans('AmountTTC').''; } - print ''; + print ''; print ''; print ''; print '
'; From 4a33ee60f862e109e6efc0c239ccba01f10b7b63 Mon Sep 17 00:00:00 2001 From: John Botella Date: Mon, 2 Dec 2019 10:34:14 +0100 Subject: [PATCH 4/4] Fix user card : use comma in amounts inputs --- htdocs/user/card.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index ef0ed3743dd..cf9f82d7483 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -218,8 +218,11 @@ if (empty($reshook)) { $object->employee = GETPOST('employee', 'alphanohtml'); $object->thm = GETPOST("thm", 'alphanohtml') != '' ? GETPOST("thm", 'alphanohtml') : ''; + $object->thm = price2num($object->thm); $object->tjm = GETPOST("tjm", 'alphanohtml') != '' ? GETPOST("tjm", 'alphanohtml') : ''; + $object->tjm = price2num($object->tjm); $object->salary = GETPOST("salary", 'alphanohtml') != '' ? GETPOST("salary", 'alphanohtml') : ''; + $object->salary = price2num($object->salary); $object->salaryextra = GETPOST("salaryextra", 'alphanohtml') != '' ? GETPOST("salaryextra", 'alphanohtml') : ''; $object->weeklyhours = GETPOST("weeklyhours", 'alphanohtml') != '' ? GETPOST("weeklyhours", 'alphanohtml') : ''; @@ -366,8 +369,11 @@ if (empty($reshook)) { $object->employee = GETPOST('employee','int'); $object->thm = GETPOST("thm",'alphanohtml') != '' ? GETPOST("thm",'alphanohtml') : ''; + $object->thm = price2num($object->thm); $object->tjm = GETPOST("tjm",'alphanohtml') != '' ? GETPOST("tjm",'alphanohtml') : ''; + $object->tjm = price2num($object->tjm); $object->salary = GETPOST("salary",'alphanohtml') != '' ? GETPOST("salary",'alphanohtml') : ''; + $object->salary = price2num($object->salary); $object->salaryextra = GETPOST("salaryextra",'alphanohtml') != '' ? GETPOST("salaryextra",'alphanohtml') : ''; $object->weeklyhours = GETPOST("weeklyhours",'alphanohtml') != '' ? GETPOST("weeklyhours",'alphanohtml') : '';