From 6342addb7c4fbb566ba84574e7785aab5e03a463 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Nov 2004 21:19:44 +0000 Subject: [PATCH] Doc: Documentation doxygen Trad: Et quelques traductions --- htdocs/adherents/edit.php | 2 +- htdocs/commande/index.php | 35 ++++--- htdocs/commande/pre.inc.php | 12 ++- htdocs/commande/stats/pre.inc.php | 34 ++++--- htdocs/compta/index.php | 156 ++++++++++++++++-------------- 5 files changed, 132 insertions(+), 107 deletions(-) diff --git a/htdocs/adherents/edit.php b/htdocs/adherents/edit.php index a0e1bf929f5..63004c54fc3 100644 --- a/htdocs/adherents/edit.php +++ b/htdocs/adherents/edit.php @@ -175,7 +175,7 @@ if ($rowid) } print ''; print ' '; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index f12a1b04a4d..3fb955aae2d 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -21,7 +21,15 @@ * */ +/*! + \file htdocs/commande/index.php + \ingroup compta + \brief Page acceuil zone comptabilité + \version $Revision$ +*/ + require("./pre.inc.php"); + $langs->load("orders"); @@ -29,18 +37,19 @@ llxHeader("",$langs->trans("Orders"),"Commande"); print_titre($langs->trans("OrdersArea")); -print ''; +print '
'; print '
'; + /* - * + * Zone recherche */ print '
'; -print ''; +print '
'; print ''; print "'; -print "
'.$langs->trans("SearchOrder").'
"; print $langs->trans("Ref").' :
\n"; +print "

\n"; /* @@ -60,7 +69,7 @@ if ( $db->query($sql) ) if ($num) { $i = 0; - print ''; + print '
'; print ''; print ''; $var = True; @@ -94,7 +103,7 @@ if ( $db->query($sql) ) if ($num) { $i = 0; - print '
'.$langs->trans("OrdersToValid").'
'; + print '
'; print ''; print ''; $var = True; @@ -111,13 +120,12 @@ if ( $db->query($sql) ) } } -/* - * - */ + print ''; - print '
'.$langs->trans("OrdersToProcess").'
'; + /* - * + * Commandes en cours */ $sql = "SELECT c.rowid, c.ref, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 2 "; @@ -132,9 +140,9 @@ if ( $db->query($sql) ) if ($num) { $i = 0; - print ''; + print '
'; print ''; - print ''; + print ''; $var = True; while ($i < $num) { @@ -148,6 +156,7 @@ if ( $db->query($sql) ) print "
Commandes en traitement
Commandes en traitement ('.$num.')

"; } } + /* * Commandes à traiter */ @@ -165,7 +174,7 @@ if ( $db->query($sql) ) if ($num) { $i = 0; - print ''; + print '
'; print ''; print ''; $var = True; diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php index 815756967d1..a59591df865 100644 --- a/htdocs/commande/pre.inc.php +++ b/htdocs/commande/pre.inc.php @@ -20,6 +20,14 @@ * $Source$ * */ + +/*! + \file htdocs/commande/pre.inc.php + \ingroup commandes + \brief Gestionnaire du menu commandes + \version $Revision$ +*/ + require("../main.inc.php"); require("./commande.class.php"); @@ -30,10 +38,6 @@ function llxHeader($head = "", $title="", $help_url='') { global $user, $conf, $langs; - /* - * - * - */ top_menu($head, $title); $menu = new Menu(); diff --git a/htdocs/commande/stats/pre.inc.php b/htdocs/commande/stats/pre.inc.php index 34b7d2697fb..71f3ba22996 100644 --- a/htdocs/commande/stats/pre.inc.php +++ b/htdocs/commande/stats/pre.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 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 @@ -19,29 +20,34 @@ * $Source$ * */ + +/*! + \file htdocs/commande/stats/pre.inc.php + \ingroup commandes + \brief Gestionnaire du menu commandes + \version $Revision$ +*/ + require("../../main.inc.php"); require("../../bargraph.class.php"); -function llxHeader($head = "", $urlp = "") +function llxHeader($head = "", $title="", $help_url='') { - global $langs; - $langs->load("orders"); - - top_menu($head); + global $user, $conf, $langs; + + top_menu($head, $title); $menu = new Menu(); $menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders")); + $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List")); + if ($conf->expedition->enabled) { + $menu->add(DOL_URL_ROOT."/expedition/", "Expeditions"); + } + + $menu->add(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics")); - $menu->add("./", $langs->trans("Statistics")); - - - left_menu($menu->liste); - /* - * - * - */ - + left_menu($menu->liste, $help_url); } ?> diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index ee38a3c42f2..4a7b5dfc714 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -20,6 +20,14 @@ * $Source$ * */ + +/*! + \file htdocs/compta/index.php + \ingroup compta + \brief Page acceuil zone comptabilité + \version $Revision$ +*/ + require("./pre.inc.php"); $user->getrights('banque'); @@ -37,22 +45,22 @@ if ($user->societe_id > 0) llxHeader("","Accueil Compta"); -/* - * - */ +/* + * Actions + */ if ($action == 'add_bookmark') { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id; if (! $db->query($sql) ) { - print $db->error(); + dolibarr_print_error($db); } $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");"; if (! $db->query($sql) ) { - print $db->error(); + dolibarr_print_error($db); } } @@ -61,33 +69,37 @@ if ($action == 'del_bookmark') $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=$bid"; $result = $db->query($sql); } + + + /* - * + * Affichage page * */ print_titre("Espace comptabilité"); -print '
5 dernières commandes
'; +print '
'; print '
'; + /* - * + * Zone recherche facture */ print '
'; -print ''; +print '
'; print ""; print ''; print "'; -print "
Rechercher une facture
"; print $langs->trans("Ref").' :  
"; +print "

"; +/* +* Factures brouillons +*/ if ($conf->facture->enabled) { - /* - * Factures brouillons - */ $sql = "SELECT f.facnumber, f.rowid, s.nom, s.idp FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s WHERE s.idp = f.fk_soc AND f.fk_statut = 0"; @@ -103,7 +115,7 @@ if ($conf->facture->enabled) if ($num) { - print ''; + print '
'; print ''; print ''; $var = True; @@ -122,7 +134,7 @@ if ($conf->facture->enabled) } else { - print $sql; + dolibarr_print_error($db); } } @@ -130,7 +142,6 @@ if ($conf->compta->enabled) { /* * Charges a payer - * */ if ($user->societe_id == 0) { @@ -144,9 +155,9 @@ if ($user->societe_id == 0) $num = $db->num_rows(); if ($num) { - print '
Factures brouillons ('.$num.')
'; + print '
'; print ''; - print ''; + print ''; $i = 0; $var = True; while ($i < $num) @@ -164,7 +175,7 @@ if ($user->societe_id == 0) } else { - print $db->error(); + dolibarr_print_error($db); } } @@ -173,7 +184,6 @@ if ($user->societe_id == 0) /* * Bookmark - * */ $sql = "SELECT s.idp, s.nom,b.rowid as bid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b"; @@ -186,8 +196,8 @@ if ( $db->query($sql) ) $i = 0; if ($num) { - print '
Charges à payer
Charges à payer ('.$num.')
'; - print "\n"; + print '
Bookmark
'; + print "\n"; $var = True; while ($i < $num) { @@ -203,10 +213,7 @@ if ( $db->query($sql) ) print '
Bookmark
'; } } -/* - * - * - */ + print '
'; @@ -230,9 +237,9 @@ if ($user->comm > 0 && $conf->commercial->enabled ) if ($num) { $i = 0; - print ''; + print '
'; print ""; - print ''; + print ''; $var = True; while ($i < $num) { @@ -246,6 +253,9 @@ if ($user->comm > 0 && $conf->commercial->enabled ) print "
'.$langs->trans("OrdersToBill").'
'.$langs->trans("OrdersToBill").' ('.$num.')

"; } } + else { + dolibarr_print_error($db); + } } @@ -273,7 +283,7 @@ if ($conf->facture->enabled) if ($num) { - print ''; + print '
'; print ''; $var = True; $total = $totalam = 0; @@ -298,15 +308,16 @@ if ($conf->facture->enabled) } else { - print $sql; + dolibarr_print_error($db); } } +// \todo Mettre ici recup des actions en rapport avec la compta $result = 0; if ( $result ) { - print '
Factures clients impayées ('.$num.')Montant TTCReçu
'; + print '
'; print ''; print "\n"; $var = True; @@ -322,58 +333,53 @@ if ( $result ) $db->free(); print "
Actions à faire

"; } -else -{ - print $db->error(); -} -if ($conf->facture->enabled) { - /* * Factures a payer - * */ -if ($user->societe_id == 0) -{ - $sql = "SELECT ff.rowid, ff.facnumber, ff.libelle, ff.total_ttc"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff"; - $sql .= " WHERE ff.paye=0"; - - if ( $db->query($sql) ) +if ($conf->facture->enabled) { + + if ($user->societe_id == 0) { - $num = $db->num_rows(); - if ($num) - { - print ''; - print ''; - print "\n"; - $i = 0; - $var = True; - $total = $totalam = 0; - while ($i < $num) - { - $obj = $db->fetch_object(); - $var = !$var; - print ''; - print ''; - print ''; - print ''; - $total += $obj->total_ttc; - $totalam += $obj->am; - $i++; + $sql = "SELECT ff.rowid, ff.facnumber, ff.libelle, ff.total_ttc"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff"; + $sql .= " WHERE ff.paye=0"; + + if ( $db->query($sql) ) + { + $num = $db->num_rows(); + if ($num) + { + print '
Factures fournisseurs à payerMontant TTC
'.img_file().''; - print ' '.$obj->facnumber.''.$obj->libelle.''.price($obj->total_ttc).'
'; + print ''; + print "\n"; + $i = 0; + $var = True; + $total = $totalam = 0; + while ($i < $num) + { + $obj = $db->fetch_object(); + $var = !$var; + print ''; + print ''; + print ''; + print ''; + $total += $obj->total_ttc; + $totalam += $obj->am; + $i++; + } + $var=!$var; + print ''; + print '
Factures fournisseurs à payer ('.$num.')Montant TTC
'.img_file().''; + print ' '.$obj->facnumber.''.$obj->libelle.''.price($obj->total_ttc).'
Reste à payer : '.price($total-$totalam).''.price($total).'

'; + } + } + else + { + dolibarr_print_error($db); } - $var=!$var; - print '
Reste à payer : '.price($total-$totalam).''.price($total).'

'; - } } - else - { - print $db->error(); - } -} }