Skip to content

Commit d3c9d1c

Browse files
authored
Merge pull request #317 from RoboFinSystems/feature/reconciling-item-blocker-copy
fix(close): explain the reconciling-item blocker instead of printing its code
2 parents 35402b4 + 9d91d17 commit d3c9d1c

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎src/app/(app)/ledger/close/__tests__/PeriodClosePanel.test.tsx‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,23 @@ describe('PeriodClosePanel — blockers name what is holding the close', () => {
294294
).toBeInTheDocument()
295295
})
296296

297+
it('explains a reconciling-item blocker instead of printing its code', async () => {
298+
mockGetFiscalCalendar.mockResolvedValue({
299+
...CALENDAR,
300+
closeableNow: false,
301+
blockers: ['reconciling_items'],
302+
})
303+
render(<PeriodClosePanel graphId="kg1" />)
304+
305+
// Unknown codes fall back to the raw string, which reads as a bug to
306+
// the user and offers no next step. This blocker fires the first time
307+
// anyone edits a synced transaction in QuickBooks, so it needs copy.
308+
expect(
309+
await screen.findByText(/edited in QuickBooks after they were synced/)
310+
).toBeInTheDocument()
311+
expect(screen.queryByText('reconciling_items')).not.toBeInTheDocument()
312+
})
313+
297314
it('marks the sample as partial when the count exceeds it', async () => {
298315
mockGetFiscalCalendar.mockResolvedValue({
299316
...CALENDAR,

‎src/app/(app)/ledger/close/components/PeriodClosePanel.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const BLOCKER_MESSAGES: Record<string, string> = {
6767
'Scheduled entries for this period are still pending — promote them so their adjusting entries get drafted, then close.',
6868
stranded_obligations:
6969
'Some scheduled entries were promoted but never drafted, so closing now would omit them. Re-run promotion with handler dispatch, or void the obligations.',
70+
reconciling_items:
71+
'Transactions edited in QuickBooks after they were synced are still awaiting a decision. Review each one and choose how to treat it — restate the original months, book a catch-up entry, or record that you already handled it — then close.',
7072
}
7173

7274
/**

0 commit comments

Comments
 (0)