USE [astroved]
GO

/****** Object:  Table [dbo].[purchase_orders]    Script Date: 27-03-2023 03:38:58 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[purchase_orders](
	[po_no] [int] IDENTITY(1,1) NOT NULL,
	[po_ref_no] [varchar](50) NOT NULL,
	[vendor_no] [int] NOT NULL,
	[po_date] [date] NOT NULL,
	[delivery_date] [date] NULL,
	[total_qty] [real] NULL,
	[gross_amount] [real] NULL,
	[discount_amount] [real] NULL,
	[cgst_amount] [real] NULL,
	[sgst_amount] [real] NULL,
	[freight_charge] [real] NULL,
	[net_amount] [real] NULL,
	[purchase_event] [varchar](50) NULL,
	[po_verified] [varchar](50) NULL,
	[po_prepared] [varchar](50) NULL,
	[po_received] [varchar](50) NULL,
	[po_authorized] [varchar](50) NULL,
	[po_status] [int] NULL,
 CONSTRAINT [PK_purchase_order] PRIMARY KEY CLUSTERED 
(
	[po_no] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO



CREATE TABLE [dbo].[purchase_order_details](
	[po_no] [int] NOT NULL,
	[product_id] [int] NULL,
	[product_name] [varchar](100) NULL,
	[hsn_code] [varchar](15) NULL,
	[qty] [real] NULL,
	[uom] [varchar](20) NULL,
	[rate] [real] NULL,
	[cgst] [real] NULL,
	[sgst] [real] NULL,
	[amount] [real] NULL
) ON [PRIMARY]
GO

