Skip to content

feat(shillinq): build people-ib47-statement - #3176

Open
rubenvdlinde wants to merge 5 commits into
developmentfrom
quality/build-people-ib47-statement
Open

rubenvdlinde wants to merge 5 commits into
developmentfrom
quality/build-people-ib47-statement

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Build of openspec/changes/people-ib47-statement (REQ-DPA-021): the annual IB47 batch is filled from the books, and the batch produces the statement file.

Tasks done

  • 1.1 lib/Settings/register.d/people-ib47-statement.json: Payee.ib47Recipient, plus Payee.bsn (11-proef, masked, payroll officer only) and Payee.ib47PaymentTypeCode, which the record requires. IB47Record.payeeId lets a rerun find its record. lib/Service/Ib47/Ib47BatchService.php:
    • "Paid" means a payment run in reconciled, i.e. confirmed by the bank. The year is the line's requested execution date, else the run's.
    • One record per payee and year, updated in place on a rerun.
    • A recipient without BSN, address or payment type code is returned as incomplete and gets no record. Nothing is written with an invented value.
  • 1.2 POST /api/ib47/batches/prepare (Ib47Controller):
    • Open to an instance administrator or a member of shillinq_payroll_officer (403 otherwise), within an administration the caller holds a membership of (404 otherwise).
    • taxYear defaults to last year and administration_id to the active administration, so the batch page's new "Prepare last year's batch" header action needs no form.
    • Documented in openapi.json.
  • 2.1 ib47 (IB47-opgaaf, csv) in ReportCatalogue. Ib47StatementReportGenerator writes the year's final records (no dry runs) and computes nothing itself.
  • 2.2 (strings) en/nl for the new action and every new schema title and description. .js catalogues rebuilt.

Decisions to review

  • A payee's BSN is now stored on the payee (encrypted field rules as on IB47Record.recipientBSN), because the record requires it and nothing else carried it.
  • Payments made through InboundPayable (markPaid) are not counted yet. Supplier invoices are paid through payment runs, which is what the batch reads.

Tasks left

  • 2.2 live pass: mark a freelancer, pay two invoices in 2026, prepare the 2026 batch and download the statement. Needs an instance.

Tests

  • New: Ib47BatchServiceTest (7: both scenarios with their numbers, confirmed runs only, line date, other administration, incomplete recipient, refusals), Ib47ControllerTest (9), Ib47StatementReportGeneratorTest (3: prepare then file shows EUR 2,000.00). Mutations of the update-in-place, the year filter, both controller guards and the dry-run filter each turn a test red.
  • Unit suite before: 12,796 tests, 0 failures. After: 12,816 tests, 0 failures. phpcs and phpstan clean on the new files. Hydra route-auth and no-admin-idor report nothing for the new controller. test:l10n, test:l10n-parity, check:l10n-js and check:manifest pass.

Generated by Claude Code

Task 1.1: mark a payee as an IB47 recipient and prepare the year's
IB47 records from the payment runs the bank confirmed, one record per
payee and year, updated on a rerun.

Assisted-by: ClaudeCode:claude-opus-5-5
Task 1.2: a Prepare action on the IB47 annual batch page, through a
route open to the payroll officer within the caller's administration.

Assisted-by: ClaudeCode:claude-opus-5-5
Document the IB47 prepare route in openapi.json.

Assisted-by: ClaudeCode:claude-opus-5-5
Task 2.1: an ib47 report in the catalogue whose generator writes the
prepared batch as the statement file.

Assisted-by: ClaudeCode:claude-opus-5-5
Write the live pass of task 2.2 as a Playwright spec: both REQ-DPA-021
scenarios through the prepare route and the ib47 statement download.

Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
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.

1 participant