From d2cfae195c3b600c27b9d6c9f842c76ca05f443c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 23 Jul 2003 16:31:25 +0000 Subject: [PATCH] Ajout boite factures brouillons Suppression des titre de boites vides --- htdocs/compta/index.php3 | 63 +++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/index.php3 b/htdocs/compta/index.php3 index 6bc006b4e1d..f79786d8126 100644 --- a/htdocs/compta/index.php3 +++ b/htdocs/compta/index.php3 @@ -121,7 +121,7 @@ if ($user->societe_id == 0) } } /* - * Propales + * Propales à facturer */ if ($user->comm > 0 && $conf->commercial ) { @@ -144,12 +144,8 @@ if ($user->comm > 0 && $conf->commercial ) print "
"; } /* - * Factures + * Factures impayées */ -print ''; -print ""; -print ''; -print "\n"; $sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut > 0"; if ($socidp) @@ -162,19 +158,28 @@ if ( $db->query($sql) ) $num = $db->num_rows(); $i = 0; - while ($i < $num) + if ($num) { - $obj = $db->fetch_object( $i); - $var=!$var; - print '"; - $i++; - } + print '
Factures impayées
'.$obj->facnumber."".$obj->nom."
'; + print ""; + print ''; + + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var=!$var; + print '"; + $i++; + } + print "
Factures impayées
'.$obj->facnumber."".$obj->nom."

"; + } + $db->free(); } else { print $sql; } -print "
"; + /* * Bookmark * @@ -241,6 +246,38 @@ if ( $result ) { * */ +/* + * Factures brouillons + */ + +$sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.fk_statut = 0"; + +if ( $db->query($sql) ) +{ + $num = $db->num_rows(); + $i = 0; + + if ($num) + { + print ''; + print ''; + print ''; + + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var=!$var; + print '"; + $i++; + } + + print "
Factures brouillons
'.$obj->facnumber."".$obj->nom."

"; + } +} +else +{ + print $sql; +} /* * Factures a payer