cleanup code
This commit is contained in:
parent
07aff1bf45
commit
9b7610f058
@ -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 '<option value="DEP"'.($objp->fk_type == 'DEP'?' selected':'').'>Dépôt</option>';
|
||||
print "</select>";
|
||||
print $objp->num_chq?" - $objp->num_chq":'';
|
||||
print "<input type=\"submit\" value=\"update\">";
|
||||
print "<input type=\"submit\" value=\"UPDATE\">";
|
||||
print "</form>";
|
||||
|
||||
print "</td></tr>";
|
||||
@ -212,22 +212,22 @@ if ($result)
|
||||
print "<tr $bc[$var]><td>Compte</td><td colspan=\"5\"><a href=\"account.php?account=$account\">".$acct->label."</a></td></tr>";
|
||||
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"UPDATE\">";
|
||||
|
||||
print "<tr $bc[$var]><td>Libellé</td><td colspan=\"5\">";
|
||||
print '<input name="label" value="'.$objp->label.'">';
|
||||
print "<input type=\"submit\" value=\"update\"></td>";
|
||||
print "<input type=\"submit\" value=\"UPDATE\"></td>";
|
||||
print "</tr>";
|
||||
|
||||
if (!$objp->rappro)
|
||||
{
|
||||
print "<tr $bc[$var]><td>Date</td><td colspan=\"5\">";
|
||||
print '<input name="date" value="'.strftime("%Y%m%d",$objp->do).'">';
|
||||
print "<input type=\"submit\" value=\"update\"></td>";
|
||||
print "<input type=\"submit\" value=\"UPDATE\"></td>";
|
||||
print "</tr>";
|
||||
print "<tr $bc[$var]><td>Montant</td><td colspan=\"5\">";
|
||||
print '<input name="amount" value="'.price($objp->amount).'">';
|
||||
print "<input type=\"submit\" value=\"update\"></td>";
|
||||
print "<input type=\"submit\" value=\"UPDATE\"></td>";
|
||||
print "</tr>";
|
||||
}
|
||||
print "</form>";
|
||||
|
||||
@ -23,14 +23,6 @@
|
||||
require("./pre.inc.php");
|
||||
require("../../tva.class.php");
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
/*
|
||||
|
||||
@ -168,7 +168,7 @@ if ($_GET["action"] == 'create')
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("Comments").'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Type").' :</td><td><select name="paiementid">";
|
||||
print '<tr><td>'.$langs->trans("Type").' :</td><td><select name="paiementid">';
|
||||
|
||||
$sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement ORDER BY id";
|
||||
|
||||
|
||||
@ -26,10 +26,6 @@ function llxHeader($head = "", $title="", $help_url='')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
@ -2,9 +2,6 @@
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* $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");
|
||||
|
||||
|
||||
|
||||
@ -66,6 +66,4 @@ class Conf
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@ -139,5 +139,5 @@ else
|
||||
}
|
||||
$db->close();
|
||||
|
||||
//llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user