KamoCRM

Count the assignable pool for every vendor product at once

Featurekamo-shared-library
Shipped
21 ஆகஸ்ட், 2026 அன்று 1:47 AM UTC
Author
Kamo
Commit
092272e

countAssignablePool answers for one product, so a caller can only ask about products it already holds. Manage-Credits was iterating allotments to decide what to ask about, which meant a product nobody held a credit rule for reported no available leads — however many were sitting in its pool. Eleven freshly created products showed 0 against pools of up to 6,730. Availability is a property of the (product, market) pool, not of anyone's credit rule, so it has to be answerable without one. One grouped query rather than one count per product.

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