Merge pull request #797 from pramodn02/MIFOSX-975
MIFOSX-975 - added Arrears status
This commit is contained in:
@@ -5737,7 +5737,8 @@ GET https://DomainName/mifosng-provider/api/v1/loans
|
|||||||
1
|
1
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"feeChargesAtDisbursementCharged": 0
|
"feeChargesAtDisbursementCharged": 0,
|
||||||
|
"inArrears":false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -24,10 +24,11 @@ public class LoanAccountSummaryData {
|
|||||||
private final EnumOptionData loanType;
|
private final EnumOptionData loanType;
|
||||||
private final Integer loanCycle;
|
private final Integer loanCycle;
|
||||||
private final LoanApplicationTimelineData timeline;
|
private final LoanApplicationTimelineData timeline;
|
||||||
|
private final Boolean inArrears;
|
||||||
|
|
||||||
public LoanAccountSummaryData(final Long id, final String accountNo, final String externalId, final Long productId,
|
public LoanAccountSummaryData(final Long id, final String accountNo, final String externalId, final Long productId,
|
||||||
final String loanProductName, final LoanStatusEnumData loanStatus, final EnumOptionData loanType, final Integer loanCycle,
|
final String loanProductName, final LoanStatusEnumData loanStatus, final EnumOptionData loanType, final Integer loanCycle,
|
||||||
final LoanApplicationTimelineData timeline) {
|
final LoanApplicationTimelineData timeline, final Boolean inArrears) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.accountNo = accountNo;
|
this.accountNo = accountNo;
|
||||||
this.externalId = externalId;
|
this.externalId = externalId;
|
||||||
@@ -37,5 +38,6 @@ public class LoanAccountSummaryData {
|
|||||||
this.loanType = loanType;
|
this.loanType = loanType;
|
||||||
this.loanCycle = loanCycle;
|
this.loanCycle = loanCycle;
|
||||||
this.timeline = timeline;
|
this.timeline = timeline;
|
||||||
|
this.inArrears = inArrears;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+10
-2
@@ -251,6 +251,7 @@ public class AccountDetailsReadPlatformServiceJpaRepositoryImpl implements Accou
|
|||||||
|
|
||||||
.append(" l.closedon_date as closedOnDate,")
|
.append(" l.closedon_date as closedOnDate,")
|
||||||
.append(" cbu.username as closedByUsername, cbu.firstname as closedByFirstname, cbu.lastname as closedByLastname,")
|
.append(" cbu.username as closedByUsername, cbu.firstname as closedByFirstname, cbu.lastname as closedByLastname,")
|
||||||
|
.append(" la.overdue_since_date_derived as overdueSinceDate,")
|
||||||
.append(" l.writtenoffon_date as writtenOffOnDate, l.expected_maturedon_date as expectedMaturityDate")
|
.append(" l.writtenoffon_date as writtenOffOnDate, l.expected_maturedon_date as expectedMaturityDate")
|
||||||
|
|
||||||
.append(" from m_loan l ").append("LEFT JOIN m_product_loan AS lp ON lp.id = l.product_id")
|
.append(" from m_loan l ").append("LEFT JOIN m_product_loan AS lp ON lp.id = l.product_id")
|
||||||
@@ -259,7 +260,8 @@ public class AccountDetailsReadPlatformServiceJpaRepositoryImpl implements Accou
|
|||||||
.append(" left join m_appuser wbu on wbu.id = l.withdrawnon_userid")
|
.append(" left join m_appuser wbu on wbu.id = l.withdrawnon_userid")
|
||||||
.append(" left join m_appuser abu on abu.id = l.approvedon_userid")
|
.append(" left join m_appuser abu on abu.id = l.approvedon_userid")
|
||||||
.append(" left join m_appuser dbu on dbu.id = l.disbursedon_userid")
|
.append(" left join m_appuser dbu on dbu.id = l.disbursedon_userid")
|
||||||
.append(" left join m_appuser cbu on cbu.id = l.closedon_userid");
|
.append(" left join m_appuser cbu on cbu.id = l.closedon_userid")
|
||||||
|
.append(" left join m_loan_arrears_aging la on la.loan_id = l.id");
|
||||||
|
|
||||||
return accountsSummary.toString();
|
return accountsSummary.toString();
|
||||||
}
|
}
|
||||||
@@ -313,6 +315,12 @@ public class AccountDetailsReadPlatformServiceJpaRepositoryImpl implements Accou
|
|||||||
|
|
||||||
final LocalDate expectedMaturityDate = JdbcSupport.getLocalDate(rs, "expectedMaturityDate");
|
final LocalDate expectedMaturityDate = JdbcSupport.getLocalDate(rs, "expectedMaturityDate");
|
||||||
|
|
||||||
|
final LocalDate overdueSinceDate = JdbcSupport.getLocalDate(rs, "overdueSinceDate");
|
||||||
|
Boolean inArrears = true;
|
||||||
|
if (overdueSinceDate == null) {
|
||||||
|
inArrears = false;
|
||||||
|
}
|
||||||
|
|
||||||
final LoanApplicationTimelineData timeline = new LoanApplicationTimelineData(submittedOnDate, submittedByUsername,
|
final LoanApplicationTimelineData timeline = new LoanApplicationTimelineData(submittedOnDate, submittedByUsername,
|
||||||
submittedByFirstname, submittedByLastname, rejectedOnDate, rejectedByUsername, rejectedByFirstname, rejectedByLastname,
|
submittedByFirstname, submittedByLastname, rejectedOnDate, rejectedByUsername, rejectedByFirstname, rejectedByLastname,
|
||||||
withdrawnOnDate, withdrawnByUsername, withdrawnByFirstname, withdrawnByLastname, approvedOnDate, approvedByUsername,
|
withdrawnOnDate, withdrawnByUsername, withdrawnByFirstname, withdrawnByLastname, approvedOnDate, approvedByUsername,
|
||||||
@@ -321,7 +329,7 @@ public class AccountDetailsReadPlatformServiceJpaRepositoryImpl implements Accou
|
|||||||
expectedMaturityDate, writtenOffOnDate, closedByUsername, closedByFirstname, closedByLastname);
|
expectedMaturityDate, writtenOffOnDate, closedByUsername, closedByFirstname, closedByLastname);
|
||||||
|
|
||||||
return new LoanAccountSummaryData(id, accountNo, externalId, productId, loanProductName, loanStatus, loanType, loanCycle,
|
return new LoanAccountSummaryData(id, accountNo, externalId, productId, loanProductName, loanStatus, loanType, loanCycle,
|
||||||
timeline);
|
timeline, inArrears);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
-13
@@ -155,6 +155,8 @@ public class LoanAccountData {
|
|||||||
|
|
||||||
private final Map<Long, LoanBorrowerCycleData> memberVariations;
|
private final Map<Long, LoanBorrowerCycleData> memberVariations;
|
||||||
|
|
||||||
|
private final Boolean inArrears;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to produce a {@link LoanAccountData} with only collateral options
|
* Used to produce a {@link LoanAccountData} with only collateral options
|
||||||
* for now.
|
* for now.
|
||||||
@@ -237,6 +239,7 @@ public class LoanAccountData {
|
|||||||
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
||||||
final Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
final Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
||||||
final LoanProductData product = null;
|
final LoanProductData product = null;
|
||||||
|
final Boolean inArrears = null;
|
||||||
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType, loanProductId,
|
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType, loanProductId,
|
||||||
loanProductName, loanProductDescription, fundId, fundName, loanPurposeId, loanPurposeName, loanOfficerId, loanOfficerName,
|
loanProductName, loanProductDescription, fundId, fundName, loanPurposeId, loanPurposeName, loanOfficerId, loanOfficerName,
|
||||||
currencyData, principal, principal, totalOverpaid, inArrearsTolerance, termFrequency, termPeriodFrequencyType,
|
currencyData, principal, principal, totalOverpaid, inArrearsTolerance, termFrequency, termPeriodFrequencyType,
|
||||||
@@ -250,7 +253,7 @@ public class LoanAccountData {
|
|||||||
chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||||
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||||
disbursementData, multiDisburseLoan, fixedEmiAmount, maxOutstandingLoanBalance, emiAmountVariations, memberVariations,
|
disbursementData, multiDisburseLoan, fixedEmiAmount, maxOutstandingLoanBalance, emiAmountVariations, memberVariations,
|
||||||
product);
|
product, inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -335,6 +338,7 @@ public class LoanAccountData {
|
|||||||
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
||||||
final Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
final Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
||||||
final LoanProductData product = null;
|
final LoanProductData product = null;
|
||||||
|
final Boolean inArrears = null;
|
||||||
|
|
||||||
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType, loanProductId,
|
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType, loanProductId,
|
||||||
loanProductName, loanProductDescription, fundId, fundName, loanPurposeId, loanPurposeName, loanOfficerId, loanOfficerName,
|
loanProductName, loanProductDescription, fundId, fundName, loanPurposeId, loanPurposeName, loanOfficerId, loanOfficerName,
|
||||||
@@ -348,7 +352,7 @@ public class LoanAccountData {
|
|||||||
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
||||||
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
||||||
notes, accountLinkingOptions, linkedAccount, disbursementData, multiDisburseLoan, fixedEmiAmount,
|
notes, accountLinkingOptions, linkedAccount, disbursementData, multiDisburseLoan, fixedEmiAmount,
|
||||||
maxOutstandingLoanBalance, emiAmountVariations, memberVariations, product);
|
maxOutstandingLoanBalance, emiAmountVariations, memberVariations, product, inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LoanAccountData populateClientDefaults(final LoanAccountData acc, final LoanAccountData clientAcc) {
|
public static LoanAccountData populateClientDefaults(final LoanAccountData acc, final LoanAccountData clientAcc) {
|
||||||
@@ -369,7 +373,7 @@ public class LoanAccountData {
|
|||||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
||||||
acc.emiAmountVariations, acc.memberVariations, acc.product);
|
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -455,6 +459,7 @@ public class LoanAccountData {
|
|||||||
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
||||||
final Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
final Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
||||||
final LoanProductData product = null;
|
final LoanProductData product = null;
|
||||||
|
final Boolean inArrears = null;
|
||||||
|
|
||||||
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType, loanProductId,
|
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType, loanProductId,
|
||||||
loanProductName, loanProductDescription, fundId, fundName, loanPurposeId, loanPurposeName, loanOfficerId, loanOfficerName,
|
loanProductName, loanProductDescription, fundId, fundName, loanPurposeId, loanPurposeName, loanOfficerId, loanOfficerName,
|
||||||
@@ -468,7 +473,7 @@ public class LoanAccountData {
|
|||||||
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
||||||
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
||||||
notes, accountLinkingOptions, linkedAccount, disbursementData, multiDisburseLoan, fixedEmiAmount, maxOutstandingBalance,
|
notes, accountLinkingOptions, linkedAccount, disbursementData, multiDisburseLoan, fixedEmiAmount, maxOutstandingBalance,
|
||||||
emiAmountVariations, memberVariations, product);
|
emiAmountVariations, memberVariations, product, inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LoanAccountData populateGroupDefaults(final LoanAccountData acc, final LoanAccountData groupAcc) {
|
public static LoanAccountData populateGroupDefaults(final LoanAccountData acc, final LoanAccountData groupAcc) {
|
||||||
@@ -488,7 +493,7 @@ public class LoanAccountData {
|
|||||||
acc.chargeOptions, null, acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
acc.chargeOptions, null, acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
||||||
acc.emiAmountVariations, acc.memberVariations, acc.product);
|
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LoanAccountData loanProductWithTemplateDefaults(final LoanProductData product,
|
public static LoanAccountData loanProductWithTemplateDefaults(final LoanProductData product,
|
||||||
@@ -592,6 +597,7 @@ public class LoanAccountData {
|
|||||||
final Integer termFrequency = numberOfRepayments * product.getRepaymentEvery();
|
final Integer termFrequency = numberOfRepayments * product.getRepaymentEvery();
|
||||||
final BigDecimal fixedEmi = null;
|
final BigDecimal fixedEmi = null;
|
||||||
Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
Map<Long, LoanBorrowerCycleData> memberVariations = null;
|
||||||
|
final Boolean inArrears = null;
|
||||||
|
|
||||||
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType,
|
return new LoanAccountData(id, accountNo, status, externalId, clientId, clientName, clientOfficeId, group, loanType,
|
||||||
product.getId(), product.getName(), product.getDescription(), product.getFundId(), product.getFundName(), loanPurposeId,
|
product.getId(), product.getName(), product.getDescription(), product.getFundId(), product.getFundName(), loanPurposeId,
|
||||||
@@ -607,7 +613,7 @@ public class LoanAccountData {
|
|||||||
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
||||||
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
||||||
notes, accountLinkingOptions, linkedAccount, disbursementData, product.getMultiDisburseLoan(), fixedEmi,
|
notes, accountLinkingOptions, linkedAccount, disbursementData, product.getMultiDisburseLoan(), fixedEmi,
|
||||||
product.getOutstandingLoanBalance(), emiAmountVariations, memberVariations, product);
|
product.getOutstandingLoanBalance(), emiAmountVariations, memberVariations, product, inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LoanAccountData populateLoanProductDefaults(final LoanAccountData acc, final LoanProductData product) {
|
public static LoanAccountData populateLoanProductDefaults(final LoanAccountData acc, final LoanProductData product) {
|
||||||
@@ -658,7 +664,7 @@ public class LoanAccountData {
|
|||||||
fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, notes, acc.accountLinkingOptions,
|
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, notes, acc.accountLinkingOptions,
|
||||||
acc.linkedAccount, acc.disbursementDetails, product.getMultiDisburseLoan(), acc.fixedEmiAmount,
|
acc.linkedAccount, acc.disbursementDetails, product.getMultiDisburseLoan(), acc.fixedEmiAmount,
|
||||||
product.getOutstandingLoanBalance(), acc.emiAmountVariations, acc.memberVariations, product);
|
product.getOutstandingLoanBalance(), acc.emiAmountVariations, acc.memberVariations, product, acc.inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -679,7 +685,8 @@ public class LoanAccountData {
|
|||||||
final Integer graceOnInterestCharged, final LocalDate interestChargedFromDate, final LoanApplicationTimelineData timeline,
|
final Integer graceOnInterestCharged, final LocalDate interestChargedFromDate, final LoanApplicationTimelineData timeline,
|
||||||
final LoanSummaryData loanSummary, final BigDecimal feeChargesDueAtDisbursementCharged,
|
final LoanSummaryData loanSummary, final BigDecimal feeChargesDueAtDisbursementCharged,
|
||||||
final Boolean syncDisbursementWithMeeting, final Integer loancounter, final Integer loanProductCounter,
|
final Boolean syncDisbursementWithMeeting, final Integer loancounter, final Integer loanProductCounter,
|
||||||
final Boolean multiDisburseLoan, final BigDecimal fixedEmiAmont, final BigDecimal outstandingLoanBalance) {
|
final Boolean multiDisburseLoan, final BigDecimal fixedEmiAmont, final BigDecimal outstandingLoanBalance,
|
||||||
|
final Boolean inArrears) {
|
||||||
|
|
||||||
final LoanScheduleData repaymentSchedule = null;
|
final LoanScheduleData repaymentSchedule = null;
|
||||||
final Collection<LoanTransactionData> transactions = null;
|
final Collection<LoanTransactionData> transactions = null;
|
||||||
@@ -722,7 +729,7 @@ public class LoanAccountData {
|
|||||||
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions,
|
||||||
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
loanPurposeOptions, loanCollateralOptions, calendarOptions, syncDisbursementWithMeeting, loancounter, loanProductCounter,
|
||||||
notes, accountLinkingOptions, linkedAccount, disbursementData, multiDisburseLoan, fixedEmiAmont, outstandingLoanBalance,
|
notes, accountLinkingOptions, linkedAccount, disbursementData, multiDisburseLoan, fixedEmiAmont, outstandingLoanBalance,
|
||||||
emiAmountVariations, memberVariations, product);
|
emiAmountVariations, memberVariations, product, inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -757,7 +764,7 @@ public class LoanAccountData {
|
|||||||
interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions,
|
interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions,
|
||||||
loanCollateralOptions, calendarOptions, acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, notes,
|
loanCollateralOptions, calendarOptions, acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, notes,
|
||||||
accountLinkingOptions, linkedAccount, disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount,
|
accountLinkingOptions, linkedAccount, disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount,
|
||||||
acc.maxOutstandingLoanBalance, emiAmountVariations, acc.memberVariations, acc.product);
|
acc.maxOutstandingLoanBalance, emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LoanAccountData associationsAndTemplate(final LoanAccountData acc, final Collection<LoanProductData> productOptions,
|
public static LoanAccountData associationsAndTemplate(final LoanAccountData acc, final Collection<LoanProductData> productOptions,
|
||||||
@@ -787,7 +794,7 @@ public class LoanAccountData {
|
|||||||
acc.chargeOptions, null, acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
acc.chargeOptions, null, acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
||||||
acc.emiAmountVariations, acc.memberVariations, acc.product);
|
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LoanAccountData associateMemberVariations(final LoanAccountData acc, final Map<Long, Integer> memberLoanCycle) {
|
public static LoanAccountData associateMemberVariations(final LoanAccountData acc, final Map<Long, Integer> memberLoanCycle) {
|
||||||
@@ -843,7 +850,7 @@ public class LoanAccountData {
|
|||||||
acc.chargeOptions, null, acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
acc.chargeOptions, null, acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.fixedEmiAmount, acc.maxOutstandingLoanBalance,
|
||||||
acc.emiAmountVariations, memberVariations, acc.product);
|
acc.emiAmountVariations, memberVariations, acc.product, acc.inArrears);
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoanAccountData(
|
private LoanAccountData(
|
||||||
@@ -896,7 +903,7 @@ public class LoanAccountData {
|
|||||||
final PortfolioAccountData linkedAccount, final Collection<DisbursementData> disbursementDetails,
|
final PortfolioAccountData linkedAccount, final Collection<DisbursementData> disbursementDetails,
|
||||||
final Boolean multiDisburseLoan, BigDecimal fixedEmiAmount, final BigDecimal maxOutstandingLoanBalance,
|
final Boolean multiDisburseLoan, BigDecimal fixedEmiAmount, final BigDecimal maxOutstandingLoanBalance,
|
||||||
final Collection<LoanTermVariationsData> emiAmountVariations, final Map<Long, LoanBorrowerCycleData> memberVariations,
|
final Collection<LoanTermVariationsData> emiAmountVariations, final Map<Long, LoanBorrowerCycleData> memberVariations,
|
||||||
final LoanProductData product) {
|
final LoanProductData product, final Boolean inArrears) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.accountNo = accountNo;
|
this.accountNo = accountNo;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
@@ -1031,6 +1038,7 @@ public class LoanAccountData {
|
|||||||
this.emiAmountVariations = emiAmountVariations;
|
this.emiAmountVariations = emiAmountVariations;
|
||||||
this.memberVariations = memberVariations;
|
this.memberVariations = memberVariations;
|
||||||
this.product = product;
|
this.product = product;
|
||||||
|
this.inArrears = inArrears;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RepaymentScheduleRelatedLoanData repaymentScheduleRelatedData() {
|
public RepaymentScheduleRelatedLoanData repaymentScheduleRelatedData() {
|
||||||
|
|||||||
+5
-1
@@ -634,6 +634,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
final BigDecimal feeChargesDueAtDisbursementCharged = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs,
|
final BigDecimal feeChargesDueAtDisbursementCharged = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs,
|
||||||
"feeChargesDueAtDisbursementCharged");
|
"feeChargesDueAtDisbursementCharged");
|
||||||
LoanSummaryData loanSummary = null;
|
LoanSummaryData loanSummary = null;
|
||||||
|
Boolean inArrears = false;
|
||||||
if (status.id().intValue() >= 300) {
|
if (status.id().intValue() >= 300) {
|
||||||
|
|
||||||
// loan summary
|
// loan summary
|
||||||
@@ -674,6 +675,9 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
final BigDecimal totalOverdue = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "totalOverdue");
|
final BigDecimal totalOverdue = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "totalOverdue");
|
||||||
|
|
||||||
final LocalDate overdueSinceDate = JdbcSupport.getLocalDate(rs, "overdueSinceDate");
|
final LocalDate overdueSinceDate = JdbcSupport.getLocalDate(rs, "overdueSinceDate");
|
||||||
|
if (overdueSinceDate != null) {
|
||||||
|
inArrears = true;
|
||||||
|
}
|
||||||
|
|
||||||
loanSummary = new LoanSummaryData(currencyData, principalDisbursed, principalPaid, principalWrittenOff,
|
loanSummary = new LoanSummaryData(currencyData, principalDisbursed, principalPaid, principalWrittenOff,
|
||||||
principalOutstanding, principalOverdue, interestCharged, interestPaid, interestWaived, interestWrittenOff,
|
principalOutstanding, principalOverdue, interestCharged, interestPaid, interestWaived, interestWrittenOff,
|
||||||
@@ -705,7 +709,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
annualInterestRate, interestType, interestCalculationPeriodType, expectedFirstRepaymentOnDate, graceOnPrincipalPayment,
|
annualInterestRate, interestType, interestCalculationPeriodType, expectedFirstRepaymentOnDate, graceOnPrincipalPayment,
|
||||||
graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, timeline, loanSummary,
|
graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, timeline, loanSummary,
|
||||||
feeChargesDueAtDisbursementCharged, syncDisbursementWithMeeting, loanCounter, loanProductCounter, multiDisburseLoan,
|
feeChargesDueAtDisbursementCharged, syncDisbursementWithMeeting, loanCounter, loanProductCounter, multiDisburseLoan,
|
||||||
fixedEmiAmount, outstandingLoanBalance);
|
fixedEmiAmount, outstandingLoanBalance, inArrears);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user