From 7e3f5e04ab02a8b33a85a659566cbe4680123fe7 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 28 Jan 2021 23:25:23 +0530 Subject: [PATCH] fix: LTV ration in interest report --- .../report/loan_interest_report/loan_interest_report.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py b/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py index 2bfe6d3c33..a3e69bbfbf 100644 --- a/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py +++ b/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py @@ -81,7 +81,7 @@ def get_active_loan_details(filters): + loan['penalty'] if loan_wise_security_value.get(loan.loan): - loan['loan_to_value'] = (loan['principal_outstanding'] * 100) / loan_wise_security_value.get(loan.loan) + loan['loan_to_value'] = flt((loan['principal_outstanding'] * 100) / loan_wise_security_value.get(loan.loan)) return loan_details @@ -148,7 +148,7 @@ def get_loan_wise_pledges(filters): WHERE u.parent = up.name AND up.status = 'Approved' {conditions} - GROUP BY up.loan + GROUP BY up.loan, u.loan_security """.format(conditions=conditions), filters, as_dict=1) for unpledge in unpledges: @@ -160,7 +160,7 @@ def get_loan_wise_pledges(filters): WHERE p.parent = lp.name AND lp.status = 'Pledged' {conditions} - GROUP BY lp.loan + GROUP BY lp.loan, p.loan_security """.format(conditions=conditions), filters, as_dict=1) for security in pledges: