fix: 劳务协议等非劳动合同类型不计算社保公积金
合同类型为 LABOR/INTERNSHIP/PARTTIME/OUTSOURCING/UNSIGNED 时 socialInsCalc 和 housingFundCalc 返回 null
This commit is contained in:
@@ -225,12 +225,17 @@ router.get('/', authMiddleware, async (req: AuthRequest, res, next) => {
|
||||
socialInsBase: e.socialInsBase,
|
||||
housingFundBase: e.housingFundBase,
|
||||
socialInsCalc: (() => {
|
||||
const contractType = latestContract?.contractType
|
||||
// 劳务协议、实习协议、兼职协议、业务外包等非劳动合同不缴纳社保
|
||||
if (!contractType || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(contractType)) return null
|
||||
const cfgs = configCache.get(e.city || '_default')
|
||||
if (!cfgs?.social || !e.socialInsBase) return null
|
||||
const r = calcSocialInsurance(e.socialInsBase, cfgs.social)
|
||||
return { socialEmp: r.socialEmp, socialOrg: r.socialOrg }
|
||||
})(),
|
||||
housingFundCalc: (() => {
|
||||
const contractType = latestContract?.contractType
|
||||
if (!contractType || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(contractType)) return null
|
||||
const cfgs = configCache.get(e.city || '_default')
|
||||
if (!cfgs?.housing || !e.housingFundBase) return null
|
||||
const r = calcHousingFund(e.housingFundBase, cfgs.housing)
|
||||
|
||||
Reference in New Issue
Block a user