diff --git a/module/program/js/edit.js b/module/program/js/edit.js index 5b645446eb..bf521c767a 100644 --- a/module/program/js/edit.js +++ b/module/program/js/edit.js @@ -49,13 +49,13 @@ $(function() } }) - $('#cancel').click(function() + $('#cancelBtn').click(function() { $('#syncPRJUnit').val('false'); $('#exchangeRate').val(''); }) - $('#confirm').click(function() + $('#confirmBtn').click(function() { var exchangeRate = $('#rate').val(); if(!exchangeRate) diff --git a/module/program/lang/de.php b/module/program/lang/de.php index cf73d440a9..fe55012bc3 100644 --- a/module/program/lang/de.php +++ b/module/program/lang/de.php @@ -53,7 +53,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; -$lang->program->confirmChangePRJUint = 'Do you want to update the budget unit of the project of the program? If yes, please the current exchange rate.'; +$lang->program->confirmChangePRJUint = 'Synchronize the budget unit of the subprograms and the projects of the program? If yes, please the current exchange rate.'; $lang->program->exRateNotNegative = 'The『exchange rate』should not be negative.'; $lang->program->changePRJUnit = 'Update the budget unit of the project'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index b673f1ec4b..882b85823d 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -56,7 +56,7 @@ $lang->program->endLetterChild = "Child latest end: %s, parent end date $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->confirmDelete = "Do you want to delete it?"; -$lang->program->confirmChangePRJUint = 'Do you want to update the budget unit of the project of the program? If yes, please the current exchange rate.'; +$lang->program->confirmChangePRJUint = 'Synchronize the budget unit of the subprograms and the projects of the program? If yes, please the current exchange rate.'; $lang->program->exRateNotNegative = 'The『exchange rate』should not be negative.'; $lang->program->changePRJUnit = 'Update the budget unit of the project'; $lang->program->readjustTime = 'Change the program begin&end date.'; diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php index cf73d440a9..fe55012bc3 100644 --- a/module/program/lang/fr.php +++ b/module/program/lang/fr.php @@ -53,7 +53,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; -$lang->program->confirmChangePRJUint = 'Do you want to update the budget unit of the project of the program? If yes, please the current exchange rate.'; +$lang->program->confirmChangePRJUint = 'Synchronize the budget unit of the subprograms and the projects of the program? If yes, please the current exchange rate.'; $lang->program->exRateNotNegative = 'The『exchange rate』should not be negative.'; $lang->program->changePRJUnit = 'Update the budget unit of the project'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; diff --git a/module/program/lang/vi.php b/module/program/lang/vi.php index a32d21f9fe..85f3aba0d7 100644 --- a/module/program/lang/vi.php +++ b/module/program/lang/vi.php @@ -53,7 +53,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; -$lang->program->confirmChangePRJUint = 'Do you want to update the budget unit of the project of the program? If yes, please the current exchange rate.'; +$lang->program->confirmChangePRJUint = 'Synchronize the budget unit of the subprograms and the projects of the program? If yes, please the current exchange rate.'; $lang->program->exRateNotNegative = 'The『exchange rate』should not be negative.'; $lang->program->changePRJUnit = 'Update the budget unit of the project'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index 5198f209a2..e5f3e43746 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -67,7 +67,7 @@ $lang->program->endLetterChild = "子项目的最大完成日期:%s $lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态'; $lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。'; $lang->program->confirmDelete = "您确定要删除吗?"; -$lang->program->confirmChangePRJUint = '是否同步更新项目集下项目的预算的单位?若确认更新,请填写今日汇率。'; +$lang->program->confirmChangePRJUint = '是否同步更新该项目集下子项目集和项目的预算的单位?若确认更新,请填写今日汇率。'; $lang->program->exRateNotNegative = '『汇率』不能是负数。'; $lang->program->changePRJUnit = '更新项目预算单位'; $lang->program->readjustTime = '重新调整项目集起止时间'; diff --git a/module/program/model.php b/module/program/model.php index aaf5e33d78..197b011be2 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -453,8 +453,8 @@ class programModel extends model $this->dao->update(TABLE_PROJECT) ->set('budgetUnit')->eq($program->budgetUnit) ->beginIF(!empty($_POST['exchangeRate']))->set("budget = {$_POST['exchangeRate']} * `budget`")->fi() - ->where('parent')->eq($programID) - ->andWhere('type')->eq('project') + ->where('path')->like(",{$programID},%") + ->andWhere('type')->in('program,project') ->exec(); } diff --git a/module/program/view/edit.html.php b/module/program/view/edit.html.php index 618b4c0a0c..c4b3740a30 100644 --- a/module/program/view/edit.html.php +++ b/module/program/view/edit.html.php @@ -140,8 +140,8 @@