use of org.mifos.dto.screen.AccountTypeCustomerLevelDto in project head by mifos.
the class ApplyChargeAction method cancel.
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward cancel(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
request.removeAttribute(AccountConstants.APPLICABLE_CHARGE_LIST);
ApplyChargeActionForm applyChargeActionForm = (ApplyChargeActionForm) form;
Integer accountId = Integer.valueOf(applyChargeActionForm.getAccountId());
AccountTypeCustomerLevelDto accountTypeCustomerLevel = accountServiceFacade.getAccountTypeCustomerLevelDto(accountId);
return mapping.findForward(getDetailAccountPage(accountTypeCustomerLevel));
}
use of org.mifos.dto.screen.AccountTypeCustomerLevelDto in project head by mifos.
the class ApplyChargeAction method update.
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ApplyChargeActionForm applyChargeActionForm = (ApplyChargeActionForm) form;
Short feeId = Short.valueOf(applyChargeActionForm.getFeeId());
Double chargeAmount = 0.0;
AccountBO account = new AccountBusinessService().getAccount(Integer.valueOf(applyChargeActionForm.getAccountId()));
if (!(account instanceof CustomerAccountBO) && null == ((LoanBO) account).getParentAccount() && account.isGroupLoanAccount()) {
this.accountServiceFacade.applyGroupCharge(applyChargeActionForm.getIndividualValues(), feeId, applyChargeActionForm.isPenaltyType());
} else {
chargeAmount = getDoubleValue(request.getParameter("charge"));
this.accountServiceFacade.applyCharge(account.getAccountId(), feeId, chargeAmount, applyChargeActionForm.isPenaltyType());
}
AccountTypeCustomerLevelDto accountTypeCustomerLevel = accountServiceFacade.getAccountTypeCustomerLevelDto(account.getAccountId());
return mapping.findForward(getDetailAccountPage(accountTypeCustomerLevel));
}
Aggregations