Table core.payment_terms
This table stores information on terms of payment like due date, grace period and information associated with it.
# Column Name Nullable Data Type Max Length Description
1payment_term_idinteger0The primary key of this table, which is also a serial field.
2payment_term_codecharacter varying12Code given to the terms of payment.
3payment_term_namecharacter varying50The name given to the term of payment, which is also a unique field.
4due_on_dateboolean0
5due_daysinteger0
6due_frequency_idinteger0
7grace_peiodinteger0
8late_fee_idinteger0
9late_fee_posting_frequency_idinteger0
10audit_user_idinteger0Contains the id of the user who last inserted or updated the corresponding row.
11audit_tstimestamp with time zone0Contains the date and timestamp of the last insert or update action.

Foreign Keys

# Column Name Key Name References
6 due_frequency_id payment_terms_due_frequency_id_fkey core.frequencies.frequency_id
8 late_fee_id payment_terms_late_fee_id_fkey core.late_fee.late_fee_id
9 late_fee_posting_frequency_id payment_terms_late_fee_posting_frequency_id_fkey core.frequencies.frequency_id
10 audit_user_id payment_terms_audit_user_id_fkey office.users.user_id

Indices

Index Name Owner Access Method Definition Description
payment_terms_pkey postgres btree payment_term_id
payment_terms_due_frequency_id_inx postgres btree due_frequency_id
payment_terms_due_on_date_inx postgres btree due_on_date
payment_terms_payment_term_name_uix postgres btree upper(payment_term_name::text)
payment_terms_payment_term_code_uix postgres btree upper(payment_term_code::text)

Check Constraints

Constraint Name Description
payment_terms_late_fee_chk
CHECK (((late_fee_id IS NULL)::integer + (late_fee_posting_frequency_id IS NULL)::integer) = ANY (ARRAY[0, 2]))
payment_terms_check
CHECK ( CASE WHEN due_frequency_id IS NOT NULL THEN due_days = 0 ELSE NULL::boolean END)

Default Values

# Column Name Default
1 payment_term_id nextval('core.payment_terms_payment_term_id_seq'::regclass)
4 due_on_date false
5 due_days 0
7 grace_peiod 0
11 audit_ts now()

Triggers

Trigger Name Targets On Event Timing Condition Order Orientation Description