CREATE TABLE [dbo].[SCBillingContractMiscChargeCycleCharges]
(
[BillingContractMiscChargeCycleChargeID] [int] NOT NULL IDENTITY(1, 1),
[InvoiceID] [int] NOT NULL,
[ContractDetailID] [int] NOT NULL,
[BillingContractMiscChargeID] [int] NOT NULL,
[CycleChargeDetailID] [int] NOT NULL,
[FromDate] [datetime] NOT NULL,
[ToDate] [datetime] NOT NULL,
[Quantity] [decimal] (18, 6) NOT NULL,
[Rate] [decimal] (18, 6) NOT NULL,
[Amount] [money] NOT NULL,
[NonAdjustedAmount] [money] NOT NULL,
[CreatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingContractMiscChargeCycleCharges_CreateDate] DEFAULT (getdate()),
[UpdatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingContractMiscChargeCycleCharges_LastUpdate] DEFAULT (getdate()),
[BillWithID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingContractMiscChargeCycleCharges] ADD CONSTRAINT [PK__SCBillin__1F726145C6017C6C] PRIMARY KEY CLUSTERED ([BillingContractMiscChargeCycleChargeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingContractMiscChargeCycleCharges] ADD CONSTRAINT [FK_SCBillingContractMiscChargeCycleCharges_BillingContractMiscChargeID_SCBillingContractMiscCharges] FOREIGN KEY ([BillingContractMiscChargeID]) REFERENCES [dbo].[SCBillingContractMiscCharges] ([BillingContractMiscChargeID])
GO