// SupplyOrder form updated
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12784 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
22ccb0625b
commit
d8f2908666
4 files changed
+35
-7
No files matched your search
@@ -979,8 +979,15 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
// checks if supply order reference is unique
|
||||
if (Tools::isSubmit('reference'))
|
||||
{
|
||||
// gets the reference
|
||||
$ref = pSQL(Tools::getValue('reference'));
|
||||
if ((int)SupplyOrder::exists($ref) != (int)Tools::getValue('id_supply_order'))
|
||||
|
||||
if (Tools::getValue('id_supply_order') != 0 && SupplyOrder::getReferenceById((int)Tools::getValue('id_supply_order')) != $ref)
|
||||
{
|
||||
if ((int)SupplyOrder::exists($ref) != 0)
|
||||
$this->errors[] = Tools::displayError($this->l('The reference has to be unique.'));
|
||||
}
|
||||
else if (Tools::getValue('id_supply_order') == 0 && (int)SupplyOrder::exists($ref) != 0)
|
||||
$this->errors[] = Tools::displayError($this->l('The reference has to be unique.'));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user