Skip to content

Commit

Permalink
Merge pull request #31799 from abhinavxd/fix-process-loan-interest-ac…
Browse files Browse the repository at this point in the history
…crual

fix: process loan interest accrual
  • Loading branch information
deepeshgarg007 authored Aug 11, 2022
2 parents 5018472 + 534d7ce commit 72869ed
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ def calculate_accrual_amount_for_demand_loans(
def make_accrual_interest_entry_for_demand_loans(
posting_date, process_loan_interest, open_loans=None, loan_type=None, accrual_type="Regular"
):
query_filters = {"status": ("in", ["Disbursed", "Partially Disbursed"]), "docstatus": 1}
query_filters = {
"status": ("in", ["Disbursed", "Partially Disbursed"]),
"docstatus": 1,
"is_term_loan": 0,
}

if loan_type:
query_filters.update({"loan_type": loan_type})
Expand Down Expand Up @@ -232,6 +236,7 @@ def get_term_loans(date, term_loan=None, loan_type=None):
AND l.is_term_loan =1
AND rs.payment_date <= %s
AND rs.is_accrued=0 {0}
AND rs.interest_amount > 0
AND l.status = 'Disbursed'
ORDER BY rs.payment_date""".format(
condition
Expand Down

0 comments on commit 72869ed

Please sign in to comment.