From 39926ba4f58f2909b364b9c48b25b00fd9b774bb Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 30 Sep 2015 16:09:18 +0200 Subject: [PATCH] lingo: display invoice payment limit date (#8422) --- .../lingo/locale/fr/LC_MESSAGES/django.po | 56 ++++++++++--------- combo/apps/lingo/models.py | 6 +- .../lingo/templates/lingo/combo/items.html | 2 + 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/combo/apps/lingo/locale/fr/LC_MESSAGES/django.po b/combo/apps/lingo/locale/fr/LC_MESSAGES/django.po index cb6ca361..9bf764aa 100644 --- a/combo/apps/lingo/locale/fr/LC_MESSAGES/django.po +++ b/combo/apps/lingo/locale/fr/LC_MESSAGES/django.po @@ -36,87 +36,87 @@ msgstr "Ingenico (précédemment Ogone)" msgid "Paybox" msgstr "" -#: lingo/models.py:64 lingo/templates/lingo/combo/items.html:9 +#: lingo/models.py:65 lingo/templates/lingo/combo/items.html:9 msgid "Label" msgstr "Libellé" -#: lingo/models.py:66 +#: lingo/models.py:67 msgid "Description" msgstr "Description" -#: lingo/models.py:67 +#: lingo/models.py:68 msgid "Payment Service" msgstr "Service de paiement" -#: lingo/models.py:70 +#: lingo/models.py:71 msgid "Payment Service Options" msgstr "Options du service de paiement" -#: lingo/models.py:71 +#: lingo/models.py:72 msgid "Webservice URL to retrieve remote items" msgstr "Webservice de récuperation des factures distantes" -#: lingo/models.py:78 lingo/models.py:302 +#: lingo/models.py:79 lingo/models.py:304 msgid "Regie" msgstr "Régie" -#: lingo/models.py:158 +#: lingo/models.py:159 msgid "Subject" msgstr "Objet" -#: lingo/models.py:159 +#: lingo/models.py:160 msgid "Source URL" msgstr "URL de source" -#: lingo/models.py:160 +#: lingo/models.py:161 msgid "Details" msgstr "Détails" -#: lingo/models.py:161 lingo/templates/lingo/combo/items.html:11 +#: lingo/models.py:162 lingo/templates/lingo/combo/items.html:12 msgid "Amount" msgstr "Montant(TTC)" -#: lingo/models.py:212 +#: lingo/models.py:214 msgid "Running" msgstr "En cours" -#: lingo/models.py:213 +#: lingo/models.py:215 msgid "Paid" msgstr "Payé" -#: lingo/models.py:214 +#: lingo/models.py:216 msgid "Cancelled" msgstr "Annulé" -#: lingo/models.py:215 +#: lingo/models.py:217 msgid "Unknown" msgstr "Inconnu" -#: lingo/models.py:222 lingo/templates/lingo/combo/basket.html:3 +#: lingo/models.py:224 lingo/templates/lingo/combo/basket.html:3 msgid "Basket" msgstr "Panier" -#: lingo/models.py:249 lingo/templates/lingo/combo/recent_transactions.html:2 +#: lingo/models.py:251 lingo/templates/lingo/combo/recent_transactions.html:2 msgid "Recent Transactions" msgstr "Transactions récentes" -#: lingo/models.py:278 +#: lingo/models.py:280 msgid "Basket Link" msgstr "Lien vers le Panier" -#: lingo/models.py:303 +#: lingo/models.py:305 msgid "Title" msgstr "Titre" -#: lingo/models.py:323 +#: lingo/models.py:325 msgid "All" msgstr "Tout" -#: lingo/models.py:353 +#: lingo/models.py:355 msgid "Items History Cell" msgstr "Cellule Historique des factures" -#: lingo/models.py:366 +#: lingo/models.py:368 msgid "Active Items Cell" msgstr "Cellule Factures actives" @@ -200,7 +200,11 @@ msgstr "Numéro" msgid "Issue date" msgstr "Date d'émission" -#: lingo/templates/lingo/combo/items.html:21 +#: lingo/templates/lingo/combo/items.html:11 +msgid "Payment limit date" +msgstr "Date limite de paiement" + +#: lingo/templates/lingo/combo/items.html:23 #, python-format msgid "" "\n" @@ -208,19 +212,19 @@ msgid "" " " msgstr "" -#: lingo/templates/lingo/combo/items.html:26 +#: lingo/templates/lingo/combo/items.html:28 msgid "View" msgstr "Voir" -#: lingo/templates/lingo/combo/items.html:27 +#: lingo/templates/lingo/combo/items.html:30 msgid "and pay" msgstr "et payer" -#: lingo/templates/lingo/combo/items.html:31 +#: lingo/templates/lingo/combo/items.html:35 msgid "Download" msgstr "Télécharger" -#: lingo/templates/lingo/combo/items.html:39 +#: lingo/templates/lingo/combo/items.html:43 msgid "No items yet" msgstr "Aucune facture" diff --git a/combo/apps/lingo/models.py b/combo/apps/lingo/models.py index c1ebf052..c961bf2a 100644 --- a/combo/apps/lingo/models.py +++ b/combo/apps/lingo/models.py @@ -52,6 +52,7 @@ SERVICES = [ def build_remote_item(data, regie): return RemoteItem(id=data.get('id'), regie=regie, creation_date=data['created'], + payment_limit_date=data['pay_limit_date'], display_id=data['display_id'], total_amount=data.get('total_amount'), amount=data.get('amount'), @@ -176,12 +177,13 @@ class BasketItem(models.Model): class RemoteItem(object): - def __init__(self, id, regie, creation_date, total_amount, - amount, display_id, subject, has_pdf, + def __init__(self, id, regie, creation_date, payment_limit_date, + total_amount, amount, display_id, subject, has_pdf, online_payment): self.id = id self.regie = regie self.creation_date = parser.parse(creation_date) + self.payment_limit_date = parser.parse(payment_limit_date) self.total_amount = Decimal(total_amount) self.amount = Decimal(amount) self.display_id = display_id diff --git a/combo/apps/lingo/templates/lingo/combo/items.html b/combo/apps/lingo/templates/lingo/combo/items.html index a7bdd76d..04a027e3 100644 --- a/combo/apps/lingo/templates/lingo/combo/items.html +++ b/combo/apps/lingo/templates/lingo/combo/items.html @@ -8,6 +8,7 @@ {% trans "Number" %} {% trans "Label" %} {% trans "Issue date" %} + {% trans "Payment limit date" %} {% trans "Amount" %} @@ -18,6 +19,7 @@ {{ item.display_id }} {{ item.subject }} {{ item.creation_date|date:"SHORT_DATE_FORMAT" }} + {{ item.payment_limit_date|date:"SHORT_DATE_FORMAT" }} {% blocktrans with amount=item.total_amount %} {{ amount }}€ {% endblocktrans %}