Skip to content

Commit

Permalink
Merge pull request #246 from gisce/57288-fix_import_b70_typ_b
Browse files Browse the repository at this point in the history
Los tipo B no se consideran de tipo devolución.
  • Loading branch information
eberloso authored Apr 30, 2024
2 parents a21e4df + 1bd5812 commit c16ac2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gestionatr/defs_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2825,7 +2825,7 @@
('1', 'Prioridad alta. '),
]

REFUND_RECTIFICATIVE_TYPES = ['A', 'B'] # 'R' ?
REFUND_RECTIFICATIVE_TYPES = ['A'] # 'R' ?

REQUIRE_REFERENCE_TYPES = [
'A', 'B', 'R'
Expand Down
4 changes: 2 additions & 2 deletions gestionatr/input/messages/B70.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import absolute_import, unicode_literals
from .message_gas import MessageGas
from gestionatr.utils import get_rec_attr
from gestionatr.defs_gas import TIPUS_CONCEPTES, PEAJES_SEMPRE_CAPACIDAD
from gestionatr.defs_gas import TIPUS_CONCEPTES, PEAJES_SEMPRE_CAPACIDAD, REFUND_RECTIFICATIVE_TYPES
from datetime import datetime, timedelta


Expand Down Expand Up @@ -639,7 +639,7 @@ def get_create_invoice_params(self):
return {
'tipo_rectificadora': self.clasefact or self.indfacturarect or 'N',
'date_invoice': self.fecfactura,
'check_total': -1 * self.importetotal if self.clasefact in ('A', 'B') else self.importetotal,
'check_total': -1 * self.importetotal if self.clasefact in REFUND_RECTIFICATIVE_TYPES else self.importetotal,
'origin': self.get_origin(),
'origin_date_invoice': self.fecfactura,
'reference': self.get_origin(),
Expand Down

0 comments on commit c16ac2e

Please sign in to comment.