error Voucher number must be filled in while posting PO invoice

Hi All,

Not able to post invoice in purchase order in ax 2012 R3, throwing below error

Voucher number must be filled in.

Please suggest,

HI,
Can you give more details(Like Module if possible screen shot…)…
Have you filled the Voucher number…?
Is VoucherNumber a mandatory field?

voucher PO.png

This was the errror, please suggest where this ledger voucher will assign

or classes I need to check

\Classes\PurchInvoiceJournalCreate\allocateNumAndVoucher

You haven’t told if the number sequences were set up properly.

Hi Bhanu ,

On top of kranthi’s suggestion , check whether the numbersequence is configured in Accounts payable parameters and Procurement and sourcing parameters. I am sure it is because of missing number sequence we will get this error.

Yes, number sequence set up is there for this invoice voucher.

I have checked the classes ,PurchInvoiceJournalCreate
and debugger is not at all hitting these classes - PurchInvoiceJournalCreate\allocateNumAndVoucher
while posting PO invoice.

PO posting will be executing in IL. Try un marking the Execute business operations in IL (Tools → Options → Development). (or) Debug in visual studio.

0044.voucher PO.png

Unchecked the checkbox still not able to debug the classes

and also getting the above error,

now it is showing voucher number as zero(0)

Hi Bhanu,

You can also try generating the number sequence for all using number sequence wizard. It will assign default number seq if they are any missing and do the invoice again.

Yes, I did this already. number sequence generated

Hi Hari,

check the screenshot, number seq were update, does this will effect PO invoice posting .

You can add the break point in the code form where the error is coming and back trace.
Check the number sequence assigned to invoice voucher. There could be an issue with the setup. (Next number or format).

Thanks for your response.

The break point is not hitting as these classes run on server. I unchecked Execute business operations still not allowing.

In server configuration also break point options are checked, suggest me how to debug server side code without visual studio.

Number sequence I checked it assigned in AP and also check in job and it is generating the next number.

If you have enabled it on server configuration then you should be able to debug the server code.
Also check this, msdn.microsoft.com/…/gg860898.aspx