Update utils.py
This commit is contained in:
parent
38d4be8325
commit
edba79e8f0
@ -494,7 +494,8 @@ def get_company_default(company, fieldname):
|
||||
value = frappe.db.get_value("Company", company, fieldname)
|
||||
|
||||
if not value:
|
||||
throw(_("Please set default {0} in Company {1}").format(frappe.get_meta("Company").get_label(fieldname), company))
|
||||
throw(_("Please set default {0} in Company {1}")
|
||||
.format(frappe.get_meta("Company").get_label(fieldname), company))
|
||||
|
||||
return value
|
||||
|
||||
@ -621,7 +622,8 @@ def get_outstanding_invoices(party_type, party, account, condition=None):
|
||||
'invoice_amount': flt(d.invoice_amount),
|
||||
'payment_amount': flt(d.payment_amount),
|
||||
'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision),
|
||||
'due_date': frappe.db.get_value(d.voucher_type, d.voucher_no, "posting_date") if party_type=="Employee" else frappe.db.get_value(d.voucher_type, d.voucher_no, "due_date"),
|
||||
'due_date': frappe.db.get_value(d.voucher_type, d.voucher_no,
|
||||
"posting_date" if party_type=="Employee" else "due_date"),
|
||||
}))
|
||||
|
||||
outstanding_invoices = sorted(outstanding_invoices, key=lambda k: k['due_date'] or getdate(nowdate()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user