} if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } $label = !empty($prod->multilangs[$outputlangs->defaultlang]["libelle"]) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label; } else { $label = $lines[$i]->product_label; } if ($conf->global->PRODUIT_DESC_IN_FORM) { $desc .= $lines[$i]->desc && $lines[$i]->desc != $lines[$i]->libelle ? dol_htmlentitiesbr($lines[$i]->desc) : ''; } } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); } $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start = 0, $date_end = 0, 'HT', 0, $lines[$i]->info_bits, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht); if ($result < 0) { $error++; break; } } } } else { $mesg = $srcobject->error; $error++; } } else { $mesg = $object->error; $error++; } } else {