Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mintos tax and fix #722

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/estateguru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
type_regex: !!map
deposit: "^Einzahlung.*"
withdraw: "^Auszahlung.*"
interest: "(^Empfehlungsbonus.*)|(^Zins.*)|(^Sondervergütung.*)|(^Empfehlung.*)|(^Bonus.*)"
interest: "(^Empfehlungsbonus.*)|(^Zins.*)|(^Sondervergütung.*)|(^Empfehlung.*)|(^Bonus.*)|(^Strafe.*)"

csv_fieldnames: !!map
booking_date: 'Zahlungsdatum'
Expand Down
6 changes: 3 additions & 3 deletions config/estateguru_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
type_regex: !!map
deposit: "^Deposit.*"
withdraw: "^Withdrawal.*"
interest: "(^Interest.*)|(^Indemnity.*)|(^Referral.*)|(^EG Bonus.*)|(^Secondary Market Profit.*)"
interest: "(^Interest.*)|(^Indemnity.*)|(^Referral.*)|(^EG Bonus.*)|(^Secondary Market Profit.*)|(^Penalty.*)"
fee: "(^Secondary Market Loss.*)|(^Fee.*)"

csv_fieldnames: !!map
booking_date: 'Payment Date'
booking_date_format: '%d/%m/%Y %H:%M'
booking_date: 'Confirmation Date'
booking_date_format: '%d.%m.%Y %H:%M'
booking_details: 'Loan Code'
booking_id: 'ID'
booking_type: 'Cash Flow Type'
Expand Down
3 changes: 2 additions & 1 deletion config/mintos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
type_regex: !!map
deposit: "(Deposits)|(^Incoming client.*)|(^Incoming currency exchange.*)|(^Affiliate partner bonus$)"
withdraw: "(^Withdraw application.*)|(Outgoing currency.*)|(Withdrawal)"
interest: "(^Delayed interest.*)|(^Late payment.*)|(^Interest income.*)|(^Cashback.*)|(^.*[Ii]nterest received.*)|(^.*late fees received$)"
interest: "(^Delayed interest.*)|(^Late payment.*)|(^Interest income.*)|(^Cashback.*)|(^.*[Ii]nterest received.*)|(^.*[Ll]ate fees received$)|(.*interest.*)"
fee: "(^FX commission.*)|(.*secondary market fee$)"
ignorable_entry: ".*investment in loan.*|.*[Pp]rincipal received.*|.*secondary market transaction.*"
special_entry: "(.*discount/premium.*)"
tax: "(.*Tax.*)"

csv_fieldnames:
booking_date: 'Date'
Expand Down
5 changes: 5 additions & 0 deletions src/p2p_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, config):
self._relevant_fee_regex = Config.__get_compiled_regex_or_none(config, ["type_regex", "fee"])
self._ignorable_entry_regex = Config.__get_compiled_regex_or_none(config, ["type_regex", "ignorable_entry"])
self._special_entry_regex = Config.__get_compiled_regex_or_none(config, ["type_regex", "special_entry"])
self._tax = Config.__get_compiled_regex_or_none(config, ["type_regex", "tax"])

self._booking_date = config["csv_fieldnames"]["booking_date"]
self._booking_date_format = config["csv_fieldnames"]["booking_date_format"]
Expand Down Expand Up @@ -66,6 +67,10 @@ def get_special_entry_regex(self):
"""get the special_entry regex"""
return self._special_entry_regex

def get_tax_regex(self):
"""get the tax regex"""
return self._tax

def get_booking_date(self):
"""get the booking_date"""
return self._booking_date
Expand Down
3 changes: 2 additions & 1 deletion src/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def get_category(self):
{"regex": self._config.get_relevant_payment_regex(), "category": "Entnahme"},
{"regex": self._config.get_relevant_fee_regex(), "category": "Gebühren"},
{"regex": self._config.get_special_entry_regex(), "category": "Undecided"},
{"regex": self._config.get_ignorable_entry_regex(), "category": "Ignored"},
{"regex": self._config.get_special_entry_regex(), "category": "Undecided"},
{"regex": self._config.get_tax_regex(), "category": "Steuern"},
]

category = ""
Expand Down