From 3d547dcae38d1b3441dcbc39261485a90ff10fa0 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 20 Apr 2011 15:02:16 +0000 Subject: [PATCH] git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@6009 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/tabs/AdminProducts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-dev/tabs/AdminProducts.php b/admin-dev/tabs/AdminProducts.php index 0cc5a3e2a..d7b3f3c60 100644 --- a/admin-dev/tabs/AdminProducts.php +++ b/admin-dev/tabs/AdminProducts.php @@ -527,7 +527,7 @@ class AdminProducts extends AdminTab Tools::getValue('attribute_location'), Tools::getValue('attribute_upc'), Tools::getValue('minimal_quantity')); - if ($id_reason = (int)Tools::getValue('id_mvt_reason') AND (int)Tools::getValue('attribute_mvt_quantity') > 0) + if ($id_reason = (int)Tools::getValue('id_mvt_reason') AND (int)Tools::getValue('attribute_mvt_quantity') > 0 AND $id_reason > 0) { $reason = new StockMvtReason((int)$id_reason); $qty = Tools::getValue('attribute_mvt_quantity') * $reason->sign; @@ -1169,7 +1169,7 @@ class AdminProducts extends AdminTab $this->copyFromPost($object, $this->table); if ($object->update()) { - if ($id_reason = (int)Tools::getValue('id_mvt_reason') AND (int)Tools::getValue('mvt_quantity') > 0) + if ($id_reason = (int)Tools::getValue('id_mvt_reason') AND (int)Tools::getValue('mvt_quantity') > 0 AND $id_reason > 0) { $reason = new StockMvtReason((int)$id_reason); $qty = Tools::getValue('mvt_quantity') * $reason->sign;