Skip to content

Commit aae603e

Browse files
committed
Allow buyer address to be not supplied in invoices
1 parent 4bf5350 commit aae603e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: shaibos/invoice.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def from_dictionary(cls, dictionary):
128128
dictionary.get('correspondent_bank', None))
129129
return cls(
130130
name=dictionary['name'],
131-
address=dictionary['address'],
131+
address=dictionary.get('address', None),
132132
languages=dictionary['languages'],
133133
personal_number=dictionary.get('personal_number', None),
134134
company_code=dictionary.get('company_code', None),

Diff for: shaibos/templates/basic.jinja2

+2
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@
441441
<strong>{{ i18n_string(buyer.name, language) }}</strong>
442442
</td>
443443
</tr>
444+
{% if buyer.address %}
444445
<tr>
445446
<td>
446447
<strong class="seller-right">{{ i18n_string(buyer.address, language) }}</strong>
@@ -450,6 +451,7 @@
450451
{% endcall %}
451452
</td>
452453
</tr>
454+
{% endif %}
453455
{% if buyer.personal_number %}
454456
<tr>
455457
<td>

0 commit comments

Comments
 (0)