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

bug修改

... ... @@ -267,9 +267,6 @@ class AfterToBefore extends Api
// 社保基数
$social_top = config('site.social_top'); //社保封顶金额
$social_bottom = config('site.social_bottom'); //社保保底金额
// 公积金基数
$housing_fund_top = config('site.housing_fund_top'); //公积金封顶金额
$housing_fund_bottom = config('site.housing_fund_bottom'); //公积金保底金额
// 公积金缴存比例5%-7%
$social_rate_user = Db::name('social_insurance_rate')->where('id',1)->find();
$social_rate_company = Db::name('social_insurance_rate')->where('id',2)->find();
... ... @@ -499,7 +496,7 @@ class AfterToBefore extends Api
// 社保汇缴基数
$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);
$housing_fund_base = $social_base;
$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'));
}
... ...
... ... @@ -347,7 +347,7 @@ class BeforeToAfter extends Api
// 公司每月承担的工伤金额
$company_industrial_money = $social_base * $industrial_rate_company/100;
// 公司每月承担公积金金额
$company_housing_fund = $social_base * $housing_fund_rate/100;
$company_housing_fund = $housing_fund_base * $housing_fund_rate/100;
// 新税法下方案A平均每月用人成本(包括年终奖)
$cost_new_a = $salary + $company_fourxian_money + $company_industrial_money + $company_housing_fund + $annual_bonus/12;
// 老税法下方案A平均每月用人成本(包括年终奖)
... ...