Skip to content

Commit

Permalink
[FIX] l10n_ar_account_tax_settlement: inconsistencia en sicore con nc
Browse files Browse the repository at this point in the history
closes #240

Ticket: 61671
X-original-commit: 59665b2
Signed-off-by: Katherine Zaoral <kz@adhoc.com.ar>
  • Loading branch information
pablohmontenegro authored and zaoral committed Jul 19, 2023
1 parent a6cb301 commit c2edbed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion l10n_ar_account_tax_settlement/models/account_journal.py
Expand Up @@ -1150,6 +1150,7 @@ def sicore_aplicado_files_values(self, move_lines):
elif move.is_invoice():
# Codigo del Comprobante [ 2]
tipodoc = int(move.l10n_latam_document_type_id.code)
es_nc = False

if tipodoc in [1, 6, 19, 51, 81, 82, 118, 201, 206]:
# Factura
Expand All @@ -1160,6 +1161,7 @@ def sicore_aplicado_files_values(self, move_lines):
elif tipodoc in [3, 8, 21, 53, 43, 44, 110, 112, 113, 114, 119, 203, 208]:
# Nota de Crédito
content += '03'
es_nc = True
elif tipodoc in [2, 7, 20, 52, 45, 46, 115, 116, 120, 202, 207]:
# Nota de Débito
content += '04'
Expand All @@ -1175,7 +1177,10 @@ def sicore_aplicado_files_values(self, move_lines):
content += '%05d' % int(re.sub('[^0-9]', '', move.l10n_latam_document_number)[:5])
content += '%011d' % int(re.sub('[^0-9]', '', move.l10n_latam_document_number)[5:])
issue_date = move.invoice_date
base_amount = line.tax_base_amount
# si la percepción es sobre una nota de crédito informamos el importe de la percepción
# aclaración: no tenemos ningún respaldo documental respecto a esto, solo lo hicimos para
# solucionar la inconsistencia del ticket 61671
base_amount = line.tax_base_amount if es_nc==False else line.balance
codop = '2'
#Importe del comprobante
amount_tot = abs(move.amount_total_signed)
Expand Down

0 comments on commit c2edbed

Please sign in to comment.