hi experts,
In our case "vendor Invoice No." is mandatory in order to post purchase invoice. Now the problem is, suppose a vendor supplied me an item having invoice number 100 in the financial year 2009-2010 and the same vendor is going to supply me some item having invoice number 100 in the financial year 2010-2011.
If i am entering this into the purchase invoice, its giving an error that the invoice no is duplicate.
how can we resolve this issue. Because as the financial year ends all the vendors start sending their items with the same invoice numbers, i.e
2009-2010---> Invoice No range : 1--1000
2010-2011---> Invoice No range : 1--1000
can anybody guide me.
0
Comments
2009-2010---> Invoice No range : 10/1--10/1000
2010-2011---> Invoice No range : 11/1--11/1000
Andwian
That is ok, but this functionality should be there within navision. It should have a check of Invoice No and Posting Date and if posting date is different then it should allow users from doing the entry.
that means we need to do this type of customization for all similar issues.
Hi Thanx for the reply,
i found the following code under CU12:
Now, where should i put the filter for Posting Date,,,
you should have think about such kind of issue before locking your problem on this forum as you know very well it's not in standard(even similer issue has disscussed much more time here).
you must have know about as Andwian has suggested or you know we should always avoid to any type of customization until or unless you have alternative way to do this.
Personally I don't think any vendor should do this. And since it's not a standard practice there is no default nav functionality other that simply adding the year to the beginning of the Invoice #.
2009-abc123
2010-abc123
2011-abc123
to give you the same invoice number regardless that it's a new year makes no sence to me.
It's easier to just keep going with the numbers 1..999999999.
Why Invoice numbers need to be descriptive in that way is a waste of time IMHO :?
http://www.BiloBeauty.com
http://www.autismspeaks.org
This particular customization is a little tricky, because the check for External Document No. happens both in Codeunit 90 and Codeunit 12 in 2 different "phases" of the posting process.
You might want to consider a "hybrid" of other suggestions, which have been to manually enter some sort of prefix to make the invoice number unique. What you might consider is customizing that part, i.e. add a "year" prefix to the External Document No. field, so if the user enters 12345 into the field, it ends up as 2011-12345.
Here's an example of the kind of code you could use which is only a couple of lines of code. Put this in the ONVALIDATE trigger of the "Vendor Invoice No." field in the Purchase Header table:
The "IF xRec..." part of the code avoids duplicate prefixing if you EDIT the Vendor invoice no. The COPYSTR command makes sure the resulting string isn't longer than what the field allows.
It's not perfect - you have to consider all the options. If your External document no.'s are never longer than 15, then you're OK as is. Otherwise, it will truncate the last digit. You could use alternative versions of the code to trim the front rather than the back of the number, or just use 2 digits for the year, or ????
Hope this gives you some ideas
In India, I think 90 out of 100 vendors are doing this..
Please don't give any generic statements like this. India there are lot of companies using ERP. Whomsover is still using the old accounting s/w or manual billing is having this issue.
Regards,
Raveendran.BS