From 4ce77e62c6633909d44eea337b4fdc499b74710e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jan 2022 14:19:55 +0100 Subject: [PATCH] Debug v15 --- htdocs/admin/limits.php | 2 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/societe/card.php | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 74c46112241..c16cde9bb09 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -49,7 +49,7 @@ $mainroundingruletot = 'MAIN_ROUNDING_RULE_TOT'.(!empty($currencycode) ? '_'.$cu $valmainmaxdecimalsunit = GETPOST($mainmaxdecimalsunit, 'int'); $valmainmaxdecimalstot = GETPOST($mainmaxdecimalstot, 'int'); $valmainmaxdecimalsshown = GETPOST($mainmaxdecimalsshown, 'int'); -$valmainroundingruletot = price2num(GETPOST($mainroundingruletot, 'alpha')); +$valmainroundingruletot = price2num(GETPOST($mainroundingruletot, 'alphanohtml'), '', 2); if ($action == 'update') { $error = 0; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ed871204cae..051ee4022b0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5318,7 +5318,7 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $ * 'CT'=Round to Max for totals with Tax of foreign currency accuracy * Numeric = Nb of digits for rounding (For example 2 for a percentage) * @param int $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done) - * Put 2 if you know that number is a user input (so we know we don't have to fix decimal separator). + * Put 2 if you know that number is a user input (so we know we have to fix decimal separator). * @return string Amount with universal numeric format (Example: '99.99999'). * If conversion fails to return a numeric, it returns: * - text unchanged or partial if ($rounding = ''): price2num('W9ç', '', 0) => '9ç', price2num('W9ç', '', 1) => 'W9ç', price2num('W9ç', '', 2) => '9ç' diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d75d9256b34..b6c483fc026 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1765,10 +1765,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (GETPOSTISSET('name')) { // We overwrite with values if posted $object->name = GETPOST('name', 'alphanohtml'); - $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); + $object->name_alias = GETPOST('name_alias', 'alphanohtml'); + $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); $object->client = GETPOST('client', 'int'); - $object->code_client = GETPOST('customer_code', 'alpha'); - $object->fournisseur = GETPOST('fournisseur', 'int'); + $object->code_client = GETPOST('customer_code', 'alpha'); + $object->fournisseur = GETPOST('fournisseur', 'int'); $object->code_fournisseur = GETPOST('supplier_code', 'alpha'); $object->address = GETPOST('address', 'alphanohtml'); $object->zip = GETPOST('zipcode', 'alphanohtml');