1 line
227 KiB
JavaScript
1 line
227 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["payroll-company_tax_deduction-CompanyTaxDeductionViewController"],{9706:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CompanyTaxDeductionViewController\": () => (/* binding */ CompanyTaxDeductionViewController)\n/* harmony export */ });\n/* harmony import */ var _global_Global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9490);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\nclass CompanyTaxDeductionViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#company_tax_deduction_view_container', //Must set el here and can only set string, so events can work\n\n\t\t\ttype_array: null,\n\t\t\tstatus_array: null,\n\t\t\ttax_formula_type_array: null,\n\t\t\tcalculation_array: null,\n\t\t\taccount_amount_type_array: null,\n\t\t\tyes_no_array: null,\n\t\t\tapply_frequency_array: null,\n\t\t\tapply_payroll_run_type_array: null,\n\t\t\tlength_of_service_unit_array: null,\n\t\t\tmonth_of_year_array: null,\n\t\t\tday_of_month_array: null,\n\t\t\tmonth_of_quarter_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\te_province_array: null,\n\t\t\tcompany_api: null,\n\t\t\tdate_api: null,\n\t\t\tuser_deduction_api: null,\n\t\t\tuser_api: null,\n\t\t\tpayroll_remittance_agency_api: null,\n\t\t\temployee_setting_grid: null,\n\t\t\temployee_setting_result: null,\n\t\t\tshow_c: false,\n\t\t\tshow_p: false,\n\t\t\tshow_dc: false,\n\n\t\t\tprovince_district_array: null,\n\n\t\t\toriginal_current_record: null, //set when setCurrentEditRecordData, to keep the original data of the edit record\n\n\t\t\tlength_dates: null,\n\t\t\tstart_dates: null,\n\t\t\tend_dates: null,\n\n\t\t\tgrid_parent: '.grid-div'\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'CompanyTaxDeductionEditView.html';\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.permission_id = 'user_tax_deduction';\n\t\t} else {\n\t\t\tthis.permission_id = 'company_tax_deduction';\n\t\t}\n\t\tthis.viewId = 'CompanyTaxDeduction';\n\t\tthis.script_name = 'CompanyTaxDeductionView';\n\t\tthis.table_name_key = 'company_deduction';\n\t\tthis.context_menu_name = $.i18n._( 'Tax / Deductions' );\n\t\tthis.navigation_label = $.i18n._( 'Tax / Deductions' );\n\t\tthis.api = TTAPI.APICompanyDeduction;\n\t\tthis.date_api = TTAPI.APITTDate;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.user_deduction_api = TTAPI.APIUserDeduction;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.payroll_remittance_agency_api = TTAPI.APIPayrollRemittanceAgency;\n\t\tthis.month_of_quarter_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( { 1: 1, 2: 2, 3: 3 } );\n\t\tthis.document_object_type_id = 300;\n\n\t\tthis.render();\n\n\t\t//Load the FormulaBuilder as early as possible to help avoid some race conditions with input box not appearing, or appearing out of order when clicking \"new\" after a fresh reload.\n\t\tif ( ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.getProductEdition */ .x.getProductEdition() >= 15 ) ) {\n\t\t\t_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadScript */ .x.loadScript( 'global/widgets/formula_builder/FormulaBuilder.js' );\n\t\t}\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t} else {\n\t\t\tthis.buildContextMenu();\n\t\t}\n\n\t\t//call init data in parent view\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.initData();\n\t\t}\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['mass_edit'],\n\t\t\tinclude: []\n\t\t};\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tcontext_menu_model.exclude.push(\n\t\t\t\t'view',\n\t\t\t\t'save_and_new',\n\t\t\t\t'save_and_copy',\n\t\t\t\t'copy_as_new',\n\t\t\t\t'copy'\n\t\t\t);\n\t\t}\n\n\t\treturn context_menu_model;\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tvar options = [\n\t\t\t{ option_name: 'type', api: this.api },\n\t\t\t{ option_name: 'status', api: this.api },\n\t\t\t{ option_name: 'calculation', api: this.api },\n\t\t\t{ option_name: 'apply_frequency', api: this.api },\n\t\t\t{ option_name: 'apply_payroll_run_type', api: this.api },\n\t\t\t{ option_name: 'account_amount_type', api: this.api },\n\t\t\t{ option_name: 'length_of_service_unit', api: this.api },\n\t\t\t{ option_name: 'look_back_unit', api: this.api },\n\t\t\t{ option_name: 'country', field_name: 'country', api: this.company_api },\n\t\t\t{ option_name: 'apply_payroll_run_type', api: this.api },\n\t\t\t{ option_name: 'yes_no', api: this.api },\n\n\t\t\t{ option_name: 'tax_formula_type', api: this.api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tthis.company_api.getOptions( 'district', {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.district_array = res;\n\t\t\t}\n\t\t} );\n\n\t\tthis.date_api.getMonthOfYearArray( false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.month_of_year_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( res );\n\t\t\t}\n\t\t} );\n\t\tthis.date_api.getDayOfMonthArray( {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.day_of_month_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( res );\n\t\t\t}\n\t\t} );\n\t}\n\n\t//Override for: Do not show a few of the default columns when in Edit Employee sub-view \"Tax\" tab.\n\tsetSelectLayout() {\n\t\tif ( this.sub_view_mode ) {\n\t\t\tsuper.setSelectLayout( ['legal_entity_legal_name', 'total_users'] );\n\t\t} else {\n\t\t\tsuper.setSelectLayout();\n\t\t}\n\t}\n\n\tsetEditMenuSaveAndContinueIcon( context_btn, pId ) {\n\t\tthis.saveAndContinueValidate( context_btn, pId );\n\n\t\tif ( this.is_mass_editing || this.is_viewing || ( this.sub_view_mode && ( !this.current_edit_record || !this.current_edit_record.id ) ) ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuAddIcon( context_btn, pId ) {\n\t\tif ( !this.addPermissionValidate( pId ) || this.edit_only_mode ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\t// The following functions are to disable various buttons on Employee Settings tab.\n\t// This was due to users getting confused as to what they were deleting (employee entry in table vs tax/deduc record). See issue #2688\n\tdisableIconOnEmployeeSettingsTab( context_btn ) {\n\t\tif ( this.getEditViewActiveTabName() === 'tab_employee_setting' ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuDeleteIcon( context_btn ) {\n\t\tthis.disableIconOnEmployeeSettingsTab( context_btn );\n\t}\n\n\tsetEditMenuDeleteAndNextIcon( context_btn ) {\n\t\tthis.disableIconOnEmployeeSettingsTab( context_btn );\n\t}\n\n\tsetEditMenuCopyIcon( context_btn ) {\n\t\tthis.disableIconOnEmployeeSettingsTab( context_btn );\n\t}\n\n\tsetEditMenuCopyAndAddIcon( context_btn ) {\n\t\tthis.disableIconOnEmployeeSettingsTab( context_btn );\n\t}\n\n\tsetEditMenuSaveAndCopyIcon( context_btn ) {\n\t\tthis.disableIconOnEmployeeSettingsTab( context_btn );\n\t}\n\n\tenableIconOnEmployeeSettingsTab( context_btn ) {\n\t\tif ( this.getEditViewActiveTabName() === 'tab_employee_setting' ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t}\n\t}\n\n\tsetEditMenuExportIcon( context_btn ) {\n\t\tthis.enableIconOnEmployeeSettingsTab( context_btn );\n\t}\n\n\tonExportClick() {\n\t\tif ( this.is_edit == true && this.getEditViewActiveTabName() === 'tab_employee_setting' ) {\n\t\t\tthis.employee_setting_grid.grid2csv( 'export_user_deduction' );\n\t\t} else {\n\t\t\tsuper.onExportClick( 'export' + this.api.key_name );\n\t\t}\n\t}\n\n\tsaveInsideEditorData( callBack ) {\n\t\tvar $this = this;\n\n\t\t// #2764 do not check for this.sub_view_mode as Save icon will fail to save. Save and Save&Continue should have the same logic regardless of sub_view. See issue or commit ee0102be0f45f954a78b7f96b6cf2f2350b73dd7 context on this.sub_view_mode and save&continue.\n\t\t// if ( !this.current_edit_record || !this.current_edit_record.id || this.sub_view_mode ) {\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( callBack ) ) {\n\t\t\t\tcallBack();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this.employee_setting_grid ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar data = this.employee_setting_grid.getGridParam( 'data' );\n\t\tvar columns = this.employee_setting_grid.getGridParam( 'colModel' );\n\n\t\tfor ( var i = 0; i < data.length; i++ ) {\n\t\t\tvar item = data[i];\n\t\t\tif ( this.start_dates && this.start_dates.length > 0 ) {\n\t\t\t\titem.start_date = this.start_dates[i].getValue();\n\t\t\t}\n\t\t\tif ( this.length_dates && this.length_dates.length > 0 ) {\n\t\t\t\titem.length_of_service_date = this.length_dates[i].getValue();\n\t\t\t}\n\t\t\tif ( this.end_dates && this.end_dates.length > 0 ) {\n\t\t\t\titem.end_date = this.end_dates[i].getValue();\n\t\t\t}\n\t\t\tfor ( var j = 1; j < columns.length; j++ ) {\n\t\t\t\tvar column = columns[j];\n\t\t\t\tif ( item[column.name] === this.original_current_record[column.name] ) {\n\t\t\t\t\titem[column.name] = false; //Default column setting\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( data && data.length > 0 ) {\n\t\t\t//Only send data from the Employee Settings tab to the API that has changed.\n\t\t\tlet changed_data = this.getChangedRecords( data, this.employee_setting_result, [] );\n\n\t\t\tif ( Array.isArray( changed_data ) && changed_data.length > 0 ) {\n\t\t\t\tthis.user_deduction_api.setUserDeduction( changed_data, {\n\t\t\t\t\tonResult: function() {\n\t\t\t\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( callBack ) ) {\n\t\t\t\t\t\t\tcallBack();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t//Still execute the callback so Save & Next can move to the next record when there is no Employees assigned to it\n\t\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( callBack ) ) {\n\t\t\t\t\tcallBack();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//Still execute the callback so Save & Next can move to the next record when there is no Employees assigned to it\n\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( callBack ) ) {\n\t\t\t\tcallBack();\n\t\t\t}\n\t\t}\n\t}\n\n\tonContextMenuClick( context_btn, menu_name ) {\n\t\tif ( this.select_grid_last_row ) {\n\t\t\tthis.employee_setting_grid.grid.jqGrid( 'saveRow', this.select_grid_last_row );\n\t\t\tthis.setDateCellsEnabled( false, this.select_grid_last_row );\n\t\t\tthis.select_grid_last_row = null;\n\t\t}\n\n\t\treturn super.onContextMenuClick( context_btn, menu_name );\n\t}\n\n\tgetDeleteSelectedRecordId() {\n\t\tif ( !this.sub_view_mode ) {\n\t\t\treturn super.getDeleteSelectedRecordId();\n\t\t} else {\n\t\t\tvar retval = [];\n\n\t\t\tif ( this.edit_view ) {\n\t\t\t\tretval.push( this.employee_setting_result[0].id );\n\t\t\t} else {\n\t\t\t\tvar args = { filter_data: {} };\n\t\t\t\tvar tax_ids = this.getGridSelectIdArray().slice();\n\t\t\t\targs.filter_data.company_deduction_id = tax_ids;\n\t\t\t\targs.filter_data.user_id = this.parent_value;\n\n\t\t\t\tvar res = this.user_deduction_api.getUserDeduction( args, true, { async: false } ).getResult();\n\n\t\t\t\tfor ( var i = 0; i < res.length; i++ ) {\n\t\t\t\t\tvar item = res[i];\n\t\t\t\t\tretval.push( item.id );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn retval;\n\t\t}\n\t}\n\n\tdoDeleteAPICall( remove_ids, callback ) {\n\t\tif ( !this.sub_view_mode ) {\n\t\t\treturn super.doDeleteAPICall( remove_ids, callback );\n\t\t} else {\n\t\t\tif ( !callback ) {\n\t\t\t\tcallback = {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\tthis.onDeleteResult( result, remove_ids );\n\t\t\t\t\t}.bind( this )\n\t\t\t\t};\n\t\t\t}\n\t\t\t// return this.api['delete' + this.api.key_name]( remove_ids, callback );\n\t\t\treturn this.user_deduction_api.deleteUserDeduction( remove_ids, callback );\n\t\t}\n\t}\n\n\tonSaveClick( ignoreWarning ) {\n\t\tvar $this = this;\n\t\tvar record;\n\t\tif ( !_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( ignoreWarning ) ) {\n\t\t\tignoreWarning = false;\n\t\t}\n\t\t//Setting is_add false too early can cause determineContextMenuMountAttributes() to have unexpected side effects. However not setting it here might have other side effects.\n\t\t//this.is_add = false;\n\t\tLocalCacheData.current_doing_context_action = 'save';\n\t\tif ( this.is_mass_editing ) {\n\t\t\tvar changed_fields = this.getChangedFields();\n\t\t\trecord = this.buildMassEditSaveRecord( this.mass_edit_record_ids, changed_fields );\n\t\t\t// var check_fields = {};\n\t\t\t// for ( var key in this.edit_view_ui_dic ) {\n\t\t\t// \tvar widget = this.edit_view_ui_dic[key];\n\t\t\t//\n\t\t\t// \tif ( Global.isSet( widget.isChecked ) ) {\n\t\t\t// \t\tif ( widget.isChecked() ) {\n\t\t\t// \t\t\tcheck_fields[key] = this.current_edit_record[key];\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// }\n\t\t\t// record = [];\n\t\t\t// $.each( this.mass_edit_record_ids, function( index, value ) {\n\t\t\t// \tvar common_record = Global.clone( check_fields );\n\t\t\t// \tcommon_record.id = value;\n\t\t\t// \trecord.push( common_record );\n\t\t\t//\n\t\t\t// } );\n\t\t} else {\n\t\t\trecord = this.current_edit_record;\n\t\t}\n\t\trecord = this.uniformVariable( record );\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.api['set' + this.api.key_name]( record, false, ignoreWarning, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t$this.onSaveResult( result );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( !this.current_edit_record.id ) {\n\t\t\t\tthis.user_deduction_api.setUserDeduction( record, false, ignoreWarning, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t$this.onSaveResult( result );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t\t$this.refresh_id = $this.current_edit_record.id; // as add\n\t\t\t\t\t$this.search();\n\n\t\t\t\t\t$this.removeEditView();\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\tonSaveAndContinue( ignoreWarning ) {\n\t\tvar $this = this;\n\t\tif ( !_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( ignoreWarning ) ) {\n\t\t\tignoreWarning = false;\n\t\t}\n\t\tthis.is_changed = false;\n\t\tthis.is_add = false;\n\t\tLocalCacheData.current_doing_context_action = 'save_and_continue';\n\t\tvar record = this.current_edit_record;\n\t\trecord = this.uniformVariable( record );\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.api['set' + this.api.key_name]( record, false, ignoreWarning, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t$this.onSaveAndContinueResult( result );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\t// Only edit record can go here\n\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\t\t\t\t$this.search( false );\n\t\t\t\t$this.onEditClick( $this.refresh_id, true );\n\t\t\t} );\n\t\t}\n\t}\n\n\tonSaveAndNextClick( ignoreWarning ) {\n\t\tvar $this = this;\n\t\tif ( !_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( ignoreWarning ) ) {\n\t\t\tignoreWarning = false;\n\t\t}\n\t\tthis.is_add = false;\n\t\tthis.is_changed = false;\n\n\t\tvar record = this.current_edit_record;\n\t\tLocalCacheData.current_doing_context_action = 'save_and_next';\n\t\trecord = this.uniformVariable( record );\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.api['set' + this.api.key_name]( record, false, ignoreWarning, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t$this.onSaveAndNextResult( result );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\t// Only edit record can go here\n\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\t\t\t\t$this.onRightArrowClick();\n\t\t\t\t$this.search( false );\n\t\t\t} );\n\t\t}\n\t}\n\n\t//Make sure this.current_edit_record is updated before validate\n\tvalidate() {\n\t\tvar $this = this;\n\t\tvar record = {};\n\t\tif ( this.is_mass_editing ) {\n\t\t\tfor ( var key in this.edit_view_ui_dic ) {\n\t\t\t\tif ( !this.edit_view_ui_dic.hasOwnProperty( key ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tvar widget = this.edit_view_ui_dic[key];\n\t\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( widget.isChecked ) ) {\n\t\t\t\t\tif ( widget.isChecked() && widget.getEnabled() ) {\n\t\t\t\t\t\trecord[key] = widget.getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\trecord = this.current_edit_record;\n\t\t}\n\t\trecord = this.uniformVariable( record );\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.api['validate' + this.api.key_name]( record, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t$this.validateResult( result );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.user_deduction_api.validateUserDeduction( record, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t$this.validateResult( result );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tuniformVariable( record ) {\n\t\tif ( this.sub_view_mode && ( !this.current_edit_record || !this.current_edit_record.id ) ) {\n\n\t\t\trecord = [];\n\n\t\t\tvar selected_items = this.edit_view_ui_dic.company_tax_deduction_ids.getValue();\n\t\t\tfor ( var i = 0; i < selected_items.length; i++ ) {\n\t\t\t\tvar new_record = {};\n\t\t\t\tnew_record.user_id = this.parent_value;\n\t\t\t\tnew_record.company_deduction_id = selected_items[i].id;\n\t\t\t\trecord.push( new_record );\n\t\t\t}\n\n\t\t}\n\n\t\treturn record;\n\t}\n\n\tonSaveResult( result ) {\n\t\tvar $this = this;\n\t\tif ( result.isValid() ) {\n\t\t\tvar result_data = result.getResult();\n\n\t\t\tif ( !this.sub_view_mode ) {\n\t\t\t\tif ( result_data === true ) {\n\t\t\t\t\t$this.refresh_id = $this.current_edit_record.id; // as add\n\t\t\t\t} else if ( TTUUID.isUUID( result_data ) && result_data != TTUUID.zero_id && result_data != TTUUID.not_exist_id ) { // as new\n\t\t\t\t\t$this.refresh_id = result_data;\n\t\t\t\t}\n\t\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t\t$this.search();\n\t\t\t\t\t$this.onSaveDone( result );\n\n\t\t\t\t\t$this.removeEditView();\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t$this.refresh_id = null;\n\t\t\t\t$this.search();\n\t\t\t\t$this.onSaveDone( result );\n\n\t\t\t\t$this.removeEditView();\n\t\t\t}\n\n\t\t} else {\n\t\t\t$this.setErrorMenu();\n\t\t\t$this.setErrorTips( result );\n\n\t\t}\n\t}\n\n\tonSaveAndCopyResult( result ) {\n\t\tvar $this = this;\n\t\tif ( result.isValid() ) {\n\t\t\tvar result_data = result.getResult();\n\t\t\tif ( result_data === true ) {\n\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\n\t\t\t} else if ( TTUUID.isUUID( result_data ) && result_data != TTUUID.zero_id && result_data != TTUUID.not_exist_id ) {\n\t\t\t\t$this.refresh_id = result_data;\n\t\t\t}\n\n\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t$this.search( false );\n\t\t\t\t$this.onCopyAsNewClick();\n\n\t\t\t} );\n\n\t\t} else {\n\t\t\t$this.setErrorTips( result );\n\t\t\t$this.setErrorMenu();\n\t\t}\n\t}\n\n\t_continueDoCopyAsNew() {\n\t\tthis.setCurrentEditViewState( 'new' );\n\t\tLocalCacheData.current_doing_context_action = 'copy_as_new';\n\n\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( this.edit_view ) ) {\n\t\t\tthis.employee_setting_grid.clearGridData();\n\t\t\tthis.edit_view_ui_dic.calculation_id.setEnabled( true );\n\t\t}\n\t\tsuper._continueDoCopyAsNew();\n\t}\n\n\tclearEditViewData() {\n\n\t\tfor ( var key in this.edit_view_ui_dic ) {\n\n\t\t\tif ( !this.edit_view_ui_dic.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.edit_view_ui_dic[key].setValue( null );\n\t\t\tthis.edit_view_ui_dic[key].clearErrorStyle();\n\t\t}\n\n\t\tif ( this.employee_setting_grid ) {\n\t\t\tthis.employee_setting_grid.clearGridData();\n\t\t}\n\t}\n\n\tcheckTabPermissions( tab ) {\n\t\tvar retval = false;\n\n\t\tswitch ( tab ) {\n\t\t\tcase 'tab_attachment':\n\t\t\t\tif ( this.subDocumentValidate() ) {\n\t\t\t\t\tretval = !this.sub_view_mode;\n\t\t\t\t} else {\n\t\t\t\t\tretval = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_tax_deductions':\n\t\t\tcase 'tab_eligibility':\n\t\t\tcase 'tab_employee_setting':\n\t\t\tcase 'tab_audit':\n\t\t\t\t//Don't show these tabs when under Edit Employee, Tax tab.\n\t\t\t\tif ( this.sub_view_mode ) {\n\t\t\t\t\tif ( tab == 'tab_employee_setting' && this.current_edit_record.id ) {\n\t\t\t\t\t\tretval = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tretval = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab5':\n\t\t\t\tif ( this.sub_view_mode ) {\n\t\t\t\t\tif ( tab == 'tab5' && this.current_edit_record.id ) {\n\t\t\t\t\t\tretval = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tretval = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretval = super.checkTabPermissions( tab );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn retval;\n\t}\n\n\tsetProvince( val, m ) {\n\t\tvar $this = this;\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.province_array = [];\n\n\t\t} else {\n\n\t\t\tthis.company_api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.province_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( res );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\teSetProvince( val, refresh ) {\n\n\t\tvar $this = this;\n\t\tvar province_widget = $this.edit_view_ui_dic['province'];\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.e_province_array = [];\n\t\t\tprovince_widget.setSourceData( [] );\n\t\t} else {\n\t\t\tthis.company_api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.e_province_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( res );\n\t\t\t\t\tprovince_widget.setSourceData( $this.e_province_array );\n\t\t\t\t\t$this.setProvinceVisibility();\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\t\tvar c_value = target.getValue();\n\t\tthis.current_edit_record[key] = c_value;\n\n\t\tswitch ( key ) {\n\n\t\t\tcase 'country':\n\t\t\t\tvar widget = this.edit_view_ui_dic['province'];\n\t\t\t\tvar widget_2 = this.edit_view_ui_dic['district'];\n\t\t\t\twidget.setValue( null );\n\t\t\t\twidget_2.setValue( null );\n\t\t\t\tthis.current_edit_record.province = false;\n\t\t\t\tthis.current_edit_record.district = false;\n\t\t\t\tthis.setDynamicFields( null, true );\n\t\t\t\tbreak;\n\t\t\tcase 'province':\n\t\t\t\twidget_2 = this.edit_view_ui_dic['district'];\n\t\t\t\tthis.setDistrict( this.current_edit_record['country'] );\n\t\t\t\twidget_2.setValue( null );\n\t\t\t\tthis.setDynamicFields( null, true );\n\t\t\t\tbreak;\n\t\t\tcase 'calculation_id':\n\t\t\t\tthis.setDynamicFields();\n\t\t\t\tbreak;\n\t\t\tcase 'apply_frequency_id':\n\t\t\t\tthis.onApplyFrequencyChange();\n\t\t\t\tbreak;\n\t\t\tcase 'minimum_length_of_service_unit_id':\n\t\t\tcase 'maximum_length_of_service_unit_id':\n\t\t\t\tthis.onLengthOfServiceChange();\n\t\t\t\tbreak;\n\t\t\tcase 'start_date':\n\t\t\tcase 'end_date':\n\t\t\tcase 'minimum_length_of_service':\n\t\t\tcase 'maximum_length_of_service':\n\t\t\t\tthis.resetEmployeeSettingGridColumns();\n\t\t\t\tbreak;\n\t\t\tcase 'legal_entity_id':\n\t\t\t\tthis.onLegalEntityChange();\n\t\t\t\tthis.updateEmployeeData();\n\t\t\t\tbreak;\n\t\t\tcase 'user_value10':\n\t\t\t\tthis.onFormW4VersionChange();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( key === 'country' ) {\n\t\t\tthis.onCountryChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\tvar $this = this;\n\n\t\tthis.original_current_record = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.clone */ .x.clone( this.current_edit_record );\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.current_edit_record ) {\n\n\t\t\tif ( !this.current_edit_record.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar widget = this.edit_view_ui_dic[key];\n\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'country':\n\t\t\t\t\t\tthis.eSetProvince( this.current_edit_record[key] );\n\t\t\t\t\t\tthis.setDistrict( this.current_edit_record[key] );\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tif ( $this.current_edit_record.id ) {\n\t\t\t$this.edit_view_ui_dic.calculation_id.setEnabled( false );\n\t\t} else {\n\t\t\t$this.edit_view_ui_dic.calculation_id.setEnabled( true );\n\t\t}\n\n\t\tthis.setDynamicFields( function() {\n\t\t\t$this.collectUIDataToCurrentEditRecord();\n\t\t\t$this.onLengthOfServiceChange();\n\t\t\t$this.setEditViewDataDone();\n\t\t\t$this.edit_view_ui_dic.company_tax_deduction_ids.setGridColumnsWidths();\n\t\t\t$this.onLegalEntityChange();\n\t\t} );\n\n\t\tif ( this.sub_view_mode && ( !this.current_edit_record || !this.current_edit_record.id ) ) {\n\t\t\tthis.initCompanyTaxDeductionData();\n\t\t}\n\t}\n\n\tonLegalEntityChange() {\n\t\tvar pra_value = this.edit_view_ui_dic.payroll_remittance_agency_id.getValue();\n\t\tvar new_arg = {};\n\t\tnew_arg.filter_data = { legal_entity_id: this.edit_view_ui_dic.legal_entity_id.getValue() };\n\t\tnew_arg.filter_columns = this.edit_view_ui_dic.payroll_remittance_agency_id.getColumnFilter();\n\n\t\tvar $this = this;\n\t\tif ( this.edit_view_ui_dic.legal_entity_id.getValue() != TTUUID.zero_id ) {\n\t\t\tthis.payroll_remittance_agency_api.getPayrollRemittanceAgency( new_arg, {\n\t\t\t\tonResult: function( task_result ) {\n\t\t\t\t\tvar data = task_result.getResult();\n\n\t\t\t\t\tif ( $this.edit_view_ui_dic.payroll_remittance_agency_id ) {\n\t\t\t\t\t\tif ( data.length > 0 ) {\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setSourceData( data );\n\n\t\t\t\t\t\t\tvar id_in_result = false;\n\t\t\t\t\t\t\tfor ( var i in data ) {\n\t\t\t\t\t\t\t\tif ( data[i].id == pra_value ) {\n\t\t\t\t\t\t\t\t\tid_in_result = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( id_in_result === false ) {\n\t\t\t\t\t\t\t\tpra_value = TTUUID.zero_id;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this.current_edit_record.payroll_remittance_agency_id = pra_value;\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setValue( pra_value );\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setValue( TTUUID.zero_id );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setEnabled( true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tpra_value = TTUUID.zero_id;\n\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setSourceData( [TTUUID.zero_id] ); //wipe the box\n\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setValue( pra_value );\n\t\t\t$this.edit_view_ui_dic.payroll_remittance_agency_id.setEnabled( false );\n\t\t}\n\t}\n\n\tupdateEmployeeData() {\n\t\tvar request_data = { filter_data: {} };\n\t\tif ( this.edit_view_ui_dic && this.edit_view_ui_dic.legal_entity_id && this.edit_view_ui_dic.legal_entity_id.getValue() && this.edit_view_ui_dic.legal_entity_id.getValue() != TTUUID.zero_id ) {\n\t\t\trequest_data.filter_data.legal_entity_id = this.edit_view_ui_dic.legal_entity_id.getValue();\n\t\t}\n\t\tif ( this.edit_view_ui_dic.user ) {\n\t\t\tthis.edit_view_ui_dic.user.setDefaultArgs( request_data );\n\t\t\tthis.edit_view_ui_dic.user.setSourceData( null );\n\t\t}\n\t}\n\n\tonLengthOfServiceChange() {\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.current_edit_record['minimum_length_of_service_unit_id'] == 50 || this.current_edit_record['maximum_length_of_service_unit_id'] == 50 ) {\n\t\t\tthis.attachElement( 'length_of_service_contributing_pay_code_policy_id' );\n\t\t} else {\n\t\t\tthis.detachElement( 'length_of_service_contributing_pay_code_policy_id' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tinitCompanyTaxDeductionData() {\n\n\t\tvar $this = this;\n\n\t\tvar request_data = {\n\t\t\tfilter_data: {\n\t\t\t\tlegal_entity_id: [this.parent_edit_record.legal_entity_id, TTUUID.zero_id, TTUUID.not_exist_id],\n\t\t\t\texclude_user_id: this.parent_edit_record.id //Don't show records the employee is already assinged to. Helps prevent duplicate mappings.\n\t\t\t},\n\t\t\tfilter_columns: { //Make sure we limit the columns, otherwise this can be slow to load since it tries to count the number of employees assigned to each Tax/Deduction record.\n\t\t\t\tid: true,\n\t\t\t\tname: true,\n\t\t\t}\n\t\t};\n\n\t\tthis.api.getCompanyDeduction( request_data, true, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t$this.edit_view_ui_dic.company_tax_deduction_ids.setUnselectedGridData( result_data );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.onApplyFrequencyChange();\n\t\tthis.initEmployeeSetting();\n\t\tthis.updateEmployeeData();\n\t}\n\n\tsetDistrict( c ) {\n\t\tvar $this = this;\n\t\tvar district_widget = $this.edit_view_ui_dic['district'];\n\n\t\t$this.province_district_array = [];\n\t\tdistrict_widget.setSourceData( $this.province_district_array );\n\t\tif ( c ) {\n\t\t\tvar pd_array = this.district_array[c];\n\n\t\t\tif ( pd_array ) {\n\t\t\t\tvar pd_array_item = pd_array[$this.current_edit_record.province];\n\n\t\t\t\tif ( pd_array_item ) {\n\t\t\t\t\t$this.province_district_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( pd_array_item );\n\t\t\t\t\tdistrict_widget.setSourceData( $this.province_district_array );\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t$this.setDistrictVisibility();\n\t}\n\n\thideAllDynamicFields( keepC, keepP ) {\n\n\t\tif ( !this.edit_view ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !keepC ) {\n\t\t\tthis.show_c = false;\n\t\t\tthis.detachElement( 'country' );\n\t\t}\n\n\t\tif ( !keepP ) {\n\t\t\tthis.show_p = false;\n\t\t\tthis.show_dc = false;\n\t\t\tthis.detachElement( 'province' );\n\t\t\tthis.detachElement( 'district' );\n\t\t}\n\n\t\tthis.detachElement( 'df_0' );\n\t\tthis.detachElement( 'df_1' );\n\t\tthis.detachElement( 'df_2' );\n\t\tthis.detachElement( 'df_3' );\n\t\tthis.detachElement( 'df_4' );\n\t\tthis.detachElement( 'df_5' );\n\t\tthis.detachElement( 'df_6' );\n\t\tthis.detachElement( 'df_7' );\n\t\tthis.detachElement( 'df_8' );\n\t\tthis.detachElement( 'df_9' );\n\t\tthis.detachElement( 'df_10' );\n\t\tthis.detachElement( 'df_11' );\n\t\tthis.detachElement( 'df_12' );\n\t\tthis.detachElement( 'df_14' );\n\t\tthis.detachElement( 'df_15' );\n\n\t\tthis.detachElement( 'df_20' );\n\t\tthis.detachElement( 'df_21' );\n\t\tthis.detachElement( 'df_22' );\n\t\tthis.detachElement( 'df_23' );\n\t\tthis.detachElement( 'df_24' );\n\t\tthis.detachElement( 'df_25' );\n\n\t\tif ( !( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.getProductEdition */ .x.getProductEdition() >= 15 ) ) {\n\t\t\tthis.detachElement( 'df_100' );\n\t\t}\n\t}\n\n\tinitEmployeeSetting() {\n\t\tvar $this = this;\n\n\t\tif ( !$this.edit_view ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\t$this.employee_setting_result = [];\n\t\t\t//Don't display the Employee Settings grid headers when its a new record.\n\t\t\t//$this.setEmployeeSettingGridData( $this.buildEmployeeSettingGrid() );\n\t\t\treturn;\n\t\t}\n\n\t\t// Specify which menu to use for Employee Settings tab, and use disableIconOnEmployeeSettingsTab() to disable certain icons. Related to #2688\n\t\tthis.buildContextMenu( true );\n\t\tthis.setEditMenu();\n\t\tvar context_menu_array = ContextMenuManager.getMenuModelByMenuId( this.determineContextMenuMountAttributes().id );\n\t\tvar len = context_menu_array.length;\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tlet context_btn = context_menu_array[i];\n\t\t\tlet id = context_menu_array[i].id;\n\n\t\t\tif ( id === 'export_excel' ) {\n\t\t\t\tthis.setEditMenuExportIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\t\tvar args = { filter_data: {} };\n\n\t\targs.filter_data.company_deduction_id = this.current_edit_record.id;\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\targs.filter_data.user_id = this.parent_value;\n\t\t}\n\n\t\tthis.user_deduction_api.getUserDeduction( args, true, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$this.employee_setting_result = result.getResult();\n\t\t\t\t$this.setEmployeeSettingGridData( $this.buildEmployeeSettingGrid() );\n\t\t\t}\n\t\t} );\n\t}\n\n\tresetEmployeeSettingGridColumns() {\n\t\tif ( this.employee_setting_grid ) {\n\t\t\tvar data = this.employee_setting_grid.getGridParam( 'data' );\n\t\t\t_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.formatGridData */ .x.formatGridData( data, this.api.key_name );\n\t\t\tthis.buildEmployeeSettingGrid();\n\t\t\tthis.employee_setting_grid.setData( data );\n\t\t\tthis.removeEmployeeSettingNoResultCover();\n\t\t\tthis.setEmployeeGridDateColumns();\n\t\t\tthis.setEmployeeGridSize();\n\t\t\tif ( data.length < 1 && this.current_edit_record.id ) {\n\t\t\t\tthis.showEmployeeSettingNoResultCover();\n\t\t\t}\n\t\t}\n\t}\n\n\tgetColumnOptionsString( column_options_arr ) {\n\t\tvar column_options_string = '';\n\t\tfor ( var i = 0; i < column_options_arr.length; i++ ) {\n\t\t\tif ( i !== column_options_arr.length - 1 ) {\n\t\t\t\tcolumn_options_string += column_options_arr[i].fullValue + ':' + column_options_arr[i].label + ';';\n\t\t\t} else {\n\t\t\t\tcolumn_options_string += column_options_arr[i].fullValue + ':' + column_options_arr[i].label;\n\t\t\t}\n\t\t}\n\n\t\treturn column_options_string;\n\t}\n\n\t/* jshint ignore:start */\n\tbuildEmployeeSettingGrid() {\n\t\tvar $this = this;\n\t\tvar column_info_array = [];\n\n\t\tvar column_info = {\n\t\t\tname: 'employee_number',\n\t\t\tindex: 'employee_number',\n\t\t\tlabel: $.i18n._( 'Employee Number' ),\n\t\t\twidth: 100,\n\t\t\tsortable: false,\n\t\t\ttitle: false\n\t\t};\n\t\tcolumn_info_array.push( column_info );\n\n\t\tvar column_info = {\n\t\t\tname: 'user_name',\n\t\t\tindex: 'user_name',\n\t\t\tlabel: $.i18n._( 'Employee' ),\n\t\t\twidth: 100,\n\t\t\tsortable: false,\n\t\t\ttitle: false\n\t\t};\n\t\tcolumn_info_array.push( column_info );\n\n\t\t$this.api.getOptions( 'calculation_type_column_meta_data', {\n\t\t\t'calculation_id': $this.current_edit_record.calculation_id,\n\t\t\t'country': $this.current_edit_record.country,\n\t\t\t'province': $this.current_edit_record.province\n\t\t}, {\n\t\t\t//Issue #3302 - Opening tax/deduction record on Employee -> Employees would not always show correct data on first opening the record. (Only after this call was cached)\n\t\t\t//This call needs to be synchronous so that the column_info_array is populated with all relevant data before the grid is built and function returns.\n\t\t\tasync: false,\n\t\t\tonResult: function( result ) {\n\t\t\t\tresult = result.getResult();\n\n\t\t\t\tfor ( var key in result ) {\n\t\t\t\t\tlet meta_data = result[key];\n\t\t\t\t\tlet dynamic_field_id = meta_data['dynamic_field_id'];\n\n\t\t\t\t\tif ( meta_data.type_id == 2100 ) {\n\t\t\t\t\t\t//$this.edit_view_ui_dic[dynamic_field_id].setSourceData( Global.buildRecordArray( meta_data.multi_select_items ) );\n\t\t\t\t\t\tcolumn_info = {\n\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\tindex: key,\n\t\t\t\t\t\t\tlabel: meta_data.name,\n\t\t\t\t\t\t\twidth: meta_data.width,\n\t\t\t\t\t\t\tsortable: false,\n\t\t\t\t\t\t\tformatter: 'select',\n\t\t\t\t\t\t\teditable: true,\n\t\t\t\t\t\t\ttitle: false,\n\t\t\t\t\t\t\tedittype: 'select',\n\t\t\t\t\t\t\teditoptions: {\n\t\t\t\t\t\t\t\tdefaultValue: meta_data.default_value, //This is required to prevent a blank cell from appearing if they haven't saved the Tax/Deduction record since the upgrade.\n\t\t\t\t\t\t\t\tvalue: $this.getColumnOptionsString( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( meta_data.multi_select_items ) ),\n\t\t\t\t\t\t\t\t//dataEvents: [ {type: 'change', fn:function(e) { $this.onFormItemChange( e.target, true )}} ],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcolumn_info = {\n\t\t\t\t\t\t\tname: key,\n\t\t\t\t\t\t\tindex: key,\n\t\t\t\t\t\t\tlabel: meta_data.name,\n\t\t\t\t\t\t\twidth: meta_data.width,\n\t\t\t\t\t\t\tsortable: false,\n\t\t\t\t\t\t\ttitle: false,\n\t\t\t\t\t\t\teditable: true,\n\t\t\t\t\t\t\tedittype: 'text'\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tcolumn_info_array.push( column_info );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tif ( ( this.current_edit_record.minimum_length_of_service && this.current_edit_record.minimum_length_of_service != 0 ) ||\n\t\t\t( this.current_edit_record.maximum_length_of_service && this.current_edit_record.maximum_length_of_service ) != 0 ) {\n\t\t\tcolumn_info = {\n\t\t\t\tname: 'length_of_service_date',\n\t\t\t\tindex: 'length_of_service_date',\n\t\t\t\tlabel: $.i18n._( 'Length of Service Date' ),\n\t\t\t\twidth: 110,\n\t\t\t\tsortable: false,\n\t\t\t\ttitle: false,\n\t\t\t\teditable: false,\n\t\t\t\tformatter: this.onLengthDateCellFormat\n\t\t\t};\n\t\t\tcolumn_info_array.push( column_info );\n\t\t} else {\n\t\t\t$( '.row-date-picker-length-of-service-date' ).remove();\n\t\t}\n\n\t\tif ( this.current_edit_record.start_date || this.current_edit_record.end_date ) {\n\t\t\tcolumn_info = {\n\t\t\t\tname: 'start_date',\n\t\t\t\tindex: 'start_date',\n\t\t\t\tlabel: $.i18n._( 'Start Date' ),\n\t\t\t\twidth: 110,\n\t\t\t\tsortable: false,\n\t\t\t\ttitle: false,\n\t\t\t\teditable: false,\n\t\t\t\tformatter: this.onStartDateCellFormat\n\t\t\t};\n\t\t\tcolumn_info_array.push( column_info );\n\n\t\t\tcolumn_info = {\n\t\t\t\tname: 'end_date',\n\t\t\t\tindex: 'end_date',\n\t\t\t\tlabel: $.i18n._( 'End Date' ),\n\t\t\t\twidth: 110,\n\t\t\t\tsortable: false,\n\t\t\t\ttitle: false,\n\t\t\t\teditable: false,\n\t\t\t\tformatter: this.onEndDateCellFormat\n\t\t\t};\n\t\t\tcolumn_info_array.push( column_info );\n\t\t} else {\n\t\t\t$( '.row-date-picker-start-date' ).remove();\n\t\t\t$( '.row-date-picker-end-date' ).remove();\n\t\t}\n\n\t\t//Add Exempt column to all Federal/Provincial/State/District taxes.\n\t\tif ( ( this.current_edit_record.calculation_id == 100 || this.current_edit_record.calculation_id == 200 || this.current_edit_record.calculation_id == 300 ) && this.current_edit_record.country == 'US' ) {\n\t\t\tcolumn_info = {\n\t\t\t\tname: 'user_value10',\n\t\t\t\tindex: 'user_value10',\n\t\t\t\tlabel: $.i18n._( 'Exempt' ),\n\t\t\t\twidth: 30,\n\t\t\t\tsortable: false,\n\t\t\t\tformatter: 'select',\n\t\t\t\teditable: true,\n\t\t\t\ttitle: false,\n\t\t\t\tedittype: 'select',\n\t\t\t\teditoptions: { value: this.getColumnOptionsString( this.yes_no_array ) }\n\t\t\t};\n\t\t\tcolumn_info_array.push( column_info );\n\t\t}\n\n\t\tif ( this.employee_setting_grid ) {\n\t\t\tthis.employee_setting_grid.grid.jqGrid( 'GridUnload' );\n\t\t\tthis.employee_setting_grid = null;\n\t\t}\n\n\t\tthis.employee_setting_grid = new TTGrid( 'employee_setting_grid', {\n\t\t\tcontainer_selector: '.edit-view-tab',\n\t\t\tmultiselect: false,\n\t\t\twinMultiSelect: false,\n\t\t\tcolModel: column_info_array,\n\t\t\tediturl: 'clientArray',\n\t\t\tonSelectRow: function( id ) {\n\t\t\t\tif ( id && !$this.is_viewing ) {\n\n\t\t\t\t\tif ( $this.select_grid_last_row ) {\n\t\t\t\t\t\t$this.employee_setting_grid.grid.jqGrid( 'saveRow', $this.select_grid_last_row );\n\t\t\t\t\t\t$this.setDateCellsEnabled( false, $this.select_grid_last_row );\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.employee_setting_grid.grid.jqGrid( 'editRow', id, true );\n\t\t\t\t\t$this.setDateCellsEnabled( true, id );\n\t\t\t\t\t$this.select_grid_last_row = id;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonEndEditRow: function( id ) {\n\t\t\t\t$this.setDateCellsEnabled( false, id );\n\t\t\t},\n\t\t\tgridComplete: function() {\n\t\t\t\t$this.setEmployeeGridSize();\n\t\t\t}\n\t\t}, column_info_array );\n\n\t\treturn column_info_array;\n\t}\n\n\tsetEditViewTabSize() {\n\t\tsuper.setEditViewTabSize();\n\t\tthis.setEmployeeGridSize();\n\t}\n\n\tsetDateCellsEnabled( flag, row_id ) {\n\t\tthis.length_dates_dic[row_id] && this.length_dates_dic[row_id].setEnabled( flag );\n\t\tthis.start_dates_dic[row_id] && this.start_dates_dic[row_id].setEnabled( flag );\n\t\tthis.end_dates_dic[row_id] && this.end_dates_dic[row_id].setEnabled( flag );\n\t}\n\n\tonLengthDateCellFormat( cell_value, related_data, row ) {\n\n\t\tvar form_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.addClass( 'row-date-picker-length-of-service-date' );\n\t\tform_item_input.attr( 'widget-value', cell_value );\n\t\treturn form_item_input.get( 0 ).outerHTML;\n\t}\n\n\tonStartDateCellFormat( cell_value, related_data, row ) {\n\n\t\tvar form_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.addClass( 'row-date-picker-start-date' );\n\t\tform_item_input.attr( 'widget-value', cell_value );\n\t\treturn form_item_input.get( 0 ).outerHTML;\n\t}\n\n\tonEndDateCellFormat( cell_value, related_data, row ) {\n\n\t\tvar form_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.addClass( 'row-date-picker-end-date' );\n\t\tform_item_input.attr( 'widget-value', cell_value );\n\t\treturn form_item_input.get( 0 ).outerHTML;\n\t}\n\n\tsetEmployeeSettingGridData( column_info_array ) {\n\n\t\tvar $this = this;\n\t\tvar grid_source = [];\n\t\tif ( $.type( this.employee_setting_result ) === 'array' ) {\n\t\t\tgrid_source = this.employee_setting_result.slice();\n\t\t}\n\n\t\tvar len = grid_source.length;\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tvar item = grid_source[i];\n\t\t\titem.user_name = ( ( item.user_status_id != 10 ) ? '(' + item.user_status + ') ' : '' ) + item.full_name;\n\t\t\tfor ( var j = 1; j < column_info_array.length; j++ ) {\n\n\t\t\t\tvar column = column_info_array[j];\n\t\t\t\tif ( !item[column.name] ) {\n\t\t\t\t\titem[column.name] = ( this.current_edit_record.hasOwnProperty( column.name ) && this.current_edit_record[column.name] !== false ) ? this.current_edit_record[column.name] : '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t$this.employee_setting_grid.setData( grid_source );\n\t\tthis.removeEmployeeSettingNoResultCover();\n\t\tthis.setEmployeeGridDateColumns();\n\n\t\tthis.setEmployeeGridSize();\n\n\t\tif ( grid_source.length < 1 && this.current_edit_record.id ) {\n\t\t\tthis.showEmployeeSettingNoResultCover();\n\t\t}\n\t}\n\n\tsetEmployeeGridDateColumns() {\n\t\tvar i, date_picker;\n\t\tthis.length_dates = [];\n\t\tthis.start_dates = [];\n\t\tthis.end_dates = [];\n\t\tthis.length_dates_dic = {};\n\t\tthis.start_dates_dic = {};\n\t\tthis.end_dates_dic = {};\n\t\tvar date_pickers = $( '.row-date-picker-length-of-service-date' );\n\t\tfor ( var i = 0; i < date_pickers.length; i++ ) {\n\t\t\tdate_picker = $( date_pickers[i] ).TDatePicker( { field: 'length_of_service_date' + i } );\n\t\t\tdate_picker.setEnabled( false );\n\t\t\tthis.length_dates.push( date_picker );\n\t\t\tthis.length_dates_dic[date_picker.parent().parent().attr( 'id' )] = date_picker;\n\t\t}\n\t\tdate_pickers = $( '.row-date-picker-start-date' );\n\t\tfor ( var i = 0; i < date_pickers.length; i++ ) {\n\t\t\tdate_picker = $( date_pickers[i] ).TDatePicker( { field: 'start_date' + i } );\n\t\t\tdate_picker.setEnabled( false );\n\t\t\tthis.start_dates.push( date_picker );\n\t\t\tthis.start_dates_dic[date_picker.parent().parent().attr( 'id' )] = date_picker;\n\t\t}\n\t\tdate_pickers = $( '.row-date-picker-end-date' );\n\t\tfor ( var i = 0; i < date_pickers.length; i++ ) {\n\t\t\tdate_picker = $( date_pickers[i] ).TDatePicker( { field: 'end_date' + i } );\n\t\t\tdate_picker.setEnabled( false );\n\t\t\tthis.end_dates.push( date_picker );\n\t\t\tthis.end_dates_dic[date_picker.parent().parent().attr( 'id' )] = date_picker;\n\t\t}\n\t}\n\n\tshowEmployeeSettingNoResultCover() {\n\n\t\tthis.removeEmployeeSettingNoResultCover();\n\t\tthis.employee_setting_no_result_box = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( WidgetNamesDic.NO_RESULT_BOX );\n\t\tthis.employee_setting_no_result_box.NoResultBox( { related_view_controller: this, is_new: false } );\n\t\tthis.employee_setting_no_result_box.attr( 'id', this.ui_id + 'employee_setting_no_result_box' );\n\t\tvar grid_div = this.edit_view.find( '.employee-setting-grid-div' );\n\n\t\tgrid_div.append( this.employee_setting_no_result_box );\n\t}\n\n\tremoveEmployeeSettingNoResultCover() {\n\t\tif ( this.employee_setting_no_result_box && this.employee_setting_no_result_box.length > 0 ) {\n\t\t\tthis.employee_setting_no_result_box.remove();\n\t\t}\n\t\tthis.employee_setting_no_result_box = null;\n\t}\n\n\tsetEmployeeGridSize() {\n\t\tif ( !this.employee_setting_grid ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tab_employee_setting = this.edit_view.find( '#tab_employee_setting_content_div' );\n\t\tthis.employee_setting_grid.grid.setGridWidth( tab_employee_setting.width() );\n\t\tthis.employee_setting_grid.grid.setGridHeight( tab_employee_setting.height() );\n\t}\n\n\tsetCountryVisibility() {\n\n\t\tif ( this.show_c ) {\n\t\t\tthis.attachElement( 'country' );\n\t\t} else {\n\t\t\tthis.detachElement( 'country' );\n\t\t}\n\t}\n\n\tsetProvinceVisibility() {\n\t\tif ( this.show_p && this.e_province_array && this.e_province_array.length > 1 ) {\n\t\t\tthis.attachElement( 'province' );\n\t\t} else {\n\t\t\tthis.detachElement( 'province' );\n\t\t}\n\t}\n\n\tsetDistrictVisibility() {\n\n\t\tif ( this.show_dc && this.province_district_array && this.province_district_array.length > 0 ) {\n\t\t\tthis.attachElement( 'district' );\n\t\t} else {\n\t\t\tthis.detachElement( 'district' );\n\t\t\tthis.current_edit_record.district = false;\n\t\t}\n\t}\n\n\tsetDynamicFields( callBack, countryOrP ) {\n\n\t\tvar $this = this;\n\t\tif ( !this.current_edit_record.calculation_id ) {\n\t\t\tthis.current_edit_record.calculation_id = '10';\n\t\t\tthis.edit_view_ui_dic.calculation_id.setValue( 10 );\n\t\t}\n\n\t\tvar c_id = this.current_edit_record.calculation_id;\n\n\t\tif ( c_id == 20 ) {\n\t\t\tthis.detachElement( 'include_account_amount_type_id' );\n\t\t\tthis.detachElement( 'exclude_account_amount_type_id' );\n\t\t} else {\n\t\t\tthis.attachElement( 'include_account_amount_type_id' );\n\t\t\tthis.attachElement( 'exclude_account_amount_type_id' );\n\t\t}\n\n\t\tif ( !countryOrP ) {\n\t\t\tthis.hideAllDynamicFields();\n\t\t\tthis.api.isCountryCalculationID( c_id, {\n\t\t\t\tonResult: function( result_1 ) {\n\t\t\t\t\tvar res_data_1 = result_1.getResult();\n\n\t\t\t\t\tif ( res_data_1 === true ) {\n\t\t\t\t\t\t$this.show_c = true;\n\t\t\t\t\t\t$this.setCountryVisibility();\n\t\t\t\t\t\t$this.api.isProvinceCalculationID( c_id, {\n\t\t\t\t\t\t\tonResult: function( result_2 ) {\n\t\t\t\t\t\t\t\tvar res_data_2 = result_2.getResult();\n\t\t\t\t\t\t\t\tif ( res_data_2 === true ) {\n\t\t\t\t\t\t\t\t\t$this.show_p = true;\n\n\t\t\t\t\t\t\t\t\tif ( $this.current_edit_record.country ) {\n\t\t\t\t\t\t\t\t\t\t$this.eSetProvince( $this.current_edit_record.country );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$this.api.isDistrictCalculationID( c_id, {\n\t\t\t\t\t\t\t\t\t\tonResult: function( result_3 ) {\n\t\t\t\t\t\t\t\t\t\t\tvar res_data_3 = result_3.getResult();\n\n\t\t\t\t\t\t\t\t\t\t\tif ( res_data_3 === true ) {\n\t\t\t\t\t\t\t\t\t\t\t\t$this.show_dc = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ( $this.current_edit_record.country ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this.setDistrict( $this.current_edit_record.country );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\thandleDynamicFields();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif ( $this.current_edit_record ) {\n\t\t\t\t\t\t\t\t\t\thandleDynamicFields();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.hideAllDynamicFields();\n\t\t\t\t\t\thandleDynamicFields();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( !this.show_p ) {\n\t\t\t\t$this.hideAllDynamicFields( true, false );\n\t\t\t\thandleDynamicFields();\n\t\t\t} else {\n\t\t\t\t$this.hideAllDynamicFields( true, true );\n\t\t\t\thandleDynamicFields();\n\t\t\t}\n\t\t}\n\n\t\tfunction handleDynamicFields() {\n\t\t\tif ( !$this.edit_view ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( $this.current_edit_record.calculation_id == '100' || $this.current_edit_record.calculation_id == '200' || $this.current_edit_record.calculation_id == '300' ) {\n\t\t\t\t$this.attachElement( 'df_15' );\n\t\t\t\t$this.edit_view_form_item_dic.df_15.find( '.edit-view-form-item-label' ).text( $.i18n._( 'Formula Type' ) );\n\t\t\t\t$this.edit_view_ui_dic.df_15.setField( 'company_value1' );\n\t\t\t\t$this.edit_view_ui_dic.df_15.setValue( $this.current_edit_record.company_value1 );\n\t\t\t}\n\n\t\t\tif ( $this.current_edit_record.calculation_id == '69' && _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.getProductEdition */ .x.getProductEdition() == 10 ) {\n\t\t\t\t$this.attachElement( 'df_100' );\n\t\t\t\t$this.edit_view_ui_dic.df_100.html( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.getUpgradeMessage */ .x.getUpgradeMessage() );\n\t\t\t} else {\n\t\t\t\t$this.api.getOptions( 'calculation_type_column_meta_data', {\n\t\t\t\t\t'calculation_id': $this.current_edit_record.calculation_id,\n\t\t\t\t\t'country': $this.current_edit_record.country,\n\t\t\t\t\t'province': $this.current_edit_record.province,\n\n\t\t\t\t}, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\tresult = result.getResult();\n\n\t\t\t\t\t\tfor ( var key in result ) {\n\t\t\t\t\t\t\tlet meta_data = result[key];\n\t\t\t\t\t\t\tlet dynamic_field_id = meta_data['dynamic_field_id'];\n\n\t\t\t\t\t\t\t$this.attachElement( dynamic_field_id );\n\t\t\t\t\t\t\t$this.edit_view_form_item_dic[dynamic_field_id].find( '.edit-view-form-item-label' ).text( meta_data.name.replace('<br>', ' ') );\n\t\t\t\t\t\t\tif ( meta_data.type_id == 2100 ) {\n\t\t\t\t\t\t\t\t$this.edit_view_ui_dic[dynamic_field_id].setSourceData( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( meta_data.multi_select_items ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this.edit_view_ui_dic[dynamic_field_id].setField( key );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic[dynamic_field_id].setValue( $this.current_edit_record[key] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( $this.current_edit_record.calculation_id == '69' ) { //69=Custom Formula.\n\t\t\t\t\t\t\t$this.attachElement( 'df_11' );\n\t\t\t\t\t\t\t$this.edit_view_form_item_dic.df_11.find( '.edit-view-form-item-label' ).text( $.i18n._( 'Formula' ) );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_11.setField( 'company_value1' );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_11.setValue( $this.current_edit_record.company_value1 );\n\n\t\t\t\t\t\t\t$this.attachElement( 'df_12' );\n\t\t\t\t\t\t\t$this.edit_view_form_item_dic.df_12.find( '.edit-view-form-item-label' ).text( $.i18n._( 'Look Back Period' ) );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_12.setField( 'company_value2' );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_12.setValue( $this.current_edit_record.company_value2 );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_13.setField( 'company_value3' );\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_13.setValue( $this.current_edit_record.company_value3 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this.editFieldResize( $this.getEditViewTabIndex() );\n\t\t\t\t\t\tif ( callBack ) {\n\t\t\t\t\t\t\tcallBack();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\t//When its a 2020 or later Form W4, try to disable the Allowance field as its not on the form.\n\t// This is most important when using the Employee Settings tab though.\n\tonFormW4VersionChange() {\n\t\tif ( this.current_edit_record.calculation_id == 100 && this.current_edit_record.country == 'US' ) {\n\t\t\t// if ( this.edit_view_ui_dic.df_20.getValue() == 2020 ) {\n\t\t\t// \tthis.edit_view_ui_dic.df_1.setEnabled( false );\n\t\t\t// \tthis.edit_view_ui_dic.df_21.setEnabled( true );\n\t\t\t// \tthis.edit_view_ui_dic.df_22.setEnabled( true );\n\t\t\t// \tthis.edit_view_ui_dic.df_23.setEnabled( true );\n\t\t\t// \tthis.edit_view_ui_dic.df_24.setEnabled( true );\n\t\t\t// \tthis.edit_view_ui_dic.df_25.setEnabled( true );\n\t\t\t// } else {\n\t\t\t// \tthis.edit_view_ui_dic.df_1.setEnabled( true );\n\t\t\t// \tthis.edit_view_ui_dic.df_21.setEnabled( false );\n\t\t\t// \tthis.edit_view_ui_dic.df_22.setEnabled( false );\n\t\t\t// \tthis.edit_view_ui_dic.df_23.setEnabled( false );\n\t\t\t// \tthis.edit_view_ui_dic.df_24.setEnabled( false );\n\t\t\t// \tthis.edit_view_ui_dic.df_25.setEnabled( false );\n\t\t\t// }\n\t\t}\n\t}\n\n\tonApplyFrequencyChange() {\n\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month1'].parent().parent().css( 'display', 'none' ); //Special fields for Semi-Monthly\n\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month2'].parent().parent().css( 'display', 'none' ); //Special fields for Semi-Monthly\n\n\t\tif ( this.current_edit_record.apply_frequency_id == 10 ||\n\t\t\tthis.current_edit_record.apply_frequency_id == 100 ||\n\t\t\tthis.current_edit_record.apply_frequency_id == 110 ||\n\t\t\tthis.current_edit_record.apply_frequency_id == 120 ||\n\t\t\tthis.current_edit_record.apply_frequency_id == 130 ) {\n\n\t\t\tthis.edit_view_ui_dic['apply_frequency_month'].parent().parent().css( 'display', 'none' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month'].parent().parent().css( 'display', 'none' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_quarter_month'].parent().parent().css( 'display', 'none' );\n\t\t} else if ( this.current_edit_record.apply_frequency_id == 20 ) {\n\t\t\tthis.edit_view_ui_dic['apply_frequency_month'].parent().parent().css( 'display', 'block' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month'].parent().parent().css( 'display', 'block' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_quarter_month'].parent().parent().css( 'display', 'none' );\n\t\t} else if ( this.current_edit_record.apply_frequency_id == 25 ) {\n\t\t\tthis.edit_view_ui_dic['apply_frequency_month'].parent().parent().css( 'display', 'none' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month'].parent().parent().css( 'display', 'block' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_quarter_month'].parent().parent().css( 'display', 'block' );\n\t\t} else if ( this.current_edit_record.apply_frequency_id == 30 ) {\n\t\t\tthis.edit_view_ui_dic['apply_frequency_month'].parent().parent().css( 'display', 'none' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month'].parent().parent().css( 'display', 'block' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_quarter_month'].parent().parent().css( 'display', 'none' );\n\t\t} else if ( this.current_edit_record.apply_frequency_id == 35 ) {\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month1'].parent().parent().css( 'display', 'block' ); //Special fields for Semi-Monthly\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month2'].parent().parent().css( 'display', 'block' ); //Special fields for Semi-Monthly\n\n\t\t\tthis.edit_view_ui_dic['apply_frequency_month'].parent().parent().css( 'display', 'none' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_day_of_month'].parent().parent().css( 'display', 'none' );\n\t\t\tthis.edit_view_ui_dic['apply_frequency_quarter_month'].parent().parent().css( 'display', 'none' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tonCalculationChange() {\n\t}\n\n\tbuildEditViewUI() {\n\t\tTTPromise.add( 'CompanyTaxDeduction', 'buildEditViewUI' );\n\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_tax_deductions': {\n\t\t\t\t'label': $.i18n._( 'Tax / Deductions' )\n\t\t\t},\n\t\t\t'tab_eligibility': { 'label': $.i18n._( 'Eligibility' ) },\n\t\t\t'tab_employee_setting': {\n\t\t\t\t'label': $.i18n._( 'Employee Settings' ),\n\t\t\t\t'init_callback': 'initEmployeeSetting',\n\t\t\t\t'display_on_mass_edit': false,\n\t\t\t\t'html_template': this.getCompanyTaxDeductionEmployeeSettingTabHtml()\n\t\t\t}, //Callback was: setEmployeeGridSize\n\t\t\t'tab5': {\n\t\t\t\t'label': $.i18n._( 'Tax / Deductions' ),\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\n\t\t\t'tab_attachment': true,\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.edit_view.children().eq( 0 ).css( 'min-width', 1170 );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tapi_class: TTAPI.APICompanyDeduction,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_deduction',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//Tab 0 start\n\n\t\tvar tab_tax_deductions = this.edit_view_tab.find( '#tab_tax_deductions' );\n\n\t\tvar tab_tax_deductions_column1 = tab_tax_deductions.find( '.first-column' );\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_tax_deductions_column1 );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\t\tvar label;\n\n\t\t// Status\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'status_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_tax_deductions_column1, '' );\n\n\t\t// Type\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'type_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_tax_deductions_column1 );\n\n\t\t//Legal entity\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.TText( { field: 'legal_entity_id' } );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APILegalEntity,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_legal_entity',\n\t\t\tshow_search_inputs: false,\n\t\t\tset_empty: true,\n\t\t\tfield: 'legal_entity_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Legal Entity' ), form_item_input, tab_tax_deductions_column1 );\n\n\t\t//Payroll Remittance Agency\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayrollRemittanceAgency,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_payroll_remittance_agency',\n\t\t\tset_empty: true,\n\t\t\tfield: 'payroll_remittance_agency_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Remittance Agency' ), form_item_input, tab_tax_deductions_column1 );\n\n\t\t//Name\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Name' ), form_item_input, tab_tax_deductions_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Description\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description' ), form_item_input, tab_tax_deductions_column1, '', null, null, true );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//Pay Stub Note (Public)\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'pay_stub_entry_description', width: 300 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Stub Note (Public)' ), form_item_input, tab_tax_deductions_column1 );\n\n\t\t//Calculation Settings label\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.SEPARATED_BOX );\n\t\tform_item_input.SeparatedBox( { label: $.i18n._( 'Calculation Settings' ) } );\n\t\tthis.addEditFieldToColumn( null, form_item_input, tab_tax_deductions_column1, '', null, true, false, 'separated_2' );\n\n\t\t//Calculation\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'calculation_id', set_empty: false, width: 400 } );\n\t\tform_item_input.setSourceData( $this.calculation_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Calculation' ), form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 15\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'df_15', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.tax_formula_type_array );\n\t\tthis.addEditFieldToColumn( 'df_15', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Country\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'country', set_empty: true } );\n\t\tform_item_input.setSourceData( $this.country_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Country' ), form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Province\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'province' } );\n\t\tform_item_input.setSourceData( [] );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Province/State' ), form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// District\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'district', set_empty: false } );\n\t\tform_item_input.setSourceData( [] );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'District' ), form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 0\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_0' } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> %</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( 'df_0', form_item_input, tab_tax_deductions_column1, '', widgetContainer, true );\n\n\t\t//Dynamic Field 20 -- Form W-4 Version (Should go above Filing Status)\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'df_20', set_empty: false } );\n\t\tthis.addEditFieldToColumn( 'df_20', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t//Dynamic Field 14 -- Filing Status\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'df_14', set_empty: false } ); //Don't show empty value (NONE), so a filing status will always selected.\n\t\tthis.addEditFieldToColumn( 'df_14', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 1\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_1' } );\n\t\tthis.addEditFieldToColumn( 'df_1', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 2\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_2' } );\n\t\tthis.addEditFieldToColumn( 'df_2', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 3\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_3' } );\n\t\tthis.addEditFieldToColumn( 'df_3', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 4\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_4' } );\n\t\tthis.addEditFieldToColumn( 'df_4', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 5\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_5' } );\n\t\tthis.addEditFieldToColumn( 'df_5', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 6\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_6' } );\n\t\tthis.addEditFieldToColumn( 'df_6', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 7\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_7' } );\n\t\tthis.addEditFieldToColumn( 'df_7', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 8\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_8' } );\n\t\tthis.addEditFieldToColumn( 'df_8', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 9\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_9' } );\n\t\tthis.addEditFieldToColumn( 'df_9', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 10\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_10' } );\n\t\tthis.addEditFieldToColumn( 'df_10', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\tif ( ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.getProductEdition */ .x.getProductEdition() >= 15 ) ) {\n\t\t\tTTPromise.add( 'CompanyTaxDeduction', 'df_11' );\n\t\t\t_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadScript */ .x.loadScript( 'global/widgets/formula_builder/FormulaBuilder.js', function() {\n\t\t\t\t// Dynamic Field 11\n\t\t\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.FORMULA_BUILDER );\n\t\t\t\tform_item_input.FormulaBuilder( {\n\t\t\t\t\tfield: 'df_11', width: '100%', onFormulaBtnClick: function() {\n\n\t\t\t\t\t\tvar custom_column_api = TTAPI.APIReportCustomColumn;\n\n\t\t\t\t\t\tcustom_column_api.getOptions( 'formula_functions', {\n\t\t\t\t\t\t\tonResult: function( fun_result ) {\n\t\t\t\t\t\t\t\tvar fun_res_data = fun_result.getResult();\n\n\t\t\t\t\t\t\t\t$this.api.getOptions( 'formula_variables', { onResult: onColumnsResult } );\n\n\t\t\t\t\t\t\t\tfunction onColumnsResult( col_result ) {\n\t\t\t\t\t\t\t\t\tvar col_res_data = col_result.getResult();\n\n\t\t\t\t\t\t\t\t\tvar default_args = {};\n\t\t\t\t\t\t\t\t\tdefault_args.functions = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( fun_res_data );\n\t\t\t\t\t\t\t\t\tdefault_args.variables = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( col_res_data );\n\t\t\t\t\t\t\t\t\tdefault_args.formula = $this.current_edit_record.company_value1;\n\t\t\t\t\t\t\t\t\tdefault_args.current_edit_record = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.clone */ .x.clone( $this.current_edit_record );\n\t\t\t\t\t\t\t\t\tdefault_args.api = $this.api;\n\n\t\t\t\t\t\t\t\t\tIndexViewController.openWizard( 'FormulaBuilderWizard', default_args, function( val ) {\n\t\t\t\t\t\t\t\t\t\t$this.current_edit_record.company_value1 = val;\n\t\t\t\t\t\t\t\t\t\t$this.edit_view_ui_dic.df_11.setValue( val );\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t$this.addEditFieldToColumn( 'df_11', form_item_input, tab_tax_deductions_column1, '', null, true );\n\t\t\t\t$this.detachElement( 'df_11' );\n\t\t\t\tform_item_input.parent().width( '45%' );\n\t\t\t\tTTPromise.resolve( 'CompanyTaxDeduction', 'df_11' );\n\t\t\t} );\n\t\t} else {\n\t\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\t\tform_item_input.TTextInput( { field: 'df_11' } );\n\t\t\tthis.addEditFieldToColumn( 'df_11', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT );\n\t\t\tform_item_input.TText( { field: 'df_100' } );\n\t\t\tthis.addEditFieldToColumn( 'Warning', form_item_input, tab_tax_deductions_column1, '', null, true );\n\t\t}\n\n\t\t//Dynamic Field 12,13\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_12', width: 30 } );\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + ' ' + ' </span>' );\n\n\t\tvar widget_combo_box = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\twidget_combo_box.TComboBox( { field: 'df_13' } );\n\t\twidget_combo_box.setSourceData( $this.look_back_unit_array );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\twidgetContainer.append( widget_combo_box );\n\t\tthis.addEditFieldToColumn( 'df_12', [form_item_input, widget_combo_box], tab_tax_deductions_column1, '', widgetContainer, true );\n\n\t\t//Dynamic Field 21 -- Multiple Jobs or Spouse Works\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'df_21', set_empty: false } );\n\t\tthis.addEditFieldToColumn( 'df_21', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 22\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_22' } );\n\t\tthis.addEditFieldToColumn( 'df_22', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 23\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_23' } );\n\t\tthis.addEditFieldToColumn( 'df_23', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 24\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_24' } );\n\t\tthis.addEditFieldToColumn( 'df_24', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\t// Dynamic Field 25\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'df_25' } );\n\t\tthis.addEditFieldToColumn( 'df_25', form_item_input, tab_tax_deductions_column1, '', null, true );\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\t//Pay Stub Account\n\n\t\t\tvar default_args = {};\n\t\t\tdefault_args.filter_data = {};\n\t\t\tdefault_args.filter_data.type_id = [10, 20, 30, 50, 80];\n\n\t\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tfield: 'pay_stub_entry_account_id'\n\n\t\t\t} );\n\t\t\tform_item_input.setDefaultArgs( default_args );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Stub Account' ), form_item_input, tab_tax_deductions_column1 );\n\t\t}\n\n\t\t// Calculation Order\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'calculation_order', width: 30 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Calculation Order' ), form_item_input, tab_tax_deductions_column1 );\n\n\t\t// Include Pay Stub Accounts\n\t\tvar v_box = $( '<div class=\\'v-box\\'></div>' );\n\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'include_account_amount_type_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.account_amount_type_array );\n\n\t\tvar form_item = this.putInputToInsideFormItem( form_item_input, $.i18n._( 'Pay Stub Account Value' ) );\n\n\t\tv_box.append( form_item );\n\t\tv_box.append( '<div class=\\'clear-both-div\\'></div>' );\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tvar form_item_input_1 = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input_1.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\t\tallow_multiple_selection: true,\n\t\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tfield: 'include_pay_stub_entry_account'\n\t\t\t} );\n\t\t\tform_item = this.putInputToInsideFormItem( form_item_input_1, $.i18n._( 'Selection' ) );\n\t\t\tv_box.append( form_item );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Include Pay Stub Accounts' ), [form_item_input, form_item_input_1], tab_tax_deductions_column1, null, v_box, true, true );\n\n\t\t}\n\n\t\t// Exclude Pay Stub Accounts\n\t\tv_box = $( '<div class=\\'v-box\\'></div>' );\n\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'exclude_account_amount_type_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.account_amount_type_array );\n\n\t\tform_item = this.putInputToInsideFormItem( form_item_input, $.i18n._( 'Pay Stub Account Value' ) );\n\n\t\tv_box.append( form_item );\n\t\tv_box.append( '<div class=\\'clear-both-div\\'></div>' );\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tform_item_input_1 = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\t\tform_item_input_1.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\t\tallow_multiple_selection: true,\n\t\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tfield: 'exclude_pay_stub_entry_account'\n\t\t\t} );\n\n\t\t\tform_item = this.putInputToInsideFormItem( form_item_input_1, $.i18n._( 'Selection' ) );\n\t\t\tv_box.append( form_item );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Exclude Pay Stub Accounts' ), [form_item_input, form_item_input_1], tab_tax_deductions_column1, null, v_box, true, true );\n\t\t}\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\t// employees\n\t\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tallow_multiple_selection: true,\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tfield: 'user'\n\t\t\t} );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Employees' ), form_item_input, tab_tax_deductions_column1, '' );\n\t\t}\n\t\t// Tab1 start\n\n\t\tvar tab_eligibility = this.edit_view_tab.find( '#tab_eligibility' );\n\n\t\tvar tab_eligibility_column1 = tab_eligibility.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[1] = [];\n\n\t\tthis.edit_view_tabs[1].push( tab_eligibility_column1 );\n\n\t\t// Apply Frequency\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'apply_frequency_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.apply_frequency_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Apply Frequency' ), form_item_input, tab_eligibility_column1, '' );\n\n\t\t// Month\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'apply_frequency_month', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.month_of_year_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Month' ), form_item_input, tab_eligibility_column1, '', null, true );\n\n\t\t// Day of Month\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'apply_frequency_day_of_month', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.day_of_month_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Day of Month' ), form_item_input, tab_eligibility_column1, '', null, true );\n\n\t\t// Semi-Monthly: Primary Day of Month\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'apply_frequency_day_of_month1', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.day_of_month_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Primary Day of Month' ), form_item_input, tab_eligibility_column1, '', null, true );\n\n\t\t// Semi-Monthly: Secondary Day of Month\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'apply_frequency_day_of_month2', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.day_of_month_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Secondary Day of Month' ), form_item_input, tab_eligibility_column1, '', null, true );\n\n\t\t// Month of Quarter\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'apply_frequency_quarter_month', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.month_of_quarter_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Month of Quarter' ), form_item_input, tab_eligibility_column1, '', null, true );\n\n\t\t// Payroll Run Type\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( {\n\t\t\tfield: 'apply_payroll_run_type_id',\n\t\t\tset_empty: true,\n\t\t\tcustomFirstItemLabel: _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.any_item */ .x.any_item\n\t\t} );\n\t\tform_item_input.setSourceData( $this.apply_payroll_run_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Payroll Run Type' ), form_item_input, tab_eligibility_column1, '' );\n\n\t\t// Start Date\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.DATE_PICKER );\n\n\t\tform_item_input.TDatePicker( { field: 'start_date' } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'>' + $.i18n._( '(Leave blank for no start date)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Start Date' ), form_item_input, tab_eligibility_column1, '', widgetContainer );\n\n\t\t// End Date\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.DATE_PICKER );\n\n\t\tform_item_input.TDatePicker( { field: 'end_date' } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'>' + $.i18n._( '(Leave blank for no end date)' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'End Date' ), form_item_input, tab_eligibility_column1, '', widgetContainer );\n\n\t\t// Minimum Length Of Service\n\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'minimum_length_of_service', width: 30 } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + ' ' + ' </span>' );\n\n\t\twidget_combo_box = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\twidget_combo_box.TComboBox( { field: 'minimum_length_of_service_unit_id' } );\n\t\twidget_combo_box.setSourceData( $this.length_of_service_unit_array );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\twidgetContainer.append( widget_combo_box );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Length Of Service' ), [form_item_input, widget_combo_box], tab_eligibility_column1, '', widgetContainer );\n\n\t\t// Maximum Length Of Service\n\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'maximum_length_of_service', width: 30 } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + ' ' + ' </span>' );\n\n\t\twidget_combo_box = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\twidget_combo_box.TComboBox( { field: 'maximum_length_of_service_unit_id' } );\n\t\twidget_combo_box.setSourceData( $this.length_of_service_unit_array );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\twidgetContainer.append( widget_combo_box );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Maximum Length Of Service' ), [form_item_input, widget_combo_box], tab_eligibility_column1, '', widgetContainer );\n\t\tif ( !this.sub_view_mode ) {\n\t\t\t//Length of Service contributing pay codes.\n\t\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIContributingPayCodePolicy,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_contributing_pay_code_policy',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tset_default: true,\n\t\t\t\tfield: 'length_of_service_contributing_pay_code_policy_id'\n\t\t\t} );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Length Of Service Hours Based On' ), form_item_input, tab_eligibility_column1, '', null, true );\n\t\t}\n\t\t// Minimum Employee Age\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'minimum_user_age', width: 30 } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'>' + $.i18n._( 'years' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Employee Age' ), form_item_input, tab_eligibility_column1, '', widgetContainer );\n\n\t\t// Maximum Employee Age\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'maximum_user_age', width: 30 } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'>' + $.i18n._( 'years' ) + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Maximum Employee Age' ), form_item_input, tab_eligibility_column1, '', widgetContainer );\n\n\t\t//Tab 5\n\n\t\tvar tab5 = this.edit_view_tab.find( '#tab5' );\n\n\t\tvar tab5_column1 = tab5.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[5] = [];\n\n\t\tthis.edit_view_tabs[5].push( tab5_column1 );\n\n\t\t//Permissions\n\n\t\tform_item_input = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( FormItemType.AWESOME_DROPDOWN );\n\n\t\tvar display_columns = ALayoutCache.getDefaultColumn( 'global_deduction' ); //Get Default columns base on different layout name\n\t\tdisplay_columns = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.convertColumnsTojGridFormat */ .x.convertColumnsTojGridFormat( display_columns, 'global_deduction' ); //Convert to jQgrid format\n\n\t\tform_item_input.ADropDown( {\n\t\t\tfield: 'company_tax_deduction_ids',\n\t\t\tdisplay_show_all: false,\n\t\t\tid: 'company_tax_deduction_ids',\n\t\t\tkey: 'id',\n\t\t\tdisplay_close_btn: false,\n\t\t\tallow_drag_to_order: false,\n\t\t\tdisplay_column_settings: false\n\t\t} );\n\t\tform_item_input.addClass( 'splayed-adropdown' );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Taxes / Deductions' ), form_item_input, tab5_column1, '', null, false, true );\n\n\t\tform_item_input.setColumns( display_columns );\n//\t\tform_item_input.setUnselectedGridData( [] );\n\t\tTTPromise.resolve( 'CompanyTaxDeduction', 'buildEditViewUI' );\n\t}\n\n\tsetEditViewTabHeight() {\n\t\tsuper.setEditViewTabHeight();\n\n\t\tvar tax_grid = this.edit_view_ui_dic.company_tax_deduction_ids;\n\n\t\ttax_grid.setHeight( ( this.edit_view_tab.find( '.context-border' ).height() - $( this.$el )[0].getBoundingClientRect().top ) - 20 );\n\t}\n\n\tputInputToInsideFormItem( form_item_input, label ) {\n\t\tvar form_item = $( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadWidgetByName */ .x.loadWidgetByName( WidgetNamesDic.EDIT_VIEW_SUB_FORM_ITEM ) );\n\t\tvar form_item_label_div = form_item.find( '.edit-view-form-item-label-div' );\n\n\t\tform_item_label_div.attr( 'class', 'edit-view-form-item-sub-label-div' );\n\n\t\tvar form_item_label = form_item.find( '.edit-view-form-item-label' );\n\t\tvar form_item_input_div = form_item.find( '.edit-view-form-item-input-div' );\n\t\tform_item.addClass( 'remove-margin' );\n\n\t\tform_item_label.text( $.i18n._( label ) );\n\t\tform_item_input_div.append( form_item_input );\n\n\t\treturn form_item;\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\n\t\tthis.search_fields = [\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Status' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Type' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'type_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'name',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Legal Entity' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'legal_entity_id',\n\t\t\t\tlayout_name: 'global_legal_entity',\n\t\t\t\tapi_class: TTAPI.APILegalEntity,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Pay Stub Account' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'pay_stub_entry_name_id',\n\t\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Remittance Agency' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'payroll_remittance_agency_id',\n\t\t\t\tlayout_name: 'global_payroll_remittance_agency',\n\t\t\t\tapi_class: TTAPI.APIPayrollRemittanceAgency,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tscript_name: 'PayrollRemittanceAgencyView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Calculation' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'calculation_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Created By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'created_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tscript_name: 'EmployeeView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Updated By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'updated_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tscript_name: 'EmployeeView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\n\t\t];\n\t}\n\n\tsearchDone() {\n\t\tTTPromise.resolve( 'TaxView', 'init' );\n\t\tsuper.searchDone();\n\t}\n\n\tgetCompanyTaxDeductionEmployeeSettingTabHtml() {\n\t\treturn `<div id=\"tab_employee_setting\" class=\"edit-view-tab-outside\">\n\t\t\t\t\t<div class=\"edit-view-tab\" id=\"tab_employee_setting_content_div\">\n\t\t\t\t\t\t<div class=\"inside-editor-div full-width-column\">\n\t\t\t\t\t\t\t<div class=\"grid-div employee-setting-grid-div\">\n\t\t\t\t\t\t\t\t<table id=\"employee_setting_grid\"></table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"save-and-continue-div\">\n\t\t\t\t\t\t\t<span class=\"message\"></span>\n\t\t\t\t\t\t\t<div class=\"save-and-continue-button-div\">\n\t\t\t\t\t\t\t\t<button class=\"tt-button p-button p-component\" type=\"button\">\n\t\t\t\t\t\t\t\t\t<span class=\"icon\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"p-button-label\"></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>`;\n\t}\n\n}\n\nCompanyTaxDeductionViewController.loadSubView = function( container, beforeViewLoadedFun, afterViewLoadedFun ) {\n\n\t_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadViewSource */ .x.loadViewSource( 'CompanyTaxDeduction', 'SubCompanyTaxDeductionView.html', function( result ) {\n\n\t\tvar args = {};\n\t\tvar template = _.template( result );\n\n\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( beforeViewLoadedFun ) ) {\n\t\t\tbeforeViewLoadedFun();\n\t\t}\n\n\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( container ) ) {\n\t\t\tcontainer.html( template( args ) );\n\n\t\t\tif ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.isSet */ .x.isSet( afterViewLoadedFun ) ) {\n\t\t\t\tafterViewLoadedFun( sub_company_tax_deduction_view_controller );\n\t\t\t}\n\n\t\t}\n\n\t} );\n\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTcwNi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQXlDOztBQUVsQztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxJQUFJOztBQUVKO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJO0FBQ0o7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDJCQUEyQixDQUFDO0FBQzVCLDBCQUEwQixDQUFDO0FBQzNCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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