Receivables applies the receipts in a Lockbox transmission when you submit Post QuickCash. You can either submit Post QuickCash when you run Lockbox or as a separate step after importing and validating your receipts. Post QuickCash updates your customer's balance using the information provided in your Lockbox transmission.
To successfully apply a receipt, AutoLockbox must know the name or number of the remitting customer and to which transaction(s) each receipt should be applied. If the Lockbox transmission includes both the customer name or number and the transaction(s) to which each receipt should be applied, AutoLockbox uses this information to apply the receipts during Post QuickCash. If customer information is not provided, you can set up your Lockbox to use matching rules to identify the remitting customer and partially or fully apply each receipt.
A Lockbox transmission usually includes matching numbers. These are most often transaction numbers, but they can also be other types of numbers, such as a purchase order or sales order number. To use matching rules, you need to specify a Match Receipts By method and set the AutoAssociate parameter to Yes when defining your Lockbox. The Match Receipts By method determines which type of number to search for during the validation step. When it finds a match, AutoLockbox identifies the customer using the information from the matched transaction and then applies the receipt during the final step, Post QuickCash.
If AutoLockbox cannot identify the customer or to which transaction to apply the receipt, it assigns the receipt a status of Unidentified.
If AutoLockbox identifies the customer for a receipt but cannot determine to which transaction this receipt should be applied, then AutoLockbox might create a claim, depending on your setup. See: How AutoLockbox Creates Claims.
If you did not define your lockbox to automatically create claims, or if you did but no remittance lines are eligible, then AutoLockbox applies the receipt using the AutoCash Rule Set defined for this customer.
AutoLockbox can also import and apply cross currency receipts. See: Using AutoLockbox to Import and Apply Cross Currency Receipts.
You can pay for another customer's invoices through AutoLockbox if you have set up a relationship between these customers or the system option Allow Payment of Unrelated Invoices is Yes for this Lockbox submission. The paying customer should be identified by a customer or MICR number on the receipt record. Otherwise, if you are using AutoAssociate when applying Customer A's receipt to Customer B's invoice, the receipt will be identified as paid by Customer B. Additionally, all invoices listed to be paid by one receipt must belong to the same customer; otherwise, Lockbox imports the receipts as 'Unapplied'.
If the Allow Payment of Unrelated Invoices option is No in the System Options window or for this Lockbox submission, you need to set up a relationship between the customers before you can make applications in this way. See: Defining and Updating Account Relationships.
You can also set up a party paying relationship. See: Using Party Paying Relationships.
Note: When applying a receipt to an invoice through AutoLockbox, AutoLockbox does not realize discounts. This is an operation of the Post QuickCash program..If the customer's credit profile and payment terms are set to Allow Discounts, Post QuickCash will automatically take the discount. The discount taken will also depend on how you set the Allow Unearned Discounts and Discount on Partial Payment system options. The discount can be manually overridden in the Receipts window.
If the customer number or MICR number is not included in your transmission but AutoAssociate is set to Yes, AutoLockbox will try to identify the customer and to which transaction(s) each receipt should be applied based on whatever type of number is provided.
AutoLockbox always searches for the type of matching number in the following order:
Transaction Number
Sales Order Number
Purchase Order Number
Balance Forward Bill Number
Other, user defined number
If the matched number is a sales order number, AutoLockbox searches for the first invoice that belongs to this order. Then, when you run Post QuickCash, the program will apply the receipt to that invoice.
If the matched number is a purchase order number, AutoLockbox searches for a reference number that refers to this purchase order. Then, when you run Post QuickCash, the program will apply the receipt to that invoice.
If the matched number is a balance forward bill number, AutoLockbox will be able to identify the customer and Post QuickCash will apply the receipt to the transactions included on the balance forward bill using the AutoCash rule Clear Past Due Invoices Grouped by Payment Term.
If the matched number is determined using a custom matching rule, Lockbox uses the rule that you specify to determine how to apply this receipt. See: Implementing a Custom Matching Rule.
When it finds an item with the same number and type as the current search, AutoLockbox checks the following locations for the Match Receipts By parameter, stopping when a value is found:
Customer Bill-to Site
Customer
Lockbox
The setting of the Match Receipts By parameter must be the same as the current search for AutoLockbox to match a receipt with an open item.
For example, if AutoLockbox finds a matching transaction number in the first search, it checks the customer site for the Match Receipts By parameter. If the parameter is set to Transaction, AutoLockbox matches the receipt with this transaction and applies the receipt when you run Post QuickCash. If the setting at the customer site is a value other than Transaction, AutoLockbox searches for the next type of matching number (in this example, a sales order number). If the setting at the customer site is null, AutoLockbox checks the next location for the value of the Match By Receipts parameter (in this example, the customer profile).
Refer to the examples and the illustration below for more information.
Matching Rules Examples
Example 1: A receipt record indicates that a receipt should be applied to open debit item 12345. AutoLockbox first searches for a transaction (invoice, debit memo, chargeback) with this number. AutoLockbox finds an invoice with this number, so it checks the value of the Match Receipts By parameter at this customer's site. The Match Receipts By parameter is null for this customer's site, so AutoLockbox checks the setting in the customer's profile. Match Receipts By is set to Transaction in the customer's profile, so AutoLockbox matches the receipt with this invoice and will apply it to this transaction when you run Post QuickCash.
Example 2: Using the same receipt record information as Example 1, assume that AutoLockbox fails to find a transaction with the number 12345. The second time the program searches for a sales order with this number. AutoLockbox does not find a sales order with this number, so it now searches for a purchase order that has the number 12345. AutoLockbox finds purchase order 12345 in this transmission, so it checks the Match Receipts By parameter at the customer's site. The parameter is null at the customer's site, so the program checks the customer's profile. The parameter is also null in the customer's profile, so AutoLockbox checks the parameter for this Lockbox. The Match Receipts By parameter is set to Purchase Order Number for this Lockbox, so the program matches the receipt with this purchase order and will apply it to this transaction when you run Post QuickCash.
If AutoLockbox cannot find a match after searching for each type of number in the sequence, it applies the receipt using the AutoCash rule set defined for this customer. See: AutoCash Rules.
If the AutoCash rule set is unable to apply the receipt, AutoLockbox assigns it a status of Unapplied. You must then manually apply the receipt in the QuickCash or Applications window.
Note: Depending on your setup, Lockbox might create a claim for an unmatched remittance.
The Match on Corresponding Date option for your Lockbox determines whether AutoLockbox should also check the transaction date before matching receipts with transactions. For example, if the matching number is a sales order number and Match on Corresponding Date is set to Always, the sales order date must be the same as the date specified in your receipt record for Lockbox to apply the receipt. See: Lockboxes.
Post QuickCash uses AutoCash rules to apply any identified receipts that could not be applied using matching rules. To use AutoCash rules to apply receipts imported using Lockbox, be sure that you:
Include the MICR or customer number in your transmission
Do not include matching numbers in your transmission (otherwise, Post QuickCash will apply the receipt to each transaction for which it can find a match)
Specify an AutoCash Rule set for your customer's profile class (otherwise, Receivables uses the AutoCash Rule set in the System Options window)
If you submit Post QuickCash as a separate step, you can review each unapplied receipt in the QuickCash window. Receivables displays 'AutoCash Rule' in the Application Type field to indicate that it will be using AutoCash rules to apply your receipts when you run Post QuickCash.
To allow overapplication using AutoLockbox, set the profile option AR: Allow Overapplication in Lockbox to Yes. If this profile option is set to Yes and the transaction type of the debit item allows overapplication, AutoLockbox applies the receipt and, if the payment exceeds the balance due, changes the sign of the debit item.
For example, AR: Allow Overapplication in Lockbox is set to Yes and Post QuickCash applies a $50 payment to a $25 invoice. If the transaction type allows overapplication, Post QuickCash applies the entire amount and the invoice balance due changes to -$25. If the transaction type does not allow overapplication or the profile option is set to No, Post QuickCash applies $25 of the receipt (closing the invoice) and leaves the remaining amount unapplied.
Note: If the transaction type does not allow overapplication or the profile option is set to No, and you are using Oracle Trade Management to track and resolve claims, then Post QuickCash applies $25 of the receipt (closing the invoice) and creates a claim for the remaining amount.
Note: You cannot overapply a receipt to an open debit item using AutoCash rules.
Attention: If the sign of your application is different from the sign of the balance due on your invoice, Post QuickCash does not apply the receipt. In this case, the entire receipt amount remains unapplied.
If part of a receipt is left unapplied, you can control whether it remains unapplied or if AutoLockbox applies it using AutoCash Rules. To apply remaining amounts in a Lockbox transmission using AutoCash Rules, specify a Remainder Rule Set in the remitting customer's profile class. To import receipts with remaining amounts as Unapplied, leave the Remainder Rule Set field blank. See: Assigning Profile Classes to Customers.
Post QuickCash uses the Application Rule Set assigned to the debit item's transaction type to determine how to apply payments and how discounts affect the open balance of any associated charges (such as lines, freight, and tax). If no rule set is assigned to this item's transaction type, Post QuickCash uses the rule set defined in the System Options window. See: Receivables Application Rule Sets.
Lockbox assigns a status to each receipt that you import into Receivables depending on the information included in your transmission:
Unidentified: Lockbox was not able to determine the customer for this receipt.
Unapplied: Lockbox was able to identify the customer for this receipt, but it could not determine to which transaction to apply this receipt.
Applied: Lockbox successfully applied this receipt during Post QuickCash.
Attention: If you are using the automatic receipts feature, AutoLockbox ignores all transactions that are selected for automatic receipt (transactions assigned to a receipt class with an Automatic Creation Method).
Receivables supplies the packaged procedure arp_lockbox_hook.cursor_for_matching_rule which you can use to add your own custom matching rule with AutoLockbox. You can use this feature if, for example, you need to match matching numbers and dates passed to Lockbox with numbers and dates in your own custom tables (custom_table.custom_number and custom_table.custom_date) instead of or in addition to standard matching options. You can also use this feature to match with other numbers and dates in the existing Receivables tables.
This procedure expects a row in the AR_LOOKUPS table with lookup_type = ARLPLB_MATCHING_OPTION and valid values for other columns required for using a customized matching rule. The master program arp_process_lockbox will fetch that row and - if it finds it to be one of the non-standard (i.e. not built in core AR) rows - it will pass the control to this procedure with the corresponding lookup_code in your database. The procedure should return a string that Dynamic SQL can use to open and parse a cursor. You need to create this SQL string to replace the string named p_cursor_string (see example below).
Your string should have the following restrictions:
You should only use the following bind variables:
a. b_current_matching_number - This will get a value of a matching_number passed in the overflow or payment record.
b. b_current_matching_date - This will get a value of a matching_date passed in the overflow or payment record.
c. b_current_installment - This will get a value for the installment number (if any) passed in the overflow or payment record.
d. b_customer_id - If the customer is identified using a customer number or an MICR number, the program will enforce that the matching_number is for the same customer (except if the value is 'Y' in b_pay_unrelated_customers).
e. b_pay_unrelated_customers - When you submit AutoLockbox, the program prompts you to choose whether to allow payments for unrelated customers. This variable will get a value 'Y' or 'N' based on the value that you choose.
f. b_lockbox_matching_option - The value of this variable will match to the value of ar_lookups.lookup_code. It is also stored in ar_customer_profiles.lockbox_matching_option and in ar_lockboxes.lockbox_matching_option.
g. b_use_matching_date - This variable will be assigned a value NEVER, ALWAYS, or FOR_DUPLICATES, depending upon the value of the Match on Corresponding Date option for your lockbox (in ar_lockboxes).
If you are customizing AutoLockbox using this procedure, be sure that this procedure returns a string that can create a valid cursor and that the SQL returns one and only one row (neither zero nor more than one).
The program expects three return values from the SQL statement in the following order:
Customer_Id (NUMBER(15))
Invoice Number (VARCHAR2(20))
Invoice Date (DATE)
The program expects that the combination of invoice number and invoice date is unique in ar_payment_schedules.
You do not have to use all the bind variables that are provided in your SQL statement. For example:
p_cursor_string := 'select ct.customer_id, ct.trx_number, ct.trx_date ' ||
'from custom_table ct ' ||
'where ct.matching_number = :b_current_matching_number ' ||
'and ct.matching_date = :b_current_matching_date
';
If the SQL statement does not match with the given matching number and matching date (optional), the statement must return the following:
customer_id = -9999, trx_number = null, trx_date = null.
If the statement matches to multiple customers but the same trx numbers, it must return customer_id = -7777. The procedure will ignore trx_number and trx_date in this case.
Note: The program calling this procedure does not expect it to return any errors because the definition of a cursor is a one-time procedure and, if done carefully, should not error.
Below is the packaged procedure arp_lockbox_hook.cursor_for_matching_rule that Receivables provides:
---------------------------------------------------------*/
PROCEDURE CURSOR_FOR_MATCHING_RULE(p_matching_option IN VARCHAR2,p_cursor_string OUT VARCHAR2) IS
BEGIN
arp_util.debug('arp_lockbox_hook.cursor_for_matching_rule()+');
p_cursor_string := 'select -9999, NULL, NULL from dual';
arp_util.debug('arp_lockbox_hook.cursor_for_matching_rule()+');
RETURN;
END cursor_for_matching_rule;
END arp_lockbox_hook;
COMMIT;
EXIT;
For more information about setting up Lockbox to use a custom matching rule, refer to the files $AR_TOP/admin/sql/ARRLBHKS.pls and $AR_TOP/admin/sql/ARRLBHKB.pls.