25 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
37 public $module =
'recruitment';
42 public $element =
'recruitmentcandidature';
47 public $table_element =
'recruitment_recruitmentcandidature';
53 public $ismultientitymanaged = 0;
58 public $isextrafieldmanaged = 1;
63 public $picto =
'recruitmentcandidature';
68 public $email_fields_no_propagate_in_actioncomm;
71 const STATUS_DRAFT = 0;
72 const STATUS_VALIDATED = 1;
74 const STATUS_CONTRACT_PROPOSED = 3;
75 const STATUS_CONTRACT_SIGNED = 5;
76 const STATUS_CONTRACT_REFUSED = 6;
77 const STATUS_REFUSED = 8;
78 const STATUS_CANCELED = 9;
110 public $fields = array(
111 'rowid' => array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'enabled'=>
'1',
'position'=>1,
'notnull'=>1,
'visible'=>0,
'noteditable'=>
'1',
'index'=>1,
'comment'=>
"Id"),
112 'entity' => array(
'type'=>
'integer',
'label'=>
'Entity',
'enabled'=>1,
'visible'=>0,
'position'=>5,
'notnull'=>1,
'default'=>
'1',
'index'=>1),
113 'ref' => array(
'type'=>
'varchar(128)',
'label'=>
'Ref',
'enabled'=>
'1',
'position'=>10,
'notnull'=>1,
'visible'=>4,
'noteditable'=>
'1',
'default'=>
'(PROV)',
'index'=>1,
'searchall'=>1,
'showoncombobox'=>
'1',
'comment'=>
"Reference of candidature",
'csslist'=>
'nowraponall'),
114 'fk_recruitmentjobposition' => array(
'type'=>
'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php',
'label'=>
'Job',
'enabled'=>
'1',
'position'=>15,
'notnull'=>0,
'visible'=>1,
'index'=>1,
'picto'=>
'recruitmentjobposition',
'css'=>
'minwidth300 maxwidth500 widthcentpercentminusx',
'csslist'=>
'minwidth125 tdoverflowmax200'),
115 'note_public' => array(
'type'=>
'html',
'label'=>
'NotePublic',
'enabled'=>
'1',
'position'=>61,
'notnull'=>0,
'visible'=>0,),
116 'note_private' => array(
'type'=>
'html',
'label'=>
'NotePrivate',
'enabled'=>
'1',
'position'=>62,
'notnull'=>0,
'visible'=>0,),
117 'fk_user_creat' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserAuthor',
'enabled'=>
'1',
'position'=>510,
'notnull'=>1,
'visible'=>-2,
'foreignkey'=>
'user.rowid',),
118 'fk_user_modif' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserModif',
'enabled'=>
'1',
'position'=>511,
'notnull'=>-1,
'visible'=>-2,),
119 'lastname' => array(
'type'=>
'varchar(128)',
'label'=>
'Lastname',
'enabled'=>
'1',
'position'=>20,
'notnull'=>0,
'visible'=>1,
'csslist'=>
'tdoverflowmax150'),
120 'firstname' => array(
'type'=>
'varchar(128)',
'label'=>
'Firstname',
'enabled'=>
'1',
'position'=>21,
'notnull'=>0,
'visible'=>1,
'csslist'=>
'tdoverflowmax150'),
121 'email' => array(
'type'=>
'email',
'label'=>
'EMail',
'enabled'=>
'1',
'position'=>30,
'notnull'=>1,
'visible'=>1,
'picto'=>
'email',
'csslist'=>
'tdoverflowmax200'),
122 'phone' => array(
'type'=>
'phone',
'label'=>
'Phone',
'enabled'=>
'1',
'position'=>31,
'notnull'=>0,
'visible'=>1,
'picto'=>
'phone',
'csslist'=>
'tdoverflowmax150'),
123 'date_birth' => array(
'type'=>
'date',
'label'=>
'DateOfBirth',
'enabled'=>
'1',
'position'=>70,
'visible'=>-1,),
124 'email_msgid' => array(
'type'=>
'varchar(255)',
'label'=>
'EmailMsgID',
'visible'=>-2,
'enabled'=>1,
'position'=>540,
'notnull'=>-1,
'help'=>
'EmailMsgIDDesc'),
126 'remuneration_requested' => array(
'type'=>
'integer',
'label'=>
'RequestedRemuneration',
'enabled'=>
'1',
'position'=>80,
'notnull'=>0,
'visible'=>-1,),
127 'remuneration_proposed' => array(
'type'=>
'integer',
'label'=>
'ProposedRemuneration',
'enabled'=>
'1',
'position'=>81,
'notnull'=>0,
'visible'=>-1,),
128 'description' => array(
'type'=>
'html',
'label'=>
'Description',
'enabled'=>
'1',
'position'=>300,
'notnull'=>0,
'visible'=>3,
'cssview'=>
'wordbreak'),
129 'date_creation' => array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>
'1',
'position'=>500,
'notnull'=>1,
'visible'=>1,
'csslist'=>
'nowraponall'),
130 'tms' => array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>
'1',
'position'=>501,
'notnull'=>0,
'visible'=>-2,
'csslist'=>
'nowraponall'),
131 'import_key' => array(
'type'=>
'varchar(14)',
'label'=>
'ImportId',
'enabled'=>
'1',
'position'=>1000,
'notnull'=>-1,
'visible'=>-2,),
132 'model_pdf' => array(
'type'=>
'varchar(255)',
'label'=>
'Model pdf',
'enabled'=>
'1',
'position'=>1010,
'notnull'=>-1,
'visible'=>0,),
133 'status' => array(
'type'=>
'smallint',
'label'=>
'Status',
'enabled'=>
'1',
'position'=>1000,
'notnull'=>1,
'visible'=>1,
'index'=>1,
'default'=>0,
'arrayofkeyval'=>array(
'0'=>
'Draft',
'1'=>
'Received',
'3'=>
'ContractProposed',
'5'=>
'ContractSigned',
'8'=>
'Refused',
'9'=>
'Canceled')),
138 public $fk_recruitmentjobposition;
141 public $note_private;
142 public $date_creation;
144 public $fk_user_creat;
145 public $fk_user_modif;
152 public $remuneration_requested;
153 public $remuneration_proposed;
154 public $fk_recruitment_origin;
168 global $conf, $langs;
172 if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields[
'rowid'])) {
173 $this->fields[
'rowid'][
'visible'] = 0;
175 if (empty($conf->multicompany->enabled) && isset($this->fields[
'entity'])) {
176 $this->fields[
'entity'][
'enabled'] = 0;
186 foreach ($this->fields as $key => $val) {
187 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
188 unset($this->fields[$key]);
193 if (is_object($langs)) {
194 foreach ($this->fields as $key => $val) {
195 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
196 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
197 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
225 global $langs, $extrafields;
230 $object =
new self($this->db);
235 $result = $object->fetchCommon($fromid);
236 if ($result > 0 && !empty($object->table_element_line)) {
237 $object->fetchLines();
246 unset($object->fk_user_creat);
247 unset($object->import_key);
250 if (property_exists($object,
'ref')) {
251 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
253 if (property_exists($object,
'label')) {
254 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".$object->label : $this->fields[
'label'][
'default'];
256 if (property_exists($object,
'status')) {
257 $object->status = self::STATUS_DRAFT;
259 if (property_exists($object,
'date_creation')) {
260 $object->date_creation =
dol_now();
262 if (property_exists($object,
'date_modification')) {
263 $object->date_modification =
null;
268 if (is_array($object->array_options) && count($object->array_options) > 0) {
269 $extrafields->fetch_name_optionals_label($this->table_element);
270 foreach ($object->array_options as $key => $option) {
271 $shortkey = preg_replace(
'/options_/',
'', $key);
272 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
275 unset($object->array_options[$key]);
281 $object->context[
'createfromclone'] =
'createfromclone';
282 $result = $object->createCommon($user);
285 $this->error = $object->error;
286 $this->errors = $object->errors;
298 if (property_exists($this,
'socid') && $this->socid == $object->socid) {
305 unset($object->context[
'createfromclone']);
312 $this->
db->rollback();
325 public function fetch($id, $ref =
null, $email_msgid =
'')
329 $morewhere =
" AND email_msgid = '".$this->db->escape($email_msgid).
"'";
331 $result = $this->
fetchCommon($id, $ref, $morewhere);
332 if ($result > 0 && !empty($this->table_element_line)) {
345 $this->lines = array();
363 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
373 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
374 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
375 $sql .=
' WHERE t.entity IN ('.getEntity($this->table_element).
')';
377 $sql .=
' WHERE 1 = 1';
381 if (count($filter) > 0) {
382 foreach ($filter as $key => $value) {
383 if ($key ==
't.rowid') {
384 $sqlwhere[] = $key.
" = ".((int) $value);
385 } elseif (in_array($this->fields[$key][
'type'], array(
'date',
'datetime',
'timestamp'))) {
386 $sqlwhere[] = $key.
" = '".$this->
db->idate($value).
"'";
387 } elseif ($key ==
'customsql') {
388 $sqlwhere[] = $value;
389 } elseif (strpos($value,
'%') ===
false) {
390 $sqlwhere[] = $key.
" IN (".$this->
db->sanitize($this->
db->escape($value)).
")";
392 $sqlwhere[] = $key.
" LIKE '%".$this->
db->escape($value).
"%'";
396 if (count($sqlwhere) > 0) {
397 $sql .=
' AND ('.implode(
' '.$this->
db->escape($filtermode).
' ', $sqlwhere).
')';
400 if (!empty($sortfield)) {
401 $sql .= $this->
db->order($sortfield, $sortorder);
403 if (!empty($limit)) {
404 $sql .= $this->
db->plimit($limit, $offset);
411 while ($i < ($limit ? min($limit, $num) : $num)) {
412 $obj = $this->
db->fetch_object(
$resql);
414 $record =
new self($this->db);
415 $record->setVarsFromFetchObj($obj);
417 $records[$record->id] = $record;
425 $this->errors[] =
'Error '.$this->db->lasterror();
426 dol_syslog(__METHOD__.
' '.join(
',', $this->errors), LOG_ERR);
451 public function delete(
User $user, $notrigger =
false)
467 if ($this->status < 0) {
468 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
485 global $conf, $langs;
487 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
492 if ($this->status == self::STATUS_VALIDATED) {
493 dol_syslog(get_class($this).
"::validate action abandonned: already validated", LOG_WARNING);
510 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
515 $this->newref = $num;
519 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
520 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
521 $sql .=
" status = ".self::STATUS_VALIDATED;
522 if (!empty($this->fields[
'date_validation'])) {
523 $sql .=
", date_validation = '".$this->db->idate($now).
"',";
525 if (!empty($this->fields[
'fk_user_valid'])) {
526 $sql .=
", fk_user_valid = ".$user->id;
528 $sql .=
" WHERE rowid = ".((int) $this->
id);
530 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
534 $this->error = $this->
db->lasterror();
538 if (!$error && !$notrigger) {
540 $result = $this->
call_trigger(
'RECRUITMENTCANDIDATURE_VALIDATE', $user);
549 $this->oldref = $this->ref;
552 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
554 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->
db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'recruitmentcandidature/".$this->
db->escape($this->newref).
"'";
555 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'recruitmentcandidature/".$this->
db->escape($this->
ref).
"' and entity = ".$conf->entity;
558 $error++; $this->error = $this->
db->lasterror();
564 $dirsource = $conf->recruitment->dir_output.
'/recruitmentcandidature/'.$oldref;
565 $dirdest = $conf->recruitment->dir_output.
'/recruitmentcandidature/'.$newref;
566 if (!$error && file_exists($dirsource)) {
567 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
569 if (@rename($dirsource, $dirdest)) {
572 $listoffiles =
dol_dir_list($conf->recruitment->dir_output.
'/recruitmentcandidature/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
573 foreach ($listoffiles as $fileentry) {
574 $dirsource = $fileentry[
'name'];
575 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
576 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
577 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
578 @rename($dirsource, $dirdest);
588 $this->status = self::STATUS_VALIDATED;
595 $this->
db->rollback();
611 if ($this->status <= self::STATUS_DRAFT) {
622 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'RECRUITMENTCANDIDATURE_UNVALIDATE');
632 public function cancel($user, $notrigger = 0)
635 if ($this->status != self::STATUS_VALIDATED) {
646 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'RECRUITMENTCANDIDATURE_CLOSE');
656 public function reopen($user, $notrigger = 0)
659 if ($this->status != self::STATUS_REFUSED && $this->status != self::STATUS_CANCELED && $this->status != self::STATUS_CONTRACT_REFUSED) {
670 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'RECRUITMENTCANDIDATURE_REOPEN');
683 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
685 global $conf, $langs, $hookmanager;
687 if (!empty($conf->dol_no_mouse_hover)) {
693 $label =
img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"RecruitmentCandidature").
'</u>';
694 if (isset($this->status)) {
695 $label .=
' '.$this->getLibStatut(5);
698 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
699 $label .=
'<br><b>'.$langs->trans(
'Email').
':</b> '.$this->email;
700 $label .=
'<br><b>'.$langs->trans(
'Name').
':</b> '.$this->
getFullName($langs);
702 $url =
dol_buildpath(
'/recruitment/recruitmentcandidature_card.php', 1).
'?id='.$this->id;
704 if ($option !=
'nolink') {
706 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
707 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
708 $add_save_lastsearch_values = 1;
710 if ($add_save_lastsearch_values) {
711 $url .=
'&save_lastsearch_values=1';
716 if (empty($notooltip)) {
717 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
718 $label = $langs->trans(
"ShowRecruitmentCandidature");
719 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
721 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
722 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
724 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
727 $linkstart =
'<a href="'.$url.
'"';
728 $linkstart .= $linkclose.
'>';
731 $result .= $linkstart;
733 if (empty($this->showphoto_on_popup)) {
735 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
739 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
741 list($class, $module) = explode(
'@', $this->picto);
744 $filename = $filearray[0][
'name'];
745 if (!empty($filename)) {
746 $pospoint = strpos($filearray[0][
'name'],
'.');
748 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
749 if (empty($conf->global->{strtoupper($module.
'_'.$class).
'_FORMATLISTPHOTOSASUSERS'})) {
750 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.
'" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div></div>';
752 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div>';
757 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
762 if ($withpicto != 2) {
763 $result .= $this->ref;
769 global $action, $hookmanager;
770 $hookmanager->initHooks(array(
'recruitmentcandidaturedao'));
771 $parameters = array(
'id'=>$this->
id,
'getnomurl' => &$result);
772 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
774 $result = $hookmanager->resPrint;
776 $result .= $hookmanager->resPrint;
790 return $this->LibStatut($this->status, $mode);
804 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
807 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
808 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Received').
' ('.$langs->transnoentitiesnoconv(
"InterviewToDo").
')';
809 $this->labelStatus[self::STATUS_CONTRACT_PROPOSED] = $langs->transnoentitiesnoconv(
'ContractProposed');
810 $this->labelStatus[self::STATUS_CONTRACT_SIGNED] = $langs->transnoentitiesnoconv(
'ContractSigned');
811 $this->labelStatus[self::STATUS_CONTRACT_REFUSED] = $langs->transnoentitiesnoconv(
'ContractRefused');
812 $this->labelStatus[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv(
'Refused');
813 $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Canceled');
814 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
815 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Received');
816 $this->labelStatusShort[self::STATUS_CONTRACT_PROPOSED] = $langs->transnoentitiesnoconv(
'ContractProposed');
817 $this->labelStatusShort[self::STATUS_CONTRACT_SIGNED] = $langs->transnoentitiesnoconv(
'ContractSigned');
818 $this->labelStatusShort[self::STATUS_CONTRACT_REFUSED] = $langs->transnoentitiesnoconv(
'ContractRefused');
819 $this->labelStatusShort[self::STATUS_REFUSED] = $langs->transnoentitiesnoconv(
'Refused');
820 $this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv(
'Canceled');
823 $statusType =
'status'.$status;
825 if ($status == self::STATUS_CANCELED) {
826 $statusType =
'status6';
828 if ($status == self::STATUS_REFUSED) {
829 $statusType =
'status10';
832 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
843 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
844 $sql .=
' fk_user_creat, fk_user_modif';
845 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
846 $sql .=
' WHERE t.rowid = '.((int) $id);
847 $result = $this->
db->query($sql);
849 if ($this->
db->num_rows($result)) {
850 $obj = $this->
db->fetch_object($result);
851 $this->
id = $obj->rowid;
853 $this->user_creation_id = $obj->fk_user_creat;
854 $this->user_modification_id = $obj->fk_user_modif;
855 $this->date_creation = $this->
db->jdate($obj->datec);
856 $this->date_modification = empty($obj->datem) ?
'' : $this->
db->jdate($obj->datem);
859 $this->
db->free($result);
873 $this->initAsSpecimenCommon();
883 $this->lines = array();
886 $result = $objectline->fetchAll(
'ASC',
'position', 0, 0, array(
'customsql'=>
'fk_recruitmentcandidature = '.((
int) $this->
id)));
888 if (is_numeric($result)) {
889 $this->error = $this->error;
890 $this->errors = $this->errors;
893 $this->lines = $result;
905 global $langs, $conf;
906 $langs->load(
"recruitment@recruitment");
908 if (empty($conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON)) {
909 $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON =
'mod_recruitmentcandidature_standard';
912 if (!empty($conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON)) {
915 $file = $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON.
".php";
916 $classname = $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON;
919 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
920 foreach ($dirmodels as $reldir) {
924 $mybool |= @include_once $dir.$file;
927 if ($mybool ===
false) {
932 if (class_exists($classname)) {
933 $obj =
new $classname();
934 $numref = $obj->getNextValue($this);
936 if ($numref !=
'' && $numref !=
'-1') {
939 $this->error = $obj->error;
944 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
948 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
964 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
966 global $conf, $langs;
969 $includedocgeneration = 0;
971 $langs->load(
"recruitment@recruitment");
974 if (!empty($conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF)) {
975 $modele = $conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF;
981 $modelpath =
"core/modules/recruitment/doc/";
983 if ($includedocgeneration && !empty($modele)) {
984 $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
999 global $conf, $langs;
1015 $this->
db->commit();
1022 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobjectline.class.php';