Resetting Invoice Numbers



Solution ID = KB-85

Goal : How to reset invoice numbers in Syteline

Version = Syteline6.00.00

Module : SLCOPO

Fact 1 : CO

Fact 2 : AR

Symptom 1 : What needs to be done when an invoice number gets set too high?

Symptom 2 : Next Invoice Number

Database : Progress

Cause

It is difficult to get the invoice number set to a lower number. The system is designed to start at an initial value and then increment off that value. If a higher number is entered at any item that becomes the new default value.

Fix

There a few options to fixing this problem. Below those options are listed.

Option #1
=========


1. Purge the Invoice History. That is found in Order Entry Utilities, Delete Utilities.

By performing this utility, old invoices will not be able to be reprinted, and the invoice registers and tax reports will have no information. The invoices will still show though in A/R posted transaction.

2. Reset the next invoice counter stored in the file lasttran.

If you have full development Progress, the following program can be entered and run in Query Editor. Enter the number that should be the next invoice number in the field lasttran.

find symix.lasttran where lasttran-key=1.
display lasttran.
update lasttran.last-tran.

If you do not have full development Progress, the file lasttran must be unloaded through the unload/load utility, which will create a lasttran.d file in the operating system. The invoice number can be edited through vi or DOS editor. Then lasttran must be emptied then reloaded.

Option #2
=========

Obviously, purging invoice history is not a desirable option for many. So there is a way to fix files through Progress or vi editor.

1. Through Progress query editor, the wrong invoice numbers in the inv-hdr, inv-item, and inv-stax tables must be updated. Also, if the transactions were not posted in A/R, arinv and arinvd must be updated. If they were posted in A/R, artran must be updated. Use the following queries to update the invoice numbers. Each number must be changed to the same number when each of the programs are run.

For the inv-hdr table:

for each symix.inv-hdr where inv-num > xxxxxxx:
display inv-hdr.inv-num
co-num.
update inv-hdr.inv-num.


For the inv-item table:

for each symix.inv-item where inv-num > xxxxxxx:
display inv-item.inv-num .
update inv-item.inv-num.

For the inv-stax table:

for each symix.inv-stax where inv-num > xxxxxxx:
display inv-stax.inv-num .
update inv-stax.inv-num.

For the inv-pro table:

for each symix.inv-pro where inv-num > xxxxxxx:
display inv-pro.inv-num .
update inv-pro.inv-num.


Run this query for each one of the files listed above, just replace inv-hdr with the appropriate file name. When editing numbers, make ABSOLUTELY SURE THAT THE NEW INVOICE NUMBERS HAVE NOT BEEN USED ELSEWHERE IN THE SYSTEM.. Syteline has big problems with processing records when two or more invoices share the same number.

The files can also be unloaded through the unload/load utility, but the entire file can only be unloaded. The bad invoice numbers will usually show up at the end of the file. The files can be edited through vi or DOS editor, then emptied, then reloaded.

2. Reset the next invoice counter stored in the file lasttran. If you have full development Progress, the following program can be entered and run in Query Editor. Enter the number that should be the next invoice number in the field lasttran.

find symix.lasttran where lasttran-key=1.
display lasttran.
update lasttran.last-tran.

If you do not have full development Progress, the file lasttran must be unloaded through the unload/load utility, which will create a lasttran.d file in the operating system. The invoice number can be edited through vi or DOS editor. Then lasttran must be emptied then reloaded .


Print Email

Send KB to this email: