Passed
Push — GENERAL_BUG_REVIEW_240911 ( 8cbbee...d4fdcf )
by Rafael
64:20
created
public/htdocs/product/stock/stocktransfer/stocktransfer_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 $confirm    = GETPOST('confirm', 'alpha');
53 53
 $cancel     = GETPOST('cancel', 'aZ09');
54 54
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
55
-$backtopage = GETPOST('backtopage', 'alpha');                   // if not set, a default page will be used
55
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
56 56
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
57 57
 $qty = GETPOSTINT('qty');
58 58
 $fk_product = GETPOSTINT('fk_product');
@@ -556,28 +556,28 @@  discard block
 block discarded – undo
556 556
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
557 557
     } elseif ($action == 'destock') { // Destock confirmation
558 558
         // Create an array for form
559
-        $formquestion = array(  'text' => '',
559
+        $formquestion = array('text' => '',
560 560
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40),
561 561
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
562 562
         );
563 563
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1);
564 564
     } elseif ($action == 'destockcancel') { // Destock confirmation cancel
565 565
         // Create an array for form
566
-        $formquestion = array(  'text' => '',
566
+        $formquestion = array('text' => '',
567 567
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40),
568 568
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
569 569
         );
570 570
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1);
571 571
     } elseif ($action == 'addstock') { // Addstock confirmation
572 572
         // Create an array for form
573
-        $formquestion = array(  'text' => '',
573
+        $formquestion = array('text' => '',
574 574
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . ' :', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40),
575 575
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
576 576
         );
577 577
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1);
578 578
     } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel
579 579
         // Create an array for form
580
-        $formquestion = array(  'text' => '',
580
+        $formquestion = array('text' => '',
581 581
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . ' :', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40),
582 582
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
583 583
         );
Please login to merge, or discard this patch.
public/htdocs/product/stock/stocktransfer/stocktransfer_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 // Default sort order (if not yet defined by previous GETPOST)
79 79
 if (!$sortfield) {
80
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
80
+    reset($object->fields); // Reset is required to avoid key() to return null.
81 81
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
82 82
 }
83 83
 if (!$sortorder) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 // Output page
348 348
 // --------------------------------------------------------------------
349 349
 
350
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-product page-stock-stocktransfer_stocktransfer_list');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
350
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-product page-stock-stocktransfer_stocktransfer_list'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
351 351
 
352 352
 // Example : Adding jquery code
353 353
 // print '<script type="text/javascript">
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 }
476 476
 
477 477
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
478
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
478
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
479 479
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
480 480
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
481 481
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
     } 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'])) {
567 567
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
568 568
     }
569
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
569
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
570 570
     if (!empty($arrayfields['t.' . $key]['checked'])) {
571 571
         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";
572 572
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/product/stock/movement_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 $object = new MouvementStock($db);
121 121
 $extrafields = new ExtraFields($db);
122 122
 $diroutputmassaction = $conf->stock->dir_output . '/temp/massgeneration/' . $user->id;
123
-$hookmanager->initHooks(array($contextpage));   // Note that conf->hooks_modules contains array of activated contexes
123
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
124 124
 
125 125
 $formfile = new FormFile($db);
126 126
 
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
 }
1152 1152
 
1153 1153
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1154
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1154
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1155 1155
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1156 1156
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1157 1157
 
Please login to merge, or discard this patch.
public/htdocs/fourn/ajax/getSupplierPrices.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
             }
116 116
         }
117 117
 
118
-        $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency));  // For price field, we must use price2num(), for label or title, price()
118
+        $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort") . ': ' . price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price()
119 119
     }
120 120
 
121 121
     // Add price for costprice (at end)
Please login to merge, or discard this patch.
public/htdocs/fourn/product/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -309,7 +309,7 @@
 block discarded – undo
309 309
 include DOL_DOCUMENT_ROOT . '/core/tpl/massactions_pre.tpl.php';
310 310
 
311 311
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
312
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
312
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
313 313
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
314 314
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
315 315
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     $socid = $user->socid;
50 50
 }
51 51
 $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
52
-$hookmanager->initHooks(array('invoicesuppliercardcontact','invoicesuppliercontactcard', 'globalcard'));
52
+$hookmanager->initHooks(array('invoicesuppliercardcontact', 'invoicesuppliercontactcard', 'globalcard'));
53 53
 
54 54
 $object = new FactureFournisseur($db);
55 55
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/list-rec.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 $search_date_endday = GETPOSTINT('search_date_endday');
85 85
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
86 86
 $search_date_endyear = GETPOSTINT('search_date_endyear');
87
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
87
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
88 88
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
89 89
 $search_date_when_startday = GETPOSTINT('search_date_when_startday');
90 90
 $search_date_when_startmonth = GETPOSTINT('search_date_when_startmonth');
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 $search_date_when_endday = GETPOSTINT('search_date_when_endday');
93 93
 $search_date_when_endmonth = GETPOSTINT('search_date_when_endmonth');
94 94
 $search_date_when_endyear = GETPOSTINT('search_date_when_endyear');
95
-$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear);   // Use tzserver
95
+$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver
96 96
 $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear);
97 97
 $search_recurring = GETPOST('search_recurring', 'intcomma');
98 98
 $search_frequency = GETPOST('search_frequency', 'alpha');
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
 $object->fields = dol_sort_array($object->fields, 'position');
165 165
 $arrayfields = dol_sort_array($arrayfields, 'position');
166
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
166
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
167 167
 
168 168
 if ($socid > 0) {
169 169
     $tmpthirdparty = new Societe($db);
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 $massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge")));
539 539
 
540 540
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
541
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
541
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
542 542
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
543 543
 //$selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
544 544
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/paiement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -312,14 +312,14 @@  discard block
 block discarded – undo
312 312
 
313 313
             // Creation of payment line
314 314
             $paiement = new PaiementFourn($db);
315
-            $paiement->datepaye     = $datepaye;
315
+            $paiement->datepaye = $datepaye;
316 316
 
317 317
             $correctedAmounts = [];
318 318
             foreach ($amounts as $key => $value) {
319 319
                 $correctedAmounts[$key] = (float) $value;
320 320
             }
321 321
 
322
-            $paiement->amounts      = $correctedAmounts; // Array of amounts
322
+            $paiement->amounts = $correctedAmounts; // Array of amounts
323 323
             $paiement->multicurrency_amounts = $multicurrency_amounts;
324 324
             $paiement->multicurrency_code = $multicurrency_code; // Array with all currency of payments dispatching
325 325
             $paiement->multicurrency_tx = $multicurrency_tx; // Array with all currency tx of payments dispatching
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
                         $total = 0;
611 611
                         $total_ttc = 0;
612 612
                         $totalrecu = 0;
613
-                        $totalrecucreditnote = 0;   // PHP Warning:  Undefined variable $totalrecucreditnote
614
-                        $totalrecudeposits = 0;     // PHP Warning:  Undefined variable $totalrecudeposits
613
+                        $totalrecucreditnote = 0; // PHP Warning:  Undefined variable $totalrecucreditnote
614
+                        $totalrecudeposits = 0; // PHP Warning:  Undefined variable $totalrecudeposits
615 615
                         while ($i < $num) {
616 616
                             $objp = $db->fetch_object($resql);
617 617
 
Please login to merge, or discard this patch.
public/htdocs/fourn/facture/list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha');
87 87
 $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha');
88 88
 $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha');
89
-$search_status = GETPOST('search_status', 'intcomma');  // Can be '' or a numeric
89
+$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric
90 90
 $search_paymentmode = GETPOST('search_paymentmode', 'intcomma');
91 91
 $search_paymentcond = GETPOST('search_paymentcond', 'intcomma');
92 92
 $search_town = GETPOST('search_town', 'alpha');
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
 $object->fields = dol_sort_array($object->fields, 'position');
220 220
 $arrayfields = dol_sort_array($arrayfields, 'position');
221
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
221
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
222 222
 
223 223
 if (!isModEnabled('supplier_invoice')) {
224 224
     accessforbidden();
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 }
1076 1076
 
1077 1077
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1078
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1078
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1079 1079
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1080 1080
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1081 1081
 
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
                 $totalarray['pos'][$totalarray['nbfield']] = 'totalam';
1930 1930
             }
1931 1931
             if (empty($totalarray['val']['totalam'])) {
1932
-                $totalarray['val']['totalam'] = 0;      // avoid PHP Warning:  Undefined array key "totalam" on line 1891
1932
+                $totalarray['val']['totalam'] = 0; // avoid PHP Warning:  Undefined array key "totalam" on line 1891
1933 1933
             }
1934 1934
             $totalarray['val']['totalam'] += $totalpay;
1935 1935
         }
Please login to merge, or discard this patch.