python 计算税收
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 计算税收相关的知识,希望对你有一定的参考价值。
income = {
'1': 3.0,
'2': 3.0,
'3': 3.0,
'4': 3.0,
'5': 3.0,
'6': 3.0,
'7': 3.0,
'8': 3.0,
'9': 3.0,
'10': 3.0,
'11': 3.0,
'12-1': 3.0,
'12-2': 3.0,
'12-3': 3.0
}
PENSION_FIXED_2015 = 3650.58 + 18610.8
total = sum(income.values())
avg = total / 12
pension = (total - 300000.0) * 0.01
pension_all = pension + PENSION_FIXED_2015
taxes = total * 0.03 - pension_all
def tax_info(qnum, qincome):
perc3 = round(qincome * 0.03 + 0.5)
pensn = ((PENSION_FIXED_2015 / 12) * 3 * qnum + (qincome - 300000.0) * 0.01)
diff = round((perc3 - pensn) + 0.5)
result = (
'{0} quartal incom = {1}\n'
'{0} quartal 3% = {2}\n'
'{0} quartal pensn = {3}\n'
'{0} quartal 3-pns = {4}\n'
).format(
str(qnum),
qincome,
perc3,
pensn,
diff)
return result
print('So youve got\n'
'total income = {}\n'
'average monthly income = {}\n'
'variable pension fund payment = {}\n'
'total pension fund payment = {}\n'
'3 precent taxes(minus pension payment) {}\n\n'.format(
total, avg, pension, pension_all, taxes))
print('pension variable(percent) KBK : 39210202010062200160')
income1 = sum(income[i] for i in '123')
print(tax_info(1, income1))
income2 = sum(income[i] for i in '123456')
print(tax_info(2, income2))
income3 = sum(income[i] for i in '123456789')
print(tax_info(3, income3))
print(tax_info(4, total))
以上是关于python 计算税收的主要内容,如果未能解决你的问题,请参考以下文章
价格计算(税收和折扣)
以编程方式重新计算 Acumatica 税收和折扣
SAP Brazil J1BTAX 为税收例外创建税收组(翻译)
python分段算利润税收
贝宝订阅和税收
税率计算