Returns an Agent Property Fee display string or number
AgentFee([RETURNTYPE],[DATATABLE],[SHORTNUMBER],[SHORTTEXT],[ADDVATAMOUNT],[ADDVATTEXT],[FORCEASKING])
Parameters
# | Type | Passing | Default | Name | Description/Comments |
---|
1 | string | optional | 0 | RETURNTYPE | What to return:
RETURNTYPE | Return Type | Description |
---|
| | Below is relevant to sales and lettings unless otherwise specified
Agent Fee is PROPERTY.AGENCYF1 or PROPERTY.AGENCYF3 or PROPERTY.AGENCYF3 | 0 | string | Agent Fee Value or % | 1 | boolean | Fee Is % if .T. | 2 | string | Return display string of Agent Fee value e.g. 2.50% or £2500 | 3 | string | Full Agent Fee string (including admin charge) | 4 | string | Full Agent Fee string | 5 | string | Gross Agent Fee string including VAT and narrative | 6 | decimal | Gross Agent Fee total over period returned as number | 7 | string | Gross Agent Fee total over period with VAT text | 8 | decimal | Net Agent Fee total over period returned as number | 9 | decimal | VAT Agent Fee total over period returned as number | | | Forced AGENCYTYPE=1 (Sole Agent) | 10 | string | Agent Fee string including or plus VAT and narrative | 11 | decimal | Agent Fee total over period returned as number | 21 | string | Agent Fee total over period with VAT text | 31 | decimal | Agent Fee total for agency type 1 (Use [ADDVATAMOUNT] to add VAT) | | | Forced AGENCYTYPE=2 (Joint Agent) | 20 | string | Agent Fee string including or plus VAT and narrative | 12 | decimal | Agent Fee total over period returned as number | 22 | string | Agent Fee total over period with VAT text | 32 | decimal | Agent Fee total for agency type 3 (Use [ADDVATAMOUNT] to add VAT) | | | Forced AGENCYTYPE=3 (Multi Agent) | 30 | string | Agent Fee string including or plus VAT and narrative | 13 | decimal | Agent Fee total over period returned as number | 23 | string | Agent Fee total over period with VAT text | 33 | decimal | Agent Fee total for agency type 3 (Use [ADDVATAMOUNT] to add VAT) | | | Below releveant to lettings only, Renew Fee is PROPERTY.FEERENEW | 61 | boolean | Renew Fee Is % if .T. | 62 | string | Return display string of Renew Fee value e.g. 2.50% or £2500 | 63 | string | Full Renew Fee string (including admin charge) | 64 | string | Full Renew Fee string | 65 | string | Gross Renew Fee string including VAT and narrative | 66 | decimal | Gross Renew Fee total over period returned as number | 67 | string | Gross Renew Fee total over period with VAT text | 68 | decimal | Net Renew Fee total over period returned as number | 69 | decimal | VAT Renew Fee total over period returned as number |
|
2 | string | optional | alias() | DATATABLE | The name of the data table e.g. PROPERTY or alias() |
3 | integer | optional | 0 | SHORTNUMBER | 0/1 = No Short numbers
2 = Short numbers for percentages only
3 = Short numbers for all numbers
|
4 | boolean | optional | .F. | SHORTTEXT | Use short text strings e.g. "pm" rather than "per month" |
5 | boolean | optional | .F. | ADDVATAMOUNT | Add VAT Amount |
6 | boolean | optional | .F. | ADDVATTEXT | Add VAT Text either "(Plus VAT)" or "(Inc. VAT)" or "(Exc. VAT)" |
7 | boolean | optional | .F. | FORCEASKING | Force 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.)