国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 长葛市| 信丰县| 东平县| 东丰县| 乳源| 怀化市| 阿鲁科尔沁旗| 佛教| 通城县| 安顺市| 海宁市| 彭泽县| 南阳市| 鹤山市| 高雄市| 清水县| 丰顺县| 合川市| 曲阳县| 石屏县| 永寿县| 清新县| 荥经县| 博野县| 河东区| 鄢陵县| 铜山县| 含山县| 德安县| 石家庄市| 新乡市| 星子县| 北辰区| 龙川县| 兴安盟| 元谋县| 富蕴县| 家居| 南陵县| 永城市| 连城县|