]> git.parisson.com Git - teleforma.git/commitdiff
Modify invoice date : https://trackers.pilotsystems.net/prebarreau/0377
authorYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 23 Mar 2022 12:23:36 +0000 (13:23 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 23 Mar 2022 12:23:36 +0000 (13:23 +0100)
teleforma/views/crfpa.py

index 1722581c6a1c2236aea27a590742745661bc2f65..d3a9248fa6d49801bbb8a3665ab9c89a510775e4 100644 (file)
@@ -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': '<b>Paiement %s du %s</b>' % (kind, date),
                            'unit_price': None,
                            'amount': None,