This commit is contained in:
zhouxudong
2022-06-27 07:36:13 +00:00
parent 88e2ca8a01
commit 446ec44f29
12 changed files with 53 additions and 44 deletions
+4 -4
View File
@@ -99,10 +99,10 @@ $lang->program->noProgram = 'No program.';
$lang->program->showClosed = 'Closed programs.';
$lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.';
$lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?";
$lang->program->beginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->endGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
$lang->program->beginLetterParent = 'Program "%s" set start date should be greater than or equal to parent program "%s" set start date: %s.';
$lang->program->endGreaterParent = 'Program "%s" set end date should be less than or equal to parent program "%s" set end date: %s.';
$lang->program->beginGreateChild = 'The start date of parent program "%s" set should be less than or equal to the minimum start time of child program "%s" set: %s.';
$lang->program->endLetterChild = 'The end time of parent program "%s" set should be greater than or equal to the maximum end time of child program "%s" set: %s.';
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
$lang->program->hasProduct = 'It has products. You cannot delete it.';
+4 -4
View File
@@ -99,10 +99,10 @@ $lang->program->noProgram = 'No program.';
$lang->program->showClosed = 'Closed';
$lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.';
$lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?";
$lang->program->beginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->endGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
$lang->program->beginLetterParent = 'Program "%s" set start date should be greater than or equal to parent program "%s" set start date: %s.';
$lang->program->endGreaterParent = 'Program "%s" set end date should be less than or equal to parent program "%s" set end date: %s.';
$lang->program->beginGreateChild = 'The start date of parent program "%s" set should be less than or equal to the minimum start time of child program "%s" set: %s.';
$lang->program->endLetterChild = 'The end time of parent program "%s" set should be greater than or equal to the maximum end time of child program "%s" set: %s.';
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
$lang->program->hasChildren = 'The program has a child program or the project exists and can not be deleted.';
$lang->program->hasProduct = 'The program has products exist and can not be deleted.';
+4 -4
View File
@@ -99,10 +99,10 @@ $lang->program->noProgram = 'No program.';
$lang->program->showClosed = 'Closed programs.';
$lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.';
$lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?";
$lang->program->beginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->endGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
$lang->program->beginLetterParent = 'La date de début du programme "%s" doit être supérieure ou égale à la date de début du programme parent "%s": %s.';
$lang->program->endGreaterParent = 'La date de fin du programme "%s" doit être inférieure ou égale à la date de fin du programme parent "%s": %s';
$lang->program->beginGreateChild = 'La date de début de l\'ensemble parent "%s" doit être inférieure ou égale à l\'heure de début minimale de l\'ensemble enfant "%s": %s.';
$lang->program->endLetterChild = 'L\'heure de fin de l\'ensemble parent "%s" doit être supérieure ou égale à l\'heure de fin maximale de l\'ensemble enfant "%s": %s.';
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
$lang->program->hasProduct = 'It has products. You cannot delete it.';
+4 -4
View File
@@ -99,10 +99,10 @@ $lang->program->noProgram = '暂时没有项目集';
$lang->program->showClosed = '显示已关闭';
$lang->program->tips = '选择了父项目集,则可关联该父项目集下的产品。如果项目未选择任何项目集,则系统会默认创建一个和该项目同名的产品并关联该项目。';
$lang->program->confirmBatchUnlink = "您确定要批量移除这些干系人吗?";
$lang->program->beginLetterParent = "父项目集的开始日期:%s,开始日期不能小于父项目集的开始日期";
$lang->program->endGreaterParent = "父项目集的完成日期:%s,完成日期不能大于父项目集的完成日期";
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期";
$lang->program->beginLetterParent = '项目集“%s”开始日期应大于等于父项目集“%s”的开始日期:%s。';
$lang->program->endGreaterParent = '项目集“%s”完成日期应小于等于父项目集“%s”的完成日期:%s。';
$lang->program->beginGreateChild = '父项目集“%s”的开始日期应小于等于子项目集“%s”的最小开始时间:%s。';
$lang->program->endLetterChild = '父项目集“%s”的完成时间应大于等于子项目集“%s”的最大完成时间:%s。';
$lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态';
$lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。';
$lang->program->hasProduct = '该项目集有产品存在,不能删除。';
+10 -10
View File
@@ -709,13 +709,13 @@ class programModel extends model
if($parentProgram)
{
/* Child program begin cannot less than parent. */
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin);
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $program->name, $parentProgram->name, $parentProgram->begin);
/* When parent set end then child program end cannot greater than parent. */
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
/* When parent set end then child program cannot set longTime. */
if(empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
if(empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
/* The budget of a child program cannot beyond the remaining budget of the parent program. */
$program->budgetUnit = $parentProgram->budgetUnit;
@@ -799,11 +799,11 @@ class programModel extends model
if($children > 0)
{
$minChildBegin = $this->dao->select('min(begin) as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->fetch('minBegin');
$maxChildEnd = $this->dao->select('max(end) as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->fetch('maxEnd');
$minChildBegin = $this->dao->select('name, min(begin) as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->fetch();
$maxChildEnd = $this->dao->select('name, max(end) as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->fetch();
if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $minChildBegin);
if($maxChildEnd and $program->end < $maxChildEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $maxChildEnd);
if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $program->name, $minChildBegin->name, $minChildBegin->minBegin);
if($maxChildEnd and $program->end < $maxChildEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $program->name, $maxChildEnd->name, $maxChildEnd->maxEnd);
if(dao::isError()) return false;
}
@@ -818,9 +818,9 @@ class programModel extends model
$parentProgram = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($program->parent)->fetch();
if($parentProgram)
{
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin);
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
if(empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $program->name, $parentProgram->name, $parentProgram->begin);
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
if(empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
}
/* The budget of a child program cannot beyond the remaining budget of the parent program. */