Yesterday i have received a support request where i need to investigate this error, due to this error user is not able to post the Pending Vendor invoice. When i start investigating this issue, the Purchase order, Receipt and Invoice looks pretty simple with one line on it.
After lots of talk and finding more details, i am seeing wearied Ordered quantity value of 140860. I did not find any clue from where this quantity came. Other wise order looking very simple with 48 quantity as Purchase order quantity and they have received the same Quantity also. They also wanted to do the Invoice for Same quantity.
Further strange thing is, With same Ordered value the record is created in Inventory transaction also and this is the main reason Invoice is not able to POST. This additional line from un-know source is messing this invoice from posting.I am still not known on how this line came but to fix this issue i have to delete this additional line as a workaround. Being a technical guy i am not satisfied as still i am unable to reach the root cause. But this is LIFE we have to move on. So i have created this simple job to remove that extra line.
If someone know any better solution, please do comment and help me satisfied.
Thanks Guys for reading the blogs
static void legJob12(Args _args)
purchLine = purchLine::find("0N09-0002000507",1);
select firstonly * from inventTrans
where inventTrans.InventTransOrigin == origin.RecId
&& origin.InventTransId == purchLine.InventTransId
&& inventTrans.StatusReceipt == StatusReceipt::Ordered;