projects
/
pgeu-system.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45362d5
)
Generate a fake payment link when previewing invoice
author
Magnus Hagander
<magnus@hagander.net>
Tue, 12 Nov 2024 09:24:39 +0000
(10:24 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Tue, 12 Nov 2024 09:24:39 +0000
(10:24 +0100)
This way we get to see the qr code on the preview as well, even
though it can of course not be used. But it helps adjusting layouts.
postgresqleu/invoices/views.py
patch
|
blob
|
blame
|
history
diff --git
a/postgresqleu/invoices/views.py
b/postgresqleu/invoices/views.py
index 66d1c7719741fa81b5955fde59e022ca293cb668..5407d03d687c73e6caee9313ed8ef7a6d2ff2628 100644
(file)
--- a/
postgresqleu/invoices/views.py
+++ b/
postgresqleu/invoices/views.py
@@
-340,6
+340,9
@@
def previewinvoice(request, invoicenum):
invoice = get_object_or_404(Invoice, pk=invoicenum)
+ # Fake a secret so we get the QR code
+ invoice.recipient_secret = 'x' * 64
+
# We assume there is no PDF yet
wrapper = InvoiceWrapper(invoice)
r = HttpResponse(content_type='application/pdf')