CREATE TABLE [dbo].[parts_inbound_delivery_notes] (
   [supplier_number] [int] NOT NULL,
   [year_key] [int] NOT NULL,
   [number_main] [varchar](50) NOT NULL,
   [number_sub] [varchar](50) NOT NULL
      CONSTRAINT [DF_parts_inbound_delivery_notes_number_sub] DEFAULT (''),
   [counter] [int] NOT NULL,
   [purchase_invoice_year] [int] NULL,
   [purchase_invoice_number] [varchar](50) NULL,
   [part_number] [varchar](100) NULL,
   [stock_no] [int] NULL,
   [amount] [numeric](11,2) NULL,
   [delivery_note_date] [datetime] NULL,
   [parts_order_number] [int] NULL,
   [parts_order_note] [varchar](50) NULL,
   [deliverers_note] [varchar](50) NULL,
   [referenced_order_number] [int] NULL,
   [referenced_order_position] [int] NULL,
   [referenced_order_line] [int] NULL,
   [is_veryfied] [smallint] NULL,
   [parts_order_type] [int] NULL,
   [rr_gross_price] [numeric](11,2) NULL,
   [purchase_total_net_price] [numeric](11,2) NULL,
   [parts_type] [int] NULL,
   [employee_number_veryfied] [int] NULL,
   [employee_number_imported] [int] NULL,
   [employee_number_last] [int] NULL,
   [client_db] [varchar](20) NOT NULL

   ,CONSTRAINT [parts_inbound_delivery_notes$0] PRIMARY KEY CLUSTERED ([supplier_number], [year_key], [number_main], [number_sub], [counter], [client_db])
)


GO
