Tables [dbo].[APPayments]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:55:49 AM Thursday, March 21, 2019
Last Modified1:09:58 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_APPayments: PaymentIDPaymentIDint4
False
PaymentNumbervarchar(15)15
False
Typechar(4)4
False
SubTypechar(4)4
False
Foreign Keys FK_APPayments_VendorID_APVendors: [dbo].[APVendors].VendorIDVendorIDint4
False
Datedatetime8
False
DatePeriodint4
False
Periodint4
False
Descriptionvarchar(255)255
True
Methodchar(4)4
False
CheckNumbervarchar(30)30
True
CheckDatedatetime8
True
CardNumbervarchar(20)20
False
CardExpDatedatetime8
True
Foreign Keys FK_APPayments_GLID_GLAccounts1: [dbo].[GLAccounts1].GLIDGLIDint4
False
Amountmoney8
False
Foreign Keys FK_APPayments_UnappliedGLID_GLAccounts1: [dbo].[GLAccounts1].UnappliedGLIDUnappliedGLIDint4
False
Unappliedmoney8
False
((0))
Foreign Keys FK_APPayments_AppliedID_APPayments: [dbo].[APPayments].AppliedIDAppliedIDint4
True
OpenAmountmoney8
False
Foreign Keys FK_APPayments_VoidID_APPayments: [dbo].[APPayments].VoidIDVoidIDint4
True
VoidedOpenAmountmoney8
True
TransactionTypeIDint4
True
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
BnCdNumbervarbinary(32)32
True
EFTReferencevarchar(255)255
True
Batchvarchar(15)15
False
('')
Foreign Keys FK_APPayments_ReceivablePayableID_ARAPReceivablePayables: [dbo].[ARAPReceivablePayables].ReceivablePayableIDReceivablePayableIDint4
True
Foreign Keys FK_APPayments_BranchID_GLBranches: [dbo].[GLBranches].BranchIDBranchIDint4
True
Foreign Keys FK_APPayments_DivisionID_GLDivisions: [dbo].[GLDivisions].DivisionIDDivisionIDint4
True
Foreign Keys FK_APPayments_BalanceSheetGroupID_GLBalanceSheetGroups: [dbo].[GLBalanceSheetGroups].BalanceSheetGroupIDBalanceSheetGroupIDint4
True
Foreign Keys FK_APPayments_CashbookBalanceSheetGroupID_GLBalanceSheetGroups: [dbo].[GLBalanceSheetGroups].CashbookBalanceSheetGroupIDCashbookBalanceSheetGroupIDint4
True
NoteCountint4
False
((0))
NoteFlagint4
False
((0))
Foreign Keys FK_APPayments_NoteID_APPaymentNotes: [dbo].[APPaymentNotes].NoteIDNoteIDint4
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_APPayments: PaymentIDPK_APPaymentsPaymentID
True
80
NameColumns
FK_APPayments_AppliedID_APPaymentsAppliedID->[dbo].[APPayments].[PaymentID]
FK_APPayments_BalanceSheetGroupID_GLBalanceSheetGroupsBalanceSheetGroupID->[dbo].[GLBalanceSheetGroups].[BalanceSheetGroupID]
FK_APPayments_BranchID_GLBranchesBranchID->[dbo].[GLBranches].[BranchID]
FK_APPayments_CashbookBalanceSheetGroupID_GLBalanceSheetGroupsCashbookBalanceSheetGroupID->[dbo].[GLBalanceSheetGroups].[BalanceSheetGroupID]
FK_APPayments_DivisionID_GLDivisionsDivisionID->[dbo].[GLDivisions].[DivisionID]
FK_APPayments_GLID_GLAccounts1GLID->[dbo].[GLAccounts1].[AccountID]
FK_APPayments_NoteID_APPaymentNotesNoteID->[dbo].[APPaymentNotes].[NoteID]
FK_APPayments_ReceivablePayableID_ARAPReceivablePayablesReceivablePayableID->[dbo].[ARAPReceivablePayables].[ReceivablePayableID]
FK_APPayments_UnappliedGLID_GLAccounts1UnappliedGLID->[dbo].[GLAccounts1].[AccountID]
FK_APPayments_VendorID_APVendorsVendorID->[dbo].[APVendors].[VendorID]
FK_APPayments_VoidID_APPaymentsVoidID->[dbo].[APPayments].[PaymentID]
CREATE TABLE [dbo].[APPayments]
(
[PaymentID] [int] NOT NULL,
[PaymentNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Type] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SubType] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VendorID] [int] NOT NULL,
[Date] [datetime] NOT NULL,
[DatePeriod] [int] NOT NULL,
[Period] [int] NOT NULL,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Method] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CheckNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CheckDate] [datetime] NULL,
[CardNumber] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CardExpDate] [datetime] NULL,
[GLID] [int] NOT NULL,
[Amount] [money] NOT NULL,
[UnappliedGLID] [int] NOT NULL,
[Unapplied] [money] NOT NULL CONSTRAINT [DF_APPayments_Unapplied] DEFAULT ((0)),
[AppliedID] [int] NULL,
[OpenAmount] [money] NOT NULL,
[VoidID] [int] NULL,
[VoidedOpenAmount] [money] NULL,
[TransactionTypeID] [int] NULL,
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_APPayments_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_APPayments_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[BnCdNumber] [varbinary] (32) NULL,
[EFTReference] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Batch] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_APPayments_Batch] DEFAULT (''),
[ReceivablePayableID] [int] NULL,
[BranchID] [int] NULL,
[DivisionID] [int] NULL,
[BalanceSheetGroupID] [int] NULL,
[CashbookBalanceSheetGroupID] [int] NULL,
[NoteCount] [int] NOT NULL CONSTRAINT [DF_APPayments_NoteCount] DEFAULT ((0)),
[NoteFlag] [int] NOT NULL CONSTRAINT [DF_APPayments_NoteFlag] DEFAULT ((0)),
[NoteID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [PK_APPayments] PRIMARY KEY CLUSTERED  ([PaymentID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_AppliedID_APPayments] FOREIGN KEY ([AppliedID]) REFERENCES [dbo].[APPayments] ([PaymentID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_BalanceSheetGroupID_GLBalanceSheetGroups] FOREIGN KEY ([BalanceSheetGroupID]) REFERENCES [dbo].[GLBalanceSheetGroups] ([BalanceSheetGroupID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_BranchID_GLBranches] FOREIGN KEY ([BranchID]) REFERENCES [dbo].[GLBranches] ([BranchID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_CashbookBalanceSheetGroupID_GLBalanceSheetGroups] FOREIGN KEY ([CashbookBalanceSheetGroupID]) REFERENCES [dbo].[GLBalanceSheetGroups] ([BalanceSheetGroupID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_DivisionID_GLDivisions] FOREIGN KEY ([DivisionID]) REFERENCES [dbo].[GLDivisions] ([DivisionID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_GLID_GLAccounts1] FOREIGN KEY ([GLID]) REFERENCES [dbo].[GLAccounts1] ([AccountID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_NoteID_APPaymentNotes] FOREIGN KEY ([NoteID]) REFERENCES [dbo].[APPaymentNotes] ([NoteID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_ReceivablePayableID_ARAPReceivablePayables] FOREIGN KEY ([ReceivablePayableID]) REFERENCES [dbo].[ARAPReceivablePayables] ([ReceivablePayableID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_UnappliedGLID_GLAccounts1] FOREIGN KEY ([UnappliedGLID]) REFERENCES [dbo].[GLAccounts1] ([AccountID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_VendorID_APVendors] FOREIGN KEY ([VendorID]) REFERENCES [dbo].[APVendors] ([VendorID])
GO
ALTER TABLE [dbo].[APPayments] ADD CONSTRAINT [FK_APPayments_VoidID_APPayments] FOREIGN KEY ([VoidID]) REFERENCES [dbo].[APPayments] ([PaymentID])
GO
  • [dbo].[APPaymentDetails]
  • [dbo].[v_AP_ApplicationsToReceivablePayables]
  • [dbo].[v_APPaymentApplications]
  • [dbo].[v_APTransactions]
  • [dbo].[v_GLTransactions]