Merge branch '14-intrastat-decl-fix-amount' of github.com:luc-demeyer/intrastat-extrastat into 14.0

This commit is contained in:
Luc De Meyer
2021-12-27 09:28:20 +01:00

View File

@@ -424,16 +424,6 @@ class IntrastatProductDeclaration(models.Model):
return weight, suppl_unit_qty
def _get_amount(self, inv_line, notedict):
invoice = inv_line.move_id
amount = invoice.currency_id._convert(
inv_line.price_subtotal,
self.company_id.currency_id,
self.company_id,
invoice.date,
)
return amount
def _get_region(self, inv_line, notedict):
"""
For supplier invoices/refunds: if the invoice line is linked
@@ -710,7 +700,7 @@ class IntrastatProductDeclaration(models.Model):
)
total_inv_weight += weight
amount_company_currency = self._get_amount(inv_line, notedict)
amount_company_currency = -inv_line.balance
total_inv_product_cc += amount_company_currency
if inv_intrastat_line: