1import{c as Le}from"./chunk-A5JII4P3.js";import{b as Oe,c as je}from"./chunk-LQA7FIYW.js";import{a as De}from"./chunk-2X54NDFM.js";import{b as We}from"./chunk-Q7RMEB3S.js";import{b as xe}from"./chunk-6FLGCNCP.js";import{b as Ee,c as Te}from"./chunk-JELOGV5H.js";import"./chunk-WDJKFX77.js";import"./chunk-GHSYXSSY.js";import"./chunk-5BGXWJ7N.js";import"./chunk-N77KOLK4.js";import{a as Ke}from"./chunk-KOZL3F5G.js";import"./chunk-3FF52G7O.js";import{b as Be,c as Ae}from"./chunk-G4X2GBGM.js";import{b as Pe}from"./chunk-YKS4OA3G.js";import"./chunk-44OGH5FE.js";import{a as ve}from"./chunk-MAUWBJZS.js";import{a as Me,b as Ne,c as Fe}from"./chunk-NWFKUXJB.js";import{d as _e,l as Se,q as we}from"./chunk-5KEZDESY.js";import{a as be,c as Ie}from"./chunk-DOQDBSZ7.js";import{P as Ce,S as ge}from"./chunk-5FQYNGSZ.js";import{f as Re}from"./chunk-VK5HUK4D.js";import"./chunk-ASBGWOCD.js";import"./chunk-QL3EPI6E.js";import{a as ye}from"./chunk-VKLKMV4K.js";import{a as he}from"./chunk-35QDLGYT.js";import"./chunk-L4LMAGEJ.js";import{Qb as me,Rb as P,Sb as de,Tc as ue,_ as ae,da as le,jd as fe,la as pe}from"./chunk-VS3TSIZI.js";import{Kb as re,Lb as se,ac as ce,f as Z,j as $,u as ee}from"./chunk-3VRW5VNG.js";import{d as ne,e as oe}from"./chunk-PNLMOTJC.js";import{$a as w,Bb as g,Cb as K,Dc as q,Ec as G,Fb as f,G as D,Kc as J,Pc as Q,Qa as r,Qb as m,Rb as d,Sb as E,Sc as F,Tb as N,Va as C,Xb as h,Yb as y,Zb as b,_a as k,_c as X,ad as Y,ba as O,ca as S,cb as H,dc as U,ea as j,eb as M,hc as o,ic as s,id as ie,jb as v,jc as u,ma as B,na as A,nd as te,p as x,r as W,ra as L,tb as a,ua as z,ub as l,vb as V,zb as R}from"./chunk-DPQN2WG2.js";import"./chunk-WWX6BADO.js";var T=(()=>{class n{handleError(e){return x(e)}constructor(e){this.http=e}download(e){return this.http.post("api/v1/finance/invoiceRows/master",e,{responseType:"blob",headers:{Accept:"application/vnd.ms-excel"}})}post(e,p,i){let c=new X({encoder:new se});return e!=null&&(c=c.set("offset",e.toString())),p!=null&&(c=c.set("limit",p.toString())),this.http.post("api/v1/finance/invoiceRows/master",i,{params:c}).pipe(W(t=>t),D(this.handleError))}static{this.\u0275fac=function(p){return new(p||n)(j(Y))}}static{this.\u0275prov=O({token:n,factory:n.\u0275fac})}}return n})(),ke=(()=>{class n{static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275mod=w({type:n})}static{this.\u0275inj=S({providers:[T],imports:[F]})}}return n})();var _=class{};var Ue=(n,I,e)=>({itemsPerPage:n,currentPage:I,id:e});function qe(n,I){if(n&1&&(V(0,"app-select-option",16),o(1,"serviceCode"),o(2,"async")),n&2){let e=I.$implicit;f("label",s(2,5,u(1,2,e,"label"))),v("value",e)}}function Ge(n,I){if(n&1){let e=R();a(0,"app-download-button",10),g("action",function(){B(e);let i=K();return A(i.onDownload())}),l()}}function Je(n,I){if(n&1){let e=R();a(0,"tr",17),g("click",function(){let i=B(e).$implicit,c=K();return A(c.viewInvoice(i.invoiceId))}),a(1,"td"),m(2),l(),a(3,"td"),m(4),o(5,"localizedDate"),l(),a(6,"td"),m(7),o(8,"localizedDate"),l(),a(9,"td",18),o(10,"transactionType"),o(11,"async"),m(12),o(13,"transactionType"),o(14,"async"),l(),a(15,"td"),m(16),l(),a(17,"td",18),o(18,"serviceCode"),o(19,"async"),m(20),o(21,"serviceCode"),o(22,"async"),l(),a(23,"td",18),o(24,"partyName"),o(25,"async"),m(26),l(),a(27,"td",19),m(28),l(),a(29,"td",19),m(30),o(31,"number"),o(32,"currencyIso3"),o(33,"async"),l(),a(34,"td",19),m(35),o(36,"number"),o(37,"currencyIso3"),o(38,"async"),l(),a(39,"td",19),m(40),o(41,"number"),o(42,"currencyIso3"),o(43,"async"),l(),a(44,"td",19),m(45),o(46,"number"),l(),a(47,"td",19),m(48),l(),a(49,"td"),m(50),l(),a(51,"td"),m(52),l(),a(53,"td"),m(54),l()()}if(n&2){let e=I.$implicit;r(2),d(e.invoiceId),r(2),d(s(5,22,e.transactionAt)),r(3),d(s(8,24,e.exchangeRateAt)),r(2),f("title",s(11,29,u(10,26,e.type,"label"))),r(3),E(" ",s(14,34,u(13,31,e.type,"abbr")),""),r(4),d(e.shipmentNumber),r(),f("title",s(19,39,u(18,36,e.serviceCode,"label"))),r(3),E(" ",s(22,44,u(21,41,e.serviceCode,"abbr")),""),r(3),f("title",s(25,48,s(24,46,e.sourcePartyId))),r(3),d(e.sourcePartyId),r(2),d(e.sourceUnits),r(2),N("",u(31,50,e.sourcePrice,"1.2-2")," ",s(33,5
15,s(32,53,e.sourceCurrencyId)),""),r(5),N("",u(36,57,e.sourceAmount,"1.2-2")," ",s(38,62,s(37,60,e.sourceCurrencyId)),""),r(5),N("",u(41,64,e.amount,"1.2-2")," ",s(43,69,s(42,67,e.invoiceCurrencyId))," "),r(5),d(u(46,71,e.usdAmount,"1.2-2")),r(3),d(e.vatFactor),r(2),d(e.financeInvoiceId),r(2),d(e.partyInvoiceNumber),r(2),d(e.financeInvoiceNumber)}}var He=(()=>{class n extends De{constructor(e,p,i,c){super("admin/finance/invoiceRows",ce.Invoices,[{property:"invoiceId",labelKey:"field.invoiceId.label",hintKey:null,iconClass:null,visible:!0},{property:"transactionAt",labelKey:"field.transactionAt.label",hintKey:null,iconClass:null,visible:!0},{property:"exchangeRateAt",labelKey:"field.exchangeRateAt.label",hintKey:null,iconClass:null,visible:!0},{property:"type",labelKey:"field.transactionType.label",hintKey:null,iconClass:null,visible:!0},{property:"shipmentNumber",labelKey:"field.shipment.label",hintKey:null,iconClass:null,visible:!0},{property:"serviceCode",labelKey:"field.serviceCode.label",hintKey:null,iconClass:null,visible:!0},{property:"sourcePartyId",labelKey:"field.sourceParty.label",hintKey:null,iconClass:null,visible:!0},{property:"sourceUnits",labelKey:"field.sourceUnits.label",hintKey:null,iconClass:null,visible:!0},{property:"sourcePrice",labelKey:"field.sourcePrice.label",hintKey:null,iconClass:null,visible:!0},{property:"sourceAmount",labelKey:"field.sourceAmount.label",hintKey:null,iconClass:null,visible:!0},{property:"amount",labelKey:"field.amount.label",hintKey:null,iconClass:null,visible:!0},{property:"usdAmount",labelKey:"field.usdAmount.label",hintKey:null,iconClass:null,visible:!0},{property:"vatFactor",labelKey:"field.vatFactor.label",hintKey:null,iconClass:null,visible:!0},{property:"financeInvoiceId",labelKey:"field.financeInvoiceId.label",hintKey:null,iconClass:null,visible:!0},{property:"partyInvoiceNumber",labelKey:"field.partyInvoiceNumber.label",hintKey:null,iconClass:null,visible:!0},{property:"financeInvoiceNumber",labelKey:"field.financeInvoiceNumber.label",hintKey:null,iconClass:null,visible:!0}],c),this.service=e,this.activatedRoute=p,this.downloadService=i,this.offset=0,this.limit=1e3,this.serviceCodes=P.keys,this._filterState=me.None,this.filterStateChange=new z}get filterState(){return this._filterState}set filterState(e){this._filterState!==e&&(this._filterState=e,this.serviceCode=this._filterState)}parseRoute(){let e=this.activatedRoute.snapshot.queryParams.state;e&&(this.serviceCode=Number.parseInt(e))}onSaveSettings(e){super.onSaveSettings(e),e.filterShipmentNumber=this.filterShipmentNumber,e.filterInvoiceNumber=this.filterFinanceInvoiceId,e.filterServiceCode=this.serviceCode,e.filterPartyInvoiceNumber=this.filterPartyInvoiceNumber,e.filterFinanceInvoiceNumber=this.filterFinanceInvoiceNumber}onLoadSettings(e){super.onLoadSettings(e),e&&(this.filterShipmentNumber=e.filterShipmentNumber,this.filterFinanceInvoiceId=e.filterInvoiceNumber,this.serviceCode=e.filterServiceCode,this.filterPartyInvoiceNumber=e.filterPartyInvoiceNumber,this.filterFinanceInvoiceNumber=e.filterFinanceInvoiceNumber),this.parseRoute()}onLoad(){let e=new _;return e.financeInvoiceId=this.filterFinanceInvoiceId,e.shipmentNumber=this.filterShipmentNumber,e.serviceCode=this.serviceCode,e.partyInvoiceNumber=this.filterPartyInvoiceNumber,e.financeInvoiceNumber=this.filterFinanceInvoiceNumber,this.service.post(this.offset,this.limit,e)}onDownload(){let e=new _;return e.shipmentNumber=this.filterShipmentNumber,e.financeInvoiceId=this.filterFinanceInvoiceId,e.serviceCode=this.serviceCode,e.downloadSettings=this.downloadService.getSettings("InvoiceRows"),this.loading=this.alertService.start(),this.service.download(e).subscribe(p=>{this.downloadService.download(e.downloadSettings,p),this.loading=this.alertService.success()},p=>{this.loading=this.alertService.error(p)},()=>{})}viewInvoice(e){this.router.navigate(["admin","finance","invoices",e])}static{this.\u0275fac=function(p){return new(p||n)(C(T),C(ie),C(Pe),C(L))}}static{this.\u0275cmp=k({type:n,selectors:[["ng-component"]],inputs:{filterState:"filterState"},outputs:{filterStateChange:"filterStateChange"},standalone:!1,features:[H],decls:24,vars:36,consts:[["parentTitleTranslateKey","nav.finance","titleTranslateKey","nav.invoiceRows","helpUri","help/admin/invoice-row/master",3,"loading"],[1,"row","form-group"],["name","filterShipmentNumber",1,"col-sm-2",3,"ngModelChange","label","ngModel"],["name","filterFinanceInvoiceId",1,"col-sm-2",3,"ngModelChange","label","ngModel"],["name","serviceCode",1,"col-sm-2",3,"ngModelChange","label","ngModel"],[3,"value","label",4,"ngFor","ngForOf"],["name","filterPartyInvoiceNumber",1,"col-sm-2",3,"ngModelChange","label","ngModel"],["name","filterFinanceInvoiceNumber",1,"col-sm-2",3,"ngModelChange","label","ngModel"],[1,"col-sm-12","adn-buttons-horizontal","text-right"],[3,"action",4,"ngIf"],[3,"action"],[1,"table-responsive"],[1,"table","table-striped","table-bordered","table-sm"],["adn-master-table-header","",3,"sortColumnChange","sortOrderChange","columns","sortColumn","sortOrder"],["class","clickable",3,"click",4,"ngFor","ngForOf"],[3,"onPageChanged","onPageSizeChanged","limit","uri"],[3,"value","label"],[1,"clickable",3,"click"],[3,"title"],[1,"text-right"]],template:function(p,i){p&1&&(a(0,"app-panel",0)(1,"div",1)(2,"app-text-input",2),o(3,"translate"),b("ngModelChange",function(t){return y(i.filterShipmentNumber,t)||(i.filterShipmentNumber=t),t}),l(),a(4,"app-text-input",3),o(5,"translate"),b("ngModelChange",function(t){return y(i.filterFinanceInvoiceId,t)||(i.filterFinanceInvoiceId=t),t}),l(),a(6,"app-select-input",4),o(7,"translate"),b("ngModelChange",function(t){return y(i.serviceCode,t)||(i.serviceCode=t),t}),M(8,qe,3,7,"app-select-option",5),l(),a(9,"app-text-input",6),o(10,"translate"),b("ngModelChange",function(t){return y(i.filterPartyInvoiceNumber,t)||(i.filterPartyInvoiceNumber=t),t}),l(),a(11,"app-text-input",7),o(12,"translate"),b("ngModelChange",function(t){return y(i.filterFinanceInvoiceNumber,t)||(i.filterFinanceInvoiceNumber=t),t}),l()(),a(13,"div",1)(14,"div",8),M(15,Ge,1,0,"app-download-button",9),a(16,"app-button-search",10),g("action",function(){return i.onRefresh()}),l()()(),a(17,"div",11)(18,"table",12)(19,"thead",13),b("sortColumnChange",function(t){return y(i.sortColumn,t)||(i.sortColumn=t),t})("sortOrderChange",function(t){return y(i.sortOrder,t)||(i.sortOrder=t),t}),l(),a(20,"tbody"),M(21,Je,55,74,"tr",14),o(22,"paginate"),l()()(),a(23,"app-master-pagination",15),g("onPageChanged",function(t){return i.setPage(t)})("onPageSizeChanged",function(t){return i.setPageSize(t)}),l()()),p&2&&(v("loading",i.loading),r(2),f("label",s(3,19,"field.shipment.label")),h("ngModel",i.filterShipmentNumber),r(2),f("label",s(5,21,"field.financeInvoiceId.label")),h("ngModel",i.filterFinanceInvoiceId),r(2),f("label",s(7,23,"field.serviceCode.label")),h("ngModel",i.serviceCode),r(2),v("ngForOf",i.serviceCodes),r(),f("label",s(10,25,"field.partyInvoiceNumber.label")),h("ngModel",i.filterPartyInvoiceNumber),r(2),f("label",s(12,27,"field.financeInvoiceNumber.label")),h("ngModel",i.filterFinanceInvoiceNumber),r(4),v("ngIf",i.canDownload),r(4),v("columns",i.columns),h("sortColumn",i.sortColumn)("sortOrder",i.sortOrder),r(2),v("ngForOf",u(22,29,i.listItems,U(32,
1Ue,i.pageSize,i.page,i.uri))),r(2),v("limit",i.limit)("uri",i.uri))},dependencies:[q,G,Z,$,ae,le,Ne,Me,fe,_e,Se,ue,Ee,J,Q,Be,Ce,be,P,Oe,ne],encapsulation:2})}}return n})();var Qe=[{path:"",component:He}],it=(()=>{class n{static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275mod=w({type:n})}static{this.\u0275inj=S({imports:[We,Te,xe,re,F,Re,pe,Ae,ge,Ke,Fe,ye,ee,ke,Le,we,Ie,ve,he,te.forChild(Qe),de,je,oe]})}}return n})();export{it as AdminFinanceInvoiceRowModule};
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.