diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 9ed8674df09..66178022357 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -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()))