SLCatBalance()

<< Click to Display Table of Contents >>

Navigation:  PaXcel  - functions > Customer Functions >

SLCatBalance()

 

SLCatBalance( Company, CustomerCategory, Period, ReturnForexValue )

 

This function will return the balance outstanding for the customer category specified.

 

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.

 

CustomerCategory: A customer category that exists within Pastel and that has been assigned to at least one customer account. Only single categories can be supplied in this function.

 

Period: This is a predefined keyword that represents the period to return the balance for. x - can be a period from 1 to 13.

 

Month x - will return the current outstanding balance as at month specified

 

Last Year x - will return the outstanding balance as at the Last Year period specified

 

Net Month x - will return the net change in the balance outstanding for the period specified

 

Net Last Year x - will return the net change in the balance outstanding for the period last year

 

Year to Date x - will return the outstanding balance for the year to date up to the period specified

 

Last Year to Date x - will return the outstanding for last year to date up to the period specified

 

Year to Date x and Month x are interchangeable as both will return the outstanding balance

 

ReturnForexValue: If you set this to 1 the value returned will be the outstanding balance in foreign currency, anything else and the home currency balance will be returned.

 

hmtoggle_arrow1        Examples:

 

Warning: If you intend to use the ReturnForexValue field you must ensure that all customers within the chosen category use the same currency. Otherwise the return value will not be of use.