Beispiel #1
0
            } else {
                $gestimmo->Date_location = dol_now();
            }
            if (GETPOST('Depot_garantie', 'alpha')) {
                $gestimmo->Depot_garantie = GETPOST('Depot_garantie', 'alpha');
            } else {
                $gestimmo->Depot_garantie = '0';
            }
            if (GETPOST('date_fin', 'alpha')) {
                $gestimmo->date_fin = GETPOST('date_fin', 'alpha');
            } else {
                $gestimmo->date_fin = dol_now();
            }
            //  $gestimmo->tms = GETPOST('tms ','alpha');
            //  $gestimmo->entity = GETPOST('entity','alpha');
            $result = $gestimmo->update($user);
            if ($result > 0) {
                Header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id);
                exit;
            } else {
                dol_syslog("gestimmo::bails::card error=" . $gestimmo->error, LOG_ERR);
                $mesg = '<div class="error">' . $gestimmo->error . '</div>';
                //pour gere le retour en cas d erreur
                $action = 'edit';
            }
        }
    }
}
/*
 * Action create (fiche bails immo)
*/