diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php
index 26fe032368e..a0a9b7d78d6 100644
--- a/htdocs/compta/paiement/fiche.php
+++ b/htdocs/compta/paiement/fiche.php
@@ -173,11 +173,6 @@ if ($db->query($sql))
}
}
$var=!$var;
- print "
";
- print '| | ';
- print ''.$langs->trans("Total").' | ';
- print ''.price($total).' | | ';
- print "
\n";
print "\n";
$db->free();
diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index 4ac782debb9..ce9ec0752be 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -53,7 +53,8 @@ if ($modecompta=="CREANCES-DETTES")
{
$nom="Bilan des recettes et dépenses, détail";
$nom.=' (Voir le rapport en recettes-dépenses pour n\'inclure que les factures effectivement payées)';
- $period=''.img_previous()." ".$langs->trans("Year")." ".$year.' '.img_next().'';
+ $period=$langs->trans("Year")." ".$year;
+ $periodlink=''.img_previous().' '.img_next().'';
$description=$langs->trans("RulesResultDue");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -61,7 +62,8 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom="Bilan des recettes et dépenses, détail";
$nom.=' (Voir le rapport en créances-dettes pour inclure les factures non encore payée)';
- $period=''.img_previous()." ".$langs->trans("Year")." ".$year.' '.img_next().'';
+ $period=$langs->trans("Year")." ".$year;
+ $periodlink=''.img_previous().' '.img_next().'';
$description=$langs->trans("RulesResultInOut");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -429,7 +431,7 @@ $subtotal_ht = 0;
$subtotal_ttc = 0;
if ($result) {
$num = $db->num_rows($result);
- $var=false;
+ $var=true;
$i = 0;
if ($num) {
while ($i < $num) {
@@ -532,7 +534,7 @@ print '';
print '| | ';
print '
';
-print '| Résultat | ';
+print '
| '.$langs->trans("Profit").' | ';
if ($modecompta == 'CREANCES-DETTES') print ''.price($total_ht).' | ';
print ''.price($total_ttc).' | ';
print '
';
diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php
index ba8f39c7f1b..83d686a0fd5 100644
--- a/htdocs/compta/resultat/index.php
+++ b/htdocs/compta/resultat/index.php
@@ -61,7 +61,8 @@ if ($modecompta=="CREANCES-DETTES")
{
$nom="Bilan des recettes et dépenses, résumé annuel";
$nom.=' (Voir le rapport recettes-dépenses pour n\'inclure que les factures effectivement payées)';
- $period=($year_start?"".img_previous()." ".img_next()."":"");
+ $period="$year_start - $year_end";
+ $periodlink=($year_start?"".img_previous()." ".img_next()."":"");
$description=$langs->trans("RulesResultDue");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -69,7 +70,8 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom="Bilan des recettes et dépenses, résumé annuel";
$nom.=' (Voir le rapport en créances-dettes pour inclure les factures non encore payée)';
- $period=($year_start?"".img_previous()." ".img_next()."":"");
+ $period="$year_start - $year_end";
+ $periodlink=($year_start?"".img_previous()." ".img_next()."":"");
$description=$langs->trans("RulesResultInOut");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -383,7 +385,8 @@ print '';
print '';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
- print '| '.$langs->trans("Income").' | '.$langs->trans("Outcome").' | ';
+ print ''.$langs->trans("Outcome").' | ';
+ print ''.$langs->trans("Income").' | ';
}
print '
';
@@ -395,6 +398,15 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
print "".strftime("%B",mktime(1,1,1,$mois,1,$annee))." | ";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
+ print ' ';
+ $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 " | ";
+
print ' ';
$case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
if ($encaiss_ttc[$case]>0)
@@ -404,14 +416,6 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
}
print " | ";
- print ' ';
- $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 " | ";
}
print '';
@@ -419,20 +423,27 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
// Total
$var=!$var;
+$nbcols=0;
print '| '.$langs->trans("TotalTTC").' | ';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
- print ''.(isset($totentrees[$annee])?price($totentrees[$annee]):' ').' | ';
- print ''.(isset($totsorties[$annee])?price($totsorties[$annee]):' ').' | ';
+ $nbcols+=2;
+ print ''.(isset($totsorties[$annee])?price($totsorties[$annee]):' ').' | ';
+ print ''.(isset($totentrees[$annee])?price($totentrees[$annee]):' ').' | ';
}
print "
\n";
+// Ligne vierge
+print '| | ';
+print ' | ';
+print "
\n";
+
// Balance
$var=!$var;
print '| '.$langs->trans("Profit").' | ';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
- print ' ';
+ print ' | ';
if (isset($totentrees[$annee]) || isset($totsorties[$annee])) {
print price($totentrees[$annee]-$totsorties[$annee]).' | ';
// print ' | ';
diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php
index 2fc13e75326..ea25de2c43a 100644
--- a/htdocs/compta/stats/cabyuser.php
+++ b/htdocs/compta/stats/cabyuser.php
@@ -37,8 +37,8 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
-if (! $sortorder) $sortorder="desc";
-if (! $sortfield) $sortfield="amount_ttc";
+if (! $sortorder) $sortorder="asc";
+if (! $sortfield) $sortfield="name";
// Sécurité accés client
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.=' (Voir le rapport recettes-dépenses pour n\'inclure que les factures effectivement payées)';
- $period="".img_previous()." ".$langs->trans("Year")." $year ".img_next()."";
+ $period=$langs->trans("Year")." $year";
+ $periodlink="".img_previous()." ".img_next()."";
$description=$langs->trans("RulesCADue");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -62,7 +63,8 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom="Chiffre d'affaire par utilisateur, auteur de la facture";
$nom.=' (Voir le rapport en créances-dettes pour inclure les factures non encore payée)';
- $period="".img_previous()." ".$langs->trans("Year")." $year ".img_next()."";
+ $period=$langs->trans("Year")." $year";
+ $periodlink="".img_previous()." ".img_next()."";
$description=$langs->trans("RulesCAIn");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -157,11 +159,11 @@ if (sizeof($amount))
$arrayforsort=$name;
// On définit tableau arrayforsort
- if ($sortfield == 'nom' && $sortorder == 'asc') {
+ if ($sortfield == 'name' && $sortorder == 'asc') {
asort($name);
$arrayforsort=$name;
}
- if ($sortfield == 'nom' && $sortorder == 'desc') {
+ if ($sortfield == 'name' && $sortorder == 'desc') {
arsort($name);
$arrayforsort=$name;
}
@@ -174,7 +176,7 @@ if (sizeof($amount))
$arrayforsort=$amount;
}
- foreach($amount as $key=>$value)
+ foreach($arrayforsort as $key=>$value)
{
$var=!$var;
print "
";
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index 8d9ead856ef..1a9545a4424 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -36,8 +36,8 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
-if (! $sortorder) $sortorder="desc";
-if (! $sortfield) $sortfield="amount_ttc";
+if (! $sortorder) $sortorder="asc";
+if (! $sortfield) $sortfield="nom";
// Sécurité accés client
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.=' (Voir le rapport en recettes-dépenses pour n\'inclure que les factures effectivement payées)';
- $period=''.img_previous()." ".$langs->trans("Year")." ".$year.' '.img_next().'';
+ $period=$langs->trans("Year")." ".$year;
+ $periodlink=''.img_previous().' '.img_next().'';
$description=$langs->trans("RulesCADue");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -60,7 +61,8 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom="Chiffre d'affaire par société";
$nom.=' (Voir le rapport en créances-dettes pour inclure les factures non encore payée)';
- $period=''.img_previous()." ".$langs->trans("Year")." ".$year.' '.img_next().'';
+ $period=$langs->trans("Year")." ".$year;
+ $periodlink=''.img_previous().' '.img_next().'';
$description=$langs->trans("RulesCAIn");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php
index 910a41bc860..8d7d9aa4563 100644
--- a/htdocs/compta/stats/index.php
+++ b/htdocs/compta/stats/index.php
@@ -62,7 +62,8 @@ if ($modecompta=="CREANCES-DETTES")
{
$nom="Chiffre d'affaire";
$nom.=' (Voir le rapport recettes-dépenses pour n\'inclure que les factures effectivement payées)';
- $period=($year_start?"".img_previous()." ".img_next()."":"");
+ $period="$year_start - $year_end";
+ $periodlink=($year_start?"".img_previous()." ".img_next()."":"");
$description=$langs->trans("RulesCADue");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -70,7 +71,8 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom="Chiffre d'affaire";
$nom.=' (Voir le rapport en créances-dettes pour inclure les factures non encore payée)';
- $period=($year_start?"".img_previous()." ".img_next()."":"");
+ $period="$year_start - $year_end";
+ $periodlink=($year_start?"".img_previous()." ".img_next()."":"");
$description=$langs->trans("RulesCAIn");
$builddate=time();
$exportlink=$langs->trans("NotYetAvailable");
@@ -156,7 +158,7 @@ print '
| '.$langs->trans("Month").' | ';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
print ''.$annee.' | ';
- print ' | ';
+ if ($annee != $year_end) print ' | ';
}
print '
';
@@ -164,8 +166,8 @@ print '';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
print '| '.$langs->trans("AmountTTC").' | ';
- print ''.$langs->trans("Delta").' | ';
- print ' | ';
+ print ''.$langs->trans("Delta").' | ';
+ if ($annee != $year_end) print ' | ';
}
print '
';
@@ -231,21 +233,21 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
}
else
{
- print '';
+ print ' | ';
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
else { print ' '; }
print ' | ';
}
$total[$annee]+=$cum[$case];
- print ' | ';
+ if ($annee != $year_end) print ' | ';
}
print '';
}
// Affiche total
-print '| '.$langs->trans("Total").': | ';
+print '
| '.$langs->trans("Total").' | ';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
// Montant total
@@ -279,13 +281,13 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
}
else
{
- print '';
+ print ' | ';
if ($minyear <= $annee && $annee <= max($nowyear,$maxyear)) { print '-'; }
else { print ' '; }
print ' | ';
}
- print ' | ';
+ if ($annee != $year_end) print ' | ';
}
print "
\n";
print "";
diff --git a/htdocs/compta/stats/pre.inc.php b/htdocs/compta/stats/pre.inc.php
index cb8d5bd93f8..204b68065ae 100644
--- a/htdocs/compta/stats/pre.inc.php
+++ b/htdocs/compta/stats/pre.inc.php
@@ -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/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/cabyuser.php",$langs->trans("ByUsers"));