AgencyRecordDeal
lua
Use it when your own script sells or rents out an agency property. It does two things:
- Adds the deal to the agency's transactions in the Agency Portal.
- Pays the agent a commission from the society account. The rate comes from the employee's override, then their grade, then
Config.Agency.CommissionPercent.
The agent is the one assigned to the property, or the one who listed it. If there is neither, it is actingPlayer.
It does nothing if society is not a real estate agency job.
Parameters
- society:
stringThe job name of the selling agency - propertyId:
numberThe property ID - propertyLabel:
stringThe property name, for the transaction list - dealType:
'sale' | 'rent'The kind of deal - amount:
numberThe deal amount. Commission is a percentage of it. - buyerIdentifier:
stringThe identifier of the buyer or renter - metadata?:
tableThe property metadata. Used to find the assigned or listing agent. - actingPlayer?:
tableThe framework player object of the agent who made the deal - contractId?:
numberThe contract ID, if the deal used a contract
Return Value
- None
Example
lua