Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(20)   Default = '' Name of the payment term
 DESCRIPTION nvarchar(100)   Default = '' Description of the payment term
 INCLUDEDISCOUNT bit   Default = 0 True if the payment term includes a discount
 DISCOUNTPERCENT decimal(20, 4)   Default = 0.0 Discount applied when discount terms are met
 DISCOUNTDAYS smallint   Default = ((0)) Number of days the payment needs to be made for the discount terms to be applied
 PAYMENTDUECODE tinyint   Default = 0 Selects how the due date of the payment is represented
 PAYMENTDUE nvarchar(12) (Computed) CASE [PAYMENTDUECODE] WHEN 0 THEN N'Days' WHEN 1 THEN N'Day of month' END Provides a translation for the 'PAYMENTDUECODE' field.
 DAYSDUE smallint   Default = ((0)) Number of days in which a payment is due. PaymentDueCode must be 'Days'
 DAYOFMONTHDUE smallint   Default = ((15)) Day of month on which a payment is due. PaymentDue must be 'Day of month'
 MONTHDUECODE tinyint   Default = 0 Month in which a payment is due
 MONTHDUE nvarchar(7) (Computed) CASE [MONTHDUECODE] WHEN 0 THEN N'Current' WHEN 1 THEN N'Next' END Provides a translation for the 'MONTHDUECODE' 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) CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Key Field Type Null Notes Description
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_PAYMENTTERM_DATEADDED DATEADDED    
 IX_PAYMENTTERM_DATECHANGED DATECHANGED      
 PK_PAYMENTTERM ID  
 UIX_PAYMENTTERM_NAME NAME    

Trigger Name Description
 TR_PAYMENTTERM_AUDIT_UPDATE
 TR_PAYMENTTERM_AUDIT_DELETE

Referenced by Field
 VENDOR PAYMENTTERMID

Entity-Relationship diagram of this table