Rev 37375 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 37377 2026-08-21 14:30:40
- Author: amit
- Log message:
- Queries behind the Sale Returns action-pending queue
The Sale Returns screen could only ever list purchase return orders received inside the
chosen date window, which left the returns that actually need someone unreachable: a
return order is written at receive time, so a debit note the warehouse has not received
yet has no return order at all and could not appear however the list was sorted.
- selectPendingByWarehouseIds returns every unsettled return order with no date bound -
received but unrefunded, or rejected but not yet acknowledged by the retailer. A return
nobody acted on only gets older, so bounding it by date is what buried it
- selectUnreceivedSince finds debit notes with no return order against them, which is the
only place a not-yet-received return exists. Cancelled notes are excluded
- selectEarliestCreateTimestamp exposes when the receive/refund flow went live. Notes
raised before the first return order ever recorded were settled through the older
item-level flow and are not a queue anyone can work, so the caller uses this to bound
the lookup off the data rather than off a date pinned in code
- both listing queries now take an optional fofoId, so the partner filter is a predicate
rather than a post-filter - filtering after the 200 row cap would silently drop a
partner's older rows
Counts on live data: 6 unsettled return orders, 24 unreceived debit notes since the flow
started, against 5,618 older notes correctly left out.