git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@6009 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user