Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/accountancy/admin/account.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -461,7 +461,7 @@
 block discarded – undo
461 461
     print '<br>';
462 462
 
463 463
     $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
464
-    $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
464
+    $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
465 465
     $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
466 466
     $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
467 467
 
Please login to merge, or discard this patch.
public/htdocs/accountancy/admin/subaccount.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -335,7 +335,7 @@
 block discarded – undo
335 335
     print '<div class="info">' . $langs->trans("WarningCreateSubAccounts") . '</div>';
336 336
 
337 337
     $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
338
-    $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
338
+    $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
339 339
     $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
340 340
     $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
341 341
 
Please login to merge, or discard this patch.
public/htdocs/accountancy/admin/journals_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
 
189 189
     // Si verif ok et action add, on ajoute la ligne
190 190
     if ($ok && GETPOST('actionadd', 'alpha')) {
191
-        $newid = 0;  // Initialise before if for static analysis
191
+        $newid = 0; // Initialise before if for static analysis
192 192
         if ($tabrowid[$id]) {
193 193
             // Get free id for insert
194 194
             $sql = "SELECT MAX(" . $db->sanitize($tabrowid[$id]) . ") newid FROM " . $db->sanitize($tabname[$id]);
Please login to merge, or discard this patch.
public/htdocs/accountancy/admin/fiscalyear_card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 $confirm = GETPOST('confirm', 'alpha');
41 41
 $cancel = GETPOST('cancel', 'aZ09');
42 42
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
43
-$backtopage = GETPOST('backtopage', 'alpha');                   // if not set, a default page will be used
43
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
44 44
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
45 45
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
46 46
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
Please login to merge, or discard this patch.
public/htdocs/accountancy/customer/lines.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 $search_date_endday = GETPOSTINT('search_date_endday');
62 62
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
63 63
 $search_date_endyear = GETPOSTINT('search_date_endyear');
64
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
64
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
65 65
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
66 66
 $search_country = GETPOST('search_country', 'aZ09');
67 67
 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
Please login to merge, or discard this patch.
public/htdocs/accountancy/customer/list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 // Search Getpost
60 60
 $search_societe = GETPOST('search_societe', 'alpha');
61
-$search_lineid = GETPOST('search_lineid', 'alpha');     // Can be '> 100'
61
+$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100'
62 62
 $search_ref = GETPOST('search_ref', 'alpha');
63 63
 $search_invoice = GETPOST('search_invoice', 'alpha');
64 64
 $search_label = GETPOST('search_label', 'alpha');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 $search_date_endday = GETPOSTINT('search_date_endday');
73 73
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
74 74
 $search_date_endyear = GETPOSTINT('search_date_endyear');
75
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
75
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
76 76
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
77 77
 $search_country = GETPOST('search_country', 'aZ09');
78 78
 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -568,14 +568,14 @@  discard block
 block discarded – undo
568 568
         $thirdpartystatic->client = $objp->client;
569 569
         $thirdpartystatic->fournisseur = $objp->fournisseur;
570 570
         $thirdpartystatic->code_client = $objp->code_client;
571
-        $thirdpartystatic->code_compta = $objp->code_compta_client;     // For backward compatibility
571
+        $thirdpartystatic->code_compta = $objp->code_compta_client; // For backward compatibility
572 572
         $thirdpartystatic->code_compta_client = $objp->code_compta_client;
573 573
         $thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
574 574
         $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
575 575
         $thirdpartystatic->email = $objp->email;
576 576
         $thirdpartystatic->country_code = $objp->country_code;
577 577
         $thirdpartystatic->tva_intra = $objp->tva_intra;
578
-        $thirdpartystatic->code_compta_product = $objp->company_code_sell;      // The accounting account for product stored on thirdparty object (for level3 suggestion)
578
+        $thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion)
579 579
 
580 580
         $product_static->ref = $objp->product_ref;
581 581
         $product_static->id = $objp->product_id;
Please login to merge, or discard this patch.
public/htdocs/accountancy/customer/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
     $sql .= " co.code as country_code, co.label as country_label,";
143 143
     $sql .= " s.tva_intra,";
144 144
     if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
145
-        $sql .= " spe.accountancy_code_sell as company_code_sell";  // accounting code for product but stored on thirdparty
145
+        $sql .= " spe.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty
146 146
     } else {
147
-        $sql .= " s.accountancy_code_sell as company_code_sell";    // accounting code for product but stored on thirdparty
147
+        $sql .= " s.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty
148 148
     }
149 149
     $sql .= " FROM " . $db->prefix() . "facture as f";
150 150
     $sql .= " INNER JOIN " . $db->prefix() . "societe as s ON s.rowid = f.fk_soc";
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $sql .= " LEFT JOIN " . $db->prefix() . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
153 153
     }
154 154
     $sql .= " LEFT JOIN " . $db->prefix() . "c_country as co ON co.rowid = s.fk_pays ";
155
-    $sql .= " INNER JOIN " . $db->prefix() . "facturedet as l ON f.rowid = l.fk_facture";   // the main table
155
+    $sql .= " INNER JOIN " . $db->prefix() . "facturedet as l ON f.rowid = l.fk_facture"; // the main table
156 156
     $sql .= " LEFT JOIN " . $db->prefix() . "product as p ON p.rowid = l.fk_product";
157 157
     if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
158 158
         $sql .= " LEFT JOIN " . $db->prefix() . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             $thirdpartystatic->email = !empty($objp->email) ? $objp->email : "";
207 207
             $thirdpartystatic->country_code = !empty($objp->country_code) ? $objp->country_code : "";
208 208
             $thirdpartystatic->tva_intra = !empty($objp->tva_intra) ? $objp->tva_intra : "";
209
-            $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : "";      // The accounting account for product stored on thirdparty object (for level3 suggestion)
209
+            $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : ""; // The accounting account for product stored on thirdparty object (for level3 suggestion)
210 210
 
211 211
             $product_static->ref = $objp->product_ref;
212 212
             $product_static->id = $objp->product_id;
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
                     "MONTH(f.datef) = " . ((int) $j),
669 669
                     " (" . $db->ifsql(
670 670
                         "fd.total_ht < 0",
671
-                        " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))",   // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
671
+                        " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
672 672
                         "  (fd.total_ht - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100)))"
673 673
                     ) . ")",
674 674
                     0
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
             }
677 677
             $sql .= "  SUM(" . $db->ifsql(
678 678
                 "fd.total_ht < 0",
679
-                " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))",   // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
679
+                " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
680 680
                 "  (fd.total_ht - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100)))"
681 681
             ) . ") as total";
682 682
         } else {
Please login to merge, or discard this patch.
public/htdocs/accountancy/journal/purchasesjournal.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     $cpttva = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT', 'NotDefined');
204 204
     $rcctva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined');
205 205
     $rcdtva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined');
206
-    $country_code_in_EEC = getCountriesInEEC();     // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
206
+    $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
207 207
 
208 208
     $i = 0;
209 209
     while ($i < $num) {
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         $totalcredit = 0;
412 412
         $totaldebit = 0;
413 413
 
414
-        $db->begin();       // We accept transaction into loop so if we hang, we can continue transfer from last error
414
+        $db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error
415 415
 
416 416
         $companystatic->id = $tabcompany[$key]['id'];
417 417
         $companystatic->name = $tabcompany[$key]['name'];
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 
618 618
                 foreach ($arrayofvat[$key] as $k => $mt) {
619 619
                     if ($mt) {
620
-                        $accountingaccount->fetch(null, $k, true);      // TODO Use a cache for label
620
+                        $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
621 621
                         $label_account = $accountingaccount->label;
622 622
 
623 623
                         $bookkeeping = new BookKeeping($db);
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
     }
976 976
 
977 977
     // Button to write into Ledger
978
-    $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['','-1']);
978
+    $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['', '-1']);
979 979
     if ($acctSupplierNotConfigured) {
980 980
         print '<br><div class="warning">' . img_warning() . ' ' . $langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
981 981
         $desc = ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '{link}');
Please login to merge, or discard this patch.
public/htdocs/accountancy/journal/sellsjournal.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
         // Move a part of the retained warrenty into the account of warranty
302 302
         if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) {
303
-            $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT');   // Calculate the amount of warrenty for this line (using the percent value)
303
+            $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value)
304 304
             $tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty;
305 305
             $total_ttc -= $retained_warranty;
306 306
         }
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
         $totalcredit = 0;
440 440
         $totaldebit = 0;
441 441
 
442
-        $db->begin();       // We accept transaction into loop so if we hang, we can continue transfer from last error
442
+        $db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error
443 443
 
444 444
         $companystatic->id = $tabcompany[$key]['id'];
445 445
         $companystatic->name = $tabcompany[$key]['name'];
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
 
672 672
                 foreach ($arrayofvat[$key] as $k => $mt) {
673 673
                     if ($mt) {
674
-                        $accountingaccount->fetch(null, $k, true);  // TODO Use a cache for label
674
+                        $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
675 675
                         $label_account = $accountingaccount->label;
676 676
 
677 677
                         $bookkeeping = new BookKeeping($db);
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
             if (isset($tabrevenuestamp[$key]) && is_array($tabrevenuestamp[$key])) {
733 733
                 foreach ($tabrevenuestamp[$key] as $k => $mt) {
734 734
                     if ($mt) {
735
-                        $accountingaccount->fetch(null, $k, true);    // TODO Use a cache for label
735
+                        $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
736 736
                         $label_account = $accountingaccount->label;
737 737
 
738 738
                         $bookkeeping = new BookKeeping($db);
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
     foreach ($tabfac as $key => $val) {
854 854
         $companystatic->id = $tabcompany[$key]['id'];
855 855
         $companystatic->name = $tabcompany[$key]['name'];
856
-        $companystatic->code_compta = $tabcompany[$key]['code_compta'];             // deprecated
856
+        $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated
857 857
         $companystatic->code_compta_client = $tabcompany[$key]['code_compta'];
858 858
         $companystatic->code_client = $tabcompany[$key]['code_client'];
859 859
         $companystatic->client = 3;
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
     }
1042 1042
 
1043 1043
     // Button to write into Ledger
1044
-    $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']);
1044
+    $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']);
1045 1045
     if ($acctCustomerNotConfigured) {
1046 1046
         print '<br><div class="warning">' . img_warning() . ' ' . $langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
1047 1047
         $desc = ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '{link}');
Please login to merge, or discard this patch.