PHP折算,php计算税后工资的方法
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计算税后工资的方法相关推荐
- php 计算工资,php计算税后工资的方法_PHP
本文实例讲述了php计算税后工资的方法.分享给大家供大家参考.具体如下: 税前 税后 5000 3985 8000 6215 11000 8295 14000 10215 17000 12080 20 ...
- php的工资详解,php计算税后工资的方法
本文实例讲述了php计算税后工资的方法.分享给大家供大家参考.具体如下: 税前 税后 5000 3985 8000 6215 11000 8295 14000 10215 17000 12 ...
- PHP税前税后,php计算税后工资的方法
本文实例讲述了php计算税后工资的方法.分享给大家供大家参考.具体如下: 税前 税后 5000 3985 8000 6215 11000 8295 14000 10215 17000 12080 20 ...
- Java计算税后工资和税前工资推算
计算税后工资(扣税基数base=3500,可以根据最新情况修改,如5000) @Test public void test() {double money = 30000; //税前工资 double ...
- 「Python条件结构」if…else实现计算税后工资
功能要求 个人所得税收取规定:工资大于3000元的部分将扣除5%的个人所得税.小于3000元的部分不扣除个人所得税.要求从键盘上输入用户的基本工资,根据用户输入的基本工资,计算税后工资,并将税后工资打 ...
- Leetcode力扣 MySQL数据库 1468 计算税后工资
1468 计算税后工资 SQL架构 Create table If Not Exists Salaries_1468 (company_id int, employee_id int, employe ...
- LeetCode MySQL 1468. 计算税后工资
文章目录 1. 题目 2. 解题 1. 题目 Salaries 表: +---------------+---------+ | Column Name | Type | +------------- ...
- 1468. 计算税后工资(SQL)
题目:https://leetcode-cn.com/problems/calculate-salaries/ Salaries 表: +---------------+---------+ | Co ...
- 税后工资和税前工资的对应计算
前段时间参加一个公司的笔试,其中一个题目是实现税前工资和税后工资的相应转化(由税前求税后.由税后求税前).题目介绍如下: 下表是2011年9月1日起调整后现行的7级超额累进税率(原题目中没有最后一列) ...
最新文章
- ASP.NET Web Pages – 文件简介
- 裂痕第一至五季/以法之名Damages迅雷下载
- python 用两个栈实现一个队列
- 2017CCPC秦皇岛 L题One-Dimensional MazeZOJ3992【模拟】
- 使用泛型, 写一个为任意类型的动态数组添加元素的方法
- 判断活动窗口_蒙城活动推拉棚定做厂家
- CentOS 关闭防火墙selinux
- 《软件工程导论》考研复习
- python自回归模型_21向量自回归模型
- 软件测试专业川内大学,四川大学分析测试中心
- 码云的注册与使用,很简单
- 联想服务器pe进系统还原,传授联想如何一键还原系统
- XP与Win7默认下时间分隔符不同
- Java 中 Boolean 和 boolean的默认值和修改默认值
- PHP数组到底占用多少内存空间
- nmap+nagios
- Python爬虫实战(3):安居客房产经纪人信息采集
- 【数据结构】红黑树入门知识
- 【What if 系列】全球雪封
- 论文笔记_SIGGRAPH2019会前课程:An Introduction to Physics-Based Animation_3