use of org.mifos.dto.domain.GLCodeDto in project head by mifos.
the class ViewStageTransactionAction method loadMainAccounts.
public ActionForward loadMainAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
List<GLCodeDto> accountingDtos = null;
if (actionForm.getStageTrxnType().equals("CR") || actionForm.getStageTrxnType().equals("CP")) {
accountingDtos = accountingServiceFacade.mainAccountForCash();
} else if (actionForm.getStageTrxnType().equals("BR") || actionForm.getStageTrxnType().equals("BP")) {
accountingDtos = accountingServiceFacade.mainAccountForBank();
}
storingSession(request, "MainAccountGlCodes", accountingDtos);
return mapping.findForward("load_stage_success");
}
use of org.mifos.dto.domain.GLCodeDto in project head by mifos.
the class VoucherBranchMappingAction method load.
public ActionForward load(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
logger.debug("start Load method of loan Product Action");
VoucherBranchMappingActionForm actionForm = (VoucherBranchMappingActionForm) form;
java.util.Date trxnDate = DateUtils.getCurrentDateWithoutTimeStamp();
//actionForm.setTransactiondate(trxnDate);
List<OfficeGlobalDto> officeDetailsDtos = null;
UserContext context = getUserContext(request);
actionForm.setOfficeLevelId(String.valueOf(context.getOfficeLevelId()));
List<OfficesList> offices = new ArrayList<OfficesList>();
short branches = 5;
officeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(branches);
List<GLCodeDto> accountingDtos = accountingServiceFacade.coaBranchAccountHead();
List<GLCodeDto> coaNameslist = new ArrayList<GLCodeDto>();
storingSession(request, "coaNamesList", coaNameslist);
storingSession(request, "MainAccountGlCodes", null);
actionForm.setBranch("");
actionForm.setTransactiondate("");
storingSession(request, "OfficesOnHierarchy", officeDetailsDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.dto.domain.GLCodeDto in project head by mifos.
the class VoucherBranchMappingAction method loadMainAccounts.
public ActionForward loadMainAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
VoucherBranchMappingActionForm actionForm = (VoucherBranchMappingActionForm) form;
List<GLCodeDto> accountingDtos = null;
if (actionForm.getTransactiontype().equals("CR") || actionForm.getTransactiontype().equals("CP")) {
accountingDtos = accountingServiceFacade.mainAccountForCash();
} else if (actionForm.getTransactiontype().equals("BR") || actionForm.getTransactiontype().equals("BP")) {
accountingDtos = accountingServiceFacade.mainAccountForBank();
}
storingSession(request, "MainAccountGlCodes", accountingDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.dto.domain.GLCodeDto in project head by mifos.
the class VoucherBranchMappingAction method previous.
public ActionForward previous(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
VoucherBranchMappingActionForm actionForm = (VoucherBranchMappingActionForm) form;
String[] coanames = actionForm.getCoaname();
String[] amounts = actionForm.getAmount();
String[] notes = actionForm.getTransactionnotes();
List<GLCodeDto> coaNameslist = null;
int sno = 1;
coaNameslist = new ArrayList<GLCodeDto>();
for (int i = 0; i < coanames.length; i++) {
GLCodeDto GLcodedto = new GLCodeDto();
GLcodedto.setSno(sno);
sno++;
GLcodedto.setCoaName(coanames[i]);
GLcodedto.setTrannotes(notes[i]);
GLcodedto.setAmounts(amounts[i]);
coaNameslist.add(GLcodedto);
}
storingSession(request, "coaNamesList", coaNameslist);
storingSession(request, "VoucherBranchMappingActionForm", actionForm);
return mapping.findForward(ActionForwards.previous_success.toString());
}
use of org.mifos.dto.domain.GLCodeDto in project head by mifos.
the class FeeBO method toDto.
public FeeDto toDto() {
FeeDto feeDto = new FeeDto();
feeDto.setId(Short.toString(this.feeId));
feeDto.setName(this.feeName);
feeDto.setCategoryType(this.categoryType.getName());
feeDto.setFeeStatus(this.feeStatus.toDto());
feeDto.setActive(isActive());
feeDto.setCustomerDefaultFee(this.isCustomerDefaultFee());
feeDto.setRateBasedFee(this instanceof RateFeeBO);
feeDto.setChangeType(this.changeType);
FeeFrequencyDto feeFrequencyDto = this.feeFrequency.toDto();
feeDto.setFeeFrequency(feeFrequencyDto);
GLCodeDto glCodeDto = this.glCode.toDto();
feeDto.setGlCodeDto(glCodeDto);
feeDto.setGlCode(glCodeDto.getGlcode());
feeDto.setOneTime(isOneTime());
feeDto.setPeriodic(isPeriodic());
feeDto.setTimeOfDisbursement(isTimeOfDisbursement());
if (this instanceof AmountFeeBO) {
Money amount = ((AmountFeeBO) this).getFeeAmount();
feeDto.setCurrencyId(amount.getCurrency().getCurrencyId().intValue());
feeDto.setAmount(amount.toString(AccountingRules.getDigitsAfterDecimal()));
feeDto.setRateBasedFee(false);
} else {
RateFeeBO rateFeeBo = (RateFeeBO) this;
feeDto.setRate(rateFeeBo.getRate());
feeDto.setFeeFormula(rateFeeBo.getFeeFormula().toDto());
feeDto.setRateBasedFee(true);
}
return feeDto;
}
Aggregations