@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $formproject = new FormProjets($db); |
| 173 | 173 | |
| 174 | 174 | $title = $langs->trans("ConferenceOrBooth"); |
| 175 | -$help_url='EN:Module_Event_Organization'; |
|
| 175 | +$help_url = 'EN:Module_Event_Organization'; |
|
| 176 | 176 | |
| 177 | 177 | llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-card'); |
| 178 | 178 | |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | if (empty($fac->paye)) { |
| 651 | 651 | $key = 'paymentlink_'.$fac->id; |
| 652 | 652 | |
| 653 | - print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>'; |
|
| 653 | + print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')).' '.$fac->ref.'</span><br>'; |
|
| 654 | 654 | |
| 655 | 655 | $sourcetouse = 'boothlocation'; |
| 656 | 656 | $reftouse = $fac->id; |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | $form = new Form($db); |
| 132 | 132 | |
| 133 | 133 | $title = $langs->trans("ConferenceOrBooth").' - '.$langs->trans("Files"); |
| 134 | -$help_url='EN:Module_Event_Organization'; |
|
| 134 | +$help_url = 'EN:Module_Event_Organization'; |
|
| 135 | 135 | |
| 136 | 136 | llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-card_documents'); |
| 137 | 137 | |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | $formfile = new FormFile($db); |
| 64 | 64 | |
| 65 | 65 | $title = $langs->trans('EventOrganizationArea'); |
| 66 | -$help_url='EN:Module_Event_Organization'; |
|
| 66 | +$help_url = 'EN:Module_Event_Organization'; |
|
| 67 | 67 | |
| 68 | 68 | llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-index'); |
| 69 | 69 | |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | $userstatic = new User($db); |
| 150 | 150 | |
| 151 | 151 | $title = $langs->trans('ConferenceOrBooth')." - ".$langs->trans('ContactsAddresses'); |
| 152 | -$help_url='EN:Module_Event_Organization'; |
|
| 152 | +$help_url = 'EN:Module_Event_Organization'; |
|
| 153 | 153 | |
| 154 | 154 | llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-card_contact'); |
| 155 | 155 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search |
| 49 | 49 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 50 | 50 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
| 51 | -$lineid = GETPOSTINT('lineid'); |
|
| 51 | +$lineid = GETPOSTINT('lineid'); |
|
| 52 | 52 | $mode = GETPOST('mode', 'alpha'); |
| 53 | 53 | |
| 54 | 54 | $conf_or_booth_id = GETPOSTINT('conforboothid'); |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | $formproject = new FormProjets($db); |
| 206 | 206 | |
| 207 | 207 | $title = $langs->trans("ConferenceOrBoothAttendee"); |
| 208 | -$help_url='EN:Module_Event_Organization'; |
|
| 208 | +$help_url = 'EN:Module_Event_Organization'; |
|
| 209 | 209 | |
| 210 | 210 | llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-attendee-card'); |
| 211 | 211 | |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | * \brief File of class with all html predefined components for WebPortal |
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | -require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; |
|
| 30 | -require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php'; |
|
| 31 | -require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formwebportal.class.php'; |
|
| 29 | +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
|
| 30 | +require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; |
|
| 31 | +require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formwebportal.class.php'; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Class to manage generation of HTML components |
@@ -135,10 +135,10 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | // load module libraries |
| 138 | - dol_include_once('/webportal/class/webportal' . $elementEn . '.class.php'); |
|
| 138 | + dol_include_once('/webportal/class/webportal'.$elementEn.'.class.php'); |
|
| 139 | 139 | |
| 140 | 140 | // Initialize a technical objects |
| 141 | - $objectclass = 'WebPortal' . ucfirst($elementEn); |
|
| 141 | + $objectclass = 'WebPortal'.ucfirst($elementEn); |
|
| 142 | 142 | $object = new $objectclass($this->db); |
| 143 | 143 | |
| 144 | 144 | // set form list |
@@ -148,18 +148,18 @@ discard block |
||
| 148 | 148 | $this->sortfield = GETPOST('sortfield', 'aZ09comma'); |
| 149 | 149 | $this->sortorder = GETPOST('sortorder', 'aZ09comma'); |
| 150 | 150 | $this->page = GETPOSTISSET('page') ? GETPOSTINT('page') : 1; |
| 151 | - $this->titleKey = $objectclass . 'ListTitle'; |
|
| 151 | + $this->titleKey = $objectclass.'ListTitle'; |
|
| 152 | 152 | |
| 153 | 153 | // Initialize array of search criteria |
| 154 | 154 | //$search_all = GETPOST('search_all', 'alphanohtml'); |
| 155 | 155 | $search = array(); |
| 156 | 156 | foreach ($object->fields as $key => $val) { |
| 157 | - if (GETPOST('search_' . $key, 'alpha') !== '') { |
|
| 158 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
| 157 | + if (GETPOST('search_'.$key, 'alpha') !== '') { |
|
| 158 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
| 159 | 159 | } |
| 160 | 160 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 161 | - $postDateStart = GETPOST('search_' . $key . '_dtstart', 'alphanohtml'); |
|
| 162 | - $postDateEnd = GETPOST('search_' . $key . '_dtend', 'alphanohtml'); |
|
| 161 | + $postDateStart = GETPOST('search_'.$key.'_dtstart', 'alphanohtml'); |
|
| 162 | + $postDateEnd = GETPOST('search_'.$key.'_dtend', 'alphanohtml'); |
|
| 163 | 163 | // extract date YYYY-MM-DD for year, month and day |
| 164 | 164 | $dateStartArr = explode('-', $postDateStart); |
| 165 | 165 | $dateEndArr = explode('-', $postDateEnd); |
@@ -167,13 +167,13 @@ discard block |
||
| 167 | 167 | $dateStartYear = (int) $dateStartArr[0]; |
| 168 | 168 | $dateStartMonth = (int) $dateStartArr[1]; |
| 169 | 169 | $dateStartDay = (int) $dateStartArr[2]; |
| 170 | - $search[$key . '_dtstart'] = dol_mktime(0, 0, 0, $dateStartMonth, $dateStartDay, $dateStartYear); |
|
| 170 | + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, $dateStartMonth, $dateStartDay, $dateStartYear); |
|
| 171 | 171 | } |
| 172 | 172 | if (count($dateEndArr) == 3) { |
| 173 | 173 | $dateEndYear = (int) $dateEndArr[0]; |
| 174 | 174 | $dateEndMonth = (int) $dateEndArr[1]; |
| 175 | 175 | $dateEndDay = (int) $dateEndArr[2]; |
| 176 | - $search[$key . '_dtend'] = dol_mktime(23, 59, 59, $dateEndMonth, $dateEndDay, $dateEndYear); |
|
| 176 | + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, $dateEndMonth, $dateEndDay, $dateEndYear); |
|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | // If $val['visible']==0, then we never show the field |
| 189 | 189 | if (!empty($val['visible'])) { |
| 190 | 190 | $visible = (int) dol_eval($val['visible'], 1); |
| 191 | - $arrayfields['t.' . $key] = array( |
|
| 191 | + $arrayfields['t.'.$key] = array( |
|
| 192 | 192 | 'label' => $val['label'], |
| 193 | 193 | 'checked' => (($visible < 0) ? 0 : 1), |
| 194 | 194 | 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), |
@@ -227,8 +227,8 @@ discard block |
||
| 227 | 227 | foreach ($object->fields as $key => $val) { |
| 228 | 228 | $search[$key] = ''; |
| 229 | 229 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 230 | - $search[$key . '_dtstart'] = ''; |
|
| 231 | - $search[$key . '_dtend'] = ''; |
|
| 230 | + $search[$key.'_dtstart'] = ''; |
|
| 231 | + $search[$key.'_dtend'] = ''; |
|
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | $this->search = $search; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $offset = $limit * ($page - 1); |
| 284 | 284 | if (!$sortfield) { |
| 285 | 285 | reset($object->fields); // Reset is required to avoid key() to return null. |
| 286 | - $sortfield = 't.' . key($object->fields); // Set here default search field. By default 1st field in definition. |
|
| 286 | + $sortfield = 't.'.key($object->fields); // Set here default search field. By default 1st field in definition. |
|
| 287 | 287 | } |
| 288 | 288 | if (!$sortorder) { |
| 289 | 289 | $sortorder = 'DESC'; |
@@ -304,18 +304,18 @@ discard block |
||
| 304 | 304 | |
| 305 | 305 | $sqlfields = $sql; // $sql fields to remove for count total |
| 306 | 306 | |
| 307 | - $sql .= " FROM " . $this->db->prefix() . $object->table_element . " as t"; |
|
| 307 | + $sql .= " FROM ".$this->db->prefix().$object->table_element." as t"; |
|
| 308 | 308 | // Add table from hooks |
| 309 | 309 | $parameters = array(); |
| 310 | 310 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 311 | 311 | $sql .= $hookmanager->resPrint; |
| 312 | 312 | if ($object->ismultientitymanaged == 1) { |
| 313 | - $sql .= " WHERE t.entity IN (" . getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)) . ")"; |
|
| 313 | + $sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")"; |
|
| 314 | 314 | } else { |
| 315 | 315 | $sql .= " WHERE 1 = 1"; |
| 316 | 316 | } |
| 317 | 317 | // filter on logged third-party |
| 318 | - $sql .= " AND t.fk_soc = " . ((int) $socid); |
|
| 318 | + $sql .= " AND t.fk_soc = ".((int) $socid); |
|
| 319 | 319 | // discard record with status draft |
| 320 | 320 | $sql .= " AND t.fk_statut <> 0"; |
| 321 | 321 | |
@@ -332,17 +332,17 @@ discard block |
||
| 332 | 332 | $mode_search = 2; |
| 333 | 333 | } |
| 334 | 334 | if ($search[$key] != '') { |
| 335 | - $sql .= natural_search("t." . $this->db->escape($key), $search[$key], (($key == 'status' || $key == 'fk_statut') ? ($search[$key] < 0 ? 1 : 2) : $mode_search)); |
|
| 335 | + $sql .= natural_search("t.".$this->db->escape($key), $search[$key], (($key == 'status' || $key == 'fk_statut') ? ($search[$key] < 0 ? 1 : 2) : $mode_search)); |
|
| 336 | 336 | } |
| 337 | 337 | } else { |
| 338 | 338 | if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { |
| 339 | 339 | $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
| 340 | 340 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
| 341 | 341 | if (preg_match('/_dtstart$/', $key)) { |
| 342 | - $sql .= " AND t." . $this->db->escape($columnName) . " >= '" . $this->db->idate($search[$key]) . "'"; |
|
| 342 | + $sql .= " AND t.".$this->db->escape($columnName)." >= '".$this->db->idate($search[$key])."'"; |
|
| 343 | 343 | } |
| 344 | 344 | if (preg_match('/_dtend$/', $key)) { |
| 345 | - $sql .= " AND t." . $this->db->escape($columnName) . " <= '" . $this->db->idate($search[$key]) . "'"; |
|
| 345 | + $sql .= " AND t.".$this->db->escape($columnName)." <= '".$this->db->idate($search[$key])."'"; |
|
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | } |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | $nbtotalofrecords = 0; |
| 361 | 361 | if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { |
| 362 | 362 | /* The fast and low memory method to get and count full list converts the sql into a sql count */ |
| 363 | - $sqlforcount = preg_replace('/^' . preg_quote($sqlfields, '/') . '/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); |
|
| 363 | + $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); |
|
| 364 | 364 | $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount); |
| 365 | 365 | $resql = $this->db->query($sqlforcount); |
| 366 | 366 | if ($resql) { |
@@ -413,21 +413,21 @@ discard block |
||
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | $param = ''; |
| 416 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 417 | - $param .= '&limit=' . $limit; |
|
| 416 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 417 | + $param .= '&limit='.$limit; |
|
| 418 | 418 | foreach ($search as $key => $val) { |
| 419 | 419 | if (is_array($search[$key])) { |
| 420 | 420 | foreach ($search[$key] as $skey) { |
| 421 | 421 | if ($skey != '') { |
| 422 | - $param .= '&search_' . $key . '[]=' . urlencode($skey); |
|
| 422 | + $param .= '&search_'.$key.'[]='.urlencode($skey); |
|
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | } elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) { |
| 426 | - $param .= '&search_' . $key . 'month=' . (GETPOSTINT('search_' . $key . 'month')); |
|
| 427 | - $param .= '&search_' . $key . 'day=' . (GETPOSTINT('search_' . $key . 'day')); |
|
| 428 | - $param .= '&search_' . $key . 'year=' . (GETPOSTINT('search_' . $key . 'year')); |
|
| 426 | + $param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month')); |
|
| 427 | + $param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day')); |
|
| 428 | + $param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year')); |
|
| 429 | 429 | } elseif ($search[$key] != '') { |
| 430 | - $param .= '&search_' . $key . '=' . urlencode($search[$key]); |
|
| 430 | + $param .= '&search_'.$key.'='.urlencode($search[$key]); |
|
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | // Add $param from hooks |
@@ -436,29 +436,29 @@ discard block |
||
| 436 | 436 | $param .= $hookmanager->resPrint; |
| 437 | 437 | |
| 438 | 438 | $url_file = $context->getControllerUrl($context->controller); |
| 439 | - $html .= '<form method="POST" id="searchFormList" action="' . $url_file . '">' . "\n"; |
|
| 439 | + $html .= '<form method="POST" id="searchFormList" action="'.$url_file.'">'."\n"; |
|
| 440 | 440 | $html .= $context->getFormToken(); |
| 441 | 441 | $html .= '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 442 | 442 | $html .= '<input type="hidden" name="action" value="list">'; |
| 443 | - $html .= '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 444 | - $html .= '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 445 | - $html .= '<input type="hidden" name="page" value="' . $page . '">'; |
|
| 446 | - $html .= '<input type="hidden" name="contextpage" value="' . $contextpage . '">'; |
|
| 443 | + $html .= '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 444 | + $html .= '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 445 | + $html .= '<input type="hidden" name="page" value="'.$page.'">'; |
|
| 446 | + $html .= '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; |
|
| 447 | 447 | |
| 448 | 448 | // pagination |
| 449 | - $pagination_param = $param . '&sortfield=' . $sortfield . '&sortorder=' . $sortorder; |
|
| 450 | - $html .= '<nav id="webportal-' . $elementEn . '-pagination">'; |
|
| 449 | + $pagination_param = $param.'&sortfield='.$sortfield.'&sortorder='.$sortorder; |
|
| 450 | + $html .= '<nav id="webportal-'.$elementEn.'-pagination">'; |
|
| 451 | 451 | $html .= '<ul>'; |
| 452 | - $html .= '<li><strong>' . $langs->trans($titleKey) . '</strong> (' . $nbtotalofrecords . ')</li>'; |
|
| 452 | + $html .= '<li><strong>'.$langs->trans($titleKey).'</strong> ('.$nbtotalofrecords.')</li>'; |
|
| 453 | 453 | $html .= '</ul>'; |
| 454 | 454 | |
| 455 | 455 | /* Generate pagination list */ |
| 456 | - $html .= static::generatePageListNav($url_file . $pagination_param, $nbpages, $page); |
|
| 456 | + $html .= static::generatePageListNav($url_file.$pagination_param, $nbpages, $page); |
|
| 457 | 457 | |
| 458 | 458 | $html .= '</nav>'; |
| 459 | 459 | |
| 460 | 460 | // table with search filters and column titles |
| 461 | - $html .= '<table id="webportal-' . $elementEn . '-list" responsive="scroll" role="grid">'; |
|
| 461 | + $html .= '<table id="webportal-'.$elementEn.'-list" responsive="scroll" role="grid">'; |
|
| 462 | 462 | // title and desc for table |
| 463 | 463 | //if ($titleKey != '') { |
| 464 | 464 | // $html .= '<caption id="table-collapse-responsive">'; |
@@ -482,22 +482,22 @@ discard block |
||
| 482 | 482 | $html .= '</td>'; |
| 483 | 483 | // } |
| 484 | 484 | foreach ($object->fields as $key => $val) { |
| 485 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 486 | - $html .= '<td data-label="' . $arrayfields['t.' . $key]['label'] . '" data-col="'.dol_escape_htmltag($key).'" >'; |
|
| 485 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 486 | + $html .= '<td data-label="'.$arrayfields['t.'.$key]['label'].'" data-col="'.dol_escape_htmltag($key).'" >'; |
|
| 487 | 487 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
| 488 | - $html .= $this->form->selectarray('search_' . $key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', ''); |
|
| 488 | + $html .= $this->form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', ''); |
|
| 489 | 489 | } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 490 | - $postDateStart = GETPOST('search_' . $key . '_dtstart', 'alphanohtml'); |
|
| 491 | - $postDateEnd = GETPOST('search_' . $key . '_dtend', 'alphanohtml'); |
|
| 490 | + $postDateStart = GETPOST('search_'.$key.'_dtstart', 'alphanohtml'); |
|
| 491 | + $postDateEnd = GETPOST('search_'.$key.'_dtend', 'alphanohtml'); |
|
| 492 | 492 | |
| 493 | 493 | $html .= '<div class="grid">'; |
| 494 | - $html .= $this->form->inputDate('search_' . $key . '_dtstart', $postDateStart ? $postDateStart : '', $langs->trans('From')); |
|
| 494 | + $html .= $this->form->inputDate('search_'.$key.'_dtstart', $postDateStart ? $postDateStart : '', $langs->trans('From')); |
|
| 495 | 495 | $html .= '</div>'; |
| 496 | 496 | $html .= '<div class="grid">'; |
| 497 | - $html .= $this->form->inputDate('search_' . $key . '_dtend', $postDateEnd ? $postDateEnd : '', $langs->trans('to')); |
|
| 497 | + $html .= $this->form->inputDate('search_'.$key.'_dtend', $postDateEnd ? $postDateEnd : '', $langs->trans('to')); |
|
| 498 | 498 | $html .= '</div>'; |
| 499 | 499 | } else { |
| 500 | - $html .= '<input type="text" name="search_' . $key . '" value="' . dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '') . '">'; |
|
| 500 | + $html .= '<input type="text" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">'; |
|
| 501 | 501 | } |
| 502 | 502 | $html .= '</td>'; |
| 503 | 503 | } |
@@ -508,19 +508,19 @@ discard block |
||
| 508 | 508 | $html .= $hookmanager->resPrint; |
| 509 | 509 | // Remain to pay |
| 510 | 510 | if (!empty($arrayfields['remain_to_pay']['checked'])) { |
| 511 | - $html .= '<td data-label="' . $arrayfields['remain_to_pay']['label'] . '">'; |
|
| 511 | + $html .= '<td data-label="'.$arrayfields['remain_to_pay']['label'].'">'; |
|
| 512 | 512 | $html .= '</td>'; |
| 513 | 513 | } |
| 514 | 514 | // Download link |
| 515 | 515 | if (!empty($arrayfields['download_link']['checked'])) { |
| 516 | - $html .= '<td data-label="' . $arrayfields['download_link']['label'] . '">'; |
|
| 516 | + $html .= '<td data-label="'.$arrayfields['download_link']['label'].'">'; |
|
| 517 | 517 | $html .= '</td>'; |
| 518 | 518 | } |
| 519 | 519 | $html .= '</tr>'; |
| 520 | 520 | // Signature link |
| 521 | 521 | if ($elementEn == "propal" && getDolGlobalString("PROPOSAL_ALLOW_ONLINESIGN") != 0) { |
| 522 | 522 | if (!empty($arrayfields['signature_link']['checked'])) { |
| 523 | - $html .= '<td data-label="' . $arrayfields['signature_link']['label'] . '">'; |
|
| 523 | + $html .= '<td data-label="'.$arrayfields['signature_link']['label'].'">'; |
|
| 524 | 524 | $html .= '</td>'; |
| 525 | 525 | } |
| 526 | 526 | } |
@@ -537,16 +537,16 @@ discard block |
||
| 537 | 537 | $totalarray['nbfield']++; |
| 538 | 538 | // } |
| 539 | 539 | foreach ($object->fields as $key => $val) { |
| 540 | - $tableKey = 't.' . $key; |
|
| 540 | + $tableKey = 't.'.$key; |
|
| 541 | 541 | if (!empty($arrayfields[$tableKey]['checked'])) { |
| 542 | 542 | $tableOrder = ''; |
| 543 | 543 | if (array_key_exists($tableKey, $sortList)) { |
| 544 | 544 | $tableOrder = strtolower($sortList[$tableKey]); |
| 545 | 545 | } |
| 546 | - $url_param = $url_file . '&sortfield=' . $tableKey . '&sortorder=' . ($tableOrder == 'desc' ? 'asc' : 'desc') . $param; |
|
| 547 | - $html .= '<th data-col="'.dol_escape_htmltag($key).'" scope="col"' . ($tableOrder != '' ? ' table-order="' . $tableOrder . '"' : '') . '>'; |
|
| 548 | - $html .= '<a href="' . $url_param . '">'; |
|
| 549 | - $html .= $langs->trans($arrayfields['t.' . $key]['label']); |
|
| 546 | + $url_param = $url_file.'&sortfield='.$tableKey.'&sortorder='.($tableOrder == 'desc' ? 'asc' : 'desc').$param; |
|
| 547 | + $html .= '<th data-col="'.dol_escape_htmltag($key).'" scope="col"'.($tableOrder != '' ? ' table-order="'.$tableOrder.'"' : '').'>'; |
|
| 548 | + $html .= '<a href="'.$url_param.'">'; |
|
| 549 | + $html .= $langs->trans($arrayfields['t.'.$key]['label']); |
|
| 550 | 550 | $html .= '</a>'; |
| 551 | 551 | $html .= '</th>'; |
| 552 | 552 | $totalarray['nbfield']++; |
@@ -627,13 +627,13 @@ discard block |
||
| 627 | 627 | $remaintopay = 0; |
| 628 | 628 | } |
| 629 | 629 | if ($object->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1 && $discount) { |
| 630 | - $remaincreditnote = $discount->getAvailableDiscounts($companyStatic, '', 'rc.fk_facture_source=' . $object->id); |
|
| 630 | + $remaincreditnote = $discount->getAvailableDiscounts($companyStatic, '', 'rc.fk_facture_source='.$object->id); |
|
| 631 | 631 | $remaintopay = -$remaincreditnote; |
| 632 | 632 | } |
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | // Show line of result |
| 636 | - $html .= '<tr data-rowid="' . $object->id . '">'; |
|
| 636 | + $html .= '<tr data-rowid="'.$object->id.'">'; |
|
| 637 | 637 | // if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 638 | 638 | $html .= '<td class="nowraponall">'; |
| 639 | 639 | $html .= '</td>'; |
@@ -642,8 +642,8 @@ discard block |
||
| 642 | 642 | } |
| 643 | 643 | // } |
| 644 | 644 | foreach ($object->fields as $key => $val) { |
| 645 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 646 | - $html .= '<td class="nowraponall" data-label="' . $arrayfields['t.' . $key]['label'] . '">'; |
|
| 645 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 646 | + $html .= '<td class="nowraponall" data-label="'.$arrayfields['t.'.$key]['label'].'">'; |
|
| 647 | 647 | if ($key == 'status' || $key == 'fk_statut') { |
| 648 | 648 | if ($elementEn == 'invoice') { |
| 649 | 649 | // specific to get invoice status (depends on payment) |
@@ -664,21 +664,21 @@ discard block |
||
| 664 | 664 | } |
| 665 | 665 | if (!empty($val['isameasure']) && $val['isameasure'] == 1) { |
| 666 | 666 | if (!$i) { |
| 667 | - $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; |
|
| 667 | + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; |
|
| 668 | 668 | } |
| 669 | 669 | if (!isset($totalarray['val'])) { |
| 670 | 670 | $totalarray['val'] = array(); |
| 671 | 671 | } |
| 672 | - if (!isset($totalarray['val']['t.' . $key])) { |
|
| 673 | - $totalarray['val']['t.' . $key] = 0; |
|
| 672 | + if (!isset($totalarray['val']['t.'.$key])) { |
|
| 673 | + $totalarray['val']['t.'.$key] = 0; |
|
| 674 | 674 | } |
| 675 | - $totalarray['val']['t.' . $key] += $object->$key; |
|
| 675 | + $totalarray['val']['t.'.$key] += $object->$key; |
|
| 676 | 676 | } |
| 677 | 677 | } |
| 678 | 678 | } |
| 679 | 679 | // Remain to pay |
| 680 | 680 | if (!empty($arrayfields['remain_to_pay']['checked'])) { |
| 681 | - $html .= '<td class="nowraponall" data-label="' . $arrayfields['remain_to_pay']['label'] . '">'; |
|
| 681 | + $html .= '<td class="nowraponall" data-label="'.$arrayfields['remain_to_pay']['label'].'">'; |
|
| 682 | 682 | $html .= $this->form->showOutputFieldForObject($object, $arrayfields['remain_to_pay'], 'remain_to_pay', $remaintopay, ''); |
| 683 | 683 | //$html .= price($remaintopay); |
| 684 | 684 | $html .= '</td>'; |
@@ -689,9 +689,9 @@ discard block |
||
| 689 | 689 | // Download link |
| 690 | 690 | if (!empty($arrayfields['download_link']['checked'])) { |
| 691 | 691 | $element = $object->element; |
| 692 | - $html .= '<td class="nowraponall" data-label="' . $arrayfields['download_link']['label'] . '">'; |
|
| 692 | + $html .= '<td class="nowraponall" data-label="'.$arrayfields['download_link']['label'].'">'; |
|
| 693 | 693 | $filename = dol_sanitizeFileName($obj->ref); |
| 694 | - $filedir = $conf->{$element}->multidir_output[$obj->element_entity] . '/' . dol_sanitizeFileName($obj->ref); |
|
| 694 | + $filedir = $conf->{$element}->multidir_output[$obj->element_entity].'/'.dol_sanitizeFileName($obj->ref); |
|
| 695 | 695 | $html .= $this->form->getDocumentsLink($element, $filename, $filedir); |
| 696 | 696 | $html .= '</td>'; |
| 697 | 697 | if (!$i) { |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | // Signature link |
| 702 | 702 | if ($elementEn == "propal" && getDolGlobalString("PROPOSAL_ALLOW_ONLINESIGN") != 0) { |
| 703 | 703 | if (!empty($arrayfields['signature_link']['checked'])) { |
| 704 | - $html .= '<td class="nowraponall" data-label="' . $arrayfields['signature_link']['label'] . '">'; |
|
| 704 | + $html .= '<td class="nowraponall" data-label="'.$arrayfields['signature_link']['label'].'">'; |
|
| 705 | 705 | if ($object->fk_statut == Propal::STATUS_VALIDATED) { |
| 706 | 706 | $html .= $this->form->getSignatureLink('proposal', $object); |
| 707 | 707 | } |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | $html .= '</td>'; |
| 741 | 741 | } else { |
| 742 | 742 | if ($i == 1) { |
| 743 | - $html .= '<td>' . $langs->trans("Total") . '</td>'; |
|
| 743 | + $html .= '<td>'.$langs->trans("Total").'</td>'; |
|
| 744 | 744 | } else { |
| 745 | 745 | $html .= '<td></td>'; |
| 746 | 746 | } |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | $colspan++; |
| 758 | 758 | } |
| 759 | 759 | } |
| 760 | - $html .= '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
| 760 | + $html .= '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
| 761 | 761 | } |
| 762 | 762 | |
| 763 | 763 | $html .= '</tbody>'; |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | $html = '<ul class="pages-nav-list">'; |
| 798 | 798 | |
| 799 | 799 | if ($currentPage > 1) { |
| 800 | - $html .= '<li><a class="pages-nav-list__icon --prev" aria-label="' . dol_escape_htmltag($langs->trans('AriaPrevPage')) . '" href="' . $url . $pSep . 'page=' . ($currentPage - 1) . '" ' . ($currentPage <= 1 ? ' disabled' : '') . '></a></li>'; |
|
| 800 | + $html .= '<li><a class="pages-nav-list__icon --prev" aria-label="'.dol_escape_htmltag($langs->trans('AriaPrevPage')).'" href="'.$url.$pSep.'page='.($currentPage - 1).'" '.($currentPage <= 1 ? ' disabled' : '').'></a></li>'; |
|
| 801 | 801 | } |
| 802 | 802 | |
| 803 | 803 | $maxPaginItem = min($nbPages, 5); |
@@ -805,21 +805,21 @@ discard block |
||
| 805 | 805 | $maxPageNum = min($nbPages, $currentPage + 3); |
| 806 | 806 | |
| 807 | 807 | if ($minPageNum > 1) { |
| 808 | - $html .= '<li><a class="pages-nav-list__link ' . ($currentPage == 1 ? '--active' : '') . '" aria-label="' . dol_escape_htmltag($langs->trans('AriaPageX', 1)) . '" href="' . $url . $pSep . 'page=1" >1</a></li>'; |
|
| 808 | + $html .= '<li><a class="pages-nav-list__link '.($currentPage == 1 ? '--active' : '').'" aria-label="'.dol_escape_htmltag($langs->trans('AriaPageX', 1)).'" href="'.$url.$pSep.'page=1" >1</a></li>'; |
|
| 809 | 809 | $html .= '<li>…</li>'; |
| 810 | 810 | } |
| 811 | 811 | |
| 812 | 812 | for ($p = $minPageNum; $p <= $maxPageNum; $p++) { |
| 813 | - $html .= '<li><a class="pages-nav-list__link ' . ($currentPage === $p ? '--active' : '') . '" aria-label="' . dol_escape_htmltag($langs->trans('AriaPageX', $p)) . '" href="' . $url . $pSep . 'page=' . $p . '">' . $p . '</a></li>'; |
|
| 813 | + $html .= '<li><a class="pages-nav-list__link '.($currentPage === $p ? '--active' : '').'" aria-label="'.dol_escape_htmltag($langs->trans('AriaPageX', $p)).'" href="'.$url.$pSep.'page='.$p.'">'.$p.'</a></li>'; |
|
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | if ($maxPaginItem < $nbPages) { |
| 817 | 817 | $html .= '<li>…</li>'; |
| 818 | - $html .= '<li><a class="pages-nav-list__link ' . ($currentPage == $nbPages ? '--active' : '') . '" aria-label="' . dol_escape_htmltag($langs->trans('AriaPageX', $nbPages)) . '" href="' . $url . $pSep . 'page=' . $nbPages . '">' . $nbPages . '</a></li>'; |
|
| 818 | + $html .= '<li><a class="pages-nav-list__link '.($currentPage == $nbPages ? '--active' : '').'" aria-label="'.dol_escape_htmltag($langs->trans('AriaPageX', $nbPages)).'" href="'.$url.$pSep.'page='.$nbPages.'">'.$nbPages.'</a></li>'; |
|
| 819 | 819 | } |
| 820 | 820 | |
| 821 | 821 | if ($currentPage < $nbPages) { |
| 822 | - $html .= '<li><a class="pages-nav-list__icon --next" aria-label="' . dol_escape_htmltag($langs->trans('AriaNextPage')) . '" href="' . $url . $pSep . 'page=' . ($currentPage + 1) . '" ' . ($currentPage >= $nbPages ? ' disabled' : '') . '></a></li>'; |
|
| 822 | + $html .= '<li><a class="pages-nav-list__icon --next" aria-label="'.dol_escape_htmltag($langs->trans('AriaNextPage')).'" href="'.$url.$pSep.'page='.($currentPage + 1).'" '.($currentPage >= $nbPages ? ' disabled' : '').'></a></li>'; |
|
| 823 | 823 | } |
| 824 | 824 | |
| 825 | 825 | $html .= '</ul>'; |
@@ -29,15 +29,15 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // Load Dolibarr environment |
| 31 | 31 | require '../main.inc.php'; |
| 32 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
| 33 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 34 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 35 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; |
|
| 36 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; |
|
| 32 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
| 33 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 34 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 35 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php'; |
|
| 36 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skill.lib.php'; |
|
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | // Load translation files required by the page |
| 40 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 40 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 41 | 41 | |
| 42 | 42 | // Get parameters |
| 43 | 43 | $id = GETPOSTINT('id'); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'skillcard'; // To manage different context of search |
| 49 | 49 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 50 | 50 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
| 51 | -$lineid = GETPOSTINT('lineid'); |
|
| 51 | +$lineid = GETPOSTINT('lineid'); |
|
| 52 | 52 | |
| 53 | 53 | // Initialize a technical objects |
| 54 | 54 | $object = new Skill($db); |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | $search_all = GETPOST("search_all", 'alpha'); |
| 67 | 67 | $search = array(); |
| 68 | 68 | foreach ($object->fields as $key => $val) { |
| 69 | - if (GETPOST('search_' . $key, 'alpha')) { |
|
| 70 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
| 69 | + if (GETPOST('search_'.$key, 'alpha')) { |
|
| 70 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | // Load object |
| 79 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. |
|
| 79 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. |
|
| 80 | 80 | |
| 81 | 81 | // Permissions |
| 82 | 82 | $permissiontoread = $user->hasRight('hrm', 'all', 'read'); |
| 83 | 83 | $permissiontoadd = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
| 84 | 84 | $permissiontodelete = $user->hasRight('hrm', 'all', 'delete'); |
| 85 | -$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/skill'; |
|
| 85 | +$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].'/skill'; |
|
| 86 | 86 | |
| 87 | 87 | // Security check (enable the most restrictive one) |
| 88 | 88 | //if ($user->socid > 0) accessforbidden(); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { |
| 120 | 120 | $backtopage = $backurlforlist; |
| 121 | 121 | } else { |
| 122 | - $backtopage = DOL_URL_ROOT.'/hrm/skill_card.php?id=' . ($id > 0 ? $id : '__ID__'); |
|
| 122 | + $backtopage = DOL_URL_ROOT.'/hrm/skill_card.php?id='.($id > 0 ? $id : '__ID__'); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -152,16 +152,16 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | |
| 154 | 154 | // Actions when linking object each other |
| 155 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
|
| 155 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; |
|
| 156 | 156 | |
| 157 | 157 | // Actions when printing a doc from card |
| 158 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
| 158 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
| 159 | 159 | |
| 160 | 160 | // Action to move up and down lines of object |
| 161 | 161 | //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; |
| 162 | 162 | |
| 163 | 163 | // Action to build doc |
| 164 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
| 164 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
| 165 | 165 | |
| 166 | 166 | if ($action == 'set_thirdparty' && $permissiontoadd) { |
| 167 | 167 | $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | // Actions to send emails |
| 174 | 174 | $triggersendname = 'HRM_SKILL_SENTBYMAIL'; |
| 175 | 175 | $autocopy = 'MAIN_MAIL_AUTOCOPY_SKILL_TO'; |
| 176 | - $trackid = 'skill' . $object->id; |
|
| 177 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
| 176 | + $trackid = 'skill'.$object->id; |
|
| 177 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
| 178 | 178 | |
| 179 | 179 | if ($action == 'confirm_clone' && $confirm != 'yes') { |
| 180 | 180 | $action = ''; |
@@ -203,25 +203,25 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | // Part to create |
| 205 | 205 | if ($action == 'create') { |
| 206 | - print load_fiche_titre($langs->trans("NewSkill"), '', 'object_' . $object->picto); |
|
| 206 | + print load_fiche_titre($langs->trans("NewSkill"), '', 'object_'.$object->picto); |
|
| 207 | 207 | |
| 208 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 209 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 208 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 209 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 210 | 210 | print '<input type="hidden" name="action" value="add">'; |
| 211 | - $backtopage .= (strpos($backtopage, '?') > 0 ? '&' : '?') ."objecttype=job"; |
|
| 211 | + $backtopage .= (strpos($backtopage, '?') > 0 ? '&' : '?')."objecttype=job"; |
|
| 212 | 212 | if ($backtopage) { |
| 213 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 213 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 214 | 214 | } |
| 215 | 215 | if ($backtopageforcancel) { |
| 216 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
| 216 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | print dol_get_fiche_head(array(), ''); |
| 220 | 220 | |
| 221 | - print '<table class="border centpercent tableforfieldcreate">' . "\n"; |
|
| 221 | + print '<table class="border centpercent tableforfieldcreate">'."\n"; |
|
| 222 | 222 | |
| 223 | 223 | // Common attributes |
| 224 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; |
|
| 224 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; |
|
| 225 | 225 | |
| 226 | 226 | // Other attributes |
| 227 | 227 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
@@ -231,15 +231,15 @@ discard block |
||
| 231 | 231 | //@todo je stop ici ... à continuer (affichage des 5 skilled input pour create action |
| 232 | 232 | //print $object->showInputField($val, $key, $value, '', '['']', '', 0); |
| 233 | 233 | |
| 234 | - print '</table>' . "\n"; |
|
| 234 | + print '</table>'."\n"; |
|
| 235 | 235 | |
| 236 | 236 | print dol_get_fiche_end(); |
| 237 | 237 | |
| 238 | 238 | print '<div class="center">'; |
| 239 | - print '<input type="submit" class="button" name="add" value="' . dol_escape_htmltag($langs->trans("Create")) . '">'; |
|
| 239 | + print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">'; |
|
| 240 | 240 | print ' '; |
| 241 | 241 | |
| 242 | - print '<input type="' . ($backtopage ? "submit" : "button") . '" class="button button-cancel" name="cancel" value="' . dol_escape_htmltag($langs->trans("Cancel")) . '"' . ($backtopage ? '' : ' onclick="history.go(-1)"') . '>'; // Cancel for create does not post form if we don't know the backtopage |
|
| 242 | + print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage |
|
| 243 | 243 | print '</div>'; |
| 244 | 244 | |
| 245 | 245 | print '</form>'; |
@@ -250,25 +250,25 @@ discard block |
||
| 250 | 250 | // Part to edit record |
| 251 | 251 | // and skilldet edition |
| 252 | 252 | if (($id || $ref) && $action == 'edit') { |
| 253 | - print load_fiche_titre($langs->trans("Skill"), '', 'object_' . $object->picto); |
|
| 253 | + print load_fiche_titre($langs->trans("Skill"), '', 'object_'.$object->picto); |
|
| 254 | 254 | |
| 255 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 256 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 255 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 256 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 257 | 257 | print '<input type="hidden" name="action" value="update">'; |
| 258 | - print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
| 258 | + print '<input type="hidden" name="id" value="'.$object->id.'">'; |
|
| 259 | 259 | if ($backtopage) { |
| 260 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 260 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 261 | 261 | } |
| 262 | 262 | if ($backtopageforcancel) { |
| 263 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
| 263 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | print dol_get_fiche_head(); |
| 267 | 267 | |
| 268 | - print '<table class="border centpercent tableforfieldedit">' . "\n"; |
|
| 268 | + print '<table class="border centpercent tableforfieldedit">'."\n"; |
|
| 269 | 269 | |
| 270 | 270 | // Common attributes |
| 271 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; |
|
| 271 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; |
|
| 272 | 272 | |
| 273 | 273 | // Other attributes |
| 274 | 274 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | continue; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - print '<table class="border centpercent =">' . "\n"; |
|
| 294 | + print '<table class="border centpercent =">'."\n"; |
|
| 295 | 295 | $sk->fields = dol_sort_array($sk->fields, 'position'); |
| 296 | 296 | foreach ($sk->fields as $key => $val) { |
| 297 | 297 | if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4) { |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | continue; // We don't want this field |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | - print '<tr class="field_' . $key . '"><td'; |
|
| 305 | + print '<tr class="field_'.$key.'"><td'; |
|
| 306 | 306 | print ' class="titlefieldcreate'; |
| 307 | 307 | if (isset($val['notnull']) && $val['notnull'] > 0) { |
| 308 | 308 | print ' fieldrequired'; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | if (empty($skilldetArray)) { |
| 338 | 338 | $value = GETPOSTISSET($key) ? GETPOST($key, $check) : $sk->$key; |
| 339 | 339 | } else { |
| 340 | - $value=$skilldetArray[$sk->id]; |
|
| 340 | + $value = $skilldetArray[$sk->id]; |
|
| 341 | 341 | } |
| 342 | 342 | // |
| 343 | 343 | // } elseif ($val['type'] == 'price') { |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | print $sk->showOutputField($val, $key, $value, '', '', '', 0); |
| 351 | 351 | } else { |
| 352 | 352 | /** @var Skilldet $sk */ |
| 353 | - print $sk->showInputField($val, $key, $value, "", "line[" . $sk->id . "]", "", ""); |
|
| 353 | + print $sk->showInputField($val, $key, $value, "", "line[".$sk->id."]", "", ""); |
|
| 354 | 354 | } |
| 355 | 355 | print '</td>'; |
| 356 | 356 | print '</tr>'; |
@@ -362,8 +362,8 @@ discard block |
||
| 362 | 362 | |
| 363 | 363 | print dol_get_fiche_end(); |
| 364 | 364 | |
| 365 | - print '<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans("Save") . '">'; |
|
| 366 | - print ' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 365 | + print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; |
|
| 366 | + print ' <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 367 | 367 | print '</div>'; |
| 368 | 368 | |
| 369 | 369 | print '</form>'; |
@@ -381,11 +381,11 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | // Confirmation to delete |
| 383 | 383 | if ($action == 'delete') { |
| 384 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteSkill'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); |
|
| 384 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteSkill'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); |
|
| 385 | 385 | } |
| 386 | 386 | // Confirmation to delete line |
| 387 | 387 | if ($action == 'deleteline') { |
| 388 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); |
|
| 388 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); |
|
| 389 | 389 | } |
| 390 | 390 | // Confirmation clone |
| 391 | 391 | if ($action === 'clone') { |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) |
| 409 | 409 | ); |
| 410 | 410 | */ |
| 411 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); |
|
| 411 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | // Call Hook formConfirm |
@@ -426,11 +426,11 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | // Object card |
| 428 | 428 | // ------------------------------------------------------------ |
| 429 | - $linkback = '<a href="' . DOL_URL_ROOT.'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 429 | + $linkback = '<a href="'.DOL_URL_ROOT.'/hrm/skill_list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 430 | 430 | |
| 431 | 431 | |
| 432 | 432 | $morehtmlref = '<div class="refid">'; |
| 433 | - $morehtmlref.= $object->label; |
|
| 433 | + $morehtmlref .= $object->label; |
|
| 434 | 434 | $morehtmlref .= '</div>'; |
| 435 | 435 | dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref); |
| 436 | 436 | |
@@ -438,10 +438,10 @@ discard block |
||
| 438 | 438 | print '<div class="fichecenter">'; |
| 439 | 439 | print '<div class="fichehalfleft">'; |
| 440 | 440 | print '<div class="underbanner clearboth"></div>'; |
| 441 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
| 441 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
| 442 | 442 | |
| 443 | - $object->fields['label']['visible']=0; // Already in banner |
|
| 444 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
|
| 443 | + $object->fields['label']['visible'] = 0; // Already in banner |
|
| 444 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
|
| 445 | 445 | |
| 446 | 446 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
| 447 | 447 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | // Buttons for actions |
| 462 | 462 | |
| 463 | 463 | if ($action != 'presend' && $action != 'editline') { |
| 464 | - print '<div class="tabsAction">' . "\n"; |
|
| 464 | + print '<div class="tabsAction">'."\n"; |
|
| 465 | 465 | $parameters = array(); |
| 466 | 466 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
| 467 | 467 | if ($reshook < 0) { |
@@ -471,19 +471,19 @@ discard block |
||
| 471 | 471 | if (empty($reshook)) { |
| 472 | 472 | // Back to draft |
| 473 | 473 | if ($object->status == $object::STATUS_VALIDATED) { |
| 474 | - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=confirm_setdraft&confirm=yes&token=' . newToken(), '', $permissiontoadd); |
|
| 474 | + print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); |
|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd); |
|
| 477 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
| 478 | 478 | |
| 479 | 479 | // Clone |
| 480 | 480 | if ($permissiontoadd) { |
| 481 | 481 | print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.$object->id, ''); |
| 482 | 482 | } |
| 483 | 483 | // Delete (need delete permission, or if draft, just need create/modify permission) |
| 484 | - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete); |
|
| 484 | + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete); |
|
| 485 | 485 | } |
| 486 | - print '</div>' . "\n"; |
|
| 486 | + print '</div>'."\n"; |
|
| 487 | 487 | } |
| 488 | 488 | } |
| 489 | 489 | |
@@ -491,12 +491,12 @@ discard block |
||
| 491 | 491 | //*--------------------------------------------------------------------------- |
| 492 | 492 | |
| 493 | 493 | if ($action != "create" && $action != "edit") { |
| 494 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
| 495 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 496 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
| 494 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
| 495 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 496 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
| 497 | 497 | |
| 498 | 498 | // load hrm libraries |
| 499 | - require_once __DIR__ . '/class/skilldet.class.php'; |
|
| 499 | + require_once __DIR__.'/class/skilldet.class.php'; |
|
| 500 | 500 | |
| 501 | 501 | // for other modules |
| 502 | 502 | //dol_include_once('/othermodule/class/otherobject.class.php'); |
@@ -533,8 +533,8 @@ discard block |
||
| 533 | 533 | |
| 534 | 534 | // Default sort order (if not yet defined by previous GETPOST) |
| 535 | 535 | if (!$sortfield) { |
| 536 | - reset($objectline->fields); // Reset is required to avoid key() to return null. |
|
| 537 | - $sortfield = "t." . key($objectline->fields); // Set here default search field. By default 1st field in definition. |
|
| 536 | + reset($objectline->fields); // Reset is required to avoid key() to return null. |
|
| 537 | + $sortfield = "t.".key($objectline->fields); // Set here default search field. By default 1st field in definition. |
|
| 538 | 538 | } |
| 539 | 539 | if (!$sortorder) { |
| 540 | 540 | $sortorder = "ASC"; |
@@ -544,12 +544,12 @@ discard block |
||
| 544 | 544 | $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); |
| 545 | 545 | $search = array(); |
| 546 | 546 | foreach ($objectline->fields as $key => $val) { |
| 547 | - if (GETPOST('search_' . $key, 'alpha') !== '') { |
|
| 548 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
| 547 | + if (GETPOST('search_'.$key, 'alpha') !== '') { |
|
| 548 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
| 549 | 549 | } |
| 550 | 550 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 551 | - $search[$key . '_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_' . $key . '_dtstartmonth'), GETPOSTINT('search_' . $key . '_dtstartday'), GETPOSTINT('search_' . $key . '_dtstartyear')); |
|
| 552 | - $search[$key . '_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_' . $key . '_dtendmonth'), GETPOSTINT('search_' . $key . '_dtendday'), GETPOSTINT('search_' . $key . '_dtendyear')); |
|
| 551 | + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); |
|
| 552 | + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); |
|
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | 555 | |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | $fieldstosearchall = array(); |
| 558 | 558 | foreach ($objectline->fields as $key => $val) { |
| 559 | 559 | if (!empty($val['searchall'])) { |
| 560 | - $fieldstosearchall['t.' . $key] = $val['label']; |
|
| 560 | + $fieldstosearchall['t.'.$key] = $val['label']; |
|
| 561 | 561 | } |
| 562 | 562 | } |
| 563 | 563 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | // If $val['visible']==0, then we never show the field |
| 568 | 568 | if (!empty($val['visible'])) { |
| 569 | 569 | $visible = (int) dol_eval($val['visible'], 1, 1, '1'); |
| 570 | - $arrayfields['t.' . $key] = array( |
|
| 570 | + $arrayfields['t.'.$key] = array( |
|
| 571 | 571 | 'label' => $val['label'], |
| 572 | 572 | 'checked' => (($visible < 0) ? 0 : 1), |
| 573 | 573 | 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), |
@@ -599,9 +599,9 @@ discard block |
||
| 599 | 599 | // -------------------------------------------------------------------- |
| 600 | 600 | $sql = 'SELECT '; |
| 601 | 601 | $sql .= $objectline->getFieldList('t'); |
| 602 | - $sql .= " FROM " . MAIN_DB_PREFIX . $objectline->table_element . " as t"; |
|
| 602 | + $sql .= " FROM ".MAIN_DB_PREFIX.$objectline->table_element." as t"; |
|
| 603 | 603 | if ($objectline->ismultientitymanaged == 1) { |
| 604 | - $sql .= " WHERE t.entity IN (" . getEntity($objectline->element) . ")"; |
|
| 604 | + $sql .= " WHERE t.entity IN (".getEntity($objectline->element).")"; |
|
| 605 | 605 | } else { |
| 606 | 606 | $sql .= " WHERE 1 = 1 "; |
| 607 | 607 | } |
@@ -611,41 +611,41 @@ discard block |
||
| 611 | 611 | $nbtotalofrecords = $db->num_rows($resql); |
| 612 | 612 | $num = $db->num_rows($resql); |
| 613 | 613 | |
| 614 | - print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">' . "\n"; |
|
| 614 | + print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; |
|
| 615 | 615 | if ($optioncss != '') { |
| 616 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 616 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 617 | 617 | } |
| 618 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 618 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 619 | 619 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 620 | 620 | print '<input type="hidden" name="action" value="list">'; |
| 621 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 622 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 623 | - print '<input type="hidden" name="page" value="' . $page . '">'; |
|
| 624 | - print '<input type="hidden" name="contextpage" value="' . $contextpage . '">'; |
|
| 621 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 622 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 623 | + print '<input type="hidden" name="page" value="'.$page.'">'; |
|
| 624 | + print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; |
|
| 625 | 625 | if (!empty($id)) { |
| 626 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
| 626 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
| 627 | 627 | } |
| 628 | 628 | |
| 629 | - $param_fk = "&fk_skill=" . $id . "&fk_user_creat=" . (!empty($user->rowid) ? $user->rowid : 0); |
|
| 630 | - $backtopage = dol_buildpath('/hrm/skill_card.php', 1) . '?id=' . $id; |
|
| 629 | + $param_fk = "&fk_skill=".$id."&fk_user_creat=".(!empty($user->rowid) ? $user->rowid : 0); |
|
| 630 | + $backtopage = dol_buildpath('/hrm/skill_card.php', 1).'?id='.$id; |
|
| 631 | 631 | $param = ""; |
| 632 | 632 | $massactionbutton = ""; |
| 633 | 633 | //$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/skilldet_card.php', 1) . '?action=create&backtopage=' . urlencode($_SERVER['PHP_SELF']) . $param_fk . '&backtopage=' . $backtopage, '', $permissiontoadd); |
| 634 | 634 | |
| 635 | - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, '', '', 0, 0, 0, 1); |
|
| 635 | + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, '', '', 0, 0, 0, 1); |
|
| 636 | 636 | |
| 637 | 637 | // Add code for pre mass action (confirmation or email presend form) |
| 638 | 638 | $topicmail = "SendSkilldetRef"; |
| 639 | 639 | $modelmail = "skilldet"; |
| 640 | 640 | $objecttmp = new Skilldet($db); |
| 641 | - $trackid = 'xxxx' . $object->id; |
|
| 641 | + $trackid = 'xxxx'.$object->id; |
|
| 642 | 642 | //include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
| 643 | 643 | |
| 644 | 644 | if ($search_all) { |
| 645 | 645 | foreach ($fieldstosearchall as $key => $val) { |
| 646 | 646 | $fieldstosearchall[$key] = $langs->trans($val); |
| 647 | 647 | } |
| 648 | - print '<div class="divsearchfieldfilter">' . $langs->trans("FilterOnInto", $search_all) . implode(', ', $fieldstosearchall) . '</div>'; |
|
| 648 | + print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).implode(', ', $fieldstosearchall).'</div>'; |
|
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | $moreforfilter = ''; |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | // $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 673 | 673 | |
| 674 | 674 | print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table |
| 675 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 675 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 676 | 676 | |
| 677 | 677 | |
| 678 | 678 | // Fields title label |
@@ -689,13 +689,13 @@ discard block |
||
| 689 | 689 | // } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 690 | 690 | // $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
| 691 | 691 | // } |
| 692 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 693 | - print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, (!empty($cssforfield) ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield . ' ' : '')) . "\n"; |
|
| 692 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 693 | + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, (!empty($cssforfield) ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield.' ' : ''))."\n"; |
|
| 694 | 694 | } |
| 695 | 695 | } |
| 696 | 696 | //print '<td></td>'; |
| 697 | 697 | print '<td></td>'; |
| 698 | - print '</tr>' . "\n"; |
|
| 698 | + print '</tr>'."\n"; |
|
| 699 | 699 | |
| 700 | 700 | |
| 701 | 701 | // Display all ranks of skill |
@@ -738,14 +738,14 @@ discard block |
||
| 738 | 738 | // } |
| 739 | 739 | //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; |
| 740 | 740 | |
| 741 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 742 | - print '<td' . (empty($cssforfield) ? '' : ' class="' . $cssforfield . '"') . '>'; |
|
| 741 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 742 | + print '<td'.(empty($cssforfield) ? '' : ' class="'.$cssforfield.'"').'>'; |
|
| 743 | 743 | if ($key == 'status') { |
| 744 | 744 | print $objectline->getLibStatut(5); |
| 745 | 745 | } elseif ($key == 'rowid') { |
| 746 | 746 | print $objectline->showOutputField($val, $key, $objectline->id, ''); |
| 747 | 747 | // ajout pencil |
| 748 | - print '<a class="timeline-btn" href="' . DOL_MAIN_URL_ROOT . '/comm/action/skilldet_card.php?action=edit&id=' . $objectline->id . '"><i class="fa fa-pencil" title="' . $langs->trans("Modify") . '" ></i></a>'; |
|
| 748 | + print '<a class="timeline-btn" href="'.DOL_MAIN_URL_ROOT.'/comm/action/skilldet_card.php?action=edit&id='.$objectline->id.'"><i class="fa fa-pencil" title="'.$langs->trans("Modify").'" ></i></a>'; |
|
| 749 | 749 | } else { |
| 750 | 750 | print $objectline->showOutputField($val, $key, $objectline->$key, ''); |
| 751 | 751 | } |
@@ -757,15 +757,15 @@ discard block |
||
| 757 | 757 | } |
| 758 | 758 | if (!empty($val['isameasure']) && $val['isameasure'] == 1) { |
| 759 | 759 | if (!$i) { |
| 760 | - $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; |
|
| 760 | + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; |
|
| 761 | 761 | } |
| 762 | 762 | if (!isset($totalarray['val'])) { |
| 763 | 763 | $totalarray['val'] = array(); |
| 764 | 764 | } |
| 765 | - if (!isset($totalarray['val']['t.' . $key])) { |
|
| 766 | - $totalarray['val']['t.' . $key] = 0; |
|
| 765 | + if (!isset($totalarray['val']['t.'.$key])) { |
|
| 766 | + $totalarray['val']['t.'.$key] = 0; |
|
| 767 | 767 | } |
| 768 | - $totalarray['val']['t.' . $key] += $objectline->$key; |
|
| 768 | + $totalarray['val']['t.'.$key] += $objectline->$key; |
|
| 769 | 769 | } |
| 770 | 770 | } |
| 771 | 771 | } |
@@ -798,7 +798,7 @@ discard block |
||
| 798 | 798 | $totalarray['nbfield']++; |
| 799 | 799 | } |
| 800 | 800 | |
| 801 | - print '</tr>' . "\n"; |
|
| 801 | + print '</tr>'."\n"; |
|
| 802 | 802 | |
| 803 | 803 | $i++; |
| 804 | 804 | } |
@@ -813,7 +813,7 @@ discard block |
||
| 813 | 813 | $colspan++; |
| 814 | 814 | } |
| 815 | 815 | } |
| 816 | - print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
| 816 | + print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
| 817 | 817 | } |
| 818 | 818 | |
| 819 | 819 | if (!empty($resql)) { |
@@ -824,10 +824,10 @@ discard block |
||
| 824 | 824 | $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $objectline); // Note that $action and $objectline may have been modified by hook |
| 825 | 825 | print $hookmanager->resPrint; |
| 826 | 826 | |
| 827 | - print '</table>' . "\n"; |
|
| 828 | - print '</div>' . "\n"; |
|
| 827 | + print '</table>'."\n"; |
|
| 828 | + print '</div>'."\n"; |
|
| 829 | 829 | |
| 830 | - print '</form>' . "\n"; |
|
| 830 | + print '</form>'."\n"; |
|
| 831 | 831 | |
| 832 | 832 | // if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { |
| 833 | 833 | // $hidegeneratedfilelistifempty = 1; |
@@ -862,9 +862,9 @@ discard block |
||
| 862 | 862 | $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/hrm/skill_agenda.php?id='.$object->id); |
| 863 | 863 | |
| 864 | 864 | // List of actions on element |
| 865 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
| 865 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
| 866 | 866 | $formactions = new FormActions($db); |
| 867 | - $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); |
|
| 867 | + $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); |
|
| 868 | 868 | |
| 869 | 869 | print '</div></div>'; |
| 870 | 870 | } |
@@ -27,33 +27,33 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // Load Dolibarr environment |
| 29 | 29 | require '../main.inc.php'; |
| 30 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
| 31 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 32 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 33 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; |
|
| 34 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
| 35 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; |
|
| 36 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; |
|
| 37 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 38 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
| 30 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
| 31 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 32 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 33 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
|
| 34 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
| 35 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php'; |
|
| 36 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php'; |
|
| 37 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 38 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
| 39 | 39 | |
| 40 | 40 | |
| 41 | 41 | // Load translation files required by the page |
| 42 | 42 | $langs->loadLangs(array("hrm", "other", 'products')); |
| 43 | 43 | |
| 44 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
| 44 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
| 45 | 45 | $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
| 46 | 46 | $show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
| 47 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
| 48 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
| 49 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
| 47 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
| 48 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
| 49 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
| 50 | 50 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'jobpositionlist'; // To manage different context of search |
| 51 | 51 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
| 52 | 52 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 53 | 53 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
| 54 | 54 | |
| 55 | -$id = GETPOSTINT('id'); |
|
| 56 | -$ref = GETPOST('ref', 'alpha'); |
|
| 55 | +$id = GETPOSTINT('id'); |
|
| 56 | +$ref = GETPOST('ref', 'alpha'); |
|
| 57 | 57 | $fk_job = (GETPOSTISSET('fk_job') ? GETPOSTINT('fk_job') : $id); |
| 58 | 58 | $fk_user = GETPOSTINT('fk_user'); |
| 59 | 59 | //$start_date = date('Y-m-d', GETPOST('date_startyear', 'int').'-'.GETPOST('date_startmonth', 'int').'-'.GETPOST('date_startday', 'int')); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
| 65 | 65 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
| 66 | 66 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
| 67 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); |
|
| 67 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOSTINT("page"); |
|
| 68 | 68 | if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { |
| 69 | 69 | // If $page is not defined, or '' or -1 or if we click on clear filters |
| 70 | 70 | $page = 0; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $object = new Job($db); |
| 79 | 79 | $objectposition = new Position($db); |
| 80 | 80 | $extrafields = new ExtraFields($db); |
| 81 | -$diroutputmassaction = $conf->hrm->dir_output . '/temp/massgeneration/' . $user->id; |
|
| 81 | +$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; |
|
| 82 | 82 | $hookmanager->initHooks(array('jobpositioncard', 'globalcard')); // Note that conf->hooks_modules contains array |
| 83 | 83 | |
| 84 | 84 | |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | // Default sort order (if not yet defined by previous GETPOST) |
| 92 | 92 | if (!$sortfield) { |
| 93 | - reset($objectposition->fields); // Reset is required to avoid key() to return null. |
|
| 94 | - $sortfield = "t." . key($objectposition->fields); // Set here default search field. By default 1st field in definition. |
|
| 93 | + reset($objectposition->fields); // Reset is required to avoid key() to return null. |
|
| 94 | + $sortfield = "t.".key($objectposition->fields); // Set here default search field. By default 1st field in definition. |
|
| 95 | 95 | } |
| 96 | 96 | if (!$sortorder) { |
| 97 | 97 | $sortorder = "ASC"; |
@@ -101,12 +101,12 @@ discard block |
||
| 101 | 101 | $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); |
| 102 | 102 | $search = array(); |
| 103 | 103 | foreach ($objectposition->fields as $key => $val) { |
| 104 | - if (GETPOST('search_' . $key, 'alpha') !== '') { |
|
| 105 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
| 104 | + if (GETPOST('search_'.$key, 'alpha') !== '') { |
|
| 105 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
| 106 | 106 | } |
| 107 | 107 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 108 | - $search[$key . '_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_' . $key . '_dtstartmonth'), GETPOSTINT('search_' . $key . '_dtstartday'), GETPOSTINT('search_' . $key . '_dtstartyear')); |
|
| 109 | - $search[$key . '_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_' . $key . '_dtendmonth'), GETPOSTINT('search_' . $key . '_dtendday'), GETPOSTINT('search_' . $key . '_dtendyear')); |
|
| 108 | + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear')); |
|
| 109 | + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear')); |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $fieldstosearchall = array(); |
| 115 | 115 | foreach ($objectposition->fields as $key => $val) { |
| 116 | 116 | if (!empty($val['searchall'])) { |
| 117 | - $fieldstosearchall['t.' . $key] = $val['label']; |
|
| 117 | + $fieldstosearchall['t.'.$key] = $val['label']; |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | // If $val['visible']==0, then we never show the field |
| 125 | 125 | if (!empty($val['visible'])) { |
| 126 | 126 | $visible = (int) dol_eval($val['visible'], 1, 1, '1'); |
| 127 | - $arrayfields['t.' . $key] = array( |
|
| 127 | + $arrayfields['t.'.$key] = array( |
|
| 128 | 128 | 'label' => $val['label'], |
| 129 | 129 | 'checked' => (($visible < 0) ? 0 : 1), |
| 130 | 130 | 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | // Extra fields |
| 137 | -include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 137 | +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 138 | 138 | |
| 139 | 139 | $objectposition->fields = dol_sort_array($objectposition->fields, 'position'); |
| 140 | 140 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
@@ -143,13 +143,13 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | |
| 145 | 145 | // Load object |
| 146 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. |
|
| 146 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. |
|
| 147 | 147 | |
| 148 | 148 | // Permissions |
| 149 | 149 | $permissiontoread = $user->hasRight('hrm', 'all', 'read'); |
| 150 | 150 | $permissiontoadd = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
| 151 | 151 | $permissiontodelete = $user->hasRight('hrm', 'all', 'delete'); |
| 152 | -$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/position'; |
|
| 152 | +$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].'/position'; |
|
| 153 | 153 | |
| 154 | 154 | // Security check (enable the most restrictive one) |
| 155 | 155 | //if ($user->socid > 0) accessforbidden(); |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $backurlforlist = dol_buildpath('/hrm/position_list.php', 1); |
| 180 | 180 | $idBacktoPage = GETPOST('fk_job', 'aZ09'); |
| 181 | 181 | if ($idBacktoPage > 0) { |
| 182 | - $backtopage = dol_buildpath('/hrm/position.php', 1) . '?id=' . $idBacktoPage; |
|
| 182 | + $backtopage = dol_buildpath('/hrm/position.php', 1).'?id='.$idBacktoPage; |
|
| 183 | 183 | } |
| 184 | 184 | if (empty($backtopage) || ($cancel && empty($id))) { |
| 185 | 185 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | $backtopage = $backurlforlist; |
| 188 | 188 | } else { |
| 189 | 189 | if ($fk_job > 0) { |
| 190 | - $backtopage = dol_buildpath('/hrm/position.php', 1) . '?fk_job=' . ($fk_job > 0 ? $fk_job : '__ID__'); |
|
| 190 | + $backtopage = dol_buildpath('/hrm/position.php', 1).'?fk_job='.($fk_job > 0 ? $fk_job : '__ID__'); |
|
| 191 | 191 | } else { |
| 192 | - $backtopage = dol_buildpath('/hrm/position_card.php', 1) . '?id=__ID__'; |
|
| 192 | + $backtopage = dol_buildpath('/hrm/position_card.php', 1).'?id=__ID__'; |
|
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | } |
@@ -202,15 +202,15 @@ discard block |
||
| 202 | 202 | $object = new Position($db); |
| 203 | 203 | |
| 204 | 204 | // Selection of new fields |
| 205 | - include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
| 205 | + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
| 206 | 206 | |
| 207 | 207 | // Purge search criteria |
| 208 | 208 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
| 209 | 209 | foreach ($object->fields as $key => $val) { |
| 210 | 210 | $search[$key] = ''; |
| 211 | 211 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 212 | - $search[$key . '_dtstart'] = ''; |
|
| 213 | - $search[$key . '_dtend'] = ''; |
|
| 212 | + $search[$key.'_dtstart'] = ''; |
|
| 213 | + $search[$key.'_dtend'] = ''; |
|
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | 216 | $toselect = array(); |
@@ -225,9 +225,9 @@ discard block |
||
| 225 | 225 | $objectclass = 'Position'; |
| 226 | 226 | $objectlabel = 'Position'; |
| 227 | 227 | $uploaddir = $conf->hrm->dir_output; |
| 228 | - include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php'; |
|
| 228 | + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; |
|
| 229 | 229 | |
| 230 | - include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php'; |
|
| 230 | + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; |
|
| 231 | 231 | |
| 232 | 232 | $object = $job; |
| 233 | 233 | } |
@@ -249,29 +249,29 @@ discard block |
||
| 249 | 249 | $object = new Position($db); |
| 250 | 250 | // Fetch optionals attributes and labels |
| 251 | 251 | $extrafields->fetch_name_optionals_label($object->table_element); |
| 252 | - print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Position")), '', 'object_' . $object->picto); |
|
| 252 | + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Position")), '', 'object_'.$object->picto); |
|
| 253 | 253 | |
| 254 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 255 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 254 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 255 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 256 | 256 | print '<input type="hidden" name="action" value="add">'; |
| 257 | 257 | if ($backtopage) { |
| 258 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 258 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 259 | 259 | } |
| 260 | 260 | if ($backtopageforcancel) { |
| 261 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
| 261 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | print dol_get_fiche_head(array(), ''); |
| 265 | 265 | |
| 266 | - print '<table class="border centpercent tableforfieldcreate">' . "\n"; |
|
| 266 | + print '<table class="border centpercent tableforfieldcreate">'."\n"; |
|
| 267 | 267 | |
| 268 | 268 | // Common attributes |
| 269 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; |
|
| 269 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; |
|
| 270 | 270 | |
| 271 | 271 | // Other attributes |
| 272 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; |
|
| 272 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
|
| 273 | 273 | |
| 274 | - print '</table>' . "\n"; |
|
| 274 | + print '</table>'."\n"; |
|
| 275 | 275 | |
| 276 | 276 | print dol_get_fiche_end(); |
| 277 | 277 | |
@@ -283,10 +283,10 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | if ($job->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { |
| 285 | 285 | if ($backtopage) { |
| 286 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 286 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 287 | 287 | } |
| 288 | 288 | if ($backtopageforcancel) { |
| 289 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
| 289 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | // Part to show record |
@@ -299,10 +299,10 @@ discard block |
||
| 299 | 299 | |
| 300 | 300 | // Object card |
| 301 | 301 | // ------------------------------------------------------------ |
| 302 | - $linkback = '<a href="' . dol_buildpath('/hrm/position_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($fk_job) ? '&fk_job=' . $fk_job : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 302 | + $linkback = '<a href="'.dol_buildpath('/hrm/position_list.php', 1).'?restore_lastsearch_values=1'.(!empty($fk_job) ? '&fk_job='.$fk_job : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 303 | 303 | |
| 304 | 304 | $morehtmlref = '<div class="refid">'; |
| 305 | - $morehtmlref.= $object->label; |
|
| 305 | + $morehtmlref .= $object->label; |
|
| 306 | 306 | $morehtmlref .= '</div>'; |
| 307 | 307 | |
| 308 | 308 | dol_banner_tab($object, 'fk_job', $linkback, 1, 'rowid', 'rowid', $morehtmlref); |
@@ -311,17 +311,17 @@ discard block |
||
| 311 | 311 | print '<div class="fichecenter">'; |
| 312 | 312 | print '<div class="fichehalfleft">'; |
| 313 | 313 | print '<div class="underbanner clearboth"></div>'; |
| 314 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
| 314 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
| 315 | 315 | |
| 316 | 316 | // Common attributes |
| 317 | 317 | //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field |
| 318 | 318 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
| 319 | 319 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
| 320 | - $object->fields['label']['visible']=0; // Already in banner |
|
| 321 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
|
| 320 | + $object->fields['label']['visible'] = 0; // Already in banner |
|
| 321 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
|
| 322 | 322 | |
| 323 | 323 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
| 324 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 324 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 325 | 325 | |
| 326 | 326 | print '</table>'; |
| 327 | 327 | print '</div>'; |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | // Add fields from extrafields |
| 345 | 345 | if (!empty($extrafields->attributes[$object->table_element]['label'])) { |
| 346 | 346 | foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { |
| 347 | - $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef." . $key . " as options_" . $key . ', ' : ''); |
|
| 347 | + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key.', ' : ''); |
|
| 348 | 348 | } |
| 349 | 349 | } |
| 350 | 350 | // Add fields from hooks |
@@ -352,20 +352,20 @@ discard block |
||
| 352 | 352 | $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook |
| 353 | 353 | $sql .= $hookmanager->resPrint; |
| 354 | 354 | $sql = preg_replace('/,\s*$/', '', $sql); |
| 355 | - $sql .= " FROM " . MAIN_DB_PREFIX . $object->table_element . " as t"; |
|
| 355 | + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; |
|
| 356 | 356 | if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
| 357 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $object->table_element . "_extrafields as ef on (t.rowid = ef.fk_object)"; |
|
| 357 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; |
|
| 358 | 358 | } |
| 359 | 359 | // Add table from hooks |
| 360 | 360 | $parameters = array(); |
| 361 | 361 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook |
| 362 | 362 | $sql .= $hookmanager->resPrint; |
| 363 | 363 | if ($object->ismultientitymanaged == 1) { |
| 364 | - $sql .= " WHERE t.entity IN (" . getEntity($object->element) . ")"; |
|
| 364 | + $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; |
|
| 365 | 365 | } else { |
| 366 | 366 | $sql .= " WHERE 1 = 1"; |
| 367 | 367 | } |
| 368 | - $sql .= " AND t.fk_job = " . ((int) $fk_job) . " "; |
|
| 368 | + $sql .= " AND t.fk_job = ".((int) $fk_job)." "; |
|
| 369 | 369 | |
| 370 | 370 | foreach ($search as $key => $val) { |
| 371 | 371 | if (array_key_exists($key, $object->fields)) { |
@@ -387,10 +387,10 @@ discard block |
||
| 387 | 387 | $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
| 388 | 388 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
| 389 | 389 | if (preg_match('/_dtstart$/', $key)) { |
| 390 | - $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; |
|
| 390 | + $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; |
|
| 391 | 391 | } |
| 392 | 392 | if (preg_match('/_dtend$/', $key)) { |
| 393 | - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; |
|
| 393 | + $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; |
|
| 394 | 394 | } |
| 395 | 395 | } |
| 396 | 396 | } |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | } |
| 402 | 402 | //$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear); |
| 403 | 403 | // Add where from extra fields |
| 404 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_sql.tpl.php'; |
|
| 404 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; |
|
| 405 | 405 | // Add where from hooks |
| 406 | 406 | $parameters = array(); |
| 407 | 407 | $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -440,15 +440,15 @@ discard block |
||
| 440 | 440 | if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) { |
| 441 | 441 | $obj = $db->fetch_object($resql); |
| 442 | 442 | $id = $obj->rowid; |
| 443 | - header("Location: " . dol_buildpath('/hrm/position.php', 1) . '?id=' . $id); |
|
| 443 | + header("Location: ".dol_buildpath('/hrm/position.php', 1).'?id='.$id); |
|
| 444 | 444 | exit; |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | 447 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 448 | 448 | |
| 449 | - $param = 'fk_job=' . $fk_job; |
|
| 449 | + $param = 'fk_job='.$fk_job; |
|
| 450 | 450 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
| 451 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 451 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 452 | 452 | } |
| 453 | 453 | if ($limit > 0 && $limit != $conf->liste_limit) { |
| 454 | 454 | $param .= '&limit='.((int) $limit); |
@@ -456,17 +456,17 @@ discard block |
||
| 456 | 456 | foreach ($search as $key => $val) { |
| 457 | 457 | if (is_array($search[$key]) && count($search[$key])) { |
| 458 | 458 | foreach ($search[$key] as $skey) { |
| 459 | - $param .= '&search_' . $key . '[]=' . urlencode($skey); |
|
| 459 | + $param .= '&search_'.$key.'[]='.urlencode($skey); |
|
| 460 | 460 | } |
| 461 | 461 | } else { |
| 462 | - $param .= '&search_' . $key . '=' . urlencode($search[$key]); |
|
| 462 | + $param .= '&search_'.$key.'='.urlencode($search[$key]); |
|
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | if ($optioncss != '') { |
| 466 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
| 466 | + $param .= '&optioncss='.urlencode($optioncss); |
|
| 467 | 467 | } |
| 468 | 468 | // Add $param from extra fields |
| 469 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_param.tpl.php'; |
|
| 469 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
|
| 470 | 470 | // Add $param from hooks |
| 471 | 471 | $parameters = array('param' => &$param); |
| 472 | 472 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -480,43 +480,43 @@ discard block |
||
| 480 | 480 | //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), |
| 481 | 481 | ); |
| 482 | 482 | if ($permissiontodelete) { |
| 483 | - $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"') . $langs->trans("Delete"); |
|
| 483 | + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
|
| 484 | 484 | } |
| 485 | 485 | if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) { |
| 486 | 486 | $arrayofmassactions = array(); |
| 487 | 487 | } |
| 488 | 488 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
| 489 | 489 | |
| 490 | - print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '?fk_job=' . $fk_job . '">' . "\n"; |
|
| 490 | + print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?fk_job='.$fk_job.'">'."\n"; |
|
| 491 | 491 | if ($optioncss != '') { |
| 492 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 492 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 493 | 493 | } |
| 494 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 494 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 495 | 495 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 496 | 496 | print '<input type="hidden" name="action" value="list">'; |
| 497 | - print '<input type="hidden" name="massaction" value="' . $massaction . '">'; |
|
| 498 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 499 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 500 | - print '<input type="hidden" name="page" value="' . $page . '">'; |
|
| 501 | - print '<input type="hidden" name="contextpage" value="' . $contextpage . '">'; |
|
| 497 | + print '<input type="hidden" name="massaction" value="'.$massaction.'">'; |
|
| 498 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 499 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 500 | + print '<input type="hidden" name="page" value="'.$page.'">'; |
|
| 501 | + print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; |
|
| 502 | 502 | |
| 503 | 503 | $newcardbutton = ''; |
| 504 | 504 | $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/position.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'&fk_job='.((int) $fk_job), '', $permissiontoadd); |
| 505 | 505 | |
| 506 | - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
|
| 506 | + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
|
| 507 | 507 | |
| 508 | 508 | // Add code for pre mass action (confirmation or email presend form) |
| 509 | 509 | $topicmail = "SendPositionRef"; |
| 510 | 510 | $modelmail = "position"; |
| 511 | 511 | $objecttmp = new Position($db); |
| 512 | - $trackid = 'xxxx' . $object->id; |
|
| 513 | - include DOL_DOCUMENT_ROOT . '/core/tpl/massactions_pre.tpl.php'; |
|
| 512 | + $trackid = 'xxxx'.$object->id; |
|
| 513 | + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
|
| 514 | 514 | |
| 515 | 515 | if ($search_all) { |
| 516 | 516 | foreach ($fieldstosearchall as $key => $val) { |
| 517 | 517 | $fieldstosearchall[$key] = $langs->trans($val); |
| 518 | 518 | } |
| 519 | - print '<div class="divsearchfieldfilter">' . $langs->trans("FilterOnInto", $search_all) . implode(', ', $fieldstosearchall) . '</div>'; |
|
| 519 | + print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).implode(', ', $fieldstosearchall).'</div>'; |
|
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | $moreforfilter = ''; |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 544 | 544 | |
| 545 | 545 | print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table |
| 546 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 546 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 547 | 547 | |
| 548 | 548 | // Fields title search |
| 549 | 549 | // -------------------------------------------------------------------- |
@@ -551,35 +551,35 @@ discard block |
||
| 551 | 551 | foreach ($object->fields as $key => $val) { |
| 552 | 552 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
| 553 | 553 | if ($key == 'status') { |
| 554 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
| 554 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
| 555 | 555 | } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
| 556 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
| 556 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
| 557 | 557 | } elseif (in_array($val['type'], array('timestamp'))) { |
| 558 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
| 558 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
| 559 | 559 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 560 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
| 560 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
| 561 | 561 | } |
| 562 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 563 | - print '<td class="liste_titre' . ($cssforfield ? ' ' . $cssforfield : '') . '">'; |
|
| 562 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 563 | + print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; |
|
| 564 | 564 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
| 565 | - print $form->selectarray('search_' . $key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
|
| 565 | + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
|
| 566 | 566 | } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { |
| 567 | 567 | print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1); |
| 568 | 568 | } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 569 | - print '<input type="text" class="flat maxwidth75" name="search_' . $key . '" value="' . dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '') . '">'; |
|
| 569 | + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">'; |
|
| 570 | 570 | } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
| 571 | 571 | print '<div class="nowrap">'; |
| 572 | - print $form->selectDate($search[$key . '_dtstart'] ? $search[$key . '_dtstart'] : '', "search_" . $key . "_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); |
|
| 572 | + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); |
|
| 573 | 573 | print '</div>'; |
| 574 | 574 | print '<div class="nowrap">'; |
| 575 | - print $form->selectDate($search[$key . '_dtend'] ? $search[$key . '_dtend'] : '', "search_" . $key . "_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); |
|
| 575 | + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); |
|
| 576 | 576 | print '</div>'; |
| 577 | 577 | } |
| 578 | 578 | print '</td>'; |
| 579 | 579 | } |
| 580 | 580 | } |
| 581 | 581 | // Extra fields |
| 582 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_input.tpl.php'; |
|
| 582 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; |
|
| 583 | 583 | |
| 584 | 584 | // Fields from hook |
| 585 | 585 | $parameters = array('arrayfields' => $arrayfields); |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | $searchpicto = $form->showFilterButtons(); |
| 591 | 591 | print $searchpicto; |
| 592 | 592 | print '</td>'; |
| 593 | - print '</tr>' . "\n"; |
|
| 593 | + print '</tr>'."\n"; |
|
| 594 | 594 | |
| 595 | 595 | |
| 596 | 596 | // Fields title label |
@@ -599,27 +599,27 @@ discard block |
||
| 599 | 599 | foreach ($object->fields as $key => $val) { |
| 600 | 600 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
| 601 | 601 | if ($key == 'status') { |
| 602 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
| 602 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
| 603 | 603 | } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
| 604 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
| 604 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
| 605 | 605 | } elseif (in_array($val['type'], array('timestamp'))) { |
| 606 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
| 606 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
| 607 | 607 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 608 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
| 608 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
| 609 | 609 | } |
| 610 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 611 | - print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : '')) . "\n"; |
|
| 610 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 611 | + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; |
|
| 612 | 612 | } |
| 613 | 613 | } |
| 614 | 614 | // Extra fields |
| 615 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_title.tpl.php'; |
|
| 615 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; |
|
| 616 | 616 | // Hook fields |
| 617 | 617 | $parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); |
| 618 | 618 | $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook |
| 619 | 619 | print $hookmanager->resPrint; |
| 620 | 620 | // Action column |
| 621 | - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ') . "\n"; |
|
| 622 | - print '</tr>' . "\n"; |
|
| 621 | + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; |
|
| 622 | + print '</tr>'."\n"; |
|
| 623 | 623 | |
| 624 | 624 | // Detect if we need a fetch on each output line |
| 625 | 625 | $needToFetchEachLine = 0; |
@@ -651,24 +651,24 @@ discard block |
||
| 651 | 651 | foreach ($object->fields as $key => $val) { |
| 652 | 652 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
| 653 | 653 | if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
| 654 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
| 654 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
| 655 | 655 | } elseif ($key == 'status') { |
| 656 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
| 656 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | if (in_array($val['type'], array('timestamp'))) { |
| 660 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
| 660 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
| 661 | 661 | } elseif ($key == 'ref') { |
| 662 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
| 662 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { |
| 666 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
| 666 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
| 667 | 667 | } |
| 668 | 668 | //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; |
| 669 | 669 | |
| 670 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
| 671 | - print '<td' . ($cssforfield ? ' class="' . $cssforfield . '"' : '') . '>'; |
|
| 670 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
| 671 | + print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; |
|
| 672 | 672 | if ($key == 'status') { |
| 673 | 673 | print $object->getLibStatut(5); |
| 674 | 674 | } elseif ($key == 'rowid') { |
@@ -682,20 +682,20 @@ discard block |
||
| 682 | 682 | } |
| 683 | 683 | if (!empty($val['isameasure']) && $val['isameasure'] == 1) { |
| 684 | 684 | if (!$i) { |
| 685 | - $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; |
|
| 685 | + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; |
|
| 686 | 686 | } |
| 687 | 687 | if (!isset($totalarray['val'])) { |
| 688 | 688 | $totalarray['val'] = array(); |
| 689 | 689 | } |
| 690 | - if (!isset($totalarray['val']['t.' . $key])) { |
|
| 691 | - $totalarray['val']['t.' . $key] = 0; |
|
| 690 | + if (!isset($totalarray['val']['t.'.$key])) { |
|
| 691 | + $totalarray['val']['t.'.$key] = 0; |
|
| 692 | 692 | } |
| 693 | - $totalarray['val']['t.' . $key] += $object->$key; |
|
| 693 | + $totalarray['val']['t.'.$key] += $object->$key; |
|
| 694 | 694 | } |
| 695 | 695 | } |
| 696 | 696 | } |
| 697 | 697 | // Extra fields |
| 698 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_print_fields.tpl.php'; |
|
| 698 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; |
|
| 699 | 699 | // Fields from hook |
| 700 | 700 | $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); |
| 701 | 701 | $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -707,20 +707,20 @@ discard block |
||
| 707 | 707 | if (in_array($object->id, $arrayofselected)) { |
| 708 | 708 | $selected = 1; |
| 709 | 709 | } |
| 710 | - print '<input id="cb' . $object->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $object->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 710 | + print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 711 | 711 | } |
| 712 | 712 | print '</td>'; |
| 713 | 713 | if (!$i) { |
| 714 | 714 | $totalarray['nbfield']++; |
| 715 | 715 | } |
| 716 | 716 | |
| 717 | - print '</tr>' . "\n"; |
|
| 717 | + print '</tr>'."\n"; |
|
| 718 | 718 | |
| 719 | 719 | $i++; |
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | // Show total line |
| 723 | - include DOL_DOCUMENT_ROOT . '/core/tpl/list_print_total.tpl.php'; |
|
| 723 | + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; |
|
| 724 | 724 | |
| 725 | 725 | // If no record found |
| 726 | 726 | if ($num == 0) { |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | $colspan++; |
| 731 | 731 | } |
| 732 | 732 | } |
| 733 | - print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
| 733 | + print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
| 734 | 734 | } |
| 735 | 735 | |
| 736 | 736 | |
@@ -740,10 +740,10 @@ discard block |
||
| 740 | 740 | $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook |
| 741 | 741 | print $hookmanager->resPrint; |
| 742 | 742 | |
| 743 | - print '</table>' . "\n"; |
|
| 744 | - print '</div>' . "\n"; |
|
| 743 | + print '</table>'."\n"; |
|
| 744 | + print '</div>'."\n"; |
|
| 745 | 745 | |
| 746 | - print '</form>' . "\n"; |
|
| 746 | + print '</form>'."\n"; |
|
| 747 | 747 | |
| 748 | 748 | if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { |
| 749 | 749 | $hidegeneratedfilelistifempty = 1; |
@@ -751,11 +751,11 @@ discard block |
||
| 751 | 751 | $hidegeneratedfilelistifempty = 0; |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 754 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 755 | 755 | $formfile = new FormFile($db); |
| 756 | 756 | |
| 757 | 757 | // Show list of available documents |
| 758 | - $urlsource = $_SERVER['PHP_SELF'] . '?sortfield=' . $sortfield . '&sortorder=' . $sortorder; |
|
| 758 | + $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; |
|
| 759 | 759 | $urlsource .= str_replace('&', '&', $param); |
| 760 | 760 | |
| 761 | 761 | $filedir = $diroutputmassaction; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $permissionnote = $user->hasRight('contrat', 'creer'); // Used by the include of actions_setnotes.inc.php |
| 111 | 111 | $permissiondellink = $user->hasRight('contrat', 'creer'); // Used by the include of actions_dellink.inc.php |
| 112 | 112 | $permissiontodelete = ($user->hasRight('contrat', 'creer') && $object->statut == $object::STATUS_DRAFT) || $user->hasRight('contrat', 'supprimer'); |
| 113 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 113 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 114 | 114 | $permissiontoedit = $permissiontoadd; |
| 115 | 115 | $permissiontoactivate = $user->hasRight('contrat', 'activer'); |
| 116 | 116 | $error = 0; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
| 157 | 157 | |
| 158 | - include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 158 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 159 | 159 | |
| 160 | 160 | if ($action == 'confirm_active' && $confirm == 'yes' && $permissiontoactivate) { |
| 161 | 161 | $date_start = ''; |
@@ -533,8 +533,8 @@ discard block |
||
| 533 | 533 | $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); |
| 534 | 534 | if ($result) { |
| 535 | 535 | if (count($prodcustprice->lines) > 0) { |
| 536 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 537 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 536 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 537 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 538 | 538 | /*$tva_tx = $prodcustprice->lines[0]->tva_tx; |
| 539 | 539 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
| 540 | 540 | $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; |
@@ -767,7 +767,7 @@ discard block |
||
| 767 | 767 | // update price_ht with discount |
| 768 | 768 | // TODO Use object->updateline instead objectline->update |
| 769 | 769 | |
| 770 | - $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
| 770 | + $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
| 771 | 771 | $remise_percent = price2num(GETPOST('elremise_percent'), '', 2); |
| 772 | 772 | if ($remise_percent > 0) { |
| 773 | 773 | $remise = round(((float) $price_ht * (float) $remise_percent / 100), 2); |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | } elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) { |
| 874 | 874 | $date_start = dol_mktime(12, 0, 0, GETPOST('d_startmonth'), GETPOST('d_startday'), GETPOST('d_startyear')); |
| 875 | 875 | $date_end = dol_mktime(12, 0, 0, GETPOST('d_endmonth'), GETPOST('d_endday'), GETPOST('d_endyear')); |
| 876 | - $comment = GETPOST('comment', 'alpha'); |
|
| 876 | + $comment = GETPOST('comment', 'alpha'); |
|
| 877 | 877 | $result = $object->activateAll($user, $date_start, 0, $comment, $date_end); |
| 878 | 878 | if ($result < 0) { |
| 879 | 879 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1407,7 +1407,7 @@ discard block |
||
| 1407 | 1407 | $morehtmlref .= '<div class="refidno">'; |
| 1408 | 1408 | // Ref customer |
| 1409 | 1409 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 1); |
| 1410 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1, 'getFormatedCustomerRef'); |
|
| 1410 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1, 'getFormatedCustomerRef'); |
|
| 1411 | 1411 | // Ref supplier |
| 1412 | 1412 | $morehtmlref .= '<br>'; |
| 1413 | 1413 | $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 1); |
@@ -1501,7 +1501,7 @@ discard block |
||
| 1501 | 1501 | } |
| 1502 | 1502 | |
| 1503 | 1503 | |
| 1504 | - $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
| 1504 | + $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
| 1505 | 1505 | |
| 1506 | 1506 | /* |
| 1507 | 1507 | * Lines of contracts |
@@ -1739,7 +1739,7 @@ discard block |
||
| 1739 | 1739 | // Ligne carac |
| 1740 | 1740 | print '<tr class="oddeven">'; |
| 1741 | 1741 | print '<td>'; |
| 1742 | - $currentLineProductId=GETPOSTISSET('idprod')?GETPOST('idprod'):(!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); |
|
| 1742 | + $currentLineProductId = GETPOSTISSET('idprod') ?GETPOST('idprod') : (!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); |
|
| 1743 | 1743 | if ($objp->fk_product > 0) { |
| 1744 | 1744 | $canchangeproduct = 1; |
| 1745 | 1745 | |
@@ -1772,7 +1772,7 @@ discard block |
||
| 1772 | 1772 | if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) { |
| 1773 | 1773 | $nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT'); |
| 1774 | 1774 | } |
| 1775 | - $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc')?GETPOST('product_desc'):$objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); |
|
| 1775 | + $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc') ?GETPOST('product_desc') : $objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); |
|
| 1776 | 1776 | $doleditor->Create(); |
| 1777 | 1777 | |
| 1778 | 1778 | print '</td>'; |
@@ -1783,7 +1783,7 @@ discard block |
||
| 1783 | 1783 | print '</td>'; |
| 1784 | 1784 | |
| 1785 | 1785 | // Price |
| 1786 | - print '<td class="right"><input class="width50" type="text" name="elprice" value="'.(GETPOSTISSET('elprice')?GETPOST('elprice'):price($objp->subprice)).'"></td>'; |
|
| 1786 | + print '<td class="right"><input class="width50" type="text" name="elprice" value="'.(GETPOSTISSET('elprice') ?GETPOST('elprice') : price($objp->subprice)).'"></td>'; |
|
| 1787 | 1787 | |
| 1788 | 1788 | // Price multicurrency |
| 1789 | 1789 | /*if (isModEnabled("multicurrency")) { |
@@ -1791,24 +1791,24 @@ discard block |
||
| 1791 | 1791 | }*/ |
| 1792 | 1792 | |
| 1793 | 1793 | // Quantity |
| 1794 | - print '<td class="center"><input size="2" type="text" name="elqty" value="'.(GETPOSTISSET('elqty')?GETPOST('elqty'):$objp->qty).'"></td>'; |
|
| 1794 | + print '<td class="center"><input size="2" type="text" name="elqty" value="'.(GETPOSTISSET('elqty') ?GETPOST('elqty') : $objp->qty).'"></td>'; |
|
| 1795 | 1795 | |
| 1796 | 1796 | // Unit |
| 1797 | 1797 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
| 1798 | 1798 | print '<td class="left">'; |
| 1799 | - print $form->selectUnits((GETPOSTISSET('unit')?GETPOST('unit'):$objp->fk_unit), "unit"); |
|
| 1799 | + print $form->selectUnits((GETPOSTISSET('unit') ?GETPOST('unit') : $objp->fk_unit), "unit"); |
|
| 1800 | 1800 | print '</td>'; |
| 1801 | 1801 | } |
| 1802 | 1802 | |
| 1803 | 1803 | // Discount |
| 1804 | - print '<td class="nowrap right"><input size="1" type="text" name="elremise_percent" value="'.(GETPOSTISSET('elremise_percent')?GETPOST('elremise_percent'):$objp->remise_percent).'">%</td>'; |
|
| 1804 | + print '<td class="nowrap right"><input size="1" type="text" name="elremise_percent" value="'.(GETPOSTISSET('elremise_percent') ?GETPOST('elremise_percent') : $objp->remise_percent).'">%</td>'; |
|
| 1805 | 1805 | |
| 1806 | 1806 | if (!empty($usemargins)) { |
| 1807 | 1807 | print '<td class="right">'; |
| 1808 | 1808 | if ($objp->fk_product) { |
| 1809 | 1809 | print '<select id="fournprice" name="fournprice"></select>'; |
| 1810 | 1810 | } |
| 1811 | - print '<input id="buying_price" type="text" class="width50" name="buying_price" value="'.price((GETPOSTISSET('buying_price')?GETPOST('buying_price'):$objp->pa_ht), 0, '', 0).'"></td>'; |
|
| 1811 | + print '<input id="buying_price" type="text" class="width50" name="buying_price" value="'.price((GETPOSTISSET('buying_price') ?GETPOST('buying_price') : $objp->pa_ht), 0, '', 0).'"></td>'; |
|
| 1812 | 1812 | } |
| 1813 | 1813 | print '<td class="center">'; |
| 1814 | 1814 | print '<input type="submit" class="button margintoponly marginbottomonly" name="save" value="'.$langs->trans("Modify").'">'; |