From 7ed5723b0fdda3efd53bdd5a252961181ae23dd1 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 21 Dec 2002 17:34:05 +0000 Subject: [PATCH] *** empty log message *** --- htdocs/compta/dons/fiche.php | 70 ++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 5c0d3bb6cbb..b010359a512 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -38,17 +38,15 @@ if ($action == 'add') $don->amount = $amount; $don->cp = $cp; $don->ville = $ville; - $don->date = $db->idate(mktime(12, 0 , 0, $remonth, $reday, $reyear)); + $don->date = mktime(12, 0 , 0, $remonth, $reday, $reyear); $don->note = $note; $don->public = $public; $don->projetid = $projetid; - $don->modepaiement = $modepaiement; + $don->modepaiementid = $modepaiement; if ($don->create($user->id) ) - { - + { Header("Location: index.php"); - } } else @@ -63,6 +61,7 @@ if ($action == 'delete') { $don = new Don($db); $don->delete($rowid); + Header("Location: liste.php?statut=0"); } if ($action == 'valid_promesse') { @@ -75,7 +74,7 @@ if ($action == 'valid_promesse') if ($action == 'set_paye') { $don = new Don($db); - if ($don->set_paye($rowid)) + if ($don->set_paye($rowid, $modepaiement)) { Header("Location: liste.php?statut=1"); } @@ -195,7 +194,7 @@ if ($rowid > 0 && $action == 'edit') $don->fetch($rowid); print_titre("Traitement du don"); - + print "
"; print ''; print ""; print ''; + print nl2br($don->commentaire).''; $author = $GLOBALS["REMOTE_USER"]; print "\n"; - if ($don->statut > 0) + if ($don->statut == 1) { - print "\n"; } + + if ($don->statut > 1) + { + print "\n"; + } + print ''; print "
Date du don :"; @@ -203,22 +202,26 @@ if ($rowid > 0 && $action == 'edit') print "Commentaires :
'; - print nl2br($don->note).'
Type :"; - $paiement = new Paiement($db); - - $paiement->select("modepaiement","crédit", $don->modepaiement); - + $paiement->select("modepaiement","crédit", $don->modepaiementid); print "
Type :"; + print $don->modepaiement; + print "
Projet :'.$don->projet.'
Don public :"; @@ -239,28 +242,41 @@ if ($rowid > 0 && $action == 'edit') print "

"; - - if ($don->statut == 0) - { - print ""; - } - else - { - print ""; - } + /* + * Case 1 + */ + + print ""; + + /* + * Case 2 + */ if ($don->statut == 1 && $resteapayer > 0) { print ""; } + elseif ($don->statut == 0) + { + print ""; + } else { print ""; } - + /* + * Case 3 + */ if ($don->statut == 1 && abs($resteapayer == 0) && $don->paye == 0) { - print ""; + print ""; } else { @@ -269,7 +285,7 @@ if ($rowid > 0 && $action == 'edit') if ($don->statut == 0) { - print ""; + print ""; } elseif ($don->statut == 2) { @@ -280,7 +296,7 @@ if ($rowid > 0 && $action == 'edit') print ""; } - print "
[id&action=delete\">Supprimer]--[Emettre un paiement][id&action=valid_promesse\">Valider la promesse]-[id&action=set_paye\">Classer 'Payé']"; + + print ''; + print ''; + + print ''; + + print "[id&action=valid_promesse\">Valider la promesse][id&action=delete\">Supprimer]-

"; + print "

"; }