Search in sources :

Example 66 with LoanOfferingBO

use of org.mifos.accounts.productdefinition.business.LoanOfferingBO in project head by mifos.

the class CustActionStrutsTest method getLoanAccount.

private LoanBO getLoanAccount(CustomerBO customerBO, String offeringName, String shortName) {
    Date startDate = new Date(System.currentTimeMillis());
    LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(this.getClass().getSimpleName() + offeringName, shortName, startDate, meeting);
    return TestObjectFactory.createLoanAccount("42423142341", customerBO, AccountState.LOAN_APPROVED, startDate, loanOffering);
}
Also used : LoanOfferingBO(org.mifos.accounts.productdefinition.business.LoanOfferingBO) Date(java.util.Date)

Example 67 with LoanOfferingBO

use of org.mifos.accounts.productdefinition.business.LoanOfferingBO in project head by mifos.

the class GroupBusinessServiceIntegrationTest method getLoanAccount.

private LoanBO getLoanAccount(CustomerBO customerBO) {
    Date startDate = new Date(System.currentTimeMillis());
    LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(startDate, meeting);
    return TestObjectFactory.createLoanAccount("42423142341", customerBO, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
}
Also used : LoanOfferingBO(org.mifos.accounts.productdefinition.business.LoanOfferingBO) Date(java.sql.Date)

Example 68 with LoanOfferingBO

use of org.mifos.accounts.productdefinition.business.LoanOfferingBO in project head by mifos.

the class CustomerPersistenceIntegrationTest method getLoanAccount.

private LoanBO getLoanAccount() {
    Date startDate = new Date(System.currentTimeMillis());
    MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getNewMeetingForToday(WEEKLY, EVERY_WEEK, CUSTOMER_MEETING));
    center = TestObjectFactory.createWeeklyFeeCenter("Center", meeting);
    group = TestObjectFactory.createWeeklyFeeGroupUnderCenter("Group", CustomerStatus.GROUP_ACTIVE, center);
    LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(startDate, meeting);
    return TestObjectFactory.createLoanAccount("42423142341", group, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
}
Also used : MeetingBO(org.mifos.application.meeting.business.MeetingBO) LoanOfferingBO(org.mifos.accounts.productdefinition.business.LoanOfferingBO) Date(java.sql.Date) LocalDate(org.joda.time.LocalDate)

Example 69 with LoanOfferingBO

use of org.mifos.accounts.productdefinition.business.LoanOfferingBO in project head by mifos.

the class CustomerPersistenceIntegrationTest method getLoanAccount.

private AccountBO getLoanAccount(final CustomerBO group, final MeetingBO meeting, final String offeringName, final String shortName, MifosCurrency currency) {
    Date startDate = new Date(System.currentTimeMillis());
    LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(offeringName, shortName, startDate, meeting, currency);
    return TestObjectFactory.createLoanAccount("42423142341", group, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
}
Also used : LoanOfferingBO(org.mifos.accounts.productdefinition.business.LoanOfferingBO) Date(java.sql.Date) LocalDate(org.joda.time.LocalDate)

Example 70 with LoanOfferingBO

use of org.mifos.accounts.productdefinition.business.LoanOfferingBO in project head by mifos.

the class PortfolioAtRiskHelperIntegrationTest method createInitialObject.

private void createInitialObject() {
    Date startDate = new Date(System.currentTimeMillis());
    MeetingBO meeting = TestObjectFactory.createMeeting(TestObjectFactory.getTypicalMeeting());
    center = TestObjectFactory.createWeeklyFeeCenter(this.getClass().getSimpleName() + " Center", meeting);
    group = TestObjectFactory.createWeeklyFeeGroupUnderCenter(this.getClass().getSimpleName() + " Group", CustomerStatus.GROUP_ACTIVE, center);
    client = TestObjectFactory.createClient(this.getClass().getSimpleName() + " Client", CustomerStatus.CLIENT_ACTIVE, group);
    LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering(this.getClass().getSimpleName() + " Loan", "LOAN", startDate, meeting);
    account1 = TestObjectFactory.createLoanAccount("42423142341", group, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
    loanOffering = TestObjectFactory.createLoanOffering(this.getClass().getSimpleName() + " Loan123", "LOAP", ApplicableTo.CLIENTS, startDate, PrdStatus.LOAN_ACTIVE, 300.0, 1.2, 3, InterestType.FLAT, meeting);
    account2 = TestObjectFactory.createLoanAccount("42427777341", client, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING, startDate, loanOffering);
}
Also used : MeetingBO(org.mifos.application.meeting.business.MeetingBO) LoanOfferingBO(org.mifos.accounts.productdefinition.business.LoanOfferingBO) Date(java.util.Date)

Aggregations

LoanOfferingBO (org.mifos.accounts.productdefinition.business.LoanOfferingBO)135 MeetingBO (org.mifos.application.meeting.business.MeetingBO)44 Date (java.util.Date)37 Test (org.junit.Test)37 ArrayList (java.util.ArrayList)26 Date (java.sql.Date)21 LoanBO (org.mifos.accounts.loan.business.LoanBO)18 LocalDate (org.joda.time.LocalDate)17 CustomerBO (org.mifos.customers.business.CustomerBO)12 LoanProductBuilder (org.mifos.domain.builders.LoanProductBuilder)11 UserContext (org.mifos.security.util.UserContext)9 ClientBuilder (org.mifos.domain.builders.ClientBuilder)8 Money (org.mifos.framework.util.helpers.Money)8 MifosUser (org.mifos.security.MifosUser)8 BusinessRuleException (org.mifos.service.BusinessRuleException)8 ProductCategoryBO (org.mifos.accounts.productdefinition.business.ProductCategoryBO)7 MifosRuntimeException (org.mifos.core.MifosRuntimeException)7 BigDecimal (java.math.BigDecimal)6 AccountException (org.mifos.accounts.exceptions.AccountException)6 FeeBO (org.mifos.accounts.fees.business.FeeBO)6