PHP   发布时间:2022-04-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了php-所得税计算的编程逻辑大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

有谁能帮助我为我们的Office员工薪tax税表创建PHPMysqL代码.
这是我们税收法规的基础.

 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);

大佬总结

以上是大佬教程为你收集整理的php-所得税计算的编程逻辑全部内容,希望文章能够帮你解决php-所得税计算的编程逻辑所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: