set posting date only if null
This commit is contained in:
parent
cbbee47625
commit
543feda2fb
@ -5,7 +5,9 @@ var in_progress = false;
|
|||||||
|
|
||||||
frappe.ui.form.on('Payroll Entry', {
|
frappe.ui.form.on('Payroll Entry', {
|
||||||
onload: function (frm) {
|
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);
|
frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user