Skip to content

Commit

Permalink
Release 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gpaulissen committed Mar 16, 2024
1 parent 6b153fd commit f45f44a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.6.0] - 2024-03-16

- [When there are no money transactions for deGiro there should be no error message.](https://github.com/gpaulissen/ofxstatement-dutch/issues/6)
- [When there are no money transactions there should be no error message about start/end date/balance.](https://github.com/gpaulissen/ofxstatement-dutch/issues/6)

## [1.5.0] - 2024-02-18

Expand Down
14 changes: 7 additions & 7 deletions src/ofxstatement/plugins/nl/asn.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ def parse(self) -> Statement:
# GJP 2020-03-03
# No need to (re)calculate the balance since there is no history.
# But set the dates.
stmt.start_date = min(sl.date for sl in stmt.lines)
# end date is exclusive for OFX
stmt.end_date = max(sl.date for sl in stmt.lines)
stmt.end_date += datetime.timedelta(days=1)

stmt.start_balance = Decimal(stmt.lines[0].start_balance)
stmt.end_balance = Decimal(stmt.lines[-1].start_balance) + stmt.lines[-1].amount
if stmt.lines:
stmt.start_date = min(sl.date for sl in stmt.lines)
# end date is exclusive for OFX
stmt.end_date = max(sl.date for sl in stmt.lines)
stmt.end_date += datetime.timedelta(days=1)
stmt.start_balance = Decimal(stmt.lines[0].start_balance)
stmt.end_balance = Decimal(stmt.lines[-1].start_balance) + stmt.lines[-1].amount

return stmt

Expand Down
2 changes: 1 addition & 1 deletion src/ofxstatement/plugins/nl/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class Statement(BaseStatement):
def assert_valid(self) -> None:
try:
super().assert_valid()
assert self.end_date, "The statement end date should be set"
# An ING CSV may be a balance file resulting in 0 lines
if len(self.lines) == 0:
return
assert self.end_date, "The statement end date should be set"
min_date = min(sl.date for sl in self.lines)
max_date = max(sl.date for sl in self.lines)
assert self.start_date <= min_date, \
Expand Down

0 comments on commit f45f44a

Please sign in to comment.