* Finish task#8963.#8962. Fix bug.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user