[ https://issues.apache.org/jira/browse/FINERACT-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15397375#comment-15397375 ]
ASF GitHub Bot commented on FINERACT-44: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/incubator-fineract/pull/168 > Cannot delete an inactive charge associated with a product (loan/savings) > ------------------------------------------------------------------------- > > Key: FINERACT-44 > URL: https://issues.apache.org/jira/browse/FINERACT-44 > Project: Apache Fineract > Issue Type: Bug > Reporter: Emmanuel Nnaa > Assignee: Markus Geiss > Priority: Minor > > The SQL statement in the methods (isAnyLoansAssociateWithThisCharge and > isAnySavingsAssociateWithThisCharge) that check if a charge is attached to a > product (loan or savings) does not include the "and is_active = 1" criterion. > *Solution* > {code} > 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 sql = "select if((exists (select 1 from m_savings_account_charge > sc where sc.charge_id = ? and sc.is_active = 1)) = 1, 'true', 'false')"; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)