mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: half day leave date value reset (#20488)
* fix: full day leaves not tagged as half day in attendance * chore: code cleanup for half day date value set
This commit is contained in:
@@ -104,11 +104,16 @@ frappe.ui.form.on("Leave Application", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
half_day: function(frm) {
|
half_day: function(frm) {
|
||||||
if (frm.doc.from_date == frm.doc.to_date) {
|
if (frm.doc.half_day) {
|
||||||
frm.set_value("half_day_date", frm.doc.from_date);
|
if (frm.doc.from_date == frm.doc.to_date) {
|
||||||
|
frm.set_value("half_day_date", frm.doc.from_date);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frm.trigger("half_day_datepicker");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frm.trigger("half_day_datepicker");
|
frm.set_value("half_day_date", "");
|
||||||
}
|
}
|
||||||
frm.trigger("calculate_total_days");
|
frm.trigger("calculate_total_days");
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user