Minimum Version Required: 24.01
Steps
Overview
The AccountsRec EDBL routine allows you to import accounts receivable data into the system. This includes invoice balances, payments, and customer AR information. This routine creates or updates invoice records and their corresponding open balances in the system.
Primary Purpose
Import historical or current accounts receivable data
Set open balances for invoices
Create missing load sheets and invoices if required
Optionally zero out existing imported accounts receivable balances
Key Fields
Required Fields
CustomerID or CustomerID_Translation: Customer identifier (either internal ID or external reference)
InvoiceNum: Identifier for the invoice
Date: Transaction date
OpenBalance: The amount owed on the invoice
Important Optional Fields
ZeroImportedAccountsRec: When set to True (1), zeroes out existing imported AR balances before importing new ones
LSTypeID: Determines whether records are imported as "Imported" or "Sales History" type (defaults to "Imported" for regular users)
ImportGroupID: Groups records for tracking purposes (defaults to "1")
ARAccountID: AR Account identifier (if not provided, will use the Customer's default AR Account)
DateYYYYMMDD or DateMMDDYY: Alternative date formats if Date is not provided
LocationID_Translation or LocationID: Business location identifier
CheckNum: Check number for payments
PONum: Purchase order number
ARNote: Notes for the AR transaction
DueDate: When payment is due (defaults to transaction date if not provided)
Behavior
Data Flow
Validates imported data
Optionally zeros out existing imported AR if ZeroImportedAccountsRec=True
Translates customer IDs and creates missing customers if needed
Determines location information
Sets default values for missing data (AR Account, Term, Date, Due Date)
Creates missing load sheets and invoices as needed
Updates invoice balances based on imported OpenBalance
Creates necessary payment history records
Load Sheet Type Control
If the user has SalesHistoryImport permission, the system will:
Default to LSType = "Sales History"
Allow mapping to LSType = "Imported" if needed
If the user does NOT have this permission:
Always use LSType = "Imported"
Override any attempt to use "Sales History"
Open Balance Handling
Sets Invoice.OpenDebit if OpenBalance is positive
Sets Invoice.OpenCredit if OpenBalance is negative
Updates Invoice.Receipt accordingly
Default Value Assignment
Fills in ARAccountID from Customer if not provided
Fills in TermID from ARAccount if not provided
Converts DateYYYYMMDD or DateMMDDYY to standard date format if Date not provided
Uses transaction date as DueDate if not specified
Defaults InvoiceNum to '000000' if not provided
Use Cases
Historical AR Import: Import historical AR data from another system
AR Balances Reset: Zero out AR balances and reimport corrected values
AR to Sales History: Import sales history from another system (requires appropriate permissions)
Customer Invoice Recreation: Create invoices that may be missing in the system
Best Practices
Provide CustomerID or CustomerID_Translation: Ensures correct customer assignment
Include Accurate OpenBalance: This determines the AR amounts in the system
Set Proper Date Values: Determines accounting periods and aging
Consider ImportGroupID: Useful for tracking and potentially reversing imported batches
Include InvoiceNum: Helps with matching existing invoices in the system
Verify LocationID: Important for multi-location businesses
Warnings and Considerations
Importing with ZeroImportedAccountsRec=True will reset existing imported AR balances to zero
Dates more than one month in the future will be rejected
Both InvoiceNum and CustomerID are used to match existing invoices
The routine will report any invoices it couldn't find or create
Permission Requirements
Users need the AccountsRecApply permission to use this EDBL routine.
Related EDBL Routines
AccountsRecPaymentApplication: For applying payments to imported AR
Remittance: For importing payment receipts
InvoicesAndPayments: For importing both invoices and payment data
Fields And Definitions
Required:
InvoiceNum: The number for the Invoice. Needs to be only one line per invoice and date
Recommended:
CustomerID or CustomerID_Translation: CustomerID is preferred. Join Table Translations to Customers table. (Required if OpenBalance is provided)
OpenBalance: The balance remaining on the invoice. Will only open imported invoices.
LocationID or LocationID_Translation: Technically you can run with just InvoiceNum and LocationID. Though, it will do nothing.
Date: Works without Date, though Date is highly recommended. Without Date, invoice is likely to be made on 1/1/2000.
Optional:
ZeroImportedAccountsRec: Default value is 0. When mapped to 1, it zeroes all previously imported AR before importing new AR.