Skip to content

Commit

Permalink
Merge PR #4025 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 28, 2025
2 parents 8f1e36c + 6672b05 commit ed1f4b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions l10n_es_facturae/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,11 @@ def _check_totals(self, move, subtotal, base, tax, total):
)[0].text,
("%.2f" if version == "3_2" else "%.8f") % 5,
)
sign = -1 if move.move_type == "out_refund" else 1
self.assertEqual(
generated_facturae.xpath("//InvoiceTotals//TotalExecutableAmount")[0].text,
("%.2f" if version == "3_2" else "%.8f") % (float(total) - (sign * 5)),
)

def test_move_rounding(self):
self._activate_certificate(self.certificate_password)
Expand Down
2 changes: 1 addition & 1 deletion l10n_es_facturae/views/report_facturae.xml
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
/>
</AmountsWithheld>
<TotalExecutableAmount
t-out="('%.2f' if version == '3_2' else '%.8f') % (sign * move.amount_total)"
t-out="('%.2f' if version == '3_2' else '%.8f') % (sign * move.amount_total - (sign * move.facturae_withheld_amount))"
/>
<TotalReimbursableExpenses t-if="False" />
<t t-if="version not in ('3_2', '3_2_1')">
Expand Down

0 comments on commit ed1f4b3

Please sign in to comment.