1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
|
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["reports-form1099-Form1099NecReportViewController"],{7237:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Form1099NecReportViewController\": () => (/* binding */ Form1099NecReportViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass Form1099NecReportViewController extends ReportBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\n\t\t\tprovince_array: null,\n\n\t\t\tstate_field_array: null,\n\n\t\t\tschedule_deposit_array: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinitReport( options ) {\n\t\tthis.script_name = 'Form1099NecReport';\n\t\tthis.viewId = 'Form1099NecReport';\n\t\tthis.context_menu_name = $.i18n._( 'Form 1099-NEC' );\n\t\tthis.navigation_label = $.i18n._( 'Saved Report' );\n\t\tthis.view_file = 'Form1099NecReportView.html';\n\t\tthis.api = TTAPI.APIForm1099NecReport;\n\t\tthis.api_paystub = TTAPI.APIPayStubEntryAccount;\n\t\tthis.include_form_setup = true;\n\t}\n\n\tinitOptions( callBack ) {\n\t\tvar $this = this;\n\t\tvar options = [\n\t\t\t{ option_name: 'page_orientation' },\n\t\t\t{ option_name: 'font_size' },\n\t\t\t{ option_name: 'chart_display_mode' },\n\t\t\t{ option_name: 'chart_type' },\n\t\t\t{ option_name: 'templates' },\n\t\t\t{ option_name: 'setup_fields' },\n\t\t\t{ option_name: 'auto_refresh' }\n\t\t];\n\n\t\tthis.initDropDownOptions( options, function( result ) {\n\t\t\tTTAPI.APICompany.getOptions( 'province', 'US', {\n\t\t\t\tonResult: function( provinceResult ) {\n\t\t\t\t\t$this.province_array = Global.buildRecordArray( provinceResult.getResult() );\n\n\t\t\t\t\tcallBack( result ); // First to initialize drop down options, and then to initialize edit view UI.\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\t}\n\n\tonReportMenuClick( id ) {\n\t\tthis.onViewClick( id );\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\tgroups: {\n\t\t\t\tform: {\n\t\t\t\t\tlabel: $.i18n._( 'Form' ),\n\t\t\t\t\tid: this.viewId + 'Form'\n\t\t\t\t}\n\t\t\t},\n\t\t\texclude: [],\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Form' ),\n\t\t\t\t\tid: 'view_print',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\ticon: 'view-35x35.png',\n\t\t\t\t\ttype: 2\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View: Government (Multiple Employees/Page)' ),\n\t\t\t\t\tid: 'pdf_form_government',\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\ticon: 'view-35x35.png',\n\t\t\t\t\ttype: 2,\n\t\t\t\t\tsort_order: 10100\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View: Employee (One Employee/Page)' ),\n\t\t\t\t\tid: 'pdf_form',\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\ticon: 'view-35x35.png',\n\t\t\t\t\ttype: 2,\n\t\t\t\t\tsort_order: 10200\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Save Setup' ),\n\t\t\t\t\tid: 'save_setup',\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\tsort_order: 10400\n\t\t\t\t},\n\t\t\t]\n\t\t};\n\n\t\tif ( ( Global.getProductEdition() >= 15 ) ) {\n\t\t\tcontext_menu_model.include.push( {\n\t\t\t\tlabel: $.i18n._( 'Publish Employee Forms' ),\n\t\t\t\tid: 'pdf_form_publish_employee',\n\t\t\t\taction_group: 'view_form',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\tsort_order: 10250\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 'pdf_form':\n\t\t\tcase 'pdf_form_government':\n\t\t\tcase 'pdf_form_publish_employee':\n\t\t\t\tthis.onReportMenuClick( id );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false; //FALSE tells on
|