[dbo].[ClaimHandlingRevenue]
CREATE TABLE [dbo].[ClaimHandlingRevenue]
(
[ClaimHandlingRevenueID] [int] NOT NULL IDENTITY(1, 1),
[ClaimHandlingTypeFID] [int] NOT NULL,
[ClaimFID] [int] NOT NULL,
[Amount] [money] NOT NULL CONSTRAINT [DF_ClaimHandlingRevenue_Amount] DEFAULT ((0)),
[HandledDate] [datetime] NOT NULL,
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BranchFID] [int] NOT NULL,
[DivisionFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBySysuserFID] [int] NULL,
[InvoicedHeaderFID] [int] NULL,
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimHandlingRevenue] ADD CONSTRAINT [PK_ClaimHandlingRevenue] PRIMARY KEY NONCLUSTERED ([ClaimHandlingRevenueID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimHandlingRevenue_PostedBySysuserFID] ON [dbo].[ClaimHandlingRevenue] ([PostedBySysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimHandlingRevenue] ADD CONSTRAINT [FK_ClaimHandlingRevenue_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[ClaimHandlingRevenue] ADD CONSTRAINT [FK_ClaimHandlingRevenue_Claim] FOREIGN KEY ([ClaimFID]) REFERENCES [dbo].[Claim] ([ClaimID])
GO
ALTER TABLE [dbo].[ClaimHandlingRevenue] ADD CONSTRAINT [FK_ClaimHandlingRevenue_ClaimHandlingType] FOREIGN KEY ([ClaimHandlingTypeFID]) REFERENCES [dbo].[ClaimHandlingType] ([ClaimHandlingTypeID])
GO
ALTER TABLE [dbo].[ClaimHandlingRevenue] ADD CONSTRAINT [FK_ClaimHandlingRevenue_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[ClaimHandlingRevenue] ADD CONSTRAINT [FK_ClaimHandlingRevenue_PostedbySysuser] FOREIGN KEY ([PostedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[ClaimHandlingRevenue] TO [MssExec]
GRANT INSERT ON [dbo].[ClaimHandlingRevenue] TO [MssExec]
GRANT DELETE ON [dbo].[ClaimHandlingRevenue] TO [MssExec]
GRANT UPDATE ON [dbo].[ClaimHandlingRevenue] TO [MssExec]
GO