Passed
Push — main ( f1540e...02d90d )
by Rafael
45:15
created
htdocs/product/stock/stats/commande_fournisseur.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
 
41 41
 $id = GETPOSTINT('id');
42 42
 $ref = GETPOST('ref', 'alpha');
43
-$batch      = GETPOST('batch', 'alpha');
44
-$objectid  = GETPOSTINT('productid');
43
+$batch = GETPOST('batch', 'alpha');
44
+$objectid = GETPOSTINT('productid');
45 45
 
46 46
 // Security check
47 47
 $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
Please login to merge, or discard this patch.
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.
htdocs/product/stock/productlot_card.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
     $backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1);
155 155
 
156
-    if ($action == 'seteatby' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) {
156
+    if ($action == 'seteatby' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) {
157 157
         $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('eatbymonth'), GETPOSTINT('eatbyday'), GETPOSTINT('eatbyyear'));
158 158
 
159 159
         // check parameters
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         }
179 179
     }
180 180
 
181
-    if ($action == 'setsellby' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) {
181
+    if ($action == 'setsellby' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) {
182 182
         $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('sellbymonth'), GETPOSTINT('sellbyday'), GETPOSTINT('sellbyyear'));
183 183
 
184 184
         // check parameters
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         }
204 204
     }
205 205
 
206
-    if ($action == 'seteol_date' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) {
206
+    if ($action == 'seteol_date' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) {
207 207
         $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('eol_datemonth'), GETPOSTINT('eol_dateday'), GETPOSTINT('eol_dateyear'));
208 208
         $result = $object->setValueFrom('eol_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
209 209
         if ($result < 0) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         }
215 215
     }
216 216
 
217
-    if ($action == 'setmanufacturing_date' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) {
217
+    if ($action == 'setmanufacturing_date' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) {
218 218
         $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('manufacturing_datemonth'), GETPOSTINT('manufacturing_dateday'), GETPOSTINT('manufacturing_dateyear'));
219 219
         $result = $object->setValueFrom('manufacturing_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
220 220
         if ($result < 0) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         }
226 226
     }
227 227
 
228
-    if ($action == 'setscrapping_date' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) {
228
+    if ($action == 'setscrapping_date' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) {
229 229
         $newvalue = dol_mktime(12, 0, 0, GETPOSTINT('scrapping_datemonth'), GETPOSTINT('scrapping_dateday'), GETPOSTINT('scrapping_dateyear'));
230 230
         $result = $object->setValueFrom('scrapping_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
231 231
         if ($result < 0) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         }
248 248
     } */
249 249
 
250
-    if ($action == 'setqc_frequency' && $user->hasRight('stock', 'creer') && ! GETPOST('cancel', 'alpha')) {
250
+    if ($action == 'setqc_frequency' && $user->hasRight('stock', 'creer') && !GETPOST('cancel', 'alpha')) {
251 251
         $result = $object->setValueFrom('qc_frequency', GETPOST('qc_frequency'), '', null, 'int', '', $user, 'PRODUCT_MODIFY');
252 252
         if ($result < 0) { // Prévoir un test de format de durée
253 253
             setEventMessages($object->error, null, 'errors');
Please login to merge, or discard this patch.
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.
htdocs/product/stock/stockatdate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     if ($productid > 0) {
156 156
         $sql .= " AND ps.fk_product = " . ((int) $productid);
157 157
     }
158
-    if (! empty($search_fk_warehouse)) {
158
+    if (!empty($search_fk_warehouse)) {
159 159
         $sql .= " AND ps.fk_entrepot IN (" . $db->sanitize(implode(",", $search_fk_warehouse)) . ")";
160 160
     }
161 161
     if ($search_ref) {
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 
566 566
         if ($mode == 'future') {
567 567
             $prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0, $dateendofday);
568
-            $stock = $prod->stock_theorique;        // virtual stock at a date
568
+            $stock = $prod->stock_theorique; // virtual stock at a date
569 569
             $prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0);
570 570
             $virtualstock = $prod->stock_theorique; // virtual stock in infinite future
571 571
         } else {
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 // Default sort order (if not yet defined by previous GETPOST)
77 77
 if (!$sortfield) {
78
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
78
+    reset($object->fields); // Reset is required to avoid key() to return null.
79 79
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
80 80
 }
81 81
 if (!$sortorder) {
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 // Output page
346 346
 // --------------------------------------------------------------------
347 347
 
348
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
348
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
349 349
 
350 350
 // Example : Adding jquery code
351 351
 // print '<script type="text/javascript">
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
564 564
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
565 565
     }
566
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
566
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
567 567
     if (!empty($arrayfields['t.' . $key]['checked'])) {
568 568
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
569 569
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 $confirm    = GETPOST('confirm', 'alpha');
52 52
 $cancel     = GETPOST('cancel', 'aZ09');
53 53
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
54
-$backtopage = GETPOST('backtopage', 'alpha');                   // if not set, a default page will be used
54
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
55 55
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
56 56
 $qty = GETPOSTINT('qty');
57 57
 $fk_product = GETPOSTINT('fk_product');
@@ -538,28 +538,28 @@  discard block
 block discarded – undo
538 538
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
539 539
     } elseif ($action == 'destock') { // Destock confirmation
540 540
         // Create an array for form
541
-        $formquestion = array(  'text' => '',
541
+        $formquestion = array('text' => '',
542 542
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40),
543 543
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
544 544
         );
545 545
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1);
546 546
     } elseif ($action == 'destockcancel') { // Destock confirmation cancel
547 547
         // Create an array for form
548
-        $formquestion = array(  'text' => '',
548
+        $formquestion = array('text' => '',
549 549
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40),
550 550
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
551 551
         );
552 552
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1);
553 553
     } elseif ($action == 'addstock') { // Addstock confirmation
554 554
         // Create an array for form
555
-        $formquestion = array(  'text' => '',
555
+        $formquestion = array('text' => '',
556 556
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . '&nbsp;:', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40),
557 557
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
558 558
         );
559 559
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1);
560 560
     } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel
561 561
         // Create an array for form
562
-        $formquestion = array(  'text' => '',
562
+        $formquestion = array('text' => '',
563 563
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . '&nbsp;:', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40),
564 564
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
565 565
         );
Please login to merge, or discard this patch.
htdocs/product/stock/class/mouvementstock.class.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $this->db = $db;
161 161
     }
162 162
 
163
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
163
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
164 164
     /**
165 165
      *  Add a movement of stock (in one direction only).
166 166
      *  This is the lowest level method to record a stock change. There is no control if warehouse is open or not.
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      */
191 191
     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)
192 192
     {
193
-		// phpcs:enable
193
+        // phpcs:enable
194 194
         global $conf, $langs;
195 195
 
196 196
         require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php';
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
         return $result;
961 961
     }
962 962
 
963
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
963
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
964 964
     /**
965 965
      * Return Url link of origin object
966 966
      *
@@ -970,7 +970,7 @@  discard block
 block discarded – undo
970 970
      */
971 971
     public function get_origin($origin_id, $origin_type)
972 972
     {
973
-		// phpcs:enable
973
+        // phpcs:enable
974 974
         $origin = '';
975 975
 
976 976
         switch ($origin_type) {
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
         return $this->LibStatut($mode);
1183 1183
     }
1184 1184
 
1185
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1185
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1186 1186
     /**
1187 1187
      *  Return the label of the status
1188 1188
      *
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
      */
1192 1192
     public function LibStatut($mode = 0)
1193 1193
     {
1194
-		// phpcs:enable
1194
+        // phpcs:enable
1195 1195
         global $langs;
1196 1196
 
1197 1197
         if ($mode == 0 || $mode == 1) {
Please login to merge, or discard this patch.
htdocs/printing/admin/printing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
             $i++;
203 203
 
204 204
             if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') {
205
-                $keyforprovider = '';   // @BUG This must be set
205
+                $keyforprovider = ''; // @BUG This must be set
206 206
 
207 207
                 // Token
208 208
                 print '<tr class="oddeven">';
Please login to merge, or discard this patch.