Merge pull request #4520 from partzsch/develop

Time Log now down to seconds
This commit is contained in:
Rushabh Mehta 2015-12-23 12:56:44 +05:30
commit cc2796e676

View File

@ -46,7 +46,7 @@ frappe.ui.form.on("Time Log", "before_save", function(frm) {
frappe.ui.form.on("Time Log", "to_time", function(frm) { frappe.ui.form.on("Time Log", "to_time", function(frm) {
if(frm._setting_hours) return; if(frm._setting_hours) return;
frm.set_value("hours", moment(cur_frm.doc.to_time).diff(moment(cur_frm.doc.from_time), frm.set_value("hours", moment(cur_frm.doc.to_time).diff(moment(cur_frm.doc.from_time),
"minutes") / 60); "seconds") / 3600);
}); });