@@ -150,7 +150,7 @@ |
||
150 | 150 | $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) |
151 | 151 | } |
152 | 152 | $sql .= " FROM ".MAIN_DB_PREFIX."societe as t"; |
153 | - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields |
|
153 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields |
|
154 | 154 | if ($category > 0) { |
155 | 155 | if ($mode != 4) { |
156 | 156 | $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c"; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public $error; //!< To return error code (or message) |
42 | 42 | public $errors = array(); //!< To return several error codes (or messages) |
43 | 43 | |
44 | - public $output; // To store output of some cron methods |
|
44 | + public $output; // To store output of some cron methods |
|
45 | 45 | |
46 | 46 | |
47 | 47 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | global $conf, $langs, $user; |
68 | 68 | |
69 | - $managedfor = getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty'); |
|
69 | + $managedfor = getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty'); |
|
70 | 70 | |
71 | 71 | if ($managedfor != 'member') { |
72 | 72 | return 0; // If option 'PARTNERSHIP_IS_MANAGED_FOR' = 'thirdparty', this cron job does nothing. |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | // If massaction is close |
217 | 217 | if ($massaction == 'classifyclose') { |
218 | - $error=0; |
|
218 | + $error = 0; |
|
219 | 219 | $selectids = GETPOST('toselect', 'array'); |
220 | 220 | foreach ($selectids as $selectid) { |
221 | 221 | // $object->fetch($selectid); |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | if ($searchCategoryProductOperator == 0) { |
421 | 421 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_origin_line = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
422 | 422 | } else { |
423 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
423 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
424 | 424 | } |
425 | 425 | } |
426 | 426 | } |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { |
536 | 536 | $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); |
537 | 537 | } |
538 | -if ($search_datedelivery_start) { |
|
538 | +if ($search_datedelivery_start) { |
|
539 | 539 | $param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y')); |
540 | 540 | } |
541 | 541 | if ($search_datedelivery_end) { |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | |
892 | 892 | $shipment->id = $obj->rowid; |
893 | 893 | $shipment->ref = $obj->ref; |
894 | - $shipment->shipping_method_id=$obj->fk_shipping_method; |
|
894 | + $shipment->shipping_method_id = $obj->fk_shipping_method; |
|
895 | 895 | |
896 | 896 | $companystatic->id = $obj->socid; |
897 | 897 | $companystatic->ref = $obj->name; |
@@ -1027,7 +1027,7 @@ discard block |
||
1027 | 1027 | } |
1028 | 1028 | if (!empty($arrayfields['e.fk_shipping_method']['checked'])) { |
1029 | 1029 | // Get code using getLabelFromKey |
1030 | - $code=$langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); |
|
1030 | + $code = $langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); |
|
1031 | 1031 | print '<td class="center tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("SendingMethod".strtoupper($code))).'">'; |
1032 | 1032 | if ($shipment->shipping_method_id > 0) print $langs->trans("SendingMethod".strtoupper($code)); |
1033 | 1033 | print '</td>'; |
@@ -44,7 +44,7 @@ |
||
44 | 44 | public $qty; |
45 | 45 | public $dluo_qty; // deprecated, use qty |
46 | 46 | public $entrepot_id; |
47 | - public $fk_origin_stock; // rowid in llx_product_batch table |
|
47 | + public $fk_origin_stock; // rowid in llx_product_batch table |
|
48 | 48 | public $fk_expeditiondet; |
49 | 49 | |
50 | 50 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $messages = $this->messages; |
62 | 62 | |
63 | - usort($messages, function ($itemA, $itemB) { |
|
63 | + usort($messages, function($itemA, $itemB) { |
|
64 | 64 | if ($itemA['time'] === $itemB['time']) { |
65 | 65 | return 0; |
66 | 66 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | if ($type = $severity & (2 ** $i)) { |
120 | 120 | $label = $this->friendlyErrorType($type); |
121 | 121 | $this->messages[] = [ |
122 | - 'message' => $message . ' (' . $fileName . ':' . $line . ')', |
|
122 | + 'message' => $message.' ('.$fileName.':'.$line.')', |
|
123 | 123 | 'message_html' => null, |
124 | 124 | 'is_string' => true, |
125 | 125 | 'label' => $label, |
@@ -289,7 +289,7 @@ |
||
289 | 289 | dol_mkdir($conf->recruitment->dir_temp); |
290 | 290 | if (!is_writable($conf->recruitment->dir_temp)) { |
291 | 291 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->recruitment->dir_temp); |
292 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
292 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
293 | 293 | return -1; |
294 | 294 | } |
295 | 295 |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | // Load Dolibarr environment |
30 | 30 | require '../main.inc.php'; |
31 | 31 | |
32 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
33 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; |
|
32 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php'; |
|
34 | 34 | |
35 | 35 | // Load translation files required by the page |
36 | 36 | $langs->loadLangs(array('hrm', 'companies')); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $linkback = '<a href="'.dol_buildpath('/hrm/job_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
107 | 107 | |
108 | 108 | $morehtmlref = '<div class="refid">'; |
109 | - $morehtmlref.= $object->label; |
|
109 | + $morehtmlref .= $object->label; |
|
110 | 110 | $morehtmlref .= '</div>'; |
111 | 111 | |
112 | 112 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | |
42 | 42 | // Load translation files required by the page |
43 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
43 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
44 | 44 | |
45 | 45 | // Get parameters |
46 | 46 | $id = GETPOST('id', 'int'); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'evaluationcard'; // To manage different context of search |
52 | 52 | $backtopage = GETPOST('backtopage', 'alpha'); |
53 | 53 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
54 | -$lineid = GETPOST('lineid', 'int'); |
|
54 | +$lineid = GETPOST('lineid', 'int'); |
|
55 | 55 | |
56 | 56 | // Initialize technical objects |
57 | 57 | $object = new Evaluation($db); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | if ($action == 'close') { |
170 | 170 | // save evaldet lines to user; |
171 | 171 | $sk = new SkillRank($db); |
172 | - $SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, array("customsql"=>"fk_object = ".$object->fk_user ." AND objecttype ='".SkillRank::SKILLRANK_TYPE_USER."'"), 'AND'); |
|
172 | + $SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, array("customsql"=>"fk_object = ".$object->fk_user." AND objecttype ='".SkillRank::SKILLRANK_TYPE_USER."'"), 'AND'); |
|
173 | 173 | |
174 | 174 | $errors = 0; |
175 | 175 | // we go through the evaldets of the eval |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | } |
214 | 214 | |
215 | - if ($action == 'reopen' ) { |
|
215 | + if ($action == 'reopen') { |
|
216 | 216 | // no update here we just change the evaluation status |
217 | 217 | $object->setStatut(Evaluation::STATUS_VALIDATED); |
218 | 218 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | |
260 | 260 | // Part to create |
261 | 261 | if ($action == 'create') { |
262 | - print load_fiche_titre($langs->trans("NewEval"), '', 'object_' . $object->picto); |
|
262 | + print load_fiche_titre($langs->trans("NewEval"), '', 'object_'.$object->picto); |
|
263 | 263 | |
264 | 264 | print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
265 | 265 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
@@ -423,9 +423,9 @@ discard block |
||
423 | 423 | print '<div class="underbanner clearboth"></div>'; |
424 | 424 | print '<table class="border centpercent tableforfield">'."\n"; |
425 | 425 | |
426 | - $object->fields['label']['visible']=0; // Already in banner |
|
427 | - $object->fields['fk_user']['visible']=0; // Already in banner |
|
428 | - $object->fields['fk_job']['visible']=0; // Already in banner |
|
426 | + $object->fields['label']['visible'] = 0; // Already in banner |
|
427 | + $object->fields['fk_user']['visible'] = 0; // Already in banner |
|
428 | + $object->fields['fk_job']['visible'] = 0; // Already in banner |
|
429 | 429 | include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
430 | 430 | |
431 | 431 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
466 | 466 | } |
467 | 467 | |
468 | - $conf->modules_parts['tpl']['hrm']='/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran |
|
468 | + $conf->modules_parts['tpl']['hrm'] = '/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran |
|
469 | 469 | |
470 | 470 | print '<div class="div-table-responsive-no-min">'; |
471 | 471 | if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { |
@@ -521,14 +521,14 @@ discard block |
||
521 | 521 | $sql .= ' skdet_user.description as "userRankForSkillDesc",'; |
522 | 522 | $sql .= ' skdet_required.description as "required_rank_desc"'; |
523 | 523 | |
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)'; |
|
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)'; |
|
529 | 529 | //$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "hrm_skillrank as skr ON (j.rowid = skr.fk_object AND skr.fk_skill = ed.fk_skill AND skr.objecttype = 'job')"; |
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); |
|
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); |
|
532 | 532 | |
533 | 533 | // echo $sql; |
534 | 534 | |
@@ -544,21 +544,21 @@ discard block |
||
544 | 544 | $Tab[$num]->skill_id = $obj->fk_skill; |
545 | 545 | $Tab[$num]->skilllabel = $obj->skilllabel; |
546 | 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>'; |
|
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>'; |
|
549 | 549 | |
550 | 550 | if ($obj->userRankForSkill > $obj->required_rank) { |
551 | - $title=$langs->trans('MaxlevelGreaterThanShort'); |
|
551 | + $title = $langs->trans('MaxlevelGreaterThanShort'); |
|
552 | 552 | $class .= 'veryhappy diffnote'; |
553 | 553 | } elseif ($obj->userRankForSkill == $obj->required_rank) { |
554 | - $title=$langs->trans('MaxLevelEqualToShort'); |
|
554 | + $title = $langs->trans('MaxLevelEqualToShort'); |
|
555 | 555 | $class .= 'happy diffnote'; |
556 | 556 | } elseif ($obj->userRankForSkill < $obj->required_rank) { |
557 | - $title=$langs->trans('MaxLevelLowerThanShort'); |
|
557 | + $title = $langs->trans('MaxLevelLowerThanShort'); |
|
558 | 558 | $class .= 'sad'; |
559 | 559 | } |
560 | 560 | |
561 | - $Tab[$num]->result = '<span title="'.$title.'" class="classfortooltip ' . $class . ' note"> </span>'; |
|
561 | + $Tab[$num]->result = '<span title="'.$title.'" class="classfortooltip '.$class.' note"> </span>'; |
|
562 | 562 | |
563 | 563 | $num++; |
564 | 564 | } |
@@ -567,24 +567,24 @@ discard block |
||
567 | 567 | print '<table class="noborder centpercent">'; |
568 | 568 | |
569 | 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>'; |
|
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>'; |
|
576 | 576 | print '</tr>'; |
577 | 577 | |
578 | 578 | $sk = new Skill($db); |
579 | 579 | foreach ($Tab as $t) { |
580 | 580 | $sk->fetch($t->skill_id); |
581 | 581 | print '<tr>'; |
582 | - print ' <td>' . Skill::typeCodeToLabel($t->skill_type) . '</td>'; |
|
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>'; |
|
582 | + print ' <td>'.Skill::typeCodeToLabel($t->skill_type).'</td>'; |
|
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>'; |
|
588 | 588 | print '</tr>'; |
589 | 589 | } |
590 | 590 |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | // Load Dolibarr environment |
30 | 30 | require '../main.inc.php'; |
31 | 31 | |
32 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; |
|
33 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; |
|
32 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skill.lib.php'; |
|
34 | 34 | |
35 | 35 | // Load translation files required by the page |
36 | 36 | $langs->loadLangs(array('hrm', 'companies')); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $linkback = '<a href="'.DOL_URL_ROOT.'/hrm/skill_list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
105 | 105 | |
106 | 106 | $morehtmlref = '<div class="refid">'; |
107 | - $morehtmlref.= $object->label; |
|
107 | + $morehtmlref .= $object->label; |
|
108 | 108 | $morehtmlref .= '</div>'; |
109 | 109 | |
110 | 110 |