KamoCRM

Return each member's accepted-today count per product

FeatureSecurityService
Shipped
21 ஆகஸ்ட், 2026 அன்று 2:01 AM UTC
Author
Kamo
Commit
a65cf62

Manage-Credits shows Max Daily Spend but nothing about how much of it is used, so a manager could not tell whether a member was one lead from their cap or had not started. /manage now returns acceptedToday keyed memberId::vendorProductId. "Today" is resolved exactly as CreditLeadAssignmentService resolves it when enforcing the cap — the MEMBER's own timezone, start-of-day to now, counting the same LeadCredit.dateSpent rows — so the figure is literally the number the cap is tested against rather than a second opinion about what a day is. One grouped query per member, not one per member x product. Note FFA products report 0: acceptance there spends no credit, and the cap does not apply to them either (the whole credit block is behind if (!ffa)), so the two columns stay consistent.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing