655 — Skip invoiced records when recalculating but recalculate the rest¶
Description¶
An invoiced (billed) record is excluded from recalculation (findRecalculableTimeRecordIds filters out records with an issued invoice item). It keeps its rate while the rest of the selection recalculates, and the action still succeeds without error.
Preconditions¶
- Signed in to a freshly seeded test organization.
- Three time records seeded via the GraphQL API (no hourly rate), all owned by the owner.
- A user-scoped billable rate exists (created after seeding).
- One record is fully invoiced via the API (rate is still 0 at billing time).
- Time Records page open in the Reports view.
Steps¶
- Tick the selection checkbox on all three rows. Expected: the floating bar shows "3 selected".
- Click the recalculate-rates action and confirm the modal with Recalculate. Expected: "Success" popup appears (no error).
- Inspect the rows (by record id). Expected: the invoiced record's Hourly Rate is still "€ 0.00" (skipped); the other two records now have a non-zero hourly rate.
Related¶
- Spec:
playwright/tests/integration/timerecord.spec.ts(describe "Timerecord - Bulk edit") - Backend:
findRecalculableTimeRecordIdsexcludesinvoiceItem IS NOT NULL.