谁能帮我为我们的办公室员工工资税表创建 PHP 或 mysql 代码。
这是我们税收监管的基础。
If salary is >= 0 and <= 150 it will be 0% (Nill),
If salary is >= 151 and <= 650 it will be 10% - 15.00,
If salary is >= 651 and <= 1400 it will be 15% - 47.50,
If salary is >= 1401 and <= 2350 it will be 20% -117.50,
If salary is >= 2351 and <= 3550 it will be 25% - 235.00,
If salary is >= 3551 and <= 5000 it will be 30% - 412.5,
If salary is >= 5001 it will be 35% - 662.50
function get_taxed_salary($salary){
if ($salary <= 150 ){
return $salary;
};
if ($salary <= 650){
return ( 0.9 * $salary - 15.0 );
};
...
}
稍后在您的代码中您将使用该函数,例如:
$taxed_salary = get_taxed_salary($salary);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)