国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > PHP > 正文

php計算稅后工資的方法

2024-05-04 23:38:09
字體:
供稿:網(wǎng)友

這篇文章主要介紹了php計算稅后工資的方法,涉及php流程控制及數(shù)學(xué)運算的相關(guān)技巧,比較簡單實用,需要的朋友可以參考下

本文實例講述了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

 

 
  1. <?php 
  2. function after_sleep($salary,$housefund_ratio=0.1,$person_insurance_ratio=.08,$medical_insurance_ratio=.04) 
  3. $base = 3500; 
  4. $housefund = $salary * $housefund_ratio; //.10 .8 
  5. $person_insurance = $salary * $person_insurance_ratio; 
  6. $medical_insurance = $salary * $medical_insurance_ratio; 
  7. $insurance=($housefund + $person_insurance +$medical_insurance); 
  8. if ($salary - $insurance < $base ){ 
  9. return $salary - $insurance; 
  10. $taxable_income= ($salary - $insurance -$base ); 
  11. if ($taxable_income <=1500 ){ 
  12. $ratio = .03; 
  13. $deduct = 0; 
  14. }else if ($taxable_income > 1500 && $taxable_income <=4500) { 
  15. $ratio = .1; 
  16. $deduct = 105; 
  17. }else if ($taxable_income > 4500 && $taxable_income <=9000) { 
  18. $ratio = .2; 
  19. $deduct = 555; 
  20. else if ($taxable_income > 9000 && $taxable_income <= 35000) { 
  21. $ratio = .25; 
  22. $deduct = 1005; 
  23. else if ($taxable_income > 35000 && $taxable_income <= 55000) { 
  24. $ratio = .3; 
  25. $deduct = 2755; 
  26. $tax = $taxable_income * $ratio-$deduct; 
  27. $money = $salary -$insurance-$tax; 
  28. return $money; 
  29. echo "稅前/t稅后/n"
  30. for ($i=5000;$i<=50000;$i+=3000) 
  31. echo $i,"/t",after_sleep($i,.08),"/n"

希望本文所述對大家的php程序設(shè)計有所幫助。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 台中县| 隆德县| 皮山县| 康保县| 信宜市| 任丘市| 水富县| 南溪县| 普安县| 汾西县| 长泰县| 南和县| 兴安县| 泰州市| 揭阳市| 偏关县| 房产| 四会市| 乳山市| 南京市| 那曲县| 东阳市| 卢龙县| 双桥区| 宾阳县| 临夏市| 习水县| 盖州市| 鄂伦春自治旗| 新兴县| 左贡县| 蕉岭县| 兴山县| 监利县| 南城县| 池州市| 靖西县| 苏尼特右旗| 宽城| 莱阳市| 景洪市|