﻿if not Exists(SELECT * FROM information_schema.tables where Table_name = 'TaxDetail')
begin
create table dbo.TaxDetail
(
	ID	int Primary key identity(1,1),
	TaxHeader_ID	int references dbo.TaxHeader(ID) not null,
	Sstid	nvarchar(200),
	Sstt	nvarchar(200),
	Mu	nvarchar(200),
	Bsrn	nvarchar(200),
	Am	decimal(19,4) not null,
	Fee	decimal(19,4) not null,
	Cfee	decimal(19,4) not null,
	Cut	nvarchar(200),
	Exr	decimal(19,4) not null,
	Prdis	decimal(19,4) not null,
	Dis	decimal(19,4) not null,
	Adis	decimal(19,4) not null,
	Vra	decimal(19,4) not null,
	Vam	decimal(19,4) not null,
	Odt	nvarchar(200),
	Odr	decimal(19,4) not null,
	Odam	decimal(19,4) not null,
	Olt	nvarchar(200),	
	Olr	decimal(19,4) not null,
	Olam	decimal(19,4) not null,
	Consfee	decimal(19,4) not null,
	Spro	decimal(19,4) not null,
	Bros	decimal(19,4) not null,
	Tcpbs	decimal(19,4) not null,
	Cop	decimal(19,4) not null,
	Vop	decimal(19,4) not null,
	Tsstam	decimal(19,4) not null,
	Nw	decimal(19,4) not null,
	Ssrv	decimal(19,4) not null,
	Sscv	decimal(19,4) not null,
	pspd	decimal(19,4) not null,
	
	[Guid] nvarchar(400)
)
end