fix: Test Cases

This commit is contained in:
Deepesh Garg 2020-10-22 09:34:27 +05:30
parent 3f177bffac
commit 2c97244bad

View File

@ -78,7 +78,7 @@ class LoanSecurityPledge(Document):
self.maximum_loan_value = maximum_loan_value
def update_loan(loan, maximum_value_against_pledge):
maximum_loan_value = frappe.db.get_value('Loan', {'name': loan}, ['maximum_loan_value'])
maximum_loan_value = frappe.db.get_value('Loan', {'name': loan}, ['maximum_loan_amount'])
frappe.db.sql(""" UPDATE `tabLoan` SET maximum_loan_value=%s, is_secured_loan=1
frappe.db.sql(""" UPDATE `tabLoan` SET maximum_loan_amount=%s, is_secured_loan=1
WHERE name=%s""", (maximum_loan_value + maximum_value_against_pledge, loan))