diff --git a/htdocs/compta/ventilation/index.php b/htdocs/compta/ventilation/index.php index ac77370249f..0b02d6f25a4 100644 --- a/htdocs/compta/ventilation/index.php +++ b/htdocs/compta/ventilation/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -22,28 +22,28 @@ /** \file htdocs/compta/ventilation/index.php - \ingroup compta - \brief Page accueil ventilation - \version $Revision$ + \ingroup compta + \brief Page accueil ventilation + \version $Revision$ */ require("./pre.inc.php"); $langs->load("compta"); - llxHeader('','Compta - Ventilation'); - print_fiche_titre("Ventilation Comptable"); print ''; print '
'; +$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet as fd"; +$sql.= " , ".MAIN_DB_PREFIX."facture as f"; +$sql.= " WHERE fd.fk_code_ventilation = 0"; +$sql.= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1;"; -$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet"; -$sql .= " WHERE fk_export_compta = 0"; $result = $db->query($sql); if ($result) { @@ -53,18 +53,6 @@ if ($result) $db->free($result); } -$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiement"; -$sql .= " WHERE fk_export_compta = 0"; - -$result = $db->query($sql); -if ($result) -{ - $row = $db->fetch_row($result); - $nbp = $row[0]; - - $db->free($result); -} - $var=true; print ''; @@ -73,7 +61,6 @@ print ''; $var=!$var; -print "".''; print "
'.$langs->trans("Type").'".''.$langs->trans("Invoices").''.$nbfac.'
'.$langs->trans("Payments").''.$nbp.'
\n"; print '
';