Hi Everyone,
We have created new inventory dimension "location" , apart from site and warehouse. We are giving all three dimension while creating the sales order.
Now when we are creating the planned purchase order , all three dimension are flowing to purchase order line ---> through custmization .
For this I have written the code in the class "ReqTransPoMarkFirm" method "createPurchLine" and updating invent dim id in table purch line as follows:
this.insertMovement(purchLine); ----- standard code
//New Code ----> Start
ttsbegin;
select forupdate localpurchLine where localpurchLine.RecId == purchLine.RecId;
if(localpurchLine)
{
select firstonly localSalesLine where localSalesLine.SalesId == _reqPO._SalesId;
if(localSalesLine)
{
localpurchLine.InventDimId = localSalesLine.InventDimId;
localpurchLine.doUpdate();
}
}
Select forupdate localinventtrans where localinventtrans.InventTransId == localpurchLine.InventTransId
&& localinventtrans.StatusReceipt == StatusReceipt::Ordered
&& localinventtrans.TransRefId == localpurchLine.PurchId;
if(localinventtrans)
{
localinventtrans.inventDimId = localpurchLine.InventDimId;
localinventtrans.doUpdate();
}
ttscommit;
//New Code---> End
Now if i check the inventory on hand transaction, it is coming as per below screenshot. Plz let me know how to proceed.......
It is taking as per standard (first line) and as per customization (third line)....... Plz Help...........