From 1491db714d7daabb8d85faebae0ffa7a7860f398 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 24 Dec 2021 13:45:05 +0800 Subject: [PATCH] * Fix bug: batch update branch. --- module/branch/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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")