Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
admin
2026-04-30 10:12:08 +09:00
parent 5026282136
commit 6669c7da77
11 changed files with 4060 additions and 295 deletions

View File

@@ -215,6 +215,9 @@
<li>給与計算と賞与計算で異なる料率を設定できます</li>
<li>事業所所在地(都道府県)ごとに設定できます</li>
<li>介護保険の適用年齢は設定可能です(デフォルト: 40歳以上</li>
<li><strong>年度適用期間:</strong> 「年度」に設定した値は <strong>その年の4月〜翌年3月</strong> に適用されます。<br>
2026年度設定 → 2026年4月〜2027年3月の計算に参照されます。<br>
2026年1月〜3月分は 2025年度rate_year=2025の料率が参照されます。</li>
</ul>
</div>
@@ -802,6 +805,26 @@
pensionRate: metadata.pension_rate,
};
// メタデータに料率がない場合、データから逆算する
if (rates.healthNoCareRate == null) {
const refRow = data.find(r => Number(r.monthly_amount) > 0 && Number(r.health_insurance_no_care) > 0);
if (refRow) {
const ma = Number(refRow.monthly_amount);
rates.healthNoCareRate = Number(refRow.health_insurance_no_care) / ma * 100;
rates.healthWithCareRate = Number(refRow.health_insurance_with_care) / ma * 100;
if (Number(refRow.child_support ?? 0) > 0) {
rates.childSupportRate = Number(refRow.child_support) / ma * 100;
}
}
// 厚生年金は低等級(1-3)で0になるため、pension_insurance > 0 の行を別途検索
if (rates.pensionRate == null) {
const pensionRefRow = data.find(r => Number(r.monthly_amount) > 0 && Number(r.pension_insurance ?? 0) > 0);
if (pensionRefRow) {
rates.pensionRate = Number(pensionRefRow.pension_insurance) / Number(pensionRefRow.monthly_amount) * 100;
}
}
}
// メタデータはヘッダーに組み込むため、ここでは空にする
let metadataHtml = "";