@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) { |
207 | 207 | $soc_origin_id = GETPOSTINT('soc_origin'); |
208 | - $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
208 | + $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
209 | 209 | |
210 | 210 | if ($soc_origin_id <= 0) { |
211 | 211 | $langs->load('errors'); |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | } |
400 | 400 | } |
401 | 401 | if (GETPOSTISSET('accountancy_code_buy')) { |
402 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
402 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
403 | 403 | |
404 | 404 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
405 | 405 | $object->accountancy_code_buy = ''; |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | $object->default_lang = GETPOST('default_lang'); |
1031 | 1031 | |
1032 | 1032 | if (GETPOSTISSET('accountancy_code_sell')) { |
1033 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1033 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1034 | 1034 | |
1035 | 1035 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
1036 | 1036 | $object->accountancy_code_sell = ''; |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | } |
1040 | 1040 | } |
1041 | 1041 | if (GETPOSTISSET('accountancy_code_buy')) { |
1042 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1042 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1043 | 1043 | |
1044 | 1044 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
1045 | 1045 | $object->accountancy_code_buy = ''; |
@@ -1236,7 +1236,7 @@ discard block |
||
1236 | 1236 | print '</td><td' . (!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '') . '>'; |
1237 | 1237 | |
1238 | 1238 | print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . dol_escape_htmltag($object->name) . '" autofocus="autofocus">'; |
1239 | - print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1239 | + print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1240 | 1240 | // This implementation of the feature to search already existing company has been disabled. It must be implemented by keeping the "input text" and we must call the search ajax societe/ajax/ajaxcompanies.php |
1241 | 1241 | // on a keydown of the input. We should show data about a duplicate found if we found less than 5 answers into a div under the input. |
1242 | 1242 | /* |
@@ -1898,14 +1898,14 @@ discard block |
||
1898 | 1898 | $object->tva_assuj = GETPOSTINT('assujtva_value'); |
1899 | 1899 | $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
1900 | 1900 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
1901 | - $object->status = GETPOSTINT('status'); |
|
1901 | + $object->status = GETPOSTINT('status'); |
|
1902 | 1902 | |
1903 | 1903 | // Webservices url/key |
1904 | 1904 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
1905 | 1905 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
1906 | 1906 | |
1907 | 1907 | if (GETPOSTISSET('accountancy_code_sell')) { |
1908 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1908 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1909 | 1909 | |
1910 | 1910 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
1911 | 1911 | $object->accountancy_code_sell = ''; |
@@ -1914,7 +1914,7 @@ discard block |
||
1914 | 1914 | } |
1915 | 1915 | } |
1916 | 1916 | if (GETPOSTISSET('accountancy_code_buy')) { |
1917 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1917 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1918 | 1918 | |
1919 | 1919 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
1920 | 1920 | $object->accountancy_code_buy = ''; |
@@ -2537,7 +2537,7 @@ discard block |
||
2537 | 2537 | $maxfilesizearray = getMaxFileSizeArray(); |
2538 | 2538 | $maxmin = $maxfilesizearray['maxmin']; |
2539 | 2539 | if ($maxmin > 0) { |
2540 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
2540 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
2541 | 2541 | } |
2542 | 2542 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
2543 | 2543 | print '</td></tr>'; |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | // Ajout |
299 | 299 | $companybankaccount = new CompanyBankAccount($db); |
300 | 300 | |
301 | - $companybankaccount->socid = $object->id; |
|
301 | + $companybankaccount->socid = $object->id; |
|
302 | 302 | |
303 | 303 | $companybankaccount->fetch_thirdparty(); |
304 | 304 | |
@@ -525,8 +525,8 @@ discard block |
||
525 | 525 | 'use_companybankid' => GETPOST('companybankid'), |
526 | 526 | 'force_dir_output' => $conf->societe->multidir_output[$object->entity] . '/' . dol_sanitizeFileName($object->id) |
527 | 527 | ); |
528 | - $_POST['lang_id'] = GETPOST('lang_idrib' . GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
529 | - $_POST['model'] = GETPOST('modelrib' . GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
528 | + $_POST['lang_id'] = GETPOST('lang_idrib' . GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
529 | + $_POST['model'] = GETPOST('modelrib' . GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | $id = $socid; |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | } |
597 | 597 | if ($action == 'syncsepatostripe') { |
598 | 598 | // Create the bank account on current Stripe env |
599 | - $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib |
|
599 | + $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib |
|
600 | 600 | $companypaymentmode->fetch($id); |
601 | 601 | |
602 | 602 | if ($companypaymentmode->type != 'ban') { |
@@ -1197,7 +1197,7 @@ discard block |
||
1197 | 1197 | print '<table class="liste centpercent">' . "\n"; |
1198 | 1198 | print '<tr class="liste_titre">'; |
1199 | 1199 | print '<td>' . $langs->trans('Label') . '</td>'; |
1200 | - print '<td>' . $form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")) . '</td>'; // external system ID |
|
1200 | + print '<td>' . $form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")) . '</td>'; // external system ID |
|
1201 | 1201 | print '<td>' . $langs->trans('Type') . '</td>'; |
1202 | 1202 | print '<td>' . $langs->trans('Informations') . '</td>'; |
1203 | 1203 | print '<td></td>'; |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | |
1557 | 1557 | print '<tr class="liste_titre">'; |
1558 | 1558 | print_liste_field_titre("Label"); |
1559 | - print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID |
|
1559 | + print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID |
|
1560 | 1560 | print_liste_field_titre("Bank"); |
1561 | 1561 | print_liste_field_titre("RIB"); |
1562 | 1562 | print_liste_field_titre("IBAN"); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | |
80 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
80 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
81 | 81 | /** |
82 | 82 | * Assign custom values for canvas (for example into this->tpl to be used by templates) |
83 | 83 | * |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function assign_values(&$action, $id = 0, $ref = '') |
90 | 90 | { |
91 | - // phpcs:enable |
|
91 | + // phpcs:enable |
|
92 | 92 | global $conf, $langs, $user, $mysoc; |
93 | 93 | global $form, $formcompany; |
94 | 94 |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | return $out; |
77 | 77 | } |
78 | 78 | |
79 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
79 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
80 | 80 | /** |
81 | 81 | * Assign custom values for canvas (for example into this->tpl to be used by templates) |
82 | 82 | * |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function assign_values(&$action, $id = 0, $ref = '') |
89 | 89 | { |
90 | - // phpcs:enable |
|
90 | + // phpcs:enable |
|
91 | 91 | global $conf, $langs; |
92 | 92 | global $form, $formcompany; |
93 | 93 |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return $object; |
76 | 76 | } |
77 | 77 | |
78 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
78 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
79 | 79 | /** |
80 | 80 | * Assign custom values for canvas (for example into this->tpl to be used by templates) |
81 | 81 | * |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function assign_values(&$action, $id = 0, $ref = '') |
88 | 88 | { |
89 | - // phpcs:enable |
|
89 | + // phpcs:enable |
|
90 | 90 | global $conf, $langs, $db, $user, $mysoc, $canvas; |
91 | 91 | global $form, $formadmin, $formcompany; |
92 | 92 | |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | } |
381 | 381 | |
382 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
382 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
383 | 383 | /** |
384 | 384 | * Assign POST values into object |
385 | 385 | * |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | */ |
389 | 389 | private function assign_post($action) |
390 | 390 | { |
391 | - // phpcs:enable |
|
391 | + // phpcs:enable |
|
392 | 392 | global $langs, $mysoc; |
393 | 393 | |
394 | 394 | $this->object->id = GETPOST("socid"); |
@@ -299,7 +299,7 @@ |
||
299 | 299 | $this->tpl['country'] = ($img ? $img . ' ' : '') . $this->object->country; |
300 | 300 | |
301 | 301 | $this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL'); |
302 | - $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
302 | + $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
303 | 303 | $this->tpl['fax'] = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX'); |
304 | 304 | $this->tpl['email'] = dol_print_email($this->object->email, 0, $this->object->id, 1); |
305 | 305 | $this->tpl['url'] = dol_print_url($this->object->url); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * \brief Popup screen to validate VAT |
23 | 23 | */ |
24 | 24 | |
25 | -if (! defined('NOTOKENRENEWAL')) { |
|
25 | +if (!defined('NOTOKENRENEWAL')) { |
|
26 | 26 | define('NOTOKENRENEWAL', '1'); |
27 | 27 | } // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
28 | 28 |
@@ -134,20 +134,20 @@ discard block |
||
134 | 134 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
135 | 135 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
136 | 136 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
137 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
137 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
138 | 138 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
139 | 139 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
140 | 140 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
141 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
141 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
142 | 142 | |
143 | 143 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
144 | 144 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
145 | 145 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
146 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
146 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
147 | 147 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
148 | 148 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
149 | 149 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
150 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
150 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
151 | 151 | |
152 | 152 | $type = GETPOST('type', 'alpha'); |
153 | 153 | $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | $object->fields = dol_sort_array($object->fields, 'position'); |
323 | 323 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
324 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
324 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
325 | 325 | |
326 | 326 | // Security check |
327 | 327 | $socid = GETPOSTINT('socid'); |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | if (!empty($socid)) { |
1153 | 1153 | $url .= '&socid=' . $socid; |
1154 | 1154 | } |
1155 | - $newcardbutton = ''; |
|
1155 | + $newcardbutton = ''; |
|
1156 | 1156 | $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"] . '?mode=common' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); |
1157 | 1157 | $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"] . '?mode=kanban' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); |
1158 | 1158 | $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight('societe', 'creer')); |
@@ -1262,7 +1262,7 @@ discard block |
||
1262 | 1262 | } |
1263 | 1263 | |
1264 | 1264 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1265 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1265 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1266 | 1266 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1267 | 1267 | $selectedfields .= ((count($arrayofmassactions) && $contextpage != 'poslist') ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1268 | 1268 | |
@@ -1706,19 +1706,19 @@ discard block |
||
1706 | 1706 | print $hookmanager->resPrint; |
1707 | 1707 | if (!empty($arrayfields['s.datec']['checked'])) { |
1708 | 1708 | print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); |
1709 | - $totalarray['nbfield']++; // For the column action |
|
1709 | + $totalarray['nbfield']++; // For the column action |
|
1710 | 1710 | } |
1711 | 1711 | if (!empty($arrayfields['s.tms']['checked'])) { |
1712 | 1712 | print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); |
1713 | - $totalarray['nbfield']++; // For the column action |
|
1713 | + $totalarray['nbfield']++; // For the column action |
|
1714 | 1714 | } |
1715 | 1715 | if (!empty($arrayfields['s.status']['checked'])) { |
1716 | 1716 | print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center '); |
1717 | - $totalarray['nbfield']++; // For the column action |
|
1717 | + $totalarray['nbfield']++; // For the column action |
|
1718 | 1718 | } |
1719 | 1719 | if (!empty($arrayfields['s.import_key']['checked'])) { |
1720 | 1720 | print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center '); |
1721 | - $totalarray['nbfield']++; // For the column action |
|
1721 | + $totalarray['nbfield']++; // For the column action |
|
1722 | 1722 | } |
1723 | 1723 | // Action column |
1724 | 1724 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | // Get parameters |
47 | 47 | $id = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid'); |
48 | 48 | |
49 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
49 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
50 | 50 | $show_files = GETPOSTINT('show_files'); |
51 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
52 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
53 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
51 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
52 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
53 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
54 | 54 | $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
55 | 55 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
56 | 56 | $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | } |
490 | 490 | |
491 | 491 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
492 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
492 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
493 | 493 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
494 | 494 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
495 | 495 | |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
584 | 584 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
585 | 585 | } |
586 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
586 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
587 | 587 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
588 | 588 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
589 | 589 | $totalarray['nbfield']++; |
@@ -39,15 +39,15 @@ discard block |
||
39 | 39 | $langs->loadLangs(array('mrp', 'other')); |
40 | 40 | |
41 | 41 | $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... |
42 | -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
43 | -$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
44 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
45 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
46 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
42 | +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
43 | +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
44 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
45 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
46 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
48 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
49 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
50 | -$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
|
48 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
49 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
50 | +$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
|
51 | 51 | |
52 | 52 | $id = GETPOSTINT('id'); |
53 | 53 | $ref = GETPOST('ref', 'alpha'); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $object = new Workstation($db); |
70 | 70 | $extrafields = new ExtraFields($db); |
71 | 71 | $diroutputmassaction = $conf->workstation->dir_output . '/temp/massgeneration/' . $user->id; |
72 | -$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array |
|
72 | +$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array |
|
73 | 73 | |
74 | 74 | // Fetch optionals attributes and labels |
75 | 75 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | // Default sort order (if not yet defined by previous GETPOST) |
81 | 81 | if (!$sortfield) { |
82 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
82 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
83 | 83 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
84 | 84 | } |
85 | 85 | if (!$sortorder) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | $object->fields = dol_sort_array($object->fields, 'position'); |
153 | 153 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
154 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
154 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
155 | 155 | |
156 | 156 | $permissiontoread = $user->hasRight('workstation', 'workstation', 'read'); |
157 | 157 | $permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $sql .= "t." . $db->escape($key) . ", "; |
322 | 322 | } |
323 | 323 | // Add fields from extrafields |
324 | -if (! empty($extrafields->attributes[$object->table_element]['label'])) { |
|
324 | +if (!empty($extrafields->attributes[$object->table_element]['label'])) { |
|
325 | 325 | foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { |
326 | 326 | // @phan-suppress-next-line PhanTypeArraySuspiciousNullable |
327 | 327 | $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef." . $key . ', ' : ''); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | // Add groupby from hooks |
331 | 331 | $parameters = array(); |
332 | -$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
332 | +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
333 | 333 | $sql .= $hookmanager->resPrint; |
334 | 334 | $sql = preg_replace('/,\s*$/', '', $sql); |
335 | 335 | |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | } |
499 | 499 | |
500 | 500 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
501 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
501 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
502 | 502 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
503 | 503 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
504 | 504 | |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
606 | 606 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
607 | 607 | } |
608 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
608 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
609 | 609 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
610 | 610 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
611 | 611 | $totalarray['nbfield']++; |