作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

bug修改

... ... @@ -323,7 +323,7 @@ class AfterToBefore extends Api
}
// 累计个人所得税
$person_fee_total = $suode == 0 ? 0 : $suode+$dec_fee_total-$salary_hand;
if((empty($social_base) && empty($housing_fund_base)) || ($social_base == $salary_hand_average && $housing_fund_base == $salary_hand_average)){
if($social_base == $salary_hand_average && $housing_fund_base == $salary_hand_average){
// 个人五险一金比例
$wuxianyijin_rate = ($social_rate_user['endowment']+$social_rate_user['medical']+$social_rate_user['unemployment']+$social_rate_user['birth']+$housing_fund_rate)/100;
$fee_top = $social_top * $wuxianyijin_rate; //三金封顶费用
... ... @@ -392,10 +392,6 @@ class AfterToBefore extends Api
'money' => round($san_gong_money_total/$wuxianyijin_rate*($social_rate_company['industrial']/100)/$month,2)
],
];
// 社保汇缴基数
$social_base = $salary_average > $social_top ? $social_top : ($salary_average < $social_bottom ? $social_bottom : $salary_average);
// 公积金汇缴基数
$housing_fund_base = $salary_average > $housing_fund_top ? $housing_fund_top : ($salary_average < $housing_fund_bottom ? $housing_fund_bottom : $salary_average);
}else{
// 每月个人承担的三险比例(其中养老8%,医疗2%,失业0.5%,三种保险总和为10.5%,上海地区个人承担的三种保险比例一致。)
$social_rate = ($social_rate_user['endowment']+$social_rate_user['medical']+$social_rate_user['unemployment']+$social_rate_user['birth']+$social_rate_user['industrial'])/100;
... ... @@ -582,6 +578,13 @@ class AfterToBefore extends Api
]
],$user_go['en']),
];
// 基数
if($social_base == $salary_hand_average && $housing_fund_base == $salary_hand_average){
// 社保汇缴基数
$social_base = $salary_average > $social_top ? $social_top : ($salary_average < $social_bottom ? $social_bottom : $salary_average);
// 公积金汇缴基数
$housing_fund_base = $salary_average > $housing_fund_top ? $housing_fund_top : ($salary_average < $housing_fund_bottom ? $housing_fund_bottom : $salary_average);
}
$this->success('请求成功',compact('param','salary_average','social_user','social_user_money','social_company','social_company_money','person_fee_average','company_cost','user_go','company_go','social_base','housing_fund_base'));
}
... ...