Affichage des factures
This commit is contained in:
parent
2940dae3b8
commit
16deec183d
3 changed files with 24 additions and 0 deletions
|
@ -947,6 +947,15 @@ class facture(CransLdapObject):
|
||||||
attributs.historique, attributs.article]
|
attributs.historique, attributs.article]
|
||||||
ldap_name = "facture"
|
ldap_name = "facture"
|
||||||
|
|
||||||
|
_proprio = None
|
||||||
|
|
||||||
|
def proprio(self):
|
||||||
|
u"""Renvoie le propriétaire de la facture"""
|
||||||
|
parent_dn = self.dn.split(',', 1)[1]
|
||||||
|
if not self._proprio:
|
||||||
|
self._proprio = new_cransldapobject(self.conn, parent_dn, self.mode)
|
||||||
|
return self._proprio
|
||||||
|
|
||||||
@crans_object
|
@crans_object
|
||||||
class service(CransLdapObject):
|
class service(CransLdapObject):
|
||||||
ldap_name = "service"
|
ldap_name = "service"
|
||||||
|
|
|
@ -70,6 +70,10 @@ def adherent(adherent, params):
|
||||||
params=proprio(adherent, params)
|
params=proprio(adherent, params)
|
||||||
return template().get_template("adherent").render(params)
|
return template().get_template("adherent").render(params)
|
||||||
|
|
||||||
|
def facture(facture, params):
|
||||||
|
params['o']=facture
|
||||||
|
return template().get_template("facture").render(params)
|
||||||
|
|
||||||
def sprint(object, limit=5):
|
def sprint(object, limit=5):
|
||||||
params={'limit':limit}
|
params={'limit':limit}
|
||||||
from lc_ldap import objets
|
from lc_ldap import objets
|
||||||
|
@ -79,6 +83,8 @@ def sprint(object, limit=5):
|
||||||
return adherent(object, params)
|
return adherent(object, params)
|
||||||
elif isinstance(object, objets.club):
|
elif isinstance(object, objets.club):
|
||||||
return club(object, params)
|
return club(object, params)
|
||||||
|
elif isinstance(object, objets.facture):
|
||||||
|
return facture(object, params)
|
||||||
else:
|
else:
|
||||||
return str(object)
|
return str(object)
|
||||||
|
|
||||||
|
|
9
printing/templates/facture
Normal file
9
printing/templates/facture
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{{["fid=",o.fid.0]|join|coul('bleu')}} {{"À : "|coul('gras')}}{{o.proprio().prenom|join(' ')}} {{o.proprio().nom|join(' ')}} ({{o.proprio().aid.0}})
|
||||||
|
{% if o.article %}
|
||||||
|
{{"Article : "|coul('gras')}}{{o.article|join('\n ')}}
|
||||||
|
{% endif %}
|
||||||
|
{{"Mode de Paiement : "|coul('gras')}}{{o.modePaiement|join(', ')}}
|
||||||
|
{% if o.recuPaiement %}
|
||||||
|
{{"Paiement reçu : "|coul('gras')}}{{o.recuPaiement|join(', ')}} {{"(OK)"|coul('vert')}}
|
||||||
|
{% endif %}
|
||||||
|
{% include 'object' %}
|
Loading…
Add table
Add a link
Reference in a new issue