@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
120 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
121 | 121 | /** |
122 | 122 | * Output edit area inside the HTML stream. |
123 | 123 | * Output depends on this->tool (fckeditor, ckeditor, textarea, ...) |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '', $moreparam = '', $morecss = '') |
135 | 135 | { |
136 | - // phpcs:enable |
|
136 | + // phpcs:enable |
|
137 | 137 | global $conf, $langs; |
138 | 138 | |
139 | 139 | $fullpage = false; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $posy = 0; |
108 | 108 | $lines = explode("\n", $content); |
109 | 109 | $nblines = count($lines); |
110 | - for ($i = 0 ; $i < $nblines ; $i++) { |
|
110 | + for ($i = 0; $i < $nblines; $i++) { |
|
111 | 111 | if (preg_match('/' . $poscursor['find'] . '/', $lines[$i])) { |
112 | 112 | $posy = $i; |
113 | 113 | break; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | define('REQUIRE_CKEDITOR', '1'); |
177 | 177 | } |
178 | 178 | |
179 | - $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
179 | + $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
180 | 180 | |
181 | 181 | $pluginstodisable = 'elementspath,save,flash,div,anchor'; |
182 | 182 | if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | filebrowserImageWindowWidth : \'900\', |
278 | 278 | filebrowserImageWindowHeight : \'500\''; |
279 | 279 | } |
280 | - $out .= ' })' . $morejs; // end CKEditor.replace |
|
280 | + $out .= ' })' . $morejs; // end CKEditor.replace |
|
281 | 281 | // Show the CKEditor javascript object once loaded is ready 'For debug) |
282 | 282 | //$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); '; |
283 | 283 | $out .= '});' . "\n"; // end document.ready |
@@ -113,7 +113,9 @@ |
||
113 | 113 | break; |
114 | 114 | } |
115 | 115 | } |
116 | - if ($posy != 0) $poscursor['y'] = $posy; |
|
116 | + if ($posy != 0) { |
|
117 | + $poscursor['y'] = $posy; |
|
118 | + } |
|
117 | 119 | } |
118 | 120 | |
119 | 121 | // Define some properties |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $this->db = $db; |
72 | 72 | } |
73 | 73 | |
74 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
74 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
75 | 75 | /** |
76 | 76 | * Return list of journals with label by nature |
77 | 77 | * |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function select_journal($selectid, $htmlname = 'journal', $nature = 0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss = 'maxwidth300 maxwidthonsmartphone', $usecache = '', $disabledajaxcombo = 0) |
90 | 90 | { |
91 | - // phpcs:enable |
|
91 | + // phpcs:enable |
|
92 | 92 | global $conf, $langs; |
93 | 93 | |
94 | 94 | $out = ''; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | return $out; |
152 | 152 | } |
153 | 153 | |
154 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
154 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
155 | 155 | /** |
156 | 156 | * Return list of journals with label by nature |
157 | 157 | * |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function multi_select_journal($selectedIds = array(), $htmlname = 'journal', $nature = 0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss = '', $usecache = '', $disabledajaxcombo = 0) |
170 | 170 | { |
171 | - // phpcs:enable |
|
171 | + // phpcs:enable |
|
172 | 172 | global $conf, $langs; |
173 | 173 | |
174 | 174 | $out = ''; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | return $out; |
231 | 231 | } |
232 | 232 | |
233 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
233 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
234 | 234 | /** |
235 | 235 | * Return list of accounting category. |
236 | 236 | * Use mysoc->country_id or mysoc->country_code so they must be defined. |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | public function select_accounting_category($selected = 0, $htmlname = 'account_category', $useempty = 0, $maxlen = 0, $help = 1, $allcountries = 0) |
247 | 247 | { |
248 | - // phpcs:enable |
|
248 | + // phpcs:enable |
|
249 | 249 | global $langs, $mysoc; |
250 | 250 | |
251 | 251 | if (empty($mysoc->country_id) && empty($mysoc->country_code) && empty($allcountries)) { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | return $out; |
323 | 323 | } |
324 | 324 | |
325 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
325 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
326 | 326 | /** |
327 | 327 | * Return select filter with date of transaction |
328 | 328 | * |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | */ |
333 | 333 | public function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') |
334 | 334 | { |
335 | - // phpcs:enable |
|
335 | + // phpcs:enable |
|
336 | 336 | $options = array(); |
337 | 337 | |
338 | 338 | $sql = "SELECT DISTINCT import_key FROM " . $this->db->prefix() . "accounting_bookkeeping"; |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | return Form::selectarray($htmlname, $options, $selectedkey); |
356 | 356 | } |
357 | 357 | |
358 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
358 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
359 | 359 | /** |
360 | 360 | * Return list of accounts with label by chart of accounts |
361 | 361 | * |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | */ |
373 | 373 | public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss = 'minwidth100 maxwidth300 maxwidthonsmartphone', $usecache = '', $active = '1') |
374 | 374 | { |
375 | - // phpcs:enable |
|
375 | + // phpcs:enable |
|
376 | 376 | global $conf, $langs; |
377 | 377 | |
378 | 378 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/accounting.lib.php'; |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | return $out; |
467 | 467 | } |
468 | 468 | |
469 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
469 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
470 | 470 | /** |
471 | 471 | * Return list of auxiliary accounts. Cumulate list from customers, suppliers and users. |
472 | 472 | * |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | */ |
481 | 481 | public function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'minwidth100 maxwidth300 maxwidthonsmartphone', $usecache = '', $labelhtmlname = '') |
482 | 482 | { |
483 | - // phpcs:enable |
|
483 | + // phpcs:enable |
|
484 | 484 | global $conf; |
485 | 485 | |
486 | 486 | $aux_account = array(); |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | return $out; |
562 | 562 | } |
563 | 563 | |
564 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
564 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
565 | 565 | /** |
566 | 566 | * Return HTML combo list of years existing into book keepping |
567 | 567 | * |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | */ |
574 | 574 | public function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html') |
575 | 575 | { |
576 | - // phpcs:enable |
|
576 | + // phpcs:enable |
|
577 | 577 | global $conf; |
578 | 578 | |
579 | 579 | $out_array = array(); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public $location_incoterms; |
48 | 48 | |
49 | 49 | |
50 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
50 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
51 | 51 | /** |
52 | 52 | * Return incoterms information |
53 | 53 | * TODO Use a cache for label get |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function display_incoterms() |
58 | 58 | { |
59 | - // phpcs:enable |
|
59 | + // phpcs:enable |
|
60 | 60 | $out = ''; |
61 | 61 | |
62 | 62 | $this->label_incoterms = ''; |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | return $this->$newProperty; |
59 | 59 | } |
60 | 60 | if ($this->isDynamicPropertiesEnabled()) { |
61 | - return null; // If the property is set, then __get is not called. |
|
61 | + return null; // If the property is set, then __get is not called. |
|
62 | 62 | } |
63 | 63 | $msg = "DolDeprecationHandler: Undefined property '" . $name . "'" . self::getCallerInfoString(); |
64 | 64 | dol_syslog($msg); |
65 | 65 | trigger_error($msg, E_USER_NOTICE); |
66 | - return $this->$name; // Returning value anyway (graceful degradation) |
|
66 | + return $this->$name; // Returning value anyway (graceful degradation) |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if (!$this->isDynamicPropertiesEnabled()) { |
94 | 94 | $msg = "DolDeprecationHandler: Undefined property '" . $name . "'" . self::getCallerInfoString(); |
95 | 95 | trigger_error($msg, E_USER_NOTICE); |
96 | - $this->$name = $value; // Setting anyway for graceful degradation |
|
96 | + $this->$name = $value; // Setting anyway for graceful degradation |
|
97 | 97 | } else { |
98 | 98 | $this->$name = $value; |
99 | 99 | } |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | } |
608 | 608 | } |
609 | 609 | |
610 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
610 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
611 | 611 | /** |
612 | 612 | * Set draft status |
613 | 613 | * |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | */ |
618 | 618 | public function setDraft($user, $idwarehouse = -1) |
619 | 619 | { |
620 | - //phpcs:enable |
|
620 | + //phpcs:enable |
|
621 | 621 | global $conf, $langs; |
622 | 622 | |
623 | 623 | $error = 0; |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | } |
698 | 698 | |
699 | 699 | |
700 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
700 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
701 | 701 | /** |
702 | 702 | * Tag the order as validated (opened) |
703 | 703 | * Function used when order is reopend after being closed. |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | */ |
708 | 708 | public function set_reopen($user) |
709 | 709 | { |
710 | - // phpcs:enable |
|
710 | + // phpcs:enable |
|
711 | 711 | $error = 0; |
712 | 712 | |
713 | 713 | if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) { |
@@ -1737,7 +1737,7 @@ discard block |
||
1737 | 1737 | } |
1738 | 1738 | |
1739 | 1739 | |
1740 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1740 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1741 | 1741 | /** |
1742 | 1742 | * Add line into array |
1743 | 1743 | * $this->client must be loaded |
@@ -1753,7 +1753,7 @@ discard block |
||
1753 | 1753 | */ |
1754 | 1754 | public function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '') |
1755 | 1755 | { |
1756 | - // phpcs:enable |
|
1756 | + // phpcs:enable |
|
1757 | 1757 | global $conf, $mysoc; |
1758 | 1758 | |
1759 | 1759 | if (!$qty) { |
@@ -1989,7 +1989,7 @@ discard block |
||
1989 | 1989 | } |
1990 | 1990 | |
1991 | 1991 | |
1992 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1992 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1993 | 1993 | /** |
1994 | 1994 | * Add line of fixed discount in the order in DB |
1995 | 1995 | * |
@@ -1998,7 +1998,7 @@ discard block |
||
1998 | 1998 | */ |
1999 | 1999 | public function insert_discount($idremise) |
2000 | 2000 | { |
2001 | - // phpcs:enable |
|
2001 | + // phpcs:enable |
|
2002 | 2002 | global $langs; |
2003 | 2003 | |
2004 | 2004 | include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; |
@@ -2058,7 +2058,7 @@ discard block |
||
2058 | 2058 | } |
2059 | 2059 | |
2060 | 2060 | |
2061 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2061 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2062 | 2062 | /** |
2063 | 2063 | * Load array lines |
2064 | 2064 | * |
@@ -2068,7 +2068,7 @@ discard block |
||
2068 | 2068 | */ |
2069 | 2069 | public function fetch_lines($only_product = 0, $loadalsotranslation = 0) |
2070 | 2070 | { |
2071 | - // phpcs:enable |
|
2071 | + // phpcs:enable |
|
2072 | 2072 | global $langs, $conf; |
2073 | 2073 | |
2074 | 2074 | $this->lines = array(); |
@@ -2335,7 +2335,7 @@ discard block |
||
2335 | 2335 | return 0; |
2336 | 2336 | } |
2337 | 2337 | |
2338 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2338 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2339 | 2339 | /** |
2340 | 2340 | * Return a array with the pending stock by product |
2341 | 2341 | * |
@@ -2426,7 +2426,7 @@ discard block |
||
2426 | 2426 | } |
2427 | 2427 | } |
2428 | 2428 | |
2429 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2429 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2430 | 2430 | /** |
2431 | 2431 | * Applique une remise relative |
2432 | 2432 | * |
@@ -2439,7 +2439,7 @@ discard block |
||
2439 | 2439 | */ |
2440 | 2440 | public function set_remise($user, $remise, $notrigger = 0) |
2441 | 2441 | { |
2442 | - // phpcs:enable |
|
2442 | + // phpcs:enable |
|
2443 | 2443 | dol_syslog(get_class($this) . "::set_remise is deprecated, use setDiscount instead", LOG_NOTICE); |
2444 | 2444 | // @phan-suppress-next-line PhanDeprecatedFunction |
2445 | 2445 | return $this->setDiscount($user, $remise, $notrigger); |
@@ -2507,7 +2507,7 @@ discard block |
||
2507 | 2507 | } |
2508 | 2508 | |
2509 | 2509 | |
2510 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2510 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2511 | 2511 | /** |
2512 | 2512 | * Set a fixed amount discount |
2513 | 2513 | * |
@@ -2574,7 +2574,7 @@ discard block |
||
2574 | 2574 | } |
2575 | 2575 | */ |
2576 | 2576 | |
2577 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2577 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2578 | 2578 | /** |
2579 | 2579 | * Set the order date |
2580 | 2580 | * |
@@ -2585,7 +2585,7 @@ discard block |
||
2585 | 2585 | */ |
2586 | 2586 | public function set_date($user, $date, $notrigger = 0) |
2587 | 2587 | { |
2588 | - // phpcs:enable |
|
2588 | + // phpcs:enable |
|
2589 | 2589 | if ($user->hasRight('commande', 'creer')) { |
2590 | 2590 | $error = 0; |
2591 | 2591 | |
@@ -2632,7 +2632,7 @@ discard block |
||
2632 | 2632 | } |
2633 | 2633 | } |
2634 | 2634 | |
2635 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2635 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2636 | 2636 | /** |
2637 | 2637 | * Set delivery date |
2638 | 2638 | * |
@@ -2644,7 +2644,7 @@ discard block |
||
2644 | 2644 | */ |
2645 | 2645 | public function set_date_livraison($user, $delivery_date, $notrigger = 0) |
2646 | 2646 | { |
2647 | - // phpcs:enable |
|
2647 | + // phpcs:enable |
|
2648 | 2648 | return $this->setDeliveryDate($user, $delivery_date, $notrigger); |
2649 | 2649 | } |
2650 | 2650 | |
@@ -2704,7 +2704,7 @@ discard block |
||
2704 | 2704 | } |
2705 | 2705 | } |
2706 | 2706 | |
2707 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2707 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2708 | 2708 | /** |
2709 | 2709 | * Return list of orders (eventuelly filtered on a user) into an array |
2710 | 2710 | * |
@@ -2720,7 +2720,7 @@ discard block |
||
2720 | 2720 | */ |
2721 | 2721 | public function liste_array($shortlist = 0, $draft = 0, $excluser = null, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC') |
2722 | 2722 | { |
2723 | - // phpcs:enable |
|
2723 | + // phpcs:enable |
|
2724 | 2724 | global $user; |
2725 | 2725 | |
2726 | 2726 | $ga = array(); |
@@ -2840,7 +2840,7 @@ discard block |
||
2840 | 2840 | } |
2841 | 2841 | } |
2842 | 2842 | |
2843 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2843 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2844 | 2844 | /** |
2845 | 2845 | * Update order demand_reason |
2846 | 2846 | * |
@@ -2850,7 +2850,7 @@ discard block |
||
2850 | 2850 | */ |
2851 | 2851 | public function demand_reason($demand_reason_id, $notrigger = 0) |
2852 | 2852 | { |
2853 | - // phpcs:enable |
|
2853 | + // phpcs:enable |
|
2854 | 2854 | global $user; |
2855 | 2855 | |
2856 | 2856 | dol_syslog('Commande::demand_reason(' . $demand_reason_id . ')'); |
@@ -2904,7 +2904,7 @@ discard block |
||
2904 | 2904 | } |
2905 | 2905 | } |
2906 | 2906 | |
2907 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2907 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2908 | 2908 | /** |
2909 | 2909 | * Set customer ref |
2910 | 2910 | * |
@@ -2915,7 +2915,7 @@ discard block |
||
2915 | 2915 | */ |
2916 | 2916 | public function set_ref_client($user, $ref_client, $notrigger = 0) |
2917 | 2917 | { |
2918 | - // phpcs:enable |
|
2918 | + // phpcs:enable |
|
2919 | 2919 | if ($user->hasRight('commande', 'creer')) { |
2920 | 2920 | $error = 0; |
2921 | 2921 | |
@@ -3546,7 +3546,7 @@ discard block |
||
3546 | 3546 | } |
3547 | 3547 | |
3548 | 3548 | |
3549 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3549 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3550 | 3550 | /** |
3551 | 3551 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
3552 | 3552 | * |
@@ -3556,7 +3556,7 @@ discard block |
||
3556 | 3556 | */ |
3557 | 3557 | public function load_board($user, $mode) |
3558 | 3558 | { |
3559 | - // phpcs:enable |
|
3559 | + // phpcs:enable |
|
3560 | 3560 | global $conf, $langs; |
3561 | 3561 | |
3562 | 3562 | $clause = " WHERE"; |
@@ -3665,7 +3665,7 @@ discard block |
||
3665 | 3665 | return $this->LibStatut($this->statut, $this->billed, $mode); |
3666 | 3666 | } |
3667 | 3667 | |
3668 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3668 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3669 | 3669 | /** |
3670 | 3670 | * Return label of status |
3671 | 3671 | * |
@@ -3677,7 +3677,7 @@ discard block |
||
3677 | 3677 | */ |
3678 | 3678 | public function LibStatut($status, $billed, $mode, $donotshowbilled = 0) |
3679 | 3679 | { |
3680 | - // phpcs:enable |
|
3680 | + // phpcs:enable |
|
3681 | 3681 | global $langs, $hookmanager; |
3682 | 3682 | |
3683 | 3683 | $billedtext = ''; |
@@ -374,8 +374,8 @@ discard block |
||
374 | 374 | /** |
375 | 375 | * Shipment on process |
376 | 376 | */ |
377 | - const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated |
|
378 | - const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead. |
|
377 | + const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated |
|
378 | + const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead. |
|
379 | 379 | |
380 | 380 | /** |
381 | 381 | * Closed (Sent, billed or not) |
@@ -1951,7 +1951,7 @@ discard block |
||
1951 | 1951 | //Incoterms |
1952 | 1952 | $this->fk_incoterms = $obj->fk_incoterms; |
1953 | 1953 | $this->location_incoterms = $obj->location_incoterms; |
1954 | - $this->label_incoterms = $obj->label_incoterms; |
|
1954 | + $this->label_incoterms = $obj->label_incoterms; |
|
1955 | 1955 | |
1956 | 1956 | // Multicurrency |
1957 | 1957 | $this->fk_multicurrency = $obj->fk_multicurrency; |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | } |
625 | 625 | } |
626 | 626 | |
627 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
627 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
628 | 628 | /** |
629 | 629 | * Update DB line fields total_xxx |
630 | 630 | * Used by migration |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | */ |
634 | 634 | public function update_total() |
635 | 635 | { |
636 | - // phpcs:enable |
|
636 | + // phpcs:enable |
|
637 | 637 | $this->db->begin(); |
638 | 638 | |
639 | 639 | // Clean parameters |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | if ($search_sale == -2) { |
202 | 202 | $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)"; |
203 | 203 | } elseif ($search_sale > 0) { |
204 | - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")"; |
|
204 | + $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")"; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | // Add sql filters |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | throw new RestException(500, "Error creating order", array_merge(array($this->commande->error), $this->commande->errors)); |
301 | 301 | } |
302 | 302 | |
303 | - return ((int)$this->commande->id); |
|
303 | + return ((int) $this->commande->id); |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); |
379 | 379 | } |
380 | 380 | |
381 | - $request_data = (object)$request_data; |
|
381 | + $request_data = (object) $request_data; |
|
382 | 382 | |
383 | 383 | $request_data->desc = sanitizeVal($request_data->desc, 'restricthtml'); |
384 | 384 | $request_data->label = sanitizeVal($request_data->label); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); |
446 | 446 | } |
447 | 447 | |
448 | - $request_data = (object)$request_data; |
|
448 | + $request_data = (object) $request_data; |
|
449 | 449 | |
450 | 450 | $request_data->desc = sanitizeVal($request_data->desc, 'restricthtml'); |
451 | 451 | $request_data->label = sanitizeVal($request_data->label); |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | $sql .= " ON edet.fk_elementdet = cdet.rowid"; |
1056 | 1056 | $sql .= " JOIN " . MAIN_DB_PREFIX . "commande as c"; |
1057 | 1057 | $sql .= " ON cdet.fk_commande = c.rowid"; |
1058 | - $sql .= " WHERE c.rowid = " . ((int)$id); |
|
1058 | + $sql .= " WHERE c.rowid = " . ((int) $id); |
|
1059 | 1059 | $sql .= " GROUP BY e.rowid"; |
1060 | 1060 | $sql .= $this->db->order("e.rowid", "ASC"); |
1061 | 1061 |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | return $this->LibStatut($this->statut, $mode); |
153 | 153 | } |
154 | 154 | |
155 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
155 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
156 | 156 | /** |
157 | 157 | * Return status label for a status |
158 | 158 | * |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function LibStatut($status, $mode = 0) |
164 | 164 | { |
165 | - // phpcs:enable |
|
165 | + // phpcs:enable |
|
166 | 166 | global $langs; |
167 | 167 | |
168 | 168 | if ($mode == 0) { |
@@ -71,8 +71,8 @@ |
||
71 | 71 | |
72 | 72 | const STATUS_DRAFT = 0; |
73 | 73 | const STATUS_NOT_USED = 1; |
74 | - const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
75 | - const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
74 | + const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
75 | + const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
76 | 76 | const STATUS_REJECTED = 3; |
77 | 77 | |
78 | 78 |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $this->fetched = 0; |
233 | 233 | } |
234 | 234 | |
235 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
235 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
236 | 236 | /** |
237 | 237 | * Add invoice to withdrawal |
238 | 238 | * |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function AddFacture($invoice_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key, $type = 'debit-order', $sourcetype = '') |
252 | 252 | { |
253 | - // phpcs:enable |
|
253 | + // phpcs:enable |
|
254 | 254 | $result = 0; |
255 | 255 | $line_id = 0; |
256 | 256 | |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | return $this->updateCommon($user, $notrigger); |
471 | 471 | } |
472 | 472 | |
473 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
473 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
474 | 474 | /** |
475 | 475 | * Set direct debit or credit transfer order to "paid" status. |
476 | 476 | * Then create the payment for each invoice or salary of the prelemevement_bon. |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | */ |
483 | 483 | public function set_infocredit($user, $date, $type = '') |
484 | 484 | { |
485 | - // phpcs:enable |
|
485 | + // phpcs:enable |
|
486 | 486 | global $conf, $langs; |
487 | 487 | |
488 | 488 | $error = 0; |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | } |
683 | 683 | } |
684 | 684 | |
685 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
685 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
686 | 686 | /** |
687 | 687 | * Set withdrawal to transmitted status |
688 | 688 | * |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | */ |
694 | 694 | public function set_infotrans($user, $date, $method) |
695 | 695 | { |
696 | - // phpcs:enable |
|
696 | + // phpcs:enable |
|
697 | 697 | global $conf, $langs; |
698 | 698 | |
699 | 699 | $error = 0; |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | return $arr; |
819 | 819 | } |
820 | 820 | |
821 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
821 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
822 | 822 | /** |
823 | 823 | * Returns amount waiting for direct debit payment or credit transfer payment |
824 | 824 | * |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | */ |
829 | 829 | public function SommeAPrelever($mode = 'direct-debit', $type = '') |
830 | 830 | { |
831 | - // phpcs:enable |
|
831 | + // phpcs:enable |
|
832 | 832 | $sql = "SELECT sum(pd.amount) as nb"; |
833 | 833 | if ($type !== 'salary') { |
834 | 834 | if ($mode != 'bank-transfer') { |
@@ -890,7 +890,7 @@ discard block |
||
890 | 890 | } |
891 | 891 | } |
892 | 892 | |
893 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
893 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
894 | 894 | /** |
895 | 895 | * Get number of invoices to pay |
896 | 896 | * |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | */ |
901 | 901 | public function NbFactureAPrelever($type = 'direct-debit', $forsalary = 0) |
902 | 902 | { |
903 | - // phpcs:enable |
|
903 | + // phpcs:enable |
|
904 | 904 | if ($forsalary == 1) { |
905 | 905 | $sql = "SELECT count(s.rowid) as nb"; |
906 | 906 | $sql .= " FROM " . MAIN_DB_PREFIX . "salary as s"; |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | } |
958 | 958 | |
959 | 959 | |
960 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
960 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
961 | 961 | /** |
962 | 962 | * Create a BAN payment order: |
963 | 963 | * - Select waiting requests from prelevement_demande (or use $did if provided) |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | */ |
981 | 981 | public function create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL', $executiondate = '', $notrigger = 0, $type = 'direct-debit', $did = 0, $fk_bank_account = 0, $sourcetype = 'invoice') |
982 | 982 | { |
983 | - // phpcs:enable |
|
983 | + // phpcs:enable |
|
984 | 984 | global $conf, $langs, $user; |
985 | 985 | |
986 | 986 | dol_syslog(__METHOD__ . " Bank=" . $banque . " Office=" . $agence . " mode=" . $mode . " format=" . $format, LOG_DEBUG); |
@@ -1640,7 +1640,7 @@ discard block |
||
1640 | 1640 | } |
1641 | 1641 | } |
1642 | 1642 | |
1643 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1643 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1644 | 1644 | /** |
1645 | 1645 | * Add a notification |
1646 | 1646 | * |
@@ -1651,7 +1651,7 @@ discard block |
||
1651 | 1651 | */ |
1652 | 1652 | public function addNotification($db, $user, $action) |
1653 | 1653 | { |
1654 | - // phpcs:enable |
|
1654 | + // phpcs:enable |
|
1655 | 1655 | $result = 0; |
1656 | 1656 | |
1657 | 1657 | if (is_object($user)) { |
@@ -2073,7 +2073,7 @@ discard block |
||
2073 | 2073 | } |
2074 | 2074 | |
2075 | 2075 | |
2076 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2076 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2077 | 2077 | /** |
2078 | 2078 | * Write recipient of request (customer) |
2079 | 2079 | * |
@@ -2092,7 +2092,7 @@ discard block |
||
2092 | 2092 | */ |
2093 | 2093 | public function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom = '', $type = 'direct-debit') |
2094 | 2094 | { |
2095 | - // phpcs:enable |
|
2095 | + // phpcs:enable |
|
2096 | 2096 | fwrite($this->file, "06"); |
2097 | 2097 | fwrite($this->file, "08"); // Prelevement ordinaire |
2098 | 2098 | |
@@ -2148,7 +2148,7 @@ discard block |
||
2148 | 2148 | } |
2149 | 2149 | |
2150 | 2150 | |
2151 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2151 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2152 | 2152 | /** |
2153 | 2153 | * Write recipient (thirdparty concerned by request) |
2154 | 2154 | * |
@@ -2176,7 +2176,7 @@ discard block |
||
2176 | 2176 | */ |
2177 | 2177 | public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum, $type = 'direct-debit', $row_comment = '') |
2178 | 2178 | { |
2179 | - // phpcs:enable |
|
2179 | + // phpcs:enable |
|
2180 | 2180 | global $conf; |
2181 | 2181 | |
2182 | 2182 | if (getDolGlobalString('SEPA_FORCE_TWO_DECIMAL')) { |
@@ -2316,7 +2316,7 @@ discard block |
||
2316 | 2316 | } |
2317 | 2317 | |
2318 | 2318 | |
2319 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2319 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2320 | 2320 | /** |
2321 | 2321 | * Write sender of request (me). |
2322 | 2322 | * |
@@ -2326,7 +2326,7 @@ discard block |
||
2326 | 2326 | */ |
2327 | 2327 | public function EnregEmetteur($type = 'direct-debit') |
2328 | 2328 | { |
2329 | - // phpcs:enable |
|
2329 | + // phpcs:enable |
|
2330 | 2330 | fwrite($this->file, "03"); |
2331 | 2331 | fwrite($this->file, "08"); // Prelevement ordinaire |
2332 | 2332 | |
@@ -2386,7 +2386,7 @@ discard block |
||
2386 | 2386 | } |
2387 | 2387 | |
2388 | 2388 | |
2389 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2389 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2390 | 2390 | /** |
2391 | 2391 | * Write sender of request (me). |
2392 | 2392 | * Note: The tag PmtInf is opened here but closed into caller |
@@ -2404,7 +2404,7 @@ discard block |
||
2404 | 2404 | */ |
2405 | 2405 | public function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf = '\n', $format = 'FRST', $type = 'direct-debit', $fk_bank_account = 0) |
2406 | 2406 | { |
2407 | - // phpcs:enable |
|
2407 | + // phpcs:enable |
|
2408 | 2408 | |
2409 | 2409 | // Clean parameters |
2410 | 2410 | $dateTime_YMD = dol_print_date($ladate, '%Y%m%d'); |
@@ -2586,7 +2586,7 @@ discard block |
||
2586 | 2586 | return $XML_SEPA_INFO; |
2587 | 2587 | } |
2588 | 2588 | |
2589 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2589 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2590 | 2590 | /** |
2591 | 2591 | * Write end |
2592 | 2592 | * |
@@ -2595,7 +2595,7 @@ discard block |
||
2595 | 2595 | */ |
2596 | 2596 | public function EnregTotal($total) |
2597 | 2597 | { |
2598 | - // phpcs:enable |
|
2598 | + // phpcs:enable |
|
2599 | 2599 | fwrite($this->file, "08"); |
2600 | 2600 | fwrite($this->file, "08"); // Prelevement ordinaire |
2601 | 2601 | |
@@ -2660,7 +2660,7 @@ discard block |
||
2660 | 2660 | return $this->LibStatut($this->statut, $mode); |
2661 | 2661 | } |
2662 | 2662 | |
2663 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2663 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2664 | 2664 | /** |
2665 | 2665 | * Return status label for a status |
2666 | 2666 | * |
@@ -2670,7 +2670,7 @@ discard block |
||
2670 | 2670 | */ |
2671 | 2671 | public function LibStatut($status, $mode = 0) |
2672 | 2672 | { |
2673 | - // phpcs:enable |
|
2673 | + // phpcs:enable |
|
2674 | 2674 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
2675 | 2675 | global $langs; |
2676 | 2676 | //$langs->load("mymodule"); |
@@ -2698,7 +2698,7 @@ discard block |
||
2698 | 2698 | return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); |
2699 | 2699 | } |
2700 | 2700 | |
2701 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2701 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2702 | 2702 | /** |
2703 | 2703 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
2704 | 2704 | * |
@@ -2708,7 +2708,7 @@ discard block |
||
2708 | 2708 | */ |
2709 | 2709 | public function load_board($user, $mode) |
2710 | 2710 | { |
2711 | - // phpcs:enable |
|
2711 | + // phpcs:enable |
|
2712 | 2712 | if ($user->socid) { |
2713 | 2713 | return -1; // protection pour eviter appel par utilisateur externe |
2714 | 2714 | } |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | |
107 | 107 | const STATUS_DRAFT = 0; |
108 | 108 | const STATUS_TRANSFERED = 1; |
109 | - const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
110 | - const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
109 | + const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
110 | + const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
111 | 111 | |
112 | 112 | |
113 | 113 | /** |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | public function addline(&$line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key, $sourcetype = '') |
314 | 314 | { |
315 | 315 | $result = -1; |
316 | - $concat = 0; // ??? what is this for. Seems not used. |
|
316 | + $concat = 0; // ??? what is this for. Seems not used. |
|
317 | 317 | |
318 | 318 | if ($concat == 1) { |
319 | 319 | /* |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $sql .= ($sourcetype == 'salary' ? ", fk_user" : ""); |
354 | 354 | $sql .= ") VALUES ("; |
355 | 355 | $sql .= $this->id; |
356 | - $sql .= ", " . (($sourcetype != 'salary') ? ((int) $client_id) : "0"); // fk_soc can't be null |
|
356 | + $sql .= ", " . (($sourcetype != 'salary') ? ((int) $client_id) : "0"); // fk_soc can't be null |
|
357 | 357 | $sql .= ", '" . $this->db->escape($client_nom) . "'"; |
358 | 358 | $sql .= ", " . ((float) price2num($amount)); |
359 | 359 | $sql .= ", '" . $this->db->escape($code_banque) . "'"; |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | if (empty($this->status)) { // Value is sometimes null in database |
445 | 445 | $this->status = 0; |
446 | 446 | } |
447 | - $this->statut = $this->status; // For backward compatibility |
|
447 | + $this->statut = $this->status; // For backward compatibility |
|
448 | 448 | |
449 | 449 | $this->fetched = 1; |
450 | 450 | |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | } else { |
634 | 634 | $modeforaddpayment = 'payment'; |
635 | 635 | $labelforaddpayment = '(CustomerInvoicePayment)'; |
636 | - $addbankurl = 'direct-debit'; // = 'directdebit' |
|
636 | + $addbankurl = 'direct-debit'; // = 'directdebit' |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | $result = $paiement->addPaymentToBank($user, $modeforaddpayment, $labelforaddpayment, $fk_bank_account, '', '', 0, '', $addbankurl); |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | |
668 | 668 | // End of procedure |
669 | 669 | if ($error == 0) { |
670 | - $this->date_credit = $date; // date credit or debit |
|
670 | + $this->date_credit = $date; // date credit or debit |
|
671 | 671 | $this->statut = self::STATUS_CREDITED; |
672 | 672 | $this->status = self::STATUS_CREDITED; |
673 | 673 | |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | $sql .= " FROM " . MAIN_DB_PREFIX . "salary as f"; |
1054 | 1054 | $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "prelevement_demande as pd ON f.rowid = pd.fk_salary"; |
1055 | 1055 | $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as s ON s.rowid = f.fk_user"; |
1056 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user_rib as sr ON s.rowid = sr.fk_user"; // TODO Add AND sr.default_rib = 1 here |
|
1056 | + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user_rib as sr ON s.rowid = sr.fk_user"; // TODO Add AND sr.default_rib = 1 here |
|
1057 | 1057 | } |
1058 | 1058 | if ($sourcetype != 'salary') { |
1059 | 1059 | if ($type != 'bank-transfer') { |
@@ -1076,7 +1076,7 @@ discard block |
||
1076 | 1076 | $sql .= " AND pd.traite = 0"; |
1077 | 1077 | $sql .= " AND pd.ext_payment_id IS NULL"; |
1078 | 1078 | if ($sourcetype != 'salary') { |
1079 | - $sql .= " AND sr.type = 'ban'"; // TODO Add AND sr.type = 'ban' for users too |
|
1079 | + $sql .= " AND sr.type = 'ban'"; // TODO Add AND sr.type = 'ban' for users too |
|
1080 | 1080 | } |
1081 | 1081 | if ($did > 0) { |
1082 | 1082 | $sql .= " AND pd.rowid = " . ((int) $did); |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | $i = 0; |
1089 | 1089 | |
1090 | 1090 | while ($i < $num) { |
1091 | - $row = $this->db->fetch_row($resql); // TODO Replace with fetch_object() |
|
1091 | + $row = $this->db->fetch_row($resql); // TODO Replace with fetch_object() |
|
1092 | 1092 | $factures[$i] = $row; // All fields |
1093 | 1093 | |
1094 | 1094 | if ($row[7] == 0) { |
@@ -1239,7 +1239,7 @@ discard block |
||
1239 | 1239 | $ref = substr($year, -2) . $month; |
1240 | 1240 | |
1241 | 1241 | // Get next free number for the ref of bon prelevement |
1242 | - $sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX" |
|
1242 | + $sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX" |
|
1243 | 1243 | $sql .= " FROM " . MAIN_DB_PREFIX . "prelevement_bons"; |
1244 | 1244 | $sql .= " WHERE ref LIKE '_" . $this->db->escape($ref) . "%'"; |
1245 | 1245 | $sql .= " AND entity = " . ((int) $conf->entity); |
@@ -1369,7 +1369,7 @@ discard block |
||
1369 | 1369 | $this->emetteur_iban = $account->iban; |
1370 | 1370 | $this->emetteur_bic = $account->bic; |
1371 | 1371 | |
1372 | - $this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Example "FR78ZZZ123456" |
|
1372 | + $this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Example "FR78ZZZ123456" |
|
1373 | 1373 | |
1374 | 1374 | $this->raison_sociale = $account->proprio; |
1375 | 1375 | } |
@@ -1424,7 +1424,7 @@ discard block |
||
1424 | 1424 | |
1425 | 1425 | if (!$error) { |
1426 | 1426 | $this->db->commit(); |
1427 | - return count($factures_prev); // The error of failed lines are into $this->invoice_in_error and $this->thirdparty_in_error |
|
1427 | + return count($factures_prev); // The error of failed lines are into $this->invoice_in_error and $this->thirdparty_in_error |
|
1428 | 1428 | } else { |
1429 | 1429 | $this->db->rollback(); |
1430 | 1430 | return -1; |
@@ -2427,7 +2427,7 @@ discard block |
||
2427 | 2427 | $this->emetteur_iban = $account->iban; |
2428 | 2428 | $this->emetteur_bic = $account->bic; |
2429 | 2429 | |
2430 | - $this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; |
|
2430 | + $this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; |
|
2431 | 2431 | |
2432 | 2432 | $this->raison_sociale = $account->proprio; |
2433 | 2433 | } |
@@ -2823,7 +2823,7 @@ discard block |
||
2823 | 2823 | if ($id) { |
2824 | 2824 | $sql = "SELECT COUNT(*) AS nb FROM " . MAIN_DB_PREFIX . "prelevement_lignes"; |
2825 | 2825 | $sql .= " WHERE fk_prelevement_bons = " . ((int) $id); |
2826 | - $sql .= " AND fk_soc = 0"; // fk_soc can't be NULL |
|
2826 | + $sql .= " AND fk_soc = 0"; // fk_soc can't be NULL |
|
2827 | 2827 | $sql .= " AND fk_user IS NOT NULL"; |
2828 | 2828 | |
2829 | 2829 | $num = 0; |