use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class VoucherBranchMappingAction method getGlDetailBOList.
List<GlDetailBO> getGlDetailBOList(VoucherBranchMappingActionForm actionForm, List<String> amountActionList) {
List<GlDetailBO> glDetailBOList = new ArrayList<GlDetailBO>();
String[] amounts = actionForm.getAmount();
String[] transactionnotes = actionForm.getTransactionnotes();
String[] coanames = actionForm.getCoaname();
List<CoaNamesDto> coaNamesDtolist = new ArrayList<CoaNamesDto>();
for (int i = 0; i < actionForm.getAmount().length; i++) {
CoaNamesDto coanamesob = new CoaNamesDto();
coanamesob.setAmount(amounts[i]);
coanamesob.setTrxnnotes(transactionnotes[i]);
coanamesob.setCoaName(coanames[i]);
coaNamesDtolist.add(coanamesob);
}
for (CoaNamesDto namesdto : coaNamesDtolist) {
List<CoaNamesDto> subaccounthead = accountingServiceFacade.loadCoaNamesWithGlcodeValues(namesdto.getCoaName());
for (CoaNamesDto subaccount : subaccounthead) {
double amount = Double.parseDouble(namesdto.getAmount());
if (amount > 0) {
glDetailBOList.add(new GlDetailBO(subaccount.getGlcodeValue(), new BigDecimal(namesdto.getAmount()), amountActionList.get(1), actionForm.getChequeNo(), DateUtils.getDate(actionForm.getChequeDate()), actionForm.getBankName(), actionForm.getBankBranch(), namesdto.getTrxnnotes()));
}
}
}
return glDetailBOList;
}
use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class InterOfficeTransferAction method getGlDetailBOList.
List<GlDetailBO> getGlDetailBOList(InterOfficeTransferActionForm actionForm, List<String> amountActionList) {
List<GlDetailBO> glDetailBOList = new ArrayList<GlDetailBO>();
glDetailBOList.add(new GlDetailBO("11301", new BigDecimal(actionForm.getAmount()), amountActionList.get(1), null, null, null, null, null));
return glDetailBOList;
}
use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class JournalVoucherAction method getGlDetailBOList.
List<GlDetailBO> getGlDetailBOList(JournalVoucherActionForm actionForm, List<String> amountActionList) {
List<GlDetailBO> glDetailBOList = new ArrayList<GlDetailBO>();
glDetailBOList.add(new GlDetailBO(actionForm.getCreditAccountHead(), new BigDecimal(actionForm.getAmount()), amountActionList.get(1), null, null, null, null, actionForm.getVoucherNotes()));
return glDetailBOList;
}
use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class JournalVoucherAction method insertionSaveAndStage.
public void insertionSaveAndStage(JournalVoucherActionForm actionForm, HttpServletRequest request, int stage) {
List<String> amountActionList = getAmountAction(actionForm);
List<GlDetailBO> glDetailBOList = getGlDetailBOList(actionForm, amountActionList);
//
GlMasterBO glMasterBO = new GlMasterBO();
glMasterBO.setTransactionDate(DateUtils.getDate(actionForm.getVoucherDate()));
glMasterBO.setTransactionType(actionForm.getTrxnType());
glMasterBO.setFromOfficeLevel(new Integer(actionForm.getOfficeHierarchy()));
glMasterBO.setFromOfficeId(actionForm.getOffice());
glMasterBO.setToOfficeLevel(new Integer(actionForm.getOfficeHierarchy()));
glMasterBO.setToOfficeId(actionForm.getOffice());
glMasterBO.setMainAccount(actionForm.getDebitAccountHead());
glMasterBO.setTransactionAmount(new BigDecimal(actionForm.getAmount()));
glMasterBO.setAmountAction(amountActionList.get(0));
glMasterBO.setTransactionNarration(actionForm.getVoucherNotes());
glMasterBO.setGlDetailBOList(glDetailBOList);
glMasterBO.setStatus("");
glMasterBO.setStage(stage);
glMasterBO.setTransactionBy(0);
glMasterBO.setCreatedBy(getUserContext(request).getId());
glMasterBO.setCreatedDate(DateUtils.getCurrentDateWithoutTimeStamp());
if (stage == 0) {
accountingServiceFacade.savingStageAccountingTransactions(glMasterBO);
} else {
accountingServiceFacade.savingAccountingTransactions(glMasterBO);
}
}
use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class ViewStageTransactionAction method getGlDetailBOList.
List<GlDetailBO> getGlDetailBOList(ViewStageTransactionActionForm actionForm, List<String> amountActionList, int transactionDetailID) {
List<GlDetailBO> glDetailBOList = new ArrayList<GlDetailBO>();
glDetailBOList.add(new GlDetailBO(transactionDetailID, actionForm.getStageAccountHead(), new BigDecimal(actionForm.getStageAmount()), amountActionList.get(1), actionForm.getStageChequeNo(), DateUtils.getDate(actionForm.getChequeDate()), actionForm.getStageBankName(), actionForm.getStageankBranch()));
return glDetailBOList;
}
Aggregations