php计算税后工资的方法

文章主要介绍了php计算税后工资的方法,涉及php流程控制及数学运算的'相关技巧,比较简单实用,需要的朋友可以参考下.

本文实例讲述了php计算税后工资的方法。分享给大家供大家参考。具体如下:

税前  税后

5000  3985

8000  6215

11000  8295

14000  10215

17000  12080

20000  13880

23000  15680

26000  17480

29000  19280

32000  21080

35000  22880

38000  24680

41000  26480

44000  28280

47000  30080

50000  31805

function after_sleep($salary,$housefund_ratio=0.1,$person_insurance_ratio=.08,$medical_insurance_ratio=.04)

{

$base = 3500;

$housefund = $salary * $housefund_ratio; //.10 .8

$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";

【php计算税后工资的方法】相关文章:

PHP折算,php计算税后工资的方法相关推荐

  1. php 计算工资,php计算税后工资的方法_PHP

    本文实例讲述了php计算税后工资的方法.分享给大家供大家参考.具体如下: 税前 税后 5000 3985 8000 6215 11000 8295 14000 10215 17000 12080 20 ...

  2. php的工资详解,php计算税后工资的方法

    本文实例讲述了php计算税后工资的方法.分享给大家供大家参考.具体如下: 税前  税后 5000  3985 8000  6215 11000  8295 14000  10215 17000  12 ...

  3. PHP税前税后,php计算税后工资的方法

    本文实例讲述了php计算税后工资的方法.分享给大家供大家参考.具体如下: 税前 税后 5000 3985 8000 6215 11000 8295 14000 10215 17000 12080 20 ...

  4. Java计算税后工资和税前工资推算

    计算税后工资(扣税基数base=3500,可以根据最新情况修改,如5000) @Test public void test() {double money = 30000; //税前工资 double ...

  5. 「Python条件结构」if…else实现计算税后工资

    功能要求 个人所得税收取规定:工资大于3000元的部分将扣除5%的个人所得税.小于3000元的部分不扣除个人所得税.要求从键盘上输入用户的基本工资,根据用户输入的基本工资,计算税后工资,并将税后工资打 ...

  6. Leetcode力扣 MySQL数据库 1468 计算税后工资

    1468 计算税后工资 SQL架构 Create table If Not Exists Salaries_1468 (company_id int, employee_id int, employe ...

  7. LeetCode MySQL 1468. 计算税后工资

    文章目录 1. 题目 2. 解题 1. 题目 Salaries 表: +---------------+---------+ | Column Name | Type | +------------- ...

  8. 1468. 计算税后工资(SQL)

    题目:https://leetcode-cn.com/problems/calculate-salaries/ Salaries 表: +---------------+---------+ | Co ...

  9. 税后工资和税前工资的对应计算

    前段时间参加一个公司的笔试,其中一个题目是实现税前工资和税后工资的相应转化(由税前求税后.由税后求税前).题目介绍如下: 下表是2011年9月1日起调整后现行的7级超额累进税率(原题目中没有最后一列) ...

最新文章

  1. ASP.NET Web Pages – 文件简介
  2. 裂痕第一至五季/以法之名Damages迅雷下载
  3. python 用两个栈实现一个队列
  4. 2017CCPC秦皇岛 L题One-Dimensional MazeZOJ3992【模拟】
  5. 使用泛型, 写一个为任意类型的动态数组添加元素的方法
  6. 判断活动窗口_蒙城活动推拉棚定做厂家
  7. CentOS 关闭防火墙selinux
  8. 《软件工程导论》考研复习
  9. python自回归模型_21向量自回归模型
  10. 软件测试专业川内大学,四川大学分析测试中心
  11. 码云的注册与使用,很简单
  12. 联想服务器pe进系统还原,传授联想如何一键还原系统
  13. XP与Win7默认下时间分隔符不同
  14. Java 中 Boolean 和 boolean的默认值和修改默认值
  15. PHP数组到底占用多少内存空间
  16. nmap+nagios
  17. Python爬虫实战(3):安居客房产经纪人信息采集
  18. 【数据结构】红黑树入门知识
  19. 【What if 系列】全球雪封
  20. 论文笔记_SIGGRAPH2019会前课程:An Introduction to Physics-Based Animation_3

热门文章

  1. 猎人打猎(二)----利用继承
  2. 餐厅设置套餐 html,餐厅如何设计爆款套餐?掌握这5个原则就够了
  3. 万元:蜂拥而至 地产板块注意风险但机遇犹存
  4. 月薪30k的程序员应聘时面试官都会问什么问题
  5. 关于zip包解压之后文件打开出现文件损坏的问题
  6. 梳理公司的组织架构 --- 组合模式
  7. Sketch for mac(专业矢量绘图设计软件)
  8. AD采集中常用的Ksps什么意思
  9. 使用log4j接管tomcat日志
  10. MySQL数据库中,字符串拆分(如将英文姓名拆分为姓氏和名字两个字段)