Tables [dbo].[APVouchersRecurring]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:56:39 AM Thursday, March 21, 2019
Last Modified1:09:59 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_APVouchersRecurring: RecurringVoucherIDRecurringVoucherIDint4
False
1 - 1
Activebit1
False
((1))
Foreign Keys FK_APVouchersRecurring_APBranchID_GLBranches: [dbo].[GLBranches].APBranchIDAPBranchIDint4
False
Foreign Keys FK_APVouchersRecurring_BranchID_GLBranches: [dbo].[GLBranches].BranchIDBranchIDint4
True
Checksmoney8
False
((0))
CreateDatedatetime8
False
(getdate())
CreatorIDchar(8)8
False
DBFileHeaderIDint4
False
((1))
Descriptionvarchar(255)255
False
EndDatedatetime8
True
Foreign Keys FK_APVouchersRecurring_GLID_GLAccounts: [dbo].[GLAccounts].GLIDGLIDint4
False
InvoiceNumbervarchar(32)32
False
Foreign Keys FK_APVouchersRecurring_JobID_APJobs: [dbo].[APJobs].JobIDJobIDint4
True
LastUpdatedatetime8
False
(getdate())
Modulechar(4)4
False
NextDatedatetime8
True
PONumbervarchar(32)32
False
Foreign Keys FK_APVouchersRecurring_PostingCycleID_SCBillingCycles: [dbo].[SCBillingCycles].PostingCycleIDPostingCycleIDint4
True
Foreign Keys FK_APVouchersRecurring_PurchaserID_APPurchasers: [dbo].[APPurchasers].PurchaserIDPurchaserIDint4
True
Indexes IX_APVouchersRecurring_RecurringVoucherNumberRecurringVoucherNumbervarchar(15)15
False
Referencevarchar(15)15
False
Remarksvarchar(1024)1024
False
Sourcevarchar(15)15
False
Subtypevarchar(4)4
False
('')
Taxmoney8
False
((0))
Taxablebit1
False
((0))
Foreign Keys FK_APVouchersRecurring_TaxCodeID_ShTaxCodes: [dbo].[ShTaxCodes].TaxCodeIDTaxCodeIDint4
True
Foreign Keys FK_APVouchersRecurring_TaxExemptCodeID_ShTaxExemptCodes: [dbo].[SHTaxExemptCodes].TaxExemptCodeIDTaxExemptCodeIDint4
True
Foreign Keys FK_APVouchersRecurring_TaxUtilityConsumptionTypeID_ShTaxConsumptionTypes: [dbo].[ShTaxConsumptionTypes].TaxUtilityConsumptionTypeIDTaxUtilityConsumptionTypeIDint4
True
TermDiscountmoney8
False
((0))
TermDiscountRatefloat8
False
((0))
Foreign Keys FK_APVouchersRecurring_TermID_SHTerms: [dbo].[ShTerms].TermIDTermIDint4
True
timestamptimestamp8
False
Totalmoney8
False
((0))
TransactionTypeIDint4
False
Typechar(4)4
False
UpdatorIDchar(8)8
False
Foreign Keys FK_APVouchersRecurring_VendorID_APVendors: [dbo].[APVendors].VendorIDVendorIDint4
False
VoucherNumbervarchar(15)15
False
TargetDayint4
True
AllowEAgentPostingbit1
False
((0))
KeyNameKey ColumnsUnique
Cluster Primary Key PK_APVouchersRecurring: RecurringVoucherIDPK_APVouchersRecurringRecurringVoucherID
True
IX_APVouchersRecurring_RecurringVoucherNumberRecurringVoucherNumber
True
NameColumns
FK_APVouchersRecurring_APBranchID_GLBranchesAPBranchID->[dbo].[GLBranches].[BranchID]
FK_APVouchersRecurring_BranchID_GLBranchesBranchID->[dbo].[GLBranches].[BranchID]
FK_APVouchersRecurring_GLID_GLAccountsGLID->[dbo].[GLAccounts].[AccountID]
FK_APVouchersRecurring_JobID_APJobsJobID->[dbo].[APJobs].[JobID]
FK_APVouchersRecurring_PostingCycleID_SCBillingCyclesPostingCycleID->[dbo].[SCBillingCycles].[BillingCycleID]
FK_APVouchersRecurring_PurchaserID_APPurchasersPurchaserID->[dbo].[APPurchasers].[PurchaserID]
FK_APVouchersRecurring_TaxCodeID_ShTaxCodesTaxCodeID->[dbo].[ShTaxCodes].[TaxCodeID]
FK_APVouchersRecurring_TaxExemptCodeID_ShTaxExemptCodesTaxExemptCodeID->[dbo].[SHTaxExemptCodes].[TaxExemptCodeID]
FK_APVouchersRecurring_TaxUtilityConsumptionTypeID_ShTaxConsumptionTypesTaxUtilityConsumptionTypeID->[dbo].[ShTaxConsumptionTypes].[TaxConsumptionTypeID]
FK_APVouchersRecurring_TermID_SHTermsTermID->[dbo].[ShTerms].[TermID]
FK_APVouchersRecurring_VendorID_APVendorsVendorID->[dbo].[APVendors].[VendorID]
CREATE TABLE [dbo].[APVouchersRecurring]
(
[RecurringVoucherID] [int] NOT NULL IDENTITY(1, 1),
[Active] [bit] NOT NULL CONSTRAINT [DF_APVouchersRecurring_Active] DEFAULT ((1)),
[APBranchID] [int] NOT NULL,
[BranchID] [int] NULL,
[Checks] [money] NOT NULL CONSTRAINT [DF_APVouchersRecurring_Checks] DEFAULT ((0)),
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_APVouchersRecurring_CreateDate] DEFAULT (getdate()),
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DBFileHeaderID] [int] NOT NULL CONSTRAINT [DF_APVouchersRecurring_DBFileHeaderID] DEFAULT ((1)),
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EndDate] [datetime] NULL,
[GLID] [int] NOT NULL,
[InvoiceNumber] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[JobID] [int] NULL,
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_APVouchersRecurring_LastUpdate] DEFAULT (getdate()),
[Module] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NextDate] [datetime] NULL,
[PONumber] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PostingCycleID] [int] NULL,
[PurchaserID] [int] NULL,
[RecurringVoucherNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Reference] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Remarks] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Source] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Subtype] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_APVouchersRecurring_Subtype] DEFAULT (''),
[Tax] [money] NOT NULL CONSTRAINT [DF_APVouchersRecurring_Tax] DEFAULT ((0)),
[Taxable] [bit] NOT NULL CONSTRAINT [DF_APVouchersRecurring_Taxable] DEFAULT ((0)),
[TaxCodeID] [int] NULL,
[TaxExemptCodeID] [int] NULL,
[TaxUtilityConsumptionTypeID] [int] NULL,
[TermDiscount] [money] NOT NULL CONSTRAINT [DF_APVouchersRecurring_TermDiscount] DEFAULT ((0)),
[TermDiscountRate] [float] NOT NULL CONSTRAINT [DF_APVouchersRecurring_TermDiscountRate] DEFAULT ((0)),
[TermID] [int] NULL,
[timestamp] [timestamp] NOT NULL,
[Total] [money] NOT NULL CONSTRAINT [DF_APVouchersRecurring_Total] DEFAULT ((0)),
[TransactionTypeID] [int] NOT NULL,
[Type] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VendorID] [int] NOT NULL,
[VoucherNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TargetDay] [int] NULL,
[AllowEAgentPosting] [bit] NOT NULL CONSTRAINT [DF_APVouchersRecurring_AllowEagentPosting] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [PK_APVouchersRecurring] PRIMARY KEY CLUSTERED  ([RecurringVoucherID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [IX_APVouchersRecurring_RecurringVoucherNumber] UNIQUE NONCLUSTERED  ([RecurringVoucherNumber]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_APBranchID_GLBranches] FOREIGN KEY ([APBranchID]) REFERENCES [dbo].[GLBranches] ([BranchID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_BranchID_GLBranches] FOREIGN KEY ([BranchID]) REFERENCES [dbo].[GLBranches] ([BranchID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_GLID_GLAccounts] FOREIGN KEY ([GLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_JobID_APJobs] FOREIGN KEY ([JobID]) REFERENCES [dbo].[APJobs] ([JobID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_PostingCycleID_SCBillingCycles] FOREIGN KEY ([PostingCycleID]) REFERENCES [dbo].[SCBillingCycles] ([BillingCycleID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_PurchaserID_APPurchasers] FOREIGN KEY ([PurchaserID]) REFERENCES [dbo].[APPurchasers] ([PurchaserID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_TaxCodeID_ShTaxCodes] FOREIGN KEY ([TaxCodeID]) REFERENCES [dbo].[ShTaxCodes] ([TaxCodeID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_TaxExemptCodeID_ShTaxExemptCodes] FOREIGN KEY ([TaxExemptCodeID]) REFERENCES [dbo].[SHTaxExemptCodes] ([TaxExemptCodeID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_TaxUtilityConsumptionTypeID_ShTaxConsumptionTypes] FOREIGN KEY ([TaxUtilityConsumptionTypeID]) REFERENCES [dbo].[ShTaxConsumptionTypes] ([TaxConsumptionTypeID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_TermID_SHTerms] FOREIGN KEY ([TermID]) REFERENCES [dbo].[ShTerms] ([TermID])
GO
ALTER TABLE [dbo].[APVouchersRecurring] ADD CONSTRAINT [FK_APVouchersRecurring_VendorID_APVendors] FOREIGN KEY ([VendorID]) REFERENCES [dbo].[APVendors] ([VendorID])
GO