FIX Relative discount with high nb of decimals

This commit is contained in:
Laurent Destailleur
2021-09-08 22:09:02 +02:00
parent 4705d41ed2
commit 30856d5b18
8 changed files with 23 additions and 23 deletions

View File

@@ -597,9 +597,9 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'errors');
}
} elseif ($action == 'setremisepercent' && $usercancreate) {
$result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), 2));
$result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), '', 2));
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU'));
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU', 2));
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') {
// Define vat_rate
$vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0);