mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
@@ -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,8 @@ class IntrastatProductDeclaration(models.Model):
|
||||
)
|
||||
total_inv_weight += weight
|
||||
|
||||
amount_company_currency = self._get_amount(inv_line, notedict)
|
||||
sign = invoice.move_type in ("in_invoice", "out_refund") and 1 or -1
|
||||
amount_company_currency = sign * inv_line.balance
|
||||
total_inv_product_cc += amount_company_currency
|
||||
|
||||
if inv_intrastat_line:
|
||||
|
||||
Reference in New Issue
Block a user