From 8ac5bd4228a117585e3ecaeb9dfdbf6823daa767 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Fri, 12 Aug 2022 15:20:25 +0200 Subject: [PATCH] NEW show sell-by and eat-by dates only if not empty --- htdocs/expedition/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index dd41274e81a..52b78aa1e5c 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1315,10 +1315,10 @@ if ($action == 'create') { $detail = ''; $detail .= $langs->trans("Batch").': '.$dbatch->batch; - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + if (empty($conf->global->PRODUCT_DISABLE_SELLBY) && !empty($dbatch->sellby)) { $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); } - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + if (empty($conf->global->PRODUCT_DISABLE_EATBY) && !empty($dbatch->eatby)) { $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); } $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; @@ -1526,10 +1526,10 @@ if ($action == 'create') { } else { print 'TableLotIncompleteRunRepairWithParamStandardEqualConfirmed'; } - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + if (empty($conf->global->PRODUCT_DISABLE_SELLBY) && !empty($dbatch->sellby)) { print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); } - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + if (empty($conf->global->PRODUCT_DISABLE_EATBY) && !empty($dbatch->eatby)) { print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); } print ' ('.$dbatch->qty.')';