/home/techb158/ileadtechnology.com/SSM/public/js/finance/transaction/accountTransfer
NameSizeModeActions
edit~js/-0755rm
edit.js157270644editdlrm
edit.js.map1990644editdlrm
index.js356430644editdlrm
index.js.map1920644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/finance/transaction/accountTransfer/index.js (35643B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[233],{jcem:function(t,e,n){"use strict";var a={components:{},data:function(){return{accountTransferForm:new Form({from_account_id:"",to_account_id:"",payment_method_id:"",instrument_number:"",instrument_date:"",instrument_clearing_date:"",instrument_bank_detail:"",reference_number:"",amount:"",date_of_account_transfer:"",description:"",upload_token:""}),accounts:[],selected_from_account:null,selected_to_account:null,payment_methods:[],selected_payment_method:null,payment_method_details:[],payment_method_detail:{},module_id:"",clearAttachment:!0,showTransactionCategoryModal:!1,default_currency:helper.getConfig("default_currency")}},props:["uuid"],mounted:function(){helper.hasPermission("create-account-transfer")||helper.hasPermission("edit-account-transfer")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.uuid?this.get():this.accountTransferForm.upload_token=this.$uuid.v4(),this.getPreRequisite()},methods:{hasPermission:function(t){return helper.hasPermission(t)},getPreRequisite:function(){var t=this,e=this.$loading.show();this.showTransactionCategoryModal=!1,axios.get("/api/account/transfer/pre-requisite").then((function(n){t.accounts=n.accounts,t.payment_methods=n.payment_methods,t.payment_method_details=n.payment_method_details,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},proceed:function(){this.uuid?this.update():this.store()},store:function(){var t=this,e=this.$loading.show();this.accountTransferForm.post("/api/account/transfer").then((function(n){toastr.success(n.message),t.clearAttachment=!t.clearAttachment,t.accountTransferForm.upload_token=t.$uuid.v4(),t.selected_from_account=null,t.selected_to_account=null,t.selected_payment_method=null,t.payment_method_detail=null,t.$emit("completed"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,e=this.$loading.show();axios.get("/api/account/transfer/"+this.uuid).then((function(n){t.accountTransferForm.amount=t.formatNumber(n.account_transfer.amount),t.accountTransferForm.date_of_account_transfer=n.account_transfer.date_of_account_transfer,t.accountTransferForm.description=n.account_transfer.description,t.accountTransferForm.from_account_id=n.account_transfer.from_account_id,t.selected_account=n.account_transfer.from_account_id?{id:n.account_transfer.from_account_id,name:n.account_transfer.from_account.name}:null,t.accountTransferForm.to_account_id=n.account_transfer.to_account_id,t.selected_account=n.account_transfer.to_account_id?{id:n.account_transfer.to_account_id,name:n.account_transfer.to_account.name}:null,t.accountTransferForm.payment_method_id=n.account_transfer.transaction.payment_method_id,t.selected_payment_method=n.account_transfer.transaction.payment_method_id?{id:n.account_transfer.transaction.payment_method_id,name:n.account_transfer.transaction.payment_method.name}:null,t.accountTransferForm.instrument_number=n.account_transfer.transaction.instrument_number,t.accountTransferForm.instrument_date=n.account_transfer.transaction.instrument_date,t.accountTransferForm.instrument_clearing_date=n.account_transfer.transaction.instrument_clearing_date,t.accountTransferForm.instrument_bank_detail=n.account_transfer.transaction.instrument_bank_detail,t.accountTransferForm.reference_number=n.account_transfer.transaction.reference_number,t.accountTransferForm.upload_token=n.account_transfer.upload_token,t.module_id=n.account_transfer.id,e.hide()})).catch((function(n){e.hide(),helper.showErrorMsg(n),t.$router.push("/finance/transaction/account/transfer")}))},update:function(){var t=this,e=this.$loading.show();this.accountTransferForm.patch("/api/account/transfer/"+this.uuid).then((function(n){toastr.success(n.message),e.hide(),t.$router.push("/finance/transaction/account/transfer")})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onFromAccountSelect:function(t){this.accountTransferForm.from_account_id=t.id},onToAccountSelect:function(t){this.accountTransferForm.to_account_id=t.id},onPaymentMethodSelect:function(t){this.accountTransferForm.payment_method_id=t.id,this.payment_method_detail=this.payment_method_details.find((function(e){return e.id==t.id}))},formatCurrency:function(t){return helper.formatCurrency(t)},formatNumber:function(t){return helper.formatNumber(t,this.default_currency.decimal_place)},getPaymentMethodDetail:function(t){return helper.getPaymentMethodDetail(this.payment_method_detail,t)}}},r=n("KHd+"),s=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.accountTransferForm.errors.clear(e.target.name)}}},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.from_account"))+" ")]),t._v(" "),n("v-select",{attrs:{label:"name",name:"from_account_id",id:"from_account_id",options:t.accounts,placeholder:t.trans("finance.select_from_account"),disabled:!!t.uuid},on:{select:t.onFromAccountSelect,close:function(e){return t.accountTransferForm.errors.clear("from_account_id")},remove:function(e){t.accountTransferForm.from_account_id=""}},model:{value:t.selected_from_account,callback:function(e){t.selected_from_account=e},expression:"selected_from_account"}},[t.accounts.length?t._e():n("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"from_account_id"}})],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.to_account"))+" ")]),t._v(" "),n("v-select",{attrs:{label:"name",name:"to_account_id",id:"to_account_id",options:t.accounts,placeholder:t.trans("finance.select_to_account"),disabled:!!t.uuid},on:{select:t.onToAccountSelect,close:function(e){return t.accountTransferForm.errors.clear("to_account_id")},remove:function(e){t.accountTransferForm.to_account_id=""}},model:{value:t.selected_to_account,callback:function(e){t.selected_to_account=e},expression:"selected_to_account"}},[t.accounts.length?t._e():n("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"to_account_id"}})],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.amount")))]),t._v(" "),n("currency-input",{attrs:{position:t.default_currency.position,symbol:t.default_currency.symbol,name:"amount",placeholder:t.trans("finance.amount")},nativeOn:{input:function(e){return t.accountTransferForm.errors.clear("amount")}},model:{value:t.accountTransferForm.amount,callback:function(e){t.$set(t.accountTransferForm,"amount",e)},expression:"accountTransferForm.amount"}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"amount"}})],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.date_of_account_transfer")))]),t._v(" "),n("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("finance.date_of_account_transfer")},on:{selected:function(e){return t.accountTransferForm.errors.clear("date_of_account_transfer")}},model:{value:t.accountTransferForm.date_of_account_transfer,callback:function(e){t.$set(t.accountTransferForm,"date_of_account_transfer",e)},expression:"accountTransferForm.date_of_account_transfer"}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"date_of_account_transfer"}})],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.payment_method"))+" ")]),t._v(" "),n("v-select",{attrs:{label:"name",name:"payment_method_id",id:"payment_method_id",options:t.payment_methods,placeholder:t.trans("finance.select_payment_method")},on:{select:t.onPaymentMethodSelect,close:function(e){return t.accountTransferForm.errors.clear("payment_method_id")},remove:function(e){t.accountTransferForm.payment_method_id=""}},model:{value:t.selected_payment_method,callback:function(e){t.selected_payment_method=e},expression:"selected_payment_method"}},[t.payment_methods.length?t._e():n("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"payment_method_id"}})],1)]),t._v(" "),t.getPaymentMethodDetail("instrument_number")?n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.instrument_number")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.accountTransferForm.instrument_number,expression:"accountTransferForm.instrument_number"}],staticClass:"form-control",attrs:{type:"text",name:"instrument_number",placeholder:t.trans("finance.instrument_number")},domProps:{value:t.accountTransferForm.instrument_number},on:{input:function(e){e.target.composing||t.$set(t.accountTransferForm,"instrument_number",e.target.value)}}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"instrument_number"}})],1)]):t._e(),t._v(" "),t.getPaymentMethodDetail("instrument_date")?n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.instrument_date")))]),t._v(" "),n("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("finance.instrument_date")},on:{selected:function(e){return t.accountTransferForm.errors.clear("instrument_date")}},model:{value:t.accountTransferForm.instrument_date,callback:function(e){t.$set(t.accountTransferForm,"instrument_date",e)},expression:"accountTransferForm.instrument_date"}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"instrument_date"}})],1)]):t._e(),t._v(" "),t.getPaymentMethodDetail("instrument_bank_detail")?n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.instrument_bank_detail")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.accountTransferForm.instrument_bank_detail,expression:"accountTransferForm.instrument_bank_detail"}],staticClass:"form-control",attrs:{type:"text",name:"instrument_bank_detail",placeholder:t.trans("finance.instrument_bank_detail")},domProps:{value:t.accountTransferForm.instrument_bank_detail},on:{input:function(e){e.target.composing||t.$set(t.accountTransferForm,"instrument_bank_detail",e.target.value)}}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"instrument_bank_detail"}})],1)]):t._e(),t._v(" "),t.getPaymentMethodDetail("instrument_clearing_date")?n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.instrument_clearing_date")))]),t._v(" "),n("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("finance.instrument_clearing_date")},on:{selected:function(e){return t.accountTransferForm.errors.clear("instrument_clearing_date")}},model:{value:t.accountTransferForm.instrument_clearing_date,callback:function(e){t.$set(t.accountTransferForm,"instrument_clearing_date",e)},expression:"accountTransferForm.instrument_clearing_date"}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"instrument_clearing_date"}})],1)]):t._e(),t._v(" "),t.getPaymentMethodDetail("reference_number")?n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.reference_number")))]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.accountTransferForm.reference_number,expression:"accountTransferForm.reference_number"}],staticClass:"form-control",attrs:{type:"text",name:"reference_number",placeholder:t.trans("finance.reference_number")},domProps:{value:t.accountTransferForm.reference_number},on:{input:function(e){e.target.composing||t.$set(t.accountTransferForm,"reference_number",e.target.value)}}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"reference_number"}})],1)]):t._e(),t._v(" "),n("div",{staticClass:"col-12 col-sm-9"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.account_transfer_description")))]),t._v(" "),n("autosize-textarea",{attrs:{rows:"1",name:"description",placeholder:t.trans("finance.account_transfer_description")},model:{value:t.accountTransferForm.description,callback:function(e){t.$set(t.accountTransferForm,"description",e)},expression:"accountTransferForm.description"}}),t._v(" "),n("show-error",{attrs:{"form-name":t.accountTransferForm,"prop-name":"description"}})],1)]),t._v(" "),n("div",{staticClass:"col-12"},[n("div",{staticClass:"form-group"},[n("file-upload-input",{attrs:{"button-text":t.trans("general.upload_document"),token:t.accountTransferForm.upload_token,module:"account-transfer","clear-file":t.clearAttachment,"module-id":t.module_id}})],1)])]),t._v(" "),n("div",{staticClass:"card-footer text-right"},[n("router-link",{directives:[{name:"show",rawName:"v-show",value:t.uuid,expression:"uuid"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/finance/transaction/account/transfer"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.uuid?t._e():n("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),n("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.uuid?n("span",[t._v(t._s(t.trans("general.update")))]):n("span",[t._v(t._s(t.trans("general.save")))])])],1)])])}),[],!1,null,null,null);e.a=s.exports},kEzg:function(t,e,n){"use strict";n.r(e);var a=n("jcem"),r={props:["uuid"],data:function(){return{account_transfer:{},attachments:[]}},mounted:function(){this.uuid&&this.get()},methods:{get:function(){var t=this,e=this.$loading.show();axios.get("/api/account/transfer/"+this.uuid).then((function(n){t.account_transfer=n.account_transfer,t.attachments=n.attachments,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},getEmployeeName:function(t){return helper.getEmployeeName(t)},getEmployeeDesignationOnDate:function(t,e){return helper.getEmployeeDesignationOnDate(t,e)},formatCurrency:function(t){return helper.formatCurrency(t)},getVoucherNumber:function(t){return helper.getVoucherNumber(t)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},computed:{authToken:function(){return helper.getAuthToken()}}},s=n("KHd+"),o=Object(s.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"modal"}},[n("div",{staticClass:"modal-mask"},[n("div",{staticClass:"modal-wrapper"},[n("div",{staticClass:"modal-container modal-lg"},[t.account_transfer.id?n("div",{staticClass:"modal-header"},[t._t("header",[n("span",[t._v(t._s(t.trans("finance.account_transfer"))+" #"+t._s(t.getVoucherNumber(t.account_transfer.transaction))+"\n \t"),t.account_transfer.is_cancelled?n("span",{staticClass:"label label-danger"},[t._v("\n \t\t"+t._s(t.trans("finance.transaction_status_cancelled"))+"\n \t")]):t._e()]),t._v(" "),n("span",{staticClass:"float-right pointer",on:{click:function(e){return t.$emit("close")}}},[t._v("x")])])],2):t._e(),t._v(" "),t.account_transfer.id?n("div",{staticClass:"modal-body"},[t._t("body",[n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-sm custom-show-table"},[n("tbody",[n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v("#")]),t._v(" "),n("td",[t._v(t._s(t.getVoucherNumber(t.account_transfer.transaction)))])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("finance.date_of_account_transfer")))]),t._v(" "),n("td",[t._v(t._s(t._f("moment")(t.account_transfer.date_of_account_transfer)))])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("finance.from_account")))]),t._v(" "),n("td",[t._v(t._s(t.account_transfer.from_account.name))])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("finance.to_account")))]),t._v(" "),n("td",[t._v(t._s(t.account_transfer.to_account.name))])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("finance.payment_method")))]),t._v(" "),n("td",[t._v("\n\t \t\t\t\t\t"+t._s(t.account_transfer.transaction.payment_method.name)+"\n\t \t\t\t\t\t"),t.account_transfer.transaction.payment_method.options.requires_instrument_number?n("span",[n("br"),t._v("\t"+t._s(t.trans("finance.instrument_number"))+": "+t._s(t.account_transfer.transaction.instrument_number)+"\n\t \t\t\t\t\t")]):t._e(),t._v(" "),t.account_transfer.transaction.payment_method.options.requires_instrument_date?n("span",[n("br"),t._v("\t"+t._s(t.trans("finance.instrument_date"))+": "+t._s(t._f("moment")(t.account_transfer.transaction.instrument_date))+"\n\t \t\t\t\t\t")]):t._e(),t._v(" "),t.account_transfer.transaction.payment_method.options.requires_instrument_bank_detail?n("span",[n("br"),t._v("\t"+t._s(t.trans("finance.instrument_bank_detail"))+": "+t._s(t.account_transfer.transaction.instrument_bank_detail)+"\n\t \t\t\t\t\t")]):t._e(),t._v(" "),t.account_transfer.transaction.payment_method.options.requires_instrument_clearing_date?n("span",[n("br"),t._v("\t"+t._s(t.trans("finance.instrument_clearing_date"))+": "+t._s(t._f("moment")(t.account_transfer.transaction.instrument_clearing_date))+"\n\t \t\t\t\t\t")]):t._e(),t._v(" "),t.account_transfer.transaction.payment_method.options.requires_reference_number?n("span",[n("br"),t._v("\t"+t._s(t.trans("finance.reference_number"))+": "+t._s(t.account_transfer.transaction.reference_number)+"\n\t \t\t\t\t\t")]):t._e()])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("finance.amount")))]),t._v(" "),n("td",[t._v(t._s(t.formatCurrency(t.account_transfer.amount)))])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("finance.account_transfer_description")))]),t._v(" "),n("td",[t._v(t._s(t.account_transfer.description))])]),t._v(" "),n("tr",[n("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.trans("general.created_by")))]),t._v(" "),n("td",[t._v(t._s(t.getEmployeeName(t.account_transfer.user.employee))+" "),n("br"),t._v(" "+t._s(t.getEmployeeDesignationOnDate(t.account_transfer.user.employee,t.account_transfer.date_of_account_transfer)))])])])])]),t._v(" "),t.attachments.length?n("div",[n("ul",{staticClass:"m-t-10 upload-file-list"},t._l(t.attachments,(function(e){return n("li",{staticClass:"upload-file-list-item"},[n("a",{staticClass:"no-link-color",attrs:{href:"/finance/transaction/account/transfer/"+t.account_transfer.uuid+"/attachment/"+e.uuid+"/download?token="+t.authToken}},[n("i",{class:["file-icon","fas","fa-lg",e.file_info.icon]}),t._v(" "),n("span",{staticClass:"upload-file-list-item-size"},[t._v(t._s(e.file_info.size))]),t._v(" "+t._s(e.user_filename))])])})),0)]):t._e(),t._v(" "),n("hr"),t._v(" "),n("p",[n("i",{staticClass:"far fa-clock"}),t._v(" "),n("small",[t._v(t._s(t.trans("general.created_at"))+" "+t._s(t._f("momentDateTime")(t.account_transfer.created_at)))]),t._v(" "),n("span",{staticClass:"pull-right"},[n("i",{staticClass:"far fa-clock"}),t._v(" "),n("small",[t._v(t._s(t.trans("general.updated_at"))+" "+t._s(t._f("momentDateTime")(t.account_transfer.updated_at)))])])])])],2):t._e()])])])])}),[],!1,null,null,null).exports,c={components:{accountTransferForm:a.a,accountTransferDetail:o},data:function(){return{account_transfers:{total:0,data:[]},filter:{sort_by:"date_of_account_transfer",order:"desc",from_account_id:[],to_account_id:[],payment_method_id:[],date_of_account_transfer_start_date:"",date_of_account_transfer_end_date:"",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"date_of_account_transfer",translation:i18n.finance.date_of_account_transfer},{value:"amount",translation:i18n.finance.amount}],accounts:[],selected_from_accounts:null,selected_to_accounts:null,payment_methods:[],selected_payment_methods:null,showFilterPanel:!1,showCreatePanel:!1,help_topic:"",showUuid:"",showModal:!1}},mounted:function(){helper.hasPermission("list-account-transfer")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getAccountTransfers()},methods:{hasPermission:function(t){return helper.hasPermission(t)},showAction:function(t){this.showUuid=t.uuid,this.showModal=!0},getEmployeeName:function(t){return helper.getEmployeeName(t)},getEmployeeDesignationOnDate:function(t,e){return helper.getEmployeeDesignationOnDate(t,e)},getVoucherNumber:function(t){return helper.getVoucherNumber(t)},getAccountTransfers:function(t){var e=this,n=this.$loading.show();"number"!=typeof t&&(t=1),this.filter.date_of_account_transfer_start_date=helper.toDate(this.filter.date_of_account_transfer_start_date),this.filter.date_of_account_transfer_end_date=helper.toDate(this.filter.date_of_account_transfer_end_date);var a=helper.getFilterURL(this.filter);axios.get("/api/account/transfer?page="+t+a).then((function(t){e.account_transfers=t.account_transfers,e.accounts=t.filters.accounts,e.payment_methods=t.filters.payment_methods,n.hide()})).catch((function(t){n.hide(),helper.showErrorMsg(t)}))},editAccountTransfer:function(t){this.$router.push("/finance/transaction/account/transfer/"+t.uuid+"/edit")},confirmCancel:function(t){var e=this;return function(n){return e.cancelAccountTransfer(t)}},cancelAccountTransfer:function(t){var e=this,n=this.$loading.show();axios.delete("/api/account/transfer/"+t.uuid).then((function(t){toastr.success(t.message),e.getAccountTransfers(),n.hide()})).catch((function(t){n.hide(),helper.showErrorMsg(t)}))},getConfig:function(t){return helper.getConfig(t)},print:function(){var t=this.$loading.show();axios.post("/api/account/transfer/print",{filter:this.filter}).then((function(e){var n=window.open("/print");t.hide(),n.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/account/transfer/pdf",{filter:this.filter}).then((function(n){e.hide(),window.open("/download/report/"+n+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onFromAccountSelect:function(t){this.filter.from_account_id.push(t.id)},onFromAccountRemove:function(t){this.filter.from_account_id.splice(this.filter.from_account_id.indexOf(t.id),1)},onToAccountSelect:function(t){this.filter.to_account_id.push(t.id)},onToAccountRemove:function(t){this.filter.to_account_id.splice(this.filter.to_account_id.indexOf(t.id),1)},onPaymentPaymentSelect:function(t){this.filter.payment_method.push(t.id)},onPaymentPaymentRemove:function(t){this.filter.payment_method.splice(this.filter.payment_method.indexOf(t.id),1)},formatCurrency:function(t){return helper.formatCurrency(t)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getAccountTransfers()},"filter.order":function(t){this.getAccountTransfers()},"filter.page_length":function(t){this.getAccountTransfers()}},computed:{authToken:function(){return helper.getAuthToken()}}},i=Object(s.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"page-titles"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-6"},[n("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("finance.account_transfer"))+" \n "),t.account_transfers.total?n("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.account_transfers.total,from:t.account_transfers.from,to:t.account_transfers.to})))]):n("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"action-buttons pull-right"},[t.account_transfers.total&&!t.showCreatePanel&&t.hasPermission("create-account-transfer")?n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.add_new"),expression:"trans('general.add_new')"}],staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[n("i",{staticClass:"fas fa-plus"}),t._v(" "),n("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("finance.add_new_account_transfer")))])]):t._e(),t._v(" "),t.showFilterPanel?t._e():n("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[n("i",{staticClass:"fas fa-filter"}),t._v(" "),n("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),n("sort-by",{attrs:{"order-by-options":t.orderByOptions,"sort-by":t.filter.sort_by,order:t.filter.order},on:{updateSortBy:function(e){t.filter.sort_by=e},updateOrder:function(e){t.filter.order=e}}}),t._v(" "),n("div",{staticClass:"btn-group"},[n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.more_option"),expression:"trans('general.more_option')"}],staticClass:"btn btn-info btn-sm dropdown-toggle no-caret ",attrs:{type:"button",role:"menu",id:"moreOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[n("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),n("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),n("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[n("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[n("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),n("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[n("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),n("help-button",{on:{clicked:function(e){t.help_topic="finance.transaction.account-transfer"}}})],1)])])]),t._v(" "),n("div",{staticClass:"container-fluid"},[n("transition",{attrs:{name:"fade"}},[t.showFilterPanel?n("div",{staticClass:"card card-form"},[n("div",{staticClass:"card-body"},[n("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter"))+"\n ")]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.from_account")))]),t._v(" "),n("v-select",{attrs:{label:"name","track-by":"id",name:"from_account_id",id:"from_account_id",options:t.accounts,placeholder:t.trans("finance.select_from_account"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_from_accounts},on:{select:t.onFromAccountSelect,remove:t.onFromAccountRemove},model:{value:t.selected_from_accounts,callback:function(e){t.selected_from_accounts=e},expression:"selected_from_accounts"}},[t.accounts.length?t._e():n("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.to_account")))]),t._v(" "),n("v-select",{attrs:{label:"name","track-by":"id",name:"to_account_id",id:"to_account_id",options:t.accounts,placeholder:t.trans("finance.select_to_account"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_to_accounts},on:{select:t.onToAccountSelect,remove:t.onToAccountRemove},model:{value:t.selected_to_accounts,callback:function(e){t.selected_to_accounts=e},expression:"selected_to_accounts"}},[t.accounts.length?t._e():n("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v(t._s(t.trans("finance.payment_method")))]),t._v(" "),n("v-select",{attrs:{label:"name","track-by":"id",name:"payment_method_id",id:"payment_method_id",options:t.payment_methods,placeholder:t.trans("finance.select_payment_method"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_payment_methods},on:{select:t.onPaymentMethodSelect,remove:t.onPaymentMethodRemove},model:{value:t.selected_payment_methods,callback:function(e){t.selected_payment_methods=e},expression:"selected_payment_methods"}},[t.payment_methods.length?t._e():n("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("date-range-picker",{attrs:{"start-date":t.filter.date_of_account_transfer_start_date,"end-date":t.filter.date_of_account_transfer_end_date,label:t.trans("finance.date_of_account_transfer_between")},on:{"update:startDate":function(e){return t.$set(t.filter,"date_of_account_transfer_start_date",e)},"update:start-date":function(e){return t.$set(t.filter,"date_of_account_transfer_start_date",e)},"update:endDate":function(e){return t.$set(t.filter,"date_of_account_transfer_end_date",e)},"update:end-date":function(e){return t.$set(t.filter,"date_of_account_transfer_end_date",e)}}})],1)]),t._v(" "),n("div",{staticClass:"card-footer text-right"},[n("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){t.showFilterPanel=!1}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),n("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getAccountTransfers}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),t.hasPermission("create-account-transfer")?n("transition",{attrs:{name:"fade"}},[t.showCreatePanel?n("div",{staticClass:"card card-form"},[n("div",{staticClass:"card-body"},[n("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("finance.add_new_account_transfer")))]),t._v(" "),n("account-transfer-form",{on:{completed:t.getAccountTransfers,cancel:function(e){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]):t._e(),t._v(" "),n("div",{staticClass:"card"},[n("div",{staticClass:"card-body"},[t.account_transfers.total?n("div",{staticClass:"table-responsive"},[n("table",{staticClass:"table table-sm"},[n("thead",[n("tr",[n("th",[t._v(t._s(t.trans("finance.voucher_number")))]),t._v(" "),n("th",[t._v(t._s(t.trans("finance.from_account")))]),t._v(" "),n("th",[t._v(t._s(t.trans("finance.to_account")))]),t._v(" "),n("th",[t._v(t._s(t.trans("finance.payment_method")))]),t._v(" "),n("th",[t._v(t._s(t.trans("finance.amount")))]),t._v(" "),n("th",[t._v(t._s(t.trans("finance.date_of_account_transfer")))]),t._v(" "),n("th",[t._v(t._s(t.trans("general.created_by")))]),t._v(" "),n("th",[t._v(t._s(t.trans("general.created_at")))]),t._v(" "),n("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),n("tbody",t._l(t.account_transfers.data,(function(e){return n("tr",[n("td",{domProps:{textContent:t._s(t.getVoucherNumber(e.transaction))}}),t._v(" "),n("td",{domProps:{textContent:t._s(e.from_account.name)}}),t._v(" "),n("td",{domProps:{textContent:t._s(e.to_account.name)}}),t._v(" "),n("td",{domProps:{textContent:t._s(e.transaction.payment_method.name)}}),t._v(" "),n("td",[t._v(t._s(t.formatCurrency(e.amount)))]),t._v(" "),n("td",[t._v(t._s(t.getEmployeeName(e.user.employee))+" "),n("br"),t._v(" "+t._s(t.getEmployeeDesignationOnDate(e.user.employee,e.date_of_account_transfer)))]),t._v(" "),n("td",[t._v(t._s(t._f("moment")(e.date_of_account_transfer)))]),t._v(" "),n("td",[t._v(t._s(t._f("momentDateTime")(e.created_at)))]),t._v(" "),n("td",{staticClass:"table-option"},[n("div",{staticClass:"btn-group"},[n("a",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.print"),expression:"trans('general.print')"}],staticClass:"btn btn-success btn-sm",attrs:{href:"/finance/transaction/account/transfer/"+e.uuid+"/print?token="+t.authToken,target:"_blank"}},[n("i",{staticClass:"fas fa-print"})]),t._v(" "),n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.view_detail"),expression:"trans('general.view_detail')"}],staticClass:"btn btn-success btn-sm",on:{click:function(n){return n.preventDefault(),t.showAction(e)}}},[n("i",{staticClass:"fas fa-arrow-circle-right"})]),t._v(" "),e.is_cancelled?t._e():[t.hasPermission("edit-account-transfer")?n("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.edit_account_transfer"),expression:"trans('finance.edit_account_transfer')"}],staticClass:"btn btn-info btn-sm",on:{click:function(n){return n.preventDefault(),t.editAccountTransfer(e)}}},[n("i",{staticClass:"fas fa-edit"})]):t._e(),t._v(" "),t.hasPermission("cancel-account-transfer")?n("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmCancel(e)},expression:"{ok: confirmCancel(account_transfer)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.cancel_account_transfer"),expression:"trans('finance.cancel_account_transfer')"}],key:e.id,staticClass:"btn btn-danger btn-sm"},[n("i",{staticClass:"fas fa-trash"})]):t._e()]],2)])])})),0)])]):t._e(),t._v(" "),t.account_transfers.total?t._e():n("module-info",{attrs:{module:"finance",title:"account_transfer_module_title",description:"account_transfer_module_description",icon:"list"}},[n("div",{attrs:{slot:"btn"},slot:"btn"},[!t.showCreatePanel&&t.hasPermission("create-account-transfer")?n("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[n("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))]):t._e()])]),t._v(" "),n("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.account_transfers},on:{"update:pageLength":function(e){return t.$set(t.filter,"page_length",e)},"update:page-length":function(e){return t.$set(t.filter,"page_length",e)},updateRecords:t.getAccountTransfers}})],1)])],1),t._v(" "),t.showModal?n("account-transfer-detail",{attrs:{uuid:t.showUuid},on:{close:function(e){t.showModal=!1}}}):t._e(),t._v(" "),n("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=i.exports}}]); //# sourceMappingURL=index.js.map?id=69fd8fa09c70c3117562