/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/edit.js (15727B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[232],{CI8W:function(t,e,n){"use strict";n.r(e);var a={components:{accountTransferForm:n("jcem").a},data:function(){return{uuid:this.$route.params.uuid}},mounted:function(){helper.hasPermission("edit-account-transfer")||(helper.notAccessibleMsg(),this.$router.push("/dashboard"))}},r=n("KHd+"),o=Object(r.a)(a,(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.edit_account_transfer")))])]),t._v(" "),n("div",{staticClass:"col-12 col-sm-6"},[n("div",{staticClass:"action-buttons pull-right"},[n("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){return t.$router.push("/finance/transaction/account/transfer")}}},[n("i",{staticClass:"fas fa-list"}),t._v(" "),n("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("finance.account_transfer")))])])])])])]),t._v(" "),n("div",{staticClass:"container-fluid"},[n("div",{staticClass:"card card-form"},[n("div",{staticClass:"card-body p-t-20"},[n("account-transfer-form",{attrs:{uuid:t.uuid}})],1)])])])}),[],!1,null,null,null);e.default=o.exports},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+"),o=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=o.exports}}]); //# sourceMappingURL=edit.js.map?id=a960ab6747864f868e70