diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index adee547db8a..88212760c4d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -988,8 +988,9 @@ if ($_POST['action'] == 'updateligne' && $user->rights->facture->creer && $_POST $product->fetch($productid); $type=$product->type; } - if($product->price_min && ($_POST['productid']!='') && (price2num($_POST['price'])*(1-price2num($_POST['remise_percent'])/100) < price2num($product->price_min))) + if ($product->price_min && GETPOST('productid') && (price2num(GETPOST('subprice'))*(1-price2num(GETPOST('remise_percent'))/100) < price2num($product->price_min))) { + print "CantBeLessThanMinPrice ".GETPOST('subprice')." - ".GETPOST('remise_percent')." - ".$product->price_min; $mesg = '