Skip to content

Commit 7d4f585

Browse files
committed
feat(invoice): add tax document warning on proforma
1 parent b5ebf74 commit 7d4f585

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

weblate_web/invoices/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,10 @@ def can_be_paid(self, *state: InvoiceKind) -> bool:
763763
def is_final(self):
764764
return self.kind == InvoiceKind.INVOICE
765765

766+
@property
767+
def is_proforma(self):
768+
return self.kind == InvoiceKind.PROFORMA
769+
766770
def get_payment_url(self) -> str | None:
767771
if self.can_be_paid():
768772
return get_site_url("invoice-pay", pk=self.pk)

weblate_web/invoices/templates/invoice-template.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,20 @@ <h2>Issued by</h2>
223223

224224
{% endif %}
225225
{% endif %}
226-
{% if invoice.is_final %}This is a computer-generated invoice; signature not required.{% endif %}
226+
{% if invoice.is_final %}
227+
This is a computer-generated invoice; signature not required.
228+
{% elif invoice.is_proforma %}
229+
This is not a tax document.
230+
{% endif %}
227231
</p>
228232
<table id="details">
229233
<tbody>
230234
<tr>
231235
<th>
232236
{% if invoice.is_draft %}
233237
Quote date
238+
{% elif invoice.is_proforma %}
239+
Issue date
234240
{% else %}
235241
Date of taxable supply
236242
{% endif %}

0 commit comments

Comments
 (0)