diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 3844373328d..bc384cfb882 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1324,9 +1324,9 @@ if (empty($reshook)) { // Terms of payment $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } elseif ($action == 'setremisepercent' && $usercancreate) { - $result = $object->set_remise_percent($user, $_POST['remise_percent']); + $result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'))); } elseif ($action == 'setremiseabsolue' && $usercancreate) { - $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); + $result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'))); } elseif ($action == 'setmode' && $usercancreate) { // Payment choice $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 98ada17e54f..66d45f6a278 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -24,6 +24,8 @@ * \brief Page to edit absolute discounts for a customer */ +if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET + require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 417ecfeb2e2..b891ae6eec7 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1778,7 +1778,7 @@ if (empty($reshook)) { $product->fetch(GETPOST('idprod'.$i, 'int')); $startday = dol_mktime(12, 0, 0, GETPOST('date_start'.$i.'month'), GETPOST('date_start'.$i.'day'), GETPOST('date_start'.$i.'year')); $endday = dol_mktime(12, 0, 0, GETPOST('date_end'.$i.'month'), GETPOST('date_end'.$i.'day'), GETPOST('date_end'.$i.'year')); - $result = $object->addline($product->description, $product->price, price2num(GETPOST('qty'.$i), 'MS'), $product->tva_tx, $product->localtax1_tx, $product->localtax2_tx, $_POST['idprod'.$i], $_POST['remise_percent'.$i], $startday, $endday, 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $product->fk_unit); + $result = $object->addline($product->description, $product->price, price2num(GETPOST('qty'.$i), 'MS'), $product->tva_tx, $product->localtax1_tx, $product->localtax2_tx, GETPOST('idprod'.$i, 'int'), price2num(GETPOST('remise_percent'.$i)), $startday, $endday, 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $product->fk_unit); } } } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index f178a2d4ea1..0a03b367717 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -290,7 +290,7 @@ if (empty($reshook)) { } if ($action == 'setremisepercent' && $usercancreate) { - $result = $object->set_remise($user, $_POST['remise_percent']); + $result = $object->set_remise($user, price2num(GETPOST('remise_percent'))); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); }