From 4e14f6913abb4b44b8d314d29500b6b2fd2d145c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 29 Jan 2015 14:22:13 +0100 Subject: [PATCH 1/2] Fix contract if only service modules is enabled --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index f27d47f2dd5..e3f6c0efeb9 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1237,7 +1237,7 @@ else * Lines of contracts */ - if ($conf->product->enabled) { + if ($conf->product->enabled || $conf->service->enabled) { $productstatic=new Product($db); } From 44a2bef29d919c70ce47258cdbae1a9458d840ea Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 30 Jan 2015 11:31:04 +0100 Subject: [PATCH 2/2] Better syntax in contract card --- htdocs/contrat/card.php | 2 +- htdocs/contrat/class/index.html | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 htdocs/contrat/class/index.html diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index e3f6c0efeb9..b2b99a9dde3 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1306,7 +1306,7 @@ else $productstatic->ref=$objp->label; print $productstatic->getNomUrl(0,'',16); } - if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description) + if (! empty($conf->global->PRODUIT_DESC_IN_FORM) && !empty($objp->description)) print '
'.dol_nl2br($objp->description); print ''; } diff --git a/htdocs/contrat/class/index.html b/htdocs/contrat/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000