(window.webpackJsonp=window.webpackJsonp||[]).push([[259],{YzCy:function(t,s,e){"use strict";e.r(s);var a={components:{},data:function(){return{id:this.$route.params.id,stock_purchase:{},attachments:[]}},mounted:function(){this.get()},methods:{hasPermission:function(t){return helper.hasPermission(t)},get:function(){var t=this,s=this.$loading.show();axios.get("/api/stock/purchase/"+this.id).then((function(e){t.stock_purchase=e.stock_purchase,t.attachments=e.attachments,s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},getEmployeeName:function(t){return helper.getEmployeeName(t)},getEmployeeDesignationOnDate:function(t,s){return helper.getEmployeeDesignationOnDate(t,s)},formatCurrency:function(t){return helper.formatCurrency(t)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)},momentTime:function(t){return helper.formatTime(t)}},computed:{authToken:function(){return helper.getAuthToken()}}},n=e("KHd+"),i=Object(n.a)(a,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return t.stock_purchase.id?e("div",[e("div",{staticClass:"page-titles"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-6"},[e("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("inventory.stock_purchase_detail"))+"\n                    "),e("span",{staticClass:"card-subtitle"},[t._v(t._s("#"+t.stock_purchase.id))])])]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"action-buttons pull-right"},[e("router-link",{staticClass:"btn btn-info btn-sm",attrs:{to:"/inventory/stock/purchase"}},[e("i",{staticClass:"fas fa-list"}),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("inventory.stock_purchase")))])])],1)])])]),t._v(" "),e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-8 pr-0"},[e("div",{staticClass:"card border-right"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"table-responsive px-2"},[e("table",{staticClass:"table table-sm custom-show-table"},[e("tbody",[e("tr",[e("td",[t._v(t._s(t.trans("inventory.stock_purchase_date")))]),t._v(" "),e("td",[t._v(t._s(t._f("moment")(t.stock_purchase.date)))])]),t._v(" "),e("tr",[e("td",[t._v(t._s(t.trans("inventory.vendor")))]),t._v(" "),e("td",[t._v(t._s(t.stock_purchase.vendor.name))])]),t._v(" "),e("tr",[e("td",[t._v(t._s(t.trans("inventory.stock_purchase_total")))]),t._v(" "),e("td",[t._v(t._s(t.stock_purchase.total))])]),t._v(" "),e("tr",[e("td",[t._v(t._s(t.trans("employee.employee")))]),t._v(" "),e("td",[t._v(t._s(t.getEmployeeName(t.stock_purchase.user.employee)))])]),t._v(" "),e("tr",[e("td",[t._v(t._s(t.trans("employee.designation")))]),t._v(" "),e("td",[t._v(t._s(t.getEmployeeDesignationOnDate(t.stock_purchase.user.employee,t.stock_purchase.date)))])]),t._v(" "),e("tr",[e("td",[t._v(t._s(t.trans("inventory.stock_purchase_description")))]),t._v(" "),e("td",[t._v(t._s(t.stock_purchase.description))])]),t._v(" "),e("tr",[e("td",{attrs:{colspan:"2"}},[t.attachments.length?e("div",[e("ul",{staticClass:"m-t-10 upload-file-list"},t._l(t.attachments,(function(s){return e("li",{staticClass:"upload-file-list-item"},[e("a",{staticClass:"no-link-color",attrs:{href:"/stock/purchase/"+t.stock_purchase.id+"/attachment/"+s.uuid+"/download?token="+t.authToken}},[e("i",{class:["file-icon","fas","fa-lg",s.file_info.icon]}),t._v(" "),e("span",{staticClass:"upload-file-list-item-size"},[t._v(t._s(s.file_info.size))]),t._v(" "+t._s(s.user_filename))])])})),0)]):t._e()])])])])]),t._v(" "),e("h4",{staticClass:"card-title px-3"},[t._v(t._s(t.trans("inventory.stock_item")))]),t._v(" "),e("div",{staticClass:"table-responsive px-2"},[e("table",{staticClass:"table table-sm"},[e("thead",[e("tr",[e("th",{staticClass:"p-l-20"},[t._v(t._s(t.trans("inventory.stock_item")))]),t._v(" "),e("th",[t._v(t._s(t.trans("inventory.stock_purchase_quantity")))]),t._v(" "),e("th",[t._v(t._s(t.trans("inventory.stock_purchase_unit_price")))]),t._v(" "),e("th",[t._v(t._s(t.trans("inventory.stock_item_description")))])])]),t._v(" "),e("tbody",t._l(t.stock_purchase.details,(function(s){return e("tr",[e("td",{staticClass:"p-l-20"},[t._v(t._s(s.item.name))]),t._v(" "),e("td",[t._v(t._s(s.quantity))]),t._v(" "),e("td",[t._v(t._s(t.formatCurrency(s.unit_price)))]),t._v(" "),e("td",[t._v(t._s(s.description))])])})),0)])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6 p-0"})])])]):t._e()}),[],!1,null,null,null);s.default=i.exports}}]);
//# sourceMappingURL=show.js.map?id=09309af02840b670ba18