From 0e75b4e9c76cfaed8592360000c2f814fe5907eb Mon Sep 17 00:00:00 2001 From: Adrien Raze Date: Mon, 2 May 2022 10:14:06 +0200 Subject: [PATCH] =?UTF-8?q?FIX=20:=20GetnomURL=20sur=20les=20num=C3=A9ro?= =?UTF-8?q?=20de=20lot/s=C3=A9rie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/inventory/inventory.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 48f9c83513f..6454bca8a27 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -28,6 +28,7 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php'; include_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; // Load translation files required by the page $langs->loadLangs(array("stocks", "other", "productbatch")); @@ -1023,7 +1024,13 @@ if ($object->id > 0) { if (!empty($conf->productbatch->enabled)) { print ''; - print dol_escape_htmltag($obj->batch); + $batch_static = new Productlot($db); + $res = $batch_static->fetch(0, $product_static->id, $obj->batch); + if($res){ + print $batch_static->getNomUrl(1); + } else { + print dol_escape_htmltag($obj->batch); + } print ''; }