diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 66dce26991e..9bae9de458b 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -154,10 +154,10 @@ if ($_POST["action"] == 'add')
}
}
}
+
/*
* Commande
*/
-
if ($_POST["commandeid"])
{
$facture->commandeid = $_POST["commandeid"];
@@ -200,6 +200,7 @@ if ($_POST["action"] == 'add')
}
}
}
+
/*
*
*/
@@ -838,11 +839,12 @@ else
$sql .= " ORDER BY dp DESC";
$result = $db->query($sql);
+
if ($result)
{
$num = $db->num_rows();
$i = 0; $total = 0;
- print '
';
+ print '';
print '| Date | '.$langs->trans("Type").' | ';
print ''.$langs->trans("Amount").' | |
';
@@ -1172,7 +1174,7 @@ else
{
$encfile = urlencode($file);
print_titre("Documents");
- print '';
+ print '';
print "| Facture PDF | ";
@@ -1255,7 +1257,7 @@ else
print "