Skip to content

refs #287#298

Merged
ichylinux merged 14 commits intomasterfrom
i287
Apr 13, 2026
Merged

refs #287#298
ichylinux merged 14 commits intomasterfrom
i287

Conversation

@aomrikti
Copy link
Copy Markdown
Collaborator

No description provided.

payrolls に child_and_childcare_support を追加し、tax_jp 経由の額を給与計算・
集計・自動仕訳(預り金・法定福利費)および入力・一覧に載せる。
デフォルト所属の branch_employee が増えたことで、費用配賦の按分件数・金額の
期待値を追随させる。
適用月の有無、厚生年金上限との関係、自動仕訳明細の有無を押さえる。
Copilot AI review requested due to automatic review settings April 10, 2026 08:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces support for the “子ども・子育て支援金” starting 2026-04 across payroll calculation, journaling, reporting, and HR payroll UI so the new deduction/expense is computed, stored, displayed, and included in withholding-tax outputs.

Changes:

  • Add a child_and_childcare_support field to payrolls and incorporate it into social insurance totals and finder aggregates.
  • Compute the new support amount in TaxUtils (monthly vs. bonus basis) and generate corresponding auto-journal lines (employee + company share).
  • Update HR payroll screens, withholding-tax report logic, and add/adjust tests + fixtures.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/models/tax_utils_test.rb Adds unit tests for support amount behavior across effective dates and grade basis.
test/models/payroll_test.rb Tests bonus insurance salary truncation + 1.5M cap behavior.
test/models/auto/journal/payroll_factory_test.rb Validates journal detail creation/non-creation for the new support lines by YM.
test/helpers/hr/payroll_helper_test.rb Ensures helper-driven auto-calculation includes the new support deduction.
test/fixtures/branch_employees.yml Adds default branch fixture for employee 10 used in new tests.
test/controllers/journals_controller/allocated_cost_test.rb Updates expectations impacted by fixture headcount change.
db/schema.rb Reflects new payroll column and schema version bump.
db/migrate/20260403120000_add_column_child_and_childcare_support_on_payrolls.rb Adds child_and_childcare_support column with default 0.
app/views/hr/payrolls/index.html.erb Displays the new deduction row in payroll index totals.
app/views/hr/payrolls/_form.html.erb Adds editable field + JS auto-fill for monthly payroll form.
app/views/hr/payrolls/_form_bonus.html.erb Adds editable field + JS auto-fill for bonus payroll form.
app/utils/tax_utils.rb Implements support amount assignment (monthly overwrite based on health grade; bonus based on salary).
app/models/reports/withholding_tax/detail_logic.rb Includes support amount in “社会保険料等の金額” calculation.
app/models/payroll.rb Adds validation, integrates deduction into totals, computes employee share, adds journal lookup helpers, caps bonus basis.
app/models/payroll_info/payroll_logic.rb Adds support aggregation and includes it in exemption totals.
app/models/payroll_finder.rb Includes support in annual/monthly rollups used by UI.
app/models/insurance.rb Adds accessors for support all/half values on Insurance.
app/models/auto/journal/payroll_factory.rb Generates debit/credit journal details for company/employee support shares and includes it in accrued expense calc.
app/controllers/hr/payrolls_controller.rb Returns support in auto-calc JSON and permits it in strong params.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ichylinux ichylinux merged commit 84d4d59 into master Apr 13, 2026
5 checks passed
@ichylinux ichylinux deleted the i287 branch April 13, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants