From: Yoan Le Clanche Date: Wed, 23 Mar 2022 12:23:36 +0000 (+0100) Subject: Modify invoice date : https://trackers.pilotsystems.net/prebarreau/0377 X-Git-Tag: 2.5.1~1^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3049a2d1209a905c2df4d53f925a12d197c1869e;p=teleforma.git Modify invoice date : https://trackers.pilotsystems.net/prebarreau/0377 --- diff --git a/teleforma/views/crfpa.py b/teleforma/views/crfpa.py index 1722581c..d3a9248f 100644 --- a/teleforma/views/crfpa.py +++ b/teleforma/views/crfpa.py @@ -900,8 +900,11 @@ class ReceiptPDFView(PDFTemplateResponseMixin, TemplateView): if payment.type == "online" and not payment.online_paid: continue receipt_date = max(date, receipt_date) - date = date.strftime('%d/%m/%Y') + + paid_date = payment.date_paid or date + date = paid_date.strftime('%d/%m/%Y') kind = payment.get_type_display() + items.append({ 'label': 'Paiement %s du %s' % (kind, date), 'unit_price': None, 'amount': None,