IDEMPIERE-1316 Do not perform average, lifo and fifo costing recalculation for Non Stock Item.
This commit is contained in:
parent
9ee817ca32
commit
97663971b5
|
@ -853,6 +853,11 @@ public class MCostDetail extends X_M_CostDetail
|
|||
for (int i = 0; i < ces.length; i++)
|
||||
{
|
||||
MCostElement ce = ces[i];
|
||||
if (ce.isAverageInvoice() || ce.isAveragePO() || ce.isLifo() || ce.isFifo())
|
||||
{
|
||||
if (!product.isStocked())
|
||||
continue;
|
||||
}
|
||||
ok = process (as, product, ce, Org_ID, M_ASI_ID);
|
||||
if (!ok)
|
||||
break;
|
||||
|
@ -866,6 +871,11 @@ public class MCostDetail extends X_M_CostDetail
|
|||
MCostElement[] ces = MCostElement.getCostingMethods(this);
|
||||
for (MCostElement costingElement : ces)
|
||||
{
|
||||
if (costingElement.isAverageInvoice() || costingElement.isAveragePO() || costingElement.isLifo() || costingElement.isFifo())
|
||||
{
|
||||
if (!product.isStocked())
|
||||
continue;
|
||||
}
|
||||
ok = process (as, product, costingElement, Org_ID, M_ASI_ID);
|
||||
if (!ok)
|
||||
break;
|
||||
|
@ -873,8 +883,16 @@ public class MCostDetail extends X_M_CostDetail
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ce.isAverageInvoice() || ce.isAveragePO() || ce.isLifo() || ce.isFifo())
|
||||
{
|
||||
if (product.isStocked())
|
||||
ok = process (as, product, ce, Org_ID, M_ASI_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = process (as, product, ce, Org_ID, M_ASI_ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save it
|
||||
|
|
Loading…
Reference in New Issue