From 8debb58f7c0610150244e2ba584deda128212ef6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Jan 2021 13:36:53 +0100 Subject: [PATCH] Fix rounding of currency unit prices --- htdocs/commande/card.php | 2 +- htdocs/compta/facture/card-rec.php | 2 +- htdocs/contrat/card.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/lib/functions.lib.php | 7 +++++-- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 11 +++++------ htdocs/supplier_proposal/card.php | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 03a85346729..b06acda7105 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -633,7 +633,7 @@ if (empty($reshook)) $predef = ''; $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $price_ht = price2num(GETPOST('price_ht'), 'MU'); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CR'); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU'); $prod_entry_mode = GETPOST('prod_entry_mode'); if ($prod_entry_mode == 'free') { diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index dac009afb23..64b00aaa156 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -439,7 +439,7 @@ if (empty($reshook)) $predef = ''; $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $price_ht = price2num(GETPOST('price_ht'), 'MU'); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CR'); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU'); $prod_entry_mode = GETPOST('prod_entry_mode', 'alpha'); if ($prod_entry_mode == 'free') { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index e0f12bd83d1..a346d955f14 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -385,7 +385,7 @@ if (empty($reshook)) $predef = ''; $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $price_ht = price2num(GETPOST('price_ht'), 'MU'); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht', 'CR')); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht', 'CU')); if (GETPOST('prod_entry_mode', 'alpha') == 'free') { $idprod = 0; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ed0511a8e1d..8a96877a35b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4881,7 +4881,7 @@ class Form print '
'; print ''; print ''; - print ' '; + print ' '; print '