Table: dbo.Payable_Payment_Application
This table holds records that are Applications of Payments to Payables.
Columns
Name | Type | Constraints | Description
payable_transaction_KEY | int (4) | NOT NULL | Foreign key of related payable.
payment__gl_transaction_KEY | int (4) | NOT NULL | Foreign key of gl transaction belonging to related payment.
application_date | smalldatetime (4) | NOT NULL | The date (date only) the payment was applied.
gl_transaction_KEY | int (4) | NOT NULL | Primary Key.
discount_taken_amount | decimal (9, 2) | NOT NULL | The amount of discount taken for the Payable Payment Application.
payment__reference_number | nvarchar (32) | NOT NULL | The reference number of the payment.
description | nvarchar (240) | NOT NULL | The description of the bank or payable transaction.
origin__accounting_application_KEY | int (4) |  | The application that was running when the bank or payable transaction was created.
data_origin_KEY | int (4) |  | The origin of each bank transaction. For example, Data Entry or CSA Conversion.

Primary key
Name | Columns | Description
PK_Payable_Payment_Application$gl_transaction_KEY | gl_transaction_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Payable_Payment_Application$origin__accounting_application_KEY | origin__accounting_application_KEY | Accounting_Application (accounting_application_KEY) |
FK_Payable_Payment_Application$data_origin_KEY | data_origin_KEY | Data_Origin (data_origin_KEY) |
FK_Payable_Payment_Application__GL_Transaction__gl_transaction_KEY | gl_transaction_KEY | GL_Transaction (gl_transaction_KEY) |
FK_Payable_Payment_Application__GL_Transaction__payment__gl_transaction_KEY | payment__gl_transaction_KEY | GL_Transaction (gl_transaction_KEY) |
FK_Payable_Payment_Application__Payable_Transaction__payable_transaction_KEY | payable_transaction_KEY | Payable_Transaction (payable_transaction_KEY) |

Incoming foreign keys
Name | Columns | Referencing table | Description
FK_Payable_Payment_Application_Payable_Distribution__Payable_Payment_Application__gl_transaction_KEY | gl_transaction_KEY | Payable_Payment_Application_Payable_Distribution |
FK_Payable_Payment_Application_Payment_Distribution__Payable_Payment_Application__gl_transaction_KEY | gl_transaction_KEY | Payable_Payment_Application_Payment_Distribution |