Ejemplo n.º 1
0
 protected void validateForFeeRecurrence(HttpServletRequest request, ActionErrors errors)
     throws ApplicationException {
   MeetingBO meeting = getCustomerMeeting(request);
   if (meeting != null) {
     List<FeeView> feeList = getDefaultFees();
     for (FeeView fee : feeList) {
       if (!fee.isRemoved() && fee.isPeriodic() && !isFrequencyMatches(fee, meeting)) {
         errors.add(
             CustomerConstants.ERRORS_FEE_FREQUENCY_MISMATCH,
             new ActionMessage(CustomerConstants.ERRORS_FEE_FREQUENCY_MISMATCH));
         return;
       }
     }
     List<FeeView> additionalFeeList =
         (List<FeeView>)
             SessionUtils.getAttribute(CustomerConstants.ADDITIONAL_FEES_LIST, request);
     for (FeeView selectedFee : getAdditionalFees()) {
       for (FeeView fee : additionalFeeList) {
         if (selectedFee.getFeeIdValue() != null
             && selectedFee.getFeeId().equals(fee.getFeeId())) {
           if (fee.isPeriodic() && !isFrequencyMatches(fee, meeting)) {
             errors.add(
                 CustomerConstants.ERRORS_FEE_FREQUENCY_MISMATCH,
                 new ActionMessage(CustomerConstants.ERRORS_FEE_FREQUENCY_MISMATCH));
             return;
           }
         }
       }
     }
   }
 }
Ejemplo n.º 2
0
 private boolean isSelectedFeePeriodic(FeeView selectedFee, List<FeeView> additionalFeeList) {
   for (FeeView fee : additionalFeeList) {
     if (fee.getFeeId().equals(selectedFee.getFeeId())) {
       return fee.isPeriodic();
     }
   }
   return false;
 }