- Tue Dec 11, 2018 3:56 pm
#821988
I'm trying to populate a field on a dynaform that would calculate the number of hours an employee works for two weeks. The formula will need to subtract lunch times from the total. The fields are as follows for Day 1: start, lunchOut, lunchIn and end...these are datetime controls. sick, annual, otherLeave and compTime are floats. The issue is converting types, figuring out a formula and can an array be created to do this for two work weeks?
function calculateDay1(){
var startTime = parsFloat($('#start').getValue());
var lunchTime = parsFloat($('#lunchOut').getValue());
var lunchReturn = parsFloat($('#lunchIn').getValue());
var endTime = parsFloat($('#end').getValue());
var sickTime = $('#sick').getValue();
var annualTime = $('#annual').getValue();
var otherTime = $('#otherLeave').getValue();
var compTimeOut = $('#compTime').getValue();
function calculateDay1(){
var startTime = parsFloat($('#start').getValue());
var lunchTime = parsFloat($('#lunchOut').getValue());
var lunchReturn = parsFloat($('#lunchIn').getValue());
var endTime = parsFloat($('#end').getValue());
var sickTime = $('#sick').getValue();
var annualTime = $('#annual').getValue();
var otherTime = $('#otherLeave').getValue();
var compTimeOut = $('#compTime').getValue();