From eeb36388d79ccd35c2c6cc73436ef840cb85a68c Mon Sep 17 00:00:00 2001 From: erics Date: Tue, 24 Feb 2004 23:34:15 +0000 Subject: [PATCH] =?UTF-8?q?quand=20il=20reste=20=E0=20payer=200,000001=20E?= =?UTF-8?q?UR=20on=20condid=E8re=20qu'on=20peut=20classer=20la=20facture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/account.php | 25 +++++++++++++++++-------- htdocs/compta/facture.php | 8 ++++---- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 1d7ef3c758f..35b1521c6f0 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -24,10 +24,15 @@ require("./pre.inc.php"); +if(isset($_GET["account"])) + $HTTP_POST_VARS["account"] = $_GET["account"]; +if(isset($_GET["vline"])) + $HTTP_POST_VARS["vline"] = $_GET["vline"]; + if (!$user->rights->banque->lire) accessforbidden(); -if ($HTTP_POST_VARS["action"] == 'add' && $_GET["account"]) +if ($HTTP_POST_VARS["action"] == 'add' && $HTTP_POST_VARS["account"]) { if ($credit > 0) { @@ -39,7 +44,7 @@ if ($HTTP_POST_VARS["action"] == 'add' && $_GET["account"]) } $dateop = "$dateoy" . "$dateo"; - $acct=new Account($db,$_GET["account"]); + $acct=new Account($db,$HTTP_POST_VARS["account"]); $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq,$cat1); @@ -49,7 +54,7 @@ if ($HTTP_POST_VARS["action"] == 'add' && $_GET["account"]) } else { - Header("Location: $PHP_SELF?account=$acct->id"); + Header("Location: $PHP_SELF?account=" . $acct->id); } /* if ($num_chq) @@ -95,8 +100,9 @@ if ($action == 'del' && $account && $user->rights->banque->modifier) */ llxHeader(); +print "

Account: " . $HTTP_POST_VARS["account"] . "o" . $HTTP_POST_VARS["account"] . "

\n"; -if ($_GET["account"] > 0) +if ($HTTP_POST_VARS["account"] > 0) { if ($vline) { @@ -107,7 +113,7 @@ if ($_GET["account"] > 0) $viewline = 20; } $acct = new Account($db); - $acct->fetch($_GET["account"]); + $acct->fetch($HTTP_POST_VARS["account"]); $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_categ;"; $result = $db->query($sql); @@ -198,8 +204,9 @@ if ($_GET["account"] > 0) * Formulaire de recherche * */ - print '
'; + print ''; print ''; + print ''; print ''; print ""; print ''; print ''; @@ -322,7 +331,7 @@ if ($_GET["account"] > 0) } else { - print "Erreur : numéro ce compte inexistant"; + print "Erreur : numéro de compte inexistant"; } $db->close(); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ac194eab6ae..4d62f4f26d3 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -974,25 +974,25 @@ else } // Envoyer - if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->envoyer) + if ($fac->statut == 1 && price($resteapayer) > 0 && $user->rights->facture->envoyer) { print "id&action=presend\">Envoyer"; } // Envoyer une relance - if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->envoyer) + if ($fac->statut == 1 && price($resteapayer) > 0 && $user->rights->facture->envoyer) { print "id&action=prerelance\">Envoyer une relance"; } // Emettre paiement - if ($fac->statut == 1 && $resteapayer > 0 && $user->rights->facture->paiement) + if ($fac->statut == 1 && price($resteapayer) > 0 && $user->rights->facture->paiement) { print "id."&action=create\">Emettre un paiement"; } // Classer 'payé' - if ($fac->statut == 1 && $resteapayer <= 0 + if ($fac->statut == 1 && price($resteapayer) <= 0 && $fac->paye == 0 && $user->rights->facture->paiement) { print "id&action=payed\">Classer 'Payée'";
'; @@ -234,8 +241,10 @@ if ($_GET["account"] > 0) */ if ($user->rights->banque->modifier) { - print ''; + print ''; print ''; + print ''; + print ''; } print '
DateTypeDescription