@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } |
154 | 154 | $result = restrictedArea($user, 'expensereport', $object->id, 'expensereport'); |
155 | 155 | |
156 | -$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php |
|
156 | +$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php |
|
157 | 157 | |
158 | 158 | |
159 | 159 | /* |
@@ -2384,7 +2384,7 @@ discard block |
||
2384 | 2384 | |
2385 | 2385 | // Quantity |
2386 | 2386 | print '<td class="right">'; |
2387 | - print '<input type="text" min="0" class="input_qty right maxwidth50" name="qty" value="' . dol_escape_htmltag($line->qty) . '" />'; // We must be able to enter decimal qty |
|
2387 | + print '<input type="text" min="0" class="input_qty right maxwidth50" name="qty" value="' . dol_escape_htmltag($line->qty) . '" />'; // We must be able to enter decimal qty |
|
2388 | 2388 | print '</td>'; |
2389 | 2389 | |
2390 | 2390 | //print '<td class="right">'.$langs->trans('AmountHT').'</td>'; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $search_date_endday = GETPOSTINT('search_date_endday'); |
68 | 68 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
69 | 69 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
70 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
70 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
71 | 71 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
72 | 72 | $search_user = GETPOST('search_user', 'alpha'); |
73 | 73 | $search_payment_type = GETPOST('search_payment_type'); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | 'pndf.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70), |
115 | 115 | ); |
116 | 116 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
117 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
117 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
118 | 118 | |
119 | 119 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
120 | 120 | $hookmanager->initHooks(array('paymentexpensereportlist')); |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
423 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
423 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
424 | 424 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
425 | 425 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
426 | 426 |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $search_date_startendday = GETPOSTINT('search_date_startendday'); |
118 | 118 | $search_date_startendmonth = GETPOSTINT('search_date_startendmonth'); |
119 | 119 | $search_date_startendyear = GETPOSTINT('search_date_startendyear'); |
120 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
120 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
121 | 121 | $search_date_startend = dol_mktime(23, 59, 59, $search_date_startendmonth, $search_date_startendday, $search_date_startendyear); |
122 | 122 | |
123 | 123 | $search_date_endday = GETPOSTINT('search_date_endday'); |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | $search_date_endendday = GETPOSTINT('search_date_endendday'); |
127 | 127 | $search_date_endendmonth = GETPOSTINT('search_date_endendmonth'); |
128 | 128 | $search_date_endendyear = GETPOSTINT('search_date_endendyear'); |
129 | -$search_date_end = dol_mktime(0, 0, 0, $search_date_endmonth, $search_date_endday, $search_date_endyear); // Use tzserver |
|
129 | +$search_date_end = dol_mktime(0, 0, 0, $search_date_endmonth, $search_date_endday, $search_date_endyear); // Use tzserver |
|
130 | 130 | $search_date_endend = dol_mktime(23, 59, 59, $search_date_endendmonth, $search_date_endendday, $search_date_endendyear); |
131 | 131 | |
132 | -$optioncss = GETPOST('optioncss', 'alpha'); |
|
132 | +$optioncss = GETPOST('optioncss', 'alpha'); |
|
133 | 133 | |
134 | 134 | if ($search_status == '') { |
135 | 135 | $search_status = -1; |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | } |
589 | 589 | |
590 | 590 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
591 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
591 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
592 | 592 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
593 | 593 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
594 | 594 |
@@ -96,7 +96,7 @@ |
||
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
99 | -$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php |
|
99 | +$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php |
|
100 | 100 | |
101 | 101 | |
102 | 102 | /* |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | |
718 | 718 | |
719 | 719 | |
720 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
720 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
721 | 721 | /** |
722 | 722 | * Clean sensible object datas |
723 | 723 | * |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | */ |
727 | 727 | protected function _cleanObjectDatas($object) |
728 | 728 | { |
729 | - // phpcs:enable |
|
729 | + // phpcs:enable |
|
730 | 730 | $object = parent::_cleanObjectDatas($object); |
731 | 731 | |
732 | 732 | unset($object->fk_statut); |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | } |
768 | 768 | } |
769 | 769 | |
770 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
770 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
771 | 771 | /** |
772 | 772 | * Classify the expense report as paid |
773 | 773 | * |
@@ -780,7 +780,7 @@ discard block |
||
780 | 780 | */ |
781 | 781 | public function set_paid($id, $fuser, $notrigger = 0) |
782 | 782 | { |
783 | - // phpcs:enable |
|
783 | + // phpcs:enable |
|
784 | 784 | dol_syslog(get_class($this) . "::set_paid is deprecated, use setPaid instead", LOG_NOTICE); |
785 | 785 | return $this->setPaid($id, $fuser, $notrigger); |
786 | 786 | } |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | return $this->LibStatut($this->status, $mode); |
847 | 847 | } |
848 | 848 | |
849 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
849 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
850 | 850 | /** |
851 | 851 | * Returns the label of a status |
852 | 852 | * |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | */ |
857 | 857 | public function LibStatut($status, $mode = 0) |
858 | 858 | { |
859 | - // phpcs:enable |
|
859 | + // phpcs:enable |
|
860 | 860 | global $langs; |
861 | 861 | |
862 | 862 | $labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]); |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | return 1; |
987 | 987 | } |
988 | 988 | |
989 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
989 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
990 | 990 | /** |
991 | 991 | * fetch_line_by_project |
992 | 992 | * |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | */ |
997 | 997 | public function fetch_line_by_project($projectid, $user) |
998 | 998 | { |
999 | - // phpcs:enable |
|
999 | + // phpcs:enable |
|
1000 | 1000 | global $langs; |
1001 | 1001 | |
1002 | 1002 | $langs->load('trips'); |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | return 0; |
1089 | 1089 | } |
1090 | 1090 | |
1091 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1091 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1092 | 1092 | /** |
1093 | 1093 | * fetch_lines |
1094 | 1094 | * |
@@ -1096,7 +1096,7 @@ discard block |
||
1096 | 1096 | */ |
1097 | 1097 | public function fetch_lines() |
1098 | 1098 | { |
1099 | - // phpcs:enable |
|
1099 | + // phpcs:enable |
|
1100 | 1100 | $this->lines = array(); |
1101 | 1101 | |
1102 | 1102 | $sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date, de.rang,'; |
@@ -1426,7 +1426,7 @@ discard block |
||
1426 | 1426 | } |
1427 | 1427 | } |
1428 | 1428 | |
1429 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1429 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1430 | 1430 | /** |
1431 | 1431 | * set_save_from_refuse |
1432 | 1432 | * |
@@ -1435,7 +1435,7 @@ discard block |
||
1435 | 1435 | */ |
1436 | 1436 | public function set_save_from_refuse($fuser) |
1437 | 1437 | { |
1438 | - // phpcs:enable |
|
1438 | + // phpcs:enable |
|
1439 | 1439 | // Sélection de la date de début de la NDF |
1440 | 1440 | $sql = 'SELECT date_debut'; |
1441 | 1441 | $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element; |
@@ -1577,7 +1577,7 @@ discard block |
||
1577 | 1577 | return 0; |
1578 | 1578 | } |
1579 | 1579 | |
1580 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1580 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1581 | 1581 | /** |
1582 | 1582 | * set_unpaid |
1583 | 1583 | * |
@@ -1589,7 +1589,7 @@ discard block |
||
1589 | 1589 | */ |
1590 | 1590 | public function set_unpaid($fuser, $notrigger = 0) |
1591 | 1591 | { |
1592 | - // phpcs:enable |
|
1592 | + // phpcs:enable |
|
1593 | 1593 | dol_syslog(get_class($this) . "::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE); |
1594 | 1594 | return $this->setUnpaid($fuser, $notrigger); |
1595 | 1595 | } |
@@ -1645,7 +1645,7 @@ discard block |
||
1645 | 1645 | return 0; |
1646 | 1646 | } |
1647 | 1647 | |
1648 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1648 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1649 | 1649 | /** |
1650 | 1650 | * set_cancel |
1651 | 1651 | * |
@@ -1656,7 +1656,7 @@ discard block |
||
1656 | 1656 | */ |
1657 | 1657 | public function set_cancel($fuser, $detail, $notrigger = 0) |
1658 | 1658 | { |
1659 | - // phpcs:enable |
|
1659 | + // phpcs:enable |
|
1660 | 1660 | $error = 0; |
1661 | 1661 | $this->date_cancel = $this->db->idate(dol_now()); |
1662 | 1662 | if ($this->status != self::STATUS_CANCELED) { |
@@ -1879,7 +1879,7 @@ discard block |
||
1879 | 1879 | return $result; |
1880 | 1880 | } |
1881 | 1881 | |
1882 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1882 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1883 | 1883 | /** |
1884 | 1884 | * Update total of an expense report when you add a line. |
1885 | 1885 | * |
@@ -1889,7 +1889,7 @@ discard block |
||
1889 | 1889 | */ |
1890 | 1890 | public function update_totaux_add($ligne_total_ht, $ligne_total_tva) |
1891 | 1891 | { |
1892 | - // phpcs:enable |
|
1892 | + // phpcs:enable |
|
1893 | 1893 | $this->total_ht += (float) $ligne_total_ht; |
1894 | 1894 | $this->total_tva += (float) $ligne_total_tva; |
1895 | 1895 | $this->total_ttc += $this->total_tva; |
@@ -2375,7 +2375,7 @@ discard block |
||
2375 | 2375 | return 1; |
2376 | 2376 | } |
2377 | 2377 | |
2378 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2378 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2379 | 2379 | /** |
2380 | 2380 | * periode_existe |
2381 | 2381 | * |
@@ -2388,7 +2388,7 @@ discard block |
||
2388 | 2388 | { |
2389 | 2389 | global $conf; |
2390 | 2390 | |
2391 | - // phpcs:enable |
|
2391 | + // phpcs:enable |
|
2392 | 2392 | $sql = "SELECT rowid, date_debut, date_fin"; |
2393 | 2393 | $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; |
2394 | 2394 | $sql .= " WHERE entity = " . ((int) $conf->entity); // not shared, only for the current entity |
@@ -2429,7 +2429,7 @@ discard block |
||
2429 | 2429 | } |
2430 | 2430 | |
2431 | 2431 | |
2432 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2432 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2433 | 2433 | /** |
2434 | 2434 | * Return list of people with permission to validate expense reports. |
2435 | 2435 | * Search for permission "approve expense report" |
@@ -2438,7 +2438,7 @@ discard block |
||
2438 | 2438 | */ |
2439 | 2439 | public function fetch_users_approver_expensereport() |
2440 | 2440 | { |
2441 | - // phpcs:enable |
|
2441 | + // phpcs:enable |
|
2442 | 2442 | $users_validator = array(); |
2443 | 2443 | |
2444 | 2444 | $sql = "SELECT DISTINCT ur.fk_user"; |
@@ -2564,7 +2564,7 @@ discard block |
||
2564 | 2564 | } |
2565 | 2565 | } |
2566 | 2566 | |
2567 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2567 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2568 | 2568 | /** |
2569 | 2569 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
2570 | 2570 | * |
@@ -2574,7 +2574,7 @@ discard block |
||
2574 | 2574 | */ |
2575 | 2575 | public function load_board($user, $option = 'topay') |
2576 | 2576 | { |
2577 | - // phpcs:enable |
|
2577 | + // phpcs:enable |
|
2578 | 2578 | global $conf, $langs; |
2579 | 2579 | |
2580 | 2580 | if ($user->socid) { |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public $fk_user_approve; |
249 | 249 | |
250 | - public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject) |
|
251 | - public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject) |
|
250 | + public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject) |
|
251 | + public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject) |
|
252 | 252 | |
253 | 253 | /** |
254 | 254 | * Draft status |
@@ -339,8 +339,8 @@ discard block |
||
339 | 339 | $this->total_tva = 0; |
340 | 340 | $this->total_localtax1 = 0; |
341 | 341 | $this->total_localtax2 = 0; |
342 | - $this->localtax1 = 0; // For backward compatibility |
|
343 | - $this->localtax2 = 0; // For backward compatibility |
|
342 | + $this->localtax1 = 0; // For backward compatibility |
|
343 | + $this->localtax2 = 0; // For backward compatibility |
|
344 | 344 | $this->modepaymentid = 0; |
345 | 345 | |
346 | 346 | // List of language codes for status |
@@ -697,8 +697,8 @@ discard block |
||
697 | 697 | $this->total_ht = $obj->total_ht; |
698 | 698 | $this->total_tva = $obj->total_tva; |
699 | 699 | $this->total_ttc = $obj->total_ttc; |
700 | - $this->localtax1 = $obj->total_localtax1; // For backward compatibility |
|
701 | - $this->localtax2 = $obj->total_localtax2; // For backward compatibility |
|
700 | + $this->localtax1 = $obj->total_localtax1; // For backward compatibility |
|
701 | + $this->localtax2 = $obj->total_localtax2; // For backward compatibility |
|
702 | 702 | $this->total_localtax1 = $obj->total_localtax1; |
703 | 703 | $this->total_localtax2 = $obj->total_localtax2; |
704 | 704 | |
@@ -1165,7 +1165,7 @@ discard block |
||
1165 | 1165 | |
1166 | 1166 | $deplig->rule_warning_message = $objp->rule_warning_message; |
1167 | 1167 | |
1168 | - $deplig->rang = $objp->rang; |
|
1168 | + $deplig->rang = $objp->rang; |
|
1169 | 1169 | |
1170 | 1170 | $this->lines[$i] = $deplig; |
1171 | 1171 | |
@@ -1961,8 +1961,8 @@ discard block |
||
1961 | 1961 | $this->line = new ExpenseReportLine($this->db); |
1962 | 1962 | |
1963 | 1963 | // We don't know seller and buyer for expense reports |
1964 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
1965 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
1964 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
1965 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
1966 | 1966 | $buyer = new Societe($this->db); |
1967 | 1967 | |
1968 | 1968 | $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller); |
@@ -2044,8 +2044,8 @@ discard block |
||
2044 | 2044 | |
2045 | 2045 | // We don't know seller and buyer for expense reports |
2046 | 2046 | if (!is_object($seller)) { |
2047 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2048 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
2047 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2048 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
2049 | 2049 | } |
2050 | 2050 | |
2051 | 2051 | $expensereportrule = new ExpenseReportRule($db); |
@@ -2129,8 +2129,8 @@ discard block |
||
2129 | 2129 | |
2130 | 2130 | // We don't know seller and buyer for expense reports |
2131 | 2131 | if (!is_object($seller)) { |
2132 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2133 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
2132 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2133 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
2134 | 2134 | } |
2135 | 2135 | |
2136 | 2136 | $expenseik = new ExpenseReportIk($this->db); |
@@ -2224,10 +2224,10 @@ discard block |
||
2224 | 2224 | $type = 0; // TODO What if type is service ? |
2225 | 2225 | |
2226 | 2226 | // We don't know seller and buyer for expense reports |
2227 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2228 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
2229 | - $seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2230 | - $seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2227 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2228 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
2229 | + $seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2230 | + $seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2231 | 2231 | $buyer = new Societe($this->db); |
2232 | 2232 | |
2233 | 2233 | $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller); |
@@ -3165,7 +3165,7 @@ discard block |
||
3165 | 3165 | } elseif ($mode == 'mon' || $mode == 'EX_MON') { |
3166 | 3166 | $sql .= " AND DATE_FORMAT(d.date, '%Y-%m') = '" . dol_print_date($this->date, '%Y-%m') . "'"; // @todo DATE_FORMAT is forbidden |
3167 | 3167 | } elseif ($mode == 'year' || $mode == 'EX_YEA') { |
3168 | - $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'"; // @todo DATE_FORMAT is forbidden |
|
3168 | + $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'"; // @todo DATE_FORMAT is forbidden |
|
3169 | 3169 | } |
3170 | 3170 | |
3171 | 3171 | dol_syslog('ExpenseReportLine::getExpAmount'); |
@@ -199,7 +199,7 @@ |
||
199 | 199 | $default_range = (int) $userauthor->default_range; // if not defined, then 0 |
200 | 200 | $ranges = $this->getRangesByCategory($fk_c_exp_tax_cat); |
201 | 201 | // prevent out of range -1 indice |
202 | - $indice = $default_range - 1; |
|
202 | + $indice = $default_range - 1; |
|
203 | 203 | // subtract 1 because array start from 0 |
204 | 204 | if (empty($ranges) || $indice < 0 || !isset($ranges[$indice])) { |
205 | 205 | return false; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | } |
299 | 299 | |
300 | - // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
300 | + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
301 | 301 | /** |
302 | 302 | * Update database |
303 | 303 | * |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public function update($user = null, $notrigger = 0) |
309 | 309 | { |
310 | - // phpcs:enable |
|
310 | + // phpcs:enable |
|
311 | 311 | $error = 0; |
312 | 312 | |
313 | 313 | // Clean parameters |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | } |
377 | 377 | |
378 | - // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
378 | + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
379 | 379 | /** |
380 | 380 | * Delete object in database |
381 | 381 | * |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | */ |
386 | 386 | public function delete($user, $notrigger = 0) |
387 | 387 | { |
388 | - // phpcs:enable |
|
388 | + // phpcs:enable |
|
389 | 389 | $error = 0; |
390 | 390 | |
391 | 391 | $this->db->begin(); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | return ''; |
488 | 488 | } |
489 | 489 | |
490 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
490 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
491 | 491 | /** |
492 | 492 | * Return the label of a given status |
493 | 493 | * |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | */ |
498 | 498 | public function LibStatut($status, $mode = 0) |
499 | 499 | { |
500 | - // phpcs:enable |
|
500 | + // phpcs:enable |
|
501 | 501 | //global $langs; |
502 | 502 | |
503 | 503 | return ''; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | } |
636 | 636 | |
637 | 637 | |
638 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
638 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
639 | 639 | /** |
640 | 640 | * Update link between the expense report payment and the generated line in llx_bank |
641 | 641 | * |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | */ |
645 | 645 | public function update_fk_bank($id_bank) |
646 | 646 | { |
647 | - // phpcs:enable |
|
647 | + // phpcs:enable |
|
648 | 648 | $sql = "UPDATE " . MAIN_DB_PREFIX . "payment_expensereport SET fk_bank = " . ((int) $id_bank) . " WHERE rowid = " . ((int) $this->id); |
649 | 649 | |
650 | 650 | dol_syslog(get_class($this) . "::update_fk_bank", LOG_DEBUG); |
@@ -211,7 +211,7 @@ |
||
211 | 211 | $sql .= " '" . $this->db->idate($this->datep) . "',"; |
212 | 212 | $sql .= " " . price2num($totalamount) . ","; |
213 | 213 | $sql .= " " . ((int) $this->fk_typepayment) . ", '" . $this->db->escape($this->num_payment) . "', '" . $this->db->escape($this->note_public) . "', " . ((int) $user->id) . ","; |
214 | - $sql .= " 0)"; // fk_bank is ID of transaction into ll_bank |
|
214 | + $sql .= " 0)"; // fk_bank is ID of transaction into ll_bank |
|
215 | 215 | |
216 | 216 | dol_syslog(get_class($this) . "::create", LOG_DEBUG); |
217 | 217 | $resql = $this->db->query($sql); |
@@ -141,7 +141,7 @@ |
||
141 | 141 | $dataseries = dol_sort_array($dataseries, 1, 'desc'); |
142 | 142 | |
143 | 143 | // Merge all entries after the $KEEPNFIRST one into one entry called "Other..." (to avoid to have too much entries in graphic). |
144 | -$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain |
|
144 | +$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain |
|
145 | 145 | $i = 0; |
146 | 146 | if (count($dataseries) > ($KEEPNFIRST + 1)) { |
147 | 147 | foreach ($dataseries as $key => $val) { |