TimeTrex/interface/html5/dist/payroll-company_tax_deduction-CompanyTaxDeductionViewController.bundle.js

1 line
227 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["payroll-company_tax_deduction-CompanyTaxDeductionViewController"],{9706:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CompanyTaxDeductionViewController\": () => (/* binding */ CompanyTaxDeductionViewController)\n/* harmony export */ });\n/* harmony import */ var _global_Global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9490);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\nclass CompanyTaxDeductionViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#company_tax_deduction_view_container', //Must set el here and can only set string, so events can work\n\n\t\t\ttype_array: null,\n\t\t\tstatus_array: null,\n\t\t\ttax_formula_type_array: null,\n\t\t\tcalculation_array: null,\n\t\t\taccount_amount_type_array: null,\n\t\t\tyes_no_array: null,\n\t\t\tapply_frequency_array: null,\n\t\t\tapply_payroll_run_type_array: null,\n\t\t\tlength_of_service_unit_array: null,\n\t\t\tmonth_of_year_array: null,\n\t\t\tday_of_month_array: null,\n\t\t\tmonth_of_quarter_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\te_province_array: null,\n\t\t\tcompany_api: null,\n\t\t\tdate_api: null,\n\t\t\tuser_deduction_api: null,\n\t\t\tuser_api: null,\n\t\t\tpayroll_remittance_agency_api: null,\n\t\t\temployee_setting_grid: null,\n\t\t\temployee_setting_result: null,\n\t\t\tshow_c: false,\n\t\t\tshow_p: false,\n\t\t\tshow_dc: false,\n\n\t\t\tprovince_district_array: null,\n\n\t\t\toriginal_current_record: null, //set when setCurrentEditRecordData, to keep the original data of the edit record\n\n\t\t\tlength_dates: null,\n\t\t\tstart_dates: null,\n\t\t\tend_dates: null,\n\n\t\t\tgrid_parent: '.grid-div'\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'CompanyTaxDeductionEditView.html';\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.permission_id = 'user_tax_deduction';\n\t\t} else {\n\t\t\tthis.permission_id = 'company_tax_deduction';\n\t\t}\n\t\tthis.viewId = 'CompanyTaxDeduction';\n\t\tthis.script_name = 'CompanyTaxDeductionView';\n\t\tthis.table_name_key = 'company_deduction';\n\t\tthis.context_menu_name = $.i18n._( 'Tax / Deductions' );\n\t\tthis.navigation_label = $.i18n._( 'Tax / Deductions' );\n\t\tthis.api = TTAPI.APICompanyDeduction;\n\t\tthis.date_api = TTAPI.APITTDate;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.user_deduction_api = TTAPI.APIUserDeduction;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.payroll_remittance_agency_api = TTAPI.APIPayrollRemittanceAgency;\n\t\tthis.month_of_quarter_array = _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.buildRecordArray */ .x.buildRecordArray( { 1: 1, 2: 2, 3: 3 } );\n\t\tthis.document_object_type_id = 300;\n\n\t\tthis.render();\n\n\t\t//Load the FormulaBuilder as early as possible to help avoid some race conditions with input box not appearing, or appearing out of order when clicking \"new\" after a fresh reload.\n\t\tif ( ( _global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.getProductEdition */ .x.getProductEdition() >= 15 ) ) {\n\t\t\t_global_Global__WEBPACK_IMPORTED_MODULE_0__/* .Global.loadScript */ .x.loadScript( 'global/widgets/formula_builder/FormulaBuilder.js' );\n\t\t}\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t} else {\n\t\t\tthis.buildContextMenu();\n\t\t}\n\n\t\t//call init data in parent view\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.initData();\n\t\t}\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['mass_edit'],\n\t\t\tinclude: []\n\t\t};\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tcontext_menu_model.exclude.push(\n\t\t\t\t'view',\n\t\t\t\t'save_and_new',\n\t\t\t\t'save_and_copy',\n\t\t\t\