Traduction libellé générique Paiement fournisseur
This commit is contained in:
parent
e9f3853458
commit
7c7fc76c75
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 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,60 +32,62 @@ require("./pre.inc.php");
|
|||||||
if (!$user->rights->banque->lire)
|
if (!$user->rights->banque->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* Affichage page
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
if ($_GET["bid"] == 0)
|
if ($_GET["bid"] == 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Liste mouvements par catégories d'écritures financières
|
* Liste mouvements par catégories d'écritures financières
|
||||||
*/
|
*/
|
||||||
print_titre("Ecritures bancaires par catégories");
|
print_titre("Ecritures bancaires par catégories");
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print "<tr class=\"liste_titre\">";
|
|
||||||
print '<td>'.$langs->trans("Description").'</td><td align="center">'.$langs->trans("Nb").'</td><td align="right">'.$langs->trans("Total").'</td><td align="right">'.$langs->trans("Average").'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
$sql = "SELECT sum(d.amount) as somme, count(*) as nombre, c.label, c.rowid ";
|
print '<table class="noborder" width="100%">';
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_categ as c, ".MAIN_DB_PREFIX."bank_class as l, ".MAIN_DB_PREFIX."bank as d";
|
print "<tr class=\"liste_titre\">";
|
||||||
$sql .= " WHERE d.rowid=l.lineid AND c.rowid = l.fk_categ GROUP BY c.label, c.rowid ORDER BY c.label";
|
print '<td>'.$langs->trans("Description").'</td><td align="center">'.$langs->trans("Nb").'</td><td align="right">'.$langs->trans("Total").'</td><td align="right">'.$langs->trans("Average").'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
$result = $db->query($sql);
|
|
||||||
if ($result)
|
$sql = "SELECT sum(d.amount) as somme, count(*) as nombre, c.label, c.rowid ";
|
||||||
{
|
$sql .= " FROM ".MAIN_DB_PREFIX."bank_categ as c, ".MAIN_DB_PREFIX."bank_class as l, ".MAIN_DB_PREFIX."bank as d";
|
||||||
$num = $db->num_rows($result);
|
$sql .= " WHERE d.rowid=l.lineid AND c.rowid = l.fk_categ GROUP BY c.label, c.rowid ORDER BY c.label";
|
||||||
$i = 0; $total = 0;
|
|
||||||
|
$result = $db->query($sql);
|
||||||
$var=true;
|
if ($result)
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$num = $db->num_rows($result);
|
||||||
$var=!$var;
|
$i = 0; $total = 0;
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print "<td><a href=\"budget.php?bid=$objp->rowid\">$objp->label</a></td>";
|
|
||||||
print '<td align="center">'.$objp->nombre.'</td>';
|
|
||||||
print "<td align=\"right\">".price(abs($objp->somme))."</td>";
|
|
||||||
print "<td align=\"right\">".price(abs($objp->somme / $objp->nombre))."</td>";
|
|
||||||
print "</tr>";
|
|
||||||
$i++;
|
|
||||||
$total = $total + abs($objp->somme);
|
|
||||||
}
|
|
||||||
$db->free($result);
|
|
||||||
|
|
||||||
print '<tr class="liste_total"><td colspan="2" align="right">'.$langs->trans("Total").'</td>';
|
$var=true;
|
||||||
print '<td align="right"><b>'.price($total).'</b></td><td colspan="2"> </td></tr>';
|
while ($i < $num)
|
||||||
}
|
{
|
||||||
else
|
$objp = $db->fetch_object($result);
|
||||||
{
|
$var=!$var;
|
||||||
dolibarr_print_error($db);
|
print "<tr ".$bc[$var].">";
|
||||||
}
|
print "<td><a href=\"budget.php?bid=$objp->rowid\">$objp->label</a></td>";
|
||||||
print "</table>";
|
print '<td align="center">'.$objp->nombre.'</td>';
|
||||||
|
print "<td align=\"right\">".price(abs($objp->somme))."</td>";
|
||||||
|
print "<td align=\"right\">".price(abs($objp->somme / $objp->nombre))."</td>";
|
||||||
|
print "</tr>";
|
||||||
|
$i++;
|
||||||
|
$total = $total + abs($objp->somme);
|
||||||
|
}
|
||||||
|
$db->free($result);
|
||||||
|
|
||||||
|
print '<tr class="liste_total"><td colspan="2" align="right">'.$langs->trans("Total").'</td>';
|
||||||
|
print '<td align="right"><b>'.price($total).'</b></td><td colspan="2"> </td></tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -137,7 +138,16 @@ else
|
|||||||
print "<td align=\"center\">".dolibarr_print_date($objp->do)."</td>\n";
|
print "<td align=\"center\">".dolibarr_print_date($objp->do)."</td>\n";
|
||||||
|
|
||||||
print "<td><a href=\"account.php?account=$objp->bankid\">$objp->labelcompte</a></td>";
|
print "<td><a href=\"account.php?account=$objp->bankid\">$objp->labelcompte</a></td>";
|
||||||
print "<td><a href=\"ligne.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowPayment"),"payment").' '.$objp->label.'</a></td>';
|
|
||||||
|
// Description
|
||||||
|
print "<td><a href=\"ligne.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowPayment"),"payment").' ';
|
||||||
|
$reg=array();
|
||||||
|
eregi('\((.+)\)',$objp->label,$reg); // Si texte entouré de parenthèe on tente recherche de traduction
|
||||||
|
if ($reg[1] && $langs->trans($reg[1])!=$reg[1]) print $langs->trans($reg[1]);
|
||||||
|
else print $objp->label;
|
||||||
|
print '</a></td>';
|
||||||
|
|
||||||
|
// Montant
|
||||||
print "<td align=\"right\">".price(0 - $objp->amount)."</td><td> </td>";
|
print "<td align=\"right\">".price(0 - $objp->amount)."</td><td> </td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user