Mise aux normes
This commit is contained in:
parent
dc855b0158
commit
c5e326f602
@ -41,7 +41,7 @@ if ($bid == 0)
|
||||
*/
|
||||
print_titre("Budgets");
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print "<TR class=\"liste_titre\">";
|
||||
echo '<td>Description</TD><td align="center">Nb</td><td align="right">Total</td><td align="right">Moyenne</td>';
|
||||
print "</TR>\n";
|
||||
@ -99,7 +99,7 @@ else
|
||||
|
||||
print_titre("Budget : $budget_name");
|
||||
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print "<TR class=\"liste_titre\">";
|
||||
echo '<td align="right">Date</td><td width="60%">Description</td><td align="right">Montant</td><td> </td>';
|
||||
print "</TR>\n";
|
||||
@ -129,7 +129,7 @@ else
|
||||
$total = $total + $objp->amount;
|
||||
}
|
||||
$db->free();
|
||||
print "<tr><td colspan=\"2\" align=\"right\">Total</td><td align=\"right\"><b>".price(abs($total))."</b></td><td>euros</td></tr>";
|
||||
print "<tr><td colspan=\"2\" align=\"right\">Total</td><td align=\"right\"><b>".price(abs($total))."</b></td><td>".MAIN_MONNAIE."</td></tr>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -139,10 +139,6 @@ else
|
||||
|
||||
}
|
||||
|
||||
print '<a href="categ.php">Editer</a>';
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
|
||||
@ -26,10 +26,18 @@ llxHeader();
|
||||
|
||||
if ($action == 'class')
|
||||
{
|
||||
$author = $GLOBALS["REMOTE_USER"];
|
||||
$sql = "DELETE FROM llx_bank_class WHERE lineid = $rowid AND fk_categ = $cat1";
|
||||
$db->query($sql);
|
||||
|
||||
$sql = "INSERT INTO llx_bank_class (lineid, fk_categ) VALUES ($rowid, $cat1)";
|
||||
$result = $db->query($sql);
|
||||
if ($db->query($sql))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print $db->error();
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'update')
|
||||
@ -79,14 +87,12 @@ if ($result)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($i);
|
||||
$options .= "<option value=\"$obj->rowid\">$obj->label</option>\n"; $i++;
|
||||
$options .= "<option value=\"$obj->rowid\">$obj->label</option>\n";
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
}
|
||||
|
||||
$acct=new Account($db,$account);
|
||||
$acct->fetch($account);
|
||||
|
||||
print_titre("Edition de la ligne");
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print "<TR class=\"liste_titre\">";
|
||||
@ -98,7 +104,7 @@ print "<td align=\"center\">Auteur</TD>";
|
||||
|
||||
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, b.fk_type";
|
||||
$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, fk_account";
|
||||
$sql .= " FROM llx_bank as b WHERE rowid=$rowid";
|
||||
$sql .= " ORDER BY dateo ASC";
|
||||
$result = $db->query($sql);
|
||||
@ -109,15 +115,17 @@ if ($result)
|
||||
$i = 0; $total = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
$objp = $db->fetch_object($i);
|
||||
$total = $total + $objp->amount;
|
||||
|
||||
$acct=new Account($db,$objp->fk_account);
|
||||
$acct->fetch($objp->fk_account);
|
||||
$account = $acct->id;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<form method=\"post\" action=\"$PHP_SELF\">";
|
||||
print "<form method=\"post\" action=\"$PHP_SELF?rowid=$rowid&account=$account\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"class\">";
|
||||
print "<input type=\"hidden\" name=\"rowid\" value=\"$objp->rowid\">";
|
||||
|
||||
|
||||
print "<td>".strftime("%d %b %Y",$objp->do)."</TD>\n";
|
||||
print "<td>$objp->label</td>";
|
||||
@ -139,11 +147,11 @@ if ($result)
|
||||
print $objp->num_chq;
|
||||
print "</tr>";
|
||||
|
||||
print "<tr $bc[$var]><td> </td><td colspan=\"5\">";
|
||||
print "<tr $bc[$var]><td>Catégorie</td><td colspan=\"5\">";
|
||||
print "<select name=\"cat1\">$options";
|
||||
|
||||
print "</select> ";
|
||||
print "<input type=\"submit\" value=\"Ajouter\"></td>";
|
||||
print '<input type="submit" value="Ajouter"></td>';
|
||||
print "</tr>";
|
||||
|
||||
print "</form>";
|
||||
@ -205,7 +213,7 @@ print "<p>Class
|
||||
|
||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="2">';
|
||||
print "<TR class=\"liste_titre\">";
|
||||
print "<td>Description</TD>";
|
||||
print '<td colspan="2">Description</td>';
|
||||
print "</TR>\n";
|
||||
|
||||
$sql = "SELECT c.label, c.rowid";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user