Search in sources :

Example 21 with AccountStatusChangeHistoryEntity

use of org.mifos.accounts.business.AccountStatusChangeHistoryEntity in project head by mifos.

the class LoanBO method openGroupLoanForAccount.

public static LoanBO openGroupLoanForAccount(LoanBO parentLoan, LoanOfferingBO loanProduct, ClientBO member, MeetingBO repaymentDayMeeting, LoanSchedule loanSchedule, LoanProductOverridenDetail overridenDetail, LoanScheduleConfiguration configuration, InstallmentRange installmentRange, AmountRange loanAmountRange, CreationDetail creationDetail, PersonnelBO createdBy, Boolean groupLoan) {
    AccountState loanState = AccountState.LOAN_PENDING_APPROVAL;
    LoanBO standardLoan = new LoanBO(loanProduct, member, loanState, overridenDetail, repaymentDayMeeting, loanSchedule, configuration, installmentRange, loanAmountRange, creationDetail, AccountTypes.GROUP_LOAN_ACCOUNT);
    standardLoan.setParentAccount(parentLoan);
    standardLoan.addAccountStatusChangeHistory(new AccountStatusChangeHistoryEntity(standardLoan.getAccountState(), standardLoan.getAccountState(), createdBy, standardLoan));
    return standardLoan;
}
Also used : AccountState(org.mifos.accounts.util.helpers.AccountState) AccountStatusChangeHistoryEntity(org.mifos.accounts.business.AccountStatusChangeHistoryEntity)

Aggregations

AccountStatusChangeHistoryEntity (org.mifos.accounts.business.AccountStatusChangeHistoryEntity)21 AccountStateEntity (org.mifos.accounts.business.AccountStateEntity)11 AccountException (org.mifos.accounts.exceptions.AccountException)8 PersistenceException (org.mifos.framework.exceptions.PersistenceException)7 Money (org.mifos.framework.util.helpers.Money)6 PersonnelBO (org.mifos.customers.personnel.business.PersonnelBO)5 AccountPaymentEntity (org.mifos.accounts.business.AccountPaymentEntity)4 ArrayList (java.util.ArrayList)3 Date (java.util.Date)3 LocalDate (org.joda.time.LocalDate)3 Test (org.junit.Test)3 LoanBO (org.mifos.accounts.loan.business.LoanBO)3 AccountState (org.mifos.accounts.util.helpers.AccountState)3 AccountNotesEntity (org.mifos.accounts.business.AccountNotesEntity)2 SavingsBO (org.mifos.accounts.savings.business.SavingsBO)2 InstallmentDate (org.mifos.accounts.util.helpers.InstallmentDate)2 SavingsStatusChangeHistoryDto (org.mifos.dto.domain.SavingsStatusChangeHistoryDto)2 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)2 UserContext (org.mifos.security.util.UserContext)2 BigDecimal (java.math.BigDecimal)1