diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index e48bc48e258..3435c54ef90 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -18,7 +18,6 @@
*
* $Id$
* $Source$
- *
*/
/**
@@ -293,6 +292,7 @@ if ($modecompta == 'CREANCES-DETTES')
if ($modecompta == 'CREANCES-DETTES') print "
".price($amount)." | \n";
print "".price($amount)." | \n";
print "\n";
+
// TVA à récupérer
$amount=0;
$sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm";
@@ -361,6 +361,7 @@ else
$i++;
}
}
+ $db->free($result);
} else {
dolibarr_print_error($db);
}
@@ -369,6 +370,7 @@ else
if ($modecompta == 'CREANCES-DETTES') print "".price($amount)." | \n";
print "".price($amount)." | \n";
print "\n";
+
// TVA récupérée
$amount=0;
$sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm";
@@ -397,13 +399,14 @@ else
$i++;
}
}
+ $db->free($result);
} else {
dolibarr_print_error($db);
}
print "|   | ";
print "".$langs->trans("VATCollected")." | \n";
- if ($modecompta == 'CREANCES-DETTES') print "".price($obj->amount)." | \n";
- print "".price($obj->amount)." | \n";
+ if ($modecompta == 'CREANCES-DETTES') print "".price($amount)." | \n";
+ print "".price($amount)." | \n";
print "
\n";
}
print '';