SALESDEPOSITTEMPLATEPAYMENTMETHOD

Contains payment methods for a sales deposit template.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
PAYMENTMETHODCODE tinyint Default = 0 The method of payment in which the revenue was received.
PAYMENTMETHOD nvarchar(11) (Computed) yes CASE [PAYMENTMETHODCODE] WHEN 0 THEN N'Cash' WHEN 1 THEN N'Check' WHEN 2 THEN N'Credit card' WHEN 10 THEN N'Other' END Provides a translation for the 'PAYMENTMETHODCODE' field.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
SALESDEPOSITTEMPLATEID uniqueidentifier SALESDEPOSITTEMPLATE.ID FK to SALESDEPOSITTEMPLATE table.
CREDITTYPECODEID uniqueidentifier yes CREDITTYPECODE.ID FK to CREDITTYPECODE table.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
OTHERPAYMENTMETHODCODEID uniqueidentifier yes OTHERPAYMENTMETHODCODE.ID FK to OTHERPAYMENTMETHODCODE

Indexes

Index Name Fields Unique Primary Clustered
IX_SALESDEPOSITTEMPLATEPAYMENTMETHOD_DATEADDED DATEADDED yes
IX_SALESDEPOSITTEMPLATEPAYMENTMETHOD_DATECHANGED DATECHANGED
IX_SALESDEPOSITTEMPLATEPAYMENTMETHOD_SALESDEPOSITTEMPLATEID SALESDEPOSITTEMPLATEID
PK_SALESDEPOSITTEMPLATEPAYMENTMETHOD ID yes yes

Triggers

Trigger Name Description
TR_SALESDEPOSITTEMPLATEPAYMENTMETHOD_AUDIT_UPDATE
TR_SALESDEPOSITTEMPLATEPAYMENTMETHOD_AUDIT_DELETE