diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index d9d46592534..4800e934b0b 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1360,8 +1360,12 @@ if ($id > 0 || ! empty($ref))
print '
';
$result = $propal->getLinesArray();
- $propal->print_title_list();
- $propal->printLinesList();
+
+ if (!empty($propal->lines))
+ {
+ $propal->print_title_list();
+ $propal->printLinesList();
+ }
/*
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index ebc6fdf4c6e..d32de3c539d 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1644,8 +1644,12 @@ else
print '';
$result = $commande->getLinesArray();
- $commande->print_title_list();
- $commande->printLinesList();
+
+ if (!empty($commande->lines))
+ {
+ $commande->print_title_list();
+ $commande->printLinesList();
+ }
$numlines=sizeof($commande->lines);