dealpos 10.9.3 → 10.9.7
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.1e32cedf5c2c843d.js +1 -0
- package/POS/1322.c5b33467f82a2a22.js +1 -0
- package/POS/1471.35995d904dd77575.js +1 -0
- package/POS/1578.e0e845ab8b03311a.js +1 -0
- package/POS/2075.afe06cae799099c9.js +1 -0
- package/POS/{2262.c93720b4b9adbd01.js → 2262.e6c62a5c97a5f610.js} +0 -0
- package/POS/2350.b0df1b641ab46e3d.js +1 -0
- package/POS/2384.c5794b87e2abff64.js +1 -0
- package/POS/{2397.bb067581f1d02396.js → 2397.392f61486206ea27.js} +1 -1
- package/POS/241.a90a76e44a5bc644.js +1 -0
- package/POS/2418.4f3b3e59a8c3c8a5.js +1 -0
- package/POS/{2605.9d3120f2d682ab66.js → 2605.16d1d8a4223388dd.js} +1 -1
- package/POS/2789.983b9f6f1d3bcf0d.js +1 -0
- package/POS/2944.bff5d69a5a057842.js +1 -0
- package/POS/3079.d45f935a4ee88380.js +1 -0
- package/POS/{3400.163cf8b656ea67ff.js → 3400.668e23f7f84335d6.js} +1 -1
- package/POS/{3502.15dd217ec9d7db44.js → 3502.2ef50a6e263e970d.js} +0 -0
- package/POS/{3975.443f3f03629f0e93.js → 3975.2d99cf1762ddfabf.js} +0 -0
- package/POS/3rdpartylicenses.txt +46 -58
- package/POS/4040.18db1184c4d3735c.js +1 -0
- package/POS/4265.36521e4cc83d2c1b.js +1 -0
- package/POS/{4290.914171aa2d108fbd.js → 4290.48171e41294555b8.js} +1 -1
- package/POS/4440.83112f9fec652c60.js +1 -0
- package/POS/4466.a6bec50880720e2e.js +1 -0
- package/POS/4854.ecb42370b6c09a5e.js +1 -0
- package/POS/{500.bf0a7844fb259aaa.js → 500.07592b982999ece4.js} +0 -0
- package/POS/5179.b9c8d323e42f703e.js +1 -0
- package/POS/5381.ee8f4d2ce3b0ba5e.js +1 -0
- package/POS/5591.bd3f727a3d4ea137.js +1 -0
- package/POS/581.f3bf971102227bd3.js +1 -0
- package/POS/{6346.f8d5ff1b1623f904.js → 6346.74d8f3172ea37636.js} +1 -1
- package/POS/{1879.f43138c57b4a53a6.js → 6437.b347a36c570cb593.js} +1 -1
- package/POS/6472.d7bf5e52e494d356.js +1 -0
- package/POS/6683.0f2d5c6b53abac49.js +1 -0
- package/POS/684.44a21015f8d12006.js +1 -0
- package/POS/6875.8b71b5d23c12d78a.js +1 -0
- package/POS/6963.362e689f10502180.js +1 -0
- package/POS/7091.e8218fd5cceb5175.js +1 -0
- package/POS/{7348.e95196b7a7cb5c20.js → 7348.e8ceaa66dfcc0eb4.js} +0 -0
- package/POS/{7533.28f1f9b2aec54455.js → 7533.698097479baa3fe0.js} +0 -0
- package/POS/773.699dc649e4b4cb2a.js +1 -0
- package/POS/7950.311bac5db03aaf5d.js +1 -0
- package/POS/800.863960b7b91593f4.js +1 -0
- package/POS/8410.47ae0b80b9a1674b.js +1 -0
- package/POS/8543.e9fba138d3d696ea.js +1 -0
- package/POS/8805.29a35f92f33696a9.js +1 -0
- package/POS/8870.d2602765bbb58212.js +1 -0
- package/POS/8932.35c559d26ce9cb2f.js +1 -0
- package/POS/{8985.7c1f5c0905fe0b59.js → 8985.83a45638a42294e9.js} +1 -1
- package/POS/923.cde000f100ff3466.js +1 -0
- package/POS/9265.5353d3713094f546.js +1 -0
- package/POS/{9780.81365b8438d9eea0.js → 9780.5fcff87807f6f9df.js} +1 -1
- package/POS/9859.801cddd4251ab51a.js +1 -0
- package/POS/9916.e32f7ce674b9ab43.js +1 -0
- package/POS/common.d5dfedc800c89e95.js +1 -0
- package/POS/main.da3a7adc2cc1c745.js +1 -0
- package/POS/pos-index.html +4 -4
- package/POS/{primeicons.d2433813f8ffa55d.woff → primeicons.29151a741d66863a.woff} +0 -0
- package/POS/{primeicons.49bf9d9bedd3bf69.ttf → primeicons.5f5d08cd089b4e5d.ttf} +0 -0
- package/POS/{primeicons.4ade98464de5b0cf.svg → primeicons.76044b1c189cc4d7.svg} +43 -7
- package/POS/{primeicons.bc7479046d23c211.eot → primeicons.964f445f3ea9db80.eot} +0 -0
- package/POS/runtime.a6dcc22f2cc17e97.js +1 -0
- package/POS/{styles.5999016d98f5ac9c.css → styles.8ea69b1884e5da1e.css} +224 -23
- package/Scripts/Angular/Controller/Orders/InvoiceInfo.js +3 -0
- package/Scripts/Angular/Controller/Sell.js +8 -8
- package/css/bootstrap_light.scss +4 -0
- package/css/cashierBootstrap.scss +1 -1
- package/package.json +1 -1
- package/POS/1322.3fd6a59a44b14d8f.js +0 -1
- package/POS/144.351a4c7cc2fbc67f.js +0 -1
- package/POS/1471.4886fbd23111eca0.js +0 -1
- package/POS/1578.f7d53549bc4be5f4.js +0 -1
- package/POS/158.4ca103d64cf70d76.js +0 -1
- package/POS/2153.9ff3719617479b90.js +0 -1
- package/POS/2258.938ac4b002eac8e9.js +0 -1
- package/POS/2384.400083d7f1d8d6c1.js +0 -1
- package/POS/2406.cada592da72e5a8b.js +0 -1
- package/POS/2418.99422783c8f573cd.js +0 -1
- package/POS/2944.ad8361b210788ad9.js +0 -1
- package/POS/2997.2fcb8ff2a3006c4b.js +0 -1
- package/POS/3079.be523126e7949e2d.js +0 -1
- package/POS/3116.b33ab0454f948f24.js +0 -1
- package/POS/4167.3541465fae7dfbea.js +0 -1
- package/POS/4466.a92c0f00a0c17840.js +0 -1
- package/POS/4854.435dd1c7c3276302.js +0 -1
- package/POS/5189.08dca51afe72dcc4.js +0 -1
- package/POS/5381.fc711f80c0d2f929.js +0 -1
- package/POS/5671.01939135dae58e9d.js +0 -1
- package/POS/6160.d7848e61782bc4b6.js +0 -1
- package/POS/6683.61881cca82d8ca08.js +0 -1
- package/POS/6825.165310267386b510.js +0 -1
- package/POS/684.c20e133246d31306.js +0 -1
- package/POS/6963.662196d367f46eca.js +0 -1
- package/POS/7355.d51bda5ad9c598dd.js +0 -1
- package/POS/768.c713a18d6d5b82ef.js +0 -1
- package/POS/773.a5e11e68532e58b4.js +0 -1
- package/POS/7901.b7d1d901d204b004.js +0 -1
- package/POS/8190.4507fdea48c313f1.js +0 -1
- package/POS/8410.5b42ba0dbf0ed1c5.js +0 -1
- package/POS/8543.134a9455f2d06917.js +0 -1
- package/POS/8932.a4c44835da2224c4.js +0 -1
- package/POS/9112.69c0719023b01361.js +0 -1
- package/POS/9175.afcba7f721ae5dc8.js +0 -1
- package/POS/9471.6b0f834f43792609.js +0 -1
- package/POS/9916.aaa5e1eba8c311c2.js +0 -1
- package/POS/common.c44a5ad4b034d999.js +0 -1
- package/POS/main.e44370cc1b14e4bc.js +0 -1
- package/POS/runtime.81e7b4faf010af3c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1122],{1122:(zm,F,A)=>{A.r(F),A.d(F,{ReportsModule:()=>Xm});var s=A(6019),p=A(9133),d=A(2262),ot=A(4176),rt=A(8727),P=A(6731),it=A(9859),lt=A(138),st=A(2605),L=A(8525),pt=A(7348),D=A(1949),c=A(5496),h=A(4382),S=A(5304),Q=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 Q.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 g=A(1139),Z=A(4765),u=A(9265),Y=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 Jt(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 Ot(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,Jt,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,Ot,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().onSubmitFilter()}),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",e.data.TotalCurrentRow)("pageData",e.pageData)}}let Nt=(()=>{class a extends g.n{constructor(e,o,n,r,l,m){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=m,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 R}onSubmitFilter(){this.pageData.Filter.PageNumber=1,this.TotalReportAggregate=new R,this.getListData(),this.prevData=[]}preGetList(){this.pageData.Filter.RowCount=this.pageData.Filter.PageNumber>1?1e3:100}postInit(e){this.menuData.H=this.data.PageTitle,this.data.Data=this.prevData.concat(e.Data),this.setRowAccount(),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(){let e=this.data.Data;this.totalCurrentRow=e.length,this.checkEnabledNextBtn(e)}checkEnabledNextBtn(e=[]){let b;b=this.pageData.Filter.PageNumber>1?1e3:100,this.nextPageEnabled=!(e.length-this.prevData.length<b),this.prevData=e}costRatioCalculation(e,o,n){var r=0;return this.pageData.IncludeTax&&(o+=n),0!=o&&(r=e/o*100),r}profitRatioCalculation(e,o,n){var 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){let 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(Z.O),t.Y36(s.uU),t.Y36(h.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,Y.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 R{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 Ft=(()=>{class a{constructor(e,o){this._dialogRef=e,this.data=o,this.modalConfig=new Q.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.s9C("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(a,i,e){return{"text-success":a,"text-warning":i,"text-danger":e}};function te(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.s9C("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,19,e.Date,"dd MMM yy")," "),t.xp6(3),t.hij(" ",t.xi3(16,22,e.Created,"HH:mm")," "),t.xp6(3),t.MGl("href","/A/POS/#/menu/Contacts/Contact/Customers/Info?ID=",e.CustomerID,"",t.LSH),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,25,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,27,e.SalesNSurcharge)),t.xp6(2),t.Q6J("ngClass",t.kEZ(29,zt,3==e.PaymentStateID,2==e.PaymentStateID,1==e.PaymentStateID)),t.xp6(1),t.Oqu(e.PaymentStateString)}}function ee(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 ae(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 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,"SurchargeAmount")),"")}}function oe(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,ee,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,ae,4,6,"td",53),t.YNc(16,ne,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 re(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,te,33,33,"tr",44),t.qZA(),t.YNc(25,oe,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 ie=(()=>{class a extends g.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(Ft,{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(Z.O),t.Y36(s.uU),t.Y36(h.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,"href"],["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.getListData()}),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,re,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,d.YE,d.nU,s.sg,s.mk],pipes:[s.uU,s.JJ,T.qU],styles:[""]}),a})();function le(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 se(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 pe(a,i){1&a&&(t.TgZ(0,"th",20),t._uU(1,"Code"),t.qZA())}function ce(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 _e=function(){return["/menu/Products/Setup/Brand/Brand_Form"]},ue=function(a){return{ID:a}};function ge(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,ce,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,_e))("queryParams",t.VKq(11,ue,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 de(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,pe,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,ge,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 Ze=function(){return["/menu/Reports/Sales_Report/Standard/Top_Brand/Brand_Sales_Analysis"]};let he=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,le,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,se,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,de,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,Ze)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,d.YE,d.nU,s.sg],pipes:[s.JJ],encapsulation:2}),a})();function xe(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 Te=(()=>{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,xe,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 Ce(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 fe(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 Ae(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 De(a,i){if(1&a&&(t.TgZ(0,"span"),t.YNc(1,Ae,5,2,"span",31),t.qZA()),2&a){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",e.Groups)}}function qe(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()}}function ye(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,De,2,1,"span",34),t.YNc(6,qe,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.MGl("href","/A/POS/#/menu/Contacts/Contact/Customers/Info?ID=",e.CustomerID,"",t.LSH),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,10,e.Orders)),t.xp6(3),t.Oqu(t.lcZ(14,12,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(17,14,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(20,16,e.Tax)),t.xp6(3),t.Oqu(t.lcZ(23,18,e.Sales+e.Tax))}}function ve(a,i){if(1&a&&(t.TgZ(0,"tbody",30),t.YNc(1,ye,24,20,"tr",31),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function Se(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,ve,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 be=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]},Oe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},Ue=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let we=(()=>{class a extends g.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(Te,{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(Z.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,"href"],[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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Ce,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,fe,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,Se,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,be)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Oe)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,Ue)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,d.YE,d.nU,s.sg],pipes:[s.JJ],encapsulation:2}),a})();function Ne(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 Fe(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 Pe(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 Le(a,i){if(1&a&&(t.TgZ(0,"tbody",27),t.YNc(1,Pe,12,10,"tr",28),t.qZA()),2&a){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function Qe(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,Le,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 Ye=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},Ee=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},He=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let Ve=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Ne,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,Fe,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,Qe,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,Ye)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Ee)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,He)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,d.YE,d.nU,s.sg],pipes:[s.JJ],styles:[""]}),a})();function Be(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 Ge(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 je(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 We(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,je,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 $e=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},Xe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]},ta=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let ea=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Be,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,Ge,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,We,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,$e)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Xe)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,ta)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,d.YE,d.nU,s.sg],pipes:[s.JJ],styles:[""]}),a})();function aa(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 na(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 oa=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]},ra=function(a,i,e){return{From:a,SupplierID:i,To:e}};function ia(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",37),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.MGl("href","/A/POS/#/menu/Contacts/Contact/Customers/Info?ID=",e.SupplierID,"",t.LSH),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,8,e.Quantity)),t.xp6(3),t.Q6J("routerLink",t.DdM(19,oa))("queryParams",t.kEZ(20,ra,t.xi3(13,10,o.pageData.Filter.From,"ddMMyyyy"),o.data.SupplierID,t.xi3(14,13,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.hij(" ",t.xi3(16,16,e.Total,".0-0"),"")}}function la(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,ia,17,24,"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 sa=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},ca=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},ua=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]};let ga=(()=>{class a extends g.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(Z.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,"href"],[1,"text-right","text-success"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.getListData()}),t.TgZ(1,"actions"),t.YNc(2,aa,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,na,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,la,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,sa)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,ca)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,ua)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,d.YE,d.nU,s.sg],pipes:[s.JJ,s.uU],styles:[""]}),a})();var da=A(2254);function ma(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"a",18),t.NdJ("click",function(){return t.CHM(e),t.oxw().updateMinstock()}),t._uU(1,"Submit"),t.qZA()}}function Za(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"a",20),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",21),t._uU(3," Export "),t.qZA(),t.TgZ(4,"button",6),t._UZ(5,"b",22),t.qZA(),t.TgZ(6,"ul",23),t.TgZ(7,"li",8),t.TgZ(8,"a",24),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 ha(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",25),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",26),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",27),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",28),t.NdJ("dateChange",function(n){return t.CHM(e),t.oxw().pageData.Filter.From=n}),t.qZA(),t.TgZ(13,"datepicker",29),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",30),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",31),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 xa(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,"Sales Order Type"),t.qZA(),t.TgZ(4,"ng-select",30),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",33),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",34),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",35),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",36),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",36),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",37),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 Ta(a,i){1&a&&(t.TgZ(0,"th",53),t._uU(1,"COST"),t.qZA())}function Ca(a,i){1&a&&(t.TgZ(0,"th",54),t._uU(1,"INVENTORY "),t.qZA())}function fa(a,i){1&a&&(t.TgZ(0,"th",55),t._uU(1,"REORDER MIN"),t.qZA())}function Aa(a,i){1&a&&(t.TgZ(0,"th",56),t._uU(1,"UPDATE ROP"),t.qZA())}function Da(a,i){1&a&&(t.TgZ(0,"th",57),t._uU(1,"PROFIT"),t.qZA())}function qa(a,i){if(1&a&&(t.TgZ(0,"a",68),t._UZ(1,"img",69),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 ya(a,i){if(1&a&&(t.TgZ(0,"a",70),t._UZ(1,"img",71),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 va(a,i){if(1&a&&(t.TgZ(0,"td",64),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"]},Ma=function(a,i,e){return{VariantID:a,From:i,To:e}};function ba(a,i){if(1&a&&(t.TgZ(0,"a",72),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,Ma,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 Ja=function(a,i,e){return{ProductID:a,From:i,To:e}};function Oa(a,i){if(1&a&&(t.TgZ(0,"a",72),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,Ja,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 Ia(a,i){if(1&a&&(t.TgZ(0,"td",64),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 Ua(a,i){if(1&a&&(t.TgZ(0,"td",64),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 wa(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"td",64),t.TgZ(1,"input",73),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 Na(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.Q6J("ngClass",e.Profit>=0?"text-success":"text-danger"),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.Profit)," ")}}const Fa=function(a){return[a]},Pa=function(a){return{ID:a}};function La(a,i){if(1&a&&(t.TgZ(0,"tr",58),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"div",59),t.TgZ(5,"div",60),t.YNc(6,qa,2,3,"a",61),t.YNc(7,ya,2,2,"a",62),t.qZA(),t.TgZ(8,"a",63),t._uU(9),t.qZA(),t.qZA(),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.TgZ(12,"td",64),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,va,3,3,"td",65),t.TgZ(16,"td",64),t.YNc(17,ba,5,16,"a",66),t.YNc(18,Oa,5,16,"a",66),t.qZA(),t.YNc(19,Ia,3,3,"td",65),t.YNc(20,Ua,3,3,"td",65),t.YNc(21,wa,2,1,"td",65),t.YNc(22,Na,3,4,"td",67),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,Fa,1==n.pageData.Filter.GroupByVariant?"/menu/Products/Catalog/Variants/Info":"/menu/Products/Catalog/Products/Info"))("queryParams",t.VKq(19,Pa,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 Qa(a,i){if(1&a&&(t.TgZ(0,"td",64),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 Ya(a,i){if(1&a&&(t.TgZ(0,"td",77),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 Ra(a,i){if(1&a&&(t.TgZ(0,"td",64),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 Ea(a,i){if(1&a&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",75),t.TgZ(2,"td",76),t._uU(3,"Total : "),t.qZA(),t.TgZ(4,"td",64),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.qZA(),t.YNc(8,Qa,4,6,"td",65),t.TgZ(9,"td",77),t.TgZ(10,"a"),t._uU(11),t.ALo(12,"number"),t.ALo(13,"sum"),t.qZA(),t.qZA(),t.YNc(14,Ya,5,6,"td",78),t.YNc(15,Ra,4,6,"td",65),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 ka(a,i){if(1&a){const e=t.EpF();t.TgZ(0,"div",38),t.TgZ(1,"table",39),t.NdJ("matSortChange",function(n){return t.CHM(e),t.oxw().sortData(n)}),t.TgZ(2,"thead",40),t.TgZ(3,"tr"),t.TgZ(4,"th",41),t._uU(5,"No"),t.qZA(),t.TgZ(6,"th",42),t._uU(7,"NAME"),t.qZA(),t.TgZ(8,"th",43),t._uU(9,"CODE"),t.qZA(),t.TgZ(10,"th",44),t._uU(11,"QUANTITY"),t.qZA(),t.YNc(12,Ta,2,0,"th",45),t.TgZ(13,"th",46),t._uU(14,"SALES "),t.qZA(),t.YNc(15,Ca,2,0,"th",47),t.YNc(16,fa,2,0,"th",48),t.YNc(17,Aa,2,0,"th",49),t.YNc(18,Da,2,0,"th",50),t.qZA(),t.qZA(),t.TgZ(19,"tbody"),t.YNc(20,La,23,21,"tr",51),t.qZA(),t.YNc(21,Ea,16,15,"tfoot",52),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 Va=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales_by_Outlet"]};let Ba=(()=>{class a extends g.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,da.n.Success),this.getListData()})}sortData(e){const o=this.data.Data.slice();function n(r,l,m){return(r<l?-1:1)*(m?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const m="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(),m);case"Code":return n(r.Code.toLocaleLowerCase(),l.Code.toLocaleLowerCase(),m);case"Brand":return n(r.BrandName.toLocaleLowerCase(),l.BrandName.toLocaleLowerCase(),m);case"Quantity":return n(r.Quantity,l.Quantity,m);case"Total_Cost":return n(r.UnitCost,l.UnitCost,m);case"Inventory":return n(r.UnitsInStock,l.UnitsInStock,m);case"Total_Sales":return n(r.Total,l.Total,m);case"ReOrder":return n(r.MinStock,l.MinStock,m);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(Z.O),t.Y36(v._W),t.Y36(h.gz))},a.\u0275cmp=t.Xpm({type:a,selectors:[["POS-product-sales"]],features:[t.qOj],decls:26,vars:9,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"],["href","/A/POS/#/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales"],["href","/A/POS/#/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales_Vs_Delivery"],[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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,ma,2,0,"a",1),t.YNc(3,Za,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",10),t._uU(15,"Compare with Delivery"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"filters"),t.TgZ(17,"div",11),t.YNc(18,ha,22,15,"div",12),t.YNc(19,xa,29,9,"div",13),t.qZA(),t.TgZ(20,"a",14),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(21,"More "),t._UZ(22,"i",15),t.qZA(),t.qZA(),t.TgZ(23,"content"),t.TgZ(24,"div",16),t.YNc(25,ka,22,7,"div",17),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(8,Va)),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,h.yS,c.w9,p.JJ,p.On,f.QB,D.P,q.J,d.YE,d.nU,s.sg,p.Fj,M.b,s.mk],pipes:[s.JJ,s.uU,T.qU],styles:[""]}),a})();function Ga(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 ja(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 Wa(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 $a(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 Ka(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,ja,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,Wa,4,1,"div",15),t.YNc(20,$a,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 Xa(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 za(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 tn(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,za,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 en(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,Xa,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,tn,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)}}let an=(()=>{class a extends g.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(Z.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-sales-by-outlet"]],features:[t.qOj],decls:10,vars:6,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["href","/A/POS/#/menu/Reports/Sales_Report/Standard/Products_Sold",1,"btn","btn-outline-secondary"],[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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Ga,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,Ka,21,10,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,en,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(5),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,D.P,q.J,s.sg],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",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 rn(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,on,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 ln(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 sn(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 pn=function(a){return[a]},cn=function(a){return{ID:a}};function _n(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,sn,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,pn,o.pageData.Filter.GroupByVariant?"/menu/Products/Catalog/Variants/Info":"/menu/Products/Catalog/Products/Info"))("queryParams",t.VKq(13,cn,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 un(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 gn(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,un,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 dn(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,ln,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,_n,11,15,"tr",23),t.qZA(),t.YNc(13,gn,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)}}let mn=(()=>{class a extends g.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(Z.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-product-sales-by-month"]],features:[t.qOj],decls:10,vars:5,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["href","/A/POS/#/menu/Reports/Sales_Report/Standard/Products_Sold",1,"btn","btn-outline-secondary"],[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.getListData()}),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,rn,26,12,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,dn,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(5),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,d.YE,d.nU,s.sg,h.yS],pipes:[s.JJ,T.qU],styles:[""]}),a})();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"),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 xn(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 Tn(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,Zn,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,hn,4,1,"div",13),t.YNc(16,xn,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 Cn(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 fn(a,i){if(1&a&&(t.TgZ(0,"tr"),t._UZ(1,"th"),t._UZ(2,"th"),t.YNc(3,Cn,2,1,"th",25),t.qZA()),2&a){const e=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",e.data.Outlet)}}function An(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 Dn(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 qn(a,i){if(1&a&&(t.TgZ(0,"tr",22),t.YNc(1,Dn,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 yn(a,i){if(1&a&&(t.TgZ(0,"div",18),t.TgZ(1,"table",19),t.TgZ(2,"thead",20),t.YNc(3,fn,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,An,2,1,"th",23),t.qZA(),t.qZA(),t.TgZ(10,"tbody"),t.YNc(11,qn,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 vn=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Sn=(()=>{class a extends g.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(Z.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.getListData()}),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,Tn,21,9,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,yn,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,vn)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,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&&(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 bn(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 Jn(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,Mn,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,bn,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 On(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 In(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1," COST"),t.qZA())}function Un(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1," PROFIT"),t.qZA())}function wn(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 Nn(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 Fn=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]},Pn=function(a,i,e){return{CategoryID:a,From:i,To:e}};function Ln(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,wn,3,3,"td",39),t.YNc(19,Nn,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,Fn))("queryParams",t.kEZ(24,Pn,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 Qn(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 Yn(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 Rn(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 En(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,In,2,0,"th",33),t.YNc(15,Un,2,0,"th",34),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,Ln,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,Qn,4,6,"td",39),t.YNc(40,Yn,4,6,"td",40),t.qZA(),t.qZA(),t.qZA(),t.YNc(41,Rn,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 Hn=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold/Category"]},Bn=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold/Category_By_Outlet"]};let Gn=(()=>{class a extends g.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(Z.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.getListData()}),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,Jn,20,9,"div",8),t.YNc(14,On,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,En,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,Hn)),t.xp6(3),t.Q6J("routerLink",t.DdM(9,Bn)),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,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,q.J,D.P,d.YE,d.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function jn(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 Wn(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,jn,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 $n(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 Kn(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 Xn(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 zn(a,i){if(1&a&&(t.TgZ(0,"td"),t.YNc(1,Kn,2,1,"span",19),t.YNc(2,Xn,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 to(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,zn,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 eo(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 ao(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,eo,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 no(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,$n,2,2,"th",17),t.qZA(),t.qZA(),t.TgZ(5,"tbody"),t.YNc(6,to,2,1,"tr",18),t.qZA(),t.YNc(7,ao,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 oo=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold"]};let ro=(()=>{class a extends g.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 m=0;m<this.data.Dataheader.length;m++)if(e.active==this.data.Dataheader[m])return this.compare(n[this.data.Dataheader[m]],r[this.data.Dataheader[m]],l)}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(Z.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.getListData()}),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,Wn,15,5,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,no,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,oo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,q.J,d.YE,s.sg,d.nU],pipes:[s.JJ],styles:[""]}),a})();var U=A(7168);function io(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 lo(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 so=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold"]};let po=(()=>{class a extends g.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.getListData()}),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,io,13,6,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,lo,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,so)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,U.J],styles:[""]}),a})();var J=A(3975);function co(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 _o(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 uo(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 go(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,co,4,2,"div",9),t.YNc(10,_o,4,2,"div",9),t.YNc(11,uo,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 mo(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 ho=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Visitor"]},To=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Peak_Hour"]};let Co=(()=>{class a extends g.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.getListData()}),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,go,12,8,"div",4),t.qZA(),t.qZA(),t.TgZ(9,"content"),t.YNc(10,mo,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,ho)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,To)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,D.P,f.QB,J.D,U.J],styles:[""]}),a})();function fo(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 Ao(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 Do(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,Ao,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 qo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour"]},vo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Peak_Hour"]};let So=(()=>{class a extends g.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(Z.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.getListData()}),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,fo,10,5,"div",6),t.qZA(),t.qZA(),t.TgZ(12,"content"),t.YNc(13,Do,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,qo)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,vo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Mo(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 bo(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 Jo(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 Oo(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 Io(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,bo,4,2,"div",12),t.YNc(10,Jo,4,2,"div",12),t.YNc(11,Oo,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 Uo(a,i){1&a&&(t.TgZ(0,"th",22),t._uU(1,"Revenue"),t.qZA())}function wo(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 No(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,wo,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 Fo(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 Po(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,Uo,2,0,"th",23),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,No,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,Fo,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 Qo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Visitor"]},Yo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour"]};let Ro=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Mo,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,Io,12,7,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Po,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,Qo)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,Yo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,D.P,f.QB,s.sg],pipes:[s.JJ,T.qU,T.Fo],styles:[""]}),a})();function Eo(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 ko(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,Eo,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 Ho(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 Bo=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Table"]},Go=function(a,i){return{Month:a,Year:i}},jo=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]},$o=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity"]};let Ko=(()=>{class a extends g.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(Z.O),t.Y36(h.gz),t.Y36(h.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.getListData()}),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,ko,22,10,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,Ho,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,Bo))("queryParams",t.WLB(9,Go,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,jo)),t.xp6(3),t.Q6J("routerLink",t.DdM(13,$o)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,J.D],styles:[""]}),a})();function Xo(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 zo(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,Xo,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 tr(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 ar=function(){return["/menu/Reports/Sales_Report/Standard/Monthly/Monthly_Table"]},or=function(){return["/menu/Reports/Sales_Report/Standard/Monthly/Yearly_Table"]};let rr=(()=>{class a extends g.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(Z.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.getListData()}),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,zo,18,8,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,tr,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,ar)),t.xp6(6),t.Q6J("routerLink",t.DdM(7,or)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,J.D],styles:[""]}),a})();function ir(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 lr(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 sr(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,lr,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 pr(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 cr(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 _r(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,cr,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 ur(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 gr=function(a,i){return{"text-success":a,"text-danger":i}};function dr(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,pr,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,_r,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,ur,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,gr,e.data.TotalDiff>0,e.data.TotalDiff<0)),t.xp6(1),t.hij(" ",t.lcZ(20,5,e.data.TotalDiff),"")}}const mr=function(){return["/menu/Reports/Sales_Report/Standard/Monthly"]},Zr=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]};let H=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,ir,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,sr,26,13,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,dr,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,mr)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,Zr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.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 hr(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 xr(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 Tr(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,xr,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 Cr(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 fr(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1," Tax "),t.qZA())}function Ar(a,i){1&a&&(t.TgZ(0,"th",49),t._uU(1,"Net Sales + Tax"),t.qZA())}function Dr(a,i){1&a&&(t.TgZ(0,"th",50),t._uU(1,"Cost"),t.qZA())}function qr(a,i){1&a&&(t.TgZ(0,"th",51),t._uU(1," Profit "),t.qZA())}function yr(a,i){1&a&&(t.TgZ(0,"th",52),t._uU(1," Profit + Tax Include "),t.qZA())}function vr(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 Sr(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 Mr(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 br(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 Jr(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 Or(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,vr,3,3,"td",46),t.YNc(20,Sr,3,3,"td",46),t.YNc(21,Mr,3,3,"td",47),t.YNc(22,br,3,3,"td",46),t.YNc(23,Jr,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 Ir(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 Ur(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 wr(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 Nr(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 Fr(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 Pr(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,fr,2,0,"th",38),t.YNc(17,Ar,2,0,"th",39),t.YNc(18,Dr,2,0,"th",40),t.YNc(19,qr,2,0,"th",41),t.YNc(20,yr,2,0,"th",42),t.qZA(),t.qZA(),t.TgZ(21,"tbody"),t.YNc(22,Or,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,Ir,4,6,"td",46),t.YNc(44,Ur,4,6,"td",46),t.YNc(45,wr,4,6,"td",47),t.YNc(46,Nr,4,6,"td",47),t.YNc(47,Fr,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 Lr=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]},Qr=function(a,i){return{Month:a,Year:i}},Yr=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]};let Rr=(()=>{class a extends g.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(Z.O),t.Y36(h.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,hr,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,Tr,18,8,"div",10),t.YNc(15,Cr,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,Pr,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,Lr))("queryParams",t.WLB(10,Qr,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,Yr)),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,h.yS,c.w9,p.JJ,p.On,c.ir,d.YE,d.nU,s.sg,s.mk],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function Er(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 kr(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 Hr(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,kr,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 Vr(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Tax"),t.qZA())}function Br(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Sales + Tax"),t.qZA())}function Gr(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Cost"),t.qZA())}function jr(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Profit"),t.qZA())}function Wr(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 $r(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 Kr(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 Xr(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 zr(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,Wr,4,6,"td",34),t.YNc(17,$r,4,6,"td",34),t.YNc(18,Kr,3,4,"td",35),t.YNc(19,Xr,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 ti(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 ei(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 ai(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 ni(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 oi(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,Vr,2,0,"th",30),t.YNc(15,Br,2,0,"th",30),t.YNc(16,Gr,2,0,"th",30),t.YNc(17,jr,2,0,"th",30),t.qZA(),t.qZA(),t.TgZ(18,"tbody"),t.YNc(19,zr,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,ti,5,9,"td",34),t.YNc(40,ei,5,9,"td",34),t.YNc(41,ai,4,7,"td",35),t.YNc(42,ni,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 ri=function(){return["/menu/Reports/Sales_Report/Standard/Monthly"]},ii=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]};let li=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Er,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,Hr,30,13,"div",10),t.qZA(),t.qZA(),t.TgZ(15,"content"),t.YNc(16,oi,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,ri)),t.xp6(6),t.Q6J("routerLink",t.DdM(8,ii)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.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 si(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 pi(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,si,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 ci(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 _i=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]},gi=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity/Monthly"]};let di=(()=>{class a extends g.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(Z.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.getListData()}),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,pi,22,10,"div",4),t.qZA(),t.qZA(),t.TgZ(9,"content"),t.YNc(10,ci,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,_i)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,gi)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,J.D],styles:[""]}),a})();function mi(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 Zi(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,mi,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 hi(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 Ti=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity"]};let Ci=(()=>{class a extends g.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(Z.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.getListData()}),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,Zi,18,8,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,hi,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,Ti)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,J.D],styles:[""]}),a})();function fi(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 Ai(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 Di(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 qi(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 yi(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,Ai,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,Di,5,2,"div",19),t.YNc(15,qi,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 vi(a,i){1&a&&(t.TgZ(0,"th",44),t._uU(1,"Cost"),t.qZA())}function Si(a,i){1&a&&(t.TgZ(0,"th",45),t._uU(1,"Profit"),t.qZA())}function Mi(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 bi(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 Ji(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,Mi,3,3,"td",42),t.YNc(15,bi,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 Oi(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 Ii(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 Ui(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,vi,2,0,"th",36),t.YNc(12,Si,2,0,"th",37),t.qZA(),t.qZA(),t.TgZ(13,"tbody"),t.YNc(14,Ji,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,Oi,4,7,"td",42),t.YNc(26,Ii,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 wi(a,i){1&a&&(t.TgZ(0,"th",44),t._uU(1,"Cost"),t.qZA())}function Ni(a,i){1&a&&(t.TgZ(0,"th",45),t._uU(1,"Profit"),t.qZA())}function Fi(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 Pi(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 Li(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,Fi,3,3,"td",42),t.YNc(21,Pi,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 Qi(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 Yi(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 Ri(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,wi,2,0,"th",36),t.YNc(16,Ni,2,0,"th",37),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,Li,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,Qi,4,7,"td",42),t.YNc(39,Yi,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 Ei(a,i){1&a&&(t.TgZ(0,"p"),t._uU(1,"No Data has been loaded!"),t.qZA())}function ki(a,i){if(1&a&&(t.TgZ(0,"div",28),t.YNc(1,Ui,27,19,"table",29),t.YNc(2,Ri,40,36,"table",29),t.YNc(3,Ei,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 Vi=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Detail"]},Gi=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]},Wi=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]},Ki=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Graphic"]};let Xi=(()=>{class a extends g.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,m,x){return(l<m?-1:1)*(x?1:-1)}o.active&&""!==o.direction&&null!=e&&(e=e.sort((l,m)=>{const x="asc"===o.direction;switch(o.active){case"Outlet":return r(l.Outlet,m.Outlet,x);case"Transaction":return r(l.Transaction,m.Transaction,x);case"Quantity":return r(l.Quantity,m.Quantity,x);case"Sales":return r(l.SalesNet,m.SalesNet,x);case"SalesTax":return r(l.SalesNet+l.Tax,m.SalesNet+l.Tax,x);case"Tax":return r(l.Tax,m.Tax,x);case"Cost":return r(l.Cost,m.Cost,x);case"Profit":return r(l.Profit,m.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(Z.O),t.Y36(h.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,fi,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,yi,16,8,"div",10),t.qZA(),t.qZA(),t.TgZ(20,"content"),t.YNc(21,ki,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,Vi)),t.xp6(5),t.Q6J("routerLink",t.DdM(10,Gi)),t.xp6(3),t.Q6J("routerLink",t.DdM(11,Wi)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,Ki)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,c.ir,D.P,f.QB,d.YE,d.nU,s.sg,s.mk],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function zi(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 tl(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 el(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 al(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,zi,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,tl,5,2,"div",10),t.YNc(15,el,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 nl(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 rl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]};let il=(()=>{class a extends g.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.getListData()}),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,al,16,8,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,nl,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,rl)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,D.P,f.QB,U.J],styles:[""]}),a})();function ll(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 sl(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 pl(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 cl(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 _l(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 ul(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,sl,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,pl,5,2,"div",22),t.YNc(15,cl,4,1,"div",22),t.YNc(16,_l,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 gl(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 dl(a,i){1&a&&(t.TgZ(0,"th",58),t._uU(1,"Prev"),t.qZA())}function ml(a,i){1&a&&(t.TgZ(0,"th",58),t._uU(1,"Now"),t.qZA())}function Zl(a,i){1&a&&(t.TgZ(0,"th",59),t._uU(1,"Trans "),t.qZA())}function hl(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 xl(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 Tl(a,i){1&a&&(t.TgZ(0,"th",53),t._uU(1,"\xb1 (%)"),t.qZA())}function Cl(a,i){1&a&&(t.TgZ(0,"th",61),t._uU(1,"Cost"),t.qZA())}function fl(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 Al(a,i){1&a&&(t.TgZ(0,"th",62),t._uU(1,"Expense"),t.qZA())}function Dl(a,i){1&a&&(t.TgZ(0,"th",63),t._uU(1,"Net Profit"),t.qZA())}function ql(a,i){1&a&&(t.TgZ(0,"th",64),t._uU(1," Target"),t.qZA())}function yl(a,i){1&a&&(t.TgZ(0,"th",65),t._uU(1," Ach(%)"),t.qZA())}function vl(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 Sl=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function Ml(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,Sl,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function bl(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 Jl(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 Ol=function(){return["/menu/Reports/Sales_Report/Standard/Summary"]},Il=function(a,i,e){return{EntityID:a,From:i,To:e}};function Ul(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,Ol))("queryParams",t.kEZ(13,Il,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 wl(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 Nl(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 Fl(a,i){if(1&a&&(t.TgZ(0,"td",71),t.YNc(1,wl,3,4,"ng-container",72),t.YNc(2,Nl,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 Pl(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 O=function(a,i){return{"text-danger":a,"text-success":i}};function Ll(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,O,e.Profit<0,e.Profit>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.Profit,"1.0-0"))}}function Ql(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,O,e.ProfitWithTax<0,e.ProfitWithTax>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.ProfitWithTax,"1.0-0"))}}function Yl(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,Ll,3,8,"span",55),t.YNc(2,Ql,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 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.hij(" ",t.xi3(2,1,e.Expense,"1.0-0"),"")}}function El(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 kl(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 Hl(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,O,e.Achievement<0,e.Achievement>0)),t.xp6(1),t.Oqu(t.xi3(2,2,e.Achievement,"1.0-0"))}}function Vl(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,O,e.AchievementWithTax<0,e.AchievementWithTax>0)),t.xp6(1),t.hij("",t.xi3(2,2,e.AchievementWithTax,"1.0-0")," ")}}function Bl(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,Hl,3,8,"span",55),t.YNc(2,Vl,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 Gl(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,vl,2,1,"td",66),t.YNc(6,Ml,2,5,"td",67),t.YNc(7,bl,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,Jl,3,4,"td",43),t.ALo(18,"HideSumZero"),t.YNc(19,Ul,7,17,"td",43),t.YNc(20,Fl,4,6,"td",55),t.YNc(21,Pl,3,4,"td",56),t.YNc(22,Yl,3,2,"td",43),t.YNc(23,Rl,3,4,"td",43),t.ALo(24,"HideSumZero"),t.YNc(25,El,3,4,"td",57),t.YNc(26,kl,3,4,"td",43),t.ALo(27,"HideSumZero"),t.YNc(28,Bl,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 jl(a,i){1&a&&t._UZ(0,"td",76)}function Wl(a,i){1&a&&t._UZ(0,"td",76)}function $l(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 Kl(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 Xl(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 zl(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 ts(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 es(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 as(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 ns(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,es,6,17,"span",55),t.YNc(2,as,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 os(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 rs(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 is(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 ls(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,O,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 ss(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,O,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 ps(a,i){if(1&a&&(t.TgZ(0,"td",53),t.YNc(1,ls,9,26,"span",55),t.YNc(2,ss,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 cs(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,dl,2,0,"th",37),t.YNc(9,ml,2,0,"th",37),t.YNc(10,Zl,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,hl,2,1,"th",42),t.ALo(18,"HideSumZero"),t.YNc(19,xl,2,1,"th",42),t.YNc(20,Tl,2,0,"th",43),t.YNc(21,Cl,2,0,"th",44),t.YNc(22,fl,2,1,"th",42),t.YNc(23,Al,2,0,"th",45),t.ALo(24,"HideSumZero"),t.YNc(25,Dl,2,0,"th",46),t.YNc(26,ql,2,0,"th",47),t.ALo(27,"HideSumZero"),t.YNc(28,yl,2,0,"th",48),t.ALo(29,"HideSumZero"),t.ALo(30,"HideSumZero"),t.qZA(),t.qZA(),t.TgZ(31,"tbody"),t.YNc(32,Gl,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,jl,1,0,"td",52),t.YNc(38,Wl,1,0,"td",52),t.YNc(39,$l,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,Kl,4,7,"td",43),t.ALo(53,"HideSumZero"),t.YNc(54,Xl,5,7,"td",54),t.YNc(55,zl,3,8,"td",55),t.YNc(56,ts,4,7,"td",56),t.YNc(57,ns,3,2,"td",43),t.YNc(58,os,4,7,"td",43),t.ALo(59,"HideSumZero"),t.YNc(60,rs,4,7,"td",57),t.YNc(61,is,4,7,"td",43),t.ALo(62,"HideSumZero"),t.YNc(63,ps,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 us=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},ds=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]},Zs=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]},xs=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Graphic"]};let Ts=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,ll,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,ul,17,9,"div",10),t.YNc(20,gl,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,cs,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,us)),t.xp6(5),t.Q6J("routerLink",t.DdM(11,ds)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,Zs)),t.xp6(3),t.Q6J("routerLink",t.DdM(13,xs)),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,h.yS,c.w9,p.JJ,p.On,c.ir,D.P,f.QB,d.YE,d.nU,s.sg,s.mk],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:[""]}),a})();function Cs(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 fs(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 As(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 Ds(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 qs(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,fs,5,2,"div",15),t.YNc(6,As,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,Ds,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 ys(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1,"Prev"),t.qZA())}function vs(a,i){1&a&&(t.TgZ(0,"th",48),t._uU(1,"Now"),t.qZA())}function Ss(a,i){1&a&&(t.TgZ(0,"th",49),t._uU(1," \xb1 (%) "),t.qZA())}function Ms(a,i){1&a&&(t.TgZ(0,"th",50),t._uU(1," Cost "),t.qZA())}function bs(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 Js(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 Os=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function Is(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,Os,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 Us(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 ws(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 Ns(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 Fs(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,Js,2,1,"td",28),t.YNc(2,Is,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,Us,3,8,"td",45),t.YNc(24,ws,3,4,"td",46),t.YNc(25,Ns,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 Ps(a,i){1&a&&t._UZ(0,"td",42)}function Ls(a,i){1&a&&t._UZ(0,"td",42)}function Qs(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 Ys(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 Rs(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 Es(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,ys,2,0,"th",28),t.YNc(5,vs,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,Ss,2,0,"th",36),t.YNc(21,Ms,2,0,"th",37),t.YNc(22,bs,2,1,"th",38),t.qZA(),t.qZA(),t.TgZ(23,"tbody"),t.YNc(24,Fs,26,30,"tr",39),t.qZA(),t.TgZ(25,"tfoot"),t.TgZ(26,"tr",40),t.YNc(27,Ps,1,0,"td",41),t.YNc(28,Ls,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,Qs,3,8,"td",45),t.YNc(56,Ys,4,7,"td",46),t.YNc(57,Rs,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 Hs=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},Bs=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]};let Gs=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Cs,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,qs,12,7,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,Es,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,Hs)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,Bs)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,D.P,c.w9,p.JJ,p.On,f.QB,d.YE,d.nU,s.sg,s.mk],pipes:[s.JJ,T.qU],styles:[""]}),a})();function js(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 Ws(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 $s=function(a){return{"align-right":a}};function Ks(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,$s,"Outlet"!=e)),t.xp6(1),t.Oqu(e)}}function Xs(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 zs(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 tp(a,i){if(1&a&&(t.TgZ(0,"td"),t.YNc(1,Xs,2,1,"div",23),t.YNc(2,zs,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 ep(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,tp,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 ap(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 np(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,ap,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 op(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,Ks,2,5,"th",19),t.qZA(),t.qZA(),t.TgZ(5,"tbody"),t.YNc(6,ep,2,1,"tr",20),t.qZA(),t.YNc(7,np,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 ip=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},sp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]};let pp=(()=>{class a extends g.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 m=0;m<this.data.Dataheader.length;m++)if(e.active==this.data.Dataheader[m])return this.compare(n[this.data.Dataheader[m]],r[this.data.Dataheader[m]],l)}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,js,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,Ws,13,6,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,op,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,ip)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,sp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,d.YE,s.sg,d.nU,s.mk],pipes:[s.JJ],styles:[""]}),a})();function cp(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 _p(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 up(a,i){1&a&&(t.TgZ(0,"th",39),t._uU(1,"Sales Group"),t.qZA())}function gp(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1," Cost "),t.qZA())}function dp(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Profit "),t.qZA())}function mp(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1,"Target "),t.qZA())}function Zp(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1,"Ach(%) "),t.qZA())}function hp(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 xp(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.Oqu(t.lcZ(2,1,e.Cost))}}function Tp(a,i){if(1&a&&(t.TgZ(0,"td",48),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 Cp(a,i){if(1&a&&(t.TgZ(0,"td",48),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 fp(a,i){if(1&a&&(t.TgZ(0,"td",48),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 Ap=function(){return["/menu/Reports/Sales_Report/Standard/Detail"]},Dp=function(a,i,e){return{SalesPersonID:a,From:i,To:e}};function qp(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,hp,2,1,"td",33),t.TgZ(5,"td",35),t.TgZ(6,"a",46),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,xp,3,3,"td",37),t.YNc(24,Tp,3,3,"td",38),t.YNc(25,Cp,3,3,"td",38),t.YNc(26,fp,3,3,"td",38),t.qZA()),2&a){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.MGl("href","/A/POS/#/menu/Contacts/Contact/Sales_Person/Info?","ID="+e.ID,"",t.LSH),t.xp6(1),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",o.data.Show),t.xp6(2),t.Q6J("routerLink",t.DdM(35,Ap))("queryParams",t.kEZ(36,Dp,e.ID,t.xi3(7,14,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(8,17,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.Oqu(t.xi3(10,20,e.Orders,".0-0")),t.xp6(3),t.Oqu(t.xi3(13,23,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(16,26,e.Sales,".0-0")),t.xp6(3),t.Oqu(t.xi3(19,29,e.Tax,".0-0")),t.xp6(3),t.Oqu(t.xi3(22,32,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 yp(a,i){1&a&&t._UZ(0,"td")}function vp(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,"Cost")),"")}}function Sp(a,i){if(1&a&&(t.TgZ(0,"td",48),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 Mp(a,i){if(1&a&&(t.TgZ(0,"td",48),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 bp(a,i){if(1&a&&(t.TgZ(0,"td",48),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 Jp(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,up,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,gp,2,0,"th",27),t.YNc(18,dp,2,0,"th",28),t.YNc(19,mp,2,0,"th",29),t.YNc(20,Zp,2,0,"th",30),t.qZA(),t.qZA(),t.TgZ(21,"tbody"),t.YNc(22,qp,27,40,"tr",31),t.qZA(),t.TgZ(23,"tfoot"),t.TgZ(24,"tr",32),t.YNc(25,yp,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,vp,4,6,"td",37),t.YNc(49,Sp,4,6,"td",38),t.YNc(50,Mp,4,6,"td",38),t.YNc(51,bp,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 Ip=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report"]},wp=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Sales_Commission"]};let Np=(()=>{class a extends g.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(Z.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,"href"],[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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,cp,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,_p,22,11,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Jp,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,Ip)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,wp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,d.YE,d.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function Fp(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 Pp(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 Lp(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,Pp,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 Qp(a,i){1&a&&(t.TgZ(0,"th",31),t._uU(1,"Sales Target"),t.qZA())}function Yp(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 Rp=function(a,i,e){return{ID:a,from:i,to:e}},tt="/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report",Ep=function(a){return[tt,a]};function kp(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,Yp,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,Ep,t.kEZ(27,Rp,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 Hp(a,i){1&a&&t._UZ(0,"td",34)}function Vp(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,Qp,2,0,"th",25),t.ALo(15,"sum"),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,kp,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,Hp,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 Bp=function(){return[tt]},Gp=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person"]};let jp=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Fp,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,Lp,19,9,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Vp,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,Bp)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,Gp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,c.ir,f.QB,d.YE,d.nU,s.sg],pipes:[T.qU,s.JJ,s.uU],styles:[""]}),a})();function Wp(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 $p=function(){return["/menu/Products/Catalog/Variants/Info"]},Kp=function(a){return{ID:a}};function Xp(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,$p))("queryParams",t.VKq(23,Kp,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)," ")}}function zp(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,Xp,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.MGl("href","/A/POS/#/menu/Contacts/Contact/Sales_Person/Info?ID=",e.ID,"",t.LSH),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,8,t.xi3(21,10,o.filterData(t.xi3(22,13,o.data.Data,"Item"),"SalesID",e.ID),"Quantity"))," "),t.xp6(6),t.hij(" ",t.lcZ(26,16,t.xi3(27,18,o.filterData(t.xi3(28,21,o.data.Data,"Item"),"SalesID",e.ID),"TotalCommission"))," "),t.xp6(5),t.hij(" ",t.lcZ(31,24,t.xi3(32,26,o.filterData(t.xi3(33,29,o.data.Data,"Item"),"SalesID",e.ID),"Revenue"))," "),t.xp6(5),t.hij(" ",t.lcZ(36,32,t.xi3(37,34,o.filterData(t.xi3(38,37,o.data.Data,"Item"),"SalesID",e.ID),"NettSales"))," ")}}function tc(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,zp,39,40,"div",27),t.qZA()),2&a){const e=t.oxw();t.xp6(25),t.Q6J("ngForOf",e.data.Data)}}const ac=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Sales_Commission"]},oc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report/Commission_Report_Detail"]},rc=function(a,i){return{From:a,To:i}};let ic=(()=>{class a extends g.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(Z.O),t.Y36(h.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,"href"],[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.getListData()}),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,Wp,14,7,"div",9),t.qZA(),t.qZA(),t.TgZ(18,"content"),t.YNc(19,tc,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,ac)),t.xp6(2),t.Q6J("routerLink",t.DdM(14,oc))("queryParams",t.WLB(15,rc,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,h.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 lc(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 sc(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 pc(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,sc,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 _c=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report"]},uc=function(a){return{ID:a}};let gc=(()=>{class a extends g.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(Z.O),t.Y36(s.uU),t.Y36(h.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.getListData()})("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,lc,10,4,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,pc,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,_c))("queryParams",t.VKq(7,uc,o.getID())),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function dc(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 mc(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 Zc(a,i){1&a&&(t.TgZ(0,"th",23),t._uU(1,"Original Cost"),t.qZA())}function hc(a,i){1&a&&(t.TgZ(0,"th",23),t._uU(1,"Cost"),t.qZA())}function xc(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.Oqu(t.lcZ(2,1,e.VariantUnitCost))}}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.Oqu(t.lcZ(2,1,e.UnitCost))}}const Cc=function(){return["/menu/Products/Catalog/Variants/Info"]},et=function(a){return{ID:a}},fc=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]};function Ac(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",27),t._uU(10),t.qZA(),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.YNc(14,xc,3,3,"td",28),t.YNc(15,Tc,3,3,"td",28),t.TgZ(16,"td",29),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"td",29),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"td"),t._UZ(23,"i",30),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(21,Cc))("queryParams",t.VKq(22,et,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.Q6J("routerLink",t.DdM(24,fc))("queryParams",t.VKq(25,et,e.InvoiceID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(13,14,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,17,e.VariantUnitPrice)),t.xp6(3),t.Oqu(t.lcZ(21,19,e.UnitPrice)),t.xp6(3),t.Q6J("innerHtml",e.Note,t.oJD)}}function Dc(a,i){if(1&a){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-paginator",31),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 qc(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,Zc,2,0,"th",22),t.YNc(15,hc,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,Ac,24,27,"tr",24),t.qZA(),t.qZA(),t.YNc(24,Dc,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 vc=function(){return["/menu/Reports/Sales_Report/Standard/Discounted_Sales"]};let Sc=(()=>{class a extends g.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(Z.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"],["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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,dc,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,mc,22,8,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,qc,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,vc)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,q.J,f.QB,D.P,p.Fj,s.sg,L.NW],pipes:[s.uU,s.JJ],styles:[""]}),a})();function Mc(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 bc(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 Jc(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 Oc(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1," /"),t.qZA())}function Ic(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/Order/Purchase_Order/Info?ID=",e.POID,"",t.LSH),t.xp6(2),t.Oqu("#"+e.PONumber)}}function Uc(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 wc(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 Nc(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,Uc,3,3,"th",46),t.TgZ(11,"th",47),t._uU(12),t.qZA(),t.YNc(13,wc,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 Fc(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 Pc(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,Oc,2,0,"span",33),t.YNc(7,Ic,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,Nc,14,9,"tr",23),t.qZA(),t.YNc(24,Fc,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 Lc(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 Qc(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 Yc(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,Lc,10,8,"div",33),t.YNc(53,Qc,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 Rc(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,Mc,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,bc,2,1,"th",19),t.TgZ(45,"th",20),t._uU(46,"%"),t.qZA(),t.YNc(47,Jc,2,1,"th",21),t.qZA(),t.qZA(),t.TgZ(48,"tbody"),t.TgZ(49,"tr"),t.TgZ(50,"td",22),t.YNc(51,Pc,25,20,"div",23),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(52,Yc,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 Ec=(()=>{class a extends g.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(Z.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,Rc,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 kc(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 Hc(a,i){1&a&&t._UZ(0,"br")}function Vc(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/Order/Purchase_Order/Info?ID=",e.SupplierPOID,"",t.LSH),t.xp6(1),t.Oqu(e.PONumber)}}function Bc(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,Hc,1,0,"br",34),t.YNc(7,Vc,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.Oqu(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 Gc(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,kc,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,Bc,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 jc=(()=>{class a extends g.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(Z.O),t.Y36(h.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,Gc,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,d.YE,d.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function Wc(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(a,i,e){return{SupplierID:a,From:i,To:e}},Kc=function(){return["/menu/Reports/Purchases_Report/Summary"]};function Xc(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.MGl("href","/A/POS/#/menu/Contacts/Contact/Suppliers/Info?ID=",e.SupplierID,"",t.LSH),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,8,e.Quantity)),t.xp6(3),t.Q6J("queryParams",t.kEZ(18,$c,e.SupplierID,t.xi3(13,10,n.pageData.Filter.From,"ddMMyyyy"),t.xi3(14,13,n.pageData.Filter.To,"ddMMyyyy")))("routerLink",t.DdM(22,Kc)),t.xp6(3),t.Oqu(t.lcZ(16,16,e.Total))}}function zc(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,Wc,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,Xc,17,23,"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 t_=(()=>{class a extends g.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(Z.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,"href"],[1,"text-right","text-success"],[3,"queryParams","routerLink"]],template:function(e,o){1&e&&t.YNc(0,zc,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,d.YE,d.nU,s.sg,h.yS],pipes:[s.JJ,s.uU],styles:[""]}),a})();function e_(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 a_=function(a){return{"pl-lg-12":a}},n_=function(a){return[a]},o_=function(a){return{ID:a}};function r_(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,a_,!e.IsParent)),t.xp6(1),t.Q6J("routerLink",t.VKq(16,n_,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,o_,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 i_(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,e_,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,r_,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 l_=(()=>{class a extends g.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(Z.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,i_,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,h.yS],pipes:[s.JJ,T.qU],styles:[""]}),a})();function s_(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 p_(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 c_(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)}}function __(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,p_,4,1,"div",14),t.YNc(14,c_,4,1,"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 u_(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 g_(a,i){1&a&&(t.TgZ(0,"th"),t._uU(1,"Product"),t.qZA())}function d_(a,i){1&a&&(t.TgZ(0,"th"),t._uU(1,"Variant"),t.qZA())}function m_(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1," Measurement"),t.qZA())}function Z_(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Cost"),t.qZA())}function h_(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 x_(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 T_(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 C_(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 f_(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,x_,3,3,"td",39),t.YNc(20,T_,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,C_,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 A_(a,i){1&a&&t._UZ(0,"td",37)}function D_(a,i){1&a&&t._UZ(0,"td",37)}function q_(a,i){1&a&&t._UZ(0,"td",37)}function y_(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 v_(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,g_,2,0,"th",14),t.YNc(15,d_,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,m_,2,0,"th",30),t.YNc(24,Z_,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,h_,2,1,"th",32),t.qZA(),t.qZA(),t.TgZ(30,"tbody"),t.YNc(31,f_,26,19,"tr",33),t.qZA(),t.TgZ(32,"tfoot"),t.TgZ(33,"tr",34),t._UZ(34,"td",35),t.YNc(35,A_,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,D_,1,0,"td",36),t.YNc(44,q_,1,0,"td",36),t._UZ(45,"td",37),t._UZ(46,"td",37),t.YNc(47,y_,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 S_=(()=>{class a extends g.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(Z.O),t.Y36(h.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","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,s_,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,__,20,9,"div",3),t.YNc(6,u_,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,v_,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 M_(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))}}function b_(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().getListData()}),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,M_,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(10),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,18,t.xi3(52,20,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(55,23,t.xi3(56,25,e.data,"PurchaseTotal")))}}let J_=(()=>{class a extends g.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(Z.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","href","/A/POS/#/menu/Reports/Purchases_Report/Daily_Purchase/Monthly_Purchase",1,"btn","btn-outline-secondary"],[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,b_,57,28,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,D.P,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function O_(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))}}function I_(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().getListData()}),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,O_,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(10),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,16,t.xi3(50,18,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(53,21,t.xi3(54,23,e.data,"Income")))}}let U_=(()=>{class a extends g.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","href","/A/POS/#/menu/Reports/Purchases_Report/Daily_Purchase",1,"btn","btn-outline-secondary"],[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,I_,55,26,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,D.P,q.J,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function w_(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().getListData()}),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 N_=(()=>{class a extends g.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(Z.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,w_,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,J.D],styles:[""]}),a})();function F_(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 P_(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 L_(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 Q_=function(){return["/menu/Products/Catalog/Products/Info"]},Y_=function(a){return{ID:a}};function R_(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,Q_))("queryParams",t.VKq(15,Y_,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 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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,F_,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,P_,4,2,"div",7),t.YNc(15,L_,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,R_,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 k_=(()=>{class a extends g.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(Z.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,E_,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,h.yS],pipes:[s.JJ],styles:[""]}),a})();function H_(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 V_(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 B_(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 G_(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 j_(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Prev"),t.qZA())}function W_(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1,"Now"),t.qZA())}function $_(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1,"Trans"),t.qZA())}function K_(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 X_(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 z_(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 eu(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 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.Oqu(t.xi3(2,1,e.Count,".0-0"))}}function nu(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 ou=function(a,i,e){return{EntityID:a,From:i,To:e}},ru=function(){return["/menu/Reports/Purchases_Report/Summary"]};function iu(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,ou,e.EntityID,t.xi3(2,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(3,6,o.pageData.Filter.To,"ddMMyyyy")))("routerLink",t.DdM(16,ru)),t.xp6(4),t.Oqu(t.xi3(6,9,e.SalesWithTax,".0-0"))}}function lu(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,z_,2,1,"td",44),t.YNc(6,eu,2,5,"td",45),t.YNc(7,au,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,nu,3,4,"td",29),t.ALo(15,"HideSumZero"),t.YNc(16,iu,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 pu(a,i){1&a&&t._UZ(0,"td",49)}function cu(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 _u(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 uu(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"))}}function gu(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,H_,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,V_,4,1,"div",14),t.YNc(27,B_,5,2,"div",14),t.YNc(28,G_,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,j_,2,0,"th",20),t.YNc(43,W_,2,0,"th",20),t.YNc(44,$_,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,K_,2,1,"th",24),t.ALo(50,"HideSumZero"),t.YNc(51,X_,2,1,"th",24),t.qZA(),t.qZA(),t.TgZ(52,"tbody"),t.YNc(53,lu,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,pu,1,0,"td",28),t.YNc(60,cu,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,_u,4,7,"td",29),t.ALo(70,"HideSumZero"),t.YNc(71,uu,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(15),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,26,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,29,t.xi3(64,32,e.data.Data,"Quantity"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(67,35,t.xi3(68,38,e.data.Data,"Sales"),".0-0")," "),t.xp6(3),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(70,41,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory)}}let du=(()=>{class a extends g.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 m=e?l[e]:l;this.Comparison=0,o.forEach(x=>{x.PrevIndex="-",x.CurrentIndex="-",x.Increase="-";const b=m.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,m){return(r<l?-1:1)*(m?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const m="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(),m);case"Count":return n(r.Count,l.Count,m);case"SalesWithTax":return n(r.SalesWithTax,l.SalesWithTax,m);case"Quantity":return n(r.Quantity,l.Quantity,m);case"SalesNet":case"SalesTaxNet":return n(r.Sales,l.Sales,m);case"Tax":return n(r.Tax,l.Tax,m);default:return 0}}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(Z.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"],["href","/A/POS/#/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Group_Performance",1,"btn","btn-outline-secondary"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],["href","/A/POS/#/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance"],[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,gu,72,44,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,D.P,d.YE,d.nU,s.sg,f.QB,s.mk,h.yS],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 mu(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 Zu(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 hu(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 xu(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 Tu(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,Zu,5,2,"div",26),t.YNc(6,hu,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,xu,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 Cu(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1,"Prev"),t.qZA())}function fu(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1,"Now"),t.qZA())}function Au(a,i){1&a&&(t.TgZ(0,"th",41),t._uU(1," \xb1 (%) "),t.qZA())}function Du(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 qu=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function yu(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,qu,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}const vu=function(a,i){return{"text-danger":a,"text-success":i,"text-right":!0}};function Su(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,vu,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0")," ")}}function Mu(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,Du,2,1,"td",14),t.YNc(2,yu,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,Su,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 bu(a,i){1&a&&t._UZ(0,"td",24)}function Ju(a,i){1&a&&t._UZ(0,"td",24)}function Ou(a,i){1&a&&t._UZ(0,"td")}function Iu(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,mu,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,Tu,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,Cu,2,0,"th",14),t.YNc(20,fu,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,Au,2,0,"th",20),t.qZA(),t.qZA(),t.TgZ(34,"tbody"),t.YNc(35,Mu,21,24,"tr",21),t.qZA(),t.TgZ(36,"tfoot"),t.TgZ(37,"tr",22),t.YNc(38,bu,1,0,"td",23),t.YNc(39,Ju,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,Ou,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(11),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,18,t.xi3(44,21,e.data,"Count"),".0-0")),t.xp6(4),t.Oqu(t.xi3(47,24,t.xi3(48,27,e.data,"Quantity"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(51,30,t.xi3(52,33,e.data,"Sales"),".0-0")," "),t.xp6(4),t.hij(" ",t.xi3(55,36,t.xi3(56,39,e.data,"Tax"),".0-0")," "),t.xp6(5),t.Oqu(t.xi3(60,42,t.xi3(61,45,e.data,"SalesWithTax"),".0-0")),t.xp6(3),t.Q6J("ngIf",e.Compare)}}let Uu=(()=>{class a extends g.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 m=e?l[e]:l;this.Comparison=0,o.forEach(x=>{x.PrevIndex="-",x.CurrentIndex="-",x.Increase="-";const b=m.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(Z.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"],["href","/A/POS/#/menu/Reports/Purchases_Report/Outlet_Performance",1,"btn","btn-outline-secondary"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],["href","/A/POS/#/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance"],[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,Iu,63,48,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,d.YE,d.nU,s.sg,D.P,c.w9,p.JJ,p.On,f.QB,s.mk],pipes:[s.JJ,T.qU],styles:[""]}),a})();function wu(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 Nu(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 Fu(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 Pu(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 Lu(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 Qu(a,i){if(1&a&&(t.TgZ(0,"td"),t.YNc(1,Pu,2,1,"p",23),t.YNc(2,Lu,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 Yu(a,i){if(1&a&&(t.TgZ(0,"tr"),t.YNc(1,Qu,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 Ru(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 Eu(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,Ru,3,3,"td",27),t.qZA(),t.qZA()),2&a){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.DataFooter)}}function ku(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().getListData()}),t.TgZ(1,"actions"),t.YNc(2,wu,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,Nu,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,Fu,2,2,"th",14),t.qZA(),t.qZA(),t.TgZ(20,"tbody"),t.YNc(21,Yu,2,1,"tr",15),t.qZA(),t.YNc(22,Eu,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(11),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 Hu=(()=>{class a extends g.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,m){return(r<l?-1:1)*(m?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const m="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(),m):n(r[this.data.Dataheader[x]],l[this.data.Dataheader[x]],m)}):o}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(Z.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"],["href","/A/POS/#/menu/Reports/Purchases_Report/Outlet_Performance",1,"btn","btn-outline-secondary"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],["href","/A/POS/#/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Group_Performance"],[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,ku,23,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,d.YE,s.sg,c.w9,p.JJ,p.On,d.nU],pipes:[s.JJ],styles:[""]}),a})();function Vu(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 Bu(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 Gu(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,Bu,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 ju(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 Wu(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,ju,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 $u=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Vu,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,Gu,15,6,"div",3),t.qZA(),t.qZA(),t.TgZ(6,"content"),t.YNc(7,Wu,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,d.YE,d.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Ku(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 Xu=function(a,i,e,o){return{SalesTypeID:a,OutletID:i,From:e,To:o}},zu=function(a){return["/menu/Reports/Sales_Report/Standard/Detail",a]};function tg(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,zu,t.l5B(23,Xu,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 eg(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,tg,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 ag=(()=>{class a extends g.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(Z.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.getListData()}),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,Ku,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,eg,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,d.YE,s.sg,h.yS],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),a})();function ng(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 og(a,i){1&a&&(t.TgZ(0,"th",15),t._uU(1,"Profit"),t.qZA())}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",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 ig(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,og,2,0,"th",16),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,rg,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 lg=(()=>{class a extends g.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(Z.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.getListData()}),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,ng,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,ig,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,d.YE,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function sg(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 pg(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 cg(a,i){1&a&&(t.TgZ(0,"th",15),t._uU(1,"Profit"),t.qZA())}function _g(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 ug(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,_g,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 gg(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 dg(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,cg,2,0,"th",16),t.qZA(),t.qZA(),t.TgZ(15,"tbody"),t.YNc(16,ug,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,gg,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 mg=(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,sg,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,pg,10,4,"div",3),t.qZA(),t.qZA(),t.TgZ(6,"content"),t.YNc(7,dg,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,d.YE,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Zg(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 hg(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 xg(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 Tg(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,xg,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 Cg(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 fg(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,hg,1,1,"th",21),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,Tg,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,Cg,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 Dg=function(){return["/A/POS/#/menu/Reports/Sales_Report/Advanced/Tax_Report/By_Outlet"]};let qg=(()=>{class a extends g.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(Z.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.getListData()}),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,Zg,14,8,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,fg,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,Dg)),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.yS,s.O5,c.w9,p.JJ,p.On,f.QB,d.YE,d.nU,s.sg],pipes:[s.JJ,T.qU,s.uU,T.X6],styles:[""]}),a})();function yg(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 vg(a,i){1&a&&(t.TgZ(0,"th",25),t._uU(1,"Total Tax"),t.qZA())}function Sg(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 Mg(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 bg(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 Jg(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,Mg,3,3,"td",28),t.YNc(7,bg,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 Og(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 Ig(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 Ug(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,vg,2,0,"th",17),t.YNc(9,Sg,1,1,"th",18),t.qZA(),t.qZA(),t.TgZ(10,"tbody"),t.YNc(11,Jg,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,Og,4,6,"td",23),t.YNc(20,Ig,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)}}let wg=(()=>{class a extends g.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(Z.O))},a.\u0275cmp=t.Xpm({type:a,selectors:[["CustomerDisplay-tax-report-by-outlet"]],features:[t.qOj],decls:12,vars:5,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["title","Tax Report By Outlet","href","/A/POS/#/menu/Reports/Sales_Report/Advanced/Tax_Report",1,"btn","btn-success","mr-6"],["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.getListData()}),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,yg,14,7,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Ug,21,11,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(9),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.YE,d.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),a})();function Ng(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 Fg(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,Ng,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 Pg=function(){return["/menu/Products/Catalog/Variants/Info"]},Lg=function(a){return{ID:a}};function Qg(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,Pg))("queryParams",t.VKq(16,Lg,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 Yg(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,Qg,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 Rg=(()=>{class a extends g.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(Z.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.getListData()}),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,Fg,19,8,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Yg,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,d.YE,s.sg,h.yS],pipes:[s.uU,s.JJ],styles:[""]}),a})();function Eg(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 kg(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 Hg(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 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,"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,Eg,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,kg,5,2,"div",12),t.YNc(18,Hg,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 Bg(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 Gg(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 jg(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,Bg,27,22,"tr",30),t.qZA(),t.YNc(26,Gg,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 Wg=(()=>{class a extends g.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 m=0;m<o;m++)l.push(e+m*r);return l}}return a.\u0275fac=function(e){return new(e||a)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.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.getListData()}),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,Vg,27,12,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,jg,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 $g(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 Kg(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,$g,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 Xg(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 zg(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,Xg,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 td=(()=>{class a extends g.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(Z.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.getListData()}),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,Kg,15,6,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,zg,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 ed(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 ad(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 nd(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,ed,4,1,"div",10),t.YNc(11,ad,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 od(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 rd(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,od,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 id=(()=>{class a extends g.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(Z.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.getListData()}),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,nd,20,9,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,rd,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 ld(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 sd(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 pd(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,sd,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 _d=function(){return["/menu/Reports/Sales_Report/Standard/Discounted_Sales/Discounted_Products"]};let ud=(()=>{class a extends g.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(Z.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.getListData()}),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,ld,18,6,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,pd,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,_d)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,h.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 gd(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 dd(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 md(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,dd,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 Zd=(()=>{class a extends g.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(Z.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.getListData()}),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,gd,14,5,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,md,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 hd(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 xd(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,hd,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 Td(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,xd,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/Order/Purchase_Order/Info?ID=",e.ID,"",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 Cd(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().getListData()}),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,Td,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 fd=(()=>{class a extends g.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(Z.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,Cd,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 Ad(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 Dd(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,Ad,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 qd(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 yd(a,i){1&a&&(t.TgZ(0,"th",39),t._uU(1," Cost "),t.qZA())}function vd(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 Sd(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 Md(a,i){1&a&&(t.TgZ(0,"span"),t._uU(1,"%"),t.qZA())}function bd(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 Jd(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,vd,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,Sd,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,Md,2,0,"span",38),t.qZA(),t.YNc(30,bd,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 Od(a,i){1&a&&t._UZ(0,"td",50)}function Id(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,Od,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 Ud(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,yd,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,Jd,34,27,"tr",37),t.qZA(),t.YNc(27,Id,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 wd=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Nd=(()=>{class a extends g.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(Z.O),t.Y36(h.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.getListData()}),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,Dd,22,8,"div",5),t.YNc(10,qd,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,Ud,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,wd)),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,h.yS,s.O5,c.w9,p.JJ,p.On,c.ir,q.J,p.qQ,p.wV,p.Fj,f.QB,d.YE,d.nU,s.sg],pipes:[s.uU,s.JJ,T.qU],styles:[""]}),a})();function Fd(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 Pd(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 Ld(a,i){1&a&&(t.TgZ(0,"th",28),t._uU(1,"Total Cost"),t.qZA())}function Qd(a,i){1&a&&(t.TgZ(0,"th",29),t._uU(1,"Profit"),t.qZA())}function Yd(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 Rd(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 Ed(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,Yd,3,3,"td",38),t.YNc(10,Rd,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)}}function kd(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,Ed,11,9,"tr",34),t.qZA(),t.qZA(),t.qZA()),2&a){const e=i.$implicit;t.xp6(2),t.MGl("href","/A/POS/#/menu/Contacts/Contact/Customers/Info?ID=",e.CustomerID,"",t.LSH),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 Hd(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 Vd(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 Bd(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,Hd,3,3,"td",45),t.YNc(10,Vd,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 Gd(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,Ld,2,0,"th",24),t.YNc(19,Qd,2,0,"th",25),t.qZA(),t.qZA(),t.TgZ(20,"tbody"),t.YNc(21,kd,13,7,"tr",26),t.qZA(),t.YNc(22,Bd,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 jd=function(){return["/menu/Reports/Sales_Report/Standard/Top_Brand"]};function $d(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 Kd(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 Xd(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 zd(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,$d,5,2,"div",7),t.YNc(10,Kd,4,1,"div",7),t.YNc(11,Xd,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 tm(a,i){1&a&&(t.TgZ(0,"th",38),t._uU(1,"Prev"),t.qZA())}function em(a,i){1&a&&(t.TgZ(0,"th",38),t._uU(1,"Now"),t.qZA())}function am(a,i){1&a&&(t.TgZ(0,"th",39),t._uU(1,"Trans "),t.qZA())}function nm(a,i){1&a&&(t.TgZ(0,"th",40),t._uU(1,"Qty"),t.qZA())}function om(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 rm(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 im(a,i){1&a&&(t.TgZ(0,"th",33),t._uU(1,"\xb1 (%)"),t.qZA())}function lm(a,i){1&a&&(t.TgZ(0,"th",42),t._uU(1,"Cost"),t.qZA())}function sm(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 pm(a,i){1&a&&(t.TgZ(0,"th",43),t._uU(1," Target"),t.qZA())}function cm(a,i){1&a&&(t.TgZ(0,"th",44),t._uU(1," Ach(%)"),t.qZA())}function _m(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 um=function(a,i){return{rankDown:a,rankUp:i,"number key":!0}};function gm(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,um,o.PrevIndex<n+1,o.PrevIndex>n+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function dm(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 mm(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 Zm(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 hm=function(){return["/menu/Reports/Sales_Report/Standard/Detail"]},xm=function(a,i,e){return{From:a,To:i,TypeID:e}};function Tm(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,hm))("queryParams",t.kEZ(13,xm,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 Cm(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 fm(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 Am(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 Dm(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 qm(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 ym(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 vm(a,i){if(1&a&&(t.TgZ(0,"td",33),t.YNc(1,qm,3,8,"span",35),t.YNc(2,ym,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 Sm(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,_m,2,1,"td",45),t.YNc(6,gm,2,5,"td",46),t.YNc(7,dm,3,4,"td",25),t.YNc(8,mm,3,4,"td",25),t.TgZ(9,"td",33),t._uU(10),t.ALo(11,"number"),t.qZA(),t.YNc(12,Zm,3,4,"td",25),t.ALo(13,"HideSumZero"),t.YNc(14,Tm,7,17,"td",25),t.YNc(15,Cm,3,8,"td",35),t.YNc(16,fm,3,4,"td",36),t.YNc(17,Am,3,4,"td",37),t.YNc(18,Dm,3,4,"td",25),t.ALo(19,"HideSumZero"),t.YNc(20,vm,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 Mm(a,i){1&a&&t._UZ(0,"td",53)}function bm(a,i){1&a&&t._UZ(0,"td",53)}function Jm(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 Om(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 Im(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 Um(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 wm(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 Nm(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 Fm(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 Pm(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 Lm(a,i){if(1&a&&(t.TgZ(0,"td",52),t.YNc(1,Fm,4,7,"span",7),t.YNc(2,Pm,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 Qm(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 Ym(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 Rm(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 Em(a,i){if(1&a&&(t.TgZ(0,"td",33),t.YNc(1,Ym,9,26,"span",35),t.YNc(2,Rm,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 km(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,tm,2,0,"th",20),t.YNc(9,em,2,0,"th",20),t.YNc(10,am,2,0,"th",21),t.YNc(11,nm,2,0,"th",22),t.TgZ(12,"th",23),t._uU(13,"Sales"),t.qZA(),t.YNc(14,om,2,1,"th",24),t.ALo(15,"HideSumZero"),t.YNc(16,rm,2,1,"th",24),t.YNc(17,im,2,0,"th",25),t.YNc(18,lm,2,0,"th",26),t.YNc(19,sm,2,1,"th",24),t.YNc(20,pm,2,0,"th",27),t.ALo(21,"HideSumZero"),t.YNc(22,cm,2,0,"th",28),t.ALo(23,"HideSumZero"),t.ALo(24,"HideSumZero"),t.qZA(),t.qZA(),t.TgZ(25,"tbody"),t.YNc(26,Sm,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,Mm,1,0,"td",32),t.YNc(32,bm,1,0,"td",32),t.YNc(33,Jm,4,7,"td",25),t.YNc(34,Om,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,Im,4,7,"td",25),t.ALo(40,"HideSumZero"),t.YNc(41,Um,5,7,"td",34),t.YNc(42,wm,3,8,"td",35),t.YNc(43,Nm,4,7,"td",36),t.YNc(44,Lm,3,2,"td",37),t.YNc(45,Qm,4,7,"td",25),t.ALo(46,"HideSumZero"),t.YNc(47,Em,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 Vm(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 Bm(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 Gm(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,Bm,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 jm=[{path:"Sales_Report/Standard/Detail",component:Nt},{path:"Sales_Report/Standard/Summary",component:ie},{path:"Sales_Report/Standard/Top_Brand",component:he},{path:"Sales_Report/Standard/Top_Brand/Brand_Sales_Analysis",component:(()=>{class a extends g.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(Z.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,"href"],["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.getListData()}),t.TgZ(1,"actions"),t.YNc(2,Fd,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,Pd,14,6,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.TgZ(9,"div",5),t.YNc(10,Gd,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,jd)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(3),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,h.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,d.YE,d.nU,s.sg,s.mk],pipes:[s.JJ],styles:[""]}),a})()},{path:"Sales_Report/Standard/Top_Customers",component:we},{path:"Sales_Report/Standard/Top_Customers/Top_Customers_By_Age",component:Ve},{path:"Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender",component:ea},{path:"Sales_Report/Standard/Top_Customers/Top_Suppliers",component:ga},{path:"Sales_Report/Standard/Products_Sold",component:Ba},{path:"Sales_Report/Standard/Products_Sold/Product_Sales_by_Outlet",component:an},{path:"Sales_Report/Standard/Products_Sold/Product_Sales",component:mn},{path:"Sales_Report/Standard/Products_Sold/Product_Sales_Vs_Delivery",component:Sn},{path:"Sales_Report/Standard/Category_Sold",component:Gn},{path:"Sales_Report/Standard/Category_Sold/Category_By_Outlet",component:ro},{path:"Sales_Report/Standard/Category_Sold/Category",component:po},{path:"Sales_Report/Standard/Peak_Hour",component:Co},{path:"Sales_Report/Standard/Peak_Hour/Visitor",component:So},{path:"Sales_Report/Standard/Peak_Hour/Peak_Hour",component:Ro},{path:"Sales_Report/Standard/Daily",component:Ko},{path:"Sales_Report/Standard/Daily/Daily_Table",component:Rr},{path:"Sales_Report/Standard/Daily/Yearly",component:H},{path:"Sales_Report/Standard/Monthly",component:rr},{path:"Sales_Report/Standard/Monthly/Monthly_Table",component:li},{path:"Sales_Report/Standard/Monthly/Yearly_Table",component:H},{path:"Sales_Report/Standard/Daily/Daily_Quantity",component:di},{path:"Sales_Report/Standard/Daily/Daily_Quantity/Monthly",component:Ci},{path:"Sales_Report/Standard/Outlet_Performance",component:Xi},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Graphic",component:il},{path:"Sales_Report/Standard/Outlet_Performance/Detail",component:Ts},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance",component:Gs},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance",component:pp},{path:"Sales_Report/Standard/Sales_Order_Type",component:(()=>{class a extends g.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(Z.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.getListData()}),t.TgZ(1,"filters"),t.TgZ(2,"div",1),t.YNc(3,zd,12,7,"div",2),t.qZA(),t.qZA(),t.TgZ(4,"content"),t.YNc(5,km,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,d.YE,d.nU,s.sg,s.mk,h.yS],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:[""]}),a})()},{path:"Sales_Report/Standard/Sales_Person",component:Np},{path:"Sales_Report/Standard/Sales_Person/Sales_Commission",component:jp},{path:"Sales_Report/Standard/Sales_Person/Commission_Report",component:ic},{path:"Sales_Report/Standard/Sales_Person/Commission_Report/Commission_Report_Detail",component:gc},{path:"Sales_Report/Standard/Discounted_Sales",component:ud},{path:"Purchases_Report/Detail",component:Ec},{path:"Purchases_Report/Summary",component:jc},{path:"Purchases_Report/Top_Supplier",component:t_},{path:"Purchases_Report/Product_Bought",component:l_},{path:"Purchases_Report/Product_Purchase_History",component:S_},{path:"Purchases_Report/Daily_Purchase",component:J_},{path:"Purchases_Report/Daily_Purchase/Monthly_Purchase",component:U_},{path:"Purchases_Report/Purchase_Volume",component:N_},{path:"Purchases_Report/Purchased_Sales_Report",component:k_},{path:"Purchases_Report/Outlet_Performance",component:du},{path:"Purchases_Report/Outlet_Performance/Outlet_Group_Performance",component:Uu},{path:"Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance",component:Hu},{path:"Sales_Report/Group/City",component:$u},{path:"Sales_Report/Group/Type",component:ag},{path:"Sales_Report/Group/Customer_Group",component:lg},{path:"Sales_Report/Group/Sales_Group",component:mg},{path:"Sales_Report/Advanced/Tax_Report",component:qg},{path:"Sales_Report/Advanced/Tax_Report/By_Outlet",component:wg},{path:"Sales_Report/Advanced/Product_Life_Cycle",component:Rg},{path:"Sales_Report/Advanced/Product_Profit",component:Wg},{path:"Sales_Report/Advanced/Exchanged_Sales",component:td},{path:"Sales_Report/Advanced/Variant_Model_Rank",component:id},{path:"Sales_Report/Standard/Discounted_Sales/Discounted_Products",component:Sc},{path:"Return/Sales_Return",component:Zd},{path:"Return/Purchase_Return",component:fd},{path:"Sales_Report/Standard/Products_Sold/Invoice_Items",component:Nd},{path:"Sales_Report/Standard/Price_Analysis",component:(()=>{class a extends g.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.getListData()}),t.TgZ(1,"filters"),t.TgZ(2,"div",1),t.YNc(3,Vm,4,1,"div",2),t.qZA(),t.qZA(),t.TgZ(4,"content"),t.YNc(5,Gm,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 Wm=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[[h.Bz.forChild(jm)],h.Bz]}),a})();var $m=A(1768),Km=A(2060);let Xm=(()=>{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,Wm,c.A0,f.ZU,p.u5,p.UX,rt.FA,P.XK,it.Fk,lt.c,P.Ng,st.Nh,L.TU,pt.vV,c.A0,d.JX,ot.p0,$m.X,I.d,D.K,U.N,J.Z,q.Q,Km.I,Y.T]]}),a})()}}]);
|