1 line
169 KiB
JavaScript
1 line
169 KiB
JavaScript
|
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["invoice-invoice-InvoiceViewController"],{4585:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InvoiceViewController\": () => (/* binding */ InvoiceViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass InvoiceViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tstatus_array: null,\n\n\t\t\tclient_group_array: null,\n\t\t\tclient_group_api: null,\n\t\t\tclient_api: null,\n\t\t\tclient_contact_api: null,\n\t\t\tproduct_api: null,\n\t\t\ttransaction_api: null,\n\n\t\t\tel: '#invoice_view_container',\n\n\t\t\tsub_client_contact_view_controller: null,\n\t\t\tsub_client_payment_view_controller: null,\n\t\t\tsub_transaction_view_controller: null,\n\n\t\t\ttotal_data_render: null,\n\t\t\ttotal_data_row_render: null,\n\n\t\t\towing_amount: null,\n\n\t\t\ttransaction_paid_data: null,\n\n\t\t\thistory: null,\n\n\t\t\teditor: null\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 = 'InvoiceEditView.html';\n\t\tthis.permission_id = 'invoice';\n\t\tthis.viewId = 'Invoice';\n\t\tthis.script_name = 'InvoiceView';\n\t\tthis.table_name_key = 'invoice';\n\t\tthis.context_menu_name = $.i18n._( 'Invoices' );\n\t\tthis.navigation_label = $.i18n._( 'Invoice' );\n\t\tthis.api = TTAPI.APIInvoice;\n\t\tthis.client_group_api = TTAPI.APIClientGroup;\n\t\tthis.client_api = TTAPI.APIClient;\n\t\tthis.product_api = TTAPI.APIProduct;\n\t\tthis.transaction_api = TTAPI.APITransaction;\n\t\tthis.client_contact_api = TTAPI.APIClientContact;\n\n\t\tthis.render();\n\n\t\tthis.buildContextMenu();\n\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\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View: Invoice' ),\n\t\t\t\t\tid: 'view',\n\t\t\t\t\taction_group: 'view',\n\t\t\t\t\tvue_icon: 'tticon tticon-visibility_black_24dp',\n\t\t\t\t\tsort_order: 1010\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View: Packing Slip' ),\n\t\t\t\t\tid: 'packing_slip',\n\t\t\t\t\taction_group: 'view',\n\t\t\t\t\tvue_icon: 'tticon tticon-visibility_black_24dp',\n\t\t\t\t\tsort_order: 1012, //After View icon.\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Payment' ),\n\t\t\t\t\tid: 'payment',\n\t\t\t\t\tvue_icon: 'tticon tticon-attach_money_black_24dp',\n\t\t\t\t\tmenu_align: 'right'\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tcontext_menu_model['include'].push( {\n\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\tid: 'jump_to_header',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'jump_to',\n\t\t\t\taction_group_header: true,\n\t\t\t\tpermission_result: false, // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\tsort_order: 9050,\n\t\t\t} );\n\n\t\t\tcontext_menu_model['include'].push( {\n\t\t\t\tlabel: $.i18n._( 'Edit Client' ),\n\t\t\t\tid: 'edit_client',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'jump_to',\n\t\t\t\tgroup: 'navigation',\n\t\t\t\tsort_order: 9050,\n\t\t\t\t} );\n\n\t\t\tcontext_menu_model['include'].push( {\n\t\t\t\tlabel: $.i18n._( 'Clients' ),\n\t\t\t\tid: 'client',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'jump_to',\n\t\t\t\tgroup: 'navigation',\n\t\t\t\ticon: 'client_groups-35x35.png',\n\t\t\t\tsort_order: 9050,\n\t\t\t} );\n\n\t\t\tcontext_menu_model['include'].push( {\n\t\t\t\tlabel: $.i18n._( 'Client Contacts' ),\n\t\t\t\tid: 'client_contact',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'jump_to',\n\t\t\t\tgroup: 'navigation',\n\t\t\t\tsort_order: 9050,\n\t\t\t\t} );\n\n\t\t\tcontext_menu_model['include'].push( {\n\t\t\t\tlabel: $.i1
|