@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | // Default sort order (if not yet defined by previous GETPOST) |
| 87 | 87 | if (!$sortfield) { |
| 88 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 88 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 89 | 89 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 90 | 90 | } |
| 91 | 91 | if (!$sortorder) { |
@@ -295,9 +295,9 @@ discard block |
||
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; |
| 298 | - $title = $langs->trans("Project") . ' - ' . $langs->trans("EventOrganizationConfOrBoothes") . ' - ' . $project->ref . ' ' . $project->name; |
|
| 298 | + $title = $langs->trans("Project").' - '.$langs->trans("EventOrganizationConfOrBoothes").' - '.$project->ref.' '.$project->name; |
|
| 299 | 299 | if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/projectnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $project->name) { |
| 300 | - $title = $project->ref . ' ' . $project->name . ' - ' . $langs->trans("ListOfConferencesOrBooths"); |
|
| 300 | + $title = $project->ref.' '.$project->name.' - '.$langs->trans("ListOfConferencesOrBooths"); |
|
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 831 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 831 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 832 | 832 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 833 | 833 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 834 | 834 | |
@@ -920,7 +920,7 @@ discard block |
||
| 920 | 920 | } 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'])) { |
| 921 | 921 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 922 | 922 | } |
| 923 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 923 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 924 | 924 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 925 | 925 | 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"; |
| 926 | 926 | $totalarray['nbfield']++; |
@@ -58,20 +58,20 @@ discard block |
||
| 58 | 58 | $socid = $user->socid; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | -$search_ref = GETPOST('search_ref', 'alpha'); |
|
| 62 | -$search_date_startday = GETPOSTINT('search_date_startday'); |
|
| 63 | -$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
| 64 | -$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
| 61 | +$search_ref = GETPOST('search_ref', 'alpha'); |
|
| 62 | +$search_date_startday = GETPOSTINT('search_date_startday'); |
|
| 63 | +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
| 64 | +$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
| 65 | 65 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 66 | -$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
| 66 | +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
| 67 | 67 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 68 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 69 | -$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
|
| 70 | -$search_user = GETPOST('search_user', 'alpha'); |
|
| 68 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 69 | +$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
|
| 70 | +$search_user = GETPOST('search_user', 'alpha'); |
|
| 71 | 71 | $search_payment_type = GETPOST('search_payment_type'); |
| 72 | -$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); |
|
| 72 | +$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); |
|
| 73 | 73 | $search_bank_account = GETPOST('search_bank_account', 'int'); |
| 74 | -$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' |
|
| 74 | +$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' |
|
| 75 | 75 | |
| 76 | 76 | $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
| 77 | 77 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | 'pndf.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70), |
| 113 | 113 | ); |
| 114 | 114 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 115 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 115 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 116 | 116 | |
| 117 | 117 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
| 118 | 118 | $hookmanager->initHooks(array('paymentexpensereportlist')); |
@@ -202,10 +202,10 @@ discard block |
||
| 202 | 202 | $sql .= natural_search('pndf.rowid', $search_ref); |
| 203 | 203 | } |
| 204 | 204 | if ($search_date_start) { |
| 205 | - $sql .= " AND pndf.datep >= '" . $db->idate($search_date_start) . "'"; |
|
| 205 | + $sql .= " AND pndf.datep >= '".$db->idate($search_date_start)."'"; |
|
| 206 | 206 | } |
| 207 | 207 | if ($search_date_end) { |
| 208 | - $sql .= " AND pndf.datep <= '" . $db->idate($search_date_end) . "'"; |
|
| 208 | + $sql .= " AND pndf.datep <= '".$db->idate($search_date_end)."'"; |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | if ($search_user) { |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | $arrayofmassactions = array(); |
| 359 | 359 | |
| 360 | 360 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 361 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 361 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 362 | 362 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 363 | 363 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 364 | 364 | |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | // type can be empty string or 0 or 1 |
| 49 | 49 | $type = GETPOST('type', 'int'); |
| 50 | 50 | $mode = GETPOSTINT('mode'); |
| 51 | -$status = ((GETPOSTINT('status') >= 0) ? GETPOSTINT('status') : - 1); // status buy when mode = customer , status purchase when mode = supplier |
|
| 52 | -$status_purchase = ((GETPOSTINT('status_purchase') >= 0) ? GETPOSTINT('status_purchase') : - 1); // status purchase when mode = customer |
|
| 51 | +$status = ((GETPOSTINT('status') >= 0) ? GETPOSTINT('status') : - 1); // status buy when mode = customer , status purchase when mode = supplier |
|
| 52 | +$status_purchase = ((GETPOSTINT('status_purchase') >= 0) ? GETPOSTINT('status_purchase') : - 1); // status purchase when mode = customer |
|
| 53 | 53 | $outjson = (GETPOSTINT('outjson') ? GETPOSTINT('outjson') : 0); |
| 54 | 54 | $price_level = GETPOSTINT('price_level'); |
| 55 | 55 | $action = GETPOST('action', 'aZ09'); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | // Multiprice (1 price per level) |
| 163 | 163 | if (!$found && isset($price_level) && $price_level >= 1 && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'))) { // If we need a particular price level (from 1 to 6) |
| 164 | 164 | $sql = "SELECT price, price_ttc, price_base_type,"; |
| 165 | - $sql .= " tva_tx, default_vat_code"; // Vat rate and code will be used if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on. |
|
| 165 | + $sql .= " tva_tx, default_vat_code"; // Vat rate and code will be used if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on. |
|
| 166 | 166 | $sql .= " FROM ".MAIN_DB_PREFIX."product_price "; |
| 167 | 167 | $sql .= " WHERE fk_product = ".((int) $id); |
| 168 | 168 | $sql .= " AND entity IN (".getEntity('productprice').")"; |
@@ -175,12 +175,12 @@ discard block |
||
| 175 | 175 | $objp = $db->fetch_object($result); |
| 176 | 176 | if ($objp) { |
| 177 | 177 | $found = true; |
| 178 | - $outprice_ht = price($objp->price); // formatted for language user because is inserted into input field |
|
| 179 | - $outprice_ttc = price($objp->price_ttc); // formatted for language user because is inserted into input field |
|
| 178 | + $outprice_ht = price($objp->price); // formatted for language user because is inserted into input field |
|
| 179 | + $outprice_ttc = price($objp->price_ttc); // formatted for language user because is inserted into input field |
|
| 180 | 180 | $outpricebasetype = $objp->price_base_type; |
| 181 | 181 | if (getDolGlobalString('PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL')) { |
| 182 | - $outtva_tx_formated = price($objp->tva_tx); // formatted for language user because is inserted into input field |
|
| 183 | - $outtva_tx = price2num($objp->tva_tx); // international numeric |
|
| 182 | + $outtva_tx_formated = price($objp->tva_tx); // formatted for language user because is inserted into input field |
|
| 183 | + $outtva_tx = price2num($objp->tva_tx); // international numeric |
|
| 184 | 184 | $outdefault_vat_code = $objp->default_vat_code; |
| 185 | 185 | } else { |
| 186 | 186 | // The common and default behaviour. |
@@ -224,8 +224,8 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | // VAT to use and default VAT for product are set to same value by default |
| 227 | - $product_outtva_tx_formated = $outtva_tx_formated; |
|
| 228 | - $product_outtva_tx = $outtva_tx; |
|
| 227 | + $product_outtva_tx_formated = $outtva_tx_formated; |
|
| 228 | + $product_outtva_tx = $outtva_tx; |
|
| 229 | 229 | $product_outdefault_vat_code = $outdefault_vat_code; |
| 230 | 230 | |
| 231 | 231 | // If we ask the price according to buyer, we change it. |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | $tmpvatwithcode = get_default_tva($mysoc, $thirdparty_buyer, $id, 0); |
| 237 | 237 | |
| 238 | 238 | if (!is_numeric($tmpvatwithcode) || $tmpvatwithcode != -1) { |
| 239 | - $reg =array(); |
|
| 239 | + $reg = array(); |
|
| 240 | 240 | if (preg_match('/(.+)\s\((.+)\)/', $tmpvatwithcode, $reg)) { |
| 241 | 241 | $outtva_tx = price2num($reg[1]); |
| 242 | 242 | $outtva_tx_formated = price($outtva_tx); |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $match = preg_grep('/('.preg_quote($htmlname, '/').'[0-9]+)/', array_keys($_GET)); |
| 294 | 294 | sort($match); |
| 295 | 295 | |
| 296 | - $idprod = (empty($match[0]) ? '' : $match[0]); // Take first key found into GET array with matching $htmlname123 |
|
| 296 | + $idprod = (empty($match[0]) ? '' : $match[0]); // Take first key found into GET array with matching $htmlname123 |
|
| 297 | 297 | |
| 298 | 298 | if (GETPOST($htmlname, 'alpha') == '' && (!$idprod || !GETPOST($idprod, 'alpha'))) { |
| 299 | 299 | print json_encode(array()); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | |
| 78 | 78 | // Security check |
| 79 | 79 | $id = GETPOSTINT('id'); |
| 80 | -$socid =0; |
|
| 80 | +$socid = 0; |
|
| 81 | 81 | if ($user->socid) { |
| 82 | 82 | $socid = $user->socid; |
| 83 | 83 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | // Default sort order (if not yet defined by previous GETPOST) |
| 73 | 73 | if (!$sortfield) { |
| 74 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 74 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 75 | 75 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 76 | 76 | } |
| 77 | 77 | if (!$sortorder) { |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | if ($searchCategoryProductOperator == 0) { |
| 284 | 284 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck WHERE p.rowid = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 285 | 285 | } else { |
| 286 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 286 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | } |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | // Output page |
| 373 | 373 | // -------------------------------------------------------------------- |
| 374 | 374 | |
| 375 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 375 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 376 | 376 | |
| 377 | 377 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 378 | 378 | |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | } |
| 509 | 509 | |
| 510 | 510 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 511 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 511 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 512 | 512 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 513 | 513 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 514 | 514 | |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | } 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'])) { |
| 600 | 600 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 601 | 601 | } |
| 602 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 602 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 603 | 603 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 604 | 604 | 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"; |
| 605 | 605 | $totalarray['nbfield']++; |
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | 'p.tobatch' => array('label' => "ManageLotSerial", 'checked' => 0, 'enabled' => (isModEnabled('productbatch')), 'position' => 60), |
| 265 | 265 | 'p.fk_country' => array('label' => "Country", 'checked' => 0, 'position' => 100), |
| 266 | 266 | 'p.fk_state' => array('label' => "State", 'checked' => 0, 'position' => 101), |
| 267 | - $alias_product_perentity . '.accountancy_code_sell' => array('label' => "ProductAccountancySellCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 400), |
|
| 268 | - $alias_product_perentity . '.accountancy_code_sell_intra' => array('label' => "ProductAccountancySellIntraCode", 'checked' => 0, 'enabled' => $isInEEC && !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 401), |
|
| 269 | - $alias_product_perentity . '.accountancy_code_sell_export' => array('label' => "ProductAccountancySellExportCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 402), |
|
| 270 | - $alias_product_perentity . '.accountancy_code_buy' => array('label' => "ProductAccountancyBuyCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 403), |
|
| 271 | - $alias_product_perentity . '.accountancy_code_buy_intra' => array('label' => "ProductAccountancyBuyIntraCode", 'checked' => 0, 'enabled' => $isInEEC && !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 404), |
|
| 272 | - $alias_product_perentity . '.accountancy_code_buy_export' => array('label' => "ProductAccountancyBuyExportCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 405), |
|
| 267 | + $alias_product_perentity.'.accountancy_code_sell' => array('label' => "ProductAccountancySellCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 400), |
|
| 268 | + $alias_product_perentity.'.accountancy_code_sell_intra' => array('label' => "ProductAccountancySellIntraCode", 'checked' => 0, 'enabled' => $isInEEC && !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 401), |
|
| 269 | + $alias_product_perentity.'.accountancy_code_sell_export' => array('label' => "ProductAccountancySellExportCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 402), |
|
| 270 | + $alias_product_perentity.'.accountancy_code_buy' => array('label' => "ProductAccountancyBuyCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 403), |
|
| 271 | + $alias_product_perentity.'.accountancy_code_buy_intra' => array('label' => "ProductAccountancyBuyIntraCode", 'checked' => 0, 'enabled' => $isInEEC && !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 404), |
|
| 272 | + $alias_product_perentity.'.accountancy_code_buy_export' => array('label' => "ProductAccountancyBuyExportCode", 'checked' => 0, 'enabled' => !getDolGlobalString('PRODUCT_DISABLE_ACCOUNTING'), 'position' => 405), |
|
| 273 | 273 | 'p.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 500), |
| 274 | 274 | 'p.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 500), |
| 275 | 275 | 'p.tosell' => array('label' => $langs->transnoentitiesnoconv("Status").' ('.$langs->transnoentitiesnoconv("Sell").')', 'checked' => 1, 'position' => 1000), |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 312 | 312 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 313 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 313 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 314 | 314 | |
| 315 | 315 | // Security check |
| 316 | 316 | if ($search_type == '0') { |
@@ -480,10 +480,10 @@ discard block |
||
| 480 | 480 | |
| 481 | 481 | $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; |
| 482 | 482 | if (isModEnabled('workstation')) { |
| 483 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "workstation_workstation as ws ON (p.fk_default_workstation = ws.rowid)"; |
|
| 483 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."workstation_workstation as ws ON (p.fk_default_workstation = ws.rowid)"; |
|
| 484 | 484 | } |
| 485 | 485 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
| 486 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
| 486 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
| 487 | 487 | } |
| 488 | 488 | if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
| 489 | 489 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)"; |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | if ($searchCategoryProductOperator == 0) { |
| 579 | 579 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck WHERE p.rowid = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 580 | 580 | } else { |
| 581 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 581 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 582 | 582 | } |
| 583 | 583 | } |
| 584 | 584 | } |
@@ -608,22 +608,22 @@ discard block |
||
| 608 | 608 | $sql .= " AND p.finished = ".((int) $search_finished); |
| 609 | 609 | } |
| 610 | 610 | if ($search_accountancy_code_sell) { |
| 611 | - $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell', clean_account($search_accountancy_code_sell)); |
|
| 611 | + $sql .= natural_search($alias_product_perentity.'.accountancy_code_sell', clean_account($search_accountancy_code_sell)); |
|
| 612 | 612 | } |
| 613 | 613 | if ($search_accountancy_code_sell_intra) { |
| 614 | - $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_intra', clean_account($search_accountancy_code_sell_intra)); |
|
| 614 | + $sql .= natural_search($alias_product_perentity.'.accountancy_code_sell_intra', clean_account($search_accountancy_code_sell_intra)); |
|
| 615 | 615 | } |
| 616 | 616 | if ($search_accountancy_code_sell_export) { |
| 617 | - $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_export', clean_account($search_accountancy_code_sell_export)); |
|
| 617 | + $sql .= natural_search($alias_product_perentity.'.accountancy_code_sell_export', clean_account($search_accountancy_code_sell_export)); |
|
| 618 | 618 | } |
| 619 | 619 | if ($search_accountancy_code_buy) { |
| 620 | - $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy', clean_account($search_accountancy_code_buy)); |
|
| 620 | + $sql .= natural_search($alias_product_perentity.'.accountancy_code_buy', clean_account($search_accountancy_code_buy)); |
|
| 621 | 621 | } |
| 622 | 622 | if ($search_accountancy_code_buy_intra) { |
| 623 | - $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_intra', clean_account($search_accountancy_code_buy_intra)); |
|
| 623 | + $sql .= natural_search($alias_product_perentity.'.accountancy_code_buy_intra', clean_account($search_accountancy_code_buy_intra)); |
|
| 624 | 624 | } |
| 625 | 625 | if ($search_accountancy_code_buy_export) { |
| 626 | - $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_export', clean_account($search_accountancy_code_buy_export)); |
|
| 626 | + $sql .= natural_search($alias_product_perentity.'.accountancy_code_buy_export', clean_account($search_accountancy_code_buy_export)); |
|
| 627 | 627 | } |
| 628 | 628 | if (getDolGlobalString('PRODUCT_USE_UNITS') && $search_units) { |
| 629 | 629 | $sql .= natural_search('cu.rowid', $search_units); |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | if (isModEnabled('category') && $user->hasRight($rightskey, 'creer')) { |
| 852 | 852 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); |
| 853 | 853 | } |
| 854 | -if (in_array($massaction, array('presend', 'predelete','preaffecttag', 'edit_extrafields', 'preupdateprice'))) { |
|
| 854 | +if (in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'edit_extrafields', 'preupdateprice'))) { |
|
| 855 | 855 | $arrayofmassactions = array(); |
| 856 | 856 | } |
| 857 | 857 | if ($user->hasRight($rightskey, 'supprimer')) { |
@@ -964,7 +964,7 @@ discard block |
||
| 964 | 964 | } |
| 965 | 965 | |
| 966 | 966 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 967 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 967 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 968 | 968 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 969 | 969 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 970 | 970 | |
@@ -1206,23 +1206,23 @@ discard block |
||
| 1206 | 1206 | print '</td>'; |
| 1207 | 1207 | } |
| 1208 | 1208 | // Accountancy code sell |
| 1209 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { |
|
| 1209 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['checked'])) { |
|
| 1210 | 1210 | print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell" value="'.dol_escape_htmltag($search_accountancy_code_sell).'"></td>'; |
| 1211 | 1211 | } |
| 1212 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { |
|
| 1212 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['checked'])) { |
|
| 1213 | 1213 | print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_intra" value="'.dol_escape_htmltag($search_accountancy_code_sell_intra).'"></td>'; |
| 1214 | 1214 | } |
| 1215 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { |
|
| 1215 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['checked'])) { |
|
| 1216 | 1216 | print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_export" value="'.dol_escape_htmltag($search_accountancy_code_sell_export).'"></td>'; |
| 1217 | 1217 | } |
| 1218 | 1218 | // Accountancy code buy |
| 1219 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { |
|
| 1219 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['checked'])) { |
|
| 1220 | 1220 | print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy" value="'.dol_escape_htmltag($search_accountancy_code_buy).'"></td>'; |
| 1221 | 1221 | } |
| 1222 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { |
|
| 1222 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['checked'])) { |
|
| 1223 | 1223 | print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_intra" value="'.dol_escape_htmltag($search_accountancy_code_buy_intra).'"></td>'; |
| 1224 | 1224 | } |
| 1225 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { |
|
| 1225 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['checked'])) { |
|
| 1226 | 1226 | print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_export" value="'.dol_escape_htmltag($search_accountancy_code_buy_export).'"></td>'; |
| 1227 | 1227 | } |
| 1228 | 1228 | // Extra fields |
@@ -1438,28 +1438,28 @@ discard block |
||
| 1438 | 1438 | print_liste_field_titre($arrayfields['p.fk_state']['label'], $_SERVER["PHP_SELF"], "p.fk_state", "", $param, '', $sortfield, $sortorder); |
| 1439 | 1439 | $totalarray['nbfield']++; |
| 1440 | 1440 | } |
| 1441 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { |
|
| 1442 | - print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell", "", $param, '', $sortfield, $sortorder); |
|
| 1441 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['checked'])) { |
|
| 1442 | + print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_sell", "", $param, '', $sortfield, $sortorder); |
|
| 1443 | 1443 | $totalarray['nbfield']++; |
| 1444 | 1444 | } |
| 1445 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { |
|
| 1446 | - print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder); |
|
| 1445 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['checked'])) { |
|
| 1446 | + print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder); |
|
| 1447 | 1447 | $totalarray['nbfield']++; |
| 1448 | 1448 | } |
| 1449 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { |
|
| 1450 | - print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder); |
|
| 1449 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['checked'])) { |
|
| 1450 | + print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder); |
|
| 1451 | 1451 | $totalarray['nbfield']++; |
| 1452 | 1452 | } |
| 1453 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { |
|
| 1454 | - print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy", "", $param, '', $sortfield, $sortorder); |
|
| 1453 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['checked'])) { |
|
| 1454 | + print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_buy", "", $param, '', $sortfield, $sortorder); |
|
| 1455 | 1455 | $totalarray['nbfield']++; |
| 1456 | 1456 | } |
| 1457 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { |
|
| 1458 | - print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder); |
|
| 1457 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['checked'])) { |
|
| 1458 | + print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder); |
|
| 1459 | 1459 | $totalarray['nbfield']++; |
| 1460 | 1460 | } |
| 1461 | -if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { |
|
| 1462 | - print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder); |
|
| 1461 | +if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['checked'])) { |
|
| 1462 | + print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder); |
|
| 1463 | 1463 | $totalarray['nbfield']++; |
| 1464 | 1464 | } |
| 1465 | 1465 | // Extra fields |
@@ -1668,7 +1668,7 @@ discard block |
||
| 1668 | 1668 | } |
| 1669 | 1669 | } |
| 1670 | 1670 | |
| 1671 | - print '<td class="center">' . $product_thumbnail_html . '</td>'; |
|
| 1671 | + print '<td class="center">'.$product_thumbnail_html.'</td>'; |
|
| 1672 | 1672 | if (!$i) { |
| 1673 | 1673 | $totalarray['nbfield']++; |
| 1674 | 1674 | } |
@@ -1935,10 +1935,10 @@ discard block |
||
| 1935 | 1935 | |
| 1936 | 1936 | // Multiprices |
| 1937 | 1937 | if (getDolGlobalString('PRODUIT_MULTIPRICES')) { |
| 1938 | - if (! isset($productpricescache)) { |
|
| 1938 | + if (!isset($productpricescache)) { |
|
| 1939 | 1939 | $productpricescache = array(); |
| 1940 | 1940 | } |
| 1941 | - if (! isset($productpricescache[$obj->rowid])) { |
|
| 1941 | + if (!isset($productpricescache[$obj->rowid])) { |
|
| 1942 | 1942 | $productpricescache[$obj->rowid] = array(); |
| 1943 | 1943 | } |
| 1944 | 1944 | |
@@ -2153,38 +2153,38 @@ discard block |
||
| 2153 | 2153 | } |
| 2154 | 2154 | } |
| 2155 | 2155 | // Accountancy code sell |
| 2156 | - if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { |
|
| 2156 | + if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['checked'])) { |
|
| 2157 | 2157 | print '<td>'.length_accountg($product_static->accountancy_code_sell).'</td>'; |
| 2158 | 2158 | if (!$i) { |
| 2159 | 2159 | $totalarray['nbfield']++; |
| 2160 | 2160 | } |
| 2161 | 2161 | } |
| 2162 | - if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { |
|
| 2162 | + if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['checked'])) { |
|
| 2163 | 2163 | print '<td>'.length_accountg($product_static->accountancy_code_sell_intra).'</td>'; |
| 2164 | 2164 | if (!$i) { |
| 2165 | 2165 | $totalarray['nbfield']++; |
| 2166 | 2166 | } |
| 2167 | 2167 | } |
| 2168 | - if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { |
|
| 2168 | + if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['checked'])) { |
|
| 2169 | 2169 | print '<td>'.length_accountg($product_static->accountancy_code_sell_export).'</td>'; |
| 2170 | 2170 | if (!$i) { |
| 2171 | 2171 | $totalarray['nbfield']++; |
| 2172 | 2172 | } |
| 2173 | 2173 | } |
| 2174 | 2174 | // Accountancy code buy |
| 2175 | - if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { |
|
| 2175 | + if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['checked'])) { |
|
| 2176 | 2176 | print '<td>'.length_accountg($product_static->accountancy_code_buy).'</td>'; |
| 2177 | 2177 | if (!$i) { |
| 2178 | 2178 | $totalarray['nbfield']++; |
| 2179 | 2179 | } |
| 2180 | 2180 | } |
| 2181 | - if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { |
|
| 2181 | + if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['checked'])) { |
|
| 2182 | 2182 | print '<td>'.length_accountg($product_static->accountancy_code_buy_intra).'</td>'; |
| 2183 | 2183 | if (!$i) { |
| 2184 | 2184 | $totalarray['nbfield']++; |
| 2185 | 2185 | } |
| 2186 | 2186 | } |
| 2187 | - if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { |
|
| 2187 | + if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['checked'])) { |
|
| 2188 | 2188 | print '<td>'.length_accountg($product_static->accountancy_code_buy_export).'</td>'; |
| 2189 | 2189 | if (!$i) { |
| 2190 | 2190 | $totalarray['nbfield']++; |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c_dep ON c_dep.rowid = t.fk_departement"; |
| 244 | 244 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as ccount ON ccount.rowid = t.fk_pays"; |
| 245 | 245 | if ($separatedPMP) { |
| 246 | - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pa ON pa.fk_product = p.rowid AND pa.fk_product = ps.fk_product AND pa.entity = ". (int) $conf->entity; |
|
| 246 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pa ON pa.fk_product = p.rowid AND pa.fk_product = ps.fk_product AND pa.entity = ".(int) $conf->entity; |
|
| 247 | 247 | } |
| 248 | 248 | $sql .= " WHERE t.entity IN (".getEntity('stock').")"; |
| 249 | 249 | foreach ($search as $key => $val) { |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | if ($searchCategoryWarehouseOperator == 0) { |
| 296 | 296 | $searchCategoryWarehouseSqlList[] = " EXISTS (SELECT ck.fk_warehouse FROM ".MAIN_DB_PREFIX."categorie_warehouse as ck WHERE t.rowid = ck.fk_warehouse AND ck.fk_categorie = ".((int) $searchCategoryWarehouse).")"; |
| 297 | 297 | } else { |
| 298 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryWarehouse); |
|
| 298 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryWarehouse); |
|
| 299 | 299 | } |
| 300 | 300 | } |
| 301 | 301 | } |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), |
| 449 | 449 | ); |
| 450 | 450 | //if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
| 451 | -if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
| 451 | +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
| 452 | 452 | $arrayofmassactions = array(); |
| 453 | 453 | } |
| 454 | 454 | if (isModEnabled('category') && $user->hasRight('stock', 'creer')) { |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | } |
| 527 | 527 | |
| 528 | 528 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 529 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 529 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 530 | 530 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 531 | 531 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 532 | 532 | |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | } 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'])) { |
| 644 | 644 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 645 | 645 | } |
| 646 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 646 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 647 | 647 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 648 | 648 | 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"; |
| 649 | 649 | $totalarray['nbfield']++; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | // Default sort order (if not yet defined by previous GETPOST) |
| 76 | 76 | if (!$sortfield) { |
| 77 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 77 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 78 | 78 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 79 | 79 | } |
| 80 | 80 | if (!$sortorder) { |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | // Output page |
| 343 | 343 | // -------------------------------------------------------------------- |
| 344 | 344 | |
| 345 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 345 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 346 | 346 | |
| 347 | 347 | // Example : Adding jquery code |
| 348 | 348 | // print '<script type="text/javascript"> |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | } |
| 471 | 471 | |
| 472 | 472 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 473 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 473 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 474 | 474 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 475 | 475 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 476 | 476 | |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | } 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'])) { |
| 562 | 562 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 563 | 563 | } |
| 564 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 564 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 565 | 565 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 566 | 566 | 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"; |
| 567 | 567 | $totalarray['nbfield']++; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $object = new MouvementStock($db); |
| 119 | 119 | $extrafields = new ExtraFields($db); |
| 120 | 120 | $diroutputmassaction = $conf->stock->dir_output.'/temp/massgeneration/'.$user->id; |
| 121 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 121 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 122 | 122 | |
| 123 | 123 | $formfile = new FormFile($db); |
| 124 | 124 | |
@@ -699,10 +699,10 @@ discard block |
||
| 699 | 699 | $sql .= " AND e.rowid = ".((int) $id); |
| 700 | 700 | } |
| 701 | 701 | if (!empty($search_date_start)) { |
| 702 | - $sql .= " AND m.datem >= '" . $db->idate($search_date_start) . "'"; |
|
| 702 | + $sql .= " AND m.datem >= '".$db->idate($search_date_start)."'"; |
|
| 703 | 703 | } |
| 704 | 704 | if (!empty($search_date_end)) { |
| 705 | - $sql .= " AND m.datem <= '" . $db->idate($search_date_end) . "'"; |
|
| 705 | + $sql .= " AND m.datem <= '".$db->idate($search_date_end)."'"; |
|
| 706 | 706 | } |
| 707 | 707 | if ($idproduct > 0) { |
| 708 | 708 | $sql .= " AND p.rowid = ".((int) $idproduct); |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | } |
| 1149 | 1149 | |
| 1150 | 1150 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 1151 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 1151 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 1152 | 1152 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 1153 | 1153 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1154 | 1154 | |