Search in sources :

Example 16 with GLCodeDto

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");
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Example 17 with GLCodeDto

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());
}
Also used : OfficeGlobalDto(org.mifos.dto.domain.OfficeGlobalDto) GLCodeDto(org.mifos.dto.domain.GLCodeDto) OfficesList(org.mifos.dto.domain.OfficesList) Date(java.util.Date) UserContext(org.mifos.security.util.UserContext) ArrayList(java.util.ArrayList) VoucherBranchMappingActionForm(org.mifos.accounting.struts.actionform.VoucherBranchMappingActionForm)

Example 18 with GLCodeDto

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());
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) VoucherBranchMappingActionForm(org.mifos.accounting.struts.actionform.VoucherBranchMappingActionForm)

Example 19 with GLCodeDto

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());
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) VoucherBranchMappingActionForm(org.mifos.accounting.struts.actionform.VoucherBranchMappingActionForm)

Example 20 with GLCodeDto

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;
}
Also used : FeeFrequencyDto(org.mifos.dto.domain.FeeFrequencyDto) Money(org.mifos.framework.util.helpers.Money) GLCodeDto(org.mifos.dto.domain.GLCodeDto) FeeDto(org.mifos.dto.domain.FeeDto)

Aggregations

GLCodeDto (org.mifos.dto.domain.GLCodeDto)37 ViewStageTransactionActionForm (org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)9 OfficeGlobalDto (org.mifos.dto.domain.OfficeGlobalDto)9 ArrayList (java.util.ArrayList)7 VoucherBranchMappingActionForm (org.mifos.accounting.struts.actionform.VoucherBranchMappingActionForm)5 GlDetailDto (org.mifos.dto.domain.GlDetailDto)5 ViewStageTransactionsDto (org.mifos.dto.domain.ViewStageTransactionsDto)5 MultipleGeneralLedgerActionForm (org.mifos.accounting.struts.actionform.MultipleGeneralLedgerActionForm)4 OfficesList (org.mifos.dto.domain.OfficesList)4 BigDecimal (java.math.BigDecimal)3 ParseException (java.text.ParseException)3 Date (java.util.Date)3 CoaBranchMappingActionForm (org.mifos.accounting.struts.actionform.CoaBranchMappingActionForm)3 GlDetailBO (org.mifos.application.accounting.business.GlDetailBO)3 UserContext (org.mifos.security.util.UserContext)3 LinkedHashMap (java.util.LinkedHashMap)2 List (java.util.List)2 InterOfficeTransferActionForm (org.mifos.accounting.struts.actionform.InterOfficeTransferActionForm)2 JournalVoucherActionForm (org.mifos.accounting.struts.actionform.JournalVoucherActionForm)2 SingleGeneralLedgerActionForm (org.mifos.accounting.struts.actionform.SingleGeneralLedgerActionForm)2