@@ -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 |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | |
100 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
100 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
101 | 101 | /** |
102 | 102 | * Load an exportable dataset |
103 | 103 | * |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function load_arrays($user, $filter = '') |
109 | 109 | { |
110 | - // phpcs:enable |
|
110 | + // phpcs:enable |
|
111 | 111 | global $langs, $conf, $mysoc; |
112 | 112 | |
113 | 113 | dol_syslog(get_class($this) . "::load_arrays user=" . $user->id . " filter=" . $filter); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | |
243 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
243 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
244 | 244 | /** |
245 | 245 | * Build the sql export request. |
246 | 246 | * Arrays this->array_export_xxx are already loaded for required datatoexport |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | public function build_sql($indice, $array_selected, $array_filterValue) |
254 | 254 | { |
255 | - // phpcs:enable |
|
255 | + // phpcs:enable |
|
256 | 256 | // Build the sql request |
257 | 257 | $sql = $this->array_export_sql_start[$indice]; |
258 | 258 | $i = 0; |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | return $sql; |
313 | 313 | } |
314 | 314 | |
315 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
315 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
316 | 316 | /** |
317 | 317 | * Build the conditional string from filter the query |
318 | 318 | * |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | */ |
324 | 324 | public function build_filterQuery($TypeField, $NameField, $ValueField) |
325 | 325 | { |
326 | - // phpcs:enable |
|
326 | + // phpcs:enable |
|
327 | 327 | $NameField = sanitizeVal($NameField, 'aZ09'); |
328 | 328 | $szFilterQuery = ''; |
329 | 329 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | return $Condition; |
420 | 420 | } |
421 | 421 | |
422 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
422 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
423 | 423 | /** |
424 | 424 | * Build an input field used to filter the query |
425 | 425 | * |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | */ |
431 | 431 | public function build_filterField($TypeField, $NameField, $ValueField) |
432 | 432 | { |
433 | - // phpcs:enable |
|
433 | + // phpcs:enable |
|
434 | 434 | global $conf, $langs, $form; |
435 | 435 | |
436 | 436 | $szFilterField = ''; |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | return $szMsg; |
586 | 586 | } |
587 | 587 | |
588 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
588 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
589 | 589 | /** |
590 | 590 | * Build export file. |
591 | 591 | * File is built into directory $conf->export->dir_temp.'/'.$user->id |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | */ |
603 | 603 | public function build_file($user, $model, $datatoexport, $array_selected, $array_filterValue, $sqlquery = '', $separator = '') |
604 | 604 | { |
605 | - // phpcs:enable |
|
605 | + // phpcs:enable |
|
606 | 606 | global $conf, $langs, $mysoc; |
607 | 607 | |
608 | 608 | $indice = 0; |
@@ -909,7 +909,7 @@ discard block |
||
909 | 909 | } |
910 | 910 | } |
911 | 911 | |
912 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
912 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
913 | 913 | /** |
914 | 914 | * Output list all export models |
915 | 915 | * --TODO Move this into a class htmlxxx.class.php-- |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | */ |
919 | 919 | public function list_export_model() |
920 | 920 | { |
921 | - // phpcs:enable |
|
921 | + // phpcs:enable |
|
922 | 922 | global $conf, $langs; |
923 | 923 | |
924 | 924 | $sql = "SELECT em.rowid, em.field, em.label, em.type, em.filter"; |
@@ -376,7 +376,7 @@ |
||
376 | 376 | if (is_numeric($ValueField) && $ValueField > 0) { |
377 | 377 | $szFilterQuery = " " . $NameField . " = " . ((float) $ValueField); |
378 | 378 | } else { |
379 | - $szFilterQuery = " 1=1"; // Test always true |
|
379 | + $szFilterQuery = " 1=1"; // Test always true |
|
380 | 380 | } |
381 | 381 | break; |
382 | 382 | case 'Status': |