From f869034c8cfd808c8ae47fbee18939a2a437fc4e Mon Sep 17 00:00:00 2001 From: omogenot Date: Wed, 23 Oct 2024 21:00:56 +0200 Subject: [PATCH] FIX: Make html form warehouse select filter between closed and opened work if const ENTREPOT_EXTRA_STATUS not set (#31508) * Update html.formproduct.class.php Fix filter status variable that is reset if global constant ENTREPOT_EXTRA_STATUS is not set. This prevents the warehouse list to display only opened or closed warehouse is the global const is not set. * Update html.formproduct.class.php Fix typo --- htdocs/product/class/html.formproduct.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 8b45888d3ea..98051f76b42 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -298,7 +298,7 @@ class FormProduct dol_syslog(get_class($this)."::selectWarehouses " . (is_array($selected) ? 'selected is array' : $selected) . ", $htmlname, $filterstatus, $empty, $disabled, $fk_product, $empty_label, $showstock, $forcecombo, $morecss", LOG_DEBUG); $out = ''; - if (!getDolGlobalString('ENTREPOT_EXTRA_STATUS')) { + if ((!getDolGlobalString('ENTREPOT_EXTRA_STATUS')) && ($filterstatus==="warehouseinternal")) { $filterstatus = ''; } if (!empty($fk_product) && $fk_product > 0) {