"use strict";var overtime_payout=new function(){this.DELETE_DIALOG="overtime_payout_del_dialog";this.DELETE_FORM="overtime_payout_del_form"};overtime_payout.overtime_payout_refresh=function(form_id){$("#"+form_id+"_table").html('<span class="dialog_make_load48" title="Loading..."></span>');openx("portlet","overtime_payout","show_rates_staff",xajax.getFormValues(form_id),form_id)};overtime_payout.overtime_payout_onchange=function(form_id){openx("portlet","overtime_payout","clear",xajax.getFormValues(form_id),form_id)};overtime_payout.overtime_payout_do=function(form_id){var valSettingsList={rules:{},errorClass:"errorsmall",ignoreTitle:true,onfocusout:false};$("#"+form_id).validate(valSettingsList);if($("#"+form_id).valid()){$("#"+form_id+"_table").html('<span class="dialog_make_load48" title="Loading..."></span>');openx("portlet","overtime_payout","save_payout",xajax.getFormValues(form_id),form_id)}};overtime_payout.overtime_print=function(item){fullPopup.view("reporting","index","s_overtime/staff/"+item)};overtime_payout.overtime_payout_del=function(my_id){dialogMessage.viewLoad(overtime_payout.DELETE_DIALOG,720,200);openx("portlet","overtime_payout","del_payout_view",xajax.getFormValues("overtime_payout_"+my_id),my_id)};overtime_payout.overtime_payout_del_close=function(){dialogMessage.dialogs[overtime_payout.DELETE_DIALOG].dialog("close")};overtime_payout.overtime_payout_del_save=function(){var valSettings={rules:{portlet_overtime_payout_del_date__from:{required:true,dateUS:true},portlet_overtime_payout_del_date__to:{required:true,dateUS:true,minDateCompare:"#portlet_overtime_payout_del_date__from"}},errorClass:"errorsmall",ignoreTitle:true,onfocusout:false};$("#"+overtime_payout.DELETE_FORM).validate(valSettings);if($("#"+overtime_payout.DELETE_FORM).valid()){var from_date=$.parseDatei18n($("#portlet_overtime_payout_del_date__from").val());var to_date=$.parseDatei18n($("#portlet_overtime_payout_del_date__to").val());if(from_date===false){alert("From date value is invalid. Von Datumswert ist ungültig");return}if(to_date===false){alert("To date value is invalid. Bis Datumswert ist ungültig");return}to_date.setHours(24);var weeks_between=dateTime.weeks_between(from_date,to_date);var days_between=dateTime.days_between(from_date,to_date);var outtxt=lang_workinput.selected_weeks1;if(weeks_between>2){outtxt=outtxt+weeks_between+lang_workinput.selected_weeks2}else{outtxt=outtxt+days_between+lang_workinput.selected_days2}if(basicForm.requestBigConfirm(outtxt)){var post_values=xajax.getFormValues(overtime_payout.DELETE_FORM);openx("portlet","overtime_payout","del_payout_do",post_values)}}};