Tables [dbo].[InvoicedDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)28723
Created4:57:09 PM Thursday, September 7, 2006
Last Modified7:37:19 PM Tuesday, September 24, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_InvoicedDetail: IDPriKeyIDPriKeyint4
No
1 - 1
Foreign Keys FK_InvoicedDetail_InvoicedGroup: [dbo].[InvoicedGroup].IGPriKeyIndexes IX_InvoicedDetail_BillingMajor: IGPriKey\BillingMajorFIDIndexes IX_InvoicedDetail_BillingMinor: IGPriKey\BillingMinorFIDIndexes IX_InvoicedDetail_ExtraStopFID: IGPriKey\ExtraStopFIDIndexes IX_InvoicedDetail_IGPriKey: IGPriKeyIGPriKeyint4
No
Descriptionvarchar(128)128
No
Amountmoney8
Yes
ItemCodeint4
Yes
Quantityfloat8
Yes
Ratefloat8
Yes
Discountfloat8
Yes
GrossAmountmoney8
Yes
SortOrderint4
No
Indexes IX_InvoicedDetail_BillingMajor: IGPriKey\BillingMajorFIDBillingMajorFIDint4
Yes
Indexes IX_InvoicedDetail_BillingMinor: IGPriKey\BillingMinorFIDBillingMinorFIDint4
Yes
Rollupbit1
No
((0))
Hiddenbit1
No
((0))
Adhocbit1
No
((0))
ClaimHandlingRevenueFIDint4
Yes
ClaimItemDueFromFIDint4
Yes
Quantity2float8
Yes
Foreign Keys FK_InvoiceDetail_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
Foreign Keys FK_InvoicedDetail_CustomerInvoiceReportEDIItem: [dbo].[CustomerInvoiceReportEDIItem].CustomerInvoiceReportEDIItemFIDCustomerInvoiceReportEDIItemFIDint4
Yes
Foreign Keys FK_InvoicedDetail_PointOfService: [dbo].[PointOfService].PointOfServiceFIDPointOfServiceFIDint4
Yes
Foreign Keys FK_InvoicedDetail_ExtraStop: [dbo].[XtraStop].ExtraStopFIDIndexes IX_InvoicedDetail_ExtraStopFID: IGPriKey\ExtraStopFIDExtraStopFIDint4
Yes
NoteTextvarchar(1024)1024
Yes
Foreign Keys FK_InvoicedDetail_LaborRatingTypeFID: [dbo].[LaborRatingType].LaborRatingTypeFIDLaborRatingTypeFIDint4
Yes
RateSourcevarchar(50)50
Yes
RateSourceRecordint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_InvoicedDetail: IDPriKeyPK_InvoicedDetailIDPriKey
Yes
80
IX_InvoicedDetail_BillingMajorIGPriKey, BillingMajorFID
IX_InvoicedDetail_BillingMinorIGPriKey, BillingMinorFID
IX_InvoicedDetail_ExtraStopFIDIGPriKey, ExtraStopFID
IX_InvoicedDetail_IGPriKeyIGPriKey
Foreign Keys Foreign Keys
NameUpdateDeleteColumns
FK_InvoicedDetail_CustomerInvoiceReportEDIItemCustomerInvoiceReportEDIItemFID->[dbo].[CustomerInvoiceReportEDIItem].[CustomerInvoiceReportEDIItemID]
FK_InvoicedDetail_ExtraStopExtraStopFID->[dbo].[XtraStop].[PriKey]
FK_InvoicedDetail_InvoicedGroupCascadeCascadeIGPriKey->[dbo].[InvoicedGroup].[IGPriKey]
FK_InvoicedDetail_LaborRatingTypeFIDLaborRatingTypeFID->[dbo].[LaborRatingType].[LaborRatingTypeID]
FK_InvoicedDetail_PointOfServicePointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
FK_InvoiceDetail_RateTypeRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InvoicedDetail]
(
[IDPriKey] [int] NOT NULL IDENTITY(1, 1),
[IGPriKey] [int] NOT NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Amount] [money] NULL,
[ItemCode] [int] NULL,
[Quantity] [float] NULL,
[Rate] [float] NULL,
[Discount] [float] NULL,
[GrossAmount] [money] NULL,
[SortOrder] [int] NOT NULL,
[BillingMajorFID] [int] NULL,
[BillingMinorFID] [int] NULL,
[Rollup] [bit] NOT NULL CONSTRAINT [DF_InvoicedDetail_Rollup] DEFAULT ((0)),
[Hidden] [bit] NOT NULL CONSTRAINT [DF_InvoicedDetail_Hidden] DEFAULT ((0)),
[Adhoc] [bit] NOT NULL CONSTRAINT [DF_InvoicedDetail_Adhoc] DEFAULT ((0)),
[ClaimHandlingRevenueFID] [int] NULL,
[ClaimItemDueFromFID] [int] NULL,
[Quantity2] [float] NULL,
[RateTypeFID] [int] NULL,
[CustomerInvoiceReportEDIItemFID] [int] NULL,
[PointOfServiceFID] [int] NULL,
[ExtraStopFID] [int] NULL,
[NoteText] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LaborRatingTypeFID] [int] NULL,
[RateSource] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RateSourceRecord] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [PK_InvoicedDetail] PRIMARY KEY CLUSTERED  ([IDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_InvoicedDetail_BillingMajor] ON [dbo].[InvoicedDetail] ([BillingMajorFID]) INCLUDE ([IGPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_InvoicedDetail_BillingMinor] ON [dbo].[InvoicedDetail] ([BillingMinorFID]) INCLUDE ([IGPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_InvoicedDetail_ExtraStopFID] ON [dbo].[InvoicedDetail] ([ExtraStopFID]) INCLUDE ([IGPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_InvoicedDetail_IGPriKey] ON [dbo].[InvoicedDetail] ([IGPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [FK_InvoicedDetail_CustomerInvoiceReportEDIItem] FOREIGN KEY ([CustomerInvoiceReportEDIItemFID]) REFERENCES [dbo].[CustomerInvoiceReportEDIItem] ([CustomerInvoiceReportEDIItemID])
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [FK_InvoicedDetail_ExtraStop] FOREIGN KEY ([ExtraStopFID]) REFERENCES [dbo].[XtraStop] ([PriKey])
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [FK_InvoicedDetail_InvoicedGroup] FOREIGN KEY ([IGPriKey]) REFERENCES [dbo].[InvoicedGroup] ([IGPriKey]) ON DELETE CASCADE ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [FK_InvoicedDetail_LaborRatingTypeFID] FOREIGN KEY ([LaborRatingTypeFID]) REFERENCES [dbo].[LaborRatingType] ([LaborRatingTypeID])
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [FK_InvoicedDetail_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID])
GO
ALTER TABLE [dbo].[InvoicedDetail] ADD CONSTRAINT [FK_InvoiceDetail_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey])
GO
GRANT SELECT ON  [dbo].[InvoicedDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[InvoicedDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[InvoicedDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[InvoicedDetail] TO [MssExec]
GO
Uses
Used By