Minimum Version Required: 23.01
Pre-Conditions
Minimum requirements:
Payment Invoice ID/PaymentInvoiceNum
Invoice ID/InvoiceNum
AmountApplied
Receipt from payment Invoice (even if not changing)
PaymentDate/Invoice Date
Optional Fields:
Payment_ImportGroupID
Invoice_ImportGroupID
ARAccountID
CustomerID
PaymentARNote
PaymentCheckNum
PaymentCreatedBy
InvoicePaymentsID
InvoicePaymentsHistID
Steps
Overview
The AccountsRecPaymentApplication EDBL routine allows you to import payment application data that links payment invoices to regular invoices. This routine effectively records how payments are applied to outstanding invoices in your accounts receivable system.
Key Features
Creates payment records and applies them to invoices
Updates payment application amounts on existing records
Manages the connection between payments and invoices
Updates invoice open balances to reflect payments
Creates necessary load sheets for payment processing
Process Flow
Matching Existing Records: The system first attempts to match payment applications to existing records if you provide IDs.
Date Handling: If only one date is provided (either PaymentDate or InvoiceDate), the missing date will default to the provided date.
Load Sheet Management: The system: Creates new load sheets for payments if needed, Sets load sheet status appropriately for payment processing
Customer/AR Account Resolution: If CustomerID is provided, ARAccountID will be set to the customer's default AR account, If ARAccountID is provided, CustomerID will be set to the AR account's associated customer
Payment Creation: Finds existing payment invoices that match the import data, Creates new payment invoices when needed
Payment Application: Links payments to invoices, Updates the amount applied on each connection, Updates invoice receipts and open balances
Behavior by Import Action
Add Only: Creates new payment application records, load sheets, and payment invoices as needed
Update Only: Updates existing payment application amounts and related records
Add or Update: Both adds new records and updates existing ones as appropriate
Special Behaviors
When payment records are created, the system will properly update all related invoice records
The system handles both new payments and updating existing payment applications
If InvoicePaymentsID or InvoicePaymentsHistID are provided, the system will update those specific records
Automatically updates open balances on invoices after applying payments
Sets the Payment_ImportGroupID to distinguish sets of imported payments
Troubleshooting
If the routine returns "InvoiceID or PaymentInvoiceID IS NULL," it means the system could not find or create appropriate links between payments and invoices
Verify that your invoice numbers, AR accounts, or customer IDs match existing records in the system
Check that payment dates and invoice dates are within expected ranges
Related Database Impact
The routine affects the following tables:
Invoice
LoadSheet
InvoicePayments
InvoicePaymentsHist
Example Use Cases
Importing payment application data from an external accounting system
Mass updating how payments were applied to invoices
Rolling back AR to previous periods by importing historical payment applications
Note:
If we do not map Payment Invoice ID/PaymentInvoiceNum, we need map Customer ID or ARAccount ID
If you really want to import against InvoicePayments directly then that works but need to make sure to recalculate Open Balances after. because in the logic of the AccountsRecPaymentApplication EDBL, we did not call the Set_Invoice_OpenDebitCredit method of recalculating OpenDebit and OpenCredit,the user needs to manually run the Scheduled Task Update_OpenCredit_OpenDebit after execution.
AccountsRecPaymentApplication doesn’t care about InvoicePaymentHist/InvoicePayment, If the value in the import file is 200, then the inserted invoicePayment is 200
Fields And Definitions
Best used for:
Importing and applying historical AR
Data conversions
Best Practices
Import routines are an incredibly powerful tool and if used incorrectly, can affect alot of data. Test thoroughly on small data sets before importing.
If you are running into setup issues or have questions, reach out to Encompass Support.
Do you have a complex process that consists of a report and import routines that you do not want to setup? Contact our professional services to team to assist.