CREATE TABLE [PurchaseOrderItem](
	[PurchaseOrderItemId] [bigint] IDENTITY(1,1) NOT NULL,
	[PurchaseOrderListId] [bigint] NULL,
	[ProductId] [bigint] NOT NULL,
	[HSN_Code][bigint] NOT NULL,
	[Quantity] [int] NULL,
	[UOM] [int] NOT NULl,
	[BasePrice] [decimal](10, 2) NULL,
	[CGST] [decimal](10, 2) NULL,
	[SGST] [decimal](10, 2) NULL,
	[POItemStatus] [int] NOT NULL,
	[LastUpdate] [datetime] NULL
)


-- drop table  [Vaaak].[PurchaseOrderItem]

CREATE TABLE [PurchaseOrderList](
	[PurchaseOrderListId] [bigint] IDENTITY(1,1) NOT NULL,
	[PORefferenceNo] [nvarchar] (50) NOT NULL,
	[VendorId] [int] NOT NULL,
	[CreatedDate] [datetime] NULL,
	[DeliveryDate] [datetime] NULL,
	[PurchaseEvent] [varchar](100) NULL,
	[POPreparedBy] [bigint] NOT NULL,
	[POStatus] [int] NOT NULL,
	[LastUpdate] [datetime] NULL
) 
