From c0c2f9af42f167ad739020fde9f3bfebd67f90da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Mon, 10 Jun 2013 16:07:41 +0200 Subject: [PATCH] fixed error when trying to create an order when a line has no associated supplier --- htdocs/product/stock/replenish.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index a483e5dfa74..e1d833d7765 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -93,7 +93,7 @@ if($action == 'order'){ if($linecount > 0){ $suppliers = array(); for($i = 0; $i < $linecount; $i++) { - if(GETPOST($i, 'alpha') === 'on') { //one line + if(GETPOST($i, 'alpha') === 'on' && GETPOST('fourn'.$i, 'int') > 0) { //one line $supplierpriceid = GETPOST('fourn'.$i, 'int'); //get all the parameters needed to create a line $qty = GETPOST('tobuy'.$i, 'int');