1 line
60 KiB
JavaScript
1 line
60 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["company-payroll_remittance_agency-PayrollRemittanceAgencyEventViewController"],{542:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PayrollRemittanceAgencyEventViewController\": () => (/* binding */ PayrollRemittanceAgencyEventViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass PayrollRemittanceAgencyEventViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#payroll_remittance_agency_event_view_container', //Must set el here and can only set string, so events can work\n\n\t\t\tuser_api: null,\n\t\t\tstatus_array: null,\n\t\t\taction_array: null,\n\t\t\tagency_array: null,\n\t\t\tpayment_frequency_array: null,\n\t\t\treport_frequency_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\tdistrict_array: null,\n\n\t\t\tmonth_of_year_array: null,\n\t\t\tmonth_of_quarter_array: null,\n\t\t\tweek_interval_array: null,\n\t\t\tday_of_month_array: null,\n\t\t\tday_of_week_array: null,\n\n\t\t\tremittance_source_account_array: null,\n\t\t\tsub_event_view_controller: null,\n\n\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 = 'PayrollRemittanceAgencyEventEditView.html';\n\t\tthis.permission_id = 'payroll_remittance_agency';\n\t\tthis.script_name = 'PayrollRemittanceAgencyEventView';\n\t\tthis.table_name_key = 'payroll_remittance_agency_event';\n\t\tthis.viewId = 'PayrollRemittanceAgencyEvent';\n\t\tthis.context_menu_name = $.i18n._( 'Remittance Agency Event' );\n\t\tthis.navigation_label = $.i18n._( 'Remittance Agency Event' );\n\t\tthis.api = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.company_api = TTAPI.APICompany;\n\n\t\tthis.date_api = TTAPI.APITTDate;\n\t\tthis.api_user_report = TTAPI.APIUserReportData;\n\t\tthis.month_of_quarter_array = Global.buildRecordArray( { 1: 1, 2: 2, 3: 3 } );\n\n\t\tthis.render();\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\t//override required because this is a subview in an edit view.\n\t_setGridSizeGridWidthOfSubViewMode() {\n\t\tthis.grid.setGridWidth( $( this.el ).parents( '.edit-view-tab' ).parent().parent().width() - 10 );\n\t}\n\n\t//Don't initOptions if edit_only_mode. Do it in sub views\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'status' );\n\t\tthis.initDropDownOption( 'frequency' );\n\n\t\tthis.api.getOptions( 'week_interval', {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.week_interval_array = res;\n\t\t\t}\n\n\t\t} );\n\t\tthis.date_api.getMonthOfYearArray( {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.month_of_year_array = 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.buildRecordArray( res );\n\t\t\t}\n\t\t} );\n\t\tthis.date_api.getDayOfWeekArray( {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.day_of_week_array = res;\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetTypeOptions() {\n\t\tvar $this = this;\n\t\tvar type_params = {\n\t\t\t'payroll_remittance_agency_id': this.edit_view_ui_dic.payroll_remittance_agency_id.getValue()\n\t\t};\n\n\t\tthis.api.getOptions( 'type', type_params, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.edit_view_ui_dic.type_id.setSourceData( Global.buildRecordArray( res ) );\n\n\t\t\t\t$this.edit_view_ui_dic.type_id.setSourceData( Global.buildRecordArray( res ) );\n\t\t\t\t//must update current edit record in case the previous type has been removed from list\n\t\t\t\t$this.current_edit_record.type_id = $this.edit_view_ui_dic.type_id.getValue();\n\n\t\t\t\tTTPromise.resolve( 'PayrollRemittanceAgencyEvent', 'updateUI' );\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetReportOptions() {\n\t\tvar $this = this;\n\t\tthis.api_user_report.getUserReportData( { filter_data: { include_user_report_id: this.current_edit_record.user_report_data_id } }, {\n\t\t\tonResult: function( res ) {\n\t\t\t\t$this.edit_view_ui_dic.user_report_data_id.setSourceData( res.getResult() );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.onFrequencyChange();\n\n\t\tif ( typeof this.current_edit_record.id == 'undefined' ) {\n\t\t\tthis.detachElement( 'enable_recalculate_dates' );\n\t\t}\n\n\t\tthis.getTypeOptions();\n\t\tthis.getReportOptions();\n\t\tthis.confirm_on_exit = false;\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\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\tDebug.Text( 'key: ' + key + ' value: ' + c_value, 'PayrollRemittanceAgencyEventViewController.js', 'PayrollRemittanceAgencyEventViewController', 'onFormItemChange', 10 );\n\t\tTTPromise.add( 'PayrollRemittanceAgencyEvent', 'updateUI' );\n\t\tswitch ( key ) {\n\t\t\tcase 'payroll_remittance_agency_id':\n\t\t\t\tthis.getTypeOptions(); //must be dynamically connected every time stuff changes.\n\t\t\t\tbreak;\n\t\t\tcase 'frequency_id':\n\t\t\t\tthis.onFrequencyChange( c_value );\n\t\t\t\tthis.current_edit_record[key] = c_value;\n\t\t\t\tthis.validate();\n\t\t\t\tthis.updateFutureDates();\n\t\t\t\tTTPromise.reject( 'PayrollRemittanceAgencyEvent', 'updateUI' );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tTTPromise.resolve( 'PayrollRemittanceAgencyEvent', 'updateUI' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tvar $this = this;\n\t\t// Hit when all promises are done...\n\t\tTTPromise.wait( 'PayrollRemittanceAgencyEvent', 'updateUI', function() {\n\t\t\t$this.onFrequencyChange();\n\t\t\t$this.current_edit_record[key] = c_value;\n\t\t\t$this.validate();\n\t\t\t$this.updateFutureDates();\n\t\t} );\n\t}\n\n\tupdateFutureDates() {\n\t\tDebug.Text( 'Updating remittance agency event dates.', null, null, null, 10 );\n\t\tvar $this = this;\n\t\tthis.api.calculateNextRunDate( this.current_edit_record, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tresult = result.getResult();\n\t\t\t\t$this.edit_view_ui_dic.start_date.setValue( result.start_date );\n\t\t\t\t$this.edit_view_ui_dic.end_date.setValue( result.end_date );\n\t\t\t\t$this.edit_view_ui_dic.due_date.setValue( result.due_date );\n\t\t\t\t$this.edit_view_ui_dic.next_reminder_date.setValue( result.next_reminder_date );\n\t\t\t}\n\t\t} );\n\t}\n\n\tonFrequencyChange( arg ) {\n\t\tif ( !Global.isSet( arg ) ) {\n\n\t\t\tif ( !Global.isSet( this.current_edit_record['frequency_id'] ) ) {\n\t\t\t\tthis.current_edit_record['frequency_id'] = 10;\n\t\t\t}\n\n\t\t\targ = this.current_edit_record['frequency_id'];\n\t\t}\n\n\t\tDebug.Text( 'Selected Frequency: ' + arg, null, null, null, 10 );\n\t\tthis.detachElement( 'week' );\n\t\tthis.detachElement( 'primary_month' );\n\t\tthis.detachElement( 'primary_day_of_month' );\n\t\tthis.detachElement( 'secondary_month' );\n\t\tthis.detachElement( 'secondary_day_of_month' );\n\t\tthis.detachElement( 'day_of_week' );\n\t\tthis.detachElement( 'due_date_delay_days' );\n\t\tthis.detachElement( 'quarter_month' );\n\t\tthis.detachElement( 'pay_period_schedule_id' );\n\n\t\tif ( arg == 1000 ) { //each pay period\n\t\t\tthis.attachElement( 'pay_period_schedule_id' );\n\t\t\tthis.attachElement( 'due_date_delay_days' );\n\t\t} else if ( arg == 2000 ) { //annually\n\t\t\tthis.attachElement( 'primary_month' );\n\t\t\tthis.edit_view_ui_dic.primary_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Month' );\n\t\t\tthis.attachElement( 'primary_day_of_month' );\n\t\t\tthis.edit_view_ui_dic.primary_day_of_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Day Of Month' );\n\t\t} else if ( arg == 2100 ) { //Year-To-Date\n\t\t\tthis.attachElement( 'primary_day_of_month' );\n\t\t\tthis.edit_view_ui_dic.primary_day_of_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Day Of Month' );\n\t\t\tthis.attachElement( 'primary_month' );\n\t\t\tthis.edit_view_ui_dic.primary_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Month' );\n\t\t\tthis.attachElement( 'due_date_delay_days' );\n\t\t} else if ( arg == 2200 ) { //Semi-Annually\n\t\t\tthis.attachElement( 'primary_day_of_month' );\n\t\t\tthis.edit_view_ui_dic.primary_day_of_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Primary Day Of Month' );\n\t\t\tthis.attachElement( 'primary_month' );\n\t\t\tthis.edit_view_ui_dic.primary_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Primary Month' );\n\t\t\tthis.attachElement( 'secondary_month' );\n\t\t\tthis.attachElement( 'secondary_day_of_month' );\n\t\t\tthis.attachElement( 'due_date_delay_days' );\n\t\t} else if ( arg == 3000 ) {//Quarterly\n\t\t\tthis.attachElement( 'primary_day_of_month' );\n\t\t\tthis.edit_view_ui_dic.primary_day_of_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Day Of Month' );\n\t\t\tthis.attachElement( 'quarter_month' );\n\t\t} else if ( arg == 4100 ) { //monthly\n\t\t\tthis.attachElement( 'primary_day_of_month' );\n\t\t\tthis.edit_view_ui_dic.primary_day_of_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Day Of Month' );\n\t\t} else if ( arg == 4200 ) { //semimonthly\n\t\t\tthis.attachElement( 'primary_day_of_month' );\n\t\t\tthis.edit_view_ui_dic.primary_day_of_month.parents( '.edit-view-form-item-div' ).find( '.edit-view-form-item-label' ).html( 'Primary Day Of Month' );\n\t\t\tthis.attachElement( 'secondary_day_of_month' );\n\t\t\tthis.attachElement( 'due_date_delay_days' );\n\t\t} else if ( arg == 5100 ) { //weekly\n\t\t\tthis.attachElement( 'day_of_week' );\n\t\t} else if ( arg == 90100 || arg == 90200 ) { //On Hire/Termination\n\t\t\tthis.attachElement( 'due_date_delay_days' );\n\t\t} else if ( arg == 90310 ) { //On Termination (Pay Period End Date)\n\t\t\tthis.attachElement( 'pay_period_schedule_id' );\n\t\t\tthis.attachElement( 'due_date_delay_days' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tsetDefaultMenuMassEditIcon( context_btn, grid_selected_length ) {\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t}\n\n\tsetDefaultMenuSaveAndCopyIcon( context_btn, grid_selected_length ) {\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t}\n\n\t/* jshint ignore:end */\n\n\t//Make sure this.current_edit_record is updated before validate\n\t// validate() {\n\t// \tvar $this = this;\n\t// \tvar record = {};\n\t// \tLocalCacheData.current_doing_context_action = 'validate';\n\t// \tif ( this.is_mass_editing ) {\n\t// \t\tfor ( var key in this.edit_view_ui_dic ) {\n\t// \t\t\tvar widget = this.edit_view_ui_dic[key];\n\t//\n\t// \t\t\tif ( Global.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\tif ( Global.isArray( this.current_edit_record.user_id ) && this.current_edit_record.user_id.length > 0 ) {\n\t// \t\t\trecord = [];\n\t// \t\t\t$.each( this.current_edit_record.user_id, function( index, value ) {\n\t//\n\t// \t\t\t\tvar commonRecord = Global.clone( $this.current_edit_record );\n\t// \t\t\t\tcommonRecord.user_id = value;\n\t// \t\t\t\trecord.push( commonRecord );\n\t//\n\t// \t\t\t} );\n\t// \t\t} else {\n\t// \t\t\trecord = this.current_edit_record;\n\t// \t\t}\n\t// \t}\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\t// \t\t}\n\t// \t} );\n\t// },\n\n\tsetDefaultMenuImportIcon( context_btn, grid_selected_length, pId ) {\n\t}\n\n\tcopyAsNewResetIds( record ) {\n\t\trecord['id'] = '';\n\t\trecord['start_date'] = '';\n\t\trecord['end_date'] = '';\n\t\trecord['due_date'] = '';\n\t\trecord['last_due_date'] = '';\n\t\trecord['next_reminder_date'] = '';\n\t\trecord['last_reminder_date'] = '';\n\t\treturn record;\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\tsetEditMenuSaveAndContinueIcon( context_btn, pId ) {\n\t\tthis.saveAndContinueValidate( context_btn );\n\n\t\tif ( !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\tsetEditMenuSaveAndAddIcon( context_btn, pId ) {\n\t\tthis.saveAndNewValidate( context_btn );\n\n\t\tif ( !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\tsetEditMenuSaveAndCopyIcon( context_btn, pId ) {\n\t\tthis.saveAndContinueValidate( context_btn );\n\n\t\tif ( !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\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\t\tvar $this = this;\n\t\tvar form_item_input;\n\n\t\tvar tab_model = {\n\t\t\t'tab_payroll_remittance_agency_event': { 'label': $.i18n._( 'Remittance Agency Event' ) },\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.APIPayrollRemittanceAgencyEvent,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_payroll_remittance_agency',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\tvar tab_payroll_remittance_agency_event = this.edit_view_tab.find( '#tab_payroll_remittance_agency_event' );\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( tab_payroll_remittance_agency_event );\n\t\tvar tab_payroll_remittance_agency_event_column_1 = tab_payroll_remittance_agency_event.find( '.first-column' );\n\n\t\tform_item_input = Global.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\tshow_search_inputs: true,\n\t\t\tset_empty: false,\n\t\t\tfield: 'payroll_remittance_agency_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Remittance Agency' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( {\n\t\t\tfield: 'status_id'\n\t\t} );\n\t\tform_item_input.setSourceData( $this.status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( {\n\t\t\tfield: 'type_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\t// Payment Frequency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( {\n\t\t\tfield: 'frequency_id'\n\t\t} );\n\t\tform_item_input.setSourceData( $this.frequency_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Frequency' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\t// Payment Frequency Month\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'primary_month' } );\n\t\tform_item_input.setSourceData( Global.buildRecordArray( $this.month_of_year_array ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Primary Month' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency Day Of Month\n\t\t// Day of the Month\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'primary_day_of_month' } );\n\t\tvar day_of_month_array = Global.addLastItemToArray( $this.day_of_month_array, -1, $.i18n._( '- Last Day Of Month -' ) );\n\t\tform_item_input.setSourceData( day_of_month_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Primary Day of Month' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency Month\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'secondary_month' } );\n\t\tform_item_input.setSourceData( Global.buildRecordArray( $this.month_of_year_array ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Secondary Month' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency Day Of Month\n\t\t// Day of the Month\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'secondary_day_of_month' } );\n\t\tform_item_input.setSourceData( day_of_month_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Secondary Day of Month' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency Week\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'week' } );\n\t\tform_item_input.setSourceData( Global.buildRecordArray( $this.week_interval_array ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Week' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency quarter Month\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'quarter_month' } );\n\t\tform_item_input.setSourceData( $this.month_of_quarter_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Month of Quarter' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Day of the week\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'day_of_week' } );\n\t\tform_item_input.setSourceData( Global.buildRecordArray( $this.day_of_week_array ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Day of week' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayPeriodSchedule,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_pay_period_schedule',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_special_empty: true,\n\t\t\tset_any: true,\n\t\t\tfield: 'pay_period_schedule_id'\n\t\t} );\n\t\tform_item_input.setSourceData( $this.saved_report_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Period Schedule' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency Days After Transaction Date\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'due_date_delay_days', width: 50 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Due Date Delay Days' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Effective Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( {\n\t\t\tfield: 'effective_date'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Effective Date' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\t//user to remind\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\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'reminder_user_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Send Reminder To' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_user_report_data',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_default: true,\n\t\t\tfield: 'user_report_data_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Saved Report' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Payment Frequency reminder days\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'reminder_days', width: 50 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Reminder Days' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '' );\n\n\t\t//Note\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'note', width: '100%', rows: 5 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Notes' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true, true );\n\t\tform_item_input.parent().width( '50%' );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'enable_recalculate_dates' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Recalculate Dates' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\t// Recalculate Dates From\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( {\n\t\t\tfield: 'recalculate_date'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Recalculate Dates From' ), form_item_input, tab_payroll_remittance_agency_event_column_1 );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'start_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Start Date' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'end_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'End Date' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'due_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Due Date' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'next_reminder_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Reminder Date' ), form_item_input, tab_payroll_remittance_agency_event_column_1, '', null, true );\n\n\t}\n\n}\n\nPayrollRemittanceAgencyEventViewController.loadSubView = function( container, beforeViewLoadedFun, afterViewLoadedFun ) {\n\tGlobal.loadViewSource( 'PayrollRemittanceAgencyEvent', 'SubPayrollRemittanceAgencyEventView.html', function( result ) {\n\t\tvar args = {};\n\t\tvar template = _.template( result );\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( args ) );\n\n\t\t\tif ( Global.isSet( afterViewLoadedFun ) ) {\n\t\t\t\tafterViewLoadedFun( sub_payroll_remittance_agency_event_view_controller );\n\t\t\t}\n\t\t}\n\t} );\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTQyLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUFPO0FBQ1AsMkJBQTJCO0FBQzNCLEVBQUUsQ0FBQztBQUNIOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7OztBQUdBLElBQUk7O0FBRUo7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