Commit c5c903b1 authored by Pierre-Elliott Bécue's avatar Pierre-Elliott Bécue
Browse files

recuPaiement devient un generalizedTimeFormat

parent 6da84bbf
......@@ -1100,7 +1100,7 @@ def set_solde(clas):
try:
# Met aussi à jour le solde.
f.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
f.recuPaiement(datetimeToGTF(localizedDatetime()))
f.save()
db.services_to_restart('mail_solde', [
'%s a fait %s euros pour %s [mode: %s, remarque: %s]' %
......@@ -1256,7 +1256,7 @@ def set_vente(proprio):
return 1
else:
try:
f.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
f.recuPaiement(datetimeToGTF(localizedDatetime()))
f.save()
# arg = u'--title "Impression facture" '
# arg += u'--yesno "Voulez vous imprimer cette facture ?\n" 0 0'
......@@ -1314,7 +1314,7 @@ def confirm(clas):
else:
subprocess.call(['/usr/scripts/cransticket/dump_creds.py', 'mid=%s' % clas.id()])
if in_facture is not None:
in_facture.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
in_facture.recuPaiement(datetimeToGTF(localizedDatetime()))
in_facture.save()
# arg = u'--title "Impression facture" '
# arg += u'--yesno "Voulez vous imprimer cette facture ?\n" 0 0'
......@@ -1857,7 +1857,7 @@ def set_facture_recu(facture):
if annul:
return 1
if u"Pmt" in res:
facture.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
facture.recuPaiement(datetimeToGTF(localizedDatetime()))
else:
facture.recuPaiement(False)
......
......@@ -53,6 +53,7 @@ from affich_tools import *
from ldap_crans import is_actif, crans_ldap, AssociationCrans, hostname
from ldap_crans import MachineCrans, MachineWifi, BorneWifi
from ldap_crans import Adherent
from ldap_crans import datetimeFromGTF
from hptools import sw_chbre, ConversationError
import gestion.annuaires_pg as annuaires_pg
import gestion.config as config
......@@ -293,7 +294,7 @@ def factures_brief(factures) :
facture.id(),
p,
facture.modePaiement(),
coul(facture.recuPaiement(), "vert") if facture.recuPaiement() else coul("NON", "rouge"),
coul(datetimeFromGTF(facture.recuPaiement()).strftime("%d/%m/%Y %H:%M:%S%z"), "vert") if facture.recuPaiement() else coul("NON", "rouge"),
controle,
', '.join(article['code'] for article in facture.articles()),
unicode(facture.total()) + u" €",
......@@ -420,7 +421,7 @@ def list_factures(factures) :
data.append([
f.id(),
f.modePaiement(),
coul(f.recuPaiement(), "vert") if f.recuPaiement() else coul("NON", "rouge"),
coul(datetimeFromGTF(facture.recuPaiement()).strftime("%d/%m/%Y %H:%M:%S%z"), "vert") if f.recuPaiement() else coul("NON", "rouge"),
controle,
', '.join(a['code'] for a in f.articles()),
u"%s€" % sum([float(a['pu'])*int(a['nombre']) for a in f.articles()])
......@@ -705,7 +706,7 @@ def facture_details(facture) :
f += facture.modePaiement()
f += u" "
f += coul(u"Paiement reçu : ", "gras")
f += coul(facture.recuPaiement(), "vert") if facture.recuPaiement() else coul(u"Non", "rouge")
f += coul(datetimeFromGTF(facture.recuPaiement()).strftime("%d/%m/%Y %H:%M:%S%z"), "vert") if facture.recuPaiement() else coul(u"Non", "rouge")
f += u"\n"
f += coul(u"Contrôle : ", "gras")
f += controle
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment