Skip to content

Feature - Prevent Duplicate Invoice Numbers with Invoice Cross Reference File

Release Date - 3/25/19

Version: 8.5 and Up

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:

  • Date Picked
  • Date Selected for Billing
  • Invoice Date
  • Ship Via
  • Invoice Amount
  • Freight Amount
  • Misc. Charge Amount
  • Sales Tax Amount 1
  • Sales Tax Amount 2
  • Sales Tax Amount 3
  • Payment Amount
  • User Name
  • Source

 

The Source field is the application that generated the record. It can contain one of the following values:

  • CP0100 – Printed immediately from Order Entry
  • CP0300 – Printed immediately from Order Billing
  • CPSLSDSK – Printed immediately from Sales Desk
  • CPSBMENU – Printed immediately from Fill Back Orders
  • CPSHPVER – Printed immediately from Shipping Verification
  • CP03S2 – Printed from Print Invoices (standard invoices)
  • XCP03S2 – Printed from Print Invoices (DYO invoices)
  • CPONEINV – Printed from Print One Invoice

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:

  • First of all, the invoice cross reference table is only available after 8.5.  If you are not on 8.5 or after, and want invoice printing auditing capability, you will need to use the invoice CSV log file option.
  • The CSV Log File only contains the printed invoices that you answered "Y" to "Are Invoices Printed OK?" question.  On the other hand, the Invoice Cross Reference database contains all printed invoices, including those you answered "N" to above question. So the Invoice Cross Reference table is more comprehensive than the CSV log file.
  • On the other hand, if you try to get data from the Invoice Cross Reference table, you can print it but there's currently no CSV output option at this moment and the table does not have all invoice's data (you can join with other tables to retrieve this information, though.)  If your purpose is to use a CSV file, then the CSV Log File is directly created and easily available to the user. 
  • Also, if you want to use the invoice CSV log file to drive some sort of automation processing, then you will need to create the CSV file as well.

The following is a related KB article: https://support.elliott.com/knowledgebase/articles/1979814-apvenext-or-cpinvxrf-file-not-defined-in-ddf40-dir

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

 

 

 

 


Feedback and Knowledge Base