* Adjust codes.

This commit is contained in:
daitingting
2022-10-21 01:07:48 +00:00
parent ea9b26e581
commit b09405cdef
+2 -2
View File
@@ -1528,7 +1528,7 @@ class projectModel extends model
->checkIF($project->begin != '', 'begin', 'date')
->checkIF($project->end != '', 'end', 'date')
->checkIF($project->end != '', 'end', 'gt', $project->begin)
->checkIF(!empty($project->name), 'name', 'unique', "id != $projectID and `type` = 'project' and `parent` = '$project->parent' and `model` = '{$project->model}' and `deleted` = '0'")
->checkIF(!empty($project->name), 'name', 'unique', "id != $projectID and `type` = 'project' and `parent` = '$oldProject->parent' and `model` = '{$project->model}' and `deleted` = '0'")
->checkIF(!empty($project->code), 'code', 'unique', "id != $projectID and `type` = 'project' and `model` = '{$project->model}' and `deleted` = '0'")
->checkFlow()
->where('id')->eq($projectID)
@@ -1603,7 +1603,7 @@ class projectModel extends model
if(!empty($unlinkedProducts))
{
$products = $this->dao->select('name')->from(TABLE_PRODUCT)->where('id')->in($unlinkedProducts)->fetchPairs();
$this->action->create('project', $projectID, 'unlinkproduct', '', implode(',', $products));
$this->loadModel('action')->create('project', $projectID, 'unlinkproduct', '', implode(',', $products));
}
/* Activate or close the shadow product of the project. */