"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["employees-remittance_destination_account-RemittanceDestinationAccountViewController"],{4333:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RemittanceDestinationAccountViewController\": () => (/* binding */ RemittanceDestinationAccountViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass RemittanceDestinationAccountViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#remittance_destination_account_view_container',\n\n\t\t\tstatus_array: null,\n\t\t\ttype_array: null,\n\t\t\tpriority_array: [],\n\t\t\tamount_type_array: null,\n\t\t\tach_transaction_type_array: null,\n\t\t\tach_transaction_type_data: null,\n\t\t\tremittance_source_account_array: null,\n\t\t\tcompany_api: null,\n\t\t\tuser_default_api: null,\n\t\t\tuser_api: null,\n\t\t\tlegal_entity_id: false,\n\t\t\tremittance_source_account_api: null,\n\t\t\tsub_document_view_controller: null,\n\t\t\tdocument_object_type_id: null,\n\t\t\tis_first_load: true,\n\t\t\tis_subview: false\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\tthis.type_array = [];\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'RemittanceDestinationAccountEditView.html';\n\t\tthis.permission_id = 'remittance_destination_account';\n\t\tthis.viewId = 'RemittanceDestinationAccount';\n\t\tthis.script_name = 'RemittanceDestinationAccountView';\n\t\tthis.table_name_key = 'remittance_destination_account';\n\t\tthis.context_menu_name = $.i18n._( 'Pay Methods' );\n\t\tthis.navigation_label = $.i18n._( 'Pay Methods' );\n\t\tthis.document_object_type_id = 320;\n\t\tthis.api = TTAPI.APIRemittanceDestinationAccount;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.user_default_api = TTAPI.APIUserDefault;\n\t\tthis.remittance_source_account_api = TTAPI.APIRemittanceSourceAccount;\n\n\t\tthis.render();\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\tinitOptions() {\n\t\tvar $this = this;\n\t\tthis.initDropDownOption( 'status' );\n\t\tthis.initDropDownOption( 'amount_type' );\n\t\tthis.api.getOptions( 'priority', {\n\t\t\tonResult: function( res ) {\n\t\t\t\t$this.priority_array = res.getResult();\n\t\t\t}\n\t\t} );\n\t\tthis.api.getOptions( 'ach_transaction_type', {\n\t\t\tonResult: function( res ) {\n\t\t\t\tvar result = res.getResult();\n\t\t\t\t$this.ach_transaction_type_data = result;\n\t\t\t\t$this.ach_transaction_type_array = Global.buildRecordArray( result );\n\t\t\t}\n\t\t} );\n\n\t\tthis.remittance_source_account_api.getOptions( 'type', {\n\t\t\tonResult: function( result ) {\n\t\t\t\tresult = result.getResult();\n\t\t\t\t//Prevent exception when in subgrid mode: \"TypeError: $this.basic_search_field_ui_dic.type_id is undefined\"\n\t\t\t\tif ( $this.basic_search_field_ui_dic && $this.basic_search_field_ui_dic['type_id'] ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['type_id'].setSourceData( Global.buildRecordArray( result ) );\n\t\t\t\t}\n\t\t\t\tif ( $this.adv_search_field_ui_dic && $this.adv_search_field_ui_dic['type_id'] ) {\n\t\t\t\t\t$this.adv_search_field_ui_dic['type_id'].setSourceData( Global.buildRecordArray( result ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetDefaultDisplayColumns( callBack ) {\n\n\t\tvar $this = this;\n\t\tthis.api.getOptions( 'default_display_columns', {\n\t\t\tonResult: function( columns_result ) {\n\n\t\t\t\tvar columns_result_data = columns_result.getResult();\n\t\t\t\t$this.default_display_columns = [];\n\n\t\t\t\tfor ( var n in columns_result_data ) {\n\t\t\t\t\tif ( $this.is_subview == true && ( columns_result_data[n] == 'user_first_name' || columns_result_data[n] == 'user_last_name' ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.default_display_columns.push( columns_result_data[n] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( callBack ) {\n\t\t\t\t\tcallBack();\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tattachElement( key ) {\n\t\t//Error: Uncaught TypeError: Cannot read property 'insertBefore' of undefined in interface/html5/views/BaseViewController.js?v=9.0.0-20150822-210544 line 6439\n\t\tif ( !this.edit_view_form_item_dic || !this.edit_view_form_item_dic[key] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar place_holder = $( '.place_holder_' + key );\n\t\tthis.edit_view_form_item_dic[key].insertBefore( place_holder );\n\t\tplace_holder.remove();\n\n\t\treturn $( this.edit_view_form_item_dic[key].find( '.edit-view-form-item-label' ) );\n\t}\n\n\tsetCurrentEditRecordData() {\n\n\t\tvar $this = this;\n\t\t//Set current edit record data to all widgets\n\t\t// First to get legal_entity_id\n\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\n\t\t\tif ( key === 'value1' && this.current_edit_record[key] && !this.is_mass_editing ) {\n\t\t\t\tif ( Global.isSet( this.ach_transaction_type_data[this.current_edit_record[key]] ) ) {\n\t\t\t\t\tthis.edit_view_ui_dic['value1_2'].setValue( this.current_edit_record[key] );\n\t\t\t\t} else {\n\t\t\t\t\tthis.edit_view_ui_dic['value1_1'].setValue( this.current_edit_record[key] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'amount_type_id': //popular case\n\t\t\t\t\t\tthis.onAmountTypeChange( 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\tcase 'value1_1':\n\t\t\t\t\tcase 'value1_2':\n\t\t\t\t\tcase 'type_id':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'currency_id':\n\t\t\t\t\tcase 'remittance_source_account_id':\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tthis.detachElement( 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\t//Only allow changing employee if they have permissions to do so.\n\t\tif ( !( PermissionManager.validate( this.permission_id, 'edit' ) || PermissionManager.validate( this.permission_id, 'edit_child' ) ) ) {\n\t\t\t$this.current_edit_record['user_id'] = LocalCacheData.getLoginUser().id;\n\t\t\t$this.edit_view_ui_dic.user_id.setValue( LocalCacheData.getLoginUser().id );\n\t\t\tthis.edit_view_ui_dic.user_id.setEnabled( false );\n\t\t}\n\n\t\tthis.getLegalEntity();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.getTypeOptions();\n\t\tthis.getRemittanceSourceAccount();\n\t\tthis.onTypeChange();\n\t\tthis.getRemittanceSourceAccount();\n\t\tthis.edit_view_ui_dic.legal_entity_id.setEnabled( false );\n\t}\n\n\tgetTypeOptions() {\n\t\tvar $this = this;\n\n\t\tvar params = {};\n\t\tif ( this.is_mass_editing ) {\n\t\t\tparams.company_id = LocalCacheData.getLoginUser().company_id;\n\t\t} else {\n\t\t\tparams.legal_entity_id = this.current_edit_record['legal_entity_id'];\n\t\t}\n\n\t\tthis.api.getOptions( 'type', params, {\n\t\t\tasync: false,\n\t\t\tonResult: function( res ) {\n\n\t\t\t\tvar result = res.getResult();\n\t\t\t\tif ( !result ) {\n\t\t\t\t\tresult = [];\n\t\t\t\t}\n\t\t\t\t$this.type_array = Global.buildRecordArray( result );\n\n\t\t\t\t$this.edit_view_ui_dic['type_id'].setSourceData( $this.type_array );\n\t\t\t\tif ( $this.current_edit_record['type_id'] && result[$this.current_edit_record['type_id']] ) {\n\t\t\t\t\t$this.edit_view_ui_dic['type_id'].setValue( $this.current_edit_record['type_id'] );\n\t\t\t\t} else {\n\t\t\t\t\t$this.current_edit_record['type_id'] = $this.edit_view_ui_dic['type_id'].getValue();\n\t\t\t\t}\n\n\t\t\t\t$this.onTypeChange( $this.current_edit_record['type_id'] );\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetLegalEntity() {\n\t\tvar $this = this;\n\n\t\tif ( this.edit_view_ui_dic && this.edit_view_ui_dic['user_id'] && this.edit_view_ui_dic['user_id'].getValue() != TTUUID.zero_id ) {\n\t\t\tvar user_id = this.edit_view_ui_dic['user_id'].getValue();\n\t\t\tif ( !Global.isSet( user_id ) || Global.isFalseOrNull( user_id ) ) {\n\t\t\t\tuser_id = this.current_edit_record['user_id'];\n\t\t\t}\n\n\t\t\tvar user_args = {};\n\t\t\tuser_args.filter_data = {};\n\t\t\tuser_args.filter_columns = {\n\t\t\t\tid: true,\n\t\t\t\tlegal_entity_id: true,\n\t\t\t\tcurrency_id: true\n\t\t\t};\n\t\t\tuser_args.filter_data.id = user_id;\n\t\t\tthis.user_api.getUser( user_args, {\n\t\t\t\tasync: false, onResult: function( res ) {\n\t\t\t\t\tif ( res.isValid() ) {\n\t\t\t\t\t\tvar result = res.getResult()[0];\n\t\t\t\t\t\tif ( Global.isSet( result.legal_entity_id ) && result.legal_entity_id !== 0 ) {\n\t\t\t\t\t\t\t$this.current_edit_record['legal_entity_id'] = result.legal_entity_id;\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.legal_entity_id.setValue( result.legal_entity_id );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( Global.isSet( result.currency_id ) && !Global.isSet( $this.current_edit_record['currency_id'] ) ) {\n\t\t\t\t\t\t\t$this.current_edit_record['currency_id'] = result.currency_id;\n\t\t\t\t\t\t\t$this.edit_view_ui_dic.currency_id.setValue( result.currency_id );\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\tif ( !Global.isSet( this.current_edit_record['legal_entity_id'] ) || Global.isFalseOrNull( this.current_edit_record['legal_entity_id'] ) ) {\n\t\t\t\tthis.user_default_api['get' + this.user_default_api.key_name]( {\n\t\t\t\t\tasync: false, onResult: function( res ) {\n\t\t\t\t\t\tvar result = res.getResult();\n\t\t\t\t\t\t$this.current_edit_record['legal_entity_id'] = result[0]['legal_entity_id'];\n\t\t\t\t\t\t$this.edit_view_ui_dic.legal_entity_id.setValue( result[0]['legal_entity_id'] );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\t\t\t$this.current_edit_record['legal_entity_id'] = TTUUID.zero_id;\n\t\t\t$this.edit_view_ui_dic.legal_entity_id.setValue( TTUUID.zero_id );\n\t\t}\n\t}\n\n\tgetRemittanceSourceAccount() {\n\n\t\tvar $this = this;\n\n\t\tvar type_id = this.edit_view_ui_dic['type_id'].getValue();\n\t\tvar legal_entity_id = this.edit_view_ui_dic['legal_entity_id'].getValue();\n\n\t\tif ( !Global.isSet( type_id ) || Global.isFalseOrNull( type_id ) ) {\n\t\t\ttype_id = this.current_edit_record['type_id'];\n\t\t}\n\n\t\tvar source_account_args = {};\n\t\tsource_account_args.filter_data = {};\n\t\tsource_account_args.filter_data.type_id = type_id;\n\n\t\tif ( this.is_mass_editing ) {\n\t\t\tsource_account_args.filter_data.company_id = [LocalCacheData.getLoginUser().company_id, TTUUID.not_exist_id];\n\t\t} else {\n\t\t\tsource_account_args.filter_data.legal_entity_id = [legal_entity_id, TTUUID.not_exist_id];\n\t\t}\n\n\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setValue( 0 );\n\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setSourceData( null );\n\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setDefaultArgs( source_account_args );\n\n\t\tthis.remittance_source_account_api.getRemittanceSourceAccount( source_account_args, {\n\t\t\tasync: false, onResult: function( res ) {\n\t\t\t\tvar result = res.getResult();\n\t\t\t\tif ( !result ) {\n\t\t\t\t\tresult = [];\n\t\t\t\t}\n\t\t\t\t$this.remittance_source_account_array = result;\n\t\t\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setSourceData( $this.remittance_source_account_array );\n\n\t\t\t\tvar key = false;\n\t\t\t\tfor ( var index in result ) {\n\t\t\t\t\tif ( !result.hasOwnProperty( index ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ( result[index].id != TTUUID.zero_id && result[index].id != TTUUID.not_exist_id && !key ) {\n\t\t\t\t\t\tkey = index;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $this.current_edit_record['remittance_source_account_id'] ) {\n\t\t\t\t\t\tif ( $this.current_edit_record['remittance_source_account_id'] == result[index].id ) {\n\t\t\t\t\t\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setValue( $this.current_edit_record['remittance_source_account_id'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( typeof result == 'object' && !$this.current_edit_record.id ) {\n\t\t\t\t\tif ( $this.is_first_load || $this.current_edit_record.type_id == 0 ) {\n\t\t\t\t\t\t$this.is_first_load = false;\n\t\t\t\t\t\tif ( $this.edit_view_ui_dic['remittance_source_account_id'].getValue() !== 0 && Global.isFalseOrNull( $this.edit_view_ui_dic['remittance_source_account_id'].getValue() ) ) {\n\t\t\t\t\t\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setValue( result[key].id );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( Global.isFalseOrNull( $this.edit_view_ui_dic['remittance_source_account_id'].getValue() ) ) {\n\t\t\t\t\t\t\t$this.edit_view_ui_dic['remittance_source_account_id'].setValue( result[key].id );\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.onTypeChange();\n\t\t\t}\n\t\t} );\n\n\t\t$this.current_edit_record['remittance_source_account_id'] = $this.edit_view_ui_dic['remittance_source_account_id'].getValue();\n\t}\n\n\tuniformVariable( record ) {\n\t\t//ensure that the variable variable fields are set to false if they aren't showing.\n\t\tif ( this.edit_view_ui_dic && this.current_edit_record.remittance_source_account_id != TTUUID.zero_id ) { //Keep accountd data if UUID == zero_id\n\t\t\tfor ( var i = 1; i <= 10; i++ ) {\n\t\t\t\tif ( i == 1 ) {\n\t\t\t\t\tif ( this.edit_view_ui_dic['value1_1'] && this.edit_view_ui_dic['value1_1'].is( ':visible' ) ) {\n\t\t\t\t\t\trecord['value1'] = record['value1_1'] ? record['value1_1'] : this.edit_view_ui_dic['value1_1'].getValue();\n\t\t\t\t\t} else if ( this.edit_view_ui_dic['value1_2'] && this.edit_view_ui_dic['value1_2'].is( ':visible' ) ) {\n\t\t\t\t\t\trecord['value1'] = record['value1_2'] ? record['value1_2'] : this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !this.is_mass_editing ) {\n\t\t\t\t\t\t\trecord['value1'] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tif ( !this.is_mass_editing && record['value' + i] && ( typeof this.edit_view_ui_dic['value' + i] == 'undefined' || ( this.edit_view_ui_dic['value' + i] && this.edit_view_ui_dic['value' + i].is( ':visible' ) == false ) ) ) {\n\t\t\t\t\t\trecord['value' + i] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( !this.is_mass_editing ) {\n\t\t\trecord.legal_entity_id = this.current_edit_record['legal_entity_id'];\n\t\t}\n\n\t\treturn record;\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [],\n\t\t\tinclude: [{\n\t\t\t\tlabel: $.i18n._( 'Import' ),\n\t\t\t\tid: 'import_icon',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'import_export',\n\t\t\t\tgroup: 'other',\n\t\t\t\tvue_icon: 'tticon tticon-file_download_black_24dp',\n\t\t\t\tpermission_result: PermissionManager.checkTopLevelPermission( 'ImportCSVEmployeeBankAccount' ),\n\t\t\t\tpermission: null,\n\t\t\t\tsort_order: 9010\n\t\t\t}]\n\t\t};\n\n\t\treturn context_menu_model;\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}\n\t}\n\n\tonImportClick() {\n\t\tvar $this = this;\n\n\t\tIndexViewController.openWizard( 'ImportCSVWizard', 'RemittanceDestinationAccount', function() {\n\t\t\t$this.search();\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\n\t\tswitch ( key ) {\n\t\t\tcase 'value1_1':\n\t\t\tcase 'value1_2':\n\t\t\t\tthis.current_edit_record['value1'] = c_value;\n\t\t\t\tbreak;\n\t\t\tcase 'remittance_source_account_id':\n\t\t\tcase 'country':\n\t\t\tcase 'type_id':\n\t\t\t\tthis.onTypeChange( c_value );\n\t\t\t\tbreak;\n\t\t\tcase 'user_id':\n\t\t\t\tthis.getLegalEntity();\n\t\t\t\tthis.getTypeOptions();\n\t\t\t\tthis.edit_view_ui_dic['currency_id'].setValue( this.current_edit_record['currency_id'] );\n\t\t\t\tbreak;\n\t\t\tcase 'amount_type_id':\n\t\t\t\tthis.onAmountTypeChange( c_value );\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//below the switch to ensure that fields are populated first.\n\t\tif ( key === 'type_id' || key === 'user_id' ) {\n\t\t\tthis.getRemittanceSourceAccount();\n\t\t}\n\t\tthis.current_edit_record[key] = c_value;\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tonTypeChange( arg ) {\n\n\t\tvar $this = this;\n\t\tif ( !Global.isSet( arg ) || Global.isFalseOrNull( arg ) ) {\n\n\t\t\tif ( !Global.isSet( this.current_edit_record['type_id'] ) || Global.isFalseOrNull( this.current_edit_record['type_id'] ) ) {\n\t\t\t\tthis.current_edit_record['type_id'] = 2000;\n\t\t\t}\n\n\t\t\targ = this.current_edit_record['type_id'];\n\t\t}\n\n\t\tthis.detachElement( 'value1_1' );\n\t\tthis.detachElement( 'value1_2' );\n\t\tthis.detachElement( 'value2' );\n\t\tthis.detachElement( 'value3' ); //ALWAYS STORE ACCOUNT HERE. We encrypt this field.\n\t\tthis.detachElement( 'value4' );\n\t\tthis.detachElement( 'value5' );\n\t\tthis.detachElement( 'value6' );\n\t\tthis.detachElement( 'value7' );\n\t\tthis.detachElement( 'value8' );\n\t\tthis.detachElement( 'value9' );\n\t\tthis.detachElement( 'value10' );\n\n\t\tvar country = null;\n\t\tif ( this.edit_view_ui_dic.type_id.getValue() == 3000 && this.edit_view_ui_dic.remittance_source_account_id.getValue() != TTUUID.zero_id ) {\n\t\t\tif ( this.edit_view_ui_dic.remittance_source_account_id.getValue() ) {\n\t\t\t\tvar rsa = this.remittance_source_account_api.getRemittanceSourceAccount( { filter_data: { id: this.edit_view_ui_dic.remittance_source_account_id.getValue() } }, { async: false } ).getResult();\n\t\t\t\tcountry = rsa[0].country;\n\t\t\t}\n\n\t\t\tif ( this.is_mass_editing == true ) {\n\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Transit/Routing' ) );\n\t\t\t} else if ( !this.is_mass_editing && country != null ) {\n\t\t\t\tif ( country == 'US' ) {\n\t\t\t\t\tthis.attachElement( 'value1_2' ).text( $.i18n._( 'Account Type' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Routing' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t\tif ( Global.isFalseOrNull( this.current_edit_record['value1'] ) ) {\n\t\t\t\t\t\tthis.current_edit_record['value1'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t\tthis.current_edit_record['value1_2'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t}\n\t\t\t\t} else if ( country == 'CA' ) {\n\t\t\t\t\tthis.attachElement( 'value1_1' ).text( $.i18n._( 'Institution' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Bank Transit' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t\tthis.current_edit_record['value1'] = this.edit_view_ui_dic['value1_1'].getValue();\n\t\t\t\t\tthis.current_edit_record['value1_1'] = this.edit_view_ui_dic['value1_1'].getValue();\n\t\t\t\t} else if ( $.inArray( country, ['AG', 'BS', 'BB', 'BZ', 'DO', 'GY', 'HT', 'JM', 'DM', 'GD', 'KN', 'LC', 'VC', 'SR', 'TT'] ) != -1 ) { //Carribbean countries.\n\t\t\t\t\tthis.attachElement( 'value1_1' ).text( $.i18n._( 'Institution' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Bank Transit' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t\tthis.current_edit_record['value1'] = this.edit_view_ui_dic['value1_1'].getValue();\n\t\t\t\t\tthis.current_edit_record['value1_1'] = this.edit_view_ui_dic['value1_1'].getValue();\n\t\t\t\t} else {\n\t\t\t\t\tthis.attachElement( 'value1_2' ).text( $.i18n._( 'Account Type' ) );\n\t\t\t\t\tthis.attachElement( 'value2' ).text( $.i18n._( 'Routing' ) );\n\t\t\t\t\tthis.attachElement( 'value3' ).text( $.i18n._( 'Account' ) );\n\t\t\t\t\tif ( Global.isFalseOrNull( this.current_edit_record['value1'] ) ) {\n\t\t\t\t\t\tthis.current_edit_record['value1'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t\tthis.current_edit_record['value1_2'] = this.edit_view_ui_dic['value1_2'].getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tonAmountTypeChange( arg ) {\n\t\tvar $this = this;\n\t\tif ( !Global.isSet( arg ) || Global.isFalseOrNull( arg ) ) {\n\n\t\t\tif ( !Global.isSet( this.current_edit_record['amount_type_id'] ) || Global.isFalseOrNull( this.current_edit_record['amount_type_id'] ) ) {\n\t\t\t\tthis.current_edit_record['amount_type_id'] = 10;\n\t\t\t}\n\n\t\t\targ = this.current_edit_record['amount_type_id'];\n\t\t}\n\n\t\tthis.detachElement( 'amount' );\n\t\tthis.detachElement( 'percent_amount' );\n\n\t\tif ( arg == 10 ) {\n\t\t\tthis.attachElement( 'percent_amount' );\n\t\t} else if ( arg == 20 ) {\n\t\t\tthis.attachElement( 'amount' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_remittance_destination_account': { 'label': $.i18n._( 'Pay Methods' ) },\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.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRemittanceDestinationAccount,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_remittance_destination_account',\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\t\tvar tab_remittance_destination_account = this.edit_view_tab.find( '#tab_remittance_destination_account' );\n\t\tvar tab_remittance_destination_account_column1 = tab_remittance_destination_account.find( '.first-column' );\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( tab_remittance_destination_account_column1 );\n\n\t\t// Legal entity\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\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\tfield: 'legal_entity_id',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Legal Entity' ), form_item_input, tab_remittance_destination_account_column1, '' );\n\n\t\t// Employee\n\t\tform_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: false,\n\t\t\tlayout_name: 'global_user',\n\t\t\tfield: 'user_id',\n\t\t\tset_empty: true, //Must be true for when administrators add payment methods under Employee -> Payment Methods.\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tvar default_args = {};\n\t\tdefault_args.permission_section = 'remittance_destination_account';\n\t\tform_item_input.setDefaultArgs( default_args );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Employee' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t//Status\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'status_id' } );\n\t\tform_item_input.setSourceData( $this.status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_remittance_destination_account_column1, '' );\n\n\t\t// Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Name' ), form_item_input, tab_remittance_destination_account_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Description\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description' ), form_item_input, tab_remittance_destination_account_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//TYPE\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'type_id' } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_remittance_destination_account_column1, '' );\n\n\t\t// Remittance Source Account\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRemittanceSourceAccount,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_remittance_source_account',\n\t\t\tfield: 'remittance_source_account_id',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Remittance Source Account' ), form_item_input, tab_remittance_destination_account_column1, '' );\n\n\t\t// Currency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APICurrency,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_currency',\n\t\t\tfield: 'currency_id',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Currency' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t// Priority\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'priority' } );\n\t\tform_item_input.setSourceData( $this.priority_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Priority' ), form_item_input, tab_remittance_destination_account_column1, '' );\n\n\t\t// Amount TYPE\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'amount_type_id' } );\n\t\tform_item_input.setSourceData( $this.amount_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Amount Type' ), form_item_input, tab_remittance_destination_account_column1, '' );\n\n\t\t//Amount\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'amount', width: 50 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Amount' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t//Percent\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'percent_amount', width: 79 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Percent' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\tif ( this.is_mass_editing ) {\n\t\t\t// Value2\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value2', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value2' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\t\t} else { //Never show these fields for mass edit as they should never be mass editable.\n\t\t\t// Value1\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value1_1', validation_field: 'value1', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value1' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\t\tform_item_input.TComboBox( { field: 'value1_2', validation_field: 'value1' } );\n\t\t\tform_item_input.setSourceData( $this.ach_transaction_type_array );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Account Type' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value2\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value2', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value2' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value3\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value3', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value3' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value4\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value4', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value4' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value5\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value5', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value5' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// the below are all non-display\n\n\t\t\t// Value6\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value6', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value6' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value7\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value7', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value7' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value8\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value8', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value8' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value9\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value9', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value9' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\n\t\t\t// Value10\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'value10', width: 149 } );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Value10' ), form_item_input, tab_remittance_destination_account_column1, '', null, true );\n\t\t}\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\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\tapi_class: TTAPI.APILegalEntity,\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_legal_entity',\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\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\tlayout_name: 'global_user',\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._( 'Source Account' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'remittance_source_account_id',\n\t\t\t\tapi_class: TTAPI.APIRemittanceSourceAccount,\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_remittance_source_account',\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._( 'Status' ),\n\t\t\t\tin_column: 2,\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._( 'Type' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'type_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._( 'Currency' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'currency_id',\n\t\t\t\tapi_class: TTAPI.APICurrency,\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_currency',\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._( 'Transit/Routing' ),\n\t\t\t\tin_column: 3,\n\t\t\t\tfield: 'value2',\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\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._( 'Created By' ),\n\t\t\t\tin_column: 3,\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\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: 3,\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\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\tsuper.searchDone();\n\t\tTTPromise.resolve( 'PaymentMethodsView', 'init' );\n\t}\n}\n\nRemittanceDestinationAccountViewController.loadSubView = function( container, beforeViewLoadedFun, afterViewLoadedFun ) {\n\n\tGlobal.loadViewSource( 'RemittanceDestinationAccount', 'SubRemittanceDestinationAccountView.html', function( result ) {\n\t\tvar args = {};\n\t\tvar template = _.template( result, args );\n\n\t\tif ( Global.isSet( beforeViewLoadedFun ) ) {\n\t\t\tbeforeViewLoadedFun();\n\t\t}\n\n\t\tif ( Global.isSet( container ) ) {\n\t\t\tcontainer.html( template );\n\t\t\tif ( Global.isSet( afterViewLoadedFun ) ) {\n\t\t\t\tafterViewLoadedFun( sub_remittance_destination_account_view_controller );\n\t\t\t}\n\t\t}\n\t} );\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMzMy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQ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