diff --git a/module/program/lang/de.php b/module/program/lang/de.php index 4b1864470e..948cbb5aa7 100644 --- a/module/program/lang/de.php +++ b/module/program/lang/de.php @@ -80,6 +80,8 @@ $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->productNotEmpty = 'Affiliated products cannot be empty!'; + $lang->program->unitList[''] = ''; $lang->program->unitList['yuan'] = 'Yuan'; $lang->program->unitList['dollar'] = 'Dollars'; @@ -115,6 +117,11 @@ $lang->program->statusList['doing'] = 'Doing'; $lang->program->statusList['suspended'] = 'Suspended'; $lang->program->statusList['closed'] = 'Closed'; +$lang->program->endList[31] = 'One month'; +$lang->program->endList[93] = 'Trimester'; +$lang->program->endList[186] = 'Half yearly'; +$lang->program->endList[365] = 'One year'; + $lang->program->noPRJ = 'No project.'; $lang->program->accessDenied = 'Access denied!'; $lang->program->chooseProgramType = 'Select a method'; @@ -133,11 +140,6 @@ $lang->program->emptyPM = 'No manager'; $lang->program->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; $lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s"; -$lang->program->parentBudget = "Parent budget: %s"; -$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->childLongTime = "If a child as long-term projects, the parent should be long-term too."; $lang->program->readjustTime = 'Change the project begin&end date.'; @@ -184,6 +186,11 @@ $lang->program->createStakeholder = 'Create Stakeholder'; $lang->program->unlinkStakeholder = 'Unlink Stakeholder'; $lang->program->importStakeholder = 'Import program'; $lang->program->PGMManageMembers = 'Program Team'; +$lang->program->PGMParentBudget = "Parent program budget:%s"; +$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date."; +$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be <= parent end date."; +$lang->program->PGMBeginGreateChild = "Child earliest begin: %s, parent begin date <= child earliest begin date."; +$lang->program->PGMEndLetterChild = "Child latest end: %s, parent end date >= child latest end date."; /* Fields. */ $lang->program->PGMName = 'Name'; @@ -204,6 +211,8 @@ $lang->program->PGMLongTime = 'Long-Term'; $lang->program->noPGM = 'No program.'; $lang->program->PGMShowClosed = 'Closed programs.'; +$lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; +$lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index 7d12bf8c0a..948cbb5aa7 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -80,6 +80,8 @@ $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->productNotEmpty = 'Affiliated products cannot be empty!'; + $lang->program->unitList[''] = ''; $lang->program->unitList['yuan'] = 'Yuan'; $lang->program->unitList['dollar'] = 'Dollars'; @@ -115,10 +117,10 @@ $lang->program->statusList['doing'] = 'Doing'; $lang->program->statusList['suspended'] = 'Suspended'; $lang->program->statusList['closed'] = 'Closed'; -$lang->program->endList[31] = '一个月'; -$lang->program->endList[93] = '三个月'; -$lang->program->endList[186] = '半年'; -$lang->program->endList[365] = '一年'; +$lang->program->endList[31] = 'One month'; +$lang->program->endList[93] = 'Trimester'; +$lang->program->endList[186] = 'Half yearly'; +$lang->program->endList[365] = 'One year'; $lang->program->noPRJ = 'No project.'; $lang->program->accessDenied = 'Access denied!'; @@ -138,11 +140,6 @@ $lang->program->emptyPM = 'No manager'; $lang->program->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; $lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s"; -$lang->program->parentBudget = "Parent budget: %s"; -$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->childLongTime = "If a child as long-term projects, the parent should be long-term too."; $lang->program->readjustTime = 'Change the project begin&end date.'; @@ -189,6 +186,11 @@ $lang->program->createStakeholder = 'Create Stakeholder'; $lang->program->unlinkStakeholder = 'Unlink Stakeholder'; $lang->program->importStakeholder = 'Import program'; $lang->program->PGMManageMembers = 'Program Team'; +$lang->program->PGMParentBudget = "Parent program budget:%s"; +$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date."; +$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be <= parent end date."; +$lang->program->PGMBeginGreateChild = "Child earliest begin: %s, parent begin date <= child earliest begin date."; +$lang->program->PGMEndLetterChild = "Child latest end: %s, parent end date >= child latest end date."; /* Fields. */ $lang->program->PGMName = 'Name'; @@ -209,6 +211,8 @@ $lang->program->PGMLongTime = 'Long-Term'; $lang->program->noPGM = 'No program.'; $lang->program->PGMShowClosed = 'Closed programs.'; +$lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; +$lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php index 4b1864470e..948cbb5aa7 100644 --- a/module/program/lang/fr.php +++ b/module/program/lang/fr.php @@ -80,6 +80,8 @@ $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->productNotEmpty = 'Affiliated products cannot be empty!'; + $lang->program->unitList[''] = ''; $lang->program->unitList['yuan'] = 'Yuan'; $lang->program->unitList['dollar'] = 'Dollars'; @@ -115,6 +117,11 @@ $lang->program->statusList['doing'] = 'Doing'; $lang->program->statusList['suspended'] = 'Suspended'; $lang->program->statusList['closed'] = 'Closed'; +$lang->program->endList[31] = 'One month'; +$lang->program->endList[93] = 'Trimester'; +$lang->program->endList[186] = 'Half yearly'; +$lang->program->endList[365] = 'One year'; + $lang->program->noPRJ = 'No project.'; $lang->program->accessDenied = 'Access denied!'; $lang->program->chooseProgramType = 'Select a method'; @@ -133,11 +140,6 @@ $lang->program->emptyPM = 'No manager'; $lang->program->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; $lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s"; -$lang->program->parentBudget = "Parent budget: %s"; -$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->childLongTime = "If a child as long-term projects, the parent should be long-term too."; $lang->program->readjustTime = 'Change the project begin&end date.'; @@ -184,6 +186,11 @@ $lang->program->createStakeholder = 'Create Stakeholder'; $lang->program->unlinkStakeholder = 'Unlink Stakeholder'; $lang->program->importStakeholder = 'Import program'; $lang->program->PGMManageMembers = 'Program Team'; +$lang->program->PGMParentBudget = "Parent program budget:%s"; +$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date."; +$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be <= parent end date."; +$lang->program->PGMBeginGreateChild = "Child earliest begin: %s, parent begin date <= child earliest begin date."; +$lang->program->PGMEndLetterChild = "Child latest end: %s, parent end date >= child latest end date."; /* Fields. */ $lang->program->PGMName = 'Name'; @@ -204,6 +211,8 @@ $lang->program->PGMLongTime = 'Long-Term'; $lang->program->noPGM = 'No program.'; $lang->program->PGMShowClosed = 'Closed programs.'; +$lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; +$lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; diff --git a/module/program/lang/vi.php b/module/program/lang/vi.php index 4b1864470e..948cbb5aa7 100644 --- a/module/program/lang/vi.php +++ b/module/program/lang/vi.php @@ -80,6 +80,8 @@ $lang->program->cv = 'CV%'; $lang->program->PRJTeamCount = 'Team'; $lang->program->PRJLongTime = 'Long-Term Project'; +$lang->program->productNotEmpty = 'Affiliated products cannot be empty!'; + $lang->program->unitList[''] = ''; $lang->program->unitList['yuan'] = 'Yuan'; $lang->program->unitList['dollar'] = 'Dollars'; @@ -115,6 +117,11 @@ $lang->program->statusList['doing'] = 'Doing'; $lang->program->statusList['suspended'] = 'Suspended'; $lang->program->statusList['closed'] = 'Closed'; +$lang->program->endList[31] = 'One month'; +$lang->program->endList[93] = 'Trimester'; +$lang->program->endList[186] = 'Half yearly'; +$lang->program->endList[365] = 'One year'; + $lang->program->noPRJ = 'No project.'; $lang->program->accessDenied = 'Access denied!'; $lang->program->chooseProgramType = 'Select a method'; @@ -133,11 +140,6 @@ $lang->program->emptyPM = 'No manager'; $lang->program->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; $lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s"; -$lang->program->parentBudget = "Parent budget: %s"; -$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->childLongTime = "If a child as long-term projects, the parent should be long-term too."; $lang->program->readjustTime = 'Change the project begin&end date.'; @@ -184,6 +186,11 @@ $lang->program->createStakeholder = 'Create Stakeholder'; $lang->program->unlinkStakeholder = 'Unlink Stakeholder'; $lang->program->importStakeholder = 'Import program'; $lang->program->PGMManageMembers = 'Program Team'; +$lang->program->PGMParentBudget = "Parent program budget:%s"; +$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date."; +$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be <= parent end date."; +$lang->program->PGMBeginGreateChild = "Child earliest begin: %s, parent begin date <= child earliest begin date."; +$lang->program->PGMEndLetterChild = "Child latest end: %s, parent end date >= child latest end date."; /* Fields. */ $lang->program->PGMName = 'Name'; @@ -204,6 +211,8 @@ $lang->program->PGMLongTime = 'Long-Term'; $lang->program->noPGM = 'No program.'; $lang->program->PGMShowClosed = 'Closed programs.'; +$lang->program->PGMTips = 'By modifying the parent item set, the associateable product also changes and becomes required. If no item set is selected, a product with the same name as the item is created by default and associated with that item.'; +$lang->program->PGMChangeTips = 'After modifying the parent program set, the products associated with the project will be cleared, and the requirements, bugs and other data under the project will also be affected, is it modified?'; $lang->program->PGMAclList['open'] = "Default(user who can visit the program can access it)"; $lang->program->PGMAclList['private'] = "Private (accessible to project portfolio holders and stakeholders)"; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index 4bbe3200bd..5eb14bb9fe 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -140,11 +140,6 @@ $lang->program->emptyPM = '暂无'; $lang->program->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目"; $lang->program->cannotCancelCat = "该项目下已经有子项目,无法取消父项目标记"; $lang->program->parentBeginEnd = "父项目起止时间:%s ~ %s"; -$lang->program->parentBudget = "父项目预算:%s"; -$lang->program->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期"; -$lang->program->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期"; -$lang->program->beginGreateChild = "子项目的最小开始日期:%s,父项目的开始日期不能大于子项目的最小开始日期"; -$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期"; $lang->program->childLongTime = "子项目中有长期项目,父项目也应该是长期项目"; $lang->program->readjustTime = '重新调整项目起止时间'; @@ -191,6 +186,11 @@ $lang->program->createStakeholder = '添加干系人'; $lang->program->unlinkStakeholder = '移除干系人'; $lang->program->importStakeholder = '从父项目集导入'; $lang->program->PGMManageMembers = '项目集团队'; +$lang->program->PGMParentBudget = "父项目集预算:%s"; +$lang->program->PGMBeginLetterParent = "父项目集的开始日期:%s,开始日期不能小于父项目集的开始日期"; +$lang->program->PGMEndGreaterParent = "父项目集的完成日期:%s,完成日期不能大于父项目集的完成日期"; +$lang->program->PGMBeginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期"; +$lang->program->PGMEndLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期"; /* Fields. */ $lang->program->PGMName = '项目集名称'; diff --git a/module/program/lang/zh-tw.php b/module/program/lang/zh-tw.php index 4a448bdb9f..828ad7dd03 100644 --- a/module/program/lang/zh-tw.php +++ b/module/program/lang/zh-tw.php @@ -41,8 +41,8 @@ $lang->program->PRJCategory = '項目類型'; $lang->program->PRJDesc = '項目描述'; $lang->program->PRJCode = '項目代號'; $lang->program->PRJCopy = '複製項目'; -$lang->program->begin = '計劃開始日期'; -$lang->program->end = '計劃完成日期'; +$lang->program->begin = '計劃開始'; +$lang->program->end = '計劃完成'; $lang->program->PRJStatus = '項目狀態'; $lang->program->PRJPM = '項目負責人'; $lang->program->PO = '產品負責人'; @@ -117,6 +117,11 @@ $lang->program->statusList['doing'] = '進行中'; $lang->program->statusList['suspended'] = '已掛起'; $lang->program->statusList['closed'] = '已關閉'; +$lang->program->endList[31] = '一個月'; +$lang->program->endList[93] = '三個月'; +$lang->program->endList[186] = '半年'; +$lang->program->endList[365] = '一年'; + $lang->program->noPRJ = '暫時沒有項目'; $lang->program->accessDenied = '您無權訪問該項目!'; $lang->program->chooseProgramType = '選擇項目管理方式'; @@ -135,11 +140,6 @@ $lang->program->emptyPM = '暫無'; $lang->program->cannotChangeToCat = "該項目已經有實際的內容,無法修改為父項目"; $lang->program->cannotCancelCat = "該項目下已經有子項目,無法取消父項目標記"; $lang->program->parentBeginEnd = "父項目起止時間:%s ~ %s"; -$lang->program->parentBudget = "父項目預算:%s"; -$lang->program->beginLetterParent = "父項目的開始日期:%s,開始日期不能小於父項目的開始日期"; -$lang->program->endGreaterParent = "父項目的完成日期:%s,完成日期不能大於父項目的完成日期"; -$lang->program->beginGreateChild = "子項目的最小開始日期:%s,父項目的開始日期不能大於子項目的最小開始日期"; -$lang->program->endLetterChild = "子項目的最大完成日期:%s,父項目的完成日期不能小於子項目的最大完成日期"; $lang->program->childLongTime = "子項目中有長期項目,父項目也應該是長期項目"; $lang->program->readjustTime = '重新調整項目起止時間'; @@ -183,9 +183,14 @@ $lang->program->PGMActivate = '激活項目集'; $lang->program->PGMExport = '導出'; $lang->program->PGMStakeholder = '干係人列表'; $lang->program->createStakeholder = '添加干係人'; -$lang->program->unlinkStakeholder = '刪除干係人'; +$lang->program->unlinkStakeholder = '移除干係人'; $lang->program->importStakeholder = '從父項目集導入'; $lang->program->PGMManageMembers = '項目集團隊'; +$lang->program->PGMParentBudget = "父項目集預算:%s"; +$lang->program->PGMBeginLetterParent = "父項目集的開始日期:%s,開始日期不能小於父項目集的開始日期"; +$lang->program->PGMEndGreaterParent = "父項目集的完成日期:%s,完成日期不能大於父項目集的完成日期"; +$lang->program->PGMBeginGreateChild = "子項目集的最小開始日期:%s,父項目集的開始日期不能大於子項目集的最小開始日期"; +$lang->program->PGMEndLetterChild = "子項目的最大完成日期:%s,父項目的完成日期不能小於子項目的最大完成日期"; /* Fields. */ $lang->program->PGMName = '項目集名稱'; @@ -194,9 +199,9 @@ $lang->program->PGMCategory = '項目集類型'; $lang->program->PGMDesc = '項目集描述'; $lang->program->PGMCode = '項目集代號'; $lang->program->PGMCopy = '複製項目集'; -$lang->program->PGMStatus = '項目集狀態'; -$lang->program->PGMPM = '項目集負責人'; -$lang->program->PGMBudget = '項目集預算'; +$lang->program->PGMStatus = '狀態'; +$lang->program->PGMPM = '負責人'; +$lang->program->PGMBudget = '預算'; $lang->program->PGMProgress = '項目進度'; $lang->program->PGMChildren = '子項目集'; $lang->program->PGMParent = '父項目集'; diff --git a/module/program/model.php b/module/program/model.php index a858f8ce76..c42d75c1af 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -266,13 +266,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->PGMBeginLetterParent, $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->PGMEndGreaterParent, $parentProgram->end); /* When parent set end then child program cannot set longTime. */ - if(empty($program->end) and $this->post->longTime and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end); + if(empty($program->end) and $this->post->longTime and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->PGMEndGreaterParent, $parentProgram->end); if(dao::isError()) return false; } @@ -283,6 +283,9 @@ class programModel extends model $this->dao->insert(TABLE_PROGRAM)->data($program) ->autoCheck() ->batchcheck($this->config->program->PGMCreate->requiredFields, 'notempty') + ->checkIF($program->begin != '', 'begin', 'date') + ->checkIF($program->end != '', 'end', 'date') + ->checkIF($program->end != '', 'end', 'gt', $program->begin) ->checkIF(!empty($program->name), 'name', 'unique') ->checkIF(!empty($program->name), 'code', 'unique') ->exec(); @@ -357,8 +360,8 @@ class programModel extends model $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'); - if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $minChildBegin); - if($maxChildEnd and $program->end < $maxChildEnd and !$this->post->longTime) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $maxChildEnd); + if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->PGMBeginGreateChild, $minChildBegin); + if($maxChildEnd and $program->end < $maxChildEnd and !$this->post->longTime) dao::$errors['end'] = sprintf($this->lang->program->PGMEndLetterChild, $maxChildEnd); } if($program->parent) @@ -366,9 +369,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->longTime 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->PGMBeginLetterParent, $parentProgram->begin); + if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->PGMEndGreaterParent, $parentProgram->end); + if(empty($program->end) and $this->post->longTime and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->PGMEndGreaterParent, $parentProgram->end); } } if(dao::isError()) return false; diff --git a/module/program/view/pgmcreate.html.php b/module/program/view/pgmcreate.html.php index 3d81e1fd7f..216740f191 100644 --- a/module/program/view/pgmcreate.html.php +++ b/module/program/view/pgmcreate.html.php @@ -72,7 +72,7 @@ program->unitList, empty($parentProgram->budgetUnit) ? 'yuan' : $parentProgram->budgetUnit, "class='form-control'");?> -