TimeTrex/interface/html5/dist/invoice-client_payment-ClientPaymentViewController.bundle.js

1 line
68 KiB
JavaScript

(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["invoice-client_payment-ClientPaymentViewController","filebrowser-TImage","filebrowser-TImageAdvBrowser"],{1469:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImage = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImage.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn null;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\tthis.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\tthis.attr( 'src', val + '&t=' + d.getTime() );\n\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImage.defaults = {};\n\n\t$( document ).on( 'mouseover', '.file-browser img', function( e ) {\n\t\tvar $this_image_widget = $( e.target ).parents( '.file-browser' );\n\n\t\tif ( !$( '.file_browser_overlay' )[0] && $( e.target ).attr( 'enable-delete' ) == 1 ) {\n\t\t\tvar height = $( e.target ).height();\n\t\t\tvar top = ( height - 32 ) / 2;\n\t\t\tvar left = top;\n\n\t\t\tvar file_browser_overlay = $( '<div class=\"file_browser_overlay\"><img src=\"theme/default/images/delete-512.png\" style=\"position:absolute;width:32px;height:32px;top:' + top + 'px;left:' + left + 'px;\"></div>' );\n\t\t\tfile_browser_overlay.css( 'position', 'absolute' );\n\t\t\tfile_browser_overlay.css( 'top', '0px' );\n\t\t\tfile_browser_overlay.css( 'left', '0' );\n\t\t\tfile_browser_overlay.css( 'cursor', 'pointer' );\n\t\t\tfile_browser_overlay.css( 'height', height + 'px' );\n\t\t\tfile_browser_overlay.css( 'width', '100%' );\n\t\t\tfile_browser_overlay.css( 'background', 'rgba(255,255,255,0.85)' );\n\n\t\t\t$( e.target ).parents( '.file-browser' ).append( file_browser_overlay );\n\n\t\t\t$( document ).on( 'click', '.file_browser_overlay', function( e ) {\n\t\t\t\tvar img_src = $( e.target ).parent().find( 'img' ).attr( 'src' );\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'This will permanently delete the image. Are you sure?' ), '', function( flag ) {\n\t\t\t\t\tif ( flag ) {\n\t\t\t\t\t\tvar e = { type: 'deleteClick', message: 'Delete image clicked.', time: new Date() };\n\t\t\t\t\t\t$this_image_widget.trigger( e );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t$( document ).on( 'mouseleave', '.file-browser', function() {\n\t\t\t\t$( document ).off( 'click', '.file_browser_overlay' );\n\t\t\t\tif ( $( '.file_browser_overlay' )[0] ) {\n\t\t\t\t\tvar file_browser_overlay = $( this ).find( '.file_browser_overlay' );\n\t\t\t\t\tfile_browser_overlay.off().remove();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ2OS5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQSxnQ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_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageAdvBrowser = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageAdvBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar name = 'filedata';\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\n\t\tvar callBack = null;\n\n\t\tvar enabled = true;\n\n\t\tvar image;\n\n\t\tvar result_form_data;\n\n\t\tthis.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.children().eq( 1 );\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.hide();\n\t\t\t} else {\n\t\t\t\tbtn.show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn result_form_data;\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() + '&X-CSRF-Token=' + getCookie( 'CSRF-Token' ) );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tthis.onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\tvar $$this = this;\n\n\t\t\t$( this ).find( '#upload_image' ).text( $.i18n._( 'Upload Image' ) );\n\n\t\t\tif ( o.callBack ) {\n\t\t\t\tcallBack = o.callBack;\n\t\t\t}\n\n\t\t\tif ( o.show_browser === false ) {\n\t\t\t\t$( this ).children().eq( 1 ).hide();\n\t\t\t}\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\t$this.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar browser = $( this ).children().eq( 1 );\n\t\t\tbrowser.bind( 'click', function() {\n\t\t\t\tIndexViewController.openWizard( 'UserPhotoWizard', null, function( form_data ) {\n\n\t\t\t\t\tif ( callBack ) {\n\t\t\t\t\t\tcallBack( form_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tresult_form_data = form_data;\n\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\timage = $( this ).children().eq( 0 );\n\t\t\timage.on( 'load', function() {\n\t\t\t\t$this.onImageLoad( this );\n\t\t\t} );\n\n\t\t\timage.hide();\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageAdvBrowser.defaults = {};\n\t$.fn.TImageAdvBrowser.html_template = `\n\t<div class=\"file-browser\">\n\t\t<img class=\"image\">\n\t\t<button id=\"upload_image\" class=\"t-button file-browser-btn\" style=\"display: block\"></button>\n\t</div>\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQ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mVzdWx0X2Zvcm1fZGF0YSA9IGZvcm1fZGF0YTtcblxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9ICk7XG5cblx0XHRcdGltYWdlID0gJCggdGhpcyApLmNoaWxkcmVuKCkuZXEoIDAgKTtcblx0XHRcdGltYWdlLm9uKCAnbG9hZCcsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkdGhpcy5vbkltYWdlTG9hZCggdGhpcyApO1xuXHRcdFx0fSApO1xuXG5cdFx0XHRpbWFnZS5oaWRlKCk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uVEltYWdlQWR2QnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUFkdkJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxidXR0b24gaWQ9XCJ1cGxvYWRfaW1hZ2VcIiBjbGFzcz1cInQtYnV0dG9uIGZpbGUtYnJvd3Nlci1idG5cIiBzdHlsZT1cImRpc3BsYXk6IGJsb2NrXCI+PC9idXR0b24+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},8253:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClientPaymentViewController\": () => (/* binding */ ClientPaymentViewController)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1469);\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8243);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\nclass ClientPaymentViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#client_payment_view_container',\n\n\t\t\t// _required_files: ['TImageAdvBrowser', 'TImage'],\n\n\t\t\tstatus_array: null,\n\t\t\ttype_array: null,\n\t\t\tcredit_card_type_array: null,\n\t\t\tsub_document_view_controller: null,\n\t\t\tbank_account_type_array: null,\n\t\t\tdocument_object_type_id: null,\n\t\t\tfile_browser: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\tvar $this = this;\n\t\tthis.edit_view_tpl = 'ClientPaymentEditView.html';\n\t\tthis.permission_id = 'client_payment';\n\t\tthis.viewId = 'ClientPayment';\n\t\tthis.script_name = 'ClientPaymentView';\n\t\tthis.table_name_key = 'client_payment';\n\t\tthis.document_object_type_id = 90;\n\t\tthis.context_menu_name = $.i18n._( 'Payment Methods' );\n\t\tthis.navigation_label = $.i18n._( 'Payment Methods' );\n\t\tthis.api = TTAPI.APIClientPayment;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\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\n\t\tvar options = [\n\t\t\t{ option_name: 'status', api: this.api },\n\t\t\t{ option_name: 'type', api: this.api },\n\t\t\t{ option_name: 'bank_account_type', api: this.api },\n\t\t\t{ option_name: 'credit_card_type',field_name: 'cc_type_id', api: this.api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tif ( Global.isSet( $this.adv_search_field_ui_dic['is_default'] ) ) {\n\t\t\tthis.basic_search_field_ui_dic['is_default'].setSourceData( Global.buildRecordArray( {\n\t\t\t\t0: 'False',\n\t\t\t\t1: 'True'\n\t\t\t} ) );\n\t\t}\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [],\n\t\t\tinclude: ['default']\n\t\t};\n\n\t\tif ( !this.sub_view_mode ) {\n\n\t\t\tcontext_menu_model.include.push(\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\t\tid: 'jump_to_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tpermission_result: false // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Edit Client' ),\n\t\t\t\t\tid: 'edit_client',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Client Contacts' ),\n\t\t\t\t\tid: 'client_contact',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Transactions' ),\n\t\t\t\t\tid: 'transaction',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Invoices' ),\n\t\t\t\t\tid: 'invoice',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\treturn context_menu_model;\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\t// When mass editing, these fields may not be the common data, so their value will be undefined, so this will cause their change event cannot work properly.\n\t\tthis.setDefaultData( {\n\t\t\t'type_id': 30,\n\t\t\t'bank_account_type_id': 200\n\t\t} );\n\n\t\t//Set current edit record data to all widgets\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\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\n\t\t\t}\n\t\t}\n\n\t\tif ( this.current_edit_record.signature_exists && this.current_edit_record.id && this.current_edit_record.client_id ) {\n\t\t\tvar url = ServiceCaller.getURLByObjectType( 'file_download' ) + '&object_type=client_payment_signature&object_id=' + this.current_edit_record.id + '&parent_id=' + this.current_edit_record.client_id;\n\t\t\tthis.file_browser.setImage( url );\n\t\t} else {\n\t\t\tthis.detachElement( 'signature' );\n\t\t}\n\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'login':\n\t\t\t\tthis.setDefaultMenuLoginIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'edit_client':\n\t\t\t\tthis.setDefaultMenuEditClientIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetDefaultMenuEditClientIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( grid_selected_length === 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'download':\n\t\t\t\tthis.onDownloadClick();\n\t\t\t\tbreak;\n\t\t\tcase 'edit_client':\n\t\t\tcase 'client_contact':\n\t\t\tcase 'invoice':\n\t\t\tcase 'transaction':\n\t\t\tcase 'export_excel':\n\t\t\t\tthis.onNavigationClick( id );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tgetFilterColumnsFromDisplayColumns() {\n\t\tvar column_filter = {};\n\t\tcolumn_filter.is_owner = true;\n\t\tcolumn_filter.id = true;\n\t\tcolumn_filter.is_child = true;\n\t\tcolumn_filter.in_use = true;\n\t\tcolumn_filter.first_name = true;\n\t\tcolumn_filter.last_name = true;\n\t\tcolumn_filter.client_id = true;\n\n\t\t// Error: Unable to get property 'getGridParam' of undefined or null reference\n\t\tvar display_columns = [];\n\t\tif ( this.grid ) {\n\t\t\tdisplay_columns = this.grid.getGridParam( 'colModel' );\n\t\t}\n\n\t\tif ( display_columns ) {\n\t\t\tvar len = display_columns.length;\n\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar column_info = display_columns[i];\n\t\t\t\tcolumn_filter[column_info.name] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn column_filter;\n\t}\n\n\tonNavigationClick( iconName ) {\n\n\t\tvar $this = this;\n\n\t\tvar grid_selected_id_array;\n\n\t\tvar filter = { filter_data: {} };\n\n\t\tvar client_ids = [];\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\tclient_ids.push( $this.current_edit_record.client_id );\n\t\t} else {\n\t\t\tgrid_selected_id_array = this.getGridSelectIdArray();\n\t\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t\tvar grid_selected_row = $this.getRecordFromGridById( value );\n\t\t\t\tclient_ids.push( grid_selected_row.client_id );\n\t\t\t} );\n\t\t}\n\n\t\tfilter.filter_data.client_id = client_ids;\n\n\t\tswitch ( iconName ) {\n\t\t\tcase 'edit_client':\n\t\t\t\tif ( client_ids.length > 0 ) {\n\t\t\t\t\tIndexViewController.openEditView( this, 'Client', client_ids[0] );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'client_contact':\n\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Payment Methods' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'ClientContact', filter );\n\t\t\t\tbreak;\n\t\t\tcase 'invoice':\n\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Payment Methods' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'Invoice', filter );\n\t\t\t\tbreak;\n\t\t\tcase 'transaction':\n\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Payment Methods' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'InvoiceTransaction', filter );\n\t\t\t\tbreak;\n\t\t\tcase 'export_excel':\n\t\t\t\tthis.onExportClick( 'export' + this.api.key_name );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_payment_method': { 'label': $.i18n._( 'Payment Method' ) },\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.APIClientPayment,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_client_payment',\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\n\t\tvar tab_payment_method = this.edit_view_tab.find( '#tab_payment_method' );\n\n\t\tvar tab_payment_method_column1 = tab_payment_method.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_payment_method_column1 );\n\n\t\t// Client\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIClient,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_client',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'client_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Client' ), form_item_input, tab_payment_method_column1, '' );\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_payment_method_column1 );\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_payment_method_column1 );\n\n\t\t// Default\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'is_default' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Default' ), form_item_input, tab_payment_method_column1 );\n\n\t\t// Bank Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'bank_account_type_id' } );\n\t\tform_item_input.setSourceData( $this.bank_account_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Bank Type' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Institution Number\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'bank_institution', width: 30 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Institution Number' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Bank Transit\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'bank_transit', width: 100 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Bank Transit' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Bank type change\n\n\t\t// Account Number\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'bank_account', width: 120 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Account Number' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Credit Card Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'cc_type_id' } );\n\t\tform_item_input.setSourceData( $this.credit_card_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Credit Card Type' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Credit Card Number\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'cc_number', width: 120 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Credit Card Number' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Expiry Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\n\t\tform_item_input.TDatePicker( { field: 'cc_expire' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Expiry Date' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Credit Card Security Code (CSC)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'cc_check', width: 60 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Credit Card Security Code (CSC)' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Card Holder Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'cc_name' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Card Holder Name' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Card Issuing Banks Phone Number\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'cc_bank_phone' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Card Issuing Banks Phone Number' ), form_item_input, tab_payment_method_column1, '', null, true );\n\n\t\t// Signature\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.IMAGE_AVD_BROWSER );\n\n\t\tthis.file_browser = form_item_input.TImageAdvBrowser( { field: 'signature', show_browser: false } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Signature' ), form_item_input, tab_payment_method_column1, '', null, true, true );\n\n\t\t// Note\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\n\t\tform_item_input.TTextArea( { field: 'note', width: '100%' } );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Note' ), form_item_input, tab_payment_method_column1, '', null, null, true );\n\n\t\tform_item_input.parent().width( '45%' );\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Client' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'client_id',\n\t\t\t\tlayout_name: 'global_client',\n\t\t\t\tapi_class: TTAPI.APIClient,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Status' ),\n\t\t\t\tin_column: 1,\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: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Type' ),\n\t\t\t\tin_column: 1,\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: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Default' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'is_default',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Created By' ),\n\t\t\t\tin_column: 2,\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: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Updated By' ),\n\t\t\t\tin_column: 2,\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: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\t\t];\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\n\t\tvar key = target.getField();\n\t\tvar c_value = target.getValue();\n\n\t\tthis.current_edit_record[key] = c_value;\n\n\t\tif ( key === 'type_id' ) {\n\t\t\tthis.onTypeChange();\n\t\t}\n\n\t\tif ( key === 'bank_account_type_id' ) {\n\t\t\tthis.onBankAccountTypeChange();\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.onTypeChange();\n\t}\n\n\tonTypeChange() {\n\t\tif ( this.current_edit_record['type_id'] == 30 ) {\n\n\t\t\tthis.detachElement( 'bank_account_type_id' );\n\t\t\tthis.detachElement( 'bank_institution' );\n\t\t\tthis.detachElement( 'bank_transit' );\n\t\t\tthis.detachElement( 'bank_account' );\n\n\t\t\tthis.attachElement( 'cc_type_id' );\n\t\t\tthis.attachElement( 'cc_number' );\n\t\t\tthis.attachElement( 'cc_expire' );\n\t\t\tthis.attachElement( 'cc_check' );\n\t\t\tthis.attachElement( 'cc_name' );\n\t\t\tthis.attachElement( 'cc_bank_phone' );\n\n\t\t} else if ( this.current_edit_record['type_id'] == 40 ) {\n\t\t\tthis.attachElement( 'bank_account_type_id' );\n\t\t\tthis.attachElement( 'bank_institution' );\n\t\t\tthis.attachElement( 'bank_transit' );\n\t\t\tthis.attachElement( 'bank_account' );\n\n\t\t\tthis.detachElement( 'cc_type_id' );\n\t\t\tthis.detachElement( 'cc_number' );\n\t\t\tthis.detachElement( 'cc_expire' );\n\t\t\tthis.detachElement( 'cc_check' );\n\t\t\tthis.detachElement( 'cc_name' );\n\t\t\tthis.detachElement( 'cc_bank_phone' );\n\n\t\t\tthis.onBankAccountTypeChange();\n\t\t} else {\n\t\t\tthis.detachElement( 'bank_account_type_id' );\n\t\t\tthis.detachElement( 'bank_institution' );\n\t\t\tthis.detachElement( 'bank_transit' );\n\t\t\tthis.detachElement( 'bank_account' );\n\n\t\t\tthis.detachElement( 'cc_type_id' );\n\t\t\tthis.detachElement( 'cc_number' );\n\t\t\tthis.detachElement( 'cc_expire' );\n\t\t\tthis.detachElement( 'cc_check' );\n\t\t\tthis.detachElement( 'cc_name' );\n\t\t\tthis.detachElement( 'cc_bank_phone' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\t}\n\n\tonBankAccountTypeChange() {\n\t\tif ( this.current_edit_record['bank_account_type_id'] == 200 && this.current_edit_record['type_id'] == 40 ) {\n\t\t\tthis.attachElement( 'bank_institution' );\n\t\t\tthis.edit_view_form_item_dic['bank_transit'].find( '.edit-view-form-item-label' ).text( $.i18n._( 'Bank Transit' ) );\n\t\t} else if ( this.current_edit_record['bank_account_type_id'] == 201 ) {\n\t\t\tthis.detachElement( 'bank_institution' );\n\t\t\tthis.edit_view_form_item_dic['bank_transit'].find( '.edit-view-form-item-label' ).text( $.i18n._( 'Routing Number' ) );\n\t\t}\n\n\t\tthis.editFieldResize();\n\n\t}\n}\n\nClientPaymentViewController.loadSubView = function( container, beforeViewLoadedFun, afterViewLoadedFun ) {\n\n\tGlobal.loadViewSource( 'ClientPayment', 'SubClientPaymentView.html', function( result ) {\n\t\tvar args = {};\n\t\tvar template = _.template( result );\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( args ) );\n\t\t\tif ( Global.isSet( afterViewLoadedFun ) ) {\n\t\t\t\tafterViewLoadedFun( sub_client_payment_view_controller );\n\t\t\t}\n\t\t}\n\t} );\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI1My5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQTZDO0FBQ1U7O0FBRWhEO0FBQ1AsMkJBQTJCO0FBQzNCLEVBQUUsQ0FBQztBQUNIOztBQUVBOztBQUVBO0FBQ0E7QUF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