Uniformisation du code
This commit is contained in:
parent
47b1e6f5a2
commit
847186d9a1
@ -91,6 +91,7 @@ print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
|||||||
if ($conf->facture->enabled)
|
if ($conf->facture->enabled)
|
||||||
{
|
{
|
||||||
print '<form method="post" action="facture.php">';
|
print '<form method="post" action="facture.php">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td colspan="3">'.$langs->trans("SearchABill").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("SearchABill").'</td></tr>';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,16 +18,14 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/product/fiche.php
|
\file htdocs/compta/param/comptes/fiche.php
|
||||||
\ingroup product
|
\ingroup compta
|
||||||
\brief Page de la fiche produit
|
\brief Page de la fiche des comptes comptables
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -66,7 +64,7 @@ if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader("","Comptes Généraux");
|
llxHeader("","Nouveau compte");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Création d'un compte
|
* Création d'un compte
|
||||||
@ -74,35 +72,35 @@ llxHeader("","Comptes G
|
|||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer)
|
if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer)
|
||||||
{
|
{
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$nbligne=0;
|
$nbligne=0;
|
||||||
|
|
||||||
print_fiche_titre('Comptes Généraux');
|
print_fiche_titre($langs->trans("NewAccount"));
|
||||||
|
|
||||||
print '<form action="fiche.php" method="post">';
|
print '<form action="fiche.php" method="post">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="type" value="'.$_GET["type"].'">'."\n";
|
print '<input type="hidden" name="type" value="'.$_GET["type"].'">'."\n";
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>Numéro de compte</td><td><input name="numero" size="20" value="'.$compte->numero.'">';
|
print '<td>'.$langs->trans("AccountNumber").'</td><td><input name="numero" size="20" value="'.$compte->numero.'">';
|
||||||
if ($_error == 1)
|
if ($_error == 1)
|
||||||
{
|
{
|
||||||
print "Ce numéro de compte existe déjà";
|
print "Ce numéro de compte existe déjà";
|
||||||
}
|
}
|
||||||
if ($_error == 2)
|
if ($_error == 2)
|
||||||
{
|
{
|
||||||
print "Valeur(s) manquante(s)";
|
print "Valeur(s) manquante(s)";
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>Intitulé</td><td><input name="intitule" size="40" value="'.$compte->intitule.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="intitule" size="40" value="'.$compte->intitule.'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td> </td><td><input type="submit" value="'.$langs->trans("Create").'"></td></tr>';
|
print '<tr><td> </td><td><input type="submit" class="button" value="'.$langs->trans("Create").'"></td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,10 +18,9 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/compta/param/comptes/index.php
|
\file htdocs/compta/param/comptes/index.php
|
||||||
\ingroup compta
|
\ingroup compta
|
||||||
\brief Page acceuil zone parametrages
|
\brief Page acceuil zone parametrages
|
||||||
@ -33,6 +32,7 @@ require("./pre.inc.php");
|
|||||||
$user->getrights('banque');
|
$user->getrights('banque');
|
||||||
|
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
|
$langs->load("bills");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sécurité accés client
|
* Sécurité accés client
|
||||||
@ -49,26 +49,27 @@ llxHeader("","Accueil Compta");
|
|||||||
* Affichage page
|
* Affichage page
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print_titre("Paramétrage comptabilité");
|
print_fiche_titre($langs->trans("AccountancySetup"));
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%">';
|
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Zone recherche facture
|
* Zone recherche facture
|
||||||
*/
|
*/
|
||||||
print '<form method="post" action="facture.php">';
|
print '<form method="post" action="facture.php">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td colspan="2">'.$langs->trans("SearchABill").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("SearchABill").'</td></tr>';
|
||||||
print "<tr $bc[0]><td>";
|
print "<tr $bc[0]>";
|
||||||
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
print '<td>'.$langs->trans("Ref").':</td><td><input type="text" class="flat" size="18" name="sf_ref"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||||
print "</table></form><br>";
|
print "</table></form><br>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%">';
|
print '</td><td valign="top" width="70%" class="notopnoleft">';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -78,5 +79,5 @@ print '</table>';
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,10 +18,11 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
|
||||||
llxHeader('','Compta - Liste des comptes');
|
llxHeader('','Compta - Liste des comptes');
|
||||||
|
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
@ -74,16 +76,18 @@ if ($resql)
|
|||||||
|
|
||||||
print '<table class="liste">';
|
print '<table class="liste">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("N° compte","liste.php","cg.numero");
|
print_liste_field_titre($langs->trans("AccountNumberShort"),"liste.php","cg.numero");
|
||||||
print_liste_field_titre("Intitulé compte","liste.php","cg.intitule");
|
print_liste_field_titre($langs->trans("Label"),"liste.php","cg.intitule");
|
||||||
print '<td align="right">Date création</td>';
|
print_liste_field_titre($langs->trans("DateCreation"),"liste.php","cg.date_creation");
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<form action="liste.php" method="GET">';
|
print '<form action="liste.php" method="GET">';
|
||||||
print '<td><input type="text" name="search_numero" value="'.$_GET["search_numero"].'"></td>';
|
print '<td><input type="text" name="search_numero" value="'.$_GET["search_numero"].'"></td>';
|
||||||
print '<td><input type="text" name="search_intitule" value="'.$_GET["search_intitule"].'"><input type="submit"></td>';
|
print '<td><input type="text" name="search_intitule" value="'.$_GET["search_intitule"].'"></td>';
|
||||||
print '<td> </td>';
|
print '<td align="right">';
|
||||||
|
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
|
||||||
|
print '</td>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -50,11 +50,11 @@ llxHeader("",$langs->trans("AccountancySetup"));
|
|||||||
* Affichage page
|
* Affichage page
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print_titre($langs->trans("AccountancySetup"));
|
print_fiche_titre($langs->trans("AccountancySetup"));
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%">';
|
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Zone recherche facture
|
* Zone recherche facture
|
||||||
@ -62,14 +62,14 @@ print '<tr><td valign="top" width="30%">';
|
|||||||
print '<form method="post" action="facture.php">';
|
print '<form method="post" action="facture.php">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td colspan="2">'.$langs->trans("SearchABill").'</td></tr>';
|
print '<td colspan="3">'.$langs->trans("SearchABill").'</td></tr>';
|
||||||
print "<tr $bc[0]><td>";
|
print "<tr $bc[0]><td>";
|
||||||
print $langs->trans("Ref").'</td><td><input type="text" class="button" name="sf_ref"> <input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
|
print $langs->trans("Ref").':</td><td><input type="text" class="flat" name="sf_ref"></td><td><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
|
||||||
print "</table></form><br>";
|
print "</table></form><br>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%">';
|
print '</td><td valign="top" width="70%" class="notopnoleft">';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,6 +29,9 @@
|
|||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
$langs->load("bills");
|
||||||
|
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
if (!$user->rights->compta->ventilation->creer) accessforbidden();
|
||||||
@ -79,72 +82,72 @@ $form = new Form($db);
|
|||||||
|
|
||||||
if($_GET["id"])
|
if($_GET["id"])
|
||||||
{
|
{
|
||||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.remise_percent, l.subprice, ".$db->pdate("l.date_start")." as date_start, ".$db->pdate("l.date_end")." as date_end, l.fk_code_ventilation ";
|
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.remise_percent, l.subprice, ".$db->pdate("l.date_start")." as date_start, ".$db->pdate("l.date_end")." as date_end, l.fk_code_ventilation ";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||||
$sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND l.rowid = ".$_GET["id"];
|
$sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND l.rowid = ".$_GET["id"];
|
||||||
|
|
||||||
$result = $db->query($sql);
|
|
||||||
|
|
||||||
if ($result)
|
$result = $db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
{
|
{
|
||||||
$num_lignes = $db->num_rows($result);
|
$num_lignes = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($num_lignes)
|
if ($num_lignes)
|
||||||
{
|
{
|
||||||
|
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
|
|
||||||
if($objp->fk_code_ventilation == 0)
|
if($objp->fk_code_ventilation == 0)
|
||||||
{
|
{
|
||||||
print '<form action="fiche.php?id='.$_GET["id"].'" method="post">'."\n";
|
print '<form action="fiche.php?id='.$_GET["id"].'" method="post">'."\n";
|
||||||
print '<input type="hidden" name="action" value="ventil">';
|
print '<input type="hidden" name="action" value="ventil">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print_titre("Ventilation");
|
|
||||||
|
|
||||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
|
||||||
print '<tr><td>Facture</td>';
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td width="20%">Ligne</td>';
|
print_titre("Ventilation");
|
||||||
print '<td>'.stripslashes(nl2br($objp->description)).'</td></tr>';
|
|
||||||
print '<tr><td width="20%">Ventiler dans le compte :</td><td>';
|
|
||||||
|
|
||||||
if($objp->fk_code_ventilation == 0)
|
print '<table class="border" width="100%">';
|
||||||
{
|
print '<tr><td>'.$langs->trans("Bill").'</td>';
|
||||||
print $form->select_array("codeventil",$cgs, $objp->fk_code_ventilation);
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.$objp->facnumber.'</a></td></tr>';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $cgs[$objp->fk_code_ventilation];
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td></tr>';
|
print '<tr><td width="20%">Ligne</td>';
|
||||||
|
print '<td>'.stripslashes(nl2br($objp->description)).'</td></tr>';
|
||||||
if($objp->fk_code_ventilation == 0)
|
print '<tr><td width="20%">Ventiler dans le compte :</td><td>';
|
||||||
{
|
|
||||||
print '<tr><td> </td><td><input type="submit" value="'.$langs->trans("Ventiler").'"></td></tr>';
|
if($objp->fk_code_ventilation == 0)
|
||||||
}
|
{
|
||||||
print '</table>';
|
print $form->select_array("codeventil",$cgs, $objp->fk_code_ventilation);
|
||||||
print '</form>';
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
print $cgs[$objp->fk_code_ventilation];
|
||||||
print "Error";
|
}
|
||||||
}
|
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if($objp->fk_code_ventilation == 0)
|
||||||
|
{
|
||||||
|
print '<tr><td> </td><td><input type="submit" class="button" value="'.$langs->trans("Ventiler").'"></td></tr>';
|
||||||
|
}
|
||||||
|
print '</table>';
|
||||||
|
print '</form>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Error";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Error";
|
print "Error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Error ID incorrect";
|
print "Error ID incorrect";
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,12 +32,12 @@ require("./pre.inc.php");
|
|||||||
|
|
||||||
llxHeader('','Compta - Ventilation');
|
llxHeader('','Compta - Ventilation');
|
||||||
|
|
||||||
print_titre("Ventilation Comptable");
|
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print_fiche_titre("Ventilation Comptable");
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%">';
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
|
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet";
|
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet";
|
||||||
@ -64,43 +63,48 @@ if ($result)
|
|||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="2">Lignes a ventiler</tr>';
|
print '<tr class="liste_titre"><td colspan="2">Lignes a ventiler</tr>';
|
||||||
print '<tr class="liste_titre"><td>Type</td><td align="center">Nb</td></tr>';
|
print '<tr class="liste_titre"><td>Type</td><td align="center">Nb</td></tr>';
|
||||||
print '<tr><td>Factures</td><td align="center">'.$nbfac.'</td></tr>';
|
$var=!$var;
|
||||||
print '<tr><td>Paiements</td><td align="center">'.$nbp.'</td></tr>';
|
print "<tr $bc[$var]>".'<td>Factures</td><td align="center">'.$nbfac.'</td></tr>';
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr $bc[$var]>".'<td>Paiements</td><td align="center">'.$nbp.'</td></tr>';
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print '</td><td valign="top">';
|
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>Type</td><td align="center">Nb de lignes</td></tr>';
|
print '<tr class="liste_titre"><td>Type</td><td align="center">Nb de lignes</td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT count(*), ccg.intitule FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
$sql = "SELECT count(*), ccg.intitule FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||||
$sql .= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg";
|
$sql.= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg";
|
||||||
$sql .= " WHERE fd.fk_code_ventilation = ccg.rowid";
|
$sql.= " WHERE fd.fk_code_ventilation = ccg.rowid";
|
||||||
$sql .= " GROUP BY ccg.rowid";
|
$sql.= " GROUP BY ccg.rowid";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
$var=true;
|
||||||
while ($i < $num)
|
|
||||||
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
|
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
$var=!$var;
|
||||||
print '<tr><td>'.$row[1].'</td><td align="center">'.$row[0].'</td></tr>';
|
print '<tr '.$bc[$var].'><td>'.$row[1].'</td><td align="center">'.$row[0].'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -17,14 +17,13 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/compta/ventilation/lignes.php
|
\file htdocs/compta/ventilation/lignes.php
|
||||||
\ingroup facture
|
\ingroup facture
|
||||||
\brief Page de detail des lignes de ventilation d'une facture
|
\brief Page de detail des lignes de ventilation d'une facture
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -85,10 +84,12 @@ if ($result)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre"><td><input name="search_facture" size="8" value="'.$_GET["search_facture"].'"></td>';
|
print '<tr class="liste_titre"><td><input name="search_facture" size="8" value="'.$_GET["search_facture"].'"></td>';
|
||||||
print '<td><input type="submit"></td>';
|
print '<td> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td align="right"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="right">';
|
||||||
|
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
|
||||||
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
@ -118,5 +119,5 @@ print "</table></form>";
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user