Ajout des fonctions d'impression des factures sur l'imprimante thermique
This commit is contained in:
parent
6b08464bfc
commit
2d4647e9bf
5 changed files with 133 additions and 11 deletions
28
client.py
28
client.py
|
@ -55,6 +55,34 @@ class Ticket(object):
|
|||
todo['type'] = 'wifi'
|
||||
self.add_entry(todo)
|
||||
|
||||
def add_facture(self, facture):
|
||||
proprietaire = facture.proprio()
|
||||
chambre = None
|
||||
|
||||
#On vérifie que le propriétaire a une chambre sinon on met EXT
|
||||
if 'chbre' in proprietaire.keys():
|
||||
chambre = proprietaire['chbre'][0].value
|
||||
else:
|
||||
chambre = u'EXT'
|
||||
|
||||
deb_adh = crans_utils.datetime_from_generalized_time_format(facture['debutAdhesion'][0].value)
|
||||
fin_adh = crans_utils.datetime_from_generalized_time_format(facture['finAdhesion'][0].value)
|
||||
fin_co = crans_utils.datetime_from_generalized_time_format(facture['finConnexion'][0].value)
|
||||
|
||||
todo = {
|
||||
'fid' : facture['fid'][0].value,
|
||||
'article' : [ art.value for art in facture['article']],
|
||||
'modePaiement' : facture['modePaiement'][0].value,
|
||||
'recuPaiement' : facture['recuPaiement'][0].value,
|
||||
'debutAdhesion' : deb_adh.strftime('%d/%m/%Y'),
|
||||
'finAdhesion' : fin_adh.strftime('%d/%m/%Y'),
|
||||
'finConnexion' : fin_co.strftime('%d/%m/%Y'),
|
||||
'chbre' : chambre,
|
||||
'nom' : proprietaire['nom'][0].value,
|
||||
'prenom' : proprietaire['prenom'][0].value,
|
||||
}
|
||||
self.add_entry(todo)
|
||||
|
||||
def reset_password(self, adh):
|
||||
login = adh['uid'][0].value
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue