Merge pull request #12540 from shreyashah115/posting-date

[Payroll Entry] Set posting date only if null
This commit is contained in:
rohitwaghchaure 2018-01-23 15:10:26 +05:30 committed by GitHub
commit 881d32c4b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
},