[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * 20 * $Id: index.php,v 1.1 2005/10/20 19:27:19 simontosser Exp $ 21 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/ventilation/fournisseur/index.php,v $ 22 * 23 */ 24 25 /** 26 \file htdocs/compta/ventilation/fournisseur/index.php 27 \ingroup compta 28 \brief Page accueil ventilation 29 \version $Revision: 1.1 $ 30 */ 31 32 require ("./pre.inc.php"); 33 $langs->load("suppliers"); 34 35 36 llxHeader('','Compta - Ventilation'); 37 38 print_titre("Ventilation Comptable"); 39 40 print '<table border="0" width="100%">'; 41 42 print '<tr><td valign="top" width="30%">'; 43 44 45 46 $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet"; 47 $sql .= " WHERE fk_export_compta = 0"; 48 $result = $db->query($sql); 49 if ($result) 50 { 51 $row = $db->fetch_row($result); 52 $nbfac = $row[0]; 53 54 $db->free($result); 55 } 56 57 $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiement"; 58 $sql .= " WHERE fk_export_compta = 0"; 59 60 $result = $db->query($sql); 61 if ($result) 62 { 63 $row = $db->fetch_row($result); 64 $nbp = $row[0]; 65 66 $db->free($result); 67 } 68 69 $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facture_fourn_det"; 70 $sql .= " WHERE fk_export_compta = 0"; 71 $result = $db->query($sql); 72 if ($result) 73 { 74 $row = $db->fetch_row($result); 75 $nbfacfourn = $row[0]; 76 77 $db->free($result); 78 } 79 80 /*$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiementfourn"; 81 $sql .= " WHERE fk_export_compta = 0"; 82 83 $result = $db->query($sql); 84 if ($result) 85 { 86 $row = $db->fetch_row($result); 87 $nbpfourn = $row[0]; 88 89 $db->free($result); 90 }*/ 91 92 print '<table class="noborder" width="100%">'; 93 print '<tr class="liste_titre"><td colspan="2">Lignes a ventiler</tr>'; 94 print '<tr class="liste_titre"><td>Type</td><td align="center">Nb</td></tr>'; 95 print '<tr><td>Factures clients</td><td align="center">'.$nbfac.'</td></tr>'; 96 print '<tr><td>Paiements clients</td><td align="center">'.$nbp.'</td></tr>'; 97 print '<tr><td>Factures fournisseurs</td><td align="center">'.$nbfacfourn.'</td></tr>'; 98 //print '<tr><td>Paiements fournisseurs</td><td align="center">'.$nbpfourn.'</td></tr>'; 99 print "</table>\n"; 100 101 print '</td><td valign="top">'; 102 103 print '<table class="noborder" width="100%">'; 104 print '<tr class="liste_titre"><td>Type</td><td align="center">Nb de lignes</td></tr>'; 105 106 $sql = "SELECT count(*), ccg.intitule FROM ".MAIN_DB_PREFIX."facturedet as fd"; 107 $sql .= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg"; 108 $sql .= " WHERE fd.fk_code_ventilation = ccg.rowid"; 109 $sql .= " GROUP BY ccg.rowid"; 110 111 $resql = $db->query($sql); 112 if ($resql) 113 { 114 $i = 0; 115 $num = $db->num_rows($resql); 116 117 while ($i < $num) 118 { 119 120 $row = $db->fetch_row($resql); 121 122 print '<tr><td>'.$row[1].'</td><td align="center">'.$row[0].'</td></tr>'; 123 $i++; 124 } 125 $db->free($resql); 126 } 127 print "</table>\n"; 128 129 print '</td></tr></table>'; 130 131 llxFooter("<em>Dernière modification $Date: 2005/10/20 19:27:19 $ révision $Revision: 1.1 $</em>"); 132 133 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |