Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/product/canvas/product/actions_card_product.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     }
94 94
 
95 95
 
96
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
96
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
97 97
     /**
98 98
      *    Assign custom values for canvas (for example into this->tpl to be used by templates)
99 99
      *
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public function assign_values(&$action, $id = 0, $ref = '')
106 106
     {
107
-		// phpcs:enable
107
+        // phpcs:enable
108 108
         global $conf, $langs, $user, $mysoc, $canvas;
109 109
         global $form, $formproduct;
110 110
 
Please login to merge, or discard this patch.
public/htdocs/product/canvas/service/actions_card_service.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     }
103 103
 
104 104
 
105
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
105
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
106 106
     /**
107 107
      *    Assign custom values for canvas (for example into this->tpl to be used by templates)
108 108
      *
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function assign_values(&$action, $id = 0, $ref = '')
115 115
     {
116
-		// phpcs:enable
116
+        // phpcs:enable
117 117
         global $conf, $langs, $user, $mysoc, $canvas;
118 118
         global $form;
119 119
 
Please login to merge, or discard this patch.
public/htdocs/product/price_suppliers.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -971,9 +971,9 @@
 block discarded – undo
971 971
                             if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) {
972 972
                                 $extratitle = $langs->trans($value);
973 973
                                 $arrayfields['ef.' . $key] = array('label'    => $extratitle, 'checked' => 0,
974
-                                                                   'position' => (end($arrayfields)['position'] + 1),
975
-                                                                   'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key],
976
-                                                                   'help'     => $extrafields->attributes["product_fournisseur_price"]['help'][$key]);
974
+                                                                    'position' => (end($arrayfields)['position'] + 1),
975
+                                                                    'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key],
976
+                                                                    'help'     => $extrafields->attributes["product_fournisseur_price"]['help'][$key]);
977 977
                             }
978 978
                         }
979 979
                     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 
69 69
 // If socid provided by ajax company selector
70 70
 if (GETPOSTINT('search_fourn_id')) {
71
-    $_GET['id_fourn'] = GETPOSTINT('search_fourn_id');  // Keep set to $_GET an $_POST. Used later.
71
+    $_GET['id_fourn'] = GETPOSTINT('search_fourn_id'); // Keep set to $_GET an $_POST. Used later.
72 72
     $_POST['id_fourn'] = GETPOSTINT('search_fourn_id'); // Keep set to $_GET an $_POST. Used later.
73 73
 }
74 74
 
Please login to merge, or discard this patch.
public/htdocs/product/price.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
             $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '" . $db->escape($mysoc->country_code) . "'";
153 153
             $sql .= " AND t.taux = " . ((float) $tva_tx) . " AND t.active = 1";
154 154
             $sql .= " AND t.code = '" . $db->escape($vatratecode) . "'";
155
-            $sql .= " AND t.type_vat IN (0, 1)";    // Use only VAT rates type all or i.e. the sales type VAT rates.
155
+            $sql .= " AND t.type_vat IN (0, 1)"; // Use only VAT rates type all or i.e. the sales type VAT rates.
156 156
             $sql .= " AND t.entity IN (" . getEntity('c_tva') . ")";
157 157
             $resql = $db->query($sql);
158 158
             if ($resql) {
Please login to merge, or discard this patch.
public/htdocs/product/reassortlot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 
95 95
 // Default sort order (if not yet defined by previous GETPOST)
96 96
 if (!$sortfield) {
97
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
97
+    reset($object->fields); // Reset is required to avoid key() to return null.
98 98
     $sortfield = "p." . key($object->fields); // Set here default search field. By default 1st field in definition.
99 99
 }
100 100
 if (!$sortorder) {
Please login to merge, or discard this patch.
public/htdocs/product/stats/facture.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 if (!empty($search_date_endyear)) {
101 101
     $option .= '&search_date_endyear=' . $search_date_endyear;
102 102
 }
103
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
103
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
104 104
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
105 105
 
106 106
 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
Please login to merge, or discard this patch.
public/htdocs/product/list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 
316 316
 $object->fields = dol_sort_array($object->fields, 'position');
317 317
 $arrayfields = dol_sort_array($arrayfields, 'position');
318
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
318
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
319 319
 
320 320
 // Security check
321 321
 if ($search_type == '0') {
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 if (isModEnabled('category') && $user->hasRight($rightskey, 'creer')) {
864 864
     $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"') . $langs->trans("AffectTag");
865 865
 }
866
-if (in_array($massaction, array('presend', 'predelete','preaffecttag', 'edit_extrafields', 'preupdateprice'))) {
866
+if (in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'edit_extrafields', 'preupdateprice'))) {
867 867
     $arrayofmassactions = array();
868 868
 }
869 869
 if ($user->hasRight($rightskey, 'supprimer')) {
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 }
977 977
 
978 978
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
979
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
979
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
980 980
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
981 981
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
982 982
 
@@ -1948,10 +1948,10 @@  discard block
 block discarded – undo
1948 1948
 
1949 1949
         // Multiprices
1950 1950
         if (getDolGlobalString('PRODUIT_MULTIPRICES')) {
1951
-            if (! isset($productpricescache)) {
1951
+            if (!isset($productpricescache)) {
1952 1952
                 $productpricescache = array();
1953 1953
             }
1954
-            if (! isset($productpricescache[$obj->rowid])) {
1954
+            if (!isset($productpricescache[$obj->rowid])) {
1955 1955
                 $productpricescache[$obj->rowid] = array();
1956 1956
             }
1957 1957
 
Please login to merge, or discard this patch.
public/htdocs/product/class/product.class.php 2 patches
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
         return $result;
1056 1056
     }
1057 1057
 
1058
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1058
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1059 1059
     /**
1060 1060
      *  Check barcode
1061 1061
      *
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
      */
1069 1069
     public function check_barcode($valuetotest, $typefortest)
1070 1070
     {
1071
-		// phpcs:enable
1071
+        // phpcs:enable
1072 1072
         global $conf;
1073 1073
         if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) {
1074 1074
             $module = strtolower(getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM'));
@@ -1984,7 +1984,7 @@  discard block
 block discarded – undo
1984 1984
     }
1985 1985
 
1986 1986
 
1987
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1987
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1988 1988
     /**
1989 1989
      *  Insert a track that we changed a customer price
1990 1990
      *
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
      */
1995 1995
     private function _log_price($user, $level = 0)
1996 1996
     {
1997
-		// phpcs:enable
1997
+        // phpcs:enable
1998 1998
         global $conf;
1999 1999
 
2000 2000
         $now = dol_now();
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
     }
2024 2024
 
2025 2025
 
2026
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2026
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2027 2027
     /**
2028 2028
      *  Delete a price line
2029 2029
      *
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
      */
2034 2034
     public function log_price_delete($user, $rowid)
2035 2035
     {
2036
-		// phpcs:enable
2036
+        // phpcs:enable
2037 2037
         $sql = "DELETE FROM " . $this->db->prefix() . "product_price_by_qty";
2038 2038
         $sql .= " WHERE fk_product_price = " . ((int) $rowid);
2039 2039
         $resql = $this->db->query($sql);
@@ -2168,7 +2168,7 @@  discard block
 block discarded – undo
2168 2168
         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);
2169 2169
     }
2170 2170
 
2171
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2171
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2172 2172
     /**
2173 2173
      * Read price used by a provider.
2174 2174
      * We enter as input couple prodfournprice/qty or triplet qty/product_id/fourn_ref.
@@ -2184,7 +2184,7 @@  discard block
 block discarded – undo
2184 2184
      */
2185 2185
     public function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref = '', $fk_soc = 0)
2186 2186
     {
2187
-		// phpcs:enable
2187
+        // phpcs:enable
2188 2188
         global $action, $hookmanager;
2189 2189
 
2190 2190
         // Call hook if any
@@ -2988,7 +2988,7 @@  discard block
 block discarded – undo
2988 2988
         }
2989 2989
     }
2990 2990
 
2991
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2991
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2992 2992
     /**
2993 2993
      *  Charge tableau des stats OF pour le produit/service
2994 2994
      *
@@ -2997,7 +2997,7 @@  discard block
 block discarded – undo
2997 2997
      */
2998 2998
     public function load_stats_mo($socid = 0)
2999 2999
     {
3000
-		// phpcs:enable
3000
+        // phpcs:enable
3001 3001
         global $user, $hookmanager, $action;
3002 3002
 
3003 3003
         $error = 0;
@@ -3048,7 +3048,7 @@  discard block
 block discarded – undo
3048 3048
         return 1;
3049 3049
     }
3050 3050
 
3051
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3051
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3052 3052
     /**
3053 3053
      *  Charge tableau des stats OF pour le produit/service
3054 3054
      *
@@ -3057,7 +3057,7 @@  discard block
 block discarded – undo
3057 3057
      */
3058 3058
     public function load_stats_bom($socid = 0)
3059 3059
     {
3060
-		// phpcs:enable
3060
+        // phpcs:enable
3061 3061
         global $user, $hookmanager, $action;
3062 3062
 
3063 3063
         $error = 0;
@@ -3117,7 +3117,7 @@  discard block
 block discarded – undo
3117 3117
         return 1;
3118 3118
     }
3119 3119
 
3120
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3120
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3121 3121
     /**
3122 3122
      *  Charge tableau des stats propale pour le produit/service
3123 3123
      *
@@ -3126,7 +3126,7 @@  discard block
 block discarded – undo
3126 3126
      */
3127 3127
     public function load_stats_propale($socid = 0)
3128 3128
     {
3129
-		// phpcs:enable
3129
+        // phpcs:enable
3130 3130
         global $conf, $user, $hookmanager, $action;
3131 3131
 
3132 3132
         $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_customers, COUNT(DISTINCT p.rowid) as nb,";
@@ -3192,7 +3192,7 @@  discard block
 block discarded – undo
3192 3192
     }
3193 3193
 
3194 3194
 
3195
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3195
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3196 3196
     /**
3197 3197
      *  Charge tableau des stats propale pour le produit/service
3198 3198
      *
@@ -3201,7 +3201,7 @@  discard block
 block discarded – undo
3201 3201
      */
3202 3202
     public function load_stats_proposal_supplier($socid = 0)
3203 3203
     {
3204
-		// phpcs:enable
3204
+        // phpcs:enable
3205 3205
         global $conf, $user, $hookmanager, $action;
3206 3206
 
3207 3207
         $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_suppliers, COUNT(DISTINCT p.rowid) as nb,";
@@ -3246,7 +3246,7 @@  discard block
 block discarded – undo
3246 3246
     }
3247 3247
 
3248 3248
 
3249
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3249
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3250 3250
     /**
3251 3251
      *  Charge tableau des stats commande client pour le produit/service
3252 3252
      *
@@ -3257,7 +3257,7 @@  discard block
 block discarded – undo
3257 3257
      */
3258 3258
     public function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0)
3259 3259
     {
3260
-		// phpcs:enable
3260
+        // phpcs:enable
3261 3261
         global $conf, $user, $hookmanager, $action;
3262 3262
 
3263 3263
         $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,";
@@ -3373,7 +3373,7 @@  discard block
 block discarded – undo
3373 3373
         }
3374 3374
     }
3375 3375
 
3376
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3376
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3377 3377
     /**
3378 3378
      *  Charge tableau des stats commande fournisseur pour le produit/service
3379 3379
      *
@@ -3385,7 +3385,7 @@  discard block
 block discarded – undo
3385 3385
      */
3386 3386
     public function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null)
3387 3387
     {
3388
-		// phpcs:enable
3388
+        // phpcs:enable
3389 3389
         global $conf, $user, $hookmanager, $action;
3390 3390
 
3391 3391
         $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_suppliers, COUNT(DISTINCT c.rowid) as nb,";
@@ -3434,7 +3434,7 @@  discard block
 block discarded – undo
3434 3434
         }
3435 3435
     }
3436 3436
 
3437
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3437
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3438 3438
     /**
3439 3439
      *  Charge tableau des stats expedition client pour le produit/service
3440 3440
      *
@@ -3446,7 +3446,7 @@  discard block
 block discarded – undo
3446 3446
      */
3447 3447
     public function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $filterShipmentStatus = '')
3448 3448
     {
3449
-		// phpcs:enable
3449
+        // phpcs:enable
3450 3450
         global $conf, $user, $hookmanager, $action;
3451 3451
 
3452 3452
         $sql = "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb,";
@@ -3520,7 +3520,7 @@  discard block
 block discarded – undo
3520 3520
         }
3521 3521
     }
3522 3522
 
3523
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3523
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3524 3524
     /**
3525 3525
      *  Charge tableau des stats réception fournisseur pour le produit/service
3526 3526
      *
@@ -3532,7 +3532,7 @@  discard block
 block discarded – undo
3532 3532
      */
3533 3533
     public function load_stats_reception($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null)
3534 3534
     {
3535
-		// phpcs:enable
3535
+        // phpcs:enable
3536 3536
         global $conf, $user, $hookmanager, $action;
3537 3537
 
3538 3538
         $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb,";
@@ -3581,7 +3581,7 @@  discard block
 block discarded – undo
3581 3581
         }
3582 3582
     }
3583 3583
 
3584
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3584
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3585 3585
     /**
3586 3586
      *  Charge tableau des stats production pour le produit/service
3587 3587
      *
@@ -3594,7 +3594,7 @@  discard block
 block discarded – undo
3594 3594
      */
3595 3595
     public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null, $warehouseid = 0)
3596 3596
     {
3597
-		// phpcs:enable
3597
+        // phpcs:enable
3598 3598
         global $user, $hookmanager, $action;
3599 3599
 
3600 3600
         $serviceStockIsEnabled = isModEnabled("service") && getDolGlobalString('STOCK_SUPPORTS_SERVICES');
@@ -3708,7 +3708,7 @@  discard block
 block discarded – undo
3708 3708
         }
3709 3709
     }
3710 3710
 
3711
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3711
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3712 3712
     /**
3713 3713
      *  Charge tableau des stats contrat pour le produit/service
3714 3714
      *
@@ -3717,7 +3717,7 @@  discard block
 block discarded – undo
3717 3717
      */
3718 3718
     public function load_stats_contrat($socid = 0)
3719 3719
     {
3720
-		// phpcs:enable
3720
+        // phpcs:enable
3721 3721
         global $conf, $user, $hookmanager, $action;
3722 3722
 
3723 3723
         $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,";
@@ -3782,7 +3782,7 @@  discard block
 block discarded – undo
3782 3782
         }
3783 3783
     }
3784 3784
 
3785
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3785
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3786 3786
     /**
3787 3787
      *  Charge tableau des stats facture pour le produit/service
3788 3788
      *
@@ -3791,7 +3791,7 @@  discard block
 block discarded – undo
3791 3791
      */
3792 3792
     public function load_stats_facture($socid = 0)
3793 3793
     {
3794
-		// phpcs:enable
3794
+        // phpcs:enable
3795 3795
         global $conf, $user, $hookmanager, $action;
3796 3796
 
3797 3797
         $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,";
@@ -3857,7 +3857,7 @@  discard block
 block discarded – undo
3857 3857
     }
3858 3858
 
3859 3859
 
3860
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3860
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3861 3861
     /**
3862 3862
      *  Charge tableau des stats facture recurrentes pour le produit/service
3863 3863
      *
@@ -3866,7 +3866,7 @@  discard block
 block discarded – undo
3866 3866
      */
3867 3867
     public function load_stats_facturerec($socid = 0)
3868 3868
     {
3869
-		// phpcs:enable
3869
+        // phpcs:enable
3870 3870
         global $conf, $user, $hookmanager, $action;
3871 3871
 
3872 3872
         $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,";
@@ -3931,7 +3931,7 @@  discard block
 block discarded – undo
3931 3931
         }
3932 3932
     }
3933 3933
 
3934
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3934
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3935 3935
     /**
3936 3936
      *  Charge tableau des stats facture pour le produit/service
3937 3937
      *
@@ -3940,7 +3940,7 @@  discard block
 block discarded – undo
3940 3940
      */
3941 3941
     public function load_stats_facture_fournisseur($socid = 0)
3942 3942
     {
3943
-		// phpcs:enable
3943
+        // phpcs:enable
3944 3944
         global $conf, $user, $hookmanager, $action;
3945 3945
 
3946 3946
         $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_suppliers, COUNT(DISTINCT f.rowid) as nb,";
@@ -3984,7 +3984,7 @@  discard block
 block discarded – undo
3984 3984
         }
3985 3985
     }
3986 3986
 
3987
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3987
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3988 3988
     /**
3989 3989
      *  Return an array formatted for showing graphs
3990 3990
      *
@@ -3995,7 +3995,7 @@  discard block
 block discarded – undo
3995 3995
      */
3996 3996
     private function _get_stats($sql, $mode, $year = 0)
3997 3997
     {
3998
-		// phpcs:enable
3998
+        // phpcs:enable
3999 3999
         $tab = array();
4000 4000
 
4001 4001
         $resql = $this->db->query($sql);
@@ -4062,7 +4062,7 @@  discard block
 block discarded – undo
4062 4062
     }
4063 4063
 
4064 4064
 
4065
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4065
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4066 4066
     /**
4067 4067
      *  Return nb of units or customers invoices in which product is included
4068 4068
      *
@@ -4075,7 +4075,7 @@  discard block
 block discarded – undo
4075 4075
      */
4076 4076
     public function get_nb_vente($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4077 4077
     {
4078
-		// phpcs:enable
4078
+        // phpcs:enable
4079 4079
         global $conf;
4080 4080
         global $user;
4081 4081
 
@@ -4116,7 +4116,7 @@  discard block
 block discarded – undo
4116 4116
     }
4117 4117
 
4118 4118
 
4119
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4119
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4120 4120
     /**
4121 4121
      *  Return nb of units or supplier invoices in which product is included
4122 4122
      *
@@ -4129,7 +4129,7 @@  discard block
 block discarded – undo
4129 4129
      */
4130 4130
     public function get_nb_achat($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4131 4131
     {
4132
-		// phpcs:enable
4132
+        // phpcs:enable
4133 4133
         global $conf;
4134 4134
         global $user;
4135 4135
 
@@ -4169,7 +4169,7 @@  discard block
 block discarded – undo
4169 4169
         return $this->_get_stats($sql, $mode, $year);
4170 4170
     }
4171 4171
 
4172
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4172
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4173 4173
     /**
4174 4174
      * Return nb of units in proposals in which product is included
4175 4175
      *
@@ -4182,7 +4182,7 @@  discard block
 block discarded – undo
4182 4182
      */
4183 4183
     public function get_nb_propal($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4184 4184
     {
4185
-		// phpcs:enable
4185
+        // phpcs:enable
4186 4186
         global $conf, $user;
4187 4187
 
4188 4188
         $sql = "SELECT sum(d.qty) as qty, date_format(p.datep, '%Y%m')";
@@ -4221,7 +4221,7 @@  discard block
 block discarded – undo
4221 4221
         return $this->_get_stats($sql, $mode, $year);
4222 4222
     }
4223 4223
 
4224
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4224
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4225 4225
     /**
4226 4226
      *  Return nb of units in proposals in which product is included
4227 4227
      *
@@ -4234,7 +4234,7 @@  discard block
 block discarded – undo
4234 4234
      */
4235 4235
     public function get_nb_propalsupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4236 4236
     {
4237
-		// phpcs:enable
4237
+        // phpcs:enable
4238 4238
         global $conf;
4239 4239
         global $user;
4240 4240
 
@@ -4274,7 +4274,7 @@  discard block
 block discarded – undo
4274 4274
         return $this->_get_stats($sql, $mode, $year);
4275 4275
     }
4276 4276
 
4277
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4277
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4278 4278
     /**
4279 4279
      *  Return nb of units in orders in which product is included
4280 4280
      *
@@ -4287,7 +4287,7 @@  discard block
 block discarded – undo
4287 4287
      */
4288 4288
     public function get_nb_order($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4289 4289
     {
4290
-		// phpcs:enable
4290
+        // phpcs:enable
4291 4291
         global $conf, $user;
4292 4292
 
4293 4293
         $sql = "SELECT sum(d.qty) as qty, date_format(c.date_commande, '%Y%m')";
@@ -4326,7 +4326,7 @@  discard block
 block discarded – undo
4326 4326
         return $this->_get_stats($sql, $mode, $year);
4327 4327
     }
4328 4328
 
4329
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4329
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4330 4330
     /**
4331 4331
      *  Return nb of units in orders in which product is included
4332 4332
      *
@@ -4339,7 +4339,7 @@  discard block
 block discarded – undo
4339 4339
      */
4340 4340
     public function get_nb_ordersupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4341 4341
     {
4342
-		// phpcs:enable
4342
+        // phpcs:enable
4343 4343
         global $conf, $user;
4344 4344
 
4345 4345
         $sql = "SELECT sum(d.qty) as qty, date_format(c.date_commande, '%Y%m')";
@@ -4378,7 +4378,7 @@  discard block
 block discarded – undo
4378 4378
         return $this->_get_stats($sql, $mode, $year);
4379 4379
     }
4380 4380
 
4381
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4381
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4382 4382
     /**
4383 4383
      *  Return nb of units in orders in which product is included
4384 4384
      *
@@ -4391,7 +4391,7 @@  discard block
 block discarded – undo
4391 4391
      */
4392 4392
     public function get_nb_contract($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4393 4393
     {
4394
-		// phpcs:enable
4394
+        // phpcs:enable
4395 4395
         global $conf, $user;
4396 4396
 
4397 4397
         $sql = "SELECT sum(d.qty) as qty, date_format(c.date_contrat, '%Y%m')";
@@ -4432,7 +4432,7 @@  discard block
 block discarded – undo
4432 4432
         return $this->_get_stats($sql, $mode, $year);
4433 4433
     }
4434 4434
 
4435
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4435
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4436 4436
     /**
4437 4437
      *  Return nb of units in orders in which product is included
4438 4438
      *
@@ -4445,7 +4445,7 @@  discard block
 block discarded – undo
4445 4445
      */
4446 4446
     public function get_nb_mos($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '')
4447 4447
     {
4448
-		// phpcs:enable
4448
+        // phpcs:enable
4449 4449
         global $conf, $user;
4450 4450
 
4451 4451
         $sql = "SELECT sum(d.qty), date_format(d.date_valid, '%Y%m')";
@@ -4485,7 +4485,7 @@  discard block
 block discarded – undo
4485 4485
         return $this->_get_stats($sql, $mode, $year);
4486 4486
     }
4487 4487
 
4488
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4488
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4489 4489
     /**
4490 4490
      *  Link a product/service to a parent product/service
4491 4491
      *
@@ -4500,7 +4500,7 @@  discard block
 block discarded – undo
4500 4500
     {
4501 4501
         global $user;
4502 4502
 
4503
-		// phpcs:enable
4503
+        // phpcs:enable
4504 4504
         // Clean parameters
4505 4505
         if (!is_numeric($id_pere)) {
4506 4506
             $id_pere = 0;
@@ -4558,7 +4558,7 @@  discard block
 block discarded – undo
4558 4558
         }
4559 4559
     }
4560 4560
 
4561
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4561
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4562 4562
     /**
4563 4563
      *  Modify composed product
4564 4564
      *
@@ -4573,7 +4573,7 @@  discard block
 block discarded – undo
4573 4573
     {
4574 4574
         global $user;
4575 4575
 
4576
-		// phpcs:enable
4576
+        // phpcs:enable
4577 4577
         // Clean parameters
4578 4578
         if (!is_numeric($id_pere)) {
4579 4579
             $id_pere = 0;
@@ -4612,7 +4612,7 @@  discard block
 block discarded – undo
4612 4612
         }
4613 4613
     }
4614 4614
 
4615
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4615
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4616 4616
     /**
4617 4617
      *  Remove a link between a subproduct and a parent product/service
4618 4618
      *
@@ -4625,7 +4625,7 @@  discard block
 block discarded – undo
4625 4625
     {
4626 4626
         global $user;
4627 4627
 
4628
-		// phpcs:enable
4628
+        // phpcs:enable
4629 4629
         if (!is_numeric($fk_parent)) {
4630 4630
             $fk_parent = 0;
4631 4631
         }
@@ -4676,7 +4676,7 @@  discard block
 block discarded – undo
4676 4676
         return 1;
4677 4677
     }
4678 4678
 
4679
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4679
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4680 4680
     /**
4681 4681
      *  Check if it is a sub-product into a kit
4682 4682
      *
@@ -4686,7 +4686,7 @@  discard block
 block discarded – undo
4686 4686
      */
4687 4687
     public function is_sousproduit($fk_parent, $fk_child)
4688 4688
     {
4689
-		// phpcs:enable
4689
+        // phpcs:enable
4690 4690
         $sql = "SELECT fk_product_pere, qty, incdec";
4691 4691
         $sql .= " FROM " . $this->db->prefix() . "product_association";
4692 4692
         $sql .= " WHERE fk_product_pere  = " . ((int) $fk_parent);
@@ -4713,7 +4713,7 @@  discard block
 block discarded – undo
4713 4713
     }
4714 4714
 
4715 4715
 
4716
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4716
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4717 4717
     /**
4718 4718
      *  Add a supplier price for the product.
4719 4719
      *  Note: Duplicate ref is accepted for different quantity only, or for different companies.
@@ -4726,7 +4726,7 @@  discard block
 block discarded – undo
4726 4726
      */
4727 4727
     public function add_fournisseur($user, $id_fourn, $ref_fourn, $quantity)
4728 4728
     {
4729
-		// phpcs:enable
4729
+        // phpcs:enable
4730 4730
         global $conf;
4731 4731
 
4732 4732
         $now = dol_now();
@@ -4814,7 +4814,7 @@  discard block
 block discarded – undo
4814 4814
     }
4815 4815
 
4816 4816
 
4817
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4817
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4818 4818
     /**
4819 4819
      * Return list of suppliers providing the product or service
4820 4820
      *
@@ -4822,7 +4822,7 @@  discard block
 block discarded – undo
4822 4822
      */
4823 4823
     public function list_suppliers()
4824 4824
     {
4825
-		// phpcs:enable
4825
+        // phpcs:enable
4826 4826
         global $conf;
4827 4827
 
4828 4828
         $list = array();
@@ -4846,7 +4846,7 @@  discard block
 block discarded – undo
4846 4846
         return $list;
4847 4847
     }
4848 4848
 
4849
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4849
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4850 4850
     /**
4851 4851
      *  Recopie les prix d'un produit/service sur un autre
4852 4852
      *
@@ -4934,7 +4934,7 @@  discard block
 block discarded – undo
4934 4934
         return 1;
4935 4935
     }
4936 4936
 
4937
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4937
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4938 4938
     /**
4939 4939
      * Clone links between products
4940 4940
      *
@@ -4944,7 +4944,7 @@  discard block
 block discarded – undo
4944 4944
      */
4945 4945
     public function clone_associations($fromId, $toId)
4946 4946
     {
4947
-		// phpcs:enable
4947
+        // phpcs:enable
4948 4948
         $this->db->begin();
4949 4949
 
4950 4950
         $sql = 'INSERT INTO ' . $this->db->prefix() . 'product_association (fk_product_pere, fk_product_fils, qty, incdec)';
@@ -4961,7 +4961,7 @@  discard block
 block discarded – undo
4961 4961
         return 1;
4962 4962
     }
4963 4963
 
4964
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4964
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4965 4965
     /**
4966 4966
      *  Recopie les fournisseurs et prix fournisseurs d'un produit/service sur un autre
4967 4967
      *
@@ -4971,7 +4971,7 @@  discard block
 block discarded – undo
4971 4971
      */
4972 4972
     public function clone_fournisseurs($fromId, $toId)
4973 4973
     {
4974
-		// phpcs:enable
4974
+        // phpcs:enable
4975 4975
         $this->db->begin();
4976 4976
 
4977 4977
         $now = dol_now();
@@ -5007,7 +5007,7 @@  discard block
 block discarded – undo
5007 5007
         }
5008 5008
     }
5009 5009
 
5010
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5010
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5011 5011
     /**
5012 5012
      *  Function recursive, used only by get_arbo_each_prod(), to build tree of subproducts into ->res
5013 5013
      *  Define value of this->res
@@ -5022,7 +5022,7 @@  discard block
 block discarded – undo
5022 5022
      */
5023 5023
     public function fetch_prod_arbo($prod, $compl_path = '', $multiply = 1, $level = 1, $id_parent = 0, $ignore_stock_load = 0)
5024 5024
     {
5025
-		// phpcs:enable
5025
+        // phpcs:enable
5026 5026
         global $conf, $langs;
5027 5027
 
5028 5028
         $tmpproduct = null;
@@ -5075,7 +5075,7 @@  discard block
 block discarded – undo
5075 5075
         }
5076 5076
     }
5077 5077
 
5078
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5078
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5079 5079
     /**
5080 5080
      *  Build the tree of subproducts and return it.
5081 5081
      *  this->sousprods must have been loaded by this->get_sousproduits_arbo()
@@ -5086,7 +5086,7 @@  discard block
 block discarded – undo
5086 5086
      */
5087 5087
     public function get_arbo_each_prod($multiply = 1, $ignore_stock_load = 0)
5088 5088
     {
5089
-		// phpcs:enable
5089
+        // phpcs:enable
5090 5090
         $this->res = array();
5091 5091
         if (isset($this->sousprods) && is_array($this->sousprods)) {
5092 5092
             foreach ($this->sousprods as $prod_name => $desc_product) {
@@ -5297,7 +5297,7 @@  discard block
 block discarded – undo
5297 5297
         }
5298 5298
     }
5299 5299
 
5300
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5300
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5301 5301
     /**
5302 5302
      *     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)
5303 5303
      *     Set this->sousprods
@@ -5306,7 +5306,7 @@  discard block
 block discarded – undo
5306 5306
      */
5307 5307
     public function get_sousproduits_arbo()
5308 5308
     {
5309
-		// phpcs:enable
5309
+        // phpcs:enable
5310 5310
         $parent = array();
5311 5311
 
5312 5312
         foreach ($this->getChildsArbo($this->id) as $keyChild => $valueChild) {    // Warning. getChildsArbo can call getChildsArbo recursively. Starting point is $value[0]=id of product
@@ -5602,7 +5602,7 @@  discard block
 block discarded – undo
5602 5602
         }
5603 5603
     }
5604 5604
 
5605
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5605
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5606 5606
     /**
5607 5607
      *    Return label of a given status
5608 5608
      *
@@ -5613,7 +5613,7 @@  discard block
 block discarded – undo
5613 5613
      */
5614 5614
     public function LibStatut($status, $mode = 0, $type = 0)
5615 5615
     {
5616
-		// phpcs:enable
5616
+        // phpcs:enable
5617 5617
         global $conf, $langs;
5618 5618
 
5619 5619
         $labelStatus = $labelStatusShort = '';
@@ -5711,7 +5711,7 @@  discard block
 block discarded – undo
5711 5711
     }
5712 5712
 
5713 5713
 
5714
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5714
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5715 5715
     /**
5716 5716
      *  Adjust stock in a warehouse for product
5717 5717
      *
@@ -5730,7 +5730,7 @@  discard block
 block discarded – undo
5730 5730
      */
5731 5731
     public function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0, $extrafields = null)
5732 5732
     {
5733
-		// phpcs:enable
5733
+        // phpcs:enable
5734 5734
         if ($id_entrepot) {
5735 5735
             $this->db->begin();
5736 5736
 
@@ -5770,7 +5770,7 @@  discard block
 block discarded – undo
5770 5770
         return -1;
5771 5771
     }
5772 5772
 
5773
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5773
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5774 5774
     /**
5775 5775
      *  Adjust stock in a warehouse for product with batch number
5776 5776
      *
@@ -5793,7 +5793,7 @@  discard block
 block discarded – undo
5793 5793
      */
5794 5794
     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)
5795 5795
     {
5796
-		// phpcs:enable
5796
+        // phpcs:enable
5797 5797
         if ($id_entrepot) {
5798 5798
             $this->db->begin();
5799 5799
 
@@ -5833,7 +5833,7 @@  discard block
 block discarded – undo
5833 5833
         return -1;
5834 5834
     }
5835 5835
 
5836
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5836
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5837 5837
     /**
5838 5838
      * Load information about stock of a product into ->stock_reel, ->stock_warehouse[] (including stock_warehouse[idwarehouse]->detail_batch for batch products)
5839 5839
      * This function need a lot of load. If you use it on list, use a cache to execute it once for each product id.
@@ -5848,7 +5848,7 @@  discard block
 block discarded – undo
5848 5848
      */
5849 5849
     public function load_stock($option = '', $includedraftpoforvirtual = null, $dateofvirtualstock = null)
5850 5850
     {
5851
-		// phpcs:enable
5851
+        // phpcs:enable
5852 5852
         global $conf;
5853 5853
 
5854 5854
         $this->stock_reel = 0;
@@ -5915,7 +5915,7 @@  discard block
 block discarded – undo
5915 5915
     }
5916 5916
 
5917 5917
 
5918
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5918
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
5919 5919
     /**
5920 5920
      *  Load value ->stock_theorique of a product. Property this->id must be defined.
5921 5921
      *  This function need a lot of load. If you use it on list, use a cache to execute it one for each product id.
@@ -5927,7 +5927,7 @@  discard block
 block discarded – undo
5927 5927
      */
5928 5928
     public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirtualstock = null)
5929 5929
     {
5930
-		// phpcs:enable
5930
+        // phpcs:enable
5931 5931
         global $conf, $hookmanager, $action;
5932 5932
 
5933 5933
         $stock_commande_client = 0;
@@ -6086,7 +6086,7 @@  discard block
 block discarded – undo
6086 6086
         }
6087 6087
     }
6088 6088
 
6089
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6089
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6090 6090
     /**
6091 6091
      *  Move an uploaded file described into $file array into target directory $sdir.
6092 6092
      *
@@ -6096,7 +6096,7 @@  discard block
 block discarded – undo
6096 6096
      */
6097 6097
     public function add_photo($sdir, $file)
6098 6098
     {
6099
-		// phpcs:enable
6099
+        // phpcs:enable
6100 6100
         global $conf;
6101 6101
 
6102 6102
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
@@ -6133,7 +6133,7 @@  discard block
 block discarded – undo
6133 6133
         }
6134 6134
     }
6135 6135
 
6136
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6136
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6137 6137
     /**
6138 6138
      *  Return if at least one photo is available
6139 6139
      *
@@ -6142,7 +6142,7 @@  discard block
 block discarded – undo
6142 6142
      */
6143 6143
     public function is_photo_available($sdir)
6144 6144
     {
6145
-		// phpcs:enable
6145
+        // phpcs:enable
6146 6146
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
6147 6147
         include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
6148 6148
 
@@ -6174,7 +6174,7 @@  discard block
 block discarded – undo
6174 6174
         return false;
6175 6175
     }
6176 6176
 
6177
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6177
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6178 6178
     /**
6179 6179
      * Return an array with all photos of product found on disk. There is no sorting criteria.
6180 6180
      *
@@ -6184,7 +6184,7 @@  discard block
 block discarded – undo
6184 6184
      */
6185 6185
     public function liste_photos($dir, $nbmax = 0)
6186 6186
     {
6187
-		// phpcs:enable
6187
+        // phpcs:enable
6188 6188
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
6189 6189
         include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
6190 6190
 
@@ -6235,7 +6235,7 @@  discard block
 block discarded – undo
6235 6235
         return $tabobj;
6236 6236
     }
6237 6237
 
6238
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6238
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6239 6239
     /**
6240 6240
      *  Delete a photo and its thumbs
6241 6241
      *
@@ -6244,7 +6244,7 @@  discard block
 block discarded – undo
6244 6244
      */
6245 6245
     public function delete_photo($file)
6246 6246
     {
6247
-		// phpcs:enable
6247
+        // phpcs:enable
6248 6248
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
6249 6249
         include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
6250 6250
 
@@ -6269,7 +6269,7 @@  discard block
 block discarded – undo
6269 6269
         }
6270 6270
     }
6271 6271
 
6272
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6272
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6273 6273
     /**
6274 6274
      *  Load size of image file
6275 6275
      *
@@ -6278,7 +6278,7 @@  discard block
 block discarded – undo
6278 6278
      */
6279 6279
     public function get_image_size($file)
6280 6280
     {
6281
-		// phpcs:enable
6281
+        // phpcs:enable
6282 6282
         $file_osencoded = dol_osencode($file);
6283 6283
         $infoImg = getimagesize($file_osencoded); // Get information on image
6284 6284
         $this->imgWidth = $infoImg[0]; // Largeur de l'image
@@ -6376,7 +6376,7 @@  discard block
 block discarded – undo
6376 6376
     }
6377 6377
 
6378 6378
 
6379
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6379
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6380 6380
     /**
6381 6381
      *  Get a barcode from the module to generate barcode values.
6382 6382
      *  Return value is stored into this->barcode
@@ -6387,7 +6387,7 @@  discard block
 block discarded – undo
6387 6387
      */
6388 6388
     public function get_barcode($object, $type = '')
6389 6389
     {
6390
-		// phpcs:enable
6390
+        // phpcs:enable
6391 6391
         global $conf;
6392 6392
 
6393 6393
         $result = '';
@@ -6494,7 +6494,7 @@  discard block
 block discarded – undo
6494 6494
         return $label;
6495 6495
     }
6496 6496
 
6497
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6497
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
6498 6498
     /**
6499 6499
      * Return minimum product recommended price
6500 6500
      *
@@ -6502,7 +6502,7 @@  discard block
 block discarded – undo
6502 6502
      */
6503 6503
     public function min_recommended_price()
6504 6504
     {
6505
-		// phpcs:enable
6505
+        // phpcs:enable
6506 6506
         global $conf;
6507 6507
 
6508 6508
         $maxpricesupplier = 0;
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public $price;
148 148
 
149
-    public $price_formated;         // used by takepos/ajax/ajax.php
149
+    public $price_formated; // used by takepos/ajax/ajax.php
150 150
 
151 151
     /**
152 152
      * Selling price with tax
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public $price_ttc;
157 157
 
158
-    public $price_ttc_formated;     // used by takepos/ajax/ajax.php
158
+    public $price_ttc_formated; // used by takepos/ajax/ajax.php
159 159
 
160 160
     /**
161 161
      * Minimum price net
@@ -408,20 +408,20 @@  discard block
 block discarded – undo
408 408
 
409 409
     //! Metric of products
410 410
     public $weight;
411
-    public $weight_units;   // scale -3, 0, 3, 6
411
+    public $weight_units; // scale -3, 0, 3, 6
412 412
     public $length;
413
-    public $length_units;   // scale -3, 0, 3, 6
413
+    public $length_units; // scale -3, 0, 3, 6
414 414
     public $width;
415
-    public $width_units;    // scale -3, 0, 3, 6
415
+    public $width_units; // scale -3, 0, 3, 6
416 416
     public $height;
417
-    public $height_units;   // scale -3, 0, 3, 6
417
+    public $height_units; // scale -3, 0, 3, 6
418 418
     public $surface;
419
-    public $surface_units;  // scale -3, 0, 3, 6
419
+    public $surface_units; // scale -3, 0, 3, 6
420 420
     public $volume;
421
-    public $volume_units;   // scale -3, 0, 3, 6
421
+    public $volume_units; // scale -3, 0, 3, 6
422 422
 
423 423
     public $net_measure;
424
-    public $net_measure_units;  // scale -3, 0, 3, 6
424
+    public $net_measure_units; // scale -3, 0, 3, 6
425 425
 
426 426
     public $accountancy_code_sell;
427 427
     public $accountancy_code_sell_intra;
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
         'import_key'    => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'notnull' => -1, 'index' => 0, 'position' => 1000),
634 634
         //'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')),
635 635
         //'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')),
636
-        'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => 1,  'notnull' => 1, 'default' => '0', 'index' => 1,  'position' => 1000),
636
+        'mandatory_period' => array('type' => 'integer', 'label' => 'mandatoryperiod', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'default' => '0', 'index' => 1, 'position' => 1000),
637 637
     );
638 638
 
639 639
     /**
@@ -1957,7 +1957,7 @@  discard block
 block discarded – undo
1957 1957
      */
1958 1958
     private function getArrayForPriceCompare($level = 0)
1959 1959
     {
1960
-        $testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly');
1960
+        $testExit = array('multiprices', 'multiprices_ttc', 'multiprices_base_type', 'multiprices_min', 'multiprices_min_ttc', 'multiprices_tva_tx', 'multiprices_recuperableonly');
1961 1961
 
1962 1962
         foreach ($testExit as $field) {
1963 1963
             if (!isset($this->$field)) {
@@ -2601,8 +2601,8 @@  discard block
 block discarded – undo
2601 2601
 
2602 2602
         //For MultiCompany
2603 2603
         //PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity
2604
-        $separatedEntityPMP = false;    // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2605
-        $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.
2604
+        $separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
2605
+        $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.
2606 2606
         $visibleWarehousesEntities = $conf->entity;
2607 2607
         if (getDolGlobalString('MULTICOMPANY_PRODUCT_SHARING_ENABLED')) {
2608 2608
             if (getDolGlobalString('MULTICOMPANY_PMP_PER_ENTITY_ENABLED')) {
@@ -2795,15 +2795,15 @@  discard block
 block discarded – undo
2795 2795
                         $sql .= " WHERE entity IN (" . getEntity('productprice') . ")";
2796 2796
                         $sql .= " AND price_level=" . ((int) $i);
2797 2797
                         $sql .= " AND fk_product = " . ((int) $this->id);
2798
-                        $sql .= " ORDER BY date_price DESC, rowid DESC";    // Get the most recent line
2799
-                        $sql .= " LIMIT 1";                                 // Only the first one
2798
+                        $sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line
2799
+                        $sql .= " LIMIT 1"; // Only the first one
2800 2800
                         $resql = $this->db->query($sql);
2801 2801
                         if ($resql) {
2802 2802
                             $result = $this->db->fetch_array($resql);
2803 2803
 
2804 2804
                             $this->multiprices[$i] = $result ? $result["price"] : null;
2805 2805
                             $this->multiprices_ttc[$i] = $result ? $result["price_ttc"] : null;
2806
-                            $this->multiprices_min[$i] =  $result ? $result["price_min"] : null;
2806
+                            $this->multiprices_min[$i] = $result ? $result["price_min"] : null;
2807 2807
                             $this->multiprices_min_ttc[$i] = $result ? $result["price_min_ttc"] : null;
2808 2808
                             $this->multiprices_base_type[$i] = $result ? $result["price_base_type"] : null;
2809 2809
                             // Next two fields are used only if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on
@@ -3028,7 +3028,7 @@  discard block
 block discarded – undo
3028 3028
                 $obj = $this->db->fetch_object($result);
3029 3029
                 $this->stats_mo['customers_' . $role] = $obj->nb_customers ? $obj->nb_customers : 0;
3030 3030
                 $this->stats_mo['nb_' . $role] = $obj->nb ? $obj->nb : 0;
3031
-                $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0;     // qty may be a float due to the SUM()
3031
+                $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM()
3032 3032
             } else {
3033 3033
                 $this->error = $this->db->error();
3034 3034
                 $error++;
@@ -4534,7 +4534,7 @@  discard block
 block discarded – undo
4534 4534
                 //Addition of a product with the highest rank +1
4535 4535
                 $sql = "INSERT INTO " . $this->db->prefix() . "product_association(fk_product_pere,fk_product_fils,qty,incdec,rang)";
4536 4536
                 $sql .= " VALUES (" . ((int) $id_pere) . ", " . ((int) $id_fils) . ", " . price2num($qty, 'MS') . ", " . ((int) $incdec) . ", " . ((int) $rank) . ")";
4537
-                if (! $this->db->query($sql)) {
4537
+                if (!$this->db->query($sql)) {
4538 4538
                     dol_print_error($this->db);
4539 4539
                     return -1;
4540 4540
                 } else {
@@ -4655,7 +4655,7 @@  discard block
 block discarded – undo
4655 4655
                 $sql = "UPDATE " . $this->db->prefix() . "product_association";
4656 4656
                 $sql .= " SET rang = " . ((int) $cpt);
4657 4657
                 $sql .= " WHERE rowid = " . ((int) $objrank->rowid);
4658
-                if (! $this->db->query($sql)) {
4658
+                if (!$this->db->query($sql)) {
4659 4659
                     dol_print_error($this->db);
4660 4660
                     return -1;
4661 4661
                 }
@@ -6722,7 +6722,7 @@  discard block
 block discarded – undo
6722 6722
      */
6723 6723
     public function getKanbanView($option = '', $arraydata = null)
6724 6724
     {
6725
-        global $langs,$conf;
6725
+        global $langs, $conf;
6726 6726
 
6727 6727
         $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
6728 6728
 
Please login to merge, or discard this patch.
public/htdocs/product/class/html.formproduct.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         }
234 234
     }
235 235
 
236
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
236
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
237 237
     /**
238 238
      * Return full path to current warehouse in $tab (recursive function)
239 239
      *
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     private function get_parent_path($tab, $final_label = '')
245 245
     {
246
-		//phpcs:enable
246
+        //phpcs:enable
247 247
         if (empty($final_label)) {
248 248
             $final_label = $tab['label'];
249 249
         }
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
         }
525 525
     }
526 526
 
527
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
527
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
528 528
     /**
529 529
      *  Output a combo box with list of units
530 530
      *  Currently the units are not define in the DB
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
      */
540 540
     public function select_measuring_units($name = 'measuring_units', $measuring_style = '', $selected = '0', $adddefault = 0, $mode = 0)
541 541
     {
542
-		//phpcs:enable
542
+        //phpcs:enable
543 543
         print $this->selectMeasuringUnits($name, $measuring_style, $selected, $adddefault, $mode);
544 544
     }
545 545
 
Please login to merge, or discard this patch.