New: Ajout ligne total

This commit is contained in:
Laurent Destailleur 2005-06-11 11:58:06 +00:00
parent aa013f14ac
commit c1f0a2721b
7 changed files with 58 additions and 45 deletions

View File

@ -173,11 +173,6 @@ if ($db->query($sql))
} }
} }
$var=!$var; $var=!$var;
print "<tr $bc[$var]>";
print '<td>&nbsp;</td>';
print '<td align="right">'.$langs->trans("Total").'</td>';
print '<td align="right">'.price($total).'</td><td>&nbsp;</td>';
print "</tr>\n";
print "</table>\n"; print "</table>\n";
$db->free(); $db->free();

View File

@ -53,7 +53,8 @@ if ($modecompta=="CREANCES-DETTES")
{ {
$nom="Bilan des recettes et dépenses, détail"; $nom="Bilan des recettes et dépenses, détail";
$nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)'; $nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)';
$period='<a href='.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous()."</a> ".$langs->trans("Year")." ".$year.' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $period=$langs->trans("Year")." ".$year;
$periodlink='<a href='.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesResultDue"); $description=$langs->trans("RulesResultDue");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -61,7 +62,8 @@ if ($modecompta=="CREANCES-DETTES")
else { else {
$nom="Bilan des recettes et dépenses, détail"; $nom="Bilan des recettes et dépenses, détail";
$nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)'; $nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)';
$period='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous()."</a> ".$langs->trans("Year")." ".$year.' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $period=$langs->trans("Year")." ".$year;
$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesResultInOut"); $description=$langs->trans("RulesResultInOut");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -429,7 +431,7 @@ $subtotal_ht = 0;
$subtotal_ttc = 0; $subtotal_ttc = 0;
if ($result) { if ($result) {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$var=false; $var=true;
$i = 0; $i = 0;
if ($num) { if ($num) {
while ($i < $num) { while ($i < $num) {
@ -532,7 +534,7 @@ print '<tr>';
print '<td colspan="4">&nbsp;</td>'; print '<td colspan="4">&nbsp;</td>';
print '</tr>'; print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="2">Résultat</td>'; print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("Profit").'</td>';
if ($modecompta == 'CREANCES-DETTES') print '<td class="border" align="right">'.price($total_ht).'</td>'; if ($modecompta == 'CREANCES-DETTES') print '<td class="border" align="right">'.price($total_ht).'</td>';
print '<td class="border" align="right">'.price($total_ttc).'</td>'; print '<td class="border" align="right">'.price($total_ttc).'</td>';
print '</tr>'; print '</tr>';

View File

@ -61,7 +61,8 @@ if ($modecompta=="CREANCES-DETTES")
{ {
$nom="Bilan des recettes et dépenses, résumé annuel"; $nom="Bilan des recettes et dépenses, résumé annuel";
$nom.=' (Voir le rapport <a href="index.php?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)'; $nom.=' (Voir le rapport <a href="index.php?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)';
$period=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":""); $period="$year_start - $year_end";
$periodlink=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesResultDue"); $description=$langs->trans("RulesResultDue");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -69,7 +70,8 @@ if ($modecompta=="CREANCES-DETTES")
else { else {
$nom="Bilan des recettes et dépenses, résumé annuel"; $nom="Bilan des recettes et dépenses, résumé annuel";
$nom.=' (Voir le rapport en <a href="index.php?year_start='.$year_start.'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)'; $nom.=' (Voir le rapport en <a href="index.php?year_start='.$year_start.'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)';
$period=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":""); $period="$year_start - $year_end";
$periodlink=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesResultInOut"); $description=$langs->trans("RulesResultInOut");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -383,7 +385,8 @@ print '</tr>';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
print '<td align="right">'.$langs->trans("Income").'</td><td align="right">'.$langs->trans("Outcome").'</td>'; print '<td align="right">'.$langs->trans("Outcome").'</td>';
print '<td align="right">'.$langs->trans("Income").'</td>';
} }
print '</tr>'; print '</tr>';
@ -395,6 +398,15 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
print "<td>".strftime("%B",mktime(1,1,1,$mois,1,$annee))."</td>"; print "<td>".strftime("%B",mktime(1,1,1,$mois,1,$annee))."</td>";
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
print '<td align="right">&nbsp;';
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
if ($decaiss_ttc[$case]>0)
{
print price($decaiss_ttc[$case]);
$totsorties[$annee]+=$decaiss_ttc[$case];
}
print "</td>";
print '<td align="right">&nbsp;'; print '<td align="right">&nbsp;';
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee)); $case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
if ($encaiss_ttc[$case]>0) if ($encaiss_ttc[$case]>0)
@ -404,14 +416,6 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
} }
print "</td>"; print "</td>";
print '<td align="right">&nbsp;';
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
if ($decaiss_ttc[$case]>0)
{
print price($decaiss_ttc[$case]);
$totsorties[$annee]+=$decaiss_ttc[$case];
}
print "</td>";
} }
print '</tr>'; print '</tr>';
@ -419,20 +423,27 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
// Total // Total
$var=!$var; $var=!$var;
$nbcols=0;
print '<tr class="liste_total"><td>'.$langs->trans("TotalTTC").'</td>'; print '<tr class="liste_total"><td>'.$langs->trans("TotalTTC").'</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
print '<td align="right">'.(isset($totentrees[$annee])?price($totentrees[$annee]):'&nbsp;').'</td>'; $nbcols+=2;
print '<td align="right">'.(isset($totsorties[$annee])?price($totsorties[$annee]):'&nbsp;').'</td>'; print '<td align="right">'.(isset($totsorties[$annee])?price($totsorties[$annee]):'&nbsp;').'</td>';
print '<td align="right">'.(isset($totentrees[$annee])?price($totentrees[$annee]):'&nbsp;').'</td>';
} }
print "</tr>\n"; print "</tr>\n";
// Ligne vierge
print '<tr><td>&nbsp;</td>';
print '<td colspan="'.$nbcols.'">&nbsp;</td>';
print "</tr>\n";
// Balance // Balance
$var=!$var; $var=!$var;
print '<tr class="liste_total"><td>'.$langs->trans("Profit").'</td>'; print '<tr class="liste_total"><td>'.$langs->trans("Profit").'</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
print '<td align="center" colspan="2"> '; print '<td align="right" colspan="2"> ';
if (isset($totentrees[$annee]) || isset($totsorties[$annee])) { if (isset($totentrees[$annee]) || isset($totsorties[$annee])) {
print price($totentrees[$annee]-$totsorties[$annee]).'</td>'; print price($totentrees[$annee]-$totsorties[$annee]).'</td>';
// print '<td>&nbsp;</td>'; // print '<td>&nbsp;</td>';

View File

@ -37,8 +37,8 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; $sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; $sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
if (! $sortorder) $sortorder="desc"; if (! $sortorder) $sortorder="asc";
if (! $sortfield) $sortfield="amount_ttc"; if (! $sortfield) $sortfield="name";
// Sécurité accés client // Sécurité accés client
if ($user->societe_id > 0) $socidp = $user->societe_id; if ($user->societe_id > 0) $socidp = $user->societe_id;
@ -54,7 +54,8 @@ if ($modecompta=="CREANCES-DETTES")
{ {
$nom="Chiffre d'affaire par utilisateur, auteur de la facture"; $nom="Chiffre d'affaire par utilisateur, auteur de la facture";
$nom.=' (Voir le rapport <a href="'.$_SERVER["PHP_SELF"].'?year='.($year).'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)'; $nom.=' (Voir le rapport <a href="'.$_SERVER["PHP_SELF"].'?year='.($year).'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)';
$period="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>"; $period=$langs->trans("Year")." $year";
$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
$description=$langs->trans("RulesCADue"); $description=$langs->trans("RulesCADue");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -62,7 +63,8 @@ if ($modecompta=="CREANCES-DETTES")
else { else {
$nom="Chiffre d'affaire par utilisateur, auteur de la facture"; $nom="Chiffre d'affaire par utilisateur, auteur de la facture";
$nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.($year).'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)'; $nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.($year).'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)';
$period="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>"; $period=$langs->trans("Year")." $year";
$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
$description=$langs->trans("RulesCAIn"); $description=$langs->trans("RulesCAIn");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -157,11 +159,11 @@ if (sizeof($amount))
$arrayforsort=$name; $arrayforsort=$name;
// On définit tableau arrayforsort // On définit tableau arrayforsort
if ($sortfield == 'nom' && $sortorder == 'asc') { if ($sortfield == 'name' && $sortorder == 'asc') {
asort($name); asort($name);
$arrayforsort=$name; $arrayforsort=$name;
} }
if ($sortfield == 'nom' && $sortorder == 'desc') { if ($sortfield == 'name' && $sortorder == 'desc') {
arsort($name); arsort($name);
$arrayforsort=$name; $arrayforsort=$name;
} }
@ -174,7 +176,7 @@ if (sizeof($amount))
$arrayforsort=$amount; $arrayforsort=$amount;
} }
foreach($amount as $key=>$value) foreach($arrayforsort as $key=>$value)
{ {
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";

View File

@ -36,8 +36,8 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; $sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; $sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
if (! $sortorder) $sortorder="desc"; if (! $sortorder) $sortorder="asc";
if (! $sortfield) $sortfield="amount_ttc"; if (! $sortfield) $sortfield="nom";
// Sécurité accés client // Sécurité accés client
if ($user->societe_id > 0) $socidp = $user->societe_id; if ($user->societe_id > 0) $socidp = $user->societe_id;
@ -52,7 +52,8 @@ if ($modecompta=="CREANCES-DETTES")
{ {
$nom="Chiffre d'affaire par société"; $nom="Chiffre d'affaire par société";
$nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)'; $nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)';
$period='<a href='.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous()."</a> ".$langs->trans("Year")." ".$year.' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $period=$langs->trans("Year")." ".$year;
$periodlink='<a href='.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCADue"); $description=$langs->trans("RulesCADue");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -60,7 +61,8 @@ if ($modecompta=="CREANCES-DETTES")
else { else {
$nom="Chiffre d'affaire par société"; $nom="Chiffre d'affaire par société";
$nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)'; $nom.=' (Voir le rapport en <a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)';
$period='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous()."</a> ".$langs->trans("Year")." ".$year.' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $period=$langs->trans("Year")." ".$year;
$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCAIn"); $description=$langs->trans("RulesCAIn");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");

View File

@ -62,7 +62,8 @@ if ($modecompta=="CREANCES-DETTES")
{ {
$nom="Chiffre d'affaire"; $nom="Chiffre d'affaire";
$nom.=' (Voir le rapport <a href="index.php?year_start='.($year_start).'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)'; $nom.=' (Voir le rapport <a href="index.php?year_start='.($year_start).'&modecompta=RECETTES-DEPENSES">recettes-dépenses</a> pour n\'inclure que les factures effectivement payées)';
$period=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":""); $period="$year_start - $year_end";
$periodlink=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesCADue"); $description=$langs->trans("RulesCADue");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -70,7 +71,8 @@ if ($modecompta=="CREANCES-DETTES")
else { else {
$nom="Chiffre d'affaire"; $nom="Chiffre d'affaire";
$nom.=' (Voir le rapport en <a href="index.php?year_start='.($year_start).'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)'; $nom.=' (Voir le rapport en <a href="index.php?year_start='.($year_start).'&modecompta=CREANCES-DETTES">créances-dettes</a> pour inclure les factures non encore payée)';
$period=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":""); $period="$year_start - $year_end";
$periodlink=($year_start?"<a href='index.php?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='index.php?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
$description=$langs->trans("RulesCAIn"); $description=$langs->trans("RulesCAIn");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -156,7 +158,7 @@ print '<tr class="liste_titre"><td rowspan="2">'.$langs->trans("Month").'</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
print '<td align="center" width="10%" colspan="2"><a href="casoc.php?year='.$annee.'">'.$annee.'</a></td>'; print '<td align="center" width="10%" colspan="2"><a href="casoc.php?year='.$annee.'">'.$annee.'</a></td>';
print '<td width="15">&nbsp;</td>'; if ($annee != $year_end) print '<td width="15">&nbsp;</td>';
} }
print '</tr>'; print '</tr>';
@ -164,8 +166,8 @@ print '<tr class="liste_titre">';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
print '<td align="right">'.$langs->trans("AmountTTC").'</td>'; print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
print '<td align="center">'.$langs->trans("Delta").'</td>'; print '<td align="right">'.$langs->trans("Delta").'</td>';
print '<td width="15">&nbsp;</td>'; if ($annee != $year_end) print '<td width="15">&nbsp;</td>';
} }
print '</tr>'; print '</tr>';
@ -231,21 +233,21 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
} }
else else
{ {
print '<td align="center">'; print '<td align="right">';
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
else { print '&nbsp;'; } else { print '&nbsp;'; }
print '</td>'; print '</td>';
} }
$total[$annee]+=$cum[$case]; $total[$annee]+=$cum[$case];
print '<td width="15">&nbsp;</td>'; if ($annee != $year_end) print '<td width="15">&nbsp;</td>';
} }
print '</tr>'; print '</tr>';
} }
// Affiche total // Affiche total
print '<tr class="liste_total"><td>'.$langs->trans("Total").':</td>'; print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++) for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{ {
// Montant total // Montant total
@ -279,13 +281,13 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
} }
else else
{ {
print '<td align="center">'; print '<td align="right">';
if ($minyear <= $annee && $annee <= max($nowyear,$maxyear)) { print '-'; } if ($minyear <= $annee && $annee <= max($nowyear,$maxyear)) { print '-'; }
else { print '&nbsp;'; } else { print '&nbsp;'; }
print '</td>'; print '</td>';
} }
print '<td width="15">&nbsp;</td>'; if ($annee != $year_end) print '<td width="15">&nbsp;</td>';
} }
print "</tr>\n"; print "</tr>\n";
print "</table>"; print "</table>";

View File

@ -50,7 +50,6 @@ function llxHeader($head = "") {
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/prev.php","Prévisionnel"); $menu->add_submenu(DOL_URL_ROOT."/compta/stats/prev.php","Prévisionnel");
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/comp.php","Transformé"); $menu->add_submenu(DOL_URL_ROOT."/compta/stats/comp.php","Transformé");
} }
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/exercices.php","Evolution");
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/casoc.php",$langs->trans("ByCompanies")); $menu->add_submenu(DOL_URL_ROOT."/compta/stats/casoc.php",$langs->trans("ByCompanies"));
$menu->add_submenu(DOL_URL_ROOT."/compta/stats/cabyuser.php",$langs->trans("ByUsers")); $menu->add_submenu(DOL_URL_ROOT."/compta/stats/cabyuser.php",$langs->trans("ByUsers"));