Skip to content

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

  1. Ensure the agency's contracts are loaded, lazily retrieving them with SQL-004 against AGENCY_CONTRACT when necessary.
  2. Filter the contracts to those active on the requested date (BR-008).
  3. Filter the active contracts again to those whose commission GL type maps to ProducerCommission (AGT) (BR-013).
  4. Return True when at least one qualifying contract remains; otherwise return False.
  5. 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.

Sources

  • Business\SAIF.Business.Policy.Agency\clsAgency.vb
  • Business\SAIF.Business.Policy.Agency\clsAgencyCollection.vb
  • Business\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb