@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | |
718 | 718 | |
719 | 719 | |
720 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
720 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
721 | 721 | /** |
722 | 722 | * Clean sensible object datas |
723 | 723 | * |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | */ |
727 | 727 | protected function _cleanObjectDatas($object) |
728 | 728 | { |
729 | - // phpcs:enable |
|
729 | + // phpcs:enable |
|
730 | 730 | $object = parent::_cleanObjectDatas($object); |
731 | 731 | |
732 | 732 | unset($object->fk_statut); |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | return $this->LibStatut($this->statut, $mode); |
196 | 196 | } |
197 | 197 | |
198 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
198 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
199 | 199 | /** |
200 | 200 | * Return the label of a given status |
201 | 201 | * |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public function LibStatut($status, $mode = 0) |
207 | 207 | { |
208 | - // phpcs:enable |
|
208 | + // phpcs:enable |
|
209 | 209 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
210 | 210 | global $langs; |
211 | 211 | $langs->load("donations"); |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | return $this->valid_promesse($this->id, $user->id, $notrigger); |
732 | 732 | } |
733 | 733 | |
734 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
734 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
735 | 735 | /** |
736 | 736 | * Validate a promise of donation |
737 | 737 | * |
@@ -742,7 +742,7 @@ discard block |
||
742 | 742 | */ |
743 | 743 | public function valid_promesse($id, $userid, $notrigger = 0) |
744 | 744 | { |
745 | - // phpcs:enable |
|
745 | + // phpcs:enable |
|
746 | 746 | global $user; |
747 | 747 | |
748 | 748 | $error = 0; |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | } |
809 | 809 | } |
810 | 810 | |
811 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
811 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
812 | 812 | /** |
813 | 813 | * Set donation to status cancelled |
814 | 814 | * |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | */ |
818 | 818 | public function set_cancel($id) |
819 | 819 | { |
820 | - // phpcs:enable |
|
820 | + // phpcs:enable |
|
821 | 821 | $sql = "UPDATE " . MAIN_DB_PREFIX . "don SET fk_statut = -1 WHERE rowid = " . ((int) $id); |
822 | 822 | |
823 | 823 | $resql = $this->db->query($sql); |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'DON_REOPEN'); |
852 | 852 | } |
853 | 853 | |
854 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
854 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
855 | 855 | /** |
856 | 856 | * Sum of donations |
857 | 857 | * |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | */ |
861 | 861 | public function sum_donations($param) |
862 | 862 | { |
863 | - // phpcs:enable |
|
863 | + // phpcs:enable |
|
864 | 864 | global $conf; |
865 | 865 | |
866 | 866 | $result = 0; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | return $this->_cleanObjectDatas($this->don); |
341 | 341 | } |
342 | 342 | |
343 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
343 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
344 | 344 | /** |
345 | 345 | * Clean sensible object datas |
346 | 346 | * |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | */ |
350 | 350 | protected function _cleanObjectDatas($object) |
351 | 351 | { |
352 | - // phpcs:enable |
|
352 | + // phpcs:enable |
|
353 | 353 | $object = parent::_cleanObjectDatas($object); |
354 | 354 | |
355 | 355 | unset($object->note); |
@@ -45,8 +45,8 @@ |
||
45 | 45 | public $qty; |
46 | 46 | public $dluo_qty; // deprecated, use qty |
47 | 47 | public $entrepot_id; |
48 | - public $fk_origin_stock; // rowid in llx_product_batch table (not useful) |
|
49 | - public $fk_warehouse; // warehouse ID |
|
48 | + public $fk_origin_stock; // rowid in llx_product_batch table (not useful) |
|
49 | + public $fk_warehouse; // warehouse ID |
|
50 | 50 | public $fk_expeditiondet; |
51 | 51 | |
52 | 52 |
@@ -643,15 +643,15 @@ discard block |
||
643 | 643 | */ |
644 | 644 | |
645 | 645 | /** |
646 | - * Close a shipment (Classify it as "Delivered") |
|
647 | - * |
|
648 | - * @param int $id Expedition ID |
|
649 | - * @param int $notrigger Disabled triggers |
|
650 | - * |
|
651 | - * @url POST {id}/close |
|
652 | - * |
|
653 | - * @return object |
|
654 | - */ |
|
646 | + * Close a shipment (Classify it as "Delivered") |
|
647 | + * |
|
648 | + * @param int $id Expedition ID |
|
649 | + * @param int $notrigger Disabled triggers |
|
650 | + * |
|
651 | + * @url POST {id}/close |
|
652 | + * |
|
653 | + * @return object |
|
654 | + */ |
|
655 | 655 | public function close($id, $notrigger = 0) |
656 | 656 | { |
657 | 657 | if (!DolibarrApiAccess::$user->hasRight('expedition', 'creer')) { |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | return $this->_cleanObjectDatas($this->shipment); |
684 | 684 | } |
685 | 685 | |
686 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
686 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
687 | 687 | /** |
688 | 688 | * Clean sensible object datas |
689 | 689 | * |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | */ |
693 | 693 | protected function _cleanObjectDatas($object) |
694 | 694 | { |
695 | - // phpcs:enable |
|
695 | + // phpcs:enable |
|
696 | 696 | $object = parent::_cleanObjectDatas($object); |
697 | 697 | |
698 | 698 | unset($object->canvas); |
@@ -203,11 +203,11 @@ |
||
203 | 203 | $shipmentline = new ExpeditionLigne($this->db); |
204 | 204 | |
205 | 205 | $shipmentline->entrepot_id = $line['entrepot_id']; |
206 | - $shipmentline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: order id. this->origin is 'commande' |
|
207 | - $shipmentline->origin_line_id = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order id |
|
208 | - $shipmentline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order line id |
|
209 | - $shipmentline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
210 | - $shipmentline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
206 | + $shipmentline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: order id. this->origin is 'commande' |
|
207 | + $shipmentline->origin_line_id = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order id |
|
208 | + $shipmentline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order line id |
|
209 | + $shipmentline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
210 | + $shipmentline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
211 | 211 | $shipmentline->qty = $line['qty']; |
212 | 212 | $shipmentline->rang = $line['rang']; |
213 | 213 | $shipmentline->array_options = $line['array_options']; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | } |
273 | 273 | |
274 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
274 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
275 | 275 | /** |
276 | 276 | * Create a line |
277 | 277 | * |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | */ |
285 | 285 | public function create_line($origin_id, $qty, $fk_product, $description, $array_options = []) |
286 | 286 | { |
287 | - // phpcs:enable |
|
287 | + // phpcs:enable |
|
288 | 288 | $error = 0; |
289 | 289 | $idprod = $fk_product; |
290 | 290 | |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | } |
547 | 547 | } |
548 | 548 | |
549 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
549 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
550 | 550 | /** |
551 | 551 | * Creating the delivery slip from an existing shipment |
552 | 552 | * |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | */ |
557 | 557 | public function create_from_sending($user, $sending_id) |
558 | 558 | { |
559 | - // phpcs:enable |
|
559 | + // phpcs:enable |
|
560 | 560 | global $conf; |
561 | 561 | |
562 | 562 | $expedition = new Expedition($this->db); |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | return $this->create($user); |
599 | 599 | } |
600 | 600 | |
601 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
601 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
602 | 602 | /** |
603 | 603 | * Update a livraison line (only extrafields) |
604 | 604 | * |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | */ |
609 | 609 | public function update_line($id, $array_options = []) |
610 | 610 | { |
611 | - // phpcs:enable |
|
611 | + // phpcs:enable |
|
612 | 612 | global $conf; |
613 | 613 | $error = 0; |
614 | 614 | |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | return $result; |
841 | 841 | } |
842 | 842 | |
843 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
843 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
844 | 844 | /** |
845 | 845 | * Load lines insto $this->lines. |
846 | 846 | * |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | */ |
849 | 849 | public function fetch_lines() |
850 | 850 | { |
851 | - // phpcs:enable |
|
851 | + // phpcs:enable |
|
852 | 852 | $this->lines = array(); |
853 | 853 | |
854 | 854 | $sql = "SELECT ld.rowid, ld.fk_product, ld.description, ld.subprice, ld.total_ht, ld.qty as qty_shipped, ld.fk_origin_line, "; |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | return $this->LibStatut($this->statut, $mode); |
929 | 929 | } |
930 | 930 | |
931 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
931 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
932 | 932 | /** |
933 | 933 | * Return the label of a given status |
934 | 934 | * |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | */ |
939 | 939 | public function LibStatut($status, $mode) |
940 | 940 | { |
941 | - // phpcs:enable |
|
941 | + // phpcs:enable |
|
942 | 942 | global $langs; |
943 | 943 | |
944 | 944 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -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"); |
@@ -481,7 +481,7 @@ |
||
481 | 481 | $object->fetch($obj->rowid); |
482 | 482 | $object->id = $obj->rowid; |
483 | 483 | |
484 | - $action = 'anonymize'; // TODO Offer also action "delete" in setup of module |
|
484 | + $action = 'anonymize'; // TODO Offer also action "delete" in setup of module |
|
485 | 485 | |
486 | 486 | if ($action == 'anonymize') { |
487 | 487 | if ($object->isObjectUsed($obj->rowid) == 0) { // If object to clean is used |