From a220d43bd6c612945a590dc1a2dfe4b78fce5ea1 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 1 Dec 2019 01:41:13 +0100 Subject: [PATCH 1/7] 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/7] 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/7] 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/7] 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') : ''; From 15715aa12c933b7ee7dc90becd748e3e0410f35a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 2 Dec 2019 23:53:01 +0100 Subject: [PATCH 5/7] FIX not fee in payout list --- htdocs/stripe/payout.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index 0149775c360..b975680838e 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -107,7 +107,6 @@ if (! $rowid) { print_liste_field_titre("DateOperation", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left '); print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); print "\n"; @@ -205,7 +204,6 @@ if (! $rowid) { print '' . $payout->description . ''; // Amount print '' . price(($payout->amount) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . ""; - print '' . price(($payout->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . ""; // Status print ""; if ($payout->status=='paid') { From b67fb8be0267a69d7476c97236d018da411cc1fb Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 3 Dec 2019 00:14:05 +0100 Subject: [PATCH 6/7] Fix stripe menu --- htdocs/core/modules/modStripe.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index ae15e763fd8..40c4b31cded 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -150,7 +150,9 @@ class modStripe extends DolibarrModules 'target' => '', 'user' => 0 ); - $this->menu[$r] = array( + + $r++; + $this->menu[$r] = array( 'fk_menu' => 'fk_mainmenu=bank,fk_leftmenu=stripe', 'type' => 'left', 'titre' => 'StripePayoutList', From 636da4518f877ef5c70fc5952032c749472e3bd9 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 3 Dec 2019 11:22:00 +0100 Subject: [PATCH 7/7] Fix title of transactions list --- htdocs/stripe/transaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index d1ab2ebe50d..8b06ca6ac90 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -106,7 +106,7 @@ if (! $rowid) { print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left '); print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right_'); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right '); print "\n"; print "\n";