<< Click to Display Table of Contents >> Navigation: PaXcel - functions > Customer Functions > SLItem() |
SLItem( Company, Account, ItemCode, Store, Period, ValueToReturn )
This function will return the sales for the given Account, Item and store combination.
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: This should be the customer account number, only single accounts can be specified.
ItemCode: This should be a valid product code, only single codes can be specified.
Store: Enter a valid store code to return the sales for, if blank then all sales across all stores for the selected item will be returned.
Period: This should be the period that you wish to return sales for. The period can be one of the following keywords. x - can be a period from 1 to 13.
Year to Date x - Sales for the year up to and including the period specified
Last Year to Date x - Sales for the last year up to and including the period specified
Month x - Sales for the period specified
Last Year x - Sales for the period of the last year specified
ValueToReturn:
1 - Return home currency monetary value
2 - Return the foreign currency monetary value
3 - Return the quantity sold
The following will return the total sales for this year, for item code SOHO/200
SLItem( "c:\PastelData\_demo", "ACK001", "SOHO/200", " ", "Year To Date 12" , 1 )
The following will return the total sales for last year for item code SOHO/200
SLItem( "c:\PastelData\_demo", "ACK001", "SOHO/200", " ", "Last Year To Date 12", 1 )
The following will return the sales for Month 6 only, for item code SOHO/200
SLItem("c:\PastelData\_demo", "ACK001", "SOHO/200", " " , "Month 6" , 1 )
The following will return the quantity for Month 6 only, for item code SOHO/200
SLItem("c:\PastelData\_demo", "ACK001", "SOHO/200", " " , "Month 6" , 3 )
|
NB: Transaction drill down is available on this function. If selected all the sales documents that make up the selected balance will be displayed.