This feature uses a new table, the Invoice Cross Reference table, to determine if an invoice has already been used by another unposted or posted order. The Invoice Cross Reference is updated at the time of invoice printing as soon as the order record is rewritten. Keep in mind the first rewrite is to update the status from "S" (Selected for Billing) to "N" (Printed but Not OK). Once the user answers "Yes" to the printed OK prompt, the record is rewritten a second time. This rewrite will change the status from "N" (Printed but Not OK) to "X" (Printed OK/Invoiced). If the user answers "No," then the second rewrite will change the status from "N" (Printed but Not OK) to "S" (Selected for Billing). If the user chooses to void the invoice later on through the "Void Invoice" function, the status will change from "X" (Printed OK/Invoiced) to "S" (Selected) as well. Once the invoice is posted, the status field is updated to "Z" (Posted).
So the "Status" field could have a value of "S," "N," "X" and "Z." We keep the record for "S" because an actual invoice hard copy was created. If the user questions why there's a hard copy invoice, but there's no record in Elliott, it could be because they answered "N" to the printed OK prompt, or it could be because they voided the invoice. Having a table that shows a record as soon as the invoice copy is printed will give the user the ability to perform better auditing at a later time.
When printing invoices, the application will retrieve the next invoice number. Once retrieved, the application will check if the invoice number is on file in the new Invoice Cross Reference with a status of “N” or “X.” If the invoice number is found with a status of “N” or “X,” the application will get the next invoice number and try again. If the invoice number is not found, the application will check if the invoice number is on file in the Invoice Header file. If it is, the application will get the next invoice number and try again.
Because an order can be invoiced multiple times, the following fields are stored in the Invoice Cross Reference file for better auditing:
The Source field is the application that generated the record. It can contain one of the following values:
When voiding invoices or posting invoices to Accounts Receivable, the user name and source fields are retained with the information from the original user and source that generated the invoice.
Below is an example of three records generated for one order number.
Activity | Status | Update User? | Update Source? |
a. First print (creates new record) | "N" | Y | Y |
b. Answer Y to Print OK (updates record) | "X" | N | N |
c. Void (updates record) | "S" | N | N |
d. Reprint After Void (creates new record with a new sequence number) | "N" | Y | Y |
e. Answer N To Print OK (updates record) | "S" | N | N |
f. Reprint again (creates new record with a new sequence number) | “N” | Y | Y |
g. Answer Y to Print OK (updates record) | "X" | N | N |
h. Post Invoices (updates record) | "Z" | N | N |
a. Printing an invoice (not a duplicate) for an order will always generate a new record. The user and source are recorded.
b. Answering Y to the “Print Ok?” prompt will change the status from “N” to “X.” The user and source are not updated.
c. Voiding the invoice changes the status from “X” to “S.” The user and source are not updated.
d. Printing the invoice will generate a new record with a status of “N.” The user and source are recorded.
e. Answering “N” to the “Print OK?” prompt will change the status from “N” to “S.” The user and source are not updated.
f. Printing the invoice will generate a new record with a status of “N.” The user and source are recorded.
g. Answering “Y” to the “Print OK?” prompt will change the status from “N” to “X.” The user and source are not updated.
h. Posting the invoice will change the status from “X” to “Z.” The user and source are not updated.
A new utility program is available to generate the data for Invoice Cross Reference file. This application is available from Global Setup-> Utilities-> COP Utilities-> Utilities-> Generate Invoice Xref File.
This utility program will generate records for any orders/invoices that do not exist in the invoice cross reference file. A report is provided with a list of records that are created. If an order number/invoice number combination exists in the invoice cross reference file, the record is not updated.
With this feature, you might ask if there is still value with creating invoice log CSV file through Global Setup -> Cop-Func -> Invoice Printing -> 18. Append Printed Invoices to CSV Log File?
The answer is, that depends:
The following is a related KB article: https://support.netcellent.com/portal/en/kb/articles/apvenext-or-cpinvxrf-file-not-defined-in-ddf40-directory
New Programs: CPINVXRF.SL, CPINVXRF.FD, CPINVXRF.WS, CPINVXRF.DS, CPINVXRF.IO, CPINVXRF.PL, CPXRFSCN, CPXRFGEN
Programs Modified: CPINVPRT.PL, CPMASVNS.PL, CP0305, CP0400, CPINVPRH, CPINVPRP, CPINVPRT, CPMASVPT, CPMASVPV, CPSHPVER, NSCTLUT4, XCP0106
CLS