Skip to content

Commit 4af4a1a

Browse files
[FIX] l10n_uy_reports: formulario 2181 moneda extranjera
Ticket: 113210 Cuando se genera el formulario 2181 los importes de iva de aquellos comprobantes que están en moneda extranjera no se convierten a moneda de la compañía (UYU) y siempre tenemos que generar los importes de iva en moneda de la compañía. Este pr lo arregla.
1 parent c927781 commit 4af4a1a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

l10n_uy_reports/wizards/form_report_wiz.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def _get_form_2181_data(self):
130130
tax_code[(tax.tax_group_id.id, tax.type_tax_use)] = line_code.get(tax)
131131

132132
invoices = self._get_invoices()
133-
UYU_currency = self.env.ref("base.UYU")
134133

135134
# Revisando que todos los impuestos esten bien configurados
136135
error = ""
@@ -159,16 +158,13 @@ def _get_form_2181_data(self):
159158
amount_total = {}
160159
for inv in invoices:
161160
subtotals = inv.tax_totals.get("subtotals", [])
162-
currency_is_uyu = inv.currency_id == UYU_currency
163161
is_sale = "out_" in inv.move_type
164162
sign = 1 if inv.move_type in ["out_invoice", "in_invoice", "out_receipt", "in_receipt"] else -1
165163

166164
for item in subtotals:
167165
tax_group_ids = item.get("tax_groups", [])
168-
# No estaba ene especifcacion pero vimos via un ejemplo que los montos reportados siempre son en
169-
# pesos, aunque el comprobamte sea de otra moneda, es por eso que utilizamos el monto convertido
170-
tax_amount = item.get("tax_amount") if currency_is_uyu else item.get("tax_amount_currency")
171166
for tax_group_id in tax_group_ids:
167+
tax_amount = tax_group_id.get("tax_amount")
172168
tax_id = tax_group_id["id"]
173169
if tax_id in taxes_group_ids:
174170
key = (tax_id, "sale" if is_sale else "purchase")

0 commit comments

Comments
 (0)