转载:http://www.oschina.net/code/snippet_123890_35660
我不太明白 $deduct 是如何计算出来的或者是在哪里定义的。
<?php
header("Content-type: text/html; charset=utf-8");
/*
薪水
住房公积金比率
养老保险比率
医疗保险比率
*/
function after_sleep($salary,$housefund_ratio=0.1,$person_insurance_ratio=.08,$medical_insurance_ratio=.04)
{
$base = 3500;
$housefund = $salary * $housefund_ratio; #.10 .08
$person_insurance = $salary * $person_insurance_ratio;
$medical_insurance = $salary * $medical_insurance_ratio;
$insurance=($housefund + $person_insurance +$medical_insurance);
if ($salary - $insurance < $base ){
return $salary - $insurance;
}
$taxable_income= ($salary - $insurance -$base );
if ($taxable_income <=1500 ){
$ratio = .03;
$deduct = 0;
}else if ($taxable_income > 1500 && $taxable_income <=4500) {
$ratio = .1;
$deduct = 105;
}else if ($taxable_income > 4500 && $taxable_income <=9000) {
$ratio = .2;
$deduct = 555;
} else if ($taxable_income > 9000 && $taxable_income <= 35000) {
$ratio = .25;
$deduct = 1005;
} else if ($taxable_income > 35000 && $taxable_income <= 55000) {
$ratio = .3;
$deduct = 2755;
}
$tax = $taxable_income * $ratio-$deduct;
$money = $salary -$insurance-$tax;
return $money;
}
echo "睡前\t睡后\n";
for ($i=5000;$i<=50000;$i+=3000)
echo $i,"\t",after_sleep($i,.08),"\n";
分享到:
相关推荐
自动计算个人所得税的工资表(带汇总、工资条)
工资薪金个人所得税(2011版)正反计算器.
(3)计算完毕后输出,输出内容需包括税前工资,税后工资,应纳所得税额。运行界面 2、类的设计 该系统中必须包括两个类,类名及属性设置如下。 雇员类(Employee) 名称(name) 工资(salary) 加班补贴...
个人所得税中工资薪金所得教学设计.docx
综合应用练习二 工资个人所得税计算器 请用到如下知识点 l if语句的设计和使用; l 类的设计和使用; l 类的构造函数的使用。 需求分析 (1)问题描述 从2006年1月1日起,工资个人所得税标准从1600元起征。对每月...
个人工资计算器 含个人所得税 2013年最新 excel版
对工资税进行计算的函数及相关政策,供初学者参考
通过if 语句得到个人所得税,并输出所得税及到手工资。
工资及个税计算模板(根据2018年修订的个人所得税法).xlsx 工资及个税计算模板(根据2018年修订的个人所得税法).xlsx 工资及个税计算模板(根据2018年修订的个人所得税法).xlsx 工资及个税计算模板(根据2018年...
今天小编就为大家带来一款工资及年终奖个人所得税计算器,这款软件可以帮助大家快速算出工资、年终奖个人所得税等相关数据,无需编写公式就能自动计算,同时支持导出功能,计算后的工资表还可导出成Excel等多种格式...
怎样计算个人所得税 2008年3月开始将执行新的起征点--个人所得税起征点自2008年3月1日起由1600元提高到2000元。
用于查询员工数据表,计算工资个人所得税。 可在SQL Server 2005下运行。
个人所得税计算器 V2.0 中文绿色版_可计算工资、薪金所得的个人所得税
一个基于JAVA的精简版个人所得税源代码
简易的个人所得税计算器 操作十分简单 能根据扣税逆推出工资。
2012工资薪金个人所得税计算器源代码,c# winfrom开发。
计算工资税专用,数据依据2016工资税新规:http://www.3gus.com/ZhiChangFaZe/465821.html
题库:计算个人所得税和工资 .py
个税计算工具网上有的是 这个工具可以通过所交的个人所得税反向计算 可以得到所交个税的工资 这个功能比较有意思!
个人所得税—工资薪金纳税筹划方案.pdf