diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php
index 38eedc8b546..bb3ab1710d6 100644
--- a/htdocs/compta/tva/index.php
+++ b/htdocs/compta/tva/index.php
@@ -186,9 +186,9 @@ function pt ($db, $sql, $date)
$var=!$var;
print "
";
print "| $obj->dm | \n";
- $total = $total + $obj->amount;
+ $total = $total + $obj->mm;
- print "".price($obj->amount)." | ".$total." | \n";
+ print "".price($obj->mm)." | | \n";
print "
\n";
$i++;
@@ -234,6 +234,7 @@ print "".$langs->trans("Year")." $y | ";
print "".$langs->trans("VATToPay")." | ";
print "".$langs->trans("VATToCollect")." | ";
print "".$langs->trans("TotalToPay")." | ";
+print " | \n";
print "\n";
if ($conf->compta->mode == "CREANCES-DETTES")
@@ -261,11 +262,12 @@ if ($conf->compta->mode == "CREANCES-DETTES")
$subtotal = $subtotal + $diff;
print "".price($diff)." | \n";
+ print " | \n";
print "\n";
$i++;
if ($i > 2) {
- print '| '.$langs->trans("SubTotal").': | '.price($subtotal).' |
';
+ print '| '.$langs->trans("SubTotal").': | '.price($subtotal).' | |
';
$i = 0;
$subtotal = 0;
}
@@ -291,9 +293,9 @@ echo ' | ';
* Réglée
*/
-$sql = "SELECT SUM(amount), date_format(f.datev,'%Y-%m') as dm";
+$sql = "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm";
$sql .= " FROM ".MAIN_DB_PREFIX."tva as f WHERE f.datev >= '$y-01-01' AND f.datev <= '$y-12-31' ";
-$sql .= " GROUP BY dm DESC";
+$sql .= " GROUP BY dm ASC";
pt($db, $sql,$langs->trans("Year")." $y");
|