Update card.php

This commit is contained in:
Frédéric FRANCE 2022-12-12 11:55:43 +01:00 committed by GitHub
parent 64a686aad4
commit 799b8b8e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1959,6 +1959,16 @@ if ($action == 'create') {
$reslot = $productlot->fetch(0, $lines[$i]->fk_product, $lines[$i]->batch);
if ($reslot > 0) {
$detail = $productlot->getNomUrl(1);
} else {
// lot is not created and info is only in reception lines
$batchinfo = $langs->trans("Batch").': '.$lines[$i]->batch;
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
$batchinfo .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($lines[$i]->sellby, "day");
}
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
$batchinfo .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($lines[$i]->eatby, "day");
}
$detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo);
}
}
print $detail . '</td>';