コード例 #1
0
ファイル: fiche.php プロジェクト: nrjacker4/crm-php
/*
 * Actions
 */
if ($action == 'setcustomeraccountancycode') {
    $result = $object->fetch($id);
    $object->code_compta = $_POST["customeraccountancycode"];
    $result = $object->update($object->id, $user, 1, 1, 0);
    if ($result < 0) {
        $mesgs[] = join(',', $object->errors);
    }
    $action = "";
}
// conditions de reglement
if ($action == 'setconditions' && $user->rights->societe->creer) {
    $object->fetch($id);
    $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
    if ($result < 0) {
        dol_print_error($db, $object->error);
    }
}
// mode de reglement
if ($action == 'setmode' && $user->rights->societe->creer) {
    $object->fetch($id);
    $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
    if ($result < 0) {
        dol_print_error($db, $object->error);
    }
}
// assujetissement a la TVA
if ($action == 'setassujtva' && $user->rights->societe->creer) {
    $object->fetch($id);