From 9b7610f058dc09f69f5afcac9ca1ba16ae74a587 Mon Sep 17 00:00:00 2001 From: opensides Date: Sat, 11 Sep 2004 00:11:34 +0000 Subject: [PATCH] cleanup code --- htdocs/compta/bank/ligne.php | 20 ++++++++++---------- htdocs/compta/deplacement/index.php | 8 -------- htdocs/compta/paiement.php | 2 +- htdocs/compta/pre.inc.php | 4 ---- htdocs/compta/tva.php | 7 ++++--- htdocs/conf/conf.class.php | 2 -- htdocs/fichinter/rapport.php | 2 +- 7 files changed, 16 insertions(+), 29 deletions(-) diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 0447d853c95..d85f0e53a9c 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -66,7 +66,7 @@ if ($action == 'class') } } -if ($action == 'update') +if ($action == 'UPDATE') { // Avant de modifier la date ou le montant, on controle si ce n'est pas encore rapproche if (!empty($_POST['amount'])) @@ -81,23 +81,23 @@ if ($action == 'update') $objp = $db->fetch_object( 0); if ($objp->rappro) die ("Vous ne pouvez pas modifier une écriture déjà rapprochée"); - $sql = "update ".MAIN_DB_PREFIX."bank set label='$label' , dateo = '$date', amount='$amount' where rowid = $rowid;"; + $sql = "UPDATE ".MAIN_DB_PREFIX."bank set label='$label' , dateo = '$date', amount='$amount' WHERE rowid = $rowid;"; } } else - $sql = "update ".MAIN_DB_PREFIX."bank set label='$label' where rowid = $rowid;"; + $sql = "UPDATE ".MAIN_DB_PREFIX."bank set label='$label' WHERE rowid = $rowid;"; $result = $db->query($sql); } if ($_POST["action"] == 'type') { - $sql = "update ".MAIN_DB_PREFIX."bank set fk_type='$value' where rowid = $rowid;"; + $sql = "UPDATE ".MAIN_DB_PREFIX."bank set fk_type='$value' WHERE rowid = $rowid;"; $result = $db->query($sql); } if ($_POST["action"] == 'num_releve') { - $sql = "update ".MAIN_DB_PREFIX."bank set num_releve=$num_rel where rowid = $rowid;"; + $sql = "UPDATE ".MAIN_DB_PREFIX."bank set num_releve=$num_rel WHERE rowid = $rowid;"; $result = $db->query($sql); } @@ -195,7 +195,7 @@ if ($result) print ''; print ""; print $objp->num_chq?" - $objp->num_chq":''; - print ""; + print ""; print ""; print ""; @@ -212,22 +212,22 @@ if ($result) print "Compte".$acct->label.""; print "
rowid\">"; - print ""; + print ""; print "Libellé"; print ''; - print ""; + print ""; print ""; if (!$objp->rappro) { print "Date"; print 'do).'">'; - print ""; + print ""; print ""; print "Montant"; print ''; - print ""; + print ""; print ""; } print "
"; diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 120d369673b..93a8a4ff047 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -23,14 +23,6 @@ require("./pre.inc.php"); require("../../tva.class.php"); -/* - * - * - */ -/* - * - */ - llxHeader(); /* diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 3c0e17b6626..a6456618298 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -168,7 +168,7 @@ if ($_GET["action"] == 'create') print ''; print ''.$langs->trans("Comments").''; - print ''.$langs->trans("Type").' :'; $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement ORDER BY id"; diff --git a/htdocs/compta/pre.inc.php b/htdocs/compta/pre.inc.php index d0fc2b9a84a..04a54bf9a91 100644 --- a/htdocs/compta/pre.inc.php +++ b/htdocs/compta/pre.inc.php @@ -26,10 +26,6 @@ function llxHeader($head = "", $title="", $help_url='') { global $user, $conf, $langs; - /* - * - * - */ top_menu($head, $title); $menu = new Menu(); diff --git a/htdocs/compta/tva.php b/htdocs/compta/tva.php index 2d5c82585ea..f5f89a05c96 100644 --- a/htdocs/compta/tva.php +++ b/htdocs/compta/tva.php @@ -2,9 +2,6 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * - * $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 @@ -19,7 +16,11 @@ * 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"); diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php index 2718d2173e4..234f6dc8163 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/conf/conf.class.php @@ -66,6 +66,4 @@ class Conf } - - ?> diff --git a/htdocs/fichinter/rapport.php b/htdocs/fichinter/rapport.php index bf062ab79a0..8d80f2cfdbb 100644 --- a/htdocs/fichinter/rapport.php +++ b/htdocs/fichinter/rapport.php @@ -139,5 +139,5 @@ else } $db->close(); -//llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter("Dernière modification $Date$ révision $Revision$"); ?>