diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry.js b/erpnext/hr/doctype/payroll_entry/payroll_entry.js index cf15846f2f..1e6dc510b0 100644 --- a/erpnext/hr/doctype/payroll_entry/payroll_entry.js +++ b/erpnext/hr/doctype/payroll_entry/payroll_entry.js @@ -5,7 +5,9 @@ var in_progress = false; frappe.ui.form.on('Payroll Entry', { onload: function (frm) { - frm.doc.posting_date = frappe.datetime.nowdate(); + if (!frm.doc.posting_date) { + frm.doc.posting_date = frappe.datetime.nowdate(); + } frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet); },