dealposbooks 1.9.4 → 1.9.6-p
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +374 -374
- package/assets/scss/layouts/_sidebar.scss +2 -2
- package/assets/scss/style.scss +34 -3
- package/assets/scss/variables/_variables.scss +1 -2
- package/chunk-27SWEVDU.js +1 -0
- package/chunk-2DV653RD.js +1 -0
- package/chunk-2OECREUZ.js +1 -0
- package/{chunk-NL5IYBHF.js → chunk-32BR7AQL.js} +1 -1
- package/chunk-34XRAZFC.js +1 -0
- package/chunk-35CWG2OK.js +180 -0
- package/chunk-35KDUCM3.js +1 -0
- package/{chunk-BGDKOH3U.js → chunk-3DN7TZCI.js} +1 -1
- package/chunk-3G3QSUWH.js +1 -0
- package/chunk-3HW557B7.js +1 -0
- package/chunk-3L7IWFXM.js +527 -0
- package/chunk-3WB76KQC.js +430 -0
- package/chunk-43WCLYRX.js +1 -0
- package/chunk-46TNY5N4.js +185 -0
- package/chunk-4FGQ5T64.js +2 -0
- package/chunk-4KXSM3HP.js +1 -0
- package/chunk-4QKRWFW4.js +1 -0
- package/{chunk-AM66YD6C.js → chunk-4S33ZRKF.js} +1 -1
- package/chunk-54OPMMIM.js +1 -0
- package/chunk-6HQX2SM2.js +1 -0
- package/chunk-6TA77CRR.js +1 -0
- package/{chunk-F7TF7ASR.js → chunk-6ZZARVQO.js} +1 -1
- package/{chunk-XMZ7ADZB.js → chunk-7WXXPCRV.js} +1 -1
- package/{chunk-5QMHSLSU.js → chunk-AKMHO3LC.js} +1 -1
- package/chunk-AOSPVPK7.js +231 -0
- package/{chunk-5OU7ECCN.js → chunk-ASK2IVMC.js} +1 -1
- package/chunk-B7JILYJO.js +1 -0
- package/chunk-BNI5KUDE.js +193 -0
- package/chunk-BX3CRF44.js +1 -0
- package/{chunk-KQAMA66M.js → chunk-BYD3JK4R.js} +1 -1
- package/chunk-C4LZX33Q.js +449 -0
- package/{chunk-7TKATLB4.js → chunk-C5GEP4MM.js} +1 -1
- package/chunk-C7UZ6ZYF.js +1 -0
- package/chunk-CSMMP7XG.js +188 -0
- package/chunk-CTCQB63H.js +1 -0
- package/chunk-DCKLQNGL.js +1 -0
- package/chunk-DNK2GUDB.js +1 -0
- package/{chunk-VKO43FOT.js → chunk-DOM7WYRM.js} +1 -1
- package/chunk-ELWFWCNU.js +246 -0
- package/{chunk-5OXHRN43.js → chunk-EXVUABTO.js} +1 -1
- package/chunk-G6FJQBZZ.js +1 -0
- package/chunk-GJXWL5XV.js +1 -0
- package/chunk-GNP7WGSH.js +1 -0
- package/chunk-GTGRV7IH.js +1 -0
- package/chunk-HFFH2WIX.js +98 -0
- package/chunk-HRPP75N7.js +1 -0
- package/{chunk-7XAJOA36.js → chunk-HRQJ5DXP.js} +1 -1
- package/{chunk-XEATX3IC.js → chunk-I3HFXOYS.js} +1 -1
- package/{chunk-HDO45X7Q.js → chunk-IIB2DZLA.js} +1 -1
- package/{chunk-FCGAJLPQ.js → chunk-J2SK4PGN.js} +1 -1
- package/chunk-J77A3DFB.js +1 -0
- package/chunk-JDW35ZB5.js +47 -0
- package/chunk-JMLETF7Y.js +1 -0
- package/{chunk-56MVOUHH.js → chunk-JP3F2QND.js} +1 -1
- package/chunk-JYNZPVLW.js +1 -0
- package/chunk-K6753MGR.js +7 -0
- package/chunk-LD4G6ND6.js +130 -0
- package/{chunk-JQ4DHNFQ.js → chunk-LKZL77YR.js} +1 -1
- package/chunk-LR2DJRRL.js +79 -0
- package/chunk-LTZA6IIO.js +1 -0
- package/chunk-M7MFX6BW.js +1 -0
- package/chunk-MCDQ2TIS.js +1 -0
- package/chunk-MJVSTWYY.js +1 -0
- package/chunk-N2RYBZK7.js +1 -0
- package/{chunk-HPKZYS2A.js → chunk-N6JCA3CN.js} +2 -2
- package/chunk-NF3TF3LT.js +397 -0
- package/chunk-OEJBOFI5.js +1 -0
- package/{chunk-7PDAUPWN.js → chunk-OEOAUJY5.js} +12 -12
- package/{chunk-JRYP3YPK.js → chunk-OVCTOPAO.js} +1 -1
- package/{chunk-4FK4QI2U.js → chunk-OZACNHDP.js} +1 -1
- package/chunk-P6CJ2ONT.js +1 -0
- package/{chunk-T2A6NORZ.js → chunk-PGECEXRR.js} +1 -1
- package/{chunk-ITIRJVUS.js → chunk-QPKNYNLC.js} +2 -2
- package/chunk-RBDJZRHY.js +1 -0
- package/{chunk-25XKSUYX.js → chunk-RT5PUZ5F.js} +1 -1
- package/{chunk-ZKXT6RSI.js → chunk-TC43COAE.js} +1 -1
- package/chunk-TFV5QZKR.js +947 -0
- package/chunk-TK3G2BVM.js +222 -0
- package/{chunk-R6HGHSPM.js → chunk-TQZNJ5WF.js} +1 -1
- package/chunk-UEOO2LYA.js +82 -0
- package/chunk-WEWEITR7.js +1 -0
- package/chunk-WGZN6AN2.js +1 -0
- package/chunk-WZO2ZLBL.js +1 -0
- package/chunk-X34Y3TVX.js +1 -0
- package/chunk-XFSZDZPJ.js +1 -0
- package/chunk-XKEV5AED.js +201 -0
- package/chunk-XZGFG6E3.js +1 -0
- package/chunk-YOEPO6LK.js +959 -0
- package/{chunk-D5AXB5DE.js → chunk-YVEUYFCE.js} +2 -2
- package/chunk-ZWHB7NI7.js +1 -0
- package/index.html +2 -2
- package/main-U5PC2W2C.js +1 -0
- package/package.json +1 -1
- package/styles-GTUKYMN7.css +1 -0
- package/chunk-2TUOAI22.js +0 -1
- package/chunk-3IHOEH5O.js +0 -1
- package/chunk-3VC2KAML.js +0 -1
- package/chunk-4J3EFT67.js +0 -1
- package/chunk-6J5S4UPN.js +0 -2
- package/chunk-7GT5MR57.js +0 -1
- package/chunk-7LCGNNCW.js +0 -627
- package/chunk-7NXTCJMX.js +0 -1
- package/chunk-A3NY5EYN.js +0 -1
- package/chunk-AH5PA2TO.js +0 -1
- package/chunk-B4COOFJS.js +0 -2
- package/chunk-BJGK47CG.js +0 -1
- package/chunk-BWS6U7BM.js +0 -193
- package/chunk-D5RQBZNF.js +0 -1
- package/chunk-DELPZQZH.js +0 -246
- package/chunk-DJUGUNXR.js +0 -503
- package/chunk-DSFIM36S.js +0 -1
- package/chunk-EHCALTHK.js +0 -1
- package/chunk-FUGCJNGU.js +0 -960
- package/chunk-GMLRRSMP.js +0 -1
- package/chunk-IACJNRVA.js +0 -25
- package/chunk-IQZ2MKLS.js +0 -1
- package/chunk-IXPPR5MV.js +0 -1
- package/chunk-J3B5HVW4.js +0 -1
- package/chunk-L6VKOTIV.js +0 -180
- package/chunk-LATJGOV3.js +0 -185
- package/chunk-LLV6TGMT.js +0 -1
- package/chunk-MNCUT4L4.js +0 -1
- package/chunk-NBRL2K4H.js +0 -1
- package/chunk-NDOZ5YES.js +0 -1
- package/chunk-SCEMI63T.js +0 -1
- package/chunk-SDTMCYSJ.js +0 -1
- package/chunk-TDX2HSWE.js +0 -1
- package/chunk-UHVZAFKN.js +0 -1
- package/chunk-UMYCPFK5.js +0 -1660
- package/chunk-UOAJWMSO.js +0 -1
- package/chunk-UZCNPNT7.js +0 -2
- package/chunk-VF7TG32T.js +0 -47
- package/chunk-VI3AV775.js +0 -1
- package/chunk-VK5TK23W.js +0 -7
- package/chunk-VNHXLUHA.js +0 -1
- package/chunk-W6UD5NO5.js +0 -2
- package/chunk-WUGCCSIP.js +0 -1
- package/chunk-X234EQET.js +0 -129
- package/chunk-X3FQFXUZ.js +0 -300
- package/chunk-XJ5BSLZV.js +0 -1
- package/chunk-YAKYBQQ6.js +0 -1
- package/chunk-YQRWSN5V.js +0 -1
- package/main-VQYYYR67.js +0 -1
- package/styles-IDKYTRGA.css +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as Te,b as Le}from"./chunk-AKMHO3LC.js";import{a as Ct,b as ye}from"./chunk-GJXWL5XV.js";import"./chunk-34XRAZFC.js";import{a as Fe}from"./chunk-P6CJ2ONT.js";import{a as St}from"./chunk-NRULEUE7.js";import{b as ht,c as xt}from"./chunk-NF3TF3LT.js";import{a as Ce,b as ve}from"./chunk-AOSPVPK7.js";import"./chunk-TQZNJ5WF.js";import{b as gt}from"./chunk-RT5PUZ5F.js";import"./chunk-OZACNHDP.js";import{a as oe,b as De}from"./chunk-LKZL77YR.js";import{a as H,b as Y}from"./chunk-JP3F2QND.js";import{a as ut,b as _t,d as xe,k as Se}from"./chunk-TFV5QZKR.js";import{a as ge,b as he}from"./chunk-3WB76KQC.js";import"./chunk-LTZA6IIO.js";import{a as ft}from"./chunk-N2RYBZK7.js";import{a as A}from"./chunk-B7JILYJO.js";import"./chunk-HFFH2WIX.js";import{b as Re}from"./chunk-TK3G2BVM.js";import"./chunk-LR2DJRRL.js";import"./chunk-CSMMP7XG.js";import"./chunk-6TA77CRR.js";import"./chunk-JMLETF7Y.js";import"./chunk-C5GEP4MM.js";import{e as ct}from"./chunk-TC43COAE.js";import{a as le,b as pe}from"./chunk-JDW35ZB5.js";import"./chunk-WZO2ZLBL.js";import{b as fe}from"./chunk-6ZZARVQO.js";import{f as dt,h as _e}from"./chunk-35CWG2OK.js";import"./chunk-EXVUABTO.js";import{a as V,b as me,c as ce,d as se,e as de,f as ue,g as st}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{w as re,x as ae}from"./chunk-YOEPO6LK.js";import"./chunk-ZWHB7NI7.js";import{c as lt,e as X,f as Z,g as pt,i as G,k as ee,l as te,o as ie,t as mt,v as we,y as ne}from"./chunk-BNI5KUDE.js";import{a as at}from"./chunk-35KDUCM3.js";import{a as rt}from"./chunk-3HW557B7.js";import{C as ot,F as J,M as Q,c as tt,f as Ie,k as it,l as K,m as $,s as nt}from"./chunk-BYD3JK4R.js";import"./chunk-F2X3VGZZ.js";import{Cb as C,D as Ee,Ga as T,Ic as x,Jc as S,Kb as c,Kc as Ze,Lc as s,Nb as N,Pb as O,Qb as Je,Sb as Qe,Tb as Xe,Ub as i,V as ze,Vb as n,W as Ue,Wb as E,X as j,Xc as R,Yc as et,Z as k,_b as L,ba as Ke,c as P,cb as $e,dc as w,ec as d,gb as l,ha as h,pa as y,pc as r,qa as b,qc as u,rc as D,s as We,uc as W,vc as q,wb as M,wc as z,xc as U,yc as I,zc as F}from"./chunk-YVEUYFCE.js";import{a as g,b as v,c as Ve,e as Ye}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{constructor(){this.httpService=h(at),this.authService=h(Fe)}fetchGeneralLedgerLoader(e={}){return this.httpService.post(void 0,"api/GeneralLedgerLoader/GetFilter",e)}fetchGeneralLedgerReport(e){return this.httpService.post(void 0,"api/GeneralLedger/Get",e)}exportGeneralLedger(e){let a={responseType:"blob"};return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,a)}getCustomerSuggestions(e){let a={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:a})}getSupplierSuggestions(e){let a={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:a})}getCashierSuggestions(e){let a={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:a})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,a={}){let o=new nt({fromObject:Object.fromEntries(Object.entries(e).map(([f,_])=>[f,String(_)]))}),m=g({params:o},a);return this.httpService.get(void 0,"/api/BalanceSheet",m)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,a={}){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e),a)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Gt={metadata:{filter:{categoryID:"",from:new Date().toISOString(),to:new Date().toISOString(),iDs:[],outletIDs:[]},options:{accounts:[],outlets:[]},roles:{isInEmptyOutletRole:!1}},items:{data:[],pageTitle:""},filter:{listAccountID:[],categoryID:null,OutletID:[],ContactID:null,from:null,to:null}},Me=me(ue(Gt),st("General Ledger Store"),ce(t=>({debitTotal:R(()=>t.items.data().reduce((p,e)=>p+e.data.reduce((a,o)=>a+(o.debitAmount||0),0),0)),creditTotal:R(()=>t.items.data().reduce((p,e)=>p+e.data.reduce((a,o)=>a+(o.creditAmount||0),0),0))})),de(t=>{let p=h(B),e={updateFilter:a=>{V(t,o=>v(g({},o),{filter:a}))},loadList:H(P(Ee(a=>Array.isArray(a.listAccountID)&&a.listAccountID.length>0),j(a=>p.fetchGeneralLedgerReport(a).pipe(Y({next:o=>{V(t,m=>v(g({},m),{items:o}))},error:o=>{console.error(o)}}))))),loadLoader:H(P(j(a=>p.fetchGeneralLedgerLoader(a).pipe(Y({next:o=>{V(t,m=>v(g({},m),{metadata:o,filter:v(g({},m.filter),{categoryID:o.filter.categoryID})})),e.loadList(t.filter)},error:o=>{console.error(o)}}))),A("res")))};return e}),se({onInit:t=>{t.loadLoader({})}}));var jt=()=>({height:"calc(100vh - 70px)"}),Nt=()=>({height:"calc(100vh - 100px)"}),qt=t=>["/pages/journal/journal-entry/",t],Ht=t=>({"ng-invalid ng-dirty":t}),Yt=()=>({scrollHeight:"250px"});function Wt(t,p){if(t&1){let e=L();i(0,"div",11)(1,"a",12),r(2,"Return to Accounts"),n(),i(3,"p-button",13),w("onClick",function(){y(e);let o=d();return b(o.onExport())}),n()()}}function zt(t,p){if(t&1&&(i(0,"div",11)(1,"span",16)(2,"h3",17),r(3),n()(),i(4,"span",16)(5,"h3",17),r(6),n()()()),t&2){let e=d().$implicit;l(3),u(e.name),l(3),D(" (",e.chartOfAccountCode,") ")}}function Ut(t,p){t&1&&(i(0,"tr")(1,"th",18),r(2,"Outlet"),n(),i(3,"th",18),r(4,"No."),n(),i(5,"th",18),r(6,"Date"),n(),i(7,"th",18),r(8,"Name"),n(),i(9,"th",18),r(10,"Description"),n(),i(11,"th",19),r(12,"Debit"),n(),i(13,"th",20),r(14,"Credit"),n(),i(15,"th",20),r(16,"Balance"),n()())}function Kt(t,p){if(t&1&&(i(0,"td",25),r(1,"Starting Balance"),n(),i(2,"td",26),r(3),x(4,"number"),n()),t&2){let e=d(2).$implicit;l(3),D(" ",S(4,1,e.startBalance)," ")}}function $t(t,p){if(t&1&&(i(0,"tr"),C(1,Kt,5,3),n(),i(2,"tr")(3,"td",21),r(4),n(),i(5,"td",21)(6,"a",22),r(7),n()(),i(8,"td",21),r(9),x(10,"date"),n(),i(11,"td",21)(12,"a",23),r(13),n()(),E(14,"td"),i(15,"td",24),r(16),x(17,"number"),n(),i(18,"td",24),r(19),x(20,"number"),n(),i(21,"td",24),r(22),x(23,"number"),n()()),t&2){let e=p.$implicit,a=p.rowIndex,o=d(4);l(),O(a===0&&o.store.items().data.length>1?1:-1),l(3),u(e.outletName),l(2),c("routerLink",F(19,qt,e.id)),l(),u(e.number),l(2),u(Ze(10,10,e.date,"dd MMM yyyy")),l(3),c("href",o.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,$e),l(),u(e.contactName),l(3),D(" ",S(17,13,e.debitAmount)," "),l(3),D(" ",S(20,15,e.creditAmount)," "),l(3),u(S(23,17,e.balance))}}function Jt(t,p){if(t&1&&(i(0,"tr"),E(1,"td",27),i(2,"td",28),r(3,"Total"),n(),i(4,"td",28),r(5),x(6,"number"),n(),i(7,"td",28),r(8),x(9,"number"),n(),E(10,"td"),n()),t&2){let e=d().$index,a=d(3);l(5),D(" ",S(6,2,a.store.items().data[e].debitTotal)," "),l(3),D(" ",S(9,4,a.store.items().data[e].creditTotal)," ")}}function Qt(t,p){t&1&&(i(0,"tr")(1,"td",29)(2,"span"),r(3,"No records found."),n()()())}function Xt(t,p){if(t&1&&(i(0,"p-table",15),C(1,zt,7,2,"ng-template",null,3,s)(3,Ut,17,0,"ng-template",null,4,s)(5,$t,24,21,"ng-template",null,5,s)(7,Jt,11,6,"ng-template",null,6,s)(9,Qt,4,0,"ng-template",null,7,s),n()),t&2){let e=p.$implicit;c("value",e.data)("scrollable",!0)}}function Zt(t,p){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel"),Qe(2,Xt,11,2,"p-table",15,Je),n()()),t&2){let e=d(2);N(I(4,jt)),l(),N(I(5,Nt)),l(),Xe(e.store.items().data)}}function ei(t,p){if(t&1&&C(0,Zt,4,6,"p-panel",14),t&2){let e=d();c("ngIf",e.store.items()&&e.store.items().data.length)}}function ti(t,p){if(t&1&&(i(0,"div",11)(1,"div",16)(2,"span",45),r(3),n()(),i(4,"div")(5,"span"),r(6,"-"),n()(),i(7,"div",16)(8,"span",46),r(9),n()()()),t&2){let e=p.$implicit;l(3),D("(",e.code,")"),l(6),u(e.name)}}function ii(t,p){if(t&1&&(i(0,"div",11)(1,"div",16)(2,"span",45),r(3),n()(),i(4,"div")(5,"span"),r(6,"-"),n()(),i(7,"div",16)(8,"span",46),r(9),n()()()),t&2){let e=p.$implicit;l(3),D("(",e.code,")"),l(6),u(e.name)}}function ni(t,p){if(t&1&&(i(0,"div",47)(1,"div"),r(2),n()()),t&2){let e=p.$implicit;l(2),u(e.value)}}function oi(t,p){if(t&1){let e=L();i(0,"div",31)(1,"label",32),r(2,"Customer"),n(),i(3,"p-autocomplete",48),w("completeMethod",function(o){y(e);let m=d(2);return b(m.searchCustomer(o))}),n()()}if(t&2){let e=d(2);l(3),c("suggestions",e.customerSuggestions())}}function ri(t,p){if(t&1){let e=L();i(0,"div",31)(1,"label",32),r(2,"Supplier"),n(),i(3,"p-autocomplete",48),w("completeMethod",function(o){y(e);let m=d(2);return b(m.searchSupplier(o))}),n()()}if(t&2){let e=d(2);l(3),c("suggestions",e.supplierSuggestions())}}function ai(t,p){if(t&1){let e=L();i(0,"form",30)(1,"div",31)(2,"label",32),r(3,"Accounts"),n(),i(4,"p-multiselect",33),w("onChange",function(o){y(e);let m=d();return b(m.onAccountChange(o))}),C(5,ti,10,2,"ng-template",null,8,s)(7,ii,10,2,"ng-template",null,9,s),n()(),i(9,"div",31)(10,"label",32),r(11,"From"),n(),E(12,"p-datepicker",34),n(),i(13,"div",31)(14,"label",32),r(15,"To"),n(),E(16,"p-datepicker",35),n(),i(17,"div",31)(18,"label",32),r(19,"Outlets"),n(),i(20,"p-multiselect",36),C(21,ni,3,1,"ng-template",null,9,s),n()(),i(23,"div",31)(24,"label",32),r(25,"Category"),n(),i(26,"p-treeselect",37),w("onFocus",function(){y(e);let o=d();return b(o.onCategoryFocus())}),n()(),i(27,"div",31)(28,"label",38),r(29,"Contact Type"),n(),i(30,"div",39)(31,"div",40),E(32,"p-radiobutton",41),i(33,"label",42),r(34,"Customer"),n()(),i(35,"div",40),E(36,"p-radiobutton",43),i(37,"label",44),r(38,"Supplier"),n()()()(),C(39,oi,4,1,"div",31)(40,ri,4,1,"div",31),n()}if(t&2){let e=d();c("formGroup",e.generalLedgerFilterForm),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("maxlength",5)("options",e.store.metadata().options.accounts)("ngClass",F(20,Ht,e.generalLedgerFilterForm.get("listAccountID").invalid&&e.generalLedgerFilterForm.get("listAccountID").touched||e.generalLedgerFilterForm.get("listAccountID").dirty)),l(8),c("iconDisplay","input")("showIcon",!0),l(4),c("iconDisplay","input")("showIcon",!0),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets),l(6),c("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",I(22,Yt))("options",e.categoriesOptions()),l(6),c("value",0),l(4),c("value",1),l(3),O(e.generalLedgerFilterForm.get("contactType").value?40:39)}}var Rt=function(t){return t[t.Customer=0]="Customer",t[t.Supplier=1]="Supplier",t}(Rt||{}),Tt=(()=>{class t{constructor(){this.dialogFilterVisible=T(!1),this.reportService=h(B),this.coaService=h(ft),this.authService=h(Fe),this.store=h(Me),this.categoriesOptions=T([]),this.customerSuggestions=T([]),this.supplierSuggestions=T([]),this.route=h(ot),this.dayjsService=h(ye),this.initDialogVisible=T(!0),this.fb=h(we),this.toastr=h(rt)}ngOnInit(){this.generateFilterForm(),this.route.queryParamMap.pipe(We(e=>e.get("id")),k(e=>{e&&(this.initDialogVisible.update(a=>!a),this.generalLedgerFilterForm.patchValue({listAccountID:[e]}),this.store.updateFilter(v(g({},this.store.filter()),{listAccountID:[e]})))})).subscribe(),this.clearContactValueOnContactTypeChange()}clearContactValueOnContactTypeChange(){this.generalLedgerFilterForm.get("contactType")?.valueChanges.subscribe(()=>this.generalLedgerFilterForm.get("ContactID")?.setValue(""))}onAccountChange(e){console.log("Account Change Event:",e),Array.isArray(e.value)&&e.value.length>5&&this.toastr.warning("Please select at least 5 accounts for the general ledger report.","Warning")}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(A("getCachedCategoriesOptions"),k(e=>this.categoriesOptions.set(e))).subscribe()}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({listAccountID:new G([],[lt.required]),categoryID:new G(null),OutletID:new G([]),ContactID:new G(""),from:new G(null),to:new G(null),contactType:[Rt.Customer]})}onFilterEvent(e){console.log(e),this.dialogFilterVisible.update(a=>!a)}onFilterOKEvent(){let f=this.generalLedgerFilterForm.value,{from:e,to:a}=f,o=Ve(f,["from","to"]);if(this.generalLedgerFilterForm.invalid){this.generalLedgerFilterForm.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let m={categoryID:o.categoryID?.key??null,ContactID:o.ContactID.length?o.ContactID:null,OutletID:o.OutletID.length?o.OutletID:null,listAccountID:o.listAccountID,from:this.dayjsService.from(e)?this.dayjsService.from(e).format():null,to:this.dayjsService.from(a)?this.dayjsService.from(a).format():null};this.dialogFilterVisible.update(_=>!_),this.store.updateFilter(m),this.dialogFilterVisible.set(!1)}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(k(a=>this.customerSuggestions.set(a))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(k(a=>this.supplierSuggestions.set(a))).subscribe()}onExport(){let f=this.generalLedgerFilterForm.value,{from:e,to:a}=f,o=Ve(f,["from","to"]),m={categoryID:o.categoryID?.key??null,ContactID:o.ContactID.length?o.ContactID:null,OutletID:o.OutletID.length?o.OutletID:null,listAccountID:o.listAccountID,from:this.dayjsService.from(e)?this.dayjsService.from(e).format():null,to:this.dayjsService.from(a)?this.dayjsService.from(a).format():null};this.reportService.exportGeneralLedger(m).pipe(A("exportGeneralLedger"),k(_=>{St(_,`general-ledger-${this.dayjsService.now.format("D-MM-YYYY")}.${_.type.split("/")[1]}`,_.type)})).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-general-ledger"]],features:[U([Me])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["caption",""],["header",""],["body",""],["footer",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined","fs-3"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick"],[3,"style",4,"ngIf"],["scrollHeight","calc(100vh - 150px)",3,"value","scrollable"],[1,""],[1,"fs-5","fw-semibold"],[2,"width","10%"],[1,"text-end",2,"width","10%"],[1,"text-end",2,"width","20%"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],[1,"text-end","text-break"],["colspan","7",1,"text-end"],[1,"text-end"],["colspan","4"],[1,"text-end","fw-semibold"],["colspan","8"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","maxlength","options","ngClass"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","display","chip","formControlName","OutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","filter","","filterBy","label","formControlName","categoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],[1,"d-flex","gap-3"],[1,"d-flex","align-items-center","gap-2"],["name","contactType","formControlName","contactType","inputId","customer",3,"value"],["for","customer",1,"m-0"],["name","contactType","formControlName","contactType","inputId","supplier",3,"value"],["for","supplier",1,"m-0"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(a,o){if(a&1){let m=L();i(0,"app-main-panel",10),z("isDialogFilterVisibleChange",function(_){return y(m),q(o.dialogFilterVisible,_)||(o.dialogFilterVisible=_),b(_)})("isInitDialogFilterVisibleChange",function(_){return y(m),q(o.initDialogVisible,_)||(o.initDialogVisible=_),b(_)}),w("filterConfirmed",function(){return y(m),b(o.onFilterOKEvent())}),C(1,Wt,4,0,"ng-template",null,0,s)(3,ei,1,1,"ng-template",null,1,s)(5,ai,41,23,"ng-template",null,2,s),n()}a&2&&(c("pageTitle",o.store.items().pageTitle.length?o.store.items().pageTitle:"General Ledger"),W("isDialogFilterVisible",o.dialogFilterVisible),c("isFilterable",!0),W("isInitDialogFilterVisible",o.initDialogVisible))},dependencies:[_e,$,tt,Ie,K,it,fe,Se,xe,dt,ae,re,Re,he,ge,Le,Te,ne,ee,X,Z,mt,te,ie,ve,Ce,De,oe,ct,xt,ht,gt,pe,le,Q,J,_t,ut],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}"],changeDetection:0})}}return t})();var li={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},Be=me(ue(li),ce(t=>{let p={totalCOGS:R(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((a,o)=>a+(o?.amount??0),0):0}),totalRevenue:R(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((a,o)=>a+(o?.amount??0),0):0}),totalExpense:R(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((a,o)=>a+(o?.amount??0),0):0}),grossProfit:R(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?p.totalRevenue()-p.totalCOGS():0),profitOrLoss:R(()=>p.totalRevenue()-p.totalCOGS()-p.totalExpense()),isDataEmpty:R(()=>Object.keys(t.data()?.data??{}).length===0)};return p}),de(t=>{let p=h(B),e=h(ye),a={updateFilter(o){V(t,m=>v(g({},m),{filter:g(g({},m.filter),o)}))},getLoader:H(P(j(()=>p.getIncomeStatementLoader().pipe(Y({next:o=>{V(t,m=>v(g({},m),{loader:o,filter:v(g({},m.filter),{from:e.from(o.filter.from).format(),to:e.from(o.filter.to).format()})})),a.getIncomeStatement(t.filter)},error:o=>{console.error(o)}}))))),getIncomeStatement:H(P(j(o=>p.getIncomeStatement(o).pipe(Ue(()=>V(t,m=>v(g({},m),{isLoading:!0}))),Y({next:m=>{V(t,f=>v(g({},f),{data:m,isLoading:!1}))},error:m=>{console.error(m)}})))))};return a}),se({onInit:t=>{t.getLoader()}}));var pi=()=>({height:"calc(100vh - 70px)"}),mi=()=>({height:"calc(100vh - 150px)"}),ke=()=>({}),Oe=t=>["/pages/chart-of-account/account/",t],Ge=()=>["/pages/report/general-ledger"],Ae=t=>({id:t});function ci(t,p){if(t&1){let e=L();i(0,"div",8)(1,"p-button",9),w("onClick",function(){y(e);let o=d();return b(o.onExport())}),n()()}}function si(t,p){t&1&&(i(0,"tr")(1,"th",14),r(2,"Code"),n(),i(3,"th",15),r(4,"Name"),n(),i(5,"th",16),r(6,"Total"),n()())}function di(t,p){if(t&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td")(4,"a",17),r(5),n()(),i(6,"td",16)(7,"a",18),r(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),u(e.code),l(2),c("routerLink",F(8,Oe,e.accountID)),l(),u(e.name),l(2),c("routerLink",I(10,Ge))("queryParams",F(11,Ae,e.accountID)),l(),u(S(9,6,e.amount))}}function ui(t,p){if(t&1&&(i(0,"tr"),E(1,"td",19),i(2,"td",20)(3,"div",21)(4,"span",22),r(5,"Total Revenue :"),n(),i(6,"span",23),r(7),x(8,"number"),n()()()()),t&2){let e=d(4);l(7),u(S(8,1,e.store.totalRevenue()))}}function _i(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),r(3,"No revenue records available"),n()()())}function fi(t,p){if(t&1&&(i(0,"h6",12),r(1,"Revenue"),n(),i(2,"p-table",13),C(3,si,7,0,"ng-template",null,3,s)(5,di,10,13,"ng-template",null,4,s)(7,ui,9,3,"ng-template",null,5,s)(9,_i,4,0,"ng-template",null,6,s),n()),t&2){let e,a=d(3);l(2),c("value",(e=a.store.data())==null||e.data==null?null:e.data.revenue)}}function gi(t,p){t&1&&(i(0,"tr")(1,"th",14),r(2,"Code"),n(),i(3,"th",15),r(4,"Name"),n(),i(5,"th",25),r(6,"Total"),n()())}function hi(t,p){if(t&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td")(4,"a",17),r(5),n()(),i(6,"td",16)(7,"a",18),r(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),u(e.code),l(2),c("routerLink",F(8,Oe,e.accountID)),l(),u(e.name),l(2),c("routerLink",I(10,Ge))("queryParams",F(11,Ae,e.AccountID)),l(),u(S(9,6,e.amount))}}function xi(t,p){if(t&1&&(i(0,"tr"),E(1,"td",26),i(2,"td",20)(3,"div",21)(4,"span",22),r(5,"Total COGS :"),n(),i(6,"span",23),r(7),x(8,"number"),n()()()(),i(9,"tr"),E(10,"td",26),i(11,"td",20)(12,"div",21)(13,"span",22),r(14,"Gross Profit :"),n(),i(15,"span",23),r(16),x(17,"number"),n()()()()),t&2){let e=d(4);l(7),u(S(8,2,e.store.totalCOGS())),l(9),u(S(17,4,e.store.grossProfit()))}}function Si(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),r(3,"No COGS records available"),n()()())}function Ci(t,p){if(t&1&&(i(0,"h4",12),r(1,"COGS"),n(),i(2,"p-table",13),C(3,gi,7,0,"ng-template",null,3,s)(5,hi,10,13,"ng-template",null,4,s)(7,xi,18,6,"ng-template",null,5,s)(9,Si,4,0,"ng-template",null,6,s),n()),t&2){let e,a=d(3);l(2),c("value",(e=a.store.data())==null||e.data==null?null:e.data.cogs)}}function vi(t,p){t&1&&(i(0,"tr")(1,"th",14),r(2,"Code"),n(),i(3,"th",15),r(4,"Name"),n(),i(5,"th",16),r(6,"Total"),n()())}function yi(t,p){if(t&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td")(4,"a",17),r(5),n()(),i(6,"td",16)(7,"a",18),r(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),u(e.code),l(2),c("routerLink",F(8,Oe,e.accountID)),l(),u(e.name),l(2),c("routerLink",I(10,Ge))("queryParams",F(11,Ae,e.AccountID)),l(),u(S(9,6,e.amount))}}function bi(t,p){if(t&1&&(i(0,"tr"),E(1,"td",26),i(2,"td",20)(3,"div",21)(4,"span",22),r(5,"Total Expense :"),n(),i(6,"span",23),r(7),x(8,"number"),n()()()(),i(9,"tr"),E(10,"td",26),i(11,"td",20)(12,"div",21)(13,"span",22),r(14,"Profit / Loss :"),n(),i(15,"span",23),r(16),x(17,"number"),n()()()()),t&2){let e=d(4);l(7),u(S(8,2,e.store.totalExpense())),l(9),u(S(17,4,e.store.profitOrLoss()))}}function Ei(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),r(3,"No expense records available"),n()()())}function Ii(t,p){if(t&1&&(i(0,"h4",12),r(1,"Expense"),n(),i(2,"p-table",13),C(3,vi,7,0,"ng-template",null,3,s)(5,yi,10,13,"ng-template",null,4,s)(7,bi,18,6,"ng-template",null,5,s)(9,Ei,4,0,"ng-template",null,6,s),n()),t&2){let e,a=d(3);l(2),c("value",(e=a.store.data())==null||e.data==null?null:e.data.expense)}}function Fi(t,p){if(t&1&&(i(0,"p-scroll-panel")(1,"div",11),C(2,fi,11,1)(3,Ci,11,1)(4,Ii,11,1),n()()),t&2){let e,a,o,m=d(2);N(I(5,mi)),l(2),O(m.Object.keys((e=m.store.data().data)!==null&&e!==void 0?e:I(6,ke)).length>0?2:-1),l(),O(m.Object.keys((a=(a=m.store.data().data)==null?null:a.cogs)!==null&&a!==void 0?a:I(7,ke)).length>0?3:-1),l(),O(m.Object.keys((o=(o=m.store.data().data)==null?null:o.expense)!==null&&o!==void 0?o:I(8,ke)).length>0?4:-1)}}function wi(t,p){if(t&1&&(i(0,"p-panel"),C(1,Fi,5,9,"p-scroll-panel",10),n()),t&2){let e=d();N(I(3,pi)),l(),c("ngIf",e.store.data())}}function Di(t,p){if(t&1){let e=L();i(0,"form",27)(1,"div",28)(2,"label",29),r(3,"Outlet"),n(),E(4,"p-multiselect",30),n(),i(5,"div",28)(6,"label",29),r(7,"Cashier"),n(),i(8,"p-autocomplete",31),w("completeMethod",function(o){y(e);let m=d();return b(m.onCashierSearch(o))})("onSelect",function(o){y(e);let m=d();return b(m.onCashierSelect(o))}),n()(),i(9,"div",28)(10,"label",29),r(11,"From"),n(),E(12,"p-datepicker",32),n(),i(13,"div",28)(14,"label",29),r(15,"To"),n(),E(16,"p-datepicker",33),n()()}if(t&2){let e=d();c("formGroup",e.formFilter),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.loader().options.outlets)("showClear",!0),l(4),c("showClear",!0)("suggestions",e.cashierSuggestions())("showClear",!0)}}var Lt=(()=>{class t{constructor(){this.dayjsService=h(ye),this.store=h(Be),this.fb=h(we),this.reportService=h(B),this.isInitDialogFilterVisible=T(!1),this.dialogFilterVisible=T(!1),this.cashierSuggestions=T([]),this.cashierHashMap=new Map,this.Object=Object,et(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(v(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(A("Cashier Suggestions"),k(a=>this.cashierSuggestions.set(a))).subscribe()}initForm(){let e=this.store.filter();console.log("initForm",this.cashierHashMap.get(e.CashierID)),this.formFilter=this.fb.group({EntityID:this.fb.control(e.EntityID??[]),CashierID:this.fb.control(this.cashierHashMap.get(e.CashierID)??""),Text:this.fb.control(e.Text??""),from:this.fb.control(e.from?this.dayjsService.from(e.from).toDate():null),to:this.fb.control(e.to?this.dayjsService.from(e.to).toDate():null)})}onFilterOK(){let e=this.formFilter.getRawValue(),a=Object.entries(e).reduce((o,[m,f])=>(m==="from"||m==="to"?f instanceof Date&&(o[m]=this.dayjsService.from(f).format()):o[m]=f||null,o),{});this.store.updateFilter(g(g({},this.store.filter()),a)),this.dialogFilterVisible.update(o=>!o),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=v(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(A("Export Profit & Loss"),k(a=>{let o=a.type,m=[a],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:o}));let _=`profit-and-loss.${o.split("/")[1]}`;f.setAttribute("download",_),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-income-statement"]],features:[U([Be])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","isFilterable","pageTitle","isDialogFilterVisible","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick"],[3,"style",4,"ngIf"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold"],[3,"value"],[2,"width","20%"],[2,"width","30%"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2 ",1,"fw-semibold","text-end",2,"width","50%"],[1,"text-end","fw-semibold"],[1,"row"],[1,"col-9"],[1,"col"],["colspan","3",1,""],[1,"text-end",2,"min-width","10%"],["colspan","2",1,"fw-semibold"],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","EntityID","filterBy","value","appendTo","body","display","chip","optionLabel","value","optionValue","key","placeholder","Select an Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["appendTo","body","formControlName","CashierID","optionLabel","Value","optionValue","Key","styleClass","w-100","inputStyleClass","w-100","field","Value","placeholder","Search a cashier",3,"completeMethod","onSelect","showClear","suggestions"],["formControlName","from","styleClass","w-100","appendTo","body"],["formControlName","to","styleClass","w-100","appendTo","body"]],template:function(a,o){if(a&1){let m=L();i(0,"app-main-panel",7),z("isDialogFilterVisibleChange",function(_){return y(m),q(o.dialogFilterVisible,_)||(o.dialogFilterVisible=_),b(_)})("isInitDialogFilterVisibleChange",function(_){return y(m),q(o.isInitDialogFilterVisible,_)||(o.isInitDialogFilterVisible=_),b(_)}),w("filterConfirmed",function(){return y(m),b(o.onFilterOK())}),C(1,ci,2,0,"ng-template",null,0,s)(3,wi,2,4,"ng-template",null,1,s)(5,Di,17,8,"ng-template",null,2,s),n()}a&2&&(c("isFilterable",!0)("pageTitle",o.store.data().pageTitle),W("isDialogFilterVisible",o.dialogFilterVisible)("isInitDialogFilterVisible",o.isInitDialogFilterVisible))},dependencies:[_e,$,Ie,K,Re,he,ge,ne,ee,X,Z,te,ie,ve,Ce,fe,Se,xe,pe,le,oe,Q,J,Le,Te,ae,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Pe=Ye(Ct());var Ri={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,Pe.default)().format("YYYY-MM-DD"),listOutletParam:[]}},je=me(ue(Ri),ce(t=>({totalAsset:R(()=>t.data().asset.reduce((p,e)=>p+ +e.amount,0)),totalLiability:R(()=>t.data().liability.reduce((p,e)=>p+ +e.counterAmount,0)),totalEquity:R(()=>t.data().equity.reduce((p,e)=>p+ +e.counterAmount,0))})),de(t=>{let p=h(B),e={updateFilter:a=>{V(t,o=>v(g({},o),{filter:a}))},fetchBalanceSheet:H(P(Ee(()=>{let a=t.filter();return Object.entries(a).every(([o,m])=>m!=null&&m!=="")}),j(a=>p.getBalanceSheet(a).pipe(Y({next:o=>{V(t,m=>v(g({},m),{data:o}))},error:o=>{console.error(o)}}))),ze(1))),fetchLoader:H(P(j(()=>p.getBalanceSheetLoader().pipe(Y({next:a=>{V(t,o=>v(g({},o),{metadata:a,filter:{date:(0,Pe.default)(a.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:a=>{console.error(a)}})))))};return e}),se(t=>({onInit:()=>{t.fetchLoader()}})));var Vt=Ye(Ct());var Ti=()=>({height:"calc(100vh - 70px)"}),Li=()=>({height:"calc(100vh - 100px)"}),Ne=t=>["/pages/chart-of-account/account/",t],qe=()=>["/pages/report/general-ledger"],He=t=>({id:t});function Vi(t,p){if(t&1){let e=L();i(0,"div",9)(1,"p-button",10),w("onClick",function(){y(e);let o=d();return b(o.onExport())}),n()()}}function Mi(t,p){t&1&&(i(0,"tr")(1,"th",15),r(2,"Code"),n(),i(3,"th"),r(4,"Asset"),n(),i(5,"th",16),r(6,"Total"),n()())}function Bi(t,p){if(t&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td")(4,"a",17),r(5),n()(),i(6,"td",18)(7,"a",19),r(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),u(e.code),l(2),c("routerLink",F(8,Ne,e.accountID)),l(),u(e.name),l(2),c("routerLink",I(10,qe))("queryParams",F(11,He,e.accountID)),l(),u(S(9,6,e.amount))}}function ki(t,p){if(t&1&&(i(0,"tr")(1,"td",20),r(2,"Total Asset"),n(),i(3,"td",21),r(4),x(5,"number"),n()()),t&2){let e=d(3);l(4),D(" ",S(5,1,e.store.totalAsset())," ")}}function Oi(t,p){t&1&&(i(0,"tr")(1,"td",22)(2,"span"),r(3,"No asset records found."),n()()())}function Gi(t,p){if(t&1&&(i(0,"h4",13),r(1,"Asset"),n(),i(2,"p-table",14),C(3,Mi,7,0,"ng-template",null,3,s)(5,Bi,10,13,"ng-template",null,4,s)(7,ki,6,3,"ng-template",null,5,s)(9,Oi,4,0,"ng-template",null,6,s),n()),t&2){let e=d(2);l(2),c("value",e.store.data().asset)}}function Ai(t,p){t&1&&(i(0,"tr")(1,"th",15),r(2,"Code"),n(),i(3,"th"),r(4,"Liability"),n(),i(5,"th",16),r(6,"Total"),n()())}function Pi(t,p){if(t&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td")(4,"a",24),r(5),n()(),i(6,"td",18)(7,"a",19),r(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),u(e.code),l(2),c("routerLink",F(8,Ne,e.accountID)),l(),u(e.name),l(2),c("routerLink",I(10,qe))("queryParams",F(11,He,e.accountID)),l(),u(S(9,6,e.counterAmount))}}function ji(t,p){if(t&1&&(i(0,"tr")(1,"td",20),r(2," Total Liability "),n(),i(3,"td",21),r(4),x(5,"number"),n()()),t&2){let e=d(3);l(4),D(" ",S(5,1,e.store.totalLiability())," ")}}function Ni(t,p){t&1&&(i(0,"tr")(1,"td",22)(2,"span"),r(3,"No liability records found."),n()()())}function qi(t,p){if(t&1&&(i(0,"h4",23),r(1,"Liability"),n(),i(2,"p-table",14),C(3,Ai,7,0,"ng-template",null,3,s)(5,Pi,10,13,"ng-template",null,4,s)(7,ji,6,3,"ng-template",null,5,s)(9,Ni,4,0,"ng-template",null,6,s),n()),t&2){let e=d(2);l(2),c("value",e.store.data().liability)}}function Hi(t,p){t&1&&(i(0,"tr")(1,"th",15),r(2,"Code"),n(),i(3,"th"),r(4,"Equity"),n(),i(5,"th",16),r(6,"Total"),n()())}function Yi(t,p){if(t&1&&(i(0,"tr")(1,"td"),r(2),n(),i(3,"td")(4,"a",17),r(5),n()(),i(6,"td",18)(7,"a",19),r(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),u(e.code),l(2),c("routerLink",F(8,Ne,e.accountID)),l(),u(e.name),l(2),c("routerLink",I(10,qe))("queryParams",F(11,He,e.accountID)),l(),u(S(9,6,e.counterAmount))}}function Wi(t,p){if(t&1&&(i(0,"tr")(1,"td",20),r(2,"Total Equity"),n(),i(3,"td",21),r(4),x(5,"number"),n()(),i(6,"tr")(7,"td",20),r(8," Total Liability + Equity "),n(),i(9,"td",21),r(10),x(11,"number"),n()()),t&2){let e=d(3);l(4),D(" ",S(5,2,e.store.totalEquity())," "),l(6),D(" ",S(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function zi(t,p){t&1&&(i(0,"tr")(1,"td",22)(2,"span"),r(3,"No equity records found."),n()()())}function Ui(t,p){if(t&1&&(i(0,"h4",23),r(1,"Equity"),n(),i(2,"p-table",14),C(3,Hi,7,0,"ng-template",null,3,s)(5,Yi,10,13,"ng-template",null,4,s),r(7," <"),C(8,Wi,12,6,"ng-template",null,5,s)(10,zi,4,0,"ng-template",null,6,s),n()),t&2){let e=d(2);l(2),c("value",e.store.data().equity)}}function Ki(t,p){if(t&1&&(i(0,"p-panel",11)(1,"p-scroll-panel")(2,"div",12),C(3,Gi,11,1)(4,qi,11,1)(5,Ui,12,1),n()()()),t&2){let e=d();N(I(8,Ti)),c("showHeader",!1),l(),N(I(9,Li)),l(2),O(e.Object.keys(e.store.data().asset).length>0?3:-1),l(),O(e.Object.keys(e.store.data().liability).length>0?4:-1),l(),O(e.Object.keys(e.store.data().equity).length>0?5:-1)}}function $i(t,p){if(t&1&&(i(0,"div",30)(1,"div"),r(2),n()()),t&2){let e=p.$implicit;l(2),u(e.value)}}function Ji(t,p){if(t&1&&(i(0,"form",25)(1,"div",26)(2,"label",27),r(3,"Outlet"),n(),i(4,"p-multiselect",28),C(5,$i,3,1,"ng-template",null,7,s),n()(),i(7,"div",26)(8,"label",27),r(9,"From"),n(),E(10,"p-datepicker",29),n()()),t&2){let e=d();c("formGroup",e.filterForm),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets)("showClear",!0),l(6),c("iconDisplay","input")("showIcon",!0)}}var Mt=(()=>{class t{constructor(){this.store=h(je),this.ReportServiceStore=h(B),this.dialogFilterVisible=T(!1),this.isInitDialogFilterVisible=T(!1),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new pt({date:new G(new Date),outletID:new G([])})}onFilterOKEvent(){let{date:e,outletID:a}=this.filterForm.value;this.store.updateFilter({date:(0,Vt.default)(e).format("YYYY-MM-DD"),listOutletParam:a}),this.dialogFilterVisible.update(o=>!o)}onExport(){let e=v(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(A("Export Balance Sheet"),k(a=>{let o=a.type,m=[a],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:o}));let _=`balance-sheet.${o.split("/")[1]}`;f.setAttribute("download",_),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-balance-sheet"]],features:[U([je])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export",3,"onClick"],[3,"showHeader"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold","mt-3"],[3,"value"],[2,"width","20%"],[1,"text-end",2,"width","5%"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2",1,"fw-semibold","text-end"],[1,"text-end","fw-semibold"],["colspan","3",1,""],[1,"fs-5","fw-semibold"],["target","_blank",1,"link","link-primary","d-flex","align-items-center",3,"routerLink"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","display","chip","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"flex","items-center","gap-2"]],template:function(a,o){if(a&1){let m=L();i(0,"app-main-panel",8),z("isDialogFilterVisibleChange",function(_){return y(m),q(o.dialogFilterVisible,_)||(o.dialogFilterVisible=_),b(_)})("isInitDialogFilterVisibleChange",function(_){return y(m),q(o.isInitDialogFilterVisible,_)||(o.isInitDialogFilterVisible=_),b(_)}),w("filterConfirmed",function(){return y(m),b(o.onFilterOKEvent())}),C(1,Vi,2,0,"ng-template",null,0,s)(3,Ki,6,10,"ng-template",null,1,s)(5,Ji,11,7,"ng-template",null,2,s),n()}a&2&&(c("pageTitle",o.store.data().pageTitle)("isFilterable",!0),W("isDialogFilterVisible",o.dialogFilterVisible)("isInitDialogFilterVisible",o.isInitDialogFilterVisible))},dependencies:[_e,$,K,Se,xe,fe,ae,re,ne,ee,X,Z,te,ie,ve,Ce,he,ge,De,oe,pe,le,Q,J],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Bt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(a,o){a&1&&(i(0,"p"),r(1,"report-comparative-balance works!"),n(),r(2,`
|
|
2
|
+
,
|
|
3
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(a,o){a&1&&(i(0,"p"),r(1,"report-cash-flow works!"),n(),r(2,`
|
|
4
|
+
,
|
|
5
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ot=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(a,o){a&1&&(i(0,"p"),r(1,"report-trial-balance works!"),n(),r(2,`
|
|
6
|
+
,
|
|
7
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var sr=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Tt},{path:"profit-loss",component:Lt},{path:"balance-sheet",component:Mt},{path:"comparative-balance",component:Bt},{path:"trial-balance",component:Ot},{path:"cash-flow",component:kt}]}];export{sr as REPORTS_ROUTES};
|