Doc: Documentation doxygen

Trad: Et quelques traductions
This commit is contained in:
Laurent Destailleur 2004-11-13 21:19:44 +00:00
parent dcaf80ae40
commit 6342addb7c
5 changed files with 132 additions and 107 deletions

View File

@ -175,7 +175,7 @@ if ($rowid)
} }
print '<tr><td colspan="2" align="center">'; print '<tr><td colspan="2" align="center">';
print '<input type="submit" name="bouton" value="'.$langs->trans("Save").'">&nbsp;'; print '<input type="submit" name="bouton" value="'.$langs->trans("Save").'">&nbsp;';
print '<input type="submit" value="'.$langs->trans("Cancel").'>'; print '<input type="submit" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
print '</form>'; print '</form>';
print '</table>'; print '</table>';

View File

@ -21,7 +21,15 @@
* *
*/ */
/*!
\file htdocs/commande/index.php
\ingroup compta
\brief Page acceuil zone comptabilité
\version $Revision$
*/
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("orders"); $langs->load("orders");
@ -29,18 +37,19 @@ llxHeader("",$langs->trans("Orders"),"Commande");
print_titre($langs->trans("OrdersArea")); print_titre($langs->trans("OrdersArea"));
print '<table border="0" width="100%" cellspacing="0" cellpadding="3">'; print '<table class="noborder" width="100%">';
print '<tr><td valign="top" width="30%">'; print '<tr><td valign="top" width="30%">';
/* /*
* * Zone recherche
*/ */
print '<form method="post" action="liste.php">'; print '<form method="post" action="liste.php">';
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchOrder").'</td></tr>'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchOrder").'</td></tr>';
print "<tr $bc[1]><td>"; print "<tr $bc[1]><td>";
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>'; print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>';
print "</table></form>\n"; print "</table></form><br>\n";
/* /*
@ -60,7 +69,7 @@ if ( $db->query($sql) )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersToValid").'</td></tr>'; print '<td colspan="2">'.$langs->trans("OrdersToValid").'</td></tr>';
$var = True; $var = True;
@ -94,7 +103,7 @@ if ( $db->query($sql) )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>'; print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>';
$var = True; $var = True;
@ -111,13 +120,12 @@ if ( $db->query($sql) )
} }
} }
/*
*
*/
print '</td><td valign="top" width="70%">'; print '</td><td valign="top" width="70%">';
/* /*
* * 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 = "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 "; $sql .= " WHERE c.fk_soc = s.idp AND c.fk_statut = 2 ";
@ -132,9 +140,9 @@ if ( $db->query($sql) )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">Commandes en traitement</td></tr>'; print '<td colspan="2">Commandes en traitement ('.$num.')</td></tr>';
$var = True; $var = True;
while ($i < $num) while ($i < $num)
{ {
@ -148,6 +156,7 @@ if ( $db->query($sql) )
print "</table><br>"; print "</table><br>";
} }
} }
/* /*
* Commandes à traiter * Commandes à traiter
*/ */
@ -165,7 +174,7 @@ if ( $db->query($sql) )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">5 dernières commandes</td></tr>'; print '<td colspan="2">5 dernières commandes</td></tr>';
$var = True; $var = True;

View File

@ -20,6 +20,14 @@
* $Source$ * $Source$
* *
*/ */
/*!
\file htdocs/commande/pre.inc.php
\ingroup commandes
\brief Gestionnaire du menu commandes
\version $Revision$
*/
require("../main.inc.php"); require("../main.inc.php");
require("./commande.class.php"); require("./commande.class.php");
@ -30,10 +38,6 @@ function llxHeader($head = "", $title="", $help_url='')
{ {
global $user, $conf, $langs; global $user, $conf, $langs;
/*
*
*
*/
top_menu($head, $title); top_menu($head, $title);
$menu = new Menu(); $menu = new Menu();

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 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
@ -19,29 +20,34 @@
* $Source$ * $Source$
* *
*/ */
/*!
\file htdocs/commande/stats/pre.inc.php
\ingroup commandes
\brief Gestionnaire du menu commandes
\version $Revision$
*/
require("../../main.inc.php"); require("../../main.inc.php");
require("../../bargraph.class.php"); require("../../bargraph.class.php");
function llxHeader($head = "", $urlp = "") function llxHeader($head = "", $title="", $help_url='')
{ {
global $langs; global $user, $conf, $langs;
$langs->load("orders");
top_menu($head); top_menu($head, $title);
$menu = new Menu(); $menu = new Menu();
$menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders")); $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("./", $langs->trans("Statistics")); $menu->add(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"));
left_menu($menu->liste);
/*
*
*
*/
left_menu($menu->liste, $help_url);
} }
?> ?>

View File

@ -20,6 +20,14 @@
* $Source$ * $Source$
* *
*/ */
/*!
\file htdocs/compta/index.php
\ingroup compta
\brief Page acceuil zone comptabilité
\version $Revision$
*/
require("./pre.inc.php"); require("./pre.inc.php");
$user->getrights('banque'); $user->getrights('banque');
@ -37,22 +45,22 @@ if ($user->societe_id > 0)
llxHeader("","Accueil Compta"); llxHeader("","Accueil Compta");
/*
*
*/
/*
* Actions
*/
if ($action == 'add_bookmark') if ($action == 'add_bookmark')
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE fk_soc = ".$socidp." AND fk_user=".$user->id;
if (! $db->query($sql) ) 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.");"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");";
if (! $db->query($sql) ) 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"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=$bid";
$result = $db->query($sql); $result = $db->query($sql);
} }
/* /*
* * Affichage page
* *
*/ */
print_titre("Espace comptabilité"); print_titre("Espace comptabilité");
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">'; print '<table border="0" width="100%">';
print '<tr><td valign="top" width="30%">'; print '<tr><td valign="top" width="30%">';
/* /*
* * Zone recherche facture
*/ */
print '<form method="post" action="facture.php">'; print '<form method="post" action="facture.php">';
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print '<td colspan="2">Rechercher une facture</td></tr>'; print '<td colspan="2">Rechercher une facture</td></tr>';
print "<tr $bc[0]><td>"; print "<tr $bc[0]><td>";
print $langs->trans("Ref").' : <input type="text" name="sf_ref">&nbsp;<input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>'; print $langs->trans("Ref").' : <input type="text" name="sf_ref">&nbsp;<input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>';
print "</table></form>"; print "</table></form><br>";
/*
* Factures brouillons
*/
if ($conf->facture->enabled) 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"; $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) if ($num)
{ {
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">Factures brouillons ('.$num.')</td></tr>'; print '<td colspan="2">Factures brouillons ('.$num.')</td></tr>';
$var = True; $var = True;
@ -122,7 +134,7 @@ if ($conf->facture->enabled)
} }
else else
{ {
print $sql; dolibarr_print_error($db);
} }
} }
@ -130,7 +142,6 @@ if ($conf->compta->enabled) {
/* /*
* Charges a payer * Charges a payer
*
*/ */
if ($user->societe_id == 0) if ($user->societe_id == 0)
{ {
@ -144,9 +155,9 @@ if ($user->societe_id == 0)
$num = $db->num_rows(); $num = $db->num_rows();
if ($num) if ($num)
{ {
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">Charges à payer</td></tr>'; print '<td colspan="2">Charges à payer ('.$num.')</td></tr>';
$i = 0; $i = 0;
$var = True; $var = True;
while ($i < $num) while ($i < $num)
@ -164,7 +175,7 @@ if ($user->societe_id == 0)
} }
else else
{ {
print $db->error(); dolibarr_print_error($db);
} }
} }
@ -173,7 +184,6 @@ if ($user->societe_id == 0)
/* /*
* Bookmark * Bookmark
*
*/ */
$sql = "SELECT s.idp, s.nom,b.rowid as bid"; $sql = "SELECT s.idp, s.nom,b.rowid as bid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b";
@ -186,8 +196,8 @@ if ( $db->query($sql) )
$i = 0; $i = 0;
if ($num) if ($num)
{ {
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><TD colspan=\"2\">Bookmark</td></TR>\n"; print "<tr class=\"liste_titre\"><td colspan=\"2\">Bookmark</td></tr>\n";
$var = True; $var = True;
while ($i < $num) while ($i < $num)
{ {
@ -203,10 +213,7 @@ if ( $db->query($sql) )
print '</table>'; print '</table>';
} }
} }
/*
*
*
*/
print '</td><td valign="top" width="70%">'; print '</td><td valign="top" width="70%">';
@ -230,9 +237,9 @@ if ($user->comm > 0 && $conf->commercial->enabled )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print '<td colspan="2">'.$langs->trans("OrdersToBill").'</td></tr>'; print '<td colspan="2">'.$langs->trans("OrdersToBill").' ('.$num.')</td></tr>';
$var = True; $var = True;
while ($i < $num) while ($i < $num)
{ {
@ -246,6 +253,9 @@ if ($user->comm > 0 && $conf->commercial->enabled )
print "</table><br>"; print "</table><br>";
} }
} }
else {
dolibarr_print_error($db);
}
} }
@ -273,7 +283,7 @@ if ($conf->facture->enabled)
if ($num) if ($num)
{ {
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">Factures clients impayées ('.$num.')</td><td align="right">Montant TTC</td><td align="right">Reçu</td></tr>'; print '<tr class="liste_titre"><td colspan="2">Factures clients impayées ('.$num.')</td><td align="right">Montant TTC</td><td align="right">Reçu</td></tr>';
$var = True; $var = True;
$total = $totalam = 0; $total = $totalam = 0;
@ -298,15 +308,16 @@ if ($conf->facture->enabled)
} }
else else
{ {
print $sql; dolibarr_print_error($db);
} }
} }
// \todo Mettre ici recup des actions en rapport avec la compta
$result = 0; $result = 0;
if ( $result ) if ( $result )
{ {
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">Actions à faire</td>'; print '<tr class="liste_titre"><td colspan="2">Actions à faire</td>';
print "</tr>\n"; print "</tr>\n";
$var = True; $var = True;
@ -322,58 +333,53 @@ if ( $result )
$db->free(); $db->free();
print "</table><br>"; print "</table><br>";
} }
else
{
print $db->error();
}
if ($conf->facture->enabled) {
/* /*
* Factures a payer * Factures a payer
*
*/ */
if ($user->societe_id == 0) if ($conf->facture->enabled) {
{
$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 ($user->societe_id == 0)
{ {
$num = $db->num_rows(); $sql = "SELECT ff.rowid, ff.facnumber, ff.libelle, ff.total_ttc";
if ($num) $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
{ $sql .= " WHERE ff.paye=0";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">Factures fournisseurs à payer</td><td align="right">Montant TTC</td></tr>'; if ( $db->query($sql) )
print "</tr>\n"; {
$i = 0; $num = $db->num_rows();
$var = True; if ($num)
$total = $totalam = 0; {
while ($i < $num) print '<table class="noborder" width="100%">';
{ print '<tr class="liste_titre"><td colspan="2">Factures fournisseurs à payer ('.$num.')</td><td align="right">Montant TTC</td></tr>';
$obj = $db->fetch_object(); print "</tr>\n";
$var = !$var; $i = 0;
print '<tr '.$bc[$var].'><td width="20%"><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$obj->rowid.'">'.img_file().'</a>'; $var = True;
print '&nbsp;<a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$obj->rowid.'">'.$obj->facnumber.'</a></td>'; $total = $totalam = 0;
print '<td><a href="../fourn/facture/fiche.php?facid='.$obj->rowid.'">'.$obj->libelle.'</a></td>'; while ($i < $num)
print '<td align="right">'.price($obj->total_ttc).'</td>'; {
print '</tr>'; $obj = $db->fetch_object();
$total += $obj->total_ttc; $var = !$var;
$totalam += $obj->am; print '<tr '.$bc[$var].'><td width="20%"><a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$obj->rowid.'">'.img_file().'</a>';
$i++; print '&nbsp;<a href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$obj->rowid.'">'.$obj->facnumber.'</a></td>';
print '<td><a href="../fourn/facture/fiche.php?facid='.$obj->rowid.'">'.$obj->libelle.'</a></td>';
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '</tr>';
$total += $obj->total_ttc;
$totalam += $obj->am;
$i++;
}
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="2" align="left">Reste à payer : '.price($total-$totalam).'</td><td align="right">'.price($total).'</td></tr>';
print '</table><br>';
}
}
else
{
dolibarr_print_error($db);
} }
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="2" align="left">Reste à payer : '.price($total-$totalam).'</td><td align="right">'.price($total).'</td></tr>';
print '</table><br>';
}
} }
else
{
print $db->error();
}
}
} }