vw_InvInventoryItem View

<< Click to Display Table of Contents >>

Navigation:  iVend Database Database > Views >

vw_InvInventoryItem View

Navigation: iVend Database Database > Views >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

iVend 6.6 Database Help

vw_InvInventoryItem View

Collapse All Expand All

iVend Database Database : vw_InvInventoryItem View

Properties

Creation Date

9/18/2015 10:50 AM

Is Schema Bound

dbimages_boolean-false

Encrypted

dbimages_boolean-false

Ansi Nulls

dbimages_boolean-true

Columns

 

Column Name

Description

Datatype

Length

Allow Nulls

Default

Formula

 

InventoryItemKey

 

BigInt

8

 

 

 

 

WarehouseKey

 

BigInt

8

 

 

 

 

AvailableQuantity

 

Numeric

9 (38,5)

 

 

 

Objects that depend on vw_InvInventoryItem

 

Database Object

Object Type

Description

Dep Level

InvGetAllSelectedAttributeItemsList procedure

InvGetAllSelectedAttributeItemsList

Stored Procedure

 

2

vw_InvProductInventoryInfo view

vw_InvProductInventoryInfo

View

 

1

Objects that vw_InvInventoryItem depends on

 

Database Object

Object Type

Description

Dep Level

InvInventoryItem table

InvInventoryItem

Table

Stores inventory details for each Product for each Warehouse

1

InvInventoryLocation table

InvInventoryLocation

Table

Stores the location information for the Inventory available at different locations

1

InvLocation table

InvLocation

Table

Save the location infomation.

1

InvWarehouse table

InvWarehouse

Table

Defines a list of all warehouses defined in the system.

1

View Definition

CREATE VIEW [dbo].[vw_InvInventoryItem]

AS

SELECT A.InventoryItemKey,A.WarehouseKey, CASE WHEN I.IsLocationEnabled = 1 THEN ISNULL(SUM(ISNULL(B.AvailableQuantity,0)),0) ELSE A.AvailableQuantity END 'AvailableQuantity'

FROM InvInventoryItem A

INNER JOIN InvWarehouse I ON I.WarehouseKey = A.WarehouseKey

LEFT OUTER JOIN InvInventoryLocation B ON A.WarehouseKey = B.WarehouseKey AND A.ProductKey = B.ProductKey

LEFT OUTER JOIN InvLocation C ON B.LocationKey = C.LocationKey AND C.WarehouseKey = A.WarehouseKey

WHERE ISNULL(C.Sales, 1) = 1

GROUP BY A.InventoryItemKey,A.WarehouseKey, I.IsLocationEnabled, A.AvailableQuantity

See Also

Related Objects

iVend Database Database

 

 


© 2019 All Rights Reserved.

Send comments on this topic.