Feature #665
openDay close: show every outlet's counters in one table, not one at a time
0%
Description
Matched pages/sales.html's modalDayClose: the prototype shows every counter across the whole canteen in a single table ("Main · C1", "Main · C2", "Coffee Corner") with one Close day & post at the bottom -- the real dialog made you pick one outlet from a dropdown first and closed it in isolation.
Rebuilt the dialog around every active outlet at once, fetched in parallel (useDayClosePreviews, one preview query per outlet via TanStack Query's useQueries) and flattened into one counter list tagged with its own outlet (CounterEntry.outletId/outletName) so two outlets' "Counter 1" never collide. A DayClose is still one row per outlet underneath -- closing stays one request per outlet (requestsByOutlet regroups the flat list back), sent sequentially so a failure midway says exactly which outlets went through and which didn't, rather than an all-or-nothing guess. Every closed outlet is tracked locally as its own mutation succeeds, so a retry after a partial failure never resends a request for one that already closed.
Totals, blockers and the GST-by-rate breakdown are now summed across every still-open outlet (combinedTotals/combinedBlockers/combinedGstByRate) rather than read from one outlet's preview. An outlet already closed for the date is excluded from the form and listed separately, never silently re-opened for editing.
Also fixed the Sales & day close page's Subsidy stat card to compute "X% of gross" live, matching the prototype, instead of the static "absorbed by the hospital" sub-text.
9 new day-close-view tests for the new multi-outlet helpers, plus updated existing ones for the outlet-tagged CounterEntry shape. 591/591 frontend, no backend changes -- this reuses the existing per-outlet preview/close endpoints, just orchestrated across all of them from the dialog.
Commit: 68608e1.