We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2696e43 commit 319d920Copy full SHA for 319d920
1 file changed
mindee/documents/invoice.py
@@ -208,6 +208,8 @@ def __taxes_match_total_incl(self):
208
total_vat = 0
209
reconstructed_total = 0
210
for tax in self.taxes:
211
+ if tax.value is None or tax.rate is None or tax.rate == 0:
212
+ return False
213
total_vat += tax.value
214
reconstructed_total += tax.value + 100 * tax.value / tax.rate
215
@@ -241,6 +243,8 @@ def __taxes_match_total_excl(self):
241
243
242
244
245
246
247
248
249
reconstructed_total += 100 * tax.value / tax.rate
250
0 commit comments