diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php
index f34981a12cc..5f90c8907e6 100644
--- a/htdocs/compta/tva/index.php
+++ b/htdocs/compta/tva/index.php
@@ -71,10 +71,10 @@ function pt ($db, $sql, $date) {
$result = $db->query($sql);
if ($result) {
- $num = $db->num_rows();
+ $num = $db->num_rows($result);
$i = 0;
$total = 0 ;
- print "
";
+ print "";
print "";
print "| $date | ";
print "".$langs->trans("Amount")." | ";
@@ -93,15 +93,16 @@ function pt ($db, $sql, $date) {
$i++;
}
- print "
| ".$langs->trans("TotalHT")." : | ".price($total)." | euros |
";
+ print "| ".$langs->trans("TotalHT")." : | ".price($total)." | euros |
";
print "
";
- $db->free();
+ $db->free($result);
} else {
dolibar_print_error($db);
}
}
+
/*
*
*/
@@ -122,7 +123,7 @@ if ($year == 0 ) {
$textprevyear="".img_previous()."";
$textnextyear=" ".img_next()."";
-print_fiche_titre($langs->trans("VAT")." : ".price($tva->solde($year_start)),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear");
+print_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear");
echo '';
@@ -136,7 +137,7 @@ for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) {
echo '';
- print "";
+ print "";
print "";
print "| ".$langs->trans("Year")." $y | ";
print "".$langs->trans("VATToCollect")." | ";
@@ -168,12 +169,12 @@ for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) {
$i++;
if ($i > 2) {
- print ' | '.$langs->trans("SubTotal").': | '.price($subtotal).' | '.price($subtotal * 0.8).' | ';
+ print ' | '.$langs->trans("SubTotal").': | '.price($subtotal).' | '.price($subtotal * 0.8).' | ';
$i = 0;
$subtotal = 0;
}
}
- print ' | '.$langs->trans("Total").': | '.price($total).' | ';
+ print ' | '.$langs->trans("Total").': | '.price($total).' | ';
print " | \n";
print " ";
@@ -184,8 +185,6 @@ for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) {
/*
* Réglée
*/
-// print "";
-// print "| ";
$sql = "SELECT amount, 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' ";
@@ -200,14 +199,11 @@ for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) {
}
-
-
-
echo ' | ';
$db->close();
-llxFooter("Dernière modification $Date$ révision $Revision$");
+llxFooter('$Date$ - $Revision$');
?>
|