﻿if not Exists(SELECT * FROM information_schema.tables where Table_name = 'SalaryReceiptItem')
begin
	create table SalaryReceiptItem
	(
		ID	int Primary Key identity(1,1),
		SR_ID	int references SalaryReceipt(ID) not null, 
		PD_ID	int references PrescriptionDetail(ID) null, 
		Dom_ID_RowType	int references domain(ID) not null, 
		Dom_ID_DocType	int references domain(ID) not null, 
		Price	decimal(19,4) not null,
		SS_ID		int references SalarySheet(ID) null, 
		Description		nvarchar(1000) null
	)
end