FINERACT-1557 enable previous disabled refundByCash accounting tests

This commit is contained in:
John Woodlock
2022-05-09 17:52:01 +02:00
committed by Aleksandar Vidakovic
parent 9d4d848df5
commit 7f11d815d9
2 changed files with 8 additions and 13 deletions
@@ -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));
}
}
@@ -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);