}
if (foundMatch) {
//So far, we've found a potential match
//Now, determine if this is a percentage or actual amount
FulfillmentBandResultAmountType resultAmountType = band.getResultAmountType();
BigDecimal bandFulfillmentPrice = null;
if (FulfillmentBandResultAmountType.RATE.equals(resultAmountType)) {
bandFulfillmentPrice = band.getResultAmount();
} else if (FulfillmentBandResultAmountType.PERCENTAGE.equals(resultAmountType)) {
//Since this is a percentage, we calculate the result amount based on retailTotal and the band percentage
bandFulfillmentPrice = retailTotal.multiply(band.getResultAmount());
} else {
LOG.warn("Unknown FulfillmentBandResultAmountType: " + resultAmountType.getType() + " Should be RATE or PERCENTAGE. Ignoring.");
}
if (bandFulfillmentPrice != null) {
//haven't initialized the lowest price yet so just take on this one