diff --git a/module/branch/model.php b/module/branch/model.php index a724be195a..866edef7f9 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -240,7 +240,7 @@ class branchModel extends model public function batchUpdate($productID) { $data = fixer::input('post')->get(); - $oldBranchList = $this->getList($productID, 'all'); + $oldBranchList = $this->getList($productID, 0, 'all'); $branchIDList = array_keys($this->post->IDList); $this->app->loadLang('product'); @@ -265,7 +265,6 @@ class branchModel extends model $branch->default = (isset($data->default) and $branchID == $data->default) ? 1 : 0; $branch->closedDate = $branch->status == 'closed' ? helper::today() : ''; - $this->dao->update(TABLE_BRANCH)->data($branch) ->batchCheck($this->config->branch->create->requiredFields, 'notempty') ->checkIF(!empty($branch->name) and $branch->name != $oldBranchList[$branchID]->name, 'name', 'unique', "product = $productID")