Search in sources :

Example 1 with IndividualLoanImpl

use of org.mifos.clientportfolio.newloan.domain.IndividualLoanImpl in project head by mifos.

the class IndividualLoanAssembler method assembleFrom.

@Override
public IndividualLoan assembleFrom(IndividualLoanRequest individualLoan) {
    LoanOfferingBO loanProduct = this.loanProductDao.findBySystemId(individualLoan.getLoanProductId().globalIdentity());
    ClientBO client = this.customerDao.findClientBySystemId(individualLoan.getClientId().globalIdentity());
    int occurences = 12;
    DateTime lastScheduledDate = new DateTime();
    ScheduledEvent scheduledEvent = scheduledEventFactory.createScheduledEventFrom(loanProduct.getLoanOfferingMeetingValue());
    List<DateTime> loanScheduleDates = scheduledDateGeneration.generateScheduledDates(occurences, lastScheduledDate, scheduledEvent, false);
    // FIXME - assemble loanAmount from dto
    Money loanAmount = null;
    Double interestRate = Double.valueOf("10.0");
    Integer interestDays = Integer.valueOf(AccountingRules.getNumberOfInterestDays());
    return new IndividualLoanImpl();
}
Also used : IndividualLoanImpl(org.mifos.clientportfolio.newloan.domain.IndividualLoanImpl) ScheduledEvent(org.mifos.schedule.ScheduledEvent) Money(org.mifos.framework.util.helpers.Money) ClientBO(org.mifos.customers.client.business.ClientBO) LoanOfferingBO(org.mifos.accounts.productdefinition.business.LoanOfferingBO) DateTime(org.joda.time.DateTime)

Aggregations

DateTime (org.joda.time.DateTime)1 LoanOfferingBO (org.mifos.accounts.productdefinition.business.LoanOfferingBO)1 IndividualLoanImpl (org.mifos.clientportfolio.newloan.domain.IndividualLoanImpl)1 ClientBO (org.mifos.customers.client.business.ClientBO)1 Money (org.mifos.framework.util.helpers.Money)1 ScheduledEvent (org.mifos.schedule.ScheduledEvent)1