IDEMPIERE-2161 DiscountSchema works with every CumulativeLevel value / fix broken when DiscountType is FlatPercent

This commit is contained in:
Carlos Ruiz 2015-01-13 10:09:51 -05:00
parent 9e343a0ec4
commit dd61cfc99f
1 changed files with 1 additions and 1 deletions

View File

@ -781,7 +781,7 @@ public class MProductPricing
return;
MDiscountSchema sd = MDiscountSchema.get(Env.getCtx(), M_DiscountSchema_ID); // not correct
if (sd.get_ID() == 0 || MDiscountSchema.CUMULATIVELEVEL_Line.equals(sd.getCumulativeLevel()))
if (sd.get_ID() == 0 || (MDiscountSchema.DISCOUNTTYPE_Breaks.equals(sd.getDiscountType()) && MDiscountSchema.CUMULATIVELEVEL_Line.equals(sd.getCumulativeLevel())))
return;
//
m_discountSchema = true;