annulation d'une facture non paye
darcs-hash:20061025182958-f46e9-c88fbf735adede3d119ff412ccd27aafe7131dae.gz
This commit is contained in:
parent
1fea392dae
commit
ffc73b0296
4 changed files with 53 additions and 25 deletions
|
@ -21,4 +21,4 @@ paypal.businessAdress = "gdetrez-buisness@crans.org"
|
||||||
paypal.useSandbox = True
|
paypal.useSandbox = True
|
||||||
|
|
||||||
[/static]
|
[/static]
|
||||||
staticFilter.dir = "/home/gdetrez/scripts/intranet/static/"
|
staticFilter.dir = "/usr/scripts/intranet/static/"
|
||||||
|
|
|
@ -63,7 +63,6 @@ class root:
|
||||||
lst = [ x for x in adh.historique() if x.split(u' : ',1)[1].startswith(u'credit') or x.split(u' : ',1)[1].startswith(u'debit') ]
|
lst = [ x for x in adh.historique() if x.split(u' : ',1)[1].startswith(u'credit') or x.split(u' : ',1)[1].startswith(u'debit') ]
|
||||||
histLst = []
|
histLst = []
|
||||||
for anItem in lst:
|
for anItem in lst:
|
||||||
#11/06/2006 01:40, gdetrez : credit 10.0 Euros [Facture n°1 : Impression]
|
|
||||||
aLine = {}
|
aLine = {}
|
||||||
aLine["date"] = anItem.split(u",")[0]
|
aLine["date"] = anItem.split(u",")[0]
|
||||||
aLine["type"] = anItem.split(u' : ',2)[1].split(u' ')[0]
|
aLine["type"] = anItem.split(u' : ',2)[1].split(u' ')[0]
|
||||||
|
@ -81,3 +80,17 @@ class root:
|
||||||
'scripts' :[],
|
'scripts' :[],
|
||||||
}
|
}
|
||||||
historique.exposed = True
|
historique.exposed = True
|
||||||
|
|
||||||
|
def delFacture(self, no):
|
||||||
|
try:
|
||||||
|
# trrouver la factures
|
||||||
|
fact = self.__ldap.search('fid=' + no, 'w')['facture'][0]
|
||||||
|
#verifier qu'elle appartient bien a l'adherent
|
||||||
|
if not fact.proprietaire().mail() == cherrypy.session['uid']:
|
||||||
|
raise Exception, "Impossible de supprimer cette facture"
|
||||||
|
# la supprimer
|
||||||
|
fact.delete()
|
||||||
|
except Exception, e:
|
||||||
|
cherrypy.log(str(e), "FACTURES", 1)
|
||||||
|
return self.index()
|
||||||
|
delFacture.exposed = True
|
||||||
|
|
|
@ -70,6 +70,16 @@ td, tr {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display:block;
|
||||||
|
float:right;
|
||||||
|
font-size:0.9em;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
.actions a {
|
||||||
|
margin:2px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
/********************************************
|
/********************************************
|
||||||
* <!-- factures - details -->
|
* <!-- factures - details -->
|
||||||
********************************************/
|
********************************************/
|
||||||
|
@ -110,7 +120,7 @@ table.factureDetails td {
|
||||||
margin:3px;
|
margin:3px;
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
}
|
}
|
||||||
span.note {
|
.note {
|
||||||
color:#666
|
color:#666
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,16 +47,21 @@ function hideDetail(id){
|
||||||
#if not $f.payee
|
#if not $f.payee
|
||||||
(non payée)
|
(non payée)
|
||||||
#end if
|
#end if
|
||||||
<span class="note">Crée le -</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="montant">
|
<span class="montant">
|
||||||
$f.montant €
|
$f.montant €
|
||||||
#if not $f.payee
|
|
||||||
<a class="note" href="$f.paypal">Payer avec PayPal</a>
|
|
||||||
#else
|
|
||||||
<span class="note">Payée</span>
|
|
||||||
#end if
|
|
||||||
</span>
|
</span>
|
||||||
|
<span class="note" style="float:left;clear: left;">Crée le -</span>
|
||||||
|
#if not $f.payee
|
||||||
|
<span class="actions">
|
||||||
|
<a href="delFacture?no=$f.no">Annuler</a>
|
||||||
|
<a href="$f.paypal">Payer avec PayPal</a>
|
||||||
|
</span>
|
||||||
|
#else
|
||||||
|
<span class="note" style="float:right;clear:right;">Payée</span>
|
||||||
|
#end if
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
#if $f.details.__len__() > 1
|
#if $f.details.__len__() > 1
|
||||||
<div id="facture$f.no" style="display:none;">
|
<div id="facture$f.no" style="display:none;">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue