@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | $search_array_options = $extrafields->getOptionalsFromPost('banktransaction', '', 'search_'); |
162 | 162 | |
163 | 163 | $arrayfields = array( |
164 | - 'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1,'position'=>10), |
|
165 | - 'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1,'position'=>20), |
|
166 | - 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1,'position'=>30), |
|
167 | - 'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1,'position'=>40), |
|
168 | - 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1,'position'=>50), |
|
169 | - 'b.num_chq'=>array('label'=>$langs->trans("Numero"), 'checked'=>1,'position'=>60), |
|
164 | + 'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>10), |
|
165 | + 'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1, 'position'=>20), |
|
166 | + 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1, 'position'=>30), |
|
167 | + 'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1, 'position'=>40), |
|
168 | + 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1, 'position'=>50), |
|
169 | + 'b.num_chq'=>array('label'=>$langs->trans("Numero"), 'checked'=>1, 'position'=>60), |
|
170 | 170 | 'bu.label'=>array('label'=>$langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked'=>1, 'position'=>70), |
171 | 171 | 'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>(($id > 0 || !empty($ref)) ? 0 : 1), 'position'=>80), |
172 | 172 | 'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>90), |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | |
410 | 410 | $companystatic = new Societe($db); |
411 | 411 | $bankaccountstatic = new Account($db); |
412 | -$userstatic= new User($db); |
|
412 | +$userstatic = new User($db); |
|
413 | 413 | |
414 | 414 | $banktransferstatic = new BonPrelevement($db); |
415 | 415 | $societestatic = new Societe($db); |
@@ -643,21 +643,21 @@ discard block |
||
643 | 643 | $sql .= " AND b.rappro = ".((int) $search_conciliated); |
644 | 644 | } |
645 | 645 | if ($search_fk_bordereau > 0) { |
646 | - $sql .= " AND b.fk_bordereau = " . ((int) $search_fk_bordereau); |
|
646 | + $sql .= " AND b.fk_bordereau = ".((int) $search_fk_bordereau); |
|
647 | 647 | } |
648 | 648 | if ($search_thirdparty_user) { |
649 | - $sql.= " AND (b.rowid IN "; |
|
650 | - $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; |
|
651 | - $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; |
|
652 | - $sql.= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; |
|
653 | - $sql.= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; |
|
654 | - |
|
655 | - $sql.= " OR b.rowid IN "; |
|
656 | - $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; |
|
657 | - $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; |
|
658 | - $sql.= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; |
|
659 | - $sql.= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); |
|
660 | - $sql.= "))"; |
|
649 | + $sql .= " AND (b.rowid IN "; |
|
650 | + $sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; |
|
651 | + $sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; |
|
652 | + $sql .= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; |
|
653 | + $sql .= " WHERE ".natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; |
|
654 | + |
|
655 | + $sql .= " OR b.rowid IN "; |
|
656 | + $sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; |
|
657 | + $sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; |
|
658 | + $sql .= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; |
|
659 | + $sql .= " WHERE ".natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); |
|
660 | + $sql .= "))"; |
|
661 | 661 | } |
662 | 662 | if ($search_description) { |
663 | 663 | $search_description_to_use = $search_description; |
@@ -1367,10 +1367,10 @@ discard block |
||
1367 | 1367 | $backgroundcolor = "class='oddeven'"; |
1368 | 1368 | } else { |
1369 | 1369 | if ($objp->amount < 0) { |
1370 | - $color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955'); |
|
1370 | + $color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955'); |
|
1371 | 1371 | $backgroundcolor = 'style="background: '.$color.';"'; |
1372 | 1372 | } else { |
1373 | - $color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86'); |
|
1373 | + $color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86'); |
|
1374 | 1374 | $backgroundcolor = 'style="background: '.$color.';"'; |
1375 | 1375 | } |
1376 | 1376 | } |
@@ -1507,7 +1507,7 @@ discard block |
||
1507 | 1507 | } |
1508 | 1508 | } |
1509 | 1509 | |
1510 | - print $labeltoshow; // Already escaped |
|
1510 | + print $labeltoshow; // Already escaped |
|
1511 | 1511 | |
1512 | 1512 | print '</td>'; |
1513 | 1513 | if (!$i) { |
@@ -1738,8 +1738,8 @@ discard block |
||
1738 | 1738 | } |
1739 | 1739 | |
1740 | 1740 | // Fields from hook |
1741 | - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray); |
|
1742 | - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook |
|
1741 | + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray); |
|
1742 | + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook |
|
1743 | 1743 | print $hookmanager->resPrint; |
1744 | 1744 | |
1745 | 1745 | // Action edit/delete and select |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $type[$i] = GETPOST($i.'_type', 'int'); |
88 | 88 | |
89 | 89 | $tabnum[$i] = 0; |
90 | - if (!empty($label[$i]) || !($amount[$i] <= 0) || !($accountfrom[$i] < 0) || !($accountto[$i] < 0)) { |
|
90 | + if (!empty($label[$i]) || !($amount[$i] <= 0) || !($accountfrom[$i] < 0) || !($accountto[$i] < 0)) { |
|
91 | 91 | $tabnum[$i] = 1; |
92 | 92 | $maxtab = $i; |
93 | 93 | } |
@@ -101,28 +101,28 @@ discard block |
||
101 | 101 | if ($tabnum[$n] === 1) { |
102 | 102 | if ($accountfrom[$n] < 0) { |
103 | 103 | $error++; |
104 | - setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("TransferFrom")), null, 'errors'); |
|
104 | + setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n.' '.$langs->transnoentities("TransferFrom")), null, 'errors'); |
|
105 | 105 | } |
106 | 106 | if ($accountto[$n] < 0) { |
107 | 107 | $error++; |
108 | - setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("TransferTo")), null, 'errors'); |
|
108 | + setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n.' '.$langs->transnoentities("TransferTo")), null, 'errors'); |
|
109 | 109 | } |
110 | 110 | if (!$type[$n]) { |
111 | 111 | $error++; |
112 | - setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Type")), null, 'errors'); |
|
112 | + setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n.' '.$langs->transnoentities("Type")), null, 'errors'); |
|
113 | 113 | } |
114 | 114 | if (!$dateo[$n]) { |
115 | 115 | $error++; |
116 | - setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Date")), null, 'errors'); |
|
116 | + setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n.' '.$langs->transnoentities("Date")), null, 'errors'); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!($label[$n])) { |
120 | 120 | $error++; |
121 | - setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' . $langs->transnoentities("Description")), null, 'errors'); |
|
121 | + setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n.' '.$langs->transnoentities("Description")), null, 'errors'); |
|
122 | 122 | } |
123 | 123 | if (!($amount[$n])) { |
124 | 124 | $error++; |
125 | - setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Amount")), null, 'errors'); |
|
125 | + setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n.' '.$langs->transnoentities("Amount")), null, 'errors'); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | $tmpaccountfrom = new Account($db); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | print '<td class="hideobject multicurrency right">'.$langs->trans("AmountToOthercurrency").'</td>'; |
299 | 299 | print '</tr>'; |
300 | 300 | |
301 | -for ($i = 1 ; $i < $MAXLINES; $i++) { |
|
301 | +for ($i = 1; $i < $MAXLINES; $i++) { |
|
302 | 302 | $label = ''; |
303 | 303 | $amount = ''; |
304 | 304 | $amountto = ''; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $object = new PaymentVarious($db); |
92 | 92 | $extrafields = new ExtraFields($db); |
93 | 93 | //$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; |
94 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
94 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
95 | 95 | |
96 | 96 | // Fetch optionals attributes and labels |
97 | 97 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | |
461 | 461 | $arrayofmassactions = array(); |
462 | 462 | |
463 | -$moreforfilter= ''; |
|
463 | +$moreforfilter = ''; |
|
464 | 464 | |
465 | 465 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
466 | 466 | $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields |
@@ -45,8 +45,8 @@ |
||
45 | 45 | |
46 | 46 | const STATUS_DRAFT = 0; |
47 | 47 | const STATUS_NOT_USED = 1; |
48 | - const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
49 | - const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
48 | + const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
49 | + const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
50 | 50 | const STATUS_REJECTED = 3; |
51 | 51 | |
52 | 52 |
@@ -255,7 +255,7 @@ |
||
255 | 255 | $i = 0; |
256 | 256 | |
257 | 257 | if ($limit > 0 && $limit != $conf->liste_limit) { |
258 | - $param.='&limit='.((int) $limit); |
|
258 | + $param .= '&limit='.((int) $limit); |
|
259 | 259 | } |
260 | 260 | $param = "&id=".urlencode($id); |
261 | 261 |
@@ -142,7 +142,7 @@ |
||
142 | 142 | |
143 | 143 | $calc = getDolGlobalString('MAIN_INFO_LOCALTAX_CALC').$local; |
144 | 144 | // Affiche en-tete du rapport |
145 | -$description=''; |
|
145 | +$description = ''; |
|
146 | 146 | if ($calc == 0 || $calc == 1) { // Calculate on invoice for goods and services |
147 | 147 | $calcmode = $calc == 0 ? $langs->trans("CalcModeLT".$local) : $langs->trans("CalcModeLT".$local."Rec"); |
148 | 148 | $calcmode .= ' <span class="opacitymedium">('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')</span>'; |
@@ -169,7 +169,7 @@ |
||
169 | 169 | // Set period |
170 | 170 | $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); |
171 | 171 | $prevyear = $year_start; |
172 | -$q=0; |
|
172 | +$q = 0; |
|
173 | 173 | $prevquarter = $q; |
174 | 174 | if ($prevquarter > 1) { |
175 | 175 | $prevquarter--; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // Date range |
53 | -$year = GETPOST('year', 'int'); // this is used for navigation previous/next. It is the last year to show in filter |
|
53 | +$year = GETPOST('year', 'int'); // this is used for navigation previous/next. It is the last year to show in filter |
|
54 | 54 | if (empty($year)) { |
55 | 55 | $year_current = dol_print_date(dol_now(), "%Y"); |
56 | 56 | $month_current = dol_print_date(dol_now(), "%m"); |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | |
619 | 619 | if (isModEnabled('salaries') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { |
620 | 620 | if ($modecompta == 'CREANCES-DETTES') { |
621 | - $column = 's.dateep'; // we use the date of end of period of salary |
|
621 | + $column = 's.dateep'; // we use the date of end of period of salary |
|
622 | 622 | |
623 | 623 | $sql = "SELECT s.label as nom, date_format(".$column.",'%Y-%m') as dm, sum(s.amount) as amount"; |
624 | 624 | $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; |
@@ -947,14 +947,14 @@ discard block |
||
947 | 947 | |
948 | 948 | if ($obj->pcg_type == 'INCOME') { |
949 | 949 | if (!isset($encaiss[$obj->dm])) { |
950 | - $encaiss[$obj->dm] = 0; // To avoid warning of var not defined |
|
950 | + $encaiss[$obj->dm] = 0; // To avoid warning of var not defined |
|
951 | 951 | } |
952 | 952 | $encaiss[$obj->dm] += $obj->credit; |
953 | 953 | $encaiss[$obj->dm] -= $obj->debit; |
954 | 954 | } |
955 | 955 | if ($obj->pcg_type == 'EXPENSE') { |
956 | 956 | if (!isset($decaiss[$obj->dm])) { |
957 | - $decaiss[$obj->dm] = 0; // To avoid warning of var not defined |
|
957 | + $decaiss[$obj->dm] = 0; // To avoid warning of var not defined |
|
958 | 958 | } |
959 | 959 | $decaiss[$obj->dm] += $obj->debit; |
960 | 960 | $decaiss[$obj->dm] -= $obj->credit; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | // Date range |
73 | -$year = GETPOST('year', 'int'); // this is used for navigation previous/next. It is the last year to show in filter |
|
73 | +$year = GETPOST('year', 'int'); // this is used for navigation previous/next. It is the last year to show in filter |
|
74 | 74 | if (empty($year)) { |
75 | 75 | $year_current = dol_print_date(dol_now(), "%Y"); |
76 | 76 | $month_current = dol_print_date(dol_now(), "%m"); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | if ($modecompta == 'CREANCES-DETTES') { |
266 | 266 | print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder); |
267 | 267 | } else { |
268 | - print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is |
|
268 | + print_liste_field_titre(''); // Make 4 columns in total whatever $modecompta is |
|
269 | 269 | } |
270 | 270 | print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], 'amount_ttc', '', $param, 'class="right"', $sortfield, $sortorder); |
271 | 271 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | $sql .= " GROUP BY pcg_type"; |
302 | 302 | if ($showaccountdetail == 'no') { |
303 | - $sql .= ", name, socid"; // group by "accounting group" (INCOME/EXPENSE), then "customer". |
|
303 | + $sql .= ", name, socid"; // group by "accounting group" (INCOME/EXPENSE), then "customer". |
|
304 | 304 | } |
305 | 305 | $sql .= $db->order($sortfield, $sortorder); |
306 | 306 | |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | |
940 | 940 | if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') { |
941 | 941 | if ($modecompta == 'CREANCES-DETTES') { |
942 | - $column = 's.dateep'; // We use the date of end of period of salary |
|
942 | + $column = 's.dateep'; // We use the date of end of period of salary |
|
943 | 943 | |
944 | 944 | $sql = "SELECT u.rowid, u.firstname, u.lastname, s.fk_user as fk_user, s.label as label, date_format($column,'%Y-%m') as dm, sum(s.amount) as amount"; |
945 | 945 | $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; |