Skip to content

Commit

Permalink
Module RequestManager task Dolibarr#1039 Correction
Browse files Browse the repository at this point in the history
  • Loading branch information
kkhelifa-opendsi authored and Alexis LAURIER committed Jan 6, 2021
1 parent d21b123 commit 3b5db5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/custom/requestmanager/class/requestmanager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ public function create(User $user, $notrigger = false)
$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("RequestManagerDescription"));
$error++;
}
if ($this->date_deadline > 0 && $this->date_deadline < $now) {
if ($this->date_deadline > 0 && $this->date_deadline < $this->date_creation) {
$this->errors[] = $langs->trans("RequestManagerErrorDeadlineDateMustBeGreaterThanCreateDate");
$error++;
}
Expand Down Expand Up @@ -1852,6 +1852,7 @@ function createSubRequest($new_request_type, User $user, $notrigger = false)

$requestChild->fk_parent = $this->id;
$requestChild->fk_type = $new_request_type;
$requestChild->date_creation = 0;
$requestChild->date_deadline = 0;
$requestChild->context['createSubRequest'] = 'createSubRequest';

Expand Down

0 comments on commit 3b5db5c

Please sign in to comment.