(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8846f6aa"],{"18e2":function(t,e,a){"use strict";a("20ee")},"20ee":function(t,e,a){},b7d7:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[e("v-breadcrumbs",{attrs:{items:t.items}}),e("v-card-title",[t._v(" Doctor Ledger "),e("v-spacer"),e("v-spacer"),e("v-spacer"),e("v-spacer"),e("v-col",{attrs:{cols:"12",sm:"6",md:"4"}},[e("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function({on:a,attrs:r}){return[e("v-text-field",t._g(t._b({attrs:{label:"Select Date","prepend-icon":"mdi-calendar",readonly:""},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}},"v-text-field",r,!1),a))]}}]),model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[e("v-date-picker",{attrs:{max:t.nowDate},on:{input:function(e){t.menu2=!1},"click:date":t.dateSelect},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1)],1),e("v-text-field",{attrs:{"append-icon":"mdi-magnify",label:"Search","single-line":"","hide-details":""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),e("v-card",[e("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.desserts,search:t.search,loading:t.loadingstatus},scopedSlots:t._u([{key:"item.actions",fn:function({item:a}){return[e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function({on:r,attrs:n}){return[e("v-chip",t._g(t._b({staticClass:"ma-2",attrs:{dark:"",open:"",color:"orange",label:"",outlined:"",small:""},on:{click:function(e){return t.doctor_ledger(a)}}},"v-chip",n,!1),r),[e("v-icon",{attrs:{left:""}},[t._v(" mdi-motorbike ")]),t._v(" >> ")],1)]}}],null,!0)},[e("span",[t._v("Doctor Ledger")])]),e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function({on:r,attrs:n}){return[e("v-chip",t._g(t._b({staticClass:"ma-2",attrs:{dark:"",open:"",color:"orange",label:"",outlined:"",small:""},on:{click:function(e){return t.doctor_statement(a)}}},"v-chip",n,!1),r),[t._v("> ")])]}}],null,!0)},[e("span",[t._v("Doctor Statement")])])]}},{key:"no-data",fn:function(){return[e("v-btn",{attrs:{color:"primary"},on:{click:t.initialize}},[t._v("Reset")])]},proxy:!0}])})],1)],1)},n=[],o=a("0e68"),s={data(){return{search:"",sortBy:"operation.name",sortDesc:!1,date:(new Date).toISOString().substr(0,10),nowDate:(new Date).toISOString().substr(0,10),menu2:!1,loadingstatus:!0,headers:[{text:"Doctor Name",value:"dr_name"},{text:"Consultation",value:"consultancy_ledger"},{text:"Overseas",value:"overseas_ledger"},{text:"Internal Referral:Received",value:"doctor_internal_receive"},{text:"OT Ledger",value:"ot_ledger"},{text:"Internal Referral: Transfer",value:"doctor_internal_transfer"},{text:"Refund",value:"patient_refund"},{text:"Paid Amount",value:"doctor_paid"},{text:"Balance",value:"balance"},{text:"Action",value:"actions",sortable:!1}],desserts:[],items:[{text:"Dashboard",disabled:!1,href:"/"},{text:"Doctor ledger",disabled:!0,href:"patients"}],returnUrl:o["a"].defaults.headers.common.app_URL}},created(){this.initialize(this.date)},methods:{initialize(t){o["a"].get("doctor-ot-summary?date="+t).then(t=>{this.desserts=t.data.data,this.loadingstatus=!1}).catch(t=>{this.errors.push(t)})},toggleOrder(){this.sortDesc=!this.sortDesc},nextSort(){let t=this.headers.findIndex(t=>t.value===this.sortBy);t=(t+1)%this.headers.length,this.sortBy=this.headers[t].value},getColor(t){return"open"==t?"orange":"green"},editItem(t){alert(t.patient_id)},doctor_ledger(t){var e=new Date(this.date),a=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate();window.open(this.returnUrl+"doctors/doctor_ledger?doctor="+t.id+"&start_date="+a+"&end_date="+a+"&search=Search/")},doctor_statement(t){var e=new Date(this.date),a=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate();window.location.href="doctor-statement?doctor_id="+t.id+"&date="+a+"&search=Search"},dateSelect(t){this.loadingstatus=!0,this.initialize(t)}}},i=s,l=(a("18e2"),a("2877")),c=Object(l["a"])(i,r,n,!1,null,"afe14966",null);e["default"]=c.exports}}]);
//# sourceMappingURL=chunk-8846f6aa.43dcd288.js.map