From d65e3c22808eaf594a9754bf1ac07373babeadf1 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Tue, 7 Sep 2010 14:42:50 +0000
Subject: [PATCH] Works on module hook integration

---
 htdocs/comm/propal.php    | 8 ++++++--
 htdocs/commande/fiche.php | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

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 '<table class="noborder" width="100%">';
 	
 	$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 '<table class="noborder" width="100%">';
 			
 			$result = $commande->getLinesArray();
-			$commande->print_title_list();
-			$commande->printLinesList();
+			
+			if (!empty($commande->lines))
+			{
+				$commande->print_title_list();
+				$commande->printLinesList();
+			}
 
 			$numlines=sizeof($commande->lines);
 
-- 
GitLab