Skip to content

Commit

Permalink
Update termination conditions for PUMB and Sense importers
Browse files Browse the repository at this point in the history
Seen these in the latest account statements, perhaps due to the product updates.
  • Loading branch information
OSadovy committed Nov 19, 2023
1 parent adf4cc5 commit 88bbe4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/uabean/importers/pumb_xls.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def extract(self, filename, existing_entries=None):
None,
)
continue
if row[3].value and row[3].value.strip() == "Нет операций":
continue
if row[0].value == "ВСЬОГО":
break
meta = data.new_metadata(filename, i + 1)
Expand Down
6 changes: 4 additions & 2 deletions src/uabean/importers/sensebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ def extract(self, filename, existing_entries=None):
account = self.account_config[m.group(1)]
currency = m.group(2)
for row in reader:
if row[0].startswith("Деталізація операцій") or row[0].startswith(
"Дата і час"
if (
row[0].startswith("Деталізація операцій")
or row[0].startswith("Дата і час")
or row[0].startswith("Вклади гарантуються ")
):
continue
meta = data.new_metadata(filename, reader.line_num)
Expand Down

0 comments on commit 88bbe4f

Please sign in to comment.