Completed
Branch develop (259356)
by
unknown
19:07
created
htdocs/compta/bank/bankentries_list.php 1 patch
Spacing   +18 added lines, -19 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 $search_type = GETPOST("search_type", 'alpha');
78 78
 $search_account = GETPOST("search_account", 'int') ? GETPOST("search_account", 'int') : GETPOST("account", 'int');
79 79
 $search_accountancy_code = GETPOST('search_accountancy_code', 'alpha') ? GETPOST('search_accountancy_code', 'alpha') : GETPOST('accountancy_code', 'alpha');
80
-$search_bid = GETPOST("search_bid", 'int') ? GETPOST("search_bid", 'int') : GETPOST("bid", 'int');		// Category id
80
+$search_bid = GETPOST("search_bid", 'int') ? GETPOST("search_bid", 'int') : GETPOST("bid", 'int'); // Category id
81 81
 $search_ref = GETPOST('search_ref', 'alpha');
82 82
 $search_description = GETPOST("search_description", 'alpha');
83 83
 $search_dt_start = dol_mktime(0, 0, 0, GETPOSTINT('search_start_dtmonth'), GETPOSTINT('search_start_dtday'), GETPOSTINT('search_start_dtyear'));
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
 $hookmanager->initHooks(array('banktransactionlist', $contextpage));
146 146
 $extrafields = new ExtraFields($db);
147 147
 
148
-$extrafieldsobjectkey = 'bank';	// Used by extrafields_..._tpl.php
148
+$extrafieldsobjectkey = 'bank'; // Used by extrafields_..._tpl.php
149 149
 
150 150
 // fetch optionals attributes and labels
151 151
 $extrafields->fetch_name_optionals_label($extrafieldsobjectkey);
152 152
 $search_array_options = $extrafields->getOptionalsFromPost($extrafieldsobjectkey, '', 'search_');
153 153
 
154 154
 $arrayfields = array(
155
-	'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1,'position' => 10),
156
-	'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1,'position' => 20),
157
-	'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1,'position' => 30),
158
-	'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40),
159
-	'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50),
160
-	'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 0,'position' => 60),
155
+	'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1, 'position' => 10),
156
+	'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1, 'position' => 20),
157
+	'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1, 'position' => 30),
158
+	'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1, 'position' => 40),
159
+	'type' => array('label' => $langs->trans("Type"), 'checked' => 1, 'position' => 50),
160
+	'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 0, 'position' => 60),
161 161
 	'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 65),
162 162
 	'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => 1, 'position' => 70),
163 163
 	'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? 0 : 1), 'position' => 80),
@@ -654,20 +654,20 @@  discard block
 block discarded – undo
654 654
 	$sql .= " AND b.rappro = ".((int) $search_conciliated);
655 655
 }
656 656
 if ($search_fk_bordereau > 0) {
657
-	$sql .= " AND b.fk_bordereau = " . ((int) $search_fk_bordereau);
657
+	$sql .= " AND b.fk_bordereau = ".((int) $search_fk_bordereau);
658 658
 }
659 659
 if ($search_thirdparty_user) {
660 660
 	$sql .= " AND (b.rowid IN ";
661 661
 	$sql .= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
662 662
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
663 663
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)";
664
-	$sql .= "	  WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, 0, 1).")";
664
+	$sql .= "	  WHERE ".natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, 0, 1).")";
665 665
 
666 666
 	$sql .= " OR b.rowid IN ";
667 667
 	$sql .= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
668 668
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
669 669
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)";
670
-	$sql .= "	  WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, 0, 1);
670
+	$sql .= "	  WHERE ".natural_search(array("subSoc.nom"), $search_thirdparty_user, 0, 1);
671 671
 	$sql .= "))";
672 672
 }
673 673
 if ($search_description) {
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
 		if (!empty($last_receipts)) {
1008 1008
 			print '<datalist id="num_releve_list">';
1009 1009
 			foreach ($last_receipts as $num_releve) {
1010
-				print '<option value="'.$num_releve.'"></option>';	// TODO We can add some info into option
1010
+				print '<option value="'.$num_releve.'"></option>'; // TODO We can add some info into option
1011 1011
 			}
1012 1012
 			print '</datalist>';
1013 1013
 		}
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 	}
1113 1113
 
1114 1114
 	$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1115
-	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1115
+	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1116 1116
 	$selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1117 1117
 	$selectedfields .= ($action == 'reconcile' ? $form->showCheckAddButtons('checkforselect', 1) : '');
1118 1118
 
@@ -1482,10 +1482,10 @@  discard block
 block discarded – undo
1482 1482
 			$backgroundcolor = "class='oddeven'";
1483 1483
 		} else {
1484 1484
 			if ($objp->amount < 0) {
1485
-				$color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955');
1485
+				$color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955');
1486 1486
 				$backgroundcolor = 'style="background: '.$color.';"';
1487 1487
 			} else {
1488
-				$color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86');
1488
+				$color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86');
1489 1489
 				$backgroundcolor = 'style="background: '.$color.';"';
1490 1490
 			}
1491 1491
 		}
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
 				}
1635 1635
 			}
1636 1636
 
1637
-			print $labeltoshow;	// Already escaped
1637
+			print $labeltoshow; // Already escaped
1638 1638
 
1639 1639
 			print '</td>';
1640 1640
 			if (!$i) {
@@ -1736,8 +1736,7 @@  discard block
 block discarded – undo
1736 1736
 					$companylinked_id = $donstatic->socid;
1737 1737
 					if (!$companylinked_id) {
1738 1738
 						$thirdstr = ($donstatic->societe !== "" ?
1739
-									$donstatic->societe :
1740
-									$donstatic->firstname." ".$donstatic->lastname);
1739
+									$donstatic->societe : $donstatic->firstname." ".$donstatic->lastname);
1741 1740
 					}
1742 1741
 				}
1743 1742
 				if ($links[$key]['type'] == 'payment_expensereport') {
@@ -1895,7 +1894,7 @@  discard block
 block discarded – undo
1895 1894
 		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
1896 1895
 		// Fields from hook
1897 1896
 		$parameters = array('arrayfields' => $arrayfields, 'object'=>$object, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray);
1898
-		$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action);    // Note that $action and $objecttmpect may have been modified by hook
1897
+		$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook
1899 1898
 		print $hookmanager->resPrint;
1900 1899
 
1901 1900
 		// Action edit/delete and select
Please login to merge, or discard this patch.