Tables [dbo].[SCQBillingContractMiscCharges]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:59:42 AM Thursday, March 21, 2019
Last Modified1:15:13 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK__SCQBilli__3A6BA33513898600: BillingContractMiscChargeIDBillingContractMiscChargeIDint4
False
1 - 1
Foreign Keys FK_SCQBillingContractMiscCharges_BillingID_SCQBillingContracts: [dbo].[SCQBillingContracts].BillingID\ContractDetailIDBillingIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_BillingID_SCQBillingContracts: [dbo].[SCQBillingContracts].BillingID\ContractDetailIDContractDetailIDint4
False
BaseFromDatedatetime8
True
BaseToDatedatetime8
True
OverageFromDatedatetime8
True
OverageToDatedatetime8
True
Foreign Keys FK_SCQBillingContractMiscCharges_ContractMiscChargeID_SCContractMiscCharges: [dbo].[SCContractMiscCharges].ContractMiscChargeIDContractMiscChargeIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_MiscChargeCodeID_SCContractMiscChargeCodes: [dbo].[SCContractMiscChargeCodes].MiscChargeCodeIDMiscChargeCodeIDint4
True
Descriptionvarchar(255)255
False
Quantitydecimal(18,6)9
False
Ratedecimal(18,6)9
False
Foreign Keys FK_SCQBillingContractMiscCharges_GLID_GLAccounts: [dbo].[GLAccounts].GLIDGLIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_DeptID_GLDepts: [dbo].[GLDepts].DeptIDDeptIDint4
True
TaxFlagint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_BranchID_GLBranches: [dbo].[GLBranches].BranchIDBranchIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_DivisionID_GLDivisions: [dbo].[GLDivisions].DivisionIDDivisionIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_BalanceSheetGroupID_GLBalanceSheetGroups: [dbo].[GLBalanceSheetGroups].BalanceSheetGroupIDBalanceSheetGroupIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_TaxcodeID_ShTaxCodes: [dbo].[ShTaxCodes].TaxCodeIDTaxCodeIDint4
True
BillWithIDint4
False
BillFrequencyIDint4
False
Amountmoney8
False
CreatorIDvarchar(8)8
True
CreateDatedatetime8
False
(getdate())
UpdatorIDvarchar(8)8
True
LastUpdatedatetime8
False
(getdate())
ContractMiscChargeDetailIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_TaxExemptCodeID_SHTaxExemptCodes: [dbo].[SHTaxExemptCodes].TaxExemptCodeIDTaxExemptCodeIDint4
True
Taxablebit1
False
((0))
Methodint4
False
((0))
PercentMinimumAmountmoney8
True
PercentMaximumAmountmoney8
True
Foreign Keys FK_SCQBillingContractMiscCharges_TaxFlagID_ShTaxFlags: [dbo].[ShTaxFlags].TaxFlagIDTaxFlagIDint4
False
Foreign Keys FK_SCQBillingContractMiscCharges_LocationID_ARCustomers: [dbo].[ARCustomers].LocationIDLocationIDint4
True
Addressvarchar(64)64
False
('')
Cityvarchar(32)32
False
('')
Statevarchar(16)16
False
('')
Zipvarchar(16)16
False
('')
Countyvarchar(32)32
False
('')
Countryvarchar(32)32
False
('')
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK__SCQBilli__3A6BA33513898600: BillingContractMiscChargeIDPK__SCQBilli__3A6BA33513898600BillingContractMiscChargeID
True
80
NameColumns
FK_SCQBillingContractMiscCharges_BalanceSheetGroupID_GLBalanceSheetGroupsBalanceSheetGroupID->[dbo].[GLBalanceSheetGroups].[BalanceSheetGroupID]
FK_SCQBillingContractMiscCharges_BillingID_SCQBillingContractsBillingID->[dbo].[SCQBillingContracts].[BillingID]
ContractDetailID->[dbo].[SCQBillingContracts].[ContractDetailID]
FK_SCQBillingContractMiscCharges_BranchID_GLBranchesBranchID->[dbo].[GLBranches].[BranchID]
FK_SCQBillingContractMiscCharges_ContractMiscChargeID_SCContractMiscChargesContractMiscChargeID->[dbo].[SCContractMiscCharges].[MiscChargeID]
FK_SCQBillingContractMiscCharges_DeptID_GLDeptsDeptID->[dbo].[GLDepts].[DeptID]
FK_SCQBillingContractMiscCharges_DivisionID_GLDivisionsDivisionID->[dbo].[GLDivisions].[DivisionID]
FK_SCQBillingContractMiscCharges_GLID_GLAccountsGLID->[dbo].[GLAccounts].[AccountID]
FK_SCQBillingContractMiscCharges_LocationID_ARCustomersLocationID->[dbo].[ARCustomers].[CustomerID]
FK_SCQBillingContractMiscCharges_MiscChargeCodeID_SCContractMiscChargeCodesMiscChargeCodeID->[dbo].[SCContractMiscChargeCodes].[MiscChargeCodeID]
FK_SCQBillingContractMiscCharges_TaxcodeID_ShTaxCodesTaxCodeID->[dbo].[ShTaxCodes].[TaxCodeID]
FK_SCQBillingContractMiscCharges_TaxExemptCodeID_SHTaxExemptCodesTaxExemptCodeID->[dbo].[SHTaxExemptCodes].[TaxExemptCodeID]
FK_SCQBillingContractMiscCharges_TaxFlagID_ShTaxFlagsTaxFlagID->[dbo].[ShTaxFlags].[TaxFlagID]
CREATE TABLE [dbo].[SCQBillingContractMiscCharges]
(
[BillingContractMiscChargeID] [int] NOT NULL IDENTITY(1, 1),
[BillingID] [int] NOT NULL,
[ContractDetailID] [int] NOT NULL,
[BaseFromDate] [datetime] NULL,
[BaseToDate] [datetime] NULL,
[OverageFromDate] [datetime] NULL,
[OverageToDate] [datetime] NULL,
[ContractMiscChargeID] [int] NOT NULL,
[MiscChargeCodeID] [int] NULL,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Quantity] [decimal] (18, 6) NOT NULL,
[Rate] [decimal] (18, 6) NOT NULL,
[GLID] [int] NOT NULL,
[DeptID] [int] NULL,
[TaxFlag] [int] NOT NULL,
[BranchID] [int] NOT NULL,
[DivisionID] [int] NOT NULL,
[BalanceSheetGroupID] [int] NOT NULL,
[TaxCodeID] [int] NULL,
[BillWithID] [int] NOT NULL,
[BillFrequencyID] [int] NOT NULL,
[Amount] [money] NOT NULL,
[CreatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_CreateDate] DEFAULT (getdate()),
[UpdatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_LastUpdate] DEFAULT (getdate()),
[ContractMiscChargeDetailID] [int] NOT NULL,
[TaxExemptCodeID] [int] NULL,
[Taxable] [bit] NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_Taxable] DEFAULT ((0)),
[Method] [int] NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_Method] DEFAULT ((0)),
[PercentMinimumAmount] [money] NULL,
[PercentMaximumAmount] [money] NULL,
[TaxFlagID] [int] NOT NULL,
[LocationID] [int] NULL,
[Address] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_Address] DEFAULT (''),
[City] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_City] DEFAULT (''),
[State] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_State] DEFAULT (''),
[Zip] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_Zip] DEFAULT (''),
[County] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_County] DEFAULT (''),
[Country] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_SCQBillingContractMiscCharges_Country] DEFAULT ('')
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [PK__SCQBilli__3A6BA33513898600] PRIMARY KEY CLUSTERED  ([BillingContractMiscChargeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_BalanceSheetGroupID_GLBalanceSheetGroups] FOREIGN KEY ([BalanceSheetGroupID]) REFERENCES [dbo].[GLBalanceSheetGroups] ([BalanceSheetGroupID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_BillingID_SCQBillingContracts] FOREIGN KEY ([BillingID], [ContractDetailID]) REFERENCES [dbo].[SCQBillingContracts] ([BillingID], [ContractDetailID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_BranchID_GLBranches] FOREIGN KEY ([BranchID]) REFERENCES [dbo].[GLBranches] ([BranchID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_ContractMiscChargeID_SCContractMiscCharges] FOREIGN KEY ([ContractMiscChargeID]) REFERENCES [dbo].[SCContractMiscCharges] ([MiscChargeID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_DeptID_GLDepts] FOREIGN KEY ([DeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_DivisionID_GLDivisions] FOREIGN KEY ([DivisionID]) REFERENCES [dbo].[GLDivisions] ([DivisionID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_GLID_GLAccounts] FOREIGN KEY ([GLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_LocationID_ARCustomers] FOREIGN KEY ([LocationID]) REFERENCES [dbo].[ARCustomers] ([CustomerID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_MiscChargeCodeID_SCContractMiscChargeCodes] FOREIGN KEY ([MiscChargeCodeID]) REFERENCES [dbo].[SCContractMiscChargeCodes] ([MiscChargeCodeID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_TaxcodeID_ShTaxCodes] FOREIGN KEY ([TaxCodeID]) REFERENCES [dbo].[ShTaxCodes] ([TaxCodeID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_TaxExemptCodeID_SHTaxExemptCodes] FOREIGN KEY ([TaxExemptCodeID]) REFERENCES [dbo].[SHTaxExemptCodes] ([TaxExemptCodeID])
GO
ALTER TABLE [dbo].[SCQBillingContractMiscCharges] ADD CONSTRAINT [FK_SCQBillingContractMiscCharges_TaxFlagID_ShTaxFlags] FOREIGN KEY ([TaxFlagID]) REFERENCES [dbo].[ShTaxFlags] ([TaxFlagID])
GO