Merge pull request #971 from cbattarel/3.3
fix wrong construction of description when creating from orders
This commit is contained in:
commit
d5d4bc33ba
@ -195,8 +195,6 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
|||||||
// service prédéfini
|
// service prédéfini
|
||||||
if ($lines[$i]->fk_product > 0)
|
if ($lines[$i]->fk_product > 0)
|
||||||
{
|
{
|
||||||
$product_static = new Product($db);
|
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
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))
|
||||||
{
|
{
|
||||||
@ -219,15 +217,8 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
|||||||
$label = $lines[$i]->product_label;
|
$label = $lines[$i]->product_label;
|
||||||
}
|
}
|
||||||
|
|
||||||
$product_static->type=$lines[$i]->fk_product_type;
|
$desc = $label;
|
||||||
$product_static->id=$lines[$i]->fk_product;
|
|
||||||
$product_static->ref=$lines[$i]->ref;
|
|
||||||
$product_static->libelle=$label;
|
|
||||||
$desc=$product_static->getNomUrl(0);
|
|
||||||
$desc.= ' - '.$label;
|
|
||||||
$desc .= ' ('.$langs->trans('Quantity').': '.$lines[$i]->qty.')';
|
$desc .= ' ('.$langs->trans('Quantity').': '.$lines[$i]->qty.')';
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
|
||||||
$desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?'<br>'.dol_htmlentitiesbr($lines[$i]->desc):'';
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$desc = dol_htmlentitiesbr($lines[$i]->desc);
|
$desc = dol_htmlentitiesbr($lines[$i]->desc);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user