Table: dbo.AR_Payment_Application_Distribution
This table contains a payment application's distribution across the receivable's items. Cash basis accounting requires knowing how much of each item on a receivable was paid by a given payment application. To this end, a payment application must be proportionally distributed across the items of the receivable it is applied to. More precisely, since each item can affect multiple GL accounts, the payment amount is distributed across the GL accounts associated with the receivable items.
Columns
Name | Type | Constraints | Description
ar_payment_application_distribution_KEY | int (4) | NOT NULL | The primary key for this table.
payment_application__gl_transaction_KEY | int (4) | NOT NULL | This required foreign key identifies the payment application that is being distributed.
ar_transaction_item_gl_account_KEY | int (4) | NOT NULL | This required foreign key identifies the receivable item and GL account that this distributed portion of the payment is being applied to.
distributed__paid_amount | decimal (9, 2) | NOT NULL | The portion of the payment application being applied to this receivable item.
distributed__discount_honored_amount | decimal (9, 2) | NOT NULL | If the payment application included any discount honored, this is the portion of the overall discount honored amount being applied to this receivable item.

Primary key
Name | Columns | Description
PK_AR_Payment_Application_Distribution | ar_payment_application_distribution_KEY |
Unique constraints
Name | Columns | Description
UK_AR_Payment_Application_Distribution$payment_application__gl_transaction_KEY$ar_transaction_item_gl_account_KEY | payment_application__gl_transaction_KEY, ar_transaction_item_gl_account_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_AR_Payment_Application_Distribution__AR_Payment_Application__payment_application__gl_transaction_KEY | payment_application__gl_transaction_KEY | AR_Payment_Application (gl_transaction_KEY) |
FK_AR_Payment_Application_Distribution__AR_Transaction_Item_GL_Account__ar_transaction_item_gl_account_KEY | ar_transaction_item_gl_account_KEY | AR_Transaction_Item_GL_Account (ar_transaction_item_gl_account_KEY) |