@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | return $this->LibStatut($this->status, $mode); |
362 | 362 | } |
363 | 363 | |
364 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
364 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
365 | 365 | /** |
366 | 366 | * Return the status |
367 | 367 | * |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function LibStatut($status, $mode = 0) |
373 | 373 | { |
374 | - // phpcs:enable |
|
374 | + // phpcs:enable |
|
375 | 375 | if (empty($this->labelStatus)) { |
376 | 376 | global $langs; |
377 | 377 | //$langs->load("emailcollector"); |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | return $this->LibStatut($this->status, $mode); |
362 | 362 | } |
363 | 363 | |
364 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
364 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
365 | 365 | /** |
366 | 366 | * Return the status |
367 | 367 | * |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function LibStatut($status, $mode = 0) |
373 | 373 | { |
374 | - // phpcs:enable |
|
374 | + // phpcs:enable |
|
375 | 375 | if (empty($this->labelStatus)) { |
376 | 376 | global $langs; |
377 | 377 | //$langs->load("emailcollector"); |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
19 | 19 | */ |
20 | 20 | |
21 | - use Luracast\Restler\RestException; |
|
21 | + use Luracast\Restler\RestException; |
|
22 | 22 | |
23 | - require_once constant('DOL_DOCUMENT_ROOT') . '/expedition/class/expedition.class.php'; |
|
23 | + require_once constant('DOL_DOCUMENT_ROOT') . '/expedition/class/expedition.class.php'; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * API class for shipments |
@@ -640,15 +640,15 @@ discard block |
||
640 | 640 | */ |
641 | 641 | |
642 | 642 | /** |
643 | - * Close a shipment (Classify it as "Delivered") |
|
644 | - * |
|
645 | - * @param int $id Expedition ID |
|
646 | - * @param int $notrigger Disabled triggers |
|
647 | - * |
|
648 | - * @url POST {id}/close |
|
649 | - * |
|
650 | - * @return object |
|
651 | - */ |
|
643 | + * Close a shipment (Classify it as "Delivered") |
|
644 | + * |
|
645 | + * @param int $id Expedition ID |
|
646 | + * @param int $notrigger Disabled triggers |
|
647 | + * |
|
648 | + * @url POST {id}/close |
|
649 | + * |
|
650 | + * @return object |
|
651 | + */ |
|
652 | 652 | public function close($id, $notrigger = 0) |
653 | 653 | { |
654 | 654 | if (!DolibarrApiAccess::$user->hasRight('expedition', 'creer')) { |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | return $this->_cleanObjectDatas($this->shipment); |
681 | 681 | } |
682 | 682 | |
683 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
683 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
684 | 684 | /** |
685 | 685 | * Clean sensible object datas |
686 | 686 | * |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | */ |
690 | 690 | protected function _cleanObjectDatas($object) |
691 | 691 | { |
692 | - // phpcs:enable |
|
692 | + // phpcs:enable |
|
693 | 693 | $object = parent::_cleanObjectDatas($object); |
694 | 694 | |
695 | 695 | unset($object->canvas); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | } |
517 | 517 | } |
518 | 518 | |
519 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
519 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
520 | 520 | /** |
521 | 521 | * Create a expedition line |
522 | 522 | * |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | */ |
530 | 530 | public function create_line($entrepot_id, $origin_line_id, $qty, $rang = 0, $array_options = []) |
531 | 531 | { |
532 | - //phpcs:enable |
|
532 | + //phpcs:enable |
|
533 | 533 | global $user; |
534 | 534 | |
535 | 535 | $expeditionline = new ExpeditionLigne($this->db); |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | } |
549 | 549 | |
550 | 550 | |
551 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
551 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
552 | 552 | /** |
553 | 553 | * Create the detail of the expedition line. Create 1 record into expeditiondet for each warehouse and n record for each lot in this warehouse into expeditiondet_batch. |
554 | 554 | * |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | */ |
559 | 559 | public function create_line_batch($line_ext, $array_options = []) |
560 | 560 | { |
561 | - // phpcs:enable |
|
561 | + // phpcs:enable |
|
562 | 562 | $error = 0; |
563 | 563 | $stockLocationQty = array(); // associated array with batch qty in stock location |
564 | 564 | |
@@ -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 | * Create a delivery receipt from a shipment |
896 | 896 | * |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | */ |
900 | 900 | public function create_delivery($user) |
901 | 901 | { |
902 | - // phpcs:enable |
|
902 | + // phpcs:enable |
|
903 | 903 | global $conf; |
904 | 904 | |
905 | 905 | if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) { |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | return 1; |
1011 | 1011 | } |
1012 | 1012 | |
1013 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1013 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1014 | 1014 | /** |
1015 | 1015 | * Add a shipment line with batch record |
1016 | 1016 | * |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | */ |
1021 | 1021 | public function addline_batch($dbatch, $array_options = []) |
1022 | 1022 | { |
1023 | - // phpcs:enable |
|
1023 | + // phpcs:enable |
|
1024 | 1024 | global $conf, $langs; |
1025 | 1025 | |
1026 | 1026 | $num = count($this->lines); |
@@ -1617,7 +1617,7 @@ discard block |
||
1617 | 1617 | } |
1618 | 1618 | } |
1619 | 1619 | |
1620 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1620 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1621 | 1621 | /** |
1622 | 1622 | * Load lines |
1623 | 1623 | * |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | */ |
1626 | 1626 | public function fetch_lines() |
1627 | 1627 | { |
1628 | - // phpcs:enable |
|
1628 | + // phpcs:enable |
|
1629 | 1629 | global $mysoc; |
1630 | 1630 | |
1631 | 1631 | $this->lines = array(); |
@@ -1983,7 +1983,7 @@ discard block |
||
1983 | 1983 | return $this->LibStatut($this->statut, $mode); |
1984 | 1984 | } |
1985 | 1985 | |
1986 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1986 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1987 | 1987 | /** |
1988 | 1988 | * Return label of a status |
1989 | 1989 | * |
@@ -1993,7 +1993,7 @@ discard block |
||
1993 | 1993 | */ |
1994 | 1994 | public function LibStatut($status, $mode) |
1995 | 1995 | { |
1996 | - // phpcs:enable |
|
1996 | + // phpcs:enable |
|
1997 | 1997 | global $langs; |
1998 | 1998 | |
1999 | 1999 | $labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]); |
@@ -2113,7 +2113,7 @@ discard block |
||
2113 | 2113 | return 1; |
2114 | 2114 | } |
2115 | 2115 | |
2116 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2116 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2117 | 2117 | /** |
2118 | 2118 | * Set delivery date |
2119 | 2119 | * |
@@ -2124,7 +2124,7 @@ discard block |
||
2124 | 2124 | */ |
2125 | 2125 | public function set_date_livraison($user, $delivery_date) |
2126 | 2126 | { |
2127 | - // phpcs:enable |
|
2127 | + // phpcs:enable |
|
2128 | 2128 | return $this->setDeliveryDate($user, $delivery_date); |
2129 | 2129 | } |
2130 | 2130 | |
@@ -2156,7 +2156,7 @@ discard block |
||
2156 | 2156 | } |
2157 | 2157 | } |
2158 | 2158 | |
2159 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2159 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2160 | 2160 | /** |
2161 | 2161 | * Fetch deliveries method and return an array. Load array this->meths(rowid=>label). |
2162 | 2162 | * |
@@ -2164,7 +2164,7 @@ discard block |
||
2164 | 2164 | */ |
2165 | 2165 | public function fetch_delivery_methods() |
2166 | 2166 | { |
2167 | - // phpcs:enable |
|
2167 | + // phpcs:enable |
|
2168 | 2168 | global $langs; |
2169 | 2169 | $this->meths = array(); |
2170 | 2170 | |
@@ -2182,7 +2182,7 @@ discard block |
||
2182 | 2182 | } |
2183 | 2183 | } |
2184 | 2184 | |
2185 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2185 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2186 | 2186 | /** |
2187 | 2187 | * Fetch all deliveries method and return an array. Load array this->listmeths. |
2188 | 2188 | * |
@@ -2191,7 +2191,7 @@ discard block |
||
2191 | 2191 | */ |
2192 | 2192 | public function list_delivery_methods($id = 0) |
2193 | 2193 | { |
2194 | - // phpcs:enable |
|
2194 | + // phpcs:enable |
|
2195 | 2195 | global $langs; |
2196 | 2196 | |
2197 | 2197 | $this->listmeths = array(); |
@@ -2802,43 +2802,43 @@ discard block |
||
2802 | 2802 | public $product_type = 0; |
2803 | 2803 | |
2804 | 2804 | /** |
2805 | - * @var int rang of line |
|
2806 | - */ |
|
2805 | + * @var int rang of line |
|
2806 | + */ |
|
2807 | 2807 | public $rang; |
2808 | 2808 | |
2809 | 2809 | /** |
2810 | - * @var float weight |
|
2811 | - */ |
|
2810 | + * @var float weight |
|
2811 | + */ |
|
2812 | 2812 | public $weight; |
2813 | 2813 | public $weight_units; |
2814 | 2814 | |
2815 | 2815 | /** |
2816 | - * @var float length |
|
2817 | - */ |
|
2816 | + * @var float length |
|
2817 | + */ |
|
2818 | 2818 | public $length; |
2819 | 2819 | public $length_units; |
2820 | 2820 | |
2821 | 2821 | /** |
2822 | - * @var float width |
|
2823 | - */ |
|
2822 | + * @var float width |
|
2823 | + */ |
|
2824 | 2824 | public $width; |
2825 | 2825 | public $width_units; |
2826 | 2826 | |
2827 | 2827 | /** |
2828 | - * @var float height |
|
2829 | - */ |
|
2828 | + * @var float height |
|
2829 | + */ |
|
2830 | 2830 | public $height; |
2831 | 2831 | public $height_units; |
2832 | 2832 | |
2833 | 2833 | /** |
2834 | - * @var float surface |
|
2835 | - */ |
|
2834 | + * @var float surface |
|
2835 | + */ |
|
2836 | 2836 | public $surface; |
2837 | 2837 | public $surface_units; |
2838 | 2838 | |
2839 | 2839 | /** |
2840 | - * @var float volume |
|
2841 | - */ |
|
2840 | + * @var float volume |
|
2841 | + */ |
|
2842 | 2842 | public $volume; |
2843 | 2843 | public $volume_units; |
2844 | 2844 |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | return $this->LibStatut($this->status, $mode); |
787 | 787 | } |
788 | 788 | |
789 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
789 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
790 | 790 | /** |
791 | 791 | * Return the status |
792 | 792 | * |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | */ |
797 | 797 | public function LibStatut($status, $mode = 0) |
798 | 798 | { |
799 | - // phpcs:enable |
|
799 | + // phpcs:enable |
|
800 | 800 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
801 | 801 | global $langs; |
802 | 802 | //$langs->load("hrm"); |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | return $this->LibStatut($this->status, $mode); |
787 | 787 | } |
788 | 788 | |
789 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
789 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
790 | 790 | /** |
791 | 791 | * Return the status |
792 | 792 | * |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | */ |
797 | 797 | public function LibStatut($status, $mode = 0) |
798 | 798 | { |
799 | - // phpcs:enable |
|
799 | + // phpcs:enable |
|
800 | 800 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
801 | 801 | global $langs; |
802 | 802 | //$langs->load("hrm"); |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | return $this->LibStatut($this->status, $mode); |
874 | 874 | } |
875 | 875 | |
876 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
876 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
877 | 877 | /** |
878 | 878 | * Return the status |
879 | 879 | * |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | $status = 0; |
888 | 888 | } |
889 | 889 | |
890 | - // phpcs:enable |
|
890 | + // phpcs:enable |
|
891 | 891 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
892 | 892 | global $langs; |
893 | 893 | //$langs->load("hrm"); |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | return $this->LibStatut($this->status, $mode); |
639 | 639 | } |
640 | 640 | |
641 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
641 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
642 | 642 | /** |
643 | 643 | * Return the status |
644 | 644 | * |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | */ |
649 | 649 | public function LibStatut($status, $mode = 0) |
650 | 650 | { |
651 | - // phpcs:enable |
|
651 | + // phpcs:enable |
|
652 | 652 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
653 | 653 | global $langs; |
654 | 654 | //$langs->load("mymodule"); |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | return $this->LibStatut($this->status, $mode); |
787 | 787 | } |
788 | 788 | |
789 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
789 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
790 | 790 | /** |
791 | 791 | * Return the status |
792 | 792 | * |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | */ |
797 | 797 | public function LibStatut($status, $mode = 0) |
798 | 798 | { |
799 | - // phpcs:enable |
|
799 | + // phpcs:enable |
|
800 | 800 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
801 | 801 | global $langs; |
802 | 802 | //$langs->load("hrm"); |