Passed
Pull Request — dev (#14)
by Rafael
51:23
created
public/htdocs/recruitment/recruitmentcandidature_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $object = new RecruitmentCandidature($db);
68 68
 $extrafields = new ExtraFields($db);
69 69
 $diroutputmassaction = $conf->recruitment->dir_output . '/temp/massgeneration/' . $user->id;
70
-$hookmanager->initHooks(array($contextpage));   // Note that conf->hooks_modules contains array of activated contexes
70
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
71 71
 
72 72
 // Fetch optionals attributes and labels
73 73
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
     } 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'])) {
699 699
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
700 700
     }
701
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
701
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
702 702
     if (!empty($arrayfields['t.' . $key]['checked'])) {
703 703
         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";
704 704
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/accountancy/admin/card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     print '<datalist id="pcg_type_datalist">';
257 257
     $sql = "SELECT DISTINCT pcg_type FROM " . MAIN_DB_PREFIX . "accounting_account";
258 258
     $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
259
-    $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')';      // Always limit to current entity. No sharing in accountancy.
259
+    $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy.
260 260
     $sql .= ' LIMIT 50000'; // just as a sanity check
261 261
     $resql = $db->query($sql);
262 262
     if ($resql) {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             print '<datalist id="pcg_type_datalist">';
334 334
             $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
335 335
             $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
336
-            $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')';      // Always limit to current entity. No sharing in accountancy.
336
+            $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy.
337 337
             $sql .= ' LIMIT 50000'; // just as a sanity check
338 338
             $resql = $db->query($sql);
339 339
             if ($resql) {
Please login to merge, or discard this patch.
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.