feat: 子ども・子育て支援金を給与・賞与計算に追加(令和8年4月以降)
This commit is contained in:
@@ -334,9 +334,11 @@ class PayrollCalculationService:
|
||||
|
||||
if result:
|
||||
standard_monthly_salary = Decimal(str(result["monthly_amount"]))
|
||||
print(f"[DEBUG] 標準報酬月額表検索: 総支給額={total_payment} → 標準報酬月額={standard_monthly_salary}")
|
||||
child_support_full = Decimal(str(result["child_support"])) if result["child_support"] is not None else Decimal("0")
|
||||
print(f"[DEBUG] 標準報酬月額表検索: 総支給額={total_payment} → 標準報酬月額={standard_monthly_salary}, 子育て支援金全額={child_support_full}")
|
||||
else:
|
||||
print(f"[DEBUG] 標準報酬月額表検索: 該当等級なし(総支給額={total_payment})")
|
||||
child_support_full = Decimal("0")
|
||||
|
||||
|
||||
# 社会保険料上限を取得
|
||||
@@ -410,6 +412,15 @@ class PayrollCalculationService:
|
||||
employment_insurance_rate = PayrollCalculationService.get_insurance_rate("雇用保険", payment_date)
|
||||
employment_insurance = Decimal("0")
|
||||
|
||||
# 子ども・子育て支援金(令和8年4月分以降のみ適用)
|
||||
child_support = Decimal("0")
|
||||
is_child_support_applicable = (
|
||||
(payroll_year == 2026 and payroll_month >= 4) or payroll_year >= 2027
|
||||
)
|
||||
if is_child_support_applicable and calc_social_insurance:
|
||||
child_support = (child_support_full / Decimal("2")).quantize(Decimal("0.01"))
|
||||
print(f"[DEBUG] 子育て支援金: 全額={child_support_full} → 折半額(従業員負担)={child_support}")
|
||||
|
||||
# 雇用保険加入対象かどうか確認
|
||||
is_employment_insurance_eligible = salary_setting.get("employment_insurance_eligible", True) if salary_setting else True
|
||||
|
||||
@@ -422,12 +433,13 @@ class PayrollCalculationService:
|
||||
elif not employment_insurance_rate and calc_social_insurance:
|
||||
errors.append(f"雇用保険料率が見つかりません(年度: {payment_date.year})")
|
||||
|
||||
# 社会保険計算スキップ時は全て。0にする
|
||||
# 社会保険計算スキップ時は全て0にする
|
||||
if not calc_social_insurance:
|
||||
health_insurance = Decimal("0")
|
||||
care_insurance = Decimal("0")
|
||||
pension_insurance = Decimal("0")
|
||||
employment_insurance = Decimal("0")
|
||||
child_support = Decimal("0")
|
||||
|
||||
# エラーがある場合は、エラーメッセージを返す
|
||||
if errors:
|
||||
@@ -447,7 +459,8 @@ class PayrollCalculationService:
|
||||
health_insurance -
|
||||
care_insurance -
|
||||
pension_insurance -
|
||||
employment_insurance
|
||||
employment_insurance -
|
||||
child_support
|
||||
)
|
||||
|
||||
if calc_income_tax:
|
||||
@@ -465,6 +478,7 @@ class PayrollCalculationService:
|
||||
care_insurance +
|
||||
pension_insurance +
|
||||
employment_insurance +
|
||||
child_support +
|
||||
income_tax +
|
||||
resident_tax +
|
||||
other_deduction
|
||||
@@ -501,6 +515,7 @@ class PayrollCalculationService:
|
||||
"care_insurance": care_insurance,
|
||||
"pension_insurance": pension_insurance,
|
||||
"employment_insurance": employment_insurance,
|
||||
"child_support": child_support,
|
||||
"income_tax": income_tax,
|
||||
"resident_tax": resident_tax,
|
||||
"other_deduction": other_deduction,
|
||||
|
||||
Reference in New Issue
Block a user