Tables [dbo].[ClaimSettlement]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)376
Created6:18:15 PM Tuesday, February 27, 2007
Last Modified10:37:48 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_ClaimSettlement: ClaimSettlementIDIndexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDClaimSettlementIDint4
No
1 - 1
Foreign Keys FK_ClaimSettlement_Claim: [dbo].[Claim].ClaimFIDIndexes IX_ClaimSettlement_ClaimDescription: ClaimFID\DescriptionClaimFIDint4
No
Foreign Keys FK_ClaimSettlement_ClaimSettlementType: [dbo].[ClaimSettlementType].ClaimSettlementTypeFIDIndexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDClaimSettlementTypeFIDint4
No
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDVendorNumbervarchar(15)15
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDPONumbervarchar(50)50
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDInvoiceNumbervarchar(30)30
Yes
AssignedToVendorDatedatetime8
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDShipperDeductibleApplyAmountmoney8
No
((0))
1099Flagbit1
No
((0))
Indexes IX_ClaimSettlement_ClaimDescription: ClaimFID\DescriptionIndexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDDescriptionvarchar(128)128
No
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDInvoiceDatedatetime8
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDDocDatedatetime8
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDJournalDatedatetime8
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDPostedDatedatetime8
Yes
Foreign Keys FK_ClaimSettlement_PostedbySysuser: [dbo].[Sysuser].PostedBySysuserFIDIndexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDIndexes IX_ClaimSettlement_PostedBySysuserFID: PostedBySysuserFIDPostedBySysuserFIDint4
Yes
Indexes IX_ClaimSettlement: ClaimSettlementTypeFID\VendorNumber\PONumber\InvoiceNumber\ShipperDeductibleApplyAmount\Description\InvoiceDate\DocDate\JournalDate\PostedDate\PostedBySysuserFID\DocumentNumber\ClaimSettlementIDDocumentNumbervarchar(21)21
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_ClaimSettlement: ClaimSettlementIDPK_ClaimSettlementClaimSettlementID
Yes
80
IX_ClaimSettlementClaimSettlementTypeFID, VendorNumber, PONumber, InvoiceNumber, ShipperDeductibleApplyAmount, Description, InvoiceDate, DocDate, JournalDate, PostedDate, PostedBySysuserFID, DocumentNumber, ClaimSettlementID
IX_ClaimSettlement_ClaimDescriptionClaimFID, Description
IX_ClaimSettlement_PostedBySysuserFIDPostedBySysuserFID
Triggers Triggers
NameANSI Nulls OnQuoted Identifier OnOn
ClaimSettlementTaskFieldChanged
Yes
Yes
After Update
Foreign Keys Foreign Keys
NameDeleteColumns
FK_ClaimSettlement_ClaimCascadeClaimFID->[dbo].[Claim].[ClaimID]
FK_ClaimSettlement_ClaimSettlementTypeClaimSettlementTypeFID->[dbo].[ClaimSettlementType].[ClaimSettlementTypeID]
FK_ClaimSettlement_PostedbySysuserPostedBySysuserFID->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ClaimSettlement]
(
[ClaimSettlementID] [int] NOT NULL IDENTITY(1, 1),
[ClaimFID] [int] NOT NULL,
[ClaimSettlementTypeFID] [int] 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,
[AssignedToVendorDate] [datetime] NULL,
[ShipperDeductibleApplyAmount] [money] NOT NULL CONSTRAINT [DF_ClaimSettlement_ShipperDeductibleApplyAmount] DEFAULT ((0)),
[1099Flag] [bit] NOT NULL CONSTRAINT [DF_ClaimSettlement_1099Flag] DEFAULT ((0)),
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[InvoiceDate] [datetime] NULL,
[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

create trigger [dbo].[ClaimSettlementTaskFieldChanged] on [dbo].[ClaimSettlement]
after update
as
set nocount on
    if( update( InvoiceDate ) or update( AssignedToVendorDate ) )
    begin
        update ToDo set ToDo.DueDate = dbo.udfTaskDueDate( ToDo.duetype, ToDo.duedays, dbo.GetClaimSettlementDateByClaimID( inserted.ClaimFID, DependencyDate.FieldName, ToDo.Identifier ) )
        from ToDo
        inner join Claim on Claim.OrdersFID = ToDo.OrderID
        inner join inserted on inserted.[Description] = ToDo.Identifier and inserted.ClaimFID = Claim.ClaimID
        inner join DependencyDate on ToDo.DependencyDateID = DependencyDate.DependencyDateID
        where DependencyDate.TableName = 'ClaimSettlement'
    end
GO
ALTER TABLE [dbo].[ClaimSettlement] ADD CONSTRAINT [PK_ClaimSettlement] PRIMARY KEY NONCLUSTERED  ([ClaimSettlementID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimSettlement_ClaimDescription] ON [dbo].[ClaimSettlement] ([ClaimFID], [Description]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimSettlement] ON [dbo].[ClaimSettlement] ([ClaimSettlementID]) INCLUDE ([ClaimSettlementTypeFID], [Description], [DocDate], [DocumentNumber], [InvoiceDate], [InvoiceNumber], [JournalDate], [PONumber], [PostedBySysuserFID], [PostedDate], [ShipperDeductibleApplyAmount], [VendorNumber]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimSettlement_PostedBySysuserFID] ON [dbo].[ClaimSettlement] ([PostedBySysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimSettlement] ADD CONSTRAINT [FK_ClaimSettlement_Claim] FOREIGN KEY ([ClaimFID]) REFERENCES [dbo].[Claim] ([ClaimID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ClaimSettlement] ADD CONSTRAINT [FK_ClaimSettlement_ClaimSettlementType] FOREIGN KEY ([ClaimSettlementTypeFID]) REFERENCES [dbo].[ClaimSettlementType] ([ClaimSettlementTypeID])
GO
ALTER TABLE [dbo].[ClaimSettlement] ADD CONSTRAINT [FK_ClaimSettlement_PostedbySysuser] FOREIGN KEY ([PostedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[ClaimSettlement] TO [MssExec]
GRANT INSERT ON  [dbo].[ClaimSettlement] TO [MssExec]
GRANT DELETE ON  [dbo].[ClaimSettlement] TO [MssExec]
GRANT UPDATE ON  [dbo].[ClaimSettlement] TO [MssExec]
GO
Uses
Used By