ref: Number sequence increasing

Hi All, I have a problem with the increasing of Voucher’s number sequence¡£ The path is Main menu->Account Payable->Invoice Journal->Lines->Journal Voucher Form. I created a new menu button there and brought up a form to let end users able to select multi-lines from table called ACAShipTrackingTable and inserted multi-lines into LedgerJournalTrans directly. The purpose is to help AP enter freight bills in the Invoice Journal faster. My statement is: ledgerjournaltrans.Invoice=ACAShipTrackingTable.ShipTrackingNo; ledgerjournaltrans.AmountCurCredit=ACAShipTrackingTable.ShippingCost; ledgerjournaltrans.TransDate = today(); Ledgerjournaltrans.DocumentDate = ACAShipTrackingTable.ShipDate; ledgerjournaltrans.OffsetAccount=“6635-1000” ; ledgerjournaltrans.Dimension[4]=SalesTable::find(ACAShipTrackingTable.SalesId).custaccount; Ledgerjournaltrans.AccountNum = ACAShipTrackingTable.ACAVendAccount; ledgerjournaltrans.DocumentDate=ACAShipTrackingTable.ShipDate; lastccode=ledgerjournaltrans.currencyCode; ledgerjournaltrans.insert(); I found the Voucher’s number is not properly right. After 3 records have been added in the LedgerJournalTrans Table, Voucher numbers are the same (here is, VI-22688), it will be VI-22689 until I did Single/multi selection next time. Initially, I expected the first line’s Voucher to be VI-22688, 2nd is VI-22689 and 3rd is VI-22690. Would appreciate any of your suggestions? Cheers, Gem Han