10 Invoice Matching
Merchandising and Sales Audit stage invoice records to be integrated to the Invoice Matching solution for returns to vendor (RTV), consignment orders and returns, deals, importing partners, obligations, and customs entry. The programs described in this chapter ensure that open transactions are closed and old data is purged related to this integration.
In addition to the programs listed below, there are two integration programs related to this functional area:
-
edidlinv (Download of Invoice For Invoice Matching)
-
saexpim (Export DSD and Escheatment from Sales Audit to Invoice Matching)
These are both described in Merchandising Operations Guide Volume 2.
Close Aged Shipments to Prevent them from Matching Open Invoices (invc_ship_close_job)
Module Name |
invc_ship_close_job |
Description |
Close Aged Shipments to Prevent them from Matching Open Invoices |
Functional Area |
Invoice Matching |
Module Type |
Admin - Ad hoc |
Module Technology |
Background Processing |
Catalog ID |
N/A |
Wrapper Script |
b8dwrap.ksh |
Design Overview
This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.
Thread assignment program will filter eligible records from order-shipment and order header tables based on its purge criteria. The Close Open Ship Days parameter will determine number of days that all shipment records that have remained opened and not associated with any open invoices. These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.
The Business logic program will process all records from the staging table. Using bulk processing, this program will update the records from order-shipment table by setting the invoice match status to 'C'losed. It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.
Key Tables Affected
Table 10-1 Key Tables Affected
Table | Select | Insert | Update | Delete |
---|---|---|---|---|
PERIOD |
Yes |
No |
No |
No |
SYSTEM_OPTIONS |
Yes |
No |
No |
No |
RMS_BATCH_STATUS |
Yes |
No |
No |
No |
B8D_PROCESS_CONFIG |
Yes |
No |
No |
No |
JOB_AUDIT_LOGS |
No |
Yes |
No |
No |
B8D_INVC_CLOSE_SHIP_STG |
Yes |
Yes |
No |
Yes |
ORDHEAD |
Yes |
No |
No |
No |
SHIPMENT |
Yes |
No |
Yes |
No |
SHIPSKU |
Yes |
No |
No |
No |
INVC_HEAD |
Yes |
No |
No |
No |
INVC_XREF |
Yes |
No |
No |
No |
Close Aged Shipments to Prevent them from Matching Open Invoices (invclshp)
Module Name |
invclshp.pc |
Description |
Close Aged Shipments to Prevent them from Matching Open Invoices |
Functional Area |
Invoice Matching |
Module Type |
Admin |
Module Technology |
ProC |
Catalog ID |
RMS252 |
Wrapper Script |
rmswrap.ksh |
Design Overview
This batch program will close all shipments that have remained open for a specified number of days as defined by the ‘Close Open Ship Days' system parameter and are not associated with any open invoices. This will be accomplished by setting the invc_match_status on the SHIPMENT table to ‘C'losed.
Purge Aged Invoices (invoice_purge_job)
Module Name |
invoice_purge_job |
Description |
Purge Aged Invoices |
Functional Area |
Invoice Matching |
Module Type |
Admin - Ad hoc |
Module Technology |
Background Processing |
Catalog ID |
N/A |
Wrapper Script |
b8dwrap.ksh |
Design Overview
This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.
Thread assignment program will filter eligible records from invoice header table based on its purge criteria from system parameter settings. The Order History Months parameter will determine the number of months older than month ages between current date and invoice match date, invoice date (if match date is not available). These old posted invoices that have not already been purged by Order Purge Job (invoices associated to an order) will be included for deletion. This includes all types of invoices-non-merchandise, credit notes, credit note requests, debit memos, and consignment invoices. Regular merchandise invoices will primarily be deleted through order purge job but will be deleted by this job if they still exist in the system. This program deletes only from the RMFCS invoice tables preceded with 'INVC'. These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.
The Business logic program will process all records from the staging table. Using bulk processing, this program will delete the records from invoice-related tables by calling INVC_SQL.DELETE_INVC. It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.
Key Tables Affected
Table 10-2 Key Tables Affected
Table | Select | Insert | Update | Delete |
---|---|---|---|---|
PERIOD |
Yes |
No |
No |
No |
PURGE_CONFIG_OPTIONS |
Yes |
No |
No |
No |
RMS_BATCH_STATUS |
Yes |
No |
No |
No |
B8D_PROCESS_CONFIG |
Yes |
No |
No |
No |
JOB_AUDIT_LOGS |
No |
Yes |
No |
No |
B8D_INVOICE_PURGE_STG |
Yes |
Yes |
No |
Yes |
INVC_HEAD |
Yes |
No |
No |
Yes |
SA_TRAN_HEAD |
Yes |
No |
No |
No |
SHIPSKU |
Yes |
No |
No |
No |
INVC_DETAIL |
No |
No |
No |
Yes |
INVC_NON_MECH |
No |
No |
No |
Yes |
INVC_MERCH_VAT |
No |
No |
No |
Yes |
INVC_DETAIL_VAT |
No |
No |
No |
Yes |
INVC_DISCOUNT |
No |
No |
No |
Yes |
INVC_TOLERANCE |
No |
No |
No |
Yes |
ORDLOC_INVC_COST |
No |
No |
Yes |
No |
INVC_MATCH_QUEUE |
No |
No |
No |
Yes |
Purge Aged Invoices (invprg)
Module Name |
Invprg.pc |
Description |
Purge Aged Invoices |
Functional Area |
Invoice Matching |
Module Type |
Admin |
Module Technology |
ProC |
Catalog ID |
RMS253 |
Wrapper Script |
rmswrap.ksh |
Design Overview
This program will purge old posted invoices that have not already been purged by ordprg.pc (which purges invoices associated with an order). This includes all types of invoices-non-merchandise, credit notes, credit note requests, debit memos, and consignment invoices. Regular merchandise invoices will primarily be deleted through the order purge batch (ordprg.pc) but will be deleted by invprg.pc if they still exist in the system. The invoices considered are those older than the number of months defined in the purge_config_options.ORDER_HISTORY_MONTHS column. The age of the invoices will be determined from the match date; if there is no match date, the invoice date will be used.
Note:
This program deletes only from the Merchandising invoice tables preceded with ‘INVC'.