(window.webpackJsonp=window.webpackJsonp||[]).push([[85],{449:function(t,a,s){"use strict";s.r(a);var n={created:function(){this.paymentList()},data:function(){return{company:"",payments:{},loading:!0,item:20}},methods:{paymentList:function(){var t=this;axios.get("/api/company/sale/payment/details/"+this.$route.params.id).then((function(a){console.log(a),t.company=a.data.company,t.payments=a.data.payments,t.loading=!1}))},totalPayment:function(){var t=0;return this.payments.data.forEach((function(a){t+=a.amount})),t}}},e=s(3),i=Object(e.a)(n,(function(){var t=this,a=t._self._c;return a("div",[a("admin-main"),t._v(" "),a("div",{staticClass:"content-wrapper"},[a("section",{staticClass:"content-header"},[a("h1",[a("router-link",{staticClass:"btn btn-primary",attrs:{to:{name:"compnaySale"}}},[a("i",{staticClass:"fa fa-arrow-left"})])],1),t._v(" "),a("ol",{staticClass:"breadcrumb"},[t._m(0),t._v(" "),a("li",{staticClass:"active"},[t._v(t._s(t.company.name))])])]),t._v(" "),a("section",{staticClass:"content"},[a("div",{staticClass:"container"},[a("div",{staticClass:"row justify-content-center"},[a("div",{staticClass:"col-lg-8 col-md-8 col-lg-offset-1"},[a("div",{staticClass:"box box-primary"},[a("div",{staticClass:"box-header with-border text-center"},[a("h3",{staticClass:"box-title"},[t._v(t._s(t.company.name))])]),t._v(" "),a("div",{staticClass:"box-body"},[a("table",{staticClass:"table table-hover table-striped table-bordered"},[t._m(1),t._v(" "),a("tbody",[t.loading?a("h1",[a("i",{staticClass:"fa fa-spin fa-spinner"})]):t._l(t.payments.data,(function(s,n){return a("tr",{key:n},[a("td",[t._v(t._s(n+1))]),t._v(" "),a("td",[t._v(t._s(s.date))]),t._v(" "),a("td",[t._v(t._s(s.comment))]),t._v(" "),a("td",[t._v(t._s(s.credit_in))]),t._v(" "),a("td",[t._v("৳ "+t._s(s.amount))])])})),t._v(" "),a("tr",[a("td",{attrs:{colspan:"4"}}),t._v(" "),a("td",[a("span",{staticClass:"badge badge-success"},[t._v("\n                                                    ৳ "+t._s(t.totalPayment()))])])])],2)])]),t._v(" "),a("div",{staticClass:"box-footer"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6"},[a("pagination",{attrs:{data:t.payments},on:{"pagination-change-page":t.paymentList}})],1),t._v(" "),a("div",{staticClass:"col-lg-6 mt-1",staticStyle:{"margin-top":"25px","text-align":"right"}},[a("p",[t._v("\n                                            Showing "),a("strong",[t._v(t._s(t.payments.from))]),t._v(" to\n                                            "),a("strong",[t._v(t._s(t.payments.to))]),t._v(" of total\n                                            "),a("strong",[t._v(t._s(t.payments.total))]),t._v(" entries\n                                        ")])])])])])])])])])])],1)}),[function(){var t=this._self._c;return t("li",[t("a",{attrs:{href:"#"}},[t("i",{staticClass:"fa fa-dashboard"}),this._v("Dashboard")])])},function(){var t=this,a=t._self._c;return a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[t._v("#")]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v("Date")]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v("Comment")]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v("Paid By")]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v("Amount")])])])}],!1,null,null,null);a.default=i.exports}}]);