From 406d449e1254e424bec244f0c3935b9c7c14807b Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Mon, 29 Jan 2018 18:01:21 +0530 Subject: [PATCH] fix posting date in journal entry on load (#12694) --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 48062a3dc7..60c974f262 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -82,8 +82,8 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({ $.each(this.frm.doc.accounts || [], function(i, jvd) { frappe.model.set_default_values(jvd); }); - - if(!this.frm.doc.amended_from) this.frm.doc.posting_date = this.frm.posting_date || frappe.datetime.get_today(); + var posting_date = this.frm.posting_date; + if(!this.frm.doc.amended_from) this.frm.set_value('posting_date', posting_date || frappe.datetime.get_today()); } },