diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 7bc99977943..27722c29ed4 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -966,8 +966,12 @@ if ($action == 'create') if (!empty($conf->productbatch->enabled)) { print ''.$langs->trans("batch_number").''; - print ''.$langs->trans("EatByDate").''; - print ''.$langs->trans("SellByDate").''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''.$langs->trans("EatByDate").''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print ''.$langs->trans("SellByDate").''; + } } print "\n"; } @@ -1114,12 +1118,16 @@ if ($action == 'create') if (!empty($product->status_batch)) { print ''; - print ''; - print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc'.$indiceAsked, '', '', 1, ""); - print ''; - print ''; - print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo'.$indiceAsked, '', '', 1, ""); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''; + print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc'.$indiceAsked, '', '', 1, ""); + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print ''; + print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo'.$indiceAsked, '', '', 1, ""); + print ''; + } } else { print ''; } @@ -1807,10 +1815,14 @@ if ($action == 'create') if ($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)) { print '
'; - print $langs->trans('EatByDate').' : '; - print $form->selectDate($lines[$i]->eatby, 'dlc'.$line_id, '', '', 1, "").'
'; - print $langs->trans('SellByDate').' : '; - print $form->selectDate($lines[$i]->sellby, 'dluo'.$line_id, '', '', 1, ""); + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print $langs->trans('EatByDate').' : '; + print $form->selectDate($lines[$i]->eatby, 'dlc'.$line_id, '', '', 1, "").'
'; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print $langs->trans('SellByDate').' : '; + print $form->selectDate($lines[$i]->sellby, 'dluo'.$line_id, '', '', 1, ""); + } print ''; } print ''; @@ -1856,11 +1868,14 @@ if ($action == 'create') $detail = ''; if ($lines[$i]->product->status_batch) { - $detail .= $langs->trans("Batch").': '.$lines[$i]->batch; + $detail .= $langs->trans("Batch").': '.$lines[$i]->batch; + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($lines[$i]->sellby, "day"); + } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($lines[$i]->eatby, "day"); - - $detail .= '
'; + } + $detail .= '
'; print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $detail); } else {