fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject incubator-fineract git commit: commit for FINERACT-44 (Cannot delete an inactive charge associated with a product (loan/savings))
Date Thu, 28 Jul 2016 10:42:20 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 5ac0da03d -> 65df32c44


commit for FINERACT-44 (Cannot delete an inactive charge associated with a product (loan/savings))


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/65df32c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/65df32c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/65df32c4

Branch: refs/heads/develop
Commit: 65df32c4449a0f6e2e29c54b9494b32841f5825e
Parents: 5ac0da0
Author: Emmanuel Nnaa <emmanuelnnaa@musoni.eu>
Authored: Thu Jul 14 15:32:59 2016 +0200
Committer: Emmanuel Nnaa <emmanuelnnaa@musoni.eu>
Committed: Thu Jul 14 15:32:59 2016 +0200

----------------------------------------------------------------------
 .../service/ChargeWritePlatformServiceJpaRepositoryImpl.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/65df32c4/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java
index 40b5781..fdc14cf 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java
@@ -233,14 +233,14 @@ public class ChargeWritePlatformServiceJpaRepositoryImpl implements
ChargeWriteP
 
     private boolean isAnyLoansAssociateWithThisCharge(final Long chargeId) {
 
-        final String sql = "select if((exists (select 1 from m_loan_charge lc where lc.charge_id
= ?)) = 1, 'true', 'false')";
+        final String sql = "select if((exists (select 1 from m_loan_charge lc where lc.charge_id
= ? and lc.is_active = 1)) = 1, 'true', 'false')";
         final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class,
new Object[] { chargeId });
         return new Boolean(isLoansUsingCharge);
     }
 
     private boolean isAnySavingsAssociateWithThisCharge(final Long chargeId) {
 
-        final String sql = "select if((exists (select 1 from m_savings_account_charge sc
where sc.charge_id = ?)) = 1, 'true', 'false')";
+        final String sql = "select if((exists (select 1 from m_savings_account_charge sc
where sc.charge_id = ? and sc.is_active = 1)) = 1, 'true', 'false')";
         final String isSavingsUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class,
new Object[] { chargeId });
         return new Boolean(isSavingsUsingCharge);
     }


Mime
View raw message