@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | return $this->LibStatut($this->status, $mode); |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 550 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 551 | 551 | /** |
| 552 | 552 | * Renvoi le libelle d'un status donne |
| 553 | 553 | * |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | */ |
| 558 | 558 | public function LibStatut($status, $mode = 0) |
| 559 | 559 | { |
| 560 | - // phpcs:enable |
|
| 560 | + // phpcs:enable |
|
| 561 | 561 | global $langs; |
| 562 | 562 | |
| 563 | 563 | if ($mode == 0) { |
@@ -1062,7 +1062,7 @@ discard block |
||
| 1062 | 1062 | return $this->LibStatut(0, $mode); |
| 1063 | 1063 | } |
| 1064 | 1064 | |
| 1065 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1065 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1066 | 1066 | /** |
| 1067 | 1067 | * Return label of a given status |
| 1068 | 1068 | * |
@@ -1072,7 +1072,7 @@ discard block |
||
| 1072 | 1072 | */ |
| 1073 | 1073 | public function LibStatut($status, $mode = 0) |
| 1074 | 1074 | { |
| 1075 | - // phpcs:enable |
|
| 1075 | + // phpcs:enable |
|
| 1076 | 1076 | //global $langs; |
| 1077 | 1077 | |
| 1078 | 1078 | //$langs->load('stocks'); |
@@ -1030,7 +1030,7 @@ |
||
| 1030 | 1030 | $obj = $this->db->fetch_object($result); |
| 1031 | 1031 | $this->stats_mo['customers_' . $role] = $obj->nb_customers ? $obj->nb_customers : 0; |
| 1032 | 1032 | $this->stats_mo['nb_' . $role] = $obj->nb ? $obj->nb : 0; |
| 1033 | - $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM() |
|
| 1033 | + $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM() |
|
| 1034 | 1034 | } else { |
| 1035 | 1035 | $this->error = $this->db->error(); |
| 1036 | 1036 | $error++; |
@@ -16,10 +16,10 @@ discard block |
||
| 16 | 16 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | - use Luracast\Restler\RestException; |
|
| 19 | + use Luracast\Restler\RestException; |
|
| 20 | 20 | |
| 21 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
| 22 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 21 | + require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
| 22 | + require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * API class for warehouses |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | |
| 264 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 264 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 265 | 265 | /** |
| 266 | 266 | * Clean sensible object datas |
| 267 | 267 | * |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | */ |
| 271 | 271 | protected function _cleanObjectDatas($object) |
| 272 | 272 | { |
| 273 | - // phpcs:enable |
|
| 273 | + // phpcs:enable |
|
| 274 | 274 | $object = parent::_cleanObjectDatas($object); |
| 275 | 275 | |
| 276 | 276 | // Remove the subscriptions because they are handled as a subresource. |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | |
| 566 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 566 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 567 | 567 | /** |
| 568 | 568 | * Return list of all warehouses |
| 569 | 569 | * |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | */ |
| 573 | 573 | public function list_array($status = 1) |
| 574 | 574 | { |
| 575 | - // phpcs:enable |
|
| 575 | + // phpcs:enable |
|
| 576 | 576 | $liste = array(); |
| 577 | 577 | |
| 578 | 578 | $sql = "SELECT rowid, ref as label"; |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | return $liste; |
| 595 | 595 | } |
| 596 | 596 | |
| 597 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 597 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 598 | 598 | /** |
| 599 | 599 | * Return number of unique different product into a warehouse |
| 600 | 600 | * |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | */ |
| 603 | 603 | public function nb_different_products() |
| 604 | 604 | { |
| 605 | - // phpcs:enable |
|
| 605 | + // phpcs:enable |
|
| 606 | 606 | $ret = array(); |
| 607 | 607 | |
| 608 | 608 | $sql = "SELECT count(distinct p.rowid) as nb"; |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | return $ret; |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 628 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 629 | 629 | /** |
| 630 | 630 | * Return stock and value of warehosue |
| 631 | 631 | * |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | public function nb_products() |
| 635 | 635 | { |
| 636 | 636 | global $conf; |
| 637 | - // phpcs:enable |
|
| 637 | + // phpcs:enable |
|
| 638 | 638 | $ret = array(); |
| 639 | 639 | |
| 640 | 640 | //For MultiCompany PMP per entity |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | return $this->LibStatut($this->statut, $mode); |
| 685 | 685 | } |
| 686 | 686 | |
| 687 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 687 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 688 | 688 | /** |
| 689 | 689 | * Return label of a given status |
| 690 | 690 | * |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | */ |
| 695 | 695 | public function LibStatut($status, $mode = 0) |
| 696 | 696 | { |
| 697 | - // phpcs:enable |
|
| 697 | + // phpcs:enable |
|
| 698 | 698 | global $langs; |
| 699 | 699 | |
| 700 | 700 | $statusType = 'status5'; |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | return 1; |
| 869 | 869 | } |
| 870 | 870 | |
| 871 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 871 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 872 | 872 | /** |
| 873 | 873 | * Return full path to current warehouse |
| 874 | 874 | * |
@@ -876,7 +876,7 @@ discard block |
||
| 876 | 876 | */ |
| 877 | 877 | public function get_full_arbo() |
| 878 | 878 | { |
| 879 | - // phpcs:enable |
|
| 879 | + // phpcs:enable |
|
| 880 | 880 | global $user, $langs, $conf; |
| 881 | 881 | |
| 882 | 882 | $TArbo = array($this->label); |
@@ -909,7 +909,7 @@ discard block |
||
| 909 | 909 | return implode(' >> ', array_reverse($TArbo)); |
| 910 | 910 | } |
| 911 | 911 | |
| 912 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 912 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 913 | 913 | /** |
| 914 | 914 | * Return array of children warehouses ids from $id warehouse (recursive function) |
| 915 | 915 | * |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | */ |
| 920 | 920 | public function get_children_warehouses($id, &$TChildWarehouses) |
| 921 | 921 | { |
| 922 | - // phpcs:enable |
|
| 922 | + // phpcs:enable |
|
| 923 | 923 | |
| 924 | 924 | $sql = "SELECT rowid |
| 925 | 925 | FROM " . $this->db->prefix() . "entrepot |
@@ -166,7 +166,7 @@ |
||
| 166 | 166 | /** |
| 167 | 167 | * Warehouse open and any operations are allowed, but warehouse is not included into calculation of stock. |
| 168 | 168 | */ |
| 169 | - const STATUS_OPENEXT_ALL = 3; // TODO Implement this |
|
| 169 | + const STATUS_OPENEXT_ALL = 3; // TODO Implement this |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $this->db = $db; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 161 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 162 | 162 | /** |
| 163 | 163 | * Add a movement of stock (in one direction only). |
| 164 | 164 | * This is the lowest level method to record a stock change. There is no control if warehouse is open or not. |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | */ |
| 189 | 189 | public function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0, $disablestockchangeforsubproduct = 0, $donotcleanemptylines = 0, $force_update_batch = false) |
| 190 | 190 | { |
| 191 | - // phpcs:enable |
|
| 191 | + // phpcs:enable |
|
| 192 | 192 | global $conf, $langs; |
| 193 | 193 | |
| 194 | 194 | require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
@@ -959,7 +959,7 @@ discard block |
||
| 959 | 959 | return $result; |
| 960 | 960 | } |
| 961 | 961 | |
| 962 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 962 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 963 | 963 | /** |
| 964 | 964 | * Return Url link of origin object |
| 965 | 965 | * |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | */ |
| 970 | 970 | public function get_origin($origin_id, $origin_type) |
| 971 | 971 | { |
| 972 | - // phpcs:enable |
|
| 972 | + // phpcs:enable |
|
| 973 | 973 | $origin = ''; |
| 974 | 974 | |
| 975 | 975 | switch ($origin_type) { |
@@ -1185,7 +1185,7 @@ discard block |
||
| 1185 | 1185 | return $this->LibStatut($mode); |
| 1186 | 1186 | } |
| 1187 | 1187 | |
| 1188 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1188 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1189 | 1189 | /** |
| 1190 | 1190 | * Return the label of the status |
| 1191 | 1191 | * |
@@ -1194,7 +1194,7 @@ discard block |
||
| 1194 | 1194 | */ |
| 1195 | 1195 | public function LibStatut($mode = 0) |
| 1196 | 1196 | { |
| 1197 | - // phpcs:enable |
|
| 1197 | + // phpcs:enable |
|
| 1198 | 1198 | global $langs; |
| 1199 | 1199 | |
| 1200 | 1200 | if ($mode == 0 || $mode == 1) { |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | 'skip_batch' => &$skip_batch, |
| 220 | 220 | 'id_product_batch' => &$id_product_batch |
| 221 | 221 | ); |
| 222 | - $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
|
| 222 | + $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
|
| 223 | 223 | |
| 224 | 224 | if ($reshook < 0) { |
| 225 | 225 | if (!empty($hookmanager->resPrint)) { |
@@ -708,8 +708,8 @@ discard block |
||
| 708 | 708 | $this->price = $obj->price; |
| 709 | 709 | $this->fk_user_author = $obj->fk_user_author; |
| 710 | 710 | $this->label = $obj->label; |
| 711 | - $this->fk_origin = $obj->origin_id; // For backward compatibility |
|
| 712 | - $this->origintype = $obj->origin_type; // For backward compatibility |
|
| 711 | + $this->fk_origin = $obj->origin_id; // For backward compatibility |
|
| 712 | + $this->origintype = $obj->origin_type; // For backward compatibility |
|
| 713 | 713 | $this->origin_id = $obj->origin_id; |
| 714 | 714 | $this->origin_type = $obj->origin_type; |
| 715 | 715 | $this->inventorycode = $obj->inventorycode; |
@@ -944,8 +944,8 @@ discard block |
||
| 944 | 944 | } else { // product_batch record not found |
| 945 | 945 | $pdluo->fk_product_stock = $vfk_product_stock; |
| 946 | 946 | $pdluo->qty = $qty; |
| 947 | - $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table. |
|
| 948 | - $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table. |
|
| 947 | + $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table. |
|
| 948 | + $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table. |
|
| 949 | 949 | $pdluo->batch = $vbatchnumber; |
| 950 | 950 | |
| 951 | 951 | $result = $pdluo->create($user, 1); |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | return $this->LibStatut($this->status, $mode); |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 728 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 729 | 729 | /** |
| 730 | 730 | * Return the status |
| 731 | 731 | * |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | */ |
| 736 | 736 | public function LibStatut($status, $mode = 0) |
| 737 | 737 | { |
| 738 | - // phpcs:enable |
|
| 738 | + // phpcs:enable |
|
| 739 | 739 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
| 740 | 740 | global $langs; |
| 741 | 741 | //$langs->load("buypricehistory@buypricehistory"); |
@@ -1023,7 +1023,7 @@ discard block |
||
| 1023 | 1023 | return $result; |
| 1024 | 1024 | } |
| 1025 | 1025 | |
| 1026 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1026 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1027 | 1027 | /** |
| 1028 | 1028 | * Check barcode |
| 1029 | 1029 | * |
@@ -1036,7 +1036,7 @@ discard block |
||
| 1036 | 1036 | */ |
| 1037 | 1037 | public function check_barcode($valuetotest, $typefortest) |
| 1038 | 1038 | { |
| 1039 | - // phpcs:enable |
|
| 1039 | + // phpcs:enable |
|
| 1040 | 1040 | global $conf; |
| 1041 | 1041 | if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) { |
| 1042 | 1042 | $module = strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM); |
@@ -1950,7 +1950,7 @@ discard block |
||
| 1950 | 1950 | } |
| 1951 | 1951 | |
| 1952 | 1952 | |
| 1953 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1953 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1954 | 1954 | /** |
| 1955 | 1955 | * Insert a track that we changed a customer price |
| 1956 | 1956 | * |
@@ -1960,7 +1960,7 @@ discard block |
||
| 1960 | 1960 | */ |
| 1961 | 1961 | private function _log_price($user, $level = 0) |
| 1962 | 1962 | { |
| 1963 | - // phpcs:enable |
|
| 1963 | + // phpcs:enable |
|
| 1964 | 1964 | global $conf; |
| 1965 | 1965 | |
| 1966 | 1966 | $now = dol_now(); |
@@ -1989,7 +1989,7 @@ discard block |
||
| 1989 | 1989 | } |
| 1990 | 1990 | |
| 1991 | 1991 | |
| 1992 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1992 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1993 | 1993 | /** |
| 1994 | 1994 | * Delete a price line |
| 1995 | 1995 | * |
@@ -1999,7 +1999,7 @@ discard block |
||
| 1999 | 1999 | */ |
| 2000 | 2000 | public function log_price_delete($user, $rowid) |
| 2001 | 2001 | { |
| 2002 | - // phpcs:enable |
|
| 2002 | + // phpcs:enable |
|
| 2003 | 2003 | $sql = "DELETE FROM " . $this->db->prefix() . "product_price_by_qty"; |
| 2004 | 2004 | $sql .= " WHERE fk_product_price = " . ((int) $rowid); |
| 2005 | 2005 | $resql = $this->db->query($sql); |
@@ -2134,7 +2134,7 @@ discard block |
||
| 2134 | 2134 | return array('pu_ht' => $pu_ht, 'pu_ttc' => $pu_ttc, 'price_min' => $price_min, 'price_base_type' => $price_base_type, 'tva_tx' => $tva_tx, 'tva_npr' => $tva_npr); |
| 2135 | 2135 | } |
| 2136 | 2136 | |
| 2137 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2137 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2138 | 2138 | /** |
| 2139 | 2139 | * Read price used by a provider. |
| 2140 | 2140 | * We enter as input couple prodfournprice/qty or triplet qty/product_id/fourn_ref. |
@@ -2150,7 +2150,7 @@ discard block |
||
| 2150 | 2150 | */ |
| 2151 | 2151 | public function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref = '', $fk_soc = 0) |
| 2152 | 2152 | { |
| 2153 | - // phpcs:enable |
|
| 2153 | + // phpcs:enable |
|
| 2154 | 2154 | global $action, $hookmanager; |
| 2155 | 2155 | |
| 2156 | 2156 | // Call hook if any |
@@ -2948,7 +2948,7 @@ discard block |
||
| 2948 | 2948 | } |
| 2949 | 2949 | } |
| 2950 | 2950 | |
| 2951 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2951 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2952 | 2952 | /** |
| 2953 | 2953 | * Charge tableau des stats OF pour le produit/service |
| 2954 | 2954 | * |
@@ -2957,7 +2957,7 @@ discard block |
||
| 2957 | 2957 | */ |
| 2958 | 2958 | public function load_stats_mo($socid = 0) |
| 2959 | 2959 | { |
| 2960 | - // phpcs:enable |
|
| 2960 | + // phpcs:enable |
|
| 2961 | 2961 | global $user, $hookmanager, $action; |
| 2962 | 2962 | |
| 2963 | 2963 | $error = 0; |
@@ -3008,7 +3008,7 @@ discard block |
||
| 3008 | 3008 | return 1; |
| 3009 | 3009 | } |
| 3010 | 3010 | |
| 3011 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3011 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3012 | 3012 | /** |
| 3013 | 3013 | * Charge tableau des stats OF pour le produit/service |
| 3014 | 3014 | * |
@@ -3017,7 +3017,7 @@ discard block |
||
| 3017 | 3017 | */ |
| 3018 | 3018 | public function load_stats_bom($socid = 0) |
| 3019 | 3019 | { |
| 3020 | - // phpcs:enable |
|
| 3020 | + // phpcs:enable |
|
| 3021 | 3021 | global $user, $hookmanager, $action; |
| 3022 | 3022 | |
| 3023 | 3023 | $error = 0; |
@@ -3077,7 +3077,7 @@ discard block |
||
| 3077 | 3077 | return 1; |
| 3078 | 3078 | } |
| 3079 | 3079 | |
| 3080 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3080 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3081 | 3081 | /** |
| 3082 | 3082 | * Charge tableau des stats propale pour le produit/service |
| 3083 | 3083 | * |
@@ -3086,7 +3086,7 @@ discard block |
||
| 3086 | 3086 | */ |
| 3087 | 3087 | public function load_stats_propale($socid = 0) |
| 3088 | 3088 | { |
| 3089 | - // phpcs:enable |
|
| 3089 | + // phpcs:enable |
|
| 3090 | 3090 | global $conf, $user, $hookmanager, $action; |
| 3091 | 3091 | |
| 3092 | 3092 | $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_customers, COUNT(DISTINCT p.rowid) as nb,"; |
@@ -3152,7 +3152,7 @@ discard block |
||
| 3152 | 3152 | } |
| 3153 | 3153 | |
| 3154 | 3154 | |
| 3155 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3155 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3156 | 3156 | /** |
| 3157 | 3157 | * Charge tableau des stats propale pour le produit/service |
| 3158 | 3158 | * |
@@ -3161,7 +3161,7 @@ discard block |
||
| 3161 | 3161 | */ |
| 3162 | 3162 | public function load_stats_proposal_supplier($socid = 0) |
| 3163 | 3163 | { |
| 3164 | - // phpcs:enable |
|
| 3164 | + // phpcs:enable |
|
| 3165 | 3165 | global $conf, $user, $hookmanager, $action; |
| 3166 | 3166 | |
| 3167 | 3167 | $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_suppliers, COUNT(DISTINCT p.rowid) as nb,"; |
@@ -3206,7 +3206,7 @@ discard block |
||
| 3206 | 3206 | } |
| 3207 | 3207 | |
| 3208 | 3208 | |
| 3209 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3209 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3210 | 3210 | /** |
| 3211 | 3211 | * Charge tableau des stats commande client pour le produit/service |
| 3212 | 3212 | * |
@@ -3217,7 +3217,7 @@ discard block |
||
| 3217 | 3217 | */ |
| 3218 | 3218 | public function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0) |
| 3219 | 3219 | { |
| 3220 | - // phpcs:enable |
|
| 3220 | + // phpcs:enable |
|
| 3221 | 3221 | global $conf, $user, $hookmanager, $action; |
| 3222 | 3222 | |
| 3223 | 3223 | $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,"; |
@@ -3333,7 +3333,7 @@ discard block |
||
| 3333 | 3333 | } |
| 3334 | 3334 | } |
| 3335 | 3335 | |
| 3336 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3336 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3337 | 3337 | /** |
| 3338 | 3338 | * Charge tableau des stats commande fournisseur pour le produit/service |
| 3339 | 3339 | * |
@@ -3345,7 +3345,7 @@ discard block |
||
| 3345 | 3345 | */ |
| 3346 | 3346 | public function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null) |
| 3347 | 3347 | { |
| 3348 | - // phpcs:enable |
|
| 3348 | + // phpcs:enable |
|
| 3349 | 3349 | global $conf, $user, $hookmanager, $action; |
| 3350 | 3350 | |
| 3351 | 3351 | $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_suppliers, COUNT(DISTINCT c.rowid) as nb,"; |
@@ -3394,7 +3394,7 @@ discard block |
||
| 3394 | 3394 | } |
| 3395 | 3395 | } |
| 3396 | 3396 | |
| 3397 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3397 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3398 | 3398 | /** |
| 3399 | 3399 | * Charge tableau des stats expedition client pour le produit/service |
| 3400 | 3400 | * |
@@ -3406,7 +3406,7 @@ discard block |
||
| 3406 | 3406 | */ |
| 3407 | 3407 | public function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $filterShipmentStatus = '') |
| 3408 | 3408 | { |
| 3409 | - // phpcs:enable |
|
| 3409 | + // phpcs:enable |
|
| 3410 | 3410 | global $conf, $user, $hookmanager, $action; |
| 3411 | 3411 | |
| 3412 | 3412 | $sql = "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb,"; |
@@ -3480,7 +3480,7 @@ discard block |
||
| 3480 | 3480 | } |
| 3481 | 3481 | } |
| 3482 | 3482 | |
| 3483 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3483 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3484 | 3484 | /** |
| 3485 | 3485 | * Charge tableau des stats réception fournisseur pour le produit/service |
| 3486 | 3486 | * |
@@ -3492,7 +3492,7 @@ discard block |
||
| 3492 | 3492 | */ |
| 3493 | 3493 | public function load_stats_reception($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null) |
| 3494 | 3494 | { |
| 3495 | - // phpcs:enable |
|
| 3495 | + // phpcs:enable |
|
| 3496 | 3496 | global $conf, $user, $hookmanager, $action; |
| 3497 | 3497 | |
| 3498 | 3498 | $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb,"; |
@@ -3541,7 +3541,7 @@ discard block |
||
| 3541 | 3541 | } |
| 3542 | 3542 | } |
| 3543 | 3543 | |
| 3544 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3544 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3545 | 3545 | /** |
| 3546 | 3546 | * Charge tableau des stats production pour le produit/service |
| 3547 | 3547 | * |
@@ -3554,7 +3554,7 @@ discard block |
||
| 3554 | 3554 | */ |
| 3555 | 3555 | public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null, $warehouseid = 0) |
| 3556 | 3556 | { |
| 3557 | - // phpcs:enable |
|
| 3557 | + // phpcs:enable |
|
| 3558 | 3558 | global $user, $hookmanager, $action; |
| 3559 | 3559 | |
| 3560 | 3560 | $serviceStockIsEnabled = isModEnabled("service") && getDolGlobalString('STOCK_SUPPORTS_SERVICES'); |
@@ -3668,7 +3668,7 @@ discard block |
||
| 3668 | 3668 | } |
| 3669 | 3669 | } |
| 3670 | 3670 | |
| 3671 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3671 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3672 | 3672 | /** |
| 3673 | 3673 | * Charge tableau des stats contrat pour le produit/service |
| 3674 | 3674 | * |
@@ -3677,7 +3677,7 @@ discard block |
||
| 3677 | 3677 | */ |
| 3678 | 3678 | public function load_stats_contrat($socid = 0) |
| 3679 | 3679 | { |
| 3680 | - // phpcs:enable |
|
| 3680 | + // phpcs:enable |
|
| 3681 | 3681 | global $conf, $user, $hookmanager, $action; |
| 3682 | 3682 | |
| 3683 | 3683 | $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,"; |
@@ -3742,7 +3742,7 @@ discard block |
||
| 3742 | 3742 | } |
| 3743 | 3743 | } |
| 3744 | 3744 | |
| 3745 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3745 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3746 | 3746 | /** |
| 3747 | 3747 | * Charge tableau des stats facture pour le produit/service |
| 3748 | 3748 | * |
@@ -3751,7 +3751,7 @@ discard block |
||
| 3751 | 3751 | */ |
| 3752 | 3752 | public function load_stats_facture($socid = 0) |
| 3753 | 3753 | { |
| 3754 | - // phpcs:enable |
|
| 3754 | + // phpcs:enable |
|
| 3755 | 3755 | global $conf, $user, $hookmanager, $action; |
| 3756 | 3756 | |
| 3757 | 3757 | $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,"; |
@@ -3817,7 +3817,7 @@ discard block |
||
| 3817 | 3817 | } |
| 3818 | 3818 | |
| 3819 | 3819 | |
| 3820 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3820 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3821 | 3821 | /** |
| 3822 | 3822 | * Charge tableau des stats facture recurrentes pour le produit/service |
| 3823 | 3823 | * |
@@ -3826,7 +3826,7 @@ discard block |
||
| 3826 | 3826 | */ |
| 3827 | 3827 | public function load_stats_facturerec($socid = 0) |
| 3828 | 3828 | { |
| 3829 | - // phpcs:enable |
|
| 3829 | + // phpcs:enable |
|
| 3830 | 3830 | global $conf, $user, $hookmanager, $action; |
| 3831 | 3831 | |
| 3832 | 3832 | $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,"; |
@@ -3891,7 +3891,7 @@ discard block |
||
| 3891 | 3891 | } |
| 3892 | 3892 | } |
| 3893 | 3893 | |
| 3894 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3894 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3895 | 3895 | /** |
| 3896 | 3896 | * Charge tableau des stats facture pour le produit/service |
| 3897 | 3897 | * |
@@ -3900,7 +3900,7 @@ discard block |
||
| 3900 | 3900 | */ |
| 3901 | 3901 | public function load_stats_facture_fournisseur($socid = 0) |
| 3902 | 3902 | { |
| 3903 | - // phpcs:enable |
|
| 3903 | + // phpcs:enable |
|
| 3904 | 3904 | global $conf, $user, $hookmanager, $action; |
| 3905 | 3905 | |
| 3906 | 3906 | $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_suppliers, COUNT(DISTINCT f.rowid) as nb,"; |
@@ -3944,7 +3944,7 @@ discard block |
||
| 3944 | 3944 | } |
| 3945 | 3945 | } |
| 3946 | 3946 | |
| 3947 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3947 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3948 | 3948 | /** |
| 3949 | 3949 | * Return an array formatted for showing graphs |
| 3950 | 3950 | * |
@@ -3955,7 +3955,7 @@ discard block |
||
| 3955 | 3955 | */ |
| 3956 | 3956 | private function _get_stats($sql, $mode, $year = 0) |
| 3957 | 3957 | { |
| 3958 | - // phpcs:enable |
|
| 3958 | + // phpcs:enable |
|
| 3959 | 3959 | $tab = array(); |
| 3960 | 3960 | |
| 3961 | 3961 | $resql = $this->db->query($sql); |
@@ -4020,7 +4020,7 @@ discard block |
||
| 4020 | 4020 | } |
| 4021 | 4021 | |
| 4022 | 4022 | |
| 4023 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4023 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4024 | 4024 | /** |
| 4025 | 4025 | * Return nb of units or customers invoices in which product is included |
| 4026 | 4026 | * |
@@ -4033,7 +4033,7 @@ discard block |
||
| 4033 | 4033 | */ |
| 4034 | 4034 | public function get_nb_vente($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4035 | 4035 | { |
| 4036 | - // phpcs:enable |
|
| 4036 | + // phpcs:enable |
|
| 4037 | 4037 | global $conf; |
| 4038 | 4038 | global $user; |
| 4039 | 4039 | |
@@ -4074,7 +4074,7 @@ discard block |
||
| 4074 | 4074 | } |
| 4075 | 4075 | |
| 4076 | 4076 | |
| 4077 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4077 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4078 | 4078 | /** |
| 4079 | 4079 | * Return nb of units or supplier invoices in which product is included |
| 4080 | 4080 | * |
@@ -4087,7 +4087,7 @@ discard block |
||
| 4087 | 4087 | */ |
| 4088 | 4088 | public function get_nb_achat($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4089 | 4089 | { |
| 4090 | - // phpcs:enable |
|
| 4090 | + // phpcs:enable |
|
| 4091 | 4091 | global $conf; |
| 4092 | 4092 | global $user; |
| 4093 | 4093 | |
@@ -4127,7 +4127,7 @@ discard block |
||
| 4127 | 4127 | return $this->_get_stats($sql, $mode, $year); |
| 4128 | 4128 | } |
| 4129 | 4129 | |
| 4130 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4130 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4131 | 4131 | /** |
| 4132 | 4132 | * Return nb of units in proposals in which product is included |
| 4133 | 4133 | * |
@@ -4140,7 +4140,7 @@ discard block |
||
| 4140 | 4140 | */ |
| 4141 | 4141 | public function get_nb_propal($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4142 | 4142 | { |
| 4143 | - // phpcs:enable |
|
| 4143 | + // phpcs:enable |
|
| 4144 | 4144 | global $conf, $user; |
| 4145 | 4145 | |
| 4146 | 4146 | $sql = "SELECT sum(d.qty) as qty, date_format(p.datep, '%Y%m')"; |
@@ -4179,7 +4179,7 @@ discard block |
||
| 4179 | 4179 | return $this->_get_stats($sql, $mode, $year); |
| 4180 | 4180 | } |
| 4181 | 4181 | |
| 4182 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4182 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4183 | 4183 | /** |
| 4184 | 4184 | * Return nb of units in proposals in which product is included |
| 4185 | 4185 | * |
@@ -4192,7 +4192,7 @@ discard block |
||
| 4192 | 4192 | */ |
| 4193 | 4193 | public function get_nb_propalsupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4194 | 4194 | { |
| 4195 | - // phpcs:enable |
|
| 4195 | + // phpcs:enable |
|
| 4196 | 4196 | global $conf; |
| 4197 | 4197 | global $user; |
| 4198 | 4198 | |
@@ -4232,7 +4232,7 @@ discard block |
||
| 4232 | 4232 | return $this->_get_stats($sql, $mode, $year); |
| 4233 | 4233 | } |
| 4234 | 4234 | |
| 4235 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4235 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4236 | 4236 | /** |
| 4237 | 4237 | * Return nb of units in orders in which product is included |
| 4238 | 4238 | * |
@@ -4245,7 +4245,7 @@ discard block |
||
| 4245 | 4245 | */ |
| 4246 | 4246 | public function get_nb_order($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4247 | 4247 | { |
| 4248 | - // phpcs:enable |
|
| 4248 | + // phpcs:enable |
|
| 4249 | 4249 | global $conf, $user; |
| 4250 | 4250 | |
| 4251 | 4251 | $sql = "SELECT sum(d.qty) as qty, date_format(c.date_commande, '%Y%m')"; |
@@ -4284,7 +4284,7 @@ discard block |
||
| 4284 | 4284 | return $this->_get_stats($sql, $mode, $year); |
| 4285 | 4285 | } |
| 4286 | 4286 | |
| 4287 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4287 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4288 | 4288 | /** |
| 4289 | 4289 | * Return nb of units in orders in which product is included |
| 4290 | 4290 | * |
@@ -4297,7 +4297,7 @@ discard block |
||
| 4297 | 4297 | */ |
| 4298 | 4298 | public function get_nb_ordersupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4299 | 4299 | { |
| 4300 | - // phpcs:enable |
|
| 4300 | + // phpcs:enable |
|
| 4301 | 4301 | global $conf, $user; |
| 4302 | 4302 | |
| 4303 | 4303 | $sql = "SELECT sum(d.qty) as qty, date_format(c.date_commande, '%Y%m')"; |
@@ -4336,7 +4336,7 @@ discard block |
||
| 4336 | 4336 | return $this->_get_stats($sql, $mode, $year); |
| 4337 | 4337 | } |
| 4338 | 4338 | |
| 4339 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4339 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4340 | 4340 | /** |
| 4341 | 4341 | * Return nb of units in orders in which product is included |
| 4342 | 4342 | * |
@@ -4349,7 +4349,7 @@ discard block |
||
| 4349 | 4349 | */ |
| 4350 | 4350 | public function get_nb_contract($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4351 | 4351 | { |
| 4352 | - // phpcs:enable |
|
| 4352 | + // phpcs:enable |
|
| 4353 | 4353 | global $conf, $user; |
| 4354 | 4354 | |
| 4355 | 4355 | $sql = "SELECT sum(d.qty) as qty, date_format(c.date_contrat, '%Y%m')"; |
@@ -4390,7 +4390,7 @@ discard block |
||
| 4390 | 4390 | return $this->_get_stats($sql, $mode, $year); |
| 4391 | 4391 | } |
| 4392 | 4392 | |
| 4393 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4393 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4394 | 4394 | /** |
| 4395 | 4395 | * Return nb of units in orders in which product is included |
| 4396 | 4396 | * |
@@ -4403,7 +4403,7 @@ discard block |
||
| 4403 | 4403 | */ |
| 4404 | 4404 | public function get_nb_mos($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') |
| 4405 | 4405 | { |
| 4406 | - // phpcs:enable |
|
| 4406 | + // phpcs:enable |
|
| 4407 | 4407 | global $conf, $user; |
| 4408 | 4408 | |
| 4409 | 4409 | $sql = "SELECT sum(d.qty), date_format(d.date_valid, '%Y%m')"; |
@@ -4443,7 +4443,7 @@ discard block |
||
| 4443 | 4443 | return $this->_get_stats($sql, $mode, $year); |
| 4444 | 4444 | } |
| 4445 | 4445 | |
| 4446 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4446 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4447 | 4447 | /** |
| 4448 | 4448 | * Link a product/service to a parent product/service |
| 4449 | 4449 | * |
@@ -4458,7 +4458,7 @@ discard block |
||
| 4458 | 4458 | { |
| 4459 | 4459 | global $user; |
| 4460 | 4460 | |
| 4461 | - // phpcs:enable |
|
| 4461 | + // phpcs:enable |
|
| 4462 | 4462 | // Clean parameters |
| 4463 | 4463 | if (!is_numeric($id_pere)) { |
| 4464 | 4464 | $id_pere = 0; |
@@ -4516,7 +4516,7 @@ discard block |
||
| 4516 | 4516 | } |
| 4517 | 4517 | } |
| 4518 | 4518 | |
| 4519 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4519 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4520 | 4520 | /** |
| 4521 | 4521 | * Modify composed product |
| 4522 | 4522 | * |
@@ -4531,7 +4531,7 @@ discard block |
||
| 4531 | 4531 | { |
| 4532 | 4532 | global $user; |
| 4533 | 4533 | |
| 4534 | - // phpcs:enable |
|
| 4534 | + // phpcs:enable |
|
| 4535 | 4535 | // Clean parameters |
| 4536 | 4536 | if (!is_numeric($id_pere)) { |
| 4537 | 4537 | $id_pere = 0; |
@@ -4570,7 +4570,7 @@ discard block |
||
| 4570 | 4570 | } |
| 4571 | 4571 | } |
| 4572 | 4572 | |
| 4573 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4573 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4574 | 4574 | /** |
| 4575 | 4575 | * Remove a link between a subproduct and a parent product/service |
| 4576 | 4576 | * |
@@ -4583,7 +4583,7 @@ discard block |
||
| 4583 | 4583 | { |
| 4584 | 4584 | global $user; |
| 4585 | 4585 | |
| 4586 | - // phpcs:enable |
|
| 4586 | + // phpcs:enable |
|
| 4587 | 4587 | if (!is_numeric($fk_parent)) { |
| 4588 | 4588 | $fk_parent = 0; |
| 4589 | 4589 | } |
@@ -4634,7 +4634,7 @@ discard block |
||
| 4634 | 4634 | return 1; |
| 4635 | 4635 | } |
| 4636 | 4636 | |
| 4637 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4637 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4638 | 4638 | /** |
| 4639 | 4639 | * Check if it is a sub-product into a kit |
| 4640 | 4640 | * |
@@ -4644,7 +4644,7 @@ discard block |
||
| 4644 | 4644 | */ |
| 4645 | 4645 | public function is_sousproduit($fk_parent, $fk_child) |
| 4646 | 4646 | { |
| 4647 | - // phpcs:enable |
|
| 4647 | + // phpcs:enable |
|
| 4648 | 4648 | $sql = "SELECT fk_product_pere, qty, incdec"; |
| 4649 | 4649 | $sql .= " FROM " . $this->db->prefix() . "product_association"; |
| 4650 | 4650 | $sql .= " WHERE fk_product_pere = " . ((int) $fk_parent); |
@@ -4671,7 +4671,7 @@ discard block |
||
| 4671 | 4671 | } |
| 4672 | 4672 | |
| 4673 | 4673 | |
| 4674 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4674 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4675 | 4675 | /** |
| 4676 | 4676 | * Add a supplier price for the product. |
| 4677 | 4677 | * Note: Duplicate ref is accepted for different quantity only, or for different companies. |
@@ -4684,7 +4684,7 @@ discard block |
||
| 4684 | 4684 | */ |
| 4685 | 4685 | public function add_fournisseur($user, $id_fourn, $ref_fourn, $quantity) |
| 4686 | 4686 | { |
| 4687 | - // phpcs:enable |
|
| 4687 | + // phpcs:enable |
|
| 4688 | 4688 | global $conf; |
| 4689 | 4689 | |
| 4690 | 4690 | $now = dol_now(); |
@@ -4772,7 +4772,7 @@ discard block |
||
| 4772 | 4772 | } |
| 4773 | 4773 | |
| 4774 | 4774 | |
| 4775 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4775 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4776 | 4776 | /** |
| 4777 | 4777 | * Return list of suppliers providing the product or service |
| 4778 | 4778 | * |
@@ -4780,7 +4780,7 @@ discard block |
||
| 4780 | 4780 | */ |
| 4781 | 4781 | public function list_suppliers() |
| 4782 | 4782 | { |
| 4783 | - // phpcs:enable |
|
| 4783 | + // phpcs:enable |
|
| 4784 | 4784 | global $conf; |
| 4785 | 4785 | |
| 4786 | 4786 | $list = array(); |
@@ -4804,7 +4804,7 @@ discard block |
||
| 4804 | 4804 | return $list; |
| 4805 | 4805 | } |
| 4806 | 4806 | |
| 4807 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4807 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4808 | 4808 | /** |
| 4809 | 4809 | * Recopie les prix d'un produit/service sur un autre |
| 4810 | 4810 | * |
@@ -4892,7 +4892,7 @@ discard block |
||
| 4892 | 4892 | return 1; |
| 4893 | 4893 | } |
| 4894 | 4894 | |
| 4895 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4895 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4896 | 4896 | /** |
| 4897 | 4897 | * Clone links between products |
| 4898 | 4898 | * |
@@ -4902,7 +4902,7 @@ discard block |
||
| 4902 | 4902 | */ |
| 4903 | 4903 | public function clone_associations($fromId, $toId) |
| 4904 | 4904 | { |
| 4905 | - // phpcs:enable |
|
| 4905 | + // phpcs:enable |
|
| 4906 | 4906 | $this->db->begin(); |
| 4907 | 4907 | |
| 4908 | 4908 | $sql = 'INSERT INTO ' . $this->db->prefix() . 'product_association (fk_product_pere, fk_product_fils, qty, incdec)'; |
@@ -4919,7 +4919,7 @@ discard block |
||
| 4919 | 4919 | return 1; |
| 4920 | 4920 | } |
| 4921 | 4921 | |
| 4922 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4922 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4923 | 4923 | /** |
| 4924 | 4924 | * Recopie les fournisseurs et prix fournisseurs d'un produit/service sur un autre |
| 4925 | 4925 | * |
@@ -4929,7 +4929,7 @@ discard block |
||
| 4929 | 4929 | */ |
| 4930 | 4930 | public function clone_fournisseurs($fromId, $toId) |
| 4931 | 4931 | { |
| 4932 | - // phpcs:enable |
|
| 4932 | + // phpcs:enable |
|
| 4933 | 4933 | $this->db->begin(); |
| 4934 | 4934 | |
| 4935 | 4935 | $now = dol_now(); |
@@ -4965,7 +4965,7 @@ discard block |
||
| 4965 | 4965 | } |
| 4966 | 4966 | } |
| 4967 | 4967 | |
| 4968 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4968 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 4969 | 4969 | /** |
| 4970 | 4970 | * Function recursive, used only by get_arbo_each_prod(), to build tree of subproducts into ->res |
| 4971 | 4971 | * Define value of this->res |
@@ -4980,7 +4980,7 @@ discard block |
||
| 4980 | 4980 | */ |
| 4981 | 4981 | public function fetch_prod_arbo($prod, $compl_path = '', $multiply = 1, $level = 1, $id_parent = 0, $ignore_stock_load = 0) |
| 4982 | 4982 | { |
| 4983 | - // phpcs:enable |
|
| 4983 | + // phpcs:enable |
|
| 4984 | 4984 | global $conf, $langs; |
| 4985 | 4985 | |
| 4986 | 4986 | $tmpproduct = null; |
@@ -5033,7 +5033,7 @@ discard block |
||
| 5033 | 5033 | } |
| 5034 | 5034 | } |
| 5035 | 5035 | |
| 5036 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5036 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5037 | 5037 | /** |
| 5038 | 5038 | * Build the tree of subproducts and return it. |
| 5039 | 5039 | * this->sousprods must have been loaded by this->get_sousproduits_arbo() |
@@ -5044,7 +5044,7 @@ discard block |
||
| 5044 | 5044 | */ |
| 5045 | 5045 | public function get_arbo_each_prod($multiply = 1, $ignore_stock_load = 0) |
| 5046 | 5046 | { |
| 5047 | - // phpcs:enable |
|
| 5047 | + // phpcs:enable |
|
| 5048 | 5048 | $this->res = array(); |
| 5049 | 5049 | if (isset($this->sousprods) && is_array($this->sousprods)) { |
| 5050 | 5050 | foreach ($this->sousprods as $prod_name => $desc_product) { |
@@ -5255,7 +5255,7 @@ discard block |
||
| 5255 | 5255 | } |
| 5256 | 5256 | } |
| 5257 | 5257 | |
| 5258 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5258 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5259 | 5259 | /** |
| 5260 | 5260 | * Return tree of all subproducts for product. Tree contains array of array(0=prodid, 1=>qty, 2=>product type, 3=>label, 4=>incdec, 5=>product ref) |
| 5261 | 5261 | * Set this->sousprods |
@@ -5264,7 +5264,7 @@ discard block |
||
| 5264 | 5264 | */ |
| 5265 | 5265 | public function get_sousproduits_arbo() |
| 5266 | 5266 | { |
| 5267 | - // phpcs:enable |
|
| 5267 | + // phpcs:enable |
|
| 5268 | 5268 | $parent = array(); |
| 5269 | 5269 | |
| 5270 | 5270 | foreach ($this->getChildsArbo($this->id) as $keyChild => $valueChild) { // Warning. getChildsArbo can call getChildsArbo recursively. Starting point is $value[0]=id of product |
@@ -5560,7 +5560,7 @@ discard block |
||
| 5560 | 5560 | } |
| 5561 | 5561 | } |
| 5562 | 5562 | |
| 5563 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5563 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5564 | 5564 | /** |
| 5565 | 5565 | * Return label of a given status |
| 5566 | 5566 | * |
@@ -5571,7 +5571,7 @@ discard block |
||
| 5571 | 5571 | */ |
| 5572 | 5572 | public function LibStatut($status, $mode = 0, $type = 0) |
| 5573 | 5573 | { |
| 5574 | - // phpcs:enable |
|
| 5574 | + // phpcs:enable |
|
| 5575 | 5575 | global $conf, $langs; |
| 5576 | 5576 | |
| 5577 | 5577 | $labelStatus = $labelStatusShort = ''; |
@@ -5670,7 +5670,7 @@ discard block |
||
| 5670 | 5670 | } |
| 5671 | 5671 | |
| 5672 | 5672 | |
| 5673 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5673 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5674 | 5674 | /** |
| 5675 | 5675 | * Adjust stock in a warehouse for product |
| 5676 | 5676 | * |
@@ -5689,7 +5689,7 @@ discard block |
||
| 5689 | 5689 | */ |
| 5690 | 5690 | public function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0, $extrafields = null) |
| 5691 | 5691 | { |
| 5692 | - // phpcs:enable |
|
| 5692 | + // phpcs:enable |
|
| 5693 | 5693 | if ($id_entrepot) { |
| 5694 | 5694 | $this->db->begin(); |
| 5695 | 5695 | |
@@ -5729,7 +5729,7 @@ discard block |
||
| 5729 | 5729 | return -1; |
| 5730 | 5730 | } |
| 5731 | 5731 | |
| 5732 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5732 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5733 | 5733 | /** |
| 5734 | 5734 | * Adjust stock in a warehouse for product with batch number |
| 5735 | 5735 | * |
@@ -5752,7 +5752,7 @@ discard block |
||
| 5752 | 5752 | */ |
| 5753 | 5753 | public function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $dlc = '', $dluo = '', $lot = '', $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0, $extrafields = null, $force_update_batch = false) |
| 5754 | 5754 | { |
| 5755 | - // phpcs:enable |
|
| 5755 | + // phpcs:enable |
|
| 5756 | 5756 | if ($id_entrepot) { |
| 5757 | 5757 | $this->db->begin(); |
| 5758 | 5758 | |
@@ -5792,7 +5792,7 @@ discard block |
||
| 5792 | 5792 | return -1; |
| 5793 | 5793 | } |
| 5794 | 5794 | |
| 5795 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5795 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5796 | 5796 | /** |
| 5797 | 5797 | * Load information about stock of a product into ->stock_reel, ->stock_warehouse[] (including stock_warehouse[idwarehouse]->detail_batch for batch products) |
| 5798 | 5798 | * This function need a lot of load. If you use it on list, use a cache to execute it once for each product id. |
@@ -5807,7 +5807,7 @@ discard block |
||
| 5807 | 5807 | */ |
| 5808 | 5808 | public function load_stock($option = '', $includedraftpoforvirtual = null, $dateofvirtualstock = null) |
| 5809 | 5809 | { |
| 5810 | - // phpcs:enable |
|
| 5810 | + // phpcs:enable |
|
| 5811 | 5811 | global $conf; |
| 5812 | 5812 | |
| 5813 | 5813 | $this->stock_reel = 0; |
@@ -5874,7 +5874,7 @@ discard block |
||
| 5874 | 5874 | } |
| 5875 | 5875 | |
| 5876 | 5876 | |
| 5877 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5877 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5878 | 5878 | /** |
| 5879 | 5879 | * Load value ->stock_theorique of a product. Property this->id must be defined. |
| 5880 | 5880 | * This function need a lot of load. If you use it on list, use a cache to execute it one for each product id. |
@@ -5886,7 +5886,7 @@ discard block |
||
| 5886 | 5886 | */ |
| 5887 | 5887 | public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirtualstock = null) |
| 5888 | 5888 | { |
| 5889 | - // phpcs:enable |
|
| 5889 | + // phpcs:enable |
|
| 5890 | 5890 | global $conf, $hookmanager, $action; |
| 5891 | 5891 | |
| 5892 | 5892 | $stock_commande_client = 0; |
@@ -6045,7 +6045,7 @@ discard block |
||
| 6045 | 6045 | } |
| 6046 | 6046 | } |
| 6047 | 6047 | |
| 6048 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6048 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6049 | 6049 | /** |
| 6050 | 6050 | * Move an uploaded file described into $file array into target directory $sdir. |
| 6051 | 6051 | * |
@@ -6055,7 +6055,7 @@ discard block |
||
| 6055 | 6055 | */ |
| 6056 | 6056 | public function add_photo($sdir, $file) |
| 6057 | 6057 | { |
| 6058 | - // phpcs:enable |
|
| 6058 | + // phpcs:enable |
|
| 6059 | 6059 | global $conf; |
| 6060 | 6060 | |
| 6061 | 6061 | include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
@@ -6092,7 +6092,7 @@ discard block |
||
| 6092 | 6092 | } |
| 6093 | 6093 | } |
| 6094 | 6094 | |
| 6095 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6095 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6096 | 6096 | /** |
| 6097 | 6097 | * Return if at least one photo is available |
| 6098 | 6098 | * |
@@ -6101,7 +6101,7 @@ discard block |
||
| 6101 | 6101 | */ |
| 6102 | 6102 | public function is_photo_available($sdir) |
| 6103 | 6103 | { |
| 6104 | - // phpcs:enable |
|
| 6104 | + // phpcs:enable |
|
| 6105 | 6105 | include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
| 6106 | 6106 | include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php'; |
| 6107 | 6107 | |
@@ -6133,7 +6133,7 @@ discard block |
||
| 6133 | 6133 | return false; |
| 6134 | 6134 | } |
| 6135 | 6135 | |
| 6136 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6136 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6137 | 6137 | /** |
| 6138 | 6138 | * Return an array with all photos of product found on disk. There is no sorting criteria. |
| 6139 | 6139 | * |
@@ -6143,7 +6143,7 @@ discard block |
||
| 6143 | 6143 | */ |
| 6144 | 6144 | public function liste_photos($dir, $nbmax = 0) |
| 6145 | 6145 | { |
| 6146 | - // phpcs:enable |
|
| 6146 | + // phpcs:enable |
|
| 6147 | 6147 | include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
| 6148 | 6148 | include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php'; |
| 6149 | 6149 | |
@@ -6194,7 +6194,7 @@ discard block |
||
| 6194 | 6194 | return $tabobj; |
| 6195 | 6195 | } |
| 6196 | 6196 | |
| 6197 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6197 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6198 | 6198 | /** |
| 6199 | 6199 | * Delete a photo and its thumbs |
| 6200 | 6200 | * |
@@ -6203,7 +6203,7 @@ discard block |
||
| 6203 | 6203 | */ |
| 6204 | 6204 | public function delete_photo($file) |
| 6205 | 6205 | { |
| 6206 | - // phpcs:enable |
|
| 6206 | + // phpcs:enable |
|
| 6207 | 6207 | include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
| 6208 | 6208 | include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php'; |
| 6209 | 6209 | |
@@ -6228,7 +6228,7 @@ discard block |
||
| 6228 | 6228 | } |
| 6229 | 6229 | } |
| 6230 | 6230 | |
| 6231 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6231 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6232 | 6232 | /** |
| 6233 | 6233 | * Load size of image file |
| 6234 | 6234 | * |
@@ -6237,7 +6237,7 @@ discard block |
||
| 6237 | 6237 | */ |
| 6238 | 6238 | public function get_image_size($file) |
| 6239 | 6239 | { |
| 6240 | - // phpcs:enable |
|
| 6240 | + // phpcs:enable |
|
| 6241 | 6241 | $file_osencoded = dol_osencode($file); |
| 6242 | 6242 | $infoImg = getimagesize($file_osencoded); // Get information on image |
| 6243 | 6243 | $this->imgWidth = $infoImg[0]; // Largeur de l'image |
@@ -6335,7 +6335,7 @@ discard block |
||
| 6335 | 6335 | } |
| 6336 | 6336 | |
| 6337 | 6337 | |
| 6338 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6338 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6339 | 6339 | /** |
| 6340 | 6340 | * Get a barcode from the module to generate barcode values. |
| 6341 | 6341 | * Return value is stored into this->barcode |
@@ -6346,7 +6346,7 @@ discard block |
||
| 6346 | 6346 | */ |
| 6347 | 6347 | public function get_barcode($object, $type = '') |
| 6348 | 6348 | { |
| 6349 | - // phpcs:enable |
|
| 6349 | + // phpcs:enable |
|
| 6350 | 6350 | global $conf; |
| 6351 | 6351 | |
| 6352 | 6352 | $result = ''; |
@@ -6452,7 +6452,7 @@ discard block |
||
| 6452 | 6452 | } |
| 6453 | 6453 | } |
| 6454 | 6454 | |
| 6455 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6455 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6456 | 6456 | /** |
| 6457 | 6457 | * Return minimum product recommended price |
| 6458 | 6458 | * |
@@ -6460,7 +6460,7 @@ discard block |
||
| 6460 | 6460 | */ |
| 6461 | 6461 | public function min_recommended_price() |
| 6462 | 6462 | { |
| 6463 | - // phpcs:enable |
|
| 6463 | + // phpcs:enable |
|
| 6464 | 6464 | global $conf; |
| 6465 | 6465 | |
| 6466 | 6466 | $maxpricesupplier = 0; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public $price; |
| 158 | 158 | |
| 159 | - public $price_formated; // used by takepos/ajax/ajax.php |
|
| 159 | + public $price_formated; // used by takepos/ajax/ajax.php |
|
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | 162 | * Selling price with tax |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public $price_ttc; |
| 167 | 167 | |
| 168 | - public $price_ttc_formated; // used by takepos/ajax/ajax.php |
|
| 168 | + public $price_ttc_formated; // used by takepos/ajax/ajax.php |
|
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * Minimum price net |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | public $packaging; |
| 246 | 246 | |
| 247 | 247 | |
| 248 | - public $lifetime; // In seconds |
|
| 248 | + public $lifetime; // In seconds |
|
| 249 | 249 | |
| 250 | 250 | public $qc_frequency; |
| 251 | 251 | |
@@ -406,20 +406,20 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | //! Metric of products |
| 408 | 408 | public $weight; |
| 409 | - public $weight_units; // scale -3, 0, 3, 6 |
|
| 409 | + public $weight_units; // scale -3, 0, 3, 6 |
|
| 410 | 410 | public $length; |
| 411 | - public $length_units; // scale -3, 0, 3, 6 |
|
| 411 | + public $length_units; // scale -3, 0, 3, 6 |
|
| 412 | 412 | public $width; |
| 413 | - public $width_units; // scale -3, 0, 3, 6 |
|
| 413 | + public $width_units; // scale -3, 0, 3, 6 |
|
| 414 | 414 | public $height; |
| 415 | - public $height_units; // scale -3, 0, 3, 6 |
|
| 415 | + public $height_units; // scale -3, 0, 3, 6 |
|
| 416 | 416 | public $surface; |
| 417 | - public $surface_units; // scale -3, 0, 3, 6 |
|
| 417 | + public $surface_units; // scale -3, 0, 3, 6 |
|
| 418 | 418 | public $volume; |
| 419 | - public $volume_units; // scale -3, 0, 3, 6 |
|
| 419 | + public $volume_units; // scale -3, 0, 3, 6 |
|
| 420 | 420 | |
| 421 | 421 | public $net_measure; |
| 422 | - public $net_measure_units; // scale -3, 0, 3, 6 |
|
| 422 | + public $net_measure_units; // scale -3, 0, 3, 6 |
|
| 423 | 423 | |
| 424 | 424 | public $accountancy_code_sell; |
| 425 | 425 | public $accountancy_code_sell_intra; |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'notnull' => -1, 'index' => 0, 'position' => 1000), |
| 612 | 612 | //'tosell' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>'0', 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), |
| 613 | 613 | //'tobuy' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>'0', 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), |
| 614 | - 'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'default' => '0', 'index' => 1, 'position' => 1000), |
|
| 614 | + 'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'default' => '0', 'index' => 1, 'position' => 1000), |
|
| 615 | 615 | ); |
| 616 | 616 | |
| 617 | 617 | /** |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | $result = $this->verify(); // We don't check when update called during a create because verify was already done |
| 1177 | 1177 | } else { |
| 1178 | 1178 | // we can continue |
| 1179 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1179 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1180 | 1180 | } |
| 1181 | 1181 | |
| 1182 | 1182 | if ($result >= 0) { |
@@ -1923,7 +1923,7 @@ discard block |
||
| 1923 | 1923 | */ |
| 1924 | 1924 | private function getArrayForPriceCompare($level = 0) |
| 1925 | 1925 | { |
| 1926 | - $testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly'); |
|
| 1926 | + $testExit = array('multiprices', 'multiprices_ttc', 'multiprices_base_type', 'multiprices_min', 'multiprices_min_ttc', 'multiprices_tva_tx', 'multiprices_recuperableonly'); |
|
| 1927 | 1927 | |
| 1928 | 1928 | foreach ($testExit as $field) { |
| 1929 | 1929 | if (!isset($this->$field)) { |
@@ -2567,8 +2567,8 @@ discard block |
||
| 2567 | 2567 | |
| 2568 | 2568 | //For MultiCompany |
| 2569 | 2569 | //PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity |
| 2570 | - $separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product. |
|
| 2571 | - $separatedStock = false; // Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses. |
|
| 2570 | + $separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product. |
|
| 2571 | + $separatedStock = false; // Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses. |
|
| 2572 | 2572 | $visibleWarehousesEntities = $conf->entity; |
| 2573 | 2573 | if (getDolGlobalString('MULTICOMPANY_PRODUCT_SHARING_ENABLED')) { |
| 2574 | 2574 | if (getDolGlobalString('MULTICOMPANY_PMP_PER_ENTITY_ENABLED')) { |
@@ -2760,15 +2760,15 @@ discard block |
||
| 2760 | 2760 | $sql .= " WHERE entity IN (" . getEntity('productprice') . ")"; |
| 2761 | 2761 | $sql .= " AND price_level=" . ((int) $i); |
| 2762 | 2762 | $sql .= " AND fk_product = " . ((int) $this->id); |
| 2763 | - $sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line |
|
| 2764 | - $sql .= " LIMIT 1"; // Only the first one |
|
| 2763 | + $sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line |
|
| 2764 | + $sql .= " LIMIT 1"; // Only the first one |
|
| 2765 | 2765 | $resql = $this->db->query($sql); |
| 2766 | 2766 | if ($resql) { |
| 2767 | 2767 | $result = $this->db->fetch_array($resql); |
| 2768 | 2768 | |
| 2769 | 2769 | $this->multiprices[$i] = $result ? $result["price"] : null; |
| 2770 | 2770 | $this->multiprices_ttc[$i] = $result ? $result["price_ttc"] : null; |
| 2771 | - $this->multiprices_min[$i] = $result ? $result["price_min"] : null; |
|
| 2771 | + $this->multiprices_min[$i] = $result ? $result["price_min"] : null; |
|
| 2772 | 2772 | $this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null; |
| 2773 | 2773 | $this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null; |
| 2774 | 2774 | // Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on |
@@ -2988,7 +2988,7 @@ discard block |
||
| 2988 | 2988 | $obj = $this->db->fetch_object($result); |
| 2989 | 2989 | $this->stats_mo['customers_' . $role] = $obj->nb_customers ? $obj->nb_customers : 0; |
| 2990 | 2990 | $this->stats_mo['nb_' . $role] = $obj->nb ? $obj->nb : 0; |
| 2991 | - $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM() |
|
| 2991 | + $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM() |
|
| 2992 | 2992 | } else { |
| 2993 | 2993 | $this->error = $this->db->error(); |
| 2994 | 2994 | $error++; |
@@ -4492,7 +4492,7 @@ discard block |
||
| 4492 | 4492 | //Addition of a product with the highest rank +1 |
| 4493 | 4493 | $sql = "INSERT INTO " . $this->db->prefix() . "product_association(fk_product_pere,fk_product_fils,qty,incdec,rang)"; |
| 4494 | 4494 | $sql .= " VALUES (" . ((int) $id_pere) . ", " . ((int) $id_fils) . ", " . price2num($qty, 'MS') . ", " . price2num($incdec, 'MS') . ", " . ((int) $rank) . ")"; |
| 4495 | - if (! $this->db->query($sql)) { |
|
| 4495 | + if (!$this->db->query($sql)) { |
|
| 4496 | 4496 | dol_print_error($this->db); |
| 4497 | 4497 | return -1; |
| 4498 | 4498 | } else { |
@@ -4613,7 +4613,7 @@ discard block |
||
| 4613 | 4613 | $sql = "UPDATE " . $this->db->prefix() . "product_association"; |
| 4614 | 4614 | $sql .= " SET rang = " . ((int) $cpt); |
| 4615 | 4615 | $sql .= " WHERE rowid = " . ((int) $objrank->rowid); |
| 4616 | - if (! $this->db->query($sql)) { |
|
| 4616 | + if (!$this->db->query($sql)) { |
|
| 4617 | 4617 | dol_print_error($this->db); |
| 4618 | 4618 | return -1; |
| 4619 | 4619 | } |
@@ -6680,7 +6680,7 @@ discard block |
||
| 6680 | 6680 | */ |
| 6681 | 6681 | public function getKanbanView($option = '', $arraydata = null) |
| 6682 | 6682 | { |
| 6683 | - global $langs,$conf; |
|
| 6683 | + global $langs, $conf; |
|
| 6684 | 6684 | |
| 6685 | 6685 | $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']); |
| 6686 | 6686 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 235 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 236 | 236 | /** |
| 237 | 237 | * Return full path to current warehouse in $tab (recursive function) |
| 238 | 238 | * |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | private function get_parent_path($tab, $final_label = '') |
| 244 | 244 | { |
| 245 | - //phpcs:enable |
|
| 245 | + //phpcs:enable |
|
| 246 | 246 | if (empty($final_label)) { |
| 247 | 247 | $final_label = $tab['label']; |
| 248 | 248 | } |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | } |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 526 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 527 | 527 | /** |
| 528 | 528 | * Output a combo box with list of units |
| 529 | 529 | * Currently the units are not define in the DB |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | */ |
| 539 | 539 | public function select_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0, $mode = 0) |
| 540 | 540 | { |
| 541 | - //phpcs:enable |
|
| 541 | + //phpcs:enable |
|
| 542 | 542 | print $this->selectMeasuringUnits($name, $measuring_style, $default, $adddefault, $mode); |
| 543 | 543 | } |
| 544 | 544 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 229 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 230 | 230 | /** |
| 231 | 231 | * Load object in memory from the database |
| 232 | 232 | * |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public function fetch_by_product($product_id, $lang = '') |
| 238 | 238 | { |
| 239 | - // phpcs:enable |
|
| 239 | + // phpcs:enable |
|
| 240 | 240 | global $langs, $conf; |
| 241 | 241 | |
| 242 | 242 | $sql = "SELECT"; |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | } |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 407 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 408 | 408 | /** |
| 409 | 409 | * Delete object in database |
| 410 | 410 | * |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | */ |
| 417 | 417 | public function delete_by_product($user, $product_id, $lang_id = '', $notrigger = 0) |
| 418 | 418 | { |
| 419 | - // phpcs:enable |
|
| 419 | + // phpcs:enable |
|
| 420 | 420 | global $conf, $langs; |
| 421 | 421 | $error = 0; |
| 422 | 422 | |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | } |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 455 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 456 | 456 | /** |
| 457 | 457 | * Delete object in database |
| 458 | 458 | * |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | */ |
| 462 | 462 | public function delete_by_file($user) |
| 463 | 463 | { |
| 464 | - // phpcs:enable |
|
| 464 | + // phpcs:enable |
|
| 465 | 465 | global $conf, $langs; |
| 466 | 466 | $error = 0; |
| 467 | 467 | |