ARInfo
This method returns some statistical information given an item identifier (ar_numero).
Syntax:
oBiz.ArInfo(<cMethod>, <nItemId>[, <dEndDate>, <dStartDate>, <cGroup>])
Parameters |
Description |
cMethod |
Indicates which type of statistics has to be returned. The possible values are: product_sales_quantity: total sales quantity for the item; product_group_sales_quantity: total sales quantity for the group of items; product_sales_amount: total sales amount for the item; product_group_sales_amount: total sales amount for the group of items; product_sales_amount_vatexcluded: total sales amount for the item excluding VAT; product_sales_amount_vatincluded: total sales amount for the item including VAT; product_group_sales_amount_vatexcluded: total sales amount for the group of items, excluding VAT; product_group_sales_amont_vatincluded: total sales amount for the group of items, including VAT. |
nItemId |
Primary key identifying the item (ar_numero). |
dEndDate |
The transactions up to the date specified are selected. The parameter is not mandatory. If the parameter is missing all the transactions are selected. |
dStartDate |
The transactions starting from the date specified are selected. The parameter is not mandatory. If the parameter is missing all the transactions are selected. |
cGroup |
If this parameter is specified and the cMethod includes the keyword _group_ only items included in this group are selected and the statistics are cumulative for the whole group. |
Example:
*/ Instantiate end set the database location.
oBiz = createobject("bizinfo.application")
oBiz.cDatabasePath = "C:\WinBIZ Data"
oBiz.nCompany = 1000
oBiz.nYear = 2017
*/ Show the total sales quantity for the item with ID = 1000.
messagebox(oBiz.ArInfo("product_sales_quantity", 1000))
*/ Show the total sales quantity for the items in the group ITEMS_TEST.
messagebox(oBiz.ArInfo("product_group_sales_quantity", , , ,"ITEMS_TEST"))
*/ Show the total sales quantity for the items in the group ITEMS_TEST up to the 31.03.2017.
messagebox(oBiz.ArInfo("product_group_sales_quantity", ,{31.03.2017} , ,"ITEMS_TEST"))
*/ Show the total sales quantity for the items in the group ITEMS_TEST from the 01.03.2017 to the 31.03.2017.
messagebox(oBiz.ArInfo("product_group_sales_quantity", ,{31.03.2017} ,{01.03.2017} ,"ITEMS_TEST"))
*/ Show the total sales quantity for the item with ID = 1000 from the 01.03.2017 to the 31.03.2017.
messagebox(oBiz.ArInfo("product_group_sales_quantity", 1000,{31.03.2017} ,{01.03.2017}))