fix: avoid resetting employee on amending timesheets (#28025)

This commit is contained in:
Rucha Mahabal 2021-10-20 16:58:32 +05:30 committed by GitHub
parent 2ef4844a3c
commit 261f80c5ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,12 +32,12 @@ frappe.ui.form.on("Timesheet", {
};
},
onload: function(frm){
onload: function(frm) {
if (frm.doc.__islocal && frm.doc.time_logs) {
calculate_time_and_amount(frm);
}
if (frm.is_new()) {
if (frm.is_new() && !frm.doc.employee) {
set_employee_and_company(frm);
}
},