vwAnalytics_OpenPO_Snapshot View

<< Click to Display Table of Contents >>

Navigation:  iVend Database Database > Views >

vwAnalytics_OpenPO_Snapshot View

Navigation: iVend Database Database > Views >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

iVend 6.6 Database Help

vwAnalytics_OpenPO_Snapshot View

Collapse All Expand All

iVend Database Database : vwAnalytics_OpenPO_Snapshot View

Properties

Creation Date

4/13/2015 12:00 PM

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

 

StoreName

 

VarWChar

100

dbimages_tick

 

 

 

StoreCode

 

VarWChar

20

 

 

 

 

VendorName

 

VarWChar

100

 

 

 

 

OrderDate

 

DBTimeStamp

4

 

 

 

 

DeliveryDate

 

DBTimeStamp

4

 

 

 

 

PurchaseOrderId

 

VarWChar

20

 

 

 

 

Total

 

Numeric

9 (20,5)

 

 

 

 

ItemTotal

 

Numeric

9 (20,5)

 

 

 

 

OrderQty

 

Numeric

9 (20,4)

 

 

 

 

QuantityReceived

 

Numeric

9 (20,4)

 

 

 

 

ProductName

 

VarWChar

100

 

 

 

 

ProductCode

 

VarWChar

20

 

 

 

 

UOMQuantity

 

Numeric

9 (20,5)

dbimages_tick

 

 

 

UOMQuantityReceived

 

Numeric

9 (20,4)

dbimages_tick

 

 

 

UOM

 

VarWChar

100

dbimages_tick

 

 

Objects that vwAnalytics_OpenPO_Snapshot depends on

 

Database Object

Object Type

Description

Dep Level

CfgSiteInformation table

CfgSiteInformation

Table

Stores the site information. Enterprise always has the site id as 1. System Table Warning : Should not be modified directly

1

InvProduct table

InvProduct

Table

Stores the product related details.

1

InvUOM table

InvUOM

Table

Master table for the Inv UOM

1

PurPurchaseOrder table

PurPurchaseOrder

Table

Stores information related to Purchase order transactions done from Console or done from ERP on behalf of this store.

1

PurPurchaseOrderDetail table

PurPurchaseOrderDetail

Table

Stores the line details of the purchase order.

1

PurVendor table

PurVendor

Table

Defines the vendor details of an enterprise from which the products are purchased.

1

RtlStore table

RtlStore

Table

Contains the details of Stores defined in the system.

1

View Definition

CREATE VIEW [dbo].[vwAnalytics_OpenPO_Snapshot]

as

SELECT RtlStore.Description as StoreName, RtlStore.Id as StoreCode, PurPurchaseOrder.VendorName, PurPurchaseOrder.DeliveryDate as OrderDate,

 PurPurchaseOrder.DeliveryDate, PurPurchaseOrder.PurchaseOrderId, PurPurchaseOrder.Total,

 PurPurchaseOrderDetail.Total as ItemTotal, PurPurchaseOrderDetail.Quantity as OrderQty, PurPurchaseOrderDetail.QuantityReceived,

 InvProduct.Description as ProductName, InvProduct.Id as ProductCode , PurPurchaseOrderDetail.UOMQuantity,  PurPurchaseOrderDetail.UOMQuantityReceived,

 InvUOM.Description as UOM

FROM PurPurchaseOrder

INNER JOIN PurPurchaseOrderDetail ON PurPurchaseOrder.PurchaseOrderKey = PurPurchaseOrderDetail.PurchaseOrderKey

INNER JOIN RtlStore ON PurPurchaseOrder.SiteId = RtlStore.SiteId

AND RtlStore.StoreKey IN (

SELECT StoreKey From RtlStore S

WHERE S.SiteId = CASE WHEN (SELECT TOP 1 SiteId from CfgSiteInformation) <= 1 THEN S.SiteId ELSE (SELECT TOP 1 SiteId from CfgSiteInformation) END

)

INNER JOIN PurVendor ON PurPurchaseOrder.VendorKey = PurVendor.VendorKey

INNER JOIN InvProduct ON PurPurchaseOrderDetail.ProductKey = InvProduct.ProductKey

LEFT OUTER JOIN InvUOM ON PurPurchaseOrderDetail.UOMKey = InvUOM.UOMKey

WHERE PurPurchaseOrderDetail.Status = 0

See Also

Related Objects

iVend Database Database

 

 


© 2019 All Rights Reserved.

Send comments on this topic.