Count today's spend across a member's products in one query

Featurekamo-shared-library
Shipped
August 21, 2026 at 2:01 AM UTC
Author
Kamo
Commit
8558d11

Manage-Credits wants to show, per member, how many leads they have accepted so far today — the running total the Max Daily Spend cap is compared against. **************** answers for one product, so a grid would pay a query per member x product. Same dateSpent window, grouped by product. Deliberately not a second definition of "today": the caller passes the member's own local start-of-day, exactly as CreditLeadAssignmentService does when it enforces the cap, because a figure displayed beside the cap that counted a different day would be worse than none.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing