commit | d780f56ba8f66484b22746958ac1384b8d38bd2d | [log] [tgz] |
---|---|---|
author | Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> | Mon Feb 22 15:12:35 2021 +0530 |
committer | GitHub <noreply@github.com> | Mon Feb 22 15:12:35 2021 +0530 |
tree | e23d47bbcd533ec00f047b1f51bdeb25894092a3 | |
parent | ed1c7649cd20192138709f5a00231a6278180879 [diff] |
Revert "fix: Error handling in loan reports and precision fixes"
diff --git a/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py b/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py index 7978350..7d7992d 100644 --- a/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py +++ b/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py
@@ -246,5 +246,7 @@ if not posting_date: posting_date = getdate() - return flt((principal_amount * rate_of_interest) / (days_in_year(get_datetime(posting_date).year) * 100)) + precision = cint(frappe.db.get_default("currency_precision")) or 2 + + return flt((principal_amount * rate_of_interest) / (days_in_year(get_datetime(posting_date).year) * 100), precision)
diff --git a/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py b/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py index 8b6ea86..adc8013 100644 --- a/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py +++ b/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py
@@ -76,7 +76,7 @@ if qty: security_wise_map[key[1]]['applicant_count'] += 1 - total_portfolio_value += flt(qty * loan_security_details.get(key[1], {}).get('latest_price', 0)) + total_portfolio_value += flt(qty * loan_security_details.get(key[1])['latest_price']) return security_wise_map, total_portfolio_value