feat: 最低工资保护 + 社保/最低工资递延补扣机制
新增功能: 1. SocialYearStandard / SocialInsuranceConfig 增加 minWage 字段 2. BatchEntry 增加递延扣款字段(deferredSocialEmp/HousingEmp/MinWage) 3. calcBatchEntry 增加最低工资保护逻辑: - 实发 < 最低工资时,优先递延社保 → 递延公积金 → 递延最低工资补齐 - 递延金额记录到 BatchEntry,次月创建批次时自动补扣 4. prePayrollCheck 增加最低工资检查(第 11/12 项) 5. 前端社保配置增加最低工资输入框 6. 前端 BatchTab 质量门禁增加最低工资/递延扣款提示 处理场景: - 入职当月工资不足扣社保个人部分 → 递延到次月补扣 - 实发低于最低工资 → 补齐到最低工资,差额递延次月扣 - 次月创建批次时自动读取上月递延金额并补扣 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -964,6 +964,21 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
|
||||
请检查社保/公积金基数是否过大,导致实发工资 ≤ 0 的记录需修正后再归档。
|
||||
</InlineAlert>
|
||||
)}
|
||||
{batch.entries.some((e: any) => e.minWage > 0 && e.netPay < e.minWage && (e.minWageApplied || 0) === 0) && (
|
||||
<InlineAlert type="error" title="存在实发低于最低工资的员工">
|
||||
部分员工实发工资低于当地最低工资标准 ¥{Math.min(...batch.entries.filter((e: any) => e.minWage > 0 && e.netPay < e.minWage).map((e: any) => e.minWage))},请检查社保基数或在社保配置中设置最低工资标准。
|
||||
</InlineAlert>
|
||||
)}
|
||||
{batch.entries.some((e: any) => (e.minWageApplied || 0) > 0) && (
|
||||
<InlineAlert type="warning" title="最低工资保护已触发">
|
||||
{batch.entries.filter((e: any) => (e.minWageApplied || 0) > 0).length} 名员工已补齐到最低工资标准,递延扣款(社保/公积金/补齐差额)将在次月工资中补扣。
|
||||
</InlineAlert>
|
||||
)}
|
||||
{batch.entries.some((e: any) => (e.prevDeferredSocialEmp || 0) + (e.prevDeferredHousingEmp || 0) + (e.prevDeferredMinWage || 0) > 0) && (
|
||||
<InlineAlert type="warning" title="本月补扣上月递延">
|
||||
{batch.entries.filter((e: any) => (e.prevDeferredSocialEmp || 0) + (e.prevDeferredHousingEmp || 0) + (e.prevDeferredMinWage || 0) > 0).length} 名员工本月补扣了上月递延的社保/公积金/最低工资补齐差额。
|
||||
</InlineAlert>
|
||||
)}
|
||||
{batch.entries.some((e: any) => e.baseSalary === 0 && e.bonus === 0 && e.totalPay === 0) && (
|
||||
<InlineAlert type="warning" title="存在全零记录">
|
||||
部分员工所有金额为 0,请确认是否需要填写或移除这些人员。
|
||||
|
||||
Reference in New Issue
Block a user