diff --git a/htdocs/compta/bank/search.php3 b/htdocs/compta/bank/search.php3
index 652b3b7ed64..e2b831daacf 100644
--- a/htdocs/compta/bank/search.php3
+++ b/htdocs/compta/bank/search.php3
@@ -39,8 +39,8 @@ print "
";
print "| Date | Description | ";
print "Debit | ";
print "Credit | ";
-print "Solde | ";
-print "Francs | ";
+print "Type | ";
+print "Compte | ";
print "
\n";
?>
@@ -51,10 +51,16 @@ print "\n";
-
+
|
-
+
|
@@ -92,8 +98,9 @@ if ($result) {
if ($viewall) { $nbline=0; }
-$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_account";
+$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_account, b.fk_type";
$sql .= " FROM llx_bank as b ";
+$sql .= " WHERE fk_type like '" . $type . "'";
$si=0;
@@ -107,11 +114,7 @@ if ($description) {
$sqlw[$si] .= " b.label like '%" . $description . "%'";
}
-if ($si>0) {
- $sql .= " WHERE " . $sqlw[1];
-}
-
-for ($i = 2 ; $i <= $si; $i++) {
+for ($i = 1 ; $i <= $si; $i++) {
$sql .= " AND " . $sqlw[$i];
}
@@ -144,11 +147,8 @@ if ($result) {
print " | | ".price($objp->amount)." | \n";
}
- if ($total > 0) {
- print "".price($total)." | \n";
- } else {
- print "".price($total)." | \n";
- }
+ print "".$obj->fktype." | \n";
+
print "".$objp->fk_account." | \n";
print "";
@@ -161,9 +161,9 @@ if ($result) {
}
-print "";
-
+print "";
+print "$sql";
$db->close();
llxFooter("Dernière modification $Date$ révision $Revision$");