$newlang = GETPOST('lang_id', 'alpha'); } if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } $model = $object->modelpdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } $object->update_totaux_del($object_ligne->total_ht, $object_ligne->total_tva); header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $_GET['id']); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } } if ($action == "updateligne") { $object = new ExpenseReport($db); $object->fetch($id); $rowid = $_POST['rowid']; $type_fees_id = GETPOST('fk_c_type_fees'); $object_ligne->vatrate = price2num(GETPOST('vatrate')); $projet_id = $fk_projet; $comments = GETPOST('comments'); $qty = GETPOST('qty');