[dbo].[ClaimHandlingExpense]
CREATE TABLE [dbo].[ClaimHandlingExpense]
(
[ClaimHandlingExpenseID] [int] NOT NULL IDENTITY(1, 1),
[ClaimHandlingTypeFID] [int] NOT NULL,
[ClaimFID] [int] NOT NULL,
[Amount] [money] NOT NULL CONSTRAINT [DF_ClaimHandlingExpense_Amount] DEFAULT ((0)),
[HandledDate] [datetime] NOT NULL,
[VendorNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PONumber] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceNumber] [varchar] (30) 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,
[1099Flag] [bit] NOT NULL CONSTRAINT [DF_ClaimHandlingExpense_1099Flag] DEFAULT ((0)),
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimHandlingExpense] ADD CONSTRAINT [PK_ClaimHandlingExpense] PRIMARY KEY NONCLUSTERED ([ClaimHandlingExpenseID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimHandlingExpense_PostedBySysuserFID] ON [dbo].[ClaimHandlingExpense] ([PostedBySysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimHandlingExpense] ADD CONSTRAINT [FK_ClaimHandlingExpense_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[ClaimHandlingExpense] ADD CONSTRAINT [FK_ClaimHandlingExpense_Claim] FOREIGN KEY ([ClaimFID]) REFERENCES [dbo].[Claim] ([ClaimID])
GO
ALTER TABLE [dbo].[ClaimHandlingExpense] ADD CONSTRAINT [FK_ClaimHandlingExpense_ClaimHandlingType] FOREIGN KEY ([ClaimHandlingTypeFID]) REFERENCES [dbo].[ClaimHandlingType] ([ClaimHandlingTypeID])
GO
ALTER TABLE [dbo].[ClaimHandlingExpense] ADD CONSTRAINT [FK_ClaimHandlingExpense_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[ClaimHandlingExpense] ADD CONSTRAINT [FK_ClaimHandlingExpense_PostedbySysuser] FOREIGN KEY ([PostedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[ClaimHandlingExpense] TO [MssExec]
GRANT INSERT ON [dbo].[ClaimHandlingExpense] TO [MssExec]
GRANT DELETE ON [dbo].[ClaimHandlingExpense] TO [MssExec]
GRANT UPDATE ON [dbo].[ClaimHandlingExpense] TO [MssExec]
GO