mirror of
https://gitlab.com/datalifeit/trytond-aeat_sii
synced 2023-12-13 20:30:37 +01:00
Remove not needed line and fix deductible amount calculation
This commit is contained in:
parent
99be12ccc4
commit
4d9306498b
|
@ -58,7 +58,6 @@ class BaseTrytonInvoiceMapper(Model):
|
|||
taxes = self.total_invoice_taxes(invoice)
|
||||
taxes_base = 0
|
||||
taxes_amount = 0
|
||||
val = attrgetter('company_total_amount')(invoice)
|
||||
for tax in taxes:
|
||||
taxes_base += self.get_tax_base(tax)
|
||||
taxes_amount += self.get_tax_amount(tax)
|
||||
|
@ -171,7 +170,7 @@ class RecievedTrytonInvoiceMapper(mapping.RecievedInvoiceMapper,
|
|||
|
||||
val = Decimal(0)
|
||||
for tax in self.taxes(invoice):
|
||||
val += tax.amount
|
||||
val += tax.company_amount
|
||||
# On 4.X change the return for: return val
|
||||
return val if val is None or not credit_note else -val
|
||||
|
||||
|
|
Loading…
Reference in a new issue