mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
fix: LTV ratio comparison (#27207)
This commit is contained in:
@@ -107,12 +107,13 @@ class LoanRepayment(AccountsController):
|
|||||||
lia = frappe.db.get_value('Loan Interest Accrual', {'process_loan_interest_accrual':
|
lia = frappe.db.get_value('Loan Interest Accrual', {'process_loan_interest_accrual':
|
||||||
process}, ['name', 'interest_amount', 'payable_principal_amount'], as_dict=1)
|
process}, ['name', 'interest_amount', 'payable_principal_amount'], as_dict=1)
|
||||||
|
|
||||||
self.append('repayment_details', {
|
if lia:
|
||||||
'loan_interest_accrual': lia.name,
|
self.append('repayment_details', {
|
||||||
'paid_interest_amount': flt(self.total_interest_paid - self.interest_payable, precision),
|
'loan_interest_accrual': lia.name,
|
||||||
'paid_principal_amount': 0.0,
|
'paid_interest_amount': flt(self.total_interest_paid - self.interest_payable, precision),
|
||||||
'accrual_type': 'Repayment'
|
'paid_principal_amount': 0.0,
|
||||||
})
|
'accrual_type': 'Repayment'
|
||||||
|
})
|
||||||
|
|
||||||
def update_paid_amount(self):
|
def update_paid_amount(self):
|
||||||
loan = frappe.get_doc("Loan", self.against_loan)
|
loan = frappe.get_doc("Loan", self.against_loan)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ def check_for_ltv_shortfall(process_loan_security_shortfall):
|
|||||||
- flt(loan.total_principal_paid)
|
- flt(loan.total_principal_paid)
|
||||||
|
|
||||||
pledged_securities = get_pledged_security_qty(loan.name)
|
pledged_securities = get_pledged_security_qty(loan.name)
|
||||||
ltv_ratio = ''
|
ltv_ratio = 0.0
|
||||||
security_value = 0.0
|
security_value = 0.0
|
||||||
|
|
||||||
for security, qty in pledged_securities.items():
|
for security, qty in pledged_securities.items():
|
||||||
|
|||||||
Reference in New Issue
Block a user