fix: avoid resetting employee on amending timesheets (#28025)
This commit is contained in:
parent
2ef4844a3c
commit
261f80c5ca
@ -32,12 +32,12 @@ frappe.ui.form.on("Timesheet", {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onload: function(frm){
|
onload: function(frm) {
|
||||||
if (frm.doc.__islocal && frm.doc.time_logs) {
|
if (frm.doc.__islocal && frm.doc.time_logs) {
|
||||||
calculate_time_and_amount(frm);
|
calculate_time_and_amount(frm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frm.is_new()) {
|
if (frm.is_new() && !frm.doc.employee) {
|
||||||
set_employee_and_company(frm);
|
set_employee_and_company(frm);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user