Skip to content

Commit

Permalink
Merge 9e72984 into e418f2c
Browse files Browse the repository at this point in the history
  • Loading branch information
cfstras committed Jan 8, 2019
2 parents e418f2c + 9e72984 commit dbb3cf8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mt940/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,18 @@ def __call__(self, transactions, value):
data['date'] = models.Date(**data)

if data.get('entry_day') and data.get('entry_month'):
data['entry_date'] = models.Date(
entry_date = models.Date(
day=data.get('entry_day'),
month=data.get('entry_month'),
year=str(data['date'].year),
)
if entry_date.month == 1 and data['date'].month == 12:
entry_date = models.Date(
day=str(entry_date.day),
month=str(entry_date.month),
year=str(entry_date.year + 1),
)
data['entry_date'] = entry_date
return data


Expand Down

0 comments on commit dbb3cf8

Please sign in to comment.