Fix: Dbuggage module dons
Trad: Traduction module dons
This commit is contained in:
parent
42f68877fe
commit
10d111f5ba
@ -21,16 +21,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*! \file htdocs/compta/dons/fiche.php
|
||||
/*! \file htdocs/compta/dons/fiche.php
|
||||
\ingroup don
|
||||
\brief Page de fiche de don
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require("../../don.class.php");
|
||||
require("../../paiement.class.php");
|
||||
require_once("./pre.inc.php");
|
||||
require_once("../../don.class.php");
|
||||
require_once("../../paiement.class.php");
|
||||
require_once("../../html.form.class.php");
|
||||
|
||||
$langs->load("donations");
|
||||
$langs->load("bills");
|
||||
|
||||
|
||||
$mesg="";
|
||||
@ -158,53 +161,53 @@ llxHeader();
|
||||
|
||||
if ($_GET["action"] == 'create') {
|
||||
|
||||
print_titre("Saisir un don");
|
||||
print_titre($langs->trans("AddDonation"));
|
||||
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
print "<tr $bc[1]>".'<td>Date du don</td><td>';
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Date").'</td><td>';
|
||||
print_date_select();
|
||||
print '</td>';
|
||||
|
||||
print '<td rowspan="12" valign="top">'.$langs->trans("Comments").' :<br>';
|
||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\"></textarea></td></tr>";
|
||||
print "<tr $bc[1]><td>Mode de paiement</td><td>\n";
|
||||
print "<tr $bc[1]><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||
|
||||
$paiement = new Paiement($db);
|
||||
|
||||
$paiement->select("modepaiement","crédit");
|
||||
$paiement->select("modepaiement","CRDT");
|
||||
|
||||
print "</td></tr>\n";
|
||||
|
||||
print "<tr $bc[1]><td>".$langs->trans("Project")."</td><td><select name=\"projetid\">\n";
|
||||
$sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."don_projet ORDER BY rowid";
|
||||
if ($db->query($sql))
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objopt = $db->fetch_object();
|
||||
print "<option value=\"$objopt->rowid\">$objopt->libelle</option>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</select><br>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
print "<tr $bc[1]><td>Don public</td><td><select name=\"public\">\n";
|
||||
if ($conf->projet->enabled) {
|
||||
// Si module projet actif
|
||||
print "<tr $bc[1]><td>".$langs->trans("Project")."</td><td><select name=\"projetid\">\n";
|
||||
$sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."don_projet ORDER BY rowid";
|
||||
if ($db->query($sql))
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objopt = $db->fetch_object();
|
||||
print "<option value=\"$objopt->rowid\">$objopt->libelle</option>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</select><br>";
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
print '<option value="1">oui</option>';
|
||||
print '<option value="0">non</option>';
|
||||
|
||||
print "</select><br>";
|
||||
print "<tr $bc[1]><td>".$langs->trans("PublicDonation")."</td><td>";
|
||||
$html=new Form($db);
|
||||
$html->selectyesno("public",1,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
$langs->load("companies");
|
||||
@ -237,7 +240,13 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
||||
$don->id = $_GET["rowid"];
|
||||
$don->fetch($_GET["rowid"]);
|
||||
|
||||
print_titre("Traitement du don");
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/dons/fiche.php?rowid=".$_GET["rowid"];
|
||||
$head[$h][1] = $langs->trans("Donation");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]);
|
||||
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<table class="border" width="100%">';
|
||||
@ -245,7 +254,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="rowid" value="'.$don->id.'">';
|
||||
|
||||
print "<tr $bc[1]>".'<td>Date du don</td><td>';
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Date").'</td><td>';
|
||||
print_date_select($don->date);
|
||||
print '</td>';
|
||||
|
||||
@ -272,11 +281,11 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
||||
print "</select><br>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
print "<tr $bc[1]><td>Don public</td><td><select name=\"public\">\n";
|
||||
print '<option value="1">oui</option>';
|
||||
print '<option value="0">non</option>';
|
||||
print "</select><br>";
|
||||
print "</td></tr>\n";
|
||||
print "<tr $bc[1]><td>".$langs->trans("PublicDonation")."</td><td>";
|
||||
$html=new Form($db);
|
||||
$html->selectyesno("public",1,1);
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$langs->load("companies");
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$don->societe.'"></td></tr>';
|
||||
@ -289,16 +298,17 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40" value="'.$don->email.'"></td></tr>';
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.$don->amount.'"> euros</td></tr>';
|
||||
|
||||
print "<tr $bc[1]><td>Mode de paiement</td><td>\n";
|
||||
print "<tr $bc[1]><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||
$paiement = new Paiement($db);
|
||||
$paiement->select("modepaiement","crédit");
|
||||
$paiement->select("modepaiement","CRDT");
|
||||
print "</td></tr>\n";
|
||||
|
||||
print "<tr $bc[1]>".'<td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
print "</form><br>\n";
|
||||
|
||||
print "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -315,20 +325,30 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
||||
$don->id = $_GET["rowid"];
|
||||
$don->fetch($_GET["rowid"]);
|
||||
|
||||
print_titre("Traitement du don");
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT."/compta/dons/fiche.php?rowid=".$_GET["rowid"];
|
||||
$head[$h][1] = $langs->trans("Donation");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]);
|
||||
|
||||
print "<form action=\"fiche.php\" method=\"post\">";
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print "<tr $bc[1]><td>Date du don</td><td>";
|
||||
print "<tr $bc[1]><td>".$langs->trans("Date")."</td><td>";
|
||||
print strftime("%d %B %Y",$don->date);
|
||||
print "</td>";
|
||||
|
||||
print '<td rowspan="12" valign="top" width="50%">'.$langs->trans("Comments").' :<br>';
|
||||
print nl2br($don->commentaire).'</td></tr>';
|
||||
|
||||
print "<tr $bc[1]>".'<td>Projet</td><td>'.$don->projet.'</td></tr>';
|
||||
|
||||
print "<tr $bc[1]><td>Don public</td><td>";
|
||||
if ($conf->project->enabled) {
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Project").'</td><td>'.$don->projet.'</td></tr>';
|
||||
}
|
||||
|
||||
print "<tr $bc[1]><td>".$langs->trans("PublicDonation")."</td><td>";
|
||||
|
||||
print $yn[$don->public];
|
||||
print "</td></tr>\n";
|
||||
@ -344,20 +364,22 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
||||
print "<tr $bc[1]>".'<td>'.$langs->trans("Amount").'</td><td>'.price($don->amount).' euros</td></tr>';
|
||||
if ($don->statut == 1)
|
||||
{
|
||||
print "<tr $bc[1]><td>Mode de paiement</td><td>";
|
||||
print "<tr $bc[1]><td>".$langs->trans("PaymentMode")."</td><td>";
|
||||
$paiement = new Paiement($db);
|
||||
$paiement->select("modepaiement","crédit", $don->modepaiementid);
|
||||
$paiement->select("modepaiement","CRDT", $don->modepaiementid);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr $bc[1]><td>Mode de paiement</td><td>";
|
||||
print "<tr $bc[1]><td>".$langs->trans("PaymentMode")."</td><td>";
|
||||
print $don->modepaiement;
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
print "</form><br>\n";
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
/*
|
||||
@ -368,34 +390,31 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
||||
|
||||
print '<a class="tabAction" href="fiche.php?action=edit&rowid='.$don->id.'">'.$langs->trans('Edit').'</a>';
|
||||
|
||||
if ($don->statut == 1 && $resteapayer > 0)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"paiement.php?facid=$facid&action=create\">Emettre un paiement</a>";
|
||||
}
|
||||
|
||||
if ($don->statut == 0)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?rowid=$don->id&action=valid_promesse\">Valider la promesse</a>";
|
||||
}
|
||||
|
||||
if ($don->statut == 3)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"formulaire/".DONS_FORM."?rowid=$don->id\">Formulaire</a>";
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?rowid=$don->id&action=valid_promesse\">".$langs->trans("Valid")."</a>";
|
||||
}
|
||||
|
||||
if ($don->statut == 1 && abs($resteapayer == 0) && $don->paye == 0)
|
||||
// \todo Gérer action émettre paiement
|
||||
if ($don->statut == 1 && $resteapayer > 0)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?rowid=$don->id&action=set_payed\">Classé payé</a>";
|
||||
print "<a class=\"tabAction\" href=\"paiement.php?facid=$facid&action=create\">".$langs->trans("DoPayment")."</a>";
|
||||
}
|
||||
|
||||
if ($don->statut == 1 && abs($resteapayer) == 0 && $don->paye == 0)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?rowid=$don->id&action=set_payed\">".$langs->trans("ClassifyPayed")."</a>";
|
||||
}
|
||||
|
||||
if ($don->statut == 2 || $don->statut == 3)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"formulaire/".DONS_FORM."?rowid=$don->id\">".$langs->trans("Form")."</a>";
|
||||
}
|
||||
|
||||
if ($don->statut == 0)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?rowid=$don->id&action=delete\">".$langs->trans("Delete")."</a>";
|
||||
}
|
||||
if ($don->statut == 2)
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"fiche.php?rowid=$don->id&action=set_encaisse\">Encaisser</a>";
|
||||
}
|
||||
|
||||
print "</div><br>";
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*! \file htdocs/compta/dons/index.php
|
||||
/*! \file htdocs/compta/dons/index.php
|
||||
\ingroup don
|
||||
\brief Page accueil espace don
|
||||
\version $Revision$
|
||||
@ -29,10 +29,11 @@
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$langs->load("donations");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$sql = "SELECT sum(d.amount) as somme , d.fk_statut FROM ".MAIN_DB_PREFIX."don as d GROUP BY d.fk_statut";
|
||||
$sql = "SELECT count(d.rowid) as nb, sum(d.amount) as somme , d.fk_statut FROM ".MAIN_DB_PREFIX."don as d GROUP BY d.fk_statut order by d.fk_statut";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -45,31 +46,43 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$somme[$objp->fk_statut] = $objp->somme;
|
||||
$nb[$objp->fk_statut] = $objp->nb;
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
} else {
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
print_titre("Dons");
|
||||
print_titre($langs->trans("Donations"));
|
||||
|
||||
print '<table class="noborder">';
|
||||
print '<table class="noborder" width="50%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print "<td> </td>";
|
||||
print "<td>Somme</td>";
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Number").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
|
||||
for ($i = 0 ; $i < 4 ; $i++)
|
||||
for ($i = 0 ; $i < 3 ; $i++)
|
||||
{
|
||||
$var=!$var;
|
||||
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>';
|
||||
$totalnb += $nb[$i];
|
||||
$total += $somme[$i];
|
||||
print "</tr>";
|
||||
}
|
||||
print "<tr $bc[0]>".'<td>'.$langs->trans("Total").'</td><td align="right">'.price($total).'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$totalnb.'</td>';
|
||||
print '<td align="right">'.price($total).'</td>';
|
||||
print '</tr>';
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
@ -30,12 +30,13 @@
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$langs->load("donations");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$sortorder=$_GET["sortorder"];
|
||||
$sortfield=$_GET["sortfield"];
|
||||
$statut=$_GET["statut"];
|
||||
$statut=isset($_GET["statut"])?$_GET["statut"]:"-1";
|
||||
$page=$_GET["page"];
|
||||
|
||||
if ($sortorder == "") { $sortorder="DESC"; }
|
||||
@ -51,9 +52,9 @@ $pagenext = $page + 1;
|
||||
$sql = "SELECT d.rowid, ".$db->pdate("d.datedon")." as datedon, d.prenom, d.nom, d.societe, d.amount, p.libelle as projet";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as d left join ".MAIN_DB_PREFIX."don_projet as p";
|
||||
$sql .= " ON p.rowid = d.fk_don_projet WHERE 1 = 1";
|
||||
if (isset($_GET["statut"]))
|
||||
if ($statut >= 0)
|
||||
{
|
||||
$sql .= " AND d.fk_statut = ".$_GET["statut"];
|
||||
$sql .= " AND d.fk_statut = ".$statut;
|
||||
}
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
|
||||
|
||||
@ -63,23 +64,25 @@ if ($result)
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
|
||||
if (strlen($statut))
|
||||
if ($statut >= 0)
|
||||
{
|
||||
print_barre_liste($libelle[$statut], $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield");
|
||||
}
|
||||
else
|
||||
{
|
||||
print_barre_liste("Dons", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield");
|
||||
print_barre_liste($langs->trans("Donation"), $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield");
|
||||
}
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Firstname"),"liste.php","d.prenom","&page=$page&statut=$statut");
|
||||
print_liste_field_titre($langs->trans("Name"),"liste.php","d.nom","&page=$page&statut=$statut");
|
||||
print_liste_field_titre($langs->trans("Company"),"liste.php","d.societe","&page=$page&statut=$statut");
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","d.datedon","&page=$page&statut=$statut");
|
||||
print_liste_field_titre($langs->trans("Project"),"liste.php","","&page=$page&statut=$statut");
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","d.amount","&page=$page&statut=$statut","",'align="right"');
|
||||
print_liste_field_titre($langs->trans("Firstname"),"liste.php","d.prenom","&page=$page&statut=$statut","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Name"),"liste.php","d.nom","&page=$page&statut=$statut","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Company"),"liste.php","d.societe","&page=$page&statut=$statut","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","d.datedon","&page=$page&statut=$statut","","",$sortfield);
|
||||
if ($conf->projet->enabled) {
|
||||
print_liste_field_titre($langs->trans("Project"),"liste.php","projet","&page=$page&statut=$statut","","",$sortfield);
|
||||
}
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","d.amount","&page=$page&statut=$statut","",'align="right"',$sortfield);
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -93,7 +96,9 @@ if ($result)
|
||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".stripslashes($objp->nom)."</a></td>\n";
|
||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".stripslashes($objp->societe)."</a></td>\n";
|
||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".strftime("%d %B %Y",$objp->datedon)."</a></td>\n";
|
||||
print "<td>$objp->projet</td>\n";
|
||||
if ($conf->projet->enabled) {
|
||||
print "<td>$objp->projet</td>\n";
|
||||
}
|
||||
print '<td align="right">'.price($objp->amount).'</td><td> </td>';
|
||||
|
||||
print "</tr>";
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*! \file htdocs/compta/dons/pre.inc.php
|
||||
/*! \file htdocs/compta/dons/pre.inc.php
|
||||
\ingroup don
|
||||
\brief Fichier gestionnaire du menu de gauche de l'espace dons
|
||||
\version $Revision$
|
||||
@ -30,29 +30,29 @@
|
||||
require("../../main.inc.php");
|
||||
require("../../projetdon.class.php");
|
||||
|
||||
$libelle[0] = "Promesses non validées";
|
||||
$libelle[1] = "Promesses validées";
|
||||
$libelle[2] = "Dons payés";
|
||||
$libelle[3] = "Dons encaissés";
|
||||
$langs->load("donations");
|
||||
|
||||
$libelle[0] = $langs->trans("PromisesNotValid");
|
||||
$libelle[1] = $langs->trans("PromisesValid");
|
||||
$libelle[2] = $langs->trans("DonationsPayed");
|
||||
$libelle[3] = $langs->trans("DonationsReceived");
|
||||
|
||||
|
||||
function llxHeader($head = "") {
|
||||
global $user, $conf, $langs;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
$langs->load("donations");
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/dons/","Dons");
|
||||
$menu->add_submenu("fiche.php?action=create","Saisir un don");
|
||||
$menu->add_submenu("liste.php",$langs->trans("List"));
|
||||
$menu->add_submenu("stats.php",$langs->trans("Statistics"));
|
||||
$menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/dons/fiche.php?action=create",$langs->trans("AddDonation"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/dons/liste.php",$langs->trans("List"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/dons/stats.php",$langs->trans("Statistics"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/bank/index.php","Banque");
|
||||
$menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("Bank"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
$langs->load("donations");
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
@ -56,7 +58,7 @@ if ($result)
|
||||
print '<table class="border">';
|
||||
|
||||
print "<tr $bc[1]>";
|
||||
print '<td>Nombre de dons</td><td align="right">'.$num.'</td></tr>';
|
||||
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>";
|
||||
@ -65,7 +67,7 @@ if ($result)
|
||||
}
|
||||
else
|
||||
{
|
||||
pdolibarr_print_error($db);
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user