Resetting Voucher Numbers in SQL Versions



Solution ID = KB-250

Goal : Resetting Voucher Numbers

Version = Syteline7.XX.XX

Module : SLACCT

Database : SQL

Fix

Resetting Voucher Numbers in SQL Versions
If you created a voucher with an incorrect voucher number, and then deleted the voucher, that higher number will still be stored in the the lasttran record. You will need to change the number in the lasttran record after you have verified that the there are no larger values in the aptrx, aptrxp and the vch_hdr tables.

This SQL code will tell you what the Next number to be used:

select last_tran from lasttran where lasttran_key = 5

This SQL code will tell you the largest value from each referencing table:

select max(voucher) from aptrx
select max(voucher) from aptrxd
select max(voucher) from aptrxp
select max(voucher) from vch_hdr
select max(voucher) from vch_item
select max(voucher) from vch_stax
Print Email

Send KB to this email: