Skip to main content

A beancount plugin to calculate and validate china personal income tax

Project description

本插件用于 beancount 计算每 月所应缴纳的中华人民共和国个人所得税. 如计算金额与实际缴纳额度不同, bean-checkbeancount-fava 会显示 error.

税表和扣除项目

插件所使用税表来自 中华人民共和国个人所得税法 所附 附件1:个人所得税税率表(综合所得适用).pdf

级数 年应纳税所得额 税率(%) 速算扣除数
1 不超过36000元的 3 0
2 超过36000元至144000元的部分 10 2520
3 超过144000元至300000元的部分 20 16920
4 超过300000元至420000元的部分 25 31920
5 超过420000元至660000元的部分 30 52920
6 超过660000元至960000元的部分 35 85920
7 超过960000元的部分 45 181920

根据 2006第07期-基本养老保险, 基本医疗保险费, 失业保险费, 住房公积金免征个人所得税个人所得税专项附加扣除暂行办法, 纳税人可享有相应扣除项目, 可在本插件中指定扣除账户或扣除额度.

使用方法

beancount 插件的工作流程和使用方法可参考 Beancount Scripting & Plugins. 最简单的方法是 pip install beancount-china-income-tax, 然后在 beanount 里指定

plugin "beancount-china-income-tax.china_income_tax" "category=china-income-tax,account=Expenses:IncomeTax"

在参与所得税计算的 beancount 账户和 transaction 下指定 category:china-income-tax, 如:

1970-01-01 open Income:Salary
  category: "china-income-tax"
1970-01-01 open Income:Allowance
  category: "china-income-tax"
1970-01-01 open Expenses:Pension
  category: "china-income-tax"

可在 transaction thread 下用 tax-deduction 修正税款计算, 如下面的示例 中 tax-deduction: -3300. 负数为扣除, 正数为增加 (如有未记录的额外收益时).

2022-01-31 * "salary"
  category: "china-income-tax"
  tax-deduction: -3300
  Income:Allowance                          -500 CNY
  Income:Salary                           -40000 CNY
  Expenses:Pension                          1000 CNY
  Expenses:IncomeTax:2022                 410.41 CNY
  Assets:BankCard

本插件会根据相应账户收支及指定的扣除来计算应纳税额. 如果 Expenses:IncomeTax:2022 的税款与插件计算不符, beancount-fava 会显示

income tax does not match, calculated: 1005.00, actual: 410.41

设置选项

option 分类 用途 是否必需? 示例
category plugin/transaction option 指定参与本插件计算的账户和 transaction category=china-income-tax
account plugin option 税款账户前缀 account=Expenses:IncomeTax
monthly-deduction plugin option 每月的修正额度, 默认为 -5000, 正数为增加 monthly-deduction=-5000
precise plugin option 税款账户比较精度, 默认为 0.01 precise=0.01
tax-deduction transaction option 指定 transaction 的税款计算修正, 默认为 0 tax-deduction: -1100

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beancount-china-income-tax-0.1.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

beancount_china_income_tax-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file beancount-china-income-tax-0.1.2.tar.gz.

File metadata

File hashes

Hashes for beancount-china-income-tax-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dfd37dfffe90f805fdb99ece36df04c7c23d280bb30ff5c3bb559ff2bbc34e61
MD5 b03f61816cfe5b9d7ed8b173fd5620c0
BLAKE2b-256 f2901e4c6e1c931b5b4e9b589b5e5f42da39213ea5f9f5314dfb774926563b70

See more details on using hashes here.

File details

Details for the file beancount_china_income_tax-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for beancount_china_income_tax-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6e420665950898b2da50943eca52bab0e3408dd1e650815564754993130e1a7
MD5 0051e087061123e015f47e53df906b47
BLAKE2b-256 68388903e2af291b0f8cf5e775d3d62f476e8f790eab73c0de2b48a4930f50a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page