*Fix task #45545 bug.

This commit is contained in:
songchenxuan
2021-12-14 17:33:01 +08:00
parent efdadc07a7
commit 731c7fb45c

View File

@@ -3707,9 +3707,10 @@ class executionModel extends model
$param = strtolower($param); $param = strtolower($param);
$branchIDList = strpos($param, 'withmainplan') !== false ? array(BRANCH_MAIN => BRANCH_MAIN) : array(); $branchIDList = strpos($param, 'withmainplan') !== false ? array(BRANCH_MAIN => BRANCH_MAIN) : array();
foreach($products as $product) $branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noclosed');
foreach($branchGroups as $branches)
{ {
foreach($product->branches as $branchID) $branchIDList[$branchID] = $branchID; foreach($branches as $branchID => $branchName) $branchIDList[$branchID] = $branchID;
} }
$plans = $this->dao->select('id,title,product,parent,begin,end')->from(TABLE_PRODUCTPLAN) $plans = $this->dao->select('id,title,product,parent,begin,end')->from(TABLE_PRODUCTPLAN)