最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

AX 2012 R3:错误库存交易数量不足,状态为已购买 / AX 2012 R3: Error Insufficient inventory transactions with status Purchased.

网络文摘 William 137浏览 0评论
Hi Guys, 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.
 static void legJob12(Args _args)  
 {  
   PurchLine purchLine;  
   InventTrans inventTrans;  
   InventTransOrigin origin;  
   ttsBegin;  
   changeCompany("0N09")  
   {  
     purchLine = purchLine::find("0N09-0002000507",1);  
     select firstonly * from inventTrans  
     join origin  
     where inventTrans.InventTransOrigin == origin.RecId  
     && origin.InventTransId == purchLine.InventTransId  
     && inventTrans.StatusReceipt == StatusReceipt::Ordered;  
     if (inventTrans.RecId)  
     {  
       inventTrans.selectForUpdate(true);  
       inventTrans.delete();  
     }  
   }  
   ttsCommit;  
   info('completed');  
 }  
If someone know any better solution, please do comment and help me satisfied. Thanks Guys for reading the blogs
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址