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

(cherry picked from commit 261f80c5ca)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
mergify[bot]
2021-10-20 17:45:43 +05:30
committed by GitHub
parent a739bf90c4
commit 9ce7ea692d

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