diff --git a/htdocs/install/doctemplates/recruitment/template_recruitment.odt b/htdocs/install/doctemplates/recruitment/template_recruitment.odt new file mode 100644 index 00000000000..5955d47e206 Binary files /dev/null and b/htdocs/install/doctemplates/recruitment/template_recruitment.odt differ diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index dda796c243e..7a9d077f910 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2020 Laurent Destailleur +/* Copyright (C) 2022 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,10 +63,24 @@ class RecruitmentJobPosition extends CommonObject */ public $picto = 'recruitmentjobposition'; - + /** + * Draft status + */ const STATUS_DRAFT = 0; + + /** + * Validated + */ const STATUS_VALIDATED = 1; + + /** + * Recruited + */ const STATUS_RECRUITED = 3; + + /** + * Canceled + */ const STATUS_CANCELED = 9; @@ -651,7 +666,7 @@ class RecruitmentJobPosition extends CommonObject } /** - * Close the commercial proposal + * Close the recruitment * * @param User $user Object user that close * @param int $status Statut @@ -683,12 +698,6 @@ class RecruitmentJobPosition extends CommonObject if ($status == self::STATUS_RECRUITED) { $triggerName = 'RECRUITMENTJOB_CLOSE_RECRUITED'; $modelpdf = $this->model_pdf; - - if ($result < 0) { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -2; - } } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {