From c0c60475388dbabe272fae177ce6532e3304723d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 8 Feb 2021 11:54:29 +0100 Subject: [PATCH] fix ajax product missing condigtion --- htdocs/product/ajax/products.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 5b297cb33a5..89e9419fec0 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -82,14 +82,10 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) $found = false; $price_level = 1; - if ($socid > 0 && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { + if ($socid > 0 ) { $thirdpartytemp = new Societe($db); $thirdpartytemp->fetch($socid); - if (!empty($conf->global->PRODUIT_MULTIPRICES)) { - $price_level = $thirdpartytemp->price_level; - } - //Load translation description and label if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $newlang = $thirdpartytemp->default_lang; @@ -104,6 +100,10 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) $outlabel_trans = $object->label; } } + + if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + $price_level = $thirdpartytemp->price_level; + } } // Price by qty