Skip to content

Commit

Permalink
[FIX] l10n_ar_afipws_fe: get related invoice proper filter
Browse files Browse the repository at this point in the history
When credit/debit note of type FCE (Mipyme) the rules of the related
invoices change depending if the invoice has been set or not as as
afip_fce_es_anulacion.
  • Loading branch information
zaoral committed Jul 29, 2020
1 parent ed14f3c commit 49a08e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions l10n_ar_afipws_fe/models/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ def get_related_invoices_data(self):
([52, 53], [51, 52, 53, 54, 88, 991]),
([1, 6, 51], [88, 991]),
([201, 206, 211], [91, 990, 991, 993, 994, 995]),
([202, 203], [201, 202, 203]),
([207, 208], [206, 207, 208]),
([212, 213], [211, 212, 213])
([202, 203], [201, 202, 203] if self.afip_fce_es_anulacion else [201, 91, 88, 988, 990, 991, 993, 994, 995, 996, 997]),
([207, 208], [206, 207, 208] if self.afip_fce_es_anulacion else [206, 91, 88, 988, 990, 991, 993, 994, 995, 996, 997]),
([212, 213], [211, 212, 213] if self.afip_fce_es_anulacion else [211, 91, 88, 988, 990, 991, 993, 994, 995, 996, 997]),
]
available_codes = list(filter(lambda x: int(self.document_type_id.code) in x[0], code_rules))
available_codes = available_codes[0][1] if available_codes else []
Expand Down

0 comments on commit 49a08e7

Please sign in to comment.