dealpos 11.0.2 → 11.0.3
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/POS/1122.ab60516c071432ce.js +1 -0
- package/POS/1322.f583413fbcdad6a6.js +1 -0
- package/POS/{1364.0d84452dfffa996f.js → 1364.79620a2b628623d3.js} +1 -1
- package/POS/{159.2e555a0cb014bc7a.js → 159.d27013805b6252b8.js} +1 -1
- package/POS/{1672.27aef3848d42360a.js → 1672.603891dc2fb9a96f.js} +1 -1
- package/POS/{2397.30b2b6d5791fc2e7.js → 2397.5545109685209821.js} +1 -1
- package/POS/{241.48542eface11eb1f.js → 241.215f732edc19032d.js} +1 -1
- package/POS/{2944.bb1483a46deca31e.js → 2944.5bbddb44a927ec8b.js} +1 -1
- package/POS/4040.4e9ce83947a33f99.js +1 -0
- package/POS/4265.1348bf362d01215a.js +1 -0
- package/POS/{6346.aaffd201fe1aa4ba.js → 6346.d62ec085693207ea.js} +1 -1
- package/POS/6889.d9187e541ce53576.js +1 -0
- package/POS/{728.eb6101c4e98c3ddd.js → 728.5ec15dd44091e3c5.js} +1 -1
- package/POS/7513.1bc24e12f8cd03c5.js +1 -0
- package/POS/8003.1c55cc7068930c3a.js +1 -0
- package/POS/{8410.d27e68780092863f.js → 8410.a8e9fa5e13014c64.js} +1 -1
- package/POS/{8932.692509b4941b14b0.js → 8932.0d5920dca29ec189.js} +1 -1
- package/POS/pos-index.html +2 -2
- package/POS/{runtime.71d4f803656c861e.js → runtime.d22351d06d95d011.js} +1 -1
- package/Scripts/Angular/Controller/Sell.js +8 -8
- package/package.json +1 -1
- package/POS/1122.e7da1f34cdc495a2.js +0 -1
- package/POS/1322.a3b2cd8d90714973.js +0 -1
- package/POS/4040.3e237e372ded8dc0.js +0 -1
- package/POS/4265.c5fe1d85cd00aab1.js +0 -1
- package/POS/6889.1900a72ee718303b.js +0 -1
- package/POS/7513.3a37c4892546cd31.js +0 -1
- package/POS/8003.fea529e07354e0db.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1122],{1122:(J1,P,A)=>{A.r(P),A.d(P,{ReportsModule:()=>O1});var s=A(6019),p=A(9133),m=A(2262),ot=A(4176),rt=A(8727),L=A(6731),it=A(9859),lt=A(138),st=A(2605),Q=A(8525),pt=A(7348),D=A(1949),c=A(5496),g=A(4382),S=A(5304),Y=A(5761),t=A(3668),_=A(8596),v=A(2387),I=A(7481),M=A(859);let ct=(()=>{class a{constructor(e,o,n,r){this.httpService=e,this.toaster=o,this.dialogRef=n,this.data=r,this.modalConfig=new Y.O,this.ExportPageNumber=r.Filter.ExportPageNumber,this.ExportRowCount=r.Filter.ExportRowCount,this.totalCount=r.TotalCount,this.modalConfig.title="Export Report",this.modalConfig.customWidth="379px",this.modalConfig.okText="Export"}ngOnInit(){this.countExportRowCount()}onPageNumberChange(e){this.ExportPageNumber=e,this.countExportRowCount()}countExportRowCount(){let e=this.data.Filter.ExportRowCount;this.ExportPageNumber>1?(this.endExport=this.totalCount-this.ExportPageNumber*e>0?this.ExportPageNumber*e:this.totalCount,this.startExport=this.ExportPageNumber-1==1?e+1:(this.ExportPageNumber-1)*e+1,this.startExport>this.totalCount&&(this.startExport=this.totalCount)):(this.startExport=this.ExportPageNumber,this.endExport=this.totalCount>e?e:this.totalCount)}onOk(){this.dialogRef.close({ExportPageNumber:this.ExportPageNumber,ExportRowCount:this.ExportRowCount})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(S.so),t.Y36(S.WI))},a.\u0275cmp=t.Xpm({type:a,selectors:[["ng-component"]],decls:28,vars:14,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container",2,"width","350px"],[1,"row","form-group"],[1,"col-6","pl-0","pr-3"],[1,"font-weight-bold"],["type","text","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-6","pr-0","pl-3"],[1,"border","border-2","border-secondary","pl-3","pt-3","bg-light",2,"height","32px"],[1,"col-12","p-0"],[1,"border","border-1","pl-3","pt-3","alert-warning",2,"height","32px"],[1,"fas","fa-info-circle","mr-1"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content"),t.TgZ(2,"div",1),t.TgZ(3,"div",2),t.TgZ(4,"div",3),t.TgZ(5,"label",4),t._uU(6,"Page Number"),t.qZA(),t.TgZ(7,"input",5),t.NdJ("ngModelChange",function(r){return o.ExportPageNumber=r})("ngModelChange",function(r){return o.onPageNumberChange(r)}),t.qZA(),t.qZA(),t.TgZ(8,"div",6),t.TgZ(9,"label",4),t._uU(10,"Page Size"),t.qZA(),t.TgZ(11,"div",7),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"div",2),t.TgZ(15,"div",8),t.TgZ(16,"div",9),t._UZ(17,"i",10),t._uU(18," Exporting ["),t.TgZ(19,"span",4),t._uU(20),t.ALo(21,"number"),t.ALo(22,"number"),t.qZA(),t._uU(23,"] record of "),t.TgZ(24,"span",4),t._uU(25),t.ALo(26,"number"),t.qZA(),t._uU(27," transactions "),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(7),t.Q6J("ngModel",o.ExportPageNumber),t.xp6(5),t.Oqu(t.lcZ(13,6,o.ExportRowCount)),t.xp6(8),t.AsE("",t.lcZ(21,8,o.startExport)," - ",t.lcZ(22,10,o.endExport),""),t.xp6(5),t.Oqu(t.lcZ(26,12,o.totalCount)))},directives:[I.M,p.Fj,M.b,p.JJ,p.On],pipes:[s.JJ],styles:[""]}),a})();var d=A(1139),h=A(4765),u=A(9265),R=A(315),q=A(7163),f=A(4290),T=A(1464);function _t(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",21),t.TgZ(1,"a",22),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).export("default")}),t._UZ(2,"i",23),t._uU(3," Export"),t.qZA(),t.TgZ(4,"button",24),t._UZ(5,"b",25),t.qZA(),t.TgZ(6,"ul",26),t.TgZ(7,"li",27),t.TgZ(8,"a",28),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).export("contact")}),t._uU(9,"Export With Contact Detail"),t.qZA(),t.qZA(),t.TgZ(10,"li",27),t.TgZ(11,"a",28),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).export("complete")}),t._uU(12,"Export Complete Detail"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function ut(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",29),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",30),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Customer"),t.qZA(),t.TgZ(8,"autocompleteV2",31),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",32),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",33),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Sales"),t.qZA(),t.TgZ(17,"ng-select",34),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Group"),t.qZA(),t.TgZ(21,"ng-select",34),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ContactGroupID=n}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Bin"),t.qZA(),t.TgZ(25,"radio-options",35),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Bin=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("items",e.pageData.Options.Sales)("ngModel",e.pageData.Filter.SalesID),t.xp6(4),t.Q6J("items",e.pageData.Options.ContactGroups)("ngModel",e.pageData.Filter.ContactGroupID),t.xp6(4),t.Q6J("model",e.pageData.Filter.Bin)}}function gt(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",36),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Type"),t.qZA(),t.TgZ(4,"ng-select",34),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Currency"),t.qZA(),t.TgZ(8,"ng-select",37),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Delivery"),t.qZA(),t.TgZ(12,"ng-select",38),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.DeliveryStateID=n}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Complementary"),t.qZA(),t.TgZ(16,"radio-options",39),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Complementary=n}),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"h6"),t._uU(19,"Creator"),t.qZA(),t.TgZ(20,"autocompleteV2",40),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.CreatorID=n}),t.qZA(),t.qZA(),t.TgZ(21,"div"),t.TgZ(22,"h6"),t._uU(23,"Note Visible"),t.qZA(),t.TgZ(24,"radio-options",41),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.NoteVisible=n}),t.qZA(),t.qZA(),t.TgZ(25,"div"),t.TgZ(26,"h6"),t._uU(27,"Sort"),t.qZA(),t.TgZ(28,"radio-options",42),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.SortBy=n})("modelChange",function(){return t.CHM(e),t.oxw(2).onSubmitFilter()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("items",e.pageData.Options.Types)("ngModel",e.pageData.Filter.TypeID),t.xp6(4),t.Q6J("items",e.pageData.Options.Currencies)("ngModel",e.pageData.Filter.CurrencyID),t.xp6(4),t.Q6J("items",e.pageData.Options.Deliveries)("ngModel",e.pageData.Filter.DeliveryStateID),t.xp6(4),t.Q6J("model",e.pageData.Filter.Complementary),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CreatorID),t.xp6(4),t.Q6J("model",e.pageData.Filter.NoteVisible),t.xp6(4),t.Q6J("model",e.pageData.Filter.SortBy)("options",e.SortBy)}}function dt(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1," @ Cost "),t.qZA())}function mt(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1," /"),t.qZA())}function Zt(a,i){if(1&a&&(t.TgZ(0,"a",46),t.TgZ(1,"span",61),t._uU(2),t.qZA(),t.qZA()),2&a){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Order/Sales_Order/Info?ID=",e.SalesOrderID,"",t.LSH),t.xp6(2),t.Oqu("#"+e.SalesOrderNumber)}}function ht(a,i){if(1&a&&(t.TgZ(0,"span",51),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" "," - Profit: "+t.lcZ(2,1,e.Profit),"")}}function xt(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1,"- "),t.qZA())}function Tt(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1,": "),t.qZA())}function Ct(a,i){if(1&a&&(t.TgZ(0,"small"),t._uU(1),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" (",e.Commissions[0].Quantity," unit )")}}function ft(a,i){if(1&a&&(t.TgZ(0,"i",73),t._uU(1),t.YNc(2,Ct,2,1,"small",48),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" sold by ",e.Commissions[0].SalesName," "),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.Commissions[0].Quantity)<e.Quantity)}}function At(a,i){if(1&a&&(t.TgZ(0,"li"),t.TgZ(1,"i"),t._uU(2),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.hij("( ",e.Quantity+" unit by "+e.SalesName," )")}}function Dt(a,i){if(1&a&&(t.TgZ(0,"ul",74),t.TgZ(1,"li"),t.TgZ(2,"i"),t._uU(3,"sold by"),t.qZA(),t.qZA(),t.YNc(4,At,3,1,"li",18),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(4),t.Q6J("ngForOf",null==e?null:e.Commissions)}}function qt(a,i){if(1&a&&(t.TgZ(0,"th",75),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.UnitCost)," ")}}function yt(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"th",11),t.TgZ(2,"div"),t.TgZ(3,"span",62),t._uU(4),t.qZA(),t.YNc(5,ft,3,2,"i",63),t.YNc(6,Dt,5,1,"ul",64),t._UZ(7,"span",65),t.qZA(),t.qZA(),t.TgZ(8,"th",66),t._uU(9),t.qZA(),t.TgZ(10,"th",67),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"th",14),t._uU(14),t.qZA(),t.YNc(15,qt,3,3,"th",68),t.TgZ(16,"th",69),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"th",70),t.TgZ(20,"div",71),t._uU(21),t.qZA(),t.TgZ(22,"div",72),t._uU(23),t.ALo(24,"number"),t.qZA(),t.qZA(),t.TgZ(25,"th",69),t._uU(26),t.ALo(27,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(3);t.xp6(4),t.Oqu(null==e?null:e.Name),t.xp6(1),t.Q6J("ngIf",1==(null==e?null:e.Commissions.length)),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.Commissions.length)>1),t.xp6(1),t.Q6J("innerHtml",null==e?null:e.Note,t.oJD),t.xp6(2),t.hij(" ",null==e?null:e.Code," "),t.xp6(2),t.hij(" ",t.lcZ(12,12,null==e?null:e.Quantity)," "),t.xp6(3),t.hij(" ",null==e?null:e.UOMName," "),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(2),t.hij(" ",t.lcZ(18,14,null==e?null:e.UnitPrice)," "),t.xp6(4),t.hij(" ",0==(null==e?null:e.Discount)?"":(null==e?null:e.Discount)+"%"," "),t.xp6(2),t.hij(" ",0==(null==e?null:e.DiscountAmount)?"":t.lcZ(24,16,null==e?null:e.DiscountAmount)," "),t.xp6(3),t.hij(" ",t.lcZ(27,18,null==e?null:e.Total)," ")}}function vt(a,i){if(1&a&&(t.ynx(0),t.TgZ(1,"tr"),t.TgZ(2,"th",76),t._uU(3),t.qZA(),t.TgZ(4,"th",77),t._uU(5),t.qZA(),t.TgZ(6,"th",78),t._uU(7),t.ALo(8,"number"),t.qZA(),t.qZA(),t.BQk()),2&a){const e=i.$implicit;t.xp6(3),t.hij("",e.Label," :"),t.xp6(2),t.hij(" ",e.CurrencySymbol," "),t.xp6(2),t.hij(" ",t.lcZ(8,3,e.Amount)," ")}}function St(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"div",44),t.TgZ(2,"div",45),t.TgZ(3,"div"),t.TgZ(4,"a",46),t.TgZ(5,"span",47),t._uU(6),t.qZA(),t.qZA(),t.YNc(7,mt,2,0,"span",48),t.YNc(8,Zt,3,2,"a",49),t.TgZ(9,"span"),t._uU(10),t.ALo(11,"date"),t._UZ(12,"small",50),t.ALo(13,"date"),t.TgZ(14,"small",51),t._uU(15),t.ALo(16,"showIfNotNullOrEmptyString"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"strong",52),t._uU(19),t.ALo(20,"number"),t.ALo(21,"sum"),t.TgZ(22,"span"),t._uU(23),t.ALo(24,"showIfNotNullOrEmptyString"),t.qZA(),t.qZA(),t.YNc(25,ht,3,3,"span",53),t.TgZ(26,"i",54),t._uU(27),t.qZA(),t.TgZ(28,"span",55),t._uU(29),t.qZA(),t.YNc(30,xt,2,0,"span",48),t.YNc(31,Tt,2,0,"span",48),t.TgZ(32,"span",55),t._uU(33),t.qZA(),t.qZA(),t.qZA(),t.TgZ(34,"div",56),t.TgZ(35,"label",57),t._uU(36),t.qZA(),t.qZA(),t.qZA(),t.TgZ(37,"table",58),t._UZ(38,"thead"),t.TgZ(39,"tbody",59),t.YNc(40,yt,28,20,"tr",18),t.qZA(),t.qZA(),t.TgZ(41,"table",60),t.YNc(42,vt,9,5,"ng-container",18),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(4),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.ID,"",t.LSH),t.xp6(2),t.hij(" ",e.EntityName+" # "+e.Number,""),t.xp6(1),t.Q6J("ngIf",o.pageData.DualReceiptNumber),t.xp6(1),t.Q6J("ngIf",o.pageData.DualReceiptNumber),t.xp6(2),t.hij(" "," - "+t.xi3(11,18,e.Date,"dd MMM yyyy")," "),t.xp6(2),t.Q6J("innerHtml","("+t.xi3(13,21,e.Created,"HH:mm")+(null!=e.Order&&e.Order.ClientTimestamp?" - Client Timestamp: "+e.Order.ClientTimestamp:"")+")",t.oJD),t.xp6(3),t.Oqu(t.xi3(16,24,e.CustomerNameDisplay," - {0}")),t.xp6(4),t.hij(" ","[Q: "+t.lcZ(20,27,t.xi3(21,29,e.Items,"Quantity"))+", T: "+(e.Final?e.Final:"")+"]"," "),t.xp6(4),t.Oqu(t.xi3(24,32,e.SalesName," - Sales: {0}")),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleProfit),t.xp6(2),t.hij(" ",null==e.DeliveryOutlet?"":": Delivered from "+e.DeliveryOutlet," "),t.xp6(2),t.Oqu(null==e.AuthorizationKey?"":": "+e.AuthorizationKey),t.xp6(1),t.Q6J("ngIf",e.SONote&&e.AuthorizationKey),t.xp6(1),t.Q6J("ngIf",!e.AuthorizationKey),t.xp6(2),t.Oqu(null==e.SONote?"":e.SONote),t.xp6(3),t.Oqu(e.PaymentStateLabel),t.xp6(4),t.Q6J("ngForOf",e.Items),t.xp6(2),t.Q6J("ngForOf",e.Aggregate)}}function Mt(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Qty"),t.qZA(),t.TgZ(3,"span",76),t._uU(4),t.ALo(5,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,1,e.data.Aggregate.ItemsQuantity))}}function bt(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Qty Complementary"),t.qZA(),t.TgZ(3,"span",76),t._uU(4),t.ALo(5,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,1,e.data.Aggregate.QuantityComplementary))}}function Ot(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Qty Sold"),t.qZA(),t.TgZ(3,"span",76),t._uU(4),t.ALo(5,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,1,e.data.Aggregate.QuantityWithoutComplementary))}}function Jt(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Cost ("),t.TgZ(3,"span",81),t._uU(4),t.ALo(5,"number"),t.qZA(),t._uU(6,"%)"),t.qZA(),t.TgZ(7,"span",76),t._uU(8),t.ALo(9,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,2,e.data.Aggregate.CostRatio)),t.xp6(4),t.Oqu(t.lcZ(9,4,e.data.Aggregate.Cost))}}function It(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t.TgZ(2,"span"),t._uU(3,"Profit"),t.qZA(),t._uU(4," ("),t.TgZ(5,"span",81),t._uU(6),t.ALo(7,"number"),t.qZA(),t._uU(8,"%)"),t.qZA(),t.TgZ(9,"span",76),t._uU(10),t.ALo(11,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(6),t.Oqu(t.lcZ(7,2,e.data.Aggregate.ProfitRatio)),t.xp6(4),t.Oqu(t.lcZ(11,4,e.data.Aggregate.Profit))}}function Ut(a,i){if(1&a&&(t.TgZ(0,"div",79),t.TgZ(1,"div",80),t.TgZ(2,"div"),t.TgZ(3,"strong"),t._uU(4,"Tax Added"),t.qZA(),t.TgZ(5,"span",76),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.TgZ(8,"div"),t.TgZ(9,"strong"),t._uU(10,"Sales with Tax"),t.qZA(),t.TgZ(11,"span",76),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"div",80),t.TgZ(15,"div"),t.TgZ(16,"strong"),t._uU(17,"Orders"),t.qZA(),t.TgZ(18,"span",76),t._uU(19),t.ALo(20,"number"),t.qZA(),t.qZA(),t.YNc(21,Mt,6,3,"div",48),t.YNc(22,bt,6,3,"div",48),t.YNc(23,Ot,6,3,"div",48),t.qZA(),t.TgZ(24,"div",80),t.TgZ(25,"div"),t.TgZ(26,"strong"),t._uU(27,"Gross Sales"),t.qZA(),t.TgZ(28,"span",76),t._uU(29),t.ALo(30,"number"),t.qZA(),t.qZA(),t.TgZ(31,"div"),t.TgZ(32,"strong"),t._uU(33,"Discount"),t.qZA(),t.TgZ(34,"span",76),t._uU(35),t.ALo(36,"number"),t.qZA(),t.qZA(),t.TgZ(37,"div"),t.TgZ(38,"strong"),t._uU(39,"Tax Incl."),t.qZA(),t.TgZ(40,"span",76),t._uU(41),t.ALo(42,"number"),t.qZA(),t.qZA(),t.TgZ(43,"div"),t.TgZ(44,"strong"),t._uU(45,"Net Sales"),t.qZA(),t.TgZ(46,"span",76),t._uU(47),t.ALo(48,"number"),t.qZA(),t.qZA(),t.YNc(49,Jt,10,6,"div",48),t.YNc(50,It,12,6,"div",48),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(6),t.Oqu(t.xi3(7,12,e.data.Aggregate.TaxAdd,".0-0")),t.xp6(6),t.Oqu(t.xi3(13,15,e.data.Aggregate.SalesWithTax,".0-0")),t.xp6(7),t.Oqu(t.xi3(20,18,e.data.Aggregate.Orders,".0-0")),t.xp6(2),t.Q6J("ngIf",!e.pageData.Filter.Complementary),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Complementary),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Complementary),t.xp6(6),t.Oqu(t.xi3(30,21,e.data.Aggregate.GrossItems,".0-0")),t.xp6(6),t.Oqu(t.xi3(36,24,e.data.Aggregate.Discount,".0-0")),t.xp6(6),t.Oqu(t.xi3(42,27,e.data.Aggregate.TaxInclude,".0-0")),t.xp6(6),t.Oqu(t.xi3(48,30,e.data.Aggregate.SalesWithoutTax,".0-0")),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleProfit)}}function wt(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,_t,13,0,"div",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.YNc(5,ut,26,11,"div",4),t.YNc(6,gt,29,11,"div",5),t.qZA(),t.TgZ(7,"a",6),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.hideMore=!n.hideMore}),t._uU(8,"More "),t._UZ(9,"i",7),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.TgZ(11,"div",8),t.TgZ(12,"table",9),t.TgZ(13,"thead",10),t.TgZ(14,"tr"),t.TgZ(15,"th",11),t._uU(16,"Name"),t.qZA(),t.TgZ(17,"th",12),t._uU(18,"Code"),t.qZA(),t.TgZ(19,"th",13),t._uU(20,"Qty"),t.qZA(),t.TgZ(21,"th",14),t._uU(22,"UOM"),t.qZA(),t.YNc(23,dt,2,0,"th",15),t.TgZ(24,"th",16),t._uU(25,"@ Price"),t.qZA(),t.TgZ(26,"th",13),t._uU(27,"Disc."),t.qZA(),t.TgZ(28,"th",16),t._uU(29,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(30,"tbody"),t.TgZ(31,"tr"),t.TgZ(32,"td",17),t.YNc(33,St,43,35,"div",18),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(34,Ut,51,33,"div",19),t.TgZ(35,"POS-complex-pagination",20),t.NdJ("jumpToPage",function(){return t.CHM(e),t.oxw().getListData()})("previousPage",function(){return t.CHM(e),t.oxw().getListData()})("nextPage",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleExport),t.xp6(3),t.Q6J("ngIf",e.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!e.hideMore),t.xp6(17),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(9),t.uIk("colspan",e.pageData.HasRoleCost?8:7),t.xp6(1),t.Q6J("ngForOf",null==e.data?null:e.data.Data),t.xp6(1),t.Q6J("ngIf",(null==e.data?null:e.data.Data.length)>0),t.xp6(1),t.Q6J("total",null==e.data?null:e.data.Data.length)("pageData",e.pageData)}}let Ft=(()=>{class a extends d.n{constructor(e,o,n,r,l,Z){super(e,"Report/ReportDetail","ReportLoader/ReportDetail",null,r),this.httpService=e,this.csvConverter=o,this.datePipe=n,this.activatedRoute=r,this.matDialog=l,this.toaster=Z,this.hideMore=!0,this.SortBy=[{Key:!1,Value:"Number"},{Key:!0,Value:"Created"}],this.totalCurrentRow=0,this.nextPageEnabled=!0,this.prevData=[]}preInitList(){this.pageData.Filter.NoteVisible=!0,this.TotalReportAggregate=new F}onSubmitFilter(){this.pageData.Filter.PageNumber=1,this.TotalReportAggregate=new F,this.getListData(),this.prevData=[]}preGetList(){this.pageData.Filter.RowCount=this.pageData.Filter.PageNumber>1?1e3:100}postInit(e){this.menuData.H=this.data.PageTitle,100==this.pageData.Filter.RowCount&&(this.prevData=[],this.TotalReportAggregate=new F),this.data.Data=this.prevData.concat(e.Data),this.setRowAccount(),this.AssignAggregate()}AssignAggregate(){this.TotalReportAggregate.TaxAdd+=this.data.Aggregate.TaxAdd,this.TotalReportAggregate.SalesWithTax+=this.data.Aggregate.SalesWithTax,this.TotalReportAggregate.Orders+=this.data.Aggregate.Orders,this.TotalReportAggregate.ItemsQuantity+=this.data.Aggregate.ItemsQuantity,this.TotalReportAggregate.QuantityComplementary+=this.data.Aggregate.QuantityComplementary,this.TotalReportAggregate.QuantityWithoutComplementary+=this.data.Aggregate.QuantityWithoutComplementary,this.TotalReportAggregate.GrossItems+=this.data.Aggregate.GrossItems,this.TotalReportAggregate.Discount+=this.data.Aggregate.Discount,this.TotalReportAggregate.TaxInclude+=this.data.Aggregate.TaxInclude,this.TotalReportAggregate.SalesWithoutTax+=this.data.Aggregate.SalesWithoutTax,this.TotalReportAggregate.Cost+=this.data.Aggregate.Cost,this.data.Aggregate.CostRatio=this.costRatioCalculation(this.data.Aggregate.Cost,this.data.Aggregate.SalesWithoutTax,this.data.Aggregate.TaxInclude),this.TotalReportAggregate.Profit+=this.data.Aggregate.Profit,this.data.Aggregate.ProfitRatio=this.profitRatioCalculation(this.data.Aggregate.Profit,this.data.Aggregate.SalesWithoutTax,this.data.Aggregate.TaxInclude),this.data.Aggregate.TaxAdd=this.TotalReportAggregate.TaxAdd,this.data.Aggregate.SalesWithTax=this.TotalReportAggregate.SalesWithTax,this.data.Aggregate.Orders=this.TotalReportAggregate.Orders,this.data.Aggregate.ItemsQuantity=this.TotalReportAggregate.ItemsQuantity,this.data.Aggregate.QuantityComplementary=this.TotalReportAggregate.QuantityComplementary,this.data.Aggregate.QuantityWithoutComplementary=this.TotalReportAggregate.QuantityWithoutComplementary,this.data.Aggregate.GrossItems=this.TotalReportAggregate.GrossItems,this.data.Aggregate.Discount=this.TotalReportAggregate.Discount,this.data.Aggregate.TaxInclude=this.TotalReportAggregate.TaxInclude,this.data.Aggregate.SalesWithoutTax=this.TotalReportAggregate.SalesWithoutTax,this.data.Aggregate.Cost=this.TotalReportAggregate.Cost,this.data.Aggregate.CostRatio=this.costRatioCalculation(this.data.Aggregate.Cost,this.data.Aggregate.SalesWithoutTax,this.data.Aggregate.TaxInclude),this.data.Aggregate.Profit=this.TotalReportAggregate.Profit,this.data.Aggregate.ProfitRatio=this.profitRatioCalculation(this.data.Aggregate.Profit,this.data.Aggregate.SalesWithoutTax,this.data.Aggregate.TaxInclude)}setRowAccount(){const e=this.data.Data;this.totalCurrentRow=e.length,this.checkEnabledNextBtn(e)}checkEnabledNextBtn(e=[]){let b;b=this.pageData.Filter.PageNumber>1?1e3:100,e.length-this.prevData.length<b?(this.pageData.Filter.PageNumber=1,this.nextPageEnabled=!1):this.nextPageEnabled=!0,this.prevData=e}costRatioCalculation(e,o,n){let r=0;return this.pageData.IncludeTax&&(o+=n),0!=o&&(r=e/o*100),r}profitRatioCalculation(e,o,n){let r=0;return this.pageData.IncludeTax&&(o+=n),0!=o&&(r=e/o*100),r}export(e){-1===this.pagination.ListTotal?this.httpService.post("/API/Report/ReportDetailCount",JSON.stringify(this.pageData.Filter)).subscribe(n=>{this.pagination.ListTotal=n.Count,this.showExportModal(e)}):this.showExportModal(e)}showExportModal(e){this.matDialog.open(ct,{data:{Filter:this.pageData.Filter,TotalCount:this.pagination.ListTotal}}).afterClosed().subscribe(n=>{if(n){const r=n.ExportPageNumber;switch(this.pageData.Filter.ExportPageNumber=r,e){case"default":this.exportCSV(this.csvConverter,"ReportExport/ReportDetail","SalesReport_"+this.transformDate(this.pageData.Filter.From)+"-"+this.transformDate(this.pageData.Filter.To)+`_Page_${r}.csv`);break;case"complete":this.exportCSV(this.csvConverter,"ReportExport/ReportDetailComplete","SalesReportComplete_"+this.transformDate(this.pageData.Filter.From)+"-"+this.transformDate(this.pageData.Filter.To)+`_Page_${r}.csv`);break;case"contact":this.exportCSV(this.csvConverter,"ReportExport/ReportDetailWithContact","SalesReportWithContact_"+this.transformDate(this.pageData.Filter.From)+"-"+this.transformDate(this.pageData.Filter.To)+`_Page_${r}.csv`)}}})}transformDate(e){return this.datePipe.transform(e,"ddMMyy")}NextPage(){this.pageData.Filter.PageNumber+=1,this.getListData()}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(s.uU),t.Y36(g.gz),t.Y36(S.uw),t.Y36(v._W))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-sales-detail"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["class","btn-group",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[2,"width","75px"],[2,"width","30px"],[1,"font-italic","small",2,"width","40px"],["class","text-right","style","width: 80px",4,"ngIf"],[1,"text-right",2,"width","90px"],[1,"px-0"],[4,"ngFor","ngForOf"],["class","row justify-content-end mt-10 mx-0",4,"ngIf"],["api","Report/ReportDetailCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],[1,"btn-group"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"click"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["name","Bin",3,"model","modelChange"],["id","more-filter","container",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["name","Complementary",3,"model","modelChange"],["requestUrl","/API/AC/GetUserSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","NoteVisible",3,"model","modelChange"],["name","Sort",3,"model","options","modelChange"],[1,"text-right",2,"width","80px"],[1,"d-flex","justify-content-end","mt-sm-0"],[1,"mr-auto","d-sm-block","d-flex","flex-column","mt-8","mb-2"],[1,"h5","text-primary","font-weight-bold",3,"href"],["id","PONumber",1,"ml-3"],[4,"ngIf"],["class","h5 text-primary font-weight-bold",3,"href",4,"ngIf"],[1,"font-italic","font-weight-bold",3,"innerHtml"],[1,"font-weight-bold"],[1,"text-danger","ml-3"],["class","font-weight-bold",4,"ngIf"],["id","deliveryNote"],[1,"d-inline-block","font-italic"],[1,"d-lg-block","mt-8","mr-2","font-weight-bold","font-italic"],["runat","server",1,"status"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"table","table-sm","table-borderless"],["id","PONumber"],[1,"font-weight-normal"],["class","text-warning inlineMarginLeft",4,"ngIf"],["class","list-inline text-warning inlineMarginLeft",4,"ngIf"],[1,"d-block","font-weight-normal","font-italic",2,"word-break","break-all",3,"innerHtml"],[1,"font-weight-normal",2,"width","75px"],[1,"font-weight-normal","text-right",2,"width","42px"],["class","font-weight-normal text-right","style","width: 80px",4,"ngIf"],[1,"font-weight-normal","text-right",2,"width","90px"],[1,"font-weight-normal","text-right","text-danger",2,"width","50px"],["title","Disc %"],["title","Disc Amount"],[1,"text-warning","inlineMarginLeft"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"font-weight-normal","text-right",2,"width","80px"],[1,"text-right"],[1,"p-0","font-weight-normal","text-right",2,"width","1%"],[1,"font-weight-normal","text-right",2,"width","5%"],[1,"row","justify-content-end","mt-10","mx-0"],[1,"zebra","col-auto"],[1,"Percentage"]],template:function(e,o){1&e&&t.YNc(0,wt,36,11,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[s.O5,u.p,s.sg,R.v,c.w9,p.JJ,p.On,q.J,f.QB,D.P],pipes:[s.uU,T.WV,s.JJ,T.qU],styles:[""]}),a})();class F{constructor(){this.TaxAdd=0,this.SalesWithTax=0,this.Orders=0,this.ItemsQuantity=0,this.QuantityComplementary=0,this.QuantityWithoutComplementary=0,this.GrossItems=0,this.Discount=0,this.TaxInclude=0,this.SalesWithoutTax=0,this.CostRatio=0,this.Cost=0,this.ProfitRatio=0,this.Profit=0}}let Nt=(()=>{class a{constructor(e,o){this._dialogRef=e,this.data=o,this.modalConfig=new Y.O,this.ExportPageNumber=o.ExportPageNumber,this.ExportRowCount=o.ExportRowCount,this.modalConfig.title="Export Report",this.modalConfig.customWidth="379px"}ngOnInit(){}onOk(){this._dialogRef.close({ExportPageNumber:this.ExportPageNumber,ExportRowCount:this.ExportRowCount})}close(){this._dialogRef.close()}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(S.so),t.Y36(S.WI))},a.\u0275cmp=t.Xpm({type:a,selectors:[["modal-export-summary"]],decls:11,vars:4,consts:[[3,"title","config","onOk","onCancel","onClose"],[1,"container",2,"width","350px"],[1,"row","form-group"],["type","text",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o._dialogRef.close()})("onClose",function(){return o._dialogRef.close()}),t.TgZ(1,"content"),t.TgZ(2,"div",1),t.TgZ(3,"div",2),t.TgZ(4,"label"),t._uU(5,"Page Number"),t.qZA(),t.TgZ(6,"input",3),t.NdJ("ngModelChange",function(r){return o.ExportPageNumber=r}),t.qZA(),t.qZA(),t.TgZ(7,"div",2),t.TgZ(8,"label"),t._uU(9,"Page Size"),t.qZA(),t.TgZ(10,"input",3),t.NdJ("ngModelChange",function(r){return o.ExportRowCount=r}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("title","Export Report")("config",o.modalConfig),t.xp6(6),t.Q6J("ngModel",o.ExportPageNumber),t.xp6(4),t.Q6J("ngModel",o.ExportRowCount))},directives:[I.M,p.Fj,p.JJ,p.On],styles:[""]}),a})();var Pt=A(5451);function Lt(a,i){1&a&&(t.TgZ(0,"button",15),t._UZ(1,"b",16),t.qZA())}function Qt(a,i){if(1&a){const e=t.EpF();t.ynx(0),t.TgZ(1,"datetimepicker",24),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(2,"datetimepicker",25),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.BQk()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("date",e.pageData.Filter.From)("appearance","outline")("width",215),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)("appearance","outline")("width",215)}}function Yt(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"datepicker",24),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(1,"datepicker",25),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA()}if(2&a){const e=t.oxw(2);t.Q6J("date",e.pageData.Filter.From)("appearance","outline")("width",215),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)("appearance","outline")("width",215)}}function Rt(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",17),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Customer"),t.qZA(),t.TgZ(8,"autocompleteV2",19),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Sales"),t.qZA(),t.TgZ(12,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"From/To"),t.qZA(),t.YNc(16,Qt,3,6,"ng-container",21),t.YNc(17,Yt,2,6,"ng-template",null,22,t.W1O),t.qZA(),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"filter invoice by"),t.qZA(),t.TgZ(22,"radio-options",23),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.isCreated=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.MAs(18),o=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",o.pageData.Filter.ListIDs)("items",null==o.pageData.Options?null:o.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",o.pageData.Filter.CustomerID)("inputTextValue",o.pageData.CustomerName),t.xp6(4),t.Q6J("ngModel",o.pageData.Filter.SalesID)("items",null==o.pageData.Options?null:o.pageData.Options.Sales),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter.isCreated)("ngIfElse",e),t.xp6(6),t.Q6J("options",o.filterInvociceBy)("model",o.pageData.Filter.isCreated)}}function Et(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",26),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Register"),t.qZA(),t.TgZ(4,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RegisterID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Customer Groups"),t.qZA(),t.TgZ(8,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerGroupID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Payment"),t.qZA(),t.TgZ(12,"ng-select",27),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.PaymentState=n}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Creator"),t.qZA(),t.TgZ(16,"autocompleteV2",28),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CreatorID=n}),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"h6"),t._uU(19,"RowCount"),t.qZA(),t.TgZ(20,"input",29),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RegisterID)("items",e.pageData.Options.Registers),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerGroupID)("items",e.pageData.Options.Groups),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.PaymentState)("items",e.pageData.Options.States),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CreatorID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function kt(a,i){1&a&&(t.TgZ(0,"th",46),t._uU(1,"COST"),t.qZA())}function Ht(a,i){1&a&&(t.TgZ(0,"th",47),t._uU(1,"TAX"),t.qZA())}function Vt(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1,"SURCHARGE "),t.qZA())}function Bt(a,i){1&a&&t._UZ(0,"br")}function Gt(a,i){if(1&a&&(t.TgZ(0,"a",49),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Order/Sales_Order/Info?ID=",e.SOID,"",t.LSH),t.xp6(1),t.Oqu(e.SalesOrderNumber)}}function jt(a,i){1&a&&t._UZ(0,"br")}function Wt(a,i){if(1&a&&(t.TgZ(0,"i"),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Note)}}function $t(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function Kt(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Tax))}}function Xt(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.SurchargeAmount)," ")}}const zt=function(){return["/menu/Contacts/Contact/Customers/Info"]},te=function(a){return{ID:a}},ee=function(a,i,e){return{"text-success":a,"text-warning":i,"text-danger":e}};function ae(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",49),t._uU(5),t.qZA(),t.YNc(6,Bt,1,0,"br",50),t.YNc(7,Gt,2,2,"a",51),t.YNc(8,jt,1,0,"br",50),t.YNc(9,Wt,2,1,"i",50),t.qZA(),t.TgZ(10,"td"),t.TgZ(11,"div"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.TgZ(14,"div"),t._uU(15),t.ALo(16,"date"),t.qZA(),t.qZA(),t.TgZ(17,"td"),t.TgZ(18,"a",52),t._uU(19),t.qZA(),t.qZA(),t.TgZ(20,"td"),t._uU(21),t.qZA(),t.YNc(22,$t,3,3,"td",53),t.TgZ(23,"td",54),t._uU(24),t.ALo(25,"number"),t.qZA(),t.YNc(26,Kt,3,3,"td",53),t.YNc(27,Xt,3,3,"td",53),t.TgZ(28,"td",54),t._uU(29),t.ALo(30,"number"),t.qZA(),t.TgZ(31,"td",55),t._uU(32),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(1),t.Q6J("ngIf",o.pageData.DoubleNumber),t.xp6(1),t.Q6J("ngIf",o.pageData.DoubleNumber),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(3),t.hij(" ",t.xi3(13,20,e.Date,"dd MMM yy")," "),t.xp6(3),t.hij(" ",t.xi3(16,23,e.Created,"HH:mm")," "),t.xp6(3),t.Q6J("routerLink",t.DdM(30,zt))("queryParams",t.VKq(31,te,e.CustomerID)),t.xp6(1),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(e.SalesName),t.xp6(1),t.Q6J("ngIf",o.pageData.IsCostVisible),t.xp6(2),t.Oqu(t.lcZ(25,26,e.Sales)),t.xp6(2),t.Q6J("ngIf",o.data.TaxVisible),t.xp6(1),t.Q6J("ngIf",o.data.SurchargeVisible),t.xp6(2),t.Oqu(t.lcZ(30,28,e.SalesNSurcharge)),t.xp6(2),t.Q6J("ngClass",t.kEZ(33,ee,3==e.PaymentStateID,2==e.PaymentStateID,1==e.PaymentStateID)),t.xp6(1),t.Oqu(e.PaymentStateString)}}function ne(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Cost")),"")}}function oe(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Tax")))}}function re(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"SurchargeAmount")),"")}}function ie(a,i){if(1&a&&(t.TgZ(0,"tfoot",56),t.TgZ(1,"tr",57),t._UZ(2,"td",58),t.TgZ(3,"td",59),t._uU(4),t.ALo(5,"number"),t.qZA(),t._UZ(6,"td",58),t._UZ(7,"td",58),t.TgZ(8,"td",60),t._uU(9,"Total:"),t.qZA(),t.YNc(10,ne,4,6,"td",53),t.TgZ(11,"td",54),t._uU(12),t.ALo(13,"number"),t.ALo(14,"sum"),t.qZA(),t.YNc(15,oe,4,6,"td",53),t.YNc(16,re,4,6,"td",53),t.TgZ(17,"td",54),t._uU(18),t.ALo(19,"number"),t.ALo(20,"sum"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.hij("",t.lcZ(5,6,e.data.Data.length)," Orders"),t.xp6(6),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(2),t.Oqu(t.lcZ(13,8,t.xi3(14,10,e.data.Data,"Sales"))),t.xp6(3),t.Q6J("ngIf",e.data.TaxVisible),t.xp6(1),t.Q6J("ngIf",e.data.SurchargeVisible),t.xp6(2),t.Oqu(t.lcZ(19,13,t.xi3(20,15,e.data.Data,"SalesNSurcharge")))}}function le(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",30),t.TgZ(1,"table",31),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",32),t.TgZ(3,"tr"),t.TgZ(4,"th",33),t._uU(5,"OUTLET"),t.qZA(),t.TgZ(6,"th",34),t._uU(7,"NUMBER"),t.qZA(),t.TgZ(8,"th",35),t._uU(9,"DATE"),t.qZA(),t.TgZ(10,"th",36),t._uU(11,"CUSTOMER"),t.qZA(),t.TgZ(12,"th",37),t._uU(13,"SALES PERSON"),t.qZA(),t.YNc(14,kt,2,0,"th",38),t.TgZ(15,"th",39),t._uU(16,"SALES"),t.qZA(),t.YNc(17,Ht,2,0,"th",40),t.YNc(18,Vt,2,0,"th",41),t.TgZ(19,"th",42),t._uU(20,"TOTAL"),t.qZA(),t.TgZ(21,"th",43),t._uU(22,"PAYMENT"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(23,"tbody"),t.YNc(24,ae,33,37,"tr",44),t.qZA(),t.YNc(25,ie,21,18,"tfoot",45),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(3),t.Q6J("ngIf",e.data.TaxVisible),t.xp6(1),t.Q6J("ngIf",e.data.SurchargeVisible),t.xp6(6),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data)}}let se=(()=>{class a extends d.n{constructor(e,o,n,r,l){super(e,"Report/ReportSummary","ReportLoader/ReportSummary",null,r),this.httpService=e,this.csvConverter=o,this.datePipe=n,this.activatedRoute=r,this._matDialog=l,this.hideMore=!0,this.filterInvociceBy=[{Key:!1,Value:"Date"},{Key:!0,Value:"Created"}]}preGetList(){}postInit(){this.menuData.H=this.data.PageTitle,(null!=this.CustomerID||null!=this.CustomerID)&&(this.pageData.Filter.CustomerID=this.CustomerID),this.pageData.Filter.RowCount=0}openItemModal(e,o){this._matDialog.open(Nt,{data:{ExportRowCount:this.pageData.Filter.ExportRowCount,ExportPageNumber:this.pageData.Filter.ExportPageNumber}}).afterClosed().subscribe(r=>{r&&(this.pageData.Filter.ExportPageNumber=r.ExportPageNumber,this.pageData.Filter.ExportRowCount=r.ExportRowCount,this.exportCSV(this.csvConverter,e,o),this.pageData.Filter.RowCount=0)})}transformDate(e){return this.datePipe.transform(e,"ddMMyy")}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(n.CustomerName=null==n.CustomerName?"":n.CustomerName,r.CustomerName=null==r.CustomerName?"":r.CustomerName,n.SalesName=null==n.SalesName?"":n.SalesName,r.SalesName=null==r.SalesName?"":r.SalesName,e.active){case"outlet":return this.compare(n.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"number":return this.compare(n.Number,r.Number,l);case"date":return this.compare(n.Date,r.Date,l);case"customer":return this.compare(n.CustomerName.toLocaleLowerCase(),r.CustomerName.toLocaleLowerCase(),l);case"salesPerson":return this.compare(n.SalesName.toLocaleLowerCase(),r.SalesName.toLocaleLowerCase(),l);case"cost":return this.compare(n.Cost,r.Cost,l);case"sales":return this.compare(n.Sales,r.Sales,l);case"tax":return this.compare(n.Tax,r.Tax,l);case"surcharge":return this.compare(n.SurchargeAmount,r.SurchargeAmount,l);case"total":return this.compare(n.SalesNSurcharge,r.SalesNSurcharge,l);case"payment":return this.compare(n.PaymentStateString,r.PaymentStateString,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(s.uU),t.Y36(g.gz),t.Y36(S.uw))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-sales-summary"]],features:[t.qOj],decls:27,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["class","btn btn-outline-secondary btn-sm dropdown-toggle","data-toggle","dropdown",4,"ngIf"],[1,"dropdown-menu","dropdown-menu-right"],[1,"dropdown-item"],[3,"click"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],[1,"container-fluid","mt-5"],["class","table-responsive",4,"ngIf"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["placeholder","Customer","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],[4,"ngIf","ngIfElse"],["DATEONLY",""],["name","Is Created",3,"options","model","modelChange"],["name","From",3,"date","appearance","width","dateChange"],["name","To",3,"date","appearance","width","dateChange"],["id","more-filter","container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["requestUrl","/API/AC/GetUserSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["type","tel","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","outlet",2,"width","100px"],["mat-sort-header","number"],["mat-sort-header","date"],["mat-sort-header","customer"],["mat-sort-header","salesPerson"],["mat-sort-header","cost","class","align-right",4,"ngIf"],["mat-sort-header","sales",1,"align-right"],["mat-sort-header","tax","class","align-right",4,"ngIf"],["mat-sort-header","surcharge","class","align-right",4,"ngIf"],["mat-sort-header","total",1,"align-right"],["mat-sort-header","payment",2,"width","50px"],[4,"ngFor","ngForOf"],["class","border-top",4,"ngIf"],["mat-sort-header","cost",1,"align-right"],["mat-sort-header","tax",1,"align-right"],["mat-sort-header","surcharge",1,"align-right"],["target","_blank",3,"href"],[4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"routerLink","queryParams"],["class","text-right",4,"ngIf"],[1,"text-right"],[1,"text-left",3,"ngClass"],[1,"border-top"],[1,"table","table-borderless"],[1,"empty-column"],[1,"text-left","empty-column"],[1,"text-right","empty-column"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t.NdJ("click",function(){return o.openItemModal("ReportExport/ReportSummary","SalesReportSummary_"+o.transformDate(o.pageData.Filter.From)+"-"+o.transformDate(o.pageData.Filter.To)+".csv")}),t._UZ(4,"i",3),t._uU(5," Export "),t.qZA(),t.YNc(6,Lt,2,0,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/ReportSummaryWithPayment","ReportSummaryWithPayment.csv")}),t._uU(10," Export With Payment "),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t.NdJ("click",function(){return o.openItemModal("ReportExport/ReportSummaryWithMethod","ReportSummaryWithMethod.csv")}),t._uU(13," Export With Payment Method "),t.qZA(),t.qZA(),t.TgZ(14,"li",6),t.TgZ(15,"a",7),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/ReportSummaryWithTaxDetail","ReportSummaryWithTaxDetail.csv")}),t._uU(16," Export with Taxable & TaxExempt "),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(17,"filters"),t.TgZ(18,"div",8),t.YNc(19,Rt,23,11,"div",9),t.YNc(20,Et,21,8,"div",10),t.qZA(),t.TgZ(21,"a",11),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(22,"More "),t._UZ(23,"i",12),t.qZA(),t.qZA(),t.TgZ(24,"content"),t.TgZ(25,"div",13),t.YNc(26,le,26,5,"div",14),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(6),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(13),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(6),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,q.J,D.P,Pt.L,f.QB,p.Fj,m.YE,m.nU,s.sg,g.yS,s.mk],pipes:[s.uU,s.JJ,T.qU],styles:[""]}),a})();function pe(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!1,"Top_Brand.csv")}),t._UZ(1,"i",7),t._uU(2,"Export"),t.qZA()}}function ce(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",8),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From - To"),t.qZA(),t.TgZ(8,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function _e(a,i){1&a&&(t.TgZ(0,"th",20),t._uU(1,"Code"),t.qZA())}function ue(a,i){if(1&a&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Code)}}const ge=function(){return["/menu/Products/Setup/Brand/Brand_Form"]},de=function(a){return{ID:a}};function me(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t.TgZ(2,"a",21),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,ue,2,1,"td",22),t.TgZ(5,"td",23),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",23),t._uU(9),t.ALo(10,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(10,ge))("queryParams",t.VKq(11,de,e.ID)),t.xp6(1),t.hij("",e.BrandName," "),t.xp6(1),t.Q6J("ngIf",e.Countcode>0),t.xp6(2),t.Oqu(t.lcZ(7,6,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(10,8,e.Total))}}function Ze(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",14),t.TgZ(3,"tr"),t.TgZ(4,"th",15),t._uU(5,"Brand"),t.qZA(),t.YNc(6,_e,2,0,"th",16),t.TgZ(7,"th",17),t._uU(8,"Sold"),t.qZA(),t.TgZ(9,"th",18),t._uU(10,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"tbody"),t.YNc(12,me,11,13,"tr",19),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(6),t.Q6J("ngIf",e.data.Countcode>0),t.xp6(6),t.Q6J("ngForOf",e.data.Data)}}const xe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Brand/Brand_Sales_Analysis"]};let Te=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/BrandRank","ReportLoader/BrandRank"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Brand":return this.compare(n.BrandName,r.BrandName,l);case"Code":return this.compare(n.Code,r.Code,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Total":return this.compare(n.Total,r.Total,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-Top-Brand"]],features:[t.qOj],decls:10,vars:7,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Brand",2,"width","150px"],["style","width: 120px;","mat-sort-header","Code",4,"ngIf"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],[4,"ngFor","ngForOf"],["mat-sort-header","Code",2,"width","120px"],[3,"routerLink","queryParams"],[4,"ngIf"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,pe,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4," Brand Sales Analysis "),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,ce,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Ze,13,2,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(1),t.Q6J("routerLink",t.DdM(6,xe)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ],encapsulation:2}),a})();function Ce(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"label",3),t.NdJ("click",function(){const r=t.CHM(e).$implicit;return t.oxw().updateSelectedGroups(r.ID)}),t._UZ(1,"input",4),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.qZA()}if(2&a){const e=i.$implicit,o=t.oxw();t.xp6(1),t.Q6J("value",e.ID)("checked",o.IDGroups.indexOf(e.ID)>-1),t.xp6(2),t.Oqu(e.Name)}}let fe=(()=>{class a{constructor(e,o){this.dialogRef=e,this.data=o,this.IDGroups=[],this.options=o.options,this.model=o.model,this.model.forEach(n=>{this.IDGroups.push(n.GroupID)})}ngOnInit(){}updateSelectedGroups(e){const o=this.IDGroups.indexOf(e);o>-1?this.IDGroups.splice(o,1):this.IDGroups.push(e)}onOk(){this.dialogRef.close({groupIDs:this.IDGroups})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(S.so),t.Y36(S.WI))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-modal-edit-group"]],decls:4,vars:2,consts:[[3,"title","onOk","onCancel"],[1,"container-fluid","pt-6"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],["type","checkbox",3,"value","checked"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()}),t.TgZ(1,"content"),t.TgZ(2,"div",1),t.YNc(3,Ce,4,3,"label",2),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("title","Edit Groups"),t.xp6(3),t.Q6J("ngForOf",o.options))},directives:[I.M,s.sg],styles:["label[_ngcontent-%COMP%] {\n display: block;\n}\nlabel[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 14px;\n}"]}),a})();var C=A(7695),N=A(5427);function Ae(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/CustomerRank","Top Customer ["+n.transformDate(n.pageData.Filter.From)+" - "+n.transformDate(n.pageData.Filter.To)+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function De(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Group"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Row Count"),t.qZA(),t.TgZ(17,"input",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.GroupID)("items",null==e.pageData.Options?null:e.pageData.Options.Groups),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function qe(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"span"),t.TgZ(1,"span"),t._uU(2),t.qZA(),t.TgZ(3,"a",37),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2).$implicit;return t.oxw(3).showModalEditGroup(n.Groups,n.CustomerID)}),t._uU(4),t.qZA(),t.qZA()}if(2&a){const e=i.$implicit,o=i.index;t.xp6(2),t.Oqu(0==o?"":" , "),t.xp6(2),t.Oqu(e.GroupName)}}function ye(a,i){if(1&a&&(t.TgZ(0,"span"),t.YNc(1,qe,5,2,"span",31),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",e.Groups)}}function ve(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",37),t.NdJ("click",function(){t.CHM(e);const n=t.oxw().$implicit;return t.oxw(3).showModalEditGroup(n.Groups,n.CustomerID)}),t._uU(1," No group assigned "),t.qZA()}}const Se=function(){return["/menu/Contacts/Contact/Customers/Info"]},Me=function(a){return{ID:a}};function be(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t.TgZ(2,"a",32),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td",33),t.YNc(5,ye,2,1,"span",34),t.YNc(6,ve,2,0,"a",35),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td",36),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",36),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",36),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"td",36),t._uU(19),t.ALo(20,"number"),t.qZA(),t.TgZ(21,"td",36),t._uU(22),t.ALo(23,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(21,Se))("queryParams",t.VKq(22,Me,e.CustomerID)),t.xp6(1),t.hij(" ",e.Name+" "+(e.Title?e.Title:"")," "),t.xp6(2),t.Q6J("ngIf",e.Groups.length>0),t.xp6(1),t.Q6J("ngIf",!(e.Groups.length>0)),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(11,11,e.Orders)),t.xp6(3),t.Oqu(t.lcZ(14,13,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(17,15,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(20,17,e.Tax)),t.xp6(3),t.Oqu(t.lcZ(23,19,e.Sales+e.Tax))}}function Oe(a,i){if(1&a&&(t.TgZ(0,"tbody",30),t.YNc(1,be,24,24,"tr",31),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function Je(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",21),t.TgZ(3,"tr"),t.TgZ(4,"th",22),t._uU(5,"CUSTOMER"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"GROUPS"),t.qZA(),t.TgZ(8,"th",23),t._uU(9,"CODE"),t.qZA(),t.TgZ(10,"th",24),t._uU(11,"ORDERS"),t.qZA(),t.TgZ(12,"th",25),t._uU(13,"QTY"),t.qZA(),t.TgZ(14,"th",26),t._uU(15,"SALES"),t.qZA(),t.TgZ(16,"th",27),t._uU(17,"TAX"),t.qZA(),t.TgZ(18,"th",28),t._uU(19,"SALES + TAX"),t.qZA(),t.qZA(),t.qZA(),t.YNc(20,Oe,2,1,"tbody",29),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(20),t.Q6J("ngIf",e.data.Data)}}const Ue=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]},Fe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},Pe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let Le=(()=>{class a extends d.n{constructor(e,o,n,r,l){super(e,"Report/CustomerRank","ReportLoader/CustomerRank"),this.httpService=e,this.pageTitle=o,this.csvConverter=n,this.datePipe=r,this.matDialog=l}preInitList(){C.gT.IsEmpty(this.pageData.Filter.GroupID)&&(this.pageData.Filter.GroupID=null)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Code":return this.compare(n.Code,r.Code,l);case"Orders":return this.compare(n.Orders,r.Orders,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"SalesNTax":return this.compare(n.Sales+n.Tax,r.Sales+r.Tax,l);default:return 0}}):o}transformDate(e){return this.datePipe.transform(e,"dd_MMM_yyyy")}showModalEditGroup(e,o){this.matDialog.open(fe,{data:{options:this.pageData.Options.Groups,model:e}}).afterClosed().subscribe(r=>{r&&this.httpService.post("/API/Report/UpdateContactGroups",JSON.stringify({ContactID:o,GroupIDs:r.groupIDs})).subscribe(()=>{this.getListData()})})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(N.Dx),t.Y36(h.O),t.Y36(s.uU),t.Y36(S.uw))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-Top-Customers"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",2,"width","280px"],["mat-sort-header","Code",2,"width","120px"],["mat-sort-header","Orders",1,"align-right",2,"width","75px"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Sales",1,"align-right",2,"width","135px"],["mat-sort-header","Tax",1,"align-right",2,"width","135px"],["mat-sort-header","SalesNTax",1,"align-right",2,"width","135px"],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[4,"ngFor","ngForOf"],[3,"routerLink","queryParams"],[1,"pointer"],[4,"ngIf"],["class","text-primary",3,"click",4,"ngIf"],[1,"text-right"],[1,"text-primary",3,"click"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ae,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"Top Customers By Age"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"Top Customers By Gender"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13,"Top Supplier"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"filters"),t.TgZ(15,"div",8),t.YNc(16,De,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,Je,21,1,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(8,Ue)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Fe)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,Pe)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ],encapsulation:2}),a})();function Qe(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/CustomerRank","Top Customer ["+n.transformDate(n.pageData.Filter.From)+" - "+n.transformDate(n.pageData.Filter.To)+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function Ye(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Group"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From - To"),t.qZA(),t.TgZ(12,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Row Count"),t.qZA(),t.TgZ(17,"input",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.GroupID)("items",null==e.pageData.Options?null:e.pageData.Options.Groups),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function Re(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",29),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",29),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",30),t._uU(10),t.ALo(11,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(t.lcZ(5,4,e.TotalOrders)),t.xp6(3),t.Oqu(t.lcZ(8,6,e.TotalQuantity)),t.xp6(3),t.Oqu(t.lcZ(11,8,e.TotalAmount))}}function Ee(a,i){if(1&a&&(t.TgZ(0,"tbody",27),t.YNc(1,Re,12,10,"tr",28),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function ke(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",21),t.TgZ(3,"tr"),t.TgZ(4,"th",22),t._uU(5,"AGE"),t.qZA(),t.TgZ(6,"th",23),t._uU(7,"ORDERS"),t.qZA(),t.TgZ(8,"th",24),t._uU(9,"QUANTITY"),t.qZA(),t.TgZ(10,"th",25),t._uU(11,"AMOUNT"),t.qZA(),t.qZA(),t.qZA(),t.YNc(12,Ee,2,1,"tbody",26),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(12),t.Q6J("ngIf",e.data.Data)}}const He=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},Be=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},je=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let We=(()=>{class a extends d.n{constructor(e,o,n,r){super(e,"Report/CustomerAgeRank","ReportLoader/CustomerAgeRank"),this.httpService=e,this.pageTitle=o,this.csvConverter=n,this.datePipe=r}preInitList(){C.gT.IsEmpty(this.pageData.Filter.GroupID)&&(this.pageData.Filter.GroupID=null),C.gT.IsEmpty(this.pageData.Filter.EntityID)&&(this.pageData.Filter.EntityID=null)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Age":return this.compare(n.Name,r.Name,l);case"Orders":return this.compare(n.TotalOrders,r.TotalOrders,l);case"Quantity":return this.compare(n.TotalQuantity,r.TotalQuantity,l);case"Total":return this.compare(n.TotalAmount,r.TotalAmount,l);default:return 0}}):o}transformDate(e){return this.datePipe.transform(e,"dd_MMM_yyyy")}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(N.Dx),t.Y36(h.O),t.Y36(s.uU))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-top-customers-by-age"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Age",2,"width","280px"],["mat-sort-header","Orders",1,"align-right",2,"width","75px"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Total",1,"align-right",2,"width","135px"],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[4,"ngFor","ngForOf"],[1,"text-right"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Qe,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"Top Customers"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"Top Customers By Gender"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13,"Top Supplier"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"filters"),t.TgZ(15,"div",8),t.YNc(16,Ye,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,ke,13,1,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(8,He)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Be)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,je)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ],styles:[""]}),a})();function $e(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!0,"Top Gender ["+n.transformDate(n.pageData.Filter.From)+" - "+n.transformDate(n.pageData.Filter.To)+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function Ke(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Group"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From - To"),t.qZA(),t.TgZ(12,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Row Count"),t.qZA(),t.TgZ(17,"input",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.GroupID)("items",null==e.pageData.Options?null:e.pageData.Options.Groups),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function Xe(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",28),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",28),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",29),t._uU(10),t.ALo(11,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(t.lcZ(5,4,e.TotalOrders)),t.xp6(3),t.Oqu(t.lcZ(8,6,e.TotalQuantity)),t.xp6(3),t.Oqu(t.lcZ(11,8,e.TotalAmount))}}function ze(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",21),t.TgZ(3,"tr"),t.TgZ(4,"th",22),t._uU(5,"GENDER"),t.qZA(),t.TgZ(6,"th",23),t._uU(7,"ORDERS"),t.qZA(),t.TgZ(8,"th",24),t._uU(9,"QUANTITY"),t.qZA(),t.TgZ(10,"th",25),t._uU(11,"AMOUNT"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(12,"tbody",26),t.YNc(13,Xe,12,10,"tr",27),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(13),t.Q6J("ngForOf",e.data)}}const ta=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},aa=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]},oa=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let ra=(()=>{class a extends d.n{constructor(e,o,n,r){super(e,"Report/CustomerGenderRank","ReportLoader/CustomerGenderRank"),this.httpService=e,this.pageTitle=o,this.csvConverter=n,this.datePipe=r,this.header={0:"GENDER",1:"ORDERS",2:"QUANTITY",3:"AMOUNT"}}preInitList(){C.gT.IsEmpty(this.pageData.Filter.GroupID)&&(this.pageData.Filter.GroupID=null),C.gT.IsEmpty(this.pageData.Filter.EntityID)&&(this.pageData.Filter.EntityID=null)}transformDate(e){return this.datePipe.transform(e,"dd_MMM_yyyy")}sortData(e){const o=this.data.slice();this.data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Gender":return this.compare(n.Name,r.Name,l);case"Orders":return this.compare(n.TotalOrders,r.TotalOrders,l);case"Quantity":return this.compare(n.TotalQuantity,r.TotalQuantity,l);case"Total":return this.compare(n.TotalAmount,r.TotalAmount,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(N.Dx),t.Y36(h.O),t.Y36(s.uU))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-top-customers-by-gender"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Gender",2,"width","280px"],["mat-sort-header","Orders",1,"align-right",2,"width","75px"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Total",1,"align-right",2,"width","135px"],[1,"border-bottom"],[4,"ngFor","ngForOf"],[1,"text-right"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,$e,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"Top Customers"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"Top Customers By Age"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13,"Top Supplier"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"filters"),t.TgZ(15,"div",8),t.YNc(16,Ke,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,ze,14,1,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(8,ta)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,aa)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,oa)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ],styles:[""]}),a})();function ia(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/TopSalesExport","Top_Supplier.csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function la(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Group"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From - To"),t.qZA(),t.TgZ(12,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Row Count"),t.qZA(),t.TgZ(17,"input",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.GroupID)("items",null==e.pageData.Options?null:e.pageData.Options.Group),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}const sa=function(){return["/menu/Contacts/Contact/Customers/Info"]},pa=function(a){return{ID:a}},ca=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]},_a=function(a,i,e){return{From:a,SupplierID:i,To:e}};function ua(a,i){if(1&a&&(t.TgZ(0,"tr",33),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",34),t.TgZ(4,"a",35),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td",32),t._uU(7),t.qZA(),t.TgZ(8,"td",36),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",32),t.TgZ(12,"a",35),t.ALo(13,"date"),t.ALo(14,"date"),t._uU(15),t.ALo(16,"number"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Rank),t.xp6(2),t.Q6J("routerLink",t.DdM(20,sa))("queryParams",t.VKq(21,pa,e.SupplierID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,9,e.Quantity)),t.xp6(3),t.Q6J("routerLink",t.DdM(23,ca))("queryParams",t.kEZ(24,_a,t.xi3(13,11,o.pageData.Filter.From,"ddMMyyyy"),o.data.SupplierID,t.xi3(14,14,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.hij(" ",t.xi3(16,17,e.Total,".0-0"),"")}}function ga(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",21),t.TgZ(3,"tr"),t.TgZ(4,"th",22),t._uU(5,"RANK"),t.qZA(),t.TgZ(6,"th",23),t._uU(7,"SUPPLIER"),t.qZA(),t.TgZ(8,"th",24),t._uU(9,"CODE"),t.qZA(),t.TgZ(10,"th",25),t._uU(11,"QUANTITY"),t.qZA(),t.TgZ(12,"th",26),t._uU(13,"TOTAL"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"tbody"),t.YNc(15,ua,17,28,"tr",27),t.qZA(),t.qZA(),t.TgZ(16,"div",28),t.TgZ(17,"table",29),t.TgZ(18,"thead",30),t.TgZ(19,"tr",31),t.TgZ(20,"th",32),t._uU(21,"Total Quantity"),t.qZA(),t.TgZ(22,"th",32),t._uU(23,"Total Sales"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(24,"tbody"),t.TgZ(25,"tr"),t.TgZ(26,"td"),t._uU(27),t.qZA(),t.TgZ(28,"td"),t._uU(29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(15),t.Q6J("ngForOf",e.data.Data),t.xp6(12),t.Oqu(e.data.TotalQty),t.xp6(2),t.Oqu(e.data.TotalSales)}}const da=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},Za=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},xa=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]};let Ta=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/TopSalesSupplier","ReportLoader/TopSupplierLoader"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Rank":return this.compare(n.Rank,r.Rank,l);case"Supplier":return this.compare(n.Name,r.Name,l);case"Code":return this.compare(n.Code,r.Code,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Total":return this.compare(n.Total,r.Total,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-top-suppliers"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Rank",2,"width","35px"],["mat-sort-header","Supplier"],["mat-sort-header","Code",2,"width","80px"],["mat-sort-header","Quantity",1,"align-right",2,"width","120px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end"],[1,"table","w-auto"],[1,"thead-light"],[1,"header"],[1,"text-right"],[1,"border-bottom"],[1,"text-left"],[3,"routerLink","queryParams"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ia,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"Top Customers"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"Top Customers By Gender"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13,"Top Customers By Age"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"filters"),t.TgZ(15,"div",8),t.YNc(16,la,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,ga,30,3,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(8,da)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Za)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,xa)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ,s.uU],styles:[""]}),a})();var Ca=A(2254);function fa(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){return t.CHM(e),t.oxw().updateMinstock()}),t._uU(1,"Submit"),t.qZA()}}function Aa(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",18),t.TgZ(1,"a",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/ProductSales","Product Sales.csv")}),t._UZ(2,"i",20),t._uU(3," Export "),t.qZA(),t.TgZ(4,"button",6),t._UZ(5,"b",21),t.qZA(),t.TgZ(6,"ul",22),t.TgZ(7,"li",8),t.TgZ(8,"a",23),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/ProductSalesExportWithDescription","Product Sales.csv")}),t._uU(9," Export With Description "),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Da(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",24),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",25),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n})("change",function(){return t.CHM(e),t.oxw().resetListId()}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",26),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From - To"),t.qZA(),t.TgZ(12,"datepicker",27),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",28),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Sales"),t.qZA(),t.TgZ(17,"ng-select",29),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Scope"),t.qZA(),t.TgZ(21,"radio-options",30),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupByVariant=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("date",e.pageData.Filter.From)("showClearBtn",!0)("showTodayBtn",!0),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)("showClearBtn",!0)("showTodayBtn",!0),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("model",e.pageData.Filter.GroupByVariant)("options",e.ScopeFilter)}}function qa(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",31),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Sales Order Type"),t.qZA(),t.TgZ(4,"ng-select",29),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Supplier"),t.qZA(),t.TgZ(8,"autocompleteV2",32),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Brand"),t.qZA(),t.TgZ(12,"autocompleteV2",33),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.BrandID=n}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Customer"),t.qZA(),t.TgZ(16,"autocompleteV2",34),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"h6"),t._uU(19,"Exclude Complementary"),t.qZA(),t.TgZ(20,"radio-options",35),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ExcludeComplementary=n}),t.qZA(),t.qZA(),t.TgZ(21,"div"),t.TgZ(22,"h6"),t._uU(23,"Exclude Non Inventory"),t.qZA(),t.TgZ(24,"radio-options",35),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ExcludeInventory=n}),t.qZA(),t.qZA(),t.TgZ(25,"div"),t.TgZ(26,"h6"),t._uU(27,"Show Inventory"),t.qZA(),t.TgZ(28,"radio-options",36),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ShowInventory=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID)("displayText",e.pageData.supplierName),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.BrandID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeComplementary),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeInventory),t.xp6(4),t.Q6J("model",e.pageData.Filter.ShowInventory)}}function ya(a,i){1&a&&(t.TgZ(0,"th",52),t._uU(1,"COST"),t.qZA())}function va(a,i){1&a&&(t.TgZ(0,"th",53),t._uU(1,"INVENTORY "),t.qZA())}function Sa(a,i){1&a&&(t.TgZ(0,"th",54),t._uU(1,"REORDER MIN"),t.qZA())}function Ma(a,i){1&a&&(t.TgZ(0,"th",55),t._uU(1,"UPDATE ROP"),t.qZA())}function ba(a,i){1&a&&(t.TgZ(0,"th",56),t._uU(1,"PROFIT"),t.qZA())}function Oa(a,i){if(1&a&&(t.TgZ(0,"a",67),t._UZ(1,"img",68),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.Q6J("href",e.ImageUrl,t.LSH)("target",o.pageData.LinkTarget),t.xp6(1),t.Q6J("src",e.ThumbnailUrl,t.LSH)}}function Ja(a,i){if(1&a&&(t.TgZ(0,"a",69),t._UZ(1,"img",70),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("target",e.pageData.LinkTarget),t.xp6(1),t.Q6J("src","//res.cloudinary.com/pos/image/upload/w_"+(null==e.data?null:e.data.ThumbnailWidth)+"/POS/Images/Icon/products_thumb.png",t.LSH)}}function Ia(a,i){if(1&a&&(t.TgZ(0,"td",63),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.UnitCost)," ")}}const E=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Invoice_Items"]},wa=function(a,i,e){return{VariantID:a,From:i,To:e}};function Fa(a,i){if(1&a&&(t.TgZ(0,"a",71),t.ALo(1,"date"),t.ALo(2,"date"),t._uU(3),t.ALo(4,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.Q6J("routerLink",t.DdM(11,E))("queryParams",t.kEZ(12,wa,e.ID,t.xi3(1,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(2,6,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.Oqu(t.lcZ(4,9,e.Total))}}const Na=function(a,i,e){return{ProductID:a,From:i,To:e}};function Pa(a,i){if(1&a&&(t.TgZ(0,"a",71),t.ALo(1,"date"),t.ALo(2,"date"),t._uU(3),t.ALo(4,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.Q6J("routerLink",t.DdM(11,E))("queryParams",t.kEZ(12,Na,e.ID,t.xi3(1,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(2,6,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.Oqu(t.lcZ(4,9,e.Total))}}function La(a,i){if(1&a&&(t.TgZ(0,"td",63),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.UnitsInStock?e.UnitsInStock:0)," ")}}function Qa(a,i){if(1&a&&(t.TgZ(0,"td",63),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.MinStock),"")}}function Ya(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"td",63),t.TgZ(1,"input",72),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().$implicit.NewMinStock=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.NewMinStock)}}function Ra(a,i){if(1&a&&(t.TgZ(0,"td",73),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",e.Profit>=0?"text-success":"text-danger"),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.Profit)," ")}}const Ea=function(a){return[a]},ka=function(a){return{ID:a}};function Ha(a,i){if(1&a&&(t.TgZ(0,"tr",57),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"div",58),t.TgZ(5,"div",59),t.YNc(6,Oa,2,3,"a",60),t.YNc(7,Ja,2,2,"a",61),t.qZA(),t.TgZ(8,"a",62),t._uU(9),t.qZA(),t.qZA(),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.TgZ(12,"td",63),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,Ia,3,3,"td",64),t.TgZ(16,"td",63),t.YNc(17,Fa,5,16,"a",65),t.YNc(18,Pa,5,16,"a",65),t.qZA(),t.YNc(19,La,3,3,"td",64),t.YNc(20,Qa,3,3,"td",64),t.YNc(21,Ya,2,1,"td",64),t.YNc(22,Ra,3,4,"td",66),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(4),t.Q6J("ngIf",e.ImageUrl),t.xp6(1),t.Q6J("ngIf",!e.ImageUrl),t.xp6(1),t.Q6J("routerLink",t.VKq(17,Ea,1==n.pageData.Filter.GroupByVariant?"/menu/Products/Catalog/Variants/Info":"/menu/Products/Catalog/Products/Info"))("queryParams",t.VKq(19,ka,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(14,15,e.Quantity)),t.xp6(2),t.Q6J("ngIf",null==n.pageData.Role?null:n.pageData.Role.HasCostRole),t.xp6(2),t.Q6J("ngIf",n.pageData.Filter.GroupByVariant),t.xp6(1),t.Q6J("ngIf",!n.pageData.Filter.GroupByVariant),t.xp6(1),t.Q6J("ngIf",n.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",e.MinVisible&&n.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",(null==n.pageData.Role?null:n.pageData.Role.IsReorderPointEditor)&&n.pageData.Filter.GroupByVariant&&e.MinVisible&&n.pageData.Filter.ListIDs),t.xp6(1),t.Q6J("ngIf",null==n.pageData.Role?null:n.pageData.Role.HasCostRole)}}function Va(a,i){if(1&a&&(t.TgZ(0,"td",63),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"UnitCost"))," ")}}function Ba(a,i){if(1&a&&(t.TgZ(0,"td",76),t.TgZ(1,"a"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(2),t.Oqu(t.lcZ(3,1,t.xi3(4,3,e.data.Data,"UnitsInStock")))}}function Ga(a,i){if(1&a&&(t.TgZ(0,"td",63),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Profit")))}}function ja(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",74),t.TgZ(2,"td",75),t._uU(3,"Total : "),t.qZA(),t.TgZ(4,"td",63),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.qZA(),t.YNc(8,Va,4,6,"td",64),t.TgZ(9,"td",76),t.TgZ(10,"a"),t._uU(11),t.ALo(12,"number"),t.ALo(13,"sum"),t.qZA(),t.qZA(),t.YNc(14,Ba,5,6,"td",77),t.YNc(15,Ga,4,6,"td",64),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(5),t.Oqu(t.lcZ(6,5,t.xi3(7,7,e.data.Data,"Quantity"))),t.xp6(3),t.Q6J("ngIf",e.pageData.Role.HasCostRole),t.xp6(3),t.Oqu(t.lcZ(12,10,t.xi3(13,12,e.data.Data,"Total"))),t.xp6(3),t.Q6J("ngIf",e.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",null==e.pageData.Role?null:e.pageData.Role.HasCostRole)}}function Wa(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",37),t.TgZ(1,"table",38),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",39),t.TgZ(3,"tr"),t.TgZ(4,"th",40),t._uU(5,"No"),t.qZA(),t.TgZ(6,"th",41),t._uU(7,"NAME"),t.qZA(),t.TgZ(8,"th",42),t._uU(9,"CODE"),t.qZA(),t.TgZ(10,"th",43),t._uU(11,"QUANTITY"),t.qZA(),t.YNc(12,ya,2,0,"th",44),t.TgZ(13,"th",45),t._uU(14,"SALES "),t.qZA(),t.YNc(15,va,2,0,"th",46),t.YNc(16,Sa,2,0,"th",47),t.YNc(17,Ma,2,0,"th",48),t.YNc(18,ba,2,0,"th",49),t.qZA(),t.qZA(),t.TgZ(19,"tbody"),t.YNc(20,Ha,23,21,"tr",50),t.qZA(),t.YNc(21,ja,16,15,"tfoot",51),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(12),t.Q6J("ngIf",null==e.pageData.Role?null:e.pageData.Role.HasCostRole),t.xp6(3),t.Q6J("ngIf",e.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",e.data.MinVisible&&e.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",(null==e.pageData.Role?null:e.pageData.Role.IsReorderPointEditor)&&e.pageData.Filter.GroupByVariant&&e.data.MinVisible&&e.pageData.Filter.ListIDs),t.xp6(1),t.Q6J("ngIf",null==e.pageData.Role?null:e.pageData.Role.HasCostRole),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data)}}const Ka=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales_by_Outlet"]},za=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales"]},en=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales_Vs_Delivery"]};let an=(()=>{class a extends d.n{constructor(e,o,n,r){super(e,"Report/ProductSales","ReportLoader/ProductSales",null,r),this.httpService=e,this.csvConverter=o,this.toasterService=n,this.activatedRoute=r,this.hideMore=!0,this.ScopeFilter=[{Key:!1,Value:"Product"},{Key:!0,Value:"Variant"}]}postInit(){this.menuData.H=this.data.PageTitle,$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip({trigger:"hover",sanitize:!1,sanitizeFn:e=>e})})}updateMinstock(){const e=[];return this.data.Data.forEach(n=>{n.NewMinStock!=n.MinStock&&e.push({VariantID:n.ID,MinStock:n.NewMinStock})}),C.gT.IsEmpty(0==this.pageData.Filter.ListIDs.length)?(alert("Outlet is require"),!1):C.gT.IsEmpty(this.pageData.Filter.ListIDs.length>1)?(alert("Only support 1 Outlet"),!1):void this.httpService.post("/api/Inventory/SubmitMinstockbysalesproduct",JSON.stringify({EntityID:this.pageData.Filter.ListIDs[0],Items:e})).subscribe(n=>{this.toasterService.success(n,Ca.n.Success),this.getListData()})}sortData(e){const o=this.data.Data.slice();function n(r,l,Z){return(r<l?-1:1)*(Z?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const Z="asc"===e.direction;switch(r.Code=null==r.Code?"":r.Code,l.Code=null==l.Code?"":l.Code,r.BrandName=null==r.BrandName?"":r.BrandName,l.BrandName=null==l.BrandName?"":l.BrandName,e.active){case"Name":return n(r.Name.toLocaleLowerCase(),l.Name.toLocaleLowerCase(),Z);case"Code":return n(r.Code.toLocaleLowerCase(),l.Code.toLocaleLowerCase(),Z);case"Brand":return n(r.BrandName.toLocaleLowerCase(),l.BrandName.toLocaleLowerCase(),Z);case"Quantity":return n(r.Quantity,l.Quantity,Z);case"Total_Cost":return n(r.UnitCost,l.UnitCost,Z);case"Inventory":return n(r.UnitsInStock,l.UnitsInStock,Z);case"Total_Sales":return n(r.Total,l.Total,Z);case"ReOrder":return n(r.MinStock,l.MinStock,Z);default:return 0}}):o}resetListId(){0==this.pageData.Filter.ListIDs.length&&(this.pageData.Filter.ListIDs=null)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(v._W),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-product-sales"]],features:[t.qOj],decls:26,vars:13,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["class","btn-group mr-6",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-balance-scale","mr-2"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],[1,"container-fluid","mt-5"],["class","table-responsive",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","mr-6",3,"click"],[1,"btn-group","mr-6"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-right"],[3,"click"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange","change"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["name","From",3,"date","showClearBtn","showTodayBtn","dateChange"],["name","To",3,"date","showClearBtn","showTodayBtn","dateChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["name","Scope",3,"model","options","modelChange"],["id","more-filter","container",""],["requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","displayText","ngModelChange"],["requestUrl","/API/AC/GetProductBrandSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","Exclude",3,"model","modelChange"],["name","Scope",3,"model","modelChange"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","100px"],["mat-sort-header","Quantity",1,"align-right",2,"width","100px"],["style","width: 100px;","class","align-right","mat-sort-header","Total_Cost",4,"ngIf"],["mat-sort-header","Total_Sales",1,"align-right",2,"width","100px"],["style","width: 100px;","class","align-right","mat-sort-header","Inventory",4,"ngIf"],["style","width: 120px;","class","align-right","mat-sort-header","ReOrder",4,"ngIf"],["style","width: 88px;","class","align-right",4,"ngIf"],["class","text-right","style","width: 7.5rem;",4,"ngIf"],["class","border-bottom align-middle",4,"ngFor","ngForOf"],[4,"ngIf"],["mat-sort-header","Total_Cost",1,"align-right",2,"width","100px"],["mat-sort-header","Inventory",1,"align-right",2,"width","100px"],["mat-sort-header","ReOrder",1,"align-right",2,"width","120px"],[1,"align-right",2,"width","88px"],[1,"text-right",2,"width","7.5rem"],[1,"border-bottom","align-middle"],[1,"d-flex","align-items-center","align-middle"],[1,"mr-3"],[3,"href","target",4,"ngIf"],["href","#",3,"target",4,"ngIf"],[1,"",3,"routerLink","queryParams"],[1,"text-right"],["class","text-right",4,"ngIf"],[3,"routerLink","queryParams",4,"ngIf"],["class","text-right",3,"ngClass",4,"ngIf"],[3,"href","target"],[1,"border","rounded",2,"width","3.875rem",3,"src"],["href","#",3,"target"],[1,"border","rounded",3,"src"],[3,"routerLink","queryParams"],["type","text","autoNum","",1,"text-right",2,"width","72px",3,"ngModel","ngModelChange"],[1,"text-right",3,"ngClass"],[1,"table","table-borderless"],["colspan","3",1,"text-right"],[1,"text-right","text-primary"],["class","text-right text-primary ",4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Text=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,fa,2,0,"a",1),t.YNc(3,Aa,10,0,"div",2),t.TgZ(4,"div",3),t.TgZ(5,"a",4),t._UZ(6,"i",5),t._uU(7,"Compare by Outlet"),t.qZA(),t._UZ(8,"button",6),t.TgZ(9,"ul",7),t.TgZ(10,"li",8),t.TgZ(11,"a",9),t._uU(12,"Compare by Month"),t.qZA(),t.qZA(),t.TgZ(13,"li",8),t.TgZ(14,"a",9),t._uU(15,"Compare with Delivery"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"filters"),t.TgZ(17,"div",10),t.YNc(18,Da,22,15,"div",11),t.YNc(19,qa,29,9,"div",12),t.qZA(),t.TgZ(20,"a",13),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(21,"More "),t._UZ(22,"i",14),t.qZA(),t.qZA(),t.TgZ(23,"content"),t.TgZ(24,"div",15),t.YNc(25,Wa,22,7,"div",16),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",(null==o.pageData.Role?null:o.pageData.Role.IsReorderPointEditor)&&o.pageData.Filter.GroupByVariant&&(null==o.data?null:o.data.MinVisible)&&o.pageData.Filter.ListIDs),t.xp6(1),t.Q6J("ngIf",null==o.pageData.Role?null:o.pageData.Role.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(10,Ka)),t.xp6(6),t.Q6J("routerLink",t.DdM(11,za)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,en)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(6),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,D.P,q.J,m.YE,m.nU,s.sg,p.Fj,M.b,s.mk],pipes:[s.JJ,s.uU,T.qU],styles:[""]}),a})();function nn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!0,"SalesProductByOutlet.csv")}),t._UZ(1,"i",7),t._uU(2," Export"),t.qZA()}}function on(a,i){if(1&a&&(t.TgZ(0,"span",16),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function rn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Product"),t.qZA(),t.TgZ(3,"autocompleteV2",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function ln(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Variant"),t.qZA(),t.TgZ(3,"autocompleteV2",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function sn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",8),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Sales"),t.qZA(),t.TgZ(4,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Categories"),t.qZA(),t.TgZ(8,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,on,2,2,"ng-template",11),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"From - To"),t.qZA(),t.TgZ(13,"datepicker",12),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(14,"datepicker",13),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"Scope"),t.qZA(),t.TgZ(18,"radio-options",14),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Product=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.YNc(19,rn,4,1,"div",15),t.YNc(20,ln,4,1,"div",15),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("model",e.pageData.Filter.Product)("options",e.ScopeFilter),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Product),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Product)}}function pn(a,i){if(1&a&&(t.TgZ(0,"th",25),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function cn(a,i){if(1&a&&(t.TgZ(0,"td",25),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function _n(a,i){if(1&a&&(t.TgZ(0,"tr",27),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",28),t._uU(4),t.qZA(),t.YNc(5,cn,2,1,"td",24),t.TgZ(6,"td",25),t._uU(7),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngForOf",e.Quantities),t.xp6(2),t.Oqu(e.Total)}}function un(a,i){if(1&a&&(t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.TgZ(2,"thead",21),t.TgZ(3,"tr"),t.TgZ(4,"th",22),t._uU(5,"Nama"),t.qZA(),t.TgZ(6,"th",23),t._uU(7,"Code"),t.qZA(),t.YNc(8,pn,2,1,"th",24),t.TgZ(9,"th",25),t._uU(10,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"tbody"),t.YNc(12,_n,8,4,"tr",26),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(8),t.Q6J("ngForOf",e.data.Outlet),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}const gn=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let dn=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/ReportSalesProductByOutlet","ReportLoader/ReportSalesProductByOutlet"),this.httpService=e,this.csvConverter=o,this.ScopeFilter=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-sales-by-outlet"]],features:[t.qOj],decls:10,vars:8,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Scope",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],["requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","10%","text-align","right"],["class","text-right",4,"ngFor","ngForOf"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[2,"text-align","right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,nn,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4,"Group by Product"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,sn,21,10,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,un,13,2,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",null==o.pageData.Filter?null:o.pageData.Filter.IsExport),t.xp6(1),t.Q6J("routerLink",t.DdM(7,gn)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,f.QB,D.P,q.J,s.sg],styles:[""]}),a})();function mn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!0,"SalesProductByOutlet.csv")}),t._UZ(1,"i",7),t._uU(2,"Export"),t.qZA()}}function Zn(a,i){if(1&a&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function hn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",8),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Zn,2,2,"ng-template",11),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Compare Month From"),t.qZA(),t.TgZ(13,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.MonthFrom=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Compare Month To"),t.qZA(),t.TgZ(17,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.MonthTo=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Year"),t.qZA(),t.TgZ(21,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Scope"),t.qZA(),t.TgZ(25,"radio-options",14),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupByVariant=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.MonthFrom)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.MonthTo)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("model",e.pageData.Filter.GroupByVariant)("options",e.ScopeFilter)}}function xn(a,i){if(1&a&&(t.TgZ(0,"th",25),t._uU(1),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.hij(" ",o.Months[e.Month-1].ColumnLabel," ")}}function Tn(a,i){if(1&a&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit,o=t.oxw().$implicit,n=t.oxw(2);t.xp6(1),t.hij(" ",n.findKey(o.Sold,e.Month)?t.lcZ(2,1,n.findKey(o.Sold,e.Month)):""," ")}}const Cn=function(a){return[a]},fn=function(a){return{ID:a}};function An(a,i){if(1&a&&(t.TgZ(0,"tr",26),t.TgZ(1,"td"),t.TgZ(2,"a",27),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.YNc(6,Tn,3,3,"td",28),t.TgZ(7,"td",29),t._uU(8),t.ALo(9,"number"),t.ALo(10,"sum"),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.VKq(11,Cn,o.pageData.Filter.GroupByVariant?"/menu/Products/Catalog/Variants/Info":"/menu/Products/Catalog/Products/Info"))("queryParams",t.VKq(13,fn,e.ID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngForOf",o.data.MonthlySales),t.xp6(2),t.hij(" ",t.lcZ(9,6,t.xi3(10,8,e.Sold,"Value"))," ")}}function Dn(a,i){if(1&a&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Sold)," ")}}function qn(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",30),t._UZ(2,"td"),t._UZ(3,"td"),t.YNc(4,Dn,3,3,"td",28),t.TgZ(5,"td",29),t._uU(6),t.ALo(7,"number"),t.ALo(8,"sum"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.MonthlySales),t.xp6(2),t.hij(" ",t.lcZ(7,2,t.xi3(8,4,e.data.MonthlySales,"Sold"))," ")}}function yn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",18),t.TgZ(3,"tr"),t.TgZ(4,"th",19),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th",20),t._uU(7,"Code"),t.qZA(),t.YNc(8,xn,2,1,"th",21),t.TgZ(9,"th",22),t._uU(10,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"tbody"),t.YNc(12,An,11,15,"tr",23),t.qZA(),t.YNc(13,qn,9,7,"tfoot",24),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(8),t.Q6J("ngForOf",e.data.MonthlySales),t.xp6(4),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}const vn=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Sn=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/ProductSalesMonthly","ReportLoader/ProductSalesMonthly"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear()+1,11,!0),this.Months=[{ID:1,Label:"January",ColumnLabel:"Jan"},{ID:2,Label:"February",ColumnLabel:"Feb"},{ID:3,Label:"March",ColumnLabel:"Mar"},{ID:4,Label:"April",ColumnLabel:"Apr"},{ID:5,Label:"May",ColumnLabel:"May"},{ID:6,Label:"June",ColumnLabel:"Jun"},{ID:7,Label:"July",ColumnLabel:"Jul"},{ID:8,Label:"August",ColumnLabel:"Aug"},{ID:9,Label:"September",ColumnLabel:"Sep"},{ID:10,Label:"October",ColumnLabel:"Oct"},{ID:11,Label:"November",ColumnLabel:"Nov"},{ID:12,Label:"December",ColumnLabel:"Dec"}],this.ScopeFilter=[{Key:!1,Value:"Product"},{Key:!0,Value:"Variant"}]}preGetList(){C.gT.IsEmpty(this.pageData.Filter.EntityID)&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}postInit(){this.menuData.H=this.data.PageTitle}findKey(e,o){let n=null;return e.forEach(r=>{r.Key==o&&(n=r.Value)}),n}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(n.Code=null==n.Code?"":n.Code,r.Code=null==r.Code?"":r.Code,n.Name=null==n.Name?"":n.Name,r.Name=null==r.Name?"":r.Name,e.active){case"Name":return this.compare(n.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Code":return this.compare(n.Code.toLocaleLowerCase(),r.Code.toLocaleLowerCase(),l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-sales-by-month"]],features:[t.qOj],decls:10,vars:7,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["name","Scope",3,"model","options","modelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","120px"],["class","text-right small","style","width: 70px",4,"ngFor","ngForOf"],[1,"text-right",2,"width","75px"],["class","border-bottom",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-right","small",2,"width","70px"],[1,"border-bottom"],[3,"routerLink","queryParams"],["class","text-right",4,"ngFor","ngForOf"],[1,"text-right"],[1,"table","table-borderless"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,mn,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4,"Group by Product"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,hn,26,12,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,yn,14,3,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(1),t.Q6J("routerLink",t.DdM(6,vn)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,D.P,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Mn(a,i){if(1&a&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function bn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Product"),t.qZA(),t.TgZ(3,"autocompleteV2",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function On(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Variant"),t.qZA(),t.TgZ(3,"autocompleteV2",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Jn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Categories"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(5,Mn,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"From - To"),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(10,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(11,"div"),t.TgZ(12,"h6"),t._uU(13,"Scope"),t.qZA(),t.TgZ(14,"radio-options",12),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Product=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.YNc(15,bn,4,1,"div",13),t.YNc(16,On,4,1,"div",13),t.TgZ(17,"div"),t.TgZ(18,"h6"),t._uU(19,"Write Performance Log"),t.qZA(),t.TgZ(20,"radio-options",14),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.WritePerformanceLog=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("model",e.pageData.Filter.Product)("options",e.ScopeFilter),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Product),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Product),t.xp6(4),t.Q6J("model",e.pageData.Filter.WritePerformanceLog)}}function In(a,i){if(1&a&&(t.TgZ(0,"th",26),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function Un(a,i){if(1&a&&(t.TgZ(0,"tr"),t._UZ(1,"th"),t._UZ(2,"th"),t.YNc(3,In,2,1,"th",25),t.qZA()),2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",e.data.Outlet)}}function wn(a,i){if(1&a&&(t.TgZ(0,"th",27),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",e,"")}}function Fn(a,i){if(1&a&&(t.TgZ(0,"td",22),t._uU(1),t.qZA()),2&a){const e=i.$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function Nn(a,i){if(1&a&&(t.TgZ(0,"tr",22),t.YNc(1,Fn,2,1,"td",24),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKeys(e))}}function Pn(a,i){if(1&a&&(t.TgZ(0,"div",18),t.TgZ(1,"table",19),t.TgZ(2,"thead",20),t.YNc(3,Un,4,1,"tr",13),t.TgZ(4,"tr"),t.TgZ(5,"th",21),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th",22),t._uU(8,"Code"),t.qZA(),t.YNc(9,wn,2,1,"th",23),t.qZA(),t.qZA(),t.TgZ(10,"tbody"),t.YNc(11,Nn,2,1,"tr",24),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(3),t.Q6J("ngIf",e.data.Outlet.length>0),t.xp6(6),t.Q6J("ngForOf",e.data.Header),t.xp6(2),t.Q6J("ngForOf",e.data.Data)}}const Ln=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Qn=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetProductSalesVsDelivery","ReportLoader/ReportSalesProductByOutlet"),this.httpService=e,this.csvConverter=o,this.ScopeFilter=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}getKeys(e){return Object.keys(e)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-sales-vs-delivery"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Scope",3,"model","options","modelChange"],[4,"ngIf"],["name","Scope",3,"model","modelChange"],[3,"title"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],["requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light"],[1,"border",2,"width","15%"],[1,"border"],["class","border","style","width: 10%",4,"ngFor","ngForOf"],["class","border",4,"ngFor","ngForOf"],["colspan","2","class","text-center border",4,"ngFor","ngForOf"],["colspan","2",1,"text-center","border"],[1,"border",2,"width","10%"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetProductSalesVsDelivery","Productsalesvsdelivery.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Group by Product"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Jn,21,9,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Pn,12,3,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(5),t.Q6J("routerLink",t.DdM(5,Ln)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,D.P,q.J,s.sg],styles:[""]}),a})();function Yn(a,i){if(1&a&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Rn(a,i){if(1&a&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function En(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Categories"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Yn,2,2,"ng-template",16),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Brand"),t.qZA(),t.TgZ(13,"ng-select",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.BrandID=n}),t.YNc(14,Rn,2,2,"ng-template",16),t.qZA(),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"From - To"),t.qZA(),t.TgZ(18,"datepicker",18),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(19,"datepicker",19),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Brands)("ngModel",e.pageData.Filter.BrandID),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function kn(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",21),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Sales"),t.qZA(),t.TgZ(4,"ng-select",22),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Customer"),t.qZA(),t.TgZ(8,"autocompleteV2",23),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Exclude Zero"),t.qZA(),t.TgZ(12,"radio-options",24),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ExcludeZero=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("items",e.pageData.Options.Sales)("ngModel",e.pageData.Filter.SalesID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeZero)}}function Hn(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1," COST"),t.qZA())}function Vn(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1," PROFIT"),t.qZA())}function Bn(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function Gn(a,i){if(1&a&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Profit))}}const jn=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]},Wn=function(a,i,e){return{CategoryID:a,From:i,To:e}};function $n(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t.TgZ(2,"a",44),t.ALo(3,"date"),t.ALo(4,"date"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td",37),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",38),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",37),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",37),t._uU(16),t.ALo(17,"number"),t.qZA(),t.YNc(18,Bn,3,3,"td",39),t.YNc(19,Gn,3,3,"td",40),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(23,jn))("queryParams",t.kEZ(24,Wn,e.ID,t.xi3(3,9,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(4,12,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(8,15,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(11,17,e.Total)),t.xp6(3),t.Oqu(t.lcZ(14,19,e.Discount+e.DiscountAmount)),t.xp6(3),t.Oqu(t.lcZ(17,21,e.NetSales)),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost)}}function Kn(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Cost")),"")}}function Xn(a,i){if(1&a&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Profit")),"")}}function zn(a,i){if(1&a&&(t.TgZ(0,"div",46),t.TgZ(1,"small",47),t._uU(2,"Gross Sales :"),t.qZA(),t.TgZ(3,"strong",48),t._uU(4),t.ALo(5,"number"),t.ALo(6,"sum"),t.qZA(),t.TgZ(7,"small",47),t._uU(8,"- Discount % :"),t.qZA(),t.TgZ(9,"strong",49),t._uU(10),t.ALo(11,"number"),t.ALo(12,"sum"),t.qZA(),t.TgZ(13,"small",47),t._uU(14),t.qZA(),t.TgZ(15,"strong",49),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"small",47),t._uU(19),t.qZA(),t.TgZ(20,"strong",49),t._uU(21),t.ALo(22,"number"),t.qZA(),t.TgZ(23,"small",47),t._uU(24),t.qZA(),t.TgZ(25,"strong",50),t._uU(26),t.ALo(27,"number"),t.ALo(28,"sum"),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.Oqu(t.lcZ(5,8,t.xi3(6,10,e.data.Data,"Total"))),t.xp6(6),t.Oqu(t.lcZ(11,13,t.xi3(12,15,e.data.Data,"Discount"))),t.xp6(4),t.hij("- Discount ",e.data.Currency," :"),t.xp6(2),t.Oqu(t.lcZ(17,18,e.data.TotalDiscountAmount.DiscountAmount)),t.xp6(3),t.hij("- Point Used ",e.data.Currency," :"),t.xp6(2),t.Oqu(t.lcZ(22,20,e.data.TotalDiscountAmount.PointUsed)),t.xp6(3),t.hij("= Net Sales ",e.data.Currency," :"),t.xp6(2),t.Oqu(t.lcZ(27,22,t.xi3(28,24,e.data.Data,"NetSales")-e.data.TotalDiscountAmount.PointUsed))}}function to(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",25),t.TgZ(1,"table",26),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",27),t.TgZ(3,"tr"),t.TgZ(4,"th",28),t._uU(5,"CATEGORY"),t.qZA(),t.TgZ(6,"th",29),t._uU(7,"QUANTITY"),t.qZA(),t.TgZ(8,"th",30),t._uU(9,"GROSS SALES"),t.qZA(),t.TgZ(10,"th",31),t._uU(11,"DISCOUNT"),t.qZA(),t.TgZ(12,"th",32),t._uU(13,"NET SALES"),t.qZA(),t.YNc(14,Hn,2,0,"th",33),t.YNc(15,Vn,2,0,"th",34),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,$n,20,28,"tr",35),t.qZA(),t.TgZ(18,"tfoot"),t.TgZ(19,"tr",36),t.TgZ(20,"td",37),t._uU(21,"Total : "),t.qZA(),t.TgZ(22,"td",37),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",38),t.TgZ(27,"a"),t._uU(28),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA(),t.qZA(),t.TgZ(31,"td",37),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA(),t.TgZ(35,"td",37),t._uU(36),t.ALo(37,"number"),t.ALo(38,"sum"),t.qZA(),t.YNc(39,Kn,4,6,"td",39),t.YNc(40,Xn,4,6,"td",40),t.qZA(),t.qZA(),t.qZA(),t.YNc(41,zn,29,27,"div",41),t.qZA()}if(2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.lcZ(24,10,t.xi3(25,12,e.data.Data,"Quantity"))),t.xp6(5),t.Oqu(t.lcZ(29,15,t.xi3(30,17,e.data.Data,"Total"))),t.xp6(4),t.Oqu(t.lcZ(33,20,t.xi3(34,22,e.data.Data,"Discount"))),t.xp6(4),t.Oqu(t.lcZ(37,25,t.xi3(38,27,e.data.Data,"NetSales"))),t.xp6(3),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}const ao=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold/Category"]},oo=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold/Category_By_Outlet"]};let ro=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/CategorySales","ReportLoader/CategorySales"),this.httpService=e,this.csvConverter=o,this.hideMore=!0}postInit(){this.menuData.H=this.data.PageTitle}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Total":return this.compare(n.Total,r.Total,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Discount":return this.compare(n.Discount,r.Discount,l);case"NetSales":return this.compare(n.NetSales,r.NetSales,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-category-sales"]],features:[t.qOj],decls:20,vars:10,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"fas","fa-chart-area"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-balance-scale","mr-2"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[3,"title"],["id","more-filter","container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[3,"model","modelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"text-left"],["mat-sort-header","Quantity",1,"align-right",2,"width","120px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],["mat-sort-header","Discount",1,"align-right",2,"width","120px"],["mat-sort-header","NetSales",1,"align-right",2,"width","120px"],["class","align-right","style","width: 120px;","mat-sort-header","Cost",4,"ngIf"],["class","align-right","style","width: 120px;","mat-sort-header","Profit",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[1,"text-right","text-primary"],["class","text-right text-danger",4,"ngIf"],["class","text-right",4,"ngIf"],["class","h6 mt-12",4,"ngIf"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["mat-sort-header","Profit",1,"align-right",2,"width","120px"],[3,"routerLink","queryParams"],[1,"text-right","text-danger"],[1,"h6","mt-12"],[1,"text-muted","h6"],[1,"text-primary","font-weight-bold","h2"],[1,"text-danger","font-weight-bold","h2"],[1,"text-success","font-weight-bold","h2"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/CategorySales","Category Sales.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"i",4),t._uU(7," Chart View"),t.qZA(),t.TgZ(8,"a",5),t._UZ(9,"i",6),t._uU(10,"By Outlet"),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",7),t.YNc(13,En,20,9,"div",8),t.YNc(14,kn,13,4,"div",9),t.TgZ(15,"a",10),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(16,"More "),t._UZ(17,"i",11),t.qZA(),t.qZA(),t.qZA(),t.TgZ(18,"content"),t.YNc(19,to,42,30,"div",12),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(5),t.Q6J("routerLink",t.DdM(8,ao)),t.xp6(3),t.Q6J("routerLink",t.DdM(9,oo)),t.xp6(5),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,q.J,D.P,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function io(a,i){if(1&a&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function lo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Categories"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(5,io,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"From - To"),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(10,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(11,"div"),t.TgZ(12,"h6"),t._uU(13,"Customer"),t.qZA(),t.TgZ(14,"autocompleteV2",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID)}}function so(a,i){if(1&a&&(t.TgZ(0,"th",20),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.Q6J("mat-sort-header",e),t.xp6(1),t.Oqu(e)}}function po(a,i){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function co(a,i){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,o[e]))}}function _o(a,i){if(1&a&&(t.TgZ(0,"td"),t.YNc(1,po,2,1,"span",19),t.YNc(2,co,3,3,"span",19),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Q6J("ngIf","Category"==e),t.xp6(1),t.Q6J("ngIf","Category"!=e)}}function uo(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,_o,3,2,"td",18),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKey(e))}}function go(a,i){if(1&a&&(t.TgZ(0,"td",22),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e),"")}}function mo(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",21),t.TgZ(2,"td",22),t._uU(3,"Total : "),t.qZA(),t.YNc(4,go,3,3,"td",23),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.Sum)}}function Zo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",16),t.TgZ(3,"tr"),t.YNc(4,so,2,2,"th",17),t.qZA(),t.qZA(),t.TgZ(5,"tbody"),t.YNc(6,uo,2,1,"tr",18),t.qZA(),t.YNc(7,mo,5,1,"tfoot",19),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngForOf",e.data.Dataheader),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}const ho=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold"]};let xo=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/CategorySalesByOutlet","ReportLoader/CategorySalesByOutlet"),this.httpService=e,this.csvConverter=o}postInit(){this.menuData.H=this.data.PageTitle}getKey(e){return Object.keys(e)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;for(let Z=0;Z<this.data.Dataheader.length;Z++)if(e.active==this.data.Dataheader[Z])return this.compare(n[this.data.Dataheader[Z]],r[this.data.Dataheader[Z]],l)}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-category-sales-by-outlet"]],features:[t.qOj],decls:12,vars:7,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[3,"mat-sort-header",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"mat-sort-header"],[1,"table-footer"],[1,""],["class","",4,"ngFor","ngForOf"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!0,"CategorySalesByOutlet.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Table View"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,lo,15,5,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Zo,8,3,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(5),t.Q6J("routerLink",t.DdM(6,ho)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,q.J,m.YE,s.sg,m.nU],pipes:[s.JJ],styles:[""]}),a})();var U=A(7168);function To(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",5),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Month"),t.qZA(),t.TgZ(4,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Month=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Year"),t.qZA(),t.TgZ(8,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Currency"),t.qZA(),t.TgZ(12,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",e.pageData.Options.Currencies)}}function Co(a,i){if(1&a&&(t.TgZ(0,"div",9),t._UZ(1,"POS-pie-chart",10),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("config",e.pieConfig)("data",e.PieData)}}const fo=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold"]};let Ao=(()=>{class a extends d.n{constructor(e){super(e,"Report/CategoryChart","ReportLoader/CategoryChartLoader"),this.httpService=e,this.Months=C.gT.Months,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.pieConfig={title:"",dataLabels:!1,labelTooltips:"Sales",height:500,legend:{alignColumns:!1}},this.PieData={}}postInit(){const e=[],o=[];this.data.forEach(n=>{e.push(n.Name),o.push({name:n.Name,y:n.Total})}),this.PieData=o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-category"]],features:[t.qOj],decls:9,vars:6,consts:[[3,"pageData","text","textChange","onSubmit"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","All",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Table View"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",2),t.YNc(6,To,13,6,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,Co,2,2,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(2),t.Q6J("routerLink",t.DdM(5,fo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,U.J],styles:[""]}),a})();var O=A(3975);function Do(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year"),t.qZA(),t.TgZ(3,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Year=n})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years)}}function qo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Month"),t.qZA(),t.TgZ(3,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Month=n})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months)}}function yo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",12),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",13),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function vo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Date Filter"),t.qZA(),t.TgZ(8,"radio-options",8),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Custom=n}),t.qZA(),t.qZA(),t.YNc(9,Do,4,2,"div",9),t.YNc(10,qo,4,2,"div",9),t.YNc(11,yo,5,2,"div",9),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("model",e.pageData.Filter.Custom)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Custom),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Custom),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Custom)}}function So(a,i){if(1&a&&(t.TgZ(0,"div",14),t.TgZ(1,"div",15),t.TgZ(2,"div",16),t.TgZ(3,"div",17),t.TgZ(4,"div",18),t.TgZ(5,"div",19),t.TgZ(6,"p",20),t._uU(7,"Transaction Per Hour"),t.qZA(),t.qZA(),t.TgZ(8,"div",21),t._UZ(9,"POS-line-chart",22),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(10,"div",16),t.TgZ(11,"div",17),t.TgZ(12,"div",18),t.TgZ(13,"div",19),t.TgZ(14,"p",20),t._uU(15,"Transaction Per Session"),t.qZA(),t.qZA(),t.TgZ(16,"div",21),t._UZ(17,"POS-pie-chart",22),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(9),t.Q6J("config",e.chartConfig)("data",e.ChartData),t.xp6(8),t.Q6J("config",e.pieConfig)("data",e.PieData)}}const bo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Visitor"]},Jo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Peak_Hour"]};let Io=(()=>{class a extends d.n{constructor(e){super(e,"Report/PeakHour","ReportLoader/PeakHourLoader"),this.httpService=e,this.RadioDateFilterType=[{Key:!1,Value:"Month"},{Key:!0,Value:"Custom"}],this.DateFilterType="Month",this.categories=[],this.PieData={},this.ChartData={},this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.Months=C.gT.Months,this.pieConfig={title:"",dataLabels:!0,labelTooltips:"Transaction",height:400,legend:{}},this.chartConfig={chart:{type:"area"},title:{text:""},credits:{enabled:!1},xAxis:{categories:this.categories},yAxis:{title:{text:""}},plotOptions:{},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0,textHeader:function(){return this.points.reduce(function(o,n){return o+"<br/>"+n.series.name+": <b>"+n.y+"</b>"},"<b>Time : "+this.x+"</b>")}}}}postInit(){const e=new Date;this.Year=e.getFullYear();const o=[],n=[];this.data.Data.forEach(r=>{o.push(r.Name),n.push({name:r.Name,y:r.Transaction})}),this.PieData=n,this.ChartData={series:this.data.series},this.categories=this.data.categories}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-peak-hour"]],features:[t.qOj],decls:11,vars:8,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["placeholder","Year",3,"ngModel","items","ngModelChange","clear"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","clear"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col"],[1,"card"],[1,"card-body","mt-5"],[1,"card-title"],[1,"h3"],[1,"card-text"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Visitor View"),t.qZA(),t.TgZ(4,"a",2),t._uU(5,"Table View"),t.qZA(),t.qZA(),t.TgZ(6,"filters"),t.TgZ(7,"div",3),t.YNc(8,vo,12,8,"div",4),t.qZA(),t.qZA(),t.TgZ(9,"content"),t.YNc(10,So,18,4,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(6,bo)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Jo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,D.P,f.QB,O.D,U.J],styles:[""]}),a})();function Uo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",8),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From - To"),t.qZA(),t.TgZ(8,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function wo(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"number"),t.qZA(),t.TgZ(4,"td",20),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td",20),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",20),t._uU(11),t.ALo(12,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,4,e.Visitor)),t.xp6(3),t.Oqu(t.lcZ(6,6,e.Orders)),t.xp6(3),t.Oqu(t.lcZ(9,8,e.TotalVisitor)),t.xp6(3),t.Oqu(t.lcZ(12,10,e.SalesNTax))}}function Fo(a,i){if(1&a&&(t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.TgZ(2,"thead",14),t.TgZ(3,"tr"),t.TgZ(4,"th",15),t._uU(5,"Visitor"),t.qZA(),t.TgZ(6,"th",16),t._uU(7,"Transaction"),t.qZA(),t.TgZ(8,"th",16),t._uU(9,"Total Visitor"),t.qZA(),t.TgZ(10,"th",17),t._uU(11,"Sales + Tax"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(12,"tbody"),t.YNc(13,wo,13,12,"tr",18),t.qZA(),t.TgZ(14,"tfoot"),t.TgZ(15,"tr",19),t.TgZ(16,"td",20),t._uU(17,"Total"),t.qZA(),t.TgZ(18,"td",20),t._uU(19),t.ALo(20,"number"),t.ALo(21,"sum"),t.qZA(),t.TgZ(22,"td",20),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",20),t._uU(27),t.ALo(28,"number"),t.ALo(29,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(13),t.Q6J("ngForOf",e.data),t.xp6(6),t.Oqu(t.lcZ(20,4,t.xi3(21,6,e.data,"Orders"))),t.xp6(4),t.Oqu(t.lcZ(24,9,t.xi3(25,11,e.data,"TotalVisitor"))),t.xp6(4),t.Oqu(t.lcZ(28,14,t.xi3(29,16,e.data,"SalesNTax")))}}const No=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour"]},Lo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Peak_Hour"]};let Qo=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetNumberOfPersonList","ReportLoader/GetNumberOfPersonLoader"),this.httpService=e,this.csvConverter=o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-visitor"]],features:[t.qOj],decls:14,vars:8,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[1,"text-right",2,"width","50px"],[1,"text-right",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!1,"PeakHour.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Chart View"),t.qZA(),t.TgZ(7,"a",4),t._uU(8,"Table View"),t.qZA(),t.qZA(),t.TgZ(9,"filters"),t.TgZ(10,"div",5),t.YNc(11,Uo,10,5,"div",6),t.qZA(),t.qZA(),t.TgZ(12,"content"),t.YNc(13,Fo,30,19,"div",7),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(5),t.Q6J("routerLink",t.DdM(6,No)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Lo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Yo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/GetPeakHourList","PeakHour.csv"),n.changeExport()}),t._UZ(1,"i",8),t._uU(2,"Export"),t.qZA()}}function Ro(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year"),t.qZA(),t.TgZ(3,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Year=n})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years)}}function Eo(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Month"),t.qZA(),t.TgZ(3,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Month=n})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months)}}function ko(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",15),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Ho(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",9),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Date Filter"),t.qZA(),t.TgZ(8,"radio-options",11),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Custom=n}),t.qZA(),t.qZA(),t.YNc(9,Ro,4,2,"div",12),t.YNc(10,Eo,4,2,"div",12),t.YNc(11,ko,5,2,"div",12),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("model",e.pageData.Filter.Custom)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Custom),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Custom),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Custom)}}function Vo(a,i){1&a&&(t.TgZ(0,"th",22),t._uU(1,"Revenue"),t.qZA())}function Bo(a,i){if(1&a&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Revenue))}}function Go(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",27),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",27),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",27),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",27),t._uU(13),t.ALo(14,"number"),t.ALo(15,"RoundUp"),t.qZA(),t.TgZ(16,"td",27),t._uU(17),t.ALo(18,"number"),t.ALo(19,"RoundUp"),t.qZA(),t.YNc(20,Bo,3,3,"td",28),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.TimeFormat),t.xp6(2),t.Oqu(t.lcZ(5,7,e.Count)),t.xp6(3),t.Oqu(t.lcZ(8,9,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(11,11,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(14,13,t.lcZ(15,15,e.Tax))),t.xp6(4),t.Oqu(t.lcZ(18,17,t.lcZ(19,19,e.SalesWithTax))),t.xp6(3),t.Q6J("ngIf",o.pageData.IsRevenue)}}function jo(a,i){if(1&a&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data,"Revenue")))}}function Wo(a,i){if(1&a&&(t.TgZ(0,"div",17),t.TgZ(1,"table",18),t.TgZ(2,"thead",19),t.TgZ(3,"tr"),t.TgZ(4,"th",20),t._uU(5,"Time"),t.qZA(),t.TgZ(6,"th",21),t._uU(7,"Order"),t.qZA(),t.TgZ(8,"th",21),t._uU(9,"Quantity"),t.qZA(),t.TgZ(10,"th",22),t._uU(11,"Sales"),t.qZA(),t.TgZ(12,"th",22),t._uU(13,"Tax"),t.qZA(),t.TgZ(14,"th",22),t._uU(15,"Sales + Tax"),t.qZA(),t.YNc(16,Vo,2,0,"th",23),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,Go,21,21,"tr",24),t.qZA(),t.TgZ(19,"tfoot"),t.TgZ(20,"tr",25),t._UZ(21,"td",26),t.TgZ(22,"td",27),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",27),t._uU(27),t.ALo(28,"number"),t.ALo(29,"sum"),t.qZA(),t.TgZ(30,"td",27),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA(),t.TgZ(34,"td",27),t._uU(35),t.ALo(36,"number"),t.ALo(37,"RoundUp"),t.ALo(38,"sum"),t.qZA(),t.TgZ(39,"td",27),t._uU(40),t.ALo(41,"number"),t.ALo(42,"RoundUp"),t.ALo(43,"sum"),t.qZA(),t.YNc(44,jo,4,6,"td",28),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(16),t.Q6J("ngIf",e.pageData.IsRevenue),t.xp6(2),t.Q6J("ngForOf",e.data),t.xp6(5),t.Oqu(t.lcZ(24,8,t.xi3(25,10,e.data,"Count"))),t.xp6(4),t.Oqu(t.lcZ(28,13,t.xi3(29,15,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(32,18,t.xi3(33,20,e.data,"Sales"))),t.xp6(4),t.Oqu(t.lcZ(36,23,t.lcZ(37,25,t.xi3(38,27,e.data,"Tax")))),t.xp6(5),t.Oqu(t.lcZ(41,30,t.lcZ(42,32,t.xi3(43,34,e.data,"SalesWithTax")))),t.xp6(4),t.Q6J("ngIf",e.pageData.IsRevenue)}}const Ko=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Visitor"]},Xo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour"]};let zo=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetPeakHourList","ReportLoader/PeakHourLoader"),this.httpService=e,this.csvConverter=o,this.RadioDateFilterType=[{Key:!1,Value:"Month"},{Key:!0,Value:"Custom"}],this.DateFilterType="Month",this.Years=C.gT.GenerateYears((new Date).getFullYear(),10,!0),this.Months=C.gT.Months,this.menuData.H="Peak Hour Table"}changeExport(){this.pageData.Filter.Export=!1}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-table-view"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["placeholder","Year",3,"ngModel","items","ngModelChange","clear"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","clear"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[1,"text-right",2,"width","50px"],[1,"text-right",2,"width","120px"],["style","width: 120px","class"," text-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[1,"text-right"],["class","text-right",4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Yo,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4,"Vistor View"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Chart View"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Ho,12,7,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Wo,45,37,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(1),t.Q6J("routerLink",t.DdM(7,Ko)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,Xo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,D.P,f.QB,s.sg],pipes:[s.JJ,T.qU,T.Fo],styles:[""]}),a})();function tr(a,i){if(1&a&&(t.TgZ(0,"span",18),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function er(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",11),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,tr,2,2,"ng-template",14),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Currency"),t.qZA(),t.TgZ(13,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Month"),t.qZA(),t.TgZ(17,"ng-select",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Month=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Year"),t.qZA(),t.TgZ(21,"ng-select",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years)}}function ar(a,i){if(1&a&&(t.TgZ(0,"div",19),t._UZ(1,"POS-line-chart",20),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const or=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Table"]},rr=function(a,i){return{Month:a,Year:i}},ir=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]},sr=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity"]};let pr=(()=>{class a extends d.n{constructor(e,o,n,r){super(e,"Report/DailySalesChart","ReportLoader/DailyReportSales"),this.httpService=e,this.url=n,this.router=r,this.ChartData={},this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.Months=C.gT.Months}postInit(){this.ChartData={series:this.data.Series};const e=new Date(this.data.From),o=e.getMonth(),n=e.getFullYear();this.from=Date.UTC(n,o,1),this.chartConfig={chart:{type:"area"},title:{text:""},credits:{enabled:!1},xAxis:{type:"datetime"},yAxis:{title:{text:""}},plotOptions:{series:{pointStart:this.from,pointInterval:864e5}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0}}}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz),t.Y36(g.F0))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-daily-sales"]],features:[t.qOj],decls:19,vars:14,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn-group"],["title","Table View",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa","fa-table"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t._UZ(4,"i",3),t._uU(5," Table View"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10," Comparable PerYear"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13," Daily Quantity"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"filters"),t.TgZ(15,"div",8),t.YNc(16,er,22,10,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,ar,2,2,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(3),t.Q6J("routerLink",t.DdM(8,or))("queryParams",t.WLB(9,rr,null==o.pageData.Filter?null:o.pageData.Filter.Month,null==o.pageData.Filter?null:o.pageData.Filter.Year)),t.xp6(6),t.Q6J("routerLink",t.DdM(12,ir)),t.xp6(3),t.Q6J("routerLink",t.DdM(13,sr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,O.D],styles:[""]}),a})();function cr(a,i){if(1&a&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function _r(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",11),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Year"),t.qZA(),t.TgZ(8,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Category"),t.qZA(),t.TgZ(12,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(13,cr,2,2,"ng-template",15),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Currency"),t.qZA(),t.TgZ(17,"ng-select",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().currency=n})("change",function(){return t.CHM(e),t.oxw().checkFilterCurrency()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.currency)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies)}}function ur(a,i){if(1&a&&(t.TgZ(0,"div",18),t._UZ(1,"POS-line-chart",19),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const dr=function(){return["/menu/Reports/Sales_Report/Standard/Monthly/Monthly_Table"]},Zr=function(){return["/menu/Reports/Sales_Report/Standard/Monthly/Yearly_Table"]};let hr=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/MonthlySalesPerformanceChart","ReportLoader/MonthlySalesPerformance"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.ChartData={},this.currency=-1}preInitList(){this.pageData.Options.Currencies.unshift({ID:-1,Index:1,Symbol:"All",Name:"All",ExchangeRate:1,ConversionSuggestion:!0,ExchangeRateDate:"0001-01-01T00:00:00",ExchangeRateDateDisplay:"01 Jan 0001"}),this.checkFilterCurrency()}checkFilterCurrency(){this.pageData.Filter.CurrencyID=this.currency<0?null:this.currency}postInit(){const e=[];this.data.MonthlySalesRank.forEach(o=>{const n={name:o.Name,data:o.Sales};n.data.unshift(null),e.push(n)}),this.ChartData={series:e},this.chartConfig={chart:{type:"column"},title:{text:""},credits:{enabled:!1},xAxis:{min:1,max:12},yAxis:{title:{text:""},stackLabels:{enabled:!0}},plotOptions:{column:{stacking:"normal"}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0}}}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-monthly-sales"]],features:[t.qOj],decls:16,vars:8,consts:[[3,"pageData","text","textChange","onSubmit"],[1,"btn-group"],["title","Table View",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fa","fa-table"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange","change"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t._UZ(4,"i",3),t._uU(5," Table View"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10," View Yearly "),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",8),t.YNc(13,_r,18,8,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,ur,2,2,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(3),t.Q6J("routerLink",t.DdM(6,dr)),t.xp6(6),t.Q6J("routerLink",t.DdM(7,Zr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,O.D],styles:[""]}),a})();function xr(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!1,"SalesPerYear.csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function Tr(a,i){if(1&a&&(t.TgZ(0,"span",22),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Cr(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Tr,2,2,"ng-template",16),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Sales Name"),t.qZA(),t.TgZ(13,"ng-select",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Year to Compare"),t.qZA(),t.TgZ(17,"div",18),t.TgZ(18,"div",19),t.TgZ(19,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.FromYear=n}),t.qZA(),t.qZA(),t.TgZ(20,"div",19),t.TgZ(21,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ToYear=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Type"),t.qZA(),t.TgZ(25,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Option?null:e.pageData.Option.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Option?null:e.pageData.Option.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Option?null:e.pageData.Option.Sales),t.xp6(6),t.Q6J("ngModel",e.pageData.Filter.FromYear)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.ToYear)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",e.pageData.Option.Types)}}function fr(a,i){if(1&a&&(t.TgZ(0,"th",34),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",e,"")}}function Ar(a,i){if(1&a&&(t.TgZ(0,"td",34),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=i.$implicit,o=t.oxw().$implicit,n=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,n.filterSales(o.Sales,"Year",e),"Sales"))," ")}}const k=function(a,i){return{"text-success font-weight-bold":a,"text-danger font-weight-bold":i}};function Dr(a,i){if(1&a&&(t.TgZ(0,"tr",35),t.TgZ(1,"td",26),t._uU(2),t.ALo(3,"Month"),t.qZA(),t.YNc(4,Ar,4,6,"td",36),t.TgZ(5,"td",37),t.ALo(6,"sum"),t.ALo(7,"sum"),t._uU(8),t.ALo(9,"number"),t.ALo(10,"sum"),t.qZA(),t.TgZ(11,"td",37),t.ALo(12,"sum"),t.ALo(13,"sum"),t._uU(14),t.ALo(15,"number"),t.ALo(16,"sum"),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,6,e.Month)),t.xp6(2),t.Q6J("ngForOf",o.data.HeaderList),t.xp6(1),t.Q6J("ngClass",t.WLB(30,k,t.xi3(6,8,o.filterSales(e.Difference,"Month",e.Month),"Difference")>0,t.xi3(7,11,o.filterSales(e.Difference,"Month",e.Month),"Difference")<0)),t.xp6(3),t.hij(" ",t.lcZ(9,14,t.xi3(10,16,o.filterSales(e.Difference,"Month",e.Month),"Difference"))," "),t.xp6(3),t.Q6J("ngClass",t.WLB(33,k,t.xi3(12,19,o.filterSales(e.Difference,"Month",e.Month),"Percentage")>0,t.xi3(13,22,o.filterSales(e.Difference,"Month",e.Month),"Percentage")<0)),t.xp6(3),t.hij(" ",t.lcZ(15,25,t.xi3(16,27,o.filterSales(e.Difference,"Month",e.Month),"Percentage"))," ")}}function qr(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.ALo(4,"GetChildrenArray"),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,o.filterSales(t.xi3(4,6,o.data.Data,"Sales"),"Year",e),"Sales"))," ")}}const yr=function(a,i){return{"text-success":a,"text-danger":i}};function vr(a,i){if(1&a&&(t.TgZ(0,"div",23),t.TgZ(1,"table",24),t.TgZ(2,"thead",25),t.TgZ(3,"tr"),t.TgZ(4,"th",26),t._uU(5,"Month"),t.qZA(),t.YNc(6,fr,2,1,"th",27),t.TgZ(7,"th",28),t._uU(8,"Differences (IDR)"),t.qZA(),t.TgZ(9,"th",28),t._uU(10,"Percentage (%)"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"tbody"),t.YNc(12,Dr,17,36,"tr",29),t.qZA(),t.TgZ(13,"tfoot",30),t.TgZ(14,"tr"),t.TgZ(15,"td",31),t._uU(16,"Total :"),t.qZA(),t.YNc(17,qr,5,9,"td",32),t.TgZ(18,"td",33),t._uU(19),t.ALo(20,"number"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(6),t.Q6J("ngForOf",e.data.HeaderList),t.xp6(6),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Q6J("ngForOf",e.data.HeaderList),t.xp6(1),t.Q6J("ngClass",t.WLB(7,yr,e.data.TotalDiff>0,e.data.TotalDiff<0)),t.xp6(1),t.hij(" ",t.lcZ(20,5,e.data.TotalDiff),"")}}const Sr=function(){return["/menu/Reports/Sales_Report/Standard/Monthly"]},Mr=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]};let H=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/YearlySalesList","ReportLoader/YearlyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0)}filterSales(e,o,n){return e.filter(function(r){return r[o]==n})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-yearly"]],features:[t.qOj],decls:16,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales",3,"ngModel","items","ngModelChange"],[1,"row"],[1,"col-6"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Types",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","30px"],["style","width: 20px","class"," text-right",4,"ngFor","ngForOf"],[1,"text-right",2,"width","30px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],[1,"font-weight-bold","text-success"],["class","text-right text-success",4,"ngFor","ngForOf"],[1,"text-right",3,"ngClass"],[1,"text-right",2,"width","20px"],[1,"border-bottom"],["style","width: 20px","class","text-right",4,"ngFor","ngForOf"],[1,"text-right",2,"width","30px",3,"ngClass"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,xr,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"View Monthly"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10," View Daily"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",8),t.YNc(13,Cr,26,13,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,vr,21,10,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Sr)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,Mr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,s.sg,s.mk],pipes:[s.JJ,T.mr,T.qU,T.J1],styles:[""]}),a})();function br(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/DailySalesExport","Daily_Sales_Report.csv")}),t._UZ(1,"i",16),t._uU(2,"Export"),t.qZA()}}function Or(a,i){if(1&a&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Jr(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",17),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",19),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Or,2,2,"ng-template",20),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Sales Name"),t.qZA(),t.TgZ(13,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Month"),t.qZA(),t.TgZ(17,"ng-select",22),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Month=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months)}}function Ir(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",24),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Year"),t.qZA(),t.TgZ(4,"ng-select",25),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Delivery"),t.qZA(),t.TgZ(8,"ng-select",26),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.DeliveryID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Currency"),t.qZA(),t.TgZ(12,"ng-select",27),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Type"),t.qZA(),t.TgZ(16,"ng-select",28),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.DeliveryID)("items",null==e.pageData.Options?null:e.pageData.Options.Deliveries),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types)}}function Ur(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1," Tax "),t.qZA())}function wr(a,i){1&a&&(t.TgZ(0,"th",49),t._uU(1,"Net Sales + Tax"),t.qZA())}function Fr(a,i){1&a&&(t.TgZ(0,"th",50),t._uU(1,"Cost"),t.qZA())}function Nr(a,i){1&a&&(t.TgZ(0,"th",51),t._uU(1," Profit "),t.qZA())}function Pr(a,i){1&a&&(t.TgZ(0,"th",52),t._uU(1," Profit + Tax Include "),t.qZA())}function Lr(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Tax))}}function Qr(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.SalesNetWithTax)," ")}}function Yr(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Cost),"")}}function Rr(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Profit),"")}}function Er(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.ProfitWithTax),"")}}const V=function(a){return{"is-weekend":a}};function kr(a,i){if(1&a&&(t.TgZ(0,"tr",53),t.TgZ(1,"td",53),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.ALo(6,"date"),t.qZA(),t.TgZ(7,"td",45),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",45),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td",45),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td",45),t._uU(17),t.ALo(18,"number"),t.qZA(),t.YNc(19,Lr,3,3,"td",46),t.YNc(20,Qr,3,3,"td",46),t.YNc(21,Yr,3,3,"td",47),t.YNc(22,Rr,3,3,"td",46),t.YNc(23,Er,3,3,"td",46),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.Q6J("ngClass",t.VKq(27,V,o.data.DayOfWeekend)),t.xp6(1),t.Q6J("ngClass",t.VKq(29,V,e.DayOfWeekend)),t.xp6(1),t.hij(" ",t.xi3(3,13,e.Day,"EEEE")," "),t.xp6(3),t.Oqu(t.xi3(6,16,e.Day,"dd")),t.xp6(3),t.Oqu(t.lcZ(9,19,e.Count)),t.xp6(3),t.Oqu(t.lcZ(12,21,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(15,23,e.Gross)),t.xp6(3),t.Oqu(t.lcZ(18,25,e.SalesNet)),t.xp6(2),t.Q6J("ngIf",o.data.ShowTax),t.xp6(1),t.Q6J("ngIf",o.data.ShowTax),t.xp6(1),t.Q6J("ngIf",o.pageData.Role.HasCostRole),t.xp6(1),t.Q6J("ngIf",o.pageData.Role.IgnoreTax&&o.pageData.Role.HasProfitRole&&o.pageData.Role.HasCostRole),t.xp6(1),t.Q6J("ngIf",!o.pageData.Role.IgnoreTax&&o.pageData.Role.HasProfitRole&&o.pageData.Role.HasCostRole)}}function Hr(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Tax")),"")}}function Vr(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"SalesNetWithTax")),"")}}function Br(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Cost")),"")}}function Gr(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Profit")),"")}}function jr(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"ProfitWithTax")),"")}}function Wr(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",29),t.TgZ(1,"table",30),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",31),t.TgZ(3,"tr"),t.TgZ(4,"th",32),t._uU(5,"Day"),t.qZA(),t.TgZ(6,"th",33),t._uU(7,"Dt."),t.qZA(),t.TgZ(8,"th",34),t._uU(9,"Trans"),t.qZA(),t.TgZ(10,"th",35),t._uU(11,"Quantity"),t.qZA(),t.TgZ(12,"th",36),t._uU(13,"Gross"),t.qZA(),t.TgZ(14,"th",37),t._uU(15,"Net Sales"),t.qZA(),t.YNc(16,Ur,2,0,"th",38),t.YNc(17,wr,2,0,"th",39),t.YNc(18,Fr,2,0,"th",40),t.YNc(19,Nr,2,0,"th",41),t.YNc(20,Pr,2,0,"th",42),t.qZA(),t.qZA(),t.TgZ(21,"tbody"),t.YNc(22,kr,24,31,"tr",43),t.qZA(),t.TgZ(23,"tfoot"),t.TgZ(24,"tr"),t._UZ(25,"td",44),t._UZ(26,"td",44),t.TgZ(27,"td",45),t._uU(28),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA(),t.TgZ(31,"td",45),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA(),t.TgZ(35,"td",45),t._uU(36),t.ALo(37,"number"),t.ALo(38,"sum"),t.qZA(),t.TgZ(39,"td",45),t._uU(40),t.ALo(41,"number"),t.ALo(42,"sum"),t.qZA(),t.YNc(43,Hr,4,6,"td",46),t.YNc(44,Vr,4,6,"td",46),t.YNc(45,Br,4,6,"td",47),t.YNc(46,Gr,4,6,"td",47),t.YNc(47,jr,4,6,"td",46),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(16),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.pageData.Role.HasCostRole),t.xp6(1),t.Q6J("ngIf",e.pageData.Role.IgnoreTax&&e.pageData.Role.HasProfitRole&&e.pageData.Role.HasCostRole),t.xp6(1),t.Q6J("ngIf",!e.pageData.Role.IgnoreTax&&e.pageData.Role.HasProfitRole&&e.pageData.Role.HasCostRole),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.lcZ(29,15,t.xi3(30,17,e.data.Data,"Count"))),t.xp6(4),t.Oqu(t.lcZ(33,20,t.xi3(34,22,e.data.Data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(37,25,t.xi3(38,27,e.data.Data,"Gross"))),t.xp6(4),t.Oqu(t.lcZ(41,30,t.xi3(42,32,e.data.Data,"SalesNet"))),t.xp6(3),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.pageData.Role.HasCostRole),t.xp6(1),t.Q6J("ngIf",e.pageData.Role.IgnoreTax&&e.pageData.Role.HasProfitRole&&e.pageData.Role.HasCostRole),t.xp6(1),t.Q6J("ngIf",!e.pageData.Role.IgnoreTax&&e.pageData.Role.HasProfitRole&&e.pageData.Role.HasCostRole)}}const $r=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]},Kr=function(a,i){return{Month:a,Year:i}},Xr=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]};let zr=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/DailySalesList","ReportLoader/DailyReportSales",null,n),this.httpService=e,this.csvConverter=o,this.activatedRoute=n,this.Months=C.gT.Months,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.hideMore=!0}postInit(){this.menuData.H=this.data.PageTitle}sortData(e){const o=this.pageData.Data.slice();this.pageData.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Day":case"Date":return this.compare(n.Day,r.Day,l);case"Count":return this.compare(n.Count,r.Count,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Gross":return this.compare(n.Gross,r.Gross,l);case"SalesNet":return this.compare(n.SalesNet,r.SalesNet,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"SalesNetWithTax":return this.compare(n.SalesNetWithTax,r.SalesNetWithTax,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(n.ProfitWithTax,r.ProfitWithTax,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-daily"]],features:[t.qOj],decls:21,vars:14,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["title","Chart View",1,"btn","btn-outline-secondary","pointer",3,"routerLink","queryParams"],[1,"fas","fa-chart-bar"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],[3,"title"],["id","more-filter","container",""],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Type",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","api","Report/DailySalesList","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Day",2,"width","90px"],["mat-sort-header","Date",1,"align-right",2,"width","42px"],["mat-sort-header","Count",1,"align-right",2,"width","70px"],["mat-sort-header","Quantity",1,"align-right",2,"width","100px"],["mat-sort-header","Gross",1,"align-right",2,"width","120px"],["mat-sort-header","SalesNet",1,"align-right",2,"width","120px"],["style","width: 120px","class"," align-right","mat-sort-header","Tax",4,"ngIf"],["style","width: 120px","class"," align-right","mat-sort-header","SalesNetWithTax",4,"ngIf"],["style","width: 120px","class"," align-right","mat-sort-header","Cost",4,"ngIf"],["style","width: 120px","class"," align-right","mat-sort-header","Profit",4,"ngIf"],["style","width: 160px","class"," align-right","mat-sort-header","ProfitWithTax",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"empty-column"],[1,"text-right"],["class","text-right",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["mat-sort-header","Tax",1,"align-right",2,"width","120px"],["mat-sort-header","SalesNetWithTax",1,"align-right",2,"width","120px"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["mat-sort-header","Profit",1,"align-right",2,"width","120px"],["mat-sort-header","ProfitWithTax",1,"align-right",2,"width","160px"],[3,"ngClass"],[1,"text-right","text-danger"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,br,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._UZ(5,"i",4),t._uU(6," Chart View"),t.qZA(),t._UZ(7,"button",5),t.TgZ(8,"ul",6),t.TgZ(9,"li",7),t.TgZ(10,"a",8),t._uU(11,"Comparable PerYear"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(12,"filters"),t.TgZ(13,"div",9),t.YNc(14,Jr,18,8,"div",10),t.YNc(15,Ir,17,8,"div",11),t.qZA(),t.TgZ(16,"a",12),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(17,"More "),t._UZ(18,"i",13),t.qZA(),t.qZA(),t.TgZ(19,"content"),t.YNc(20,Wr,48,35,"div",14),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",null==o.pageData.Role?null:o.pageData.Role.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(9,$r))("queryParams",t.WLB(10,Kr,null==o.pageData.Filter?null:o.pageData.Filter.Month,null==o.pageData.Filter?null:o.pageData.Filter.Year)),t.xp6(6),t.Q6J("routerLink",t.DdM(13,Xr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function ti(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",12),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/MonthlySalesList",n.data.PageTitle+".csv")}),t._UZ(1,"i",13),t._uU(2,"Export"),t.qZA()}}function ei(a,i){if(1&a&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ai(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,ei,2,2,"ng-template",17),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Sales Name"),t.qZA(),t.TgZ(13,"ng-select",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Year"),t.qZA(),t.TgZ(17,"ng-select",19),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Currency"),t.qZA(),t.TgZ(21,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Type"),t.qZA(),t.TgZ(25,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(26,"div"),t.TgZ(27,"h6"),t._uU(28,"Multiply Unit Qty"),t.qZA(),t.TgZ(29,"radio-options",22),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.MultiplyUnitQuantity=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.pageData.Filter.MultiplyUnitQuantity)}}function ni(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Tax"),t.qZA())}function oi(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Sales + Tax"),t.qZA())}function ri(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Cost"),t.qZA())}function ii(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Profit"),t.qZA())}function li(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,t.lcZ(3,4,e.Tax),".0-0"))}}function si(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,t.lcZ(3,4,e.SalesNetWithTax),".0-0"))}}function pi(a,i){if(1&a&&(t.TgZ(0,"td",39),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Cost,".0-0")," ")}}function ci(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Profit,".0-0")," ")}}function _i(a,i){if(1&a&&(t.TgZ(0,"tr",37),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"Month"),t.qZA(),t.TgZ(4,"td",33),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td",33),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",33),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td",33),t._uU(14),t.ALo(15,"number"),t.qZA(),t.YNc(16,li,4,6,"td",34),t.YNc(17,si,4,6,"td",34),t.YNc(18,pi,3,4,"td",35),t.YNc(19,ci,3,4,"td",36),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,9,e.Month)),t.xp6(3),t.Oqu(t.xi3(6,11,e.Count,".0-0")),t.xp6(3),t.Oqu(t.xi3(9,14,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(12,17,e.Gross,".0-0")),t.xp6(3),t.Oqu(t.xi3(15,20,e.SalesNet,".0-0")),t.xp6(2),t.Q6J("ngIf",o.data.ShowTax),t.xp6(1),t.Q6J("ngIf",o.data.ShowTax),t.xp6(1),t.Q6J("ngIf",o.pageData.HasCostAndProfitRole),t.xp6(1),t.Q6J("ngIf",o.pageData.HasCostAndProfitRole)}}function ui(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.ALo(4,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.lcZ(3,4,t.xi3(4,6,e.data.Data,"Tax")),".0-0"),"")}}function gi(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.ALo(4,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.lcZ(3,4,t.xi3(4,6,e.data.Data,"SalesNetWithTax")),".0-0"),"")}}function di(a,i){if(1&a&&(t.TgZ(0,"td",39),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Cost"),".0-0"),"")}}function mi(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Profit"),".0-0"),"")}}function Zi(a,i){if(1&a&&(t.TgZ(0,"div",24),t.TgZ(1,"table",25),t.TgZ(2,"thead",26),t.TgZ(3,"tr"),t.TgZ(4,"th",27),t._uU(5,"Month"),t.qZA(),t.TgZ(6,"th",28),t._uU(7,"Trans"),t.qZA(),t.TgZ(8,"th",29),t._uU(9,"Quantity"),t.qZA(),t.TgZ(10,"th",29),t._uU(11,"Gross"),t.qZA(),t.TgZ(12,"th",29),t._uU(13,"Net Sales"),t.qZA(),t.YNc(14,ni,2,0,"th",30),t.YNc(15,oi,2,0,"th",30),t.YNc(16,ri,2,0,"th",30),t.YNc(17,ii,2,0,"th",30),t.qZA(),t.qZA(),t.TgZ(18,"tbody"),t.YNc(19,_i,20,23,"tr",31),t.qZA(),t.TgZ(20,"tfoot"),t.TgZ(21,"tr",32),t._UZ(22,"td"),t.TgZ(23,"td",33),t._uU(24),t.ALo(25,"number"),t.ALo(26,"sum"),t.qZA(),t.TgZ(27,"td",33),t._uU(28),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA(),t.TgZ(31,"td",33),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA(),t.TgZ(35,"td",33),t._uU(36),t.ALo(37,"number"),t.ALo(38,"sum"),t.qZA(),t.YNc(39,ui,5,9,"td",34),t.YNc(40,gi,5,9,"td",34),t.YNc(41,di,4,7,"td",35),t.YNc(42,mi,4,7,"td",36),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.pageData.HasCostAndProfitRole),t.xp6(1),t.Q6J("ngIf",e.pageData.HasCostAndProfitRole),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.xi3(25,13,t.xi3(26,16,e.data.Data,"Count"),".0-0")),t.xp6(4),t.Oqu(t.xi3(29,19,t.xi3(30,22,e.data.Data,"Quantity"),".0-0")),t.xp6(4),t.Oqu(t.xi3(33,25,t.xi3(34,28,e.data.Data,"Gross"),".0-0")),t.xp6(4),t.Oqu(t.xi3(37,31,t.xi3(38,34,e.data.Data,"Sales"),".0-0")),t.xp6(3),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.data.ShowTax),t.xp6(1),t.Q6J("ngIf",e.pageData.HasCostAndProfitRole),t.xp6(1),t.Q6J("ngIf",e.pageData.HasCostAndProfitRole)}}const hi=function(){return["/menu/Reports/Sales_Report/Standard/Monthly"]},xi=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]};let Ti=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/MonthlySalesList","ReportLoader/MonthlyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0)}postInit(){this.menuData.H=this.data.PageTitle}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-monthly"]],features:[t.qOj],decls:17,vars:9,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["title","Chart View",1,"btn","btn-outline-secondary","pointer",3,"routerLink"],[1,"fas","fa-chart-bar"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Type",3,"ngModel","items","ngModelChange"],["name","Inventory",3,"model","modelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","90px"],[1,"text-right",2,"width","70px"],[1,"text-right",2,"width","120px"],["style","width: 120px","class"," text-right",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right","text-success"],["class","text-right",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[1,"border-bottom"],[1,"text-right"],[1,"text-right","text-danger"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ti,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._UZ(5,"i",4),t._uU(6," Chart View"),t.qZA(),t._UZ(7,"button",5),t.TgZ(8,"ul",6),t.TgZ(9,"li",7),t.TgZ(10,"a",8),t._uU(11,"View Yearly"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(12,"filters"),t.TgZ(13,"div",9),t.YNc(14,ai,30,13,"div",10),t.qZA(),t.qZA(),t.TgZ(15,"content"),t.YNc(16,Zi,43,37,"div",11),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(7,hi)),t.xp6(6),t.Q6J("routerLink",t.DdM(8,xi)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,D.P,s.sg],pipes:[s.JJ,T.qU,T.mr,T.Fo],styles:[""]}),a})();function Ci(a,i){if(1&a&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function fi(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Ci,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Currency"),t.qZA(),t.TgZ(13,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().currency=n})("change",function(){return t.CHM(e),t.oxw().checkFilterCurrency()}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Month"),t.qZA(),t.TgZ(17,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Month=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Year"),t.qZA(),t.TgZ(21,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.currency)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years)}}function Ai(a,i){if(1&a&&(t.TgZ(0,"div",14),t._UZ(1,"POS-line-chart",15),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const Di=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]},yi=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity/Monthly"]};let vi=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/DailySalesVolume","ReportLoader/DailyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.currency=-1,this.Months=C.gT.Months,this.ChartData={}}preInitList(){this.pageData.Options.Currencies.unshift({ID:-1,Index:1,Symbol:"All",Name:"All",ExchangeRate:1,ConversionSuggestion:!0,ExchangeRateDate:"0001-01-01T00:00:00",ExchangeRateDateDisplay:"01 Jan 0001"}),this.checkFilterCurrency()}checkFilterCurrency(){this.pageData.Filter.CurrencyID=this.currency<0?null:this.currency}postInit(){this.ChartData={series:this.data.Series};const e=new Date(this.data.From),o=e.getMonth(),n=e.getFullYear();let r=Date.UTC(n,o,1);this.chartConfig={chart:{type:"area"},title:{text:""},credits:{enabled:!1},yAxis:{title:""},xAxis:{type:"datetime"},plotOptions:{series:{pointStart:r,pointInterval:864e5}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0}}}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-sales-volume"]],features:[t.qOj],decls:11,vars:8,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["title","View Monthly",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange","change"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Daily Sales"),t.qZA(),t.TgZ(4,"a",2),t._uU(5,"View Monthly"),t.qZA(),t.qZA(),t.TgZ(6,"filters"),t.TgZ(7,"div",3),t.YNc(8,fi,22,10,"div",4),t.qZA(),t.qZA(),t.TgZ(9,"content"),t.YNc(10,Ai,2,2,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(6,Di)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,yi)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,O.D],styles:[""]}),a})();function Si(a,i){if(1&a&&(t.TgZ(0,"span",11),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Mi(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",5),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Si,2,2,"ng-template",8),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Year"),t.qZA(),t.TgZ(13,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Currency"),t.qZA(),t.TgZ(17,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().currency=n})("change",function(){return t.CHM(e),t.oxw().checkFilterCurrency()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.currency)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies)}}function bi(a,i){if(1&a&&(t.TgZ(0,"div",12),t._UZ(1,"POS-line-chart",13),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const Ji=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity"]};let Ii=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/MonthtlySalesVolume","ReportLoader/MonthlySalesPerformance"),this.httpService=e,this.csvConverter=o,this.currency=-1,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.ChartData={}}preInitList(){this.pageData.Options.Currencies.unshift({ID:-1,Index:1,Symbol:"All",Name:"All",ExchangeRate:1,ConversionSuggestion:!0,ExchangeRateDate:"0001-01-01T00:00:00",ExchangeRateDateDisplay:"01 Jan 0001"}),this.checkFilterCurrency()}checkFilterCurrency(){this.pageData.Filter.CurrencyID=this.currency<0?null:this.currency}postInit(){const e=[];this.data.MonthlySalesRank.forEach(o=>{const n=o.Sales.map(l=>parseInt(l));e.push({name:o.Name,data:n})}),this.ChartData={series:e},this.chartConfig={chart:{type:"column"},title:{text:""},credits:{enabled:!1},xAxis:{categories:this.data.MonthName},yAxis:{title:{text:""},stackLabels:{enabled:!0}},plotOptions:{column:{stacking:"normal"}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0}}}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-monthly-volume"]],features:[t.qOj],decls:9,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["title","View Daily",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange","change"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"View Daily"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",2),t.YNc(6,Mi,18,8,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,bi,2,2,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(5,Ji)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,O.D],styles:[""]}),a})();function Ui(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",12),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/OutletPerformance","Sales Transaction ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",13),t._uU(2,"Export"),t.qZA()}}function wi(a,i){if(1&a&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Fi(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",21),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",22),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Ni(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",23),t.TgZ(4,"div",24),t.TgZ(5,"ng-select",25),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Year=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",26),t.TgZ(7,"ng-select",27),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Month=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function Pi(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Category"),t.qZA(),t.TgZ(4,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(5,wi,2,2,"ng-template",16),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Type"),t.qZA(),t.TgZ(9,"ng-select",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Date Filter Type"),t.qZA(),t.TgZ(13,"radio-options",18),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().DateFilterType=n}),t.qZA(),t.qZA(),t.YNc(14,Fi,5,2,"div",19),t.YNc(15,Ni,8,4,"div",19),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.DateFilterType)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType)}}function Li(a,i){1&a&&(t.TgZ(0,"th",44),t._uU(1,"Cost"),t.qZA())}function Qi(a,i){1&a&&(t.TgZ(0,"th",45),t._uU(1,"Profit"),t.qZA())}function Yi(a,i){if(1&a&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}const B=function(a,i){return{"text-danger":a,"text-success":i}};function Ri(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,B,e.Profit<0,e.Profit>0)),t.xp6(1),t.Oqu(t.lcZ(2,2,e.Profit))}}const G=function(){return["/menu/Reports/Sales_Report/Standard/Summary"]},j=function(a,i,e){return{EntityID:a,From:i,To:e}};function Ei(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",41),t._uU(6),t.qZA(),t.TgZ(7,"td",41),t.TgZ(8,"a",46),t.ALo(9,"date"),t.ALo(10,"date"),t.TgZ(11,"b"),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t.YNc(14,Yi,3,3,"td",42),t.YNc(15,Ri,3,7,"td",43),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(3);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Outlet),t.xp6(2),t.Oqu(e.Quantity),t.xp6(2),t.Q6J("routerLink",t.DdM(16,G))("queryParams",t.kEZ(17,j,e.EntityID,t.xi3(9,8,n.pageData.Filter.From,"ddMMyyyy"),t.xi3(10,11,n.pageData.Filter.To,"ddMMyyyy"))),t.xp6(4),t.Oqu(t.lcZ(13,14,e.Sales)),t.xp6(2),t.Q6J("ngIf",n.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",n.pageData.IsProfitVisible)}}function ki(a,i){if(1&a&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(t.xi3(2,1,t.xi3(3,4,e.data.DataWithCategory,"Cost"),".0-0"))}}const W=function(a,i){return{"text-success":a,"text-danger":i}};function Hi(a,i){if(1&a&&(t.TgZ(0,"td",47),t.ALo(1,"sum"),t.ALo(2,"sum"),t._uU(3),t.ALo(4,"number"),t.ALo(5,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,W,t.xi3(1,2,e.data.DataWithCategory,"Profit")>0,t.xi3(2,5,e.data.DataWithCategory,"Profit")<0)),t.xp6(3),t.Oqu(t.xi3(4,8,t.xi3(5,11,e.data.DataWithCategory,"Profit"),".0-0"))}}function Vi(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"table",30),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw(2).sortOutletDataWrapper(n)}),t.TgZ(1,"thead",31),t.TgZ(2,"tr",32),t.TgZ(3,"th"),t._uU(4,"No."),t.qZA(),t.TgZ(5,"th",33),t._uU(6,"Outlet"),t.qZA(),t.TgZ(7,"th",34),t._uU(8,"Quantity"),t.qZA(),t.TgZ(9,"th",35),t._uU(10,"Sales"),t.qZA(),t.YNc(11,Li,2,0,"th",36),t.YNc(12,Qi,2,0,"th",37),t.qZA(),t.qZA(),t.TgZ(13,"tbody"),t.YNc(14,Ei,16,21,"tr",38),t.qZA(),t.TgZ(15,"tfoot"),t.TgZ(16,"tr",39),t.TgZ(17,"td",40),t._uU(18),t.ALo(19,"number"),t.ALo(20,"sum"),t.qZA(),t.TgZ(21,"td",41),t._uU(22),t.ALo(23,"number"),t.ALo(24,"sum"),t.qZA(),t.YNc(25,ki,4,7,"td",42),t.YNc(26,Hi,6,17,"td",43),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(11),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsProfitVisible),t.xp6(2),t.Q6J("ngForOf",e.data.DataWithCategory),t.xp6(4),t.Oqu(t.xi3(19,7,t.xi3(20,10,e.data.DataWithCategory,"Quantity"),".0-0")),t.xp6(4),t.Oqu(t.xi3(23,13,t.xi3(24,16,e.data.DataWithCategory,"Sales"),".0-0")),t.xp6(3),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsProfitVisible)}}function Bi(a,i){1&a&&(t.TgZ(0,"th",44),t._uU(1,"Cost"),t.qZA())}function Gi(a,i){1&a&&(t.TgZ(0,"th",45),t._uU(1,"Profit"),t.qZA())}function ji(a,i){if(1&a&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function Wi(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,B,e.Profit<0,e.Profit>0)),t.xp6(1),t.Oqu(t.lcZ(2,2,e.Profit))}}function $i(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",41),t._uU(6),t.qZA(),t.TgZ(7,"td",41),t.TgZ(8,"a",46),t.ALo(9,"date"),t.ALo(10,"date"),t.TgZ(11,"b"),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"td",41),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"td",41),t._uU(18),t.ALo(19,"number"),t.qZA(),t.YNc(20,ji,3,3,"td",42),t.YNc(21,Wi,3,7,"td",43),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(3);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Outlet),t.xp6(2),t.Oqu(e.Transaction),t.xp6(2),t.Q6J("routerLink",t.DdM(22,G))("queryParams",t.kEZ(23,j,e.EntityID,t.xi3(9,10,n.pageData.Filter.From,"ddMMyyyy"),t.xi3(10,13,n.pageData.Filter.To,"ddMMyyyy"))),t.xp6(4),t.Oqu(t.lcZ(13,16,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(16,18,e.Tax)),t.xp6(3),t.Oqu(t.lcZ(19,20,e.Sales+e.Tax)),t.xp6(2),t.Q6J("ngIf",n.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",n.pageData.IsProfitVisible)}}function Ki(a,i){if(1&a&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(t.xi3(2,1,t.xi3(3,4,e.data.DataWithoutCategory,"Cost"),".0-0"))}}function Xi(a,i){if(1&a&&(t.TgZ(0,"td",47),t.ALo(1,"sum"),t.ALo(2,"sum"),t._uU(3),t.ALo(4,"number"),t.ALo(5,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,W,t.xi3(1,2,e.data.DataWithoutCategory,"Profit")>0,t.xi3(2,5,e.data.DataWithoutCategory,"Profit")<0)),t.xp6(3),t.Oqu(t.xi3(4,8,t.xi3(5,11,e.data.DataWithoutCategory,"Profit"),".0-0"))}}function zi(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"table",30),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw(2).sortOutletDataWrapper(n)}),t.TgZ(1,"thead",31),t.TgZ(2,"tr",32),t.TgZ(3,"th"),t._uU(4,"No."),t.qZA(),t.TgZ(5,"th",33),t._uU(6,"Outlet"),t.qZA(),t.TgZ(7,"th",48),t._uU(8,"Trans"),t.qZA(),t.TgZ(9,"th",35),t._uU(10,"Sales"),t.qZA(),t.TgZ(11,"th",49),t._uU(12,"Tax"),t.qZA(),t.TgZ(13,"th",50),t._uU(14,"Sales + Tax"),t.qZA(),t.YNc(15,Bi,2,0,"th",36),t.YNc(16,Gi,2,0,"th",37),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,$i,22,27,"tr",38),t.qZA(),t.TgZ(19,"tfoot"),t.TgZ(20,"tr",39),t.TgZ(21,"td",40),t._uU(22),t.ALo(23,"number"),t.ALo(24,"sum"),t.qZA(),t.TgZ(25,"td",41),t._uU(26),t.ALo(27,"number"),t.ALo(28,"sum"),t.qZA(),t.TgZ(29,"td",41),t._uU(30),t.ALo(31,"number"),t.ALo(32,"sum"),t.qZA(),t.TgZ(33,"td",41),t._uU(34),t.ALo(35,"number"),t.ALo(36,"sum"),t.ALo(37,"sum"),t.qZA(),t.YNc(38,Ki,4,7,"td",42),t.YNc(39,Xi,6,17,"td",43),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(15),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsProfitVisible),t.xp6(2),t.Q6J("ngForOf",e.data.DataWithoutCategory),t.xp6(4),t.Oqu(t.xi3(23,9,t.xi3(24,12,e.data.DataWithoutCategory,"Transaction"),".0-0")),t.xp6(4),t.Oqu(t.xi3(27,15,t.xi3(28,18,e.data.DataWithoutCategory,"Sales"),".0-0")),t.xp6(4),t.Oqu(t.xi3(31,21,t.xi3(32,24,e.data.DataWithoutCategory,"Tax"),".0-0")),t.xp6(4),t.Oqu(t.xi3(35,27,t.xi3(36,30,e.data.DataWithoutCategory,"Tax")+t.xi3(37,33,e.data.DataWithoutCategory,"Sales"),".0-0")),t.xp6(4),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsProfitVisible)}}function tl(a,i){1&a&&(t.TgZ(0,"p"),t._uU(1,"No Data has been loaded!"),t.qZA())}function el(a,i){if(1&a&&(t.TgZ(0,"div",28),t.YNc(1,Vi,27,19,"table",29),t.YNc(2,zi,40,36,"table",29),t.YNc(3,tl,2,0,"p",19),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(null==e.data?null:e.data.DataWithCategory.length)>0),t.xp6(1),t.Q6J("ngIf",(null==e.data?null:e.data.DataWithoutCategory.length)>0),t.xp6(1),t.Q6J("ngIf",0==(null==e.data?null:e.data.DataWithCategory.length)&&0==(null==e.data?null:e.data.DataWithoutCategory.length))}}const nl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Detail"]},rl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]},ll=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]},pl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Graphic"]};let cl=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/OutletPerformance","ReportLoader/OutletPerformance",null,n),this.httpService=e,this.csvConverter=o,this.activatedRoute=n,this.hideMore=!0,this.DateFilterType=!1,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=[],this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}],this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const r=new Date;this.Year=r.getFullYear(),this.Month=r.getMonth(),this.Years=C.gT.GenerateYears(r.getFullYear(),11,!0)}preInitList(){this.pageData.Filter.CategoryID=null}YearMonthToDateRange(){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth())}sortOutletDataWrapper(e){let o,n;if(this.data.DataWithCategory.length>0)o=this.data.DataWithCategory,n=!0;else{if(!(this.data.DataWithoutCategory.length>0))return;o=this.data.DataWithoutCategory,n=!1}this.sortOutletData(o,e,n)}sortOutletData(e,o,n){function r(l,Z,x){return(l<Z?-1:1)*(x?1:-1)}o.active&&""!==o.direction&&null!=e&&(e=e.sort((l,Z)=>{const x="asc"===o.direction;switch(o.active){case"Outlet":return r(l.Outlet,Z.Outlet,x);case"Transaction":return r(l.Transaction,Z.Transaction,x);case"Quantity":return r(l.Quantity,Z.Quantity,x);case"Sales":return r(l.SalesNet,Z.SalesNet,x);case"SalesTax":return r(l.SalesNet+l.Tax,Z.SalesNet+l.Tax,x);case"Tax":return r(l.Tax,Z.Tax,x);case"Cost":return r(l.Cost,Z.Cost,x);case"Profit":return r(l.Profit,Z.Profit,x);default:return 0}}),n?this.data.DataWithCategory=e:n||(this.data.DataWithoutCategory=e))}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-outlet-performance"]],features:[t.qOj],decls:22,vars:13,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["title","Outlet Performance Detail",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],["title","Chart View",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[1,"container-fluid","mt-5"],["class","table","id","tableGrid","matSort","",3,"matSortChange",4,"ngIf"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","Outlet"],["mat-sort-header","Quantity",1,"align-right"],["mat-sort-header","Sales",1,"align-right"],["class","align-right","mat-sort-header","Cost",4,"ngIf"],["class","align-right","mat-sort-header","Profit",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],["colspan","3",1,"text-right"],[1,"text-right"],["class","text-right",4,"ngIf"],["class","text-right",3,"ngClass",4,"ngIf"],["mat-sort-header","Cost",1,"align-right"],["mat-sort-header","Profit",1,"align-right"],[3,"routerLink","queryParams"],[1,"text-right",3,"ngClass"],["mat-sort-header","Transaction",1,"align-right"],["mat-sort-header","Tax",1,"align-right"],["mat-sort-header","SalesTax",1,"align-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ui,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"View Detail"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10," By Month"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13,"By Entity Group"),t.qZA(),t.qZA(),t.TgZ(14,"li",6),t.TgZ(15,"a",8),t._uU(16," Chart View"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(17,"filters"),t.TgZ(18,"div",9),t.YNc(19,Pi,16,8,"div",10),t.qZA(),t.qZA(),t.TgZ(20,"content"),t.YNc(21,el,4,3,"div",11),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(9,nl)),t.xp6(5),t.Q6J("routerLink",t.DdM(10,rl)),t.xp6(3),t.Q6J("routerLink",t.DdM(11,ll)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,pl)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,D.P,f.QB,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function _l(a,i){if(1&a&&(t.TgZ(0,"span",11),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ul(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",12),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",13),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function gl(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",14),t.TgZ(4,"div",15),t.TgZ(5,"ng-select",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Year=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",17),t.TgZ(7,"ng-select",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Month=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function dl(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",5),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Category"),t.qZA(),t.TgZ(4,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(5,_l,2,2,"ng-template",7),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Type"),t.qZA(),t.TgZ(9,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Date Filter"),t.qZA(),t.TgZ(13,"radio-options",9),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().DateFilterType=n})("modelChange",function(){return t.CHM(e),t.oxw().YearMonthToDateRange()}),t.qZA(),t.qZA(),t.YNc(14,ul,5,2,"div",10),t.YNc(15,gl,8,4,"div",10),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.DateFilterType)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType)}}function ml(a,i){if(1&a&&(t.TgZ(0,"div",19),t._UZ(1,"POS-pie-chart",20),t.qZA()),2&a){const e=t.oxw();t.xp6(1),t.Q6J("config",e.pieConfig)("data",e.PieData)}}const hl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]};let xl=(()=>{class a extends d.n{constructor(e){super(e,"Report/OutletPerformance","ReportLoader/OutletPerformance"),this.httpService=e,this.DateFilterType=!0,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.PieData={},this.RadioDateFilterType=[{Key:!0,Value:"Predefined"},{Key:!1,Value:"Range"}],this.pieConfig={title:"",dataLabels:!0,labelTooltips:"Sales",height:400,legend:{}};const o=new Date;this.Year=o.getFullYear(),this.Month=o.getMonth()}postInit(){this.getPieData()}getPieData(){const e=[],o=[];this.data.DataWithoutCategory.length>0&&this.data.DataWithoutCategory.forEach(n=>{e.push(n.Outlet),o.push({name:n.Outlet,y:n.Sales})}),this.data.DataWithCategory.length>0&&this.data.DataWithCategory.forEach(n=>{e.push(n.Outlet),o.push({name:n.Outlet,y:n.Sales})}),this.PieData=o}YearMonthToDateRange(){if(this.DateFilterType){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth()),this.pageData.Filter.From=new Date(this.Year,this.Month,1),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0)}}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-outlet-graphic"]],features:[t.qOj],decls:9,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Table View",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Table View"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",2),t.YNc(6,dl,16,8,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,ml,2,2,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(5,hl)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,D.P,f.QB,U.J],styles:[""]}),a})();function Tl(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/OutletPerformanceDetail","Sales Transaction ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",16),t._uU(2,"Export"),t.qZA()}}function Cl(a,i){if(1&a&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function fl(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",24),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",25),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Al(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Compare with prev Month"),t.qZA(),t.TgZ(3,"radio-options",26),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).isCompareData=n})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare("Data")}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.isCompareData)}}function Dl(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",27),t.TgZ(4,"div",28),t.TgZ(5,"ng-select",29),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Year=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",30),t.TgZ(7,"ng-select",31),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Month=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function ql(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",17),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Category"),t.qZA(),t.TgZ(4,"ng-select",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(5,Cl,2,2,"ng-template",19),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Type"),t.qZA(),t.TgZ(9,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Date Filter Type"),t.qZA(),t.TgZ(13,"radio-options",21),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().DateFilterType=n}),t.qZA(),t.qZA(),t.YNc(14,fl,5,2,"div",22),t.YNc(15,Al,4,1,"div",22),t.YNc(16,Dl,8,4,"div",22),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.DateFilterType)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType)}}function yl(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",32),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Exclude complementary"),t.qZA(),t.TgZ(4,"radio-options",26),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ExcludeComplementary=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Exclude Non Inventory"),t.qZA(),t.TgZ(8,"radio-options",26),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ExcludeInventory=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeComplementary),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeInventory)}}function vl(a,i){1&a&&(t.TgZ(0,"th",58),t._uU(1,"Prev"),t.qZA())}function Sl(a,i){1&a&&(t.TgZ(0,"th",58),t._uU(1,"Now"),t.qZA())}function Ml(a,i){1&a&&(t.TgZ(0,"th",59),t._uU(1,"Trans "),t.qZA())}function bl(a,i){if(1&a&&(t.TgZ(0,"th",60),t._uU(1,"Tax"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet")}}function Ol(a,i){if(1&a&&(t.TgZ(0,"th",60),t._uU(1," Sales + Tax"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet")}}function Jl(a,i){1&a&&(t.TgZ(0,"th",53),t._uU(1,"\xb1 (%)"),t.qZA())}function Il(a,i){1&a&&(t.TgZ(0,"th",61),t._uU(1,"Cost"),t.qZA())}function Ul(a,i){if(1&a&&(t.TgZ(0,"th",60),t._uU(1," Profit"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"ProfitWithTax":"Profit")}}function wl(a,i){1&a&&(t.TgZ(0,"th",62),t._uU(1,"Expense"),t.qZA())}function Fl(a,i){1&a&&(t.TgZ(0,"th",63),t._uU(1,"Net Profit"),t.qZA())}function Nl(a,i){1&a&&(t.TgZ(0,"th",64),t._uU(1," Target"),t.qZA())}function Pl(a,i){1&a&&(t.TgZ(0,"th",65),t._uU(1," Ach(%)"),t.qZA())}function Ll(a,i){if(1&a&&(t.TgZ(0,"td",68),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PrevIndex)}}const Ql=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function Yl(a,i){if(1&a&&(t.TgZ(0,"td",69),t._uU(1),t.qZA()),2&a){const e=t.oxw(),o=e.$implicit,n=e.index;t.Q6J("ngClass",t.WLB(2,Ql,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function Rl(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Count,"1.0-0"))}}function El(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Tax,"1.0-0"))}}const kl=function(){return["/menu/Reports/Sales_Report/Standard/Summary"]},Hl=function(a,i,e){return{EntityID:a,From:i,To:e}};function Vl(a,i){if(1&a&&(t.TgZ(0,"td",53),t.TgZ(1,"a",70),t.ALo(2,"date"),t.ALo(3,"date"),t.TgZ(4,"b"),t._uU(5),t.ALo(6,"number"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(12,kl))("queryParams",t.kEZ(13,Hl,e.EntityID,t.xi3(2,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(3,6,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(4),t.Oqu(t.xi3(6,9,e.SalesWithTax,"1.0-0"))}}function Bl(a,i){if(1&a&&(t.ynx(0),t._uU(1),t.ALo(2,"number"),t.BQk()),2&a){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Increase,"1.0-0")," ")}}function Gl(a,i){if(1&a&&t._uU(0),2&a){const e=t.oxw(2).$implicit;t.hij(" ",e.Increase," ")}}const K=function(a,i){return{"text-warning":a,"text-success":i,"text-right":!0}};function jl(a,i){if(1&a&&(t.TgZ(0,"td",71),t.YNc(1,Bl,3,4,"ng-container",72),t.YNc(2,Gl,1,1,"ng-template",null,73,t.W1O),t.qZA()),2&a){const e=t.MAs(3),o=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(3,K,o.IsNegative,o.IsPositive)),t.xp6(1),t.Q6J("ngIf","-"!==o.Increase)("ngIfElse",e)}}function Wl(a,i){if(1&a&&(t.TgZ(0,"td",74),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Cost,"1.0-0")," ")}}const J=function(a,i){return{"text-danger":a,"text-success":i}};function $l(a,i){if(1&a&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.Q6J("ngClass",t.WLB(5,J,e.Profit<0,e.Profit>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.Profit,"1.0-0"))}}function Kl(a,i){if(1&a&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.Q6J("ngClass",t.WLB(5,J,e.ProfitWithTax<0,e.ProfitWithTax>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.ProfitWithTax,"1.0-0"))}}function Xl(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,$l,3,8,"span",55),t.YNc(2,Kl,3,8,"span",55),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax)}}function zl(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Expense,"1.0-0"),"")}}function ts(a,i){if(1&a&&(t.TgZ(0,"td",75),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.NetProfit,"1.0-0"),"")}}function es(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.SalesTarget,"1.0-0"),"")}}function as(a,i){if(1&a&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.Q6J("ngClass",t.WLB(5,J,e.Achievement<0,e.Achievement>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.Achievement,"1.0-0"))}}function ns(a,i){if(1&a&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.Q6J("ngClass",t.WLB(5,J,e.AchievementWithTax<0,e.AchievementWithTax>0)),t.xp6(1),t.hij("",t.xi3(2,2,e.AchievementWithTax,"1.0-0")," ")}}function os(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,as,3,8,"span",55),t.YNc(2,ns,3,8,"span",55),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function rs(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",51),t._uU(4),t.qZA(),t.YNc(5,Ll,2,1,"td",66),t.YNc(6,Yl,2,5,"td",67),t.YNc(7,Rl,3,4,"td",43),t.TgZ(8,"td",53),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",53),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",53),t._uU(15),t.ALo(16,"number"),t.qZA(),t.YNc(17,El,3,4,"td",43),t.ALo(18,"HideSumZero"),t.YNc(19,Vl,7,17,"td",43),t.YNc(20,jl,4,6,"td",55),t.YNc(21,Wl,3,4,"td",56),t.YNc(22,Xl,3,2,"td",43),t.YNc(23,zl,3,4,"td",43),t.ALo(24,"HideSumZero"),t.YNc(25,ts,3,4,"td",57),t.YNc(26,es,3,4,"td",43),t.ALo(27,"HideSumZero"),t.YNc(28,os,3,2,"td",43),t.ALo(29,"HideSumZero"),t.ALo(30,"HideSumZero"),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",n.isCompareData),t.xp6(1),t.Q6J("ngIf",n.isCompareData),t.xp6(1),t.Q6J("ngIf",!e.WithCategory),t.xp6(2),t.Oqu(t.xi3(10,17,e.Quantity,"1.0-0")),t.xp6(3),t.Oqu(t.xi3(13,20,e.Gross,"1.0-0")),t.xp6(3),t.Oqu(t.xi3(16,23,e.SalesNet,"1.0-0")),t.xp6(2),t.Q6J("ngIf",!n.data.WithCategory&&t.xi3(18,26,n.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!n.data.WithCategory),t.xp6(1),t.Q6J("ngIf",n.isCompareData),t.xp6(1),t.Q6J("ngIf",n.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",n.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",n.pageData.IsExpense&&t.xi3(24,29,n.data.Data,"Expense")),t.xp6(2),t.Q6J("ngIf",n.pageData.IsExpense),t.xp6(1),t.Q6J("ngIf",t.xi3(27,32,n.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(29,35,n.data.Data,"AchievementWithTax")||t.xi3(30,38,n.data.Data,"Achievement"))}}function is(a,i){1&a&&t._UZ(0,"td",76)}function ls(a,i){1&a&&t._UZ(0,"td",76)}function ss(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Count"),"1.0-0"),"")}}function ps(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Tax"),"1.0-0")," ")}}function cs(a,i){if(1&a&&(t.TgZ(0,"td",77),t.TgZ(1,"a",78),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,1,t.xi3(4,4,e.data.Data,"SalesWithTax"),"1.0-0"))}}function _s(a,i){if(1&a&&(t.TgZ(0,"td",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(5,K,e.comparation<0,e.comparation>0)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.comparation,"1.0-0")," ")}}function us(a,i){if(1&a&&(t.TgZ(0,"td",74),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Cost"),"1.0-0")," ")}}const X=function(a,i){return{"text-success":a,"text-danger":i}};function gs(a,i){if(1&a&&(t.TgZ(0,"span",71),t.ALo(1,"sum"),t.ALo(2,"sum"),t._uU(3),t.ALo(4,"number"),t.ALo(5,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,X,t.xi3(1,2,e.data.Data,"Profit")>0,t.xi3(2,5,e.data.Data,"Profit")<0)),t.xp6(3),t.Oqu(t.xi3(4,8,t.xi3(5,11,e.data.Data,"Profit"),"1.0-0"))}}function ds(a,i){if(1&a&&(t.TgZ(0,"span",71),t.ALo(1,"sum"),t.ALo(2,"sum"),t._uU(3),t.ALo(4,"number"),t.ALo(5,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,X,t.xi3(1,2,e.data.Data,"ProfitWithTax")>0,t.xi3(2,5,e.data.Data,"ProfitWithTax")<0)),t.xp6(3),t.hij("",t.xi3(4,8,t.xi3(5,11,e.data.Data,"ProfitWithTax"),"1.0-0")," ")}}function ms(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,gs,6,17,"span",55),t.YNc(2,ds,6,17,"span",55),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax)}}function Zs(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Expense"),"1.0-0"),"")}}function hs(a,i){if(1&a&&(t.TgZ(0,"td",75),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"NetProfit"),"1.0-0"),"")}}function xs(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"SalesTarget"),"1.0-0"),"")}}function Ts(a,i){if(1&a&&(t.TgZ(0,"span",71),t.ALo(1,"sum"),t.ALo(2,"sum"),t.ALo(3,"sum"),t.ALo(4,"sum"),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.ALo(8,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(23,J,t.xi3(1,2,e.data.Data,"Sales")/t.xi3(2,5,e.data.Data,"SalesTarget")<0,t.xi3(3,8,e.data.Data,"Sales")/t.xi3(4,11,e.data.Data,"SalesTarget")>0)),t.xp6(5),t.Oqu(t.xi3(6,14,t.xi3(7,17,e.data.Data,"Sales")/t.xi3(8,20,e.data.Data,"SalesTarget"),"1.0-0"))}}function Cs(a,i){if(1&a&&(t.TgZ(0,"span",71),t.ALo(1,"sum"),t.ALo(2,"sum"),t.ALo(3,"sum"),t.ALo(4,"sum"),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.ALo(8,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(23,J,t.xi3(1,2,e.data.Data,"SalesWithTax")/t.xi3(2,5,e.data.Data,"SalesTarget")<0,t.xi3(3,8,e.data.Data,"SalesWithTax")/t.xi3(4,11,e.data.Data,"SalesTarget")>0)),t.xp6(5),t.hij("",t.xi3(6,14,t.xi3(7,17,e.data.Data,"SalesWithTax")/t.xi3(8,20,e.data.Data,"SalesTarget"),"1.0-0")," ")}}function fs(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,Ts,9,26,"span",55),t.YNc(2,Cs,9,26,"span",55),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function As(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",33),t.TgZ(1,"table",34),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",35),t.TgZ(3,"tr"),t.TgZ(4,"th"),t._uU(5,"No."),t.qZA(),t.TgZ(6,"th",36),t._uU(7,"Outlet"),t.qZA(),t.YNc(8,vl,2,0,"th",37),t.YNc(9,Sl,2,0,"th",37),t.YNc(10,Ml,2,0,"th",38),t.TgZ(11,"th",39),t._uU(12,"Qty"),t.qZA(),t.TgZ(13,"th",40),t._uU(14,"Gross"),t.qZA(),t.TgZ(15,"th",41),t._uU(16,"Sales"),t.qZA(),t.YNc(17,bl,2,1,"th",42),t.ALo(18,"HideSumZero"),t.YNc(19,Ol,2,1,"th",42),t.YNc(20,Jl,2,0,"th",43),t.YNc(21,Il,2,0,"th",44),t.YNc(22,Ul,2,1,"th",42),t.YNc(23,wl,2,0,"th",45),t.ALo(24,"HideSumZero"),t.YNc(25,Fl,2,0,"th",46),t.YNc(26,Nl,2,0,"th",47),t.ALo(27,"HideSumZero"),t.YNc(28,Pl,2,0,"th",48),t.ALo(29,"HideSumZero"),t.ALo(30,"HideSumZero"),t.qZA(),t.qZA(),t.TgZ(31,"tbody"),t.YNc(32,rs,31,41,"tr",49),t.qZA(),t.TgZ(33,"tfoot"),t.TgZ(34,"tr",50),t._UZ(35,"td"),t._UZ(36,"td",51),t.YNc(37,is,1,0,"td",52),t.YNc(38,ls,1,0,"td",52),t.YNc(39,ss,4,7,"td",43),t.TgZ(40,"td",53),t._uU(41),t.ALo(42,"number"),t.ALo(43,"sum"),t.qZA(),t.TgZ(44,"td",53),t._uU(45),t.ALo(46,"number"),t.ALo(47,"sum"),t.qZA(),t.TgZ(48,"td",53),t._uU(49),t.ALo(50,"number"),t.ALo(51,"sum"),t.qZA(),t.YNc(52,ps,4,7,"td",43),t.ALo(53,"HideSumZero"),t.YNc(54,cs,5,7,"td",54),t.YNc(55,_s,3,8,"td",55),t.YNc(56,us,4,7,"td",56),t.YNc(57,ms,3,2,"td",43),t.YNc(58,Zs,4,7,"td",43),t.ALo(59,"HideSumZero"),t.YNc(60,hs,4,7,"td",57),t.YNc(61,xs,4,7,"td",43),t.ALo(62,"HideSumZero"),t.YNc(63,fs,3,2,"td",43),t.ALo(64,"HideSumZero"),t.ALo(65,"HideSumZero"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(8),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(7),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(18,28,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsExpense&&t.xi3(24,31,e.data.Data,"Expense")),t.xp6(2),t.Q6J("ngIf",e.pageData.IsExpense),t.xp6(1),t.Q6J("ngIf",t.xi3(27,34,e.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(29,37,e.data.Data,"AchievementWithTax")||t.xi3(30,40,e.data.Data,"Achievement")),t.xp6(4),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(2),t.Oqu(t.xi3(42,43,t.xi3(43,46,e.data.Data,"Quantity"),"1.0-0")),t.xp6(4),t.Oqu(t.xi3(46,49,t.xi3(47,52,e.data.Data,"Gross"),"1.0-0")),t.xp6(4),t.hij(" ",t.xi3(50,55,t.xi3(51,58,e.data.Data,"SalesNet"),"1.0-0")," "),t.xp6(3),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(53,61,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsExpense&&t.xi3(59,64,e.data.Data,"Expense")),t.xp6(2),t.Q6J("ngIf",e.pageData.IsExpense),t.xp6(1),t.Q6J("ngIf",t.xi3(62,67,e.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(64,70,e.data.Data,"AchievementWithTax")||t.xi3(65,73,e.data.Data,"Achievement"))}}const qs=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},vs=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]},Ms=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]},Os=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Graphic"]};let Js=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/OutletPerformanceDetail","ReportLoader/OutletPerformance"),this.httpService=e,this.csvConverter=o,this.isCompareData=!1,this.hideMore=!0,this.DateFilterType=!1,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}];const n=new Date;this.Year=n.getFullYear(),this.Month=n.getMonth()}YearMonthToDateRange(){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth()),this.pageData.Filter.From=new Date(this.Year,this.Month,1).toDateString(),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0).toDateString()}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Count":return this.compare(n.Count,r.Count,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Gross":return this.compare(n.Gross,r.Gross,l);case"SalesNet":case"SalesTaxNet":return this.compare(n.SalesNet,r.SalesNet,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"SalesWithTax":return this.compare(n.SalesWithTax,r.SalesWithTax,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(n.ProfitWithTax,r.ProfitWithTax,l);case"Expense":return this.compare(n.Expense,r.Expense,l);case"NetProfit":return this.compare(n.NetProfit,r.NetProfit,l);case"Target":case"SalesTarget":return this.compare(n.SalesTarget,r.SalesTarget,l);case"Achievement":return this.compare(n.Achievement,r.Achievement,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-detail-outlet-performance"]],features:[t.qOj],decls:26,vars:14,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],["title","Chart View",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Compare",3,"model","modelChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],["id","more-filter","container",""],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"freeze","header"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Count","class","align-right",4,"ngIf"],["mat-sort-header","Quantity",1,"align-right"],["mat-sort-header","Gross",1,"align-right"],["mat-sort-header","SalesNet",1,"align-right"],["class","align-right",3,"mat-sort-header",4,"ngIf"],["class","text-right",4,"ngIf"],["mat-sort-header","Cost","class","align-right",4,"ngIf"],["mat-sort-header","Expense","class","align-right",4,"ngIf"],["mat-sort-header","NetProfit","class","align-right",4,"ngIf"],["mat-sort-header","Target","class","align-right",4,"ngIf"],["mat-sort-header","Achievement","class","align-right","title","Achievement",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"freeze","body"],["class","empty-column",4,"ngIf"],[1,"text-right"],["class","text-right text-primary",4,"ngIf"],[3,"ngClass",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[2,"width","35px"],["mat-sort-header","Count",1,"align-right"],[1,"align-right",3,"mat-sort-header"],["mat-sort-header","Cost",1,"align-right"],["mat-sort-header","Expense",1,"align-right"],["mat-sort-header","NetProfit",1,"align-right"],["mat-sort-header","Target",1,"align-right"],["mat-sort-header","Achievement","title","Achievement",1,"align-right"],["style","width: 35px; text-align: center",4,"ngIf"],["style","width: 35px; text-align: center",3,"ngClass",4,"ngIf"],[2,"width","35px","text-align","center"],[2,"width","35px","text-align","center",3,"ngClass"],[3,"routerLink","queryParams"],[3,"ngClass"],[4,"ngIf","ngIfElse"],["INCREASE",""],[1,"text-right","text-danger"],[1,"text-right","text-success"],[1,"empty-column"],[1,"text-right","text-primary"],[1,"font-weight-bold"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Tl,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"View Summary"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"By Entity Group"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13," By Month"),t.qZA(),t.qZA(),t.TgZ(14,"li",6),t.TgZ(15,"a",8),t._uU(16," Chart View"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(17,"filters"),t.TgZ(18,"div",9),t.YNc(19,ql,17,9,"div",10),t.YNc(20,yl,9,2,"div",11),t.qZA(),t.TgZ(21,"a",12),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(22,"More "),t._UZ(23,"i",13),t.qZA(),t.qZA(),t.TgZ(24,"content"),t.YNc(25,As,66,76,"div",14),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(10,qs)),t.xp6(5),t.Q6J("routerLink",t.DdM(11,vs)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,Ms)),t.xp6(3),t.Q6J("routerLink",t.DdM(13,Os)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,D.P,f.QB,m.YE,m.nU,s.sg,s.mk],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:[""]}),a})();function Is(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/OutletGroupPerformance","Sales Transaction ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function Us(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",17),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",18),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function ws(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",19),t.TgZ(4,"div",20),t.TgZ(5,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Year=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",22),t.TgZ(7,"ng-select",23),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Month=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function Fs(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Compare with prev Month"),t.qZA(),t.TgZ(3,"radio-options",24),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).isCompareData=n})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare()}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.isCompareData)}}function Ns(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Date Filter Type"),t.qZA(),t.TgZ(4,"radio-options",14),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().DateFilterType=n}),t.qZA(),t.qZA(),t.YNc(5,Us,5,2,"div",15),t.YNc(6,ws,8,4,"div",15),t.TgZ(7,"div"),t.TgZ(8,"h6"),t._uU(9,"Type"),t.qZA(),t.TgZ(10,"ng-select",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.YNc(11,Fs,4,1,"div",15),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("model",e.DateFilterType)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(1),t.Q6J("ngIf",e.DateFilterType)}}function Ps(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1,"Prev"),t.qZA())}function Ls(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1,"Now"),t.qZA())}function Qs(a,i){1&a&&(t.TgZ(0,"th",49),t._uU(1," \xb1 (%) "),t.qZA())}function Ys(a,i){1&a&&(t.TgZ(0,"th",50),t._uU(1," Cost "),t.qZA())}function Rs(a,i){if(1&a&&(t.TgZ(0,"th",34),t._uU(1,"Profit "),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"ProfitWithTax":"Profit")}}function Es(a,i){if(1&a&&(t.TgZ(0,"td",48),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.PrevIndex," ")}}const ks=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function Hs(a,i){if(1&a&&(t.TgZ(0,"td",53),t._uU(1),t.qZA()),2&a){const e=t.oxw(),o=e.$implicit,n=e.index;t.Q6J("ngClass",t.WLB(2,ks,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}const z=function(a,i){return{"text-danger":a,"text-success":i,"text-right":!0}};function Vs(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(5,z,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0")," ")}}function Bs(a,i){if(1&a&&(t.TgZ(0,"td",55),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Cost,".0-0")," ")}}function Gs(a,i){if(1&a&&(t.TgZ(0,"td",56),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,o.pageData.IgnoreTax?e.ProfitWithTax:e.Profit,".0-0")," ")}}function js(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,Es,2,1,"td",28),t.YNc(2,Hs,2,5,"td",51),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",52),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",43),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",43),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",43),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"td",43),t._uU(18),t.ALo(19,"number"),t.qZA(),t.TgZ(20,"td",44),t._uU(21),t.ALo(22,"number"),t.qZA(),t.YNc(23,Vs,3,8,"td",45),t.YNc(24,Bs,3,4,"td",46),t.YNc(25,Gs,3,4,"td",47),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.isCompareData),t.xp6(1),t.Q6J("ngIf",o.isCompareData),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.xi3(7,12,e.Count,".0-0")),t.xp6(3),t.Oqu(t.xi3(10,15,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(13,18,e.Gross,".0-0")),t.xp6(3),t.Oqu(t.xi3(16,21,e.SalesNet,".0-0")),t.xp6(3),t.Oqu(t.xi3(19,24,e.Tax,".0-0")),t.xp6(3),t.Oqu(t.xi3(22,27,e.SalesWithTax,".0-0")),t.xp6(2),t.Q6J("ngIf",o.isCompareData),t.xp6(1),t.Q6J("ngIf",o.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",o.pageData.IsCostVisible)}}function Ws(a,i){1&a&&t._UZ(0,"td",42)}function $s(a,i){1&a&&t._UZ(0,"td",42)}function Ks(a,i){if(1&a&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(5,z,e.comparation,e.comparation)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.comparation,".0-0")," ")}}function Xs(a,i){if(1&a&&(t.TgZ(0,"td",55),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data,"Cost"),".0-0")," ")}}function zs(a,i){if(1&a&&(t.TgZ(0,"td",56),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data,"ProfitWithTax"),".0-0")," ")}}function tp(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",25),t.TgZ(1,"table",26),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",27),t.TgZ(3,"tr"),t.YNc(4,Ps,2,0,"th",28),t.YNc(5,Ls,2,0,"th",28),t.TgZ(6,"th",29),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"th",30),t._uU(9,"Trans"),t.qZA(),t.TgZ(10,"th",31),t._uU(11,"Quantity"),t.qZA(),t.TgZ(12,"th",32),t._uU(13,"Gross"),t.qZA(),t.TgZ(14,"th",33),t._uU(15,"Sales"),t.qZA(),t.TgZ(16,"th",34),t._uU(17,"Tax"),t.qZA(),t.TgZ(18,"th",35),t._uU(19,"Sales + Tax"),t.qZA(),t.YNc(20,Qs,2,0,"th",36),t.YNc(21,Ys,2,0,"th",37),t.YNc(22,Rs,2,1,"th",38),t.qZA(),t.qZA(),t.TgZ(23,"tbody"),t.YNc(24,js,26,30,"tr",39),t.qZA(),t.TgZ(25,"tfoot"),t.TgZ(26,"tr",40),t.YNc(27,Ws,1,0,"td",41),t.YNc(28,$s,1,0,"td",41),t._UZ(29,"td",42),t.TgZ(30,"td",43),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA(),t.TgZ(34,"td",43),t._uU(35),t.ALo(36,"number"),t.ALo(37,"sum"),t.qZA(),t.TgZ(38,"td",43),t._uU(39),t.ALo(40,"number"),t.ALo(41,"sum"),t.qZA(),t.TgZ(42,"td",43),t._uU(43),t.ALo(44,"number"),t.ALo(45,"sum"),t.qZA(),t.TgZ(46,"td",43),t._uU(47),t.ALo(48,"number"),t.ALo(49,"sum"),t.qZA(),t.TgZ(50,"td",44),t.TgZ(51,"a"),t._uU(52),t.ALo(53,"number"),t.ALo(54,"sum"),t.qZA(),t.qZA(),t.YNc(55,Ks,3,8,"td",45),t.YNc(56,Xs,4,7,"td",46),t.YNc(57,zs,4,7,"td",47),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(11),t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesTaxNet"),t.xp6(2),t.s9C("altpropcond",e.pageData.IgnoreTax),t.xp6(2),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(2),t.Q6J("ngForOf",e.data),t.xp6(3),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(3),t.Oqu(t.xi3(32,19,t.xi3(33,22,e.data,"Count"),".0-0")),t.xp6(4),t.Oqu(t.xi3(36,25,t.xi3(37,28,e.data,"Quantity"),".0-0")),t.xp6(4),t.Oqu(t.xi3(40,31,t.xi3(41,34,e.data,"Gross"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(44,37,t.xi3(45,40,e.data,"SalesNet"),".0-0")," "),t.xp6(4),t.hij(" ",t.xi3(48,43,t.xi3(49,46,e.data,"Tax"),".0-0")," "),t.xp6(5),t.Oqu(t.xi3(53,49,t.xi3(54,52,e.data,"SalesWithTax"),".0-0")),t.xp6(3),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible)}}const ap=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},op=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]};let rp=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/OutletGroupPerformance","ReportLoader/OutletPerformance"),this.httpService=e,this.csvConverter=o,this.isCompareData=!1,this.DateFilterType=!0,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.first=!0,this.RadioDateFilterType=[{Key:!0,Value:"Predefined"},{Key:!1,Value:"Range"}];const n=new Date;this.Year=n.getFullYear(),this.Month=n.getMonth()}preGetList(){this.first&&(this.YearMonthToDateRange(),this.first=!1)}YearMonthToDateRange(){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth()),this.pageData.Filter.From=new Date(this.Year,this.Month,1),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0)}sortData(e){const o=this.data.slice();e.active&&""!==e.direction?this.data=o.sort((n,r)=>{const l="asc"===e.direction;switch(n.Name=n.Name?n.Name:"",r.Name=r.Name?r.Name:"",e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Count":return this.compare(n.Count,r.Count,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Gross":return this.compare(n.Gross,r.Gross,l);case"SalesNet":return this.compare(n.SalesNet,r.SalesNet,l);case"SalesWithTax":return this.compare(n.SalesWithTax,r.SalesWithTax,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"SalesTaxNet":return this.compare(n.SalesTaxNet,r.SalesTaxNet,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(n.ProfitWithTax,r.ProfitWithTax,l);default:return 0}}):this.data.Data=o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-outlet-group-performance"]],features:[t.qOj],decls:16,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],["name","Compare",3,"model","modelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Name"],["mat-sort-header","Count",1,"align-right",2,"width","70px"],["mat-sort-header","Quantity",1,"align-right",2,"width","70px"],["mat-sort-header","Gross",1,"align-right",2,"width","120px"],["mat-sort-header","SalesNet",1,"align-right",2,"width","120px"],[1,"align-right",2,"width","120px",3,"mat-sort-header"],["mat-sort-header","SalesWithTax","altprop","SalesNet",1,"align-right",2,"width","120px",3,"altpropcond"],["style","width: 50px;",4,"ngIf"],["mat-sort-header","Cost","style","width: 120px;","class","align-right",4,"ngIf"],["style","width: 120px;","class","align-right",3,"mat-sort-header",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","empty-column",4,"ngIf"],[1,"empty-column"],[1,"text-right"],[1,"text-right","text-primary"],[3,"ngClass",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[2,"width","35px"],[2,"width","50px"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["style","width: 35px;",3,"ngClass",4,"ngIf"],[1,"text-right",2,"width","70px"],[2,"width","35px",3,"ngClass"],[3,"ngClass"],[1,"text-right","text-danger"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Is,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"By Entity "),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"Top By Month"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",8),t.YNc(13,Ns,12,7,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,tp,58,55,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(7,ap)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,op)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,D.P,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ,T.qU],styles:[""]}),a})();function ip(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!0,"Monthly Outlet PErformance ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function lp(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Sales Name"),t.qZA(),t.TgZ(4,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Year"),t.qZA(),t.TgZ(8,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Type"),t.qZA(),t.TgZ(12,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types)}}const sp=function(a){return{"align-right":a}};function pp(a,i){if(1&a&&(t.TgZ(0,"th",22),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.Q6J("mat-sort-header",e)("ngClass",t.VKq(3,sp,"Outlet"!=e)),t.xp6(1),t.Oqu(e)}}function cp(a,i){if(1&a&&(t.TgZ(0,"div",25),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function _p(a,i){if(1&a&&(t.TgZ(0,"div",26),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,o[e])," ")}}function up(a,i){if(1&a&&(t.TgZ(0,"td"),t.YNc(1,cp,2,1,"div",23),t.YNc(2,_p,3,3,"div",24),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Q6J("ngIf","Outlet"==e),t.xp6(1),t.Q6J("ngIf","Outlet"!=e)}}function gp(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,up,3,2,"td",20),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKeys(e))}}function dp(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e))}}function mp(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",27),t.TgZ(2,"td",28),t._uU(3,"Total : "),t.qZA(),t.YNc(4,dp,3,3,"td",29),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.DataFooter)}}function Zp(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",18),t.TgZ(3,"tr"),t.YNc(4,pp,2,5,"th",19),t.qZA(),t.qZA(),t.TgZ(5,"tbody"),t.YNc(6,gp,2,1,"tr",20),t.qZA(),t.YNc(7,mp,5,1,"tfoot",21),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngForOf",e.data.Dataheader),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}const xp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},Cp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]};let fp=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/MonthlyOutletPerformance","ReportLoader/MonthlyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0)}getKeys(e){return Object.keys(e)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;for(let Z=0;Z<this.data.Dataheader.length;Z++)if(e.active==this.data.Dataheader[Z])return this.compare(n[this.data.Dataheader[Z]],r[this.data.Dataheader[Z]],l)}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-outlet-monthly-performance"]],features:[t.qOj],decls:16,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"table-light","sticky-top-thead"],[3,"mat-sort-header","ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"mat-sort-header","ngClass"],["style","color: black",4,"ngIf"],["style","color: black;text-align:right",4,"ngIf"],[2,"color","black"],[2,"color","black","text-align","right"],[1,"table-footer"],[1,""],["class","text-right",4,"ngFor","ngForOf"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ip,3,0,"a",1),t.TgZ(3,"div",2),t.TgZ(4,"a",3),t._uU(5,"By Entity "),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10,"By Entity Group"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",8),t.YNc(13,lp,13,6,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,Zp,8,3,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(7,xp)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,Cp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,m.YE,s.sg,m.nU,s.mk],pipes:[s.JJ],styles:[""]}),a})();function Ap(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/SalesPerson","Sales_Performance.csv")}),t._UZ(1,"i",8),t._uU(2,"Export"),t.qZA()}}function Dp(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",9),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Sales Group"),t.qZA(),t.TgZ(8,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesGroupID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",12),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",13),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Delivery"),t.qZA(),t.TgZ(17,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.DeliveryID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Sales Type"),t.qZA(),t.TgZ(21,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.List?null:e.pageData.List.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SalesGroupID)("items",null==e.pageData.List?null:e.pageData.List.SalesGroup),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.DeliveryID)("items",null==e.pageData.List?null:e.pageData.List.Deliveries),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.List?null:e.pageData.List.Types)}}function qp(a,i){1&a&&(t.TgZ(0,"th",39),t._uU(1,"Sales Group"),t.qZA())}function yp(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1," Cost "),t.qZA())}function vp(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Profit "),t.qZA())}function Sp(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1,"Target "),t.qZA())}function Mp(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1,"Ach(%) "),t.qZA())}function bp(a,i){if(1&a&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Group)}}function Op(a,i){if(1&a&&(t.TgZ(0,"td",46),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function Jp(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.Profit)," ")}}function Ip(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Target)," ")}}function Up(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Achievement),"")}}const wp=function(){return["/menu/Contacts/Contact/Sales_Person/Info"]},Fp=function(a){return{ID:a}},Np=function(){return["/menu/Reports/Sales_Report/Standard/Detail"]},Pp=function(a,i,e){return{SalesPersonID:a,From:i,To:e}};function Lp(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td",44),t.TgZ(2,"a",45),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,bp,2,1,"td",33),t.TgZ(5,"td",35),t.TgZ(6,"a",45),t.ALo(7,"date"),t.ALo(8,"date"),t._uU(9),t.ALo(10,"number"),t.qZA(),t.qZA(),t.TgZ(11,"td",36),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",36),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"td",36),t._uU(18),t.ALo(19,"number"),t.qZA(),t.TgZ(20,"td",35),t._uU(21),t.ALo(22,"number"),t.qZA(),t.YNc(23,Op,3,3,"td",37),t.YNc(24,Jp,3,3,"td",38),t.YNc(25,Ip,3,3,"td",38),t.YNc(26,Up,3,3,"td",38),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(36,wp))("queryParams",t.VKq(37,Fp,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",o.data.Show),t.xp6(2),t.Q6J("routerLink",t.DdM(39,Np))("queryParams",t.kEZ(40,Pp,e.ID,t.xi3(7,15,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(8,18,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.Oqu(t.xi3(10,21,e.Orders,".0-0")),t.xp6(3),t.Oqu(t.xi3(13,24,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(16,27,e.Sales,".0-0")),t.xp6(3),t.Oqu(t.xi3(19,30,e.Tax,".0-0")),t.xp6(3),t.Oqu(t.xi3(22,33,e.SalesNTax,".0-0")),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleProfit),t.xp6(1),t.Q6J("ngIf",o.data.ShowSalesTarget),t.xp6(1),t.Q6J("ngIf",o.data.ShowSalesTarget)}}function Qp(a,i){1&a&&t._UZ(0,"td")}function Yp(a,i){if(1&a&&(t.TgZ(0,"td",46),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Cost")),"")}}function Rp(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Profit")),"")}}function Ep(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Target")),"")}}function kp(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.ALo(4,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Sales")/t.xi3(4,6,e.data.List,"Target")*100)," ")}}function Hp(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",18),t.TgZ(3,"tr",19),t.TgZ(4,"th",20),t._uU(5,"Sales Person"),t.qZA(),t.YNc(6,qp,2,0,"th",21),t.TgZ(7,"th",22),t._uU(8,"Orders"),t.qZA(),t.TgZ(9,"th",23),t._uU(10,"Quantity"),t.qZA(),t.TgZ(11,"th",24),t._uU(12,"Sales"),t.qZA(),t.TgZ(13,"th",25),t._uU(14,"Tax"),t.qZA(),t.TgZ(15,"th",26),t._uU(16," Sales + Tax "),t.qZA(),t.YNc(17,yp,2,0,"th",27),t.YNc(18,vp,2,0,"th",28),t.YNc(19,Sp,2,0,"th",29),t.YNc(20,Mp,2,0,"th",30),t.qZA(),t.qZA(),t.TgZ(21,"tbody"),t.YNc(22,Lp,27,44,"tr",31),t.qZA(),t.TgZ(23,"tfoot"),t.TgZ(24,"tr",32),t.YNc(25,Qp,1,0,"td",33),t.TgZ(26,"td",34),t._uU(27,"Total:"),t.qZA(),t.TgZ(28,"td",35),t._uU(29),t.ALo(30,"number"),t.ALo(31,"sum"),t.qZA(),t.TgZ(32,"td",36),t._uU(33),t.ALo(34,"number"),t.ALo(35,"sum"),t.qZA(),t.TgZ(36,"td",36),t._uU(37),t.ALo(38,"number"),t.ALo(39,"sum"),t.qZA(),t.TgZ(40,"td",36),t._uU(41),t.ALo(42,"number"),t.ALo(43,"sum"),t.qZA(),t.TgZ(44,"td",35),t._uU(45),t.ALo(46,"number"),t.ALo(47,"sum"),t.qZA(),t.YNc(48,Yp,4,6,"td",37),t.YNc(49,Rp,4,6,"td",38),t.YNc(50,Ep,4,6,"td",38),t.YNc(51,kp,5,9,"td",38),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(6),t.Q6J("ngIf",e.data.Show),t.xp6(11),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleProfit),t.xp6(1),t.Q6J("ngIf",e.data.ShowSalesTarget),t.xp6(1),t.Q6J("ngIf",e.data.ShowSalesTarget),t.xp6(2),t.Q6J("ngForOf",e.data.List),t.xp6(3),t.Q6J("ngIf",e.data.Show),t.xp6(4),t.Oqu(t.xi3(30,16,t.xi3(31,19,e.data.List,"Orders"),".0-0")),t.xp6(4),t.Oqu(t.xi3(34,22,t.xi3(35,25,e.data.List,"Quantity"),".0-0")),t.xp6(4),t.Oqu(t.xi3(38,28,t.xi3(39,31,e.data.List,"Sales"),".0-0")),t.xp6(4),t.Oqu(t.xi3(42,34,t.xi3(43,37,e.data.List,"Tax"),".0-0")),t.xp6(4),t.hij("",t.xi3(46,40,t.xi3(47,43,e.data.List,"SalesNTax"),".0-0")," "),t.xp6(3),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleProfit),t.xp6(1),t.Q6J("ngIf",e.data.ShowSalesTarget),t.xp6(1),t.Q6J("ngIf",e.data.ShowSalesTarget)}}const Bp=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report"]},jp=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Sales_Commission"]};let Wp=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/SalesPerson","ReportLoader/SalesPerson"),this.httpService=e,this.csvConverter=o}postInit(){this.menuData.H=this.data.PageTitle}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(n.Name=null==n.Name?"":n.Name,r.Name=null==r.Name?"":r.Name,n.Group=null==n.Group?"":n.Group,r.Group=null==r.Group?"":r.Group,e.active){case"Name":return this.compare(n.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Group":return this.compare(n.Group.toLocaleLowerCase(),r.Group.toLocaleLowerCase(),l);case"Orders":return this.compare(n.Orders,r.Orders,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"SalesNTax":return this.compare(n.SalesNTax,r.SalesNTax,l);case"Target":return this.compare(n.Target,r.Target,l);case"Achievement":return this.compare(n.Achievement,r.Achievement,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-sales-person"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["role","button","title","Target",1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["role","button","title","Target",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales Group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","Name"],["mat-sort-header","Group",4,"ngIf"],["mat-sort-header","Orders",1,"align-right",2,"width","80px"],["mat-sort-header","Quantity",1,"align-right",2,"width","100px"],["mat-sort-header","Sales",1,"align-right",2,"width","120px"],["mat-sort-header","Tax",1,"align-right",2,"width","90px"],["mat-sort-header","SalesNTax",1,"align-right",2,"width","120px"],["mat-sort-header","Cost","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","Profit","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","Target","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","Achievement","style","width: 120px;","class","align-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[4,"ngIf"],[1,"empty-column","text-right"],[1,"text-right","text-primary"],[1,"text-right"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],["mat-sort-header","Group"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["mat-sort-header","Profit",1,"align-right",2,"width","120px"],["mat-sort-header","Target",1,"align-right",2,"width","120px"],["mat-sort-header","Achievement",1,"align-right",2,"width","120px"],[1,"text-primary"],[3,"routerLink","queryParams"],[1,"text-right","text-danger"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ap,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4,"By Product"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"By Item"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Dp,22,11,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Hp,52,46,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(1),t.Q6J("routerLink",t.DdM(7,Bp)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,jp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function $p(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/GetSalesPersonCommissionGroupBySales","Sales_Commission.csv")}),t._UZ(1,"i",8),t._uU(2,"Export"),t.qZA()}}function Kp(a,i){if(1&a&&(t.TgZ(0,"span",16),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Xp(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",9),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Kp,2,2,"ng-template",12),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Sales Group"),t.qZA(),t.TgZ(13,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesGroupID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"From/To"),t.qZA(),t.TgZ(17,"datepicker",14),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(18,"datepicker",15),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.List?null:e.pageData.List.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.List?null:e.pageData.List.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.SalesGroupID)("items",null==e.pageData.List?null:e.pageData.List.SalesGroup),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function zp(a,i){1&a&&(t.TgZ(0,"th",31),t._uU(1,"Sales Target"),t.qZA())}function tc(a,i){if(1&a&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.SalesTarget,".0-0"),"")}}const ec=function(a,i,e){return{ID:a,from:i,to:e}},tt="/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report",ac=function(a){return[tt,a]};function nc(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",29),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",29),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",29),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",29),t.TgZ(13,"a",32),t.ALo(14,"date"),t.ALo(15,"date"),t._uU(16),t.ALo(17,"number"),t.qZA(),t.qZA(),t.YNc(18,tc,3,4,"td",33),t.ALo(19,"sum"),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.SalesPersonName),t.xp6(2),t.Oqu(t.xi3(5,7,e.TotalOrders,".0-0")),t.xp6(3),t.Oqu(t.xi3(8,10,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(11,13,e.GrossRevenue,".0-0")),t.xp6(3),t.Q6J("routerLink",t.VKq(31,ac,t.kEZ(27,ec,e.SalesPersonID,t.xi3(14,16,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(15,19,o.pageData.Filter.To,"ddMMyyyy")))),t.xp6(3),t.hij(" ",t.lcZ(17,22,e.TotalCommission)," "),t.xp6(2),t.Q6J("ngIf",t.xi3(19,24,o.data.List,"SalesTarget")>0)}}function oc(a,i){1&a&&t._UZ(0,"td",34)}function rc(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",17),t.TgZ(1,"table",18),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",19),t.TgZ(3,"tr"),t.TgZ(4,"th",20),t._uU(5,"Sales Person"),t.qZA(),t.TgZ(6,"th",21),t._uU(7,"Orders"),t.qZA(),t.TgZ(8,"th",22),t._uU(9,"Items Quantity"),t.qZA(),t.TgZ(10,"th",23),t._uU(11,"Gross Revenue"),t.qZA(),t.TgZ(12,"th",24),t._uU(13,"Product Commission"),t.qZA(),t.YNc(14,zp,2,0,"th",25),t.ALo(15,"sum"),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,nc,20,33,"tr",26),t.qZA(),t.TgZ(18,"tfoot"),t.TgZ(19,"tr",27),t.TgZ(20,"td",28),t._uU(21,"Total:"),t.qZA(),t.TgZ(22,"td",29),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",29),t._uU(27),t.ALo(28,"number"),t.ALo(29,"sum"),t.qZA(),t.TgZ(30,"td",29),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA(),t.TgZ(34,"td",29),t._uU(35),t.ALo(36,"number"),t.ALo(37,"sum"),t.qZA(),t.YNc(38,oc,1,0,"td",30),t.ALo(39,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",t.xi3(15,7,e.data.List,"SalesTarget")>0),t.xp6(3),t.Q6J("ngForOf",e.data.List),t.xp6(6),t.Oqu(t.lcZ(24,10,t.xi3(25,12,e.data.List,"TotalOrders"))),t.xp6(4),t.Oqu(t.lcZ(28,15,t.xi3(29,17,e.data.List,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(32,20,t.xi3(33,22,e.data.List,"GrossRevenue"))),t.xp6(4),t.Oqu(t.lcZ(36,25,t.xi3(37,27,e.data.List,"TotalCommission"))),t.xp6(3),t.Q6J("ngIf",t.xi3(39,30,e.data.List,"SalesTarget")>0)}}const ic=function(){return[tt]},lc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person"]};let sc=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetSalesPersonCommissionGroupBySales","ReportLoader/SalesPerson"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"TotalOrders":return this.compare(n.TotalOrders,r.TotalOrders,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"GrossRevenue":return this.compare(n.GrossRevenue,r.GrossRevenue,l);case"TotalCommission":return this.compare(n.TotalCommission,r.TotalCommission,l);case"SalesTarget":return this.compare(n.SalesTarget,r.SalesTarget,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-sales-commision"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["role","button","title","Target",1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["role","button","title","Target",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name","text","Sales Person"],["mat-sort-header","TotalOrders",1,"align-right",2,"width","110px"],["mat-sort-header","Quantity",1,"align-right",2,"width","110px"],["mat-sort-header","GrossRevenue",1,"align-right",2,"width","150px"],["mat-sort-header","TotalCommission",1,"align-right",2,"width","150px"],["mat-sort-header","SalesTarget","style","width: 150px;","class","align-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column","text-right"],[1,"text-right"],["class","empty-column",4,"ngIf"],["mat-sort-header","SalesTarget",1,"align-right",2,"width","150px"],[3,"routerLink"],["class","text-right",4,"ngIf"],[1,"empty-column"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,$p,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4,"By Product"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"By Order"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Xp,19,9,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,rc,40,33,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(1),t.Q6J("routerLink",t.DdM(7,ic)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,lc)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,f.QB,m.YE,m.nU,s.sg],pipes:[T.qU,s.JJ,s.uU],styles:[""]}),a})();function pc(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",11),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Sales"),t.qZA(),t.TgZ(8,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",14),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",15),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.ID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}const cc=function(){return["/menu/Products/Catalog/Variants/Info"]},et=function(a){return{ID:a}};function _c(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td",36),t.TgZ(2,"a",37),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td",38),t._uU(5),t.qZA(),t.TgZ(6,"td",39),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",40),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",40),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",41),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"td",42),t._uU(19),t.ALo(20,"number"),t.qZA(),t.TgZ(21,"td",42),t._uU(22),t.ALo(23,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(22,cc))("queryParams",t.VKq(23,et,e.VariantID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.hij(" ",t.lcZ(8,10,e.Quantity),""),t.xp6(3),t.hij(" ",t.lcZ(11,12,e.VariantCommission),""),t.xp6(3),t.hij(" ",t.lcZ(14,14,e.GroupCommission),""),t.xp6(3),t.hij(" ",t.lcZ(17,16,e.TotalCommission),""),t.xp6(3),t.hij(" ",t.lcZ(20,18,e.UnitPrice*e.Quantity),""),t.xp6(3),t.hij(" ",t.lcZ(23,20,e.NettSales)," ")}}const uc=function(){return["/menu/Contacts/Contact/Sales_Person/Info"]};function gc(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"div",28),t.TgZ(2,"a",29),t.TgZ(3,"span"),t._uU(4),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"strong"),t._uU(7),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",30),t.TgZ(9,"div"),t.TgZ(10,"table",31),t._UZ(11,"thead"),t.TgZ(12,"tbody"),t.YNc(13,_c,24,25,"tr",27),t.qZA(),t.TgZ(14,"tfoot"),t.TgZ(15,"tr",32),t.TgZ(16,"td",33),t._uU(17,"Total:"),t.qZA(),t.TgZ(18,"td",34),t._uU(19),t.ALo(20,"number"),t.ALo(21,"sum"),t.ALo(22,"GetChildrenArray"),t.qZA(),t._UZ(23,"td",35),t.TgZ(24,"td",34),t._uU(25),t.ALo(26,"number"),t.ALo(27,"sum"),t.ALo(28,"GetChildrenArray"),t.qZA(),t.TgZ(29,"td",34),t._uU(30),t.ALo(31,"number"),t.ALo(32,"sum"),t.ALo(33,"GetChildrenArray"),t.qZA(),t.TgZ(34,"td",34),t._uU(35),t.ALo(36,"number"),t.ALo(37,"sum"),t.ALo(38,"GetChildrenArray"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(41,uc))("queryParams",t.VKq(42,et,e.ID)),t.xp6(2),t.Oqu(e.Name),t.xp6(3),t.Oqu(e.GroupName),t.xp6(6),t.Q6J("ngForOf",e.Item),t.xp6(6),t.hij(" ",t.lcZ(20,9,t.xi3(21,11,o.filterData(t.xi3(22,14,o.data.Data,"Item"),"SalesID",e.ID),"Quantity"))," "),t.xp6(6),t.hij(" ",t.lcZ(26,17,t.xi3(27,19,o.filterData(t.xi3(28,22,o.data.Data,"Item"),"SalesID",e.ID),"TotalCommission"))," "),t.xp6(5),t.hij(" ",t.lcZ(31,25,t.xi3(32,27,o.filterData(t.xi3(33,30,o.data.Data,"Item"),"SalesID",e.ID),"Revenue"))," "),t.xp6(5),t.hij(" ",t.lcZ(36,33,t.xi3(37,35,o.filterData(t.xi3(38,38,o.data.Data,"Item"),"SalesID",e.ID),"NettSales"))," ")}}function dc(a,i){if(1&a&&(t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.TgZ(2,"thead",18),t.TgZ(3,"tr",19),t._UZ(4,"th",20),t.TgZ(5,"th",21),t._uU(6,"Product Commission"),t.qZA(),t._UZ(7,"th",20),t.qZA(),t.TgZ(8,"tr"),t.TgZ(9,"th"),t._uU(10,"Name"),t.qZA(),t.TgZ(11,"th",22),t._uU(12,"Code"),t.qZA(),t.TgZ(13,"th",23),t._uU(14,"Quantity"),t.qZA(),t.TgZ(15,"th",24),t._uU(16,"Standard"),t.qZA(),t.TgZ(17,"th",24),t._uU(18,"Group"),t.qZA(),t.TgZ(19,"th",25),t._uU(20,"Qty * Product Comm."),t.qZA(),t.TgZ(21,"th",26),t._uU(22,"Gross Revenue"),t.qZA(),t.TgZ(23,"th",26),t._uU(24,"Nett Sales"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(25,gc,39,44,"div",27),t.qZA()),2&a){const e=t.oxw();t.xp6(25),t.Q6J("ngForOf",e.data.Data)}}const Zc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Sales_Commission"]},xc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report/Commission_Report_Detail"]},Tc=function(a,i){return{From:a,To:i}};let Cc=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/GetSalesPersonCommissionGroupByProduct","ReportLoader/SalesCommissionLoader",null,n),this.httpService=e,this.csvConverter=o,this.activatedRoute=n}print(){window.print()}filterData(e,o,n){return e.filter(function(r){return r[o]==n})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-commision-report"]],features:[t.qOj],decls:20,vars:18,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn-group","mr-6"],[1,"pointer","btn","btn-outline-secondary",3,"click"],[1,"fa","fa-print"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["role","button","title","Sales Person Commission Summary",1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["role","button","title","Sales Person Statistics",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales Person",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"columnSpan"],["colspan","3",1,"empty-column"],["colspan","2",1,"text-center"],[2,"width","140px"],[1,"text-right",2,"width","100px"],[1,"text-right",2,"width","120px"],[1,"text-right",2,"width","150px"],[1,"text-right",2,"width","130px"],[4,"ngFor","ngForOf"],[1,"mt-11","ml-3"],[1,"h5","font-weight-bold","text-primary",3,"routerLink","queryParams"],[1,"items"],[1,"table-sm","border","w-100"],[1,"table-footer"],["colspan","2",1,"text-right","empty-column"],[1,"text-right","text-success"],["colspan","2",1,"text-right","text-success","empty-column"],[1,"border"],[3,"routerLink","queryParams"],[1,"border",2,"width","140px"],[1,"text-right","text-success","border",2,"width","100px"],[1,"text-right","text-success","border",2,"width","120px"],[1,"text-right","text-success","border",2,"width","150px"],[1,"text-right","text-success","border",2,"width","130px"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t.NdJ("click",function(){return o.print()}),t._UZ(4,"i",3),t._uU(5," Print"),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/SalesPersonGroupByProduct","Sales_Commission_byProduct.csv")}),t._UZ(7,"i",5),t._uU(8,"Export"),t.qZA(),t.qZA(),t.TgZ(9,"a",6),t._uU(10,"Return to Summary"),t.qZA(),t.TgZ(11,"a",7),t.ALo(12,"date"),t.ALo(13,"date"),t._uU(14,"View Detail"),t.qZA(),t.qZA(),t.TgZ(15,"filters"),t.TgZ(16,"div",8),t.YNc(17,pc,14,7,"div",9),t.qZA(),t.qZA(),t.TgZ(18,"content"),t.YNc(19,dc,26,1,"div",10),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(9),t.Q6J("routerLink",t.DdM(13,Zc)),t.xp6(2),t.Q6J("routerLink",t.DdM(14,xc))("queryParams",t.WLB(15,Tc,t.xi3(12,7,null==o.pageData.Filter?null:o.pageData.Filter.From,"ddMMyyyy"),t.xi3(13,10,null==o.pageData.Filter?null:o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(6),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.uU,s.JJ,T.qU,T.J1],styles:[""]}),a})();function fc(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Sales"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.ID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Ac(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td"),t.TgZ(5,"a",22),t._uU(6),t.qZA(),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td",21),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",21),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"td",21),t._uU(18),t.ALo(19,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(t.xi3(3,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.SalesName),t.xp6(2),t.Oqu(t.lcZ(13,11,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(16,13,e.Commission)),t.xp6(3),t.Oqu(t.lcZ(19,15,e.TotalCommission))}}function Dc(a,i){if(1&a&&(t.TgZ(0,"div",11),t.TgZ(1,"table",12),t.TgZ(2,"thead",13),t.TgZ(3,"tr",14),t.TgZ(4,"th",15),t._uU(5,"Date"),t.qZA(),t.TgZ(6,"th",15),t._uU(7,"Number"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Sales Person"),t.qZA(),t.TgZ(12,"th",16),t._uU(13,"Quantity"),t.qZA(),t.TgZ(14,"th",16),t._uU(15,"Commission"),t.qZA(),t.TgZ(16,"th",16),t._uU(17,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(18,"tbody"),t.YNc(19,Ac,20,17,"tr",17),t.qZA(),t.TgZ(20,"tfoot"),t.TgZ(21,"tr",18),t._UZ(22,"td",19),t._UZ(23,"td",19),t._UZ(24,"td",19),t.TgZ(25,"td",20),t._uU(26,"Total:"),t.qZA(),t.TgZ(27,"td",21),t._uU(28),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA(),t._UZ(31,"td",19),t.TgZ(32,"td",21),t._uU(33),t.ALo(34,"number"),t.ALo(35,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(19),t.Q6J("ngForOf",e.data.Data),t.xp6(9),t.hij("",t.lcZ(29,3,t.xi3(30,5,e.data.Data,"Quantity"))," "),t.xp6(5),t.hij(" ",t.lcZ(34,8,t.xi3(35,10,e.data.Data,"TotalCommission")),"")}}const yc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report"]},vc=function(a){return{ID:a}};let Sc=(()=>{class a extends d.n{constructor(e,o,n,r){super(e,"Report/GetSalesPersonCommissionDetail","ReportLoader/SalesCommissionDetailLoader",null,r),this.httpService=e,this.csvConverter=o,this.datePipe=n,this.activatedRoute=r,this.datasource=[]}postInit(){this.menuData.H=this.data.PageTitle,this.datasource=this.data.Data}transformDate(e,o){return this.datePipe.transform(e,o)}getFilterData(e){this.data.Data=this.datasource.filter(o=>Object.keys(o).some(n=>null!=o[n]&&o[n].toString().toLowerCase().includes(e.toLowerCase())))}getID(){return this.pageData.Filter.ID?this.pageData.Filter.ID:C.gT.GuidEmpty}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(s.uU),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-commision-report-detail"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales Person",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","120px"],[1,"text-right",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[1,"text-right"],[1,"text-right","text-success"],[3,"href"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()})("textChange",function(r){return o.getFilterData(r)}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetSalesPersonCommissionDetail",o.data.SalesName?o.data.SalesName:"_Commission_Detail_"+o.transformDate(o.pageData.Filter.From,"dd_MMM")+"-"+o.transformDate(o.pageData.Filter.To,"dd_MMM")+".csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Back"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,fc,10,4,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Dc,36,13,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(5),t.Q6J("routerLink",t.DdM(6,yc))("queryParams",t.VKq(7,vc,o.getID())),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function Mc(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/GetNonStandardPrice","Non-Standard Price.csv")}),t._UZ(1,"i",7),t._uU(2,"Export"),t.qZA()}}function bc(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",8),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Variant"),t.qZA(),t.TgZ(8,"autocompleteV2",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.VariantID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",12),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"PriceType"),t.qZA(),t.TgZ(17,"radio-options",13),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.PriceTypeID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Note"),t.qZA(),t.TgZ(21,"input",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Note=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.VariantID),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("model",e.pageData.Filter.PriceTypeID)("options",e.PriceType),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Note)}}function Oc(a,i){1&a&&(t.TgZ(0,"th",23),t._uU(1,"Original Cost"),t.qZA())}function Jc(a,i){1&a&&(t.TgZ(0,"th",23),t._uU(1,"Cost"),t.qZA())}function Ic(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.VariantUnitCost))}}function Uc(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}const wc=function(){return["/menu/Products/Catalog/Variants/Info"]},Fc=function(a){return{ID:a}};function Nc(a,i){if(1&a&&(t.TgZ(0,"tr",26),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",27),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t.TgZ(9,"a",28),t._uU(10),t.qZA(),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.YNc(14,Ic,3,3,"td",29),t.YNc(15,Uc,3,3,"td",29),t.TgZ(16,"td",30),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"td",30),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"td"),t._UZ(23,"i",31),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Q6J("routerLink",t.DdM(20,wc))("queryParams",t.VKq(21,Fc,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(13,13,e.Created,"dd MMM yyyy")),t.xp6(2),t.Q6J("ngIf",o.pageData.HasCostRole),t.xp6(1),t.Q6J("ngIf",o.pageData.HasCostRole),t.xp6(2),t.Oqu(t.lcZ(18,16,e.VariantUnitPrice)),t.xp6(3),t.Oqu(t.lcZ(21,18,e.UnitPrice)),t.xp6(3),t.Q6J("innerHtml",e.Note,t.oJD)}}function Pc(a,i){if(1&a){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-paginator",32),t.NdJ("page",function(n){return t.CHM(e),t.oxw(2).onPaginationChange(n)}),t.qZA(),t.BQk()}if(2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("length",e.data.ListTotal)("pageSize",e.pagination.PageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function Lc(a,i){if(1&a&&(t.TgZ(0,"div",15),t.TgZ(1,"table",16),t.TgZ(2,"thead",17),t.TgZ(3,"tr"),t.TgZ(4,"th",18),t._uU(5,"Outlet"),t.qZA(),t.TgZ(6,"th",19),t._uU(7,"Variant"),t.qZA(),t.TgZ(8,"th",20),t._uU(9,"Code"),t.qZA(),t.TgZ(10,"th",21),t._uU(11,"Number"),t.qZA(),t.TgZ(12,"th",21),t._uU(13,"Date"),t.qZA(),t.YNc(14,Oc,2,0,"th",22),t.YNc(15,Jc,2,0,"th",22),t.TgZ(16,"th",23),t._uU(17,"Original Price"),t.qZA(),t.TgZ(18,"th",23),t._uU(19,"Price"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Note"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"tbody"),t.YNc(23,Nc,24,23,"tr",24),t.qZA(),t.qZA(),t.YNc(24,Pc,2,3,"ng-container",25),t.qZA()),2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",e.pageData.HasCostRole),t.xp6(1),t.Q6J("ngIf",e.pageData.HasCostRole),t.xp6(8),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.pagination.Show)}}const Yc=function(){return["/menu/Reports/Sales_Report/Standard/Discounted_Sales"]};let Rc=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetNonStandardPrice","ReportLoader/NonStandardPrice"),this.httpService=e,this.csvConverter=o,this.PriceType=[{Key:0,Value:"All"},{Key:1,Value:"Edited"}],this.sourcedata=[]}postInit(){this.sourcedata=this.data.Data}getFilterData(e){this.data.Data=this.sourcedata.filter(o=>Object.keys(o).some(n=>null!=o[n]&&o[n].toString().toLowerCase().includes(e.toLowerCase())))}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-non-standard-price"]],features:[t.qOj],decls:10,vars:7,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","PriceType",3,"model","options","modelChange"],["type","text",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","90px"],[2,"width","150px"],[2,"width","75px"],[2,"width","100px"],["class","text-right","style","width: 100px",4,"ngIf"],[1,"text-right",2,"width","100px"],["class","border-bottom",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],["class","text-right",4,"ngIf"],[1,"text-right"],[2,"word-break","break-all",3,"innerHtml"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("textChange",function(r){return o.getFilterData(r)})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Mc,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4,"Discounted Sales"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,bc,22,8,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Lc,25,4,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",null==o.pageData.Filter?null:o.pageData.Filter.IsExport),t.xp6(1),t.Q6J("routerLink",t.DdM(6,Yc)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,q.J,f.QB,D.P,p.Fj,s.sg,Q.NW],pipes:[s.uU,s.JJ],styles:[""]}),a})();function Ec(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",25),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.exportCSV(n.csvConverter,"ReportExport/ReportPurchaseDetail","Purchase Transaction.csv")}),t._UZ(1,"i",26),t._uU(2,"Export"),t.qZA()}}function kc(a,i){if(1&a&&(t.TgZ(0,"th",27),t._uU(1),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" UnitPrice(",e.data.Symbol,")")}}function Hc(a,i){if(1&a&&(t.TgZ(0,"th",28),t._uU(1),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" Total(",e.data.Symbol,")")}}function Vc(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1," /"),t.qZA())}function Bc(a,i){if(1&a&&(t.TgZ(0,"a",31),t.TgZ(1,"span",42),t._uU(2),t.qZA(),t.qZA()),2&a){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.POID,"",t.LSH),t.xp6(2),t.Oqu("#"+e.PONumber)}}function Gc(a,i){if(1&a&&(t.TgZ(0,"th",49),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,null==e?null:e.UnitPrice))}}function jc(a,i){if(1&a&&(t.TgZ(0,"th",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.Total)," ")}}function Wc(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"th",43),t._uU(2),t.qZA(),t.TgZ(3,"th",44),t._uU(4),t.qZA(),t.TgZ(5,"th",45),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"th",18),t._uU(9),t.qZA(),t.YNc(10,Gc,3,3,"th",46),t.TgZ(11,"th",47),t._uU(12),t.qZA(),t.YNc(13,jc,3,3,"th",48),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(3);t.xp6(2),t.hij(" ",null==e?null:e.Name," "),t.xp6(2),t.Oqu(null==e?null:e.Code),t.xp6(2),t.hij(" ",t.lcZ(7,7,null==e?null:e.Quantity)," "),t.xp6(3),t.Oqu(null==e?null:e.UOMName),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(2),t.hij(" ",0==(null==e?null:e.Discount)?"-":(null==e?null:e.Discount)+"%"," "),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost)}}function $c(a,i){if(1&a&&(t.TgZ(0,"tfoot",51),t.TgZ(1,"tr",52),t.TgZ(2,"td",53),t.TgZ(3,"b"),t._uU(4,"Total"),t.qZA(),t.qZA(),t.TgZ(5,"td",54),t.TgZ(6,"b"),t._uU(7),t.ALo(8,"number"),t.ALo(9,"sum"),t.qZA(),t.qZA(),t._UZ(10,"td"),t._UZ(11,"td"),t._UZ(12,"td"),t.TgZ(13,"td",55),t._UZ(14,"table",56),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(7),t.Oqu(t.lcZ(8,2,t.xi3(9,4,e.Items,"Quantity"))),t.xp6(7),t.Q6J("innerHTML",e.FooterHTML,t.oJD)}}function Kc(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"div",29),t.TgZ(2,"div",30),t.TgZ(3,"a",31),t.TgZ(4,"span",32),t._uU(5),t.qZA(),t.qZA(),t.YNc(6,Vc,2,0,"span",33),t.YNc(7,Bc,3,2,"a",34),t.TgZ(8,"span"),t._uU(9),t.ALo(10,"date"),t.qZA(),t._UZ(11,"span",35),t.TgZ(12,"strong",36),t._uU(13),t.ALo(14,"sum"),t.ALo(15,"number"),t.ALo(16,"sum"),t.qZA(),t.qZA(),t.TgZ(17,"div",37),t.TgZ(18,"label",38),t._uU(19),t.qZA(),t.qZA(),t.qZA(),t.TgZ(20,"table",39),t._UZ(21,"thead"),t.TgZ(22,"tbody",40),t.YNc(23,Wc,14,9,"tr",23),t.qZA(),t.YNc(24,$c,15,7,"tfoot",41),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(3),t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.ID,"",t.LSH),t.xp6(2),t.Oqu(e.Name+" #"+e.Number),t.xp6(1),t.Q6J("ngIf",o.pageData.DualReceiptNumber),t.xp6(1),t.Q6J("ngIf",o.pageData.DualReceiptNumber),t.xp6(2),t.Oqu(" - "+t.xi3(10,9,e.Date,"dd MMM yyyy")+(null==e.SupplierName?"":" : "+e.SupplierName)),t.xp6(4),t.hij(" ","[Q: "+t.xi3(14,12,e.Items,"Quantity")+", T: "+t.lcZ(15,15,t.xi3(16,17,e.Items,"Total"))+"]"," "),t.xp6(6),t.Oqu(e.PaymentStateLabel),t.xp6(4),t.Q6J("ngForOf",e.Items),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost)}}function Xc(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Cost ("),t.TgZ(3,"span",59),t._uU(4),t.ALo(5,"number"),t.qZA(),t._uU(6,"%)"),t.qZA(),t.TgZ(7,"span",54),t._uU(8),t.ALo(9,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(4),t.Oqu(t.xi3(5,2,e.data.Aggregate.CostRatio,".0-0")),t.xp6(4),t.Oqu(e.data.Aggregate.Cost?t.xi3(9,5,e.data.Aggregate.Cost,".0-0"):"\xa0")}}function zc(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t.TgZ(2,"span"),t._uU(3,"Profit"),t.qZA(),t._uU(4," ("),t.TgZ(5,"span",59),t._uU(6),t.ALo(7,"number"),t.qZA(),t._uU(8,"%)"),t.qZA(),t.TgZ(9,"span",54),t._uU(10),t.ALo(11,"number"),t.qZA(),t.qZA()),2&a){const e=t.oxw(3);t.xp6(6),t.Oqu(t.xi3(7,2,e.data.Aggregate.ProfitRatio,".0-0")),t.xp6(4),t.Oqu(e.data.Aggregate.Profit?t.xi3(11,5,e.data.Aggregate.Profit,".0-0"):"\xa0")}}function t_(a,i){if(1&a&&(t.TgZ(0,"div",57),t.TgZ(1,"div",58),t.TgZ(2,"div"),t.TgZ(3,"strong"),t._uU(4,"Tax Added"),t.qZA(),t.TgZ(5,"span",54),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.TgZ(8,"div"),t.TgZ(9,"strong"),t._uU(10,"Purchases with Tax"),t.qZA(),t.TgZ(11,"span",54),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"div",58),t.TgZ(15,"div"),t.TgZ(16,"strong"),t._uU(17,"Orders"),t.qZA(),t.TgZ(18,"span",54),t._uU(19),t.ALo(20,"number"),t.qZA(),t.qZA(),t.TgZ(21,"div"),t.TgZ(22,"strong"),t._uU(23,"Qty"),t.qZA(),t.TgZ(24,"span",54),t._uU(25),t.ALo(26,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(27,"div",58),t.TgZ(28,"div"),t.TgZ(29,"strong"),t._uU(30,"Gross Purchase"),t.qZA(),t.TgZ(31,"span",54),t._uU(32),t.ALo(33,"number"),t.qZA(),t.qZA(),t.TgZ(34,"div"),t.TgZ(35,"strong"),t._uU(36,"Discount"),t.qZA(),t.TgZ(37,"span",54),t._uU(38),t.ALo(39,"number"),t.qZA(),t.qZA(),t.TgZ(40,"div"),t.TgZ(41,"strong"),t._uU(42,"Tax Incl."),t.qZA(),t.TgZ(43,"span",54),t._uU(44),t.ALo(45,"number"),t.qZA(),t.qZA(),t.TgZ(46,"div"),t.TgZ(47,"strong"),t._uU(48,"Net Purchase"),t.qZA(),t.TgZ(49,"span",54),t._uU(50),t.ALo(51,"number"),t.qZA(),t.qZA(),t.YNc(52,Xc,10,8,"div",33),t.YNc(53,zc,12,8,"div",33),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(6),t.Oqu(t.xi3(7,10,e.data.Aggregate.TaxAdd,".0-0")),t.xp6(6),t.Oqu(t.xi3(13,13,e.data.Aggregate.SalesWithTax,".0-0")),t.xp6(7),t.Oqu(t.xi3(20,16,e.data.Aggregate.TotalTransaction,".0-0")),t.xp6(6),t.Oqu(t.xi3(26,19,e.data.Aggregate.UnitQuantity,".0-0")),t.xp6(7),t.Oqu(t.xi3(33,22,e.data.Aggregate.Gross,".0-0")),t.xp6(6),t.Oqu(t.xi3(39,25,e.data.Aggregate.Discount,".0-0")),t.xp6(6),t.Oqu(t.xi3(45,28,e.data.Aggregate.TaxInclude,".0-0")),t.xp6(6),t.Oqu(t.xi3(51,31,e.data.Aggregate.NetSales,".0-0")),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleCost)}}function e_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ec,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.TgZ(5,"div",4),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Category"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Supplier"),t.qZA(),t.TgZ(17,"autocompleteV2",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"From/To"),t.qZA(),t.TgZ(21,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(22,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(23,"div"),t.TgZ(24,"h6"),t._uU(25,"Currency"),t.qZA(),t.TgZ(26,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(27,"div"),t.TgZ(28,"h6"),t._uU(29,"Sort"),t.qZA(),t.TgZ(30,"radio-options",11),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.IsDesc=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(31,"content"),t.TgZ(32,"div",12),t.TgZ(33,"table",13),t.TgZ(34,"thead",14),t.TgZ(35,"tr"),t.TgZ(36,"th",15),t._uU(37,"Name"),t.qZA(),t.TgZ(38,"th",16),t._uU(39,"Code"),t.qZA(),t.TgZ(40,"th",17),t._uU(41,"Qty"),t.qZA(),t.TgZ(42,"th",18),t._uU(43,"UOM"),t.qZA(),t.YNc(44,kc,2,1,"th",19),t.TgZ(45,"th",20),t._uU(46,"%"),t.qZA(),t.YNc(47,Hc,2,1,"th",21),t.qZA(),t.qZA(),t.TgZ(48,"tbody"),t.TgZ(49,"tr"),t.TgZ(50,"td",22),t.YNc(51,Kc,25,20,"div",23),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(52,t_,54,34,"div",24),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.IsExport),t.xp6(7),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",e.pageData.Options.Currencies),t.xp6(4),t.Q6J("model",e.pageData.Filter.IsDesc)("options",e.AscDscRadio),t.xp6(14),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(3),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(3),t.uIk("colspan",e.pageData.HasRoleCost?8:6),t.xp6(1),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}let a_=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetPurchaseTransactionDetail","ReportLoader/GetPurchaseTransactionDetail"),this.httpService=e,this.csvConverter=o,this.AscDscRadio=[{Key:!1,Value:"Asc"},{Key:!0,Value:"Desc"}]}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-detail"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","AscDesc",3,"model","options","modelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[2,"width","75px"],[1,"text-right",2,"width","30px"],[1,"font-italic","small",2,"width","40px"],["class","text-right","style","width: 80px",4,"ngIf"],[1,"red",2,"width","30px"],["class","text-right","style","width: 150px",4,"ngIf"],[1,"px-0"],[4,"ngFor","ngForOf"],["class","row justify-content-end",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"text-right",2,"width","80px"],[1,"text-right",2,"width","150px"],[1,"d-flex","justify-content-end","mt-sm-0"],[1,"mr-auto","d-sm-block","mt-2","mb-2"],[1,"h5","text-primary","font-weight-bold",3,"href"],["id","PONumber",1,"ml-3"],[4,"ngIf"],["class","h5 text-primary font-weight-bold",3,"href",4,"ngIf"],[1,"d-block"],[1,"text-danger","ml-3"],[1,"d-lg-block","mt-2","mr-5","font-weight-bold","font-italic"],["runat","server",1,"status"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],["class","table table-sm table-borderless",4,"ngIf"],["id","PONumber"],[2,"width","600px"],[1,"font-weight-normal",2,"width","75px"],[1,"font-weight-normal","text-right",2,"width","30px"],["class","font-weight-normal text-right","style","width: 80px",4,"ngIf"],[1,"font-weight-normal","text-right","text-danger",2,"width","30px"],["class","font-weight-normal text-right","style","width: 140px",4,"ngIf"],[1,"font-weight-normal","text-right",2,"width","80px"],[1,"font-weight-normal","text-right",2,"width","140px"],[1,"table","table-sm","table-borderless"],[1,"grid_footer"],["colspan","2",1,"text-right"],[1,"text-right"],[1,"text-right","d-flex","justify-content-end",2,"width","140px"],["cellpadding","0","cellspacing","0",3,"innerHTML"],[1,"row","justify-content-end"],[1,"zebra","col-auto"],[1,"Percentage"]],template:function(e,o){1&e&&t.YNc(0,e_,53,19,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,q.J,f.QB,D.P,s.sg],pipes:[s.uU,T.qU,s.JJ],styles:[""]}),a})();function n_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.exportCSV(n.csvConverter,"ReportExport/ReportPurchaseSummary","Purchase Summary.csv")}),t._UZ(1,"i",32),t._uU(2,"Export"),t.qZA()}}function o_(a,i){1&a&&t._UZ(0,"br")}function r_(a,i){if(1&a&&(t.TgZ(0,"a",33),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.SupplierPOID,"",t.LSH),t.xp6(1),t.Oqu(e.PONumber)}}function i_(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",33),t._uU(5),t.qZA(),t.YNc(6,o_,1,0,"br",34),t.YNc(7,r_,2,2,"a",35),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.ALo(10,"date"),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td",27),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td",27),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"td",27),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"td",27),t._uU(23),t.ALo(24,"number"),t.qZA(),t.TgZ(25,"td",27),t._uU(26),t.ALo(27,"number"),t.qZA(),t.TgZ(28,"td"),t._uU(29),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.hij(" >",e.Number,""),t.xp6(1),t.Q6J("ngIf",o.pageData.DualNumber),t.xp6(1),t.Q6J("ngIf",o.pageData.DualNumber),t.xp6(2),t.Oqu(t.xi3(10,13,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.SupplierNameDisplay),t.xp6(2),t.Oqu(t.lcZ(15,16,e.TotalItemQuantity)),t.xp6(3),t.Oqu(t.lcZ(18,18,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(21,20,e.Tax)),t.xp6(3),t.Oqu(t.lcZ(24,22,e.TotalAmount)),t.xp6(3),t.Oqu(t.lcZ(27,24,e.PaymentAmount)),t.xp6(3),t.Oqu(e.PaymentStateLabel)}}function l_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Number=n})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,n_,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.TgZ(5,"div",4),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"From/To"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(14,"datepicker",7),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"Payment"),t.qZA(),t.TgZ(18,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.StateID=n}),t.qZA(),t.qZA(),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"Supplier"),t.qZA(),t.TgZ(22,"autocompleteV2",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(23,"content"),t.TgZ(24,"div",10),t.TgZ(25,"table",11),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(26,"thead",12),t.TgZ(27,"tr"),t.TgZ(28,"th",13),t._uU(29,"Outlet"),t.qZA(),t.TgZ(30,"th",14),t._uU(31,"Number"),t.qZA(),t.TgZ(32,"th",15),t._uU(33,"Date"),t.qZA(),t.TgZ(34,"th",16),t._uU(35,"Supplier "),t.qZA(),t.TgZ(36,"th",17),t._uU(37,"Qty"),t.qZA(),t.TgZ(38,"th",18),t._uU(39,"Purchase"),t.qZA(),t.TgZ(40,"th",19),t._uU(41,"Tax"),t.qZA(),t.TgZ(42,"th",20),t._uU(43,"Total Amount"),t.qZA(),t.TgZ(44,"th",21),t._uU(45,"Payment"),t.qZA(),t.TgZ(46,"th",22),t._uU(47,"State"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(48,"tbody"),t.YNc(49,i_,30,26,"tr",23),t.qZA(),t.TgZ(50,"tfoot"),t.TgZ(51,"tr",24),t._UZ(52,"td",25),t.TgZ(53,"td",26),t._uU(54,"Total:"),t.qZA(),t.TgZ(55,"td",27),t._uU(56),t.ALo(57,"number"),t.ALo(58,"sum"),t.qZA(),t.TgZ(59,"td",27),t._uU(60),t.ALo(61,"number"),t.ALo(62,"sum"),t.qZA(),t.TgZ(63,"td",27),t._uU(64),t.ALo(65,"number"),t.ALo(66,"sum"),t.qZA(),t.TgZ(67,"td",28),t._uU(68),t.ALo(69,"number"),t.ALo(70,"sum"),t.qZA(),t.TgZ(71,"td",29),t._uU(72),t.ALo(73,"number"),t.ALo(74,"sum"),t.qZA(),t._UZ(75,"td",30),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",e.pageData.IsExport),t.xp6(7),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.StateID)("items",null==e.pageData.Options?null:e.pageData.Options.States),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID)("inputTextValue",e.contactDisplay),t.xp6(27),t.Q6J("ngForOf",e.data.Data),t.xp6(7),t.hij(" ",t.lcZ(57,17,t.xi3(58,19,e.data.Data,"TotalItemQuantity")),""),t.xp6(4),t.hij("",t.lcZ(61,22,t.xi3(62,24,e.data.Data,"Sales"))," "),t.xp6(4),t.hij("",t.lcZ(65,27,t.xi3(66,29,e.data.Data,"Tax"))," "),t.xp6(4),t.hij(" ",t.lcZ(69,32,t.xi3(70,34,e.data.Data,"TotalAmount")),""),t.xp6(4),t.hij(" ",t.lcZ(73,37,t.xi3(74,39,e.data.Data,"PaymentAmount")),"")}}let s_=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/ReportPurchaseSummary","ReportLoader/GetReportPurchaseSummary",null,n),this.httpService=e,this.csvConverter=o,this.url=n}preInitList(){this.pageData.Filter.EntityID=null,C.gT.IsNotEmpty(this.pageData.Filter.SupplierID)&&(this.pageData.Filter.From=C.gT.MinDate),C.gT.IsNotEmpty(this.pageData.SupplierName)&&(this.contactDisplay=this.pageData.SupplierName)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(n.EntityName=null==n.EntityName?"":n.EntityName,r.EntityName=null==r.EntityName?"":r.EntityName,n.SupplierNameDisplay=null==n.SupplierNameDisplay?"":n.SupplierNameDisplay,r.SupplierNameDisplay=null==r.SupplierNameDisplay?"":r.SupplierNameDisplay,e.active){case"EntityName":return this.compare(n.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"Number":return this.compare(n.Number,r.Number,l);case"Date":return this.compare(n.Date,r.Date,l);case"SupplierNameDisplay":return this.compare(n.SupplierNameDisplay.toLocaleLowerCase(),r.SupplierNameDisplay.toLocaleLowerCase(),l);case"TotalItemQuantity":return this.compare(n.TotalItemQuantity,r.TotalItemQuantity,l);case"Total":return this.compare(n.TotalAmount,r.TotalAmount,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"PaymentAmount":return this.compare(n.PaymentAmount,r.PaymentAmount,l);case"PaymentState":return this.compare(n.PaymentStateLabel,r.PaymentStateLabel,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-detail-summary"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],[1,"container-fluid","mt-5"],["matSort","",1,"table",3,"matSortChange"],[1,"thead-light"],["mat-sort-header","EntityName"],["mat-sort-header","Number"],["mat-sort-header","Date",2,"width","100px"],["mat-sort-header","SupplierNameDisplay",2,"width","118px"],["mat-sort-header","TotalItemQuantity",1,"align-right",2,"width","70px"],["mat-sort-header","Sales",1,"align-right",2,"width","118px"],["mat-sort-header","Tax",1,"align-right",2,"width","118px"],["mat-sort-header","Total",1,"align-right",2,"width","118px"],["mat-sort-header","PaymentAmount",1,"align-right",2,"width","118px"],["mat-sort-header","PaymentState",2,"width","70px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","3",1,"empty-column"],[1,"text-right","empty-column"],[1,"text-right"],[1,"text-right","text-danger"],[1,"text-right","text-success"],[1,"empty-column"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[3,"href"],[4,"ngIf"],[3,"href",4,"ngIf"]],template:function(e,o){1&e&&t.YNc(0,l_,76,42,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,f.QB,q.J,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function p_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.exportCSV(n.csvConverter,"ReportExport/TopPurchaseExport","Top_Supplier.csv")}),t._UZ(1,"i",24),t._uU(2,"Export"),t.qZA()}}const c_=function(){return["/menu/Contacts/Contact/Suppliers/Info"]},__=function(a){return{ID:a}},u_=function(a,i,e){return{SupplierID:a,From:i,To:e}},g_=function(){return["/menu/Reports/Purchases_Report/Summary"]};function d_(a,i){if(1&a&&(t.TgZ(0,"tr",25),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",26),t.TgZ(4,"a",27),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td",21),t._uU(7),t.qZA(),t.TgZ(8,"td",28),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",21),t.TgZ(12,"a",29),t.ALo(13,"date"),t.ALo(14,"date"),t._uU(15),t.ALo(16,"number"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Q6J("routerLink",t.DdM(19,c_))("queryParams",t.VKq(20,__,e.SupplierID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,9,e.Quantity)),t.xp6(3),t.Q6J("queryParams",t.kEZ(22,u_,e.SupplierID,t.xi3(13,11,n.pageData.Filter.From,"ddMMyyyy"),t.xi3(14,14,n.pageData.Filter.To,"ddMMyyyy")))("routerLink",t.DdM(26,g_)),t.xp6(3),t.Oqu(t.lcZ(16,17,e.Total))}}function m_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,p_,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.TgZ(5,"div",4),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Group"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"From/To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(18,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"Row Count"),t.qZA(),t.TgZ(22,"input",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(23,"content"),t.TgZ(24,"div",10),t.TgZ(25,"table",11),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(26,"thead",12),t.TgZ(27,"tr"),t.TgZ(28,"th",13),t._uU(29,"Rank"),t.qZA(),t.TgZ(30,"th",14),t._uU(31,"Supplier"),t.qZA(),t.TgZ(32,"th",15),t._uU(33,"Code"),t.qZA(),t.TgZ(34,"th",16),t._uU(35,"Quantity"),t.qZA(),t.TgZ(36,"th",17),t._uU(37,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(38,"tbody"),t.YNc(39,d_,17,27,"tr",18),t.qZA(),t.TgZ(40,"tfoot"),t.TgZ(41,"tr",19),t._UZ(42,"th",20),t.TgZ(43,"th",21),t._uU(44,"Total Quantity"),t.qZA(),t.TgZ(45,"th",21),t._uU(46,"Total Purchase"),t.qZA(),t.qZA(),t.TgZ(47,"tr"),t._UZ(48,"td",22),t.TgZ(49,"td",21),t._uU(50),t.qZA(),t.TgZ(51,"td",21),t._uU(52),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleExport),t.xp6(7),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.GroupID)("items",null==e.pageData.Options?null:e.pageData.Options.Group),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(17),t.Q6J("ngForOf",e.data.Data),t.xp6(11),t.Oqu(e.data.TotalQty),t.xp6(2),t.Oqu(e.data.TotalSales)}}let Z_=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/TopSupplier","ReportLoader/TopSupplierLoader"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Code":return this.compare(n.Code,r.Code,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Total":return this.compare(n.Total,r.Total,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-top-supplier"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","35px"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","80px"],["mat-sort-header","Quantity",1,"align-right",2,"width","120px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"thead-light"],["colspan","3",1,"bg-white","border-bottom-0"],[1,"text-right"],["colspan","3",1,"bg-white","border-top-0"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"border-bottom"],[1,"text-left"],[3,"routerLink","queryParams"],[1,"text-right","text-success"],[3,"queryParams","routerLink"]],template:function(e,o){1&e&&t.YNc(0,m_,53,14,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg,g.yS],pipes:[s.JJ,s.uU],styles:[""]}),a})();function h_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.exportCSV(n.csvConverter,"ReportExport/PurchasesByProductExport","Purchases_By_Product.csv")}),t._UZ(1,"i",22),t._uU(2,"Export"),t.qZA()}}const x_=function(a){return{"pl-lg-12":a}},T_=function(a){return[a]},C_=function(a){return{ID:a}};function f_(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td",23),t.TgZ(2,"a",24),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",20),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",20),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",20),t._uU(13),t.ALo(14,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(14,x_,!e.IsParent)),t.xp6(1),t.Q6J("routerLink",t.VKq(16,T_,e.IsParent?"/menu/Products/Catalog/Categories/Info":o.pageData.Filter.GroupByProduct?"/menu/Products/Catalog/Products/Info":"/menu/Products/Catalog/Variants/Info"))("queryParams",t.VKq(18,C_,e.IsParent?e.CategoryID:e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(8,8,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(11,10,e.Total)),t.xp6(3),t.Oqu(t.lcZ(14,12,e.LastPurchase))}}function A_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Text=n})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,h_,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.TgZ(5,"div",4),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Category"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Currency"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"From/To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(18,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"Group By"),t.qZA(),t.TgZ(22,"radio-options",9),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupByProduct=n}),t.qZA(),t.qZA(),t.TgZ(23,"div"),t.TgZ(24,"h6"),t._uU(25,"Brand"),t.qZA(),t.TgZ(26,"autocompleteV2",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.BrandID=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(27,"content"),t.TgZ(28,"div",11),t.TgZ(29,"table",12),t.TgZ(30,"thead",13),t.TgZ(31,"tr"),t.TgZ(32,"th"),t._uU(33,"Name"),t.qZA(),t.TgZ(34,"th",14),t._uU(35,"Code"),t.qZA(),t.TgZ(36,"th",15),t._uU(37,"Quantity"),t.qZA(),t.TgZ(38,"th",16),t._uU(39,"Total"),t.qZA(),t.TgZ(40,"th",15),t._uU(41,"Last Purchase"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(42,"tbody"),t.YNc(43,f_,15,20,"tr",17),t.qZA(),t.TgZ(44,"tfoot"),t.TgZ(45,"tr",18),t._UZ(46,"td",19),t.TgZ(47,"td"),t._uU(48,"Total :"),t.qZA(),t.TgZ(49,"td",20),t._uU(50),t.ALo(51,"number"),t.ALo(52,"sum"),t.qZA(),t.TgZ(53,"td",20),t._uU(54),t.ALo(55,"number"),t.ALo(56,"sum"),t.qZA(),t._UZ(57,"td"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",e.pageData.HasExportRole),t.xp6(7),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("model",e.pageData.Filter.GroupByProduct)("options",e.GroupByRadio),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.BrandID),t.xp6(17),t.Q6J("ngForOf",e.data),t.xp6(7),t.hij(" ",t.lcZ(51,15,t.xi3(52,17,e.filterData(e.data,"IsParent",!0),"Quantity"))," "),t.xp6(4),t.hij(" ",t.lcZ(55,20,t.xi3(56,22,e.filterData(e.data,"IsParent",!0),"Total"))," ")}}let D_=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/PurchasesByProductList","ReportLoader/PurchasesByProductLoader"),this.httpService=e,this.csvConverter=o,this.GroupByRadio=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}filterData(e,o,n){return e.filter(function(r){return r[o]==n})}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-bought"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","GroupBy",3,"model","options","modelChange"],["inputID","Key","requestUrl","/API/AC/GetProductBrandSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","100px"],[1,"text-right",2,"width","120px"],[1,"text-right",2,"width","140px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[1,"text-right"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[3,"ngClass"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,A_,58,25,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,f.QB,D.P,q.J,s.sg,s.mk,g.yS],pipes:[s.JJ,T.qU],styles:[""]}),a})();function q_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",8),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.convertToCSV(n.csvConverter,!0,"PurchaseHistory.csv")}),t._UZ(1,"i",9),t._uU(2,"Export"),t.qZA()}}function y_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Product"),t.qZA(),t.TgZ(3,"autocompleteV2",17),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)("inputTextValue",e.pageData.ProductName)}}function v_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Variant"),t.qZA(),t.TgZ(3,"autocompleteV2",18),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.VariantID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.VariantID)("inputTextValue",e.pageData.VariantName)}}function S_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",10),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Supplier"),t.qZA(),t.TgZ(8,"autocompleteV2",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Scope"),t.qZA(),t.TgZ(12,"radio-options",13),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ByProduct=n})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.YNc(13,y_,4,2,"div",14),t.YNc(14,v_,4,2,"div",14),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"From/To"),t.qZA(),t.TgZ(18,"datepicker",15),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(19,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(4),t.Q6J("model",e.pageData.Filter.ByProduct)("options",e.ScopeRadio),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.ByProduct),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.ByProduct),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function M_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Order By"),t.qZA(),t.TgZ(4,"radio-options",20),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.OrderByNumber=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Currency"),t.qZA(),t.TgZ(8,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Brand"),t.qZA(),t.TgZ(12,"autocompleteV2",22),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.BrandID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("model",e.pageData.Filter.OrderByNumber)("options",e.OrderByRadio),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.BrandID)}}function b_(a,i){1&a&&(t.TgZ(0,"th"),t._uU(1,"Product"),t.qZA())}function O_(a,i){1&a&&(t.TgZ(0,"th"),t._uU(1,"Variant"),t.qZA())}function J_(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1," Measurement"),t.qZA())}function I_(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Cost"),t.qZA())}function U_(a,i){if(1&a&&(t.TgZ(0,"th",42),t._uU(1),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" Total(",e.data.CurrencySymbol,")")}}function w_(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.VariantUnitQuantity),"")}}function F_(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitPrice))}}function N_(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Total))}}function P_(a,i){if(1&a&&(t.TgZ(0,"tr",43),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t.TgZ(7,"a",44),t._uU(8),t.qZA(),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA(),t._UZ(15,"td",45),t.TgZ(16,"td",38),t._uU(17),t.ALo(18,"number"),t.qZA(),t.YNc(19,w_,3,3,"td",39),t.YNc(20,F_,3,3,"td",39),t.TgZ(21,"td",38),t._uU(22),t.qZA(),t.TgZ(23,"td",38),t._uU(24),t.qZA(),t.YNc(25,N_,3,3,"td",39),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,14,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(2),t.Oqu(e.DeliveryStatus),t.xp6(2),t.Oqu(e.SupplierName),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD),t.xp6(2),t.Oqu(t.lcZ(18,17,e.Quantity)),t.xp6(2),t.Q6J("ngIf",(null==e||null==e.Data?null:e.Data.VariantQuantity)>1),t.xp6(1),t.Q6J("ngIf",o.pageData.HasCostRole),t.xp6(2),t.Oqu(e.Discount>0?e.Discount:""),t.xp6(2),t.Oqu(e.DiscountInvoice>0?e.DiscountInvoice:""),t.xp6(1),t.Q6J("ngIf",o.pageData.HasCostRole)}}function L_(a,i){1&a&&t._UZ(0,"td",37)}function Q_(a,i){1&a&&t._UZ(0,"td",37)}function Y_(a,i){1&a&&t._UZ(0,"td",37)}function R_(a,i){if(1&a&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Total")),"")}}function E_(a,i){if(1&a&&(t.TgZ(0,"div",23),t.TgZ(1,"table",24),t.TgZ(2,"thead",25),t.TgZ(3,"tr"),t.TgZ(4,"th",26),t._uU(5,"Date"),t.qZA(),t.TgZ(6,"th",27),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"th",28),t._uU(9,"Invoice"),t.qZA(),t.TgZ(10,"th",27),t._uU(11,"Deliv. State"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Supplier"),t.qZA(),t.YNc(14,b_,2,0,"th",14),t.YNc(15,O_,2,0,"th",14),t.TgZ(16,"th"),t._uU(17,"Product Note "),t._UZ(18,"br"),t.TgZ(19,"i"),t._uU(20,"Invoice Note"),t.qZA(),t.qZA(),t.TgZ(21,"th",29),t._uU(22,"Qty"),t.qZA(),t.YNc(23,J_,2,0,"th",30),t.YNc(24,I_,2,0,"th",31),t.TgZ(25,"th",29),t._uU(26,"Item(%)"),t.qZA(),t.TgZ(27,"th",29),t._uU(28,"inv(%)"),t.qZA(),t.YNc(29,U_,2,1,"th",32),t.qZA(),t.qZA(),t.TgZ(30,"tbody"),t.YNc(31,P_,26,19,"tr",33),t.qZA(),t.TgZ(32,"tfoot"),t.TgZ(33,"tr",34),t._UZ(34,"td",35),t.YNc(35,L_,1,0,"td",36),t._UZ(36,"td",37),t.TgZ(37,"td",38),t._uU(38,"Total :"),t.qZA(),t.TgZ(39,"td",38),t._uU(40),t.ALo(41,"number"),t.ALo(42,"sum"),t.qZA(),t.YNc(43,Q_,1,0,"td",36),t.YNc(44,Y_,1,0,"td",36),t._UZ(45,"td",37),t._UZ(46,"td",37),t.YNc(47,R_,4,6,"td",39),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",e.pageData.Filter.ByProduct),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.ByProduct),t.xp6(8),t.Q6J("ngIf",(null==e.data||null==e.data.Data?null:e.data.Data.VariantQuantity)>1),t.xp6(1),t.Q6J("ngIf",e.pageData.HasCostRole),t.xp6(5),t.Q6J("ngIf",e.pageData.HasCostRole),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(4),t.Q6J("ngIf",!e.pageData.Filter.ByProduct),t.xp6(5),t.Oqu(t.lcZ(41,11,t.xi3(42,13,e.data.Data,"Quantity"))),t.xp6(3),t.Q6J("ngIf",e.pageData.HasCostRole),t.xp6(1),t.Q6J("ngIf",(null==e.data||null==e.data.Data?null:e.data.Data.VariantQuantity)>1),t.xp6(3),t.Q6J("ngIf",e.pageData.HasCostRole)}}let k_=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/ProductPurchaseHistory","ReportLoader/ProductPurchaseHistoryLoader",null,n),this.httpService=e,this.csvConverter=o,this.ScopeRadio=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}],this.OrderByRadio=[{Key:!0,Value:"Number"},{Key:!1,Value:"Supplier"}],this.hideMore=!0}preInitList(){C.gT.IsEmpty(this.pageData.Filter.EntityID)&&(this.pageData.Filter.EntityID=null)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-purchase-history"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","Scope",3,"model","options","modelChange"],[4,"ngIf"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["inputID","Key","requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],["id","more-filter","container",""],["name","OrderBy",3,"model","options","modelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetProductBrandSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","100px"],[2,"width","80px"],[2,"width","70px"],[1,"text-right",2,"width","50px"],["style","width: 60px;","class","text-right",4,"ngIf"],["style","width: 75px;","class","text-right",4,"ngIf"],["style","width: 80px;","class","text-right",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"empty-column"],["class","empty-column",4,"ngIf"],[1,"empty-column"],[1,"text-right"],["class","text-right",4,"ngIf"],[1,"text-right",2,"width","60px"],[1,"text-right",2,"width","75px"],[1,"text-right",2,"width","80px"],[1,"border-bottom"],[3,"href"],[3,"innerHTML"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,q_,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,S_,20,9,"div",3),t.YNc(6,M_,13,5,"div",4),t.qZA(),t.TgZ(7,"a",5),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(8,"More "),t._UZ(9,"i",6),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,E_,48,16,"div",7),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,q.J,D.P,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function H_(a,i){if(1&a&&(t.TgZ(0,"tr",17),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td",14),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td",14),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",14),t._uU(11),t.ALo(12,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(t.xi3(3,4,e.Date,"EEEE")),t.xp6(3),t.Oqu(t.lcZ(6,7,e.Day)),t.xp6(3),t.Oqu(t.lcZ(9,9,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(12,11,e.PurchaseTotal))}}const B_=function(){return["/menu/Reports/Purchases_Report/Daily_Purchase/Monthly_Purchase"]};function G_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",2),t._uU(3,"View Month"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",3),t.TgZ(6,"div",4),t.TgZ(7,"div"),t.TgZ(8,"h6"),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(11,"div"),t.TgZ(12,"h6"),t._uU(13,"Category"),t.qZA(),t.TgZ(14,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"Year"),t.qZA(),t.TgZ(18,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"Month"),t.qZA(),t.TgZ(22,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Month=n}),t.qZA(),t.qZA(),t.TgZ(23,"div"),t.TgZ(24,"h6"),t._uU(25,"Currency"),t.qZA(),t.TgZ(26,"ng-select",9),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(27,"div"),t.TgZ(28,"h6"),t._uU(29,"Multiply Unit Qty"),t.qZA(),t.TgZ(30,"radio-options",10),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.MultiplyUnitQuantity=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(31,"content"),t.TgZ(32,"div",11),t.TgZ(33,"table",12),t.TgZ(34,"thead",13),t.TgZ(35,"tr"),t.TgZ(36,"th"),t._uU(37,"Day"),t.qZA(),t.TgZ(38,"th",14),t._uU(39,"Dt."),t.qZA(),t.TgZ(40,"th",14),t._uU(41,"Quantity"),t.qZA(),t.TgZ(42,"th",14),t._uU(43,"Purchases"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(44,"tbody"),t.YNc(45,H_,13,13,"tr",15),t.qZA(),t.TgZ(46,"tr"),t.TgZ(47,"td",16),t._uU(48,"Total"),t.qZA(),t.TgZ(49,"td",14),t._uU(50),t.ALo(51,"number"),t.ALo(52,"sum"),t.qZA(),t.TgZ(53,"td",14),t._uU(54),t.ALo(55,"number"),t.ALo(56,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(29,B_)),t.xp6(8),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",e.pageData.Options.Currencies),t.xp6(4),t.Q6J("model",e.pageData.Filter.MultiplyUnitQuantity)("options",e.YesNoRadio),t.xp6(15),t.Q6J("ngForOf",e.data),t.xp6(5),t.Oqu(t.lcZ(51,19,t.xi3(52,21,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(55,24,t.xi3(56,26,e.data,"PurchaseTotal")))}}let j_=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetPurchasePeriodDaily","ReportLoader/GetReportPurchaseDaily"),this.httpService=e,this.csvConverter=o,this.Years=[],this.Months=[],this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const n=new Date;this.Years=C.gT.GenerateYears(n.getFullYear(),11,!0),this.Months=C.gT.Months}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-daily-purchases"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","View Month",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["placeholder","Month","bindLabel","Label","bindValue","ID",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","GroupBy",3,"model","options","modelChange"],[1,"container-fluid","mt-5"],[1,"table","w-25"],[1,"thead-light"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],["colspan","2",1,"text-right"],[1,"border-bottom"]],template:function(e,o){1&e&&t.YNc(0,G_,57,30,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,c.w9,p.JJ,p.On,D.P,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function W_(a,i){if(1&a&&(t.TgZ(0,"tr",18),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",14),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",14),t._uU(7),t.ALo(8,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.MonthLabel),t.xp6(2),t.Oqu(t.lcZ(5,3,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(8,5,e.Income))}}const $_=function(){return["/menu/Reports/Purchases_Report/Daily_Purchase"]};function K_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",2),t._uU(3,"View Daily"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",3),t.TgZ(6,"div",4),t.TgZ(7,"div"),t.TgZ(8,"h6"),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(11,"div"),t.TgZ(12,"h6"),t._uU(13,"Category"),t.qZA(),t.TgZ(14,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"Year"),t.qZA(),t.TgZ(18,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"Currency"),t.qZA(),t.TgZ(22,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.TgZ(23,"div"),t.TgZ(24,"h6"),t._uU(25,"Multiply Unit Qty"),t.qZA(),t.TgZ(26,"radio-options",9),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.MultiplyUnitQuantity=n}),t.qZA(),t.qZA(),t.TgZ(27,"div"),t.TgZ(28,"h6"),t._uU(29,"Supplier"),t.qZA(),t.TgZ(30,"autocompleteV2",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(31,"content"),t.TgZ(32,"div",11),t.TgZ(33,"table",12),t.TgZ(34,"thead",13),t.TgZ(35,"tr"),t.TgZ(36,"th"),t._uU(37,"Month"),t.qZA(),t.TgZ(38,"th",14),t._uU(39,"Quantity"),t.qZA(),t.TgZ(40,"th",14),t._uU(41,"Purchases"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(42,"tbody"),t.YNc(43,W_,9,7,"tr",15),t.qZA(),t.TgZ(44,"tr",16),t.TgZ(45,"td",17),t._uU(46,"Total"),t.qZA(),t.TgZ(47,"td",14),t._uU(48),t.ALo(49,"number"),t.ALo(50,"sum"),t.qZA(),t.TgZ(51,"td",14),t._uU(52),t.ALo(53,"number"),t.ALo(54,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(27,$_)),t.xp6(8),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",e.pageData.Options.Currencies),t.xp6(4),t.Q6J("model",e.pageData.Filter.MultiplyUnitQuantity)("options",e.YesNoRadio),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(13),t.Q6J("ngForOf",e.data),t.xp6(5),t.Oqu(t.lcZ(49,17,t.xi3(50,19,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(53,22,t.xi3(54,24,e.data,"Income")))}}let X_=(()=>{class a extends d.n{constructor(e){super(e,"Report/GetPurchasePeriodMonthly","ReportLoader/GetReportPurchaseMonthly"),this.httpService=e,this.Years=[],this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const o=new Date;this.Years=C.gT.GenerateYears(o.getFullYear(),11,!0)}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-monthly-purchase"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","View Month",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","GroupBy",3,"model","options","modelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table","w-25"],[1,"thead-light"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","1",1,"text-right"],[1,"border-bottom"]],template:function(e,o){1&e&&t.YNc(0,K_,55,28,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,c.w9,p.JJ,p.On,D.P,q.J,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function z_(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t._UZ(1,"actions"),t.TgZ(2,"filters"),t.TgZ(3,"div",2),t.TgZ(4,"div",3),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"ng-select",4),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Category"),t.qZA(),t.TgZ(12,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Year"),t.qZA(),t.TgZ(16,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.TgZ(18,"div",7),t._UZ(19,"POS-line-chart",8),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(8),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(3),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}let tu=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/MonthlyPurchasesVolume","ReportLoader/GetMonthlyPurchaseVolume"),this.httpService=e,this.Years=[],this.ChartData={};const n=new Date;this.Years=C.gT.GenerateYears(n.getFullYear(),11,!0)}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}preInitList(){this.pageData.Options.Currencies.unshift({ID:0,Symbol:"All"}),this.pageData.Filter.CurrencyID=0}postInit(){const e=[];this.chartConfig={chart:{type:"column"},title:{text:""},credits:{enabled:!1},xAxis:{categories:this.data.MonthName},yAxis:{title:{text:""},stackLabels:{enabled:!0}},plotOptions:{column:{stacking:"normal"}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0}},this.data.MonthlySalesRank.forEach(o=>{e.push({name:o.Name,data:o.Sales})}),this.ChartData={series:e}}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-volume"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&t.YNc(0,z_,20,10,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,O.D],styles:[""]}),a})();function eu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.convertToCSV(n.csvConverter,!0,"Purchased_Sales_Report.csv")}),t._UZ(1,"i",20),t._uU(2,"Export"),t.qZA()}}function au(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year/Month"),t.qZA(),t.TgZ(3,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Period=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Period)("items",null==e.pageData.Options?null:e.pageData.Options.Periods)}}function nu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",22),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",23),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}const ou=function(){return["/menu/Products/Catalog/Products/Info"]},ru=function(a){return{ID:a}};function iu(a,i){if(1&a&&(t.TgZ(0,"tr",24),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",25),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",26),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",26),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",27),t._uU(15),t.ALo(16,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=i.index;t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Q6J("routerLink",t.DdM(14,ou))("queryParams",t.VKq(15,ru,e.ID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,8,e.PurchaseQuantity)),t.xp6(3),t.Oqu(t.lcZ(13,10,e.SellQuantity)),t.xp6(3),t.Oqu(t.lcZ(16,12,e.Ratio))}}function lu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,eu,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.TgZ(5,"div",4),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Category"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.YNc(14,au,4,2,"div",7),t.YNc(15,nu,5,2,"div",7),t.TgZ(16,"div"),t.TgZ(17,"h6"),t._uU(18,"Row Count"),t.qZA(),t.TgZ(19,"input",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.TgZ(20,"div"),t.TgZ(21,"h6"),t._uU(22,"Date Filter"),t.qZA(),t.TgZ(23,"radio-options",9),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Predefined=n}),t.qZA(),t.TgZ(24,"h6"),t._uU(25,"Inventory Only"),t.qZA(),t.TgZ(26,"radio-options",10),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.InventoryOnly=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(27,"content"),t.TgZ(28,"div",11),t.TgZ(29,"table",12),t.TgZ(30,"thead",13),t.TgZ(31,"tr"),t.TgZ(32,"th",14),t._uU(33," Now "),t.qZA(),t.TgZ(34,"th",15),t._uU(35,"Name"),t.qZA(),t.TgZ(36,"th",16),t._uU(37,"Code"),t.qZA(),t.TgZ(38,"th",17),t._uU(39,"Purchase"),t.qZA(),t.TgZ(40,"th",17),t._uU(41,"Sold"),t.qZA(),t.TgZ(42,"th",17),t._uU(43,"Sold Percentage(%)"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(44,"tbody"),t.YNc(45,iu,17,17,"tr",18),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasExportRole),t.xp6(7),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.Predefined),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.Predefined),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(4),t.Q6J("model",e.pageData.Filter.Predefined)("options",e.RadioDateFilterType),t.xp6(3),t.Q6J("model",e.pageData.Filter.InventoryOnly),t.xp6(19),t.Q6J("ngForOf",e.data.Data)}}let su=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/PruchasedSalesReportList","ReportLoader/PurchaseSalesReportLoader"),this.httpService=e,this.csvConverter=o,this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Range"}],this.GroupRadio=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-sales-report"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],[4,"ngIf"],["type","text","autoNum","",3,"ngModel","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],["name","Inventory",3,"model","modelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light"],[2,"width","55px"],[2,"width","320px"],[2,"width","100px"],[1,"text-right",2,"width","80px"],["class","border-bottom",4,"ngFor","ngForOf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"border-bottom"],[3,"routerLink","queryParams"],[1,"text-right"],[1,"text-right","text-success"]],template:function(e,o){1&e&&t.YNc(0,lu,46,14,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,p.Fj,M.b,D.P,s.sg,f.QB,g.yS],pipes:[s.JJ],styles:[""]}),a})();function pu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.exportCSV(n.csvConverter,"ReportExport/OutletPerformancePurchase","Purchases Transaction ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",32),t._uU(2,"Export"),t.qZA()}}function cu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Compare with prev Month"),t.qZA(),t.TgZ(3,"radio-options",33),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).Compare=n})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare("Data")}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.Compare)}}function _u(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",34),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",35),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function uu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",36),t.TgZ(4,"div",37),t.TgZ(5,"ng-select",38),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Year=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",39),t.TgZ(7,"ng-select",40),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Month=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function gu(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Prev"),t.qZA())}function du(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Now"),t.qZA())}function mu(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1,"Trans"),t.qZA())}function Zu(a,i){if(1&a&&(t.TgZ(0,"th",43),t._uU(1,"Tax"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet")}}function hu(a,i){if(1&a&&(t.TgZ(0,"th",43),t._uU(1," Purchase + Tax"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet")}}function xu(a,i){if(1&a&&(t.TgZ(0,"td",46),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PrevIndex)}}const Tu=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function Cu(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.qZA()),2&a){const e=t.oxw(),o=e.$implicit,n=e.index;t.Q6J("ngClass",t.WLB(2,Tu,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function fu(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Count,".0-0"))}}function Au(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Tax,".0-0"),"")}}const Du=function(a,i,e){return{EntityID:a,From:i,To:e}},qu=function(){return["/menu/Reports/Purchases_Report/Summary"]};function yu(a,i){if(1&a&&(t.TgZ(0,"td",30),t.TgZ(1,"a",48),t.ALo(2,"date"),t.ALo(3,"date"),t.TgZ(4,"b"),t._uU(5),t.ALo(6,"number"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("queryParams",t.kEZ(12,Du,e.EntityID,t.xi3(2,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(3,6,o.pageData.Filter.To,"ddMMyyyy")))("routerLink",t.DdM(16,qu)),t.xp6(4),t.Oqu(t.xi3(6,9,e.SalesWithTax,".0-0"))}}function vu(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",27),t._uU(4),t.qZA(),t.YNc(5,xu,2,1,"td",44),t.YNc(6,Cu,2,5,"td",45),t.YNc(7,fu,3,4,"td",29),t.TgZ(8,"td",30),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",30),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,Au,3,4,"td",29),t.ALo(15,"HideSumZero"),t.YNc(16,yu,7,17,"td",29),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",n.Compare),t.xp6(1),t.Q6J("ngIf",n.Compare),t.xp6(1),t.Q6J("ngIf",!n.data.WithCategory),t.xp6(2),t.Oqu(t.xi3(10,9,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(13,12,e.Sales,".0-0")),t.xp6(2),t.Q6J("ngIf",!n.data.WithCategory&&t.xi3(15,15,n.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!n.data.WithCategory)}}function Su(a,i){1&a&&t._UZ(0,"td",49)}function Mu(a,i){1&a&&t._UZ(0,"td",49)}function bu(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Count"),".0-0"),"")}}function Ou(a,i){if(1&a&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Tax"),".0-0")," ")}}function Ju(a,i){if(1&a&&(t.TgZ(0,"td",30),t.TgZ(1,"a"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,1,t.xi3(4,4,e.data.Data,"SalesWithTax"),".0-0"))}}const Uu=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Group_Performance"]},Fu=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance"]};function Nu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,pu,3,0,"a",2),t.TgZ(3,"div",3),t.TgZ(4,"a",4),t._uU(5,"By Entity Group"),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6),t.TgZ(8,"li",7),t.TgZ(9,"a",8),t._uU(10,"By Month"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",9),t.TgZ(13,"div",10),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Category"),t.qZA(),t.TgZ(17,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Type"),t.qZA(),t.TgZ(21,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Date Filter"),t.qZA(),t.TgZ(25,"radio-options",13),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().IsPredefined=n})("modelChange",function(){return t.CHM(e),t.oxw().YearMonthToDateRange()}),t.qZA(),t.qZA(),t.YNc(26,cu,4,1,"div",14),t.YNc(27,_u,5,2,"div",14),t.YNc(28,uu,8,4,"div",14),t.TgZ(29,"div"),t.TgZ(30,"h6"),t._uU(31,"Exclude complementary"),t.qZA(),t.TgZ(32,"radio-options",15),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ExcludeComplementary=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(33,"content"),t.TgZ(34,"div",16),t.TgZ(35,"table",17),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(36,"thead",18),t.TgZ(37,"tr"),t.TgZ(38,"th"),t._uU(39,"No."),t.qZA(),t.TgZ(40,"th",19),t._uU(41,"Outlet"),t.qZA(),t.YNc(42,gu,2,0,"th",20),t.YNc(43,du,2,0,"th",20),t.YNc(44,mu,2,0,"th",21),t.TgZ(45,"th",22),t._uU(46,"Qty"),t.qZA(),t.TgZ(47,"th",23),t._uU(48,"Purchase"),t.qZA(),t.YNc(49,Zu,2,1,"th",24),t.ALo(50,"HideSumZero"),t.YNc(51,hu,2,1,"th",24),t.qZA(),t.qZA(),t.TgZ(52,"tbody"),t.YNc(53,vu,17,18,"tr",25),t.qZA(),t.TgZ(54,"tfoot"),t.TgZ(55,"tr",26),t._UZ(56,"td"),t._UZ(57,"td",27),t.YNc(58,Su,1,0,"td",28),t.YNc(59,Mu,1,0,"td",28),t.YNc(60,bu,4,7,"td",29),t.TgZ(61,"td",30),t._uU(62),t.ALo(63,"number"),t.ALo(64,"sum"),t.qZA(),t.TgZ(65,"td",30),t._uU(66),t.ALo(67,"number"),t.ALo(68,"sum"),t.qZA(),t.YNc(69,Ou,4,7,"td",29),t.ALo(70,"HideSumZero"),t.YNc(71,Ju,5,7,"td",29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(46,Uu)),t.xp6(5),t.Q6J("routerLink",t.DdM(47,Fu)),t.xp6(8),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.IsPredefined)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",e.IsPredefined),t.xp6(1),t.Q6J("ngIf",!e.IsPredefined),t.xp6(1),t.Q6J("ngIf",e.IsPredefined),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeComplementary),t.xp6(10),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(5),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(50,28,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(2),t.Oqu(t.xi3(63,31,t.xi3(64,34,e.data.Data,"Quantity"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(67,37,t.xi3(68,40,e.data.Data,"Sales"),".0-0")," "),t.xp6(3),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(70,43,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory)}}let Pu=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/OutletPerformancePurchase","ReportLoader/OutletPurchasePerformance"),this.httpService=e,this.csvConverter=o,this.Compare=!1,this.IsPredefined=!0,this.Comparison=0,this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}];const n=new Date;this.Years=C.gT.GenerateYears(n.getFullYear(),11,!0),this.Year=n.getFullYear(),this.Month=n.getMonth(),this.Months=C.gT.Months,this.Months.forEach(r=>r.Label=r.Label.slice(0,3))}YearMonthToDateRange(){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth()),this.pageData.Filter.From=new Date(this.Year,this.Month,1),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0)}postGetList(){this.Compare&&this.OnCompare("Data")}OnCompare(e){const o=e?this.data[e]:this.data;if(o.length<1)return;const n=Object.assign({},this.pageData.Filter);new Date,n.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),n.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/api/Report/OutletPerformancePurchase",JSON.stringify(n)).subscribe(l=>{const Z=e?l[e]:l;this.Comparison=0,o.forEach(x=>{x.PrevIndex="-",x.CurrentIndex="-",x.Increase="-";const b=Z.filter(y=>y.EntityID==x.EntityID);if(x.CurrentIndex=x.Rank,b.length>0){const y=b[0];x.PrevIndex=y.Rank,y.SalesNet?x.Increase=(x.SalesNet-y.SalesNet)/y.SalesNet*100:y.Sales&&(x.Increase=(x.Sales-y.Sales)/y.Sales*100),x.IsPositive=x.Increase>0,x.IsNegative=x.Increase<0,this.Comparison+=x.Increase}})})}sortData(e){const o=this.data.Data.slice();function n(r,l,Z){return(r<l?-1:1)*(Z?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const Z="asc"===e.direction;switch(r.Name=null==r.Name?"":r.Name,l.Name=null==l.Name?"":l.Name,e.active){case"Name":return n(r.Name.toLocaleLowerCase(),l.Name.toLocaleLowerCase(),Z);case"Count":return n(r.Count,l.Count,Z);case"SalesWithTax":return n(r.SalesWithTax,l.SalesWithTax,Z);case"Quantity":return n(r.Quantity,l.Quantity,Z);case"SalesNet":case"SalesTaxNet":return n(r.Sales,l.Sales,Z);case"Tax":return n(r.Tax,l.Tax,Z);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-outlet-performance"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["name","complementary",3,"model","modelChange"],[1,"container-fluid","mt-5"],["matSort","",1,"table",3,"matSortChange"],[1,"thead-light"],["mat-sort-header","Name",1,"freeze","header"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Count","class","align-right",4,"ngIf"],["mat-sort-header","Quantity",1,"align-right"],["mat-sort-header","SalesNet",1,"align-right"],["class","align-right",3,"mat-sort-header",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"freeze","body"],["class","empty-column",4,"ngIf"],["class","text-right",4,"ngIf"],[1,"text-right"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["name","compare",3,"model","modelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[2,"width","35px"],["mat-sort-header","Count",1,"align-right"],[1,"align-right",3,"mat-sort-header"],["style","width: 35px; text-align: center",4,"ngIf"],["style","width: 35px; text-align: center",3,"ngClass",4,"ngIf"],[2,"width","35px","text-align","center"],[2,"width","35px","text-align","center",3,"ngClass"],[3,"queryParams","routerLink"],[1,"empty-column"]],template:function(e,o){1&e&&t.YNc(0,Nu,72,48,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,c.w9,p.JJ,p.On,D.P,m.YE,m.nU,s.sg,f.QB,s.mk],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:["table[_ngcontent-%COMP%] {\n width: 120%;\n}\n\n.sticky-top-thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n top: 0 !important;\n}\n\ndiv.container-fluid.mt-5[_ngcontent-%COMP%] {\n padding-bottom: 1.25rem;\n width: 100%;\n overflow-x: auto;\n}"]}),a})();function Lu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",27),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.exportCSV(n.csvConverter,"ReportExport/OutletGroupPerformancePurchase","Purchases Transaction ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",28),t._uU(2,"Export"),t.qZA()}}function Qu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",32),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(3).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",33),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(3).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(3);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Yu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",34),t.TgZ(4,"div",35),t.TgZ(5,"ng-select",36),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(3).Year=n})("change",function(){return t.CHM(e),t.oxw(3).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(3).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",37),t.TgZ(7,"ng-select",38),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(3).Month=n})("change",function(){return t.CHM(e),t.oxw(3).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(3).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(3);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function Ru(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Compare with prev Month"),t.qZA(),t.TgZ(3,"radio-options",39),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(3).Compare=n})("modelChange",function(){return t.CHM(e),t.oxw(3).OnCompare()}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(3);t.xp6(3),t.Q6J("model",e.Compare)}}function Eu(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",29),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Date Filter"),t.qZA(),t.TgZ(4,"radio-options",30),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).IsPredefined=n}),t.qZA(),t.qZA(),t.YNc(5,Qu,5,2,"div",26),t.YNc(6,Yu,8,4,"div",26),t.TgZ(7,"div"),t.TgZ(8,"h6"),t._uU(9,"Type"),t.qZA(),t.TgZ(10,"ng-select",31),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.YNc(11,Ru,4,1,"div",26),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("model",e.IsPredefined)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.IsPredefined),t.xp6(1),t.Q6J("ngIf",e.IsPredefined),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(1),t.Q6J("ngIf",e.IsPredefined)}}function ku(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1,"Prev"),t.qZA())}function Hu(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1,"Now"),t.qZA())}function Vu(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1," \xb1 (%) "),t.qZA())}function Bu(a,i){if(1&a&&(t.TgZ(0,"td",40),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.PrevIndex," ")}}const Gu=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function ju(a,i){if(1&a&&(t.TgZ(0,"td",45),t._uU(1),t.qZA()),2&a){const e=t.oxw(),o=e.$implicit,n=e.index;t.Q6J("ngClass",t.WLB(2,Gu,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}const Wu=function(a,i){return{"text-danger":a,"text-success":i,"text-right":!0}};function $u(a,i){if(1&a&&(t.TgZ(0,"td",46),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(5,Wu,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0")," ")}}function Ku(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,Bu,2,1,"td",14),t.YNc(2,ju,2,5,"td",42),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",43),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",25),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",25),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",25),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"td",25),t._uU(18),t.ALo(19,"number"),t.qZA(),t.YNc(20,$u,3,8,"td",44),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.Compare),t.xp6(1),t.Q6J("ngIf",o.Compare),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.xi3(7,9,e.Count,".0-0")),t.xp6(3),t.Oqu(t.xi3(10,12,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(13,15,e.Sales,".0-0")),t.xp6(3),t.Oqu(t.xi3(16,18,e.Tax,".0-0")),t.xp6(3),t.hij(" ",t.xi3(19,21,e.SalesWithTax,".0-0")," "),t.xp6(2),t.Q6J("ngIf",o.Compare)}}function Xu(a,i){1&a&&t._UZ(0,"td",24)}function zu(a,i){1&a&&t._UZ(0,"td",24)}function tg(a,i){1&a&&t._UZ(0,"td")}const eg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance"]},ng=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance"]};function og(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Lu,3,0,"a",2),t.TgZ(3,"div",3),t.TgZ(4,"a",4),t._uU(5,"By Entity"),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6),t.TgZ(8,"li",7),t.TgZ(9,"a",8),t._uU(10,"By Month"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",9),t.YNc(13,Eu,12,7,"div",10),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.TgZ(15,"div",11),t.TgZ(16,"table",12),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(17,"thead",13),t.TgZ(18,"tr"),t.YNc(19,ku,2,0,"th",14),t.YNc(20,Hu,2,0,"th",14),t.TgZ(21,"th",15),t._uU(22,"Outlet"),t.qZA(),t.TgZ(23,"th",16),t._uU(24,"Trans"),t.qZA(),t.TgZ(25,"th",17),t._uU(26,"Quantity"),t.qZA(),t.TgZ(27,"th",18),t._uU(28,"Purchase"),t.qZA(),t.TgZ(29,"th",19),t._uU(30,"Tax"),t.qZA(),t.TgZ(31,"th",19),t._uU(32,"Purchase + Tax"),t.qZA(),t.YNc(33,Vu,2,0,"th",20),t.qZA(),t.qZA(),t.TgZ(34,"tbody"),t.YNc(35,Ku,21,24,"tr",21),t.qZA(),t.TgZ(36,"tfoot"),t.TgZ(37,"tr",22),t.YNc(38,Xu,1,0,"td",23),t.YNc(39,zu,1,0,"td",23),t._UZ(40,"td",24),t.TgZ(41,"td",25),t._uU(42),t.ALo(43,"number"),t.ALo(44,"sum"),t.qZA(),t.TgZ(45,"td",25),t._uU(46),t.ALo(47,"number"),t.ALo(48,"sum"),t.qZA(),t.TgZ(49,"td",25),t._uU(50),t.ALo(51,"number"),t.ALo(52,"sum"),t.qZA(),t.TgZ(53,"td",25),t._uU(54),t.ALo(55,"number"),t.ALo(56,"sum"),t.qZA(),t.TgZ(57,"td",25),t.TgZ(58,"a"),t._uU(59),t.ALo(60,"number"),t.ALo(61,"sum"),t.qZA(),t.qZA(),t.YNc(62,tg,1,0,"td",26),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(50,eg)),t.xp6(5),t.Q6J("routerLink",t.DdM(51,ng)),t.xp6(4),t.Q6J("ngIf",e.pageData.Filter),t.xp6(6),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(9),t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet"),t.xp6(2),t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet"),t.xp6(2),t.Q6J("ngIf",e.Compare),t.xp6(2),t.Q6J("ngForOf",e.data),t.xp6(3),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(3),t.Oqu(t.xi3(43,20,t.xi3(44,23,e.data,"Count"),".0-0")),t.xp6(4),t.Oqu(t.xi3(47,26,t.xi3(48,29,e.data,"Quantity"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(51,32,t.xi3(52,35,e.data,"Sales"),".0-0")," "),t.xp6(4),t.hij(" ",t.xi3(55,38,t.xi3(56,41,e.data,"Tax"),".0-0")," "),t.xp6(5),t.Oqu(t.xi3(60,44,t.xi3(61,47,e.data,"SalesWithTax"),".0-0")),t.xp6(3),t.Q6J("ngIf",e.Compare)}}let rg=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/OutletGroupPerformancePurchase","ReportLoader/OutletPurchasePerformance"),this.httpService=e,this.csvConverter=o,this.Compare=!1,this.IsPredefined=!0,this.Comparison=0,this.RadioDateFilterType=[{Key:!0,Value:"Predefined"},{Key:!1,Value:"Range"}],this.first=!0,this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const n=new Date;this.Years=C.gT.GenerateYears(n.getFullYear(),11,!0),this.Year=n.getFullYear(),this.Month=n.getMonth(),this.Months=C.gT.Months,this.Months.forEach(r=>r.Label=r.Label.slice(0,3))}preGetList(){this.first&&(this.YearMonthToDateRange(),this.first=!1)}postInit(){this.Compare&&this.OnCompare()}OnCompare(e){const o=e?this.data[e]:this.data;if(o.length<1)return;const n=Object.assign({},this.pageData.Filter);new Date,n.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),n.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/api/Report/OutletGroupPerformancePurchase",JSON.stringify(n)).subscribe(l=>{const Z=e?l[e]:l;this.Comparison=0,o.forEach(x=>{x.PrevIndex="-",x.CurrentIndex="-",x.Increase="-";const b=Z.filter(y=>y.EntityID==x.EntityID);if(x.CurrentIndex=x.Rank,b.length>0){const y=b[0];x.PrevIndex=y.Rank,y.SalesNet?x.Increase=(x.SalesNet-y.SalesNet)/y.SalesNet*100:y.Sales&&(x.Increase=(x.Sales-y.Sales)/y.Sales*100),x.IsPositive=x.Increase>0,x.IsNegative=x.Increase<0,this.Comparison+=x.Increase}})})}YearMonthToDateRange(){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth()),this.pageData.Filter.From=new Date(this.Year,this.Month,1),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0)}sortData(e){const o=this.data.slice();this.data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Count":return this.compare(n.Count,r.Count,l);case"SalesWithTax":return this.compare(n.SalesWithTax,r.SalesWithTax,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Sales":case"SalesNet":case"SalesTaxNet":return this.compare(n.Sales,r.Sales,l);case"Tax":return this.compare(n.Tax,r.Tax,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-outlet-group-performance"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],[1,"container-fluid","mt-5"],["matSort","",1,"table",3,"matSortChange"],[1,"thead-light"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Name"],["mat-sort-header","Count",1,"align-right",2,"width","70px"],["mat-sort-header","Quantity",1,"align-right",2,"width","70px"],["mat-sort-header","Sales",1,"align-right",2,"width","120px"],[1,"align-right",2,"width","120px",3,"mat-sort-header"],["style","width: 50px;",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","empty-column",4,"ngIf"],[1,"empty-column"],[1,"text-right"],[4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["name","Date Filter",3,"model","options","modelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],["name","compare",3,"model","modelChange"],[2,"width","35px"],[2,"width","50px"],["style","width: 35px;",3,"ngClass",4,"ngIf"],[1,"text-right",2,"width","70px"],[3,"ngClass",4,"ngIf"],[2,"width","35px",3,"ngClass"],[3,"ngClass"]],template:function(e,o){1&e&&t.YNc(0,og,63,52,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,m.YE,m.nU,s.sg,D.P,c.w9,p.JJ,p.On,f.QB,s.mk],pipes:[s.JJ,T.qU],styles:[""]}),a})();function ig(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return n.convertToCSV(n.csvConverter,!0,"Monthly Outlet Performance ["+n.pageData.Filter.From+" - "+n.pageData.Filter.To+"].csv")}),t._UZ(1,"i",18),t._uU(2,"Export"),t.qZA()}}function lg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Year"),t.qZA(),t.TgZ(4,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Type"),t.qZA(),t.TgZ(8,"ng-select",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types)}}function sg(a,i){if(1&a&&(t.TgZ(0,"th",22),t._uU(1),t.qZA()),2&a){const e=i.$implicit;t.Q6J("mat-sort-header",e),t.xp6(1),t.Oqu(e)}}function pg(a,i){if(1&a&&(t.TgZ(0,"p",24),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function cg(a,i){if(1&a&&(t.TgZ(0,"p",24),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,o[e]))}}function _g(a,i){if(1&a&&(t.TgZ(0,"td"),t.YNc(1,pg,2,1,"p",23),t.YNc(2,cg,3,3,"p",23),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Q6J("ngIf","Outlet"==e),t.xp6(1),t.Q6J("ngIf","Outlet"!=e)}}function ug(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,_g,3,2,"td",15),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKey(e))}}function gg(a,i){if(1&a&&(t.TgZ(0,"td",26),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e))}}function dg(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",25),t.TgZ(2,"td",26),t._uU(3,"Total : "),t.qZA(),t.YNc(4,gg,3,3,"td",27),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.DataFooter)}}const mg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance"]},hg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Group_Performance"]};function xg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ig,3,0,"a",2),t.TgZ(3,"div",3),t.TgZ(4,"a",4),t._uU(5,"By Entity"),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6),t.TgZ(8,"li",7),t.TgZ(9,"a",8),t._uU(10,"By Entity Group"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",9),t.YNc(13,lg,9,4,"div",10),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.TgZ(15,"div",11),t.TgZ(16,"table",12),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(17,"thead",13),t.TgZ(18,"tr"),t.YNc(19,sg,2,2,"th",14),t.qZA(),t.qZA(),t.TgZ(20,"tbody"),t.YNc(21,ug,2,1,"tr",15),t.qZA(),t.YNc(22,dg,5,1,"tfoot",16),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(9,mg)),t.xp6(5),t.Q6J("routerLink",t.DdM(10,hg)),t.xp6(4),t.Q6J("ngIf",e.pageData.Filter),t.xp6(6),t.Q6J("ngForOf",e.data.Dataheader),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}let Tg=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/MonthlyOutletPerformancePurchase","ReportLoader/MonthlyReportPurchase"),this.httpService=e,this.csvConverter=o;const n=new Date;this.Years=C.gT.GenerateYears(n.getFullYear(),11,!0)}getKey(e){return Object.keys(e)}sortData(e){const o=this.data.Data.slice();function n(r,l,Z){return(r<l?-1:1)*(Z?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const Z="asc"===e.direction;for(let x=0;x<this.data.Dataheader.length;x++)if(e.active==this.data.Dataheader[x])return"string"==typeof r[this.data.Dataheader[x]]?n(r[this.data.Dataheader[x]].toLocaleLowerCase(),l[this.data.Dataheader[x]].toLocaleLowerCase(),Z):n(r[this.data.Dataheader[x]],l[this.data.Dataheader[x]],Z)}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-outlet-monthly-performance"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],[1,"container-fluid","mt-5"],["matSort","",1,"table",3,"matSortChange"],[1,"table-light"],[3,"mat-sort-header",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],[3,"mat-sort-header"],["style","color: black;",4,"ngIf"],[2,"color","black"],[1,"table-footer"],[1,""],["class","",4,"ngFor","ngForOf"]],template:function(e,o){1&e&&t.YNc(0,xg,23,11,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,m.YE,s.sg,c.w9,p.JJ,p.On,m.nU],pipes:[s.JJ],styles:[""]}),a})();function Cg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",5),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/CitySalesExport","CitySalesReport.csv")}),t._UZ(1,"i",6),t._uU(2,"Export"),t.qZA()}}function fg(a,i){if(1&a&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Ag(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Category"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(5,fg,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"From/To"),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(10,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.to=n}),t.qZA(),t.qZA(),t.TgZ(11,"div"),t.TgZ(12,"h6"),t._uU(13,"Currency"),t.qZA(),t.TgZ(14,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.to),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",null==e.pageData.Options?null:e.pageData.Options.Currencies)}}function Dg(a,i){if(1&a&&(t.TgZ(0,"tr"),t._UZ(1,"td",25),t._UZ(2,"td",25),t._UZ(3,"td",26),t.ALo(4,"number"),t._UZ(5,"td",26),t.ALo(6,"number"),t._UZ(7,"td",26),t.ALo(8,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Q6J("innerHtml",e.CityCode,t.oJD),t.xp6(1),t.Q6J("innerHtml",e.CityName,t.oJD),t.xp6(1),t.Q6J("innerHtml",t.lcZ(4,5,e.Quantity),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(6,7,e.Total),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(8,9,e.Average),t.oJD)}}function qg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",16),t.TgZ(3,"tr"),t.TgZ(4,"th",17),t._uU(5,"Code"),t.qZA(),t.TgZ(6,"th",18),t._uU(7,"Regional Name"),t.qZA(),t.TgZ(8,"th",19),t._uU(9,"Quantity"),t.qZA(),t.TgZ(10,"th",20),t._uU(11,"Total"),t.qZA(),t.TgZ(12,"th",21),t._uU(13,"Avg. Price"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"tbody"),t.YNc(15,Dg,9,11,"tr",22),t.qZA(),t.TgZ(16,"tfoot"),t.TgZ(17,"tr",23),t._UZ(18,"td",24),t.TgZ(19,"td",24),t._uU(20,"Total :"),t.qZA(),t.TgZ(21,"td",24),t._uU(22),t.ALo(23,"number"),t.ALo(24,"sum"),t.qZA(),t.TgZ(25,"td",24),t._uU(26),t.ALo(27,"number"),t.ALo(28,"sum"),t.qZA(),t.TgZ(29,"td",24),t._uU(30),t.ALo(31,"number"),t.ALo(32,"sum"),t.ALo(33,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(15),t.Q6J("ngForOf",e.data.List),t.xp6(7),t.Oqu(t.lcZ(23,4,t.xi3(24,6,e.data.List,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(27,9,t.xi3(28,11,e.data.List,"Total"))),t.xp6(4),t.hij(" ",t.lcZ(31,14,t.xi3(32,16,e.data.List,"Total")/t.xi3(33,19,e.data.List,"Quantity"))," ")}}let yg=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/CitySales","ReportLoader/CitySalesLoader",o),this.httpService=e,this.csvConverter=n}postInit(e){this.menuData.H=e.PageTitle}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"CityCode":return this.compare(n.CityCode,r.CityCode,l);case"CityName":return this.compare(n.CityName,r.CityName,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Average":return this.compare(n.Average,r.Average,l);case"Total":return this.compare(n.Total,r.Total,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-city"]],features:[t.qOj],decls:8,vars:5,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","CityCode",2,"width","80px"],["mat-sort-header","CityName",2,"width","220px"],["mat-sort-header","Quantity",1,"align-right",2,"width","70px"],["mat-sort-header","Total",1,"align-right",2,"width","100px"],["mat-sort-header","Average",1,"align-right",2,"width","100px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Cg,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,Ag,15,6,"div",3),t.qZA(),t.qZA(),t.TgZ(6,"content"),t.YNc(7,qg,34,22,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",null==o.pageData.Role?null:o.pageData.Role.HasExportRole),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function vg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.from=n}),t.qZA(),t.TgZ(9,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.to=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.from),t.xp6(1),t.Q6J("date",e.pageData.Filter.to)}}const Sg=function(a,i,e,o){return{SalesTypeID:a,OutletID:i,From:e,To:o}},Mg=function(a){return["/menu/Reports/Sales_Report/Standard/Detail",a]};function bg(a,i){if(1&a&&(t.TgZ(0,"tr"),t._UZ(1,"td",22),t._UZ(2,"td",23),t.ALo(3,"number"),t._UZ(4,"td",23),t.ALo(5,"number"),t.TgZ(6,"td",18),t.TgZ(7,"a",24),t.ALo(8,"date"),t.ALo(9,"date"),t._uU(10),t.ALo(11,"number"),t.qZA(),t.qZA(),t._UZ(12,"td",25),t.ALo(13,"number"),t._UZ(14,"td",26),t.ALo(15,"number"),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("innerHtml",e.Name,t.oJD),t.xp6(1),t.Q6J("innerHtml",t.lcZ(3,7,e.Count),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(5,9,e.Quantity),t.oJD),t.xp6(3),t.Q6J("routerLink",t.VKq(28,Mg,t.l5B(23,Sg,e.TypeID,o.getOutletID(),t.xi3(8,11,o.getFrom(),"ddMMyyyy"),t.xi3(9,14,o.getTo(),"ddMMyyyy")))),t.xp6(3),t.Oqu(t.lcZ(11,17,e.Gross)),t.xp6(2),t.Q6J("innerHtml",t.lcZ(13,19,e.Sales),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(15,21,e.Cost),t.oJD)}}function Og(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",10),t.TgZ(1,"table",11),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",12),t.TgZ(3,"tr"),t.TgZ(4,"th",13),t._uU(5,"Type Name"),t.qZA(),t.TgZ(6,"th",14),t._uU(7,"Trans"),t.qZA(),t.TgZ(8,"th",15),t._uU(9,"Quantity"),t.qZA(),t.TgZ(10,"th",15),t._uU(11,"Gross"),t.qZA(),t.TgZ(12,"th",15),t._uU(13,"Sales"),t.qZA(),t.TgZ(14,"th",15),t._uU(15,"Cost"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,bg,16,30,"tr",16),t.qZA(),t.TgZ(18,"tfoot"),t.TgZ(19,"tr",17),t._UZ(20,"td",18),t.TgZ(21,"td",18),t._uU(22),t.ALo(23,"number"),t.ALo(24,"sum"),t.qZA(),t.TgZ(25,"td",18),t._uU(26),t.ALo(27,"number"),t.ALo(28,"sum"),t.qZA(),t.TgZ(29,"td",19),t.TgZ(30,"a"),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA(),t.qZA(),t.TgZ(34,"td",20),t._uU(35),t.ALo(36,"number"),t.ALo(37,"sum"),t.qZA(),t.TgZ(38,"td",21),t._uU(39),t.ALo(40,"number"),t.ALo(41,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(17),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.lcZ(23,6,t.xi3(24,8,e.data.Data,"Count"))),t.xp6(4),t.Oqu(t.lcZ(27,11,t.xi3(28,13,e.data.Data,"Quantity"))),t.xp6(5),t.Oqu(t.lcZ(32,16,t.xi3(33,18,e.data.Data,"Gross"))),t.xp6(4),t.Oqu(t.lcZ(36,21,t.xi3(37,23,e.data.Data,"Sales"))),t.xp6(4),t.Oqu(t.lcZ(40,26,t.xi3(41,28,e.data.Data,"Cost")))}}let Jg=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/TypeSales","ReportLoader/TypeSalesLoader",o),this.httpService=e,this.csvConverter=n;const r=new Date;this.month=r.getMonth(),this.year=r.getFullYear()}postInit(e){this.menuData.H=e.PageTitle}getFrom(){return new Date(this.year,this.month,1).toLocaleDateString()}getTo(){return new Date(this.year,this.month+1,0).toLocaleDateString()}getOutletID(){return"00000000-0000-0000-0000-000000000000"!=this.pageData.Filter.EntityID&&this.pageData.Filter.EntityID?this.pageData.Filter.EntityID:"00000000-0000-0000-0000-000000000000"}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"TypeName":return this.compare(n.TypeName,r.TypeName,l);case"Trans":return this.compare(n.Trans,r.Trans,l);case"Quality":return this.compare(n.Quality,r.Quality,l);case"Gross":return this.compare(n.Gross,r.Gross,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Cost":return this.compare(n.Cost,r.Cost,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-type"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","140px"],[1,"text-right",2,"width","70px"],[1,"text-right",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[1,"text-right","text-primary"],[1,"text-right","text-success"],[1,"text-right","text-danger"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"],[3,"routerLink"],[1,"text-right","text-success",3,"innerHtml"],[1,"text-right","text-danger",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"TypeSalesReport.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,vg,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Og,42,31,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,s.sg,g.yS],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function Ig(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Ug(a,i){1&a&&(t.TgZ(0,"th",15),t._uU(1,"Profit"),t.qZA())}function wg(a,i){if(1&a&&(t.TgZ(0,"tr"),t._UZ(1,"td",22),t._UZ(2,"td",23),t.ALo(3,"number"),t._UZ(4,"td",23),t.ALo(5,"number"),t._UZ(6,"td",23),t.ALo(7,"number"),t._UZ(8,"td",24),t.ALo(9,"number"),t._UZ(10,"td",25),t.ALo(11,"number"),t._UZ(12,"td",24),t.ALo(13,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.Q6J("innerHtml",e.GroupName,t.oJD),t.xp6(1),t.Q6J("innerHtml",t.lcZ(3,7,e.Count),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(5,9,e.Quantity),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(7,11,e.Gross),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(9,13,e.Sales),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(11,15,e.Cost),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(13,17,e.Profit),t.oJD)}}function Fg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",10),t.TgZ(1,"table",11),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",12),t.TgZ(3,"tr"),t.TgZ(4,"th",13),t._uU(5,"Group Name"),t.qZA(),t.TgZ(6,"th",14),t._uU(7,"Trans"),t.qZA(),t.TgZ(8,"th",15),t._uU(9,"Quantity"),t.qZA(),t.TgZ(10,"th",15),t._uU(11,"Gross"),t.qZA(),t.TgZ(12,"th",15),t._uU(13,"Sales"),t.qZA(),t.TgZ(14,"th",15),t._uU(15,"Cost"),t.qZA(),t.YNc(16,Ug,2,0,"th",16),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,wg,14,19,"tr",17),t.qZA(),t.TgZ(19,"tfoot"),t.TgZ(20,"tr",18),t._UZ(21,"td",19),t.TgZ(22,"td",19),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",19),t._uU(27),t.ALo(28,"number"),t.ALo(29,"sum"),t.qZA(),t.TgZ(30,"td",19),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA(),t.TgZ(34,"td",20),t._uU(35),t.ALo(36,"number"),t.ALo(37,"sum"),t.qZA(),t.TgZ(38,"td",21),t._uU(39),t.ALo(40,"number"),t.ALo(41,"sum"),t.qZA(),t.TgZ(42,"td",20),t._uU(43),t.ALo(44,"number"),t.ALo(45,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(16),t.Q6J("ngIf",!e.pageData.HasRole),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.lcZ(24,8,t.xi3(25,10,e.data.Data,"Count"))),t.xp6(4),t.Oqu(t.lcZ(28,13,t.xi3(29,15,e.data.Data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(32,18,t.xi3(33,20,e.data.Data,"Gross"))),t.xp6(4),t.Oqu(t.lcZ(36,23,t.xi3(37,25,e.data.Data,"Sales"))),t.xp6(4),t.Oqu(t.lcZ(40,28,t.xi3(41,30,e.data.Data,"Cost"))),t.xp6(4),t.Oqu(t.lcZ(44,33,t.xi3(45,35,e.data.Data,"Profit")))}}let Ng=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/CustomerGroup","ReportLoader/CustomerGroupLoader",o),this.httpService=e,this.csvConverter=n,this.first=!0}preGetList(){if(this.first){const e=new Date,o=e.getMonth(),n=e.getFullYear();this.pageData.Filter.From=new Date(n,o,1).toDateString(),this.pageData.Filter.To=new Date(n,o+1,0).toDateString()}}postInit(e){if(this.menuData.H=e.PageTitle,this.first){const o=new Date,n=o.getMonth(),r=o.getFullYear();this.pageData.Filter.From=new Date(r,n,1),this.pageData.Filter.To=new Date(r,n+1,0),this.first=!1}}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"GroupName":return this.compare(n.GroupName,r.GroupName,l);case"Trans":return this.compare(n.Trans,r.Trans,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Gross":return this.compare(n.Gross,r.Gross,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-customer-group"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","140px"],[1,"text-right",2,"width","70px"],[1,"text-right",2,"width","120px"],["style","width: 120px;","class","text-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[1,"text-right","text-success"],[1,"text-right","text-danger"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"],[1,"text-right","text-success",3,"innerHtml"],[1,"text-right","text-danger",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"CustomerGroupSalesReport.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Ig,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Fg,46,38,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Pg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",5),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/SalesGroup","SalesGroupPerformance.csv")}),t._UZ(1,"i",6),t._uU(2,"Export"),t.qZA()}}function Lg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Qg(a,i){1&a&&(t.TgZ(0,"th",15),t._uU(1,"Profit"),t.qZA())}function Yg(a,i){if(1&a&&(t._UZ(0,"td",25),t.ALo(1,"number")),2&a){const e=t.oxw().$implicit;t.Q6J("innerHtml",t.lcZ(1,1,e.ActualProfit),t.oJD)}}function Rg(a,i){if(1&a&&(t.TgZ(0,"tr"),t._UZ(1,"td",22),t._UZ(2,"td",23),t.ALo(3,"number"),t._UZ(4,"td",23),t.ALo(5,"number"),t._UZ(6,"td",23),t.ALo(7,"number"),t._UZ(8,"td",23),t.YNc(9,Yg,2,3,"td",24),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("innerHtml",e.Name,t.oJD),t.xp6(1),t.Q6J("innerHtml",t.lcZ(3,6,e.InvoiceCount),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(5,8,e.NetRevenue),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.lcZ(7,10,e.SalesTarget),t.oJD),t.xp6(2),t.Q6J("innerHtml",e.Percentage+"%",t.oJD),t.xp6(1),t.Q6J("ngIf",!o.pageData.HasRole)}}function Eg(a,i){if(1&a&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"ActualProfit")),"")}}function kg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",11),t.TgZ(1,"table",12),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",13),t.TgZ(3,"tr",14),t.TgZ(4,"th"),t._uU(5,"Group Name"),t.qZA(),t.TgZ(6,"th",15),t._uU(7,"Count"),t.qZA(),t.TgZ(8,"th",15),t._uU(9,"Actual"),t.qZA(),t.TgZ(10,"th",15),t._uU(11,"Target"),t.qZA(),t.TgZ(12,"th",15),t._uU(13,"Percentage"),t.qZA(),t.YNc(14,Qg,2,0,"th",16),t.qZA(),t.qZA(),t.TgZ(15,"tbody"),t.YNc(16,Rg,10,12,"tr",17),t.qZA(),t.TgZ(17,"tfoot"),t.TgZ(18,"tr",18),t._UZ(19,"td",19),t._UZ(20,"td",19),t.TgZ(21,"td",20),t._uU(22),t.ALo(23,"number"),t.ALo(24,"sum"),t.qZA(),t._UZ(25,"td",19),t._UZ(26,"td",19),t.YNc(27,Eg,4,6,"td",21),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(14),t.Q6J("ngIf",!e.pageData.HasRole),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.lcZ(23,4,t.xi3(24,6,e.data.Data,"GrossRevenue"))),t.xp6(5),t.Q6J("ngIf",!e.pageData.HasRole)}}let Hg=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/SalesGroup","ReportLoader/SalesGroupLoader",o),this.httpService=e,this.csvConverter=n,this.first=!0}preGetList(){if(this.first){const e=new Date,o=e.getMonth(),n=e.getFullYear();this.pageData.Filter.From=new Date(n,o,1).toDateString(),this.pageData.Filter.To=new Date(n,o+1,0).toDateString()}}postInit(e){if(this.menuData.H=e.PageTitle,this.first){const o=new Date,n=o.getMonth(),r=o.getFullYear();this.pageData.Filter.From=new Date(r,n,1),this.pageData.Filter.To=new Date(r,n+1,0),this.first=!1}}sortData(e){const o=this.data.List.slice();e.active&&""!==e.direction||(this.data.List=o)}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-sales-group"]],features:[t.qOj],decls:8,vars:5,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-right",2,"width","120px"],["style","width: 120px;","class","text-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right","empty-column"],[1,"text-right"],["class","text-right ",4,"ngIf"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"],["class","text-right text-success",3,"innerHtml",4,"ngIf"],[1,"text-right","text-success",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Pg,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,Lg,10,4,"div",3),t.qZA(),t.qZA(),t.TgZ(6,"content"),t.YNc(7,kg,28,9,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Vg(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Category"),t.qZA(),t.TgZ(13,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types)("clearable",!1)}}function Bg(a,i){if(1&a&&t._UZ(0,"th",27),2&a){const e=i.$implicit;t.Q6J("innerHtml",e.Label+" ("+e.Rate+"%)",t.oJD)}}function Gg(a,i){if(1&a&&(t._UZ(0,"td",31),t.ALo(1,"number"),t.ALo(2,"TaxDefault")),2&a){const e=i.index,o=t.oxw().$implicit,n=t.oxw(2);t.Q6J("innerHtml",t.lcZ(1,1,t.Dn7(2,3,n.data.Compenents,o,e)),t.oJD)}}function jg(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",28),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.ALo(10,"date"),t.qZA(),t.TgZ(11,"td",29),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",29),t._uU(15),t.ALo(16,"number"),t.qZA(),t.YNc(17,Gg,3,7,"td",30),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.xi3(10,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.lcZ(13,11,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(16,13,e.Tax)),t.xp6(2),t.Q6J("ngForOf",o.getComponent(o.data))}}function Wg(a,i){if(1&a&&(t.TgZ(0,"td",32),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.SumTaxAmount)," ")}}function $g(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",14),t.TgZ(3,"tr"),t.TgZ(4,"th",15),t._uU(5,"Outlet"),t.qZA(),t.TgZ(6,"th",16),t._uU(7,"Number"),t.qZA(),t.TgZ(8,"th",17),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"th",18),t._uU(11,"Date"),t.qZA(),t.TgZ(12,"th",19),t._uU(13,"Sales"),t.qZA(),t.TgZ(14,"th",20),t._uU(15,"Tax"),t.qZA(),t.YNc(16,Bg,1,1,"th",21),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,jg,18,15,"tr",22),t.qZA(),t.TgZ(19,"tfoot"),t.TgZ(20,"tr",23),t._UZ(21,"td",24),t.TgZ(22,"td",25),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",25),t._uU(27),t.ALo(28,"number"),t.ALo(29,"sum"),t.qZA(),t.YNc(30,Wg,3,3,"td",26),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(16),t.Q6J("ngForOf",e.data.Compenents),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.lcZ(24,5,t.xi3(25,7,e.data.Data,"Sales"))),t.xp6(4),t.Oqu(t.lcZ(28,10,t.xi3(29,12,e.data.Data,"Tax"))),t.xp6(3),t.Q6J("ngForOf",e.data.Compenents)}}const Xg=function(){return["/menu/Reports/Sales_Report/Advanced/Tax_Report/By_Outlet"]};let zg=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/GetTaxReport","ReportLoader/GetTaxReport",o),this.httpService=e,this.csvConverter=n}getComponent(e){return e.Component=[],this.data.Compenents.forEach((o,n)=>{0!=e.Tax?(o.SalesTax=0==n?e.Sales:this.data.Compenents[n-1].SalesTax,o.SalesTax=0==n?o.SalesTax:o.SalesTax+o.SalesTax*this.data.Compenents[n-1].Rate/100,e.Component[n]=o.SalesTax*o.Rate/100,o.SumTaxAmount=o.SumTaxAmount+e.Component[n]):e.Component[n]=0}),e.Component}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(n.Name=null==n.Name?"":n.Name,r.Name=null==r.Name?"":r.Name,n.EntityName=null==n.EntityName?"":n.EntityName,r.EntityName=null==r.EntityName?"":r.EntityName,e.active){case"Name":return this.compare(n.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Outlet":return this.compare(n.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"Number":return this.compare(n.Number,r.Number,l);case"Date":return this.compare(n.Date,r.Date,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Tax":return this.compare(n.Tax,r.Tax,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-tax-report"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","text","textChange","onSubmit"],["title","Tax Report By Outlet",1,"btn","btn-success","mr-6",3,"routerLink"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Label","bindValue","ID","placeholder","Choose a Type",3,"ngModel","items","clearable","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Outlet",2,"width","150px"],["mat-sort-header","Number"],["mat-sort-header","Name"],["mat-sort-header","Date",2,"width","100px"],["mat-sort-header","Sales",1,"align-right",2,"width","150px"],["mat-sort-header","Tax",1,"align-right","text-right",2,"width","150px"],["style","width: 150px","class","align-right text-right",3,"innerHtml",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-right","empty-column"],[1,"text-right","text-success"],["class","text-right","style","width: 150px",4,"ngFor","ngForOf"],[1,"align-right","text-right",2,"width","150px",3,"innerHtml"],[3,"href"],[1,"text-right"],["class","text-right","style","width: 150px",3,"innerHtml",4,"ngFor","ngForOf"],[1,"text-right",2,"width","150px",3,"innerHtml"],[1,"text-right",2,"width","150px"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"By Outlet"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"TaxReport.csv")}),t._UZ(5,"i",3),t._uU(6,"Export"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Vg,14,8,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,$g,31,15,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(2),t.Q6J("routerLink",t.DdM(5,Xg)),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU,T.X6],styles:[""]}),a})();function td(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Tax Type"),t.qZA(),t.TgZ(13,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types)("clearable",!1)}}function ed(a,i){1&a&&(t.TgZ(0,"th",25),t._uU(1,"Total Tax"),t.qZA())}function ad(a,i){if(1&a&&t._UZ(0,"th",26),2&a){const e=i.$implicit;t.Q6J("innerHtml",e.Label+" ("+e.Rate+"%)",t.oJD)}}function nd(a,i){if(1&a&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Tax))}}function od(a,i){if(1&a&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e)," ")}}function rd(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",27),t._uU(4),t.ALo(5,"number"),t.qZA(),t.YNc(6,nd,3,3,"td",28),t.YNc(7,od,3,3,"td",24),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Oqu(t.lcZ(5,4,e.Sales)),t.xp6(2),t.Q6J("ngIf",0==o.data.Compenents.length),t.xp6(1),t.Q6J("ngForOf",o.getComponent(e))}}function id(a,i){if(1&a&&(t.TgZ(0,"td",22),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Tax")),"")}}function ld(a,i){if(1&a&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.SumTaxAmount)," ")}}function sd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",14),t.TgZ(3,"tr"),t.TgZ(4,"th",15),t._uU(5,"Outlet"),t.qZA(),t.TgZ(6,"th",16),t._uU(7,"Sales"),t.qZA(),t.YNc(8,ed,2,0,"th",17),t.YNc(9,ad,1,1,"th",18),t.qZA(),t.qZA(),t.TgZ(10,"tbody"),t.YNc(11,rd,8,6,"tr",19),t.qZA(),t.TgZ(12,"tfoot"),t.TgZ(13,"tr",20),t._UZ(14,"td",21),t.TgZ(15,"td",22),t._uU(16),t.ALo(17,"number"),t.ALo(18,"sum"),t.qZA(),t.YNc(19,id,4,6,"td",23),t.YNc(20,ld,3,3,"td",24),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(8),t.Q6J("ngIf",0==e.data.Compenents.length),t.xp6(1),t.Q6J("ngForOf",e.data.Compenents),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.lcZ(17,6,t.xi3(18,8,e.data.Data,"Sales"))),t.xp6(3),t.Q6J("ngIf",0==e.data.Compenents.length),t.xp6(1),t.Q6J("ngForOf",e.data.Compenents)}}const pd=function(){return["/menu/Reports/Sales_Report/Advanced/Tax_Report"]};let cd=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/GetTaxReportbyOutlet","ReportLoader/GetTaxReport",o),this.httpService=e,this.csvConverter=n}getComponent(e){return e.Component=[],this.data.Compenents.forEach((o,n)=>{o.SalesTax=0==n?e.Sales:this.data.Compenents[n-1].SalesTax,o.SalesTax=0==n?o.SalesTax:o.SalesTax+o.SalesTax*this.data.Compenents[n-1].Rate/100,e.Component[n]=o.SalesTax*o.Rate/100,o.SumTaxAmount=o.SumTaxAmount+e.Component[n]}),e.Component}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Outlet":return this.compare(n.EntityName,r.EntityName,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Tax":return this.compare(n.Tax,r.Tax,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-tax-report-by-outlet"]],features:[t.qOj],decls:12,vars:7,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["title","Tax Report By Outlet",1,"btn","btn-success","mr-6",3,"routerLink"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Label","bindValue","ID","placeholder","Choose a Type",3,"ngModel","items","clearable","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Outlet",2,"width","150px"],["mat-sort-header","Sales",1,"align-right",2,"width","150px"],["style","width: 150px","class","align-right","mat-sort-header","Tax",4,"ngIf"],["style","width: 150px","class","align-right",3,"innerHtml",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right","empty-column"],[1,"text-right","text-success"],["class","text-right text-success",4,"ngIf"],["class","text-right","style","width: 150px",4,"ngFor","ngForOf"],["mat-sort-header","Tax",1,"align-right",2,"width","150px"],[1,"align-right",2,"width","150px",3,"innerHtml"],[1,"text-right"],["class","text-right",4,"ngIf"],[1,"text-right",2,"width","150px"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Tax Report"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"TaxReport.csv")}),t._UZ(5,"i",3),t._uU(6,"Export"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,td,14,7,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,sd,21,11,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(6,pd)),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function _d(a,i){if(1&a&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ud(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,_d,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"From/To"),t.qZA(),t.TgZ(13,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(14,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"Sales Name"),t.qZA(),t.TgZ(18,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales)}}const gd=function(){return["/menu/Products/Catalog/Variants/Info"]},dd=function(a){return{ID:a}};function md(a,i){if(1&a&&(t.TgZ(0,"tr",19),t.TgZ(1,"td"),t.TgZ(2,"a",20),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.ALo(8,"date"),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.ALo(11,"date"),t.qZA(),t.TgZ(12,"td",17),t._uU(13),t.ALo(14,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(15,gd))("queryParams",t.VKq(16,dd,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.LastSold?t.xi3(8,7,e.LastSold,"dd MMM yyyy"):"-"),t.xp6(3),t.Oqu(e.LastPurchased?t.xi3(11,10,e.LastPurchased,"dd MMM yyyy"):"-"),t.xp6(3),t.Oqu(t.lcZ(14,13,e.Quantity))}}function Zd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",16),t.TgZ(3,"tr"),t.TgZ(4,"th"),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Code"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Last Sold"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Last Purchased"),t.qZA(),t.TgZ(12,"th",17),t._uU(13,"Qty"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"tbody"),t.YNc(15,md,15,18,"tr",18),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(15),t.Q6J("ngForOf",e.data)}}let hd=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/ProductLifeCycle","ReportLoader/ProductLifeCycle",o),this.httpService=e,this.csvConverter=n}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(n.Name=null==n.Name?"":n.Name,r.Name=null==r.Name?"":r.Name,n.EntityName=null==n.EntityName?"":n.EntityName,r.EntityName=null==r.EntityName?"":r.EntityName,e.active){case"Name":return this.compare(n.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Outlet":return this.compare(n.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"Number":return this.compare(n.Number,r.Number,l);case"Date":return this.compare(n.Date,r.Date,l);case"Sales":return this.compare(n.Sales,r.Sales,l);case"Tax":return this.compare(n.Tax,r.Tax,l);default:return 0}}):o}preGetList(){this.pageData.Filter.EntityID||delete this.pageData.Filter.EntityID}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-life-cycle"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"ProductLifeCycleReport.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,ud,19,8,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Zd,16,1,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,m.YE,s.sg,g.yS],pipes:[s.uU,s.JJ],styles:[""]}),a})();function xd(a,i){if(1&a&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Td(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",16),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",17),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Cd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",18),t.TgZ(4,"div",19),t.TgZ(5,"ng-select",20),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Year=n}),t.qZA(),t.qZA(),t.TgZ(6,"div",21),t.TgZ(7,"ng-select",22),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.Month=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months)}}function fd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,xd,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Date Filter"),t.qZA(),t.TgZ(13,"radio-options",10),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ByMonth=n}),t.qZA(),t.TgZ(14,"h6"),t._uU(15,"Group By"),t.qZA(),t.TgZ(16,"radio-options",11),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.GroupBy=n}),t.qZA(),t.qZA(),t.YNc(17,Td,5,2,"div",12),t.YNc(18,Cd,8,4,"div",12),t.TgZ(19,"div"),t.TgZ(20,"h6"),t._uU(21,"Row Count"),t.qZA(),t.TgZ(22,"input",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.TgZ(23,"div"),t.TgZ(24,"h6"),t._uU(25,"Supplier"),t.qZA(),t.TgZ(26,"autocompleteV2",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("model",e.pageData.Filter.ByMonth)("options",e.RadioDateFilterType),t.xp6(3),t.Q6J("model",e.pageData.Filter.GroupBy)("options",e.RadioGroupBy),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.ByMonth),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.ByMonth),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID)}}function Ad(a,i){if(1&a&&(t.TgZ(0,"tr",31),t.TgZ(1,"td",32),t._uU(2),t.qZA(),t.TgZ(3,"td",32),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td",33),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",33),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",33),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"td",34),t._uU(19),t.ALo(20,"number"),t.qZA(),t.TgZ(21,"td",33),t._uU(22),t.ALo(23,"number"),t.qZA(),t.TgZ(24,"td",33),t._uU(25),t.ALo(26,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.PrevRank||"-"),t.xp6(2),t.Oqu(e.Rank),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(11,10,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(14,12,e.UnitsInStock)),t.xp6(3),t.Oqu(t.lcZ(17,14,e.TotalAmount)),t.xp6(3),t.Oqu(t.lcZ(20,16,e.TotalCost)),t.xp6(3),t.Oqu(t.lcZ(23,18,e.TotalProfit)),t.xp6(3),t.Oqu(t.lcZ(26,20,e.Margin))}}function Dd(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",35),t._UZ(2,"td",36),t.TgZ(3,"td",37),t._uU(4,"Total:"),t.qZA(),t.TgZ(5,"td",37),t._uU(6),t.ALo(7,"number"),t.ALo(8,"sum"),t.qZA(),t.TgZ(9,"td",37),t._uU(10),t.ALo(11,"number"),t.ALo(12,"sum"),t.qZA(),t.TgZ(13,"td",37),t._uU(14),t.ALo(15,"number"),t.ALo(16,"sum"),t.qZA(),t.TgZ(17,"td",37),t._uU(18),t.ALo(19,"number"),t.ALo(20,"sum"),t.qZA(),t.TgZ(21,"td",37),t._uU(22),t.ALo(23,"number"),t.ALo(24,"sum"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(6),t.Oqu(t.lcZ(7,5,t.xi3(8,7,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(11,10,t.xi3(12,12,e.data,"UnitsInStock"))),t.xp6(4),t.Oqu(t.lcZ(15,15,t.xi3(16,17,e.data,"TotalAmount"))),t.xp6(4),t.Oqu(t.lcZ(19,20,t.xi3(20,22,e.data,"TotalCost"))),t.xp6(4),t.Oqu(t.lcZ(23,25,t.xi3(24,27,e.data,"TotalProfit")))}}function qd(a,i){if(1&a&&(t.TgZ(0,"div",23),t.TgZ(1,"table",24),t.TgZ(2,"thead",25),t.TgZ(3,"tr"),t.TgZ(4,"th",26),t._uU(5,"Prev"),t.qZA(),t.TgZ(6,"th",26),t._uU(7,"Now"),t.qZA(),t.TgZ(8,"th",27),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"th",28),t._uU(11,"Code"),t.qZA(),t.TgZ(12,"th",26),t._uU(13,"Sold"),t.qZA(),t.TgZ(14,"th",29),t._uU(15,"Inventory"),t.qZA(),t.TgZ(16,"th",29),t._uU(17,"Total Amount"),t.qZA(),t.TgZ(18,"th",29),t._uU(19,"Total Cost"),t.qZA(),t.TgZ(20,"th",29),t._uU(21,"Total profit"),t.qZA(),t.TgZ(22,"th",29),t._uU(23,"%"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(24,"tbody"),t.YNc(25,Ad,27,22,"tr",30),t.qZA(),t.YNc(26,Dd,25,30,"tfoot",12),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(25),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.length>0)}}let yd=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/GetReportProductProfit","ReportLoader/GetReportProductProfit",o),this.httpService=e,this.csvConverter=n,this.DateFilterType="Range",this.Months=[{ID:"1",Label:"Jan"},{ID:"2",Label:"Feb"},{ID:"3",Label:"Mar"},{ID:"4",Label:"Apr"},{ID:"5",Label:"May"},{ID:"6",Label:"Jun"},{ID:"7",Label:"Jul"},{ID:"8",Label:"Aug"},{ID:"9",Label:"Sep"},{ID:"10",Label:"Oct"},{ID:"11",Label:"Nov"},{ID:"12",Label:"Dec"}],this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Range"}],this.RadioGroupBy=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}],this.first=!0;const r=new Date;this.Years=this.GenerateYears(r.getFullYear(),11,!0)}GenerateYears(e,o,n){let r=-1;(null==o||null==o)&&(o=11),(null==n||null==n||!n)&&(r=1);const l=[];for(let Z=0;Z<o;Z++)l.push(e+Z*r);return l}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-profit"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","Date Filter",3,"model","options","modelChange"],["name","Group By",3,"model","options","modelChange"],[4,"ngIf"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-right",2,"width","100px"],[2,"width","600px"],[2,"width","100px"],[1,"text-right",2,"width","200px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[1,"text-right",2,"width","35px"],[1,"text-right","text-success"],[1,"text-right","text-danger"],[1,"table-footer"],["colspan","3",1,"empty-column"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"ReportProductProfit.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,fd,27,12,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,qd,27,2,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,c.ir,D.P,p.Fj,q.J,f.QB,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function vd(a,i){if(1&a&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Sd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,vd,2,2,"ng-template",9),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"From/To"),t.qZA(),t.TgZ(13,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(14,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Md(a,i){if(1&a&&(t.TgZ(0,"tr",17),t.TgZ(1,"td"),t.TgZ(2,"a",18),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.Oqu(e.InvoiceNumber),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,6,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(13,8,e.Price))}}function bd(a,i){if(1&a&&(t.TgZ(0,"div",13),t.TgZ(1,"table",14),t.TgZ(2,"thead",15),t.TgZ(3,"tr"),t.TgZ(4,"th"),t._uU(5,"Number"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Name"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Code"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Quantity"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Price"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"tbody"),t.YNc(15,Md,14,10,"tr",16),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(15),t.Q6J("ngForOf",e.data.Data)}}let Od=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/GetExchangedSales","ReportLoader/GetExchangedSales",o),this.httpService=e,this.csvConverter=n}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-exchanged-sales"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[3,"href"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetExchangedSales","ReportExchangedSales.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Sd,15,6,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,bd,16,1,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,s.sg],pipes:[s.JJ],styles:[""]}),a})();function Jd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Product"),t.qZA(),t.TgZ(3,"autocompleteV2",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Id(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Product"),t.qZA(),t.TgZ(3,"autocompleteV2",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Ud(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.YNc(10,Jd,4,1,"div",10),t.YNc(11,Id,4,1,"div",10),t.TgZ(12,"div"),t.TgZ(13,"h6"),t._uU(14,"Search By"),t.qZA(),t.TgZ(15,"radio-options",11),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SearchBy=n}),t.qZA(),t.qZA(),t.TgZ(16,"div"),t.TgZ(17,"h6"),t._uU(18,"Row Count"),t.qZA(),t.TgZ(19,"input",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter.SearchBy),t.xp6(1),t.Q6J("ngIf",!e.pageData.Filter.SearchBy),t.xp6(4),t.Q6J("model",e.pageData.Filter.SearchBy)("options",e.RadioSearchBy),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function wd(a,i){if(1&a&&(t.TgZ(0,"tr",22),t.TgZ(1,"td",23),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",23),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",24),t._uU(9),t.ALo(10,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.Rank),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(7,4,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(10,6,e.UnitsInStock))}}function Fd(a,i){if(1&a&&(t.TgZ(0,"div",15),t.TgZ(1,"table",16),t.TgZ(2,"thead",17),t.TgZ(3,"tr"),t.TgZ(4,"th",18),t._uU(5,"Rank"),t.qZA(),t.TgZ(6,"th",19),t._uU(7,"Name"),t.qZA(),t.TgZ(8,"th",20),t._uU(9,"Sold"),t.qZA(),t.TgZ(10,"th",20),t._uU(11,"Inventory"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(12,"tbody"),t.YNc(13,wd,11,8,"tr",21),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(13),t.Q6J("ngForOf",e.data.Data)}}let Nd=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/GetSalesRankByVariantModel","ReportLoader/GetSalesRankByVariantModel",o),this.httpService=e,this.csvConverter=n,this.RadioSearchBy=[{Key:!0,Value:"Name"},{Key:!1,Value:"Code"}]}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-variant-model-rank"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[4,"ngIf"],["name","Search By",3,"model","options","modelChange"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetProductSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetProductSuggestionByCode",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-right",2,"width","70px"],[2,"width","800px"],[1,"text-right",2,"width","100px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[1,"text-right"],[1,"text-success","text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetSalesRankByVariantModel","ReportSalesRankByVariantModel.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Ud,20,9,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Fd,14,1,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,D.P,p.Fj,q.J,s.sg],pipes:[s.JJ],styles:[""]}),a})();function Pd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",7),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From/To"),t.qZA(),t.TgZ(8,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Discount(%) From / To"),t.qZA(),t.TgZ(13,"div",11),t.TgZ(14,"div",12),t.TgZ(15,"input",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.DiscountFrom=n}),t.qZA(),t.qZA(),t.TgZ(16,"div",14),t.TgZ(17,"input",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.DiscountTo=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(6),t.Q6J("ngModel",e.pageData.Filter.DiscountFrom),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.DiscountTo)}}function Ld(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",21),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td"),t.TgZ(7,"a",25),t._uU(8),t.qZA(),t.qZA(),t.TgZ(9,"td",21),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",21),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",21),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"td",21),t._uU(19),t.ALo(20,"number"),t.qZA(),t.TgZ(21,"td",21),t._uU(22),t.ALo(23,"number"),t.qZA(),t.TgZ(24,"td",21),t._uU(25),t.ALo(26,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(t.lcZ(5,10,e.Quantity)),t.xp6(3),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.lcZ(11,12,e.ItemDiscount)),t.xp6(3),t.Oqu(t.lcZ(14,14,e.OrderDiscount)),t.xp6(3),t.Oqu(t.lcZ(17,16,e.OrderDiscount2)),t.xp6(3),t.Oqu(t.lcZ(20,18,e.OrderDiscountAmount)),t.xp6(3),t.Oqu(t.lcZ(23,20,e.UnitPrice)),t.xp6(3),t.Oqu(t.lcZ(26,22,e.NetSales))}}function Qd(a,i){if(1&a&&(t.TgZ(0,"div",15),t.TgZ(1,"table",16),t.TgZ(2,"thead",17),t.TgZ(3,"tr"),t.TgZ(4,"th"),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th",18),t._uU(7,"Qty"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Number"),t.qZA(),t.TgZ(10,"th",19),t._uU(11,"Item %"),t.qZA(),t.TgZ(12,"th",19),t._uU(13,"Order %"),t.qZA(),t.TgZ(14,"th",19),t._uU(15,"Order2 %"),t.qZA(),t.TgZ(16,"th",20),t._uU(17,"Order % Amount"),t.qZA(),t.TgZ(18,"th",20),t._uU(19,"Unit Price"),t.qZA(),t.TgZ(20,"th",21),t._uU(21,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"tbody"),t.YNc(23,Ld,27,24,"tr",22),t.qZA(),t.TgZ(24,"tfoot"),t.TgZ(25,"tr",23),t.TgZ(26,"td",21),t._uU(27,"Total : "),t.qZA(),t.TgZ(28,"td",21),t._uU(29),t.ALo(30,"number"),t.ALo(31,"sum"),t.qZA(),t.TgZ(32,"td",24),t._uU(33),t.ALo(34,"number"),t.ALo(35,"sum"),t.qZA(),t.TgZ(36,"td",21),t._uU(37),t.ALo(38,"number"),t.ALo(39,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(23),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.lcZ(30,4,t.xi3(31,6,e.data.Data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(34,9,t.xi3(35,11,e.data.Data,"UnitPrice"))),t.xp6(4),t.Oqu(t.lcZ(38,14,t.xi3(39,16,e.data.Data,"NetSales")))}}const Rd=function(){return["/menu/Reports/Sales_Report/Standard/Discounted_Sales/Discounted_Products"]};let Ed=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/GetDiscountsales","ReportLoader/GetDiscountSales"),this.httpService=e,this.csvConverter=o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-discounted-sales"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["type","number",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-6","pl-2"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-right",2,"width","25px"],[1,"text-right",2,"width","100px"],[1,"text-right",2,"width","150px"],[1,"text-right"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","6",1,"text-right"],[3,"href"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!0,"SalesTransaction.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Discounted Products"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Pd,18,6,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Qd,40,19,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(5),t.Q6J("routerLink",t.DdM(5,Rd)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,p.wV,p.Fj,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function kd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",6),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Customer"),t.qZA(),t.TgZ(8,"autocompleteV2",8),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",10),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Hd(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",20),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.ALo(8,"date"),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td",15),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td",15),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"td",21),t._uU(20),t.qZA(),t.TgZ(21,"td",15),t._uU(22),t.ALo(23,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(8,10,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.hij("(",t.lcZ(15,13,e.Quantity),")"),t.xp6(3),t.Oqu(t.lcZ(18,15,e.UnitPrice)),t.xp6(3),t.hij("",e.Discount&&0!=e.Discount?-e.Discount+"%":""," "),t.xp6(2),t.hij("(",t.lcZ(23,17,e.Total),")")}}function Vd(a,i){if(1&a&&(t.TgZ(0,"div",11),t.TgZ(1,"table",12),t.TgZ(2,"thead",13),t.TgZ(3,"tr"),t.TgZ(4,"th"),t._uU(5,"Outlet"),t.qZA(),t.TgZ(6,"th",14),t._uU(7,"Number"),t.qZA(),t.TgZ(8,"th"),t._uU(9,"Date"),t.qZA(),t.TgZ(10,"th"),t._uU(11,"Name"),t.qZA(),t.TgZ(12,"th"),t._uU(13,"Code"),t.qZA(),t.TgZ(14,"th",15),t._uU(15,"Quantity"),t.qZA(),t.TgZ(16,"th",15),t._uU(17),t.qZA(),t.TgZ(18,"th",16),t._uU(19,"%"),t.qZA(),t.TgZ(20,"th",15),t._uU(21),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"tbody"),t.YNc(23,Hd,24,19,"tr",17),t.qZA(),t.TgZ(24,"tfoot"),t.TgZ(25,"tr",18),t._UZ(26,"td",19),t._UZ(27,"td",19),t._UZ(28,"td",19),t._UZ(29,"td",19),t._UZ(30,"td",19),t.TgZ(31,"td",15),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA(),t._UZ(35,"td",19),t._UZ(36,"td",19),t.TgZ(37,"td",15),t._uU(38),t.ALo(39,"number"),t.ALo(40,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(17),t.hij("Price (",e.data.CurrencySymbol,")"),t.xp6(4),t.hij("Total(",e.data.CurrencySymbol,")"),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(9),t.Oqu(t.lcZ(33,5,t.xi3(34,7,e.data.Data,"Quantity"))),t.xp6(6),t.Oqu(t.lcZ(39,10,t.xi3(40,12,e.data.Data,"Total")))}}let Bd=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/SalesReturnList","ReportLoader/ReturnReportLoader",o),this.httpService=e,this.csvConverter=n}postInit(e){this.menuData.H=e.PageTitle}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-sales-return"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","140px"],[1,"text-right"],[2,"width","30px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[3,"href"],[1,"text-danger"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/SalesReturnExport",o.menuData.H+".csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,kd,14,5,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Vd,41,15,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,q.J,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function Gd(a,i){if(1&a&&(t._UZ(0,"td",36),t.ALo(1,"number")),2&a){const e=t.oxw().$implicit;t.Q6J("innerHtml",t.lcZ(1,1,e.UnitCost),t.oJD)}}function jd(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._UZ(2,"span",29),t._UZ(3,"span",30),t.ALo(4,"newlines"),t.qZA(),t._UZ(5,"td",31),t.TgZ(6,"td",14),t._uU(7),t.ALo(8,"number"),t.qZA(),t._UZ(9,"td",32),t.YNc(10,Gd,2,3,"td",33),t._UZ(11,"td",34),t.ALo(12,"number"),t.TgZ(13,"td",35),t._uU(14),t.qZA(),t._UZ(15,"td",34),t.ALo(16,"number"),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(3);t.xp6(2),t.Q6J("innerHtml",e.Name,t.oJD),t.xp6(1),t.Q6J("innerHtml",t.lcZ(4,9,e.Note),t.oJD),t.xp6(2),t.Q6J("innerHtml",e.Code,t.oJD),t.xp6(2),t.hij("(",t.lcZ(8,11,e.Quantity),")"),t.xp6(2),t.Q6J("innerHtml",e.UOMName,t.oJD),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(1),t.Q6J("innerHtml",t.lcZ(12,13,e.UnitPrice),t.oJD),t.xp6(3),t.hij(" ",0==e.Discount?"":"-"+e.Discount+"%",""),t.xp6(1),t.Q6J("innerHtml",t.lcZ(16,15,e.Total),t.oJD)}}function Wd(a,i){if(1&a&&(t.TgZ(0,"div"),t.TgZ(1,"div",18),t.TgZ(2,"a",19),t._UZ(3,"span",20),t.ALo(4,"date"),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"span"),t._uU(7),t.ALo(8,"showIfNotNullOrEmptyString"),t.qZA(),t.qZA(),t.TgZ(9,"div",21),t.TgZ(10,"div"),t.TgZ(11,"table",22),t._UZ(12,"thead"),t.TgZ(13,"tbody"),t.YNc(14,jd,17,17,"tr",17),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(15,"table",23),t.TgZ(16,"thead"),t.TgZ(17,"tr",24),t.TgZ(18,"td",25),t._uU(19,"Total"),t.qZA(),t.TgZ(20,"td",26),t._uU(21,"\xa0"),t.qZA(),t.TgZ(22,"td",14),t._uU(23),t.ALo(24,"number"),t.qZA(),t._UZ(25,"td",27),t.TgZ(26,"td",26),t._uU(27,"\xa0"),t.qZA(),t.TgZ(28,"td",28),t._uU(29,"\xa0"),t.qZA(),t.TgZ(30,"td",14),t._uU(31),t.ALo(32,"number"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Q6J("innerHtml",e.EntityName+" #"+e.Number+" - "+t.xi3(4,6,e.Date,"dd MMM yyyy")+" ("+t.xi3(5,9,e.Created,"HH:mm")+") : ",t.oJD),t.xp6(4),t.hij(" ",t.xi3(8,12,e.CustomerNameDisplay," - {0}")," "),t.xp6(7),t.Q6J("ngForOf",e.Item),t.xp6(9),t.hij("",t.lcZ(24,15,o.data.Quantity),"\xa0"),t.xp6(8),t.hij("",t.lcZ(32,17,o.data.TotalPrice),"\xa0")}}function $d(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",2),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/PurchaseReturnList",n.data.PageTitle+".csv")}),t._UZ(3,"i",3),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",4),t.TgZ(7,"div",5),t.TgZ(8,"div"),t.TgZ(9,"h6"),t._uU(10,"Outlet"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(12,"div"),t.TgZ(13,"h6"),t._uU(14,"Supplier"),t.qZA(),t.TgZ(15,"autocompleteV2",7),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=n}),t.qZA(),t.qZA(),t.TgZ(16,"div"),t.TgZ(17,"h6"),t._uU(18,"From/To"),t.qZA(),t.TgZ(19,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(20,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(21,"content"),t.TgZ(22,"div",10),t.TgZ(23,"table",11),t.TgZ(24,"thead",12),t.TgZ(25,"tr"),t.TgZ(26,"th"),t._uU(27,"Name"),t.qZA(),t.TgZ(28,"th",13),t._uU(29,"Code"),t.qZA(),t.TgZ(30,"th",14),t._uU(31,"Quantity"),t.qZA(),t._UZ(32,"th",15),t.TgZ(33,"th",14),t._uU(34,"Unit Price(Rp.)"),t.qZA(),t.TgZ(35,"th",16),t._uU(36,"%"),t.qZA(),t.TgZ(37,"th",14),t._uU(38,"Total(Rp.)"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(39,Wd,33,19,"div",17),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(11),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(19),t.Q6J("ngForOf",e.data.Data)}}let Kd=(()=>{class a extends d.n{constructor(e,o){super(e,"Report/PurchaseReturnList","ReportLoader/ReturnReportLoader"),this.httpService=e,this.csvConverter=o}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}postInit(){this.menuData.H=this.data.PageTitle}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-purchase-return"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],[1,"table"],[1,"thead-light"],[2,"width","10%"],[1,"text-right",2,"width","10%"],[1,"UOMWidth",2,"width","50px"],[2,"width","5%"],[4,"ngFor","ngForOf"],[1,"mt-7","ml-5"],[1,"h5","text-primary","font-weight-bold",3,"href"],["id","PONumber",3,"innerHtml"],[1,"items"],["cellspacing","0",1,"table-sm","table-striped","w-100","table-bordered","purchase-return"],[2,"width","100%"],[1,"table-footer"],[1,"empty-column"],[1,"empty-column",2,"width","10%"],[1,"empty-column",2,"width","50px"],[1,"empty-column",2,"width","5%"],[3,"innerHtml"],[1,"list-unstyled",3,"innerHtml"],[2,"width","10%",3,"innerHtml"],[1,"UOMWidth",2,"width","50px",3,"innerHtml"],["class","text-right alt","style","width: 80px;",3,"innerHtml",4,"ngIf"],[1,"text-right",2,"width","10%",3,"innerHtml"],[1,"small","text-danger",2,"width","5%"],[1,"text-right","alt",2,"width","80px",3,"innerHtml"]],template:function(e,o){1&e&&t.YNc(0,$d,40,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,q.J,f.QB,s.sg],pipes:[s.uU,T.WV,s.JJ,T.sH],styles:[".purchase-return[_ngcontent-%COMP%] {\n border-collapse: collapse;\n margin-top: 10px;\n margin-bottom: 10px;\n}"]}),a})();function Xd(a,i){if(1&a&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&a){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function zd(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",10),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",11),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.EntityID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",12),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=n}),t.YNc(9,Xd,2,2,"ng-template",13),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Sales"),t.qZA(),t.TgZ(13,"ng-select",14),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.SalesID=n}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Customer"),t.qZA(),t.TgZ(17,"autocompleteV2",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=n}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Page Size"),t.qZA(),t.TgZ(21,"input",16),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.PageSize=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.SalesID)("items",null==e.pageData.Options?null:e.pageData.Options.Sales),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.PageSize)}}function tm(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",18),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"From/To"),t.qZA(),t.TgZ(4,"datepicker",19),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(5,"datepicker",20),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Product"),t.qZA(),t.TgZ(9,"autocompleteV2",21),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ProductID=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Variant"),t.qZA(),t.TgZ(13,"autocompleteV2",22),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.VariantID=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("inputTextValue",e.pageData.Filter.ProductName)("ngModel",e.pageData.Filter.ProductID),t.xp6(4),t.Q6J("inputTextValue",e.pageData.Filter.VariantName)("ngModel",e.pageData.Filter.VariantID)}}function em(a,i){1&a&&(t.TgZ(0,"th",39),t._uU(1," Cost "),t.qZA())}function am(a,i){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Name)}}function nm(a,i){if(1&a&&(t.TgZ(0,"td",43),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}function om(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1,"%"),t.qZA())}function rm(a,i){if(1&a&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.DiscountAmount))}}function im(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"td"),t.TgZ(7,"a",40),t._uU(8),t.qZA(),t.qZA(),t.TgZ(9,"td"),t.YNc(10,am,2,1,"span",38),t._UZ(11,"span",41),t.TgZ(12,"i",42),t._uU(13),t.qZA(),t.qZA(),t.TgZ(14,"td"),t._uU(15),t.qZA(),t.TgZ(16,"td"),t._uU(17),t.qZA(),t.TgZ(18,"td",43),t._uU(19),t.ALo(20,"number"),t.qZA(),t.YNc(21,nm,3,3,"td",44),t.TgZ(22,"td",43),t._uU(23),t.ALo(24,"number"),t.qZA(),t.TgZ(25,"td",45),t.TgZ(26,"div"),t._uU(27),t.ALo(28,"number"),t.YNc(29,om,2,0,"span",38),t.qZA(),t.YNc(30,rm,3,3,"div",38),t.qZA(),t.TgZ(31,"td",43),t._uU(32),t.ALo(33,"number"),t.qZA(),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Outlet),t.xp6(2),t.Oqu(t.xi3(5,16,e.Date,"dd MMM yy")),t.xp6(3),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Q6J("ngIf",""===o.pageData.Filter.ProductName||""===o.pageData.Filter.VariantName),t.xp6(1),t.Q6J("innerHtml",e.Note,t.oJD),t.xp6(2),t.Oqu(e.NoteOrder),t.xp6(2),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(e.SalesPerson),t.xp6(2),t.Oqu(t.lcZ(20,19,e.Quantity)),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(2),t.Oqu(t.lcZ(24,21,e.UnitPrice)),t.xp6(4),t.Oqu(0==e.Discount?"":t.lcZ(28,23,e.Discount)),t.xp6(2),t.Q6J("ngIf",e.Discount),t.xp6(1),t.Q6J("ngIf",0!=e.DiscountAmount),t.xp6(2),t.Oqu(t.lcZ(33,25,e.Total))}}function lm(a,i){1&a&&t._UZ(0,"td",50)}function sm(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",46),t.TgZ(2,"td",47),t._uU(3,"Total:"),t.qZA(),t.TgZ(4,"td",43),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.qZA(),t.YNc(8,lm,1,0,"td",48),t._UZ(9,"td",49),t.TgZ(10,"td",43),t._uU(11),t.ALo(12,"number"),t.ALo(13,"sum"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(5),t.Oqu(t.lcZ(6,3,t.xi3(7,5,e.data.Data,"Quantity"))),t.xp6(3),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(3),t.Oqu(t.lcZ(12,8,t.xi3(13,10,e.data.Data,"Total")))}}function pm(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",23),t.TgZ(1,"table",24),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",25),t.TgZ(3,"tr"),t.TgZ(4,"th",26),t._uU(5,"Outlet"),t.qZA(),t.TgZ(6,"th",27),t._uU(7,"Date"),t.qZA(),t.TgZ(8,"th",28),t._uU(9,"Invoice #"),t.qZA(),t.TgZ(10,"th",29),t._uU(11,"Product / Note"),t.qZA(),t.TgZ(12,"th",30),t._uU(13,"Customer"),t.qZA(),t.TgZ(14,"th",31),t._uU(15,"SALES PERSON"),t.qZA(),t.TgZ(16,"th",32),t._uU(17,"Qty"),t.qZA(),t.YNc(18,em,2,0,"th",33),t.TgZ(19,"th",34),t._uU(20,"Price"),t.qZA(),t.TgZ(21,"th",35),t._uU(22,"Disc."),t.qZA(),t.TgZ(23,"th",36),t._uU(24,"Total"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(25,"tbody"),t.YNc(26,im,34,27,"tr",37),t.qZA(),t.YNc(27,sm,14,13,"tfoot",38),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(18),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(8),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}const cm=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let _m=(()=>{class a extends d.n{constructor(e,o,n){super(e,"Report/ProductSalesByInvoice","ReportLoader/ProductSalesByInvoice",null,n),this.httpService=e,this.csvConverter=o,this.activatedRoute=n,this.hideMore=!0}postInit(e){this.menuData.H=this.pageData.PageTitle,this.originalData=e.Data}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Outlet":return this.compare(n.Outlet,r.Outlet,l);case"Date":return this.compare(n.Date,r.Date,l);case"Number":return this.compare(n.Number,r.Number,l);case"Note":return this.compare(n.Note,r.Note,l);case"CustomerName":return this.compare(n.CustomerName,r.CustomerName,l);case"SalesPerson":return this.compare(n.SalesPerson,r.SalesPerson,l);case"UnitCost":return this.compare(n.UnitCost,r.UnitCost,l);case"UnitPrice":return this.compare(n.UnitPrice,r.UnitPrice,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Discount":return this.compare(n.Discount,r.Discount,l);case"Total":return this.compare(n.TotalAfterDiscount,r.TotalAfterDiscount,l);default:return 0}}):this.originalData}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O),t.Y36(g.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-invoice-items"]],features:[t.qOj],decls:16,vars:7,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["type","number","min","0",1,"w-100",3,"ngModel","ngModelChange"],[3,"title"],["id","more-filter","container",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"inputTextValue","ngModel","ngModelChange"],["requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"inputTextValue","ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Outlet","width","100px"],["mat-sort-header","Date",2,"width","80px"],["mat-sort-header","Number",2,"width","120px"],["mat-sort-header","Note"],["mat-sort-header","CustomerName"],["mat-sort-header","SalesPerson"],["mat-sort-header","Quantity",1,"align-right",2,"width","60px"],["mat-sort-header","UnitCost","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","UnitPrice",1,"align-right",2,"width","120px"],["mat-sort-header","Discount",1,"align-right",2,"width","45px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-sort-header","UnitCost",1,"align-right",2,"width","120px"],["target","_blank",3,"href"],[2,"word-break","break-all",3,"innerHtml"],[1,"text-info"],[1,"text-right"],["class","text-right",4,"ngIf"],[1,"text-right","text-danger"],[1,"table-footer"],["colspan","6",1,"text-right","empty-column"],["class","empty-column",4,"ngIf"],["colspan","2",1,"empty-column"],[1,"empty-column"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"Report/ProductSalesByInvoice","Invoice_Item_Details.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Group by Product"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,zd,22,8,"div",5),t.YNc(10,tm,14,6,"div",6),t.qZA(),t.TgZ(11,"a",7),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(12,"More "),t._UZ(13,"i",8),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,pm,28,3,"div",9),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(5),t.Q6J("routerLink",t.DdM(6,cm)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,q.J,p.qQ,p.wV,p.Fj,f.QB,m.YE,m.nU,s.sg],pipes:[s.uU,s.JJ,T.qU],styles:[""]}),a})();function um(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return n.exportCSV(n.csvConverter,"ReportExport/CustomerBrand","Brand_Sales_Analysis.csv")}),t._UZ(1,"i",8),t._uU(2," Export "),t.qZA()}}function gm(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",9),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Brand"),t.qZA(),t.TgZ(4,"ng-select",10),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.ListBrandID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"From - To"),t.qZA(),t.TgZ(8,"datepicker",11),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(9,"datepicker",12),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.To=n}),t.qZA(),t.qZA(),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Row Count"),t.qZA(),t.TgZ(13,"input",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.RowCount=n}),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListBrandID)("items",null==e.pageData.Options?null:e.pageData.Options.Brand),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function dm(a,i){1&a&&(t.TgZ(0,"th",28),t._uU(1,"Total Cost"),t.qZA())}function mm(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Profit"),t.qZA())}function Zm(a,i){if(1&a&&(t.TgZ(0,"td",40),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.TotalCost?e.TotalCost:0),"")}}const at=function(a,i){return{"text-danger":a,"text-success":i}};function hm(a,i){if(1&a&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,at,e.Profit<0,e.Profit>0)),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.Profit),"")}}function xm(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td",35),t._uU(2),t.qZA(),t.TgZ(3,"td",36),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",37),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,Zm,3,3,"td",38),t.YNc(10,hm,3,7,"td",39),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(3);t.xp6(2),t.Oqu(e.BrandName),t.xp6(2),t.hij(" ",t.lcZ(5,5,e.Quantity?e.Quantity:0),""),t.xp6(3),t.hij(" ",t.lcZ(8,7,e.TotalSales?e.TotalSales:0),""),t.xp6(2),t.Q6J("ngIf",o.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",o.pageData.IsCostVisible)}}const Tm=function(){return["/menu/Contacts/Contact/Customers/Info"]},Cm=function(a){return{ID:a}};function fm(a,i){if(1&a&&(t.TgZ(0,"tr",30),t.TgZ(1,"td"),t.TgZ(2,"a",31),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"td",18),t._uU(5),t.qZA(),t.TgZ(6,"td",19),t._uU(7),t.qZA(),t.TgZ(8,"td",20),t._uU(9),t.qZA(),t.TgZ(10,"td",32),t.TgZ(11,"table",33),t.YNc(12,xm,11,9,"tr",34),t.qZA(),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(8,Tm))("queryParams",t.VKq(9,Cm,e.CustomerID)),t.xp6(1),t.AsE(" ",e.Name," ",e.Title," "),t.xp6(2),t.Oqu(e.Email),t.xp6(2),t.Oqu(e.Mobile),t.xp6(2),t.Oqu(e.City),t.xp6(3),t.Q6J("ngForOf",e.Detail)}}function Am(a,i){if(1&a&&(t.TgZ(0,"td",44),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,e.data.Total.TotalCost)," ")}}function Dm(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(4,at,e.data.Total.Profit<0,e.data.Total.Profit>0)),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.data.Total.Profit)," ")}}function qm(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",42),t._UZ(2,"td",43),t.TgZ(3,"td",44),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",44),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,Am,3,3,"td",45),t.YNc(10,Dm,3,7,"td",46),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.hij(" ",t.lcZ(5,4,e.data.Total.Quantity)," "),t.xp6(3),t.hij(" ",t.lcZ(8,6,e.data.Total.TotalSales)," "),t.xp6(2),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible)}}function ym(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",16),t.TgZ(3,"tr"),t.TgZ(4,"th",17),t._uU(5,"Customer"),t.qZA(),t.TgZ(6,"th",18),t._uU(7,"Email"),t.qZA(),t.TgZ(8,"th",19),t._uU(9,"Mobile"),t.qZA(),t.TgZ(10,"th",20),t._uU(11,"City"),t.qZA(),t.TgZ(12,"th",21),t._uU(13,"Brand"),t.qZA(),t.TgZ(14,"th",22),t._uU(15," Qty "),t.qZA(),t.TgZ(16,"th",23),t._uU(17,"Total Sales"),t.qZA(),t.YNc(18,dm,2,0,"th",24),t.YNc(19,mm,2,0,"th",25),t.qZA(),t.qZA(),t.TgZ(20,"tbody"),t.YNc(21,fm,13,11,"tr",26),t.qZA(),t.YNc(22,qm,11,8,"tfoot",27),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(18),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data)}}const vm=function(){return["/menu/Reports/Sales_Report/Standard/Top_Brand"]};function Mm(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"From/To"),t.qZA(),t.TgZ(3,"datepicker",8),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.From=n}),t.qZA(),t.TgZ(4,"datepicker",9),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw(2).pageData.Filter.To=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function bm(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Compare with prev Month"),t.qZA(),t.TgZ(3,"radio-options",10),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw(2).isCompareData=n})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare("Data")}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.isCompareData)}}function Om(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Year - Month"),t.qZA(),t.TgZ(3,"div",11),t.TgZ(4,"div",12),t.TgZ(5,"ng-select",13),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Year=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA(),t.TgZ(6,"div",14),t.TgZ(7,"ng-select",15),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw(2).Month=n})("change",function(){return t.CHM(e),t.oxw(2).YearMonthToDateRange()})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw(2);t.xp6(5),t.Q6J("ngModel",e.Year)("items",e.Years),t.xp6(2),t.Q6J("ngModel",e.Month)("items",e.Months)}}function Jm(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",4),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Type"),t.qZA(),t.TgZ(4,"ng-select",5),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.TypeID=n}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Date Filter Type"),t.qZA(),t.TgZ(8,"radio-options",6),t.NdJ("modelChange",function(n){return t.CHM(e),t.oxw().DateFilterType=n}),t.qZA(),t.qZA(),t.YNc(9,Mm,5,2,"div",7),t.YNc(10,bm,4,1,"div",7),t.YNc(11,Om,8,4,"div",7),t.qZA()}if(2&a){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.DateFilterType)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",!e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType),t.xp6(1),t.Q6J("ngIf",e.DateFilterType)}}function Im(a,i){1&a&&(t.TgZ(0,"th",38),t._uU(1,"Prev"),t.qZA())}function Um(a,i){1&a&&(t.TgZ(0,"th",38),t._uU(1,"Now"),t.qZA())}function wm(a,i){1&a&&(t.TgZ(0,"th",39),t._uU(1,"Trans "),t.qZA())}function Fm(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1,"Qty"),t.qZA())}function Nm(a,i){if(1&a&&(t.TgZ(0,"th",41),t._uU(1,"Tax"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet")}}function Pm(a,i){if(1&a&&(t.TgZ(0,"th",41),t._uU(1," Sales + Tax"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet")}}function Lm(a,i){1&a&&(t.TgZ(0,"th",33),t._uU(1,"\xb1 (%)"),t.qZA())}function Qm(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1,"Cost"),t.qZA())}function Ym(a,i){if(1&a&&(t.TgZ(0,"th",41),t._uU(1," Profit"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"ProfitWithTax":"Profit")}}function Rm(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1," Target"),t.qZA())}function Em(a,i){1&a&&(t.TgZ(0,"th",44),t._uU(1," Ach(%)"),t.qZA())}function km(a,i){if(1&a&&(t.TgZ(0,"td",47),t._uU(1),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PrevIndex)}}const Hm=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function Vm(a,i){if(1&a&&(t.TgZ(0,"td",48),t._uU(1),t.qZA()),2&a){const e=t.oxw(),o=e.$implicit,n=e.index;t.Q6J("ngClass",t.WLB(2,Hm,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function Bm(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Quantity,".0-0"))}}function Gm(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Count,".0-0"))}}function jm(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Tax,".0-0"))}}const Wm=function(){return["/menu/Reports/Sales_Report/Standard/Detail"]},$m=function(a,i,e){return{From:a,To:i,TypeID:e}};function Km(a,i){if(1&a&&(t.TgZ(0,"td",33),t.TgZ(1,"a",49),t.ALo(2,"date"),t.ALo(3,"date"),t.TgZ(4,"b"),t._uU(5),t.ALo(6,"number"),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(12,Wm))("queryParams",t.kEZ(13,$m,t.xi3(2,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(3,6,o.pageData.Filter.To,"ddMMyyyy"),e.TypeID)),t.xp6(4),t.Oqu(t.xi3(6,9,e.SalesWithTax,".0-0"))}}const nt=function(a,i){return{"text-warning":a,"text-success":i,"text-right":!0}};function Xm(a,i){if(1&a&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(5,nt,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0"),"")}}function zm(a,i){if(1&a&&(t.TgZ(0,"td",51),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Cost,".0-0")," ")}}function t1(a,i){if(1&a&&(t.TgZ(0,"td",52),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,o.pageData.IgnoreTax?e.ProfitWithTax:e.Profit,".0-0"),"")}}function e1(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.SalesTarget,".0-0"),"")}}const w=function(a,i){return{"text-danger":a,"text-success":i}};function a1(a,i){if(1&a&&(t.TgZ(0,"span",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.Q6J("ngClass",t.WLB(5,w,e.Achievement<0,e.Achievement>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.Achievement,".0-0"))}}function n1(a,i){if(1&a&&(t.TgZ(0,"span",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2).$implicit;t.Q6J("ngClass",t.WLB(5,w,e.AchievementWithTax<0,e.AchievementWithTax>0)),t.xp6(1),t.hij("",t.xi3(2,2,e.AchievementWithTax,".0-0")," ")}}function o1(a,i){if(1&a&&(t.TgZ(0,"td",33),t.YNc(1,a1,3,8,"span",35),t.YNc(2,n1,3,8,"span",35),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function r1(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",31),t._uU(4),t.qZA(),t.YNc(5,km,2,1,"td",45),t.YNc(6,Vm,2,5,"td",46),t.YNc(7,Bm,3,4,"td",25),t.YNc(8,Gm,3,4,"td",25),t.TgZ(9,"td",33),t._uU(10),t.ALo(11,"number"),t.qZA(),t.YNc(12,jm,3,4,"td",25),t.ALo(13,"HideSumZero"),t.YNc(14,Km,7,17,"td",25),t.YNc(15,Xm,3,8,"td",35),t.YNc(16,zm,3,4,"td",36),t.YNc(17,t1,3,4,"td",37),t.YNc(18,e1,3,4,"td",25),t.ALo(19,"HideSumZero"),t.YNc(20,o1,3,2,"td",25),t.ALo(21,"HideSumZero"),t.ALo(22,"HideSumZero"),t.qZA()),2&a){const e=i.$implicit,o=i.index,n=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",n.isCompareData),t.xp6(1),t.Q6J("ngIf",n.isCompareData),t.xp6(1),t.Q6J("ngIf",n.data.WithCategory),t.xp6(1),t.Q6J("ngIf",!n.data.WithCategory),t.xp6(2),t.Oqu(t.xi3(11,14,e.SalesNet,".0-0")),t.xp6(2),t.Q6J("ngIf",!n.data.WithCategory&&t.xi3(13,17,n.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!n.data.WithCategory),t.xp6(1),t.Q6J("ngIf",n.isCompareData),t.xp6(1),t.Q6J("ngIf",n.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",n.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",t.xi3(19,20,n.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(21,23,n.data.Data,"AchievementWithTax")||t.xi3(22,26,n.data.Data,"Achievement"))}}function i1(a,i){1&a&&t._UZ(0,"td",53)}function l1(a,i){1&a&&t._UZ(0,"td",53)}function s1(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Count"),".0-0"),"")}}function p1(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Quantity"),".0-0"),"")}}function c1(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Tax"),".0-0")," ")}}function _1(a,i){if(1&a&&(t.TgZ(0,"td",54),t.TgZ(1,"a",55),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,1,t.xi3(4,4,e.data.Data,"SalesWithTax"),".0-0"))}}function u1(a,i){if(1&a&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&a){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(5,nt,e.comparation<0,e.comparation>0)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.comparation,".0-0")," ")}}function g1(a,i){if(1&a&&(t.TgZ(0,"td",51),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Cost"),".0-0")," ")}}function d1(a,i){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.Oqu(t.xi3(2,1,t.xi3(3,4,e.data.Data,"Profit"),".0-0"))}}function m1(a,i){if(1&a&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.xp6(1),t.hij("",t.xi3(2,1,t.xi3(3,4,e.data.Data,"ProfitWithTax"),".0-0")," ")}}function Z1(a,i){if(1&a&&(t.TgZ(0,"td",52),t.YNc(1,d1,4,7,"span",7),t.YNc(2,m1,4,7,"span",7),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function h1(a,i){if(1&a&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data.Data,"Expense"),".0-0"),"")}}function x1(a,i){if(1&a&&(t.TgZ(0,"span",50),t.ALo(1,"sum"),t.ALo(2,"sum"),t.ALo(3,"sum"),t.ALo(4,"sum"),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.ALo(8,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(23,w,t.xi3(1,2,e.data.Data,"Sales")/t.xi3(2,5,e.data.Data,"SalesTarget")<0,t.xi3(3,8,e.data.Data,"Sales")/t.xi3(4,11,e.data.Data,"SalesTarget")>0)),t.xp6(5),t.Oqu(t.xi3(6,14,t.xi3(7,17,e.data.Data,"Sales")/t.xi3(8,20,e.data.Data,"SalesTarget"),".0-0"))}}function T1(a,i){if(1&a&&(t.TgZ(0,"span",50),t.ALo(1,"sum"),t.ALo(2,"sum"),t.ALo(3,"sum"),t.ALo(4,"sum"),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.ALo(8,"sum"),t.qZA()),2&a){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(23,w,t.xi3(1,2,e.data.Data,"SalesWithTax")/t.xi3(2,5,e.data.Data,"SalesTarget")<0,t.xi3(3,8,e.data.Data,"SalesWithTax")/t.xi3(4,11,e.data.Data,"SalesTarget")>0)),t.xp6(5),t.hij("",t.xi3(6,14,t.xi3(7,17,e.data.Data,"SalesWithTax")/t.xi3(8,20,e.data.Data,"SalesTarget"),".0-0")," ")}}function C1(a,i){if(1&a&&(t.TgZ(0,"td",33),t.YNc(1,x1,9,26,"span",35),t.YNc(2,T1,9,26,"span",35),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function f1(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",18),t.TgZ(3,"tr"),t.TgZ(4,"th"),t._uU(5,"No."),t.qZA(),t.TgZ(6,"th",19),t._uU(7,"Type"),t.qZA(),t.YNc(8,Im,2,0,"th",20),t.YNc(9,Um,2,0,"th",20),t.YNc(10,wm,2,0,"th",21),t.YNc(11,Fm,2,0,"th",22),t.TgZ(12,"th",23),t._uU(13,"Sales"),t.qZA(),t.YNc(14,Nm,2,1,"th",24),t.ALo(15,"HideSumZero"),t.YNc(16,Pm,2,1,"th",24),t.YNc(17,Lm,2,0,"th",25),t.YNc(18,Qm,2,0,"th",26),t.YNc(19,Ym,2,1,"th",24),t.YNc(20,Rm,2,0,"th",27),t.ALo(21,"HideSumZero"),t.YNc(22,Em,2,0,"th",28),t.ALo(23,"HideSumZero"),t.ALo(24,"HideSumZero"),t.qZA(),t.qZA(),t.TgZ(25,"tbody"),t.YNc(26,r1,23,29,"tr",29),t.qZA(),t.TgZ(27,"tfoot"),t.TgZ(28,"tr",30),t._UZ(29,"td"),t._UZ(30,"td",31),t.YNc(31,i1,1,0,"td",32),t.YNc(32,l1,1,0,"td",32),t.YNc(33,s1,4,7,"td",25),t.YNc(34,p1,4,7,"td",25),t.TgZ(35,"td",33),t._uU(36),t.ALo(37,"number"),t.ALo(38,"sum"),t.qZA(),t.YNc(39,c1,4,7,"td",25),t.ALo(40,"HideSumZero"),t.YNc(41,_1,5,7,"td",34),t.YNc(42,u1,3,8,"td",35),t.YNc(43,g1,4,7,"td",36),t.YNc(44,Z1,3,2,"td",37),t.YNc(45,h1,4,7,"td",25),t.ALo(46,"HideSumZero"),t.YNc(47,C1,3,2,"td",25),t.ALo(48,"HideSumZero"),t.ALo(49,"HideSumZero"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(8),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(1),t.Q6J("ngIf",e.data.WithCategory),t.xp6(3),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(15,24,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",t.xi3(21,27,e.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(23,30,e.data.Data,"AchievementWithTax")||t.xi3(24,33,e.data.Data,"Achievement")),t.xp6(4),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(1),t.Q6J("ngIf",e.data.WithCategory),t.xp6(2),t.hij(" ",t.xi3(37,36,t.xi3(38,39,e.data.Data,"SalesNet"),".0-0")," "),t.xp6(3),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(40,42,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(1),t.Q6J("ngIf",e.isCompareData),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",e.pageData.IsExpense&&t.xi3(46,45,e.data.Data,"Expense")),t.xp6(2),t.Q6J("ngIf",t.xi3(48,48,e.data.Data,"AchievementWithTax")||t.xi3(49,51,e.data.Data,"Achievement"))}}function D1(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Interval for Clustering"),t.qZA(),t.TgZ(3,"input",4),t.NdJ("ngModelChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.Interval=n}),t.qZA(),t.qZA()}if(2&a){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Interval)}}function q1(a,i){if(1&a&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",12),t._uU(4),t.ALo(5,"number"),t.qZA(),t._UZ(6,"td"),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.Oqu(e.Key),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Value))}}function y1(a,i){if(1&a&&(t.TgZ(0,"div",5),t.TgZ(1,"table",6),t.TgZ(2,"thead",7),t.TgZ(3,"tr",8),t.TgZ(4,"th",9),t._uU(5,"Interval"),t.qZA(),t.TgZ(6,"th",10),t._uU(7,"Amount Of Products"),t.qZA(),t._UZ(8,"th"),t.qZA(),t.qZA(),t.TgZ(9,"tbody"),t.YNc(10,q1,7,4,"tr",11),t.qZA(),t.qZA(),t.qZA()),2&a){const e=t.oxw();t.xp6(10),t.Q6J("ngForOf",e.data)}}const v1=[{path:"Sales_Report/Standard/Detail",component:Ft},{path:"Sales_Report/Standard/Summary",component:se},{path:"Sales_Report/Standard/Top_Brand",component:Te},{path:"Sales_Report/Standard/Top_Brand/Brand_Sales_Analysis",component:(()=>{class a extends d.n{constructor(e,o){super(e,"Report/CustomerBrand","ReportLoader/CustomerBrand"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();e.active&&""!==e.direction?(this.data.Data=o.sort((n,r)=>{const l="asc"===e.direction;switch(n.Name=null==n.Name?"":n.Name,r.Name=null==r.Name?"":r.Name,e.active){case"Name":return this.compare(n.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);default:return 0}}),this.data.Detail=o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"SalesNTax":return this.compare(n.TotalSales,r.TotalSales,l);case"Cost":return this.compare(n.TotalCost,r.TotalCost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);default:return 0}})):this.data.Data=o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-brand-sales-analysis"]],features:[t.qOj],decls:11,vars:7,consts:[[3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],[1,"container-fluid","mt-5"],["class","table-responsive",4,"ngIf"],[1,"btn","btn-outline-secondary","mr-6",3,"click"],[1,"fa","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Brand",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name","text","Customer",2,"width","280px"],[2,"width","190px"],[2,"width","155px"],[2,"width","130px"],[2,"min-width","124px"],["mat-sort-header","Quantity","text","Qty",1,"text-right",2,"min-width","66px"],["mat-sort-header","SalesNTax","text","Total Sales",1,"text-right",2,"min-width","112px"],["mat-sort-header","Cost","text","Total Cost","class","text-right","style","min-width: 113px",4,"ngIf"],["mat-sort-header","Profit","text","Profit","class","text-right","style","min-width: 114px",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[4,"ngIf"],["mat-sort-header","Cost","text","Total Cost",1,"text-right",2,"min-width","113px"],["mat-sort-header","Profit","text","Profit",1,"text-right",2,"min-width","114px"],[1,"border-bottom"],[3,"routerLink","queryParams"],["colspan","5",1,"p-0"],[1,"w-100","border-top-0"],[4,"ngFor","ngForOf"],[1,"border-top-0","text-left",2,"min-width","124px"],[1,"border-top-0",2,"min-width","66px"],[1,"border-top-0","text-right",2,"min-width","112px"],["class","border-top-0 text-right","style","min-width: 113px",4,"ngIf"],["class","border-top-0 text-right","style","min-width: 114px",3,"ngClass",4,"ngIf"],[1,"border-top-0","text-right",2,"min-width","113px"],[1,"border-top-0","text-right",2,"min-width","114px",3,"ngClass"],[1,"footer"],["colspan","5"],[1,"text-right"],["class","text-right",4,"ngIf"],["class","text-right",3,"ngClass",4,"ngIf"],[1,"text-right",3,"ngClass"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,um,3,0,"a",1),t.TgZ(3,"a",2),t._uU(4," Top Brand "),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,gm,14,6,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.TgZ(9,"div",5),t.YNc(10,ym,23,4,"div",6),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(1),t.Q6J("routerLink",t.DdM(6,vm)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(3),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ],styles:[""]}),a})()},{path:"Sales_Report/Standard/Top_Customers",component:Le},{path:"Sales_Report/Standard/Top_Customers/Top_Customers_By_Age",component:We},{path:"Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender",component:ra},{path:"Sales_Report/Standard/Top_Customers/Top_Suppliers",component:Ta},{path:"Sales_Report/Standard/Products_Sold",component:an},{path:"Sales_Report/Standard/Products_Sold/Product_Sales_by_Outlet",component:dn},{path:"Sales_Report/Standard/Products_Sold/Product_Sales",component:Sn},{path:"Sales_Report/Standard/Products_Sold/Product_Sales_Vs_Delivery",component:Qn},{path:"Sales_Report/Standard/Category_Sold",component:ro},{path:"Sales_Report/Standard/Category_Sold/Category_By_Outlet",component:xo},{path:"Sales_Report/Standard/Category_Sold/Category",component:Ao},{path:"Sales_Report/Standard/Peak_Hour",component:Io},{path:"Sales_Report/Standard/Peak_Hour/Visitor",component:Qo},{path:"Sales_Report/Standard/Peak_Hour/Peak_Hour",component:zo},{path:"Sales_Report/Standard/Daily",component:pr},{path:"Sales_Report/Standard/Daily/Daily_Table",component:zr},{path:"Sales_Report/Standard/Daily/Yearly",component:H},{path:"Sales_Report/Standard/Monthly",component:hr},{path:"Sales_Report/Standard/Monthly/Monthly_Table",component:Ti},{path:"Sales_Report/Standard/Monthly/Yearly_Table",component:H},{path:"Sales_Report/Standard/Daily/Daily_Quantity",component:vi},{path:"Sales_Report/Standard/Daily/Daily_Quantity/Monthly",component:Ii},{path:"Sales_Report/Standard/Outlet_Performance",component:cl},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Graphic",component:xl},{path:"Sales_Report/Standard/Outlet_Performance/Detail",component:Js},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance",component:rp},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance",component:fp},{path:"Sales_Report/Standard/Sales_Order_Type",component:(()=>{class a extends d.n{constructor(e,o){super(e,"Report/OutletPerformanceByType","ReportLoader/OutletPerformance"),this.httpService=e,this.csvConverter=o,this.isCompareData=!1,this.hideMore=!0,this.DateFilterType=!1,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}];const n=new Date;this.Year=n.getFullYear(),this.Month=n.getMonth()}YearMonthToDateRange(){const e=new Date;null==this.Year&&(this.Year=e.getFullYear()),null==this.Month&&(this.Month=e.getMonth()),this.pageData.Filter.From=new Date(this.Year,this.Month,1).toDateString(),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0).toDateString()}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((n,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(n.Name,r.Name,l);case"Count":return this.compare(n.Count,r.Count,l);case"Quantity":return this.compare(n.Quantity,r.Quantity,l);case"Gross":return this.compare(n.Gross,r.Gross,l);case"SalesNet":case"SalesTaxNet":return this.compare(n.SalesNet,r.SalesNet,l);case"Tax":return this.compare(n.Tax,r.Tax,l);case"SalesWithTax":return this.compare(n.SalesWithTax,r.SalesWithTax,l);case"Cost":return this.compare(n.Cost,r.Cost,l);case"Profit":return this.compare(n.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(n.ProfitWithTax,r.ProfitWithTax,l);case"Expense":return this.compare(n.Expense,r.Expense,l);case"NetProfit":return this.compare(n.NetProfit,r.NetProfit,l);case"Target":case"SalesTarget":return this.compare(n.SalesTarget,r.SalesTarget,l);case"Achievement":return this.compare(n.Achievement,r.Achievement,l);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(h.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-by-sales-order-type"]],features:[t.qOj],decls:6,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Compare",3,"model","modelChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"freeze","header"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Count","class","align-right",4,"ngIf"],["mat-sort-header","Quantity","class","align-right",4,"ngIf"],["mat-sort-header","SalesNet",1,"align-right"],["class","align-right",3,"mat-sort-header",4,"ngIf"],["class","text-right",4,"ngIf"],["mat-sort-header","Cost","class","align-right",4,"ngIf"],["mat-sort-header","Target","class","align-right",4,"ngIf"],["mat-sort-header","Achievement","class","align-right","title","Achievement",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"freeze","body"],["class","empty-column",4,"ngIf"],[1,"text-right"],["class","text-right text-primary",4,"ngIf"],[3,"ngClass",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[2,"width","35px"],["mat-sort-header","Count",1,"align-right"],["mat-sort-header","Quantity",1,"align-right"],[1,"align-right",3,"mat-sort-header"],["mat-sort-header","Cost",1,"align-right"],["mat-sort-header","Target",1,"align-right"],["mat-sort-header","Achievement","title","Achievement",1,"align-right"],["style","width: 35px; text-align: center",4,"ngIf"],["style","width: 35px; text-align: center",3,"ngClass",4,"ngIf"],[2,"width","35px","text-align","center"],[2,"width","35px","text-align","center",3,"ngClass"],[3,"routerLink","queryParams"],[3,"ngClass"],[1,"text-right","text-danger"],[1,"text-right","text-success"],[1,"empty-column"],[1,"text-right","text-primary"],[1,"font-weight-bold"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"filters"),t.TgZ(2,"div",1),t.YNc(3,Jm,12,7,"div",2),t.qZA(),t.qZA(),t.TgZ(4,"content"),t.YNc(5,f1,50,54,"div",3),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,D.P,f.QB,m.YE,m.nU,s.sg,s.mk,g.yS],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:[""]}),a})()},{path:"Sales_Report/Standard/Sales_Person",component:Wp},{path:"Sales_Report/Standard/Sales_Person/Sales_Commission",component:sc},{path:"Sales_Report/Standard/Sales_Person/Commission_Report",component:Cc},{path:"Sales_Report/Standard/Sales_Person/Commission_Report/Commission_Report_Detail",component:Sc},{path:"Sales_Report/Standard/Discounted_Sales",component:Ed},{path:"Purchases_Report/Detail",component:a_},{path:"Purchases_Report/Summary",component:s_},{path:"Purchases_Report/Top_Supplier",component:Z_},{path:"Purchases_Report/Product_Bought",component:D_},{path:"Purchases_Report/Product_Purchase_History",component:k_},{path:"Purchases_Report/Daily_Purchase",component:j_},{path:"Purchases_Report/Daily_Purchase/Monthly_Purchase",component:X_},{path:"Purchases_Report/Purchase_Volume",component:tu},{path:"Purchases_Report/Purchased_Sales_Report",component:su},{path:"Purchases_Report/Outlet_Performance",component:Pu},{path:"Purchases_Report/Outlet_Performance/Outlet_Group_Performance",component:rg},{path:"Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance",component:Tg},{path:"Sales_Report/Group/City",component:yg},{path:"Sales_Report/Group/Type",component:Jg},{path:"Sales_Report/Group/Customer_Group",component:Ng},{path:"Sales_Report/Group/Sales_Group",component:Hg},{path:"Sales_Report/Advanced/Tax_Report",component:zg},{path:"Sales_Report/Advanced/Tax_Report/By_Outlet",component:cd},{path:"Sales_Report/Advanced/Product_Life_Cycle",component:hd},{path:"Sales_Report/Advanced/Product_Profit",component:yd},{path:"Sales_Report/Advanced/Exchanged_Sales",component:Od},{path:"Sales_Report/Advanced/Variant_Model_Rank",component:Nd},{path:"Sales_Report/Standard/Discounted_Sales/Discounted_Products",component:Rc},{path:"Return/Sales_Return",component:Bd},{path:"Return/Purchase_Return",component:Kd},{path:"Sales_Report/Standard/Products_Sold/Invoice_Items",component:_m},{path:"Sales_Report/Standard/Price_Analysis",component:(()=>{class a extends d.n{constructor(e){super(e,"Report/UnitPriceAnalysis","ReportLoader/PriceAnalysis"),this.httpService=e}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-price-analysis"]],features:[t.qOj],decls:6,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["container",""],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["type","number",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","250px"],[2,"width","150px"],[4,"ngFor","ngForOf"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"filters"),t.TgZ(2,"div",1),t.YNc(3,D1,4,1,"div",2),t.qZA(),t.qZA(),t.TgZ(4,"content"),t.YNc(5,y1,11,1,"div",3),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,p.wV,p.Fj,p.JJ,p.On,s.sg],pipes:[s.JJ],styles:[""]}),a})()},{path:"",redirectTo:"Sales_Report/Standard/Products_Sold",pathMatch:"full"}];let S1=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[[g.Bz.forChild(v1)],g.Bz]}),a})();var M1=A(1768),b1=A(2060);let O1=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({providers:[s.uU],imports:[[u.R,T.dr,s.ez,S1,c.A0,f.ZU,p.u5,p.UX,rt.FA,L.XK,it.Fk,lt.c,L.Ng,st.Nh,Q.TU,pt.vV,c.A0,m.JX,ot.p0,M1.X,I.d,D.K,U.N,O.Z,q.Q,b1.I,R.T]]}),a})()}}]);
|