TimeTrex/interface/html5/dist/payroll-pay_stub_amendment-PayStubAmendmentViewController.bundle.js

1 line
86 KiB
JavaScript

"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["payroll-pay_stub_amendment-PayStubAmendmentViewController"],{4776:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PayStubAmendmentViewController\": () => (/* binding */ PayStubAmendmentViewController)\n/* harmony export */ });\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(482);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\nclass PayStubAmendmentViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#pay_stub_amendment_view_container',\n\n\t\t\tuser_status_array: null,\n\t\t\tfiltered_status_array: null,\n\t\t\ttype_array: null,\n\t\t\tis_mass_adding: false,\n\n\t\t\tuser_api: null,\n\t\t\tuser_group_api: null,\n\t\t\tuser_wage_api: null,\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'PayStubAmendmentEditView.html';\n\t\tthis.permission_id = 'pay_stub_amendment';\n\t\tthis.viewId = 'PayStubAmendment';\n\t\tthis.script_name = 'PayStubAmendmentView';\n\t\tthis.table_name_key = 'pay_stub_amendment';\n\t\tthis.context_menu_name = $.i18n._( 'Pay Stub Amendment' );\n\t\tthis.navigation_label = $.i18n._( 'Pay Stub Amendment' );\n\t\tthis.api = TTAPI.APIPayStubAmendment;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.currency_api = TTAPI.APICurrency;\n\t\tthis.user_wage_api = TTAPI.APIUserWage;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\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', field_name: 'user_status_id', api: this.user_api },\n\t\t\t{ option_name: 'filtered_status', field_name: 'status_id', api: this.api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tthis.user_group_api.getUserGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\n\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t$this.user_group_array = res;\n\n\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['group_id'] ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.api.getOptions( 'status', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tvar status_array = Global.buildRecordArray( res.getResult() );\n\n\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['status_id'] ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['status_id'].setSourceData( status_array );\n\t\t\t\t\tif ( $this.adv_search_field_ui_dic['status_id'] ) {\n\t\t\t\t\t\t$this.adv_search_field_ui_dic['status_id'].setSourceData( status_array );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetUserHourlyRate( user_id ) {\n\t\tvar $this = this;\n\n\t\tif ( !user_id ) {\n\t\t\tuser_id = this.current_edit_record['user_id'];\n\t\t}\n\n\t\tif ( TTUUID.isUUID( user_id ) == false || ( $.isArray( user_id ) && user_id.length != 1 ) ) {\n\t\t\tuser_id = TTUUID.zero_id;\n\t\t}\n\n\t\t//Last Wage record only.\n\t\tthis.user_wage_api.getUserWage( {\n\t\t\tfilter_data: {\n\t\t\t\tuser_id: user_id,\n\t\t\t\twage_group_id: TTUUID.zero_id\n\t\t\t}\n\t\t}, false, true, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar rate = '0.00';\n\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\tif ( result_data && result_data.length > 0 ) {\n\t\t\t\t\tresult_data = result_data[0];\n\n\t\t\t\t\trate = result_data.hourly_rate;\n\t\t\t\t}\n\n\t\t\t\t$this.edit_view_ui_dic['rate'].setValue( rate );\n\t\t\t\t$this.current_edit_record['rate'] = rate;\n\t\t\t\t$this.calcAmount();\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetFilterColumnsFromDisplayColumns() {\n\n\t\tvar column_filter = {};\n\t\tcolumn_filter.is_owner = true;\n\t\tcolumn_filter.id = true;\n\t\tcolumn_filter.user_id = true;\n\t\tcolumn_filter.is_child = true;\n\t\tcolumn_filter.in_use = true;\n\t\tcolumn_filter.first_name = true;\n\t\tcolumn_filter.last_name = true;\n\t\tcolumn_filter.effective_date = true;\n\n\t\t// Error: Unable to get property 'getGridParam' of undefined or null reference\n\t\tvar display_columns = [];\n\t\tif ( this.grid ) {\n\t\t\tdisplay_columns = this.grid.getGridParam( 'colModel' );\n\t\t}\n\t\tif ( display_columns ) {\n\t\t\tvar len = display_columns.length;\n\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar column_info = display_columns[i];\n\t\t\t\tcolumn_filter[column_info.name] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn column_filter;\n\t}\n\n\tonReportPrintClick( key ) {\n\t\tvar $this = this;\n\n\t\tvar grid_selected_id_array;\n\n\t\tvar filter = {};\n\n\t\tvar ids = [];\n\n\t\tvar user_ids = [];\n\n\t\tvar base_date;\n\n\t\tvar pay_period_ids = [];\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\tids.push( $this.current_edit_record.id );\n\t\t\tuser_ids.push( $this.current_edit_record.user_id );\n\t\t\tpay_period_ids.push( $this.current_edit_record.pay_period_id );\n\t\t\tbase_date = $this.current_edit_record.start_date;\n\t\t} else {\n\t\t\tgrid_selected_id_array = this.getGridSelectIdArray();\n\t\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t\tvar grid_selected_row = $this.getRecordFromGridById( value );\n\t\t\t\tids.push( grid_selected_row.id );\n\t\t\t\tuser_ids.push( grid_selected_row.user_id );\n\t\t\t\tpay_period_ids.push( grid_selected_row.pay_period_id );\n\t\t\t\tbase_date = grid_selected_row.start_date;\n\t\t\t} );\n\t\t}\n\n\t\tvar args = { filter_data: { id: ids } };\n\t\tvar post_data = { 0: args, 1: true, 2: key };\n\n\t\tthis.doFormIFrameCall( post_data );\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [],\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\t\tid: 'jump_to_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tpermission_result: false, // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\t\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'TimeSheet' ),\n\t\t\t\t\tid: 'timesheet',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Pay Stubs' ),\n\t\t\t\t\tid: 'pay_stub',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Edit Employee' ),\n\t\t\t\t\tid: 'edit_employee',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Import' ),\n\t\t\t\t\tid: 'import_icon',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'import_export',\n\t\t\t\t\tgroup: 'other',\n\t\t\t\t\tvue_icon: 'tticon tticon-file_download_black_24dp',\n\t\t\t\t\tpermission_result: PermissionManager.checkTopLevelPermission( 'ImportCSVPayStubAmendment' ),\n\t\t\t\t\tsort_order: 9010\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'timesheet':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length, 'punch' );\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length, 'pay_stub' );\n\t\t\t\tbreak;\n\t\t\tcase 'edit_employee':\n\t\t\t\tthis.setDefaultMenuEditIcon( context_btn, grid_selected_length, 'user' );\n\t\t\t\tbreak;\n\t\t\tcase 'print_checks':\n\t\t\t\tthis.setDefaultMenuPrintChecksIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'direct_deposit':\n\t\t\t\tthis.setDefaultMenuDirectDepositIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t//Remove the copy button as it can never work due to API unique constraints.\n\tsetDefaultMenuCopyIcon( context_btn, grid_selected_length, pId ) {\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t}\n\n\tsetEditMenuCopyIcon( context_btn, grid_selected_length, pId ) {\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t}\n\n\t/* jshint ignore:end */\n\tsetDefaultMenuViewIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( pId === 'punch' || pId === 'schedule' || pId === 'pay_stub' ) {\n\t\t\tsuper.setDefaultMenuViewIcon( context_btn, grid_selected_length, pId );\n\t\t} else {\n\n\t\t\tif ( !this.viewPermissionValidate( pId ) || this.edit_only_mode ) {\n\t\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t\t}\n\n\t\t\tif ( grid_selected_length > 0 && this.viewOwnerOrChildPermissionValidate() ) {\n\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\t} else {\n\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t\t}\n\n\t\t}\n\t}\n\n\tsetDefaultMenuPrintChecksIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuDirectDepositIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetCustomEditMenuIcon( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'timesheet':\n\t\t\t\tthis.setEditMenuViewIcon( context_btn, 'punch' );\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tthis.setEditMenuViewIcon( context_btn, 'pay_stub' );\n\t\t\t\tbreak;\n\t\t\tcase 'edit_employee':\n\t\t\t\tthis.setEditMenuViewIcon( context_btn, 'user' );\n\t\t\t\tbreak;\n\t\t\tcase 'print_checks':\n\t\t\tcase 'direct_deposit':\n\t\t\t\tthis.setEditMenuViewIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\n\t\tvar key = target.getField();\n\t\tvar c_value = target.getValue();\n\n\t\tthis.current_edit_record[key] = c_value;\n\n\t\tswitch ( key ) {\n\t\t\tcase 'user_id':\n\t\t\t\tif ( $.isArray( this.current_edit_record.user_id ) && this.current_edit_record.user_id.length > 1 ) {\n\t\t\t\t\tthis.is_mass_adding = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.is_mass_adding = false;\n\t\t\t\t}\n\t\t\t\tdoNotValidate = true; //Don't validate since setCurrency() triggers calcAmount(), which changes the amount field asynchronously, only then should we validate.\n\t\t\t\tthis.setCurrency();\n\t\t\t\tthis.setEditMenu();\n\t\t\t\tbreak;\n\t\t\tcase 'type_id':\n\t\t\t\tthis.onTypeChange();\n\t\t\t\tbreak;\n\t\t\tcase 'rate':\n\t\t\tcase 'units':\n\t\t\tcase 'amount':\n\t\t\t\tif ( this.is_mass_editing ) {\n\t\t\t\t\tif ( target.isChecked() ) {\n\t\t\t\t\t\tthis.edit_view_ui_dic['rate'].setCheckBox( true );\n\t\t\t\t\t\tthis.edit_view_ui_dic['units'].setCheckBox( true );\n\t\t\t\t\t\tthis.edit_view_ui_dic['amount'].setCheckBox( true );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.edit_view_ui_dic['rate'].setCheckBox( false );\n\t\t\t\t\t\tthis.edit_view_ui_dic['units'].setCheckBox( false );\n\t\t\t\t\t\tthis.edit_view_ui_dic['amount'].setCheckBox( false );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.current_edit_record['amount'] = this.edit_view_ui_dic['amount'].getValue();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tonTypeChange() {\n\t\tif ( this.current_edit_record.type_id == 10 ) {\n\t\t\tthis.detachElement( 'percent_amount' );\n\t\t\tthis.detachElement( 'percent_amount_entry_name_id' );\n\t\t\tthis.attachElement( 'rate' );\n\t\t\tthis.attachElement( 'units' );\n\t\t\tthis.attachElement( 'amount' );\n\n\t\t} else if ( this.current_edit_record.type_id == 20 ) {\n\t\t\tthis.attachElement( 'percent_amount' );\n\t\t\tthis.attachElement( 'percent_amount_entry_name_id' );\n\t\t\tthis.detachElement( 'rate' );\n\t\t\tthis.detachElement( 'units' );\n\t\t\tthis.detachElement( 'amount' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tcalcAmount() {\n\t\tvar widget_rate = this.edit_view_ui_dic['rate'];\n\t\tvar widget_units = this.edit_view_ui_dic['units'];\n\t\tvar widget_amount = this.edit_view_ui_dic['amount'];\n\n\t\tif ( widget_rate && widget_rate.getValue().length > 0 && widget_units && widget_units.getValue().length > 0 ) {\n\t\t\t//widget_amount.setValue( ( parseFloat( widget_rate.getValue() ) * parseFloat( widget_units.getValue() ) ).toFixed( 2 ) ); //This fails on 17.07 * 9.50 as it rounds to 162.16 rather than 162.17\n\t\t\t//calc_amount = ( parseFloat( widget_rate.getValue() ) * parseFloat( widget_units.getValue() ) ); //This fails on 16.5 * 130.23\n\t\t\tvar calc_amount = new decimal_js__WEBPACK_IMPORTED_MODULE_0__/* [\"default\"] */ .Z( parseFloat( widget_rate.getValue() ) ).mul( parseFloat( widget_units.getValue() ) ).toFixed( 4 ); //Need to use Decimal() class for proper money math operations\n\t\t\tDebug.Text( 'Calculate Amount before rounding: ' + calc_amount, 'PayStubAmendmentViewController.js', 'PayStubAmendmentViewController', 'onFormItemKeyUp', 10 );\n\n\t\t\tvar round_decimal_places;\n\t\t\tif ( this.currency_array && this.currency_array.round_decimal_places ) {\n\t\t\t\tround_decimal_places = this.currency_array.round_decimal_places;\n\t\t\t} else {\n\t\t\t\tround_decimal_places = 2;\n\t\t\t}\n\t\t\twidget_amount.setValue( Global.MoneyRound( calc_amount, round_decimal_places ) );\n\t\t} else {\n\t\t\tif ( widget_amount && widget_amount.getValue() == '' ) {\n\t\t\t\twidget_amount.setValue( '0.00' );\n\t\t\t}\n\t\t}\n\n\t\tif ( !this.is_mass_editing && this.edit_view_ui_dic['amount'] && this.current_edit_record ) { //Make sure this is only done when editing a single record otherwise Mass Edit will default to changing the amount to 0.00.\n\t\t\tthis.current_edit_record['amount'] = this.edit_view_ui_dic['amount'].getValue(); //Update current record Amount, otherwise edit/save (without any changes) won't save the rounded value.\n\t\t}\n\t}\n\n\tonRateOrUnitChange() {\n\t\tvar widget_rate = this.edit_view_ui_dic['rate'];\n\t\tvar widget_units = this.edit_view_ui_dic['units'];\n\t\tvar widget_amount = this.edit_view_ui_dic['amount'];\n\n\t\tif ( widget_rate.getValue().length > 0 || widget_units.getValue().length > 0 ) {\n\t\t\twidget_amount.setReadOnly( true );\n\t\t} else {\n\t\t\twidget_amount.setReadOnly( false );\n\t\t}\n\t}\n\n\tonFormItemKeyUp( target ) {\n\t\tthis.onRateOrUnitChange();\n\t\tthis.calcAmount();\n\t}\n\n\tonFormItemKeyDown( target ) {\n\t\tthis.onRateOrUnitChange();\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'import_icon':\n\t\t\t\tthis.onImportClick();\n\t\t\t\tbreak;\n\t\t\tcase 'timesheet':\n\t\t\tcase 'pay_stub':\n\t\t\tcase 'edit_employee':\n\t\t\t\tthis.onNavigationClick( id );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonImportClick() {\n\n\t\tvar $this = this;\n\t\tIndexViewController.openWizard( 'ImportCSVWizard', 'PayStubAmendment', function() {\n\t\t\t$this.search();\n\t\t} );\n\t}\n\n\t/* jshint ignore:start */\n\tonNavigationClick( iconName ) {\n\n\t\tvar $this = this;\n\n\t\tvar grid_selected_id_array;\n\n\t\tvar filter = {};\n\n\t\tvar user_ids = [];\n\n\t\tvar ids = [];\n\n\t\tvar base_date;\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\tids.push( $this.current_edit_record.id );\n\t\t\tuser_ids.push( $this.current_edit_record.user_id );\n\t\t\tbase_date = $this.current_edit_record.effective_date;\n\t\t} else {\n\t\t\tgrid_selected_id_array = this.getGridSelectIdArray();\n\t\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t\tvar grid_selected_row = $this.getRecordFromGridById( value );\n\t\t\t\tids.push( grid_selected_row.id );\n\t\t\t\tuser_ids.push( grid_selected_row.user_id );\n\t\t\t\tbase_date = grid_selected_row.effective_date;\n\t\t\t} );\n\t\t}\n\n\t\tvar args = { filter_data: { id: ids } };\n\n\t\tswitch ( iconName ) {\n\t\t\tcase 'timesheet':\n\t\t\t\tif ( user_ids.length > 0 ) {\n\t\t\t\t\tfilter.user_id = user_ids[0];\n\t\t\t\t\tfilter.base_date = base_date;\n\t\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Pay Stub Amendments' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'TimeSheet', filter );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tif ( user_ids.length > 0 ) {\n\t\t\t\t\tfilter.filter_data = {};\n\t\t\t\t\tfilter.filter_data.user_id = user_ids[0];\n\t\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Pay Stub Amendments' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'PayStub', filter );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'edit_employee':\n\t\t\t\tif ( user_ids.length > 0 ) {\n\t\t\t\t\tIndexViewController.openEditView( this, 'Employee', user_ids[0] );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/* jshint ignore:end */\n\tonReportMenuClick( id ) {\n\t\tthis.onReportPrintClick( id );\n\t}\n\n\t//not currently called. are we reimplementing the eft code commented out above in this class?\n\tdoFormIFrameCall( postData ) {\n\t\tGlobal.APIFileDownload( this.api.className, 'get' + this.api.key_name, postData );\n\t}\n\n\tsetCurrency() {\n\t\tvar $this = this;\n\t\tif ( Global.isSet( this.current_edit_record.user_id ) ) {\n\t\t\tvar filter = {};\n\t\t\tfilter.filter_data = { user_id: this.current_edit_record.user_id };\n\n\t\t\tthis.currency_api.getCurrency( filter, false, false, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( Global.isArray( res ) ) {\n\t\t\t\t\t\t$this.currency_array = res[0];\n\t\t\t\t\t\t$this.calcAmount();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.currency_array = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\t// When mass editing, these fields may not be the common data, so their value will be undefined, so this will cause their change event cannot work properly.\n\t\tthis.setDefaultData( {\n\t\t\t'type_id': 10\n\t\t} );\n\n\t\tsuper.setCurrentEditRecordData();\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.setCurrency();\n\t\tthis.onTypeChange();\n\t\tthis.onRateOrUnitChange();\n\t}\n\n\tvalidate() {\n\n\t\tvar $this = this;\n\n\t\tvar record = {};\n\n\t\tvar records_data = null;\n\n\t\tif ( this.is_mass_editing ) {\n\t\t\tfor ( var key in this.edit_view_ui_dic ) {\n\t\t\t\t//#2536 - Never send status_id to the API.\n\t\t\t\tif ( key != 'status_id' ) {\n\t\t\t\t\tvar widget = this.edit_view_ui_dic[key];\n\n\t\t\t\t\tif ( Global.isSet( widget.isChecked ) ) {\n\t\t\t\t\t\tif ( widget.isChecked() && widget.getEnabled() ) {\n\t\t\t\t\t\t\trecord[key] = widget.getValue();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\trecord = this.uniformVariable( this.current_edit_record );\n\t\t}\n\n\t\tvar record = this.buildMassAddRecord( record );\n\n\t\tthis.api['validate' + this.api.key_name]( record, {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.validateResult( result );\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tremoveEditView() {\n\t\tthis.is_mass_adding = false;\n\t\tsuper.removeEditView();\n\t}\n\n\tbuildMassAddRecord( record ) {\n\t\tif ( $.isArray( record.user_id ) ) {\n\t\t\tvar records_data = [];\n\t\t\tvar length = record.user_id.length;\n\t\t\tif ( length > 0 ) {\n\t\t\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\t\t\tvar record_data = Global.clone( record );\n\t\t\t\t\trecord_data.user_id = record.user_id[i];\n\t\t\t\t\trecords_data.push( record_data );\n\t\t\t\t}\n\t\t\t\tthis.setEditMenu();\n\n\t\t\t\treturn this.uniformVariable( records_data );\n\n\t\t\t} else {\n\t\t\t\trecord.user_id = record.user_id.toString();\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.uniformVariable( record );\n\t}\n\n\tonSaveAndContinue( ignoreWarning ) {\n\t\tvar $this = this;\n\t\tif ( !Global.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\n\t\tvar record = this.buildMassAddRecord( this.current_edit_record );\n\t\tthis.api['set' + this.api.key_name]( record, false, ignoreWarning, {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.onSaveAndContinueResult( result );\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tdoSaveAPICall( record, ignoreWarning ) {\n\t\t// #2644: We have to handle the record as though its a mass_add, as the awesomebox will always return an array of user_id's. Cannot force is_mass_adding, as this affects the save&continue button disabling.\n\t\trecord = this.buildMassAddRecord( record );\n\t\tsuper.doSaveAPICall( record, ignoreWarning );\n\t}\n\n\tonSaveAndCopy( ignoreWarning ) {\n\t\tvar $this = this;\n\t\tif ( !Global.isSet( ignoreWarning ) ) {\n\t\t\tignoreWarning = false;\n\t\t}\n\t\tthis.is_add = true;\n\t\tthis.is_changed = false;\n\t\tvar record = this.current_edit_record;\n\t\tLocalCacheData.current_doing_context_action = 'save_and_copy';\n\t\tvar records_data = null;\n\t\tthis.clearNavigationData();\n\n\t\tvar record = this.buildMassAddRecord( record );\n\n\t\tthis.api['set' + this.api.key_name]( record, false, ignoreWarning, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t\tif ( result_data === true ) {\n\t\t\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\n\t\t\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\t\t$this.refresh_id = result_data;\n\t\t\t\t\t}\n\t\t\t\t\t$this.search( false );\n\t\t\t\t\t$this.onCopyAsNewClick();\n\t\t\t\t} else {\n\t\t\t\t\t$this.setErrorTips( result );\n\t\t\t\t\t$this.setErrorMenu();\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tonSaveAndNewClick( ignoreWarning ) {\n\t\tvar $this = this;\n\t\tif ( !Global.isSet( ignoreWarning ) ) {\n\t\t\tignoreWarning = false;\n\t\t}\n\t\tthis.is_add = true;\n\t\tvar record = this.current_edit_record;\n\t\tLocalCacheData.current_doing_context_action = 'new';\n\n\t\tvar records_data = null;\n\n\t\tvar record = this.buildMassAddRecord( record );\n\n\t\tthis.api['set' + this.api.key_name]( record, false, ignoreWarning, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t\tif ( result_data === true ) {\n\t\t\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\n\t\t\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\t\t$this.refresh_id = result_data;\n\t\t\t\t\t}\n\t\t\t\t\t$this.search( false );\n\t\t\t\t\t$this.onAddClick( true );\n\t\t\t\t} else {\n\t\t\t\t\t$this.setErrorTips( result );\n\t\t\t\t\t$this.setErrorMenu();\n\t\t\t\t}\n\n\t\t\t}\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_adding || this.is_mass_editing || this.is_viewing || ( this.current_edit_record && Global.isArray( this.current_edit_record.user_id ) && this.current_edit_record.user_id.length > 1 ) ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\t\tvar allow_multiple_selection = false;\n\n\t\tvar tab_model = {\n\t\t\t'tab_pay_stub_amendment': { 'label': $.i18n._( 'Pay Stub Amendment' ) },\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubAmendment,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_pay_stub_amendment',\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_pay_stub_amendment = this.edit_view_tab.find( '#tab_pay_stub_amendment' );\n\n\t\tvar tab_pay_stub_amendment_column1 = tab_pay_stub_amendment.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_pay_stub_amendment_column1 );\n\n\t\tif ( this.is_add ) {\n\t\t\tallow_multiple_selection = true;\n\t\t}\n\n\t\t//Employee\n\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: allow_multiple_selection,\n\t\t\tlayout_name: 'global_user',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'user_id'\n\t\t} );\n\n\t\tvar default_args = {};\n\t\tdefault_args.permission_section = 'pay_stub_amendment';\n\t\tform_item_input.setDefaultArgs( default_args );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Employee(s)' ), form_item_input, tab_pay_stub_amendment_column1, '' );\n\n\t\tvar args = {};\n\t\tvar filter_data = {};\n\t\tfilter_data.type_id = [10, 20, 30, 50, 60, 65, 80];\n\t\targs.filter_data = filter_data;\n\n\t\t// Pay Stub Account\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'pay_stub_entry_name_id',\n\t\t\tvalidation_field: 'pay_stub_entry_name'\n\t\t} );\n\n\t\tform_item_input.setDefaultArgs( args );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Stub Account' ), form_item_input, tab_pay_stub_amendment_column1 );\n\n\t\t// Amount Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\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._( 'Amount Type' ), form_item_input, tab_pay_stub_amendment_column1 );\n\n\t\t// Fixed\n\n\t\t// Units\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'units', width: 114, hasKeyEvent: true } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Units' ), form_item_input, tab_pay_stub_amendment_column1, '', null, true, null, null, true );\n\n\t\t// Rate\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'rate', width: 114, hasKeyEvent: true } );\n\n\t\tvar widgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\twidgetContainer.append( form_item_input );\n\n\t\tif ( !this.is_viewing ) {\n\t\t\tvar get_hourly_rate_btn = $( '<input class=\\'t-button\\' style=\\'margin-left: 5px; height: 25px;\\' type=\\'button\\' value=\\'' + $.i18n._( 'Get Hourly Rate' ) + '\\'></input>' );\n\t\t\tget_hourly_rate_btn.click( function() {\n\t\t\t\t$this.getUserHourlyRate();\n\t\t\t} );\n\t\t\twidgetContainer.append( get_hourly_rate_btn );\n\t\t}\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Rate' ), form_item_input, tab_pay_stub_amendment_column1, '', widgetContainer, true, null, null, true );\n\n\t\t// Amount\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'amount', width: 114 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Amount' ), form_item_input, tab_pay_stub_amendment_column1, '', null, true );\n\n\t\t// Percent\n\n\t\t//Percent\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'percent_amount', width: 79 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Percent' ), form_item_input, tab_pay_stub_amendment_column1, '', null, true );\n\n\t\targs = {};\n\t\tfilter_data = {};\n\t\tfilter_data.type_id = [10, 20, 30, 40, 50, 60, 65];\n\t\targs.filter_data = filter_data;\n\n\t\t// Percent of\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'percent_amount_entry_name_id'\n\t\t} );\n\n\t\tform_item_input.setDefaultArgs( args );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Percent of' ), form_item_input, tab_pay_stub_amendment_column1, '', null, true );\n\n\t\t// Pay Stub Note (Public)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Stub Note (Public)' ), form_item_input, tab_pay_stub_amendment_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\t\t// Description (Private)\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\n\t\tform_item_input.TTextArea( { field: 'private_description' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description (Private)' ), form_item_input, tab_pay_stub_amendment_column1, '', null, null, true );\n\n\t\t// Effective Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\n\t\tform_item_input.TDatePicker( { field: 'effective_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Effective Date' ), form_item_input, tab_pay_stub_amendment_column1 );\n\n\t\t// Year to Date (YTD) Adjustment -- DISABLED\n\t\t//form_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t//form_item_input.TCheckbox( {field: 'ytd_adjustment'} );\n\t\t//this.addEditFieldToColumn( $.i18n._( 'Year to Date (YTD) Adjustment' ), form_item_input, tab_pay_stub_amendment_column1, '' );\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\n\t\tvar default_args = {};\n\t\tdefault_args.permission_section = 'pay_stub_amendment';\n\n\t\tthis.search_fields = [\n\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\tadv_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._( 'Pay Period' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'pay_period_id',\n\t\t\t\tlayout_name: 'global_Pay_period',\n\t\t\t\tapi_class: TTAPI.APIPayPeriod,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\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._( 'Employee' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'user_id',\n\t\t\t\tdefault_args: default_args,\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\tadv_search: true,\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: true,\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._( 'Title' ),\n\t\t\t\tfield: 'title_id',\n\t\t\t\tin_column: 1,\n\t\t\t\tlayout_name: 'global_job_title',\n\t\t\t\tapi_class: TTAPI.APIUserTitle,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\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._( 'Employee Status' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'user_status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_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._( 'Group' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tmultiple: true,\n\t\t\t\tfield: 'group_id',\n\t\t\t\tlayout_name: 'global_tree_column',\n\t\t\t\ttree_mode: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\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._( 'Default Branch' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'default_branch_id',\n\t\t\t\tlayout_name: 'global_branch',\n\t\t\t\tapi_class: TTAPI.APIBranch,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\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._( 'Default Department' ),\n\t\t\t\tfield: 'default_department_id',\n\t\t\t\tin_column: 2,\n\t\t\t\tlayout_name: 'global_department',\n\t\t\t\tapi_class: TTAPI.APIDepartment,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\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: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\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: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\t\t];\n\t}\n\n\tuniformVariable( data ) {\n\t\tif ( data.status_id ) {\n\t\t\tdelete data.status_id;\n\t\t}\n\t\treturn super.uniformVariable( data );\n\t}\n\n\tcopyAsNewResetIds( data ) {\n\t\tdata = this.uniformVariable( data );\n\t\tdata.id = null;\n\t\tdata.effective_date = ( new Date ).format( Global.getLoginUserDateFormat() );\n\t\treturn data;\n\t}\n\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDc3Ni5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWlDOztBQUUxQjtBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxJQUFJOztBQUVKO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwyQkFBMkIsQ0FBQztBQUM1QiwwQkFBMEIsQ0FBQztBQUMzQjtBQUNB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