The commission engine
Every sale’s earnings compute the moment it is recorded. The pipeline strips VAT from the total contract price to reach true selling price, applies commission and incentive rates, deducts withholding tax, then splits across every party on the deal — including special-case rules where a marketing-partner deal is shared only between the partner and the supervising team leader. It recalculates when rates or prices change, so figures never drift.
The architectural decision worth explaining: this lives in 11 observers — on disbursements, vouchers, pricing versions, units, leads, and sale requirements — rather than in the callers, because the financial consequence of an operational action must not be something a future developer can forget to trigger.
Observer-driven money is harder to step through than a linear service call; the counterweight is a test suite that asserts the ledger, not the path.