diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 94ace4ab64f..621d6421d2d 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -2307,8 +2307,12 @@ if ($action == 'create')
foreach ($lines[$i]->detail_batch as $dbatch) // $dbatch is instance of ExpeditionLineBatch
{
$detail .= $langs->trans("Batch").': '.$dbatch->batch;
- $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
- $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
+ if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
+ $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day");
+ }
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day");
+ }
$detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty;
$detail .= '
';
}
diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php
index f43ccd3dcd4..e281d45ee74 100644
--- a/htdocs/mrp/mo_movements.php
+++ b/htdocs/mrp/mo_movements.php
@@ -143,6 +143,12 @@ $arrayfields = array(
//'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
//'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500)
);
+if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ unset($arrayfields['pl.eatby']);
+}
+if (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
+ unset($arrayfields['pl.sellby']);
+}
$objectlist->fields = dol_sort_array($objectlist->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php
index fc43d5e8ce3..5a7cd3b2d3d 100644
--- a/htdocs/product/stock/index.php
+++ b/htdocs/product/stock/index.php
@@ -159,8 +159,12 @@ if ($resql)
if (!empty($conf->productbatch->enabled))
{
print '