USE [befri_Goldhoo]
GO

/****** Object:  View [Discount].[V_DiscountAccDetail]    Script Date: 2020/11/30 17:14:41 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE VIEW [Discount].[V_DiscountAccDetail]
AS
SELECT dad.DiscountAccDetailId, dad.TableName, dad.VoucherLineId, dad.OperationType, dad.WarehouseId, 
                  dad.InventoryId, i.InventoryNumber, i.InventoryName, dad.IncreasedQty, dad.DecreasedQty, dad.DiscountCoef, 
                  dad.AccountedOn, dad.Description, i.DeliveryCycle
FROM     Discount.DiscountAccDetail AS dad INNER JOIN
                  basedata.Inventory AS i ON i.InventoryId = dad.InventoryId

GO