Determine producer-commission eligibility¶
This operation filters an agency's loaded contracts to those active on a requested date and then checks whether any surviving contract is classified as a producer-commission contract.
| Field | Value |
|---|---|
| Operation ID | OP-013 |
| Trigger | A caller invokes HasActiveProducerCommissionContract, ProducerCommissionContracts, or ActiveProducerCommissionContract. |
| Inputs | Agency or agency collection, as-of date |
| Outputs | Boolean result or filtered agency collection |
| Primary components | clsAgency.HasActiveProducerCommissionContract, clsAgencyContractCollection.ProducerCommissionContracts, clsAgencyCollection.ActiveProducerCommissionContract |
| Entry point | Business\SAIF.Business.Policy.Agency\clsAgency.vb, clsAgencyContractCollection.vb, clsAgencyCollection.vb |
Steps¶
- Ensure the agency's contracts are loaded, lazily retrieving them with SQL-004 against AGENCY_CONTRACT when necessary.
- Filter the contracts to those active on the requested date (BR-008).
- Filter the active contracts again to those whose commission GL type maps to
ProducerCommission(AGT) (BR-013). - Return
Truewhen at least one qualifying contract remains; otherwise returnFalse. - On the collection helper, add only agencies with at least one qualifying contract to the result set.
Process flow¶
The following diagram visualizes producer-commission eligibility evaluation.
flowchart TD
Start([Producer-commission check]) --> Load[Ensure contracts loaded]
Load --> Active[Filter active contracts]
Active --> GL[Filter AGT contracts]
GL --> Any{Any qualifying contract?}
Any -->|Yes| Yes[Agency qualifies]
Any -->|No| No[Agency does not qualify]
Failure and edge-case behavior¶
- Agencies without any loaded or active contracts return
False.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Agency\clsAgency.vbBusiness\SAIF.Business.Policy.Agency\clsAgencyCollection.vbBusiness\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb