From 79db38327729ddcd6242796bd36272dd400620bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Feb 2004 18:40:50 +0000 Subject: [PATCH] =?UTF-8?q?La=20page=20de=20rapprochement=20n'affichait=20?= =?UTF-8?q?pas=20toutes=20les=20=E9critures=20sens=E9es=20=EAtre=20visible?= =?UTF-8?q?=20sur=20les=20relev=E9s=20de=20compte.=20Celle=20avec=20une=20?= =?UTF-8?q?date=20de=20valeur=20future=20s'affichent=20maintenant=20mais?= =?UTF-8?q?=20ne=20sont=20pas=20rapprochable=20tant=20que=20la=20date=20ou?= =?UTF-8?q?=20elle=20sont=20cens=E9es=20apparaitre=20sur=20le=20compte=20n?= =?UTF-8?q?'est=20pas=20pass=E9e.=20Ceci=20permet=20de=20g=E9rer=20le=20ca?= =?UTF-8?q?s=20de=20facture=20pay=E9es=20avec=20une=20date=20de=20paiement?= =?UTF-8?q?=20mis=20au=20lendemain=20par=20exemple.=20Ce=20qui=20est=20tr?= =?UTF-8?q?=E8s=20rare=20mais=20quand=20ca=20arrive=20on=20est=20content?= =?UTF-8?q?=20de=20"voir"=20que=20le=20paiement=20n'a=20pas=20disparu,=20m?= =?UTF-8?q?eme=20si=20il=20faut=20attendre=20le=20lendemain=20pour=20pouvo?= =?UTF-8?q?ir=20faire=20le=20"rapprochement".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/rappro.php | 53 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index c431b7b40e9..c1ba3602cf0 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -54,12 +54,13 @@ if ($action == 'del') { } $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_categ ORDER BY label;"; $result = $db->query($sql); +$options=""; if ($result) { $var=True; $num = $db->num_rows(); $i = 0; - $options = ""; while ($i < $num) { + if ($options == "") { $options = ""; } $obj = $db->fetch_object($i); $options .= "\n"; $i++; } @@ -86,7 +87,7 @@ $acct->fetch($account); print_titre('Rapprochement bancaire compte : '.$acct->label.''); $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 ".MAIN_DB_PREFIX."bank as b WHERE rappro=0 AND fk_account=$account AND dateo <= now()"; +$sql .= " FROM ".MAIN_DB_PREFIX."bank as b WHERE rappro=0 AND fk_account=$account"; $sql .= " ORDER BY dateo ASC LIMIT 10"; @@ -100,15 +101,15 @@ if ($result) print "
Pas de transactions saisies en attente de rapprochement, pour ce compte bancaire.
"; } else { - print ''; - print ""; + print '
'; + print ""; print ""; print ""; print ""; print ""; print ''; print ''; - print "\n"; + print "\n"; } $i = 0; @@ -134,11 +135,18 @@ if ($result) print "\n"; } - print ""; - print ""; - print ""; - + if ($objp->do <= mktime() ) { + print ""; + print ""; + print ""; + } + else { + print ""; + } + if ($objp->rappro) { print ""; @@ -147,9 +155,16 @@ if ($result) { if ($user->rights->banque->modifier) { - print ""; + print ""; } else { @@ -159,10 +174,14 @@ if ($result) print ""; print ""; + if ($options) { + print ""; + } + else { + print " "; + } + print ""; print ""; $i++; }
DateDescriptionDebitCreditReleveRappro 
 ".price($objp->amount).""; - print ""; + print ""; + print "Ecriture future. Ne peut pas encore être rapprochée."; + print "num_releve&account=$acct->id\">$objp->num_releverowid&account=$acct->id\">"; - print img_delete(); - print ""; + if ($objp->do <= mktime() ) { + print "rowid&account=$acct->id\">"; + print img_delete(); + print ""; + } + else { + print " "; // On n'empeche la suppression car le raprochement ne pourra se faire qu'après la date passée et que l'écriture apparaissent bien sur le compte. + } + print "
 ".$objp->fk_type.($objp->num_chq?" ".$objp->num_chq:"").""; - print ""; - print "