mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
Merge branch 'version-14-hotfix' into SaiFi0102-asset-capitalization-v14
This commit is contained in:
@@ -516,6 +516,8 @@ def get_accrued_interest_entries(against_loan, posting_date=None):
|
||||
if not posting_date:
|
||||
posting_date = getdate()
|
||||
|
||||
precision = cint(frappe.db.get_default("currency_precision")) or 2
|
||||
|
||||
unpaid_accrued_entries = frappe.db.sql(
|
||||
"""
|
||||
SELECT name, posting_date, interest_amount - paid_interest_amount as interest_amount,
|
||||
@@ -536,6 +538,13 @@ def get_accrued_interest_entries(against_loan, posting_date=None):
|
||||
as_dict=1,
|
||||
)
|
||||
|
||||
# Skip entries with zero interest amount & payable principal amount
|
||||
unpaid_accrued_entries = [
|
||||
d
|
||||
for d in unpaid_accrued_entries
|
||||
if flt(d.interest_amount, precision) > 0 or flt(d.payable_principal_amount, precision) > 0
|
||||
]
|
||||
|
||||
return unpaid_accrued_entries
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def execute():
|
||||
frappe.qb.from_(dt)
|
||||
.select(dt.name, dt.notes, dt.modified_by, dt.modified)
|
||||
.where(dt.notes.isnotnull() & dt.notes != "")
|
||||
).run()
|
||||
).run(as_dict=True)
|
||||
|
||||
for d in records:
|
||||
if strip_html(cstr(d.notes)).strip():
|
||||
|
||||
Reference in New Issue
Block a user