예제 #1
0
            dol_print_error($db);
        }
    } else {
        if ($action == 'deletecontact' && $user->rights->propale->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);
            }
        } else {
            if ($action == 'setaddress' && $user->rights->propale->creer) {
                $object->fetch($id);
                $result = $object->setDeliveryAddress($_POST['fk_address']);
                if ($result < 0) {
                    dol_print_error($db, $object->error);
                }
            }
        }
    }
}
/*
 * View
 */
llxHeader('', $langs->trans("Proposal"), "Propal");
$form = new Form($db);
$formcompany = new FormCompany($db);
$formother = new FormOther($db);
/* *************************************************************************** */