frequently asked questions

All your questions in one place.

Available stock for a given item

Display the available stock for a given item.

Syntax:

stock(<cMethod>, <nItem>[, <dDateEnd>][, <dDateStart>][, <nWarehouse>][, <dExpiryEnd>][, <dExpiryStart>])

 

Parameter

Description

cMethod

Type of information that has to be returned. The possibles values are:

available: stock physically available;

suppliersorders: on suppliers orders or in production;

customersorders: on customers orders confirmations (reserved);

customersdeliveries: delivered to customers (delivery slips);

customersworksheets: on customers worksheets;

salesamount: total sales amount;

salesquantity: total quantity sold;

salesquantityreturned: total quantity returned (debtors credit notes);

saleslastdate: date of the last sale.

dDateEnd

The transactions up to this date are selected. This parameter is not mandatory. If the parameter is not specified, all the transactions are considered.

dDateStart

The transactions starting from this date are selected. This parameter is not mandatory. If the parameter is not specified, all the transactions are considered.

nWarehouse

Warehouse ID. If this parameter is specified, only the transactions for this warehouse are selected. Otherwise all the transactions are considered.

dExpiryEnd

Only the transactions concerning line items with an expiry date before the date of the parameters are considered. If the parameter is not specified all the transactions are considered.

dExpiryStart

Only the transactions concerning line items with an expiry date after the date of the parameters are considered. If the parameter is not specified all the transactions are considered.

 

Examples:

*/ Show the quantity physically in stock for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("available", 100)

stock("available", ad_numero)

stock("available", dl_article)

*/ Show the quantity physically in stock at the 31.03.2017 for the item with ID = 100 (ad_numero, or dl_article, etc...) in the Warehouse with ID = 3.

stock("available", 100, {31.03.2017}, , 3)

stock("available", ad_numero, {31.03.2017}, , 3)

stock("available", dl_article, {31.03.2017}, , 3)

*/ Show the quantity that will be physically in stock at the 31.03.2017 for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("available", 100, {31.03.2017})

stock("available", ad_numero, {31.03.2017})

stock("available", dl_article, {31.03.2017})

*/ Show the quantity already ordered at suppliers (or in production) for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("suppliersorders", 100)

stock("suppliersorders", ad_numero)

stock("suppliersorders", dl_article)

*/ Show the quantity reserved (already ordered by customers) for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("customersorders", 100)

stock("customersorders", ad_numero)

stock("customersorders", dl_article)

*/ Show the quantity available, after having taken into consideration also the reservations, for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("available", 100) - stock("customersorders", 100)

stock("available", ad_numero) - stock("customersorders", ad_numero)

stock("available", dl_article) - stock("customersorders", dl_article)

*/ Show the quantity already delivered to customers for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("customersdeliveries", 100)

stock("customersdeliveries", ad_numero)

stock("customersdeliveries", dl_article)

*/ Show the quantity already delivered to customers in the period of march 2017 for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("customersdeliveries", 100, {31.03.2017}, {01.03.2017})

stock("customersdeliveries", ad_numero, {31.03.2017}, {01.03.2017})

stock("customersdeliveries", dl_article, {31.03.2017}, {01.03.2017})

*/ Show the quantity on worksheets for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("customersworksheets", 100)

stock("customersworksheets", ad_numero)

stock("customersworksheets", dl_article)

*/ Show the total sales amount for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("customersdeliveries", 100)

stock("customersdeliveries", ad_numero)

stock("customersdeliveries", dl_article)

*/ Show the total sales amount for the period of march 2017 for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("customersdeliveries", 100, {31.03.2017}, {01.03.2017})

stock("customersdeliveries", ad_numero, {31.03.2017}, {01.03.2017})

stock("customersdeliveries", dl_article, {31.03.2017}, {01.03.2017})

*/ Show the total quantity sold for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("salesquantity", 100)

stock("salesquantity", ad_numero)

stock("salesquantity", dl_article)

*/ Show the total quantity sold for the period of march 2017 for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("salesquantity", 100, {31.03.2017}, {01.03.2017})

stock("salesquantity", ad_numero, {31.03.2017}, {01.03.2017})

stock("salesquantity", dl_article, {31.03.2014}, {01.03.2014})

*/ Show the total quantity returned by customers for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("salesquantityreturned", 100)

stock("salesquantityreturned", ad_numero)

stock("salesquantityreturned", dl_article)

*/ Show the total quantity returned by customers for the period of march 2017 for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("salesquantityreturned", 100, {31.03.2017}, {01.03.2017})

stock("salesquantityreturned", ad_numero, {31.03.2017}, {01.03.2017})

stock("salesquantityreturned", dl_article, {31.03.2017}, {01.03.2017})

*/ Show the last sale date for the item with ID = 100 (ad_numero, or dl_article, etc...).

stock("saleslastdate", 100)

stock("saleslastdate", ad_numero)

stock("saleslastdate", dl_article)

Did you find this article useful?

0 out of 0 found this helpful