recuPaiement devient un generalizedTimeFormat
This commit is contained in:
parent
6da84bbfd1
commit
c5c903b114
2 changed files with 8 additions and 7 deletions
|
@ -1100,7 +1100,7 @@ def set_solde(clas):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Met aussi à jour le solde.
|
# Met aussi à jour le solde.
|
||||||
f.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
|
f.recuPaiement(datetimeToGTF(localizedDatetime()))
|
||||||
f.save()
|
f.save()
|
||||||
db.services_to_restart('mail_solde', [
|
db.services_to_restart('mail_solde', [
|
||||||
'%s a fait %s euros pour %s [mode: %s, remarque: %s]' %
|
'%s a fait %s euros pour %s [mode: %s, remarque: %s]' %
|
||||||
|
@ -1256,7 +1256,7 @@ def set_vente(proprio):
|
||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
f.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
|
f.recuPaiement(datetimeToGTF(localizedDatetime()))
|
||||||
f.save()
|
f.save()
|
||||||
# arg = u'--title "Impression facture" '
|
# arg = u'--title "Impression facture" '
|
||||||
# arg += u'--yesno "Voulez vous imprimer cette facture ?\n" 0 0'
|
# arg += u'--yesno "Voulez vous imprimer cette facture ?\n" 0 0'
|
||||||
|
@ -1314,7 +1314,7 @@ def confirm(clas):
|
||||||
else:
|
else:
|
||||||
subprocess.call(['/usr/scripts/cransticket/dump_creds.py', 'mid=%s' % clas.id()])
|
subprocess.call(['/usr/scripts/cransticket/dump_creds.py', 'mid=%s' % clas.id()])
|
||||||
if in_facture is not None:
|
if in_facture is not None:
|
||||||
in_facture.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
|
in_facture.recuPaiement(datetimeToGTF(localizedDatetime()))
|
||||||
in_facture.save()
|
in_facture.save()
|
||||||
# arg = u'--title "Impression facture" '
|
# arg = u'--title "Impression facture" '
|
||||||
# arg += u'--yesno "Voulez vous imprimer cette facture ?\n" 0 0'
|
# arg += u'--yesno "Voulez vous imprimer cette facture ?\n" 0 0'
|
||||||
|
@ -1857,7 +1857,7 @@ def set_facture_recu(facture):
|
||||||
if annul:
|
if annul:
|
||||||
return 1
|
return 1
|
||||||
if u"Pmt" in res:
|
if u"Pmt" in res:
|
||||||
facture.recuPaiement(strftime("%Y-%m-%d %H:%M:%S"))
|
facture.recuPaiement(datetimeToGTF(localizedDatetime()))
|
||||||
else:
|
else:
|
||||||
facture.recuPaiement(False)
|
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 is_actif, crans_ldap, AssociationCrans, hostname
|
||||||
from ldap_crans import MachineCrans, MachineWifi, BorneWifi
|
from ldap_crans import MachineCrans, MachineWifi, BorneWifi
|
||||||
from ldap_crans import Adherent
|
from ldap_crans import Adherent
|
||||||
|
from ldap_crans import datetimeFromGTF
|
||||||
from hptools import sw_chbre, ConversationError
|
from hptools import sw_chbre, ConversationError
|
||||||
import gestion.annuaires_pg as annuaires_pg
|
import gestion.annuaires_pg as annuaires_pg
|
||||||
import gestion.config as config
|
import gestion.config as config
|
||||||
|
@ -293,7 +294,7 @@ def factures_brief(factures) :
|
||||||
facture.id(),
|
facture.id(),
|
||||||
p,
|
p,
|
||||||
facture.modePaiement(),
|
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,
|
controle,
|
||||||
', '.join(article['code'] for article in facture.articles()),
|
', '.join(article['code'] for article in facture.articles()),
|
||||||
unicode(facture.total()) + u" €",
|
unicode(facture.total()) + u" €",
|
||||||
|
@ -420,7 +421,7 @@ def list_factures(factures) :
|
||||||
data.append([
|
data.append([
|
||||||
f.id(),
|
f.id(),
|
||||||
f.modePaiement(),
|
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,
|
controle,
|
||||||
', '.join(a['code'] for a in f.articles()),
|
', '.join(a['code'] for a in f.articles()),
|
||||||
u"%s€" % sum([float(a['pu'])*int(a['nombre']) 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 += facture.modePaiement()
|
||||||
f += u" "
|
f += u" "
|
||||||
f += coul(u"Paiement reçu : ", "gras")
|
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 += u"\n"
|
||||||
f += coul(u"Contrôle : ", "gras")
|
f += coul(u"Contrôle : ", "gras")
|
||||||
f += controle
|
f += controle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue