[dbo].[ClaimLiabilityItem]
CREATE TABLE [dbo].[ClaimLiabilityItem]
(
[ClaimLiabilityItemID] [int] NOT NULL IDENTITY(1, 1),
[ClaimLiabilityFID] [int] NOT NULL,
[ClaimItemFID] [int] NOT NULL,
[LiabilityAmount] [money] NOT NULL CONSTRAINT [DF_ClaimLiabilityItem_LiabilityAmount] DEFAULT ((0)),
[PayableAmount] [money] NOT NULL CONSTRAINT [DF_ClaimLiabilityItem_PayableAmount] DEFAULT ((0)),
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBySysuserFID] [int] NULL,
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimLiabilityItem] ADD CONSTRAINT [PK_ClaimLiabilityItem] PRIMARY KEY NONCLUSTERED ([ClaimLiabilityItemID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimLiabilityItem_PostedBySysuserFID] ON [dbo].[ClaimLiabilityItem] ([PostedBySysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimLiabilityItem] ADD CONSTRAINT [FK_ClaimLiabilityItem_ClaimItem] FOREIGN KEY ([ClaimItemFID]) REFERENCES [dbo].[ClaimItem] ([ClaimItemID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ClaimLiabilityItem] ADD CONSTRAINT [FK_ClaimLiabilityItem_Liability] FOREIGN KEY ([ClaimLiabilityFID]) REFERENCES [dbo].[ClaimLiability] ([ClaimLiabilityID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ClaimLiabilityItem] ADD CONSTRAINT [FK_ClaimLiability_PostedbySysuser] FOREIGN KEY ([PostedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[ClaimLiabilityItem] TO [MssExec]
GRANT INSERT ON [dbo].[ClaimLiabilityItem] TO [MssExec]
GRANT DELETE ON [dbo].[ClaimLiabilityItem] TO [MssExec]
GRANT UPDATE ON [dbo].[ClaimLiabilityItem] TO [MssExec]
GO