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++)
|
for (int i = 0; i < ces.length; i++)
|
||||||
{
|
{
|
||||||
MCostElement ce = ces[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);
|
ok = process (as, product, ce, Org_ID, M_ASI_ID);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
break;
|
break;
|
||||||
|
@ -866,6 +871,11 @@ public class MCostDetail extends X_M_CostDetail
|
||||||
MCostElement[] ces = MCostElement.getCostingMethods(this);
|
MCostElement[] ces = MCostElement.getCostingMethods(this);
|
||||||
for (MCostElement costingElement : ces)
|
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);
|
ok = process (as, product, costingElement, Org_ID, M_ASI_ID);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
break;
|
break;
|
||||||
|
@ -873,7 +883,15 @@ public class MCostDetail extends X_M_CostDetail
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok = process (as, product, ce, Org_ID, M_ASI_ID);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue