use of org.mifos.accounts.loan.business.LoanActivityEntity in project head by mifos.
the class GroupLoanAccountServiceFacadeWebTier method getRecentActivityView.
private List<LoanActivityDto> getRecentActivityView(final String globalAccountNumber) {
LoanBO loanBO = loanDao.findByGlobalAccountNum(globalAccountNumber);
List<LoanActivityEntity> loanAccountActivityDetails = loanBO.getLoanActivityDetails();
List<LoanActivityDto> recentActivityView = new ArrayList<LoanActivityDto>();
int count = 0;
for (LoanActivityEntity loanActivity : loanAccountActivityDetails) {
recentActivityView.add(getLoanActivityView(loanActivity));
if (++count == 3) {
break;
}
}
return recentActivityView;
}
use of org.mifos.accounts.loan.business.LoanActivityEntity in project head by mifos.
the class LoanRepayTagIntegrationTest method getLoanAccount.
private LoanBO getLoanAccount(AccountState state, Date startDate, int disbursalType) {
MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getTypicalMeeting());
center = TestObjectFactory.createWeeklyFeeCenter("Center", meeting);
group = TestObjectFactory.createWeeklyFeeGroupUnderCenter("Group", CustomerStatus.GROUP_ACTIVE, center);
client = TestObjectFactory.createClient("Client", CustomerStatus.CLIENT_ACTIVE, group);
LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(startDate, meeting);
accountBO = TestObjectFactory.createLoanAccountWithDisbursement("99999999999", group, state, startDate, loanOffering, disbursalType);
LoanActivityEntity loanActivity = new LoanActivityEntity(accountBO, TestObjectFactory.getPersonnel(userContext.getId()), "testing", new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), startDate);
accountBO.addLoanActivity(loanActivity);
TestObjectFactory.updateObject(accountBO);
return accountBO;
}
use of org.mifos.accounts.loan.business.LoanActivityEntity in project head by mifos.
the class LoanAccountActionStrutsTest method getLoanAccount.
private AccountBO getLoanAccount(AccountState state, Date startDate, int disbursalType) {
LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(startDate, meeting);
accountBO = TestObjectFactory.createLoanAccountWithDisbursement("99999999999", group, state, startDate, loanOffering, disbursalType);
LoanActivityEntity loanActivity = new LoanActivityEntity(accountBO, TestObjectFactory.getPersonnel(userContext.getId()), "testing", new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), new Money(getCurrency(), "100"), startDate);
((LoanBO) accountBO).addLoanActivity(loanActivity);
addNotes();
TestObjectFactory.updateObject(accountBO);
return accountBO;
}
use of org.mifos.accounts.loan.business.LoanActivityEntity in project head by mifos.
the class LoanAccountServiceFacadeWebTier method getRecentActivityView.
private List<LoanActivityDto> getRecentActivityView(final String globalAccountNumber) {
LoanBO loanBO = loanDao.findByGlobalAccountNum(globalAccountNumber);
List<LoanActivityEntity> loanAccountActivityDetails = loanBO.getLoanActivityDetails();
List<LoanActivityDto> recentActivityView = new ArrayList<LoanActivityDto>();
int count = 0;
for (LoanActivityEntity loanActivity : loanAccountActivityDetails) {
recentActivityView.add(getLoanActivityView(loanActivity));
if (++count == 3) {
break;
}
}
return recentActivityView;
}
use of org.mifos.accounts.loan.business.LoanActivityEntity in project head by mifos.
the class LoanAccountServiceFacadeWebTier method retrieveAllLoanAccountActivities.
@Override
public List<LoanActivityDto> retrieveAllLoanAccountActivities(String globalAccountNum) {
LoanBO loan = this.loanDao.findByGlobalAccountNum(globalAccountNum);
List<LoanActivityEntity> loanAccountActivityDetails = loan.getLoanActivityDetails();
List<LoanActivityDto> loanActivityViewSet = new ArrayList<LoanActivityDto>();
for (LoanActivityEntity loanActivity : loanAccountActivityDetails) {
loanActivityViewSet.add(loanActivity.toDto());
}
return loanActivityViewSet;
}
Aggregations