From 32877cb08cd71853f7cd24177c5152c0a324a8b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Oct 2005 15:14:16 +0000 Subject: [PATCH] =?UTF-8?q?Demande=20confirmation=20pour=20passer=20au=20s?= =?UTF-8?q?tatut=20pay=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture.php | 42 ++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e120cacdb79..31ccfaaae9d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004 Éric Seigne * Copyright (C) 2004-2005 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005 Marc Barilley / Ocebo * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -285,9 +285,7 @@ if ($_POST['action'] == 'add') } } -/* - * - */ +// Classe à "validée" if ($_POST['action'] == 'confirm_valid' && $_POST['confirm'] == 'yes' && $user->rights->facture->valider) { $fac = new Facture($db); @@ -301,7 +299,8 @@ if ($_POST['action'] == 'confirm_valid' && $_POST['confirm'] == 'yes' && $user-> } } -if ($_GET['action'] == 'payed' && $user->rights->facture->paiement) +// Classe à "payée" +if ($_POST['action'] == 'confirm_payed' && $_POST['confirm'] == 'yes' && $user->rights->facture->paiement) { $fac = new Facture($db); $result = $fac->set_payed($_GET['facid']); @@ -1137,19 +1136,8 @@ else } /* - * Confirmation du classement abandonn - * - */ - if ($_GET['action'] == 'canceled') - { - $html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill'),'confirm_canceled'); - print '
'; - } - - /* - * Confirmation de la validation - * - */ + * Confirmation de la validation + */ if ($_GET['action'] == 'valid') { $numfa = facture_get_num($soc); @@ -1157,6 +1145,24 @@ else print '
'; } + /* + * Confirmation du classement payé + */ + if ($_GET['action'] == 'payed') + { + $html->form_confirm('facture.php?facid='.$fac->id,$langs->trans('ClassifyPayed'),$langs->trans('ConfirmClassifyPayedBill',$fac->ref),'confirm_payed'); + print '
'; + } + + /* + * Confirmation du classement abandonn + */ + if ($_GET['action'] == 'canceled') + { + $html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$fac->ref),'confirm_canceled'); + print '
'; + } + /* * Facture */