29 require
'../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/hrm/class/evaluation.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/hrm/class/job.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skill.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skillrank.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm_evaluation.lib.php';
39 require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm_skillrank.lib.php';
43 $langs->loadLangs(array(
'hrm',
'other',
'products'));
48 $action =
GETPOST(
'action',
'aZ09');
49 $confirm =
GETPOST(
'confirm',
'alpha');
50 $cancel =
GETPOST(
'cancel',
'aZ09');
51 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'evaluationcard';
52 $backtopage =
GETPOST(
'backtopage',
'alpha');
53 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
54 $lineid =
GETPOST(
'lineid',
'int');
59 $diroutputmassaction = $conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
60 $hookmanager->initHooks(array(
'evaluationcard',
'globalcard'));
63 $extrafields->fetch_name_optionals_label($object->table_element);
65 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
68 $search_all =
GETPOST(
"search_all",
'alpha');
70 foreach ($object->fields as $key => $val) {
71 if (
GETPOST(
'search_'.$key,
'alpha')) {
72 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
76 if (empty($action) && empty($id) && empty($ref)) {
81 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
84 $permissiontoread = $user->rights->hrm->evaluation->read;
85 $permissiontoadd = $user->rights->hrm->evaluation->write;
86 $permissiontovalidate = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->hrm->evaluation_advance->validate) || (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $permissiontoadd);
87 $permissiontoClose = $user->rights->hrm->evaluation->write;
88 $permissiontodelete = $user->rights->hrm->evaluation->delete;
89 $permissiondellink = $user->rights->hrm->evaluation->write;
90 $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].
'/evaluation';
100 if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd))
accessforbidden();
107 $parameters = array();
108 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
113 if (empty($reshook)) {
116 $backurlforlist =
dol_buildpath(
'/hrm/evaluation_list.php', 1);
118 if (empty($backtopage) || ($cancel && empty($id))) {
119 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
120 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
121 $backtopage = $backurlforlist;
123 $backtopage =
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.($id > 0 ? $id :
'__ID__');
128 $triggermodname =
'hrm_EVALUATION_MODIFY';
131 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
134 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
137 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
143 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
145 if ($action ==
'set_thirdparty' && $permissiontoadd) {
146 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
148 if ($action ==
'classin' && $permissiontoadd) {
149 $object->setProject(
GETPOST(
'projectid',
'int'));
153 $triggersendname =
'hrm_EVALUATION_SENTBYMAIL';
154 $autocopy =
'MAIN_MAIL_AUTOCOPY_EVALUATION_TO';
155 $trackid =
'evaluation'.$object->id;
156 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
158 if ($action ==
'saveSkill') {
159 $TNote =
GETPOST(
'TNote',
'array');
160 if (!empty($TNote)) {
161 foreach ($object->lines as $line) {
162 $line->rankorder = $TNote[$line->fk_skill];
163 $line->update($user);
169 if ($action ==
'close') {
172 $SkillrecordsForActiveUser = $sk->fetchAll(
'ASC',
'fk_skill', 0, 0, array(
"customsql"=>
"fk_object = ".$object->fk_user .
" AND objecttype ='".SkillRank::SKILLRANK_TYPE_USER.
"'"),
'AND');
176 foreach ($object->lines as $key => $line) {
178 if (count($SkillrecordsForActiveUser) == 0) {
180 $resCreate = $newSkill->cloneFromCurrentSkill($line, $object->fk_user);
182 if ($resCreate <= 0) {
184 setEventMessage($langs->trans(
'ErrorCreateUserSkill'), $line->fk_skill);
190 foreach ($SkillrecordsForActiveUser as $k => $sr) {
191 if ($sr->fk_skill == $line->fk_skill) {
199 $updSkill = $SkillrecordsForActiveUser[$k];
201 $updSkill->rankorder = $line->rankorder;
202 $updSkill->update($user);
205 $resCreate = $newSkill->cloneFromCurrentSkill($line, $object->fk_user);
209 if (empty($errors)) {
210 $object->setStatut(Evaluation::STATUS_CLOSED);
215 if ($action ==
'reopen' ) {
217 $object->setStatut(Evaluation::STATUS_VALIDATED);
234 $title = $langs->trans(
"Evaluation");
237 $css[] =
'/hrm/css/style.css';
240 print
'<script type="text/javascript" language="javascript">
241 $(document).ready(function() {
242 $("#btn_valid").click(function(){
243 var form = $("#form_save_rank");
248 url: form.attr("action"),
249 data: form.serialize(),
251 }).always(function() {
252 window.location.href = "'.dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.$id.
'&action=validate&token='.
newToken().
'";
261 if ($action ==
'create') {
262 print
load_fiche_titre($langs->trans(
"NewEval"),
'',
'object_' . $object->picto);
264 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
265 print
'<input type="hidden" name="token" value="'.newToken().
'">';
266 print
'<input type="hidden" name="action" value="add">';
268 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
270 if ($backtopageforcancel) {
271 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
276 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
279 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
282 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
284 print
'</table>'.
"\n";
288 print
$form->buttonsSaveCancel(
"Create",
"Cancel");
294 if (($id || $ref) && $action ==
'edit') {
295 print
load_fiche_titre($langs->trans(
"Evaluation"),
'',
'object_'.$object->picto);
297 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
298 print
'<input type="hidden" name="token" value="'.newToken().
'">';
299 print
'<input type="hidden" name="action" value="update">';
300 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
302 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
304 if ($backtopageforcancel) {
305 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
310 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
313 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
316 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
322 print
$form->buttonsSaveCancel();
328 if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
329 $res = $object->fetch_optionals();
332 print
dol_get_fiche_head($head,
'card', $langs->trans(
"Workstation"), -1, $object->picto);
336 if ($action ==
'validate' && $permissiontovalidate) {
341 $ref = substr($object->ref, 1, 4);
342 if ($ref ==
'PROV') {
343 $numref = $object->getNextNumRef();
344 if (empty($numref)) {
349 $numref = $object->ref;
352 $text = $langs->trans(
'ConfirmValidateEvaluation', $numref);
354 require_once DOL_DOCUMENT_ROOT.
'/core/class/notify.class.php';
355 $notify =
new Notify($db);
357 $text .= $notify->confirmMessage(
'HRM_EVALUATION_VALIDATE', $object->socid, $object);
361 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ValidateEvaluation'), $text,
'confirm_validate',
'', 0, 1);
366 if ($action ==
'delete') {
367 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'DeleteEvaluation'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
370 if ($action ==
'deleteline') {
371 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
374 if ($action ==
'clone') {
376 $formquestion = array();
377 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
381 if ($action ==
'xxx') {
382 $text = $langs->trans(
'ConfirmActionMyObject', $object->ref);
384 $formquestion = array();
386 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
390 $parameters = array(
'formConfirm' =>
$formconfirm,
'lineid' => $lineid);
391 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
392 if (empty($reshook)) {
394 } elseif ($reshook > 0) {
404 $linkback =
'<a href="'.dol_buildpath(
'/hrm/evaluation_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
406 $morehtmlref =
'<div class="refidno">';
407 $morehtmlref .= $langs->trans(
'Label').
' : '.$object->label;
408 $u_position =
new User(($db));
409 $u_position->fetch($object->fk_user);
410 $morehtmlref .=
'<br>'.$langs->trans(
'Employee').
' : '.$u_position->getNomUrl(1);
412 $job->fetch($object->fk_job);
413 $morehtmlref .=
'<br>'.$langs->trans(
'JobPosition').
' : '.$job->getNomUrl(1);
414 $morehtmlref .=
'</div>';
418 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
421 print
'<div class="fichecenter">';
422 print
'<div class="fichehalfleft">';
423 print
'<div class="underbanner clearboth"></div>';
424 print
'<table class="border centpercent tableforfield">'.
"\n";
426 $object->fields[
'label'][
'visible']=0;
427 $object->fields[
'fk_user'][
'visible']=0;
428 $object->fields[
'fk_job'][
'visible']=0;
429 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
432 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
438 print
'<div class="clearboth"></div>';
447 if (!empty($object->table_element_line) && $object->status == Evaluation::STATUS_DRAFT) {
449 $result = $object->getLinesArray();
456 print
' <form name="form_save_rank" id="form_save_rank" action="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.(($action !=
'editline') ?
'' :
'#line_'.
GETPOST(
'lineid',
'int')).
'" method="POST">
457 <input type="hidden" name="token" value="' .
newToken().
'">
458 <input type="hidden" name="action" value="saveSkill">
459 <input type="hidden" name="mode" value="">
460 <input type="hidden" name="page_y" value="">
461 <input type="hidden" name="id" value="' . $object->id.
'">
464 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
465 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
468 $conf->modules_parts[
'tpl'][
'hrm']=
'/hrm/core/tpl/';
470 print
'<div class="div-table-responsive-no-min">';
471 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
472 print
'<table id="tablelines" class="noborder noshadow" width="100%">';
476 $object->printObjectLines($action, $mysoc,
null,
GETPOST(
'lineid',
'int'), 1);
494 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
505 if ($object->status != Evaluation::STATUS_DRAFT) {
510 $sql .=
' e.date_creation,';
511 $sql .=
' e.fk_job,';
512 $sql .=
' j.label as "refjob",';
513 $sql .=
' ed.fk_skill,';
515 $sql .=
' sk.label as "skilllabel",';
516 $sql .=
' sk.skill_type,';
517 $sql .=
' sk.description,';
518 $sql .=
' ed.rankorder,';
519 $sql .=
' ed.required_rank,';
520 $sql .=
' ed.rankorder as "userRankForSkill",';
521 $sql .=
' skdet_user.description as "userRankForSkillDesc",';
522 $sql .=
' skdet_required.description as "required_rank_desc"';
524 $sql .=
' FROM ' . MAIN_DB_PREFIX .
'hrm_evaluation as e';
525 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_evaluationdet as ed ON e.rowid = ed.fk_evaluation';
526 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_job as j ON e.fk_job = j.rowid';
527 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_skill as sk ON ed.fk_skill = sk.rowid';
528 $sql .=
' INNER JOIN ' . MAIN_DB_PREFIX .
'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)';
530 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)';
531 $sql .=
" WHERE e.rowid =" . ((int) $object->id);
535 $resql = $db->query($sql);
540 while ($obj = $db->fetch_object(
$resql)) {
541 $Tab[$num] =
new stdClass();
543 $Tab[$num]->skill_type = $obj->skill_type;
544 $Tab[$num]->skill_id = $obj->fk_skill;
545 $Tab[$num]->skilllabel = $obj->skilllabel;
546 $Tab[$num]->description = $obj->description;
547 $Tab[$num]->userRankForSkill =
'<span title="'.$obj->userRankForSkillDesc.
'" class="radio_js_bloc_number TNote_1">' . $obj->userRankForSkill .
'</span>';
548 $Tab[$num]->required_rank =
'<span title="'.$obj->required_rank_desc.
'" class="radio_js_bloc_number TNote_1">' . $obj->required_rank .
'</span>';
550 if ($obj->userRankForSkill > $obj->required_rank) {
551 $title=$langs->trans(
'MaxlevelGreaterThanShort');
552 $class .=
'veryhappy diffnote';
553 } elseif ($obj->userRankForSkill == $obj->required_rank) {
554 $title=$langs->trans(
'MaxLevelEqualToShort');
555 $class .=
'happy diffnote';
556 } elseif ($obj->userRankForSkill < $obj->required_rank) {
557 $title=$langs->trans(
'MaxLevelLowerThanShort');
561 $Tab[$num]->result =
'<span title="'.$title.
'" class="classfortooltip ' . $class .
' note"> </span>';
566 print
'<div class="underbanner clearboth"></div>';
567 print
'<table class="noborder centpercent">';
569 print
'<tr class="liste_titre">';
570 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"TypeSkill") .
' </th>';
571 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Label") .
'</th>';
572 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Description") .
'</th>';
573 print
'<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans(
"EmployeeRank") .
'</th>';
574 print
'<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans(
"RequiredRank") .
'</th>';
575 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Result") .
' ' .$form->textwithpicto(
'',
GetLegendSkills(), 1) .
'</th>';
578 $sk =
new Skill($db);
579 foreach ($Tab as $t) {
580 $sk->fetch($t->skill_id);
583 print
' <td>' . $sk->getNomUrl(1) .
'</td>';
584 print
' <td>' . $t->description .
'</td>';
585 print
' <td align="center">' . $t->userRankForSkill .
'</td>';
586 print
' <td align="center">' . $t->required_rank .
'</td>';
587 print
' <td>' . $t->result .
'</td>';
597 $(document).ready(
function() {
598 $(
".radio_js_bloc_number").tooltip();
608 if ($action !=
'presend' && $action !=
'editline') {
609 print
'<div class="tabsAction">'.
"\n";
610 $parameters = array();
611 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
616 if (empty($reshook)) {
618 if (empty($user->socid)) {
619 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=presend&mode=init&token='.
newToken().
'#formmailbeforetitle');
623 if ($object->status == $object::STATUS_VALIDATED) {
624 print
dolGetButtonAction(
'', $langs->trans(
'SetToDraft'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=confirm_setdraft&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
625 print
dolGetButtonAction(
'', $langs->trans(
'Close'),
'close', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=close&token='.
newToken(),
'', $permissiontodelete || ($object->status == $object::STATUS_CLOSED && $permissiontoclose));
626 } elseif ($object->status != $object::STATUS_CLOSED) {
627 print
dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
630 if ($object->status == $object::STATUS_CLOSED) {
631 print
dolGetButtonAction($langs->trans(
'ReOpen'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=reopen&token='.
newToken(),
'', $permissiontoadd);
636 if ($object->status == $object::STATUS_DRAFT) {
637 if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
638 print
dolGetButtonAction($langs->trans(
'Save').
' '.$langs->trans(
'and').
' '.$langs->trans(
'Valid'),
'',
'default',
'#',
'btn_valid', $permissiontovalidate);
640 $langs->load(
"errors");
641 print
dolGetButtonAction($langs->trans(
"ErrorAddAtLeastOneLineFirst"), $langs->trans(
"Validate"),
'default',
'#',
'', 0);
647 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=delete&token='.
newToken(),
'', $permissiontodelete);
655 if (
GETPOST(
'modelselected')) {
659 if ($action !=
'presend') {
660 print
'<div class="fichecenter"><div class="fichehalfleft">';
661 print
'<a name="builddoc"></a>';
663 $includedocgeneration = 0;
666 if ($includedocgeneration) {
668 $relativepath = $objref.
'/'.$objref.
'.pdf';
669 $filedir = $conf->hrm->dir_output.
'/'.$object->element.
'/'.$objref;
670 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
671 $genallowed = $user->rights->hrm->evaluation->read;
672 $delallowed = $user->rights->hrm->evaluation->write;
673 print $formfile->showdocuments(
'hrm:Evaluation', $object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
677 $linktoelem =
$form->showLinkToObjectBlock($object,
null, array(
'evaluation'));
678 $somethingshown =
$form->showLinkedObjectBlock($object, $linktoelem);
681 print
'</div><div class="fichehalfright">';
685 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/evaluation_agenda.php?id='.$object->id);
688 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
690 $somethingshown =
$formactions->showactions($object, $object->element.
'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
692 print
'</div></div>';
696 if (
GETPOST(
'modelselected')) {
701 $modelmail =
'evaluation';
702 $defaulttopic =
'InformationMessage';
703 $diroutput = $conf->hrm->dir_output;
704 $trackid =
'evaluation'.$object->id;
706 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif($action=='specimen') elseif($action=='setmodel') elseif($action=='del') elseif($action=='setdoc') $formactions
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage notifications.
static typeCodeToLabel($code)
Class to manage Dolibarr users.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessage($mesgs, $style='mesgs')
Set event message in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
isModEnabled($module)
Is Dolibarr module enabled.
evaluationPrepareHead($object)
Prepare array of tabs for Evaluation.
$formconfirm
if ($action == 'delbookkeepingyear') {
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.