Function ManageFee

Returns an Agent Property Fee display string or number

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

Parameters

#TypePassingDefaultNameDescription/Comments
1stringoptional0RETURNTYPEWhat to return:

RETURNTYPEReturn TypeDescription
  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
0stringThe full fee string
1decimalA calculation of the full (or min) terms total value
  1st Month Fee (AGENCYFM)
10decimal1st Month Fee Value or %
11boolean1st Month Is % if .T.
12string 1st Month Return display string of fee value e.g. 2.50% or £2500
13string 1st Month Return display string of fee value e.g. 2.50% or £2500 of the monthly rent
14string 1st Month Return display string of fee value e.g. 2.50% or £2500 of the first month's rent due / received
15string A calculation for the first period fee displayed as £ figure
16booleanA calculation for the first period fee as a number Net
17booleanA calculation for the first period fee as a number VAT
18booleanA calculation for the first period fee as a number Gross
  Per Month Fee (AGENCYPM)
20decimalPer Month Fee Value or %
21booleanPer Month Is % if .T.
22string Per Month Return display string of fee value e.g. 2.50% or £2500
23string Per Month Return display string of fee value e.g. 2.50% or £2500 of the monthly rent
24string Per Month Return display string of fee value e.g. 2.50% or £2500 of the monthly rent due / received thereafter
25string A calculation for the per period fee displayed as £ figure
26booleanA calculation for the Per Month fee as a number Net
27booleanA calculation for the Per Month fee as a number VAT
28booleanA calculation for the Per Month fee as a number Gross
  Renew Fee (FEENEW)
30decimalRenew Fee Value or %
31booleanRenew Is % if .T.
32string Renew Return display string of fee value e.g. 2.50% or £2500
33string Renew Return display string of fee value e.g. 2.50% or £2500 of the monthly rent
34string Renew Return display string of fee value e.g. 2.50% or £2500 of the monthly rent due / received
35string A calculation for the Renew fee displayed as £ figure
36booleanA calculation for the Renew fee as a number Net
37booleanA calculation for the Renew fee as a number VAT
38booleanA calculation for the Renew fee as a number Gross
2stringoptionalalias()DATATABLEThe name of the data table e.g. PROPERTY or alias() or CONTRACT
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)"
7booleanoptional.F.FORCEASKINGForce 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.)