Look: Modif esthtiques mineures
This commit is contained in:
parent
6b9a6059df
commit
aa013f14ac
@ -66,7 +66,8 @@ print '<table class="noborder" width="50%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Number").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Average").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
@ -77,22 +78,22 @@ for ($i = 0 ; $i < 3 ; $i++)
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="liste.php?statut='.$i.'">'.$libelle[$i].'</a></td>';
|
||||
print '<td align="right">'.$nb[$i].'</td>';
|
||||
print '<td align="right">'.price($somme[$i]).'</td>';
|
||||
print '<td align="right">'.($nb[$i]?price($somme[$i]):' ').'</td>';
|
||||
print '<td align="right">'.($nb[$i]?(price($somme[$i])/$nb[$i]):' ').'</td>';
|
||||
$totalnb += $nb[$i];
|
||||
$total += $somme[$i];
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$totalnb.'</td>';
|
||||
print '<td align="right">'.price($total).'</td>';
|
||||
print '<td align="right">'.($totalnb?(price($total)/$totalnb):' ').'</td>';
|
||||
print '</tr>';
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/compta/dons/stats.php
|
||||
\ingroup don
|
||||
\brief Page des statistiques de dons
|
||||
@ -36,6 +36,8 @@ llxHeader();
|
||||
|
||||
|
||||
print_titre($langs->trans("Statistics"));
|
||||
print '<br>';
|
||||
|
||||
|
||||
$sql = "SELECT d.amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."don_projet as p";
|
||||
@ -44,34 +46,40 @@ $sql .= " ON p.rowid = d.fk_don_projet";
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
|
||||
$i=0;
|
||||
$total=0;
|
||||
while ($i < $num)
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$var=true;
|
||||
$i=0;
|
||||
$total=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$total += $objp->amount;
|
||||
$i++;
|
||||
$objp = $db->fetch_object($result);
|
||||
$total += $objp->amount;
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '<table class="border">';
|
||||
|
||||
print "<tr $bc[1]>";
|
||||
print '<td>'.$langs->trans("DonationsNumber").'</td><td align="right">'.$num.'</td></tr>';
|
||||
print "<tr $bc[0]>".'<td>'.$langs->trans("Total").'</td><td align="right">'.price($total).'</td>';
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Average").'</td><td align="right">'.price($total / ($num?$num:1)).'</td>';
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<table class="noborder" width="50%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td align="right">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.$langs->trans("DonationsNumber").'</td><td align="right">'.$num.'</td></tr>';
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>".'<td>'.$langs->trans("AmountTotal").'</td><td align="right">'.price($total).'</td>';
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>".'<td>'.$langs->trans("Average").'</td><td align="right">'.price($total / ($num?$num:1)).'</td>';
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -266,7 +266,7 @@ if ($socid > 0)
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
{
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, f.total, f.total_ttc, ".$db->pdate("f.datef")." as df, f.paye as paye, f.fk_statut as statut, f.rowid as facid ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||
@ -476,65 +476,67 @@ if ($socid > 0)
|
||||
$sql .= " AND c.id=a.fk_action ";
|
||||
$sql .= " ORDER BY a.datea DESC, a.id DESC";
|
||||
|
||||
if ( $db->query($sql) ) {
|
||||
|
||||
$i = 0 ; $num = $db->num_rows();
|
||||
while ($i < $num) {
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
$obj = $db->fetch_object();
|
||||
$obj = $db->fetch_object($result);
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
if ($oldyear == strftime("%Y",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
print '<td width="30" align="center">|</td>';
|
||||
} else {
|
||||
print "<td align=\"center\">" .strftime("%Y",$obj->da)."</td>\n";
|
||||
print '<td width="30" align="center">'.strftime("%Y",$obj->da)."</td>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
}
|
||||
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
print '<td width="30" align="center">|</td>';
|
||||
} else {
|
||||
print "<td align=\"center\">" .strftime("%b",$obj->da)."</td>\n";
|
||||
print '<td width="30" align="center">'.strftime("%b",$obj->da)."</td>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
}
|
||||
|
||||
print "<td>" .strftime("%d",$obj->da)."</td>\n";
|
||||
print "<td>" .strftime("%H:%M",$obj->da)."</td>\n";
|
||||
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
|
||||
print '<td width="30">'.strftime("%H:%M",$obj->da)."</td>\n";
|
||||
|
||||
print '<td width="10%"> </td>';
|
||||
print '<td width="40%">';
|
||||
if ($obj->propalrowid)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowTask"),"task");
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print $libelle;
|
||||
print '</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$obj->id.'">'.img_object($langs->trans("ShowTask"),"task");
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print $libelle;
|
||||
print '</a></td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
|
||||
/*
|
||||
* Contact pour cette action
|
||||
*
|
||||
*/
|
||||
print '<td>';
|
||||
if ($obj->propalrowid)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$obj->propalrowid.'">'.img_object($langs->trans("ShowTask"),"task");
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print $libelle;
|
||||
print '</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$obj->id.'">'.img_object($langs->trans("ShowTask"),"task");
|
||||
$transcode=$langs->trans("Action".$obj->acode);
|
||||
$libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
|
||||
print $libelle;
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
// Contact pour cette action
|
||||
if ($obj->fk_contact) {
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->fk_contact);
|
||||
print '<td width="40%"><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>';
|
||||
} else {
|
||||
print '<td width="40%"> </td>';
|
||||
print '<td> </td>';
|
||||
}
|
||||
/*
|
||||
*/
|
||||
print '<td width="20%"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.$obj->code.'</a></td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.$obj->code.'</a></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@ -545,21 +547,14 @@ if ($socid > 0)
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
// Notes sur la societe
|
||||
/*
|
||||
*
|
||||
* Notes sur la societe
|
||||
*
|
||||
*/
|
||||
if ($societe->note) {
|
||||
print '<table class="border" width="100%" bgcolor="#e0e0e0">';
|
||||
print "<tr><td>".nl2br($societe->note)."</td></tr>";
|
||||
print "</table>";
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@ -568,5 +563,7 @@ if ($socid > 0)
|
||||
}
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2005 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
*
|
||||
* 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
|
||||
@ -34,13 +34,10 @@ if (!$user->rights->propale->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
require("../lib/CMailFile.class.php");
|
||||
/*
|
||||
* Modules optionnels
|
||||
*/
|
||||
require("../project.class.php");
|
||||
require("../propal.class.php");
|
||||
require("../actioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
require_once("../project.class.php");
|
||||
require_once("../propal.class.php");
|
||||
require_once("../actioncomm.class.php");
|
||||
|
||||
/*
|
||||
* Sécurité accés client
|
||||
|
||||
@ -142,7 +142,7 @@ if ($socid > 0)
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>Code compta</td><td>'.$societe->code_compta.'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountancyCode").'</td><td>'.$societe->code_compta.'</td>';
|
||||
print '<td>'.$langs->trans("CustomerCode").'</td><td>';
|
||||
print $societe->code_client;
|
||||
print "</td></tr>";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user