Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Revert "FIX l10n_it_comunicazione_dati_iva (#47)" #73

Open
wants to merge 1 commit into
base: 8.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions l10n_it_comunicazione_dati_iva/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _get_tax_comunicazione_dati_iva(self):
kind_id = tax.kind_id.id
payability = tax.payability
vals_tax_line = \
fattura._get_tax_comunicazione_dati_iva_tax_line_amount(
self._get_tax_comunicazione_dati_iva_tax_line_amount(
tax_line)
val = {
'ImponibileImporto': vals_tax_line['base'],
Expand Down Expand Up @@ -82,7 +82,7 @@ def _get_tax_comunicazione_dati_iva_tax_line_amount(self, tax_line):
'amount': abs(tax_line.tax_amount)
}
# Gestione righe negative
if tax_line.base < 0 or 'refund' in self.type:
if tax_line.base < 0:
vals['base'] = vals['base'] * -1
vals['amount'] = vals['amount'] * -1
return vals
Expand Down Expand Up @@ -115,8 +115,8 @@ def _check_tax_comunicazione_dati_iva_fattura(self, args=None):
args = {}

if 'tot_imponibile' in args:
if not abs(round(self.amount_untaxed, 2)) ==\
abs(round(args['tot_imponibile'], 2)):
if not round(self.amount_untaxed, 2) ==\
round(args['tot_imponibile'], 2):
raise ValidationError(
_("Imponibile ft {} del partner {} non congruente. \
Verificare dettaglio sezione imposte della fattura (\
Expand Down