From 7add27a4ea85427a853c23c40d93edb7e8751619 Mon Sep 17 00:00:00 2001 From: Muhimbura Brian Mart Date: Wed, 3 Jul 2024 17:19:48 +0300 Subject: [PATCH 1/3] Fic 689 --- .../PrequalificationChecklistWritePlatformServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistWritePlatformServiceImpl.java index a30a4d3dfd1..6b1b5cc0375 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistWritePlatformServiceImpl.java @@ -542,7 +542,7 @@ private CheckValidationColor runCheck6(final GroupData groupData) { reportParams.put("${loanProductId}", productId); reportParams.put("${clientCategorization}", clientCategorization); reportParams.put("${clientArea}", clientArea); - reportParams.put("${categorization}", groupData.getTopupMembers().size() > 0 ? "RECREDITO" : "NUEVO"); + reportParams.put("${categorization}", recreditPercent.compareTo(BigDecimal.valueOf(50L)) >= 0 ? "RECREDITO" : "NUEVO"); reportParams.put("${numberOfMembers}", numberOfMembers); reportParams.put("${numberOfRecurringMembers}", numberOfRecurringMembers); reportParams.put("${recreditPercent}", recreditPercent.toPlainString()); From 2c24e852d8431a739d139e933578328db37cf99b Mon Sep 17 00:00:00 2001 From: Brian Muhimbura Date: Thu, 4 Jul 2024 16:12:22 +0300 Subject: [PATCH 2/3] Fic 705 (#887) --- .../PrequalificationChecklistReadPlatformServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistReadPlatformServiceImpl.java index b49277af21b..242005818ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/prequalification/service/PrequalificationChecklistReadPlatformServiceImpl.java @@ -92,15 +92,14 @@ public PrequalificationChecklistData retrieveHardPolicyValidationResults(final L PrequalificationType.INDIVIDUAL.name()); final List memberColumnHeaders = new ArrayList<>( List.of("label.heading.clientid", "label.heading.clientname", "label.heading.dpi")); -// individualPolicies.forEach(policy -> memberColumnHeaders.add(policy.getDescription())); final List> memberRows = new ArrayList<>(); for (PrequalificationGroupMember member : prequalificationGroup.getMembers()) { final List memberRow = new ArrayList<>(); String memberId = null; String clientName; String dpi; - for (ChecklistValidationResult validationResult : validationResults) { - for (PolicyData policy : individualPolicies) { + for (PolicyData policy : individualPolicies) { + for (ChecklistValidationResult validationResult : validationResults) { if (policy.getId().equals(validationResult.getPolicyId()) && PrequalificationType.INDIVIDUAL.getValue().equals(validationResult.getPrequalificationTypeEnum()) && member.getId().equals(validationResult.getMemberId().longValue())) { @@ -115,7 +114,6 @@ public PrequalificationChecklistData retrieveHardPolicyValidationResults(final L memberColumnHeaders.add(policy.getDescription()); } memberRow.add(validationColor); - break; } From ee257bb2fff1efbeb1254d538001b43d15438368 Mon Sep 17 00:00:00 2001 From: Brian Muhimbura Date: Thu, 4 Jul 2024 20:06:57 +0300 Subject: [PATCH 3/3] Fix/fbr 707 (#890) * Fic 705 * Fic 707 --- .../loanaccount/domain/GroupLoanAdditionals.java | 10 +++++----- ...plicationWritePlatformServiceJpaRepositoryImpl.java | 1 - .../parts/0112_FBR_417_additional_group_loan_data.xml | 4 ++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanAdditionals.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanAdditionals.java index 72a976168f8..95fb4f22853 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanAdditionals.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanAdditionals.java @@ -157,7 +157,7 @@ public class GroupLoanAdditionals extends AbstractPersistableCustom { private BigDecimal totalExternalLoanAmount; @Column(name = "total_installments") - private Integer totalInstallments; + private BigDecimal totalInstallments; @Column(name = "client_type") private Long clientType; @@ -258,7 +258,7 @@ public class GroupLoanAdditionals extends AbstractPersistableCustom { protected GroupLoanAdditionals() {} public GroupLoanAdditionals(Integer loanCycleCompleted, BigDecimal rentFee, BigDecimal mortgageFee, BigDecimal monthlyIncome, - BigDecimal familyExpenses, BigDecimal totalExternalLoanAmount, Integer totalInstallments, Long clientType, + BigDecimal familyExpenses, BigDecimal totalExternalLoanAmount, BigDecimal totalInstallments, Long clientType, String houseHoldGoods, String businessActivities, Long businessLocation, Integer businessExperience, BigDecimal salesValue, BigDecimal businessPurchases, BigDecimal businessProfit, BigDecimal clientProfit, BigDecimal inventories, Long visitBusiness, Long familySupport, Long businessEvolution, Integer numberOfApprovals, String recommenderName, @@ -352,7 +352,7 @@ public static GroupLoanAdditionals assembleFromJson(JsonCommand command, Loan lo BigDecimal monthlyIncome = command.bigDecimalValueOfParameterNamed("monthlyIncome"); BigDecimal familyExpenses = command.bigDecimalValueOfParameterNamed("familyExpenses"); BigDecimal totalExternalLoanAmount = command.bigDecimalValueOfParameterNamed("totalExternalLoanAmount"); - Integer totalInstallments = command.integerValueOfParameterNamed("totalInstallments"); + BigDecimal totalInstallments = command.bigDecimalValueOfParameterNamed("totalInstallments"); Long clientType = command.longValueOfParameterNamed("clientType"); String houseHoldGoods = command.stringValueOfParameterNamed("houseHoldGoods"); String businessActivities = command.stringValueOfParameterNamed("businessActivities"); @@ -468,8 +468,8 @@ public Map update(final JsonCommand command) { actualChanges.put("totalExternalLoanAmount", newValue); this.totalExternalLoanAmount = newValue; } - if (command.isChangeInIntegerParameterNamed("totalInstallments", this.totalInstallments)) { - final Integer newValue = command.integerValueOfParameterNamed("totalInstallments"); + if (command.isChangeInBigDecimalParameterNamed("totalInstallments", this.totalInstallments)) { + final BigDecimal newValue = command.bigDecimalValueOfParameterNamed("totalInstallments"); actualChanges.put("totalInstallments", newValue); this.totalInstallments = newValue; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java index 6b82b4ebfbd..9ea6d5e4eb8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java @@ -990,7 +990,6 @@ private void createCalendar(final Loan loan, LocalDate calendarStartDate, Intege public CommandProcessingResult modifyApplication(final Long loanId, final JsonCommand command) { try { - AppUser currentUser = getAppUserIfPresent(); final Loan existingLoanApplication = retrieveLoanBy(loanId); if (!existingLoanApplication.isSubmittedAndPendingApproval()) { throw new LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified(loanId); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0112_FBR_417_additional_group_loan_data.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0112_FBR_417_additional_group_loan_data.xml index 4f4a3070046..23820f2f5ec 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0112_FBR_417_additional_group_loan_data.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0112_FBR_417_additional_group_loan_data.xml @@ -264,4 +264,8 @@ + + + +