deb-sig / double-entry-generator

Rule-based double-entry bookkeeping importer (from Alipay/WeChat/Huobi etc. to Beancount/Ledger).
https://github.com/deb-sig/double-entry-generator
Apache License 2.0
537 stars 79 forks source link

2023年微信账单,导入零钱通,“转入零钱通-来自零钱“ #106

Closed xiaoyuesansui closed 6 months ago

xiaoyuesansui commented 1 year ago

2023年1月微信账单,csv账单中关于对零钱通的交易类型是”转入零钱通-来自零钱“
但是provider中,好像没有进行更新 程序会返回 Get an unusable tx type, ignore it: 转入零钱通-来自零钱

我尝试以下规则,但是都不好用

Triple-Z commented 1 year ago

我个人的用法:零钱通和零钱是同一个账户,所以没有遇到过这个问题 🤣

能提供一个 csv 样例行吗,到时候我研究下,也补充到这里样例里 https://github.com/deb-sig/double-entry-generator/blob/master/example/wechat/example-wechat-records.csv

xiaoyuesansui commented 1 year ago

哈哈哈哈,这也是个问题 csv 咋提供 我数据已经脱敏好了,然后不知道改怎么上来

Triple-Z commented 1 year ago

把那一行复制到 issue 里就行了。

xiaoyuesansui commented 1 year ago

2023/1/2 19:01:51 转入零钱通-来自零钱 / / / xxxxxx 零钱 支付成功 交易单号 商户单号 备注(/)

xiaoyuesansui commented 1 year ago

返回报错的全文是

[Provider-Wechat] 2023/06/05 14:00:17 Get an unusable tx type, ignore it: 转入零钱通-来自零钱

Triple-Z commented 1 year ago

能把原始格式发上来吗,敏感信息可以屏蔽掉,像这样: https://github.com/deb-sig/double-entry-generator/issues/69#issue-1395211660

xiaoyuesansui commented 1 year ago

[Provider-Wechat] 2023/06/05 17:07:53 Get an unusable tx type, ignore it: 转入零钱通-来自零钱 [Provider-Wechat] 2023/06/05 17:07:53 Get an unusable tx type, ignore it: 转入零钱通-来自零钱

2023/1/2 19:01:00 ,转入零钱通-来自零钱,/,/,/,15736.58,零钱,支付成功,4200001658202301020544822518,18000080172301020022142939242047,/

Triple-Z commented 1 year ago

当初的设计是认为「零钱」和「零钱通」是同一种账户,因此在代码中做了特别判断,忽略零钱与零钱通账户之间的相互交易。

https://github.com/deb-sig/double-entry-generator/blob/b3a1130c36039addc25357a1d0a9eb4079babe02/pkg/provider/wechat/parse.go#L34-L38

若需要将这两个账户区别开来,则需要删除这几行代码,并可借助上个版本支持的 ignore 功能,给老用户提供一个可忽略这两个账户之间交易(当前版本行为)的配置样例。

如果有兴趣的话可以尝试提交 PR 🤣

Triple-Z commented 6 months ago

closed due to inactivity.