@@ -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); |
@@ -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); |
@@ -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"); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | |
| 352 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 352 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 353 | 353 | /** |
| 354 | 354 | * Load all lines of template of intervention into this->lines |
| 355 | 355 | * |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | public function fetch_lines($sall = 0) |
| 360 | 360 | { |
| 361 | - // phpcs:enable |
|
| 361 | + // phpcs:enable |
|
| 362 | 362 | $this->lines = array(); |
| 363 | 363 | |
| 364 | 364 | $sql = 'SELECT l.rowid, l.fk_product, l.product_type as product_type, l.label as custom_label, l.description,'; |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | } |
| 589 | 589 | |
| 590 | 590 | |
| 591 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 591 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 592 | 592 | /** |
| 593 | 593 | * Rend la fichinter automatique |
| 594 | 594 | * |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | */ |
| 600 | 600 | public function set_auto($user, $freq, $courant) |
| 601 | 601 | { |
| 602 | - // phpcs:enable |
|
| 602 | + // phpcs:enable |
|
| 603 | 603 | if ($user->hasRight('fichinter', 'creer')) { |
| 604 | 604 | $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter_rec "; |
| 605 | 605 | $sql .= " SET frequency='" . $this->db->escape($freq) . "'"; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 286 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 287 | 287 | /** |
| 288 | 288 | * Update total duration into llx_fichinter |
| 289 | 289 | * |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | public function update_total() |
| 293 | 293 | { |
| 294 | - // phpcs:enable |
|
| 294 | + // phpcs:enable |
|
| 295 | 295 | global $conf; |
| 296 | 296 | |
| 297 | 297 | $this->db->begin(); |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | return $this->LibStatut((isset($this->statut) ? $this->statut : $this->status), $mode); |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 837 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 838 | 838 | /** |
| 839 | 839 | * Returns the label of a status |
| 840 | 840 | * |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | */ |
| 845 | 845 | public function LibStatut($status, $mode = 0) |
| 846 | 846 | { |
| 847 | - // phpcs:enable |
|
| 847 | + // phpcs:enable |
|
| 848 | 848 | // Init/load array of translation of status |
| 849 | 849 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
| 850 | 850 | global $langs; |
@@ -1198,7 +1198,7 @@ discard block |
||
| 1198 | 1198 | } |
| 1199 | 1199 | } |
| 1200 | 1200 | |
| 1201 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1201 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1202 | 1202 | /** |
| 1203 | 1203 | * Defines a delivery date of intervention |
| 1204 | 1204 | * |
@@ -1208,7 +1208,7 @@ discard block |
||
| 1208 | 1208 | */ |
| 1209 | 1209 | public function set_date_delivery($user, $date_delivery) |
| 1210 | 1210 | { |
| 1211 | - // phpcs:enable |
|
| 1211 | + // phpcs:enable |
|
| 1212 | 1212 | if ($user->hasRight('ficheinter', 'creer')) { |
| 1213 | 1213 | $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter "; |
| 1214 | 1214 | $sql .= " SET datei = '" . $this->db->idate($date_delivery) . "'"; |
@@ -1228,7 +1228,7 @@ discard block |
||
| 1228 | 1228 | return 0; |
| 1229 | 1229 | } |
| 1230 | 1230 | |
| 1231 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1231 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1232 | 1232 | /** |
| 1233 | 1233 | * Define the label of the intervention |
| 1234 | 1234 | * |
@@ -1238,7 +1238,7 @@ discard block |
||
| 1238 | 1238 | */ |
| 1239 | 1239 | public function set_description($user, $description) |
| 1240 | 1240 | { |
| 1241 | - // phpcs:enable |
|
| 1241 | + // phpcs:enable |
|
| 1242 | 1242 | if ($user->hasRight('ficheinter', 'creer')) { |
| 1243 | 1243 | $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter "; |
| 1244 | 1244 | $sql .= " SET description = '" . $this->db->escape($description) . "',"; |
@@ -1259,7 +1259,7 @@ discard block |
||
| 1259 | 1259 | } |
| 1260 | 1260 | |
| 1261 | 1261 | |
| 1262 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1262 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1263 | 1263 | /** |
| 1264 | 1264 | * Link intervention to a contract |
| 1265 | 1265 | * |
@@ -1269,7 +1269,7 @@ discard block |
||
| 1269 | 1269 | */ |
| 1270 | 1270 | public function set_contrat($user, $contractid) |
| 1271 | 1271 | { |
| 1272 | - // phpcs:enable |
|
| 1272 | + // phpcs:enable |
|
| 1273 | 1273 | if ($user->hasRight('ficheinter', 'creer')) { |
| 1274 | 1274 | $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter "; |
| 1275 | 1275 | $sql .= " SET fk_contrat = " . ((int) $contractid); |
@@ -1466,7 +1466,7 @@ discard block |
||
| 1466 | 1466 | return 1; |
| 1467 | 1467 | } |
| 1468 | 1468 | |
| 1469 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1469 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1470 | 1470 | /** |
| 1471 | 1471 | * Load array lines ->lines |
| 1472 | 1472 | * |
@@ -1474,7 +1474,7 @@ discard block |
||
| 1474 | 1474 | */ |
| 1475 | 1475 | public function fetch_lines() |
| 1476 | 1476 | { |
| 1477 | - // phpcs:enable |
|
| 1477 | + // phpcs:enable |
|
| 1478 | 1478 | $this->lines = array(); |
| 1479 | 1479 | |
| 1480 | 1480 | $sql = "SELECT rowid, fk_fichinter, description, duree, date, rang"; |
@@ -40,18 +40,18 @@ discard block |
||
| 40 | 40 | * @var array $FIELDS Mandatory fields, checked when create and update object |
| 41 | 41 | */ |
| 42 | 42 | public static $FIELDS = array( |
| 43 | - 'socid', |
|
| 44 | - 'fk_project', |
|
| 45 | - 'description', |
|
| 43 | + 'socid', |
|
| 44 | + 'fk_project', |
|
| 45 | + 'description', |
|
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * @var array $FIELDS Mandatory fields, checked when create and update object |
| 50 | 50 | */ |
| 51 | 51 | public static $FIELDSLINE = array( |
| 52 | - 'description', |
|
| 53 | - 'date', |
|
| 54 | - 'duree', |
|
| 52 | + 'description', |
|
| 53 | + 'date', |
|
| 54 | + 'duree', |
|
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | |
| 434 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 434 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 435 | 435 | /** |
| 436 | 436 | * Clean sensible object datas |
| 437 | 437 | * |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | */ |
| 441 | 441 | protected function _cleanObjectDatas($object) |
| 442 | 442 | { |
| 443 | - // phpcs:enable |
|
| 443 | + // phpcs:enable |
|
| 444 | 444 | $object = parent::_cleanObjectDatas($object); |
| 445 | 445 | |
| 446 | 446 | unset($object->labelStatus); |