Table: dbo.Manage_Customer_Payment
This table holds temporary data that only exists as long as the current user session exists. This table also has a DAL bypass to aid in the performance of high row count inserts. No DAL constraints should be added to this table. WARNING - if this table is modified, use-defined table type dbo.Manage_Customer_Payment_Rows and stored procedure dbo.pb_Insert_Manage_Customer_Payment_Rows also need to be updated to maintain identical structure
Columns
NameTypeConstraintsDescription
gl_transaction_KEYint (4)NOT NULLEach accounts receivable payment and ar transaction credit memo is based on a GL transaction.
user_session_guiduniqueidentifier (16)NOT NULLThis is a foreign key to the User_Session table, it allows our table contents to be related to a specific user session.
gl_transaction_type_KEYint (4)NOT NULLThe type of GL Transaction. Includes ar payment types and credit memos from the ar transaction type.
transaction_status_KEYint (4)NOT NULLSpecifies the state the payment is currently in.
customer_KEYint (4)NOT NULLThe customer that is associated with this payment.
customer_namenvarchar (100)NOT NULLThe name of the customer associated with this payment. For AR Payments, this field serves as a historical snapshot containing the customer name from when the transaction was created. If the name of the customer is changed in the customer table after the transaction is created, it is important to retain the original name the transaction was created under
reference_numbernvarchar (32)NOT NULLThe reference number to be associated with this payment.
transaction_datedatetime (8, 3)NOT NULLThe date to be associated with this payment.
amountdecimal (9, 2)NOT NULLThe numerical value of this payment
gl_account_KEYint (4)NOT NULLGL account of the AR payment or the AR Transaction Credit memo.
journal_KEYint (4)NOT NULLA foreign key to the Journal table.
gl_period_KEYint (4)NOT NULLA foreign key to the gl period table, to give us the gl period to adjust.
manage_customer_payment_KEYint (4)NOT NULLPrimary Key for this table.
Primary key
NameColumnsDescription
PK_Manage_Customer_Paymentmanage_customer_payment_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Manage_Customer_Payment__Customer__customer_KEYcustomer_KEYCustomer (customer_KEY)
FK_Manage_Customer_Payment__Transaction_Status__transaction_status_KEYtransaction_status_KEYTransaction_Status (transaction_status_KEY)
FK_Manage_Customer_Payment__User_Session__user_session_guiduser_session_guidUser_Session (user_session_guid)

Schema diagram