@@ -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 |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | { |
401 | 401 | global $user; |
402 | 402 | |
403 | - dol_syslog(get_only_class($this) . "::deleteline rowid=" . ((int)$this->id), LOG_DEBUG); |
|
403 | + dol_syslog(get_only_class($this) . "::deleteline rowid=" . ((int) $this->id), LOG_DEBUG); |
|
404 | 404 | |
405 | 405 | $error = 0; |
406 | 406 | |
@@ -691,8 +691,7 @@ discard block |
||
691 | 691 | $sql .= " " . ($this->fk_parent_line > 0 ? "'" . $this->db->escape($this->fk_parent_line) . "'" : "null") . ","; |
692 | 692 | $product_label |
693 | 693 | = !empty($this->product_label) |
694 | - ? $this->product_label : |
|
695 | - (!empty($this->label) ? $this->label : null); |
|
694 | + ? $this->product_label : (!empty($this->label) ? $this->label : null); |
|
696 | 695 | $sql .= " " . (!empty($product_label) ? "'" . $this->db->escape($product_label) . "'" : "null") . ","; |
697 | 696 | $sql .= " '" . $this->db->escape($this->desc ? $this->desc : $this->description) . "',"; |
698 | 697 | $sql .= " '" . $this->db->escape($this->ref_supplier) . "',"; |
@@ -143,7 +143,7 @@ |
||
143 | 143 | $this->note_private = $obj->note; |
144 | 144 | $this->type_code = $obj->payment_code; |
145 | 145 | $this->type_label = $obj->payment_type; |
146 | - $this->fk_paiement = $obj->fk_paiement; |
|
146 | + $this->fk_paiement = $obj->fk_paiement; |
|
147 | 147 | $this->statut = $obj->statut; |
148 | 148 | |
149 | 149 | $error = 1; |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | return $this->LibStatut($this->statut, $mode); |
598 | 598 | } |
599 | 599 | |
600 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
600 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
601 | 601 | /** |
602 | 602 | * Return the label of a given status |
603 | 603 | * |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | */ |
608 | 608 | public function LibStatut($status, $mode = 0) |
609 | 609 | { |
610 | - // phpcs:enable |
|
610 | + // phpcs:enable |
|
611 | 611 | global $langs; |
612 | 612 | |
613 | 613 | $langs->load('compta'); |
@@ -894,7 +894,7 @@ discard block |
||
894 | 894 | } |
895 | 895 | |
896 | 896 | |
897 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
897 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
898 | 898 | /** |
899 | 899 | * Load the third party of object, from id into this->thirdparty |
900 | 900 | * |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | */ |
904 | 904 | public function fetch_thirdparty($force_thirdparty_id = 0) |
905 | 905 | { |
906 | - // phpcs:enable |
|
906 | + // phpcs:enable |
|
907 | 907 | |
908 | 908 | if (empty($force_thirdparty_id)) { |
909 | 909 | $billsarray = $this->getBillsArray(); // From payment, the fk_soc isn't available, we should load the first supplier invoice to get him |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
164 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
164 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
165 | 165 | /** |
166 | 166 | * Create a supplier category |
167 | 167 | * |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function CreateCategory($user, $name) |
173 | 173 | { |
174 | - // phpcs:enable |
|
174 | + // phpcs:enable |
|
175 | 175 | $sql = "INSERT INTO " . MAIN_DB_PREFIX . "categorie (label,visible,type)"; |
176 | 176 | $sql .= " VALUES "; |
177 | 177 | $sql .= " ('" . $this->db->escape($name) . "',1,1)"; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
191 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
191 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
192 | 192 | /** |
193 | 193 | * Return the suppliers list |
194 | 194 | * |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function ListArray() |
198 | 198 | { |
199 | - // phpcs:enable |
|
199 | + // phpcs:enable |
|
200 | 200 | global $conf; |
201 | 201 | global $user; |
202 | 202 |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | return $this->fetch_lines(); |
700 | 700 | } |
701 | 701 | |
702 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
702 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
703 | 703 | /** |
704 | 704 | * Get lines of template invoices into this->lines |
705 | 705 | * |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | */ |
708 | 708 | public function fetch_lines() |
709 | 709 | { |
710 | - // phpcs:enable |
|
710 | + // phpcs:enable |
|
711 | 711 | $this->lines = array(); |
712 | 712 | |
713 | 713 | // Retrieve all extrafield for line |
@@ -1512,7 +1512,7 @@ discard block |
||
1512 | 1512 | return $this->LibStatut($this->frequency ? 1 : 0, $this->suspended, $mode, $alreadypaid, empty($this->type) ? 0 : $this->type); |
1513 | 1513 | } |
1514 | 1514 | |
1515 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1515 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1516 | 1516 | /** |
1517 | 1517 | * Return label of a status |
1518 | 1518 | * |
@@ -1525,7 +1525,7 @@ discard block |
||
1525 | 1525 | */ |
1526 | 1526 | public function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0) |
1527 | 1527 | { |
1528 | - // phpcs:enable |
|
1528 | + // phpcs:enable |
|
1529 | 1529 | global $langs; |
1530 | 1530 | $langs->load('bills'); |
1531 | 1531 |
@@ -352,13 +352,13 @@ discard block |
||
352 | 352 | $sql .= ", '" . $this->db->idate($now) . "'"; |
353 | 353 | $sql .= ", " . ((int) $this->suspended); |
354 | 354 | $sql .= ", '" . $this->db->escape($this->libelle) . "'"; |
355 | - $sql .= ", " . (!empty($facfourn_src->total_ttc) ? (float) $facfourn_src->total_ttc : '0'); // amount |
|
355 | + $sql .= ", " . (!empty($facfourn_src->total_ttc) ? (float) $facfourn_src->total_ttc : '0'); // amount |
|
356 | 356 | $sql .= ", " . ((int) $user->id); |
357 | 357 | $sql .= ", " . (!empty($this->fk_project) ? ((int) $this->fk_project) : 'NULL'); |
358 | 358 | $sql .= ", " . (!empty($facfourn_src->fk_account) ? ((int) $facfourn_src->fk_account) : 'NULL'); |
359 | 359 | $sql .= ", " . ($this->cond_reglement_id > 0 ? (int) $this->cond_reglement_id : 'NULL'); |
360 | 360 | $sql .= ", " . ($this->mode_reglement_id > 0 ? (int) $this->mode_reglement_id : 'NULL'); |
361 | - $sql .= ", " . ($facfourn_src->date_echeance > 0 ? "'" . $this->db->idate($facfourn_src->date_echeance) . "'" : 'NULL'); // date_lim_reglement |
|
361 | + $sql .= ", " . ($facfourn_src->date_echeance > 0 ? "'" . $this->db->idate($facfourn_src->date_echeance) . "'" : 'NULL'); // date_lim_reglement |
|
362 | 362 | $sql .= ", " . (!empty($this->note_private) ? "'" . $this->db->escape($this->note_private) . "'" : 'NULL'); |
363 | 363 | $sql .= ", " . (!empty($this->note_public) ? "'" . $this->db->escape($this->note_public) . "'" : 'NULL'); |
364 | 364 | $sql .= ", " . (!empty($this->model_pdf) ? "'" . $this->db->escape($this->model_pdf) . "'" : 'NULL'); |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | $error = 0; |
514 | 514 | |
515 | 515 | $sql = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_rec SET"; |
516 | - $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "") . "'," ; |
|
516 | + $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "") . "',"; |
|
517 | 517 | $sql .= " subtype=" . (isset($this->subtype) ? $this->db->escape($this->subtype) : "null") . ","; |
518 | 518 | $sql .= " ref_supplier = '" . (!empty($this->ref_supplier) ? $this->db->escape($this->ref_supplier) : "") . "',"; |
519 | 519 | $sql .= " entity = " . (!empty($this->entity) ? ((int) $this->entity) : 1) . ','; |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | $this->id = $obj->rowid; |
632 | 632 | $this->titre = $obj->title; |
633 | 633 | $this->title = $obj->title; |
634 | - $this->subtype = $obj->subtype; |
|
634 | + $this->subtype = $obj->subtype; |
|
635 | 635 | $this->ref = $obj->title; |
636 | 636 | $this->ref_supplier = $obj->ref_supplier; |
637 | 637 | $this->entity = $obj->entity; |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | $line->product_type = $objp->product_type; |
790 | 790 | $line->date_start = $objp->date_start; |
791 | 791 | $line->date_end = $objp->date_end; |
792 | - $line->info_bits = $objp->info_bits ; |
|
792 | + $line->info_bits = $objp->info_bits; |
|
793 | 793 | $line->special_code = $objp->special_code; |
794 | 794 | $line->rang = $objp->rang; |
795 | 795 | $line->fk_unit = $objp->fk_unit; |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | { |
832 | 832 | $rowid = $this->id; |
833 | 833 | |
834 | - dol_syslog(get_only_class($this) . "::delete rowid=" . ((int)$rowid), LOG_DEBUG); |
|
834 | + dol_syslog(get_only_class($this) . "::delete rowid=" . ((int) $rowid), LOG_DEBUG); |
|
835 | 835 | |
836 | 836 | $error = 0; |
837 | 837 | $this->db->begin(); |
@@ -872,7 +872,7 @@ discard block |
||
872 | 872 | } |
873 | 873 | // End call triggers |
874 | 874 | } |
875 | - if (! $error) { |
|
875 | + if (!$error) { |
|
876 | 876 | $this->db->commit(); |
877 | 877 | return 1; |
878 | 878 | } else { |
@@ -1016,7 +1016,7 @@ discard block |
||
1016 | 1016 | $sql .= ', fk_user_author'; |
1017 | 1017 | $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; |
1018 | 1018 | $sql .= ') VALUES ('; |
1019 | - $sql .= ' ' . (int) $facid; // source supplier invoice id |
|
1019 | + $sql .= ' ' . (int) $facid; // source supplier invoice id |
|
1020 | 1020 | $sql .= ', ' . (!empty($fk_product) ? "'" . $this->db->escape($fk_product) . "'" : 'null'); |
1021 | 1021 | $sql .= ', ' . (!empty($ref) ? "'" . $this->db->escape($ref) . "'" : 'null'); |
1022 | 1022 | $sql .= ', ' . (!empty($label) ? "'" . $this->db->escape($label) . "'" : 'null'); |
@@ -1357,7 +1357,7 @@ discard block |
||
1357 | 1357 | |
1358 | 1358 | $new_fac_fourn->type = self::TYPE_STANDARD; |
1359 | 1359 | $new_fac_fourn->subtype = $facturerec->subtype; |
1360 | - $new_fac_fourn->statut = self::STATUS_DRAFT; // deprecated |
|
1360 | + $new_fac_fourn->statut = self::STATUS_DRAFT; // deprecated |
|
1361 | 1361 | $new_fac_fourn->status = self::STATUS_DRAFT; |
1362 | 1362 | $new_fac_fourn->date = empty($facturerec->date_when) ? $now : $facturerec->date_when; // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later. |
1363 | 1363 | $new_fac_fourn->socid = $facturerec->socid; |
@@ -1366,7 +1366,7 @@ discard block |
||
1366 | 1366 | $new_fac_fourn->model_pdf = $facturerec->model_pdf; |
1367 | 1367 | $new_fac_fourn->fk_project = $facturerec->fk_project; |
1368 | 1368 | $new_fac_fourn->label = $facturerec->label; |
1369 | - $new_fac_fourn->libelle = $facturerec->label; // deprecated |
|
1369 | + $new_fac_fourn->libelle = $facturerec->label; // deprecated |
|
1370 | 1370 | |
1371 | 1371 | $invoiceidgenerated = $new_fac_fourn->create($user); |
1372 | 1372 | $laststep = "Create invoiceidgenerated $invoiceidgenerated"; |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | } |
607 | 607 | } |
608 | 608 | |
609 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
609 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
610 | 610 | /** |
611 | 611 | * Load array lines |
612 | 612 | * |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | */ |
616 | 616 | public function fetch_lines($only_product = 0) |
617 | 617 | { |
618 | - // phpcs:enable |
|
618 | + // phpcs:enable |
|
619 | 619 | |
620 | 620 | $this->lines = array(); |
621 | 621 | |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | return $this->LibStatut($this->statut, $mode, $this->billed); |
881 | 881 | } |
882 | 882 | |
883 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
883 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
884 | 884 | /** |
885 | 885 | * Return label of a status |
886 | 886 | * |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | */ |
892 | 892 | public function LibStatut($status, $mode = 0, $billed = 0) |
893 | 893 | { |
894 | - // phpcs:enable |
|
894 | + // phpcs:enable |
|
895 | 895 | global $langs, $hookmanager; |
896 | 896 | |
897 | 897 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | return $result; |
1390 | 1390 | } |
1391 | 1391 | |
1392 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1392 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1393 | 1393 | /** |
1394 | 1394 | * Cancel an approved order. |
1395 | 1395 | * The cancellation is done after approval |
@@ -1400,7 +1400,7 @@ discard block |
||
1400 | 1400 | */ |
1401 | 1401 | public function Cancel($user, $idwarehouse = -1) |
1402 | 1402 | { |
1403 | - // phpcs:enable |
|
1403 | + // phpcs:enable |
|
1404 | 1404 | global $langs, $conf; |
1405 | 1405 | |
1406 | 1406 | $error = 0; |
@@ -2537,7 +2537,7 @@ discard block |
||
2537 | 2537 | return $ret; |
2538 | 2538 | } |
2539 | 2539 | |
2540 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2540 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2541 | 2541 | /** |
2542 | 2542 | * Set a delivery in database for this supplier order |
2543 | 2543 | * |
@@ -2549,7 +2549,7 @@ discard block |
||
2549 | 2549 | */ |
2550 | 2550 | public function Livraison($user, $date, $type, $comment) |
2551 | 2551 | { |
2552 | - // phpcs:enable |
|
2552 | + // phpcs:enable |
|
2553 | 2553 | global $conf, $langs; |
2554 | 2554 | |
2555 | 2555 | $result = 0; |
@@ -2651,7 +2651,7 @@ discard block |
||
2651 | 2651 | return $result; |
2652 | 2652 | } |
2653 | 2653 | |
2654 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2654 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2655 | 2655 | /** |
2656 | 2656 | * Set delivery date |
2657 | 2657 | * |
@@ -2663,7 +2663,7 @@ discard block |
||
2663 | 2663 | */ |
2664 | 2664 | public function set_date_livraison($user, $delivery_date, $notrigger = 0) |
2665 | 2665 | { |
2666 | - // phpcs:enable |
|
2666 | + // phpcs:enable |
|
2667 | 2667 | return $this->setDeliveryDate($user, $delivery_date, $notrigger); |
2668 | 2668 | } |
2669 | 2669 | |
@@ -2723,7 +2723,7 @@ discard block |
||
2723 | 2723 | } |
2724 | 2724 | } |
2725 | 2725 | |
2726 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2726 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2727 | 2727 | /** |
2728 | 2728 | * Set the id projet |
2729 | 2729 | * |
@@ -2734,7 +2734,7 @@ discard block |
||
2734 | 2734 | */ |
2735 | 2735 | public function set_id_projet($user, $id_projet, $notrigger = 0) |
2736 | 2736 | { |
2737 | - // phpcs:enable |
|
2737 | + // phpcs:enable |
|
2738 | 2738 | if ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")) { |
2739 | 2739 | $error = 0; |
2740 | 2740 | |
@@ -3242,7 +3242,7 @@ discard block |
||
3242 | 3242 | } |
3243 | 3243 | } |
3244 | 3244 | |
3245 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3245 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
3246 | 3246 | /** |
3247 | 3247 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
3248 | 3248 | * |
@@ -3252,7 +3252,7 @@ discard block |
||
3252 | 3252 | */ |
3253 | 3253 | public function load_board($user, $mode = 'opened') |
3254 | 3254 | { |
3255 | - // phpcs:enable |
|
3255 | + // phpcs:enable |
|
3256 | 3256 | global $conf, $langs; |
3257 | 3257 | |
3258 | 3258 | $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date, c.total_ht"; |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | $this->ref_supplier = $obj->ref_supplier; |
524 | 524 | $this->socid = $obj->fk_soc; |
525 | 525 | $this->fourn_id = $obj->fk_soc; |
526 | - $this->statut = $obj->status; // deprecated |
|
526 | + $this->statut = $obj->status; // deprecated |
|
527 | 527 | $this->status = $obj->status; |
528 | 528 | $this->billed = $obj->billed; |
529 | 529 | $this->user_author_id = $obj->user_author_id; |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $this->fk_project = $obj->fk_project; |
555 | 555 | $this->cond_reglement_id = $obj->fk_cond_reglement; |
556 | 556 | $this->cond_reglement_code = $obj->cond_reglement_code; |
557 | - $this->cond_reglement = $obj->cond_reglement_label; // deprecated |
|
557 | + $this->cond_reglement = $obj->cond_reglement_label; // deprecated |
|
558 | 558 | $this->cond_reglement_label = $obj->cond_reglement_label; |
559 | 559 | $this->cond_reglement_doc = $obj->cond_reglement_doc; |
560 | 560 | $this->fk_account = $obj->fk_account; |
@@ -687,10 +687,10 @@ discard block |
||
687 | 687 | $sqlsearchpackage .= ' WHERE entity IN (' . getEntity('product_fournisseur_price') . ")"; |
688 | 688 | $sqlsearchpackage .= " AND fk_product = " . ((int) $objp->fk_product); |
689 | 689 | $sqlsearchpackage .= " AND ref_fourn = '" . $this->db->escape($objp->ref_supplier) . "'"; |
690 | - $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified |
|
691 | - $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified |
|
690 | + $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified |
|
691 | + $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified |
|
692 | 692 | $sqlsearchpackage .= " AND fk_soc = " . ((int) $this->socid); |
693 | - $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first |
|
693 | + $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first |
|
694 | 694 | $sqlsearchpackage .= " LIMIT 1"; |
695 | 695 | |
696 | 696 | $resqlsearchpackage = $this->db->query($sqlsearchpackage); |
@@ -1626,10 +1626,10 @@ discard block |
||
1626 | 1626 | $line->date_end, |
1627 | 1627 | $line->array_options, |
1628 | 1628 | $line->fk_unit, |
1629 | - $line->multicurrency_subprice, // pu_ht_devise |
|
1630 | - $line->origin, // origin |
|
1631 | - $line->origin_id, // origin_id |
|
1632 | - $line->rang, // rang |
|
1629 | + $line->multicurrency_subprice, // pu_ht_devise |
|
1630 | + $line->origin, // origin |
|
1631 | + $line->origin_id, // origin_id |
|
1632 | + $line->rang, // rang |
|
1633 | 1633 | $line->special_code |
1634 | 1634 | ); |
1635 | 1635 | if ($result < 0) { |
@@ -2003,7 +2003,7 @@ discard block |
||
2003 | 2003 | $this->db->begin(); |
2004 | 2004 | |
2005 | 2005 | $product_type = $type; |
2006 | - $label = ''; // deprecated |
|
2006 | + $label = ''; // deprecated |
|
2007 | 2007 | |
2008 | 2008 | if ($fk_product > 0) { |
2009 | 2009 | if (getDolGlobalString('SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY')) { // Not the common case |
@@ -2146,7 +2146,7 @@ discard block |
||
2146 | 2146 | $this->line->total_localtax2 = $total_localtax2; |
2147 | 2147 | $this->line->total_ttc = $total_ttc; |
2148 | 2148 | $this->line->product_type = $type; |
2149 | - $this->line->special_code = (!empty($special_code) ? $special_code : 0); |
|
2149 | + $this->line->special_code = (!empty($special_code) ? $special_code : 0); |
|
2150 | 2150 | $this->line->origin = $origin; |
2151 | 2151 | $this->line->origin_id = $origin_id; |
2152 | 2152 | $this->line->fk_unit = $fk_unit; |
@@ -3353,7 +3353,7 @@ discard block |
||
3353 | 3353 | global $conf, $langs; |
3354 | 3354 | |
3355 | 3355 | if (!dol_strlen($modele)) { |
3356 | - $modele = ''; // No doc template/generation by default |
|
3356 | + $modele = ''; // No doc template/generation by default |
|
3357 | 3357 | |
3358 | 3358 | if (!empty($this->model_pdf)) { |
3359 | 3359 | $modele = $this->model_pdf; |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | ); |
713 | 713 | } |
714 | 714 | |
715 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
715 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
716 | 716 | /** |
717 | 717 | * Clean sensible object datas |
718 | 718 | * |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | */ |
722 | 722 | protected function _cleanObjectDatas($object) |
723 | 723 | { |
724 | - // phpcs:enable |
|
724 | + // phpcs:enable |
|
725 | 725 | $object = parent::_cleanObjectDatas($object); |
726 | 726 | |
727 | 727 | unset($object->rowid); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | } |
717 | 717 | } |
718 | 718 | |
719 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
719 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
720 | 720 | /** |
721 | 721 | * Clean sensible object datas |
722 | 722 | * |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | */ |
726 | 726 | protected function _cleanObjectDatas($object) |
727 | 727 | { |
728 | - // phpcs:enable |
|
728 | + // phpcs:enable |
|
729 | 729 | $object = parent::_cleanObjectDatas($object); |
730 | 730 | |
731 | 731 | unset($object->rowid); |
@@ -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; |
@@ -336,7 +336,7 @@ |
||
336 | 336 | } elseif ($mode == 'mon' || $mode == 'EX_MON') { |
337 | 337 | $sql .= " AND DATE_FORMAT(d.date, '%Y-%m') = '" . dol_print_date($this->date, '%Y-%m') . "'"; // @todo DATE_FORMAT is forbidden |
338 | 338 | } elseif ($mode == 'year' || $mode == 'EX_YEA') { |
339 | - $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'"; // @todo DATE_FORMAT is forbidden |
|
339 | + $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'"; // @todo DATE_FORMAT is forbidden |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | dol_syslog('ExpenseReportLine::getExpAmount'); |