@@ -4207,7 +4207,7 @@ discard block |
||
| 4207 | 4207 | } |
| 4208 | 4208 | |
| 4209 | 4209 | if (!is_object($user)) { |
| 4210 | - $user = new User($db); // To avoid error during migration |
|
| 4210 | + $user = new User($db); // To avoid error during migration |
|
| 4211 | 4211 | } |
| 4212 | 4212 | |
| 4213 | 4213 | dolibarr_install_syslog("upgrade2::migrate_reload_modules force=" . $force . ", listofmodule=" . implode(',', array_keys($listofmodule))); |
@@ -5038,7 +5038,7 @@ discard block |
||
| 5038 | 5038 | $error++; |
| 5039 | 5039 | } |
| 5040 | 5040 | |
| 5041 | - $current_contract = $obj->cid; |
|
| 5041 | + $current_contract = $obj->cid; |
|
| 5042 | 5042 | } |
| 5043 | 5043 | } else { |
| 5044 | 5044 | $error++; |
@@ -636,7 +636,7 @@ discard block |
||
| 636 | 636 | } |
| 637 | 637 | } |
| 638 | 638 | |
| 639 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 639 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 640 | 640 | /** |
| 641 | 641 | * Load the project with id $this->fk_project into this->project |
| 642 | 642 | * |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | */ |
| 645 | 645 | public function fetch_projet() |
| 646 | 646 | { |
| 647 | - // phpcs:enable |
|
| 647 | + // phpcs:enable |
|
| 648 | 648 | |
| 649 | 649 | if (empty($this->fk_project) && !empty($this->fk_projet)) { |
| 650 | 650 | $this->fk_project = $this->fk_projet; // For backward compatibility |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | return $this->LibStatut($this->status, $mode); |
| 864 | 864 | } |
| 865 | 865 | |
| 866 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 866 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 867 | 867 | /** |
| 868 | 868 | * Return the status |
| 869 | 869 | * |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | */ |
| 874 | 874 | public function LibStatut($status, $mode = 0) |
| 875 | 875 | { |
| 876 | - // phpcs:enable |
|
| 876 | + // phpcs:enable |
|
| 877 | 877 | global $langs; |
| 878 | 878 | |
| 879 | 879 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | // Number of supplier proposals open (expired) |
| 209 | - if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
| 209 | + if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
| 210 | 210 | $langs->load("supplier_proposal"); |
| 211 | 211 | $board = new SupplierProposal($db); |
| 212 | 212 | $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | // Number of sales orders |
| 218 | - if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
| 218 | + if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
| 219 | 219 | $board = new Commande($db); |
| 220 | 220 | // Number of customer orders to be shipped (validated and in progress) |
| 221 | 221 | $dashboardlines[$board->element . '_toship'] = $board->load_board($user, 'toship'); |
@@ -228,14 +228,14 @@ discard block |
||
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | // Number of suppliers orders |
| 231 | - if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
| 231 | + if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
| 232 | 232 | $board = new CommandeFournisseur($db); |
| 233 | 233 | $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); |
| 234 | 234 | $dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting'); |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | // Number of contract / services enabled (delayed) |
| 238 | - if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
| 238 | + if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
| 239 | 239 | $board = new Contrat($db); |
| 240 | 240 | $dashboardlines[$board->element . '_inactive'] = $board->load_board($user, "inactive"); |
| 241 | 241 | // Number of active services (expired) |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | // Number of tickets open |
| 246 | - if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
| 246 | + if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
| 247 | 247 | $board = new Ticket($db); |
| 248 | 248 | $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); |
| 249 | 249 | // Number of active services (expired) |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | // Number of transactions to conciliate |
| 266 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 266 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 267 | 267 | $board = new Account($db); |
| 268 | 268 | $nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate |
| 269 | 269 | if ($nb > 0) { |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | |
| 275 | 275 | // Number of cheque to send |
| 276 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 276 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
| 277 | 277 | if (!getDolGlobalString('BANK_DISABLE_CHECK_DEPOSIT')) { |
| 278 | 278 | include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; |
| 279 | 279 | $board = new RemiseCheque($db); |
@@ -292,26 +292,26 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | // Number of foundation members |
| 295 | - if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
| 295 | + if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
| 296 | 296 | $board = new Adherent($db); |
| 297 | 297 | $dashboardlines[$board->element . '_shift'] = $board->load_board($user, 'shift'); |
| 298 | 298 | $dashboardlines[$board->element . '_expired'] = $board->load_board($user, 'expired'); |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | // Number of expense reports to approve |
| 302 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
| 302 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
| 303 | 303 | $board = new ExpenseReport($db); |
| 304 | 304 | $dashboardlines[$board->element . '_toapprove'] = $board->load_board($user, 'toapprove'); |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | // Number of expense reports to pay |
| 308 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
| 308 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
| 309 | 309 | $board = new ExpenseReport($db); |
| 310 | 310 | $dashboardlines[$board->element . '_topay'] = $board->load_board($user, 'topay'); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | // Number of holidays to approve |
| 314 | - if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
| 314 | + if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
| 315 | 315 | $board = new Holiday($db); |
| 316 | 316 | $dashboardlines[$board->element] = $board->load_board($user); |
| 317 | 317 | } |
@@ -1477,7 +1477,7 @@ discard block |
||
| 1477 | 1477 | |
| 1478 | 1478 | $sql = "DELETE FROM " . MAIN_DB_PREFIX . "boxes_def"; |
| 1479 | 1479 | $sql .= " WHERE file = '" . $this->db->escape($file) . "'"; |
| 1480 | - $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
| 1480 | + $sql .= " AND entity = " . $conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
| 1481 | 1481 | |
| 1482 | 1482 | dol_syslog(get_class($this) . "::delete_boxes", LOG_DEBUG); |
| 1483 | 1483 | $resql = $this->db->query($sql); |
@@ -1895,7 +1895,7 @@ discard block |
||
| 1895 | 1895 | if ($obj !== null && !empty($obj->value) && !empty($this->rights)) { |
| 1896 | 1896 | // If the module is active |
| 1897 | 1897 | foreach ($this->rights as $key => $value) { |
| 1898 | - $r_id = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
| 1898 | + $r_id = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
| 1899 | 1899 | $r_desc = $this->rights[$key][1]; |
| 1900 | 1900 | $r_type = isset($this->rights[$key][2]) ? $this->rights[$key][2] : ''; |
| 1901 | 1901 | $r_def = empty($this->rights[$key][3]) ? 0 : $this->rights[$key][3]; |
@@ -2585,7 +2585,7 @@ discard block |
||
| 2585 | 2585 | { |
| 2586 | 2586 | require_once DOL_DOCUMENT_ROOT . '/core/lib/geturl.lib.php'; |
| 2587 | 2587 | if (!empty($this->url_last_version)) { |
| 2588 | - $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, [], ['http', 'https'], 0); // Accept http or https links on external remote server only |
|
| 2588 | + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, [], ['http', 'https'], 0); // Accept http or https links on external remote server only |
|
| 2589 | 2589 | if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { |
| 2590 | 2590 | // Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . - |
| 2591 | 2591 | $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); |
@@ -886,7 +886,7 @@ discard block |
||
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | |
| 889 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 889 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 890 | 890 | /** |
| 891 | 891 | * Mise a jour du lien entre le paiement et la ligne generee dans llx_bank |
| 892 | 892 | * |
@@ -895,7 +895,7 @@ discard block |
||
| 895 | 895 | */ |
| 896 | 896 | public function update_fk_bank($id_bank) |
| 897 | 897 | { |
| 898 | - // phpcs:enable |
|
| 898 | + // phpcs:enable |
|
| 899 | 899 | $sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' set fk_bank = ' . ((int) $id_bank); |
| 900 | 900 | $sql .= " WHERE rowid = " . ((int) $this->id); |
| 901 | 901 | |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | } |
| 911 | 911 | } |
| 912 | 912 | |
| 913 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 913 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 914 | 914 | /** |
| 915 | 915 | * Updates the payment date |
| 916 | 916 | * |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | */ |
| 920 | 920 | public function update_date($date) |
| 921 | 921 | { |
| 922 | - // phpcs:enable |
|
| 922 | + // phpcs:enable |
|
| 923 | 923 | $error = 0; |
| 924 | 924 | |
| 925 | 925 | if (!empty($date) && $this->statut != 1) { |
@@ -967,7 +967,7 @@ discard block |
||
| 967 | 967 | return -1; //no date given or already validated |
| 968 | 968 | } |
| 969 | 969 | |
| 970 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 970 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 971 | 971 | /** |
| 972 | 972 | * Updates the payment number |
| 973 | 973 | * |
@@ -976,7 +976,7 @@ discard block |
||
| 976 | 976 | */ |
| 977 | 977 | public function update_num($num_payment) |
| 978 | 978 | { |
| 979 | - // phpcs:enable |
|
| 979 | + // phpcs:enable |
|
| 980 | 980 | if (!empty($num_payment) && $this->statut != 1) { |
| 981 | 981 | $sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element; |
| 982 | 982 | $sql .= " SET num_paiement = '" . $this->db->escape($num_payment) . "'"; |
@@ -1373,7 +1373,7 @@ discard block |
||
| 1373 | 1373 | return $this->LibStatut($this->statut, $mode); |
| 1374 | 1374 | } |
| 1375 | 1375 | |
| 1376 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1376 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1377 | 1377 | /** |
| 1378 | 1378 | * Return the label of a given status |
| 1379 | 1379 | * |
@@ -1383,7 +1383,7 @@ discard block |
||
| 1383 | 1383 | */ |
| 1384 | 1384 | public function LibStatut($status, $mode = 0) |
| 1385 | 1385 | { |
| 1386 | - // phpcs:enable |
|
| 1386 | + // phpcs:enable |
|
| 1387 | 1387 | global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage |
| 1388 | 1388 | |
| 1389 | 1389 | $langs->load('compta'); |
@@ -1425,7 +1425,7 @@ discard block |
||
| 1425 | 1425 | return ''; |
| 1426 | 1426 | } |
| 1427 | 1427 | |
| 1428 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1428 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1429 | 1429 | /** |
| 1430 | 1430 | * Load the third party of object, from id into this->thirdparty. |
| 1431 | 1431 | * For payments, take the thirdparty linked to the first invoice found. This is enough because payments are done on invoices of the same thirdparty. |
@@ -1435,7 +1435,7 @@ discard block |
||
| 1435 | 1435 | */ |
| 1436 | 1436 | public function fetch_thirdparty($force_thirdparty_id = 0) |
| 1437 | 1437 | { |
| 1438 | - // phpcs:enable |
|
| 1438 | + // phpcs:enable |
|
| 1439 | 1439 | |
| 1440 | 1440 | if (empty($force_thirdparty_id)) { |
| 1441 | 1441 | $billsarray = $this->getBillsArray(); // From payment, the fk_soc isn't available, we should load the first supplier invoice to get him |
@@ -53,6 +53,6 @@ |
||
| 53 | 53 | if ($controller === null) { |
| 54 | 54 | return false; |
| 55 | 55 | } |
| 56 | - return $controller->index();; |
|
| 56 | + return $controller->index(); ; |
|
| 57 | 57 | } |
| 58 | 58 | } |