dealposbooks 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +28 -28
- package/assets/scss/layouts/dark/_dark.scss +164 -153
- package/assets/scss/style.scss +1 -1
- package/assets/scss/variables/_variables.scss +2 -0
- package/assets/world.json +17808 -1
- package/{chunk-S64TQVWK.js → chunk-2GAPYNNZ.js} +1 -1
- package/chunk-2HYLQR56.js +1 -0
- package/chunk-2VTAWSHV.js +1 -0
- package/chunk-3R4UQAEP.js +1 -0
- package/chunk-3SPHZLLV.js +301 -0
- package/{chunk-CEMQLY34.js → chunk-4EDEITTK.js} +1 -1
- package/{chunk-2ACAW72E.js → chunk-4FHVIHSY.js} +1 -1
- package/{chunk-66DZK3FQ.js → chunk-4OHRBQE4.js} +1 -1
- package/chunk-4OXMK44M.js +1 -0
- package/chunk-4TTJBC5I.js +1 -0
- package/chunk-5CZUTVXD.js +47 -0
- package/{chunk-YT7EC5LI.js → chunk-5M3BH2HK.js} +1 -1
- package/{chunk-NNH4DORM.js → chunk-5MHVGNVO.js} +1 -1
- package/{chunk-VYTUB2DV.js → chunk-63XPN7AG.js} +1 -1
- package/chunk-74EMBNLM.js +1 -0
- package/chunk-75NY4EHJ.js +7 -0
- package/{chunk-ON4N4CPO.js → chunk-7CAU344O.js} +1 -1
- package/chunk-BS6MB7HD.js +1 -0
- package/chunk-C54Z7Z3J.js +246 -0
- package/{chunk-IF72X7RS.js → chunk-CCE4VMYO.js} +1 -1
- package/{chunk-7T6O4KFO.js → chunk-CP57YBBI.js} +1 -1
- package/{chunk-SJTXIIX5.js → chunk-DCES5UJV.js} +1 -1
- package/{chunk-MS3UTNX6.js → chunk-DERWDCI5.js} +1 -1
- package/chunk-EDPSZYHH.js +1 -0
- package/{chunk-TBHL2OSG.js → chunk-ELUESCCC.js} +1 -1
- package/{chunk-CMHZLZ4E.js → chunk-FJ7IM55X.js} +1 -1
- package/{chunk-CEUNPX5D.js → chunk-FNWWNWQP.js} +1 -1
- package/chunk-FOSJHYSQ.js +300 -0
- package/chunk-G4XX7EU2.js +1 -0
- package/chunk-GH3BVHFE.js +1 -0
- package/{chunk-VVC3QQUI.js → chunk-GO3ETPB7.js} +1 -1
- package/chunk-GYI6FJNZ.js +1 -0
- package/{chunk-HZLUYZB3.js → chunk-GYOO2JKC.js} +1 -1
- package/chunk-HF7H6NPN.js +1 -0
- package/chunk-HGUXJRBI.js +1 -0
- package/{chunk-TL6UHPBU.js → chunk-HKFTHGN6.js} +1 -1
- package/{chunk-DWTUKOMR.js → chunk-JBLYOAVS.js} +1 -1
- package/chunk-JDKSRPMM.js +1 -0
- package/chunk-JWPV2SP2.js +59 -0
- package/chunk-K5GIEJY3.js +7 -0
- package/{chunk-QBJKUIXK.js → chunk-KOC7QQ5A.js} +1 -1
- package/{chunk-GLURPAU2.js → chunk-M66SFDOI.js} +1 -1
- package/{chunk-DO2YIWC5.js → chunk-MOGY4H6O.js} +1 -1
- package/{chunk-PATWAZNE.js → chunk-OBBJFGOA.js} +1 -1
- package/{chunk-G7MS6UI4.js → chunk-OPNWLQQY.js} +1 -1
- package/{chunk-35EULUGT.js → chunk-OUJ6CGAI.js} +1 -1
- package/{chunk-AKZM2DMY.js → chunk-OVUTH3B6.js} +1 -1
- package/chunk-OWUXXKGD.js +180 -0
- package/{chunk-R3FUAON5.js → chunk-PAQGWJ3J.js} +1 -1
- package/chunk-PCZW753D.js +1 -0
- package/chunk-PMQ7L7VQ.js +1 -0
- package/chunk-PRVKVHZC.js +1 -0
- package/{chunk-UNNEEFI2.js → chunk-PZRWSIXN.js} +1 -1
- package/{chunk-EKJXB6MV.js → chunk-Q3HG4BLC.js} +2 -2
- package/chunk-QEQCMTMU.js +1 -0
- package/chunk-QMXENXYW.js +1 -0
- package/chunk-R4CV5F66.js +1 -0
- package/{chunk-ABZUNDNB.js → chunk-RJZW77TO.js} +1 -1
- package/{chunk-FNOMC2TM.js → chunk-S6JRFIGG.js} +1 -1
- package/{chunk-F6SXKAYF.js → chunk-TO47DVWB.js} +1 -1
- package/chunk-UHDEQNDX.js +1 -0
- package/{chunk-BLOB7I4P.js → chunk-V4MEQMDJ.js} +3 -3
- package/{chunk-GHZLR44M.js → chunk-VET2QT6C.js} +1 -1
- package/chunk-VHNXAKFS.js +1 -0
- package/chunk-W37QK7Z5.js +520 -0
- package/{chunk-HZ7WPLLK.js → chunk-W56XJVPD.js} +1 -1
- package/chunk-W5VZK5LZ.js +70 -0
- package/chunk-WF2ZEF5P.js +1 -0
- package/{chunk-Q4Y2IGA6.js → chunk-WLFERE5C.js} +1 -1
- package/chunk-WZ5MSCDB.js +1 -0
- package/{chunk-ZBTGGL5M.js → chunk-XFW6LFAM.js} +3 -3
- package/chunk-YAEJRHVD.js +1 -0
- package/chunk-Z5SFK23M.js +960 -0
- package/{chunk-ROX6NFMK.js → chunk-ZQKGNYP5.js} +1 -1
- package/{chunk-26X2X35R.js → chunk-ZZNYX7MX.js} +1 -1
- package/index.html +2 -2
- package/{main-TCYAGQCN.js → main-G22CDQKS.js} +1 -1
- package/package.json +1 -1
- package/styles-ETBLCGC3.css +1 -0
- package/chunk-2VF35PRV.js +0 -7
- package/chunk-6VN6A5B5.js +0 -520
- package/chunk-AER6WLW5.js +0 -1
- package/chunk-AVL6C3VX.js +0 -59
- package/chunk-BPFNN32N.js +0 -1
- package/chunk-C375SLTS.js +0 -246
- package/chunk-C4HBNN2L.js +0 -1
- package/chunk-E2RBYY7Q.js +0 -1
- package/chunk-EFOOUCV3.js +0 -301
- package/chunk-EHULZLLD.js +0 -300
- package/chunk-GFHANKXL.js +0 -1
- package/chunk-GLLO2YQR.js +0 -1
- package/chunk-HZ6QN5ZG.js +0 -7
- package/chunk-I2MAIV44.js +0 -1
- package/chunk-I7T4W6G2.js +0 -47
- package/chunk-JXI4NDYT.js +0 -1
- package/chunk-KHZ5L5UR.js +0 -1
- package/chunk-LAZCPZXL.js +0 -1
- package/chunk-MEKP6D5H.js +0 -1
- package/chunk-NASSFXXN.js +0 -1
- package/chunk-NGKRNFZC.js +0 -1
- package/chunk-NTJQFRIB.js +0 -180
- package/chunk-OCYR2RTP.js +0 -1
- package/chunk-OVJSBJBH.js +0 -197
- package/chunk-P63Q5GYL.js +0 -1
- package/chunk-PGIXMWYT.js +0 -1
- package/chunk-PUEKZGWI.js +0 -1
- package/chunk-R6MI2SDH.js +0 -1
- package/chunk-RA2IZVJ4.js +0 -1
- package/chunk-S6CFVRO6.js +0 -1
- package/chunk-USCTAGKM.js +0 -1
- package/chunk-USO7UKRV.js +0 -821
- package/chunk-UZOBSLZX.js +0 -1
- package/chunk-XCWBG4PB.js +0 -1
- package/styles-H3D5FBL2.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"./chunk-S6JRFIGG.js";import{a as Z,b as ee}from"./chunk-PZRWSIXN.js";import{h as te,j as ne,k as ae,l as oe}from"./chunk-DERWDCI5.js";import"./chunk-FOSJHYSQ.js";import"./chunk-OVUTH3B6.js";import"./chunk-JWPV2SP2.js";import{c as q,d as K}from"./chunk-5CZUTVXD.js";import{g as Y}from"./chunk-OWUXXKGD.js";import"./chunk-W5VZK5LZ.js";import{a as h,b as Q,c as $,d as L,e as W,f as X}from"./chunk-FJ7IM55X.js";import{C as G,D as O}from"./chunk-Z5SFK23M.js";import"./chunk-R4CV5F66.js";import"./chunk-ZZNYX7MX.js";import"./chunk-OUJ6CGAI.js";import"./chunk-FNWWNWQP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-CP57YBBI.js";import{m as D,r as z,s as B,t as F}from"./chunk-DCES5UJV.js";import{Ab as b,Ic as A,Jc as N,Kb as w,Kc as U,Lc as g,Nb as M,Ub as o,Vb as i,Wb as E,X as y,Xc as S,_b as J,c as T,dc as k,ec as u,fb as d,ha as C,pa as x,pc as m,qa as f,qc as _,s as v,tc as H,ub as P,xc as I,yc as V}from"./chunk-K5GIEJY3.js";import{a as r,b as p}from"./chunk-EQDQRRRY.js";var ie={data:{data:[],totalCount:0},filter:{PageNumber:1,PageSize:20,Number:""}},R=Q(X(ie),$(e=>({first:S(()=>(e.filter().PageNumber-1)*e.filter().PageSize+1),end:S(()=>Math.min(e.filter().PageNumber*e.filter().PageSize,e.data().totalCount)),hasCheckedRows:S(()=>e.data().data.some(c=>c.checked)),checkedAdjustment:S(()=>e.data().data.filter(c=>c.checked).map(c=>c.id))})),W(e=>{let c=C(j);return{updateFilter(a){h(e,n=>p(r({},n),{filter:r(r({},n.filter),a)}))},onRowSelect(a){h(e,n=>{let l=n.data.data.map(s=>s.id===a.id?p(r({},s),{checked:!0}):s);return p(r({},n),{data:p(r({},n.data),{data:l})})})},onRowUnselect(a){h(e,n=>{let l=n.data.data.map(s=>s.id===a.id?p(r({},s),{checked:!1}):s);return p(r({},n),{data:p(r({},n.data),{data:l})})})},onHeaderCheckboxToggle(a){h(e,n=>{let l=n.data.data.map(s=>p(r({},s),{checked:a}));return p(r({},n),{data:p(r({},n.data),{data:l})})})},getAdjustmentJournal:Z(T(y(a=>c.getAdjustmentJournal(a).pipe(v(n=>p(r({},n),{data:n.data.map(l=>p(r({},l),{checked:!1}))})),ee({next:n=>{h(e,l=>p(r({},l),{data:n}))},error:n=>{console.error("Error fetching customer invoice:",n)}})))))}}),L(e=>({onInit:()=>{e.getAdjustmentJournal(e.filter)}})));var re=()=>({height:"calc(100vh - 70px)"});function le(e,c){if(e&1){let t=J();o(0,"p-button",8),k("onClick",function(){x(t);let n=u(2);return f(n.generateAdjusmentJournal())}),i()}}function me(e,c){if(e&1&&b(0,le,1,0,"p-button",7),e&2){let t=u();w("ngIf",t.store.hasCheckedRows())}}function pe(e,c){e&1&&(o(0,"tr")(1,"th",10),E(2,"p-tableHeaderCheckbox"),i(),o(3,"th"),m(4,"Outlet"),i(),o(5,"th"),m(6,"Number"),i(),o(7,"th"),m(8,"Date"),i(),o(9,"th"),m(10,"Adjustment Qty"),i(),o(11,"th"),m(12,"Type"),i(),o(13,"th"),m(14,"State"),i(),o(15,"th"),m(16,"Note"),i()())}function ce(e,c){if(e&1&&(o(0,"tr")(1,"td"),E(2,"p-tableCheckbox",11),i(),o(3,"td"),m(4),i(),o(5,"td"),m(6),i(),o(7,"td"),m(8),A(9,"date"),i(),o(10,"td"),m(11),A(12,"number"),i(),o(13,"td"),m(14),i(),o(15,"td"),m(16),i(),o(17,"td"),m(18),i()()),e&2){let t=c.$implicit;d(2),w("value",t),d(2),_(t.outlet),d(2),_(t.number),d(2),_(U(9,8,t.date,"d MMM y")),d(3),_(N(12,11,t.quantitySUM)),d(3),_(t.type),d(2),_(t.state),d(2),_(t.note)}}function de(e,c){if(e&1&&m(0),e&2){let t=u(2);H(" Showing ",t.store.first()," to ",t.store.end()," of ",t.store.data().totalCount," entries ")}}function se(e,c){e&1&&(o(0,"tr")(1,"td",12)(2,"span"),m(3,"No records found."),i()()())}function ue(e,c){if(e&1){let t=J();o(0,"p-panel")(1,"p-table",9),k("onRowSelect",function(n){x(t);let l=u();return f(l.onRowSelect(n))})("onRowUnselect",function(n){x(t);let l=u();return f(l.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){x(t);let l=u();return f(l.onHeaderCheckboxToggle(n))})("onPage",function(n){x(t);let l=u();return f(l.onPageChange(n))}),b(2,pe,17,0,"ng-template",null,2,g)(4,ce,19,13,"ng-template",null,3,g)(6,de,1,3,"ng-template",null,4,g)(8,se,4,0,"ng-template",null,5,g),i()()}if(e&2){let t=u();M(V(9,re)),d(),w("value",t.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 150px)")("paginator",!0)("rows",t.store.filter().PageSize)("totalRecords",t.store.data().totalCount)("lazy",!0)}}var Ne=(()=>{class e{constructor(){this.store=C(R),this.generateJournalService=C(j)}onRowSelect(t){this.store.onRowSelect(t.data)}onRowUnselect(t){if(Array.isArray(t.data)){t.data.forEach(a=>{this.store.onRowUnselect(a)});return}else this.store.onRowUnselect(t.data)}onHeaderCheckboxToggle(t){this.store.onHeaderCheckboxToggle(t.checked)}onPageChange(t){let a=t.first/t.rows;this.store.updateFilter(p(r({},this.store.filter()),{PageNumber:a+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=P({type:e,selectors:[["app-adjustment-journal"]],features:[I([R])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Adjustment"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"],["colspan","8"]],template:function(a,n){a&1&&(o(0,"app-main-panel",6),b(1,me,1,1,"ng-template",null,0,g)(3,ue,10,10,"ng-template",null,1,g),i())},dependencies:[Y,oe,te,ne,ae,F,D,B,z,K,q,O,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{Ne as AdjustmentJournalComponent};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import{C as ce,D as se,n as j}from"./chunk-Z5SFK23M.js";import{a as pe}from"./chunk-ZZNYX7MX.js";import{ca as $,ja as ae,ka as le,la as A,ta as re}from"./chunk-OUJ6CGAI.js";import{c as oe,d as D,f as Q,g as O,h as H}from"./chunk-F2X3VGZZ.js";import{j as Y,m as ee,n as te,o as ne,t as ie}from"./chunk-DCES5UJV.js";import{Ab as c,Ac as J,Bc as U,Jb as u,Kb as o,Lc as X,Ob as h,Ub as s,Uc as V,Vb as _,Wb as g,Xb as k,Yb as F,Zb as M,_b as E,ba as q,ca as N,dc as S,ec as d,fb as l,fc as L,gc as B,ha as R,ic as b,jc as G,kc as m,lc as f,pa as I,pc as K,qa as x,qc as Z,ra as w,sa as y,ub as v,vb as W,xc as z,ya as P,yb as C,zc as T}from"./chunk-K5GIEJY3.js";var _e=(()=>{class e extends j{static \u0275fac=(()=>{let t;return function(n){return(t||(t=y(e)))(n||e)}})();static \u0275cmp=v({type:e,selectors:[["MinusIcon"]],features:[C],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(i,n){i&1&&(w(),s(0,"svg",0),g(1,"path",1),_()),i&2&&(h(n.getClassNames()),u("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role))},encapsulation:2})}return e})();var ue=(()=>{class e extends j{pathId;ngOnInit(){this.pathId="url(#"+$()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=y(e)))(n||e)}})();static \u0275cmp=v({type:e,selectors:[["PlusIcon"]],features:[C],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,n){i&1&&(w(),s(0,"svg",0)(1,"g"),g(2,"path",1),_(),s(3,"defs")(4,"clipPath",2),g(5,"rect",3),_()()()),i&2&&(h(n.getClassNames()),u("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),l(),u("clip-path",n.pathId),l(3),o("id",n.pathId))},encapsulation:2})}return e})();var fe=["header"],he=["icons"],be=["content"],ye=["footer"],ve=["headericons"],Ce=["contentWrapper"],Te=["*",[["p-header"]],[["p-footer"]]],Ie=["*","p-header","p-footer"],xe=(e,a)=>({"p-panel p-component":!0,"p-panel-toggleable":e,"p-panel-expanded":a}),we=e=>({transitionParams:e,height:"0",opacity:"0"}),Pe=e=>({value:"hidden",params:e}),ke=e=>({transitionParams:e,height:"*",opacity:"1"}),Fe=e=>({value:"visible",params:e}),Me=(e,a,t)=>({"p-panel-icons-start":e,"p-panel-icons-end":a,"p-panel-icons-center":t}),Ee=e=>({$implicit:e});function Se(e,a){if(e&1&&(s(0,"span",12),K(1),_()),e&2){let t=d(2);u("id",t.id+"_header"),l(),Z(t._header)}}function Be(e,a){e&1&&M(0)}function Ve(e,a){}function De(e,a){e&1&&c(0,Ve,0,0,"ng-template")}function Qe(e,a){if(e&1&&g(0,"span"),e&2){let t=d(6);h(t.expandIcon)}}function Oe(e,a){e&1&&g(0,"MinusIcon")}function He(e,a){if(e&1&&(k(0),c(1,Qe,1,2,"span",16)(2,Oe,1,0,"MinusIcon",14),F()),e&2){let t=d(5);l(),o("ngIf",t.expandIcon),l(),o("ngIf",!t.expandIcon)}}function $e(e,a){if(e&1&&g(0,"span"),e&2){let t=d(6);h(t.collapseIcon)}}function Ae(e,a){e&1&&g(0,"PlusIcon")}function je(e,a){if(e&1&&(k(0),c(1,$e,1,2,"span",16)(2,Ae,1,0,"PlusIcon",14),F()),e&2){let t=d(5);l(),o("ngIf",t.collapseIcon),l(),o("ngIf",!t.collapseIcon)}}function qe(e,a){if(e&1&&(k(0),c(1,He,3,2,"ng-container",14)(2,je,3,2,"ng-container",14),F()),e&2){let t=d(4);l(),o("ngIf",!t.collapsed),l(),o("ngIf",t.collapsed)}}function Ne(e,a){}function Re(e,a){e&1&&c(0,Ne,0,0,"ng-template")}function We(e,a){if(e&1&&c(0,qe,3,2,"ng-container",14)(1,Re,1,0,null,15),e&2){let t=d(3);o("ngIf",!t.headerIconsTemplate&&!t._headerIconsTemplate&&!(t.toggleButtonProps!=null&&t.toggleButtonProps.icon)),l(),o("ngTemplateOutlet",t.headerIconsTemplate||t._headerIconsTemplate)("ngTemplateOutletContext",T(3,Ee,t.collapsed))}}function Le(e,a){if(e&1){let t=E();s(0,"p-button",13),S("click",function(n){I(t);let r=d(2);return x(r.onIconClick(n))})("keydown",function(n){I(t);let r=d(2);return x(r.onKeyDown(n))}),c(1,We,2,5,"ng-template",null,1,X),_()}if(e&2){let t=d(2);o("text",!0)("rounded",!0)("buttonProps",t.toggleButtonProps),u("id",t.id+"_header")("aria-label",t.buttonAriaLabel)("aria-controls",t.id+"_content")("aria-expanded",!t.collapsed)}}function Ge(e,a){if(e&1){let t=E();s(0,"div",8),S("click",function(n){I(t);let r=d();return x(r.onHeaderClick(n))}),c(1,Se,2,2,"span",9),B(2,1),c(3,Be,1,0,"ng-container",6),s(4,"div",10),c(5,De,1,0,null,6)(6,Le,3,7,"p-button",11),_()()}if(e&2){let t=d();u("id",t.id+"-titlebar"),l(),o("ngIf",t._header),l(2),o("ngTemplateOutlet",t.headerTemplate||t._headerTemplate),l(),o("ngClass",U(6,Me,t.iconPos==="start",t.iconPos==="end",t.iconPos==="center")),l(),o("ngTemplateOutlet",t.iconTemplate||t._iconTemplate),l(),o("ngIf",t.toggleable)}}function Ke(e,a){e&1&&M(0)}function Ze(e,a){e&1&&M(0)}function ze(e,a){if(e&1&&(s(0,"div",17),B(1,2),c(2,Ze,1,0,"ng-container",6),_()),e&2){let t=d();l(2),o("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var Je=({dt:e})=>`
|
|
2
|
+
.p-panel {
|
|
3
|
+
border: 1px solid ${e("panel.border.color")};
|
|
4
|
+
border-radius: ${e("panel.border.radius")};
|
|
5
|
+
background: ${e("panel.background")};
|
|
6
|
+
color: ${e("panel.color")};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.p-panel-header {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: ${e("panel.header.padding")};
|
|
14
|
+
background: ${e("panel.header.background")};
|
|
15
|
+
color: ${e("panel.header.color")};
|
|
16
|
+
border-style: solid;
|
|
17
|
+
border-width: ${e("panel.header.border.width")};
|
|
18
|
+
border-color: ${e("panel.header.border.color")};
|
|
19
|
+
border-radius: ${e("panel.header.border.radius")};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.p-panel-toggleable .p-panel-header {
|
|
23
|
+
padding: ${e("panel.toggleable.header.padding")};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.p-panel-title {
|
|
27
|
+
line-height: 1;
|
|
28
|
+
font-weight: ${e("panel.title.font.weight")};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.p-panel-content {
|
|
32
|
+
padding: ${e("panel.content.padding")};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.p-panel-footer {
|
|
36
|
+
padding: ${e("panel.footer.padding")};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* For PrimeNG */
|
|
40
|
+
.p-panel-toggleable.p-panel-expanded > .p-panel-content-container:not(.ng-animating) {
|
|
41
|
+
overflow: visible
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.p-panel-toggleable .p-panel-content-container {
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
`,Ue={root:({props:e})=>["p-panel p-component",{"p-panel-toggleable":e.toggleable}],header:"p-panel-header",title:"p-panel-title",headerActions:"p-panel-header-actions",pcToggleButton:"p-panel-toggle-button",contentContainer:"p-panel-content-container",content:"p-panel-content",footer:"p-panel-footer"},ge=(()=>{class e extends re{name="panel";theme=Je;classes=Ue;static \u0275fac=(()=>{let t;return function(n){return(t||(t=y(e)))(n||e)}})();static \u0275prov=q({token:e,factory:e.\u0275fac})}return e})();var Xe=(()=>{class e extends pe{toggleable;_header;collapsed;style;styleClass;iconPos="end";expandIcon;collapseIcon;showHeader=!0;toggler="icon";transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)";toggleButtonProps;collapsedChange=new P;onBeforeToggle=new P;onAfterToggle=new P;footerFacet;animating;headerTemplate;iconTemplate;contentTemplate;footerTemplate;headerIconsTemplate;_headerTemplate;_iconTemplate;_contentTemplate;_footerTemplate;_headerIconsTemplate;contentWrapperViewChild;id=$("pn_id_");get buttonAriaLabel(){return this._header}_componentStyle=R(ge);onHeaderClick(t){this.toggler==="header"&&this.toggle(t)}onIconClick(t){this.toggler==="icon"&&this.toggle(t)}toggle(t){if(this.animating)return!1;this.animating=!0,this.onBeforeToggle.emit({originalEvent:t,collapsed:this.collapsed}),this.toggleable&&(this.collapsed?this.expand():this.collapse()),this.cd.markForCheck(),t.preventDefault()}expand(){this.collapsed=!1,this.collapsedChange.emit(this.collapsed),this.updateTabIndex()}collapse(){this.collapsed=!0,this.collapsedChange.emit(this.collapsed),this.updateTabIndex()}getBlockableElement(){return this.el.nativeElement.children[0]}updateTabIndex(){this.contentWrapperViewChild&&this.contentWrapperViewChild.nativeElement.querySelectorAll('input, button, select, a, textarea, [tabindex]:not([tabindex="-1"])').forEach(i=>{this.collapsed?i.setAttribute("tabindex","-1"):i.removeAttribute("tabindex")})}onKeyDown(t){(t.code==="Enter"||t.code==="Space")&&(this.toggle(t),t.preventDefault())}onToggleDone(t){this.animating=!1,this.onAfterToggle.emit({originalEvent:t,collapsed:this.collapsed})}templates;ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;case"icons":this._iconTemplate=t.template;break;case"headericons":this._headerIconsTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=y(e)))(n||e)}})();static \u0275cmp=v({type:e,selectors:[["p-panel"]],contentQueries:function(i,n,r){if(i&1&&(b(r,ae,5),b(r,fe,4),b(r,he,4),b(r,be,4),b(r,ye,4),b(r,ve,4),b(r,le,4)),i&2){let p;m(p=f())&&(n.footerFacet=p.first),m(p=f())&&(n.headerTemplate=p.first),m(p=f())&&(n.iconTemplate=p.first),m(p=f())&&(n.contentTemplate=p.first),m(p=f())&&(n.footerTemplate=p.first),m(p=f())&&(n.headerIconsTemplate=p.first),m(p=f())&&(n.templates=p)}},viewQuery:function(i,n){if(i&1&&G(Ce,5),i&2){let r;m(r=f())&&(n.contentWrapperViewChild=r.first)}},inputs:{toggleable:[2,"toggleable","toggleable",V],_header:[0,"header","_header"],collapsed:[2,"collapsed","collapsed",V],style:"style",styleClass:"styleClass",iconPos:"iconPos",expandIcon:"expandIcon",collapseIcon:"collapseIcon",showHeader:[2,"showHeader","showHeader",V],toggler:"toggler",transitionOptions:"transitionOptions",toggleButtonProps:"toggleButtonProps"},outputs:{collapsedChange:"collapsedChange",onBeforeToggle:"onBeforeToggle",onAfterToggle:"onAfterToggle"},features:[z([ge]),C],ngContentSelectors:Ie,decls:8,vars:25,consts:[["contentWrapper",""],["icon",""],[3,"ngClass","ngStyle"],["class","p-panel-header",3,"click",4,"ngIf"],["role","region",1,"p-panel-content-container",3,"id"],[1,"p-panel-content"],[4,"ngTemplateOutlet"],["class","p-panel-footer",4,"ngIf"],[1,"p-panel-header",3,"click"],["class","p-panel-title",4,"ngIf"],[1,"p-panel-icons",3,"ngClass"],["severity","secondary","type","button","role","button","styleClass","p-panel-header-icon p-panel-toggler p-link",3,"text","rounded","buttonProps","click","keydown",4,"ngIf"],[1,"p-panel-title"],["severity","secondary","type","button","role","button","styleClass","p-panel-header-icon p-panel-toggler p-link",3,"click","keydown","text","rounded","buttonProps"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class",4,"ngIf"],[1,"p-panel-footer"]],template:function(i,n){if(i&1){let r=E();L(Te),s(0,"div",2),c(1,Ge,7,10,"div",3),s(2,"div",4),S("@panelContent.done",function(me){return I(r),x(n.onToggleDone(me))}),s(3,"div",5,0),B(5),c(6,Ke,1,0,"ng-container",6),_(),c(7,ze,3,1,"div",7),_()()}i&2&&(h(n.styleClass),o("ngClass",J(14,xe,n.toggleable,!n.collapsed&&n.toggleable))("ngStyle",n.style),u("id",n.id)("data-pc-name","panel"),l(),o("ngIf",n.showHeader),l(),o("id",n.id+"_content")("@panelContent",n.collapsed?T(19,Pe,T(17,we,n.animating?n.transitionOptions:"0ms")):T(23,Fe,T(21,ke,n.animating?n.transitionOptions:"0ms"))),u("aria-labelledby",n.id+"_header")("aria-hidden",n.collapsed)("tabindex",n.collapsed?"-1":void 0),l(4),o("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),l(),o("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[ie,Y,ee,ne,te,ue,_e,se,ce,A],encapsulation:2,data:{animation:[oe("panelContent",[O("hidden",Q({height:"0"})),O("void",Q({height:"{{height}}"}),{params:{height:"0"}}),O("visible",Q({height:"*"})),H("visible <=> hidden",[D("{{transitionParams}}")]),H("void => hidden",D("{{transitionParams}}")),H("void => visible",D("{{transitionParams}}"))])]},changeDetection:0})}return e})(),wt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=W({type:e});static \u0275inj=N({imports:[Xe,A,A]})}return e})();export{_e as a,ue as b,Xe as c,wt as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as i,w as r}from"./chunk-
|
|
1
|
+
import{n as i,w as r}from"./chunk-CP57YBBI.js";import"./chunk-DCES5UJV.js";import{Wb as n,ub as o}from"./chunk-K5GIEJY3.js";import"./chunk-EQDQRRRY.js";var c=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=o({type:e,selectors:[["app-blank-layout"]],decls:1,vars:0,template:function(t,a){t&1&&n(0,"router-outlet")},dependencies:[r,i],encapsulation:2})}}return e})();export{c as BlankComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n}from"./chunk-
|
|
1
|
+
import{d as n}from"./chunk-FNWWNWQP.js";import{V as i,ba as o,ha as a}from"./chunk-K5GIEJY3.js";import{a as c}from"./chunk-EQDQRRRY.js";var C=(()=>{class r{constructor(){this.httpService=a(n)}getChartOfAccountLoader(){return this.httpService.get("","api/ChartOfAccountLoader")}getPaginatedChartAccounts(t){let e=c({},t);return this.httpService.post("","api/ChartOfAccount/GetPaginatedList",e)}getChartAccountForm(){return this.httpService.get("","api/ChartOfAccount/Form")}getChartAccountById(t){return this.httpService.get("",`api/ChartOfAccount/Info/${t}`)}getChartAccountFormById(t){return this.httpService.get("",`api/ChartOfAccount/Form/${t}`)}submitChartAccount(t,e={}){return this.httpService.post("","api/ChartOfAccount/Submit",t,e)}deleteChartAccount(t){if(t.length>1){let e={body:t};return this.httpService.delete("","api/ChartOfAccount/Batch",e)}else return this.httpService.delete("",`api/ChartOfAccount/${t[0]}`)}fetchCategoryOptions(){return this.httpService.get("","api/ChartOfAccount/CategoryOptions")}getCachedCategoriesOptions(){return this.categoryOptionsCache$||(this.categoryOptionsCache$=this.fetchCategoryOptions().pipe(i(1))),this.categoryOptionsCache$}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{C as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as H}from"./chunk-Z5SFK23M.js";import{a as G}from"./chunk-R4CV5F66.js";import{a as U}from"./chunk-ZZNYX7MX.js";import{ka as q,la as w,ta as P}from"./chunk-OUJ6CGAI.js";import{j as N,n as j,o as R,t as z}from"./chunk-DCES5UJV.js";import{Ab as m,Jb as g,Kb as s,Nb as F,Ob as E,Pb as I,Ub as h,Uc as p,Vb as f,Vc as x,Zb as L,_b as O,aa as v,ba as $,ca as C,dc as y,ec as A,fb as a,ha as _,ic as k,jc as B,kc as d,lc as u,pa as r,qa as c,sa as b,ub as S,vb as V,xc as D,ya as T,yb as M,zc as Q}from"./chunk-K5GIEJY3.js";var Y=["handle"],Z=["input"],ee=e=>({checked:e});function te(e,K){e&1&&L(0)}function ie(e,K){if(e&1&&m(0,te,1,0,"ng-container",4),e&2){let i=A();s("ngTemplateOutlet",i.handleTemplate||i._handleTemplate)("ngTemplateOutletContext",Q(2,ee,i.checked()))}}var oe=({dt:e})=>`
|
|
2
2
|
.p-toggleswitch {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
width: ${e("toggleswitch.width")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-EDPSZYHH.js";import"./chunk-FNWWNWQP.js";import"./chunk-F2X3VGZZ.js";import{o as r}from"./chunk-CP57YBBI.js";import"./chunk-DCES5UJV.js";import{ha as e}from"./chunk-K5GIEJY3.js";import"./chunk-EQDQRRRY.js";var a=()=>{let t=e(o),i=e(r);return!t.isAuthenticated()||t.isTokenExpired()?(i.navigate(["authentication/login"]),!1):!0};var d=[{path:"",canActivate:[a],children:[{path:"",loadComponent:()=>import("./chunk-Q3HG4BLC.js").then(t=>t.Dashboard1Component),data:{title:"Dashboard",headerTemplate:"header"}}]}];export{d as DashboardRoutes};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as ve}from"./chunk-2GAPYNNZ.js";import{a as Ct,b as Te,c as Le}from"./chunk-ZQKGNYP5.js";import{b as vt}from"./chunk-63XPN7AG.js";import{a as De}from"./chunk-EDPSZYHH.js";import{a as ht}from"./chunk-5MHVGNVO.js";import{a as Se,b as Ce,d as xt,e as St}from"./chunk-KOC7QQ5A.js";import"./chunk-7CAU344O.js";import"./chunk-VET2QT6C.js";import{a as z}from"./chunk-2VTAWSHV.js";import{c as Fe,d as Re}from"./chunk-TO47DVWB.js";import{a as N,b as q}from"./chunk-PZRWSIXN.js";import{b as fe,c as ge,f as ft,g as gt,h as he,l as xe}from"./chunk-DERWDCI5.js";import{g as we}from"./chunk-FOSJHYSQ.js";import"./chunk-OVUTH3B6.js";import{e as dt}from"./chunk-JWPV2SP2.js";import{c as ae,d as le}from"./chunk-5CZUTVXD.js";import{b as _e}from"./chunk-OPNWLQQY.js";import{f as _t,g as ue}from"./chunk-OWUXXKGD.js";import"./chunk-W5VZK5LZ.js";import{a as w,b as pe,c as me,d as ce,e as se,f as de,g as ut}from"./chunk-FJ7IM55X.js";import{C as oe,D as re}from"./chunk-Z5SFK23M.js";import{c as at,e as J,f as Q,g as lt,h as B,j as X,l as Z,o as ee,q as pt,s as Ie,v as te}from"./chunk-R4CV5F66.js";import"./chunk-ZZNYX7MX.js";import"./chunk-OUJ6CGAI.js";import{a as ct,d as st}from"./chunk-FNWWNWQP.js";import"./chunk-F2X3VGZZ.js";import{c as rt,m as mt,p as ie,w as ne}from"./chunk-CP57YBBI.js";import{j as nt,m as Ee,r as ot,s as H,t as $}from"./chunk-DCES5UJV.js";import{Ab as C,D as be,Fa as F,Hb as Je,Ib as Qe,Ic as x,Jc as S,Kb as c,Kc as tt,Lc as s,Nb as P,Pb as k,Qb as Xe,Sb as Ze,Tb as et,Ub as i,V as Ue,Vb as n,W as Ke,Wb as v,X as A,Xc as R,Yc as it,Z as W,_b as M,ba as He,bb as $e,c as G,dc as L,ec as u,fb as l,ha as h,pa as b,pc as o,qa as E,qc as d,rc as V,s as ze,ub as T,uc as Y,vc as j,wc as U,xc as K,yc as D,zc as I}from"./chunk-K5GIEJY3.js";import{a as g,b as y,c as Ve,e as Ye}from"./chunk-EQDQRRRY.js";var O=(()=>{class t{constructor(){this.httpService=h(st),this.authService=h(De)}fetchGeneralLedgerLoader(e={}){return this.httpService.post(void 0,"api/GeneralLedgerLoader/GetFilter",e)}fetchGeneralLedgerReport(e){return this.httpService.post(void 0,"api/GeneralLedger/Get",e)}exportGeneralLedger(e){let a={responseType:"blob"};return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,a)}getCustomerSuggestions(e){let a={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:a})}getSupplierSuggestions(e){let a={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:a})}getCashierSuggestions(e){let a={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:a})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e){let a=g({},e),m=new rt;return Object.keys(a).forEach(f=>{m=m.set(f,String(a[f]))}),this.httpService.get(void 0,"/api/BalanceSheet",{params:m})}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e))}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=He({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var At={metadata:{filter:{categoryID:"",from:new Date().toISOString(),to:new Date().toISOString(),iDs:[],outletIDs:[]},options:{accounts:[],outlets:[]},roles:{isInEmptyOutletRole:!1}},items:{data:[],pageTitle:""},filter:{listAccountID:[],categoryID:null,OutletID:[],ContactID:null,from:null,to:null}},Me=pe(de(At),ut("General Ledger Store"),me(t=>({hasData:R(()=>Array.isArray(t.items().data)&&t.items().data.length>0)})),se(t=>{let p=h(O),e={updateFilter:a=>{w(t,r=>y(g({},r),{filter:a}))},loadList:N(G(be(a=>Array.isArray(a.listAccountID)&&a.listAccountID.length>0),A(a=>p.fetchGeneralLedgerReport(a).pipe(q({next:r=>{w(t,m=>y(g({},m),{items:r}))},error:r=>{console.error(r)}}))))),loadLoader:N(G(A(a=>p.fetchGeneralLedgerLoader(a).pipe(q({next:r=>{w(t,m=>y(g({},m),{metadata:r,filter:y(g({},m.filter),{categoryID:r.filter.categoryID})})),e.loadList(t.filter)},error:r=>{console.error(r)}}))),z("res")))};return e}),ce({onInit:t=>{t.loadLoader({})}}));function yt(t,p,e="application/octet-stream"){let a=new Blob([t],{type:e}),r=window.URL.createObjectURL(a),m=document.createElement("a");m.href=r,m.download=p,document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(r)}var Nt=()=>({height:"calc(100vh - 70px)"}),qt=()=>({height:"calc(100vh - 100px)"}),Wt=t=>["/journal/journal-entry/",t],Yt=t=>({"ng-invalid ng-dirty":t}),zt=()=>({scrollHeight:"250px"});function Ut(t,p){if(t&1){let e=M();i(0,"div",11)(1,"a",12),o(2,"Return to Accounts"),n(),i(3,"p-button",13),L("onClick",function(){b(e);let r=u();return E(r.onExport())}),n()()}}function Kt(t,p){if(t&1&&(i(0,"div",11)(1,"span",16)(2,"h3",17),o(3),n()(),i(4,"span",16)(5,"h3",17),o(6),n()()()),t&2){let e=u().$implicit;l(3),d(e.name),l(3),V(" (",e.chartOfAccountCode,") ")}}function Ht(t,p){t&1&&(i(0,"tr")(1,"th"),o(2,"Outlet"),n(),i(3,"th"),o(4,"No."),n(),i(5,"th"),o(6,"Date"),n(),i(7,"th"),o(8,"Name"),n(),i(9,"th"),o(10,"Description"),n(),i(11,"th"),o(12,"Debit"),n(),i(13,"th"),o(14,"Credit"),n(),i(15,"th"),o(16,"Balance"),n()())}function $t(t,p){if(t&1&&(i(0,"tr")(1,"td",18),o(2,"Starting Balance"),n(),i(3,"td",19),o(4),x(5,"number"),n()(),i(6,"tr")(7,"td"),o(8),n(),i(9,"td")(10,"a",20),o(11),n()(),i(12,"td"),o(13),x(14,"date"),n(),i(15,"td")(16,"a",21),o(17),n()(),v(18,"td"),i(19,"td",19),o(20),x(21,"number"),n(),i(22,"td",19),o(23),x(24,"number"),n(),i(25,"td",19),o(26),x(27,"number"),n()()),t&2){let e=p.$implicit,a=u().$implicit,r=u(3);l(4),V(" ",S(5,10,a.startBalance)," "),l(4),d(e.outletName),l(2),c("routerLink",I(21,Wt,e.id)),l(),d(e.number),l(2),d(tt(14,12,e.date,"dd MMM yyyy")),l(3),c("href",r.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,$e),l(),d(e.contactName),l(3),d(S(21,15,e.debitAmount)),l(3),d(S(24,17,e.creditAmount)),l(3),d(S(27,19,e.balance))}}function Jt(t,p){if(t&1&&(i(0,"tr"),v(1,"td",22),i(2,"td",23),o(3,"Total"),n(),i(4,"td",23),o(5),x(6,"number"),n(),i(7,"td",23),o(8),x(9,"number"),n(),v(10,"td"),n()),t&2){let e=u(4);l(5),V(" ",S(6,2,e.store.items().data[0].debitTotal)," "),l(3),V(" ",S(9,4,e.store.items().data[0].creditTotal)," ")}}function Qt(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),o(3,"No records found."),n()()())}function Xt(t,p){if(t&1&&(i(0,"p-table",15),C(1,Kt,7,2,"ng-template",null,3,s)(3,Ht,17,0,"ng-template",null,4,s)(5,$t,28,23,"ng-template",null,5,s)(7,Jt,11,6,"ng-template",null,6,s)(9,Qt,4,0,"ng-template",null,7,s),n()),t&2){let e=p.$implicit;c("value",e.data)("scrollable",!0)}}function Zt(t,p){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel"),Ze(2,Xt,11,2,"p-table",15,Xe),n()()),t&2){let e=u(2);P(D(4,Nt)),l(),P(D(5,qt)),l(),et(e.store.items().data)}}function ei(t,p){if(t&1&&C(0,Zt,4,6,"p-panel",14),t&2){let e=u();c("ngIf",e.store.items()&&e.store.items().data.length)}}function ti(t,p){if(t&1&&(i(0,"div",11)(1,"div",16)(2,"span",40),o(3),n()(),i(4,"div")(5,"span"),o(6,"-"),n()(),i(7,"div",16)(8,"span",41),o(9),n()()()),t&2){let e=p.$implicit;l(3),V("(",e.code,")"),l(6),d(e.name)}}function ii(t,p){if(t&1&&(i(0,"div",11)(1,"div",16)(2,"span",40),o(3),n()(),i(4,"div")(5,"span"),o(6,"-"),n()(),i(7,"div",16)(8,"span",41),o(9),n()()()),t&2){let e=p.$implicit;l(3),V("(",e.code,")"),l(6),d(e.name)}}function ni(t,p){if(t&1&&(i(0,"div",42)(1,"div"),o(2),n()()),t&2){let e=p.$implicit;l(2),d(e.value)}}function oi(t,p){if(t&1){let e=M();i(0,"div",26)(1,"label",27),o(2,"Customer"),n(),i(3,"p-autocomplete",43),L("completeMethod",function(r){b(e);let m=u(2);return E(m.searchCustomer(r))}),n()()}if(t&2){let e=u(2);l(3),c("suggestions",e.customerSuggestions())}}function ri(t,p){if(t&1){let e=M();i(0,"div",26)(1,"label",27),o(2,"Supplier"),n(),i(3,"p-autocomplete",43),L("completeMethod",function(r){b(e);let m=u(2);return E(m.searchSupplier(r))}),n()()}if(t&2){let e=u(2);l(3),c("suggestions",e.supplierSuggestions())}}function ai(t,p){if(t&1){let e=M();i(0,"form",25)(1,"div",26)(2,"label",27),o(3,"Accounts"),n(),i(4,"p-multiselect",28),L("onChange",function(r){b(e);let m=u();return E(m.onAccountChange(r))}),C(5,ti,10,2,"ng-template",null,8,s)(7,ii,10,2,"ng-template",null,9,s),n()(),i(9,"div",26)(10,"label",27),o(11,"From"),n(),v(12,"p-datepicker",29),n(),i(13,"div",26)(14,"label",27),o(15,"To"),n(),v(16,"p-datepicker",30),n(),i(17,"div",26)(18,"label",27),o(19,"Outlets"),n(),i(20,"p-multiselect",31),C(21,ni,3,1,"ng-template",null,9,s),n()(),i(23,"div",26)(24,"label",27),o(25,"Category"),n(),i(26,"p-treeselect",32),L("onFocus",function(){b(e);let r=u();return E(r.onCategoryFocus())}),n()(),i(27,"div",26)(28,"label",33),o(29,"Contact Type"),n(),i(30,"div",34)(31,"div",35),v(32,"p-radiobutton",36),i(33,"label",37),o(34,"Customer"),n()(),i(35,"div",35),v(36,"p-radiobutton",38),i(37,"label",39),o(38,"Supplier"),n()()()(),C(39,oi,4,1,"div",26)(40,ri,4,1,"div",26),n()}if(t&2){let e=u();c("formGroup",e.generalLedgerFilterForm),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("maxlength",5)("options",e.store.metadata().options.accounts)("ngClass",I(20,Yt,e.generalLedgerFilterForm.get("listAccountID").invalid&&e.generalLedgerFilterForm.get("listAccountID").touched||e.generalLedgerFilterForm.get("listAccountID").dirty)),l(8),c("iconDisplay","input")("showIcon",!0),l(4),c("iconDisplay","input")("showIcon",!0),l(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets),l(6),c("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",D(22,zt))("options",e.categoriesOptions()),l(6),c("value",0),l(4),c("value",1),l(3),k(e.generalLedgerFilterForm.get("contactType").value?40:39)}}var Be=function(t){return t[t.Customer=0]="Customer",t[t.Supplier=1]="Supplier",t}(Be||{}),Lt=(()=>{class t{constructor(){this.dialogFilterVisible=F(!1),this.reportService=h(O),this.coaService=h(ht),this.authService=h(De),this.store=h(Me),this.categoriesOptions=F([]),this.customerSuggestions=F([]),this.supplierSuggestions=F([]),this.route=h(mt),this.dayjsService=h(ve),this.initDialogVisible=F(!0),this.fb=h(Ie),this.toastr=h(ct),this.contactTypeControl=new B(Be.Customer)}ngOnInit(){this.generateFilterForm(),this.route.queryParamMap.pipe(ze(e=>e.get("id")),W(e=>{e&&(this.initDialogVisible.update(a=>!a),this.generalLedgerFilterForm.patchValue({listAccountID:[e]}),this.store.updateFilter(y(g({},this.store.filter()),{listAccountID:[e]})))})).subscribe(),this.generalLedgerFilterForm.patchValue({from:new Date})}onAccountChange(e){console.log("Account Change Event:",e),Array.isArray(e.value)&&e.value.length>5&&this.toastr.warning("Please select at least 5 accounts for the general ledger report.","Warning")}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(z("getCachedCategoriesOptions"),W(e=>this.categoriesOptions.set(e))).subscribe()}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({listAccountID:new B([],[at.required]),categoryID:new B(null),OutletID:new B([]),ContactID:new B(""),from:new B(new Date),to:new B(new Date),contactType:[Be.Customer]})}onFilterEvent(e){console.log(e),this.dialogFilterVisible.update(a=>!a)}onFilterOKEvent(){let f=this.generalLedgerFilterForm.value,{from:e,to:a}=f,r=Ve(f,["from","to"]);if(this.generalLedgerFilterForm.invalid){this.generalLedgerFilterForm.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let m={categoryID:r.categoryID?.key??null,ContactID:r.ContactID.length?r.ContactID:null,OutletID:r.OutletID.length?r.OutletID:null,listAccountID:r.listAccountID,from:this.dayjsService.from(e)?this.dayjsService.from(e).format():null,to:this.dayjsService.from(a)?this.dayjsService.from(a).format():null};this.dialogFilterVisible.update(_=>!_),this.store.updateFilter(m),this.dialogFilterVisible.set(!1)}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(W(a=>this.customerSuggestions.set(a))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(W(a=>this.supplierSuggestions.set(a))).subscribe()}onExport(){let f=this.generalLedgerFilterForm.value,{from:e,to:a}=f,r=Ve(f,["from","to"]),m={categoryID:r.categoryID?.key??null,ContactID:r.ContactID.length?r.ContactID:null,OutletID:r.OutletID.length?r.OutletID:null,listAccountID:r.listAccountID,from:this.dayjsService.from(e)?this.dayjsService.from(e).format():null,to:this.dayjsService.from(a)?this.dayjsService.from(a).format():null};this.reportService.exportGeneralLedger(m).pipe(z("exportGeneralLedger"),W(_=>{yt(_,`general-ledger-${this.dayjsService.now.format("D-MM-YYYY")}.${_.type.split("/")[1]}`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")})).subscribe()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-report-general-ledger"]],features:[K([Me])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["caption",""],["header",""],["body",""],["footer",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["routerLink","/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined"],["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"],["colspan","7",1,"text-end"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],["colspan","4"],[1,"text-end","fw-semibold"],["colspan","8"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["showClear","","filter","","filterBy","code,name","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","maxlength","options","ngClass"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","formControlName","OutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","filter","","filterBy","label","formControlName","categoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],[1,"d-flex","gap-3"],[1,"d-flex","align-items-center","gap-2"],["name","contactType","formControlName","contactType","inputId","customer",3,"value"],["for","customer",1,"m-0"],["name","contactType","formControlName","contactType","inputId","supplier",3,"value"],["for","supplier",1,"m-0"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(a,r){if(a&1){let m=M();i(0,"app-main-panel",10),U("isDialogFilterVisibleChange",function(_){return b(m),j(r.dialogFilterVisible,_)||(r.dialogFilterVisible=_),E(_)})("isInitDialogFilterVisibleChange",function(_){return b(m),j(r.initDialogVisible,_)||(r.initDialogVisible=_),E(_)}),L("filterConfirmed",function(){return b(m),E(r.onFilterOKEvent())}),C(1,Ut,4,0,"ng-template",null,0,s)(3,ei,1,1,"ng-template",null,1,s)(5,ai,41,23,"ng-template",null,2,s),n()}a&2&&(c("pageTitle",r.store.items().pageTitle.length?r.store.items().pageTitle:"General Ledger"),Y("isDialogFilterVisible",r.dialogFilterVisible),c("isFilterable",!0),Y("isInitDialogFilterVisible",r.initDialogVisible))},dependencies:[ue,$,nt,Ee,H,ot,_e,xe,he,_t,re,oe,we,ge,fe,Le,Te,te,X,J,Q,pt,Z,ee,Ce,Se,Re,Fe,dt,St,xt,vt,le,ae,ne,ie,gt,ft],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:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},ke=pe(de(li),me(t=>{let p={totalCOGS:R(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((a,r)=>a+(r?.Amount??0),0):0}),totalRevenue:R(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((a,r)=>a+(r?.amount??0),0):0}),totalExpense:R(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((a,r)=>a+(r?.Amount??0),0):0}),grossProfit:R(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?p.totalRevenue()-p.totalCOGS():0),profitOrLoss:R(()=>p.totalRevenue()-p.totalCOGS()-p.totalExpense()),isDataEmpty:R(()=>Object.keys(t.data()?.data??{}).length===0)};return p}),se(t=>{let p=h(O),e=h(ve),a={updateFilter(r){w(t,m=>y(g({},m),{filter:g(g({},m.filter),r)}))},getLoader:N(G(A(()=>p.getIncomeStatementLoader().pipe(q({next:r=>{w(t,m=>y(g({},m),{loader:r,filter:y(g({},m.filter),{from:e.now.format(),to:e.from(r.filter.to).format()})})),a.getIncomeStatement(t.filter)},error:r=>{console.error(r)}}))))),getIncomeStatement:N(G(A(r=>p.getIncomeStatement(r).pipe(Ke(()=>w(t,m=>y(g({},m),{isLoading:!0}))),q({next:m=>{w(t,f=>y(g({},f),{data:m,isLoading:!1}))},error:m=>{console.error(m)}})))))};return a}),ce({onInit:t=>{t.getLoader()}}));var pi=()=>[Ee,H,he,ae,import("./chunk-GH3BVHFE.js").then(t=>t.ScrollPanel),ie],mi=()=>({height:"calc(100vh - 70px)"}),ci=()=>({height:"calc(100vh - 150px)"}),Oe=t=>["/chart-of-account/account/",t],Ge=()=>["/report/general-ledger"],Ae=t=>({id:t});function si(t,p){t&1&&(i(0,"div",8),v(1,"p-button",9),n())}function di(t,p){t&1&&(i(0,"tr")(1,"th",14),o(2,"Code"),n(),i(3,"th",15),o(4,"Name"),n(),i(5,"th",16),o(6,"Total"),n()())}function ui(t,p){if(t&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"a",17),o(5),n()(),i(6,"td",16)(7,"a",18),o(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),d(e.code),l(2),c("routerLink",I(8,Oe,e.accountID)),l(),d(e.name),l(2),c("routerLink",D(10,Ge))("queryParams",I(11,Ae,e.accountID)),l(),d(S(9,6,e.amount))}}function _i(t,p){if(t&1&&(i(0,"tr"),v(1,"td",19),i(2,"td",20)(3,"div",21)(4,"span",22),o(5,"Total Revenue :"),n(),i(6,"span",23),o(7),x(8,"number"),n()()()()),t&2){let e=u(5);l(7),d(S(8,1,e.store.totalRevenue()))}}function fi(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),o(3,"No revenue records available"),n()()())}function gi(t,p){if(t&1&&(i(0,"h6",12),o(1,"Revenue"),n(),i(2,"p-table",13),C(3,di,7,0,"ng-template",null,3,s)(5,ui,10,13,"ng-template",null,4,s)(7,_i,9,3,"ng-template",null,5,s)(9,fi,4,0,"ng-template",null,6,s),n()),t&2){let e,a=u(4);l(2),c("value",(e=a.store.data())==null||e.data==null?null:e.data.revenue)}}function hi(t,p){t&1&&(i(0,"tr")(1,"th",14),o(2,"Code"),n(),i(3,"th",15),o(4,"Name"),n(),i(5,"th",25),o(6,"Total"),n()())}function xi(t,p){if(t&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"a",17),o(5),n()(),i(6,"td",16)(7,"a",18),o(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),d(e.Code),l(2),c("routerLink",I(8,Oe,e.AccountID)),l(),d(e.Name),l(2),c("routerLink",D(10,Ge))("queryParams",I(11,Ae,e.AccountID)),l(),d(S(9,6,e.Amount))}}function Si(t,p){if(t&1&&(i(0,"tr"),v(1,"td",26),i(2,"td",20)(3,"div",21)(4,"span",22),o(5,"Total COGS :"),n(),i(6,"span",23),o(7),x(8,"number"),n()()()(),i(9,"tr"),v(10,"td",26),i(11,"td",20)(12,"div",21)(13,"span",22),o(14,"Gross Profit :"),n(),i(15,"span",23),o(16),x(17,"number"),n()()()()),t&2){let e=u(5);l(7),d(S(8,2,e.store.totalCOGS())),l(9),d(S(17,4,e.store.grossProfit()))}}function Ci(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),o(3,"No COGS records available"),n()()())}function vi(t,p){if(t&1&&(i(0,"h4",12),o(1,"COGS"),n(),i(2,"p-table",13),C(3,hi,7,0,"ng-template",null,3,s)(5,xi,10,13,"ng-template",null,4,s)(7,Si,18,6,"ng-template",null,5,s)(9,Ci,4,0,"ng-template",null,6,s),n()),t&2){let e,a=u(4);l(2),c("value",(e=a.store.data())==null||e.data==null?null:e.data.cogs)}}function yi(t,p){t&1&&(i(0,"tr")(1,"th",14),o(2,"Code"),n(),i(3,"th",15),o(4,"Name"),n(),i(5,"th",16),o(6,"Total"),n()())}function bi(t,p){if(t&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"a",17),o(5),n()(),i(6,"td",16)(7,"a",18),o(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),d(e.Code),l(2),c("routerLink",I(8,Oe,e.AccountID)),l(),d(e.Name),l(2),c("routerLink",D(10,Ge))("queryParams",I(11,Ae,e.AccountID)),l(),d(S(9,6,e.Amount))}}function Ei(t,p){if(t&1&&(i(0,"tr"),v(1,"td",26),i(2,"td",20)(3,"div",21)(4,"span",22),o(5,"Total Expense :"),n(),i(6,"span",23),o(7),x(8,"number"),n()()()(),i(9,"tr"),v(10,"td",26),i(11,"td",20)(12,"div",21)(13,"span",22),o(14,"Profit / Loss :"),n(),i(15,"span",23),o(16),x(17,"number"),n()()()()),t&2){let e=u(5);l(7),d(S(8,2,e.store.totalExpense())),l(9),d(S(17,4,e.store.profitOrLoss()))}}function Ii(t,p){t&1&&(i(0,"tr")(1,"td",24)(2,"span"),o(3,"No expense records available"),n()()())}function Di(t,p){if(t&1&&(i(0,"h4",12),o(1,"Expense"),n(),i(2,"p-table",13),C(3,yi,7,0,"ng-template",null,3,s)(5,bi,10,13,"ng-template",null,4,s)(7,Ei,18,6,"ng-template",null,5,s)(9,Ii,4,0,"ng-template",null,6,s),n()),t&2){let e,a=u(4);l(2),c("value",(e=a.store.data())==null||e.data==null?null:e.data.expense)}}function Fi(t,p){if(t&1&&(i(0,"p-scroll-panel")(1,"div",11),C(2,gi,11,1)(3,vi,11,1)(4,Di,11,1),n()()),t&2){let e=u(3);P(D(5,ci)),l(2),k(e.Object.keys(e.store.data().data).length>0?2:-1),l(),k(e.Object.keys(e.store.data().data.cogs).length>0?3:-1),l(),k(e.Object.keys(e.store.data().data.expense).length>0?4:-1)}}function Ri(t,p){if(t&1&&(i(0,"p-panel"),C(1,Fi,5,6,"p-scroll-panel",10),n()),t&2){let e=u(2);P(D(3,mi)),l(),c("ngIf",e.store.data())}}function wi(t,p){if(t&1&&(C(0,Ri,2,4),Je(1,0,pi)),t&2){let e=u();l(),Qe(!e.store.isDataEmpty())}}function Ti(t,p){if(t&1){let e=M();i(0,"form",27)(1,"div",28)(2,"label",29),o(3,"Outlet"),n(),v(4,"p-multiselect",30),n(),i(5,"div",28)(6,"label",29),o(7,"Cashier"),n(),i(8,"p-autocomplete",31),L("completeMethod",function(r){b(e);let m=u();return E(m.onCashierSearch(r))}),n()(),i(9,"div",28)(10,"label",29),o(11,"From"),n(),v(12,"p-datepicker",32),n(),i(13,"div",28)(14,"label",29),o(15,"To"),n(),v(16,"p-datepicker",33),n()()}if(t&2){let e=u();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())}}var Vt=(()=>{class t{constructor(){this.dayjsService=h(ve),this.store=h(ke),this.fb=h(Ie),this.reportService=h(O),this.isInitDialogFilterVisible=F(!1),this.dialogFilterVisible=F(!1),this.cashierSuggestions=F([]),this.Object=Object,it(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm()}onSearch(e){this.store.updateFilter(y(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(z("Cashier Suggestions"),W(a=>this.cashierSuggestions.set(a))).subscribe()}initForm(){let e=this.store.filter();this.formFilter=this.fb.group({EntityID:this.fb.control(e.EntityID??[]),CashierID:this.fb.control(e.CashierID??null),Text:this.fb.control(e.Text??""),from:this.fb.control(e.from?this.dayjsService.from(e.from).toDate():null),to:this.fb.control(e.to?this.dayjsService.from(e.to).toDate():null)})}onFilterOK(){let e=this.formFilter.getRawValue(),a=Object.entries(e).reduce((r,[m,f])=>(m==="from"||m==="to"?f instanceof Date&&(r[m]=this.dayjsService.from(f).format()):m==="CashierID"?r[m]=Object.prototype.hasOwnProperty.call("Key",f)?f.Key:null:r[m]=f||null,r),{});this.store.updateFilter(g(g({},this.store.filter()),a)),this.dialogFilterVisible.update(r=>!r),console.log("body",e)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-report-income-statement"]],features:[K([ke])],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","search","filterConfirmed","isFilterable","pageTitle","isDialogFilterVisible","isInitDialogFilterVisible","isSearchableInput"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export"],[3,"style",4,"ngIf"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-bolder"],[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-10"],[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","styleClass","w-100","inputStyleClass","w-100","field","Value","placeholder","Search a cashier",3,"completeMethod","showClear","suggestions"],["formControlName","from","styleClass","w-100","appendTo","body"],["formControlName","to","styleClass","w-100","appendTo","body"]],template:function(a,r){if(a&1){let m=M();i(0,"app-main-panel",7),U("isDialogFilterVisibleChange",function(_){return b(m),j(r.dialogFilterVisible,_)||(r.dialogFilterVisible=_),E(_)})("isInitDialogFilterVisibleChange",function(_){return b(m),j(r.isInitDialogFilterVisible,_)||(r.isInitDialogFilterVisible=_),E(_)}),L("search",function(_){return b(m),E(r.onSearch(_))})("filterConfirmed",function(){return b(m),E(r.onFilterOK())}),C(1,si,2,0,"ng-template",null,0,s)(3,wi,3,1,"ng-template",null,1,s)(5,Ti,17,7,"ng-template",null,2,s),n()}a&2&&(c("isFilterable",!0)("pageTitle",r.store.data().pageTitle),Y("isDialogFilterVisible",r.dialogFilterVisible)("isInitDialogFilterVisible",r.isInitDialogFilterVisible),c("isSearchableInput",!0))},dependencies:[ue,$,we,ge,fe,te,X,J,Q,Z,ee,Ce,Se,_e,xe,le,ne,Le,Te,re,oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Pe=Ye(Ct());var Li={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,Pe.default)().format("YYYY-MM-DD"),listOutletParam:[]}},je=pe(de(Li),me(t=>({totalAsset:R(()=>t.data().asset.reduce((p,e)=>p+ +e.amount,0)),totalLiability:R(()=>t.data().liability.reduce((p,e)=>p+ +e.amount,0)),totalEquity:R(()=>t.data().equity.reduce((p,e)=>p+ +e.amount,0))})),se(t=>{let p=h(O),e={updateFilter:a=>{w(t,r=>y(g({},r),{filter:a}))},fetchBalanceSheet:N(G(be(()=>{let a=t.filter();return Object.entries(a).every(([r,m])=>m!=null&&m!=="")}),A(a=>p.getBalanceSheet(a).pipe(q({next:r=>{w(t,m=>y(g({},m),{data:r}))},error:r=>{console.error(r)}}))),Ue(1))),fetchLoader:N(G(A(()=>p.getBalanceSheetLoader().pipe(q({next:a=>{w(t,r=>y(g({},r),{metadata:a,filter:{date:(0,Pe.default)(a.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:a=>{console.error(a)}})))))};return e}),ce(t=>({onInit:()=>{t.fetchLoader()}})));var Mt=Ye(Ct());var Vi=()=>({height:"calc(100vh - 70px)"}),Mi=()=>({height:"calc(100vh - 100px)"}),Ne=t=>["/chart-of-account/account/",t],qe=()=>["/report/general-ledger"],We=t=>({id:t});function Bi(t,p){t&1&&(i(0,"div",9),v(1,"p-button",10),n())}function ki(t,p){t&1&&(i(0,"tr")(1,"th",14),o(2,"Code"),n(),i(3,"th"),o(4,"Asset"),n(),i(5,"th",15),o(6,"Total"),n()())}function Oi(t,p){if(t&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"a",16),o(5),n()(),i(6,"td",17)(7,"a",18),o(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),d(e.code),l(2),c("routerLink",I(8,Ne,e.accountID)),l(),d(e.name),l(2),c("routerLink",D(10,qe))("queryParams",I(11,We,e.accountID)),l(),d(S(9,6,e.amount))}}function Gi(t,p){if(t&1&&(i(0,"tr")(1,"td",19),o(2,"Total Asset"),n(),i(3,"td",20),o(4),x(5,"number"),n()()),t&2){let e=u(3);l(4),V(" ",S(5,1,e.store.totalAsset())," ")}}function Ai(t,p){t&1&&(i(0,"tr")(1,"td",21)(2,"span"),o(3,"No asset records found."),n()()())}function Pi(t,p){if(t&1&&(i(0,"h4",12),o(1,"Asset"),n(),i(2,"p-table",13),C(3,ki,7,0,"ng-template",null,3,s)(5,Oi,10,13,"ng-template",null,4,s)(7,Gi,6,3,"ng-template",null,5,s)(9,Ai,4,0,"ng-template",null,6,s),n()),t&2){let e=u(2);l(2),c("value",e.store.data().asset)}}function ji(t,p){t&1&&(i(0,"tr")(1,"th",14),o(2,"Code"),n(),i(3,"th"),o(4,"Liability"),n(),i(5,"th",15),o(6,"Total"),n()())}function Ni(t,p){if(t&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"a",22),o(5),n()(),i(6,"td",17)(7,"a",18),o(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),d(e.code),l(2),c("routerLink",I(8,Ne,e.accountID)),l(),d(e.name),l(2),c("routerLink",D(10,qe))("queryParams",I(11,We,e.accountID)),l(),d(S(9,6,e.amount))}}function qi(t,p){if(t&1&&(i(0,"tr")(1,"td",19),o(2," Total Liability "),n(),i(3,"td",20),o(4),x(5,"number"),n()()),t&2){let e=u(3);l(4),V(" ",S(5,1,e.store.totalLiability())," ")}}function Wi(t,p){t&1&&(i(0,"tr")(1,"td",21)(2,"span"),o(3,"No liability records found."),n()()())}function Yi(t,p){if(t&1&&(i(0,"h4",12),o(1,"Liability"),n(),i(2,"p-table",13),C(3,ji,7,0,"ng-template",null,3,s)(5,Ni,10,13,"ng-template",null,4,s)(7,qi,6,3,"ng-template",null,5,s)(9,Wi,4,0,"ng-template",null,6,s),n()),t&2){let e=u(2);l(2),c("value",e.store.data().liability)}}function zi(t,p){t&1&&(i(0,"tr")(1,"th",14),o(2,"Code"),n(),i(3,"th"),o(4,"Equity"),n(),i(5,"th",15),o(6,"Total"),n()())}function Ui(t,p){if(t&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"a",16),o(5),n()(),i(6,"td",17)(7,"a",18),o(8),x(9,"number"),n()()()),t&2){let e=p.$implicit;l(2),d(e.code),l(2),c("routerLink",I(8,Ne,e.accountID)),l(),d(e.name),l(2),c("routerLink",D(10,qe))("queryParams",I(11,We,e.accountID)),l(),d(S(9,6,e.amount))}}function Ki(t,p){if(t&1&&(i(0,"tr")(1,"td",19),o(2,"Total Equity"),n(),i(3,"td",20),o(4),x(5,"number"),n()(),i(6,"tr")(7,"td",19),o(8," Total Liability + Equity "),n(),i(9,"td",20),o(10),x(11,"number"),n()()),t&2){let e=u(3);l(4),V(" ",S(5,2,e.store.totalEquity())," "),l(6),V(" ",S(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function Hi(t,p){t&1&&(i(0,"tr")(1,"td",21)(2,"span"),o(3,"No equity records found."),n()()())}function $i(t,p){if(t&1&&(i(0,"h4",23),o(1,"Equity"),n(),i(2,"p-table",13),C(3,zi,7,0,"ng-template",null,3,s)(5,Ui,10,13,"ng-template",null,4,s),o(7," <"),C(8,Ki,12,6,"ng-template",null,5,s)(10,Hi,4,0,"ng-template",null,6,s),n()),t&2){let e=u(2);l(2),c("value",e.store.data().equity)}}function Ji(t,p){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel")(2,"div",11),C(3,Pi,11,1)(4,Yi,11,1)(5,$i,12,1),n()()()),t&2){let e=u();P(D(7,Vi)),l(),P(D(8,Mi)),l(2),k(e.Object.keys(e.store.data().asset).length>0?3:-1),l(),k(e.Object.keys(e.store.data().liability).length>0?4:-1),l(),k(e.Object.keys(e.store.data().equity).length>0?5:-1)}}function Qi(t,p){if(t&1&&(i(0,"div",29)(1,"div"),o(2),n()()),t&2){let e=p.$implicit;l(2),d(e.value)}}function Xi(t,p){if(t&1&&(i(0,"form",24)(1,"div",25)(2,"label",26),o(3,"Outlet"),n(),i(4,"p-multiselect",27),C(5,Qi,3,1,"ng-template",null,7,s),n()(),i(7,"div",25)(8,"label",26),o(9,"From"),n(),v(10,"p-datepicker",28),n()()),t&2){let e=u();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 Bt=(()=>{class t{constructor(){this.store=h(je),this.dialogFilterVisible=F(!1),this.isInitDialogFilterVisible=F(!1),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new lt({date:new B(new Date),outletID:new B([])})}onFilterOKEvent(){let{date:e,outletID:a}=this.filterForm.value;this.store.updateFilter({date:(0,Mt.default)(e).format("YYYY-MM-DD"),listOutletParam:a}),this.dialogFilterVisible.update(r=>!r)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-report-balance-sheet"]],features:[K([je])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-bolder"],[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,""],["target","_blank",1,"link","link-primary","d-flex","align-items-center",3,"routerLink"],[1,"fs-5","fw-semibold"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","display","chip","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"flex","items-center","gap-2"]],template:function(a,r){if(a&1){let m=M();i(0,"app-main-panel",8),U("isDialogFilterVisibleChange",function(_){return b(m),j(r.dialogFilterVisible,_)||(r.dialogFilterVisible=_),E(_)})("isInitDialogFilterVisibleChange",function(_){return b(m),j(r.isInitDialogFilterVisible,_)||(r.isInitDialogFilterVisible=_),E(_)}),L("filterConfirmed",function(){return b(m),E(r.onFilterOKEvent())}),C(1,Bi,2,0,"ng-template",null,0,s)(3,Ji,6,9,"ng-template",null,1,s)(5,Xi,11,7,"ng-template",null,2,s),n()}a&2&&(c("pageTitle",r.store.data().pageTitle)("isFilterable",!0),Y("isDialogFilterVisible",r.dialogFilterVisible)("isInitDialogFilterVisible",r.isInitDialogFilterVisible))},dependencies:[ue,$,H,xe,he,_e,re,oe,te,X,J,Q,Z,ee,Ce,Se,ge,fe,Re,Fe,le,ae,ne,ie],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(a,r){a&1&&(i(0,"p"),o(1,"report-comparative-balance works!"),n(),o(2,`
|
|
2
|
+
,
|
|
3
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ot=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(a,r){a&1&&(i(0,"p"),o(1,"report-cash-flow works!"),n(),o(2,`
|
|
4
|
+
,
|
|
5
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Gt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(a,r){a&1&&(i(0,"p"),o(1,"report-trial-balance works!"),n(),o(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:Lt},{path:"income-statement",component:Vt},{path:"balance-sheet",component:Bt},{path:"comparative-balance",component:kt},{path:"trial-balance",component:Gt},{path:"cash-flow",component:Ot}]}];export{mr as REPORTS_ROUTES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-
|
|
1
|
+
import{a as ee}from"./chunk-VET2QT6C.js";import{a as Z}from"./chunk-ZZNYX7MX.js";import{ka as W,la as y,ma as X,ta as Y}from"./chunk-OUJ6CGAI.js";import{j as H,m as U,o as G,t as J}from"./chunk-DCES5UJV.js";import{Ab as m,Jb as _,Kb as c,Lb as j,Lc as L,Nb as z,Ob as f,Ub as h,Uc as q,Vb as g,Wb as A,Xb as x,Yb as I,_b as u,ba as $,bb as P,ca as E,dc as d,ec as r,fb as p,fc as O,gc as R,ha as V,ic as w,kc as T,lc as k,oa as M,oc as B,pa as s,pc as N,qa as l,qc as Q,sa as C,ub as S,vb as D,xc as K,ya as b,yb as F}from"./chunk-K5GIEJY3.js";var ne=["removeicon"],te=["*"];function oe(e,a){if(e&1){let i=u();h(0,"img",4),d("error",function(t){s(i);let o=r();return l(o.imageError(t))}),g()}if(e&2){let i=r();c("src",i.image,P)("alt",i.alt)}}function re(e,a){if(e&1&&A(0,"span",6),e&2){let i=r(2);f(i.icon),c("ngClass","p-chip-icon"),_("data-pc-section","icon")}}function ce(e,a){if(e&1&&m(0,re,1,4,"span",5),e&2){let i=r();c("ngIf",i.icon)}}function ae(e,a){if(e&1&&(h(0,"div",7),N(1),g()),e&2){let i=r();_("data-pc-section","label"),p(),Q(i.label)}}function pe(e,a){if(e&1){let i=u();h(0,"span",11),d("click",function(t){s(i);let o=r(3);return l(o.close(t))})("keydown",function(t){s(i);let o=r(3);return l(o.onKeydown(t))}),g()}if(e&2){let i=r(3);f(i.removeIcon),c("ngClass","p-chip-remove-icon"),_("data-pc-section","removeicon")("aria-label",i.removeAriaLabel)}}function se(e,a){if(e&1){let i=u();h(0,"TimesCircleIcon",12),d("click",function(t){s(i);let o=r(3);return l(o.close(t))})("keydown",function(t){s(i);let o=r(3);return l(o.onKeydown(t))}),g()}if(e&2){let i=r(3);f("p-chip-remove-icon"),_("data-pc-section","removeicon")("aria-label",i.removeAriaLabel)}}function le(e,a){if(e&1&&(x(0),m(1,pe,1,5,"span",9)(2,se,1,4,"TimesCircleIcon",10),I()),e&2){let i=r(2);p(),c("ngIf",i.removeIcon),p(),c("ngIf",!i.removeIcon)}}function me(e,a){}function _e(e,a){e&1&&m(0,me,0,0,"ng-template")}function he(e,a){if(e&1){let i=u();h(0,"span",13),d("click",function(t){s(i);let o=r(2);return l(o.close(t))})("keydown",function(t){s(i);let o=r(2);return l(o.onKeydown(t))}),m(1,_e,1,0,null,14),g()}if(e&2){let i=r(2);_("data-pc-section","removeicon")("aria-label",i.removeAriaLabel),p(),c("ngTemplateOutlet",i.removeIconTemplate||i._removeIconTemplate)}}function ge(e,a){if(e&1&&(x(0),m(1,le,3,2,"ng-container",3)(2,he,2,3,"span",8),I()),e&2){let i=r();p(),c("ngIf",!i.removeIconTemplate&&!i._removeIconTemplate),p(),c("ngIf",i.removeIconTemplate||i._removeIconTemplate)}}var fe=({dt:e})=>`
|
|
2
2
|
.p-chip {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk-4OXMK44M.js";import{g as v}from"./chunk-OWUXXKGD.js";import"./chunk-W5VZK5LZ.js";import"./chunk-FJ7IM55X.js";import"./chunk-Z5SFK23M.js";import"./chunk-R4CV5F66.js";import"./chunk-ZZNYX7MX.js";import"./chunk-OUJ6CGAI.js";import{a as x}from"./chunk-FNWWNWQP.js";import"./chunk-F2X3VGZZ.js";import"./chunk-CP57YBBI.js";import{t as h}from"./chunk-DCES5UJV.js";import{Ab as g,Lc as p,Ub as i,Vb as o,_b as C,dc as l,ec as u,ha as a,pa as m,pc as c,qa as s,ub as _,xc as d}from"./chunk-K5GIEJY3.js";import"./chunk-EQDQRRRY.js";function b(t,A){if(t&1){let e=C();i(0,"div",3)(1,"button",4),l("click",function(){m(e);let r=u();return s(r.onFormatCOA())}),c(2,"Format"),o(),i(3,"button",5),l("click",function(){m(e);let r=u();return s(r.onMigrateCoaAccount())}),c(4," Migrate "),o()()}}function M(t,A){t&1&&(i(0,"div",6),c(1," reserved for future User Interface (UI) enhancements\\ "),o())}var y=(()=>{class t{constructor(){this.migrateService=a(f),this.toastr=a(x)}onMigrateCoaAccount(){this.migrateService.migrateCoaAccount().subscribe(e=>{this.toastr.success(e.message,"Migration Successful")})}onFormatCOA(){this.migrateService.formatManualCOA().subscribe(e=>{this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=_({type:t,selectors:[["app-chart-of-account"]],features:[d([f])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Migration"],[1,"d-flex","gap-2"],[1,"btn","btn-danger",3,"click"],[1,"btn","btn-primary",3,"click"],[1,"container","d-flex","justify-content-center","align-items-center",2,"height","100vh"]],template:function(n,r){n&1&&(i(0,"app-main-panel",2),g(1,b,5,0,"ng-template",null,0,p)(3,M,2,0,"ng-template",null,1,p),o())},dependencies:[v,h],encapsulation:2})}}return t})();export{y as ChartOfAccountComponent};
|