Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts: htdocs/core/class/commondocgenerator.class.php
This commit is contained in:
commit
30560397e4
@ -459,11 +459,26 @@ if (empty($reshook))
|
|||||||
if ($idprod > 0)
|
if ($idprod > 0)
|
||||||
{
|
{
|
||||||
$label = $productsupplier->label;
|
$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 we use supplier description of the products
|
||||||
if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) {
|
if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) {
|
||||||
$desc = $productsupplier->desc_supplier;
|
$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));
|
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||||
|
|
||||||
|
|||||||
@ -78,6 +78,7 @@ $cancel != $langs->trans("Cancel") &&
|
|||||||
$object->label = $_POST["libelle"];
|
$object->label = $_POST["libelle"];
|
||||||
$object->description = dol_htmlcleanlastbr($_POST["desc"]);
|
$object->description = dol_htmlcleanlastbr($_POST["desc"]);
|
||||||
$object->other = dol_htmlcleanlastbr($_POST["other"]);
|
$object->other = dol_htmlcleanlastbr($_POST["other"]);
|
||||||
|
$object->update($object->id, $user);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user