Skip to content

Commit 324619c

Browse files
fix: 🐛 check receipt tax rates are non null in __taxes_match_total_incl
1 parent 319d920 commit 324619c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mindee/documents/receipt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __taxes_match_total(self):
189189
total_vat = 0
190190
reconstructed_total = 0
191191
for tax in self.taxes:
192-
if tax.value is None or tax.rate is None:
192+
if tax.value is None or tax.rate is None or tax.rate == 0:
193193
return False
194194
total_vat += tax.value
195195
reconstructed_total += tax.value + 100 * tax.value / tax.rate

0 commit comments

Comments
 (0)