diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index 598320bfd63..495fb2a1304 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -259,10 +259,10 @@ if ($result)
print '
';
print '' . $langs->trans('Options') . ' ' . $langs->trans('Description') . ' ';
print " \n";
- print ' ' . $langs->trans('OptionModeProductSell') . ' ';
+ print ' ' . $langs->trans('OptionModeProductSell') . ' ';
print '' . nl2br($langs->trans('OptionModeProductSellDesc'));
print " \n";
- print ' ' . $langs->trans('OptionModeProductBuy') . ' ';
+ print ' ' . $langs->trans('OptionModeProductBuy') . ' ';
print '' . nl2br($langs->trans('OptionModeProductBuyDesc')) . " \n";
print "\n";
@@ -284,7 +284,7 @@ if ($result)
print '';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
+ if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
/*
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
print_liste_field_titre($langs->trans("Accountancy_code_buy"));
@@ -301,7 +301,7 @@ if ($result)
print ' ';
print ' ';
print ' ';
- print ' ';
+ if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ' ';
print '';
$searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1);
print $searchpitco;
@@ -340,23 +340,33 @@ if ($result)
print ' ';
print " ";
- print '';
+
+ print ' ';
+
// Ref produit as link
$product_static->ref = $obj->ref;
$product_static->id = $obj->rowid;
$product_static->type = $obj->type;
+ $product_static->label = $obj->label;
+ $product_static->description = $obj->description;
+
print '';
if ($product_static->id)
print $product_static->getNomUrl(1);
else
print '- ';
print ' ';
- print '' . dol_trunc($obj->label, 24) . ' ';
- // TODO ADJUST DESCRIPTION SIZE
- // print '' . $obj->description . ' ';
- // TODO: we shoul set a user defined value to adjust user square / wide screen size
- $trunclengh = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 64;
- print '' . nl2br(dol_trunc($obj->description, $trunclengh)) . ' ';
+
+ print ''.$obj->label.' ';
+
+ if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC))
+ {
+ // TODO ADJUST DESCRIPTION SIZE
+ // print '' . $obj->description . ' ';
+ // TODO: we shoul set a user defined value to adjust user square / wide screen size
+ $trunclengh = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 64;
+ print '' . nl2br(dol_trunc($obj->description, $trunclengh)) . ' ';
+ }
// Accounting account buy
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {