Returns an Agent Property Fee display string or number
ManageFee([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 lettings only.
This can be used where [DATATABLE] is PROPERTY or CONTRACT
Fee fields are AGENCYFM / AGENCYPM / FEENEW (Property Only)
Terms fields will be LEASETERM, PERIODTERM, MINPERIOD whichever is found first with a value > 0
| 0 | string | The full fee string | 1 | decimal | A calculation of the full (or min) terms total value | | | 1st Month Fee (AGENCYFM) | 10 | decimal | 1st Month Fee Value or % | 11 | boolean | 1st Month Is % if .T. | 12 | string | 1st Month Return display string of fee value e.g. 2.50% or £2500 | 13 | string | 1st Month Return display string of fee value e.g. 2.50% or £2500 of the monthly rent | 14 | string | 1st Month Return display string of fee value e.g. 2.50% or £2500 of the first month's rent due / received | 15 | string | A calculation for the first period fee displayed as £ figure | 16 | boolean | A calculation for the first period fee as a number Net | 17 | boolean | A calculation for the first period fee as a number VAT | 18 | boolean | A calculation for the first period fee as a number Gross | | | Per Month Fee (AGENCYPM) | 20 | decimal | Per Month Fee Value or % | 21 | boolean | Per Month Is % if .T. | 22 | string | Per Month Return display string of fee value e.g. 2.50% or £2500 | 23 | string | Per Month Return display string of fee value e.g. 2.50% or £2500 of the monthly rent | 24 | string | Per Month Return display string of fee value e.g. 2.50% or £2500 of the monthly rent due / received thereafter | 25 | string | A calculation for the per period fee displayed as £ figure | 26 | boolean | A calculation for the Per Month fee as a number Net | 27 | boolean | A calculation for the Per Month fee as a number VAT | 28 | boolean | A calculation for the Per Month fee as a number Gross | | | Renew Fee (FEENEW) | 30 | decimal | Renew Fee Value or % | 31 | boolean | Renew Is % if .T. | 32 | string | Renew Return display string of fee value e.g. 2.50% or £2500 | 33 | string | Renew Return display string of fee value e.g. 2.50% or £2500 of the monthly rent | 34 | string | Renew Return display string of fee value e.g. 2.50% or £2500 of the monthly rent due / received | 35 | string | A calculation for the Renew fee displayed as £ figure | 36 | boolean | A calculation for the Renew fee as a number Net | 37 | boolean | A calculation for the Renew fee as a number VAT | 38 | boolean | A calculation for the Renew fee as a number Gross |
|
2 | string | optional | alias() | DATATABLE | The name of the data table e.g. PROPERTY or alias() or CONTRACT |
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)" |
7 | boolean | optional | .F. | FORCEASKING | Force asking price to be used.
When .T. this will always use PRICEASK,
When .F. this will using PRICEFINAL if it has a value (which is always assumed Monthly). |
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
ManageFee(0,alias())
Example 2 - return the full fee as a amount that can be use in a calculation with VAT
ManageFee(0,alias(),1,.F.,.F.,.F.)