protected void subtractPromotionValue(final Map<String,Object> context,final BigDecimal amount){
  final String promoCode=getPromotionCode(context);
  final Total total=getTotal(context);
  final BigDecimal orderAmountOff;
  if (MoneyUtils.isFirstBiggerThanSecond(amount,total.getSubTotal())) {
    orderAmountOff=total.getSubTotal();
  }
 else {
    orderAmountOff=amount;
  }
  setTotal(context,total.add(new TotalImpl(MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,true,promoCode,orderAmountOff.negate(),MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,false,null,MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO,MoneyUtils.ZERO)));
}

protected void subtractPromotionValue ( final Map < String , Object > context , final BigDecimal amount ) { final String promoCode = getPromotionCode ( context ) ; final Total total = getTotal ( context ) ; final BigDecimal orderAmountOff ; if ( MoneyUtils . isFirstBiggerThanSecond ( amount , total . getSubTotal ( ) ) ) { orderAmountOff = total . getSubTotal ( ) ; } else { orderAmountOff = amount ; } setTotal ( context , total . add ( new TotalImpl ( MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , true , promoCode , orderAmountOff . negate ( ) , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , false , null , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO , MoneyUtils . ZERO ) ) ) ; }
subtract amount from the sub total to reflect promotion being applied .
