* * $Id$ * $Source$ * * 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. * */ /* * * $viewall * */ require("./pre.inc.php3"); require("./bank.lib.php3"); $db = new Db(); if ($HTTP_POST_VARS["action"] == 'add' && $account) { if ($credit > 0) { $amount = $credit ; } else { $amount = - $debit ; } $dateop = "$dateoy" . "$dateo"; if ($num_chq) { $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)"; $sql .= " VALUES (now(), $dateop, '$label', $amount,'$author',$num_chq,$account,'$operation')"; } else { $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account,fk_type)"; $sql .= " VALUES (now(), $dateop, '$label', $amount,'$author',$account,'$operation')"; } $result = $db->query($sql); if ($result) { $rowid = $db->last_insert_id(); if ($cat1) { $sql = "INSERT INTO llx_bank_class (lineid, fk_categ) VALUES ($rowid, $cat1)"; $result = $db->query($sql); } Header("Location: $PHP_SELF?account=$account"); } else { print $db->error(); print "
$sql"; } } if ($action == 'del' && $account) { bank_delete_line($db, $rowid); } llxHeader(); if ($account) { if ($vline) { $viewline = $vline; } else { $viewline = 20; } print "Bank - -"; print "Voir tout"; /* * Formulaire de recherche * */ print '
"; print "Edit Categories"; print " Budgets"; } else { print_titre ("Comptes bancaires"); print "| Label | Banque | "; print "Numéro | "; print "
| $objp->label | $objp->bank | $objp->number |