$mesg = '<div class="error">' . $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType") . '</div>'; } else { $mesg = '<div class="error">' . $object->error . '</div>'; } } } else { if ($action == 'swapstatut' && $user->rights->facture->creer) { if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); } else { dol_print_error($db); } } else { if ($action == 'deletecontact' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->delete_contact($lineid); if ($result >= 0) { Header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit; } else { dol_print_error($db); } } } } /* * View */ llxHeader('', $langs->trans("Bill"), "Facture"); $form = new Form($db); $formcompany = new FormCompany($db);
{ dol_print_error($db, "result=$result"); $db->rollback(); } } else { dol_print_error($db); } } // Efface un contact if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer) { $facture = new Facture($db); $facture->fetch($_GET["facid"]); $result = $facture->delete_contact($_GET["lineid"]); if ($result >= 0) { Header("Location: contact.php?facid=".$facture->id); exit; } else { dol_print_error($db); } } /* * View */