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] 自动清理支付宝退款 #116

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

aur3l14no
Copy link
Contributor

目前处理了两种情况

  • 单笔交易, 交易关闭且不记收支
  • 两笔交易, orderId 前缀相同, 金额也相同 详见更新后的 example-alipay.csv

Description

[feat] 自动清理支付宝退款

目前的实现是通过在 provider 中加入了 postprocess 以编辑 IR

Motivation and Context

支付宝订单中存在退款,目前是用 there is a mole 等 log 信息提示,我希望加入自动删除它们的功能,如 #44 的讨论。

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?

使用 example/alipay 中的 csv 文件测试即可,会发现新加入的三行都被自动移除了

Is this change properly documented?

暂时没有,该功能理想情况是可以通过 config 来调节,但目前 provider 没有接受 config...

目前处理了两种情况
- 单笔交易, 交易关闭且不记收支
- 两笔交易, orderId 前缀相同, 金额也相同
详见更新后的 `example-alipay.csv`
@aur3l14no aur3l14no requested review from gaocegege, Triple-Z and a team as code owners July 24, 2023 06:44
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 5fc30ae into deb-sig:master Jul 25, 2023
@Triple-Z
Copy link
Member

@aur3l14no Thanks for your contribution

@w1ndy
Copy link

w1ndy commented Jun 10, 2024

如果消费在信用卡账单日前、退款在账单日后,直接删除两笔交易可能会导致 balance 检查对应不上信用卡账单

2024-01-01 * "cost"
   Liabilities:A -100 CNY
   Expense:A

2024-01-02 balance Liabilities:A -100 CNY

2024-01-03 * "refund"
   Liabilities:A +100 CNY
   Expense:A

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