<< Click to Display Table of Contents >> Navigation: PaXcel - functions > Customer Functions > SLAge() |
SLAge( Company, Account, Period, AgeAsAtDate )
This function will return the Age balance for the given period based on the ageing date supplied.
The arguments are as follows:
Company: This is the path to your Pastel data directory. For example:
c:\PastelData\_demo would enable you to retrieve information from the Pastel Partner demo company.
Account: A valid customer account must be supplied. Multiple accounts can be supplied in the format ABC001, ABC002, ABC003.
Period: The period must be a number between 0 and 5 the value returned will depend on this and the date supplied.
0 - The due date of the invoice is past the current age as at date
1 - The due date of the invoice is greater than ageing period 1 but less than period 2
2 - The due date of the invoice is greater than ageing period 2 but less than period 3
3 - The due date of the invoice is greater than ageing period 3 but less than period 4
4 - The due date of the invoice is greater than ageing period 4 but less than period 5
5 - The due date is greater than ageing period 5
AgeAsAtDate: Should be a valid date used to calculate the days overdue of the invoice. The format of this date must be the same as your Windows regional settings.
Based on the ageing periods 0, 30, 60, 90 and 120 days
The following will display the balance outstanding that are not yet due for payment.
SLAge( "c:\PastelData\_demo", "ACK001", 0, "31/05/2007" )
The following will display the balance that is between 0 and 29 days overdue
SLAge( "c:\PastelData\_demo", "ACK001", 1, "31/05/2007" )
The following will display the balance due between 30 and 59 days overdue
SLAge( "c:\PastelData\_demo", "ACK001", 2, "31/05/2007" )
The following will display the balance due between 60 and 89 days overdue
SLAge( "c:\PastelData\_demo", "ACK001", 3, "31/05/2007" )
The following will display the balance due between 90 and 119 days overdue
SLAge( "c:\PastelData\_demo", "ACK001", 4, "31/05/2007" )
The following will display the balance due past 120 days
SLAge( "c:\PastelData\_demo", "ACK001", 5, "31/05/2007" )
|
The aging periods used will depend on the customer's account