"use strict";(self["webpackChunkacctg_ui"]=self["webpackChunkacctg_ui"]||[]).push([[1243],{6542:function(t,a,e){e.r(a),e.d(a,{default:function(){return j}});var l=e(6252),n=e(9963),o=e(2262),s=e(3577),r=e(4707),c=e(7530),d=e(4850),i=e(7204),u=e(162);const m=t=>((0,l.dD)("data-v-6b96e9f7"),t=t(),(0,l.Cn)(),t),f={class:"journal-left-container"},p=m((()=>(0,l._)("div",{class:"d-flex justify-content-between"},[(0,l._)("h2",{class:"page-title"},"Journal Summary")],-1))),_={class:"date-container mt-3"},w={class:"from-to-date d-flex"},y={class:"fromDate w-100 d-flex align-items-center gap-2"},b=m((()=>(0,l._)("label",{for:"journalFrom",class:"form-label",style:{margin:"0!important"}},"From",-1))),g=m((()=>(0,l._)("div",{class:"middleIcon"},[(0,l._)("div",{class:"icon-container"},[(0,l._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.3em",height:"1.3em",viewBox:"0 0 20 20"},[(0,l._)("path",{fill:"black",d:"M12.78 3.22a.75.75 0 1 0-1.06 1.06L13.44 6H4.75a.75.75 0 0 0 0 1.5h8.69l-1.72 1.72a.75.75 0 1 0 1.06 1.06l3-3a.75.75 0 0 0 0-1.06zm-4.5 7.56a.75.75 0 1 0-1.06-1.06l-3 3a.75.75 0 0 0 0 1.06l3 3a.75.75 0 0 0 1.06-1.06L6.56 14h8.69a.75.75 0 0 0 0-1.5H6.56z"})])])],-1))),h={class:"toDate w-100 d-flex align-items-center gap-2"},v=m((()=>(0,l._)("label",{for:"journalTo",class:"form-label",style:{margin:"0!important"}},"To",-1))),C=m((()=>(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",{class:"text-center",style:{width:"12%"}},"Entry Date"),(0,l._)("th",{class:"text-center",style:{width:"12%"}},"Trans Date"),(0,l._)("th",{class:"text-center"},"Particulars"),(0,l._)("th",{class:"text-end",style:{width:"17%"}},"Amount"),(0,l._)("th",{class:"text-end",style:{width:"10%"}},"Type"),(0,l._)("th",{class:"text-end",style:{width:"10%"}},"Status")])],-1)));var S={__name:"JournalSummary",setup(t){const a=(0,r.S)();(0,d.S)();let e=(0,o.qj)([]),m=(0,o.iH)({});(0,o.iH)(!0);(0,o.iH)("add"),(0,o.iH)("");const S=(0,o.iH)(!1),x=(0,u.d)(),D=(0,o.qj)({from:j(),to:j()});function j(){let t=(new Date).getDate(),a=(new Date).getMonth()+1;return a<10&&(a="0"+a),t<10&&(t="0"+t),(new Date).getFullYear()+"-"+a+"-"+t}async function T(){x.dateFrom=D.from,x.dateTo=D.to;let t=await(0,c.Z)("journal_entry","all").addPayload("conditions",{type:D.from+":"+D.to+":summary"}).execute();t&&(console.log(t.data.data),e.value=t.data.data)}const k=(0,o.iH)([{data:"entryDate"},{data:"transDate"},{data:"particulars"},{data:"amount"},{data:"type"},{data:null,render:function(t,a,e,l){return"posted"===t.status?`<span style="color: #009e1a" class="fw-bold"> ${t.status.toUpperCase()}</span>`:`<span class="fw-bold" style="color: #999999"> ${t.status.toUpperCase()}</span>`}}]);e.value;function H(){$("#generalJournalDataTable td").css("background-color",""),S.value=!1}return(0,l.bv)((()=>{T()})),(t,r)=>{const c=(0,l.up)("TableContainer"),d=(0,l.up)("SplitColumnContainers");return(0,l.wg)(),(0,l.j4)(d,null,{leftSide:(0,l.w5)((()=>[(0,l._)("div",f,[p,(0,l._)("div",_,[(0,l._)("div",w,[(0,l._)("div",y,[b,(0,l.wy)((0,l._)("input",{type:"date",class:"form-control form-control-sm",id:"journalFrom","onUpdate:modelValue":r[0]||(r[0]=t=>D.from=t)},null,512),[[n.nr,D.from]])]),g,(0,l._)("div",h,[v,(0,l.wy)((0,l._)("input",{type:"date",class:"form-control form-control-sm",id:"journalTo","onUpdate:modelValue":r[1]||(r[1]=t=>D.to=t)},null,512),[[n.nr,D.to]])])]),(0,l._)("div",{class:"btn-container"},[(0,l._)("button",{class:"btn btn-primary btn-sm fw-semibold",onClick:T},"GENERATE")])]),(0,l.Wm)(c,{tableId:"generalJournalDataTable",columns:k.value,data:(0,o.SU)(e).value,class:"mt-3 header-alignment journal-summary-table",style:{cursor:"pointer"}},{tableHeader:(0,l.w5)((()=>[C])),_:1},8,["columns","data"])])])),rightSide:(0,l.w5)((()=>[!(0,o.SU)(a).isSideColumnCollapsed&&S.value?((0,l.wg)(),(0,l.j4)(i.Z,{key:0,class:(0,s.C_)({"coa-viewing":!(0,o.SU)(a).isSideColumnCollapsed}),selectedAccount:(0,o.SU)(m),"date-from":D.from,"date-to":D.to,onCloseAccViewing:H},null,8,["class","selectedAccount","date-from","date-to"])):(0,l.kq)("",!0)])),_:1})}}},x=e(3744);const D=(0,x.Z)(S,[["__scopeId","data-v-6b96e9f7"]]);var j=D}}]);
//# sourceMappingURL=1243.d60a92eb.js.map