* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ * *******************************************************************************/ require("./pre.inc.php"); require("./bank.lib.php"); $user->getrights('compta'); if (!$user->admin && !$user->rights->compta->bank) accessforbidden(); llxHeader(); if ($vline) { $viewline = $vline; } else { $viewline = 50; } print_titre("Recherche écriture bancaire"); print ""; print ''; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; ?> "; ?> query($sql) ) { $nbline = $db->result (0, 0); $db->free(); } $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_categ;"; $result = $db->query($sql); if ($result) { $var=True; $num = $db->num_rows(); $i = 0; $options = ""; while ($i < $num) { $obj = $db->fetch_object($i); $options .= "\n"; $i++; } $db->free(); } $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 ".MAIN_DB_PREFIX."bank as b "; $sql .= " WHERE fk_type like '" . $type . "'"; $si=0; if ($credit) { $si++; $sqlw[$si] .= " b.amount " . $credit; } if ($description) { $si++; $sqlw[$si] .= " b.label like '%" . $description . "%'"; } for ($i = 1 ; $i <= $si; $i++) { $sql .= " AND " . $sqlw[$i]; } $sql .= " ORDER BY b.dateo ASC"; $result = $db->query($sql); if ($result) { $var=True; $num = $db->num_rows(); $i = 0; while ($i < $num) { $objp = $db->fetch_object( $i); $var=!$var; print ""; print "\n"; print "\n"; } else { print "\n"; } print "\n"; print "\n"; print ""; $i++; } $db->free(); } else { print $db->error() .'
' . $sql .'"; $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>
DateDescriptionDebitCreditTypeCompte
".strftime("%d %b %y",$objp->do)."rowid&account=$objp->fk_account\">$objp->label "; if ($objp->amount < 0) { print "".price($objp->amount * -1)."  ".price($objp->amount)."".$obj->fktype."".$objp->fk_account."