This commit is contained in:
sunjun
2022-03-24 08:54:24 +08:00
parent e7503d435d
commit 65442bcc7f
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -57,6 +57,7 @@ $lang->project->unlinkMember = '移除成员';
$lang->project->copyTeamTitle = '选择一个项目团队来复制';
$lang->project->daysGreaterProject = '可用工日不能大于项目的可用工日『%s』';
$lang->project->errorHours = '可用工时/天不能大于『24』';
$lang->project->workdaysExceed = '可用工作日不超过『%s』天';
/* Fields. */
$lang->project->common = '项目';
+10
View File
@@ -847,6 +847,16 @@ class projectModel extends model
}
}
/*Judge workdays is legitimate. */
$date1 = date_create($project->begin);
$date2 = date_create($project->end);
$workdays = date_diff($date1, $date2);
if($project->days > $workdays->days)
{
dao::$errors['days'] = sprintf($this->lang->project->workdaysExceed, $workdays->days);
return false;
}
/* When select create new product, product name cannot be empty and duplicate. */
if(isset($_POST['newProduct']))
{