1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2068],{14448:(b,g,c)=>{c.r(g),c.d(g,{AllInvoicesPageModule:()=>$});var d=c(91368),v=c(44716),s=c(83068),u=c(89192),p=c(73448),t=c(32116),I=c(94984),C=c(36032),f=c(45552);function O(n,a){if(1&n){const e=t.KQA();t.I0R(0,"tr")(1,"td",14),t.qCj("click",function(){const r=t.usT(e).$implicit,l=t.GaO(2);return t.CGJ(l.showInvoiceDetails(r))}),t.OEk(2),t.C$Y(),t.I0R(3,"td"),t.OEk(4),t.C$Y(),t.I0R(5,"td"),t.OEk(6),t.C$Y(),t.I0R(7,"td"),t.OEk(8),t.C$Y(),t.I0R(9,"td"),t.OEk(10),t.C$Y(),t.I0R(11,"td"),t.OEk(12),t.C$Y(),t.I0R(13,"td"),t.OEk(14),t.C$Y(),t.I0R(15,"td")(16,"ion-button",15),t.qCj("click",function(){const r=t.usT(e).$implicit,l=t.GaO(2);return t.CGJ(l.payInvoice(r.invoice_pdf))}),t.OEk(17,"Download"),t.C$Y()()()}if(2&n){const e=a.$implicit,o=t.GaO(2);t.yG2(2),t.cNF(e.number),t.yG2(2),t.cNF(e.customer_name),t.yG2(2),t.cNF(o.getYear(e.created)),t.yG2(2),t.oRS("$ ",e.amount_due/100,""),t.yG2(2),t.cNF(o.getDateOnly(e.created)),t.yG2(2),t.cNF(e.paymentDate||"-"),t.yG2(2),t.cNF(e.status.toUpperCase())}}function m(n,a){if(1&n){const e=t.KQA();t.I0R(0,"div",4)(1,"div",5)(2,"div")(3,"div",6)(4,"ion-button",7),t.qCj("click",function(){t.usT(e);const i=t.GaO();return t.CGJ(i.refreshInvoices())}),t.wR5(5,"ion-icon",8),t.OEk(6," Refresh "),t.C$Y()(),t.I0R(7,"table")(8,"thead")(9,"tr")(10,"th"),t.OEk(11,"Invoice Number"),t.C$Y(),t.I0R(12,"th"),t.OEk(13,"Customer Name"),t.C$Y(),t.I0R(14,"th"),t.OEk(15,"Year"),t.C$Y(),t.I0R(16,"th"),t.OEk(17,"Total Amount"),t.C$Y(),t.I0R(18,"th"),t.OEk(19,"Invoice Date"),t.C$Y(),t.I0R(20,"th"),t.OEk(21,"Payment Date"),t.C$Y(),t.I0R(22,"th"),t.OEk(23,"Invoice Status"),t.C$Y(),t.I0R(24,"th"),t.OEk(25,"Download"),t.C$Y()()(),t.I0R(26,"tbody"),t.yuY(27,O,18,7,"tr",9),t.C$Y()(),t.I0R(28,"div",10)(29,"ion-button",11),t.qCj("click",function(){t.usT(e);const i=t.GaO();return t.CGJ(i.prevPage())}),t.wR5(30,"ion-icon",12),t.C$Y(),t.I0R(31,"span"),t.OEk(32),t.C$Y(),t.I0R(33,"ion-button",11),t.qCj("click",function(){t.usT(e);const i=t.GaO();return t.CGJ(i.nextPage())}),t.wR5(34,"ion-icon",13),t.C$Y()()()()()}if(2&n){const e=t.GaO();t.yG2(27),t.E7m("ngForOf",e.paginatedInvoices()),t.yG2(2),t.E7m("disabled",1===e.currentPage),t.yG2(3),t.CAO("Page ",e.currentPage," of ",e.totalPages(),""),t.yG2(),t.E7m("disabled",e.currentPage>=e.totalPages())}}function h(n,a){if(1&n&&(t.I0R(0,"tr")(1,"td",18),t.OEk(2),t.C$Y(),t.I0R(3,"td"),t.OEk(4),t.C$Y(),t.I0R(5,"td"),t.OEk(6),t.C$Y(),t.I0R(7,"td",18),t.OEk(8),t.C$Y()()),2&n){const e=a.$implicit;t.yG2(2),t.oRS(" ",e.description," "),t.yG2(2),t.cNF(e.quantity),t.yG2(2),t.oRS(" $ ",e.unit_amount_excluding_tax/100," "),t.yG2(2),t.oRS(" ",e.amount/100," ")}}function _(n,a){if(1&n){const e=t.KQA();t.I0R(0,"div",4)(1,"ion-button",16),t.qCj("click",function(){t.usT(e);const i=t.GaO();return t.CGJ(i.selectedInvNull())}),t.wR5(2,"ion-icon",12),t.OEk(3,"\xa0Back "),t.C$Y(),t.I0R(4,"div",5)(5,"div",17)(6,"div")(7,"h5"),t.OEk(8," INVOICE DETAIL FOR INVOICE NO "),t.I0R(9,"span",18),t.OEk(10),t.C$Y(),t.OEk(11),t.C$Y()(),t.I0R(12,"div",19)(13,"div")(14,"ion-button",20),t.OEk(15,"Mark Paid"),t.C$Y()(),t.I0R(16,"div",21)(17,"span"),t.OEk(18),t.C$Y()()()(),t.I0R(19,"div")(20,"div",22)(21,"table")(22,"thead")(23,"tr")(24,"th"),t.OEk(25,"Item"),t.C$Y(),t.I0R(26,"th"),t.OEk(27,"Qty"),t.C$Y(),t.I0R(28,"th"),t.OEk(29,"Unit Price"),t.C$Y(),t.I0R(30,"th"),t.OEk(31,"Total Price"),t.C$Y()()(),t.I0R(32,"tbody"),t.yuY(33,h,9,4,"tr",9),t.C$Y()()(),t.I0R(34,"div",23)(35,"div",24)(36,"div",17)(37,"div",25),t.OEk(38,"Subtotal :"),t.C$Y(),t.I0R(39,"div",18),t.OEk(40),t.C$Y()(),t.I0R(41,"div",17)(42,"div",25),t.OEk(43,"Discount :"),t.C$Y(),t.I0R(44,"div",26),t.OEk(45),t.C$Y()(),t.I0R(46,"div",17)(47,"div",25),t.OEk(48,"Total :"),t.C$Y(),t.I0R(49,"div",27),t.OEk(50),t.C$Y()()()()()()()}if(2&n){const e=t.GaO();t.yG2(10),t.cNF(e.selectedInvoice.number),t.yG2(),t.oRS(" AND INVOICE YEAR ",e.getYear(e.selectedInvoice.created)," "),t.yG2(3),t.E7m("disabled",e.selectedInvoice.paid),t.yG2(4),t.cNF(e.getDateOnly(e.selectedInvoice.created)),t.yG2(15),t.E7m("ngForOf",e.selectedInvoice.lines.data),t.yG2(7),t.oRS(" $ ",e.selectedInvoice.subtotal/100," "),t.yG2(5),t.oRS(" -$ ",e.selectedInvoice.discount?e.selectedInvoice.discount/100:0," "),t.yG2(5),t.oRS(" $",e.selectedInvoice.total/100," ")}}const P=[{path:"",component:(()=>{class n{StripeService;invoices=[];pageSize=10;currentPage=1;selectedInvoice=null;
1constructor(e){this.StripeService=e}ngOnInit(){this.fetchInvoiceList()}fetchInvoiceList(){var e=this;return(0,p.c)(function*(){try{const o=yield e.StripeService.fetchInvoiceList();if(!o)throw new Error("No response received");e.invoices=o.data,console.log("Invoice List:",e.invoices)}catch(o){console.error("Error fetching invoice list:",o)}})()}paginatedInvoices(){const e=(this.currentPage-1)*this.pageSize;return this.invoices.slice(e,e+this.pageSize)}totalPages(){return Math.ceil(this.invoices.length/this.pageSize)}prevPage(){this.currentPage>1&&this.currentPage--}nextPage(){this.currentPage<this.totalPages()&&this.currentPage++}getYear(e){return new Date(1e3*e).getFullYear()}getDateOnly(e){const o=new Date(1e3*e),i=o.getFullYear(),r=String(o.getMonth()+1).padStart(2,"0");return`${String(o.getDate()).padStart(2,"0")}-${r}-${i}`}payInvoice(e){window.open(e,"_blank","toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=1200, height=800")}showInvoiceDetails(e){this.selectedInvoice=e}selectedInvNull(){this.selectedInvoice=null}refreshInvoices(){this.fetchInvoiceList()}static \u0275fac=function(o){return new(o||n)(t.GI1(I.S))};static \u0275cmp=t.In1({type:n,selectors:[["app-all-invoices"]],decls:7,vars:2,consts:[[1,"body-bg"],[1,"main-div"],["class","main-section",4,"ngIf"],[3,"ngIf"],[1,"main-section"],[1,"temp-list"],[1,"flex","f-align-center","f-just-end"],[1,"btn-primary",3,"click"],["name","refresh-outline"],[4,"ngFor","ngForOf"],[1,"pagination","flex","f-just-btw","f-align-center"],["fill","clear",3,"disabled","click"],["name","arrow-back-circle-outline"],["name","arrow-forward-circle-outline"],[1,"t-green","cursor",3,"click"],[1,"btn-primary","cursor",3,"click"],[1,"btn-primary","margin-top-2","margin-left-2",3,"click"],[1,"flex","f-align-center","f-just-btw"],[1,"t-green"],[1,"flex","f-align-center","f-just-end","gap-2"],[1,"pay",3,"disabled"],[1,"date"],[1,"w-100"],[1,"flex","f-just-end"],[1,"w-50","total","flex","f-col"],[1,"bold-600"],[1,"t-red"],[1,"t-blue"]],template:function(o,i){1&o&&(t.wR5(0,"app-header"),t.I0R(1,"ion-content",0)(2,"div",1)(3,"div"),t.wR5(4,"app-menu-module"),t.C$Y(),t.yuY(5,m,35,5,"div",2)(6,_,51,8,"ng-template",3),t.C$Y()()),2&o&&(t.yG2(5),t.E7m("ngIf",!i.selectedInvoice),t.yG2(),t.E7m("ngIf",i.selectedInvoice))},dependencies:[d.ay,d.u_,s.sn,s._i,s.Ko,C.k,f.a],styles:[".temp-list[_ngcontent-%COMP%]{width:95%;padding:30px;margin:30px;box-shadow:#00000029 0 1px 4px;border-radius:5px;border-top:3px solid #6c63ff}.temp-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.temp-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #efefef;height:45px}.temp-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#efefef}.temp-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:12.5%;text-align:center;letter-spacing:1px;font-size:16px}.temp-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:center;letter-spacing:1px;font-size:16px}.temp-list[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]:hover th[_ngcontent-%COMP%]{background-color:#fff}.padding-0[_ngcontent-%COMP%]{padding:0!important}.green-line[_ngcontent-%COMP%]{height:3px;background-color:#6c63ff}.t-green[_ngcontent-%COMP%]{color:#6c63ff}.t-red[_ngcontent-%COMP%]{color:red}.t-blue[_ngcontent-%COMP%]{color:#00f}.pay[_ngcontent-%COMP%]{--background: #6c63ff;--color: #fff;--border-radius: 5px;--box-shadow: rgba(0, 0, 0, .16) 0px 1px 4px}.date[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.2431372549);border-radius:5px;background-color:#efefef;padding:5px 10px;margin:10px 0}.w-75[_ngcontent-%COMP%]{width:75%}.h-75[_ngcontent-%COMP%]{height:75%}.w-25[_ngcontent-%COMP%]{width:25%}.w-50[_ngcontent-%COMP%]{width:50%}.total[_ngcontent-%COMP%]{gap:1rem;margin-top:15px}"]})}return n})()}];let y=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.a4G({type:n});
1static \u0275inj=t.s3X({imports:[u.qQ.forChild(P),u.qQ]})}return n})();var R=c(48396),k=c(87560);let $=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.a4G({type:n});static \u0275inj=t.s3X({imports:[d.MD,v.y,s.wZ,y,R.S,k.l]})}return n})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.