diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index c3f43e86593..e2aec9e1c1f 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -37,11 +37,20 @@ if ($action == 'add') $action = ''; } -if ($action == 'miseenservice') +if ($HTTP_POST_VARS["action"] == 'miseenservice') { $contrat = new Contrat($db); $contrat->id = $id; - $contrat->mise_en_service($user); + $contrat->fetch($id); + $contrat->mise_en_service($user, + mktime($HTTP_POST_VARS["rehour"], + $HTTP_POST_VARS["remin"], + 0, + $HTTP_POST_VARS["remonth"], + $HTTP_POST_VARS["reday"], + $HTTP_POST_VARS["reyear"]), + $HTTP_POST_VARS["duration"] + ); } if ($action == 'cloture') @@ -79,6 +88,9 @@ if ($action == 'update' && $cancel <> 'Annuler') * * */ +$html = new Form($db); + + if ($action == 'create') { print "
'; + } + if ($contrat->enservice > 0) + { + print "