This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new b40e700cc FINERACT-1724: Loans API get loan details/delinquent data
wrong
b40e700cc is described below
commit b40e700cc60a12ae190a86ada73a4ffd53475442
Author: Jose Alberto Hernandez <[email protected]>
AuthorDate: Thu Mar 23 23:06:35 2023 -0600
FINERACT-1724: Loans API get loan details/delinquent data wrong
---
.../fineract/portfolio/loanaccount/api/LoansApiResource.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java
index b7b4f5071..e167596b8 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java
@@ -844,7 +844,9 @@ public class LoansApiResource {
Collection<LoanCollateralResponseData> loanCollateralManagements;
Collection<LoanCollateralManagementData> loanCollateralManagementData
= new ArrayList<>();
CollectionData collectionData = CollectionData.template();
-
+ if (loanBasicDetails.isActive()) {
+ collectionData =
this.delinquencyReadPlatformService.calculateLoanCollectionData(resolvedLoanId);
+ }
final Set<String> mandatoryResponseParameters = new HashSet<>();
final Set<String> associationParameters =
ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters());
final Collection<LoanTransactionData> currentLoanRepayments =
this.loanReadPlatformService.retrieveLoanTransactions(resolvedLoanId);
@@ -948,13 +950,6 @@ public class LoansApiResource {
mandatoryResponseParameters.add(DataTableApiConstant.linkedAccountAssociateParamName);
linkedAccount =
this.accountAssociationsReadPlatformService.retriveLoanLinkedAssociation(resolvedLoanId);
}
-
- if
(associationParameters.contains(DataTableApiConstant.collectionAssociateParamName))
{
-
mandatoryResponseParameters.add(DataTableApiConstant.collectionAssociateParamName);
- if (loanBasicDetails.isActive()) {
- collectionData =
this.delinquencyReadPlatformService.calculateLoanCollectionData(resolvedLoanId);
- }
- }
}
Collection<LoanProductData> productOptions = null;