Add Payment Entry for Expenses
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index cce1e6f..9ed8674 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -621,7 +621,7 @@
'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, "due_date"),
+ '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"),
}))
outstanding_invoices = sorted(outstanding_invoices, key=lambda k: k['due_date'] or getdate(nowdate()))