From 31452dad428012807b9fed1e3dc860875b9945a7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Oct 2019 19:34:28 +0200 Subject: [PATCH] NEW Beautify the select of warehouses --- htdocs/product/class/html.formproduct.class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 7b63fbd3c8c..87748643c04 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -455,12 +455,20 @@ class FormProduct { if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) { + $label=$arraytypes['entrepot_label'].' - '; + $label.=$arraytypes['batch']; + if ($arraytypes['qty'] <= 0) { + $label.=' ('.$langs->trans("Stock").' '.$arraytypes['qty'].')'; + } + else { + $label.=' ('.$langs->trans("Stock").' '.$arraytypes['qty'].')'; + } + $out.=''; } }