Hi dear community !
I'm facing a problem in my journals where the voucher number sequence of a previous journal is being re-used again in the next journal (Different journals, so it's not related to journal balance).
The voucher number sequence is set to “Countinuous = Yes”.
What I noticed is that after generating the 1st journal, when I click on the voucher number sequence status list (under “Administration” tab in action pane), I can see the already used voucher number is listed and its status is set to “Free”.
The code assigning the number sequence is a custom code
Here is the method code used to set the voucher number for the jorunal:
protected void setVoucherForJournal(JournalNameId _JournalNameId)
{
NumberSeq numberseq;
NumberSequenceCode NumberSequenceCode;
NumberSequenceCode = NumberSequenceTable::find(LedgerJournalName::find(_JournalNameId).NumberSequenceTable).NumberSequence;
numberseq = NumberSeq::newGetVoucherFromCode(NumberSequenceCode);
if(NumberSequenceTable::find(LedgerJournalName::find(_JournalNameId).NumberSequenceTable).Continuous == NoYes::No)
{
this.parmVoucher(numberseq.voucher());
}
else
{
ttsBegin;
this.parmVoucher(numberseq.voucher());
ttsCommit;
}
}
Is there something wrong in the code that is making the new generated number sequence to be available in the status list as free?
What to do to prevent that?
Any advise is appreciated !
Thanks in advance !

Report
All responses (
Answers (