You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by al...@apache.org on 2022/05/09 15:52:19 UTC
[fineract] branch 1.7.0 updated: FINERACT-1557 enable previous disabled refundByCash accounting tests
This is an automated email from the ASF dual-hosted git repository.
aleks pushed a commit to branch 1.7.0
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/1.7.0 by this push:
new 7f11d815d FINERACT-1557 enable previous disabled refundByCash accounting tests
7f11d815d is described below
commit 7f11d815d906ffebf48c9e873279e0775ad98cf6
Author: John Woodlock <jo...@gmail.com>
AuthorDate: Fri May 6 10:03:27 2022 +0100
FINERACT-1557 enable previous disabled refundByCash accounting tests
---
.../loanaccount/service/LoanReadPlatformServiceImpl.java | 12 +++++-------
.../fineract/integrationtests/ClientLoanIntegrationTest.java | 9 +++------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java
index bf126f58d..c9504b4b2 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java
@@ -2100,20 +2100,18 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
@Override
public PaidInAdvanceData retrieveTotalPaidInAdvance(Long loanId) {
- // TODO Auto-generated method stub
try {
- final String sql = " select (SUM(COALESCE(mr.principal_completed_derived, 0)) +"
+ final String sql = " select (SUM(COALESCE(mr.principal_completed_derived, 0))"
+ " + SUM(COALESCE(mr.interest_completed_derived, 0)) " + " + SUM(COALESCE(mr.fee_charges_completed_derived, 0)) "
+ " + SUM(COALESCE(mr.penalty_charges_completed_derived, 0))) as total_in_advance_derived "
+ " from m_loan ml INNER JOIN m_loan_repayment_schedule mr on mr.loan_id = ml.id "
- + " where ml.id=? and mr.duedate >= ? group by ml.id having " + " (SUM(COALESCE(mr.principal_completed_derived, 0)) "
- + " + SUM(COALESCE(mr.interest_completed_derived, 0)) " + " + SUM(COALESCE(mr.fee_charges_completed_derived, 0)) "
+ + " where ml.id=? and mr.duedate >= " + sqlGenerator.currentDate() + " group by ml.id having "
+ + " (SUM(COALESCE(mr.principal_completed_derived, 0)) " + " + SUM(COALESCE(mr.interest_completed_derived, 0)) "
+ + " + SUM(COALESCE(mr.fee_charges_completed_derived, 0)) "
+ "+ SUM(COALESCE(mr.penalty_charges_completed_derived, 0))) > 0";
- BigDecimal bigDecimal = this.jdbcTemplate.queryForObject(sql, BigDecimal.class,
- new Object[] { loanId, sqlGenerator.currentDate() }); // NOSONAR
+ BigDecimal bigDecimal = this.jdbcTemplate.queryForObject(sql, BigDecimal.class, new Object[] { loanId }); // NOSONAR
return new PaidInAdvanceData(bigDecimal);
} catch (DataAccessException e) {
- // TODO Auto-generated catch block
return new PaidInAdvanceData(new BigDecimal(0));
}
}
diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
index 965e84c9d..b5324799b 100644
--- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
+++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
@@ -4714,8 +4714,7 @@ public class ClientLoanIntegrationTest {
/***
* Test case to verify default Style payment strategy
*/
- // @Test // TODO: @galovics failing since
- // https://github.com/apache/fineract/commit/d5c611564f7b8c877136f3b3aca647bf7de15fe0
+ @Test
public void testLoanRefundByCashCashBasedAccounting() {
this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec);
@@ -4898,8 +4897,7 @@ public class ClientLoanIntegrationTest {
/***
* Test case to verify Default style payment strategy
*/
- // @Test // TODO: @galovics failing since
- // https://github.com/apache/fineract/commit/d5c611564f7b8c877136f3b3aca647bf7de15fe0
+ @Test
public void testLoanRefundByCashAccrualBasedAccounting() {
this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec);
@@ -5077,8 +5075,7 @@ public class ClientLoanIntegrationTest {
}
- // @Test // TODO: @galovics failing since
- // https://github.com/apache/fineract/commit/d5c611564f7b8c877136f3b3aca647bf7de15fe0
+ @Test
public void testLoanRefundByTransferCashBasedAccounting() {
this.journalEntryHelper = new JournalEntryHelper(this.requestSpec, this.responseSpec);
this.savingsAccountHelper = new SavingsAccountHelper(this.requestSpec, this.responseSpec);