Tables [dbo].[BillingMinorItem]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)218001
Created4:57:09 PM Thursday, September 7, 2006
Last Modified8:54:33 AM Thursday, December 5, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDescription
Primary Key PK_BillingMinorItem: BMinPriKeyIndexes IX_BillingMinorItem_DocumentNumber_IHPriKey: BMinPriKey\RevenueRatingImportedSplitHaulFID\DocumentNumber\IHPriKeyIndexes IX_BillingMinorItem_ExtraStopFID: BMinPriKey\ExtraStopFIDBMinPriKeyint4
No
1 - 1
Foreign Keys FK_BillingMinorItem_BillingMajorItem: [dbo].[BillingMajorItem].BMajPriKeyIndexes IX_BillingMinorItem_BMajPriKey: BMajPriKeyBMajPriKeyint4
No
Foreign Keys FK_BillingMinorItem_AccountingNote: [dbo].[AccountingNote].ANPriKeyANPriKeyint4
Yes
Foreign Keys FK_BillingMinorItem_ItemCode: [dbo].[ItemCode].ICPriKeyICPriKeyint4
No
InvoiceFlagvarchar(1)1
Yes
Descriptionvarchar(128)128
No
Indexes IX_BillingMinorItem_Amount: AmountAmountmoney8
No
InvoiceAmountmoney8
Yes
Percentagefloat8
Yes
Quantityfloat8
Yes
Ratefloat8
Yes
AgentPercentagefloat8
Yes
GrossAmountmoney8
Yes
Discountfloat8
Yes
DocDatedatetime8
Yes
JournalDatedatetime8
Yes
PostedDatedatetime8
Yes
Foreign Keys FK_BillingMinorItem_Sysuser: [dbo].[Sysuser].PostedByIndexes IX_BillingMinorItem_PostedBy: PostedByPostedByint4
Yes
Foreign Keys FK_BillingMinorItem_LocServ: [dbo].[LocServ].LSPriKeyIndexes IX_BillingMinorItem_LSPrikey: LSPriKeyLSPriKeyint4
Yes
Foreign Keys FK_BillingMinorItem_AlternateBillTo: [dbo].[AlternateBillTo].ABTPriKeyABTPriKeyint4
Yes
Indexes IX_BillingMinorItem_ApplyToDoc: ApplyToDocApplyToDocint4
Yes
Refers to the original BillingMinorItem transaction
Indexes IX_BillingMinorItem_DocumentNumber_IHPriKey: BMinPriKey\RevenueRatingImportedSplitHaulFID\DocumentNumber\IHPriKeyIndexes IX_BillingMinorItem_IHPriKey: IHPriKeyIHPriKeyint4
Yes
Invoice Header Primary Key.  A non-null value indicates that an invoice exists for this item.
Foreign Keys FK_BillingMinorItem_Division: [dbo].[Division].DivisionFIDDivisionFIDint4
Yes
AllocatedInvoiceAmountmoney8
Yes
ReductionAmountdecimal(12,2)9
Yes
ReducedInvoiceAmountdecimal(12,2)9
Yes
Quantity2float8
Yes
Foreign Keys FK_BillingMinorItem_RateType: [dbo].[RateTypes].RateTypeFIDRateTypeFIDint4
Yes
Indexes IX_BillingMinorItem_DocumentNumber_IHPriKey: BMinPriKey\RevenueRatingImportedSplitHaulFID\DocumentNumber\IHPriKeyRevenueRatingImportedSplitHaulFIDint4
Yes
Foreign Keys FK_BillingMinorItem_BranchFID: [dbo].[Branch].BranchFIDIndexes IX_BillingMinorItem_Branch: BranchFIDBranchFIDint4
Yes
Foreign Keys FK_BillingMinorItem_ARBranchFID: [dbo].[Branch].ARBranchFIDARBranchFIDint4
Yes
Foreign Keys FK_BillingMinorItem_ARDivision: [dbo].[Division].ARDivisionFIDARDivisionFIDint4
Yes
Foreign Keys FK_BillingMinorItem_PointOfService: [dbo].[PointOfService].PointOfServiceFIDPointOfServiceFIDint4
Yes
Foreign Keys FK_BillingMinorItem_CustomerInvoiceReportEDIItem: [dbo].[CustomerInvoiceReportEDIItem].CustomerInvoiceReportEDIItemFIDCustomerInvoiceReportEDIItemFIDint4
Yes
Foreign Keys FK_BillingMinorItem_ExtraStop: [dbo].[XtraStop].ExtraStopFIDIndexes IX_BillingMinorItem_ExtraStopFID: BMinPriKey\ExtraStopFIDExtraStopFIDint4
Yes
SalesTaxItembit1
Yes
Indexes IX_BillingMinorItem_DocumentNumber_IHPriKey: BMinPriKey\RevenueRatingImportedSplitHaulFID\DocumentNumber\IHPriKeyDocumentNumbervarchar(21)21
Yes
Foreign Keys FK_BillingMinorItem_LaborRatingTypeFID: [dbo].[LaborRatingType].LaborRatingTypeFIDLaborRatingTypeFIDint4
Yes
RateSourcevarchar(50)50
Yes
RateSourceRecordint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_BillingMinorItem: BMinPriKeyPK_BillingMinorItemBMinPriKey
Yes
80
IX_BillingMinorItem_AmountAmount80
IX_BillingMinorItem_ApplyToDocApplyToDoc80
IX_BillingMinorItem_BMajPriKeyBMajPriKey80
IX_BillingMinorItem_BranchBranchFID
IX_BillingMinorItem_DocumentNumber_IHPriKeyBMinPriKey, RevenueRatingImportedSplitHaulFID, DocumentNumber, IHPriKey
IX_BillingMinorItem_ExtraStopFIDBMinPriKey, ExtraStopFID
IX_BillingMinorItem_IHPriKeyIHPriKey80
IX_BillingMinorItem_LSPrikeyLSPriKey
IX_BillingMinorItem_PostedByPostedBy
Foreign Keys Foreign Keys
NameColumns
FK_BillingMinorItem_AlternateBillToABTPriKey->[dbo].[AlternateBillTo].[ABTPriKey]
FK_BillingMinorItem_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_BillingMinorItem_ARBranchFIDARBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMinorItem_ARDivisionARDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMinorItem_BillingMajorItemBMajPriKey->[dbo].[BillingMajorItem].[BMajPriKey]
FK_BillingMinorItem_BranchFIDBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMinorItem_CustomerInvoiceReportEDIItemCustomerInvoiceReportEDIItemFID->[dbo].[CustomerInvoiceReportEDIItem].[CustomerInvoiceReportEDIItemID]
FK_BillingMinorItem_DivisionDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMinorItem_ExtraStopExtraStopFID->[dbo].[XtraStop].[PriKey]
FK_BillingMinorItem_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
FK_BillingMinorItem_LaborRatingTypeFIDLaborRatingTypeFID->[dbo].[LaborRatingType].[LaborRatingTypeID]
FK_BillingMinorItem_LocServLSPriKey->[dbo].[LocServ].[PriKey]
FK_BillingMinorItem_PointOfServicePointOfServiceFID->[dbo].[PointOfService].[PointOfServiceID]
FK_BillingMinorItem_SysuserPostedBy->[dbo].[Sysuser].[SysUserID]
FK_BillingMinorItem_RateTypeRateTypeFID->[dbo].[RateTypes].[RTypePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BillingMinorItem]
(
[BMinPriKey] [int] NOT NULL IDENTITY(1, 1),
[BMajPriKey] [int] NOT NULL,
[ANPriKey] [int] NULL,
[ICPriKey] [int] NOT NULL,
[InvoiceFlag] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Amount] [money] NOT NULL,
[InvoiceAmount] [money] NULL,
[Percentage] [float] NULL,
[Quantity] [float] NULL,
[Rate] [float] NULL,
[AgentPercentage] [float] NULL,
[GrossAmount] [money] NULL,
[Discount] [float] NULL,
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBy] [int] NULL,
[LSPriKey] [int] NULL,
[ABTPriKey] [int] NULL,
[ApplyToDoc] [int] NULL,
[IHPriKey] [int] NULL,
[DivisionFID] [int] NULL,
[AllocatedInvoiceAmount] [money] NULL,
[ReductionAmount] [decimal] (12, 2) NULL,
[ReducedInvoiceAmount] [decimal] (12, 2) NULL,
[Quantity2] [float] NULL,
[RateTypeFID] [int] NULL,
[RevenueRatingImportedSplitHaulFID] [int] NULL,
[BranchFID] [int] NULL,
[ARBranchFID] [int] NULL,
[ARDivisionFID] [int] NULL,
[PointOfServiceFID] [int] NULL,
[CustomerInvoiceReportEDIItemFID] [int] NULL,
[ExtraStopFID] [int] NULL,
[SalesTaxItem] [bit] NULL,
[DocumentNumber] [varchar] (21) 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].[BillingMinorItem] ADD CONSTRAINT [PK_BillingMinorItem] PRIMARY KEY NONCLUSTERED  ([BMinPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_Amount] ON [dbo].[BillingMinorItem] ([Amount]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_ApplyToDoc] ON [dbo].[BillingMinorItem] ([ApplyToDoc]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_BMajPriKey] ON [dbo].[BillingMinorItem] ([BMajPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_Branch] ON [dbo].[BillingMinorItem] ([BranchFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_DocumentNumber_IHPriKey] ON [dbo].[BillingMinorItem] ([DocumentNumber], [IHPriKey]) INCLUDE ([BMinPriKey], [RevenueRatingImportedSplitHaulFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_ExtraStopFID] ON [dbo].[BillingMinorItem] ([ExtraStopFID]) INCLUDE ([BMinPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_IHPriKey] ON [dbo].[BillingMinorItem] ([IHPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_LSPrikey] ON [dbo].[BillingMinorItem] ([LSPriKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorItem_PostedBy] ON [dbo].[BillingMinorItem] ([PostedBy]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_AlternateBillTo] FOREIGN KEY ([ABTPriKey]) REFERENCES [dbo].[AlternateBillTo] ([ABTPriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_ARBranchFID] FOREIGN KEY ([ARBranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_ARDivision] FOREIGN KEY ([ARDivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_BillingMajorItem] FOREIGN KEY ([BMajPriKey]) REFERENCES [dbo].[BillingMajorItem] ([BMajPriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_BranchFID] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_CustomerInvoiceReportEDIItem] FOREIGN KEY ([CustomerInvoiceReportEDIItemFID]) REFERENCES [dbo].[CustomerInvoiceReportEDIItem] ([CustomerInvoiceReportEDIItemID])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_ExtraStop] FOREIGN KEY ([ExtraStopFID]) REFERENCES [dbo].[XtraStop] ([PriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_LaborRatingTypeFID] FOREIGN KEY ([LaborRatingTypeFID]) REFERENCES [dbo].[LaborRatingType] ([LaborRatingTypeID])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_LocServ] FOREIGN KEY ([LSPriKey]) REFERENCES [dbo].[LocServ] ([PriKey])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_PointOfService] FOREIGN KEY ([PointOfServiceFID]) REFERENCES [dbo].[PointOfService] ([PointOfServiceID])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_Sysuser] FOREIGN KEY ([PostedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[BillingMinorItem] ADD CONSTRAINT [FK_BillingMinorItem_RateType] FOREIGN KEY ([RateTypeFID]) REFERENCES [dbo].[RateTypes] ([RTypePriKey])
GO
GRANT SELECT ON  [dbo].[BillingMinorItem] TO [MssExec]
GRANT INSERT ON  [dbo].[BillingMinorItem] TO [MssExec]
GRANT DELETE ON  [dbo].[BillingMinorItem] TO [MssExec]
GRANT UPDATE ON  [dbo].[BillingMinorItem] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Refers to the original BillingMinorItem transaction', 'SCHEMA', N'dbo', 'TABLE', N'BillingMinorItem', 'COLUMN', N'ApplyToDoc'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Invoice Header Primary Key.  A non-null value indicates that an invoice exists for this item.', 'SCHEMA', N'dbo', 'TABLE', N'BillingMinorItem', 'COLUMN', N'IHPriKey'
GO
Uses
Used By