use of org.mifos.application.accounting.business.FinancialYearBO in project head by mifos.
the class AccountingDaoHibernate method findLastProcessingDateFirstTime.
@Override
public String findLastProcessingDateFirstTime(String namedQueryString) {
String lastProcessingDate = null;
Query query = createdNamedQuery(namedQueryString);
List<FinancialYearBO> list = query.list();
if (list.size() > 0) {
FinancialYearBO bo = list.get(0);
lastProcessingDate = DateUtils.format(bo.getFinancialYearStartDate());
}
return lastProcessingDate;
}
use of org.mifos.application.accounting.business.FinancialYearBO in project head by mifos.
the class AccountingServiceFacadeWebTier method processingFinancialYear.
public FinancialYearBO processingFinancialYear(UserContext userContext, FinancialYearBO oldFinancialYearBO) {
FinancialYearBO newFinancialYearBO = null;
oldFinancialYearBO.setStatus(SimpleAccountingConstants.INACTIVE);
newFinancialYearBO = updateFinancialYear(oldFinancialYearBO, userContext);
return newFinancialYearBO;
}
use of org.mifos.application.accounting.business.FinancialYearBO in project head by mifos.
the class AccountingServiceFacadeWebTier method getResultantGlBalancesBOForAccountingTransactions.
public GlBalancesBO getResultantGlBalancesBOForAccountingTransactions(GlBalancesBO fromDatabase, BigDecimal amount, String action) {
FinancialYearBO financialYearBO = getFinancialYear();
fromDatabase.setFinancialYearBO(financialYearBO);
if (action.equals("debit"))
fromDatabase.setTransactionDebitSum(fromDatabase.getTransactionDebitSum().add(amount));
else if (action.equals("credit"))
fromDatabase.setTransactionCreditSum(fromDatabase.getTransactionCreditSum().add(amount));
BigDecimal result = fromDatabase.getTransactionDebitSum().subtract(fromDatabase.getTransactionCreditSum());
fromDatabase.setClosingBalance((fromDatabase.getOpeningBalance().add(result)));
return fromDatabase;
}
use of org.mifos.application.accounting.business.FinancialYearBO in project head by mifos.
the class OpenBalanceAction method load.
public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
OpenBalanceActionForm actionForm = (OpenBalanceActionForm) form;
FinancialYearBO financialYearBO = accountingServiceFacade.getFinancialYear();
actionForm.setFinancialYear(DateUtils.format(financialYearBO.getFinancialYearStartDate()) + "-" + DateUtils.format(financialYearBO.getFinancialYearEndDate()));
actionForm.setFinancialYearId(new Integer(financialYearBO.getFinancialYearId()).toString());
List<GLCodeDto> accountingDtos = accountingServiceFacade.findTotalGlAccounts();
storingSession(request, "TotalGlCodes", accountingDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
Aggregations