From 57aabd6e65712f7b5dbbb34cb027c96858952413 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 6 May 2004 11:14:09 +0000 Subject: [PATCH] ajout possibilite d'annuler un contrat --- htdocs/contrat/fiche.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 0535b19b607..a20dd4af15f 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -63,13 +63,21 @@ if ($_POST["action"] == 'miseenservice') ); } -if ($action == 'cloture') +if ($_GET["action"] == 'cloture') { $contrat = new Contrat($db); $contrat->id = $id; $contrat->cloture($user); } +if ($_GET["action"] == 'annule') +{ + $contrat = new Contrat($db); + $contrat->id = $id; + $contrat->annule($user); +} + + if ($action == 'update' && $cancel <> 'Annuler') { $product = new Product($db); @@ -142,11 +150,15 @@ else if ( $result ) { + $facture = new Facture($db); + $facture->fetch($contrat->factureid); + + print_fiche_titre('Fiche contrat : '.$contrat->id, $mesg); print ''; print ""; - print ''; + print ''; print ''; if ($contrat->factureid) { @@ -224,7 +236,8 @@ if (! $contrat->enservice) } elseif ($contrat->enservice == 1) { - print 'Clôturer'; + print 'Annuler'; + print 'Clôturer'; } print '';
Service'.($contrat->product->ref).' - '.($contrat->product->libelle).'Service'.($contrat->product->ref).' - '.($contrat->product->label_url).'