1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[834],{70834:(ee,h,l)=>{l.r(h),l.d(h,{InvoicesModule:()=>Gt});var c=l(36895),O=l(24006),u=l(4392),T=l(35882),e=l(94650),E=l(17471),P=l(65412),b=l(69907),L=l(42867),M=l(4859),A=l(44850),w=l(8058),$=l(42649),m=l(28255),v=l(51432),D=l(15439),S=l(30780),V=l(61135),y=l(78372),Z=l(71884),te=l(42069),k=l(98990),B=l(51082),x=l(97392),N=l(59549),F=l(44144),r=l(30671),R=l(10266),ne=l(10879),U=l(78524),G=l(45029),Y=l(95184),f=l(96308);function oe(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,41),e.qZA())}function ie(n,i){if(1&n&&(e.TgZ(0,"td",42)(1,"a",43)(2,"span",44),e._uU(3),e.qZA()()()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("routerLink",t.number),e.xp6(1),e.s9C("matTooltip",t.number),e.xp6(1),e.Oqu(t.num)}}function _e(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,45),e.qZA())}function ae(n,i){if(1&n&&(e.TgZ(0,"td",42),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",t.issued_date," ")}}function se(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,46),e.qZA())}function le(n,i){if(1&n&&(e.TgZ(0,"td",47),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",t.due_date," ")}}function re(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,48),e.qZA())}function ce(n,i){if(1&n&&(e.TgZ(0,"td",42)(1,"span",44),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(1),e.s9C("matTooltip",t.currency),e.xp6(1),e.Oqu(t.currency)}}function pe(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,49),e.qZA())}function de(n,i){if(1&n&&(e.TgZ(0,"td",42)(1,"span",44),e.ALo(2,"number"),e._uU(3),e.ALo(4,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(1),e.s9C("matTooltip",e.xi3(2,2,t.total,"0.2-2")),e.xp6(2),e.Oqu(e.xi3(4,5,t.total,"0.2-2"))}}function ge(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,50),e.qZA())}function ue(n,i){if(1&n&&(e.TgZ(0,"td",42)(1,"span",44),e.ALo(2,"number"),e._uU(3),e.ALo(4,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(1),e.s9C("matTooltip",e.xi3(2,2,t.paid,"0.2-2")),e.xp6(2),e.Oqu(e.xi3(4,5,t.paid,"0.2-2"))}}function Ce(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,51),e.qZA())}function Oe(n,i){1&n&&(e.TgZ(0,"span",53),e._uU(1,"P"),e.qZA())}function Ie(n,i){if(1&n&&(e.TgZ(0,"td",42),e._uU(1),e.ALo(2,"number"),e.YNc(3,Oe,2,0,"span",52),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,2,t.amount_due,"0.2-2")," "),e.xp6(2),e.Q6J("ngIf",t.paid&&t.total_vat-t.paid>0)}}function Te(n,i){1&n&&(e.TgZ(0,"th",40),e.SDv(1,54),e.qZA())}function Ee(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"span",56),e._uU(2),e.qZA(),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",t.status," ")}}function me(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"span",57),e._uU(2),e.qZA(),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",t.status," ")}}function Se(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"span",58),e._uU(2),e.qZA(),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(2),e.hij(" ",t.status," ")}}function Ne(n,i){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,Ee,3,1,"ng-container",55),e.YNc(2,me,3,1,"ng-container",55),e.YNc(3,Se,3,1,"ng-container",55),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf",t.status.includes("overdue")),e.xp6(1),e.Q6J("ngIf",t.status.includes("paid")),e.xp6(1),e.Q6J("ngIf",t.status.includes("due in"))}}function Pe(n,i){1&n&&(e.TgZ(0,"th",59),e.SDv(1,60),e.qZA())}function Me(n,i){if(1&n&&(e.TgZ(0,"a",70),e.SDv(1,71),e.qZA()),2&n){const t=e.oxw().$implicit;e.s9C("href",t.document_download,e.LSH)}}function fe(n,i){if(1&n&&(e.TgZ(0,"a",72),e.SDv(1,73),e.qZA()),2&n){const t=e.oxw().$implicit;e.s9C("href",t.document_preview,e.LSH)}}function he(n,i){if(1&n&&(e.TgZ(0,"a",74),e.SDv(1,75),e.qZA()),2&n){const t=e.oxw().$implicit;e.s9C("routerLink",t.number)}}function Ae(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",76),e.NdJ("click",function(){e.CHM(t);const _=e.oxw(2);return e.KtG(_.openBillingTicket())}),e.SDv(1,77),e.qZA()}}function ve(n,i){if(1&n&&(e.TgZ(0,"td",42)(1,"button",61),e.O4$(),e.TgZ(2,"svg",62),e._UZ(3,"path",63),e.qZA()(),e.kcU(),e.TgZ(4,"mat-menu",64,65),e.YNc(6,Me,2,1,"a",66),e.YNc(7,fe,2,1,"a",67),e.YNc(8,he,2,1,"a",68),e.YNc(9,Ae,2,0,"button",69),e.qZA()()),2&n){const t=e.MAs(5),o=e.oxw();e.xp6(1),e.Q6J("matMenuTriggerFor",t),e.xp6(5),e.Q6J("ngIf",o.canAction("download","invoice")),e.xp6(1),e.Q6J("ngIf",o.canAction("download","invoice")),e.xp6(1),e.Q6J("ngIf",o.canAction("view","invoice")),e.xp6(1),e.Q6J("ngIf",o.canAction("create","sale_request"))}}function De(n,i){1&n&&e._UZ(0,"tr",78)}function be(n,i){1&n&&e._UZ(0,"tr",79)}function xe(n,i){1&n&&(e.TgZ(0,"div",80),e.SDv(1,81),e.qZA())}function Fe(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"label",82)(1,"input",83),e.NdJ("click",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.onChangeView(a))}),e.qZA(),e._uU(2),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw();e.xp6(1),e.Q6J("checked",t==o.search.pageSize),e.xp6(1),e.Oqu(t)}}const Re=function(n){return{rotate:n}},Le=function(n){return{"search-input__container_hidden":n}};let we=(()=>{class n{constructor(t,o,_,a,s,p){this.router=t,this.getInvoicesUsecase=o,this.loading=_,this.matDialog=a,this.rolesService=s,this.bannersService=p,this.dueOption=new e.vpe,this.summary=new e.vpe,this.displayedColumns=["number","issued_date","due_date","currency","total","paid","amount_due","status","actions"],this.dataSource=[],this.menuOpened=!1,this.statusLabel="Invoice Status",this.status=["Fully Paid","Overdue","Due Soon"],this.dateForm=new O.cw({start:new O.NI,end:new O.NI}),this.searchToggled=!1,this.direction="desc",this.search={page:0,pageSize:10,
1common:"",sort_field:"",sort_direction:"",condition:{}},this.filterParamsSubject=new V.X(this.search.common),this.isInitialLoad=!0,this.numberOfRowsAtAll=0,this.currentPage=0,this.pageSizeOptions=[10,30,50],this.numberOfPages=0}canAction(t,o){return this.rolesService.canAction(t,o)}ngOnInit(){this.loadData(),this.filterParamsSubject.pipe((0,y.b)(800),(0,Z.x)()).subscribe(t=>{this.resetPaginationSettings(),this.search.common=t,this.isInitialLoad||this.loadData()})}loadData(){this.loading.set(!0),this.search.condition=v.g.removeEmptyProperties(this.search.condition),this.getInvoicesUsecase.execute(v.g.removeEmptyProperties(this.search)).subscribe({next:t=>{this.isInitialLoad=!1,this.dataSource=t.rows,this.currentPage=t.pagination.current_page,this.numberOfRowsAtAll=t.pagination.rows_total,this.numberOfPages=t.pagination.last_page,this.summary.emit(t.summary),this.setBanner(t.banner),this.setStatus()},complete:()=>this.loading.set(!1)})}setBanner(t){if(this.bannersService.banners.invoice_banner[t])switch(t){case"invoice_banner1":this.dueOption.emit(1);break;case"invoice_banner2":this.dueOption.emit(2);break;case"invoice_banner3":this.dueOption.emit(3)}}onSearch(){this.loadData()}resetPaginationSettings(){this.search.page=0,this.currentPage=0}sortBy(t){t.direction?(this.search.sort_field=t.active,this.search.sort_direction=t.direction,this.direction=t.direction):(this.search.sort_field="",this.search.sort_direction=""),this.loadData()}onChangeView(t){this.search.pageSize=t,this.search.page=0,this.loadData()}onChangePage(t){this.search.page=t.page-1,this.loadData()}onSelectFilters(t,o){if("status"===o){let _=[];t.map(a=>{("Fully Paid"===a||"\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u043b\u0430\u0447\u0435\u043d"===a)&&(a="fully_paid"),("Due Soon"===a||"\u0421\u043a\u043e\u0440\u043e \u0441\u0440\u043e\u043a \u043f\u043b\u0430\u0442\u0435\u0436\u0430"===a)&&(a="due_in_days"),("Overdue"===a||"\u041f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d"===a)&&(a="overdue_by_days"),_.push(a)}),this.search.condition[o]=_}else this.search.condition[o]=t;this.loadData()}setStatus(){this.dataSource.map(t=>{let o=D().startOf("day");if("fully_paid"!=t.status)if(t.total_vat<0||t.amount_due<0)t.status="";else if(t.amount_due){let a=D(t.due_date,"DD/MM/YYYY").diff(o,"days");if(a<0)return void(t.status=`overdue by ${Math.abs(a)} days`);if(a>0)return void(t.status=`due in ${a} days`);if(0===a)return void(t.status="due for payment")}else t.status="fully paid";else t.status="fully paid"})}openBillingTicket(){this.matDialog.open(T.c,{data:{title:"Your request refers to",items:[{id:1,value:"Change Billing Information"},{id:2,value:"Request Statement Of Account",checked:!0},{id:3,value:"Request Outage Compensation"},{id:4,value:"Dispute Invoice"},{id:5,value:"Other Billing Related Issues"}],btn:"OK"}}).afterClosed().subscribe(o=>{switch(o){case 1:this.router.navigate(["/main/support/change-company-information"]);break;case 3:this.router.navigate(["/main/support/request-outage-compensation"]);break;case 4:this.router.navigate(["/main/support/dispute-invoice"]);break;case 5:this.router.navigate(["/main/support/other-billing-related-issue"]);break;case 0:case 2:this.router.navigate(["/main/support/request-statement-of-account"])}})}get selectDateRangeLabel(){if(this.search.condition.issued_date){if(this.search.condition.issued_date.from&&this.search.condition.issued_date.to)return`${(0,S.Z)(new Date(this.search.condition.issued_date.from),"dd/MM/yyyy")} - ${(0,S.Z)(new Date(this.search.condition.issued_date.to),"dd/MM/yyyy")}`;if(this.search.condition.issued_date.from)return`${(0,S.Z)(new Date(this.search.condition.issued_date.from),"dd/MM/yyyy")}`}return""}setDate(t){this.matDateTrigger.closeMenu(),this.search.condition.issued_date=v.g.removeEmptyProperties(t),this.onSearch()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(u.F0),e.Y36(te.t),e.Y36(k.D),e.Y36(P.uw),e.Y36(b.f),e.Y36(B.j))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-invoices-table"]],viewQuery:function(t,o){if(1&t&&e.Gf(m.p6,5),2&t){let _;e.iGM(_=e.CRH())&&(o.matDateTrigger=_.first)}},outputs:{dueOption:"dueOption",summary:"summary"},decls:58,vars:24,consts:function(){let i,t,o,_,a,s,p,I,g,C,X,Q,J,H,j,W,K;return i=" Invoice Date " + "\ufffd#4\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#4\ufffd" + "" + "\ufffd#5\ufffd" + "" + "\ufffd/#5\ufffd" + "",t="Type here",o="show ",_="Invoice Number",a="Issued ",s="Due",p="Currency",I="Amou
1nt Incl. VAT",g="Paid",C="Amount Due",X="Status",Q="Actions",J="Print",H="Download PDF",j="View Details",W="New Billing Ticket ",K="No records",[[1,"services__filters"],[1,"search-select",3,"matMenuTriggerFor","menuOpened","menuClosed"],i,[1,"select-arrow",3,"ngClass"],["xPosition","after","yPosition","above",1,"date-menu"],["dateMenu","matMenu"],[3,"dateRangeChanged","click"],[3,"data","label","selectedItems"],["matSuffix","","mat-icon-button","","aria-label","Search",1,"search",3,"disableRipple"],["src","assets/pic/icons/search-icon.svg","alt","Search",3,"click"],[1,"search-input__container",3,"ngClass"],["appearance","fill",1,"search-input"],["matPrefix",""],["src","/en/assets/pic/icons/search-icon.svg","alt","search icon"],["placeholder",t,"matInput","","type","text",3,"input"],["commonInput",""],[1,"table-wrap"],["mat-table","","matSort","",3,"dataSource","matSortActive","matSortDirection","matSortChange"],["matColumnDef","number"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","issued_date"],["matColumnDef","due_date"],["mat-cell","","class","cell-nowrap",4,"matCellDef"],["matColumnDef","currency"],["matColumnDef","total"],["matColumnDef","paid"],["matColumnDef","amount_due"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","no-records",4,"ngIf"],[1,"table-sort"],[1,"table-view","view"],o,["class","view__label",4,"ngFor","ngForOf"],[1,"table__paginator"],[1,"table-paginator",3,"current","last","count","length","limit","pageSizeOptions","changePage"],["mat-header-cell","","mat-sort-header",""],_,["mat-cell",""],[1,"link","capital-gothic",3,"routerLink"],["ShowTooltipIfTruncated","",1,"crop-text",3,"matTooltip"],a,s,["mat-cell","",1,"cell-nowrap"],p,I,g,C,["class","note","matTooltip","Partly Paid",4,"ngIf"],["matTooltip","Partly Paid",1,"note"],X,[4,"ngIf"],[1,"label","label_overdue"],[1,"label","label_paid"],[1,"label","label_due"],["mat-header-cell",""],Q,["mat-button","",1,"dropdown-menu__trigger",3,"matMenuTriggerFor"],["width","21","height","5","viewBox","0 0 21 5","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M2.358 4.288C1.44 4.288 0.72 3.55 0.72 2.614C0.72 1.696 1.44 0.958 2.358 0.958C3.24 0.958 3.96 1.696 3.96 2.614C3.96 3.55 3.24 4.288 2.358 4.288ZM10.3821 4.288C9.46406 4.288 8.74406 3.55 8.74406 2.614C8.74406 1.696 9.46406 0.958 10.3821 0.958C11.2641 0.958 11.9841 1.696 11.9841 2.614C11.9841 3.55 11.2641 4.288 10.3821 4.288ZM18.4061 4.288C17.4881 4.288 16.7681 3.55 16.7681 2.614C16.7681 1.696 17.4881 0.958 18.4061 0.958C19.2881 0.958 20.0081 1.696 20.0081 2.614C20.0081 3.55 19.2881 4.288 18.4061 4.288Z","fill","black"],[1,"dropdown-menu"],["menu","matMenu"],["class","dropdown-menu__item","mat-menu-item","","target","_blank",3,"href",4,"ngIf"],["class","dropdown-menu__item","mat-menu-item","",3,"href",4,"ngIf"],["class","dropdown-menu__item","mat-menu-item","",3,"routerLink",4,"ngIf"],["class","dropdown-menu__item","mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","","target","_blank",1,"dropdown-menu__item",3,"href"],J,["mat-menu-item","",1,"dropdown-menu__item",3,"href"],H,["mat-menu-item","",1,"dropdown-menu__item",3,"routerLink"],j,["mat-menu-item","",1,"dropdown-menu__item",3,"click"],W,["mat-header-row",""],["mat-row",""],[1,"no-records"],K,[1,"view__label"],["type","radio",1,"view__input",3,"checked","click"]]},template:function(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",0),e.ynx(1),e.TgZ(2,"div",1),e.NdJ("menuOpened",function(){return o.menuOpened=!0})("menuClosed",function(){return o.menuOpened=!1}),e.tHW(3,2),e._UZ(4,"span")(5,"div",3),e.N_p(),e.qZA(),e.TgZ(6,"mat-menu",4,5)(8,"custom-date-range-picker",6),e.NdJ("dateRangeChanged",function(s){return o.resetPaginationSettings(),o.setDate(s)})("click",function(s){return s.stopPropagation()}),e.qZA()(),e.BQk(),e.TgZ(9,"app-custom-search-multiselect",7),e.NdJ("selectedItems",function(s){return o.resetPaginationSettings(),o.onSelectFilters(s,"status")}),e.qZA(),e.TgZ(10,"button",8)(11,"mat-icon")(12,"img",9),e.NdJ("click",function(){return o.searchToggled=!o.searchToggled}),e.qZA()()()(),e.TgZ(13,"div",10)(14,"mat-form-field",11)(15,"span",12),e._UZ(16,"img",13),e.qZA(),e.TgZ(17,"input",14,15),e.NdJ("input",function(){e.CHM(_);const s=e.MAs(18);return e.KtG(o.filterParamsSubject.next(s.value))}),e.qZA()()(),e.TgZ(19,"div",16)(20,"table",17),e.NdJ("matSortChange",function(s){return o.sortBy(s)}),e.ynx(21,18),e.YNc(22,oe,2,0,"th",19),e.YNc(23,ie,4,3,"td",20),e.BQk(),e.ynx(24,21),e.YNc(25,_e,2,0,"th",19),e.YNc(26,ae,2,1,"td",20),e.BQk(),e.ynx(27,22),e.YNc(28,se,2,0,"th",19),e.YNc(29,le,2,1,"td",23),e.BQk(),e.ynx(30,24),e.YNc(31,re,2,0,"th",19),e.YNc(32,ce,3,2,"td",20),e.BQk(),e.ynx(33,25),e.YNc(34,pe,2,0,"th",19),e.YNc(35,de,5,8,"td",20),e.BQk(),e.ynx(36,26),e.YNc(37,ge,2,0,"th",19),e.YNc(38,ue,5,8,"td",20),e.BQk(),e.ynx(39,27),e.YNc(40,Ce,2,0,"th",19),e.YNc(41,Ie,4,5,"td",20),e.BQk(),e.ynx(42,28),e.YNc(43,Te,2,0,"th",19),e.YNc(44,Ne,4,3,"td",20),e.BQk(),e.ynx(45,29),e.YNc(46,Pe,2,0,"th",30),e.YNc(47,ve,10,5,"td",20),e.BQk(),e.YNc(48,De,1,0,"tr",31),e.YNc(49,be,1,0,"tr",32),e.qZA(),e.YNc(50,xe,2,0,"div",33),e.qZA(),e.TgZ(51,"div",34)(52,"div",35)(53,"span"),e.SDv(54,36),e.qZA(),e.YNc(55,Fe,3,2,"label",37),e.qZA(),e.TgZ(56,"div",38)(57,"wo-paginator",39),e.NdJ("changePage",function(s){return o.search.page=s.page-1,o.loadData()}),e.qZA()()()}if(2&t){const _=e.MAs(7);e.xp6(2),e.Q6J("matMenuTriggerFor",_),e.xp6(3),e.Q6J("ngClass",e.VKq(20,Re,!o.menuOpened)),e.pQV(o.selectDateRangeLabel),e.QtT(3),e.xp6(4),e.Q6J("data",o.status)("label",o.statusLabel),e.xp6(1),e.Q6J("disableRipple",!0),e.xp6(3),e.Q6J("ngClass",e.VKq(22,Le,!o.searchToggled)),e.xp6(7),e.Q6J("dataSource",o.dataSource)("matSortActive",o.search.sort)("matSortDirection",o.direction),e.xp6(28),e.Q6J("matHeaderRowDef",o.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",o.displayedColumns),e.xp6(1),e.Q6J("ngIf",0===(null==o.dataSource?null:o.dataSource.length)),e.xp6(
15),e.Q6J("ngForOf",o.pageSizeOptions),e.xp6(2),e.Q6J("current",o.search.page+1)("last",o.numberOfPages)("count",o.numberOfRowsAtAll)("length",o.search.pageSize)("limit",o.search.pageSize)("pageSizeOptions",o.pageSizeOptions)}},dependencies:[c.mk,c.sg,c.O5,u.yS,M.lW,x.Hw,N.KE,N.qo,N.R9,F.Nt,r.BZ,r.fO,r.as,r.w1,r.Dz,r.nj,r.ge,r.ev,r.XQ,r.Gk,R.gM,ne.H,U.D,G.w,Y.o,m.VK,m.OP,m.p6,f.YE,f.nU,c.JJ],styles:["[_nghost-%COMP%]{position:relative}.link[_ngcontent-%COMP%]{font-size:14px;color:#144a90;text-decoration:none;cursor:pointer}.label[_ngcontent-%COMP%]{display:inline-block;text-transform:uppercase;font:400 12px Capital Gothic,sans-serif;text-align:center;color:#fff;padding:3px;min-width:140px}.label_overdue[_ngcontent-%COMP%]{background:#D6117F}.label_paid[_ngcontent-%COMP%]{background:#A8B1C1}.label_due[_ngcontent-%COMP%]{background:#144A90}[_nghost-%COMP%] table .mat-sort-header-content{text-align:left}[_nghost-%COMP%] .header__container .search_container{justify-content:flex-start}.note[_ngcontent-%COMP%]{font-weight:700;color:#d6117f;margin-left:10px}.table-wrap[_ngcontent-%COMP%]{overflow-x:auto;white-space:nowrap;padding-bottom:5px}table[_ngcontent-%COMP%]{width:100%;table-layout:auto;min-width:1130px}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:16px;padding:0 10px;text-align:left;border:none;text-overflow:ellipsis;overflow:hidden}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:700;color:#000;border-bottom:1px solid #000}table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .cell-link[_ngcontent-%COMP%], table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .multi-cell[_ngcontent-%COMP%]{display:block;margin-bottom:10px;margin-top:10px}table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .cell-link[_ngcontent-%COMP%]:not(:last-child), table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .multi-cell[_ngcontent-%COMP%]:not(:last-child){margin-bottom:26px}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .note[_ngcontent-%COMP%]{font-size:12px;color:#a6a6a6}[_nghost-%COMP%] table.mat-table tbody tr:first-child td{padding-top:18px!important}th.mat-header-cell[_ngcontent-%COMP%]:first-of-type, td.mat-cell[_ngcontent-%COMP%]:first-of-type, td.mat-footer-cell[_ngcontent-%COMP%]:first-of-type{padding-left:10px}[_nghost-%COMP%] .mat-table tbody tr:nth-child(odd){background:#EAF2FC}[_nghost-%COMP%] .mat-table .mat-sort-header-content{text-align:left}[_nghost-%COMP%] .mat-button-ripple.mat-ripple, [_nghost-%COMP%] .mat-button-focus-overlay{display:none}.cell-link[_ngcontent-%COMP%]{font-size:14px;color:#144a90;text-decoration:none;cursor:pointer}.cell-nowrap[_ngcontent-%COMP%]{white-space:nowrap}table[_ngcontent-%COMP%] td.cell-center[_ngcontent-%COMP%]{text-align:center}.table-sort[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;margin-top:15px;gap:40px}.view__title[_ngcontent-%COMP%]{font-size:1rem;font-weight:300}.view__label[_ngcontent-%COMP%]{position:relative;padding:5px;height:30px;border:1px solid #fff;font-size:1rem;font-weight:300;line-height:24px;transition:all .2s linear;margin-right:3px;
1cursor:pointer}.view__input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.view[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:has(input:checked){background:#D9EAFF}[_nghost-%COMP%] wo-paginator .wo-paginator__link{background:none;border:none;font-size:16px;padding:4px}[_nghost-%COMP%] wo-paginator .wo-paginator__link:hover{background:none;border:none}[_nghost-%COMP%] wo-paginator .wo-paginator__item_disabled .wo-paginator__link:hover{background:none;border:none!important}[_nghost-%COMP%] wo-paginator .wo-paginator__item_active .wo-paginator__link{background:#D9EAFF!important;box-shadow:none!important;color:#000!important}.services__filters[_ngcontent-%COMP%]{display:flex;column-gap:20px;justify-content:flex-start;flex-wrap:wrap}@media (min-width: 1180px){.services__filters[_ngcontent-%COMP%]{flex-wrap:nowrap;margin-bottom:50px}}.services__filters[_ngcontent-%COMP%] app-custom-search-multiselect[_ngcontent-%COMP%]{flex:1;max-width:320px}@media (max-width: 1180px){.services__filters[_ngcontent-%COMP%] app-custom-search-multiselect[_ngcontent-%COMP%]{flex:0 0 44%;max-width:unset}}@media (max-width: 940px){.services__filters[_ngcontent-%COMP%] app-custom-search-multiselect[_ngcontent-%COMP%]{flex:0 0 42%;max-width:unset}}[_nghost-%COMP%] .search-input__container{display:flex;justify-content:flex-end;height:40px}@media (min-width: 1180px){[_nghost-%COMP%] .search-input__container{position:absolute;left:325px;top:61px}}[_nghost-%COMP%] .search-input__container mat-form-field{width:unset}[_nghost-%COMP%] .search-input__container.search-input__container_hidden{visibility:hidden;height:40px}[_nghost-%COMP%] .search-input__container .search-input img{width:20px;height:20px;transform:translateY(2px)}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-flex{width:390px;padding:0 13px;border-radius:0;border-bottom:none;background:#F3F3F3}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-wrapper{padding-bottom:0}[_nghost-%COMP%] .search-input__container .search-input .mat-input-element{color:#a6a6a6;font-family:Capital Gothic;font-size:16px;font-style:normal;font-weight:300;line-height:normal;letter-spacing:.16px}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-infix{padding:9px;border-top:0}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-underline{display:none}[_nghost-%COMP%] .mat-menu-trigger{padding:0;min-width:unset}.crop-text[_ngcontent-%COMP%]{min-width:5em;max-width:18em;width:100%;text-transform:none!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (min-width: 1800px){.crop-text[_ngcontent-%COMP%]{max-width:35em}}.search-select[_ngcontent-%COMP%]{max-width:320px;padding-left:.75em;padding-right:.75em;background-color:#d9eaff;width:100%;height:42px;display:flex;align-items:center;box-sizing:border-box;cursor:pointer}.search-select[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:auto;color:#d6117f;padding-left:5px}.search-select[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{height:8px;width:13px;background:url(/en/assets/pic/icons/arrow.svg) no-repeat;margin-left:10px}.search-select[_ngcontent-%COMP%] .rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}@media (max-width: 1180px){.search-select[_ngcontent-%COMP%]{flex:0 0 44%;max-width:unset}}@media (max-width: 940px){.search-select[_ngcontent-%COMP%]{flex:0 0 42%;max-width:unset}} .date-menu{width:100%;max-width:100%;padding:10px 20px}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}"]}),n})();var $e=l(30497);function Ve(n,i){1&n&&(e.TgZ(0,"th",32),e.SDv(1,33),e.qZA())}function ye(n,i){if(1&n&&(e.TgZ(0,"td",34)(1,"a",35)(2,"span",36),e._uU(3),e.qZA()()()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("routerLink",t.number),e.xp6(1),e.s9C("matTooltip",t.number),e.xp6(1),e.Oqu(t.num)}}function Ze(n,i){1&n&&(e.TgZ(0,"th",32),e.SDv(1,37),e.qZA())}function ke(n,i){if(1&n&&(e.TgZ(0,"td",34),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",t.date," ")}}function Be(n,i){1&n&&(e.TgZ(0,"th",32),e.SDv(1,38),e.qZA())}function Ue(n,i){if(1&n&&(e.TgZ(0,"td",34)(1,"span",36),e.ALo(2,"number"),e._uU(3),e.ALo(4,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(1),e.s9C("matTooltip",e.xi3(2,2,t.amount,"0.2-2")),e.xp6(2),e.Oqu(e.xi3(4,5,t.amount,"0.2-2"))}}function Ge(n,i){1&n&&(e.TgZ(0,"th",32),e.SDv(1,39),e.qZA())}function Ye(n,i){if(1&n&&(e.TgZ(0,"td",34)(1,"span",36),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(1),e.s9C("matTooltip",t.currency),e.xp6(1),e.Oqu(t.currency)}}function qe(n,i){1&n&&e._UZ(0,"tr",40)}function ze(n,i){1&n&&e._UZ(0,"tr",41)}function Xe(n,i){1&n&&(e.TgZ(0,"div",42),e.SDv(1,43),e.qZA())}function Qe(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"label",44)(1,"input",45),e.NdJ("click",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.onChangeView(a))}),e.qZA(),e._uU(2),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw();e.xp6(1),e.Q6J("checked",t==o.search.pageSize),e.xp6(1),e.Oqu(t)}}const Je=function(n){return{rotate:n}},He=function(n){return{"search-input__container_hidden":n}};let je=(()=>{class n{constructor(t){this.getPaymentsUsecase=t,this.displayedColumns=["date","amount","currency"],this.dataSource=[],this.menuOpened=!1,this.dateForm=new O.cw({start:new O.NI,end:new O.NI}),this.searchToggled=!1,this.direction="desc",this.numberOfRowsAtAll=0,this.currentPage=0,this.pageSizeOptions=[10,30,50],this.numberOfPages=0,this.search={page:0,pageSize:10,
1common:"",sort_field:"",sort_direction:"",condition:{}},this.filterParamsSubject=new V.X(this.search.common)}ngOnInit(){this.loadData(),this.filterParamsSubject.pipe((0,y.b)(800),(0,Z.x)()).subscribe(t=>{this.search.common=t,this.resetPaginationSettings(),this.loadData()})}resetPaginationSettings(){this.search.page=0,this.currentPage=0}loadData(){this.getPaymentsUsecase.execute(this.search).subscribe({next:t=>{this.dataSource=t.rows,this.currentPage=t.pagination.current_page,this.numberOfRowsAtAll=t.pagination.rows_total,this.numberOfPages=t.pagination.last_page}})}onSearch(){this.loadData()}sortBy(t){t.direction?(this.search.sort_field=t.active,this.search.sort_direction=t.direction,this.direction=t.direction):(this.search.sort_field="",this.search.sort_direction=""),this.loadData()}onChangeView(t){this.search.pageSize=t,this.search.page=0,this.loadData()}get selectDateRangeLabel(){if(this.search.condition.date){if(this.search.condition.date.from&&this.search.condition.date.to)return`${(0,S.Z)(new Date(this.search.condition.date.from),"dd/MM/yyyy")} - ${(0,S.Z)(new Date(this.search.condition.date.to),"dd/MM/yyyy")}`;if(this.search.condition.date.from)return`${(0,S.Z)(new Date(this.search.condition.date.from),"dd/MM/yyyy")}`}return""}setDate(t){this.matDateTrigger.closeMenu(),this.search.condition.date=v.g.removeEmptyProperties(t),this.onSearch()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36($e.r))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-payments-table"]],viewQuery:function(t,o){if(1&t&&e.Gf(m.p6,5),2&t){let _;e.iGM(_=e.CRH())&&(o.matDateTrigger=_.first)}},decls:42,vars:22,consts:function(){let i,t,o,_,a,s,p,I;return i=" Period " + "\ufffd#4\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#4\ufffd" + "" + "\ufffd#5\ufffd" + "" + "\ufffd/#5\ufffd" + "",t="Type here",o="show ",_="Invoice Number",a="Date",s="Amount",p="Currency",I="No records",[[1,"services__filters"],[1,"search-select",3,"matMenuTriggerFor","menuOpened","menuClosed"],i,[1,"select-arrow",3,"ngClass"],["xPosition","after","yPosition","above",1,"date-menu"],["dateMenu","matMenu"],[3,"dateRangeChanged","click"],["matSuffix","","mat-icon-button","","aria-label","Search",1,"search",3,"disableRipple"],["src","assets/pic/icons/search-icon.svg","alt","Search",3,"click"],[1,"search-input__container",3,"ngClass"],["appearance","fill",1,"search-input"],["matPrefix",""],["src","/en/assets/pic/icons/search-icon.svg","alt","search icon"],["placeholder",t,"matInput","","type","text",3,"input"],["commonInput",""],[1,"table-wrap"],["mat-table","","matSort","",3,"dataSource","matSortActive","matSortDirection","matSortChange"],["matColumnDef","number"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","date"],["matColumnDef","amount"],["matColumnDef","currency"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","no-records",4,"ngIf"],[1,"table-sort"],[1,"table-view","view"],o,["class","view__label",4,"ngFor","ngForOf"],[1,"table__paginator"],[1,"table-paginator",3,"current","last","count","length","limit","pageSizeOptions","changePage"],["mat-header-cell","","mat-sort-header",""],_,["mat-cell",""],[1,"link","capital-gothic",3,"routerLink"],["ShowTooltipIfTruncated","",1,"crop-text",3,"matTooltip"],a,s,p,["mat-header-row",""],["mat-row",""],[1,"no-records"],I,[1,"view__label"],["type","radio",1,"view__input",3,"checked","click"]]},template:function(t,o){if(1&t){const _=e.EpF();e.TgZ(0,"div",0),e.ynx(1),e.TgZ(2,"div",1),e.NdJ("menuOpened",function(){return o.menuOpened=!0})("menuClosed",function(){return o.menuOpened=!1}),e.tHW(3,2),e._UZ(4,"span")(5,"div",3),e.N_p(),e.qZA(),e.TgZ(6,"mat-menu",4,5)(8,"custom-date-range-picker",6),e.NdJ("dateRangeChanged",function(s){return o.resetPaginationSettings(),o.setDate(s)})("click",function(s){return s.stopPropagation()}),e.qZA()(),e.BQk(),e.TgZ(9,"button",7)(10,"mat-icon")(11,"img",8),e.NdJ("click",function(){return o.searchToggled=!o.searchToggled}),e.qZA()()()(),e.TgZ(12,"div",9)(13,"mat-form-field",10)(14,"span",11),e._UZ(15,"img",12),e.qZA(),e.TgZ(16,"input",13,14),e.NdJ("input",function(){e.CHM(_);const s=e.MAs(17);return e.KtG(o.filterParamsSubject.next(s.value))}),e.qZA()()(),e.TgZ(18,"div",15)(19,"table",16),e.NdJ("matSortChange",function(s){return o.sortBy(s)}),e.ynx(20,17),e.YNc(21,Ve,2,0,"th",18),e.YNc(22,ye,4,3,"td",19),e.BQk(),e.ynx(23,20),e.YNc(24,Ze,2,0,"th",18),e.YNc(25,ke,2,1,"td",19),e.BQk(),e.ynx(26,21),e.YNc(27,Be,2,0,"th",18),e.YNc(28,Ue,5,8,"td",19),e.BQk(),e.ynx(29,22),e.YNc(30,Ge,2,0,"th",18),e.YNc(31,Ye,3,2,"td",19),e.BQk(),e.YNc(32,qe,1,0,"tr",23),e.YNc(33,ze,1,0,"tr",24),e.qZA(),e.YNc(34,Xe,2,0,"div",25),e.qZA(),e.TgZ(35,"div",26)(36,"div",27)(37,"span"),e.SDv(38,28),e.qZA(),e.YNc(39,Qe,3,2,"label",29),e.qZA(),e.TgZ(40,"div",30)(41,"wo-paginator",31),e.NdJ("changePage",function(s){return o.search.page=s.page-1,o.loadData()}),e.qZA()()()}if(2&t){const _=e.MAs(7);e.xp6(2),e.Q6J("matMenuTriggerFor",_),e.xp6(3),e.Q6J("ngClass",e.VKq(18,Je,!o.menuOpened)),e.pQV(o.selectDateRangeLabel),e.QtT(3),e.xp6(4),e.Q6J("disableRipple",!0),e.xp6(3),e.Q6J("ngClass",e.VKq(20,He,!o.searchToggled)),e.xp6(7),e.Q6J("dataSource",o.dataSource)("matSortActive",o.search.sort)("matSortDirection",o.direction),e.xp6(13),e.Q6J("matHeaderRowDef",o.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",o.displayedColumns),e.xp6(1),e.Q6J("ngIf",0===(null==o.dataSource?null:o.dataSource.length)),e.xp6(
15),e.Q6J("ngForOf",o.pageSizeOptions),e.xp6(2),e.Q6J("current",o.search.page+1)("last",o.numberOfPages)("count",o.numberOfRowsAtAll)("length",o.search.pageSize)("limit",o.search.pageSize)("pageSizeOptions",o.pageSizeOptions)}},dependencies:[c.mk,c.sg,c.O5,u.yS,M.lW,x.Hw,N.KE,N.qo,N.R9,F.Nt,r.BZ,r.fO,r.as,r.w1,r.Dz,r.nj,r.ge,r.ev,r.XQ,r.Gk,R.gM,U.D,G.w,Y.o,m.VK,m.p6,f.YE,f.nU,c.JJ],styles:[".table-wrap[_ngcontent-%COMP%]{margin-top:10px;overflow-x:auto;white-space:nowrap;background:#EAF2FC;border:1px solid #E0E0E0;padding:20px}table[_ngcontent-%COMP%]{width:100%;background:#EAF2FC}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:16px;padding:0 10px;text-align:left;border:none;text-overflow:ellipsis;overflow:hidden}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:700;color:#000;border-bottom:1px solid #000}table[_ngcontent-%COMP%] td.mat-cell[_ngcontent-%COMP%]{border-bottom:0}table.mat-table[_ngcontent-%COMP%] td.mat-cell[_ngcontent-%COMP%], table.mat-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0 15px!important}table.mat-table[_ngcontent-%COMP%] tr.mat-row[_ngcontent-%COMP%]{height:42px}.number-cell[_ngcontent-%COMP%]{display:block;text-align:right}[_nghost-%COMP%] .header__container .search_container{justify-content:flex-start}[_nghost-%COMP%] table.mat-table tbody tr:first-child td{padding-top:18px!important}th.mat-header-cell[_ngcontent-%COMP%]:first-of-type, td.mat-cell[_ngcontent-%COMP%]:first-of-type, td.mat-footer-cell[_ngcontent-%COMP%]:first-of-type{padding-left:10px}[_nghost-%COMP%] .mat-table tbody tr:nth-child(even){background:#EAF2FC}[_nghost-%COMP%] .mat-table .mat-sort-header-content{text-align:left}[_nghost-%COMP%] .mat-button-ripple.mat-ripple, [_nghost-%COMP%] .mat-button-focus-overlay{display:none}.cell-link[_ngcontent-%COMP%]{font-size:14px;color:#144a90;text-decoration:none;cursor:pointer}.cell-nowrap[_ngcontent-%COMP%]{white-space:nowrap}table[_ngcontent-%COMP%] td.cell-center[_ngcontent-%COMP%]{text-align:center}.table-sort[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;margin-top:15px;gap:40px}.view__title[_ngcontent-%COMP%]{font-size:1rem;font-weight:300}.view__label[_ngcontent-%COMP%]{position:relative;padding:5px;height:30px;border:1px solid #fff;font-size:1rem;font-weight:300;line-height:24px;transition:all .2s linear;margin-right:3px;
1cursor:pointer}.view__input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.view[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:has(input:checked){background:#D9EAFF}[_nghost-%COMP%] wo-paginator .wo-paginator__link{background:none;border:none;font-size:16px;padding:4px}[_nghost-%COMP%] wo-paginator .wo-paginator__link:hover{background:none;border:none}[_nghost-%COMP%] wo-paginator .wo-paginator__item_disabled .wo-paginator__link:hover{background:none;border:none!important}[_nghost-%COMP%] wo-paginator .wo-paginator__item_active .wo-paginator__link{background:#D9EAFF!important;box-shadow:none!important;color:#000!important}.services__filters[_ngcontent-%COMP%]{display:flex;column-gap:20px;justify-content:flex-start;margin-bottom:10px}@media (max-width: 1180px){.services__filters[_ngcontent-%COMP%]{flex-wrap:wrap}}.services__filters[_ngcontent-%COMP%] app-custom-search-multiselect[_ngcontent-%COMP%]{flex:1;max-width:260px}@media (max-width: 1180px){.services__filters[_ngcontent-%COMP%] app-custom-search-multiselect[_ngcontent-%COMP%]{flex:0 0 44%;max-width:unset}}@media (max-width: 940px){.services__filters[_ngcontent-%COMP%] app-custom-search-multiselect[_ngcontent-%COMP%]{flex:0 0 42%;max-width:unset}}[_nghost-%COMP%] .search-input__container{display:flex;height:40px}[_nghost-%COMP%] .search-input__container mat-form-field{width:unset}[_nghost-%COMP%] .search-input__container.search-input__container_hidden{visibility:hidden;height:40px}[_nghost-%COMP%] .search-input__container .search-input img{width:20px;height:20px;transform:translateY(2px)}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-flex{width:390px;padding:0 13px;border-radius:0;border-bottom:none;background:#F3F3F3}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-wrapper{padding-bottom:0}[_nghost-%COMP%] .search-input__container .search-input .mat-input-element{color:#a6a6a6;font-family:Capital Gothic;font-size:16px;font-style:normal;font-weight:300;line-height:normal;letter-spacing:.16px}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-infix{padding:9px;border-top:0}[_nghost-%COMP%] .search-input__container .search-input .mat-form-field-underline{display:none}[_nghost-%COMP%] .mat-menu-trigger{padding:0;min-width:unset}.crop-text[_ngcontent-%COMP%]{min-width:5em;max-width:18em;width:100%;text-transform:none!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (min-width: 1800px){.crop-text[_ngcontent-%COMP%]{max-width:35em}}.search-select[_ngcontent-%COMP%]{padding-left:.75em;padding-right:.75em;background-color:#d9eaff;width:100%;max-width:280px;height:42px;display:flex;align-items:center;box-sizing:border-box;cursor:pointer}.search-select[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:auto;color:#d6117f;padding-left:5px}.search-select[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{height:8px;width:13px;background:url(/en/assets/pic/icons/arrow.svg) no-repeat;margin-left:10px}.search-select[_ngcontent-%COMP%] .rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}@media (max-width: 1180px){.search-select[_ngcontent-%COMP%]{flex:0 0 44%;max-width:unset}}@media (max-width: 940px){.search-select[_ngcontent-%COMP%]{flex:0 0 42%;max-width:unset}} .date-menu{width:100%;max-width:100%;padding:10px 20px}[_nghost-%COMP%] .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}"]}),n})();function We(n,i){if(1&n&&(e.TgZ(0,"p",3),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function Ke(n,i){if(1&n&&(e.TgZ(0,"p",10),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit,o=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,+o.currencies[t],"0.2-2")," ")}}function et(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"div",7)(2,"p",8),e._uU(3),e.qZA(),e.YNc(4,Ke,3,4,"p",9),e.qZA(),e.BQk()),2&n){const t=i.$implicit,o=e.oxw(2);e.xp6(3),e.Oqu(t.title),e.xp6(1),e.Q6J("ngForOf",o.currencies)}}function tt(n,i){if(1&n&&(e.TgZ(0,"div",1)(1,"div",2)(2,"p",3),e.SDv(3,4),e.qZA(),e.YNc(4,We,2,1,"p",5),e.qZA(),e.YNc(5,et,5,2,"ng-container",6),e.qZA()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngForOf",t.currencies),e.xp6(1),e.Q6J("ngForOf",t.summary)}}let nt=(()=>{class n{get currencies(){return this.summary.map(t=>Object.keys(t.currencies)).flat().filter((t,o,_)=>_.indexOf(t)===o)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-total-amounts"]],inputs:{summary:"summary"},decls:1,vars:1,consts:function(){let i;return i="Balance",[["class","service-details",4,"ngIf"],[1,"service-details"],[1,"service-details__field","service-details__header"],[1,"service-details__title"],i,["class","service-details__title",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"service-details__field"],[1,"service-details__label"],["class","service-details__value",4,"ngFor","ngForOf"],[1,"service-details__value"]]},template:function(t,o){1&t&&e.YNc(0,tt,6,2,"div",0),2&t&&e.Q6J("ngIf",o.currencies.length>0)},dependencies:[c.sg,c.O5,c.JJ],styles:[".service-details[_ngcontent-%COMP%]{display:table}.service-details__field[_ngcontent-%COMP%], .service-details__header[_ngcontent-%COMP%]{display:table-row}.service-details__label[_ngcontent-%COMP%]{display:table-cell;font-size:16px;font-weight:700;font-family:Arial,sans-serif;padding:10px 30px 10px 10px;border-bottom:1px solid black}.service-details__value[_ngcontent-%COMP%]{display:table-cell;border-bottom:1px solid black;padding:10px 35px 10px 10px}.service-details__value[_ngcontent-%COMP%]:last-child{padding-right:10px}.service-details__title[_ngcontent-%COMP%]{font-size:35px;font-weight:700;font-family:Capital Gothic,Arial,sans-serif;letter-spacing:.3px;margin-bottom:18px;display:table-cell;border-bottom:2px solid #D6117F;padding-bottom:10px;padding-left:10px;padding-right:10px}mat-divider[_ngcontent-%COMP%]{border-top-color:#000}mat-divider.pink-divider[_ngcontent-%COMP%]{border-top-color:#d6117f;border-top-width:2px}"]}),n})();var ot=l(11481);function it(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",1)(1,"a",2),e.NdJ("click",function(){e.CHM(t);const _=e.oxw();return e.KtG(_.onClose())}),e.O4$(),e.TgZ(2,"svg",3),e._UZ(3,"line",4)(4,"line",5),e.qZA()(),e.kcU(),e._UZ(5,"div",6),e.ALo(6,"safeHtml"),e.qZA()}if(2&n){const t=e.oxw();e.ekj("hide",0===t.banner),e.Q6J("ngClass",3===t.banner?"banner_pink":2===t.banner?"banner_blue":"banner_light"),e.xp6(5),e.Q6J("innerHTML",e.lcZ(6,4,t.text[t.banner]),e.oJD)}}let _t=(()=>{class n{constructor(t){this.sanitizer=t}transform(t){return this.sanitizer.bypassSecurityTrustHtml(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(ot.H7,16))},n.\u0275pipe=e.Yjl({name:"safeHtml",type:n,pure:!0}),n})(),at=(()=>{class n{constructor(t){this.bannersService=t,this.text={1:this.bannersService?.banners?.invoice_banner?.invoice_banner1?.text,2:this.bannersService?.banners?.invoice_banner?.invoice_banner2?.text,3:this.bannersService?.banners?.invoice_banner?.invoice_banner1?.text}}ngOnInit(){}onClose(){this.banner=0}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(B.j))},n.\u0275cmp=e.Xpm({type:n,selectors:[["banner"]],inputs:{banner:"banner"},decls:1,vars:1,consts:[["class","banner",3,"ngClass","hide",4,"ngIf"],[1,"banner",3,"ngClass"],[1,"banner__close",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","13","height","13","viewBox","0 0 13 13","fill","none"],["x1","12.3743","y1","0.353553","x2","0.353489","y2","12.3744","stroke","#E0E0E0"],["x1","12.3745","y1","12.3744","x2","0.35366","y2","0.353611","stroke","#E0E0E0"],[1,"banner__text",3,"innerHTML"]],template:function(t,o){1&t&&e.YNc(0,it,7,6,"div",0),2&t&&e.Q6J("ngIf",o.text[o.banner])},dependencies:[c.mk,c.O5,_t],styles:['.banner[_ngcontent-%COMP%]{display:block;width:700px;position:absolute;right:60px;top:-15px;z-index:3;visibility:visible}.banner[_ngcontent-%COMP%]:after{content:"";display:block;background:linear-gradient(90deg,#0052A4 -8.17%,#D80A8C 110.33%);height:12px}.banner[_ngcontent-%COMP%] .banner__text[_ngcontent-%COMP%]{font:700 20px Capital Gothic,Arial,sans-serif;line-height:1.5;padding:30px 46px;color:#fff;transition:padding-top .5s ease,padding-bottom .5s ease}.banner_pink[_ngcontent-%COMP%]{width:700px}.banner_pink[_ngcontent-%COMP%] .banner__text[_ngcontent-%COMP%]{background:#D6117F}.banner_blue[_ngcontent-%COMP%]{width:570px;left:30%}.banner_blue[_ngcontent-%COMP%] .banner__text[_ngcontent-%COMP%]{background:#144A90}.banner_light[_ngcontent-%COMP%]{width:410px;left:30%}.banner_light[_ngcontent-%COMP%] .banner__text[_ngcontent-%COMP%]{background:#4698FF}.banner.hide[_ngcontent-%COMP%]{visibility:hidden;height:0}.banner__close[_ngcontent-%COMP%]{position:absolute;right:14px;top:14px;color:#e0e0e0;cursor:pointer} span.highlight{color:#4698ff} .banner_light span.highlight{color:#144a90}']}),n})();function st(n,i){if(1&n&&(e.tHW(0,3,1),e.TgZ(1,"app-tooltip"),e._UZ(2,"p"),e.qZA(),e.N_p()),2&n){const t=e.oxw();e.xp6(2),e.pQV(t.tooltipsService.tooltips.invoices),e.QtT(0)}}function lt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",16),e.NdJ("click",function(){e.CHM(t);const _=e.oxw();return e.KtG(_.openBillingTicket())}),e.SDv(1,17),e.qZA()}}function rt(n,i){if(1&n&&(e.TgZ(0,"div",18),e._UZ(1,"app-total-amounts",19),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("summary",t.summary)}}function ct(n,i){if(1&n&&(e.tHW(0,13,1),e.TgZ(1,"app-tooltip"),e._UZ(2,"p"),e.qZA(),e.N_p()),2&n){const t=e.oxw();e.xp6(2),e.pQV(t.tooltipsService.tooltips.payments),e.QtT(0)}}function pt(n,i){if(1&n&&e._UZ(0,"banner",20),2&n){const t=e.oxw();e.Q6J("banner",t.dueOption)}}let dt=(()=>{class n{constructor(t,o,_,a,s){this.breadcrumbs=t,this.matDialog=o,this.router=_,this.roleService=a,this.tooltipsService=s,this.dueOption=0,this.summary=[],this.breadcrumbs.set
1Links([{route:"/",text:"Home"},{text:"Invoices"}])}canAction(t,o){return this.roleService.canAction(t,o)}ngOnInit(){}openBillingTicket(){let t=[{id:1,value:"Change Billing Information"},{id:2,value:"Request Statement Of Account",checked:!0},{id:3,value:"Request Outage Compensation"},{id:4,value:"Dispute Invoice"},{id:5,value:"Other Billing Related Issues"}];this.canAction("edit","company_information")||(t=t.filter(_=>1!==_.id)),this.matDialog.open(T.c,{data:{title:"Your request refers to",items:t,btn:"OK"}}).afterClosed().subscribe(_=>{switch(_){case 1:this.router.navigate(["/main/support/change-company-information"]);break;case 3:this.router.navigate(["/main/support/request-outage-compensation"]);break;case 4:this.router.navigate(["/main/support/dispute-invoice"]);break;case 5:this.router.navigate(["/main/support/other-billing-related-issue"]);break;case 0:case 2:this.router.navigate(["/main/support/request-statement-of-account"])}})}setDueBanner(t){t&&setTimeout(()=>{this.dueOption=t},800)}getSummary(t){this.summary=t}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(E.W),e.Y36(P.uw),e.Y36(u.F0),e.Y36(b.f),e.Y36(L.b))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-invoices-list"]],decls:19,vars:5,consts:function(){let i,t,o;return i=" Invoices " + "\ufffd*4:1\ufffd\ufffd#1:1\ufffd" + "" + "\ufffd#2:1\ufffd" + "" + "\ufffd0:1\ufffd" + "" + "\ufffd/#2:1\ufffd" + "" + "\ufffd/#1:1\ufffd\ufffd/*4:1\ufffd" + "",t="New billing ticket ",o="Payments " + "\ufffd*15:1\ufffd\ufffd#1:1\ufffd" + "" + "\ufffd#2:1\ufffd" + "" + "\ufffd0:1\ufffd" + "" + "\ufffd/#2:1\ufffd" + "" + "\ufffd/#1:1\ufffd\ufffd/*15:1\ufffd" + "",[[1,"invoices-list"],[1,"title","margin-top"],[1,"title-text","capital-gothic"],i,[4,"ngIf"],[1,"breadcrumbs"],[1,"invoices-list__info"],[1,"invoices-list__actions"],[1,"action-btns"],["class","btn btn_pink capital-gothic","mat-raised-button","",3,"click",4,"ngIf"],["class","invoices-list__total",4,"ngIf"],[3,"dueOption","summary"],[1,"section-title"],o,[1,"pink-divider"],[3,"banner",4,"ngIf"],["mat-raised-button","",1,"btn","btn_pink","capital-gothic",3,"click"],t,[1,"invoices-list__total"],[3,"summary"],[3,"banner"]]},template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"p",2),e.tHW(3,3),e.YNc(4,st,3,1,"app-tooltip",4),e.N_p(),e.qZA(),e.TgZ(5,"div",5),e._UZ(6,"wo-breadcrumbs"),e.qZA()(),e.TgZ(7,"div",6)(8,"div",7)(9,"div",8),e.YNc(10,lt,2,0,"button",9),e.qZA()(),e.YNc(11,rt,2,1,"div",10),e.qZA(),e.TgZ(12,"app-invoices-table",11),e.NdJ("dueOption",function(a){return o.setDueBanner(a)})("summary",function(a){return o.getSummary(a)}),e.qZA(),e.TgZ(13,"h3",12),e.tHW(14,13),e.YNc(15,ct,3,1,"app-tooltip",4),e.N_p(),e.qZA(),e._UZ(16,"mat-divider",14)(17,"app-payments-table"),e.YNc(18,pt,1,1,"banner",15),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngIf",null==o.tooltipsService||null==o.tooltipsService.tooltips?null:o.tooltipsService.tooltips.invoices),e.xp6(6),e.Q6J("ngIf",o.canAction("create","billing_tickets")),e.xp6(1),e.Q6J("ngIf",o.summary),e.xp6(4),e.Q6J("ngIf",null==o.tooltipsService||null==o.tooltipsService.tooltips?null:o.tooltipsService.tooltips.payments),e.xp6(3),e.Q6J("ngIf",0!==o.dueOption))},dependencies:[c.O5,M.lW,A.d,w.K,$.g,we,je,nt,at],styles:['.invoices-list[_ngcontent-%COMP%]{padding:0 60px 40px 0;position:relative}@media (max-width: 960px){.invoices-list[_ngcontent-%COMP%]{padding-right:1rem}}.invoices-list__info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:30px;margin-bottom:50px;gap:30px;flex-wrap:wrap}.invoices-list[_ngcontent-%COMP%] .title-text[_ngcontent-%COMP%] app-tooltip .right{top:13px}.margin-top[_ngcontent-%COMP%]{margin-top:.8rem!important}base-table[_ngcontent-%COMP%]{display:block;overflow-x:auto;white-space:nowrap;padding-bottom:5px}.status[_ngcontent-%COMP%]{box-sizing:border-box;border:1px solid #144A90;width:242px;padding:14px 50px;margin-top:35px;position:relative;color:#144a90}.status[_ngcontent-%COMP%]:before{content:"";width:24px;height:100%;position:absolute;background:#144A90;top:0;left:0}.status__label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;display:block}.status__name[_ngcontent-%COMP%]{font-size:14px;font-weight:400}.status__name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:300}.btn[_ngcontent-%COMP%]{padding:15px 0}.pink-divider[_ngcontent-%COMP%]{background-color:#d6117f;height:2px;border:none;margin-bottom:48px}.section-title[_ngcontent-%COMP%]{margin:55px 0 10px;padding-left:20px}app-payments-table[_ngcontent-%COMP%]{display:block;width:50%}@media (max-width: 1180px){app-payments-table[_ngcontent-%COMP%]{width:70%}}@media (max-width: 940px){app-payments-table[_ngcontent-%COMP%]{width:100%}}']}),n})();var q=l(24984),gt=l(60511);let ut=(()=>{class n{constructor(){}ngOnInit(){}downloadInvoice(){window.open(this.download,"_blank")}previewInvoice(){window.open(this.preview,"_blank")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["invoice-download"]],inputs:{number:"number",download:"download",preview:"preview"},decls:17,vars:1,consts:function(){let i,t,o,_;return i="Document",t="Invoice # " + "\ufffd0\ufffd" + "",o="" + "\ufffd#13\ufffd" + "" + "\ufffd/#13\ufffd" + " Download ",_="" + "\ufffd#16\ufffd" + "" + "\ufffd/#16\ufffd" + " Print ",[[1,"section-title"],i,[1,"pink-divider"],[1,"invoice"],[1,"invoice__name"],["src","/en/assets/pic/icons/document.svg","alt",""],t,[1,"invoice__actions"],[1,"vector"],[1,"file"],[1,"pointer",3,"click"],o,[1,"download-icon"],_,[1,"print-icon"]]},template:function(t,o){1&t&&(e.TgZ(0,"h3",0),e.SDv(1,1),e.qZA(),e._UZ(2,"mat-divider",2),e.TgZ(3,"div",3)(4,"div",4),e._UZ(5,"img",5),e.TgZ(6,"span"),e.SDv(7,6),e.qZA()(),e.TgZ(8,"div",7),e._UZ(9,"div",8),e.TgZ(10,"div",9)(11,"a",10),e.NdJ("click",function(){return o.downloadInvoice()}),e.tHW(12,11),e._UZ(13,"span",12),e.N_p(),e.qZA(),e.TgZ(14,"a",10),e.NdJ("click",function(){return o.previewInvoice()}),e.tHW(15,13),e._UZ(16,"span",14),e.N_p(),e.qZA()()()()),2&t&&(e.xp6(7),e.pQV(o.number),e.QtT(7))},dependencies:[A.d],styles:["[_nghost-%COMP%]{display:block;padding:16px 0 40px;background:#EAF2FC}.section-title[_ngcontent-%COMP%]{padding:0 20px;margin-bottom:0}mat-divider.pink-divider[_ngcontent-%COMP%]{border-top-color:#d6117f;border-top-width:2px}.invoice[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:30px;padding:40px 40px 0 20px}.invoice__name[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;align-self:flex-start}.invoice__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:40px}
1.file[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;color:#144a90;text-transform:uppercase;font-family:Capital Gothic,Arial,sans-serif;font-size:14px;display:flex;align-items:center;gap:10px;margin-bottom:25px;width:-moz-fit-content;width:fit-content}.file[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:25px;width:25px}.vector[_ngcontent-%COMP%]{height:39px;width:43px;background:url(/en/assets/pic/icons/black-vector.svg) no-repeat;fill:#000}.menu-trigger[_ngcontent-%COMP%]{cursor:pointer}.menu-trigger[_ngcontent-%COMP%]:hover{color:#d6117f!important}.menu-trigger[_ngcontent-%COMP%]:hover .print-icon[_ngcontent-%COMP%]{background:url(/en/assets/pic/icons/print-pink.svg) no-repeat;background-size:contain}.menu-trigger[_ngcontent-%COMP%]:hover .download-icon[_ngcontent-%COMP%]{background:url(/en/assets/pic/icons/download-pink.svg) no-repeat;background-size:contain}.download-icon[_ngcontent-%COMP%]{height:25px;width:25px;background:url(/en/assets/pic/icons/download.svg) no-repeat;background-size:contain}.print-icon[_ngcontent-%COMP%]{height:25px;width:25px;background:url(/en/assets/pic/icons/print.svg) no-repeat;background-size:contain}"]}),n})(),Ct=(()=>{class n{constructor(t,o){this.getInvoiceDetails=t,this.route=o,this.number=0}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(q.H),e.Y36(u.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["invoice-details"]],inputs:{invoiceData:["data","invoiceData"]},decls:54,vars:14,consts:function(){let i,t,o,_,a,s,p,I,g;return i="Details",t="Payment Terms",o="Contract Number",_="Contract Date",a="Invoice Issued",s="Invoice Due Date",p="Net Amount ",I="Total Incl VAT",g="Currency",[[1,"invoice-details"],[1,"section-title"],i,[1,"pink-divider"],[1,"invoice-details__field"],[1,"invoice-details__label"],t,[1,"invoice-details__value"],o,_,a,s,p,I,g]},template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"h3",1),e.SDv(2,2),e.qZA(),e._UZ(3,"mat-divider",3),e.TgZ(4,"div",4)(5,"p",5),e.SDv(6,6),e.qZA(),e.TgZ(7,"p",7),e._uU(8),e.qZA()(),e._UZ(9,"mat-divider"),e.TgZ(10,"div",4)(11,"p",5),e.SDv(12,8),e.qZA(),e.TgZ(13,"p",7),e._uU(14),e.qZA()(),e._UZ(15,"mat-divider"),e.TgZ(16,"div",4)(17,"p",5),e.SDv(18,9),e.qZA(),e.TgZ(19,"p",7),e._uU(20),e.qZA()(),e._UZ(21,"mat-divider"),e.TgZ(22,"div",4)(23,"p",5),e.SDv(24,10),e.qZA(),e.TgZ(25,"p",7),e._uU(26),e.qZA()(),e._UZ(27,"mat-divider"),e.TgZ(28,"div",4)(29,"p",5),e.SDv(30,11),e.qZA(),e.TgZ(31,"p",7),e._uU(32),e.qZA()(),e._UZ(33,"mat-divider"),e.TgZ(34,"div",4)(35,"p",5),e.SDv(36,12),e.qZA(),e.TgZ(37,"p",7),e._uU(38),e.ALo(39,"number"),e.qZA()(),e._UZ(40,"mat-divider"),e.TgZ(41,"div",4)(42,"p",5),e.SDv(43,13),e.qZA(),e.TgZ(44,"p",7),e._uU(45),e.ALo(46,"number"),e.qZA()(),e._UZ(47,"mat-divider"),e.TgZ(48,"div",4)(49,"p",5),e.SDv(50,14),e.qZA(),e.TgZ(51,"p",7),e._uU(52),e.qZA()(),e._UZ(53,"mat-divider"),e.qZA()),2&t&&(e.xp6(8),e.hij("",null==o.invoiceData?null:o.invoiceData.payment_terms," days"),e.xp6(6),e.Oqu(null==o.invoiceData?null:o.invoiceData.contract_number),e.xp6(6),e.Oqu(null==o.invoiceData?null:o.invoiceData.contract_date),e.xp6(6),e.Oqu(null==o.invoiceData?null:o.invoiceData.issued_date),e.xp6(6),e.Oqu(null==o.invoiceData?null:o.invoiceData.due_date),e.xp6(6),e.Oqu(e.xi3(39,8,null==o.invoiceData?null:o.invoiceData.net_amount,"0.2-2")),e.xp6(7),e.Oqu(e.xi3(46,11,null==o.invoiceData?null:o.invoiceData.total,"0.2-2")),e.xp6(7),e.Oqu(null==o.invoiceData?null:o.invoiceData.currency))},dependencies:[A.d,c.JJ],styles:[".invoice-details__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;gap:15px;padding:18px 18px 18px 28px}.invoice-details__label[_ngcontent-%COMP%]{width:170px;font-size:16px;font-weight:700}.section-title[_ngcontent-%COMP%]{padding-left:20px}mat-divider[_ngcontent-%COMP%]{border-top-color:#000}mat-divider.pink-divider[_ngcontent-%COMP%]{border-top-color:#d6117f;border-top-width:2px}.link[_ngcontent-%COMP%]{color:#144a90;text-decoration:none;cursor:pointer}"]}),n})();function Ot(n,i){1&n&&(e.TgZ(0,"th",14),e.SDv(1,15),e.qZA())}const It=function(n){return["/main/orders/",n]};function Tt(n,i){if(1&n&&(e.TgZ(0,"td",16)(1,"a",17),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("routerLink",e.VKq(2,It,t.order_id)),e.xp6(1),e.Oqu(t.order_id)}}function Et(n,i){1&n&&(e.TgZ(0,"th",14),e.SDv(1,18),e.qZA())}function mt(n,i){if(1&n&&(e.TgZ(0,"td",19),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij("",t.description," ")}}function St(n,i){1&n&&(e.TgZ(0,"th",14),e.SDv(1,20),e.qZA())}const Nt=function(n){return["/main/services/",n]};function Pt(n,i){if(1&n&&(e.TgZ(0,"a",17),e._uU(1),e._UZ(2,"br"),e.qZA()),2&n){const t=i.index,o=e.oxw().$implicit;e.Q6J("routerLink",e.VKq(2,Nt,o.service_id[t])),e.xp6(1),e.hij(" ",o.service_id[t]," ")}}function Mt(n,i){if(1&n&&(e.TgZ(0,"td",21),e.YNc(1,Pt,3,4,"a",22),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngForOf",t.service_id)}}function ft(n,i){1&n&&(e.TgZ(0,"th",14),e.SDv(1,23),e.qZA())}function ht(n,i){if(1&n&&(e.TgZ(0,"td",16),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",t.period," ")}}function At(n,i){1&n&&(e.TgZ(0,"th",14),e.SDv(1,24),e.qZA())}function vt(n,i){if(1&n&&(e.TgZ(0,"td",16),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.net_amount,"0.2-2")," ")}}function Dt(n,i){1&n&&e._UZ(0,"tr",25)}function bt(n,i){1&n&&e._UZ(0,"tr",26),2&n&&e.Q6J("ngClass",i.$implicit.service_id.length>1?"align-top":"")}function xt(n,i){1&n&&(e.TgZ(0,"div",27),e.SDv(1,28),e.qZA())}let Ft=(()=>{class n{constructor(){this.displayedColumns=["order_id","description","service_id","period","net_amount"]}ngOnInit(){setTimeout(()=>{this.dataSource=this.data,console.log(this.dataSource)},500)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["orders-table"]],inputs:{data:"data"},decls:20,vars:4,consts:function(){let i,t,o,_,a,s;return i="Order ID",t="Description",o="Service ID",_="Period",a="Net Amount",s="No records",[[1,"table-wrap"],["mat-table","",3,"dataSource"],["matColumnDef","order_id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["mat-cell","","style","white-space:break-spaces",4,"matCellDef"],["matColumnDef","service_id"],["mat-cell","","class","cell-nowrap",4,"matCellDef"],["matColumnDef","period"],["matColumnDef","net_amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["class","no-records",4,"ngIf"],["mat-header-cell",""],i,["mat-cell",""],[1,"cell-link","capital-gothic",3,"routerLink"],t,["mat-cell","",2,"white-space","break-spaces"],o,["mat-cell","",1,"cell-nowrap"],["class","cell-link capital-gothic",3,"routerLink",4,"ngFor","ngForOf"],_,a,["mat-header-row",""],["mat-row","",3,"ngClass"],[1,"n
1o-records"],s]},template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"table",1),e.ynx(2,2),e.YNc(3,Ot,2,0,"th",3),e.YNc(4,Tt,3,4,"td",4),e.BQk(),e.ynx(5,5),e.YNc(6,Et,2,0,"th",3),e.YNc(7,mt,2,1,"td",6),e.BQk(),e.ynx(8,7),e.YNc(9,St,2,0,"th",3),e.YNc(10,Mt,2,1,"td",8),e.BQk(),e.ynx(11,9),e.YNc(12,ft,2,0,"th",3),e.YNc(13,ht,2,1,"td",4),e.BQk(),e.ynx(14,10),e.YNc(15,At,2,0,"th",3),e.YNc(16,vt,3,4,"td",4),e.BQk(),e.YNc(17,Dt,1,0,"tr",11),e.YNc(18,bt,1,1,"tr",12),e.qZA(),e.YNc(19,xt,2,0,"div",13),e.qZA()),2&t&&(e.xp6(1),e.Q6J("dataSource",o.dataSource),e.xp6(16),e.Q6J("matHeaderRowDef",o.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",o.displayedColumns),e.xp6(1),e.Q6J("ngIf",0===(null==o.dataSource?null:o.dataSource.length)))},dependencies:[c.mk,c.sg,c.O5,u.yS,r.BZ,r.fO,r.as,r.w1,r.Dz,r.nj,r.ge,r.ev,r.XQ,r.Gk,c.JJ],styles:[".table-wrap[_ngcontent-%COMP%]{overflow-x:auto;white-space:nowrap;padding-bottom:5px}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:16px;padding:15px 10px;text-align:left;border:none}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:700;color:#000;border-bottom:1px solid #000}table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:baseline}table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .cell-link[_ngcontent-%COMP%]{display:block;margin-bottom:10px}table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .cell-link[_ngcontent-%COMP%]:not(:last-child){margin-bottom:26px}table[_ngcontent-%COMP%] .align-top[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .cell-link[_ngcontent-%COMP%]:last-child{margin-bottom:13px}th.mat-header-cell[_ngcontent-%COMP%]:first-of-type, td.mat-cell[_ngcontent-%COMP%]:first-of-type, td.mat-footer-cell[_ngcontent-%COMP%]:first-of-type{padding-left:10px}[_nghost-%COMP%] .mat-table tbody tr:nth-child(odd){background:#EAF2FC}[_nghost-%COMP%] .mat-table .mat-sort-header-content{text-align:left}.cell-link[_ngcontent-%COMP%]{font-size:14px;color:#144a90;text-decoration:none;cursor:pointer}.cell-nowrap[_ngcontent-%COMP%]{white-space:nowrap}table[_ngcontent-%COMP%] td.cell-center[_ngcontent-%COMP%]{text-align:center}"]}),n})();function Rt(n,i){if(1&n&&(e.tHW(0,4,1),e.TgZ(1,"app-tooltip"),e._UZ(2,"p"),e.qZA(),e.N_p()),2&n){const t=e.oxw();e.xp6(2),e.pQV(t.tooltipsService.tooltips.invoice_details),e.QtT(0)}}function Lt(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"div",19)(2,"span",20),e._uU(3),e.qZA(),e.TgZ(4,"span",21),e.SDv(5,22),e.qZA()(),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Tol(t.getStatusClass()),e.xp6(2),e.Oqu(null==t.invoiceData?null:t.invoiceData.status)}}function wt(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"div",19)(2,"span",20),e._uU(3),e.qZA(),e.TgZ(4,"span",21),e.SDv(5,23),e.qZA()(),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Tol(t.getStatusClass()),e.xp6(2),e.Oqu(null==t.invoiceData?null:t.invoiceData.status)}}function $t(n,i){if(1&n&&(e.TgZ(0,"div",24),e._UZ(1,"orders-table",16),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("data",null==t.invoiceData?null:t.invoiceData.services)}}let Vt=(()=>{class n{constructor(t,o,_,a,s,p,I,g){this.breadcrumbs=t,this.matDialog=o,this.router=_,this.getInvoiceDetails=a,this.route=s,this.loading=p,this.tooltipsService=I,this.roleService=g,this.number=0,this.breadcrumbs.setLinks([{route:"/",text:"Home"},{route:"/main/invoices",text:"Invoices"},{text:"Invoice Details"}])}ngOnInit(){this.route.params.subscribe(t=>{this.number=t.id}),this.loadData()}loadData(){this.loading.set(!0),this.getInvoiceDetails.execute(this.number).subscribe({next:t=>{this.invoiceData=t,this.setStatus()},complete:()=>this.loading.set(!1)})}setStatus(){if("fully_paid"!==this.invoiceData.status){if("unknown"===this.invoiceData.status){if(this.invoiceData.total_vat<0||this.invoiceData.net_amount<0)return void(this.invoiceData.status="");if(this.invoiceData.net_amount){let t=D().startOf("day"),_=D(this.invoiceData.due_date,"DD/MM/YYYY").diff(t,"days");if(_<0)return void(this.invoiceData.status=`overdue by ${Math.abs(_)} days`);if(_>0)return void(this.invoiceData.status=`due in ${_} days`);if(0===_)return void(this.invoiceData.status="due for payment")}}}else this.invoiceData.status="Fully Paid"}getStatusClass(){return this.invoiceData?.status.includes("overdue")?"status_pink":this.invoiceData?.status.includes("due in")?"status_blue":""}openBillingTicket(){let t=[{id:1,value:"Change Billing Information"},{id:2,value:"Request Statement Of Account",checked:!0},{id:3,value:"Request Outage Compensation"},{id:4,value:"Dispute Invoice"},{id:5,value:"Other Billing Related Issues"}];this.canAction("edit","company_information")||(t=t.filter(_=>1!==_.id)),this.matDialog.open(T.c,{data:{title:"Your request refers to",items:t,btn:"OK"}}).afterClosed().subscribe(_=>{switch(_){case 1:this.router.navigate(["/main/support/change-company-information"]);break;case 3:this.router.navigate(["/main/support/request-outage-compensation"]);break;case 4:this.router.navigate(["/main/support/dispute-invoice"],{queryParams:{id:this.number,isn_vd:this.invoiceData.num}});break;case 5:this.router.navigate(["/main/support/other-billing-related-issue"]);break;case 0:case 2:this.router.navigate(["/main/support/request-statement-of-account"])}})}canAction(t,o){return this.roleService.canAction(t,o)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(E.W),e.Y36(P.uw),e.Y36(u.F0),e.Y36(q.H),e.Y36(u.gz),e.Y36(k.D),e.Y36(L.b),e.Y36(b.f))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-invoice-item"]],decls:25,vars:8,consts:function(){let i,t,o,_,a;return i="New billing ticket",t="New billing ticket",o="Invoice details " + "\ufffd*5:1\ufffd\ufffd#1:1\ufffd" + "" + "\ufffd#2:1\ufffd" + "" + "\ufffd0:1\ufffd" + "" + "\ufffd/#2:1\ufffd" + "" + "\ufffd/#1:1\ufffd\ufffd/*5:1\ufffd" + "",_="Status",a="Status",[["block","invoice-item"],[1,"invoice-item"],[1,"title","margin-top"],[1,"title-text","capital-gothic"],o,[4,"ngIf"],[1,"breadcrumbs"],[1,"invoice-item__wrap"],[1,"invoice-item__left"],[1,"invoice-item__actions"],[1,"action-btns"],["mat-raised-button","",1,"btn","btn_pink","capital-gothic",3,"click"],i,[1,"invoice-item__download"],[3,"number","download","preview"],[1,"invoice-item__details"],[3,"data"],t,["class","invoice-item__orders-table",4,"ngIf"],[1,"invoice-item__status","status","capital-gothic"],[1,"status__name"],[1,"status__label"],_,a,[1,"invoice-item__orders-table"]]},template:function(t,o){1&t&&(e._UZ(0,"wo-flash",0),e.TgZ(1,"div",1)(2,"div",2)(3,"p",3),e.tHW(4,4),e.YNc(5,Rt,3,1,"app-tooltip",5),e.N_p(),e.qZA(),e.TgZ(6,"div",6),e._UZ(7,"wo-breadcrumbs"),e.qZA()(),e.TgZ(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10)(12,"button",11),e.NdJ("click",function(){return o.openBillingTicket()}),e.SDv(13,12),e.qZA()(),e.YNc(14,Lt,6,3,"ng-container",5),e.qZA(),e.TgZ(15,"div",13),e._UZ(16,"invoice-download",14),e.qZA()(),e.TgZ(17,"div",15),e._UZ(18,"invoice-details",16),e.qZA(),e.TgZ(19,"div",9)(20,"div",10)(21,"button",11),e.NdJ("click",function(){return o.openBillingTicket()}),e.SDv(22,17),e.qZA()(),e.YNc(23,wt,6,3,"ng-container",5),e.qZA()(),e.YNc(24,$t,2,1,"div",18),e.qZA()),2&t&&(e.xp6(5),e.Q6J("ngIf",null==o.tooltipsService||null==o.tooltipsService.tooltips?null:o.tooltipsService.tooltips.invoice_details),e.xp6(9),e.Q6J("ngIf",o.invoiceData&&o.invoiceData.status),e.xp6(2),e.Q6J("number",null==o.invoiceData?null:o.invoiceData.number)("download",null==o.invoiceData?null:o.invoiceData.document_download)("preview",null==o.invoiceData?null:o.invoiceData.document_preview),e.xp6(2),e.Q6J("data",o.invoiceData),e.xp6(
15),e.Q6J("ngIf",o.invoiceData&&o.invoiceData.status),e.xp6(1),e.Q6J("ngIf",null==o.invoiceData?null:o.invoiceData.services))},dependencies:[c.O5,M.lW,w.K,gt.z,$.g,ut,Ct,Ft],styles:['.invoice-item[_ngcontent-%COMP%]{padding:0 60px 40px 0}@media (max-width: 960px){.invoice-item[_ngcontent-%COMP%]{padding-right:1rem}}.invoice-item__wrap[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin:40px 0 50px;gap:100px}@media (max-width: 1180px){.invoice-item__wrap[_ngcontent-%COMP%]{flex-direction:column;gap:40px}}.invoice-item__wrap[_ngcontent-%COMP%] > .invoice-item__actions[_ngcontent-%COMP%]{display:none}@media (max-width: 1180px){.invoice-item__wrap[_ngcontent-%COMP%] > .invoice-item__actions[_ngcontent-%COMP%]{display:block!important;order:1}}.invoice-item[_ngcontent-%COMP%] .title-text[_ngcontent-%COMP%] app-tooltip .right{top:13px}.invoice-item__left[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:space-between;max-width:700px}@media (max-width: 1180px){.invoice-item__left[_ngcontent-%COMP%]{order:3;max-width:500px}.invoice-item__left[_ngcontent-%COMP%] .invoice-item__actions[_ngcontent-%COMP%]{display:none}}.invoice-item__status[_ngcontent-%COMP%]{margin:43px 0}@media (max-width: 1180px){.invoice-item__status[_ngcontent-%COMP%]{margin-bottom:0}}.invoice-item__details[_ngcontent-%COMP%]{flex:0 0 35%;max-width:500px}@media (max-width: 1180px){.invoice-item__details[_ngcontent-%COMP%]{order:2;flex:1}}.margin-top[_ngcontent-%COMP%]{margin-top:.8px!important}.status[_ngcontent-%COMP%]{border:1px solid #A8B1C1;width:255px;padding-left:30px;position:relative;height:50px;display:flex;flex-direction:column;justify-content:center}.status[_ngcontent-%COMP%]:before{content:"";width:24px;height:100%;position:absolute;background:#A8B1C1;left:0}.status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;color:#a8b1c1;text-transform:uppercase;font-weight:700}.status[_ngcontent-%COMP%] span.status__label[_ngcontent-%COMP%]{color:#d9d9d9}.status_blue[_ngcontent-%COMP%]{border-color:#144a90}.status_blue[_ngcontent-%COMP%]:before{background:#144A90}.status_blue[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#144a90}.status_pink[_ngcontent-%COMP%]{border-color:#d6117f}.status_pink[_ngcontent-%COMP%]:before{background:#D6117F}.status_pink[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#d6117f}']}),n})();var z=l(82311);const yt=[{path:"",component:dt,data:{view:"invoice",action:"view"},canActivate:[z.p]},{path:":id",component:Vt,data:{view:"invoice",action:"view"},canActivate:[z.p]}];let Zt=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[u.Bz.forChild(yt),u.Bz]}),n})();var kt=l(7876),Bt=l(10794),Ut=l(5658);let Gt=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[c.ez,O.u5,O.UX,Zt,M.ot,A.t,x.Ps,F.c,r.p0,R.AV,kt.G,Ut.M,Bt.C,m.Tx,f.JX]}),n})()},45029:(ee,h,l)=>{l.d(h,{w:()=>u});var c=l(94650),O=l(10266);let u=(()=>{class T{constructor(E,P){this.matTooltip=E,this.elementRef=P}ngAfterViewInit(){const E=this.elementRef.nativeElement;this.matTooltip.disabled=E.scrollWidth<=E.clientWidth}}return T.\u0275fac=function(E){return new(E||T)(c.Y36(O.gM),c.Y36(c.SBq))},T.\u0275dir=c.lG2({type:T,selectors:[["","ShowTooltipIfTruncated",""]]}),T})()}}]);
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.