Prevent Duplicate Invoice Number in Elliott
We will introduce a Order Invoice Cross Reference File to be introduced in Elliott 8.3. The file structure is as below:
Order# Primary key
Invoice# Primary Key, Alternate Key-1 (Allow Duplicate)
Status Primary Key, Alternate Key-1
Date Stamp Primary Key, Alternate Key-2 (Allow Duplicate)
Time Stamp Primary Key, Alternate Key-2
Sequence No Primary Key, Alternate Key-2
Date Pick
Date Selected
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 ID
Filler
This file is to be updated at time of invoice printing as soon as the order record is rewrite. Keep in mind the first rewrite is to update the status from "S" to "N". Once user answer "Yes" to printed OK, there will be a second rewrite, which will change the status from "N" to "X". If user answer "No", then the second rewrite will change the status from "N" to "S". If user choose to void the invoice later on through the "Void Invoice" function, we will change the status from "X" to "S" as well. Once the invoice is posted, we need to update the status field to "Z". So the "Status" field could have value of "S", "N", "X" and "Z". We keep the record for "S" because an actual invoice hard copy was created. If user question why there's a hard copy invoice, but there's no record in Elliott, it could be because they answer "N", or it could be because they void the invoice. So having a table that show a record as soon as the invoice copy is printed will give us the ability to perform auditing better down the road.
The primary key will show all the invoices had ever printed for this order.
The Alternate Key-1 will show if this invoice had been printed. If yes, and the status is "N", "X" or "Z", then it will be problem. We should assign the next invoice number and check duplicate again. We will repeat this process until it is not duplicate and reflect ARCTLFIL for starting invoice number accordingly. The checking of duplicate invoice number should check CPINVHDR as well.
The Alternate Key-2 is designed to show each batch of invoice printing (Date Stamp + Time Stamp). The Sequence No is to establish the sequence of printing within the batch.
Because an order can be invoiced multiple times, so the following fields in the order should be saved with this file for better auditing:
Date Pick
Date Selected
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
At this moment, we only utilize this file to check duplicate invoice number during invoice printing. This feature does not apply to invoice history invoice printing, and pick up pending invoice printing.
We may choose to support other functions in the future including: (1) Show all invoices for the order (including the not posted or abandon invoices); (2) Use it as invoice log. The difference with the existing CSV invoice log is that this one does not require user to turn on. Also, this one is an index file so we can provide the log with Elliott user interface.
This change has been completed. It will be available in Elliott version 8.5.
-
As for the archiving issue, we are working on allowing alphabetic invoice number. It is still 6 digits like now. But because alphabetic characters are allowed, it will greatly enhanced the number of invoice number that can be stored in the 6 digits space so you will probably never have a need to archive after. We plan to release this feature in Elliott 8.3 before the end of the year.
-
Aaron Keating - Lipsey's, LLC commented
Gotcha. I misread the suggestion as also being the fix to allow duplicate invoice numbers in Elliott and avoid archiving.
-
It has no impact to InvoiceInquiry web services as it draw the data from invoice history database.
Currently, we noticed some of our customers get duplicate invoice number assigned as the invoice is printed. Elliott posting routine will catch this and prevent the duplicate invoice from posted, so it is still safe. But the invoice is already printed and maybe sent to customer already. This cause operation difficulty. So our focus is to prevent assigning duplicate invoice number in order header, in the mean time, provide an auditing database of invoice printing activities.
-
Aaron Keating - Lipsey's, LLC commented
How does this relate to the InvoiceInquiry web services? The GetOneInvoiceDetail method accepts an invoice number. What would be changed for it to know exactly which invoice to get if there could be multiple invoices with the same number?