dealposbooks 1.9.6-p5 → 1.9.7

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.
Files changed (134) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/assets/scss/style.scss +30 -0
  3. package/{chunk-RBDJZRHY.js → chunk-27P5HOS3.js} +1 -1
  4. package/chunk-2HOHR6C5.js +1 -0
  5. package/{chunk-CSMMP7XG.js → chunk-35ER6BC7.js} +1 -1
  6. package/{chunk-BNI5KUDE.js → chunk-3GHEXAAZ.js} +3 -3
  7. package/chunk-3HGVSC6D.js +7 -0
  8. package/{chunk-TC43COAE.js → chunk-3RM5CDGW.js} +1 -1
  9. package/{chunk-G6FJQBZZ.js → chunk-3ZFQSQVU.js} +1 -1
  10. package/chunk-45VFBAOS.js +1 -0
  11. package/{chunk-46TNY5N4.js → chunk-4V5YFD3N.js} +1 -1
  12. package/chunk-6332DY2I.js +82 -0
  13. package/chunk-6EL7TGVK.js +1 -0
  14. package/{chunk-OVCTOPAO.js → chunk-6PS3NJ62.js} +1 -1
  15. package/{chunk-J2SK4PGN.js → chunk-77BBQI2T.js} +1 -1
  16. package/{chunk-PGECEXRR.js → chunk-7ET5CSOO.js} +1 -1
  17. package/{chunk-6ZZARVQO.js → chunk-7IPVVF6Y.js} +1 -1
  18. package/chunk-7JGGV5FX.js +1 -0
  19. package/chunk-7TOJMYLE.js +1 -0
  20. package/chunk-AQRLC7NB.js +1 -0
  21. package/chunk-AZWJMXL6.js +449 -0
  22. package/chunk-BDJHC5O6.js +2 -0
  23. package/{chunk-IIB2DZLA.js → chunk-BPFL7VRT.js} +1 -1
  24. package/{chunk-EXVUABTO.js → chunk-BX74ZLQG.js} +1 -1
  25. package/chunk-C32DCO2H.js +1 -0
  26. package/chunk-C3N6HRIE.js +1 -0
  27. package/{chunk-TFV5QZKR.js → chunk-CEZEYAWZ.js} +1 -1
  28. package/chunk-CGUMUBB7.js +1 -0
  29. package/chunk-CIG34QJJ.js +129 -0
  30. package/{chunk-JDW35ZB5.js → chunk-CNLYDNON.js} +1 -1
  31. package/chunk-CUDRSVFH.js +1 -0
  32. package/{chunk-JP3F2QND.js → chunk-CZWWMQFD.js} +1 -1
  33. package/{chunk-BYD3JK4R.js → chunk-DAQCANBV.js} +1 -1
  34. package/{chunk-OZACNHDP.js → chunk-DJAICZNR.js} +1 -1
  35. package/chunk-DXIZC3FM.js +87 -0
  36. package/chunk-EJCLRSB2.js +1 -0
  37. package/chunk-EVVQ2SFY.js +1 -0
  38. package/{chunk-OEOAUJY5.js → chunk-FDZFCC3N.js} +1 -1
  39. package/{chunk-4S33ZRKF.js → chunk-FTI2QPWV.js} +1 -1
  40. package/{chunk-ASK2IVMC.js → chunk-H6BPUKCW.js} +1 -1
  41. package/{chunk-TK3G2BVM.js → chunk-HFUW7PYZ.js} +1 -1
  42. package/chunk-I3BTHUK3.js +160 -0
  43. package/chunk-IY6KCAQ4.js +1 -0
  44. package/{chunk-JMLETF7Y.js → chunk-J6H5UCJR.js} +1 -1
  45. package/chunk-JL2CIZE7.js +1 -0
  46. package/{chunk-J77A3DFB.js → chunk-JO3SI6HU.js} +1 -1
  47. package/{chunk-32BR7AQL.js → chunk-JZTK7BS7.js} +1 -1
  48. package/{chunk-P6CJ2ONT.js → chunk-K4ALA724.js} +1 -1
  49. package/{chunk-NF3TF3LT.js → chunk-KANHSSLO.js} +1 -1
  50. package/chunk-L5AUQL23.js +1 -0
  51. package/chunk-L66QS3IX.js +81 -0
  52. package/{chunk-YOEPO6LK.js → chunk-LMI4DLB5.js} +1 -1
  53. package/{chunk-GJXWL5XV.js → chunk-LWYZZP3I.js} +1 -1
  54. package/chunk-MF7TC5KB.js +1 -0
  55. package/chunk-NC6RBSOA.js +1 -0
  56. package/{chunk-3L7IWFXM.js → chunk-NR3EHEG3.js} +1 -1
  57. package/chunk-NXCHPBCH.js +1 -0
  58. package/chunk-OXGCSUUS.js +2 -0
  59. package/{chunk-LTZA6IIO.js → chunk-PDNXU4MC.js} +1 -1
  60. package/chunk-QVQOBBLJ.js +1 -0
  61. package/chunk-R6NK3ROE.js +1 -0
  62. package/{chunk-54OPMMIM.js → chunk-R6XNFCQM.js} +1 -1
  63. package/{chunk-HRQJ5DXP.js → chunk-RLR2HFSC.js} +1 -1
  64. package/{chunk-HFFH2WIX.js → chunk-RNOSD5RO.js} +1 -1
  65. package/chunk-RQ52IUQY.js +130 -0
  66. package/{chunk-DOM7WYRM.js → chunk-RSGEQTNJ.js} +1 -1
  67. package/{chunk-35CWG2OK.js → chunk-RYHNURUZ.js} +2 -2
  68. package/{chunk-3DN7TZCI.js → chunk-SH4ALZVS.js} +1 -1
  69. package/{chunk-3HW557B7.js → chunk-TDMJ2M6W.js} +1 -1
  70. package/chunk-TE7Y3LKA.js +1 -0
  71. package/{chunk-AKMHO3LC.js → chunk-TIX3GAPF.js} +1 -1
  72. package/{chunk-XKEV5AED.js → chunk-TLLNQB5C.js} +1 -1
  73. package/{chunk-C5GEP4MM.js → chunk-U75O34AW.js} +1 -1
  74. package/{chunk-I3HFXOYS.js → chunk-UNWDCLFZ.js} +1 -1
  75. package/chunk-UWWFSGE7.js +1 -0
  76. package/{chunk-6TA77CRR.js → chunk-V4IY7RIP.js} +1 -1
  77. package/chunk-VDBXI7BY.js +1 -0
  78. package/{chunk-RT5PUZ5F.js → chunk-VJLO7GNT.js} +1 -1
  79. package/chunk-VP6GWJ6D.js +1 -0
  80. package/{chunk-LKZL77YR.js → chunk-W4KTL6Y6.js} +1 -1
  81. package/{chunk-ZWHB7NI7.js → chunk-W6LBFCQQ.js} +1 -1
  82. package/{chunk-YVEUYFCE.js → chunk-WCXWWANV.js} +5 -5
  83. package/chunk-WVPOYMTO.js +1 -0
  84. package/{chunk-LR2DJRRL.js → chunk-WWWY3VE7.js} +1 -1
  85. package/{chunk-7WXXPCRV.js → chunk-XYU65DNE.js} +1 -1
  86. package/{chunk-34XRAZFC.js → chunk-Y45TAHWD.js} +1 -1
  87. package/chunk-YGADGNDB.js +1 -0
  88. package/chunk-YJ3CWPO4.js +1 -0
  89. package/{chunk-3WB76KQC.js → chunk-YVGWGEPX.js} +1 -1
  90. package/chunk-YXXRJV2N.js +1 -0
  91. package/{chunk-TQZNJ5WF.js → chunk-Z3SHAW6W.js} +1 -1
  92. package/{chunk-AOSPVPK7.js → chunk-ZHU3HOWQ.js} +1 -1
  93. package/chunk-ZWA7RUAY.js +1 -0
  94. package/index.html +2 -2
  95. package/{main-U5PC2W2C.js → main-VZEZO7AT.js} +1 -1
  96. package/package.json +1 -1
  97. package/{styles-GTUKYMN7.css → styles-XXVTW56A.css} +1 -1
  98. package/chunk-27SWEVDU.js +0 -1
  99. package/chunk-2DV653RD.js +0 -1
  100. package/chunk-2OECREUZ.js +0 -1
  101. package/chunk-35KDUCM3.js +0 -1
  102. package/chunk-3G3QSUWH.js +0 -1
  103. package/chunk-43WCLYRX.js +0 -1
  104. package/chunk-4FGQ5T64.js +0 -2
  105. package/chunk-4KXSM3HP.js +0 -1
  106. package/chunk-4QKRWFW4.js +0 -1
  107. package/chunk-6HQX2SM2.js +0 -1
  108. package/chunk-B7JILYJO.js +0 -1
  109. package/chunk-BX3CRF44.js +0 -1
  110. package/chunk-C4LZX33Q.js +0 -449
  111. package/chunk-C7UZ6ZYF.js +0 -1
  112. package/chunk-CTCQB63H.js +0 -1
  113. package/chunk-DNK2GUDB.js +0 -1
  114. package/chunk-ELWFWCNU.js +0 -246
  115. package/chunk-GNP7WGSH.js +0 -1
  116. package/chunk-GTGRV7IH.js +0 -1
  117. package/chunk-HRPP75N7.js +0 -1
  118. package/chunk-JYNZPVLW.js +0 -1
  119. package/chunk-K6753MGR.js +0 -7
  120. package/chunk-LD4G6ND6.js +0 -130
  121. package/chunk-M7MFX6BW.js +0 -1
  122. package/chunk-MCDQ2TIS.js +0 -1
  123. package/chunk-MJVSTWYY.js +0 -1
  124. package/chunk-N2RYBZK7.js +0 -1
  125. package/chunk-N6JCA3CN.js +0 -2
  126. package/chunk-OEJBOFI5.js +0 -1
  127. package/chunk-QPKNYNLC.js +0 -210
  128. package/chunk-UEOO2LYA.js +0 -82
  129. package/chunk-WEWEITR7.js +0 -1
  130. package/chunk-WGZN6AN2.js +0 -1
  131. package/chunk-WZO2ZLBL.js +0 -1
  132. package/chunk-X34Y3TVX.js +0 -1
  133. package/chunk-XFSZDZPJ.js +0 -1
  134. package/chunk-XZGFG6E3.js +0 -1
@@ -0,0 +1,7 @@
1
+ import{a as Te,b as Le}from"./chunk-TIX3GAPF.js";import{a as Ct,b as ye}from"./chunk-LWYZZP3I.js";import"./chunk-Y45TAHWD.js";import{a as Fe}from"./chunk-K4ALA724.js";import{a as St}from"./chunk-NRULEUE7.js";import{b as ht,c as xt}from"./chunk-KANHSSLO.js";import{a as Se,b as Ce}from"./chunk-ZHU3HOWQ.js";import"./chunk-Z3SHAW6W.js";import{b as gt}from"./chunk-VJLO7GNT.js";import"./chunk-DJAICZNR.js";import{a as q,b as H}from"./chunk-CZWWMQFD.js";import{a as ut,b as _t,d as he,k as xe}from"./chunk-CEZEYAWZ.js";import{a as fe,b as ge}from"./chunk-YVGWGEPX.js";import"./chunk-PDNXU4MC.js";import{a as ft}from"./chunk-YJ3CWPO4.js";import{a as be}from"./chunk-C3N6HRIE.js";import{a as ne,b as De}from"./chunk-W4KTL6Y6.js";import"./chunk-RNOSD5RO.js";import{b as Re}from"./chunk-HFUW7PYZ.js";import"./chunk-WWWY3VE7.js";import"./chunk-35ER6BC7.js";import"./chunk-V4IY7RIP.js";import"./chunk-J6H5UCJR.js";import"./chunk-U75O34AW.js";import{e as ct}from"./chunk-3RM5CDGW.js";import{b as _e}from"./chunk-7IPVVF6Y.js";import{f as dt,h as ue}from"./chunk-RYHNURUZ.js";import"./chunk-BX74ZLQG.js";import{a as ae,b as le}from"./chunk-CNLYDNON.js";import{a as V,b as pe,c as me,d as ce,e as se,f as de,g as st}from"./chunk-FTI2QPWV.js";import"./chunk-BDJHC5O6.js";import{w as oe,x as re}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import{e as Q,f as X,g as pt,i as G,k as Z,l as ee,o as te,t as mt,v as we,y as ie}from"./chunk-3GHEXAAZ.js";import{a as lt}from"./chunk-R6NK3ROE.js";import{a as at}from"./chunk-TDMJ2M6W.js";import{C as rt,F as $,M as J,f as Ie,k as nt,l as z,m as U,s as ot}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{Ac as F,Cb as C,D as Ee,Ga as L,Jc as x,Kb as c,Kc as S,L as $e,Lc as tt,Mc as s,Nb as j,Pb as O,Qb as Me,Sb as ke,Tb as Be,Ub as n,V as Je,Vb as i,W as Qe,Wb as I,X as P,Yc as T,Z as M,Zc as it,_b as D,ba as Xe,c as A,cb as Ze,dc as w,ec as d,gb as l,ha as h,hc as et,pa as v,qa as b,qc as a,rc as _,s as Ue,sc as R,vc as Y,wb as k,wc as N,xc as W,yc as K,zc as E}from"./chunk-WCXWWANV.js";import{a as g,b as y,c as Ve,e as ze}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{constructor(){this.httpService=h(lt),this.authService=h(Fe)}fetchGeneralLedgerLoader(){return this.httpService.get(void 0,"api/GeneralLedgerLoader/GetFilter")}fetchGeneralLedgerReport(e){return this.httpService.post(void 0,"api/GeneralLedger/Get",e)}exportGeneralLedger(e){let o={responseType:"blob"};return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,o)}getCustomerSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:o})}getSupplierSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:o})}getCashierSuggestions(e){let o={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:o})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,o={}){let r=new ot({fromObject:Object.fromEntries(Object.entries(e).map(([f,u])=>[f,String(u)]))}),m=g({params:r},o);return this.httpService.get(void 0,"/api/BalanceSheet",m)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,o={}){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e),o)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ot={metadata:{filter:{listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:0,contactID:""},options:{accounts:[],outlets:[],contactTypeOptions:[]},roles:{isInEmptyOutletRole:!1}},items:{data:[],pageTitle:""},filter:{listAccountID:[],from:null,to:null,listOutletID:[],listCategoryID:[],contactType:1,contactID:null}},Oe=pe(de(Ot),st("General Ledger Store"),me(t=>({debitTotal:T(()=>t.items.data().reduce((p,e)=>p+e.data.reduce((o,r)=>o+(r.debitAmount||0),0),0)),creditTotal:T(()=>t.items.data().reduce((p,e)=>p+e.data.reduce((o,r)=>o+(r.creditAmount||0),0),0))})),se(t=>{let p=h(B),e={updateFilter:o=>{V(t,r=>y(g({},r),{filter:o}))},loadList:q(A(Ee(o=>o.listAccountID.length>0),P(o=>p.fetchGeneralLedgerReport(o).pipe(H({next:r=>{V(t,m=>y(g({},m),{items:r}))},error:r=>{console.error(r)}}))))),loadLoader:q(A(P(()=>p.fetchGeneralLedgerLoader().pipe(H({next:o=>{V(t,r=>y(g({},r),{metadata:o,filter:y(g({},r.filter),{listCategoryID:o.filter.listCategoryID})})),e.loadList(t.filter)},error:o=>{console.error(o)}})))))};return e}),ce({onInit:t=>{t.loadLoader()}}));var Pt=()=>({height:"calc(100vh - 70px)"}),jt=()=>({height:"calc(100vh - 100px)"}),Nt=t=>["/pages/journal/journal-entry/",t],qt=()=>({scrollHeight:"250px"});function Ht(t,p){if(t&1){let e=D();n(0,"div",11)(1,"a",12),a(2,"Return to Accounts"),i(),n(3,"p-button",13),w("onClick",function(){v(e);let r=d();return b(r.onExport())}),i()()}}function Yt(t,p){if(t&1&&(n(0,"div",11)(1,"span",16)(2,"h2",17),a(3),i()(),n(4,"span",16)(5,"h2",17),a(6),i()()()),t&2){let e=d().$implicit;l(3),_(e.name),l(3),R(" (",e.chartOfAccountCode,") ")}}function Wt(t,p){t&1&&(n(0,"tr")(1,"th",18),a(2,"Outlet"),i(),n(3,"th",18),a(4,"No."),i(),n(5,"th",18),a(6,"Date"),i(),n(7,"th",18),a(8,"Name"),i(),n(9,"th",18),a(10,"Description"),i(),n(11,"th",19),a(12,"Debit"),i(),n(13,"th",20),a(14,"Credit"),i(),n(15,"th",20),a(16,"Balance"),i()())}function Kt(t,p){if(t&1&&(n(0,"td",25),a(1,"Starting Balance"),i(),n(2,"td",26),a(3),x(4,"number"),i()),t&2){let e=d(2).$implicit;l(3),R(" ",S(4,1,e.startBalance)," ")}}function zt(t,p){if(t&1&&(n(0,"tr"),C(1,Kt,5,3),i(),n(2,"tr")(3,"td",21),a(4),i(),n(5,"td",21)(6,"a",22),a(7),i()(),n(8,"td",21),a(9),x(10,"date"),i(),n(11,"td",21)(12,"a",23),a(13),i()(),I(14,"td"),n(15,"td",24),a(16),x(17,"number"),i(),n(18,"td",24),a(19),x(20,"number"),i(),n(21,"td",24),a(22),x(23,"number"),i()()),t&2){let e=p.$implicit,o=p.rowIndex,r=d(4);l(),O(o===0&&r.store.items().data.length>1?1:-1),l(3),_(e.outletName),l(2),c("routerLink",F(19,Nt,e.id)),l(),_(e.number),l(2),_(tt(10,10,e.date,"dd MMM yyyy")),l(3),c("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,Ze),l(),_(e.contactName),l(3),R(" ",S(17,13,e.debitAmount)," "),l(3),R(" ",S(20,15,e.creditAmount)," "),l(3),_(S(23,17,e.balance))}}function Ut(t,p){if(t&1&&(n(0,"tr"),I(1,"td",27),n(2,"td",28),a(3,"Total"),i(),n(4,"td",28),a(5),x(6,"number"),i(),n(7,"td",28),a(8),x(9,"number"),i(),I(10,"td"),i()),t&2){let e=d().$index,o=d(3);l(5),R(" ",S(6,2,o.store.items().data[e].debitTotal)," "),l(3),R(" ",S(9,4,o.store.items().data[e].creditTotal)," ")}}function $t(t,p){t&1&&(n(0,"tr")(1,"td",29)(2,"span"),a(3,"No records found."),i()()())}function Jt(t,p){if(t&1&&(n(0,"p-table",15),C(1,Yt,7,2,"ng-template",null,3,s)(3,Wt,17,0,"ng-template",null,4,s)(5,zt,24,21,"ng-template",null,5,s)(7,Ut,11,6,"ng-template",null,6,s)(9,$t,4,0,"ng-template",null,7,s),i()),t&2){let e=p.$implicit;c("value",e.data)("scrollable",!0)}}function Qt(t,p){if(t&1&&(n(0,"p-panel")(1,"p-scroll-panel"),ke(2,Jt,11,2,"p-table",15,Me),i()()),t&2){let e=d(2);j(E(4,Pt)),l(),j(E(5,jt)),l(),Be(e.store.items().data)}}function Xt(t,p){if(t&1&&C(0,Qt,4,6,"p-panel",14),t&2){let e=d();c("ngIf",e.store.items()&&e.store.items().data.length)}}function Zt(t,p){if(t&1&&(n(0,"div",11)(1,"div",16)(2,"span",41),a(3),i()(),n(4,"div")(5,"span"),a(6,"-"),i()(),n(7,"div",16)(8,"span",42),a(9),i()()()),t&2){let e=p.$implicit;l(3),R("(",e.code,")"),l(6),_(e.name)}}function ei(t,p){if(t&1&&(n(0,"div",11)(1,"div",16)(2,"span",41),a(3),i()(),n(4,"div")(5,"span"),a(6,"-"),i()(),n(7,"div",16)(8,"span",42),a(9),i()()()),t&2){let e=p.$implicit;l(3),R("(",e.code,")"),l(6),_(e.name)}}function ti(t,p){if(t&1&&(n(0,"div",43)(1,"div"),a(2),i()()),t&2){let e=p.$implicit;l(2),_(e.value)}}function ii(t,p){if(t&1&&(n(0,"div",40),I(1,"p-radiobutton",44),n(2,"label",45),a(3),i()()),t&2){let e=p.$implicit;l(),c("value",e.key)("inputId",e.key),l(),et("for",e.key),l(),_(e.value)}}function ni(t,p){if(t&1){let e=D();n(0,"div",31)(1,"label",32),a(2,"Customer"),i(),n(3,"p-autocomplete",46),w("completeMethod",function(r){v(e);let m=d(2);return b(m.searchCustomer(r))}),i()()}if(t&2){let e=d(2);l(3),c("suggestions",e.customerSuggestions())}}function oi(t,p){if(t&1){let e=D();n(0,"div",31)(1,"label",32),a(2,"Supplier"),i(),n(3,"p-autocomplete",47),w("completeMethod",function(r){v(e);let m=d(2);return b(m.searchSupplier(r))}),i()()}if(t&2){let e=d(2);l(3),c("suggestions",e.supplierSuggestions())}}function ri(t,p){if(t&1){let e=D();n(0,"div",31)(1,"label",32),a(2,"Customer"),i(),n(3,"p-autocomplete",46),w("completeMethod",function(r){v(e);let m=d(2);return b(m.searchCustomer(r))}),i()()}if(t&2){let e=d(2);l(3),c("suggestions",e.customerSuggestions())}}function ai(t,p){if(t&1){let e=D();n(0,"form",30)(1,"div",31)(2,"label",32),a(3,"Accounts"),i(),n(4,"p-multiselect",33),w("onChange",function(r){v(e);let m=d();return b(m.onAccountChange(r))}),C(5,Zt,10,2,"ng-template",null,8,s)(7,ei,10,2,"ng-template",null,9,s),i()(),n(9,"div",31)(10,"label",32),a(11,"From"),i(),I(12,"p-datepicker",34),i(),n(13,"div",31)(14,"label",32),a(15,"To"),i(),I(16,"p-datepicker",35),i(),n(17,"div",31)(18,"label",32),a(19,"Outlets"),i(),n(20,"p-multiselect",36),C(21,ti,3,1,"ng-template",null,9,s),i()(),n(23,"div",31)(24,"label",32),a(25,"Category"),i(),n(26,"p-treeselect",37),w("onFocus",function(){v(e);let r=d();return b(r.onCategoryFocus())}),i()(),n(27,"div",31)(28,"label",38),a(29,"Contact Type"),i(),n(30,"div",39),ke(31,ii,4,4,"div",40,Me),i()(),C(33,ni,4,1,"div",31)(34,oi,4,1,"div",31)(35,ri,4,1,"div",31),i()}if(t&2){let e,o=d();c("formGroup",o.generalLedgerFilterForm),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("maxlength",5)("options",o.store.metadata().options.accounts),l(8),c("iconDisplay","input")("showIcon",!0),l(4),c("iconDisplay","input")("showIcon",!0),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.store.metadata().options.outlets),l(6),c("metaKeySelection",!1)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",E(18,qt))("options",o.categoriesOptions()),l(5),Be(o.store.metadata().options.contactTypeOptions),l(2),O((e=o.generalLedgerFilterForm.controls.contactType.value)===1?33:e===2?34:35)}}var Rt=(()=>{class t{constructor(){this.dialogFilterVisible=L(!1),this.reportService=h(B),this.coaService=h(ft),this.authService=h(Fe),this.store=h(Oe),this.categoriesOptions=L([]),this.customerSuggestions=L([]),this.supplierSuggestions=L([]),this.route=h(rt),this.dayjsService=h(ye),this.initDialogVisible=L(!0),this.fb=h(we),this.toastr=h(at)}ngOnInit(){this.generateFilterForm(),this.route.queryParamMap.pipe(Ue(e=>e.get("id")),M(e=>{e&&(this.initDialogVisible.update(o=>!o),this.generalLedgerFilterForm.patchValue({listAccountID:[e]}),this.store.updateFilter(y(g({},this.store.filter()),{listAccountID:[e]})))})).subscribe(),this.clearContactValueOnContactTypeChange(),this.generalLedgerFilterForm.valueChanges.pipe($e(500),M(e=>{Array.isArray(e.listAccountID)&&e.listAccountID.length>0?this.generalLedgerFilterForm.controls.listCategoryID.disable():this.generalLedgerFilterForm.controls.listCategoryID.enable(),e.listCategoryID&&e.listCategoryID.filter(o=>o.key).length>0?this.generalLedgerFilterForm.controls.listAccountID.disable():this.generalLedgerFilterForm.controls.listAccountID.enable()})).subscribe()}clearContactValueOnContactTypeChange(){this.generalLedgerFilterForm.get("contactType")?.valueChanges.subscribe(()=>this.generalLedgerFilterForm.get("contactID")?.setValue(""))}onAccountChange(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(M(e=>this.categoriesOptions.set(e))).subscribe()}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({listAccountID:new G([]),listCategoryID:new G([]),listOutletID:new G([]),contactID:new G(""),from:new G(""),to:new G(""),contactType:new G(1)})}onFilterOKEvent(){let f=this.generalLedgerFilterForm.value,{from:e,to:o}=f,r=Ve(f,["from","to"]);if(this.generalLedgerFilterForm.invalid){this.generalLedgerFilterForm.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let m={listCategoryID:r.listCategoryID?r.listCategoryID.map(u=>u.key):[],contactID:r.contactID.length===0?null:r.contactID,listOutletID:r.listOutletID?r.listOutletID:[],listAccountID:r.listAccountID?r.listAccountID:[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(o)?this.dayjsService.format(o):null,contactType:r.contactType};this.dialogFilterVisible.update(u=>!u),this.store.updateFilter(m),this.dialogFilterVisible.set(!1)}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(M(o=>this.customerSuggestions.set(o))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(M(o=>this.supplierSuggestions.set(o))).subscribe()}onExport(){let f=this.generalLedgerFilterForm.value,{from:e,to:o}=f,r=Ve(f,["from","to"]),m={listCategoryID:r.listCategoryID?r.listCategoryID.map(u=>u.key):[],contactID:r.contactID.length===0?null:r.contactID,listOutletID:r.listOutletID?r.listOutletID:[],listAccountID:r.listAccountID?r.listAccountID:[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(o)?this.dayjsService.format(o):null,contactType:r.contactType};this.reportService.exportGeneralLedger(m).pipe(M(u=>{St(u,`general-ledger-${this.dayjsService.now.format("D-MM-YYYY")}.${u.type.split("/")[1]}`,u.type)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-general-ledger"]],features:[K([Oe])],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"],["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","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","display","chip","selectionMode","multiple","filter","","filterBy","label","formControlName","listCategoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","metaKeySelection","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],[1,"d-flex","gap-3"],[1,"d-flex","align-items-center","gap-2"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["name","contactType","formControlName","contactType",3,"value","inputId"],[1,"m-0",3,"for"],["formControlName","contactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(o,r){if(o&1){let m=D();n(0,"app-main-panel",10),W("isDialogFilterVisibleChange",function(u){return v(m),N(r.dialogFilterVisible,u)||(r.dialogFilterVisible=u),b(u)})("isInitDialogFilterVisibleChange",function(u){return v(m),N(r.initDialogVisible,u)||(r.initDialogVisible=u),b(u)}),w("filterConfirmed",function(){return v(m),b(r.onFilterOKEvent())}),C(1,Ht,4,0,"ng-template",null,0,s)(3,Xt,1,1,"ng-template",null,1,s)(5,ai,36,19,"ng-template",null,2,s),i()}o&2&&(c("pageTitle",r.store.items().pageTitle.length?r.store.items().pageTitle:"General Ledger"),Y("isDialogFilterVisible",r.dialogFilterVisible),c("isFilterable",!0),Y("isInitDialogFilterVisible",r.initDialogVisible))},dependencies:[ue,U,Ie,z,nt,_e,xe,he,dt,re,oe,Re,ge,fe,Le,Te,ie,Z,Q,X,mt,ee,te,Ce,Se,De,ne,ct,xt,ht,gt,le,ae,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}}},Ge=pe(de(li),me(t=>{let p={totalCOGS:T(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((o,r)=>o+(r?.amount??0),0):0}),totalRevenue:T(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((o,r)=>o+(r?.amount??0),0):0}),totalExpense:T(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((o,r)=>o+(r?.amount??0),0):0}),grossProfit:T(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?p.totalRevenue()-p.totalCOGS():0),profitOrLoss:T(()=>p.totalRevenue()-p.totalCOGS()-p.totalExpense()),isDataEmpty:T(()=>Object.keys(t.data()?.data??{}).length===0)};return p}),se(t=>{let p=h(B),e=h(ye),o={updateFilter(r){V(t,m=>y(g({},m),{filter:g(g({},m.filter),r)}))},getLoader:q(A(P(()=>p.getIncomeStatementLoader().pipe(H({next:r=>{V(t,m=>y(g({},m),{loader:r,filter:y(g({},m.filter),{from:e.from(r.filter.from).format(),to:e.from(r.filter.to).format()})})),o.getIncomeStatement(t.filter)},error:r=>{console.error(r)}}))))),getIncomeStatement:q(A(P(r=>p.getIncomeStatement(r).pipe(Qe(()=>V(t,m=>y(g({},m),{isLoading:!0}))),H({next:m=>{V(t,f=>y(g({},f),{data:m,isLoading:!1}))},error:m=>{console.error(m)}})))))};return o}),ce({onInit:t=>{t.getLoader()}}));var pi=()=>({height:"calc(100vh - 70px)"}),mi=()=>({height:"calc(100vh - 150px)"}),Ae=()=>({}),Pe=t=>["/pages/chart-of-account/account/",t],je=()=>["/pages/report/general-ledger"],Ne=t=>({id:t});function ci(t,p){if(t&1){let e=D();n(0,"div",8)(1,"p-button",9),w("onClick",function(){v(e);let r=d();return b(r.onExport())}),i()()}}function si(t,p){t&1&&(n(0,"tr")(1,"th",14),a(2,"Code"),i(),n(3,"th",15),a(4,"Name"),i(),n(5,"th",16),a(6,"Total"),i()())}function di(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",17),a(5),i()(),n(6,"td",16)(7,"a",18),a(8),x(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,Pe,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,je))("queryParams",F(11,Ne,e.accountID)),l(),_(S(9,6,e.amount))}}function ui(t,p){if(t&1&&(n(0,"tr"),I(1,"td",19),n(2,"td",20)(3,"div",21)(4,"span",22),a(5,"Total Revenue :"),i(),n(6,"span",23),a(7),x(8,"number"),i()()()()),t&2){let e=d(4);l(7),_(S(8,1,e.store.totalRevenue()))}}function _i(t,p){t&1&&(n(0,"tr")(1,"td",24)(2,"span"),a(3,"No revenue records available"),i()()())}function fi(t,p){if(t&1&&(n(0,"h6",12),a(1,"Revenue"),i(),n(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),i()),t&2){let e,o=d(3);l(2),c("value",(e=o.store.data())==null||e.data==null?null:e.data.revenue)}}function gi(t,p){t&1&&(n(0,"tr")(1,"th",14),a(2,"Code"),i(),n(3,"th",15),a(4,"Name"),i(),n(5,"th",25),a(6,"Total"),i()())}function hi(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",17),a(5),i()(),n(6,"td",16)(7,"a",18),a(8),x(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,Pe,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,je))("queryParams",F(11,Ne,e.AccountID)),l(),_(S(9,6,e.amount))}}function xi(t,p){if(t&1&&(n(0,"tr"),I(1,"td",26),n(2,"td",20)(3,"div",21)(4,"span",22),a(5,"Total COGS :"),i(),n(6,"span",23),a(7),x(8,"number"),i()()()(),n(9,"tr"),I(10,"td",26),n(11,"td",20)(12,"div",21)(13,"span",22),a(14,"Gross Profit :"),i(),n(15,"span",23),a(16),x(17,"number"),i()()()()),t&2){let e=d(4);l(7),_(S(8,2,e.store.totalCOGS())),l(9),_(S(17,4,e.store.grossProfit()))}}function Si(t,p){t&1&&(n(0,"tr")(1,"td",24)(2,"span"),a(3,"No COGS records available"),i()()())}function Ci(t,p){if(t&1&&(n(0,"h4",12),a(1,"COGS"),i(),n(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),i()),t&2){let e,o=d(3);l(2),c("value",(e=o.store.data())==null||e.data==null?null:e.data.cogs)}}function yi(t,p){t&1&&(n(0,"tr")(1,"th",14),a(2,"Code"),i(),n(3,"th",15),a(4,"Name"),i(),n(5,"th",16),a(6,"Total"),i()())}function vi(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",17),a(5),i()(),n(6,"td",16)(7,"a",18),a(8),x(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,Pe,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,je))("queryParams",F(11,Ne,e.AccountID)),l(),_(S(9,6,e.amount))}}function bi(t,p){if(t&1&&(n(0,"tr"),I(1,"td",26),n(2,"td",20)(3,"div",21)(4,"span",22),a(5,"Total Expense :"),i(),n(6,"span",23),a(7),x(8,"number"),i()()()(),n(9,"tr"),I(10,"td",26),n(11,"td",20)(12,"div",21)(13,"span",22),a(14,"Profit / Loss :"),i(),n(15,"span",23),a(16),x(17,"number"),i()()()()),t&2){let e=d(4);l(7),_(S(8,2,e.store.totalExpense())),l(9),_(S(17,4,e.store.profitOrLoss()))}}function Ei(t,p){t&1&&(n(0,"tr")(1,"td",24)(2,"span"),a(3,"No expense records available"),i()()())}function Ii(t,p){if(t&1&&(n(0,"h4",12),a(1,"Expense"),i(),n(2,"p-table",13),C(3,yi,7,0,"ng-template",null,3,s)(5,vi,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),i()),t&2){let e,o=d(3);l(2),c("value",(e=o.store.data())==null||e.data==null?null:e.data.expense)}}function Fi(t,p){if(t&1&&(n(0,"p-scroll-panel")(1,"div",11),C(2,fi,11,1)(3,Ci,11,1)(4,Ii,11,1),i()()),t&2){let e,o,r,m=d(2);j(E(5,mi)),l(2),O(m.Object.keys((e=m.store.data().data)!==null&&e!==void 0?e:E(6,Ae)).length>0?2:-1),l(),O(m.Object.keys((o=(o=m.store.data().data)==null?null:o.cogs)!==null&&o!==void 0?o:E(7,Ae)).length>0?3:-1),l(),O(m.Object.keys((r=(r=m.store.data().data)==null?null:r.expense)!==null&&r!==void 0?r:E(8,Ae)).length>0?4:-1)}}function wi(t,p){if(t&1&&(n(0,"p-panel"),C(1,Fi,5,9,"p-scroll-panel",10),i()),t&2){let e=d();j(E(3,pi)),l(),c("ngIf",e.store.data())}}function Di(t,p){if(t&1){let e=D();n(0,"form",27)(1,"div",28)(2,"label",29),a(3,"Outlet"),i(),I(4,"p-multiselect",30),i(),n(5,"div",28)(6,"label",29),a(7,"Cashier"),i(),n(8,"p-autocomplete",31),w("completeMethod",function(r){v(e);let m=d();return b(m.onCashierSearch(r))})("onSelect",function(r){v(e);let m=d();return b(m.onCashierSelect(r))}),i()(),n(9,"div",28)(10,"label",29),a(11,"From"),i(),I(12,"p-datepicker",32),i(),n(13,"div",28)(14,"label",29),a(15,"To"),i(),I(16,"p-datepicker",33),i()()}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 Tt=(()=>{class t{constructor(){this.dayjsService=h(ye),this.store=h(Ge),this.fb=h(we),this.reportService=h(B),this.isInitDialogFilterVisible=L(!1),this.dialogFilterVisible=L(!1),this.cashierSuggestions=L([]),this.cashierHashMap=new Map,this.Object=Object,it(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(y(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(be("Cashier Suggestions"),M(o=>this.cashierSuggestions.set(o))).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(),o=Object.entries(e).reduce((r,[m,f])=>(m==="from"||m==="to"?f instanceof Date&&(r[m]=this.dayjsService.from(f).format()):r[m]=f||null,r),{});this.store.updateFilter(g(g({},this.store.filter()),o)),this.dialogFilterVisible.update(r=>!r),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=y(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(be("Export Profit & Loss"),M(o=>{let r=o.type,m=[o],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:r}));let u=`profit-and-loss.${r.split("/")[1]}`;f.setAttribute("download",u),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-income-statement"]],features:[K([Ge])],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(o,r){if(o&1){let m=D();n(0,"app-main-panel",7),W("isDialogFilterVisibleChange",function(u){return v(m),N(r.dialogFilterVisible,u)||(r.dialogFilterVisible=u),b(u)})("isInitDialogFilterVisibleChange",function(u){return v(m),N(r.isInitDialogFilterVisible,u)||(r.isInitDialogFilterVisible=u),b(u)}),w("filterConfirmed",function(){return v(m),b(r.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),i()}o&2&&(c("isFilterable",!0)("pageTitle",r.store.data().pageTitle),Y("isDialogFilterVisible",r.dialogFilterVisible)("isInitDialogFilterVisible",r.isInitDialogFilterVisible))},dependencies:[ue,U,Ie,z,Re,ge,fe,ie,Z,Q,X,ee,te,Ce,Se,_e,xe,he,le,ae,ne,J,$,Le,Te,re,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var qe=ze(Ct());var Ri={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,qe.default)().format("YYYY-MM-DD"),listOutletParam:[]}},He=pe(de(Ri),me(t=>({totalAsset:T(()=>t.data().asset.reduce((p,e)=>p+ +e.amount,0)),totalLiability:T(()=>t.data().liability.reduce((p,e)=>p+ +e.counterAmount,0)),totalEquity:T(()=>t.data().equity.reduce((p,e)=>p+ +e.counterAmount,0))})),se(t=>{let p=h(B),e={updateFilter:o=>{V(t,r=>y(g({},r),{filter:o}))},fetchBalanceSheet:q(A(Ee(()=>{let o=t.filter();return Object.entries(o).every(([r,m])=>m!=null&&m!=="")}),P(o=>p.getBalanceSheet(o).pipe(H({next:r=>{V(t,m=>y(g({},m),{data:r}))},error:r=>{console.error(r)}}))),Je(1))),fetchLoader:q(A(P(()=>p.getBalanceSheetLoader().pipe(H({next:o=>{V(t,r=>y(g({},r),{metadata:o,filter:{date:(0,qe.default)(o.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:o=>{console.error(o)}})))))};return e}),ce(t=>({onInit:()=>{t.fetchLoader()}})));var Lt=ze(Ct());var Ti=()=>({height:"calc(100vh - 70px)"}),Li=()=>({height:"calc(100vh - 100px)"}),Ye=t=>["/pages/chart-of-account/account/",t],We=()=>["/pages/report/general-ledger"],Ke=t=>({id:t});function Vi(t,p){if(t&1){let e=D();n(0,"div",9)(1,"p-button",10),w("onClick",function(){v(e);let r=d();return b(r.onExport())}),i()()}}function Mi(t,p){t&1&&(n(0,"tr")(1,"th",15),a(2,"Code"),i(),n(3,"th"),a(4,"Asset"),i(),n(5,"th",16),a(6,"Total"),i()())}function ki(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",17),a(5),i()(),n(6,"td",18)(7,"a",19),a(8),x(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,Ye,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,We))("queryParams",F(11,Ke,e.accountID)),l(),_(S(9,6,e.amount))}}function Bi(t,p){if(t&1&&(n(0,"tr")(1,"td",20),a(2,"Total Asset"),i(),n(3,"td",21),a(4),x(5,"number"),i()()),t&2){let e=d(3);l(4),R(" ",S(5,1,e.store.totalAsset())," ")}}function Oi(t,p){t&1&&(n(0,"tr")(1,"td",22)(2,"span"),a(3,"No asset records found."),i()()())}function Gi(t,p){if(t&1&&(n(0,"h4",13),a(1,"Asset"),i(),n(2,"p-table",14),C(3,Mi,7,0,"ng-template",null,3,s)(5,ki,10,13,"ng-template",null,4,s)(7,Bi,6,3,"ng-template",null,5,s)(9,Oi,4,0,"ng-template",null,6,s),i()),t&2){let e=d(2);l(2),c("value",e.store.data().asset)}}function Ai(t,p){t&1&&(n(0,"tr")(1,"th",15),a(2,"Code"),i(),n(3,"th"),a(4,"Liability"),i(),n(5,"th",16),a(6,"Total"),i()())}function Pi(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",24),a(5),i()(),n(6,"td",18)(7,"a",19),a(8),x(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,Ye,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,We))("queryParams",F(11,Ke,e.accountID)),l(),_(S(9,6,e.counterAmount))}}function ji(t,p){if(t&1&&(n(0,"tr")(1,"td",20),a(2," Total Liability "),i(),n(3,"td",21),a(4),x(5,"number"),i()()),t&2){let e=d(3);l(4),R(" ",S(5,1,e.store.totalLiability())," ")}}function Ni(t,p){t&1&&(n(0,"tr")(1,"td",22)(2,"span"),a(3,"No liability records found."),i()()())}function qi(t,p){if(t&1&&(n(0,"h4",23),a(1,"Liability"),i(),n(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),i()),t&2){let e=d(2);l(2),c("value",e.store.data().liability)}}function Hi(t,p){t&1&&(n(0,"tr")(1,"th",15),a(2,"Code"),i(),n(3,"th"),a(4,"Equity"),i(),n(5,"th",16),a(6,"Total"),i()())}function Yi(t,p){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td")(4,"a",17),a(5),i()(),n(6,"td",18)(7,"a",19),a(8),x(9,"number"),i()()()),t&2){let e=p.$implicit;l(2),_(e.code),l(2),c("routerLink",F(8,Ye,e.accountID)),l(),_(e.name),l(2),c("routerLink",E(10,We))("queryParams",F(11,Ke,e.accountID)),l(),_(S(9,6,e.counterAmount))}}function Wi(t,p){if(t&1&&(n(0,"tr")(1,"td",20),a(2,"Total Equity"),i(),n(3,"td",21),a(4),x(5,"number"),i()(),n(6,"tr")(7,"td",20),a(8," Total Liability + Equity "),i(),n(9,"td",21),a(10),x(11,"number"),i()()),t&2){let e=d(3);l(4),R(" ",S(5,2,e.store.totalEquity())," "),l(6),R(" ",S(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function Ki(t,p){t&1&&(n(0,"tr")(1,"td",22)(2,"span"),a(3,"No equity records found."),i()()())}function zi(t,p){if(t&1&&(n(0,"h4",23),a(1,"Equity"),i(),n(2,"p-table",14),C(3,Hi,7,0,"ng-template",null,3,s)(5,Yi,10,13,"ng-template",null,4,s),a(7," <"),C(8,Wi,12,6,"ng-template",null,5,s)(10,Ki,4,0,"ng-template",null,6,s),i()),t&2){let e=d(2);l(2),c("value",e.store.data().equity)}}function Ui(t,p){if(t&1&&(n(0,"p-panel",11)(1,"p-scroll-panel")(2,"div",12),C(3,Gi,11,1)(4,qi,11,1)(5,zi,12,1),i()()()),t&2){let e=d();j(E(8,Ti)),c("showHeader",!1),l(),j(E(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&&(n(0,"div",30)(1,"div"),a(2),i()()),t&2){let e=p.$implicit;l(2),_(e.value)}}function Ji(t,p){if(t&1&&(n(0,"form",25)(1,"div",26)(2,"label",27),a(3,"Outlet"),i(),n(4,"p-multiselect",28),C(5,$i,3,1,"ng-template",null,7,s),i()(),n(7,"div",26)(8,"label",27),a(9,"From"),i(),I(10,"p-datepicker",29),i()()),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 Vt=(()=>{class t{constructor(){this.store=h(He),this.ReportServiceStore=h(B),this.dialogFilterVisible=L(!1),this.isInitDialogFilterVisible=L(!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:o}=this.filterForm.value;this.store.updateFilter({date:(0,Lt.default)(e).format("YYYY-MM-DD"),listOutletParam:o}),this.dialogFilterVisible.update(r=>!r)}onExport(){let e=y(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportRowCount:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(be("Export Balance Sheet"),M(o=>{let r=o.type,m=[o],f=document.createElement("a");f.href=window.URL.createObjectURL(new Blob(m,{type:r}));let u=`balance-sheet.${r.split("/")[1]}`;f.setAttribute("download",u),document.body.appendChild(f),f.click(),document.body.removeChild(f)})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-balance-sheet"]],features:[K([He])],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(o,r){if(o&1){let m=D();n(0,"app-main-panel",8),W("isDialogFilterVisibleChange",function(u){return v(m),N(r.dialogFilterVisible,u)||(r.dialogFilterVisible=u),b(u)})("isInitDialogFilterVisibleChange",function(u){return v(m),N(r.isInitDialogFilterVisible,u)||(r.isInitDialogFilterVisible=u),b(u)}),w("filterConfirmed",function(){return v(m),b(r.onFilterOKEvent())}),C(1,Vi,2,0,"ng-template",null,0,s)(3,Ui,6,10,"ng-template",null,1,s)(5,Ji,11,7,"ng-template",null,2,s),i()}o&2&&(c("pageTitle",r.store.data().pageTitle)("isFilterable",!0),Y("isDialogFilterVisible",r.dialogFilterVisible)("isInitDialogFilterVisible",r.isInitDialogFilterVisible))},dependencies:[ue,U,z,xe,he,_e,re,oe,ie,Z,Q,X,ee,te,Ce,Se,ge,fe,De,ne,le,ae,J,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Mt=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(o,r){o&1&&(n(0,"p"),a(1,"report-comparative-balance works!"),i(),a(2,`
2
+ ,
3
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(o,r){o&1&&(n(0,"p"),a(1,"report-cash-flow works!"),i(),a(2,`
4
+ ,
5
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Bt=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=k({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(o,r){o&1&&(n(0,"p"),a(1,"report-trial-balance works!"),i(),a(2,`
6
+ ,
7
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var mr=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Rt},{path:"profit-loss",component:Tt},{path:"balance-sheet",component:Vt},{path:"comparative-balance",component:Mt},{path:"trial-balance",component:Bt},{path:"cash-flow",component:kt}]}];export{mr as REPORTS_ROUTES};
@@ -1,4 +1,4 @@
1
- import{a as Pt,h as N,i as Dt}from"./chunk-YOEPO6LK.js";import{Ea as Lt,Ma as Ft,Na as U,R as xt,Va as Ot,W as H,da as W,fa as et,ja as Vt}from"./chunk-BNI5KUDE.js";import{c as It,e as vt,f as Tt,g as zt,h as bt,m as Et,n as tt}from"./chunk-BYD3JK4R.js";import{Aa as ct,Ab as L,Ac as q,Bc as St,Cb as C,Jb as S,Kb as m,Lb as pt,Lc as Z,Nb as ut,Ob as B,Ub as I,Vb as v,Wb as b,Xb as F,Yb as O,Zb as A,_b as _t,ba as st,ca as ot,dc as gt,ec as y,fc as ft,gb as _,gc as yt,ha as lt,ic as Q,jc as Y,kc as P,lc as D,mb as dt,oa as rt,oc as j,pa as at,qa as ht,ra as k,ta as x,wb as V,xb as mt,xc as Ct,yc as wt,za as K,zc as $}from"./chunk-YVEUYFCE.js";import{a as J,b as X}from"./chunk-YQFG5XE2.js";var ge=(()=>{class i extends N{static \u0275fac=(()=>{let t;return function(n){return(t||(t=x(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["BlankIcon"]],features:[L],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(e,n){e&1&&(k(),I(0,"svg",0),b(1,"rect",1),v())},encapsulation:2})}return i})();var Ce=(()=>{class i extends N{static \u0275fac=(()=>{let t;return function(n){return(t||(t=x(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["CheckIcon"]],features:[L],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(e,n){e&1&&(k(),I(0,"svg",0),b(1,"path",1),v()),e&2&&(B(n.getClassNames()),S("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role))},encapsulation:2})}return i})();var ve=(()=>{class i extends N{pathId;ngOnInit(){this.pathId="url(#"+Lt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=x(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["SearchIcon"]],features:[L],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(k(),I(0,"svg",0)(1,"g"),b(2,"path",1),v(),I(3,"defs")(4,"clipPath",2),b(5,"rect",3),v()()()),e&2&&(B(n.getClassNames()),S("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),_(),S("clip-path",n.pathId),_(3),m("id",n.pathId))},encapsulation:2})}return i})();var Rt=["content"],Ht=["item"],Wt=["loader"],kt=["loadericon"],At=["element"],Qt=["*"],$t=(i,h,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":h,"p-virtualscroller-horizontal p-horizontal-scroll":t}),nt=(i,h)=>({$implicit:i,options:h}),Nt=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),jt=i=>({"p-virtualscroller-loader-mask":i}),qt=i=>({numCols:i}),Bt=i=>({options:i}),Zt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Gt=(i,h)=>({rows:i,columns:h});function Jt(i,h){i&1&&A(0)}function Kt(i,h){if(i&1&&(F(0),C(1,Jt,1,0,"ng-container",10),O()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(2,nt,t.loadedItems,t.getContentOptions()))}}function Ut(i,h){i&1&&A(0)}function Xt(i,h){if(i&1&&(F(0),C(1,Ut,1,0,"ng-container",10),O()),i&2){let t=h.$implicit,e=h.index,n=y(3);_(),m("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",q(2,nt,t,n.getOptions(e)))}}function Yt(i,h){if(i&1&&(I(0,"div",11,3),C(2,Xt,2,5,"ng-container",12),v()),i&2){let t=y(2);ut(t.contentStyle),B(t.contentStyleClass),m("ngClass",$(8,Nt,t.d_loading)),S("data-pc-section","content"),_(2),m("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function te(i,h){if(i&1&&b(0,"div",13),i&2){let t=y(2);m("ngStyle",t.spacerStyle),S("data-pc-section","spacer")}}function ee(i,h){i&1&&A(0)}function ie(i,h){if(i&1&&(F(0),C(1,ee,1,0,"ng-container",10),O()),i&2){let t=h.index,e=y(4);_(),m("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",$(4,Bt,e.getLoaderOptions(t,e.both&&$(2,qt,e.numItemsInViewport.cols))))}}function ne(i,h){if(i&1&&(F(0),C(1,ie,2,6,"ng-container",15),O()),i&2){let t=y(3);_(),m("ngForOf",t.loaderArr)}}function se(i,h){i&1&&A(0)}function oe(i,h){if(i&1&&(F(0),C(1,se,1,0,"ng-container",10),O()),i&2){let t=y(4);_(),m("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",$(3,Bt,wt(2,Zt)))}}function le(i,h){i&1&&b(0,"SpinnerIcon",16),i&2&&(m("styleClass","p-virtualscroller-loading-icon pi-spin"),S("data-pc-section","loadingIcon"))}function re(i,h){if(i&1&&C(0,oe,2,5,"ng-container",6)(1,le,1,2,"ng-template",null,5,Z),i&2){let t=j(2),e=y(3);m("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function ae(i,h){if(i&1&&(I(0,"div",14),C(1,ne,2,1,"ng-container",6)(2,re,3,2,"ng-template",null,4,Z),v()),i&2){let t=j(3),e=y(2);m("ngClass",$(4,jt,!e.loaderTemplate)),S("data-pc-section","loader"),_(),m("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function he(i,h){if(i&1){let t=_t();F(0),I(1,"div",7,1),gt("scroll",function(n){at(t);let s=y();return ht(s.onContainerScroll(n))}),C(3,Kt,2,5,"ng-container",6)(4,Yt,3,10,"ng-template",null,2,Z)(6,te,1,2,"div",8)(7,ae,4,6,"div",9),v(),O()}if(i&2){let t=j(5),e=y();_(),B(e._styleClass),m("ngStyle",e._style)("ngClass",St(12,$t,e.inline,e.both,e.horizontal)),S("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),m("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),_(3),m("ngIf",e._showSpacer),_(),m("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function ce(i,h){i&1&&A(0)}function de(i,h){if(i&1&&(F(0),C(1,ce,1,0,"ng-container",10),O()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(5,nt,t.items,q(2,Gt,t._items,t.loadedColumns)))}}function me(i,h){if(i&1&&(yt(0),C(1,de,2,8,"ng-container",17)),i&2){let t=y();_(),m("ngIf",t.contentTemplate||t._contentTemplate)}}var pe=({dt:i})=>`
1
+ import{a as Pt,h as N,i as Dt}from"./chunk-LMI4DLB5.js";import{Ea as Lt,Ma as Ft,Na as U,R as xt,Va as Ot,W as H,da as W,fa as et,ja as Vt}from"./chunk-3GHEXAAZ.js";import{c as It,e as vt,f as Tt,g as zt,h as bt,m as Et,n as tt}from"./chunk-DAQCANBV.js";import{Aa as ct,Ab as L,Ac as $,Bc as q,Cb as C,Cc as St,Jb as S,Kb as m,Lb as pt,Mc as Z,Nb as ut,Ob as B,Ub as I,Vb as v,Wb as b,Xb as F,Yb as O,Zb as A,_b as _t,ba as st,ca as ot,dc as gt,ec as y,fc as ft,gb as _,gc as yt,ha as lt,jc as Q,kc as Y,lc as P,mb as dt,mc as D,oa as rt,pa as at,pc as j,qa as ht,ra as k,ta as x,wb as V,xb as mt,yc as Ct,za as K,zc as wt}from"./chunk-WCXWWANV.js";import{a as J,b as X}from"./chunk-YQFG5XE2.js";var ge=(()=>{class i extends N{static \u0275fac=(()=>{let t;return function(n){return(t||(t=x(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["BlankIcon"]],features:[L],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(e,n){e&1&&(k(),I(0,"svg",0),b(1,"rect",1),v())},encapsulation:2})}return i})();var Ce=(()=>{class i extends N{static \u0275fac=(()=>{let t;return function(n){return(t||(t=x(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["CheckIcon"]],features:[L],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(e,n){e&1&&(k(),I(0,"svg",0),b(1,"path",1),v()),e&2&&(B(n.getClassNames()),S("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role))},encapsulation:2})}return i})();var ve=(()=>{class i extends N{pathId;ngOnInit(){this.pathId="url(#"+Lt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=x(i)))(n||i)}})();static \u0275cmp=V({type:i,selectors:[["SearchIcon"]],features:[L],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(k(),I(0,"svg",0)(1,"g"),b(2,"path",1),v(),I(3,"defs")(4,"clipPath",2),b(5,"rect",3),v()()()),e&2&&(B(n.getClassNames()),S("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),_(),S("clip-path",n.pathId),_(3),m("id",n.pathId))},encapsulation:2})}return i})();var Rt=["content"],Ht=["item"],Wt=["loader"],kt=["loadericon"],At=["element"],Qt=["*"],$t=(i,h,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":h,"p-virtualscroller-horizontal p-horizontal-scroll":t}),nt=(i,h)=>({$implicit:i,options:h}),Nt=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),jt=i=>({"p-virtualscroller-loader-mask":i}),qt=i=>({numCols:i}),Bt=i=>({options:i}),Zt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Gt=(i,h)=>({rows:i,columns:h});function Jt(i,h){i&1&&A(0)}function Kt(i,h){if(i&1&&(F(0),C(1,Jt,1,0,"ng-container",10),O()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(2,nt,t.loadedItems,t.getContentOptions()))}}function Ut(i,h){i&1&&A(0)}function Xt(i,h){if(i&1&&(F(0),C(1,Ut,1,0,"ng-container",10),O()),i&2){let t=h.$implicit,e=h.index,n=y(3);_(),m("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",q(2,nt,t,n.getOptions(e)))}}function Yt(i,h){if(i&1&&(I(0,"div",11,3),C(2,Xt,2,5,"ng-container",12),v()),i&2){let t=y(2);ut(t.contentStyle),B(t.contentStyleClass),m("ngClass",$(8,Nt,t.d_loading)),S("data-pc-section","content"),_(2),m("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function te(i,h){if(i&1&&b(0,"div",13),i&2){let t=y(2);m("ngStyle",t.spacerStyle),S("data-pc-section","spacer")}}function ee(i,h){i&1&&A(0)}function ie(i,h){if(i&1&&(F(0),C(1,ee,1,0,"ng-container",10),O()),i&2){let t=h.index,e=y(4);_(),m("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",$(4,Bt,e.getLoaderOptions(t,e.both&&$(2,qt,e.numItemsInViewport.cols))))}}function ne(i,h){if(i&1&&(F(0),C(1,ie,2,6,"ng-container",15),O()),i&2){let t=y(3);_(),m("ngForOf",t.loaderArr)}}function se(i,h){i&1&&A(0)}function oe(i,h){if(i&1&&(F(0),C(1,se,1,0,"ng-container",10),O()),i&2){let t=y(4);_(),m("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",$(3,Bt,wt(2,Zt)))}}function le(i,h){i&1&&b(0,"SpinnerIcon",16),i&2&&(m("styleClass","p-virtualscroller-loading-icon pi-spin"),S("data-pc-section","loadingIcon"))}function re(i,h){if(i&1&&C(0,oe,2,5,"ng-container",6)(1,le,1,2,"ng-template",null,5,Z),i&2){let t=j(2),e=y(3);m("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function ae(i,h){if(i&1&&(I(0,"div",14),C(1,ne,2,1,"ng-container",6)(2,re,3,2,"ng-template",null,4,Z),v()),i&2){let t=j(3),e=y(2);m("ngClass",$(4,jt,!e.loaderTemplate)),S("data-pc-section","loader"),_(),m("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function he(i,h){if(i&1){let t=_t();F(0),I(1,"div",7,1),gt("scroll",function(n){at(t);let s=y();return ht(s.onContainerScroll(n))}),C(3,Kt,2,5,"ng-container",6)(4,Yt,3,10,"ng-template",null,2,Z)(6,te,1,2,"div",8)(7,ae,4,6,"div",9),v(),O()}if(i&2){let t=j(5),e=y();_(),B(e._styleClass),m("ngStyle",e._style)("ngClass",St(12,$t,e.inline,e.both,e.horizontal)),S("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),m("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),_(3),m("ngIf",e._showSpacer),_(),m("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function ce(i,h){i&1&&A(0)}function de(i,h){if(i&1&&(F(0),C(1,ce,1,0,"ng-container",10),O()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(5,nt,t.items,q(2,Gt,t._items,t.loadedColumns)))}}function me(i,h){if(i&1&&(yt(0),C(1,de,2,8,"ng-container",17)),i&2){let t=y();_(),m("ngIf",t.contentTemplate||t._contentTemplate)}}var pe=({dt:i})=>`
2
2
  .p-virtualscroller {
3
3
  position: relative;
4
4
  overflow: auto;
@@ -1 +1 @@
1
- import{b as P}from"./chunk-GJXWL5XV.js";import{b as A}from"./chunk-LKZL77YR.js";import{b as y}from"./chunk-JDW35ZB5.js";import{a as w,b}from"./chunk-6ZZARVQO.js";import{x as _}from"./chunk-YOEPO6LK.js";import{a as O}from"./chunk-35KDUCM3.js";import{m as M,s as S}from"./chunk-BYD3JK4R.js";import{Cb as C,Da as c,Lc as a,Ub as i,Vb as r,Wb as x,ba as s,ec as m,gb as u,ha as d,pc as p,qc as v,rc as l,wb as h}from"./chunk-YVEUYFCE.js";var k=(()=>{class t{constructor(){this.httpService=d(O),this.dayjs=d(P)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new S;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function j(t,g){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function E(t,g){if(t&1&&(i(0,"div",8),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationCount()," ")}}function z(t,g){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function F(t,g){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var X=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,j,3,0,"ng-template",null,0,a)(3,E,2,1,"ng-template",null,1,a)(5,z,2,1,"ng-template",null,2,a)(7,F,3,1,"ng-template",null,3,a),r())},dependencies:[M,b,w,_,A,y],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{k as a,X as b};
1
+ import{b as P}from"./chunk-LWYZZP3I.js";import{b as A}from"./chunk-W4KTL6Y6.js";import{a as w,b}from"./chunk-7IPVVF6Y.js";import{b as y}from"./chunk-CNLYDNON.js";import{x as _}from"./chunk-LMI4DLB5.js";import{a as O}from"./chunk-R6NK3ROE.js";import{m as M,s as S}from"./chunk-DAQCANBV.js";import{Cb as C,Da as c,Mc as a,Ub as i,Vb as r,Wb as x,ba as s,ec as m,gb as u,ha as d,qc as p,rc as v,sc as l,wb as h}from"./chunk-WCXWWANV.js";var k=(()=>{class t{constructor(){this.httpService=d(O),this.dayjs=d(P)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}getManualJournalCount(){return this.httpService.get(void 0,"api/migrate/accounting/journalheader-count",{})}getCOACount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountcount",{})}getCOAConfigurationCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountConfigcount",{})}getCOACategoryCount(){return this.httpService.get(void 0,"api/migrate/accounting/chartOfAccountCategorycount",{})}getOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/outletaccount-count",{})}getPaymentMethodAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/paymentmethodaccountcount",{})}getWriteOffOutletAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/writeoffoutletaccountCount",{})}getTaxAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/taxcount",{})}getExpenseAccountCount(){return this.httpService.get(void 0,"api/migrate/accounting/expenseaccountcount",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(e){let n={From:e.From?this.dayjs.from(e.From).format():null,To:e.To?this.dayjs.from(e.To).format():null,PageNumber:e.PageNumber||1,PageSize:e.PageSize||50},o=new S;return Object.keys(n).forEach(f=>{o=o.append(f,n[f])}),this.httpService.get(void 0,"api/migrate/accounting/journalheader",{params:o})}formatManualCOA(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa",{})}formatExpenseAccount(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-expenseaccount",{})}formatWriteOff(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-writeoff",{})}formatManualCOAConfig(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-coa-config",{})}formatOutletAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-outlet-account",{})}formatPaymentAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-paymentmethod",{})}formatTaxAccount(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-tax",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}formatManualCOACategory(){return this.httpService.delete(void 0,"api/migrate/accounting/truncate-coag",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=s({token:t,factory:t.\u0275fac})}}return t})();function j(t,g){t&1&&(i(0,"div",5)(1,"div",6),x(2,"i",7),r()())}function E(t,g){if(t&1&&(i(0,"div",8),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationCount()," ")}}function z(t,g){if(t&1&&(i(0,"div",9),p(1),r()),t&2){let e=m();u(),l(" ",e.migrationTitle()," ")}}function F(t,g){if(t&1&&(i(0,"div",10)(1,"div",11),p(2),r()()),t&2){let e=m();u(2),v(e.migrationPlace())}}var X=(()=>{class t{constructor(){this.migrationTitle=c(),this.migrationCount=c(),this.migrationPlace=c()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=h({type:t,selectors:[["app-migration-cards"]],inputs:{migrationTitle:[1,"migrationTitle"],migrationCount:[1,"migrationCount"],migrationPlace:[1,"migrationPlace"]},decls:9,vars:0,consts:[["header",""],["title",""],["subtitle",""],["footer",""],[1,"text-center","flex","flex-column","justify-content-center","align-items-center","card-shadow","responsive-card"],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center","align-items-center","mt-4",2,"width","60px","height","60px","background-color","#e0f0ff","border-radius","50%"],[1,"icon","fa-file-lines","fa-light",2,"font-size","25px","color","#007bff"],[1,"bigscale","fw-bold"],[1,"text-sm","text-secondary"],[1,"flex","mt-5"],[1,"p-6","fs-7","fw-bold"]],template:function(n,o){n&1&&(i(0,"p-card",4),C(1,j,3,0,"ng-template",null,0,a)(3,E,2,1,"ng-template",null,1,a)(5,z,2,1,"ng-template",null,2,a)(7,F,3,1,"ng-template",null,3,a),r())},dependencies:[M,b,w,_,A,y],styles:["[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}[_nghost-%COMP%] .p-card{box-shadow:0 .25rem 1.25rem #0000001a!important;width:21.875rem!important;height:25rem!important}@media (max-width: 85rem){[_nghost-%COMP%] .p-card{width:18.875rem!important;height:21rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:2rem!important;margin-top:1rem!important}}@media (min-width: 85.001rem) and (max-width: 97.999rem){[_nghost-%COMP%] .p-card{width:21rem!important;height:25rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:3rem!important;margin-top:2rem!important}}@media (min-width: 98rem){[_nghost-%COMP%] .p-card{width:25rem!important;height:28rem!important}[_nghost-%COMP%] .p-card .p-card-title .bigscale{font-size:5rem!important;margin-top:2rem!important}}"]})}}return t})();export{k as a,X as b};
@@ -0,0 +1 @@
1
+ import{a as v,b as H}from"./chunk-3ZFQSQVU.js";import"./chunk-LWYZZP3I.js";import"./chunk-Y45TAHWD.js";import{a as F,b as I}from"./chunk-W4KTL6Y6.js";import"./chunk-7IPVVF6Y.js";import{h as G}from"./chunk-RYHNURUZ.js";import{b as D,c as N}from"./chunk-BX74ZLQG.js";import{a as O,b as R}from"./chunk-CNLYDNON.js";import"./chunk-FTI2QPWV.js";import"./chunk-BDJHC5O6.js";import{w as V,x as j}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import"./chunk-3GHEXAAZ.js";import"./chunk-R6NK3ROE.js";import{a as $}from"./chunk-TDMJ2M6W.js";import{i as A,m as P}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{Cb as E,Jc as c,Kb as p,Kc as m,Mc as C,Nb as x,Ub as n,V as y,Vb as o,Wb as l,X as b,_b as w,dc as h,ec as s,gb as a,h as T,ha as f,pa as g,qa as d,ra as M,s as u,sa as S,wb as k,yc as B,zc as _}from"./chunk-WCXWWANV.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};
@@ -1,4 +1,4 @@
1
- import{a as f,g as W}from"./chunk-YOEPO6LK.js";import{Ea as he,Ma as U,Na as y,Q as fe,Va as ge,va as me}from"./chunk-BNI5KUDE.js";import{h as N,m as d}from"./chunk-BYD3JK4R.js";import{c as de,d as R,f as G,g as J,h as K}from"./chunk-F2X3VGZZ.js";import{Ab as c,Bc as q,Cb as h,Da as M,Ga as se,Jb as $,Kb as F,Mb as u,Pb as C,Ub as w,Vb as O,Wb as z,Xc as s,Yc as H,Zb as E,_b as oe,aa as m,ba as te,ca as ne,dc as ae,ec as k,fc as g,gb as _,gc as v,ha as D,ic as I,kc as P,lc as B,mc as b,nc as L,pa as ie,pb as V,pc as le,qa as pe,qb as j,qc as ce,rb as T,ta as a,wb as l,xb as re,xc as ue,zc as Q}from"./chunk-YVEUYFCE.js";var x=["*"],ye=["content"],Se=(e,r,t)=>({activateCallback:e,value:r,active:t});function _e(e,r){e&1&&z(0,"p-stepper-separator")}function $e(e,r){if(e&1){let t=oe();w(0,"button",0),ae("click",function(){ie(t);let n=k();return pe(n.onStepClick())}),w(1,"span",1),le(2),O(),w(3,"span",2),v(4),O()(),h(5,_e,1,0,"p-stepper-separator")}if(e&2){let t=k();F("tabindex",t.isStepDisabled()?-1:void 0)("disabled",t.isStepDisabled()),$("id",t.id())("role","tab")("aria-controls",t.ariaControls()),_(2),ce(t.value()),_(3),C(t.isSeparatorVisible()?5:-1)}}function Ce(e,r){e&1&&E(0)}function xe(e,r){e&1&&z(0,"p-stepper-separator")}function De(e,r){if(e&1&&h(0,Ce,1,0,"ng-container",3)(1,xe,1,0,"p-stepper-separator"),e&2){let t=k();F("ngTemplateOutlet",t.content||t._contentTemplate)("ngTemplateOutletContext",q(3,Se,t.onStepClick.bind(t),t.value(),t.active())),_(),C(t.isSeparatorVisible()?1:-1)}}var ve=e=>({transitionParams:e}),Te=e=>({value:"visible",params:e}),Fe=e=>({value:"hidden",params:e});function we(e,r){e&1&&z(0,"p-stepper-separator")}function ke(e,r){e&1&&E(0)}function Ie(e,r){if(e&1&&h(0,ke,1,0,"ng-container",1),e&2){let t=k();F("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(2,Se,t.updateValue.bind(t),t.value(),t.active()))}}var Pe=({dt:e})=>`
1
+ import{a as f,g as W}from"./chunk-LMI4DLB5.js";import{Ea as he,Ma as U,Na as y,Q as fe,Va as ge,va as me}from"./chunk-3GHEXAAZ.js";import{h as N,m as d}from"./chunk-DAQCANBV.js";import{c as de,d as R,f as G,g as J,h as K}from"./chunk-F2X3VGZZ.js";import{Ab as c,Ac as Q,Cb as h,Cc as q,Da as M,Ga as se,Jb as $,Kb as F,Mb as u,Pb as C,Ub as w,Vb as O,Wb as z,Yc as s,Zb as E,Zc as H,_b as oe,aa as m,ba as te,ca as ne,dc as ae,ec as k,fc as g,gb as _,gc as v,ha as D,jc as I,lc as P,mc as B,nc as b,oc as L,pa as ie,pb as V,qa as pe,qb as j,qc as le,rb as T,rc as ce,ta as a,wb as l,xb as re,yc as ue}from"./chunk-WCXWWANV.js";var x=["*"],ye=["content"],Se=(e,r,t)=>({activateCallback:e,value:r,active:t});function _e(e,r){e&1&&z(0,"p-stepper-separator")}function $e(e,r){if(e&1){let t=oe();w(0,"button",0),ae("click",function(){ie(t);let n=k();return pe(n.onStepClick())}),w(1,"span",1),le(2),O(),w(3,"span",2),v(4),O()(),h(5,_e,1,0,"p-stepper-separator")}if(e&2){let t=k();F("tabindex",t.isStepDisabled()?-1:void 0)("disabled",t.isStepDisabled()),$("id",t.id())("role","tab")("aria-controls",t.ariaControls()),_(2),ce(t.value()),_(3),C(t.isSeparatorVisible()?5:-1)}}function Ce(e,r){e&1&&E(0)}function xe(e,r){e&1&&z(0,"p-stepper-separator")}function De(e,r){if(e&1&&h(0,Ce,1,0,"ng-container",3)(1,xe,1,0,"p-stepper-separator"),e&2){let t=k();F("ngTemplateOutlet",t.content||t._contentTemplate)("ngTemplateOutletContext",q(3,Se,t.onStepClick.bind(t),t.value(),t.active())),_(),C(t.isSeparatorVisible()?1:-1)}}var ve=e=>({transitionParams:e}),Te=e=>({value:"visible",params:e}),Fe=e=>({value:"hidden",params:e});function we(e,r){e&1&&z(0,"p-stepper-separator")}function ke(e,r){e&1&&E(0)}function Ie(e,r){if(e&1&&h(0,ke,1,0,"ng-container",1),e&2){let t=k();F("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",q(2,Se,t.updateValue.bind(t),t.value(),t.active()))}}var Pe=({dt:e})=>`
2
2
  .p-steplist {
3
3
  position: relative;
4
4
  display: flex;
@@ -0,0 +1,82 @@
1
+ import{a as M}from"./chunk-LMI4DLB5.js";import{Na as D,Va as C}from"./chunk-3GHEXAAZ.js";import{m as z}from"./chunk-DAQCANBV.js";import{Ab as v,Jb as c,Lb as g,Mb as u,Ob as p,Ub as y,Vb as f,ba as o,ca as d,fc as h,gc as m,ha as l,ta as r,wb as a,xb as s,yc as b}from"./chunk-WCXWWANV.js";var j=["*"],$=({dt:e})=>`
2
+ .p-divider-horizontal {
3
+ display: flex;
4
+ width: 100%;
5
+ position: relative;
6
+ align-items: center;
7
+ margin: ${e("divider.horizontal.margin")};
8
+ padding: ${e("divider.horizontal.padding")};
9
+ }
10
+
11
+ .p-divider-horizontal:before {
12
+ position: absolute;
13
+ display: block;
14
+ inset-block-start: 50%;
15
+ inset-inline-start: 0;
16
+ width: 100%;
17
+ content: "";
18
+ border-block-start: 1px solid ${e("divider.border.color")};
19
+ }
20
+
21
+ .p-divider-horizontal .p-divider-content {
22
+ padding: ${e("divider.horizontal.content.padding")};
23
+ }
24
+
25
+ .p-divider-vertical {
26
+ min-height: 100%;
27
+ display: flex;
28
+ position: relative;
29
+ justify-content: center;
30
+ margin: ${e("divider.vertical.margin")};
31
+ padding: ${e("divider.vertical.padding")};
32
+ }
33
+
34
+ .p-divider-vertical:before {
35
+ position: absolute;
36
+ display: block;
37
+ inset-block-start: 0;
38
+ inset-inline-start: 50%;
39
+ height: 100%;
40
+ content: "";
41
+ border-inline-start: 1px solid ${e("divider.border.color")};
42
+ }
43
+
44
+ .p-divider.p-divider-vertical .p-divider-content {
45
+ padding: ${e("divider.vertical.content.padding")};
46
+ }
47
+
48
+ .p-divider-content {
49
+ z-index: 1;
50
+ background: ${e("divider.content.background")};
51
+ color: ${e("divider.content.color")};
52
+ }
53
+
54
+ .p-divider-solid.p-divider-horizontal:before {
55
+ border-block-start-style: solid;
56
+ }
57
+
58
+ .p-divider-solid.p-divider-vertical:before {
59
+ border-inline-start-style: solid;
60
+ }
61
+
62
+ .p-divider-dashed.p-divider-horizontal:before {
63
+ border-block-start-style: dashed;
64
+ }
65
+
66
+ .p-divider-dashed.p-divider-vertical:before {
67
+ border-inline-start-style: dashed;
68
+ }
69
+
70
+ .p-divider-dotted.p-divider-horizontal:before {
71
+ border-block-start-style: dotted;
72
+ }
73
+
74
+ .p-divider-dotted.p-divider-vertical:before {
75
+ border-inline-start-style: dotted;
76
+ }
77
+
78
+ .p-divider-left:dir(rtl),
79
+ .p-divider-right:dir(rtl) {
80
+ flex-direction: row-reverse;
81
+ }
82
+ `,F={root:({props:e})=>({justifyContent:e.layout==="horizontal"?e.align==="center"||e.align===null?"center":e.align==="left"?"flex-start":e.align==="right"?"flex-end":null:null,alignItems:e.layout==="vertical"?e.align==="center"||e.align===null?"center":e.align==="top"?"flex-start":e.align==="bottom"?"flex-end":null:null})},I={root:({props:e})=>["p-divider p-component","p-divider-"+e.layout,"p-divider-"+e.type,{"p-divider-left":e.layout==="horizontal"&&(!e.align||e.align==="left")},{"p-divider-center":e.layout==="horizontal"&&e.align==="center"},{"p-divider-right":e.layout==="horizontal"&&e.align==="right"},{"p-divider-top":e.layout==="vertical"&&e.align==="top"},{"p-divider-center":e.layout==="vertical"&&(!e.align||e.align==="center")},{"p-divider-bottom":e.layout==="vertical"&&e.align==="bottom"}],content:"p-divider-content"},k=(()=>{class e extends C{name="divider";theme=$;classes=I;inlineStyles=F;static \u0275fac=(()=>{let t;return function(i){return(t||(t=r(e)))(i||e)}})();static \u0275prov=o({token:e,factory:e.\u0275fac})}return e})();var S=(()=>{class e extends M{style;styleClass;layout="horizontal";type="solid";align;_componentStyle=l(k);get hostClass(){return this.styleClass}static \u0275fac=(()=>{let t;return function(i){return(t||(t=r(e)))(i||e)}})();static \u0275cmp=a({type:e,selectors:[["p-divider"]],hostVars:33,hostBindings:function(n,i){n&2&&(c("aria-orientation",i.layout)("data-pc-name","divider")("role","separator"),p(i.hostClass),g("justify-content",i.layout==="horizontal"?i.align==="center"||i.align===void 0?"center":i.align==="left"?"flex-start":i.align==="right"?"flex-end":null:null)("align-items",i.layout==="vertical"?i.align==="center"||i.align===void 0?"center":i.align==="top"?"flex-start":i.align==="bottom"?"flex-end":null:null),u("p-divider",!0)("p-component",!0)("p-divider-horizontal",i.layout==="horizontal")("p-divider-vertical",i.layout==="vertical")("p-divider-solid",i.type==="solid")("p-divider-dashed",i.type==="dashed")("p-divider-dotted",i.type==="dotted")("p-divider-left",i.layout==="horizontal"&&(!i.align||i.align==="left"))("p-divider-center",i.layout==="horizontal"&&i.align==="center"||i.layout==="vertical"&&(!i.align||i.align==="center"))("p-divider-right",i.layout==="horizontal"&&i.align==="right")("p-divider-top",i.layout==="vertical"&&i.align==="top")("p-divider-bottom",i.layout==="vertical"&&i.align==="bottom"))},inputs:{style:"style",styleClass:"styleClass",layout:"layout",type:"type",align:"align"},features:[b([k]),v],ngContentSelectors:j,decls:2,vars:0,consts:[[1,"p-divider-content"]],template:function(n,i){n&1&&(h(),y(0,"div",0),m(1),f())},dependencies:[z,D],encapsulation:2,changeDetection:0})}return e})(),L=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=s({type:e});static \u0275inj=d({imports:[S]})}return e})();export{S as a,L as b};
@@ -0,0 +1 @@
1
+ import{a as x,b as L}from"./chunk-3ZFQSQVU.js";import"./chunk-LWYZZP3I.js";import"./chunk-Y45TAHWD.js";import{a as E,b as O}from"./chunk-W4KTL6Y6.js";import"./chunk-7IPVVF6Y.js";import{h as H}from"./chunk-RYHNURUZ.js";import{b as N,c as G}from"./chunk-BX74ZLQG.js";import{a as R,b as D}from"./chunk-CNLYDNON.js";import"./chunk-FTI2QPWV.js";import"./chunk-BDJHC5O6.js";import{w as V,x as j}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import"./chunk-3GHEXAAZ.js";import"./chunk-R6NK3ROE.js";import{a as I}from"./chunk-TDMJ2M6W.js";import{i as $,m as F}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{Cb as P,Jc as l,Kb as p,Kc as m,Mc as h,Nb as d,Ub as o,V as T,Vb as n,Wb as c,X as M,Z as S,_b as w,dc as y,ec as s,gb as a,h as v,ha as u,pa as C,qa as f,ra as b,s as g,sa as k,wb as B,yc as A,zc as _}from"./chunk-WCXWWANV.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=w();o(0,"div",3)(1,"p-button",4),y("onClick",function(){C(e);let r=s();return f(r.onFormatCOACategory())}),n(),o(2,"p-button",5),l(3,"async"),l(4,"async"),y("onClick",function(){C(e);let r=s();return f(r.onMigrateCoaCategory())}),n()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(o(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),c(3,"app-migration-cards",7),l(4,"async"),b(),o(5,"svg",8),c(6,"path",9),n(),k(),c(7,"app-migration-cards",10),l(8,"async"),n()()()),i&2){let e=s();d(_(12,q)),a(),d(_(13,q)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ge=(()=>{class i{constructor(){this.migrateService=u(x),this.toastr=u(I),this.refresh$=new v(void 0),this.pageTitle="Chart of Account Category"}ngOnInit(){let e=this.refresh$.pipe(M(()=>this.migrateService.getCOACategoryCount()),S(t=>console.log("API response:",t)),T(1));this.countInPOS$=e.pipe(g(t=>Number(t.pos))),this.countInBooks$=e.pipe(g(t=>Number(t.books)))}onMigrateCoaCategory(){this.migrateService.migrateCoaCategory().subscribe(e=>{this.toastr.success(e.message,"Migration Successful")})}onFormatCOACategory(){confirm("Are you sure you want to format?")&&this.migrateService.formatManualCOACategory().subscribe(e=>{this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-coa-configuration"]],features:[A([x])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(o(0,"app-main-panel",2),P(1,J,5,6,"ng-template",null,0,h)(3,K,9,14,"ng-template",null,1,h),n()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,$,j,V,O,E,D,R,G,N,L],encapsulation:2})}}return i})();export{ge as CoaCategoryComponent};
@@ -1,4 +1,4 @@
1
- import{a as Ie}from"./chunk-OZACNHDP.js";import{b as Te}from"./chunk-TC43COAE.js";import{a as xe}from"./chunk-EXVUABTO.js";import{a as S,f as P,h as Q}from"./chunk-YOEPO6LK.js";import{Ea as I,Ia as ve,Ma as we,Na as v,Va as L,na as Ce,oa as ye}from"./chunk-BNI5KUDE.js";import{c as U,e as ue,f as de,g as fe,h as he,m as M}from"./chunk-BYD3JK4R.js";import{c as J,d as K,f as z,g as ge,h as B,j as be,l as _e}from"./chunk-F2X3VGZZ.js";import{Aa as ee,Ab as h,Ac as pe,Cb as g,Cc as me,Jb as l,Kb as s,Mb as oe,Nb as ae,Ob as y,Pb as $,Ub as p,Uc as Z,Vb as m,Vc as O,Wb as u,Xb as ie,Yb as ne,Zb as q,_b as F,ba as D,ca as N,dc as V,ec as c,fc as se,gb as r,gc as re,ha as w,ic as A,jc as R,kc as T,lc as x,mb as te,pa as _,pc as G,qa as C,qc as le,ra as E,rc as ce,ta as d,wb as f,xb as H,xc as k,za as Y,zc as X}from"./chunk-YVEUYFCE.js";var Se=["*"],De=({dt:e})=>`
1
+ import{a as Ie}from"./chunk-DJAICZNR.js";import{b as Te}from"./chunk-3RM5CDGW.js";import{a as xe}from"./chunk-BX74ZLQG.js";import{a as S,f as P,h as Q}from"./chunk-LMI4DLB5.js";import{Ea as I,Ia as ve,Ma as we,Na as v,Va as L,na as Ce,oa as ye}from"./chunk-3GHEXAAZ.js";import{c as U,e as ue,f as de,g as fe,h as he,m as M}from"./chunk-DAQCANBV.js";import{c as J,d as K,f as z,g as ge,h as B,j as be,l as _e}from"./chunk-F2X3VGZZ.js";import{Aa as ee,Ab as h,Ac as X,Bc as pe,Cb as g,Dc as me,Jb as l,Kb as s,Mb as oe,Nb as ae,Ob as y,Pb as $,Ub as p,Vb as m,Vc as Z,Wb as u,Wc as O,Xb as ie,Yb as ne,Zb as q,_b as F,ba as D,ca as N,dc as V,ec as c,fc as se,gb as r,gc as re,ha as w,jc as A,kc as R,lc as T,mb as te,mc as x,pa as _,qa as C,qc as G,ra as E,rc as le,sc as ce,ta as d,wb as f,xb as H,yc as k,za as Y}from"./chunk-WCXWWANV.js";var Se=["*"],De=({dt:e})=>`
2
2
  .p-floatlabel {
3
3
  display: block;
4
4
  position: relative;
@@ -1 +1 @@
1
- import{a as u,n as b}from"./chunk-BYD3JK4R.js";import{Ka as d,ba as n,ca as s,ea as o,ga as a,ha as h,xb as c,za as p}from"./chunk-YVEUYFCE.js";var v;try{v=typeof Intl<"u"&&Intl.v8BreakIterator}catch{v=!1}var T=(()=>{class t{constructor(r){this._platformId=r,this.isBrowser=this._platformId?b(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||v)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(e){return new(e||t)(a(d))}}static{this.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var l;function _(){if(l==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>l=!0}))}finally{l=l||!1}return l}function F(t){return _()?t:!!t.capture}var g;function w(){if(g==null){let t=typeof document<"u"?document.head:null;g=!!(t&&(t.createShadowRoot||t.attachShadow))}return g}function B(t){if(w()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function A(t){return t.composedPath?t.composedPath()[0]:t.target}var P=new o("cdk-dir-doc",{providedIn:"root",factory:O});function O(){return h(u)}var x=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function k(t){let i=t?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?x.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var $=(()=>{class t{constructor(r){if(this.value="ltr",this.change=new p,r){let e=r.body?r.body.dir:null,m=r.documentElement?r.documentElement.dir:null;this.value=k(e||m||"ltr")}}ngOnDestroy(){this.change.complete()}static{this.\u0275fac=function(e){return new(e||t)(a(P,8))}}static{this.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Nt=new o("NG_SCROLLBAR_OPTIONS"),Vt=new o("NG_SCROLLBAR_POLYFILL");var jt=new o("NG_SCROLLBAR");var Wt=new o("SCROLLBAR_CONTROL");var Yt=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275mod=c({type:t})}static{this.\u0275inj=s({})}}return t})();export{T as a,F as b,B as c,A as d,$ as e,Yt as f};
1
+ import{a as u,n as b}from"./chunk-DAQCANBV.js";import{Ka as d,ba as n,ca as s,ea as o,ga as a,ha as h,xb as c,za as p}from"./chunk-WCXWWANV.js";var v;try{v=typeof Intl<"u"&&Intl.v8BreakIterator}catch{v=!1}var T=(()=>{class t{constructor(r){this._platformId=r,this.isBrowser=this._platformId?b(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||v)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(e){return new(e||t)(a(d))}}static{this.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var l;function _(){if(l==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>l=!0}))}finally{l=l||!1}return l}function F(t){return _()?t:!!t.capture}var g;function w(){if(g==null){let t=typeof document<"u"?document.head:null;g=!!(t&&(t.createShadowRoot||t.attachShadow))}return g}function B(t){if(w()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function A(t){return t.composedPath?t.composedPath()[0]:t.target}var P=new o("cdk-dir-doc",{providedIn:"root",factory:O});function O(){return h(u)}var x=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function k(t){let i=t?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?x.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var $=(()=>{class t{constructor(r){if(this.value="ltr",this.change=new p,r){let e=r.body?r.body.dir:null,m=r.documentElement?r.documentElement.dir:null;this.value=k(e||m||"ltr")}}ngOnDestroy(){this.change.complete()}static{this.\u0275fac=function(e){return new(e||t)(a(P,8))}}static{this.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Nt=new o("NG_SCROLLBAR_OPTIONS"),Vt=new o("NG_SCROLLBAR_POLYFILL");var jt=new o("NG_SCROLLBAR");var Wt=new o("SCROLLBAR_CONTROL");var Yt=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275mod=c({type:t})}static{this.\u0275inj=s({})}}return t})();export{T as a,F as b,B as c,A as d,$ as e,Yt as f};
@@ -1 +1 @@
1
- import{Wb as n,wb as o}from"./chunk-YVEUYFCE.js";import"./chunk-YQFG5XE2.js";var c=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=o({type:t,selectors:[["app-timeout"]],decls:1,vars:0,consts:[["src","assets/images/background/timeout.svg","alt","timeout"]],template:function(e,s){e&1&&n(0,"img",0)},styles:["[_nghost-%COMP%]{display:block}img[_ngcontent-%COMP%]{height:100vh;width:100%}"],changeDetection:0})}}return t})();export{c as TimeoutComponent};
1
+ import{Wb as n,wb as o}from"./chunk-WCXWWANV.js";import"./chunk-YQFG5XE2.js";var c=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=o({type:t,selectors:[["app-timeout"]],decls:1,vars:0,consts:[["src","assets/images/background/timeout.svg","alt","timeout"]],template:function(e,s){e&1&&n(0,"img",0)},styles:["[_nghost-%COMP%]{display:block}img[_ngcontent-%COMP%]{height:100vh;width:100%}"],changeDetection:0})}}return t})();export{c as TimeoutComponent};
@@ -1,4 +1,4 @@
1
- import{a as G}from"./chunk-YOEPO6LK.js";import{Ka as P,La as A,Ma as H,Na as g,Va as V,ta as z}from"./chunk-BNI5KUDE.js";import{c as R,f as w,g as O,h as N,m as B}from"./chunk-BYD3JK4R.js";import{Ab as k,Cb as c,Ga as x,Jb as D,Kb as r,Ob as $,Ub as f,Vb as u,Xb as b,Yb as v,Zb as y,ba as S,ca as F,ec as _,fc as j,gb as i,gc as h,ha as I,ic as p,kc as d,lc as s,pc as C,qc as Q,ta as T,wb as E,xb as M,xc as q}from"./chunk-YVEUYFCE.js";var K=["header"],L=["title"],U=["subtitle"],W=["content"],X=["footer"],Y=["*",[["p-header"]],[["p-footer"]]],Z=["*","p-header","p-footer"];function ee(e,o){e&1&&y(0)}function te(e,o){if(e&1&&(f(0,"div",8),h(1,1),c(2,ee,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function ne(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.header)}}function ae(e,o){e&1&&y(0)}function ie(e,o){if(e&1&&(f(0,"div",9),c(1,ne,2,1,"ng-container",10)(2,ae,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),i(),r("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function re(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.subheader)}}function oe(e,o){e&1&&y(0)}function le(e,o){if(e&1&&(f(0,"div",11),c(1,re,2,1,"ng-container",10)(2,oe,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),i(),r("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ce(e,o){e&1&&y(0)}function pe(e,o){e&1&&y(0)}function de(e,o){if(e&1&&(f(0,"div",12),h(1,2),c(2,pe,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var se=({dt:e})=>`
1
+ import{a as G}from"./chunk-LMI4DLB5.js";import{Ka as P,La as A,Ma as H,Na as g,Va as V,ta as z}from"./chunk-3GHEXAAZ.js";import{c as R,f as w,g as O,h as N,m as B}from"./chunk-DAQCANBV.js";import{Ab as k,Cb as c,Ga as x,Jb as D,Kb as r,Ob as $,Ub as f,Vb as u,Xb as b,Yb as v,Zb as y,ba as S,ca as F,ec as _,fc as j,gb as i,gc as h,ha as I,jc as p,lc as d,mc as s,qc as C,rc as Q,ta as T,wb as E,xb as M,yc as q}from"./chunk-WCXWWANV.js";var K=["header"],L=["title"],U=["subtitle"],W=["content"],X=["footer"],Y=["*",[["p-header"]],[["p-footer"]]],Z=["*","p-header","p-footer"];function ee(e,o){e&1&&y(0)}function te(e,o){if(e&1&&(f(0,"div",8),h(1,1),c(2,ee,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function ne(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.header)}}function ae(e,o){e&1&&y(0)}function ie(e,o){if(e&1&&(f(0,"div",9),c(1,ne,2,1,"ng-container",10)(2,ae,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),i(),r("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function re(e,o){if(e&1&&(b(0),C(1),v()),e&2){let t=_(2);i(),Q(t.subheader)}}function oe(e,o){e&1&&y(0)}function le(e,o){if(e&1&&(f(0,"div",11),c(1,re,2,1,"ng-container",10)(2,oe,1,0,"ng-container",6),u()),e&2){let t=_();i(),r("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),i(),r("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function ce(e,o){e&1&&y(0)}function pe(e,o){e&1&&y(0)}function de(e,o){if(e&1&&(f(0,"div",12),h(1,2),c(2,pe,1,0,"ng-container",6),u()),e&2){let t=_();i(2),r("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var se=({dt:e})=>`
2
2
  .p-card {
3
3
  background: ${e("card.background")};
4
4
  color: ${e("card.color")};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-K4ALA724.js";import{E as e}from"./chunk-DAQCANBV.js";import{ha as r}from"./chunk-WCXWWANV.js";var s=(n,u)=>{let t=r(o),i=r(e);return!t.isAuthenticated()||t.isTokenExpired()?(i.navigate(["/"],{queryParams:{returnUrl:u.url}}),!1):!0};export{s as a};
@@ -0,0 +1 @@
1
+ import{a as me}from"./chunk-K4ALA724.js";import{b as Se}from"./chunk-VJLO7GNT.js";import{a as z,b as L}from"./chunk-CZWWMQFD.js";import{d as G,i as Ce,j as be,k as $}from"./chunk-CEZEYAWZ.js";import"./chunk-YVGWGEPX.js";import"./chunk-PDNXU4MC.js";import"./chunk-RNOSD5RO.js";import"./chunk-HFUW7PYZ.js";import"./chunk-WWWY3VE7.js";import"./chunk-35ER6BC7.js";import"./chunk-V4IY7RIP.js";import"./chunk-J6H5UCJR.js";import"./chunk-U75O34AW.js";import"./chunk-3RM5CDGW.js";import{b as xe}from"./chunk-7IPVVF6Y.js";import{h as A}from"./chunk-RYHNURUZ.js";import"./chunk-BX74ZLQG.js";import{a as j,b as F}from"./chunk-CNLYDNON.js";import{a as U,b as ue,c as _e,d as fe,e as ge,f as he}from"./chunk-FTI2QPWV.js";import"./chunk-BDJHC5O6.js";import{o as de,w as V,x as H}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import{y as se}from"./chunk-3GHEXAAZ.js";import{a as ce}from"./chunk-R6NK3ROE.js";import{a as pe}from"./chunk-TDMJ2M6W.js";import{F as re,M as le,f as B,k as ae,l as N,m as O,s as oe,u as ie}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{Ac as te,Cb as b,Ga as K,J as W,Jc as S,Kb as C,Kc as v,Lc as ne,Mc as _,Nb as P,Ub as o,Vb as i,Wb as D,X as M,Yc as w,Z as X,_b as T,ba as Y,c as k,cb as Z,dc as R,ec as d,gb as p,ha as f,pa as h,qa as x,qc as r,rc as u,s as Q,uc as J,wb as I,yc as ee,zc as y}from"./chunk-WCXWWANV.js";import{a as m,b as s}from"./chunk-YQFG5XE2.js";var E=(()=>{class t{constructor(){this.httpService=f(ce)}getGenerateCoa(e){let a={params:new oe().set("PageNumber",e.PageNumber).set("RowCount",e.RowCount)};return this.httpService.get(void 0,"api/Tools/GetListCOA",a)}updateCOABalance(e={}){return this.httpService.put(void 0,"api/Tools/UpdateCOABalance",void 0,e)}getUnbalanceJournal(e){return this.httpService.get(void 0,"api/Tools/UnbalanceJurnal/"+e.PageNumber+"/"+e.RowCount)}updateUnbalanceJournal(e){let n={ListID:e};return this.httpService.put(void 0,"api/Tools/RegenerateUnBalanceJournal",n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ke=()=>({height:"calc(100vh - 70px)"}),Me=()=>({"min-width":"50rem"});function Ie(t,l){if(t&1){let e=T();o(0,"p-button",7),R("onClick",function(){h(e);let a=d();return x(a.updateCoaBalance())}),i()}}function Pe(t,l){t&1&&(o(0,"tr")(1,"th"),r(2,"Code"),i(),o(3,"th"),r(4,"Name"),i(),o(5,"th"),r(6,"Outlet"),i(),o(7,"th"),r(8,"COA Balance"),i(),o(9,"th"),r(10,"Correct Balance"),i()())}function De(t,l){if(t&1&&(o(0,"tr")(1,"td"),r(2),i(),o(3,"td"),r(4),i(),o(5,"td"),r(6),i(),o(7,"td"),r(8),S(9,"number"),i(),o(10,"td"),r(11),S(12,"number"),i()()),t&2){let e=l.$implicit;p(2),u(e.Code),p(2),u(e.Name),p(2),u(e.OutletName),p(2),u(v(9,5,e.Balance)),p(3),u(v(12,7,e.CorrectBalance))}}function Je(t,l){if(t&1&&(o(0,"div",10)(1,"p",11),r(2),i()()),t&2){let e=d(3);p(2),J(" Showing ",e.startIndex()," to ",e.endIndex()," of ",e.coaData().count," entries ")}}function Be(t,l){t&1&&(o(0,"tr")(1,"td",12)(2,"span"),r(3,"No records found."),i()()())}function Ne(t,l){if(t&1){let e=T();o(0,"p-panel")(1,"p-table",9),R("onPage",function(a){h(e);let c=d(2);return x(c.onPageChange(a))}),b(2,Pe,11,0,"ng-template",null,2,_)(4,De,13,9,"ng-template",null,3,_)(6,Je,3,3,"ng-template",null,4,_)(8,Be,4,0,"ng-template",null,5,_),i()()}if(t&2){let e=d(2);P(y(10,ke)),p(),C("paginator",!0)("lazy",!0)("totalRecords",e.coaData().count)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("rows",e.pagination().RowCount)("value",e.coaData().data)("tableStyle",y(11,Me))}}function Oe(t,l){if(t&1&&b(0,Ne,10,12,"p-panel",8),t&2){let e=d();C("ngIf",e.coaData())}}var ve=(()=>{class t{constructor(){this.pagination=K({PageNumber:1,RowCount:20}),this.coaService=f(E),this.toastrService=f(pe),this.coaData=K(null),this.fetchCoaData=z(k(W(e=>this.coaService.getGenerateCoa(e).pipe(L({next:n=>this.coaData.set(n),error:n=>console.error(n)}))))),this.startIndex=w(()=>this.pagination()?(this.pagination().PageNumber-1)*this.pagination().RowCount+1:0),this.endIndex=w(()=>this.pagination()?Math.min(this.pagination().PageNumber*this.pagination().RowCount,this.coaData()?.count||0):0)}ngOnInit(){this.fetchCoaData(this.pagination)}onPageChange(e){this.pagination.update(n=>s(m({},n),{PageNumber:Math.floor(e.first/e.rows)+1}))}updateCoaBalance(){this.coaService.updateCOABalance({observe:"response"}).pipe(M(()=>this.coaService.getGenerateCoa(this.pagination())),X(e=>{e instanceof ie&&(this.toastrService.success(e.body?.message,"Success"),this.fetchCoaData(this.pagination))})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["app-tools-update-coa"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Update COA Balance"],["label","Update",3,"onClick"],[3,"style",4,"ngIf"],[3,"onPage","paginator","lazy","totalRecords","scrollable","scrollHeight","rows","value","tableStyle"],[1,"flex","align-items-center","custom-font-footer",2,"height","100%"],[1,"m-0"],["colspan","5"]],template:function(n,a){n&1&&(o(0,"app-main-panel",6),b(1,Ie,1,0,"ng-template",null,0,_)(3,Oe,1,1,"ng-template",null,1,_),i())},dependencies:[A,$,G,xe,O,B,N,H,V,F,j],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit} .p-paginator .p-paginator-pages .p-paginator-page{font-size:14px}.custom-font-footer[_ngcontent-%COMP%]{font-size:.875rem}"],changeDetection:0})}}return t})();var Ve={data:{count:0,data:[]},filter:{PageNumber:1,RowCount:20}},q=ue(he(Ve),_e(t=>({first:w(()=>(t.filter().PageNumber-1)*t.filter().RowCount+1),end:w(()=>Math.min(t.filter().PageNumber*t.filter().RowCount,t.data().count)),selectedItems:w(()=>t.data().data.filter(l=>l.checked)),hasCheckedRows:w(()=>t.data().data.some(l=>l.checked))})),ge(t=>{let l=f(E);return{updateFilter(n){U(t,a=>s(m({},a),{filter:m(m({},a.filter),n)}))},onRowSelect(n){U(t,a=>{let c=a.data.data.map(g=>g.id===n.id?s(m({},g),{checked:!0}):g);return s(m({},a),{data:s(m({},a.data),{data:c})})})},onRowUnselect(n){U(t,a=>{let c=a.data.data.map(g=>g.id===n.id?s(m({},g),{checked:!1}):g);return s(m({},a),{data:s(m({},a.data),{data:c})})})},onHeaderCheckboxToggle(n){U(t,a=>{let c=a.data.data.map(g=>s(m({},g),{checked:n}));return s(m({},a),{data:s(m({},a.data),{data:c})})})},loadData:z(k(M(n=>l.getUnbalanceJournal(n).pipe(Q(a=>s(m({},a),{data:a.data.map(c=>s(m({},c),{checked:!1}))})),L({next:a=>{U(t,c=>s(m({},c),{data:a}))},error:a=>{console.error("Error loading unbalance journal data:",a)}})))))}}),fe(t=>({onInit:()=>{t.loadData(t.filter)}})));var He=()=>({height:"calc(100vh - 70px)"}),je=t=>["/pages/journal/journal-entry",t];function Fe(t,l){if(t&1){let e=T();o(0,"div",8),D(1,"p-button",9),o(2,"p-button",10),R("onClick",function(){h(e);let a=d(2);return x(a.regenerateUnbalanceJournal())}),r(3,"Regenerate"),i()()}}function Ae(t,l){if(t&1&&b(0,Fe,4,0,"div",7),t&2){let e=d();C("ngIf",e.store.hasCheckedRows())}}function ze(t,l){t&1&&(o(0,"tr")(1,"th",12),D(2,"p-tableHeaderCheckbox"),i(),o(3,"th"),r(4,"Date"),i(),o(5,"th"),r(6,"Number"),i(),o(7,"th",13),r(8,"Debit SUM"),i(),o(9,"th",13),r(10,"Credit SUM"),i(),o(11,"th",13),r(12,"Difference"),i(),o(13,"th"),r(14,"Reference"),i(),o(15,"th"),r(16,"Outlet"),i()())}function Le(t,l){if(t&1&&(o(0,"tr")(1,"td"),D(2,"p-tableCheckbox",14),i(),o(3,"td"),r(4),S(5,"date"),i(),o(6,"td")(7,"a",15),r(8),i()(),o(9,"td",13),r(10),S(11,"number"),i(),o(12,"td",13),r(13),S(14,"number"),i(),o(15,"td",13),r(16),S(17,"number"),i(),o(18,"td")(19,"a",16),r(20),i()(),o(21,"td"),r(22),i()()),t&2){let e=l.$implicit,n=d(2);p(2),C("value",e),p(2),u(ne(5,10,e.date,"dd MMM yyyy")),p(3),C("routerLink",te(19,je,e.id)),p(),u(e.number),p(2),u(v(11,13,e.debitSum)),p(3),u(v(14,15,e.creditSum)),p(3),u(v(17,17,e.differences)),p(3),C("href",n.authService.getTenantExternalURL()+"/menu/Orders/Orders/Customer_Invoice/Info?ID="+e.id,Z),p(),u(e.referenceText),p(2),u(e.outletName)}}function Ge(t,l){if(t&1&&r(0),t&2){let e=d(2);J(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function $e(t,l){t&1&&(o(0,"tr")(1,"td",17)(2,"span"),r(3,"No records found."),i()()())}function Ke(t,l){if(t&1){let e=T();o(0,"p-panel")(1,"p-table",11),R("onPage",function(a){h(e);let c=d();return x(c.onPageChange(a))})("onRowSelect",function(a){h(e);let c=d();return x(c.onRowSelect(a))})("onRowUnselect",function(a){h(e);let c=d();return x(c.onRowUnselect(a))})("onHeaderCheckboxToggle",function(a){h(e);let c=d();return x(c.onHeaderCheckboxToggle(a))}),b(2,ze,17,0,"ng-template",null,2,_)(4,Le,23,21,"ng-template",null,3,_)(6,Ge,1,3,"ng-template",null,4,_)(8,$e,4,0,"ng-template",null,5,_),i()()}if(t&2){let e=d();P(y(9,He)),p(),C("value",e.store.data().data)("scrollable",!0)("lazy",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.data().count)}}var Te=(()=>{class t{constructor(){this.store=f(q),this.toolsService=f(E),this.authService=f(me)}onPageChange(e){console.log("Page changed:",e);let n=e.first/e.rows;this.store.updateFilter({PageNumber:n+1})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}regenerateUnbalanceJournal(){let n=this.store.selectedItems().filter(a=>a.checked==!0).map(a=>a.id);this.toolsService.updateUnbalanceJournal(n).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["app-unbalance-journal"]],features:[ee([q])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Unbalance Journal"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger"],[3,"onClick"],["paginatorStyleClass","d-flex justify-content-end","dataKey","id",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","scrollable","lazy","scrollHeight","paginator","rows","totalRecords"],[2,"width","4rem"],[1,"text-end"],[3,"value"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],["colspan","6"]],template:function(n,a){n&1&&(o(0,"app-main-panel",6),b(1,Ae,1,1,"ng-template",null,0,_)(3,Ke,10,10,"ng-template",null,1,_),i())},dependencies:[A,$,G,Ce,be,Se,de,O,B,N,ae,se,H,V,F,j,le,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var zt=[{path:"",redirectTo:"generate-coa",pathMatch:"full"},{path:"generate-coa",component:ve},{path:"unbalance-journal",component:Te}];export{zt as TOOLS_ROUTES};
@@ -0,0 +1 @@
1
+ import{a as x,b as L}from"./chunk-3ZFQSQVU.js";import"./chunk-LWYZZP3I.js";import"./chunk-Y45TAHWD.js";import{a as E,b as V}from"./chunk-W4KTL6Y6.js";import"./chunk-7IPVVF6Y.js";import{h as H}from"./chunk-RYHNURUZ.js";import{b as N,c as G}from"./chunk-BX74ZLQG.js";import{a as R,b as D}from"./chunk-CNLYDNON.js";import"./chunk-FTI2QPWV.js";import"./chunk-BDJHC5O6.js";import{w as j,x as O}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import"./chunk-3GHEXAAZ.js";import"./chunk-R6NK3ROE.js";import{a as I}from"./chunk-TDMJ2M6W.js";import{i as $,m as F}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{Cb as A,Jc as c,Kb as p,Kc as s,Mc as C,Nb as h,Ub as n,V as v,Vb as o,Wb as l,X as T,Z as M,_b as B,dc as y,ec as m,gb as a,h as P,ha as f,pa as g,qa as d,ra as S,s as u,sa as b,wb as k,yc as w,zc as _}from"./chunk-WCXWWANV.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=B();n(0,"div",3)(1,"p-button",4),y("onClick",function(){g(e);let r=m();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),y("onClick",function(){g(e);let r=m();return d(r.migratePaymentAccount())}),o()()}if(i&2){let e=m();a(2),p("disabled",s(3,2,e.countInBooks$)!==0)("pTooltip",s(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),S(),n(5,"svg",8),l(6,"path",9),o(),b(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=m();h(_(12,q)),a(),h(_(13,q)),a(2),p("migrationCount",s(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",s(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(x),this.toastr=f(I),this.refresh$=new P(void 0),this.pageTitle="Payment Account"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getPaymentMethodAccountCount()),M(t=>console.log("API response:",t)),v(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}migratePaymentAccount(){this.migrateService.migratePaymentMethod().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatPaymentAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-payment-account"]],features:[w([x])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),A(1,J,5,6,"ng-template",null,0,C)(3,K,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,$,V,E,D,R,G,N,L,O,j],encapsulation:2})}}return i})();export{ue as PaymentAccountComponent};