Hello All,
I'm facing such a problem: When I want to insert new invoice, system is showing the error, that this number already exists. Of course it is not true.
I searched entire forum, and found nothing. I tried to increase the last used number in series no., but didn't help.
What can be wrong?
I need your help.
Best regards.
JTPro
Navision Application Version: 4.0SP1
Navision Database Version: 4.0
0
Comments
- Aren't you using the same Post Series No. for different document types?
- Are you using some kind multiple-times payment?
I had this problem when we developed the mulitple-times payment. Once again, I had this problem when somebody changed the Post Series No. on the invoice to the same number as the Invoice No.
Check these out, this might help you!
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thank you for your posts.
ara3n:
Debugger says nothing. I already tried it. Even if you put data directly to the table, the error message shows up. It drives me crazy ](*,) .
I will check what markborges suggested. I hope it will be it.
Best regards
JTPro
Navision Database Version: 4.0
Markborges, I just realized that I developed such functionality, that takes the number from the Series No. of Invoice and put it into the Posting No. field on Invoice. This is some kind of buffor. If an accounter is sure, that the invoice is ok, then it post it and the number of posted invoice is the one from Posting No. field. This is really strange, because it had been working for a long time. Maybe I miss something :-k
Any help is apretiate appreciate.
Best regards
JTPro
Navision Database Version: 4.0
Any changes made to Codeunit 80?
Is this when you try to post an Order into an Invoice?
If so there is a field in the Sales Header table "Posting No.", this is populated sometimes in the Posting Codeunit, then if there was an error the header is updated but not posted, the next invoice takes the same number, then when you try to invoice the order you get this message, as codeunit 80, does not get the next number if the header is already marked with a Posting Number.
I do remember this being a problem on a Modified database but not on a standard.
There is this code which only gets a new number if "Posting No." is blank.
A few lines later it does a commit, if an error occurs after the header has been updated, although the number series should have been updated before the Commit.
IF Invoice AND ("Posting No." = '') THEN BEGIN
IF ("No. Series" <> '') OR
("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
THEN
TESTFIELD("Posting No. Series");
IF ("No. Series" <> "Posting No. Series") OR
("Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"])
THEN BEGIN
"Posting No." := NoSeriesMgt.GetNextNo("Posting No. Series","Posting Date",TRUE);
ModifyHeader := TRUE;
END;
END;
So if there are modifications you need to clear the "Posting No." in codeunit 80 to stop this error.
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
I didn't touch codeunit 80.
I made modification on Invoice form, that allows user to choose the series no. for later posting.
It looks like that:
It had been working for a long time. ](*,)
Why me? Why me?
Thanks a lot for your answers.
Best regards.
JTPro[/quote]
Navision Database Version: 4.0
Check all you Numbering fields under Sales & Receivables Setup (Numbering Tab), specially the "Invoice Nos." and "Posted Invoice Nos.". Check if they're not the same!
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com
Checked, and everything looks fine. There are different Nos. for each type of document.
Still nothing.
Best regards
JTPro
Navision Database Version: 4.0
I found something. I decided to look more deeply, so I made a backup of a database (SQL2000 one), and created native database. After I made a restore, I tried to make invoice, and everything works fine?
SQL? Now, this is really strange.
Any idea?
Best regards
JTPro
Navision Database Version: 4.0
The mystary has been solved. There was something wrong with my sql database (no idea what was it :-k ). I created a new database, and restore the old one. Now, everything seems to be ok.
Thanks a lot for your time.
Best regards.
JTPro
Navision Database Version: 4.0
"Let [Solved] be in your title"
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com