Passed
Push — dev ( 813770 )
by Rafael
69:44
created
public/htdocs/product/class/productcustomerprice.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
         $sql .= " " . (empty($this->localtax2_type) ? "'0'" : "'" . $this->db->escape($this->localtax2_type) . "'") . ",";
257 257
         $sql .= " " . (!isset($this->localtax2_tx) ? 'NULL' : (empty($this->localtax2_tx) ? 0 : $this->localtax2_tx)) . ",";
258 258
         $sql .= " " . ((int) $user->id) . ",";
259
-        $sql .=  " " . (!isset($this->price_label) ? 'NULL' : "'" . $this->db->escape($this->price_label) . "'") . ",";
259
+        $sql .= " " . (!isset($this->price_label) ? 'NULL' : "'" . $this->db->escape($this->price_label) . "'") . ",";
260 260
         $sql .= " " . (!isset($this->import_key) ? 'NULL' : "'" . $this->db->escape($this->import_key) . "'");
261 261
         $sql .= ")";
262 262
 
Please login to merge, or discard this patch.
public/htdocs/product/class/propalmergepdfproduct.class.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
public/htdocs/product/class/api_products.class.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1942,7 +1942,7 @@  discard block
 block discarded – undo
1942 1942
         return array('stock_warehouses' => $stockData);
1943 1943
     }
1944 1944
 
1945
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
1945
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
1946 1946
     /**
1947 1947
      * Clean sensible object datas
1948 1948
      *
@@ -1951,7 +1951,7 @@  discard block
 block discarded – undo
1951 1951
      */
1952 1952
     protected function _cleanObjectDatas($object)
1953 1953
     {
1954
-		// phpcs:enable
1954
+        // phpcs:enable
1955 1955
         $object = parent::_cleanObjectDatas($object);
1956 1956
 
1957 1957
         unset($object->statut);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
         //this query will return total products with the filters given
235
-        $sqlTotals =  str_replace('SELECT t.rowid, t.ref, t.ref_ext', 'SELECT count(t.rowid) as total', $sql);
235
+        $sqlTotals = str_replace('SELECT t.rowid, t.ref, t.ref_ext', 'SELECT count(t.rowid) as total', $sql);
236 236
 
237 237
         $sql .= $this->db->order($sortfield, $sortorder);
238 238
         if ($limit) {
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
         if (getDolGlobalString('PRODUIT_MULTIPRICES')) {
331 331
             $key_max = getDolGlobalString('PRODUIT_MULTIPRICES_LIMIT');
332
-            for ($key = 1; $key <= $key_max ; $key++) {
332
+            for ($key = 1; $key <= $key_max; $key++) {
333 333
                 $newvat = $this->product->multiprices_tva_tx[$key];
334 334
                 $newnpr = 0;
335 335
                 $newvatsrccode = $this->product->default_vat_code;
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 
463 463
         if ($result > 0 && getDolGlobalString('PRODUIT_MULTIPRICES')) {
464 464
             $key_max = getDolGlobalString('PRODUIT_MULTIPRICES_LIMIT');
465
-            for ($key = 1; $key <= $key_max ; $key++) {
465
+            for ($key = 1; $key <= $key_max; $key++) {
466 466
                 $pricemodified = false;
467 467
                 if ($this->product->multiprices_base_type[$key] != $oldproduct->multiprices_base_type[$key]) {
468 468
                     $pricemodified = true;
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -467,13 +467,23 @@
 block discarded – undo
467 467
                 if ($this->product->multiprices_base_type[$key] != $oldproduct->multiprices_base_type[$key]) {
468 468
                     $pricemodified = true;
469 469
                 } else {
470
-                    if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) $pricemodified = true;
470
+                    if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) {
471
+                        $pricemodified = true;
472
+                    }
471 473
                     if ($this->product->multiprices_base_type[$key] == 'TTC') {
472
-                        if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) $pricemodified = true;
473
-                        if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) $pricemodified = true;
474
+                        if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) {
475
+                            $pricemodified = true;
476
+                        }
477
+                        if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) {
478
+                            $pricemodified = true;
479
+                        }
474 480
                     } else {
475
-                        if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) $pricemodified = true;
476
-                        if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) $pricemodified = true;
481
+                        if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) {
482
+                            $pricemodified = true;
483
+                        }
484
+                        if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) {
485
+                            $pricemodified = true;
486
+                        }
477 487
                     }
478 488
                 }
479 489
                 if ($pricemodified && $result > 0) {
Please login to merge, or discard this patch.
public/htdocs/product/composition/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,7 +444,7 @@
 block discarded – undo
444 444
 
445 445
                     $unitline = price2num(($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise), 'MU');
446 446
                     $totalline = price2num($value['nb'] * ($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise), 'MT');
447
-                    $total +=  $totalline;
447
+                    $total += $totalline;
448 448
 
449 449
                     print '<td class="right nowraponall">';
450 450
                     print($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'] . 'x ' : '') . '<span class="amount">' . price($unitline, 0, '', 0, 0, -1, $conf->currency)) . '</span>';
Please login to merge, or discard this patch.
public/htdocs/product/stock/replenish.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@
 block discarded – undo
227 227
         $i = 0;
228 228
         $fail = 0;
229 229
         $orders = array();
230
-        $suppliersid = array_keys($suppliers);  // array of ids of suppliers
230
+        $suppliersid = array_keys($suppliers); // array of ids of suppliers
231 231
         foreach ($suppliers as $supplier) {
232 232
             $order = new CommandeFournisseur($db);
233 233
 
Please login to merge, or discard this patch.
public/htdocs/product/stock/massstockmove.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -579,7 +579,7 @@
 block discarded – undo
579 579
 $maxfilesizearray = getMaxFileSizeArray();
580 580
 $maxmin = $maxfilesizearray['maxmin'];
581 581
 if ($maxmin > 0) {
582
-    print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
582
+    print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
583 583
 }
584 584
 print '<input type="file" name="userfile" size="20" maxlength="80"> &nbsp; &nbsp; ';
585 585
 $out = (!getDolGlobalString('MAIN_UPLOAD_DOC') ? ' disabled' : '');
Please login to merge, or discard this patch.
public/htdocs/product/stock/product.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1294,7 +1294,7 @@
 block discarded – undo
1294 1294
         $pse = new ProductStockEntrepot($db);
1295 1295
         $lines = $pse->fetchAll($id);
1296 1296
 
1297
-        $visibleWarehouseEntities = explode(',', getEntity('stock'));   // For MultiCompany compatibility
1297
+        $visibleWarehouseEntities = explode(',', getEntity('stock')); // For MultiCompany compatibility
1298 1298
 
1299 1299
         if (!empty($lines)) {
1300 1300
             $var = false;
Please login to merge, or discard this patch.
public/htdocs/product/stock/productlot_note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
 // Get parameters
35 35
 $id = GETPOSTINT('id');
36
-$ref        = GETPOST('ref', 'alpha');
36
+$ref = GETPOST('ref', 'alpha');
37 37
 $action = GETPOST('action', 'aZ09');
38 38
 
39 39
 // Initialize technical objects
Please login to merge, or discard this patch.
public/htdocs/product/stock/productlot_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -569,7 +569,7 @@
 block discarded – undo
569 569
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
570 570
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
571 571
     }
572
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
572
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
573 573
     if (!empty($arrayfields['t.' . $key]['checked'])) {
574 574
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : '')) . "\n";
575 575
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.