ISInventoryAuditFilter.StockItem

Description

This filter property is used to load inventory audit records with the selected stock item.

Syntax

object.StockItem

Part Attribute Type Description
object Required
The object always implements the ISInventoryAuditFilter interface

Return Value

ISStockItem

Example

Display the number of the inventory audit records loaded on the basis of the selected filter and some information about them.

Dim aStockItems
Dim aStockItem
Dim aFilter
Dim aInventoryAudits
Dim aInventoryAudit
Dim i
Dim aMessage

Set aFilter = InventoryUtils.CreateStockItemFilter
aFilter.Code = "BB"
set aStockItems = InventoryUtils.LoadStockItems(aFilter)
set aStockItem = aStockItems.Item(i)

set aFilter = InventoryUtils.CreateInventoryAuditFilter
aFilter.StockItem = aStockItem
set aInventoryAudits = InventoryUtils.LoadInventoryAudits(aFilter) 

aMessage = "Inventory Audit Records Count = " & aInventoryAudits.Count
for i = 0 to aInventoryAudits.Count - 1
  set aInventoryAudit = aInventoryAudits.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
    "Date: " & aInventoryAudit.Date &vbNewLine &_
    "Note: " & aInventoryAudit.Note & vbNewLine &_
    "Order Number: " & vbNewLine & aInventoryAudit.OrderNum &_
    "Quantity: " & aInventoryAudit.Quantity

  if aInventoryAudit.Location is nothing then
    aMessage =  aMessage & vbNewLine & vbNewLine & "No POS"            
  else
    aMessage = aMessage & vbNewLine & "POS: " & aInventoryAudit.Location.Code
  end if   
next

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Stock Item can be found in Maintain > Inventory > Stock Lots > Stock Item.

Version information

Added in v7.8.0