*** empty log message ***

This commit is contained in:
Rodolphe Quiedeville 2002-09-26 16:23:33 +00:00
parent 9bdac5d1c5
commit d574068c43
3 changed files with 70 additions and 18 deletions

View File

@ -83,7 +83,7 @@ if ($account) {
print "<input type=\"hidden\" name=\"action\" value=\"add\">"; print "<input type=\"hidden\" name=\"action\" value=\"add\">";
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">"; print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<TR class=\"liste_titre\">"; print "<TR class=\"liste_titre\">";
print "<td>Date</td><td>Description</TD>"; print "<td>Date</td><td></td><td>Description</TD>";
print "<td align=\"right\">Debit</TD>"; print "<td align=\"right\">Debit</TD>";
print "<td align=\"right\">Credit</TD>"; print "<td align=\"right\">Credit</TD>";
print "<td align=\"right\">Solde</TD>"; print "<td align=\"right\">Solde</TD>";
@ -125,7 +125,7 @@ if ($account) {
* select sum(amount) from solde ; * select sum(amount) from solde ;
*/ */
$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq"; $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
$sql .= " FROM llx_bank as b "; if ($account) { $sql .= " WHERE fk_account=$account"; } $sql .= " FROM llx_bank as b "; if ($account) { $sql .= " WHERE fk_account=$account"; }
if ($vue) { if ($vue) {
if ($vue == 'credit') { if ($vue == 'credit') {
@ -160,21 +160,25 @@ if ($account) {
if ($objp->do > $time && !$sep) { if ($objp->do > $time && !$sep) {
$sep = 1 ; $sep = 1 ;
print "<tr><td align=\"right\" colspan=\"4\">Total :</td>"; print "<tr><td align=\"right\" colspan=\"4\">Total :</td>";
print "<td align=\"right\"><b>".price($total - $objp->amount)."</b></td><td></td><td align=\"right\"><small>".francs($total - $objp->amount)."</small></td></tr>\n"; print "<td align=\"right\"><b>".price($total - $objp->amount)."</b></td>";
print "<tr>"; print "<td></td>";
print '<td align="right"><small>'.francs($total - $objp->amount).'</small></td>';
print '</tr><tr>';
print '<td><input name="dateoy" type="text" size="4" value="'.strftime("%Y",time()).'" maxlength="4">'; print '<td><input name="dateoy" type="text" size="4" value="'.strftime("%Y",time()).'" maxlength="4">';
print '<input name="dateo" type="text" size="4" maxlength="4"></td>'; print '<input name="dateo" type="text" size="4" maxlength="4"></td>';
print '<td></td>';
print "<td>CHQ<input name=\"num_chq\" type=\"text\" size=4>&nbsp;-"; print "<td>CHQ<input name=\"num_chq\" type=\"text\" size=4>&nbsp;-";
print "<input name=\"label\" type=\"text\" size=40></td>"; print "<input name=\"label\" type=\"text\" size=40></td>";
print "<td><input name=\"debit\" type=\"text\" size=8></td>"; print "<td><input name=\"debit\" type=\"text\" size=8></td>";
print "<td><input name=\"credit\" type=\"text\" size=8></td>"; print "<td><input name=\"credit\" type=\"text\" size=8></td>";
print "<td colspan=\"3\" align=\"center\"><select name=\"cat1\">$options</select></td>"; print "<td colspan=\"3\" align=\"center\"><select name=\"cat1\">$options</select></td>";
print "</tr><tr><td colspan=\"2\">Format : YYYYMMDD - 20010826</td><td>0000.00</td>"; print "</tr><tr><td colspan=\"3\">Format : YYYYMMDD - 20010826</td><td>0000.00</td>";
print '<td colspan="4" align="center"><input type="submit" value="ajouter"></td></tr>'; print '<td colspan="4" align="center"><input type="submit" value="ajouter"></td></tr>';
} }
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td>".strftime("%d %b %y",$objp->do)."</TD>\n"; print "<td>".strftime("%d %b %y",$objp->do)."</TD>\n";
print "<td>".$objp->fk_type."</TD>\n";
if ($objp->num_chq) { if ($objp->num_chq) {
print "<td>CHQ $objp->num_chq - $objp->label</td>"; print "<td>CHQ $objp->num_chq - $objp->label</td>";

View File

@ -1,8 +1,25 @@
<?PHP <?PHP
/* /********************************************************************************
* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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$ * $Id$
* $Source$ * $Source$
*/ *
*******************************************************************************/
require("./pre.inc.php3"); require("./pre.inc.php3");
llxHeader(); llxHeader();
@ -25,6 +42,13 @@ if ($action == 'update') {
$result = $db->query($sql); $result = $db->query($sql);
} }
if ($action == 'type') {
$author = $GLOBALS["REMOTE_USER"];
$sql = "update llx_bank set fk_type='$value' where rowid = $rowid;";
$result = $db->query($sql);
}
$sql = "SELECT rowid, label FROM llx_bank_categ;"; $sql = "SELECT rowid, label FROM llx_bank_categ;";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) { if ($result) {
@ -50,7 +74,7 @@ print "<td align=\"center\">Auteur</TD>";
print "</TR>\n"; print "</TR>\n";
$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.author, b.num_chq"; $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.author, b.num_chq, b.fk_type";
$sql .= " FROM llx_bank as b WHERE rowid=$rowid"; $sql .= " FROM llx_bank as b WHERE rowid=$rowid";
$sql .= " ORDER BY dateo ASC"; $sql .= " ORDER BY dateo ASC";
$result = $db->query($sql); $result = $db->query($sql);
@ -69,7 +93,7 @@ if ($result) {
print "<input type=\"hidden\" name=\"rowid\" value=\"$objp->rowid\">"; print "<input type=\"hidden\" name=\"rowid\" value=\"$objp->rowid\">";
print "<td>".strftime("%d %b %Y",$objp->do)."</TD>\n"; print "<td>".strftime("%d %b %Y",$objp->do)."</TD>\n";
print "<td>$objp->num_chq $objp->label</td>"; print "<td>$objp->label</td>";
if ($objp->amount < 0) { if ($objp->amount < 0) {
print "<td align=\"right\">".price($objp->amount * -1)."</TD><td>&nbsp;</td>\n"; print "<td align=\"right\">".price($objp->amount * -1)."</TD><td>&nbsp;</td>\n";
} else { } else {
@ -81,6 +105,11 @@ if ($result) {
print "</tr>"; print "</tr>";
print "<tr $bc[$var]><td>&nbsp;</td><td colspan=\"5\">";
print $objp->fk_type .' - ';
print $objp->num_chq;
print "</tr>";
print "<tr $bc[$var]><td>&nbsp;</td><td colspan=\"5\">"; print "<tr $bc[$var]><td>&nbsp;</td><td colspan=\"5\">";
print "<select name=\"cat1\">$options"; print "<select name=\"cat1\">$options";
@ -98,6 +127,24 @@ if ($result) {
print "</tr>"; print "</tr>";
print "</form>"; print "</form>";
print "<form method=\"post\" action=\"$PHP_SELF?rowid=$objp->rowid\">";
print '<input type="hidden" name="action" value="type">';
print "<tr $bc[$var]><td>&nbsp;</td><td colspan=\"5\">";
print '<select name="value">';
print '<option value="CHQ">CHQ';
print '<option value="PRE">PRE';
print '<option value="VIR">VIR';
print '<option value="CB">CB';
print "</select><input type=\"submit\" value=\"update\"></td>";
print "</tr>";
print "</form>";
$i++; $i++;
} }
$db->free(); $db->free();

View File

@ -1,5 +1,6 @@
<?PHP <?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /********************************************************************************
* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -15,13 +16,12 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
*/
/*
* $Id$ * $Id$
* $Source$ * $Source$
* *
* $num *******************************************************************************/
/* $num
* $rel * $rel
* $ve * $ve
*/ */
@ -101,7 +101,7 @@ if (! $num) {
print "<input type=\"hidden\" name=\"action\" value=\"add\">"; print "<input type=\"hidden\" name=\"action\" value=\"add\">";
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">"; print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<TR class=\"liste_titre\">"; print "<TR class=\"liste_titre\">";
print "<td>Date</td><td>Description</TD>"; print "<td>Date</td><td></td><td>Description</TD>";
print "<td align=\"right\"><a href=\"$PHP_SELF?vue=debit\">Debit</a></TD>"; print "<td align=\"right\"><a href=\"$PHP_SELF?vue=debit\">Debit</a></TD>";
print "<td align=\"right\"><a href=\"$PHP_SELF?vue=credit\">Credit</a></TD>"; print "<td align=\"right\"><a href=\"$PHP_SELF?vue=credit\">Credit</a></TD>";
print "<td align=\"right\">Solde</TD>"; print "<td align=\"right\">Solde</TD>";
@ -116,7 +116,7 @@ if (! $num) {
} }
$sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq"; $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
$sql .= " FROM llx_bank as b WHERE num_releve=$num AND fk_account = $account"; $sql .= " FROM llx_bank as b WHERE num_releve=$num AND fk_account = $account";
$sql .= " ORDER BY dateo ASC"; $sql .= " ORDER BY dateo ASC";
$result = $db->query($sql); $result = $db->query($sql);
@ -124,8 +124,8 @@ if (! $num) {
$var=True; $var=True;
$numrows = $db->num_rows(); $numrows = $db->num_rows();
$i = 0; $i = 0;
print "<tr><td colspan=\"3\"><a href=\"$PHP_SELF?num=$num&ve=1&rel=$rel\">vue etendue</a></td>"; print "<tr><td colspan=\"4\"><a href=\"$PHP_SELF?num=$num&ve=1&rel=$rel\">vue etendue</a></td>";
print "<td align=\"right\">Total :</td><td align=\"right\"><b>".price($total)."</b></td><td align=\"right\"><small>".francs($total)."</small></td></tr>\n"; print "<td align=\"right\" colspan=\"2\">Total :</td><td align=\"right\"><b>".price($total)."</b></td><td align=\"right\"><small>".francs($total)."</small></td></tr>\n";
while ($i < $numrows) { while ($i < $numrows) {
$objp = $db->fetch_object( $i); $objp = $db->fetch_object( $i);
$total = $total + $objp->amount; $total = $total + $objp->amount;
@ -134,6 +134,7 @@ if (! $num) {
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td>".strftime("%d %b %Y",$objp->do)."</TD>\n"; print "<td>".strftime("%d %b %Y",$objp->do)."</TD>\n";
print '<td>'.$objp->fk_type.'</td>';
print "<td>$objp->num_chq $objp->label"; print "<td>$objp->num_chq $objp->label";
if ($ve) { if ($ve) {