From c4c7ea2f221199b1566dad96c038d2f197184776 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 8 Feb 2016 02:49:19 +0100 Subject: [PATCH] FIX Relative discount decimals are not saved --- htdocs/comm/remise.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 6d0d1dedb2a..224004b6735 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -30,6 +30,8 @@ $langs->load("companies"); $langs->load("orders"); $langs->load("bills"); +$id=GETPOST("id",'int'); + $socid = GETPOST('id','int'); // Security check if ($user->societe_id > 0) @@ -52,9 +54,9 @@ if (GETPOST('cancel') && ! empty($backtopage)) if (GETPOST("action") == 'setremise') { - $soc = New Societe($db); - $soc->fetch($_GET["id"]); - $result=$soc->set_remise_client($_POST["remise"],$_POST["note"],$user); + $soc = new Societe($db); + $soc->fetch($id); + $result=$soc->set_remise_client(price2num(GETPOST("remise")),GETPOST("note"),$user); if ($result > 0) {