Function AgentFee

Returns an Agent Property Fee display string or number

AgentFee([RETURNTYPE],[DATATABLE],[SHORTNUMBER],[SHORTTEXT],[ADDVATAMOUNT],[ADDVATTEXT],[FORCEASKING])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringoptional0RETURNTYPEWhat to return:

RETURNTYPEReturn TypeDescription
  Below is relevant to sales and lettings unless otherwise specified
Agent Fee is PROPERTY.AGENCYF1 or PROPERTY.AGENCYF3 or PROPERTY.AGENCYF3
0stringAgent Fee Value or %
1booleanFee Is % if .T.
2stringReturn display string of Agent Fee value e.g. 2.50% or £2500
3stringFull Agent Fee string (including admin charge)
4stringFull Agent Fee string
5stringGross Agent Fee string including VAT and narrative
6decimalGross Agent Fee total over period returned as number
7stringGross Agent Fee total over period with VAT text
8decimalNet Agent Fee total over period returned as number
9decimalVAT Agent Fee total over period returned as number
  Forced AGENCYTYPE=1 (Sole Agent)
10stringAgent Fee string including or plus VAT and narrative
11decimalAgent Fee total over period returned as number
21stringAgent Fee total over period with VAT text
31decimalAgent Fee total for agency type 1 (Use [ADDVATAMOUNT] to add VAT)
  Forced AGENCYTYPE=2 (Joint Agent)
20stringAgent Fee string including or plus VAT and narrative
12decimalAgent Fee total over period returned as number
22stringAgent Fee total over period with VAT text
32decimalAgent Fee total for agency type 3 (Use [ADDVATAMOUNT] to add VAT)
  Forced AGENCYTYPE=3 (Multi Agent)
30stringAgent Fee string including or plus VAT and narrative
13decimalAgent Fee total over period returned as number
23stringAgent Fee total over period with VAT text
33decimalAgent Fee total for agency type 3 (Use [ADDVATAMOUNT] to add VAT)
  Below releveant to lettings only, Renew Fee is PROPERTY.FEERENEW
61booleanRenew Fee Is % if .T.
62stringReturn display string of Renew Fee value e.g. 2.50% or £2500
63stringFull Renew Fee string (including admin charge)
64stringFull Renew Fee string
65stringGross Renew Fee string including VAT and narrative
66decimalGross Renew Fee total over period returned as number
67stringGross Renew Fee total over period with VAT text
68decimalNet Renew Fee total over period returned as number
69decimalVAT Renew Fee total over period returned as number
2stringoptionalalias()DATATABLEThe name of the data table e.g. PROPERTY or alias()
3integeroptional0SHORTNUMBER0/1 = No Short numbers
2 = Short numbers for percentages only
3 = Short numbers for all numbers
4booleanoptional.F.SHORTTEXTUse short text strings e.g. "pm" rather than "per month"
5booleanoptional.F.ADDVATAMOUNTAdd VAT Amount
6booleanoptional.F.ADDVATTEXTAdd VAT Text either "(Plus VAT)" or "(Inc. VAT)" or "(Exc. VAT)"
7booleanoptional.F.FORCEASKINGForce asking price to be used.
When .T. this will always use PRICEASK,
When .F. this will call AgreedRent(0) for the price.

Returns

A string, number or boolean depending on RETURNTYPE


Examples

Example 1 - return the full fee as a amount that can be use in a calculation without VAT

AgentFee(0,alias())

Example 2 - return the full fee as a amount that can be use in a calculation with VAT

AgentFee(0,alias(),1,.F.,.F.,.F.)