diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index a495939df24..a12479ad677 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -91,6 +91,7 @@ print ''; if ($conf->facture->enabled) { print '
'; + print ''; print ""; print ''; diff --git a/htdocs/compta/param/comptes/fiche.php b/htdocs/compta/param/comptes/fiche.php index 6d8b0c042c7..8a3a9a19a0b 100644 --- a/htdocs/compta/param/comptes/fiche.php +++ b/htdocs/compta/param/comptes/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -18,16 +18,14 @@ * * $Id$ * $Source$ - * */ -/*! - \file htdocs/product/fiche.php - \ingroup product - \brief Page de la fiche produit - \version $Revision$ - +/** + \file htdocs/compta/param/comptes/fiche.php + \ingroup compta + \brief Page de la fiche des comptes comptables + \version $Revision$ */ 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 @@ -74,35 +72,35 @@ llxHeader("","Comptes G */ if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer) { - $html = new Form($db); - $nbligne=0; + $html = new Form($db); + $nbligne=0; - print_fiche_titre('Comptes Généraux'); + print_fiche_titre($langs->trans("NewAccount")); - print ''; - print ''; - print ''."\n"; - - print '
'.$langs->trans("SearchABill").'
'; - print ''; - print ''; + print '
Numéro de compte'; - if ($_error == 1) + print ''; + print ''; + print ''."\n"; + + print ''; + print ''; + print ''; - print ''; + print ''; + print ''; - print ''; - print '
'.$langs->trans("AccountNumber").''; + 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 '
Intitulé
'.$langs->trans("Label").'
 
'; - print ''; + print '
 
'; + print ''; } $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/compta/param/comptes/index.php b/htdocs/compta/param/comptes/index.php index 4fd0cf01a83..0eb3d12a3a8 100644 --- a/htdocs/compta/param/comptes/index.php +++ b/htdocs/compta/param/comptes/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -18,10 +18,9 @@ * * $Id$ * $Source$ - * */ -/*! +/** \file htdocs/compta/param/comptes/index.php \ingroup compta \brief Page acceuil zone parametrages @@ -33,6 +32,7 @@ require("./pre.inc.php"); $user->getrights('banque'); $langs->load("compta"); +$langs->load("bills"); /* * Sécurité accés client @@ -49,26 +49,27 @@ llxHeader("","Accueil Compta"); * Affichage page * */ -print_titre("Paramétrage comptabilité"); +print_fiche_titre($langs->trans("AccountancySetup")); -print ''; +print '
'; -print '
'; +print '
'; /* * Zone recherche facture */ print '
'; + print ''; print ""; -print ''; -print "'; +print ''; +print ""; +print ''; print "
'.$langs->trans("SearchABill").'
"; -print $langs->trans("Ref").' :  
'.$langs->trans("SearchABill").'
'.$langs->trans("Ref").':

"; -print '
'; +print ''; @@ -78,5 +79,5 @@ print '
'; $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/compta/param/comptes/liste.php b/htdocs/compta/param/comptes/liste.php index 1a0d5ae83ac..4a5562a21e8 100644 --- a/htdocs/compta/param/comptes/liste.php +++ b/htdocs/compta/param/comptes/liste.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 Laurent Destailleur * * 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 @@ -17,10 +18,11 @@ * * $Id$ * $Source$ - * */ + require("./pre.inc.php"); + llxHeader('','Compta - Liste des comptes'); $page = $_GET["page"]; @@ -74,16 +76,18 @@ if ($resql) print ''; print ''; - print_liste_field_titre("N° compte","liste.php","cg.numero"); - print_liste_field_titre("Intitulé compte","liste.php","cg.intitule"); - print ''; + print_liste_field_titre($langs->trans("AccountNumberShort"),"liste.php","cg.numero"); + print_liste_field_titre($langs->trans("Label"),"liste.php","cg.intitule"); + print_liste_field_titre($langs->trans("DateCreation"),"liste.php","cg.date_creation"); print "\n"; print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/param/index.php b/htdocs/compta/param/index.php index 36927785f59..1f72902a2b2 100644 --- a/htdocs/compta/param/index.php +++ b/htdocs/compta/param/index.php @@ -50,11 +50,11 @@ llxHeader("",$langs->trans("AccountancySetup")); * Affichage page * */ -print_titre($langs->trans("AccountancySetup")); +print_fiche_titre($langs->trans("AccountancySetup")); -print '
Date création
 '; + print ''; + print '
'; +print '
'; -print '
'; +print '
'; /* * Zone recherche facture @@ -62,14 +62,14 @@ print '
'; print '
'; print ''; print ""; -print ''; +print ''; print "'; +print $langs->trans("Ref").':'; print "
'.$langs->trans("SearchABill").'
'.$langs->trans("SearchABill").'
"; -print $langs->trans("Ref").' 

"; -print '
'; +print ''; diff --git a/htdocs/compta/ventilation/fiche.php b/htdocs/compta/ventilation/fiche.php index f61f1202c2d..901fbe6421f 100644 --- a/htdocs/compta/ventilation/fiche.php +++ b/htdocs/compta/ventilation/fiche.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 Laurent Destailleur * * 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 @@ -17,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** @@ -29,6 +29,9 @@ require("./pre.inc.php"); +$langs->load("bills"); + + $mesg = ''; if (!$user->rights->compta->ventilation->creer) accessforbidden(); @@ -79,72 +82,72 @@ $form = new Form($db); 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 .= " FROM ".MAIN_DB_PREFIX."facturedet as l"; - $sql .= " , ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND l.rowid = ".$_GET["id"]; - - $result = $db->query($sql); + $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 .= " , ".MAIN_DB_PREFIX."facture as f"; + $sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut = 1 AND l.rowid = ".$_GET["id"]; - if ($result) + $result = $db->query($sql); + + if ($result) { - $num_lignes = $db->num_rows($result); - $i = 0; - - if ($num_lignes) - { - - $objp = $db->fetch_object($result); + $num_lignes = $db->num_rows($result); + $i = 0; + + if ($num_lignes) + { + + $objp = $db->fetch_object($result); - if($objp->fk_code_ventilation == 0) - { - print '
'."\n"; - print ''; - } + if($objp->fk_code_ventilation == 0) + { + print ''."\n"; + print ''; + } - - print_titre("Ventilation"); - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + + if($objp->fk_code_ventilation == 0) + { + print ''; + } + print '
Facture'.$objp->facnumber.'
Ligne'.stripslashes(nl2br($objp->description)).'
Ventiler dans le compte :'; + print_titre("Ventilation"); - if($objp->fk_code_ventilation == 0) - { - print $form->select_array("codeventil",$cgs, $objp->fk_code_ventilation); - } - else - { - print $cgs[$objp->fk_code_ventilation]; - } + print ''; + print ''; + print ''; - print ''; - - if($objp->fk_code_ventilation == 0) - { - print ''; - } - print '
'.$langs->trans("Bill").''.$objp->facnumber.'
 
'; - print ''; - } - else - { - print "Error"; - } + print '
Ligne'.stripslashes(nl2br($objp->description)).'
Ventiler dans le compte :'; + + if($objp->fk_code_ventilation == 0) + { + print $form->select_array("codeventil",$cgs, $objp->fk_code_ventilation); + } + else + { + print $cgs[$objp->fk_code_ventilation]; + } + + print '
 
'; + print ''; + } + else + { + print "Error"; + } } - else + else { - print "Error"; + print "Error"; } } else { - print "Error ID incorrect"; + print "Error ID incorrect"; } $db->close(); diff --git a/htdocs/compta/ventilation/index.php b/htdocs/compta/ventilation/index.php index 2997c58f8cc..507f8c23984 100644 --- a/htdocs/compta/ventilation/index.php +++ b/htdocs/compta/ventilation/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * 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 @@ -18,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** @@ -33,12 +32,12 @@ require("./pre.inc.php"); llxHeader('','Compta - Ventilation'); -print_titre("Ventilation Comptable"); -print ''; +print_fiche_titre("Ventilation Comptable"); -print '\n"; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print "\n"; $var=True; @@ -118,5 +119,5 @@ print "
'; +print ''; +print '
'; $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet"; @@ -64,43 +63,48 @@ if ($result) $db->free($result); } +$var=true; + print ''; print ''; print ''; -print ''; -print ''; +$var=!$var; +print "".''; +$var=!$var; +print "".''; print "
Lignes a ventiler
TypeNb
Factures'.$nbfac.'
Paiements'.$nbp.'
Factures'.$nbfac.'
Paiements'.$nbp.'
\n"; -print '
'; +print ''; print ''; print ''; $sql = "SELECT count(*), ccg.intitule FROM ".MAIN_DB_PREFIX."facturedet as fd"; -$sql .= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg"; -$sql .= " WHERE fd.fk_code_ventilation = ccg.rowid"; -$sql .= " GROUP BY ccg.rowid"; +$sql.= " ,".MAIN_DB_PREFIX."compta_compte_generaux as ccg"; +$sql.= " WHERE fd.fk_code_ventilation = ccg.rowid"; +$sql.= " GROUP BY ccg.rowid"; $resql = $db->query($sql); if ($resql) { - $i = 0; - $num = $db->num_rows($resql); - - while ($i < $num) + $i = 0; + $num = $db->num_rows($resql); + $var=true; + + while ($i < $num) { - $row = $db->fetch_row($resql); - - print ''; - $i++; + $row = $db->fetch_row($resql); + $var=!$var; + print ''; + $i++; } - $db->free($resql); + $db->free($resql); } print "
TypeNb de lignes
'.$row[1].''.$row[0].'
'.$row[1].''.$row[0].'
\n"; print '
'; -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/compta/ventilation/lignes.php b/htdocs/compta/ventilation/lignes.php index 432473956ce..2026981484b 100644 --- a/htdocs/compta/ventilation/lignes.php +++ b/htdocs/compta/ventilation/lignes.php @@ -17,14 +17,13 @@ * * $Id$ * $Source$ - * */ -/*! - \file htdocs/compta/ventilation/lignes.php - \ingroup facture - \brief Page de detail des lignes de ventilation d'une facture - \version $Revision$ +/** + \file htdocs/compta/ventilation/lignes.php + \ingroup facture + \brief Page de detail des lignes de ventilation d'une facture + \version $Revision$ */ require("./pre.inc.php"); @@ -85,10 +84,12 @@ if ($result) print "
    '; + print ''; + print '
"; $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?>