Merge pull request #14359 from atm-quentin/FIX_missing_conf_on_supplier_order
FIX Missing PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE conf in supplier order
This commit is contained in:
commit
f11accf4c2
@ -460,11 +460,26 @@ if (empty($reshook))
|
||||
if ($idprod > 0)
|
||||
{
|
||||
$label = $productsupplier->label;
|
||||
|
||||
// Define output language
|
||||
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if (empty($newlang) && GETPOST('lang_id', 'aZ09'))
|
||||
$newlang = GETPOST('lang_id', 'aZ09');
|
||||
if (empty($newlang))
|
||||
$newlang = $object->thirdparty->default_lang;
|
||||
if (!empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$desc = (!empty($productsupplier->multilangs [$outputlangs->defaultlang] ["description"])) ? $productsupplier->multilangs [$outputlangs->defaultlang] ["description"] : $productsupplier->description;
|
||||
} else {
|
||||
$desc = $productsupplier->description;
|
||||
}
|
||||
// if we use supplier description of the products
|
||||
if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) {
|
||||
$desc = $productsupplier->desc_supplier;
|
||||
} else $desc = $productsupplier->description;
|
||||
}
|
||||
|
||||
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user