Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

erpnext date difference client script

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

PREVIOUS NEXT
Code Example
Javascript :: password parsley 
Javascript :: aos cdn 
Javascript :: vscode new file crlf 
Javascript :: Java compile script 
Javascript :: sintaxis map javascript 
Javascript :: add html symbols with javascript 
Javascript :: Sub-routes in Main route not getting static files ExpressJS 
Javascript :: nestjs optional guard 
Javascript :: shopify a problem repeatedly occured on url 
Javascript :: mongoose undo delete 
Javascript :: using for loops to add an event listener 
Javascript :: Use ChainLink Feed Registry 
Javascript :: exit from jshell 
Javascript :: know if a gridview is empty from javascript 
Javascript :: login_page-jwt-auth-using-react-and-flask 
Javascript :: cookies in electron 
Javascript :: $(document).ready(function () { $(".inputs").click(function () { alert($(this).id); }); }); 
Javascript :: Full form of BOM in Javascript is 
Javascript :: GLTF position three.js 
Javascript :: math.factorial javascript 
Javascript :: remove package-lock.json from commit 
Javascript :: _.has Creator Functions Do Not Have "Constructor" 
Javascript :: draft save using jquery 
Javascript :: Create a new object where the prototype is {0:10} 
Javascript :: JSON Use Example 
Javascript :: ticket 
Javascript :: Use a stack to convert the infix expression x*y-2 into post-fix 
Javascript :: Register Multiple Models In Admin 
Javascript :: firebase database TIMESTAMP 
Javascript :: react component lifecycle 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =