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

[feat] 增加对海外银行 bmo provider 的支持 #113

Merged
merged 8 commits into from
Jun 19, 2023

Conversation

ramsayleung
Copy link
Contributor

@ramsayleung ramsayleung commented Jun 18, 2023

Description

double-entry-generator 增加对海外银行 BMO 的账单支持

BMO

BMO 是加拿大的五大银行之一, 与 TD 齐名, 主要业务在加拿大.

Transaction Statement

Debit

BMO的存储卡账单相当简洁 (简陋), 只有5个字段:

First Bank Card Transaction Type Date Posted Transaction Amount Description
'5678653123124124' CREDIT 20230501 0.01 [DN]ACFS MSP/DIV
'5678653123124124' DEBIT 20230518 -68.32 [CW]TELUS MOB
'5678653123124124' DEBIT 20230523 -50.0 [CW]BC HYDRO
'5678653123124124' DEBIT 20230612 -40.0 [IB] 6088 #3 ROAD
  1. 只有支付日期,没有支付具体时间
  2. 没有交易对手(Peer) 和 商品(Item)字段, 都合并在 Transaction Description, 因此将 Transaction Description 当作 Item 字段, Peer 字段为 TD

Credit

信用卡账单更简单,有用的字段只有3个, 通过金额正负来判断交易方向.

Item # Card # Transaction Date Posting Date Transaction Amount Description
1 '5191230567984561' 20230511 20230512 3.27 COSTCO WHOLESALE W54 SURREY BC
2 '5191230567984561' 20230511 20230512 85.06 COSTCO WHOLESALE W54 SURREY BC
3 '5191230567984561' 20230512 20230515 - 6.0 PAYMENT RECEIVED THANK YOU

Modification

  1. example/bmo: 增加bmo 相关的配置, 生成账单
  2. analyser/bmo: analyser 增加 bmo 相关内容
  3. provider/bmo: 增加 bmo provider
  4. test: 增加 bmo 相关test

我尽量提交最少修改的PR, 但是新增一个 workable provider 以及相应 test, example 的改动量着实较大, 见谅见谅

Motivation and Context

#112

Dependencies

None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • [x]: sh test/bmo-test-beancount.sh: passed
  • [x]: sh test/bmo-test-ledger.sh: passed
  • [x]: make test: all tests passed

Is this change properly documented?

Please make sure you've properly documented the changes you're making.

Don't forget to add an entry to the CHANGELOG/README if necessary (new features, breaking changes, relevant internal improvements).

后续提另外的PR更新README.

@ramsayleung ramsayleung requested review from gaocegege, Triple-Z and a team as code owners June 18, 2023 21:22
Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

Copy link
Member

@Triple-Z Triple-Z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Triple-Z Triple-Z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Triple-Z Triple-Z merged commit 75d1e35 into master Jun 19, 2023
@Triple-Z Triple-Z deleted the ramsay/add_bmo_provoder branch June 19, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants