ERPNEXT Tanggal Perbedaan Skrip Klien
},
out_time: function(frm) {
console.log("in time and out time",frm.doc.in_time,frm.doc.out_time);
total = frm.doc.out_time - frm.doc.in_time;
console.log("Total time ",typeof(total));
var start = moment(frm.doc.in_time, "HH:mm");
console.log(start._i);
var end = moment(frm.doc.out_time, "HH:mm");
var minutes = end.diff(start, 'minutes');
console.log(minutes);
var hours = Math.trunc(minutes/60);
var m1 = minutes%60;
var total_t = hours + ":" + m1;
console.log(total_t);
total_time = total_t;
console.log(typeof(total_time));
refresh_field('total_time');
}
Frail Fish