* Finish task#8963.#8962. Fix bug.

This commit is contained in:
qiyu-xie
2021-01-18 14:59:12 +08:00
parent fa2c0ff692
commit 9c8fb2c131
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -213,7 +213,7 @@ class program extends control
$this->view->PGMList = $this->program->getPGMList();
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->parentProgram = $parentProgram;
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram);
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram) + $program->budget;
$this->display();
}
@@ -994,7 +994,7 @@ class program extends control
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
$this->view->from = $from;
$this->view->parentProgram = $parentProgram;
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram);
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram) + $project->budget;
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->display();
+2 -2
View File
@@ -293,7 +293,7 @@ class programModel extends model
if($program->budget != 0 and $parentProgram->budget != 0)
{
$parentRemainBudget = $this->getParentRemainBudget($parentProgram);
if($program->budget > $parentRemainBudget + $program->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
if($program->budget > $parentRemainBudget + $oldProgram->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
}
if(dao::isError()) return false;
@@ -1569,7 +1569,7 @@ class programModel extends model
if($project->budget != 0 and $parentProgram->budget != 0)
{
$parentRemainBudget = $this->getParentRemainBudget($parentProgram);
if($project->budget > $parentRemainBudget + $project->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
if($project->budget > $parentRemainBudget + $oldProject->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
}