From 03356003bf35c1c039d89d8421d3d8a81943e914 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 28 Dec 2002 00:13:44 +0000 Subject: [PATCH] *** empty log message *** --- htdocs/compta/dons/edit.php | 49 ++++++++++++++++++++++++------------ htdocs/compta/dons/fiche.php | 22 ++++++++-------- htdocs/don.class.php | 1 + 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/htdocs/compta/dons/edit.php b/htdocs/compta/dons/edit.php index 979280b372e..3814ab7f672 100644 --- a/htdocs/compta/dons/edit.php +++ b/htdocs/compta/dons/edit.php @@ -37,6 +37,7 @@ if ($action == 'update') $don->id = $HTTP_POST_VARS["rowid"]; $don->prenom = $prenom; $don->nom = $nom; + $don->statut = $HTTP_POST_VARS["statutid"]; $don->societe = $societe; $don->adresse = $adresse; $don->amount = $amount; @@ -67,6 +68,8 @@ if ($action == 'update') llxHeader(); +if ($rowid) +{ $don = new Don($db); $don->id = $rowid; @@ -92,13 +95,27 @@ llxHeader(); print ""; print ""; - print "Date du don :"; + print "Date du don"; print_date_select($don->date); print ""; - print 'Commentaires :
'; + print 'Commentaires :
'; print ''; - print "Type :\n"; + + print "Statut du don"; + + $listst[0] = "Promesse à valider"; + $listst[1] = "Promesse validée"; + $listst[2] = "Don payé"; + $listst[3] = "Don encaissé"; + + + $sel = new Form($db); + $sel->select_array("statutid",$listst,$don->statut); + + print ""; + + print "Mode de paiement\n"; $paiement = new Paiement($db); @@ -106,7 +123,7 @@ llxHeader(); print "\n"; - print "Projet :\n"; + print "Projet\n"; $prj = new ProjetDon($db); $listeprj = $prj->liste_array(); @@ -118,17 +135,17 @@ llxHeader(); print "
"; print "\n"; - print "Don public :\n"; + if ($don->public) + { + print ''; + print ''; + } + else + { + print ''; + print ''; + } print "
"; print "\n"; @@ -145,7 +162,7 @@ else print "\n"; print "\n"; - +} $db->close(); diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 675881e95c6..a5ed52d0f05 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -130,13 +130,13 @@ if ($action == 'create') { print ""; - print "Date du don :"; + print "Date du don"; print_date_select(); print ""; print 'Commentaires :
'; print ""; - print "Type :\n"; + print "Mode de paiement\n"; $paiement = new Paiement($db); @@ -144,7 +144,7 @@ if ($action == 'create') { print "\n"; - print "Projet :\n"; $sql = "SELECT rowid, libelle FROM llx_don_projet ORDER BY rowid"; @@ -166,7 +166,7 @@ if ($action == 'create') { print "
"; print "\n"; - print "Don public :\n"; print ''; print ''; @@ -205,7 +205,7 @@ if ($rowid > 0 && $action == 'edit') print "
"; print ''; - print ""; @@ -214,7 +214,7 @@ if ($rowid > 0 && $action == 'edit') if ($don->statut == 1) { - print "\n"; @@ -222,14 +222,14 @@ if ($rowid > 0 && $action == 'edit') if ($don->statut > 1) { - print "\n"; } - print ''; + print ''; - print "\n"; @@ -253,7 +253,7 @@ if ($rowid > 0 && $action == 'edit') * Case 1 */ - print ''; + print ''; /* * Case 2 @@ -298,7 +298,7 @@ if ($rowid > 0 && $action == 'edit') } elseif ($don->statut == 2) { - print ""; + print ""; } else { diff --git a/htdocs/don.class.php b/htdocs/don.class.php index 10823187d28..0b7072d9a37 100644 --- a/htdocs/don.class.php +++ b/htdocs/don.class.php @@ -213,6 +213,7 @@ class Don $sql .= ",note='".$this->commentaire."'"; $sql .= ",datedon='".$this->date."'"; $sql .= ",email='".$this->email."'"; + $sql .= ",fk_statut=".$this->statut; $sql .= " WHERE rowid = $this->id";
Date du don :"; + print "
Date du don"; print strftime("%d %B %Y",$don->date); print "
Type :"; + print "
Mode de paiement"; $paiement = new Paiement($db); $paiement->select("modepaiement","crédit", $don->modepaiementid); print "
Type :"; + print "
Mode de paiement"; print $don->modepaiement; print "
Projet :'.$don->projet.'
Projet'.$don->projet.'
Don public :"; + print "
Don public"; print $yn[$don->public]; print "
Editer[Editer]id&action=set_encaisse\">Encaissé[id&action=set_encaisse\">Encaisser]