1003759 How to re-post a document if Charge type is changed in Product? ( related to IDEMPIERE-216 Average Costing: Zero Costing Item From Vendor but for standard costing ).

This commit is contained in:
Heng Sin Low 2014-02-26 15:01:52 +08:00
parent a1332d890a
commit 38f64d4f54
1 changed files with 11 additions and 3 deletions

View File

@ -295,9 +295,17 @@ public class Doc_MatchPO extends Doc
// No Costs yet - no PPV
if (costs == null || costs.signum() == 0)
{
p_Error = "Resubmit - No Costs for " + product.getName();
log.log(Level.SEVERE, p_Error);
return null;
//ok if purchase price is zero too
if (m_oLine.getPriceActual().signum() == 0)
{
costs = BigDecimal.ZERO;
}
else
{
p_Error = "Resubmit - No Costs for " + product.getName();
log.log(Level.SEVERE, p_Error);
return null;
}
}
// Difference