Search in sources :

Example 1 with GLCodeDto

use of org.mifos.dto.domain.GLCodeDto in project head by mifos.

the class ApproveTransactions 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 2 with GLCodeDto

use of org.mifos.dto.domain.GLCodeDto in project head by mifos.

the class AuditTransactionAction 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 3 with GLCodeDto

use of org.mifos.dto.domain.GLCodeDto in project head by mifos.

the class AuditTransactionAction method loadAccountHeads.

public ActionForward loadAccountHeads(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    List<GLCodeDto> accountingDtos = null;
    accountingDtos = accountingServiceFacade.accountHead(actionForm.getStageMainAccount());
    storingSession(request, "AccountHeadGlCodes", accountingDtos);
    return mapping.findForward("load_stage_success");
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Example 4 with GLCodeDto

use of org.mifos.dto.domain.GLCodeDto in project head by mifos.

the class MultipleGeneralLedgerAction method getGlDetailBOList.

List<GlDetailBO> getGlDetailBOList(MultipleGeneralLedgerActionForm actionForm, List<String> amountActionList) {
    List<GlDetailBO> glDetailBOList = new ArrayList<GlDetailBO>();
    String[] amounts = actionForm.getAmount1();
    String[] trannotes = actionForm.getNotes1();
    String[] accountHeads = actionForm.getAccountHead1();
    List<GLCodeDto> gLCodeDtolist = new ArrayList<GLCodeDto>();
    for (int i = 0; i < amounts.length; i++) {
        GLCodeDto gLCodeDto = new GLCodeDto();
        gLCodeDto.setAmounts(amounts[i]);
        gLCodeDto.setTrannotes(trannotes[i]);
        if (amounts.length <= accountHeads.length) {
            gLCodeDto.setAccountHead(accountHeads[i]);
        }
        gLCodeDtolist.add(gLCodeDto);
    }
    for (GLCodeDto glCodeDto : gLCodeDtolist) {
        if (glCodeDto.getAccountHead() != null) {
            List<CoaNamesDto> subaccounthead = accountingServiceFacade.loadCoaNamesWithGlcodeValues(glCodeDto.getAccountHead());
            for (CoaNamesDto subaccount : subaccounthead) {
                double amount = Double.parseDouble(glCodeDto.getAmounts());
                String Accounthead = glCodeDto.getAccountHead();
                if (amount > 0) {
                    glDetailBOList.add(new GlDetailBO(subaccount.getGlcodeValue(), new BigDecimal(glCodeDto.getAmounts()), amountActionList.get(1), actionForm.getChequeNo(), DateUtils.getDate(actionForm.getChequeDate()), actionForm.getBankName(), actionForm.getBankBranch(), glCodeDto.getTrannotes()));
                }
            }
        }
    }
    return glDetailBOList;
}
Also used : CoaNamesDto(org.mifos.dto.domain.CoaNamesDto) GLCodeDto(org.mifos.dto.domain.GLCodeDto) ArrayList(java.util.ArrayList) BigDecimal(java.math.BigDecimal) GlDetailBO(org.mifos.application.accounting.business.GlDetailBO)

Example 5 with GLCodeDto

use of org.mifos.dto.domain.GLCodeDto in project head by mifos.

the class MultipleGeneralLedgerAction method multipleloadAccountHeads.

public ActionForward multipleloadAccountHeads(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    MultipleGeneralLedgerActionForm actionForm = (MultipleGeneralLedgerActionForm) form;
    List<GLCodeDto> snolist = null;
    List<GLCodeDto> storedList = (List<GLCodeDto>) request.getSession().getAttribute("SNoList");
    if (storedList != null) {
        if (storedList.size() == 1) {
            snolist = new ArrayList<GLCodeDto>();
            String sno = request.getParameter("Sno");
            int serno = Integer.parseInt(sno);
            GLCodeDto gLcodeDto = new GLCodeDto();
            gLcodeDto.setCoaName(actionForm.getAccountHead1()[0]);
            gLcodeDto.setGlcodeId(Short.parseShort(actionForm.getAmount1()[0]));
            gLcodeDto.setSno(serno);
            snolist.add(gLcodeDto);
            GLCodeDto gLcodeDto1 = new GLCodeDto();
            gLcodeDto1.setSno(serno + 1);
            snolist.add(gLcodeDto1);
        } else if (storedList.size() > 1) {
            for (int h = 2; h <= storedList.size(); h++) {
            }
        }
    }
    storingSession(request, "SNoList", snolist);
    //storingSession(request, "AccountHeadGlCodes", accountingDtos);
    return mapping.findForward(ActionForwards.load_success.toString());
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) ArrayList(java.util.ArrayList) OfficesList(org.mifos.dto.domain.OfficesList) List(java.util.List) MultipleGeneralLedgerActionForm(org.mifos.accounting.struts.actionform.MultipleGeneralLedgerActionForm)

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