fix ajax product missing condigtion

This commit is contained in:
Florian HENRY 2021-02-08 11:54:29 +01:00
parent 1e8117dc8a
commit c0c6047538

View File

@ -82,14 +82,10 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
$found = false; $found = false;
$price_level = 1; $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 = new Societe($db);
$thirdpartytemp->fetch($socid); $thirdpartytemp->fetch($socid);
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
$price_level = $thirdpartytemp->price_level;
}
//Load translation description and label //Load translation description and label
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$newlang = $thirdpartytemp->default_lang; $newlang = $thirdpartytemp->default_lang;
@ -104,6 +100,10 @@ if (!empty($action) && $action == 'fetch' && !empty($id))
$outlabel_trans = $object->label; $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 // Price by qty