if ($result > 0) { $db->commit(); header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } else { dol_print_error($db, $object->error); $db->rollback(); } } $action = ''; } if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") { $object = new ExpenseReport($db); $object->fetch($id); $object_ligne = new ExpenseReportLine($db); $object_ligne->fetch(GETPOST("rowid")); $total_ht = $object_ligne->total_ht; $total_tva = $object_ligne->total_tva; $result = $object->deleteline(GETPOST("rowid")); if ($result >= 0) { if ($result > 0) { // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $newlang = ''; if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) { $newlang = GETPOST('lang_id', 'alpha'); } if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; }