Tables [dbo].[BillingMinorDist]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)4721
Created4:57:09 PM Thursday, September 7, 2006
Last Modified10:37:48 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Primary Key PK_BillingMinorDist: BMinDistPriKeyBMinDistPriKeyint4
No
2 - 1
Cluster Key IX_BillingMinorDist_BMinPriKey: BMinPriKeyForeign Keys FK_BillingMinorDist_BillingMinorItem: [dbo].[BillingMinorItem].BMinPriKeyBMinPriKeyint4
Yes
Foreign Keys FK_BillingMinorDist_AccountingNote: [dbo].[AccountingNote].ANPriKeyIndexes IX_BillingMinorDist_ANPriKey: ANPriKeyANPriKeyint4
Yes
Foreign Keys FK_BillingMinorDist_ItemCode: [dbo].[ItemCode].ICPriKeyICPriKeyint4
Yes
InvoiceFlagvarchar(1)1
Yes
Descriptionvarchar(128)128
Yes
Amountmoney8
Yes
(0)
InvoiceAmountmoney8
No
Percentagefloat8
Yes
(0)
Quantityint4
Yes
Ratemoney8
Yes
(0)
GrossAmountmoney8
Yes
(0)
Discountfloat8
Yes
(0)
ApplyToDocint4
Yes
Refers to the original BillingMinorDist transaction
DocDatedatetime8
Yes
JournalDatedatetime8
Yes
PostedDatedatetime8
Yes
Foreign Keys FK_BillingMinorDist_Sysuser: [dbo].[Sysuser].PostedByIndexes IX_BillingMinorDist_PostedBy: PostedByPostedByint4
Yes
Foreign Keys FK_BillingMinorDist_Division: [dbo].[Division].DivisionFIDDivisionFIDint4
Yes
Foreign Keys FK_BillingMinorDist_BranchFID: [dbo].[Branch].BranchFIDIndexes IX_BillingMinorDist_Branch: BranchFIDBranchFIDint4
Yes
DocumentNumbervarchar(21)21
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_BillingMinorDist: BMinDistPriKeyPK_BillingMinorDistBMinDistPriKey
Yes
80
IX_BillingMinorDist_ANPriKeyANPriKey
Cluster Key IX_BillingMinorDist_BMinPriKey: BMinPriKeyIX_BillingMinorDist_BMinPriKeyBMinPriKey80
IX_BillingMinorDist_BranchBranchFID
IX_BillingMinorDist_PostedByPostedBy
Foreign Keys Foreign Keys
NameColumns
FK_BillingMinorDist_AccountingNoteANPriKey->[dbo].[AccountingNote].[ANPriKey]
FK_BillingMinorDist_BillingMinorItemBMinPriKey->[dbo].[BillingMinorItem].[BMinPriKey]
FK_BillingMinorDist_BranchFIDBranchFID->[dbo].[Branch].[BranchPriKey]
FK_BillingMinorDist_DivisionDivisionFID->[dbo].[Division].[DivisionID]
FK_BillingMinorDist_ItemCodeICPriKey->[dbo].[ItemCode].[ICPriKey]
FK_BillingMinorDist_SysuserPostedBy->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[BillingMinorDist]
(
[BMinDistPriKey] [int] NOT NULL IDENTITY(2, 1),
[BMinPriKey] [int] NULL,
[ANPriKey] [int] NULL,
[ICPriKey] [int] NULL,
[InvoiceFlag] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [money] NULL CONSTRAINT [DF_BillingMinorDist_Amount] DEFAULT (0),
[InvoiceAmount] [money] NOT NULL,
[Percentage] [float] NULL CONSTRAINT [DF_BillingMinorDist_Percentage] DEFAULT (0),
[Quantity] [int] NULL,
[Rate] [money] NULL CONSTRAINT [DF_BillingMinorDist_Rate] DEFAULT (0),
[GrossAmount] [money] NULL CONSTRAINT [DF_BillingMinorDist_GrossAmount] DEFAULT (0),
[Discount] [float] NULL CONSTRAINT [DF_BillingMinorDist_Discount] DEFAULT (0),
[ApplyToDoc] [int] NULL,
[DocDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[PostedDate] [datetime] NULL,
[PostedBy] [int] NULL,
[DivisionFID] [int] NULL,
[BranchFID] [int] NULL,
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [PK_BillingMinorDist] PRIMARY KEY NONCLUSTERED  ([BMinDistPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorDist_ANPriKey] ON [dbo].[BillingMinorDist] ([ANPriKey]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_BillingMinorDist_BMinPriKey] ON [dbo].[BillingMinorDist] ([BMinPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorDist_Branch] ON [dbo].[BillingMinorDist] ([BranchFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_BillingMinorDist_PostedBy] ON [dbo].[BillingMinorDist] ([PostedBy]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [FK_BillingMinorDist_AccountingNote] FOREIGN KEY ([ANPriKey]) REFERENCES [dbo].[AccountingNote] ([ANPriKey])
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [FK_BillingMinorDist_BillingMinorItem] FOREIGN KEY ([BMinPriKey]) REFERENCES [dbo].[BillingMinorItem] ([BMinPriKey])
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [FK_BillingMinorDist_BranchFID] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [FK_BillingMinorDist_Division] FOREIGN KEY ([DivisionFID]) REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [FK_BillingMinorDist_ItemCode] FOREIGN KEY ([ICPriKey]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[BillingMinorDist] ADD CONSTRAINT [FK_BillingMinorDist_Sysuser] FOREIGN KEY ([PostedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[BillingMinorDist] TO [MssExec]
GRANT INSERT ON  [dbo].[BillingMinorDist] TO [MssExec]
GRANT DELETE ON  [dbo].[BillingMinorDist] TO [MssExec]
GRANT UPDATE ON  [dbo].[BillingMinorDist] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Refers to the original BillingMinorDist transaction', 'SCHEMA', N'dbo', 'TABLE', N'BillingMinorDist', 'COLUMN', N'ApplyToDoc'
GO
Uses
Used By