This is an automated email from the ASF dual-hosted git repository.
arnold 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 a3ab06593 FINERACT-1557 enable previous disabled refundByCash
accounting tests
a3ab06593 is described below
commit a3ab06593ff774e86feab1f3562f2a4659735351
Author: John Woodlock <[email protected]>
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);