// fixed supply orders
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11861 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
2baf269661
commit
5fb6bcc040
2 files changed
+2
-2
No files matched your search
@@ -444,7 +444,7 @@ class SupplyOrderCore extends ObjectModel
|
|||||||
$query->where('so.id_supply_order = '.(int)$match.' OR so.reference = "'.pSQL($match).'"');
|
$query->where('so.id_supply_order = '.(int)$match.' OR so.reference = "'.pSQL($match).'"');
|
||||||
|
|
||||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||||
return ($res > 0);
|
return ((int)$res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -941,7 +941,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
if (Tools::isSubmit('reference'))
|
if (Tools::isSubmit('reference'))
|
||||||
{
|
{
|
||||||
$ref = pSQL(Tools::getValue('reference'));
|
$ref = pSQL(Tools::getValue('reference'));
|
||||||
if (SupplyOrder::exists($ref))
|
if ((int)SupplyOrder::exists($ref) != (int)Tools::getValue('id_supply_order'))
|
||||||
$this->_errors[] = Tools::displayError($this->l('The reference has to be unique.'));
|
$this->_errors[] = Tools::displayError($this->l('The reference has to be unique.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user