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");
}
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");
}
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");
}
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;
}
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());
}
Aggregations