ISStockLevel.Location

Description

The place where the stock is stored.

Syntax

object.Location

Part Attribute Type Description
object Required
The object always implements the ISStockLevel interface
Restriction: This property is readonly.

Return Value

ISShortCode

Example

Display the information about the stock items and linked stock levels, including the data about the stock level location.

Dim aFilter
Dim aStockItems
Dim aStockItem
Dim aMessage
Dim i, j
Dim aStockLevels
Dim aStockLevel

Set aFilter = InventoryUtils.CreateStockItemFilter
aFilter.SKU = "TEST1"  
set aStockItems = InventoryUtils.LoadStockItems(aFilter)

aMessage = "Stock Items Count = " & aStockItems.Count

for i = 0 to aStockItems.Count - 1
  set aStockItem = aStockItems.Item(i)
  aMessage = aMessage & vbNewLine & "-------------------------------" & vbNewLine &_
    " - Description: " & aStockItem.Description 

  set aFilter = InventoryUtils.CreateStockLevelFilter
  aFilter.StockItem = aStockItem
  set aStockLevels = InventoryUtils.LoadStockLevels(aFilter)

  aMessage = aMessage & vbNewLine & "Stock Levels Count = " & aStockLevels.Count
  for j = 0 to aStockLevels.Count - 1
    set aStockLevel = aStockLevels.Item(j)
    aMessage = aMessage & vbNewLine &_
      " - Maximum: " & aStockLevel.Maximum & vbNewLine &_
      " - Minimum: " & aStockLevel.Minimum & vbNewLine &_
      " - Note: " & aStockLevel.Note & vbNewLine &_
      " - Reorder: " & aStockLevel.Reorder & vbNewLine 

    if not aStockLevel.Location is nothing then
      aMessage = aMessage & " - Location: " &_
        aStockLevel.Location.Description & " (" & aStockLevel.Location.Code &_ 
        ")" & vbNewLine
    end if       
  next 'j         

next 'i                          

Profile.MsgBox(aMessage)      
Note:

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

Version information

Added in v7.8.0