@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 367 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 368 | 368 | /** |
| 369 | 369 | * Activate a contract line |
| 370 | 370 | * |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | */ |
| 378 | 378 | public function active_line($user, $line_id, $date_start, $date_end = '', $comment = '') |
| 379 | 379 | { |
| 380 | - // phpcs:enable |
|
| 380 | + // phpcs:enable |
|
| 381 | 381 | $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date_start, $date_end, $comment); |
| 382 | 382 | if ($result < 0) { |
| 383 | 383 | $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error; |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | |
| 390 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 390 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 391 | 391 | /** |
| 392 | 392 | * Close a contract line |
| 393 | 393 | * |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | */ |
| 400 | 400 | public function close_line($user, $line_id, $date_end, $comment = '') |
| 401 | 401 | { |
| 402 | - // phpcs:enable |
|
| 402 | + // phpcs:enable |
|
| 403 | 403 | $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); |
| 404 | 404 | if ($result < 0) { |
| 405 | 405 | $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error; |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | } |
| 822 | 822 | } |
| 823 | 823 | |
| 824 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 824 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 825 | 825 | /** |
| 826 | 826 | * Load lines array into this->lines. |
| 827 | 827 | * This set also nbofserviceswait, nbofservicesopened, nbofservicesexpired and nbofservicesclosed |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | */ |
| 834 | 834 | public function fetch_lines($only_services = 0, $loadalsotranslation = 0, $noextrafields = 0) |
| 835 | 835 | { |
| 836 | - // phpcs:enable |
|
| 836 | + // phpcs:enable |
|
| 837 | 837 | $this->nbofservices = 0; |
| 838 | 838 | $this->nbofserviceswait = 0; |
| 839 | 839 | $this->nbofservicesopened = 0; |
@@ -1964,7 +1964,7 @@ discard block |
||
| 1964 | 1964 | } |
| 1965 | 1965 | |
| 1966 | 1966 | |
| 1967 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1967 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1968 | 1968 | /** |
| 1969 | 1969 | * Update statut of contract according to services |
| 1970 | 1970 | * |
@@ -1974,7 +1974,7 @@ discard block |
||
| 1974 | 1974 | */ |
| 1975 | 1975 | public function update_statut($user) |
| 1976 | 1976 | { |
| 1977 | - // phpcs:enable |
|
| 1977 | + // phpcs:enable |
|
| 1978 | 1978 | dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); |
| 1979 | 1979 | |
| 1980 | 1980 | // If draft, we keep it (should not happen) |
@@ -2006,7 +2006,7 @@ discard block |
||
| 2006 | 2006 | return $this->LibStatut($this->statut, $mode); |
| 2007 | 2007 | } |
| 2008 | 2008 | |
| 2009 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2009 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2010 | 2010 | /** |
| 2011 | 2011 | * Return the label of a given contrat status |
| 2012 | 2012 | * |
@@ -2016,7 +2016,7 @@ discard block |
||
| 2016 | 2016 | */ |
| 2017 | 2017 | public function LibStatut($status, $mode) |
| 2018 | 2018 | { |
| 2019 | - // phpcs:enable |
|
| 2019 | + // phpcs:enable |
|
| 2020 | 2020 | global $langs; |
| 2021 | 2021 | |
| 2022 | 2022 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -2226,7 +2226,7 @@ discard block |
||
| 2226 | 2226 | } |
| 2227 | 2227 | } |
| 2228 | 2228 | |
| 2229 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2229 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2230 | 2230 | /** |
| 2231 | 2231 | * Return list of line rowid |
| 2232 | 2232 | * |
@@ -2235,7 +2235,7 @@ discard block |
||
| 2235 | 2235 | */ |
| 2236 | 2236 | public function array_detail($status = -1) |
| 2237 | 2237 | { |
| 2238 | - // phpcs:enable |
|
| 2238 | + // phpcs:enable |
|
| 2239 | 2239 | $tab = array(); |
| 2240 | 2240 | |
| 2241 | 2241 | $sql = "SELECT cd.rowid"; |
@@ -2307,7 +2307,7 @@ discard block |
||
| 2307 | 2307 | } |
| 2308 | 2308 | |
| 2309 | 2309 | |
| 2310 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2310 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2311 | 2311 | /** |
| 2312 | 2312 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 2313 | 2313 | * |
@@ -2317,7 +2317,7 @@ discard block |
||
| 2317 | 2317 | */ |
| 2318 | 2318 | public function load_board($user, $mode) |
| 2319 | 2319 | { |
| 2320 | - // phpcs:enable |
|
| 2320 | + // phpcs:enable |
|
| 2321 | 2321 | global $conf, $langs; |
| 2322 | 2322 | |
| 2323 | 2323 | $this->from = " FROM " . MAIN_DB_PREFIX . "contrat as c"; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | return $this->LibStatut($this->statut, $mode, ((!empty($this->date_end)) ? ($this->date_end < dol_now() ? 1 : 0) : -1)); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 244 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 245 | 245 | /** |
| 246 | 246 | * Return label of a contract line status |
| 247 | 247 | * |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | public static function LibStatut($status, $mode, $expired = -1, $moreatt = '') |
| 255 | 255 | { |
| 256 | - // phpcs:enable |
|
| 256 | + // phpcs:enable |
|
| 257 | 257 | global $langs; |
| 258 | 258 | $langs->load("contracts"); |
| 259 | 259 | |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | |
| 691 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 691 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 692 | 692 | /** |
| 693 | 693 | * Update in database the fields total_xxx of lines |
| 694 | 694 | * Used by migration process |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | */ |
| 698 | 698 | public function update_total() |
| 699 | 699 | { |
| 700 | - // phpcs:enable |
|
| 700 | + // phpcs:enable |
|
| 701 | 701 | $this->db->begin(); |
| 702 | 702 | |
| 703 | 703 | // Mise a jour ligne en base |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | } |
| 816 | 816 | } |
| 817 | 817 | |
| 818 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 818 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 819 | 819 | /** |
| 820 | 820 | * Activate a contract line |
| 821 | 821 | * |
@@ -827,7 +827,7 @@ discard block |
||
| 827 | 827 | */ |
| 828 | 828 | public function active_line($user, $date, $date_end = '', $comment = '') |
| 829 | 829 | { |
| 830 | - // phpcs:enable |
|
| 830 | + // phpcs:enable |
|
| 831 | 831 | $error = 0; |
| 832 | 832 | |
| 833 | 833 | $this->db->begin(); |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | } |
| 874 | 874 | } |
| 875 | 875 | |
| 876 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 876 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 877 | 877 | /** |
| 878 | 878 | * Close a contract line |
| 879 | 879 | * |
@@ -885,7 +885,7 @@ discard block |
||
| 885 | 885 | */ |
| 886 | 886 | public function close_line($user, $date_end_real, $comment = '', $notrigger = 0) |
| 887 | 887 | { |
| 888 | - // phpcs:enable |
|
| 888 | + // phpcs:enable |
|
| 889 | 889 | $this->date_cloture = $date_end_real; |
| 890 | 890 | $this->date_end_real = $date_end_real; |
| 891 | 891 | $this->user_closing_id = $user->id; |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | } |
| 666 | 666 | } |
| 667 | 667 | |
| 668 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 668 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 669 | 669 | /** |
| 670 | 670 | * Update DB line fields total_xxx |
| 671 | 671 | * Used by migration |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | */ |
| 675 | 675 | public function update_total() |
| 676 | 676 | { |
| 677 | - // phpcs:enable |
|
| 677 | + // phpcs:enable |
|
| 678 | 678 | $this->db->begin(); |
| 679 | 679 | |
| 680 | 680 | // Mise a jour ligne en base |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | |
| 413 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 413 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 414 | 414 | /** |
| 415 | 415 | * Add line into array ->lines |
| 416 | 416 | * $this->thirdparty should be loaded |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | */ |
| 425 | 425 | public function add_product($idproduct, $qty, $remise_percent = 0) |
| 426 | 426 | { |
| 427 | - // phpcs:enable |
|
| 427 | + // phpcs:enable |
|
| 428 | 428 | global $conf, $mysoc; |
| 429 | 429 | |
| 430 | 430 | if (!$qty) { |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | return 1; |
| 476 | 476 | } |
| 477 | 477 | |
| 478 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 478 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 479 | 479 | /** |
| 480 | 480 | * Adding line of fixed discount in the proposal in DB |
| 481 | 481 | * |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | */ |
| 485 | 485 | public function insert_discount($idremise) |
| 486 | 486 | { |
| 487 | - // phpcs:enable |
|
| 487 | + // phpcs:enable |
|
| 488 | 488 | global $langs; |
| 489 | 489 | |
| 490 | 490 | include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; |
@@ -1826,7 +1826,7 @@ discard block |
||
| 1826 | 1826 | } |
| 1827 | 1827 | |
| 1828 | 1828 | |
| 1829 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1829 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1830 | 1830 | /** |
| 1831 | 1831 | * Load array lines |
| 1832 | 1832 | * |
@@ -1837,7 +1837,7 @@ discard block |
||
| 1837 | 1837 | */ |
| 1838 | 1838 | public function fetch_lines($only_product = 0, $loadalsotranslation = 0, $sqlforgedfilters = '') |
| 1839 | 1839 | { |
| 1840 | - // phpcs:enable |
|
| 1840 | + // phpcs:enable |
|
| 1841 | 1841 | $this->lines = array(); |
| 1842 | 1842 | |
| 1843 | 1843 | $sql = 'SELECT d.rowid, d.fk_propal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.vat_src_code, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.localtax1_type, d.localtax2_type, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,'; |
@@ -2086,7 +2086,7 @@ discard block |
||
| 2086 | 2086 | } |
| 2087 | 2087 | |
| 2088 | 2088 | |
| 2089 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2089 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2090 | 2090 | /** |
| 2091 | 2091 | * Define proposal date |
| 2092 | 2092 | * |
@@ -2097,7 +2097,7 @@ discard block |
||
| 2097 | 2097 | */ |
| 2098 | 2098 | public function set_date($user, $date, $notrigger = 0) |
| 2099 | 2099 | { |
| 2100 | - // phpcs:enable |
|
| 2100 | + // phpcs:enable |
|
| 2101 | 2101 | if (empty($date)) { |
| 2102 | 2102 | $this->error = 'ErrorBadParameter'; |
| 2103 | 2103 | dol_syslog(get_class($this) . "::set_date " . $this->error, LOG_ERR); |
@@ -2150,7 +2150,7 @@ discard block |
||
| 2150 | 2150 | return -1; |
| 2151 | 2151 | } |
| 2152 | 2152 | |
| 2153 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2153 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2154 | 2154 | /** |
| 2155 | 2155 | * Define end validity date |
| 2156 | 2156 | * |
@@ -2161,7 +2161,7 @@ discard block |
||
| 2161 | 2161 | */ |
| 2162 | 2162 | public function set_echeance($user, $date_end_validity, $notrigger = 0) |
| 2163 | 2163 | { |
| 2164 | - // phpcs:enable |
|
| 2164 | + // phpcs:enable |
|
| 2165 | 2165 | if ($user->hasRight('propal', 'creer')) { |
| 2166 | 2166 | $error = 0; |
| 2167 | 2167 | |
@@ -2209,7 +2209,7 @@ discard block |
||
| 2209 | 2209 | return -1; |
| 2210 | 2210 | } |
| 2211 | 2211 | |
| 2212 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2212 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2213 | 2213 | /** |
| 2214 | 2214 | * Set delivery date |
| 2215 | 2215 | * |
@@ -2221,7 +2221,7 @@ discard block |
||
| 2221 | 2221 | */ |
| 2222 | 2222 | public function set_date_livraison($user, $delivery_date, $notrigger = 0) |
| 2223 | 2223 | { |
| 2224 | - // phpcs:enable |
|
| 2224 | + // phpcs:enable |
|
| 2225 | 2225 | return $this->setDeliveryDate($user, $delivery_date, $notrigger); |
| 2226 | 2226 | } |
| 2227 | 2227 | |
@@ -2281,7 +2281,7 @@ discard block |
||
| 2281 | 2281 | return -1; |
| 2282 | 2282 | } |
| 2283 | 2283 | |
| 2284 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2284 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2285 | 2285 | /** |
| 2286 | 2286 | * Set delivery |
| 2287 | 2287 | * |
@@ -2292,7 +2292,7 @@ discard block |
||
| 2292 | 2292 | */ |
| 2293 | 2293 | public function set_availability($user, $id, $notrigger = 0) |
| 2294 | 2294 | { |
| 2295 | - // phpcs:enable |
|
| 2295 | + // phpcs:enable |
|
| 2296 | 2296 | if ($user->hasRight('propal', 'creer') && $this->statut >= self::STATUS_DRAFT) { |
| 2297 | 2297 | $error = 0; |
| 2298 | 2298 | |
@@ -2344,7 +2344,7 @@ discard block |
||
| 2344 | 2344 | } |
| 2345 | 2345 | } |
| 2346 | 2346 | |
| 2347 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2347 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2348 | 2348 | /** |
| 2349 | 2349 | * Set source of demand |
| 2350 | 2350 | * |
@@ -2355,7 +2355,7 @@ discard block |
||
| 2355 | 2355 | */ |
| 2356 | 2356 | public function set_demand_reason($user, $id, $notrigger = 0) |
| 2357 | 2357 | { |
| 2358 | - // phpcs:enable |
|
| 2358 | + // phpcs:enable |
|
| 2359 | 2359 | if ($user->hasRight('propal', 'creer') && $this->statut >= self::STATUS_DRAFT) { |
| 2360 | 2360 | $error = 0; |
| 2361 | 2361 | |
@@ -2409,7 +2409,7 @@ discard block |
||
| 2409 | 2409 | } |
| 2410 | 2410 | } |
| 2411 | 2411 | |
| 2412 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2412 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2413 | 2413 | /** |
| 2414 | 2414 | * Set customer reference number |
| 2415 | 2415 | * |
@@ -2420,7 +2420,7 @@ discard block |
||
| 2420 | 2420 | */ |
| 2421 | 2421 | public function set_ref_client($user, $ref_client, $notrigger = 0) |
| 2422 | 2422 | { |
| 2423 | - // phpcs:enable |
|
| 2423 | + // phpcs:enable |
|
| 2424 | 2424 | if ($user->hasRight('propal', 'creer')) { |
| 2425 | 2425 | $error = 0; |
| 2426 | 2426 | |
@@ -2772,7 +2772,7 @@ discard block |
||
| 2772 | 2772 | } |
| 2773 | 2773 | } |
| 2774 | 2774 | |
| 2775 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2775 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2776 | 2776 | /** |
| 2777 | 2777 | * Set draft status |
| 2778 | 2778 | * |
@@ -2782,7 +2782,7 @@ discard block |
||
| 2782 | 2782 | */ |
| 2783 | 2783 | public function setDraft($user, $notrigger = 0) |
| 2784 | 2784 | { |
| 2785 | - // phpcs:enable |
|
| 2785 | + // phpcs:enable |
|
| 2786 | 2786 | $error = 0; |
| 2787 | 2787 | |
| 2788 | 2788 | // Protection |
@@ -2835,7 +2835,7 @@ discard block |
||
| 2835 | 2835 | } |
| 2836 | 2836 | |
| 2837 | 2837 | |
| 2838 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2838 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2839 | 2839 | /** |
| 2840 | 2840 | * Return list of proposal (eventually filtered on user) into an array |
| 2841 | 2841 | * |
@@ -2851,7 +2851,7 @@ discard block |
||
| 2851 | 2851 | */ |
| 2852 | 2852 | public function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datep', $sortorder = 'DESC') |
| 2853 | 2853 | { |
| 2854 | - // phpcs:enable |
|
| 2854 | + // phpcs:enable |
|
| 2855 | 2855 | global $user; |
| 2856 | 2856 | |
| 2857 | 2857 | $ga = array(); |
@@ -2928,7 +2928,7 @@ discard block |
||
| 2928 | 2928 | return $this->InvoiceArrayList($this->id); |
| 2929 | 2929 | } |
| 2930 | 2930 | |
| 2931 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2931 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2932 | 2932 | /** |
| 2933 | 2933 | * Returns an array with id and ref of related invoices |
| 2934 | 2934 | * |
@@ -2937,7 +2937,7 @@ discard block |
||
| 2937 | 2937 | */ |
| 2938 | 2938 | public function InvoiceArrayList($id) |
| 2939 | 2939 | { |
| 2940 | - // phpcs:enable |
|
| 2940 | + // phpcs:enable |
|
| 2941 | 2941 | $ga = array(); |
| 2942 | 2942 | $linkedInvoices = array(); |
| 2943 | 2943 | |
@@ -3185,7 +3185,7 @@ discard block |
||
| 3185 | 3185 | } |
| 3186 | 3186 | } |
| 3187 | 3187 | |
| 3188 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3188 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3189 | 3189 | /** |
| 3190 | 3190 | * Change source demand |
| 3191 | 3191 | * |
@@ -3196,7 +3196,7 @@ discard block |
||
| 3196 | 3196 | */ |
| 3197 | 3197 | public function demand_reason($demand_reason_id, $notrigger = 0) |
| 3198 | 3198 | { |
| 3199 | - // phpcs:enable |
|
| 3199 | + // phpcs:enable |
|
| 3200 | 3200 | global $user; |
| 3201 | 3201 | |
| 3202 | 3202 | if ($this->status >= self::STATUS_DRAFT) { |
@@ -3306,7 +3306,7 @@ discard block |
||
| 3306 | 3306 | return $this->LibStatut($this->statut, $mode); |
| 3307 | 3307 | } |
| 3308 | 3308 | |
| 3309 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3309 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3310 | 3310 | /** |
| 3311 | 3311 | * Return label of a status (draft, validated, ...) |
| 3312 | 3312 | * |
@@ -3316,7 +3316,7 @@ discard block |
||
| 3316 | 3316 | */ |
| 3317 | 3317 | public function LibStatut($status, $mode = 1) |
| 3318 | 3318 | { |
| 3319 | - // phpcs:enable |
|
| 3319 | + // phpcs:enable |
|
| 3320 | 3320 | global $conf, $hookmanager; |
| 3321 | 3321 | |
| 3322 | 3322 | // Init/load array of translation of status |
@@ -3364,7 +3364,7 @@ discard block |
||
| 3364 | 3364 | } |
| 3365 | 3365 | |
| 3366 | 3366 | |
| 3367 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3367 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3368 | 3368 | /** |
| 3369 | 3369 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 3370 | 3370 | * |
@@ -3374,7 +3374,7 @@ discard block |
||
| 3374 | 3374 | */ |
| 3375 | 3375 | public function load_board($user, $mode) |
| 3376 | 3376 | { |
| 3377 | - // phpcs:enable |
|
| 3377 | + // phpcs:enable |
|
| 3378 | 3378 | global $conf, $langs; |
| 3379 | 3379 | |
| 3380 | 3380 | $clause = " WHERE"; |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | } |
| 777 | 777 | } |
| 778 | 778 | |
| 779 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 779 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 780 | 780 | /** |
| 781 | 781 | * Mise a jour de l'objet ligne de commande en base |
| 782 | 782 | * |
@@ -784,7 +784,7 @@ discard block |
||
| 784 | 784 | */ |
| 785 | 785 | public function update_total() |
| 786 | 786 | { |
| 787 | - // phpcs:enable |
|
| 787 | + // phpcs:enable |
|
| 788 | 788 | $this->db->begin(); |
| 789 | 789 | |
| 790 | 790 | // Mise a jour ligne en base |
@@ -1015,7 +1015,7 @@ discard block |
||
| 1015 | 1015 | } |
| 1016 | 1016 | |
| 1017 | 1017 | |
| 1018 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1018 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1019 | 1019 | /** |
| 1020 | 1020 | * Load this->lines |
| 1021 | 1021 | * |
@@ -1023,7 +1023,7 @@ discard block |
||
| 1023 | 1023 | */ |
| 1024 | 1024 | public function fetch_lines() |
| 1025 | 1025 | { |
| 1026 | - // phpcs:enable |
|
| 1026 | + // phpcs:enable |
|
| 1027 | 1027 | $this->lines = array(); |
| 1028 | 1028 | |
| 1029 | 1029 | $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description as line_desc, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx'; |
@@ -1310,7 +1310,7 @@ discard block |
||
| 1310 | 1310 | } |
| 1311 | 1311 | } |
| 1312 | 1312 | |
| 1313 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1313 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1314 | 1314 | /** |
| 1315 | 1315 | * Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount) |
| 1316 | 1316 | * |
@@ -1319,7 +1319,7 @@ discard block |
||
| 1319 | 1319 | */ |
| 1320 | 1320 | public function insert_discount($idremise) |
| 1321 | 1321 | { |
| 1322 | - // phpcs:enable |
|
| 1322 | + // phpcs:enable |
|
| 1323 | 1323 | global $conf, $langs; |
| 1324 | 1324 | |
| 1325 | 1325 | include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; |
@@ -1545,7 +1545,7 @@ discard block |
||
| 1545 | 1545 | } |
| 1546 | 1546 | |
| 1547 | 1547 | |
| 1548 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1548 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1549 | 1549 | /** |
| 1550 | 1550 | * Tag invoice as a paid invoice |
| 1551 | 1551 | * |
@@ -1558,7 +1558,7 @@ discard block |
||
| 1558 | 1558 | */ |
| 1559 | 1559 | public function set_paid($user, $close_code = '', $close_note = '') |
| 1560 | 1560 | { |
| 1561 | - // phpcs:enable |
|
| 1561 | + // phpcs:enable |
|
| 1562 | 1562 | dol_syslog(get_class($this) . "::set_paid is deprecated, use setPaid instead", LOG_NOTICE); |
| 1563 | 1563 | return $this->setPaid($user, $close_code, $close_note); |
| 1564 | 1564 | } |
@@ -1623,7 +1623,7 @@ discard block |
||
| 1623 | 1623 | } |
| 1624 | 1624 | } |
| 1625 | 1625 | |
| 1626 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1626 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1627 | 1627 | /** |
| 1628 | 1628 | * Tag the invoice as not fully paid + trigger call BILL_UNPAYED |
| 1629 | 1629 | * Function used when a direct debit payment is refused, |
@@ -1636,7 +1636,7 @@ discard block |
||
| 1636 | 1636 | */ |
| 1637 | 1637 | public function set_unpaid($user) |
| 1638 | 1638 | { |
| 1639 | - // phpcs:enable |
|
| 1639 | + // phpcs:enable |
|
| 1640 | 1640 | dol_syslog(get_class($this) . "::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE); |
| 1641 | 1641 | return $this->setUnpaid($user); |
| 1642 | 1642 | } |
@@ -2571,7 +2571,7 @@ discard block |
||
| 2571 | 2571 | } |
| 2572 | 2572 | } |
| 2573 | 2573 | |
| 2574 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2574 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2575 | 2575 | /** |
| 2576 | 2576 | * Return list of replaceable invoices |
| 2577 | 2577 | * Status valid or abandoned for other reason + not paid + no payment + not already replaced |
@@ -2582,7 +2582,7 @@ discard block |
||
| 2582 | 2582 | */ |
| 2583 | 2583 | public function list_replacable_supplier_invoices($socid = 0) |
| 2584 | 2584 | { |
| 2585 | - // phpcs:enable |
|
| 2585 | + // phpcs:enable |
|
| 2586 | 2586 | global $conf; |
| 2587 | 2587 | |
| 2588 | 2588 | $return = array(); |
@@ -2620,7 +2620,7 @@ discard block |
||
| 2620 | 2620 | } |
| 2621 | 2621 | } |
| 2622 | 2622 | |
| 2623 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2623 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2624 | 2624 | /** |
| 2625 | 2625 | * Return list of qualifying invoices for correction by credit note |
| 2626 | 2626 | * Invoices that respect the following rules are returned: |
@@ -2632,7 +2632,7 @@ discard block |
||
| 2632 | 2632 | */ |
| 2633 | 2633 | public function list_qualified_avoir_supplier_invoices($socid = 0) |
| 2634 | 2634 | { |
| 2635 | - // phpcs:enable |
|
| 2635 | + // phpcs:enable |
|
| 2636 | 2636 | global $conf; |
| 2637 | 2637 | |
| 2638 | 2638 | $return = array(); |
@@ -2674,7 +2674,7 @@ discard block |
||
| 2674 | 2674 | } |
| 2675 | 2675 | } |
| 2676 | 2676 | |
| 2677 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2677 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2678 | 2678 | /** |
| 2679 | 2679 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 2680 | 2680 | * |
@@ -2683,7 +2683,7 @@ discard block |
||
| 2683 | 2683 | */ |
| 2684 | 2684 | public function load_board($user) |
| 2685 | 2685 | { |
| 2686 | - // phpcs:enable |
|
| 2686 | + // phpcs:enable |
|
| 2687 | 2687 | global $conf, $langs; |
| 2688 | 2688 | |
| 2689 | 2689 | $sql = 'SELECT ff.rowid, ff.date_lim_reglement as datefin, ff.fk_statut as status, ff.total_ht, ff.total_ttc'; |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | } |
| 655 | 655 | } |
| 656 | 656 | |
| 657 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 657 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 658 | 658 | /** |
| 659 | 659 | * Update DB line fields total_xxx |
| 660 | 660 | * Used by migration |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | */ |
| 664 | 664 | public function update_total() |
| 665 | 665 | { |
| 666 | - // phpcs:enable |
|
| 666 | + // phpcs:enable |
|
| 667 | 667 | $this->db->begin(); |
| 668 | 668 | |
| 669 | 669 | // Mise a jour ligne en base |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | |
| 246 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 246 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 247 | 247 | /** |
| 248 | 248 | * Add line into array ->lines |
| 249 | 249 | * |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | public function add_product($idproduct, $qty, $remise_percent = 0) |
| 258 | 258 | { |
| 259 | - // phpcs:enable |
|
| 259 | + // phpcs:enable |
|
| 260 | 260 | global $conf, $mysoc; |
| 261 | 261 | |
| 262 | 262 | if (!$qty) { |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | return -1; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 303 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 304 | 304 | /** |
| 305 | 305 | * Adding line of fixed discount in the proposal in DB |
| 306 | 306 | * |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | public function insert_discount($idremise) |
| 311 | 311 | { |
| 312 | - // phpcs:enable |
|
| 312 | + // phpcs:enable |
|
| 313 | 313 | global $langs; |
| 314 | 314 | |
| 315 | 315 | include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; |
@@ -1508,7 +1508,7 @@ discard block |
||
| 1508 | 1508 | } |
| 1509 | 1509 | } |
| 1510 | 1510 | |
| 1511 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1511 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1512 | 1512 | /** |
| 1513 | 1513 | * Set delivery date |
| 1514 | 1514 | * |
@@ -1519,7 +1519,7 @@ discard block |
||
| 1519 | 1519 | */ |
| 1520 | 1520 | public function set_date_livraison($user, $delivery_date) |
| 1521 | 1521 | { |
| 1522 | - // phpcs:enable |
|
| 1522 | + // phpcs:enable |
|
| 1523 | 1523 | return $this->setDeliveryDate($user, $delivery_date); |
| 1524 | 1524 | } |
| 1525 | 1525 | |
@@ -1549,7 +1549,7 @@ discard block |
||
| 1549 | 1549 | return 0; |
| 1550 | 1550 | } |
| 1551 | 1551 | |
| 1552 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1552 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1553 | 1553 | /** |
| 1554 | 1554 | * Set an overall discount on the proposal |
| 1555 | 1555 | * |
@@ -1582,7 +1582,7 @@ discard block |
||
| 1582 | 1582 | } |
| 1583 | 1583 | */ |
| 1584 | 1584 | |
| 1585 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1585 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1586 | 1586 | /** |
| 1587 | 1587 | * Set an absolute overall discount on the proposal |
| 1588 | 1588 | * |
@@ -1880,7 +1880,7 @@ discard block |
||
| 1880 | 1880 | return 1; |
| 1881 | 1881 | } |
| 1882 | 1882 | |
| 1883 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1883 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1884 | 1884 | /** |
| 1885 | 1885 | * Set draft status |
| 1886 | 1886 | * |
@@ -1889,7 +1889,7 @@ discard block |
||
| 1889 | 1889 | */ |
| 1890 | 1890 | public function setDraft($user) |
| 1891 | 1891 | { |
| 1892 | - // phpcs:enable |
|
| 1892 | + // phpcs:enable |
|
| 1893 | 1893 | global $conf, $langs; |
| 1894 | 1894 | |
| 1895 | 1895 | $error = 0; |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | } |
| 1932 | 1932 | |
| 1933 | 1933 | |
| 1934 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1934 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1935 | 1935 | /** |
| 1936 | 1936 | * Return list of askprice (eventually filtered on user) into an array |
| 1937 | 1937 | * |
@@ -1947,7 +1947,7 @@ discard block |
||
| 1947 | 1947 | */ |
| 1948 | 1948 | public function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC') |
| 1949 | 1949 | { |
| 1950 | - // phpcs:enable |
|
| 1950 | + // phpcs:enable |
|
| 1951 | 1951 | global $user; |
| 1952 | 1952 | |
| 1953 | 1953 | $ga = array(); |
@@ -2166,7 +2166,7 @@ discard block |
||
| 2166 | 2166 | return $this->LibStatut((isset($this->statut) ? $this->statut : $this->status), $mode); |
| 2167 | 2167 | } |
| 2168 | 2168 | |
| 2169 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2169 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2170 | 2170 | /** |
| 2171 | 2171 | * Return label of a status (draft, validated, ...) |
| 2172 | 2172 | * |
@@ -2176,7 +2176,7 @@ discard block |
||
| 2176 | 2176 | */ |
| 2177 | 2177 | public function LibStatut($status, $mode = 1) |
| 2178 | 2178 | { |
| 2179 | - // phpcs:enable |
|
| 2179 | + // phpcs:enable |
|
| 2180 | 2180 | |
| 2181 | 2181 | // Init/load array of translation of status |
| 2182 | 2182 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -2211,7 +2211,7 @@ discard block |
||
| 2211 | 2211 | } |
| 2212 | 2212 | |
| 2213 | 2213 | |
| 2214 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2214 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2215 | 2215 | /** |
| 2216 | 2216 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 2217 | 2217 | * |
@@ -2221,7 +2221,7 @@ discard block |
||
| 2221 | 2221 | */ |
| 2222 | 2222 | public function load_board($user, $mode) |
| 2223 | 2223 | { |
| 2224 | - // phpcs:enable |
|
| 2224 | + // phpcs:enable |
|
| 2225 | 2225 | global $conf, $user, $langs; |
| 2226 | 2226 | |
| 2227 | 2227 | $now = dol_now(); |
@@ -174,43 +174,43 @@ |
||
| 174 | 174 | public $product_type = 0; |
| 175 | 175 | |
| 176 | 176 | /** |
| 177 | - * @var int rang of line |
|
| 178 | - */ |
|
| 177 | + * @var int rang of line |
|
| 178 | + */ |
|
| 179 | 179 | public $rang; |
| 180 | 180 | |
| 181 | 181 | /** |
| 182 | - * @var float weight |
|
| 183 | - */ |
|
| 182 | + * @var float weight |
|
| 183 | + */ |
|
| 184 | 184 | public $weight; |
| 185 | 185 | public $weight_units; |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * @var float length |
|
| 189 | - */ |
|
| 188 | + * @var float length |
|
| 189 | + */ |
|
| 190 | 190 | public $length; |
| 191 | 191 | public $length_units; |
| 192 | 192 | |
| 193 | 193 | /** |
| 194 | - * @var float width |
|
| 195 | - */ |
|
| 194 | + * @var float width |
|
| 195 | + */ |
|
| 196 | 196 | public $width; |
| 197 | 197 | public $width_units; |
| 198 | 198 | |
| 199 | 199 | /** |
| 200 | - * @var float height |
|
| 201 | - */ |
|
| 200 | + * @var float height |
|
| 201 | + */ |
|
| 202 | 202 | public $height; |
| 203 | 203 | public $height_units; |
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | - * @var float surface |
|
| 207 | - */ |
|
| 206 | + * @var float surface |
|
| 207 | + */ |
|
| 208 | 208 | public $surface; |
| 209 | 209 | public $surface_units; |
| 210 | 210 | |
| 211 | 211 | /** |
| 212 | - * @var float volume |
|
| 213 | - */ |
|
| 212 | + * @var float volume |
|
| 213 | + */ |
|
| 214 | 214 | public $volume; |
| 215 | 215 | public $volume_units; |
| 216 | 216 | |