This commit is contained in:
@@ -527,7 +527,7 @@ class AdminProducts extends AdminTab
|
|||||||
Tools::getValue('attribute_location'),
|
Tools::getValue('attribute_location'),
|
||||||
Tools::getValue('attribute_upc'),
|
Tools::getValue('attribute_upc'),
|
||||||
Tools::getValue('minimal_quantity'));
|
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);
|
$reason = new StockMvtReason((int)$id_reason);
|
||||||
$qty = Tools::getValue('attribute_mvt_quantity') * $reason->sign;
|
$qty = Tools::getValue('attribute_mvt_quantity') * $reason->sign;
|
||||||
@@ -1169,7 +1169,7 @@ class AdminProducts extends AdminTab
|
|||||||
$this->copyFromPost($object, $this->table);
|
$this->copyFromPost($object, $this->table);
|
||||||
if ($object->update())
|
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);
|
$reason = new StockMvtReason((int)$id_reason);
|
||||||
$qty = Tools::getValue('mvt_quantity') * $reason->sign;
|
$qty = Tools::getValue('mvt_quantity') * $reason->sign;
|
||||||
|
|||||||
Reference in New Issue
Block a user