@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | } |
| 666 | 666 | } |
| 667 | 667 | |
| 668 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 668 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 669 | 669 | /** |
| 670 | 670 | * Update DB line fields total_xxx |
| 671 | 671 | * Used by migration |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | */ |
| 675 | 675 | public function update_total() |
| 676 | 676 | { |
| 677 | - // phpcs:enable |
|
| 677 | + // phpcs:enable |
|
| 678 | 678 | $this->db->begin(); |
| 679 | 679 | |
| 680 | 680 | // Mise a jour ligne en base |
@@ -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 |
@@ -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); |
@@ -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"; |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | } |
| 666 | 666 | } |
| 667 | 667 | |
| 668 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 668 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 669 | 669 | /** |
| 670 | 670 | * Update DB line fields total_xxx |
| 671 | 671 | * Used by migration |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | */ |
| 675 | 675 | public function update_total() |
| 676 | 676 | { |
| 677 | - // phpcs:enable |
|
| 677 | + // phpcs:enable |
|
| 678 | 678 | $this->db->begin(); |
| 679 | 679 | |
| 680 | 680 | // Mise a jour ligne en base |
@@ -22,11 +22,11 @@ |
||
| 22 | 22 | |
| 23 | 23 | use DoliDB; |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * \file htdocs/webportal/class/controller.class.php |
|
| 27 | - * \ingroup webportal |
|
| 28 | - * \brief File of controller class for WebPortal |
|
| 29 | - */ |
|
| 25 | + /** |
|
| 26 | + * \file htdocs/webportal/class/controller.class.php |
|
| 27 | + * \ingroup webportal |
|
| 28 | + * \brief File of controller class for WebPortal |
|
| 29 | + */ |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Class to manage pages |
@@ -124,8 +124,8 @@ |
||
| 124 | 124 | */ |
| 125 | 125 | public $newid; // offline |
| 126 | 126 | /** |
| 127 | - * @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array<int,string>,comment?:string}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
|
| 128 | - */ |
|
| 127 | + * @var array<string,array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array<int,string>,comment?:string}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
|
| 128 | + */ |
|
| 129 | 129 | public $fields = array( |
| 130 | 130 | 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id'), |
| 131 | 131 | 'pageurl' => array('type' => 'varchar(16)', 'label' => 'WEBSITE_PAGENAME', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'index' => 1, 'position' => 10, 'searchall' => 1, 'comment' => 'Ref/alias of page'), |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | |
| 246 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 246 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 247 | 247 | /** |
| 248 | 248 | * Add line into array ->lines |
| 249 | 249 | * |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | public function add_product($idproduct, $qty, $remise_percent = 0) |
| 258 | 258 | { |
| 259 | - // phpcs:enable |
|
| 259 | + // phpcs:enable |
|
| 260 | 260 | global $conf, $mysoc; |
| 261 | 261 | |
| 262 | 262 | if (!$qty) { |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | return -1; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 303 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 304 | 304 | /** |
| 305 | 305 | * Adding line of fixed discount in the proposal in DB |
| 306 | 306 | * |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | public function insert_discount($idremise) |
| 311 | 311 | { |
| 312 | - // phpcs:enable |
|
| 312 | + // phpcs:enable |
|
| 313 | 313 | global $langs; |
| 314 | 314 | |
| 315 | 315 | include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'; |
@@ -1508,7 +1508,7 @@ discard block |
||
| 1508 | 1508 | } |
| 1509 | 1509 | } |
| 1510 | 1510 | |
| 1511 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1511 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1512 | 1512 | /** |
| 1513 | 1513 | * Set delivery date |
| 1514 | 1514 | * |
@@ -1519,7 +1519,7 @@ discard block |
||
| 1519 | 1519 | */ |
| 1520 | 1520 | public function set_date_livraison($user, $delivery_date) |
| 1521 | 1521 | { |
| 1522 | - // phpcs:enable |
|
| 1522 | + // phpcs:enable |
|
| 1523 | 1523 | return $this->setDeliveryDate($user, $delivery_date); |
| 1524 | 1524 | } |
| 1525 | 1525 | |
@@ -1549,7 +1549,7 @@ discard block |
||
| 1549 | 1549 | return 0; |
| 1550 | 1550 | } |
| 1551 | 1551 | |
| 1552 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1552 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1553 | 1553 | /** |
| 1554 | 1554 | * Set an overall discount on the proposal |
| 1555 | 1555 | * |
@@ -1582,7 +1582,7 @@ discard block |
||
| 1582 | 1582 | } |
| 1583 | 1583 | */ |
| 1584 | 1584 | |
| 1585 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1585 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1586 | 1586 | /** |
| 1587 | 1587 | * Set an absolute overall discount on the proposal |
| 1588 | 1588 | * |
@@ -1880,7 +1880,7 @@ discard block |
||
| 1880 | 1880 | return 1; |
| 1881 | 1881 | } |
| 1882 | 1882 | |
| 1883 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1883 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1884 | 1884 | /** |
| 1885 | 1885 | * Set draft status |
| 1886 | 1886 | * |
@@ -1889,7 +1889,7 @@ discard block |
||
| 1889 | 1889 | */ |
| 1890 | 1890 | public function setDraft($user) |
| 1891 | 1891 | { |
| 1892 | - // phpcs:enable |
|
| 1892 | + // phpcs:enable |
|
| 1893 | 1893 | global $conf, $langs; |
| 1894 | 1894 | |
| 1895 | 1895 | $error = 0; |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | } |
| 1932 | 1932 | |
| 1933 | 1933 | |
| 1934 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1934 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1935 | 1935 | /** |
| 1936 | 1936 | * Return list of askprice (eventually filtered on user) into an array |
| 1937 | 1937 | * |
@@ -1947,7 +1947,7 @@ discard block |
||
| 1947 | 1947 | */ |
| 1948 | 1948 | public function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC') |
| 1949 | 1949 | { |
| 1950 | - // phpcs:enable |
|
| 1950 | + // phpcs:enable |
|
| 1951 | 1951 | global $user; |
| 1952 | 1952 | |
| 1953 | 1953 | $ga = array(); |
@@ -2166,7 +2166,7 @@ discard block |
||
| 2166 | 2166 | return $this->LibStatut((isset($this->statut) ? $this->statut : $this->status), $mode); |
| 2167 | 2167 | } |
| 2168 | 2168 | |
| 2169 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2169 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2170 | 2170 | /** |
| 2171 | 2171 | * Return label of a status (draft, validated, ...) |
| 2172 | 2172 | * |
@@ -2176,7 +2176,7 @@ discard block |
||
| 2176 | 2176 | */ |
| 2177 | 2177 | public function LibStatut($status, $mode = 1) |
| 2178 | 2178 | { |
| 2179 | - // phpcs:enable |
|
| 2179 | + // phpcs:enable |
|
| 2180 | 2180 | |
| 2181 | 2181 | // Init/load array of translation of status |
| 2182 | 2182 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -2211,7 +2211,7 @@ discard block |
||
| 2211 | 2211 | } |
| 2212 | 2212 | |
| 2213 | 2213 | |
| 2214 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2214 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2215 | 2215 | /** |
| 2216 | 2216 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 2217 | 2217 | * |
@@ -2221,7 +2221,7 @@ discard block |
||
| 2221 | 2221 | */ |
| 2222 | 2222 | public function load_board($user, $mode) |
| 2223 | 2223 | { |
| 2224 | - // phpcs:enable |
|
| 2224 | + // phpcs:enable |
|
| 2225 | 2225 | global $conf, $user, $langs; |
| 2226 | 2226 | |
| 2227 | 2227 | $now = dol_now(); |