How to do calculation on custom fields

I have created custom fields-in time,out time, working hours, overtime in attendance doctype.

I have written dis script:

Is it write code?
i am not getting expected results…
can any1 help me to solve this calculation?

1 Like

Hey Pranali !
Your code looks perfect . Can you tell me where are you getting it incorrect? in which field ?
And also add console.log( ) in your method to check whether it is calling or not.