Tables [dbo].[BillingMinorReduction]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)2991
Created10:12:51 PM Thursday, December 28, 2006
Last Modified7:30:49 PM Wednesday, February 28, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_BillingMinorReduction: BillingMinorReductionIDBillingMinorReductionIDint4
No
1 - 1
Foreign Keys FK_BillingMinorReduction_BillingMinorItem: [dbo].[BillingMinorItem].BillingMinorItemFIDIndexes IX_BillingMinorReduction_BillingMinorItem_BillingMinorItemAddBack: BillingMinorItemFID\BillingMinorItemAddBackFIDBillingMinorItemFIDint4
No
Foreign Keys FK_BillingMinorReduction_ReductionType: [dbo].[ReductionType].ReductionTypeFIDReductionTypeFIDint4
No
Foreign Keys FK_BillingMinorReduction_ReductionBasis: [dbo].[ReductionBasis].ReductionBasisFIDReductionBasisFIDint4
Yes
Foreign Keys FK_BillingMinorReduction_BillingMinorItemAddBack: [dbo].[BillingMinorItem].BillingMinorItemAddBackFIDIndexes IX_BillingMinorReduction_BillingMinorItemAddBack: BillingMinorItemAddBackFIDIndexes IX_BillingMinorReduction_BillingMinorItem_BillingMinorItemAddBack: BillingMinorItemFID\BillingMinorItemAddBackFIDBillingMinorItemAddBackFIDint4
Yes
Foreign Keys FK_BillingMinorReduction_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
Yes
Foreign Keys FK_BillingMinorReduction_Division: [dbo].[Division].DivisionFIDDivisionFIDint4
Yes
Descriptionvarchar(128)128
Yes
Percentagedecimal(10,3)9
Yes
ReductionAmountmoney8
No
((0))
Foreign Keys FK_BillingMinorReduction_ReductionTemplateHeader: [dbo].[ReductionTemplateHeader].ReductionTemplateFIDReductionTemplateFIDint4
Yes
Foreign Keys FK_BillingMinorReduction_BranchFID: [dbo].[Branch].BranchFIDBranchFIDint4
Yes
Foreign Keys FK_BillingMinorReduction_ARBranchFID: [dbo].[Branch].ARBranchFIDARBranchFIDint4
Yes
Foreign Keys FK_BillingMinorReduction_ARDivision: [dbo].[Division].ARDivisionFIDARDivisionFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_BillingMinorReduction: BillingMinorReductionIDPK_BillingMinorReductionBillingMinorReductionID
Yes
80
IX_BillingMinorReduction_BillingMinorItem_BillingMinorItemAddBackBillingMinorItemFID, BillingMinorItemAddBackFID
IX_BillingMinorReduction_BillingMinorItemAddBackBillingMinorItemAddBackFID
Foreign Keys Foreign Keys
NameColumns
FK_BillingMinorReduction_ARBranchFIDARBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMinorReduction_ARDivisionARDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMinorReduction_BillingMinorItemAddBackBillingMinorItemAddBackFID->[dbo].[BillingMinorItem].[BMinPriKey]
FK_BillingMinorReduction_BillingMinorItemBillingMinorItemFID->[dbo].[BillingMinorItem].[BMinPriKey]
FK_BillingMinorReduction_BranchFIDBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMinorReduction_DivisionDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMinorReduction_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_BillingMinorReduction_ReductionBasisReductionBasisFID->[dbo].[ReductionBasis].[ReductionBasisID]
FK_BillingMinorReduction_ReductionTemplateHeaderReductionTemplateFID->[dbo].[ReductionTemplateHeader].[ReductionTemplateID]
FK_BillingMinorReduction_ReductionTypeReductionTypeFID->[dbo].[ReductionType].[ReductionTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BillingMinorReduction]
(
[BillingMinorReductionID] [int] NOT NULL IDENTITY(1, 1),
[BillingMinorItemFID] [int] NOT NULL,
[ReductionTypeFID] [int] NOT NULL,
[ReductionBasisFID] [int] NULL,
[BillingMinorItemAddBackFID] [int] NULL,
[ItemCodeFID] [int] NULL,
[DivisionFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Percentage] [decimal] (10, 3) NULL,
[ReductionAmount] [money] NOT NULL CONSTRAINT [DF_BillingMinorReduction_ReductionAmount] DEFAULT ((0)),
[ReductionTemplateFID] [int] NULL,
[BranchFID] [int] NULL,
[ARBranchFID] [int] NULL,
[ARDivisionFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [PK_BillingMinorReduction] PRIMARY KEY NONCLUSTERED  ([BillingMinorReductionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorReduction_BillingMinorItemAddBack] ON [dbo].[BillingMinorReduction] ([BillingMinorItemAddBackFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorReduction_BillingMinorItem_BillingMinorItemAddBack] ON [dbo].[BillingMinorReduction] ([BillingMinorItemFID], [BillingMinorItemAddBackFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_ARBranchFID] FOREIGN KEY ([ARBranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_ARDivision] FOREIGN KEY ([ARDivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_BillingMinorItemAddBack] FOREIGN KEY ([BillingMinorItemAddBackFID]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_BillingMinorItem] FOREIGN KEY ([BillingMinorItemFID]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_BranchFID] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_ReductionBasis] FOREIGN KEY ([ReductionBasisFID]) REFERENCES [dbo].[ReductionBasis] ([ReductionBasisID])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_ReductionTemplateHeader] FOREIGN KEY ([ReductionTemplateFID]) REFERENCES [dbo].[ReductionTemplateHeader] ([ReductionTemplateID])
GO
ALTER TABLE [dbo].[BillingMinorReduction] ADD CONSTRAINT [FK_BillingMinorReduction_ReductionType] FOREIGN KEY ([ReductionTypeFID]) REFERENCES [dbo].[ReductionType] ([ReductionTypeID])
GO
GRANT SELECT ON  [dbo].[BillingMinorReduction] TO [MssExec]
GRANT INSERT ON  [dbo].[BillingMinorReduction] TO [MssExec]
GRANT DELETE ON  [dbo].[BillingMinorReduction] TO [MssExec]
GRANT UPDATE ON  [dbo].[BillingMinorReduction] TO [MssExec]
GO
Uses
Used By