From 32d641b66b54bad7589f321292bc0e875640c1bc Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Thu, 28 Apr 2016 11:12:04 +0200 Subject: [PATCH] Bug show product if no accounting enabled --- htdocs/product/card.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 841d1b1b73a..23ce2ba7f11 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1476,24 +1476,24 @@ else } // Accountancy sell code - print ''; - print ''; - print '
'; - print $langs->trans("ProductAccountancySellCode"); - print '
'; - print ''; - print length_accountg($object->accountancy_code_sell); - print ''; + if (! empty($conf->accounting->enabled)){ + print ''; + print $langs->trans("ProductAccountancySellCode"); + print ''; + print length_accountg($object->accountancy_code_sell); + print ''; + } + // Accountancy buy code - print ''; - print ''; - print '
'; - print $langs->trans("ProductAccountancyBuyCode"); - print '
'; - print ''; - print length_accountg($object->accountancy_code_buy); - print ''; + if (! empty($conf->accounting->enabled)){ + print ''; + print $langs->trans("ProductAccountancyBuyCode"); + print ''; + print length_accountg($object->accountancy_code_buy); + print ''; + } + // Status (to sell) /*