IDEMPIERE-2174:Cant import physical inventory with Update Cost option

This commit is contained in:
hieplq 2014-09-02 10:15:06 +07:00
parent ef8b4f6434
commit b205ef51bf
1 changed files with 2 additions and 0 deletions

View File

@ -527,6 +527,7 @@ public class ImportInventory extends SvrProcess
costingDoc = new MInventory(getCtx(), 0, get_TrxName());
costingDoc.setC_DocType_ID(p_C_DocType_ID);
costingDoc.setCostingMethod(cost.getM_CostElement().getCostingMethod());
costingDoc.setAD_Org_ID(imp.getAD_Org_ID());
costingDoc.setDocAction(DocAction.ACTION_Complete);
costingDoc.saveEx();
}
@ -537,6 +538,7 @@ public class ImportInventory extends SvrProcess
costingLine.setCurrentCostPrice(cost.getCurrentCostPrice());
costingLine.setNewCostPrice(imp.getCurrentCostPrice());
costingLine.setM_Locator_ID(0);
costingLine.setAD_Org_ID(imp.getAD_Org_ID());
costingLine.saveEx();
imp.setM_CostingLine_ID(costingLine.getM_InventoryLine_ID());