dealpos 11.0.3 → 11.0.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.
Files changed (89) hide show
  1. package/POS/1122.d74142360c53745d.js +1 -0
  2. package/POS/1322.ed7491a892dc2008.js +1 -0
  3. package/POS/159.6b97c5a299dc63c1.js +1 -0
  4. package/POS/1672.49cb10c107adda60.js +1 -0
  5. package/POS/171.b7af75f7a2b6b3e5.js +1 -0
  6. package/POS/2397.863b3e30641c5783.js +1 -0
  7. package/POS/241.5a4a9bf1d499a232.js +1 -0
  8. package/POS/{2418.4f3b3e59a8c3c8a5.js → 2418.f4e129698fdcb178.js} +1 -1
  9. package/POS/2507.28b66963ef06c133.js +1 -0
  10. package/POS/3079.7567a562d1e79290.js +1 -0
  11. package/POS/{3400.668e23f7f84335d6.js → 3400.5d890fbb7b47b8dd.js} +1 -1
  12. package/POS/3509.205b46c0f2d9a5d2.js +1 -0
  13. package/POS/3rdpartylicenses.txt +25 -2
  14. package/POS/4040.addfbff444d3d413.js +1 -0
  15. package/POS/4265.a2196a7049a04fb9.js +1 -0
  16. package/POS/{4466.a843ae71406c64c6.js → 4466.46a3eaa9a18ded19.js} +1 -1
  17. package/POS/475.b6e9d544392fd70f.js +1 -0
  18. package/POS/4854.a51d13f2227ba793.js +1 -0
  19. package/POS/500.b066f83f149bc82d.js +1 -0
  20. package/POS/{5179.b9c8d323e42f703e.js → 5179.16b84844f6565f22.js} +0 -0
  21. package/POS/{5381.cd096f1afb205c18.js → 5381.e02c6b55897cbb1a.js} +1 -1
  22. package/POS/5745.d3d8deca541ed195.js +1 -0
  23. package/POS/{581.f3bf971102227bd3.js → 581.4c4ee8d96117e4a5.js} +0 -0
  24. package/POS/6346.9c6d4510bfe10a66.js +1 -0
  25. package/POS/{6437.b347a36c570cb593.js → 6437.b728004a9406cf16.js} +0 -0
  26. package/POS/6441.0b9578e0140aa79d.js +1 -0
  27. package/POS/6683.42116fce8ff63bca.js +1 -0
  28. package/POS/679.54833ac1ad9a9e41.js +1 -0
  29. package/POS/6808.fc19bb6d6f91fe15.js +1 -0
  30. package/POS/684.16003c8894cad7d1.js +1 -0
  31. package/POS/7091.175f41ceaba5c820.js +1 -0
  32. package/POS/7251.8f4c7ceb3fe2ed41.js +1 -0
  33. package/POS/{7348.e8ceaa66dfcc0eb4.js → 7348.7f33683a16ff4e78.js} +0 -0
  34. package/POS/{7533.c444ca868ef35463.js → 7533.6af9fba4ad21f39a.js} +0 -0
  35. package/POS/{773.077eafb503b9530b.js → 773.87ffd9cb8c1edaea.js} +0 -0
  36. package/POS/{2944.5bbddb44a927ec8b.js → 7922.3a7ecc77ec4cd4f3.js} +1 -1
  37. package/POS/817.c6c1aa0c873a3d12.js +1 -0
  38. package/POS/8543.3b26a64a20e6dd0b.js +1 -0
  39. package/POS/{8846.c1d683fa66a24c77.js → 8846.e393c8dbacdb5fe2.js} +0 -0
  40. package/POS/8932.e8ef72f43a5a70fc.js +1 -0
  41. package/POS/904.97176afee8210e3a.js +1 -0
  42. package/POS/{923.990ef4ba3cd83598.js → 923.08a0fa897c0eaeb9.js} +0 -0
  43. package/POS/{9265.c64a359dc82f5fbd.js → 9265.5c145db197526b51.js} +0 -0
  44. package/POS/{9488.d82815098230680b.js → 9488.93a0340caaf17ec9.js} +0 -0
  45. package/POS/9780.66da7762782d1ed1.js +1 -0
  46. package/POS/{9859.801cddd4251ab51a.js → 9859.fb0524ca0a3aafa8.js} +0 -0
  47. package/POS/99.b400f86fbeebcbca.js +1 -0
  48. package/POS/9916.030c629413cf6056.js +1 -0
  49. package/POS/common.601993a581db3884.js +1 -0
  50. package/POS/main.94315e96985a934f.js +1 -0
  51. package/POS/pos-index.html +2 -3
  52. package/POS/runtime.fdc0379294294ec4.js +1 -0
  53. package/POS/{styles.ee8cdddbbd5999b4.css → styles.acc1ea5d6f923ad7.css} +5 -1
  54. package/Scripts/Angular/Controller/Orders/InvoiceInfo.js +3 -3
  55. package/Scripts/Angular/Controller/Sell.js +8 -8
  56. package/package.json +3 -3
  57. package/POS/1122.ab60516c071432ce.js +0 -1
  58. package/POS/1322.f583413fbcdad6a6.js +0 -1
  59. package/POS/1364.79620a2b628623d3.js +0 -1
  60. package/POS/159.d27013805b6252b8.js +0 -1
  61. package/POS/1672.603891dc2fb9a96f.js +0 -1
  62. package/POS/1813.1a7c3b0369cb7cff.js +0 -1
  63. package/POS/2397.5545109685209821.js +0 -1
  64. package/POS/241.215f732edc19032d.js +0 -1
  65. package/POS/3079.1307e4ca7e3f3961.js +0 -1
  66. package/POS/3340.ccec20dcb836ead1.js +0 -1
  67. package/POS/4040.4e9ce83947a33f99.js +0 -1
  68. package/POS/4265.1348bf362d01215a.js +0 -1
  69. package/POS/4458.c51f96cf736741a0.js +0 -1
  70. package/POS/4854.8e36fc6b06002f8e.js +0 -1
  71. package/POS/582.f33a81343d8d5fee.js +0 -1
  72. package/POS/6346.d62ec085693207ea.js +0 -1
  73. package/POS/6472.0369ce798a7f0bc0.js +0 -1
  74. package/POS/6808.060c5a86f96fd141.js +0 -1
  75. package/POS/6889.d9187e541ce53576.js +0 -1
  76. package/POS/7091.5c54ae5d7cbcd4c8.js +0 -1
  77. package/POS/728.5ec15dd44091e3c5.js +0 -1
  78. package/POS/7513.1bc24e12f8cd03c5.js +0 -1
  79. package/POS/800.c364a3f28308406e.js +0 -1
  80. package/POS/8003.1c55cc7068930c3a.js +0 -1
  81. package/POS/8410.a8e9fa5e13014c64.js +0 -1
  82. package/POS/8543.619017c3ab2cedfa.js +0 -1
  83. package/POS/8870.964ddab29c296af8.js +0 -1
  84. package/POS/8932.0d5920dca29ec189.js +0 -1
  85. package/POS/9780.5fcff87807f6f9df.js +0 -1
  86. package/POS/9916.e493d8d7a6abf749.js +0 -1
  87. package/POS/common.3ea8bbb06408e7c8.js +0 -1
  88. package/POS/main.bd701315ad29a632.js +0 -1
  89. package/POS/runtime.d22351d06d95d011.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1122],{1122:(L1,N,A)=>{A.r(N),A.d(N,{ReportsModule:()=>P1});var s=A(6019),p=A(9133),m=A(2262),nt=A(4176),at=A(8727),P=A(6731),ot=A(9859),rt=A(138),it=A(2605),L=A(8525),lt=A(7348),q=A(1949),c=A(5496),g=A(4382),S=A(5304),Q=A(5761),t=A(3668),_=A(8596),v=A(2387),I=A(7481),M=A(859);let st=(()=>{class n{constructor(e,o,a,r){this.httpService=e,this.toaster=o,this.dialogRef=a,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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(S.so),t.Y36(S.WI))},n.\u0275cmp=t.Xpm({type:n,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:[""]}),n})();var pt=A(7080),Z=A(4765),u=A(9265),D=A(7163),f=A(4290),T=A(1464);function ct(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",25),t.TgZ(1,"a",28),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).export("default")}),t._UZ(2,"i",29),t._uU(3," Export"),t.qZA(),t.TgZ(4,"button",30),t._UZ(5,"b",31),t.qZA(),t.TgZ(6,"ul",32),t.TgZ(7,"li",33),t.TgZ(8,"a",34),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",33),t.TgZ(11,"a",34),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 _t(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",35),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",36),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.ListIDs=a}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Customer"),t.qZA(),t.TgZ(8,"autocompleteV2",37),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.CustomerID=a}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From/To"),t.qZA(),t.TgZ(12,"datepicker",38),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",39),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Sales"),t.qZA(),t.TgZ(17,"ng-select",40),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.SalesID=a}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Group"),t.qZA(),t.TgZ(21,"ng-select",40),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.ContactGroupID=a}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Bin"),t.qZA(),t.TgZ(25,"radio-options",41),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.Bin=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 ut(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",42),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Type"),t.qZA(),t.TgZ(4,"ng-select",40),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Currency"),t.qZA(),t.TgZ(8,"ng-select",43),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.CurrencyID=a}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Delivery"),t.qZA(),t.TgZ(12,"ng-select",44),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.DeliveryStateID=a}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Complementary"),t.qZA(),t.TgZ(16,"radio-options",45),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.Complementary=a}),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"h6"),t._uU(19,"Creator"),t.qZA(),t.TgZ(20,"autocompleteV2",46),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.CreatorID=a}),t.qZA(),t.qZA(),t.TgZ(21,"div"),t.TgZ(22,"h6"),t._uU(23,"Note Visible"),t.qZA(),t.TgZ(24,"radio-options",47),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.NoteVisible=a}),t.qZA(),t.qZA(),t.TgZ(25,"div"),t.TgZ(26,"h6"),t._uU(27,"Sort"),t.qZA(),t.TgZ(28,"radio-options",48),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.SortBy=a})("modelChange",function(){return t.CHM(e),t.oxw(2).searchFromPageOne()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 gt(n,i){1&n&&(t.TgZ(0,"th",49),t._uU(1," @ Cost "),t.qZA())}function dt(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1," /"),t.qZA())}function mt(n,i){if(1&n&&(t.TgZ(0,"a",52),t.TgZ(1,"span",66),t._uU(2),t.qZA(),t.qZA()),2&n){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 Zt(n,i){if(1&n&&(t.TgZ(0,"span",56),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" "," - Profit: "+t.lcZ(2,1,e.Profit),"")}}function ht(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1,"- "),t.qZA())}function xt(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1,": "),t.qZA())}function Tt(n,i){if(1&n&&(t.TgZ(0,"small"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" (",e.Commissions[0].Quantity," unit )")}}function Ct(n,i){if(1&n&&(t.TgZ(0,"i",78),t._uU(1),t.YNc(2,Tt,2,1,"small",24),t.qZA()),2&n){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 ft(n,i){if(1&n&&(t.TgZ(0,"li"),t.TgZ(1,"i"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=i.$implicit;t.xp6(2),t.hij("( ",e.Quantity+" unit by "+e.SalesName," )")}}function At(n,i){if(1&n&&(t.TgZ(0,"ul",79),t.TgZ(1,"li"),t.TgZ(2,"i"),t._uU(3,"sold by"),t.qZA(),t.qZA(),t.YNc(4,ft,3,1,"li",18),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(4),t.Q6J("ngForOf",null==e?null:e.Commissions)}}function qt(n,i){if(1&n&&(t.TgZ(0,"th",80),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.UnitCost)," ")}}function Dt(n,i){if(1&n&&(t.TgZ(0,"tr"),t.TgZ(1,"th",11),t.TgZ(2,"div"),t.TgZ(3,"span",67),t._uU(4),t.qZA(),t.YNc(5,Ct,3,2,"i",68),t.YNc(6,At,5,1,"ul",69),t._UZ(7,"span",70),t.qZA(),t.qZA(),t.TgZ(8,"th",71),t._uU(9),t.qZA(),t.TgZ(10,"th",72),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",73),t.TgZ(16,"th",74),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"th",75),t.TgZ(20,"div",76),t._uU(21),t.qZA(),t.TgZ(22,"div",77),t._uU(23),t.ALo(24,"number"),t.qZA(),t.qZA(),t.TgZ(25,"th",74),t._uU(26),t.ALo(27,"number"),t.qZA(),t.qZA()),2&n){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 yt(n,i){if(1&n&&(t.ynx(0),t.TgZ(1,"tr"),t.TgZ(2,"th",81),t._uU(3),t.qZA(),t.TgZ(4,"th",82),t._uU(5),t.qZA(),t.TgZ(6,"th",83),t._uU(7),t.ALo(8,"number"),t.qZA(),t.qZA(),t.BQk()),2&n){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 vt(n,i){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"div",50),t.TgZ(2,"div",51),t.TgZ(3,"div"),t.TgZ(4,"a",52),t.TgZ(5,"span",53),t._uU(6),t.qZA(),t.qZA(),t.YNc(7,dt,2,0,"span",24),t.YNc(8,mt,3,2,"a",54),t.TgZ(9,"span"),t._uU(10),t.ALo(11,"date"),t._UZ(12,"small",55),t.ALo(13,"date"),t.TgZ(14,"small",56),t._uU(15),t.ALo(16,"showIfNotNullOrEmptyString"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"strong",57),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,Zt,3,3,"span",58),t.TgZ(26,"i",59),t._uU(27),t.qZA(),t.TgZ(28,"span",60),t._uU(29),t.qZA(),t.YNc(30,ht,2,0,"span",24),t.YNc(31,xt,2,0,"span",24),t.TgZ(32,"span",60),t._uU(33),t.qZA(),t.qZA(),t.qZA(),t.TgZ(34,"div",61),t.TgZ(35,"label",62),t._uU(36),t.qZA(),t.qZA(),t.qZA(),t.TgZ(37,"table",63),t._UZ(38,"thead"),t.TgZ(39,"tbody",64),t.YNc(40,Dt,28,20,"tr",18),t.qZA(),t.qZA(),t.TgZ(41,"table",65),t.YNc(42,yt,9,5,"ng-container",18),t.qZA(),t.qZA()),2&n){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 St(n,i){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Qty"),t.qZA(),t.TgZ(3,"span",81),t._uU(4),t.ALo(5,"number"),t.qZA(),t.qZA()),2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,1,e.totalAggregate.ItemsQuantity))}}function Mt(n,i){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Qty Complementary"),t.qZA(),t.TgZ(3,"span",81),t._uU(4),t.ALo(5,"number"),t.qZA(),t.qZA()),2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,1,e.totalAggregate.QuantityComplementary))}}function bt(n,i){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Qty Sold"),t.qZA(),t.TgZ(3,"span",81),t._uU(4),t.ALo(5,"number"),t.qZA(),t.qZA()),2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,1,e.totalAggregate.QuantityWithoutComplementary))}}function Ot(n,i){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"strong"),t._uU(2,"Cost ("),t.TgZ(3,"span",86),t._uU(4),t.ALo(5,"number"),t.qZA(),t._uU(6,"%)"),t.qZA(),t.TgZ(7,"span",81),t._uU(8),t.ALo(9,"number"),t.qZA(),t.qZA()),2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,2,e.totalAggregate.CostRatio)),t.xp6(4),t.Oqu(t.lcZ(9,4,e.totalAggregate.Cost))}}function Jt(n,i){if(1&n&&(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",86),t._uU(6),t.ALo(7,"number"),t.qZA(),t._uU(8,"%)"),t.qZA(),t.TgZ(9,"span",81),t._uU(10),t.ALo(11,"number"),t.qZA(),t.qZA()),2&n){const e=t.oxw(3);t.xp6(6),t.Oqu(t.lcZ(7,2,e.totalAggregate.ProfitRatio)),t.xp6(4),t.Oqu(t.lcZ(11,4,e.totalAggregate.Profit))}}function It(n,i){if(1&n&&(t.TgZ(0,"div",84),t.TgZ(1,"div",85),t.TgZ(2,"div"),t.TgZ(3,"strong"),t._uU(4,"Tax Added"),t.qZA(),t.TgZ(5,"span",81),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",81),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"div",85),t.TgZ(15,"div"),t.TgZ(16,"strong"),t._uU(17,"Orders"),t.qZA(),t.TgZ(18,"span",81),t._uU(19),t.ALo(20,"number"),t.qZA(),t.qZA(),t.YNc(21,St,6,3,"div",24),t.YNc(22,Mt,6,3,"div",24),t.YNc(23,bt,6,3,"div",24),t.qZA(),t.TgZ(24,"div",85),t.TgZ(25,"div"),t.TgZ(26,"strong"),t._uU(27,"Gross Sales"),t.qZA(),t.TgZ(28,"span",81),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",81),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",81),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",81),t._uU(47),t.ALo(48,"number"),t.qZA(),t.qZA(),t.YNc(49,Ot,10,6,"div",24),t.YNc(50,Jt,12,6,"div",24),t.qZA(),t.qZA()),2&n){const e=t.oxw(2);t.xp6(6),t.Oqu(t.xi3(7,12,e.totalAggregate.TaxAdd,".0-0")),t.xp6(6),t.Oqu(t.xi3(13,15,e.totalAggregate.SalesWithTax,".0-0")),t.xp6(7),t.Oqu(t.xi3(20,18,e.totalAggregate.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.totalAggregate.GrossItems,".0-0")),t.xp6(6),t.Oqu(t.xi3(36,24,e.totalAggregate.Discount,".0-0")),t.xp6(6),t.Oqu(t.xi3(42,27,e.totalAggregate.TaxInclude,".0-0")),t.xp6(6),t.Oqu(t.xi3(48,30,e.totalAggregate.SalesWithoutTax,".0-0")),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",e.pageData.HasRoleProfit)}}function Ut(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"span",87),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).StoreRowsCountAPIResult("Report/ReportDetailCount")}),t.TgZ(1,"i",88),t._uU(2,"?"),t.qZA(),t.qZA()}}function wt(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,e.listTotal))}}function Ft(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",89),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).NextPage(!0)}),t._UZ(1,"i",90),t._uU(2," Next"),t.qZA()}}function Nt(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",91),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).StoreRowsCountAPIResult("Report/ReportDetailCount",!0)}),t._UZ(1,"i",92),t._uU(2," Last"),t.qZA()}}function Pt(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ct,13,0,"div",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.YNc(5,_t,26,11,"div",4),t.YNc(6,ut,29,11,"div",5),t.qZA(),t.TgZ(7,"a",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.hideMore=!a.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,gt,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,vt,43,35,"div",18),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(34,It,51,33,"div",19),t.TgZ(35,"div",20),t.TgZ(36,"div",21),t.TgZ(37,"div",22),t._uU(38),t.ALo(39,"number"),t.YNc(40,Ut,3,0,"span",23),t.YNc(41,wt,3,3,"span",24),t._uU(42),t.qZA(),t.qZA(),t.TgZ(43,"div",25),t.YNc(44,Ft,3,0,"a",26),t.YNc(45,Nt,3,0,"a",27),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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",e.infiniteList),t.xp6(1),t.Q6J("ngIf",(null==e.data?null:e.data.Data.length)>0),t.xp6(4),t.hij(" Showing 1 - ",t.lcZ(39,15,e.pageData.Filter.RowCount*(e.pageData.Filter.PageNumber-1)+e.data.TotalCurrentRow)," of "),t.xp6(2),t.Q6J("ngIf",!e.pageData.HideStoreApiCount),t.xp6(1),t.Q6J("ngIf",e.pageData.HideStoreApiCount),t.xp6(1),t.hij(" records ~ ",e.pageData.Filter.PageNumber," Page "),t.xp6(2),t.Q6J("ngIf",e.nextPageDisabled&&!e.goToLast),t.xp6(1),t.Q6J("ngIf",e.nextPageDisabled&&!e.goToLast)}}let Lt=(()=>{class n extends pt.X{constructor(e,o,a,r,l,h){super(e,"Report/ReportDetail","ReportLoader/ReportDetail",null,r),this.csvConverter=o,this.datePipe=a,this.activatedRoute=r,this.matDialog=l,this.toaster=h,this.hideMore=!0,this.SortBy=[{Key:!1,Value:"Number"},{Key:!0,Value:"Created"}]}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount,this.pageData.Filter.NoteVisible=!0,this.totalAggregate=new Qt}assignAggregate(e){this.totalAggregate.TaxAdd=e.Aggregate.TaxAdd,this.totalAggregate.SalesWithTax=e.Aggregate.SalesWithTax,this.totalAggregate.Orders=e.Aggregate.Orders,this.totalAggregate.ItemsQuantity=e.Aggregate.ItemsQuantity,this.totalAggregate.QuantityComplementary=e.Aggregate.QuantityComplementary,this.totalAggregate.QuantityWithoutComplementary=e.Aggregate.QuantityWithoutComplementary,this.totalAggregate.GrossItems=e.Aggregate.GrossItems,this.totalAggregate.Discount=e.Aggregate.Discount,this.totalAggregate.TaxInclude=e.Aggregate.TaxInclude,this.totalAggregate.SalesWithoutTax=e.Aggregate.SalesWithoutTax,e.Aggregate.CostRatio=this.costRatioCalculation(e.Aggregate.Cost,e.Aggregate.SalesWithoutTax,e.Aggregate.TaxInclude),this.totalAggregate.CostRatio=e.Aggregate.CostRatio,e.Aggregate.ProfitRatio=this.profitRatioCalculation(e.Aggregate.Profit,e.Aggregate.SalesWithoutTax,e.Aggregate.TaxInclude),this.totalAggregate.ProfitRatio=e.Aggregate.ProfitRatio,this.totalAggregate.Profit=e.Aggregate.Profit,this.totalAggregate.Cost=e.Aggregate.Cost}postExtendData(e){this.totalAggregate.TaxAdd+=e.Aggregate.TaxAdd,this.totalAggregate.SalesWithTax+=e.Aggregate.SalesWithTax,this.totalAggregate.Orders+=e.Aggregate.Orders,this.totalAggregate.ItemsQuantity+=e.Aggregate.ItemsQuantity,this.totalAggregate.QuantityComplementary+=e.Aggregate.QuantityComplementary,this.totalAggregate.QuantityWithoutComplementary+=e.Aggregate.QuantityWithoutComplementary,this.totalAggregate.GrossItems+=e.Aggregate.GrossItems,this.totalAggregate.Discount+=e.Aggregate.Discount,this.totalAggregate.TaxInclude+=e.Aggregate.TaxInclude,this.totalAggregate.SalesWithoutTax+=e.Aggregate.SalesWithoutTax,e.Aggregate.CostRatio=this.costRatioCalculation(e.Aggregate.Cost,e.Aggregate.SalesWithoutTax,e.Aggregate.TaxInclude),this.totalAggregate.CostRatio+=e.Aggregate.CostRatio,e.Aggregate.ProfitRatio=this.profitRatioCalculation(e.Aggregate.Profit,e.Aggregate.SalesWithoutTax,e.Aggregate.TaxInclude),this.totalAggregate.ProfitRatio+=e.Aggregate.ProfitRatio,this.totalAggregate.Profit+=e.Aggregate.Profit,this.totalAggregate.Cost+=e.Aggregate.Cost}costRatioCalculation(e,o,a){let r=0;return this.pageData.IncludeTax&&(o+=a),0!=o&&(r=e/o*100),r}profitRatioCalculation(e,o,a){let r=0;return this.pageData.IncludeTax&&(o+=a),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(a=>{this.pagination.ListTotal=a.Count,this.showExportModal(e)}):this.showExportModal(e)}showExportModal(e){this.matDialog.open(st,{data:{Filter:this.pageData.Filter,TotalCount:this.pagination.ListTotal}}).afterClosed().subscribe(a=>{if(a){const r=a.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")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(s.uU),t.Y36(g.gz),t.Y36(S.uw),t.Y36(v._W))},n.\u0275cmp=t.Xpm({type:n,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"],[1,"d-flex","justify-content-between","mt-5"],[1,"mr-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 500 variants",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["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"],["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"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 500 variants",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,o){1&e&&t.YNc(0,Pt,46,17,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},directives:[s.O5,u.p,s.sg,c.w9,p.JJ,p.On,D.J,f.QB,q.P],pipes:[s.JJ,s.uU,T.WV,T.qU],styles:[""]}),n})();class Qt{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 Yt=(()=>{class n{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 n.\u0275fac=function(e){return new(e||n)(t.Y36(S.so),t.Y36(S.WI))},n.\u0275cmp=t.Xpm({type:n,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:[""]}),n})();var d=A(1139),Rt=A(5451);function kt(n,i){1&n&&(t.TgZ(0,"button",15),t._UZ(1,"b",16),t.qZA())}function Et(n,i){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"datetimepicker",24),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(2,"datetimepicker",25),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.BQk()}if(2&n){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 Ht(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"datepicker",24),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(1,"datepicker",25),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA()}if(2&n){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 Vt(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"From/To"),t.qZA(),t.YNc(16,Et,3,6,"ng-container",21),t.YNc(17,Ht,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(a){return t.CHM(e),t.oxw().pageData.Filter.isCreated=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Bt(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.RegisterID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerGroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.PaymentState=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CreatorID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Gt(n,i){1&n&&(t.TgZ(0,"th",46),t._uU(1,"COST"),t.qZA())}function jt(n,i){1&n&&(t.TgZ(0,"th",47),t._uU(1,"TAX"),t.qZA())}function Wt(n,i){1&n&&(t.TgZ(0,"th",48),t._uU(1,"SURCHARGE "),t.qZA())}function $t(n,i){1&n&&t._UZ(0,"br")}function Kt(n,i){if(1&n&&(t.TgZ(0,"a",49),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Order/Sales_Order/Info?ID=",e.SOID,"",t.LSH),t.xp6(1),t.Oqu(e.SalesOrderNumber)}}function Xt(n,i){1&n&&t._UZ(0,"br")}function zt(n,i){if(1&n&&(t.TgZ(0,"i"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Note)}}function te(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function ee(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Tax))}}function ne(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.SurchargeAmount)," ")}}const ae=function(){return["/menu/Contacts/Contact/Customers/Info"]},oe=function(n){return{ID:n}},re=function(n,i,e){return{"text-success":n,"text-warning":i,"text-danger":e}};function ie(n,i){if(1&n&&(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,$t,1,0,"br",50),t.YNc(7,Kt,2,2,"a",51),t.YNc(8,Xt,1,0,"br",50),t.YNc(9,zt,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,te,3,3,"td",53),t.TgZ(23,"td",54),t._uU(24),t.ALo(25,"number"),t.qZA(),t.YNc(26,ee,3,3,"td",53),t.YNc(27,ne,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&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(1),t.Q6J("ngIf",o.pageData.DoubleNumber),t.xp6(1),t.Q6J("ngIf",o.pageData.DoubleNumber),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(3),t.hij(" ",t.xi3(13,20,e.Date,"dd MMM yy")," "),t.xp6(3),t.hij(" ",t.xi3(16,23,e.Created,"HH:mm")," "),t.xp6(3),t.Q6J("routerLink",t.DdM(30,ae))("queryParams",t.VKq(31,oe,e.CustomerID)),t.xp6(1),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(e.SalesName),t.xp6(1),t.Q6J("ngIf",o.pageData.IsCostVisible),t.xp6(2),t.Oqu(t.lcZ(25,26,e.Sales)),t.xp6(2),t.Q6J("ngIf",o.data.TaxVisible),t.xp6(1),t.Q6J("ngIf",o.data.SurchargeVisible),t.xp6(2),t.Oqu(t.lcZ(30,28,e.SalesNSurcharge)),t.xp6(2),t.Q6J("ngClass",t.kEZ(33,re,3==e.PaymentStateID,2==e.PaymentStateID,1==e.PaymentStateID)),t.xp6(1),t.Oqu(e.PaymentStateString)}}function le(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Cost")),"")}}function se(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Tax")))}}function pe(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"SurchargeAmount")),"")}}function ce(n,i){if(1&n&&(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,le,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,se,4,6,"td",53),t.YNc(16,pe,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&n){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 _e(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",30),t.TgZ(1,"table",31),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Gt,2,0,"th",38),t.TgZ(15,"th",39),t._uU(16,"SALES"),t.qZA(),t.YNc(17,jt,2,0,"th",40),t.YNc(18,Wt,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,ie,33,37,"tr",44),t.qZA(),t.YNc(25,ce,21,18,"tfoot",45),t.qZA(),t.qZA()}if(2&n){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 ue=(()=>{class n extends d.n{constructor(e,o,a,r,l){super(e,"Report/ReportSummary","ReportLoader/ReportSummary",null,r),this.httpService=e,this.csvConverter=o,this.datePipe=a,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(Yt,{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((a,r)=>{const l="asc"===e.direction;switch(a.CustomerName=null==a.CustomerName?"":a.CustomerName,r.CustomerName=null==r.CustomerName?"":r.CustomerName,a.SalesName=null==a.SalesName?"":a.SalesName,r.SalesName=null==r.SalesName?"":r.SalesName,e.active){case"outlet":return this.compare(a.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"number":return this.compare(a.Number,r.Number,l);case"date":return this.compare(a.Date,r.Date,l);case"customer":return this.compare(a.CustomerName.toLocaleLowerCase(),r.CustomerName.toLocaleLowerCase(),l);case"salesPerson":return this.compare(a.SalesName.toLocaleLowerCase(),r.SalesName.toLocaleLowerCase(),l);case"cost":return this.compare(a.Cost,r.Cost,l);case"sales":return this.compare(a.Sales,r.Sales,l);case"tax":return this.compare(a.Tax,r.Tax,l);case"surcharge":return this.compare(a.SurchargeAmount,r.SurchargeAmount,l);case"total":return this.compare(a.SalesNSurcharge,r.SalesNSurcharge,l);case"payment":return this.compare(a.PaymentStateString,r.PaymentStateString,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(s.uU),t.Y36(g.gz),t.Y36(S.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-sales-summary"]],features:[t.qOj],decls:27,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["class","btn btn-outline-secondary btn-sm dropdown-toggle","data-toggle","dropdown",4,"ngIf"],[1,"dropdown-menu","dropdown-menu-right"],[1,"dropdown-item"],[3,"click"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],[1,"container-fluid","mt-5"],["class","table-responsive",4,"ngIf"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["placeholder","Customer","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],[4,"ngIf","ngIfElse"],["DATEONLY",""],["name","Is Created",3,"options","model","modelChange"],["name","From",3,"date","appearance","width","dateChange"],["name","To",3,"date","appearance","width","dateChange"],["id","more-filter","container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["requestUrl","/API/AC/GetUserSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["type","tel","name","RowCount",1,"w-100",3,"ngModel","ngModelChange"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","outlet",2,"width","100px"],["mat-sort-header","number"],["mat-sort-header","date"],["mat-sort-header","customer"],["mat-sort-header","salesPerson"],["mat-sort-header","cost","class","align-right",4,"ngIf"],["mat-sort-header","sales",1,"align-right"],["mat-sort-header","tax","class","align-right",4,"ngIf"],["mat-sort-header","surcharge","class","align-right",4,"ngIf"],["mat-sort-header","total",1,"align-right"],["mat-sort-header","payment",2,"width","50px"],[4,"ngFor","ngForOf"],["class","border-top",4,"ngIf"],["mat-sort-header","cost",1,"align-right"],["mat-sort-header","tax",1,"align-right"],["mat-sort-header","surcharge",1,"align-right"],["target","_blank",3,"href"],[4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"routerLink","queryParams"],["class","text-right",4,"ngIf"],[1,"text-right"],[1,"text-left",3,"ngClass"],[1,"border-top"],[1,"table","table-borderless"],[1,"empty-column"],[1,"text-left","empty-column"],[1,"text-right","empty-column"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t.NdJ("click",function(){return o.openItemModal("ReportExport/ReportSummary","SalesReportSummary_"+o.transformDate(o.pageData.Filter.From)+"-"+o.transformDate(o.pageData.Filter.To)+".csv")}),t._UZ(4,"i",3),t._uU(5," Export "),t.qZA(),t.YNc(6,kt,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,Vt,23,11,"div",9),t.YNc(20,Bt,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,_e,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,D.J,q.P,Rt.L,f.QB,p.Fj,m.YE,m.nU,s.sg,g.yS,s.mk],pipes:[s.uU,s.JJ,T.qU],styles:[""]}),n})();function ge(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!1,"Top_Brand.csv")}),t._UZ(1,"i",7),t._uU(2,"Export"),t.qZA()}}function de(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 me(n,i){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Code"),t.qZA())}function Ze(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Code)}}const he=function(){return["/menu/Products/Setup/Brand/Brand_Form"]},xe=function(n){return{ID:n}};function Te(n,i){if(1&n&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t.TgZ(2,"a",21),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Ze,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&n){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(10,he))("queryParams",t.VKq(11,xe,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 Ce(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(2,"thead",14),t.TgZ(3,"tr"),t.TgZ(4,"th",15),t._uU(5,"Brand"),t.qZA(),t.YNc(6,me,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,Te,11,13,"tr",19),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(6),t.Q6J("ngIf",e.data.Countcode>0),t.xp6(6),t.Q6J("ngForOf",e.data.Data)}}const Ae=function(){return["/menu/Reports/Sales_Report/Standard/Top_Brand/Brand_Sales_Analysis"]};let qe=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/BrandRank","ReportLoader/BrandRank"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Brand":return this.compare(a.BrandName,r.BrandName,l);case"Code":return this.compare(a.Code,r.Code,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Total":return this.compare(a.Total,r.Total,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Top-Brand"]],features:[t.qOj],decls:10,vars:7,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Brand",2,"width","150px"],["style","width: 120px;","mat-sort-header","Code",4,"ngIf"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],[4,"ngFor","ngForOf"],["mat-sort-header","Code",2,"width","120px"],[3,"routerLink","queryParams"],[4,"ngIf"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ge,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,de,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Ce,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,Ae)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ],encapsulation:2}),n})();function De(n,i){if(1&n){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&n){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 ye=(()=>{class n{constructor(e,o){this.dialogRef=e,this.data=o,this.IDGroups=[],this.options=o.options,this.model=o.model,this.model.forEach(a=>{this.IDGroups.push(a.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 n.\u0275fac=function(e){return new(e||n)(t.Y36(S.so),t.Y36(S.WI))},n.\u0275cmp=t.Xpm({type:n,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,De,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}"]}),n})();var C=A(7695),F=A(5427);function ve(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/CustomerRank","Top Customer ["+a.transformDate(a.pageData.Filter.From)+" - "+a.transformDate(a.pageData.Filter.To)+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function Se(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Me(n,i){if(1&n){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 a=t.oxw(2).$implicit;return t.oxw(3).showModalEditGroup(a.Groups,a.CustomerID)}),t._uU(4),t.qZA(),t.qZA()}if(2&n){const e=i.$implicit,o=i.index;t.xp6(2),t.Oqu(0==o?"":" , "),t.xp6(2),t.Oqu(e.GroupName)}}function be(n,i){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Me,5,2,"span",31),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",e.Groups)}}function Oe(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",37),t.NdJ("click",function(){t.CHM(e);const a=t.oxw().$implicit;return t.oxw(3).showModalEditGroup(a.Groups,a.CustomerID)}),t._uU(1," No group assigned "),t.qZA()}}const Je=function(){return["/menu/Contacts/Contact/Customers/Info"]},Ie=function(n){return{ID:n}};function Ue(n,i){if(1&n&&(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,be,2,1,"span",34),t.YNc(6,Oe,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&n){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(21,Je))("queryParams",t.VKq(22,Ie,e.CustomerID)),t.xp6(1),t.hij(" ",e.Name+" "+(e.Title?e.Title:"")," "),t.xp6(2),t.Q6J("ngIf",e.Groups.length>0),t.xp6(1),t.Q6J("ngIf",!(e.Groups.length>0)),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(11,11,e.Orders)),t.xp6(3),t.Oqu(t.lcZ(14,13,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(17,15,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(20,17,e.Tax)),t.xp6(3),t.Oqu(t.lcZ(23,19,e.Sales+e.Tax))}}function we(n,i){if(1&n&&(t.TgZ(0,"tbody",30),t.YNc(1,Ue,24,24,"tr",31),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function Fe(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,we,2,1,"tbody",29),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(20),t.Q6J("ngIf",e.data.Data)}}const Pe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]},Qe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},Re=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let ke=(()=>{class n extends d.n{constructor(e,o,a,r,l){super(e,"Report/CustomerRank","ReportLoader/CustomerRank"),this.httpService=e,this.pageTitle=o,this.csvConverter=a,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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Code":return this.compare(a.Code,r.Code,l);case"Orders":return this.compare(a.Orders,r.Orders,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"SalesNTax":return this.compare(a.Sales+a.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(ye,{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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(F.Dx),t.Y36(Z.O),t.Y36(s.uU),t.Y36(S.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Top-Customers"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",2,"width","280px"],["mat-sort-header","Code",2,"width","120px"],["mat-sort-header","Orders",1,"align-right",2,"width","75px"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Sales",1,"align-right",2,"width","135px"],["mat-sort-header","Tax",1,"align-right",2,"width","135px"],["mat-sort-header","SalesNTax",1,"align-right",2,"width","135px"],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[4,"ngFor","ngForOf"],[3,"routerLink","queryParams"],[1,"pointer"],[4,"ngIf"],["class","text-primary",3,"click",4,"ngIf"],[1,"text-right"],[1,"text-primary",3,"click"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ve,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,Se,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,Fe,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,Pe)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,Qe)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,Re)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ],encapsulation:2}),n})();function Ee(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/CustomerRank","Top Customer ["+a.transformDate(a.pageData.Filter.From)+" - "+a.transformDate(a.pageData.Filter.To)+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function He(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Ve(n,i){if(1&n&&(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&n){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 Be(n,i){if(1&n&&(t.TgZ(0,"tbody",27),t.YNc(1,Ve,12,10,"tr",28),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.data.Data)}}function Ge(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Be,2,1,"tbody",26),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(12),t.Q6J("ngIf",e.data.Data)}}const je=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},$e=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},Xe=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let ze=(()=>{class n extends d.n{constructor(e,o,a,r){super(e,"Report/CustomerAgeRank","ReportLoader/CustomerAgeRank"),this.httpService=e,this.pageTitle=o,this.csvConverter=a,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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Age":return this.compare(a.Name,r.Name,l);case"Orders":return this.compare(a.TotalOrders,r.TotalOrders,l);case"Quantity":return this.compare(a.TotalQuantity,r.TotalQuantity,l);case"Total":return this.compare(a.TotalAmount,r.TotalAmount,l);default:return 0}}):o}transformDate(e){return this.datePipe.transform(e,"dd_MMM_yyyy")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(F.Dx),t.Y36(Z.O),t.Y36(s.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-top-customers-by-age"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Age",2,"width","280px"],["mat-sort-header","Orders",1,"align-right",2,"width","75px"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Total",1,"align-right",2,"width","135px"],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[4,"ngFor","ngForOf"],[1,"text-right"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ee,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,He,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,Ge,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,je)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,$e)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,Xe)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ],styles:[""]}),n})();function tn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!0,"Top Gender ["+a.transformDate(a.pageData.Filter.From)+" - "+a.transformDate(a.pageData.Filter.To)+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function en(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 nn(n,i){if(1&n&&(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&n){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 an(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,nn,12,10,"tr",27),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(13),t.Q6J("ngForOf",e.data)}}const on=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},ln=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]},pn=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Suppliers"]};let cn=(()=>{class n extends d.n{constructor(e,o,a,r){super(e,"Report/CustomerGenderRank","ReportLoader/CustomerGenderRank"),this.httpService=e,this.pageTitle=o,this.csvConverter=a,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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Gender":return this.compare(a.Name,r.Name,l);case"Orders":return this.compare(a.TotalOrders,r.TotalOrders,l);case"Quantity":return this.compare(a.TotalQuantity,r.TotalQuantity,l);case"Total":return this.compare(a.TotalAmount,r.TotalAmount,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(F.Dx),t.Y36(Z.O),t.Y36(s.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-top-customers-by-gender"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Gender",2,"width","280px"],["mat-sort-header","Orders",1,"align-right",2,"width","75px"],["mat-sort-header","Quantity",1,"align-right",2,"width","75px"],["mat-sort-header","Total",1,"align-right",2,"width","135px"],[1,"border-bottom"],[4,"ngFor","ngForOf"],[1,"text-right"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,tn,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,en,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,an,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,on)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,ln)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,pn)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ],styles:[""]}),n})();function _n(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/TopSalesExport","Top_Supplier.csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function un(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",17),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 gn=function(){return["/menu/Contacts/Contact/Customers/Info"]},dn=function(n){return{ID:n}},mn=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]},Zn=function(n,i,e){return{From:n,SupplierID:i,To:e}};function hn(n,i){if(1&n&&(t.TgZ(0,"tr",33),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",34),t.TgZ(4,"a",35),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td",32),t._uU(7),t.qZA(),t.TgZ(8,"td",36),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",32),t.TgZ(12,"a",35),t.ALo(13,"date"),t.ALo(14,"date"),t._uU(15),t.ALo(16,"number"),t.qZA(),t.qZA(),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Rank),t.xp6(2),t.Q6J("routerLink",t.DdM(20,gn))("queryParams",t.VKq(21,dn,e.SupplierID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,9,e.Quantity)),t.xp6(3),t.Q6J("routerLink",t.DdM(23,mn))("queryParams",t.kEZ(24,Zn,t.xi3(13,11,o.pageData.Filter.From,"ddMMyyyy"),o.data.SupplierID,t.xi3(14,14,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.hij(" ",t.xi3(16,17,e.Total,".0-0"),"")}}function xn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",19),t.TgZ(1,"table",20),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,hn,17,28,"tr",27),t.qZA(),t.qZA(),t.TgZ(16,"div",28),t.TgZ(17,"table",29),t.TgZ(18,"thead",30),t.TgZ(19,"tr",31),t.TgZ(20,"th",32),t._uU(21,"Total Quantity"),t.qZA(),t.TgZ(22,"th",32),t._uU(23,"Total Sales"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(24,"tbody"),t.TgZ(25,"tr"),t.TgZ(26,"td"),t._uU(27),t.qZA(),t.TgZ(28,"td"),t._uU(29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Tn=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers"]},fn=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender"]},qn=function(){return["/menu/Reports/Sales_Report/Standard/Top_Customers/Top_Customers_By_Age"]};let Dn=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/TopSalesSupplier","ReportLoader/TopSupplierLoader"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Rank":return this.compare(a.Rank,r.Rank,l);case"Supplier":return this.compare(a.Name,r.Name,l);case"Code":return this.compare(a.Code,r.Code,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Total":return this.compare(a.Total,r.Total,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-top-suppliers"]],features:[t.qOj],decls:19,vars:11,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Rank",2,"width","35px"],["mat-sort-header","Supplier"],["mat-sort-header","Code",2,"width","80px"],["mat-sort-header","Quantity",1,"align-right",2,"width","120px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end"],[1,"table","w-auto"],[1,"thead-light"],[1,"header"],[1,"text-right"],[1,"border-bottom"],[1,"text-left"],[3,"routerLink","queryParams"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,_n,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,un,18,7,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,xn,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,Tn)),t.xp6(5),t.Q6J("routerLink",t.DdM(9,fn)),t.xp6(3),t.Q6J("routerLink",t.DdM(10,qn)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg],pipes:[s.JJ,s.uU],styles:[""]}),n})();var yn=A(2254),vn=A(2507),Sn=A.n(vn);function Mn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){return t.CHM(e),t.oxw().updateMinstock()}),t._uU(1,"Submit"),t.qZA()}}function bn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",18),t.TgZ(1,"a",19),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/ProductSales","Product Sales.csv")}),t._UZ(2,"i",20),t._uU(3," Export "),t.qZA(),t.TgZ(4,"button",6),t._UZ(5,"b",21),t.qZA(),t.TgZ(6,"ul",22),t.TgZ(7,"li",8),t.TgZ(8,"a",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/ProductSalesExportWithDescription","Product Sales.csv")}),t._uU(9," Export With Description "),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function On(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",24),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",25),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a})("change",function(){return t.CHM(e),t.oxw().resetListId()}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",26),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"From - To"),t.qZA(),t.TgZ(12,"datepicker",27),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",28),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Sales"),t.qZA(),t.TgZ(17,"ng-select",29),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Scope"),t.qZA(),t.TgZ(21,"radio-options",30),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.GroupByVariant=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Jn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",31),t.TgZ(1,"div"),t.TgZ(2,"h6"),t._uU(3,"Sales Order Type"),t.qZA(),t.TgZ(4,"ng-select",29),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Supplier"),t.qZA(),t.TgZ(8,"autocompleteV2",32),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h6"),t._uU(11,"Brand"),t.qZA(),t.TgZ(12,"autocompleteV2",33),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.BrandID=a}),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h6"),t._uU(15,"Customer"),t.qZA(),t.TgZ(16,"autocompleteV2",34),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=a}),t.qZA(),t.qZA(),t.TgZ(17,"div"),t.TgZ(18,"h6"),t._uU(19,"Exclude Complementary"),t.qZA(),t.TgZ(20,"radio-options",35),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.ExcludeComplementary=a}),t.qZA(),t.qZA(),t.TgZ(21,"div"),t.TgZ(22,"h6"),t._uU(23,"Exclude Non Inventory"),t.qZA(),t.TgZ(24,"radio-options",35),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.ExcludeInventory=a}),t.qZA(),t.qZA(),t.TgZ(25,"div"),t.TgZ(26,"h6"),t._uU(27,"Show Inventory"),t.qZA(),t.TgZ(28,"radio-options",36),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.ShowInventory=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 In(n,i){1&n&&(t.TgZ(0,"th",52),t._uU(1,"COST"),t.qZA())}function Un(n,i){1&n&&(t.TgZ(0,"th",53),t._uU(1,"INVENTORY "),t.qZA())}function wn(n,i){1&n&&(t.TgZ(0,"th",54),t._uU(1,"REORDER MIN"),t.qZA())}function Fn(n,i){1&n&&(t.TgZ(0,"th",55),t._uU(1,"UPDATE ROP"),t.qZA())}function Nn(n,i){1&n&&(t.TgZ(0,"th",56),t._uU(1,"PROFIT"),t.qZA())}function Pn(n,i){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"img",66),t.NdJ("click",function(a){t.CHM(e);const r=t.oxw().$implicit;return t.oxw(2).openBigPicture(r,a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.s9C("src",e.ThumbnailUrl,t.LSH)}}function Ln(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",67),t.TgZ(1,"img",68),t.NdJ("click",function(a){t.CHM(e);const r=t.oxw().$implicit;return t.oxw(2).openBigPicture(r,a)}),t.qZA(),t.qZA()}if(2&n){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 Qn(n,i){if(1&n&&(t.TgZ(0,"td",62),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.UnitCost)," ")}}const Y=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Invoice_Items"]},Rn=function(n,i,e){return{VariantID:n,From:i,To:e}};function kn(n,i){if(1&n&&(t.TgZ(0,"a",69),t.ALo(1,"date"),t.ALo(2,"date"),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.Q6J("routerLink",t.DdM(11,Y))("queryParams",t.kEZ(12,Rn,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 En=function(n,i,e){return{ProductID:n,From:i,To:e}};function Hn(n,i){if(1&n&&(t.TgZ(0,"a",69),t.ALo(1,"date"),t.ALo(2,"date"),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.Q6J("routerLink",t.DdM(11,Y))("queryParams",t.kEZ(12,En,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 Vn(n,i){if(1&n&&(t.TgZ(0,"td",62),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.UnitsInStock?e.UnitsInStock:0)," ")}}function Bn(n,i){if(1&n&&(t.TgZ(0,"td",62),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.MinStock),"")}}function Gn(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"td",62),t.TgZ(1,"input",70),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().$implicit.NewMinStock=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.NewMinStock)}}function jn(n,i){if(1&n&&(t.TgZ(0,"td",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 Wn=function(n){return[n]},$n=function(n){return{ID:n}};function Kn(n,i){if(1&n&&(t.TgZ(0,"tr",57),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"div",58),t.TgZ(5,"div",59),t.YNc(6,Pn,2,1,"ng-container",51),t.YNc(7,Ln,2,2,"a",60),t.qZA(),t.TgZ(8,"a",61),t._uU(9),t.qZA(),t.qZA(),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.TgZ(12,"td",62),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,Qn,3,3,"td",63),t.TgZ(16,"td",62),t.YNc(17,kn,5,16,"a",64),t.YNc(18,Hn,5,16,"a",64),t.qZA(),t.YNc(19,Vn,3,3,"td",63),t.YNc(20,Bn,3,3,"td",63),t.YNc(21,Gn,2,1,"td",63),t.YNc(22,jn,3,4,"td",65),t.qZA()),2&n){const e=i.$implicit,o=i.index,a=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,Wn,1==a.pageData.Filter.GroupByVariant?"/menu/Products/Catalog/Variants/Info":"/menu/Products/Catalog/Products/Info"))("queryParams",t.VKq(19,$n,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==a.pageData.Role?null:a.pageData.Role.HasCostRole),t.xp6(2),t.Q6J("ngIf",a.pageData.Filter.GroupByVariant),t.xp6(1),t.Q6J("ngIf",!a.pageData.Filter.GroupByVariant),t.xp6(1),t.Q6J("ngIf",a.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",e.MinVisible&&a.pageData.Filter.ShowInventory),t.xp6(1),t.Q6J("ngIf",(null==a.pageData.Role?null:a.pageData.Role.IsReorderPointEditor)&&a.pageData.Filter.GroupByVariant&&e.MinVisible&&a.pageData.Filter.ListIDs),t.xp6(1),t.Q6J("ngIf",null==a.pageData.Role?null:a.pageData.Role.HasCostRole)}}function Xn(n,i){if(1&n&&(t.TgZ(0,"td",62),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"UnitCost"))," ")}}function zn(n,i){if(1&n&&(t.TgZ(0,"td",74),t.TgZ(1,"a"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA(),t.qZA()),2&n){const e=t.oxw(3);t.xp6(2),t.Oqu(t.lcZ(3,1,t.xi3(4,3,e.data.Data,"UnitsInStock")))}}function ta(n,i){if(1&n&&(t.TgZ(0,"td",62),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Profit")))}}function ea(n,i){if(1&n&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",72),t.TgZ(2,"td",73),t._uU(3,"Total : "),t.qZA(),t.TgZ(4,"td",62),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.qZA(),t.YNc(8,Xn,4,6,"td",63),t.TgZ(9,"td",74),t.TgZ(10,"a"),t._uU(11),t.ALo(12,"number"),t.ALo(13,"sum"),t.qZA(),t.qZA(),t.YNc(14,zn,5,6,"td",75),t.YNc(15,ta,4,6,"td",63),t.qZA(),t.qZA()),2&n){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 na(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",37),t.TgZ(1,"table",38),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(2,"thead",39),t.TgZ(3,"tr"),t.TgZ(4,"th",40),t._uU(5,"No"),t.qZA(),t.TgZ(6,"th",41),t._uU(7,"NAME"),t.qZA(),t.TgZ(8,"th",42),t._uU(9,"CODE"),t.qZA(),t.TgZ(10,"th",43),t._uU(11,"QUANTITY"),t.qZA(),t.YNc(12,In,2,0,"th",44),t.TgZ(13,"th",45),t._uU(14,"SALES "),t.qZA(),t.YNc(15,Un,2,0,"th",46),t.YNc(16,wn,2,0,"th",47),t.YNc(17,Fn,2,0,"th",48),t.YNc(18,Nn,2,0,"th",49),t.qZA(),t.qZA(),t.TgZ(19,"tbody"),t.YNc(20,Kn,23,21,"tr",50),t.qZA(),t.YNc(21,ea,16,15,"tfoot",51),t.qZA(),t.qZA()}if(2&n){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 oa=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales_by_Outlet"]},ia=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales"]},sa=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold/Product_Sales_Vs_Delivery"]};let pa=(()=>{class n extends d.n{constructor(e,o,a,r){super(e,"Report/ProductSales","ReportLoader/ProductSales",null,r),this.httpService=e,this.csvConverter=o,this.toasterService=a,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})})}openBigPicture(e,o){Sn()({el:o.target,imgSrc:e.ImageUrl})}updateMinstock(){const e=[];return this.data.Data.forEach(a=>{a.NewMinStock!=a.MinStock&&e.push({VariantID:a.ID,MinStock:a.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(a=>{this.toasterService.success(a,yn.n.Success),this.getListData()})}sortData(e){const o=this.data.Data.slice();function a(r,l,h){return(r<l?-1:1)*(h?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const h="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 a(r.Name.toLocaleLowerCase(),l.Name.toLocaleLowerCase(),h);case"Code":return a(r.Code.toLocaleLowerCase(),l.Code.toLocaleLowerCase(),h);case"Brand":return a(r.BrandName.toLocaleLowerCase(),l.BrandName.toLocaleLowerCase(),h);case"Quantity":return a(r.Quantity,l.Quantity,h);case"Total_Cost":return a(r.UnitCost,l.UnitCost,h);case"Inventory":return a(r.UnitsInStock,l.UnitsInStock,h);case"Total_Sales":return a(r.Total,l.Total,h);case"ReOrder":return a(r.MinStock,l.MinStock,h);default:return 0}}):o}resetListId(){0==this.pageData.Filter.ListIDs.length&&(this.pageData.Filter.ListIDs=null)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(v._W),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-product-sales"]],features:[t.qOj],decls:26,vars:13,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["class","btn-group mr-6",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-balance-scale","mr-2"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],[1,"container-fluid","mt-5"],["class","table-responsive",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","mr-6",3,"click"],[1,"btn-group","mr-6"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-right"],[3,"click"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange","change"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["name","From",3,"date","showClearBtn","showTodayBtn","dateChange"],["name","To",3,"date","showClearBtn","showTodayBtn","dateChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["name","Scope",3,"model","options","modelChange"],["id","more-filter","container",""],["requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","displayText","ngModelChange"],["requestUrl","/API/AC/GetProductBrandSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","Exclude",3,"model","modelChange"],["name","Scope",3,"model","modelChange"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","100px"],["mat-sort-header","Quantity",1,"align-right",2,"width","100px"],["style","width: 100px;","class","align-right","mat-sort-header","Total_Cost",4,"ngIf"],["mat-sort-header","Total_Sales",1,"align-right",2,"width","100px"],["style","width: 100px;","class","align-right","mat-sort-header","Inventory",4,"ngIf"],["style","width: 120px;","class","align-right","mat-sort-header","ReOrder",4,"ngIf"],["style","width: 88px;","class","align-right",4,"ngIf"],["class","text-right","style","width: 7.5rem;",4,"ngIf"],["class","border-bottom align-middle",4,"ngFor","ngForOf"],[4,"ngIf"],["mat-sort-header","Total_Cost",1,"align-right",2,"width","100px"],["mat-sort-header","Inventory",1,"align-right",2,"width","100px"],["mat-sort-header","ReOrder",1,"align-right",2,"width","120px"],[1,"align-right",2,"width","88px"],[1,"text-right",2,"width","7.5rem"],[1,"border-bottom","align-middle"],[1,"d-flex","align-items-center","align-middle"],[1,"mr-3"],["class","d-block",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"],[2,"width","40px",3,"src","click"],[1,"d-block",3,"target"],[1,"border","rounded",2,"width","40px",3,"src","click"],[3,"routerLink","queryParams"],["type","text","autoNum","",1,"text-right",2,"width","72px",3,"ngModel","ngModelChange"],[1,"text-right",3,"ngClass"],[1,"table","table-borderless"],["colspan","3",1,"text-right"],[1,"text-right","text-primary"],["class","text-right text-primary ",4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Text=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Mn,2,0,"a",1),t.YNc(3,bn,10,0,"div",2),t.TgZ(4,"div",3),t.TgZ(5,"a",4),t._UZ(6,"i",5),t._uU(7,"Compare by Outlet"),t.qZA(),t._UZ(8,"button",6),t.TgZ(9,"ul",7),t.TgZ(10,"li",8),t.TgZ(11,"a",9),t._uU(12,"Compare by Month"),t.qZA(),t.qZA(),t.TgZ(13,"li",8),t.TgZ(14,"a",9),t._uU(15,"Compare with Delivery"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"filters"),t.TgZ(17,"div",10),t.YNc(18,On,22,15,"div",11),t.YNc(19,Jn,29,9,"div",12),t.qZA(),t.TgZ(20,"a",13),t.NdJ("click",function(){return o.hideMore=!o.hideMore}),t._uU(21,"More "),t._UZ(22,"i",14),t.qZA(),t.qZA(),t.TgZ(23,"content"),t.TgZ(24,"div",15),t.YNc(25,na,22,7,"div",16),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",(null==o.pageData.Role?null:o.pageData.Role.IsReorderPointEditor)&&o.pageData.Filter.GroupByVariant&&(null==o.data?null:o.data.MinVisible)&&o.pageData.Filter.ListIDs),t.xp6(1),t.Q6J("ngIf",null==o.pageData.Role?null:o.pageData.Role.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(10,oa)),t.xp6(6),t.Q6J("routerLink",t.DdM(11,ia)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,sa)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(6),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,q.P,D.J,m.YE,m.nU,s.sg,p.Fj,M.b,s.mk],pipes:[s.JJ,s.uU,T.qU],styles:[""]}),n})();function ca(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!0,"SalesProductByOutlet.csv")}),t._UZ(1,"i",7),t._uU(2," Export"),t.qZA()}}function _a(n,i){if(1&n&&(t.TgZ(0,"span",16),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ua(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function ga(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function da(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,_a,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(14,"datepicker",13),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Product=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.YNc(19,ua,4,1,"div",15),t.YNc(20,ga,4,1,"div",15),t.qZA()}if(2&n){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 ma(n,i){if(1&n&&(t.TgZ(0,"th",25),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function Za(n,i){if(1&n&&(t.TgZ(0,"td",25),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function ha(n,i){if(1&n&&(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&n){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 xa(n,i){if(1&n&&(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,ma,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,ha,8,4,"tr",26),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(8),t.Q6J("ngForOf",e.data.Outlet),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}const Ta=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Ca=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/ReportSalesProductByOutlet","ReportLoader/ReportSalesProductByOutlet"),this.httpService=e,this.csvConverter=o,this.ScopeFilter=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-product-sales-by-outlet"]],features:[t.qOj],decls:10,vars:8,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Scope",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],["requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","10%","text-align","right"],["class","text-right",4,"ngFor","ngForOf"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[2,"text-align","right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ca,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,da,21,10,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,xa,13,2,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",null==o.pageData.Filter?null:o.pageData.Filter.IsExport),t.xp6(1),t.Q6J("routerLink",t.DdM(7,Ta)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,f.QB,q.P,D.J,s.sg],styles:[""]}),n})();function fa(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!0,"SalesProductByOutlet.csv")}),t._UZ(1,"i",7),t._uU(2,"Export"),t.qZA()}}function Aa(n,i){if(1&n&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function qa(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,Aa,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(a){return t.CHM(e),t.oxw().pageData.Filter.MonthFrom=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.MonthTo=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupByVariant=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Da(n,i){if(1&n&&(t.TgZ(0,"th",25),t._uU(1),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.hij(" ",o.Months[e.Month-1].ColumnLabel," ")}}function ya(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit,o=t.oxw().$implicit,a=t.oxw(2);t.xp6(1),t.hij(" ",a.findKey(o.Sold,e.Month)?t.lcZ(2,1,a.findKey(o.Sold,e.Month)):""," ")}}const va=function(n){return[n]},Sa=function(n){return{ID:n}};function Ma(n,i){if(1&n&&(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,ya,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&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.VKq(11,va,o.pageData.Filter.GroupByVariant?"/menu/Products/Catalog/Variants/Info":"/menu/Products/Catalog/Products/Info"))("queryParams",t.VKq(13,Sa,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 ba(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Sold)," ")}}function Oa(n,i){if(1&n&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",30),t._UZ(2,"td"),t._UZ(3,"td"),t.YNc(4,ba,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&n){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 Ja(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Da,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,Ma,11,15,"tr",23),t.qZA(),t.YNc(13,Oa,9,7,"tfoot",24),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(8),t.Q6J("ngForOf",e.data.MonthlySales),t.xp6(4),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}const Ia=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Ua=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/ProductSalesMonthly","ReportLoader/ProductSalesMonthly"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear()+1,11,!0),this.Months=[{ID:1,Label:"January",ColumnLabel:"Jan"},{ID:2,Label:"February",ColumnLabel:"Feb"},{ID:3,Label:"March",ColumnLabel:"Mar"},{ID:4,Label:"April",ColumnLabel:"Apr"},{ID:5,Label:"May",ColumnLabel:"May"},{ID:6,Label:"June",ColumnLabel:"Jun"},{ID:7,Label:"July",ColumnLabel:"Jul"},{ID:8,Label:"August",ColumnLabel:"Aug"},{ID:9,Label:"September",ColumnLabel:"Sep"},{ID:10,Label:"October",ColumnLabel:"Oct"},{ID:11,Label:"November",ColumnLabel:"Nov"},{ID:12,Label:"December",ColumnLabel:"Dec"}],this.ScopeFilter=[{Key:!1,Value:"Product"},{Key:!0,Value:"Variant"}]}preGetList(){C.gT.IsEmpty(this.pageData.Filter.EntityID)&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}postInit(){this.menuData.H=this.data.PageTitle}findKey(e,o){let a=null;return e.forEach(r=>{r.Key==o&&(a=r.Value)}),a}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(a.Code=null==a.Code?"":a.Code,r.Code=null==r.Code?"":r.Code,a.Name=null==a.Name?"":a.Name,r.Name=null==r.Name?"":r.Name,e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Code":return this.compare(a.Code.toLocaleLowerCase(),r.Code.toLocaleLowerCase(),l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-product-sales-by-month"]],features:[t.qOj],decls:10,vars:7,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["name","Scope",3,"model","options","modelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","120px"],["class","text-right small","style","width: 70px",4,"ngFor","ngForOf"],[1,"text-right",2,"width","75px"],["class","border-bottom",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-right","small",2,"width","70px"],[1,"border-bottom"],[3,"routerLink","queryParams"],["class","text-right",4,"ngFor","ngForOf"],[1,"text-right"],[1,"table","table-borderless"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,fa,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,qa,26,12,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Ja,14,3,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleExport),t.xp6(1),t.Q6J("routerLink",t.DdM(6,Ia)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,q.P,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function wa(n,i){if(1&n&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Fa(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Na(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Pa(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(5,wa,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(10,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Product=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.YNc(15,Fa,4,1,"div",13),t.YNc(16,Na,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(a){return t.CHM(e),t.oxw().pageData.Filter.WritePerformanceLog=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 La(n,i){if(1&n&&(t.TgZ(0,"th",26),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(e)}}function Qa(n,i){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"th"),t._UZ(2,"th"),t.YNc(3,La,2,1,"th",25),t.qZA()),2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",e.data.Outlet)}}function Ya(n,i){if(1&n&&(t.TgZ(0,"th",27),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",e,"")}}function Ra(n,i){if(1&n&&(t.TgZ(0,"td",22),t._uU(1),t.qZA()),2&n){const e=i.$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function ka(n,i){if(1&n&&(t.TgZ(0,"tr",22),t.YNc(1,Ra,2,1,"td",24),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKeys(e))}}function Ea(n,i){if(1&n&&(t.TgZ(0,"div",18),t.TgZ(1,"table",19),t.TgZ(2,"thead",20),t.YNc(3,Qa,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,Ya,2,1,"th",23),t.qZA(),t.qZA(),t.TgZ(10,"tbody"),t.YNc(11,ka,2,1,"tr",24),t.qZA(),t.qZA(),t.qZA()),2&n){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 Ha=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let Va=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetProductSalesVsDelivery","ReportLoader/ReportSalesProductByOutlet"),this.httpService=e,this.csvConverter=o,this.ScopeFilter=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}getKeys(e){return Object.keys(e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-product-sales-vs-delivery"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Scope",3,"model","options","modelChange"],[4,"ngIf"],["name","Scope",3,"model","modelChange"],[3,"title"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],["requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light"],[1,"border",2,"width","15%"],[1,"border"],["class","border","style","width: 10%",4,"ngFor","ngForOf"],["class","border",4,"ngFor","ngForOf"],["colspan","2","class","text-center border",4,"ngFor","ngForOf"],["colspan","2",1,"text-center","border"],[1,"border",2,"width","10%"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetProductSalesVsDelivery","Productsalesvsdelivery.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Group by Product"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Pa,21,9,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Ea,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,Ha)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,q.P,D.J,s.sg],styles:[""]}),n})();function Ba(n,i){if(1&n&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Ga(n,i){if(1&n&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ja(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,Ba,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(a){return t.CHM(e),t.oxw().pageData.Filter.BrandID=a}),t.YNc(14,Ga,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(19,"datepicker",19),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Wa(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.ExcludeZero=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 $a(n,i){1&n&&(t.TgZ(0,"th",42),t._uU(1," COST"),t.qZA())}function Ka(n,i){1&n&&(t.TgZ(0,"th",43),t._uU(1," PROFIT"),t.qZA())}function Xa(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function za(n,i){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Profit))}}const to=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]},eo=function(n,i,e){return{CategoryID:n,From:i,To:e}};function no(n,i){if(1&n&&(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,Xa,3,3,"td",39),t.YNc(19,za,3,3,"td",40),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(23,to))("queryParams",t.kEZ(24,eo,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 ao(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Cost")),"")}}function oo(n,i){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Profit")),"")}}function ro(n,i){if(1&n&&(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&n){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.DiscountAmount-e.data.TotalDiscountAmount.PointUsed))}}function io(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",25),t.TgZ(1,"table",26),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,$a,2,0,"th",33),t.YNc(15,Ka,2,0,"th",34),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,no,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,ao,4,6,"td",39),t.YNc(40,oo,4,6,"td",40),t.qZA(),t.qZA(),t.qZA(),t.YNc(41,ro,29,27,"div",41),t.qZA()}if(2&n){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 so=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold/Category"]},co=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold/Category_By_Outlet"]};let _o=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/CategorySales","ReportLoader/CategorySales"),this.httpService=e,this.csvConverter=o,this.hideMore=!0}postInit(){this.menuData.H=this.data.PageTitle}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Total":return this.compare(a.Total,r.Total,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Discount":return this.compare(a.Discount,r.Discount,l);case"NetSales":return this.compare(a.NetSales,r.NetSales,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-category-sales"]],features:[t.qOj],decls:20,vars:10,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"fas","fa-chart-area"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-balance-scale","mr-2"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"items","ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[3,"title"],["id","more-filter","container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[3,"model","modelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"text-left"],["mat-sort-header","Quantity",1,"align-right",2,"width","120px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],["mat-sort-header","Discount",1,"align-right",2,"width","120px"],["mat-sort-header","NetSales",1,"align-right",2,"width","120px"],["class","align-right","style","width: 120px;","mat-sort-header","Cost",4,"ngIf"],["class","align-right","style","width: 120px;","mat-sort-header","Profit",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[1,"text-right","text-primary"],["class","text-right text-danger",4,"ngIf"],["class","text-right",4,"ngIf"],["class","h6 mt-12",4,"ngIf"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["mat-sort-header","Profit",1,"align-right",2,"width","120px"],[3,"routerLink","queryParams"],[1,"text-right","text-danger"],[1,"h6","mt-12"],[1,"text-muted","h6"],[1,"text-primary","font-weight-bold","h2"],[1,"text-danger","font-weight-bold","h2"],[1,"text-success","font-weight-bold","h2"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/CategorySales","Category Sales.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"i",4),t._uU(7," Chart View"),t.qZA(),t.TgZ(8,"a",5),t._UZ(9,"i",6),t._uU(10,"By Outlet"),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",7),t.YNc(13,ja,20,9,"div",8),t.YNc(14,Wa,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,io,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,so)),t.xp6(3),t.Q6J("routerLink",t.DdM(9,co)),t.xp6(5),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,D.J,q.P,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function uo(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function go(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(5,uo,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(10,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 mo(n,i){if(1&n&&(t.TgZ(0,"th",20),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.Q6J("mat-sort-header",e),t.xp6(1),t.Oqu(e)}}function Zo(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function ho(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,o[e]))}}function xo(n,i){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,Zo,2,1,"span",19),t.YNc(2,ho,3,3,"span",19),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Q6J("ngIf","Category"==e),t.xp6(1),t.Q6J("ngIf","Category"!=e)}}function To(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,xo,3,2,"td",18),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKey(e))}}function Co(n,i){if(1&n&&(t.TgZ(0,"td",22),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e),"")}}function fo(n,i){if(1&n&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",21),t.TgZ(2,"td",22),t._uU(3,"Total : "),t.qZA(),t.YNc(4,Co,3,3,"td",23),t.qZA(),t.qZA()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.Sum)}}function Ao(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(2,"thead",16),t.TgZ(3,"tr"),t.YNc(4,mo,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,fo,5,1,"tfoot",19),t.qZA(),t.qZA()}if(2&n){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 qo=function(){return["/menu/Reports/Sales_Report/Standard/Category_Sold"]};let Do=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/CategorySalesByOutlet","ReportLoader/CategorySalesByOutlet"),this.httpService=e,this.csvConverter=o}postInit(){this.menuData.H=this.data.PageTitle}getKey(e){return Object.keys(e)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;for(let h=0;h<this.data.Dataheader.length;h++)if(e.active==this.data.Dataheader[h])return this.compare(a[this.data.Dataheader[h]],r[this.data.Dataheader[h]],l)}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-category-sales-by-outlet"]],features:[t.qOj],decls:12,vars:7,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[3,"mat-sort-header",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"mat-sort-header"],[1,"table-footer"],[1,""],["class","",4,"ngFor","ngForOf"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!0,"CategorySalesByOutlet.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Table View"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,go,15,5,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Ao,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,qo)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,D.J,m.YE,s.sg,m.nU],pipes:[s.JJ],styles:[""]}),n})();var U=A(7168);function yo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.Month=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 vo(n,i){if(1&n&&(t.TgZ(0,"div",9),t._UZ(1,"POS-pie-chart",10),t.qZA()),2&n){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 Mo=(()=>{class n extends d.n{constructor(e){super(e,"Report/CategoryChart","ReportLoader/CategoryChartLoader"),this.httpService=e,this.Months=C.gT.Months,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.pieConfig={title:"",dataLabels:!1,labelTooltips:"Sales",height:500,legend:{alignColumns:!1}},this.PieData={}}postInit(){const e=[],o=[];this.data.forEach(a=>{e.push(a.Name),o.push({name:a.Name,y:a.Total})}),this.PieData=o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-category"]],features:[t.qOj],decls:9,vars:6,consts:[[3,"pageData","text","textChange","onSubmit"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","All",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Table View"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",2),t.YNc(6,yo,13,6,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,vo,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,g.yS,s.O5,c.w9,p.JJ,p.On,U.J],styles:[""]}),n})();var b=A(3975);function bo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Year=a})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years)}}function Oo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Month=a})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months)}}function Jo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",13),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Custom=a}),t.qZA(),t.qZA(),t.YNc(9,bo,4,2,"div",9),t.YNc(10,Oo,4,2,"div",9),t.YNc(11,Jo,5,2,"div",9),t.qZA()}if(2&n){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 Uo(n,i){if(1&n&&(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&n){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 Fo=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Visitor"]},Po=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Peak_Hour"]};let Lo=(()=>{class n extends d.n{constructor(e){super(e,"Report/PeakHour","ReportLoader/PeakHourLoader"),this.httpService=e,this.RadioDateFilterType=[{Key:!1,Value:"Month"},{Key:!0,Value:"Custom"}],this.DateFilterType="Month",this.categories=[],this.PieData={},this.ChartData={},this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.Months=C.gT.Months,this.pieConfig={title:"",dataLabels:!0,labelTooltips:"Transaction",height:400,legend:{}},this.chartConfig={chart:{type:"area"},title:{text:""},credits:{enabled:!1},xAxis:{categories:this.categories},yAxis:{title:{text:""}},plotOptions:{},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"},tooltip:{shared:!0,textHeader:function(){return this.points.reduce(function(o,a){return o+"<br/>"+a.series.name+": <b>"+a.y+"</b>"},"<b>Time : "+this.x+"</b>")}}}}postInit(){const e=new Date;this.Year=e.getFullYear();const o=[],a=[];this.data.Data.forEach(r=>{o.push(r.Name),a.push({name:r.Name,y:r.Transaction})}),this.PieData=a,this.ChartData={series:this.data.series},this.categories=this.data.categories}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-peak-hour"]],features:[t.qOj],decls:11,vars:8,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["placeholder","Year",3,"ngModel","items","ngModelChange","clear"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","clear"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col"],[1,"card"],[1,"card-body","mt-5"],[1,"card-title"],[1,"h3"],[1,"card-text"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Visitor View"),t.qZA(),t.TgZ(4,"a",2),t._uU(5,"Table View"),t.qZA(),t.qZA(),t.TgZ(6,"filters"),t.TgZ(7,"div",3),t.YNc(8,Io,12,8,"div",4),t.qZA(),t.qZA(),t.TgZ(9,"content"),t.YNc(10,Uo,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,Fo)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Po)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,q.P,f.QB,b.D,U.J],styles:[""]}),n})();function Qo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Yo(n,i){if(1&n&&(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&n){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 Ro(n,i){if(1&n&&(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,Yo,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&n){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 ko=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour"]},Ho=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Peak_Hour"]};let Vo=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetNumberOfPersonList","ReportLoader/GetNumberOfPersonLoader"),this.httpService=e,this.csvConverter=o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-visitor"]],features:[t.qOj],decls:14,vars:8,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[1,"text-right",2,"width","50px"],[1,"text-right",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!1,"PeakHour.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Chart View"),t.qZA(),t.TgZ(7,"a",4),t._uU(8,"Table View"),t.qZA(),t.qZA(),t.TgZ(9,"filters"),t.TgZ(10,"div",5),t.YNc(11,Qo,10,5,"div",6),t.qZA(),t.qZA(),t.TgZ(12,"content"),t.YNc(13,Ro,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,ko)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Ho)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function Bo(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/GetPeakHourList","PeakHour.csv"),a.changeExport()}),t._UZ(1,"i",8),t._uU(2,"Export"),t.qZA()}}function Go(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Year=a})("clear",function(){return t.CHM(e),t.oxw(2).Year=null}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years)}}function jo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Month=a})("clear",function(){return t.CHM(e),t.oxw(2).Month=null}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months)}}function Wo(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",16),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 $o(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Custom=a}),t.qZA(),t.qZA(),t.YNc(9,Go,4,2,"div",12),t.YNc(10,jo,4,2,"div",12),t.YNc(11,Wo,5,2,"div",12),t.qZA()}if(2&n){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 Ko(n,i){1&n&&(t.TgZ(0,"th",22),t._uU(1,"Revenue"),t.qZA())}function Xo(n,i){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Revenue))}}function zo(n,i){if(1&n&&(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,Xo,3,3,"td",28),t.qZA()),2&n){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 tr(n,i){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data,"Revenue")))}}function er(n,i){if(1&n&&(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,Ko,2,0,"th",23),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,zo,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,tr,4,6,"td",28),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){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 ar=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour/Visitor"]},or=function(){return["/menu/Reports/Sales_Report/Standard/Peak_Hour"]};let rr=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetPeakHourList","ReportLoader/PeakHourLoader"),this.httpService=e,this.csvConverter=o,this.RadioDateFilterType=[{Key:!1,Value:"Month"},{Key:!0,Value:"Custom"}],this.DateFilterType="Month",this.Years=C.gT.GenerateYears((new Date).getFullYear(),10,!0),this.Months=C.gT.Months,this.menuData.H="Peak Hour Table"}changeExport(){this.pageData.Filter.Export=!1}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-table-view"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["placeholder","Year",3,"ngModel","items","ngModelChange","clear"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","clear"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[1,"text-right",2,"width","50px"],[1,"text-right",2,"width","120px"],["style","width: 120px","class"," text-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[1,"text-right"],["class","text-right",4,"ngIf"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Bo,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,$o,12,7,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,er,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,ar)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,or)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,q.P,f.QB,s.sg],pipes:[s.JJ,T.qU,T.Fo],styles:[""]}),n})();function ir(n,i){if(1&n&&(t.TgZ(0,"span",18),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function lr(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,ir,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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Month=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 sr(n,i){if(1&n&&(t.TgZ(0,"div",19),t._UZ(1,"POS-line-chart",20),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const cr=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Table"]},_r=function(n,i){return{Month:n,Year:i}},ur=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]},dr=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity"]};let mr=(()=>{class n extends d.n{constructor(e,o,a,r){super(e,"Report/DailySalesChart","ReportLoader/DailyReportSales"),this.httpService=e,this.url=a,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(),a=e.getFullYear();this.from=Date.UTC(a,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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz),t.Y36(g.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-daily-sales"]],features:[t.qOj],decls:19,vars:14,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn-group"],["title","Table View",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa","fa-table"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t._UZ(4,"i",3),t._uU(5," Table View"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10," Comparable PerYear"),t.qZA(),t.qZA(),t.TgZ(11,"li",6),t.TgZ(12,"a",7),t._uU(13," Daily Quantity"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"filters"),t.TgZ(15,"div",8),t.YNc(16,lr,22,10,"div",9),t.qZA(),t.qZA(),t.TgZ(17,"content"),t.YNc(18,sr,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,cr))("queryParams",t.WLB(9,_r,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,ur)),t.xp6(3),t.Q6J("routerLink",t.DdM(13,dr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,b.D],styles:[""]}),n})();function Zr(n,i){if(1&n&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function hr(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(13,Zr,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(a){return t.CHM(e),t.oxw().currency=a})("change",function(){return t.CHM(e),t.oxw().checkFilterCurrency()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 xr(n,i){if(1&n&&(t.TgZ(0,"div",18),t._UZ(1,"POS-line-chart",19),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const Cr=function(){return["/menu/Reports/Sales_Report/Standard/Monthly/Monthly_Table"]},Ar=function(){return["/menu/Reports/Sales_Report/Standard/Monthly/Yearly_Table"]};let qr=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/MonthlySalesPerformanceChart","ReportLoader/MonthlySalesPerformance"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.ChartData={},this.currency=-1}preInitList(){this.pageData.Options.Currencies.unshift({ID:-1,Index:1,Symbol:"All",Name:"All",ExchangeRate:1,ConversionSuggestion:!0,ExchangeRateDate:"0001-01-01T00:00:00",ExchangeRateDateDisplay:"01 Jan 0001"}),this.checkFilterCurrency()}checkFilterCurrency(){this.pageData.Filter.CurrencyID=this.currency<0?null:this.currency}postInit(){const e=[];this.data.MonthlySalesRank.forEach(o=>{const a={name:o.Name,data:o.Sales};a.data.unshift(null),e.push(a)}),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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-monthly-sales"]],features:[t.qOj],decls:16,vars:8,consts:[[3,"pageData","text","textChange","onSubmit"],[1,"btn-group"],["title","Table View",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fa","fa-table"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange","change"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t._UZ(4,"i",3),t._uU(5," Table View"),t.qZA(),t._UZ(6,"button",4),t.TgZ(7,"ul",5),t.TgZ(8,"li",6),t.TgZ(9,"a",7),t._uU(10," View Yearly "),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(11,"filters"),t.TgZ(12,"div",8),t.YNc(13,hr,18,8,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,xr,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,Cr)),t.xp6(6),t.Q6J("routerLink",t.DdM(7,Ar)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,b.D],styles:[""]}),n})();function Dr(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!1,"SalesPerYear.csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function yr(n,i){if(1&n&&(t.TgZ(0,"span",22),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function vr(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,yr,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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.FromYear=a}),t.qZA(),t.qZA(),t.TgZ(20,"div",19),t.TgZ(21,"ng-select",20),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.ToYear=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Sr(n,i){if(1&n&&(t.TgZ(0,"th",34),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",e,"")}}function Mr(n,i){if(1&n&&(t.TgZ(0,"td",34),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=i.$implicit,o=t.oxw().$implicit,a=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,a.filterSales(o.Sales,"Year",e),"Sales"))," ")}}const R=function(n,i){return{"text-success font-weight-bold":n,"text-danger font-weight-bold":i}};function br(n,i){if(1&n&&(t.TgZ(0,"tr",35),t.TgZ(1,"td",26),t._uU(2),t.ALo(3,"Month"),t.qZA(),t.YNc(4,Mr,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&n){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,R,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,R,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 Or(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.ALo(4,"GetChildrenArray"),t.qZA()),2&n){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 Jr=function(n,i){return{"text-success":n,"text-danger":i}};function Ir(n,i){if(1&n&&(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,Sr,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,br,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,Or,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&n){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,Jr,e.data.TotalDiff>0,e.data.TotalDiff<0)),t.xp6(1),t.hij(" ",t.lcZ(20,5,e.data.TotalDiff),"")}}const Ur=function(){return["/menu/Reports/Sales_Report/Standard/Monthly"]},wr=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]};let k=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/YearlySalesList","ReportLoader/YearlyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0)}filterSales(e,o,a){return e.filter(function(r){return r[o]==a})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-yearly"]],features:[t.qOj],decls:16,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales",3,"ngModel","items","ngModelChange"],[1,"row"],[1,"col-6"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Types",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","30px"],["style","width: 20px","class"," text-right",4,"ngFor","ngForOf"],[1,"text-right",2,"width","30px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],[1,"font-weight-bold","text-success"],["class","text-right text-success",4,"ngFor","ngForOf"],[1,"text-right",3,"ngClass"],[1,"text-right",2,"width","20px"],[1,"border-bottom"],["style","width: 20px","class","text-right",4,"ngFor","ngForOf"],[1,"text-right",2,"width","30px",3,"ngClass"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Dr,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,vr,26,13,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,Ir,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,Ur)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,wr)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,s.sg,s.mk],pipes:[s.JJ,T.mr,T.qU,T.J1],styles:[""]}),n})();function Fr(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/DailySalesExport","Daily_Sales_Report.csv")}),t._UZ(1,"i",16),t._uU(2,"Export"),t.qZA()}}function Nr(n,i){if(1&n&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Pr(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,Nr,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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Month=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Lr(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.DeliveryID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Qr(n,i){1&n&&(t.TgZ(0,"th",48),t._uU(1," Tax "),t.qZA())}function Yr(n,i){1&n&&(t.TgZ(0,"th",49),t._uU(1,"Net Sales + Tax"),t.qZA())}function Rr(n,i){1&n&&(t.TgZ(0,"th",50),t._uU(1,"Cost"),t.qZA())}function kr(n,i){1&n&&(t.TgZ(0,"th",51),t._uU(1," Profit "),t.qZA())}function Er(n,i){1&n&&(t.TgZ(0,"th",52),t._uU(1," Profit + Tax Include "),t.qZA())}function Hr(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Tax))}}function Vr(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.SalesNetWithTax)," ")}}function Br(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Cost),"")}}function Gr(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Profit),"")}}function jr(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.ProfitWithTax),"")}}const E=function(n){return{"is-weekend":n}};function Wr(n,i){if(1&n&&(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,Hr,3,3,"td",46),t.YNc(20,Vr,3,3,"td",46),t.YNc(21,Br,3,3,"td",47),t.YNc(22,Gr,3,3,"td",46),t.YNc(23,jr,3,3,"td",46),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.Q6J("ngClass",t.VKq(27,E,o.data.DayOfWeekend)),t.xp6(1),t.Q6J("ngClass",t.VKq(29,E,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 $r(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Tax")),"")}}function Kr(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"SalesNetWithTax")),"")}}function Xr(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Cost")),"")}}function zr(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Profit")),"")}}function ti(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"ProfitWithTax")),"")}}function ei(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",29),t.TgZ(1,"table",30),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Qr,2,0,"th",38),t.YNc(17,Yr,2,0,"th",39),t.YNc(18,Rr,2,0,"th",40),t.YNc(19,kr,2,0,"th",41),t.YNc(20,Er,2,0,"th",42),t.qZA(),t.qZA(),t.TgZ(21,"tbody"),t.YNc(22,Wr,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,$r,4,6,"td",46),t.YNc(44,Kr,4,6,"td",46),t.YNc(45,Xr,4,6,"td",47),t.YNc(46,zr,4,6,"td",47),t.YNc(47,ti,4,6,"td",46),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 ni=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]},ai=function(n,i){return{Month:n,Year:i}},oi=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]};let ri=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/DailySalesList","ReportLoader/DailyReportSales",null,a),this.httpService=e,this.csvConverter=o,this.activatedRoute=a,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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Day":case"Date":return this.compare(a.Day,r.Day,l);case"Count":return this.compare(a.Count,r.Count,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Gross":return this.compare(a.Gross,r.Gross,l);case"SalesNet":return this.compare(a.SalesNet,r.SalesNet,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"SalesNetWithTax":return this.compare(a.SalesNetWithTax,r.SalesNetWithTax,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(a.ProfitWithTax,r.ProfitWithTax,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-daily"]],features:[t.qOj],decls:21,vars:14,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["title","Chart View",1,"btn","btn-outline-secondary","pointer",3,"routerLink","queryParams"],[1,"fas","fa-chart-bar"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],[3,"title"],["id","more-filter","container",""],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Type",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","api","Report/DailySalesList","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Day",2,"width","90px"],["mat-sort-header","Date",1,"align-right",2,"width","42px"],["mat-sort-header","Count",1,"align-right",2,"width","70px"],["mat-sort-header","Quantity",1,"align-right",2,"width","100px"],["mat-sort-header","Gross",1,"align-right",2,"width","120px"],["mat-sort-header","SalesNet",1,"align-right",2,"width","120px"],["style","width: 120px","class"," align-right","mat-sort-header","Tax",4,"ngIf"],["style","width: 120px","class"," align-right","mat-sort-header","SalesNetWithTax",4,"ngIf"],["style","width: 120px","class"," align-right","mat-sort-header","Cost",4,"ngIf"],["style","width: 120px","class"," align-right","mat-sort-header","Profit",4,"ngIf"],["style","width: 160px","class"," align-right","mat-sort-header","ProfitWithTax",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"empty-column"],[1,"text-right"],["class","text-right",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["mat-sort-header","Tax",1,"align-right",2,"width","120px"],["mat-sort-header","SalesNetWithTax",1,"align-right",2,"width","120px"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["mat-sort-header","Profit",1,"align-right",2,"width","120px"],["mat-sort-header","ProfitWithTax",1,"align-right",2,"width","160px"],[3,"ngClass"],[1,"text-right","text-danger"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Fr,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,Pr,18,8,"div",10),t.YNc(15,Lr,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,ei,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,ni))("queryParams",t.WLB(10,ai,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,oi)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function ii(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",12),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/MonthlySalesList",a.data.PageTitle+".csv")}),t._UZ(1,"i",13),t._uU(2,"Export"),t.qZA()}}function li(n,i){if(1&n&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function si(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,li,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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.MultiplyUnitQuantity=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 pi(n,i){1&n&&(t.TgZ(0,"th",29),t._uU(1,"Tax"),t.qZA())}function ci(n,i){1&n&&(t.TgZ(0,"th",29),t._uU(1,"Sales + Tax"),t.qZA())}function _i(n,i){1&n&&(t.TgZ(0,"th",29),t._uU(1,"Cost"),t.qZA())}function ui(n,i){1&n&&(t.TgZ(0,"th",29),t._uU(1,"Profit"),t.qZA())}function gi(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,t.lcZ(3,4,e.Tax),".0-0"))}}function di(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,t.lcZ(3,4,e.SalesNetWithTax),".0-0"))}}function mi(n,i){if(1&n&&(t.TgZ(0,"td",39),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Cost,".0-0")," ")}}function Zi(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Profit,".0-0")," ")}}function hi(n,i){if(1&n&&(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,gi,4,6,"td",34),t.YNc(17,di,4,6,"td",34),t.YNc(18,mi,3,4,"td",35),t.YNc(19,Zi,3,4,"td",36),t.qZA()),2&n){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 xi(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.ALo(4,"sum"),t.qZA()),2&n){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 Ti(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"RoundUp"),t.ALo(4,"sum"),t.qZA()),2&n){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 Ci(n,i){if(1&n&&(t.TgZ(0,"td",39),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 fi(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 Ai(n,i){if(1&n&&(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,pi,2,0,"th",30),t.YNc(15,ci,2,0,"th",30),t.YNc(16,_i,2,0,"th",30),t.YNc(17,ui,2,0,"th",30),t.qZA(),t.qZA(),t.TgZ(18,"tbody"),t.YNc(19,hi,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,xi,5,9,"td",34),t.YNc(40,Ti,5,9,"td",34),t.YNc(41,Ci,4,7,"td",35),t.YNc(42,fi,4,7,"td",36),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){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 qi=function(){return["/menu/Reports/Sales_Report/Standard/Monthly"]},Di=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Yearly"]};let yi=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/MonthlySalesList","ReportLoader/MonthlyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0)}postInit(){this.menuData.H=this.data.PageTitle}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-monthly"]],features:[t.qOj],decls:17,vars:9,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["title","Chart View",1,"btn","btn-outline-secondary","pointer",3,"routerLink"],[1,"fas","fa-chart-bar"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Type",3,"ngModel","items","ngModelChange"],["name","Inventory",3,"model","modelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","90px"],[1,"text-right",2,"width","70px"],[1,"text-right",2,"width","120px"],["style","width: 120px","class"," text-right",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right","text-success"],["class","text-right",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[1,"border-bottom"],[1,"text-right"],[1,"text-right","text-danger"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ii,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,si,30,13,"div",10),t.qZA(),t.qZA(),t.TgZ(15,"content"),t.YNc(16,Ai,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,qi)),t.xp6(6),t.Q6J("routerLink",t.DdM(8,Di)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,q.P,s.sg],pipes:[s.JJ,T.qU,T.mr,T.Fo],styles:[""]}),n})();function vi(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Si(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,vi,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(a){return t.CHM(e),t.oxw().currency=a})("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(a){return t.CHM(e),t.oxw().pageData.Filter.Month=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Mi(n,i){if(1&n&&(t.TgZ(0,"div",14),t._UZ(1,"POS-line-chart",15),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const bi=function(){return["/menu/Reports/Sales_Report/Standard/Daily"]},Ji=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity/Monthly"]};let Ii=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/DailySalesVolume","ReportLoader/DailyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.currency=-1,this.Months=C.gT.Months,this.ChartData={}}preInitList(){this.pageData.Options.Currencies.unshift({ID:-1,Index:1,Symbol:"All",Name:"All",ExchangeRate:1,ConversionSuggestion:!0,ExchangeRateDate:"0001-01-01T00:00:00",ExchangeRateDateDisplay:"01 Jan 0001"}),this.checkFilterCurrency()}checkFilterCurrency(){this.pageData.Filter.CurrencyID=this.currency<0?null:this.currency}postInit(){this.ChartData={series:this.data.Series};const e=new Date(this.data.From),o=e.getMonth(),a=e.getFullYear();let r=Date.UTC(a,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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-sales-volume"]],features:[t.qOj],decls:11,vars:8,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["title","View Monthly",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange","change"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Daily Sales"),t.qZA(),t.TgZ(4,"a",2),t._uU(5,"View Monthly"),t.qZA(),t.qZA(),t.TgZ(6,"filters"),t.TgZ(7,"div",3),t.YNc(8,Si,22,10,"div",4),t.qZA(),t.qZA(),t.TgZ(9,"content"),t.YNc(10,Mi,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,bi)),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Ji)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,b.D],styles:[""]}),n})();function Ui(n,i){if(1&n&&(t.TgZ(0,"span",11),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function wi(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,Ui,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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().currency=a})("change",function(){return t.CHM(e),t.oxw().checkFilterCurrency()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Fi(n,i){if(1&n&&(t.TgZ(0,"div",12),t._UZ(1,"POS-line-chart",13),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("config",e.chartConfig)("data",e.ChartData)}}const Pi=function(){return["/menu/Reports/Sales_Report/Standard/Daily/Daily_Quantity"]};let Li=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/MonthtlySalesVolume","ReportLoader/MonthlySalesPerformance"),this.httpService=e,this.csvConverter=o,this.currency=-1,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.ChartData={}}preInitList(){this.pageData.Options.Currencies.unshift({ID:-1,Index:1,Symbol:"All",Name:"All",ExchangeRate:1,ConversionSuggestion:!0,ExchangeRateDate:"0001-01-01T00:00:00",ExchangeRateDateDisplay:"01 Jan 0001"}),this.checkFilterCurrency()}checkFilterCurrency(){this.pageData.Filter.CurrencyID=this.currency<0?null:this.currency}postInit(){const e=[];this.data.MonthlySalesRank.forEach(o=>{const a=o.Sales.map(l=>parseInt(l));e.push({name:o.Name,data:a})}),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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-monthly-volume"]],features:[t.qOj],decls:9,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["title","View Daily",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose a Currency",3,"ngModel","items","ngModelChange","change"],[3,"title"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"View Daily"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",2),t.YNc(6,wi,18,8,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,Fi,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,Pi)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,b.D],styles:[""]}),n})();function Qi(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",12),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/OutletPerformance","Sales Transaction ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",13),t._uU(2,"Export"),t.qZA()}}function Yi(n,i){if(1&n&&(t.TgZ(0,"span",20),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Ri(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",22),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 ki(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Year=a})("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(a){return t.CHM(e),t.oxw(2).Month=a})("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&n){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 Ei(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(5,Yi,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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),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(a){return t.CHM(e),t.oxw().DateFilterType=a}),t.qZA(),t.qZA(),t.YNc(14,Ri,5,2,"div",19),t.YNc(15,ki,8,4,"div",19),t.qZA()}if(2&n){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 Hi(n,i){1&n&&(t.TgZ(0,"th",44),t._uU(1,"Cost"),t.qZA())}function Vi(n,i){1&n&&(t.TgZ(0,"th",45),t._uU(1,"Profit"),t.qZA())}function Bi(n,i){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}const H=function(n,i){return{"text-danger":n,"text-success":i}};function Gi(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,H,e.Profit<0,e.Profit>0)),t.xp6(1),t.Oqu(t.lcZ(2,2,e.Profit))}}const V=function(){return["/menu/Reports/Sales_Report/Standard/Summary"]},B=function(n,i,e){return{EntityID:n,From:i,To:e}};function ji(n,i){if(1&n&&(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,Bi,3,3,"td",42),t.YNc(15,Gi,3,7,"td",43),t.qZA()),2&n){const e=i.$implicit,o=i.index,a=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,V))("queryParams",t.kEZ(17,B,e.EntityID,t.xi3(9,8,a.pageData.Filter.From,"ddMMyyyy"),t.xi3(10,11,a.pageData.Filter.To,"ddMMyyyy"))),t.xp6(4),t.Oqu(t.lcZ(13,14,e.Sales)),t.xp6(2),t.Q6J("ngIf",a.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",a.pageData.IsProfitVisible)}}function Wi(n,i){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 G=function(n,i){return{"text-success":n,"text-danger":i}};function $i(n,i){if(1&n&&(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&n){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,G,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 Ki(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"table",30),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw(2).sortOutletDataWrapper(a)}),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,Hi,2,0,"th",36),t.YNc(12,Vi,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,Wi,4,7,"td",42),t.YNc(26,$i,6,17,"td",43),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Xi(n,i){1&n&&(t.TgZ(0,"th",44),t._uU(1,"Cost"),t.qZA())}function zi(n,i){1&n&&(t.TgZ(0,"th",45),t._uU(1,"Profit"),t.qZA())}function tl(n,i){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function el(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,H,e.Profit<0,e.Profit>0)),t.xp6(1),t.Oqu(t.lcZ(2,2,e.Profit))}}function nl(n,i){if(1&n&&(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,tl,3,3,"td",42),t.YNc(21,el,3,7,"td",43),t.qZA()),2&n){const e=i.$implicit,o=i.index,a=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,V))("queryParams",t.kEZ(23,B,e.EntityID,t.xi3(9,10,a.pageData.Filter.From,"ddMMyyyy"),t.xi3(10,13,a.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",a.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",a.pageData.IsProfitVisible)}}function al(n,i){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 ol(n,i){if(1&n&&(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&n){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,G,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 rl(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"table",30),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw(2).sortOutletDataWrapper(a)}),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,Xi,2,0,"th",36),t.YNc(16,zi,2,0,"th",37),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,nl,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,al,4,7,"td",42),t.YNc(39,ol,6,17,"td",43),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 il(n,i){1&n&&(t.TgZ(0,"p"),t._uU(1,"No Data has been loaded!"),t.qZA())}function ll(n,i){if(1&n&&(t.TgZ(0,"div",28),t.YNc(1,Ki,27,19,"table",29),t.YNc(2,rl,40,36,"table",29),t.YNc(3,il,2,0,"p",19),t.qZA()),2&n){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 pl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Detail"]},_l=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]},gl=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]},ml=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Graphic"]};let Zl=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/OutletPerformance","ReportLoader/OutletPerformance",null,a),this.httpService=e,this.csvConverter=o,this.activatedRoute=a,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()),this.pageData.Filter.From=new Date(this.Year,this.Month,1),this.pageData.Filter.To=new Date(this.Year,this.Month+1,0)}sortOutletDataWrapper(e){let o,a;if(this.data.DataWithCategory.length>0)o=this.data.DataWithCategory,a=!0;else{if(!(this.data.DataWithoutCategory.length>0))return;o=this.data.DataWithoutCategory,a=!1}this.sortOutletData(o,e,a)}sortOutletData(e,o,a){function r(l,h,x){return(l<h?-1:1)*(x?1:-1)}o.active&&""!==o.direction&&null!=e&&(e=e.sort((l,h)=>{const x="asc"===o.direction;switch(o.active){case"Outlet":return r(l.Outlet,h.Outlet,x);case"Transaction":return r(l.Transaction,h.Transaction,x);case"Quantity":return r(l.Quantity,h.Quantity,x);case"Sales":return r(l.SalesNet,h.SalesNet,x);case"SalesTax":return r(l.SalesNet+l.Tax,h.SalesNet+l.Tax,x);case"Tax":return r(l.Tax,h.Tax,x);case"Cost":return r(l.Cost,h.Cost,x);case"Profit":return r(l.Profit,h.Profit,x);default:return 0}}),a?this.data.DataWithCategory=e:a||(this.data.DataWithoutCategory=e))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-outlet-performance"]],features:[t.qOj],decls:22,vars:13,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],["title","Outlet Performance Detail",1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],["title","Chart View",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[1,"container-fluid","mt-5"],["class","table","id","tableGrid","matSort","",3,"matSortChange",4,"ngIf"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","Outlet"],["mat-sort-header","Quantity",1,"align-right"],["mat-sort-header","Sales",1,"align-right"],["class","align-right","mat-sort-header","Cost",4,"ngIf"],["class","align-right","mat-sort-header","Profit",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],["colspan","3",1,"text-right"],[1,"text-right"],["class","text-right",4,"ngIf"],["class","text-right",3,"ngClass",4,"ngIf"],["mat-sort-header","Cost",1,"align-right"],["mat-sort-header","Profit",1,"align-right"],[3,"routerLink","queryParams"],[1,"text-right",3,"ngClass"],["mat-sort-header","Transaction",1,"align-right"],["mat-sort-header","Tax",1,"align-right"],["mat-sort-header","SalesTax",1,"align-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Qi,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,Ei,16,8,"div",10),t.qZA(),t.qZA(),t.TgZ(20,"content"),t.YNc(21,ll,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,pl)),t.xp6(5),t.Q6J("routerLink",t.DdM(10,_l)),t.xp6(3),t.Q6J("routerLink",t.DdM(11,gl)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,ml)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,q.P,f.QB,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function hl(n,i){if(1&n&&(t.TgZ(0,"span",11),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function xl(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",13),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 Tl(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Year=a})("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(a){return t.CHM(e),t.oxw(2).Month=a})("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&n){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 Cl(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(5,hl,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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),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(a){return t.CHM(e),t.oxw().DateFilterType=a})("modelChange",function(){return t.CHM(e),t.oxw().YearMonthToDateRange()}),t.qZA(),t.qZA(),t.YNc(14,xl,5,2,"div",10),t.YNc(15,Tl,8,4,"div",10),t.qZA()}if(2&n){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 fl(n,i){if(1&n&&(t.TgZ(0,"div",19),t._UZ(1,"POS-pie-chart",20),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("config",e.pieConfig)("data",e.PieData)}}const ql=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]};let Dl=(()=>{class n extends d.n{constructor(e){super(e,"Report/OutletPerformance","ReportLoader/OutletPerformance"),this.httpService=e,this.DateFilterType=!0,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.PieData={},this.RadioDateFilterType=[{Key:!0,Value:"Predefined"},{Key:!1,Value:"Range"}],this.pieConfig={title:"",dataLabels:!0,labelTooltips:"Sales",height:400,legend:{}};const o=new Date;this.Year=o.getFullYear(),this.Month=o.getMonth()}postInit(){this.getPieData()}getPieData(){const e=[],o=[];this.data.DataWithoutCategory.length>0&&this.data.DataWithoutCategory.forEach(a=>{e.push(a.Outlet),o.push({name:a.Outlet,y:a.Sales})}),this.data.DataWithCategory.length>0&&this.data.DataWithCategory.forEach(a=>{e.push(a.Outlet),o.push({name:a.Outlet,y:a.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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-outlet-graphic"]],features:[t.qOj],decls:9,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Table View",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[1,"container-fluid","mt-5"],[3,"config","data"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Table View"),t.qZA(),t.qZA(),t.TgZ(4,"filters"),t.TgZ(5,"div",2),t.YNc(6,Cl,16,8,"div",3),t.qZA(),t.qZA(),t.TgZ(7,"content"),t.YNc(8,fl,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,ql)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,q.P,f.QB,U.J],styles:[""]}),n})();function yl(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/OutletPerformanceDetail","Sales Transaction ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",16),t._uU(2,"Export"),t.qZA()}}function vl(n,i){if(1&n&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Sl(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",25),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 Ml(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).isCompareData=a})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare("Data")}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.isCompareData)}}function bl(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Year=a})("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(a){return t.CHM(e),t.oxw(2).Month=a})("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&n){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 Ol(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(5,vl,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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),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(a){return t.CHM(e),t.oxw().DateFilterType=a}),t.qZA(),t.qZA(),t.YNc(14,Sl,5,2,"div",22),t.YNc(15,Ml,4,1,"div",22),t.YNc(16,bl,8,4,"div",22),t.qZA()}if(2&n){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 Jl(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ExcludeComplementary=a})("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(a){return t.CHM(e),t.oxw().pageData.Filter.ExcludeInventory=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Il(n,i){1&n&&(t.TgZ(0,"th",58),t._uU(1,"Prev"),t.qZA())}function Ul(n,i){1&n&&(t.TgZ(0,"th",58),t._uU(1,"Now"),t.qZA())}function wl(n,i){1&n&&(t.TgZ(0,"th",59),t._uU(1,"Trans "),t.qZA())}function Fl(n,i){if(1&n&&(t.TgZ(0,"th",60),t._uU(1,"Tax"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet")}}function Nl(n,i){if(1&n&&(t.TgZ(0,"th",60),t._uU(1," Sales + Tax"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet")}}function Pl(n,i){1&n&&(t.TgZ(0,"th",53),t._uU(1,"\xb1 (%)"),t.qZA())}function Ll(n,i){1&n&&(t.TgZ(0,"th",61),t._uU(1,"Cost"),t.qZA())}function Ql(n,i){if(1&n&&(t.TgZ(0,"th",60),t._uU(1," Profit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"ProfitWithTax":"Profit")}}function Yl(n,i){1&n&&(t.TgZ(0,"th",62),t._uU(1,"Expense"),t.qZA())}function Rl(n,i){1&n&&(t.TgZ(0,"th",63),t._uU(1,"Net Profit"),t.qZA())}function kl(n,i){1&n&&(t.TgZ(0,"th",64),t._uU(1," Target"),t.qZA())}function El(n,i){1&n&&(t.TgZ(0,"th",65),t._uU(1," Ach(%)"),t.qZA())}function Hl(n,i){if(1&n&&(t.TgZ(0,"td",68),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PrevIndex)}}const Vl=function(n,i){return{rankDown:n,rankUp:i,"number key":!0}};function Bl(n,i){if(1&n&&(t.TgZ(0,"td",69),t._uU(1),t.qZA()),2&n){const e=t.oxw(),o=e.$implicit,a=e.index;t.Q6J("ngClass",t.WLB(2,Vl,o.PrevIndex<a+1,o.PrevIndex>a+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function Gl(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Count,"1.0-0"))}}function jl(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Tax,"1.0-0"))}}const Wl=function(){return["/menu/Reports/Sales_Report/Standard/Summary"]},$l=function(n,i,e){return{EntityID:n,From:i,To:e}};function Kl(n,i){if(1&n&&(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&n){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(12,Wl))("queryParams",t.kEZ(13,$l,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 Xl(n,i){if(1&n&&(t.ynx(0),t._uU(1),t.ALo(2,"number"),t.BQk()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Increase,"1.0-0")," ")}}function zl(n,i){if(1&n&&t._uU(0),2&n){const e=t.oxw(2).$implicit;t.hij(" ",e.Increase," ")}}const j=function(n,i){return{"text-warning":n,"text-success":i,"text-right":!0}};function ts(n,i){if(1&n&&(t.TgZ(0,"td",71),t.YNc(1,Xl,3,4,"ng-container",72),t.YNc(2,zl,1,1,"ng-template",null,73,t.W1O),t.qZA()),2&n){const e=t.MAs(3),o=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(3,j,o.IsNegative,o.IsPositive)),t.xp6(1),t.Q6J("ngIf","-"!==o.Increase)("ngIfElse",e)}}function es(n,i){if(1&n&&(t.TgZ(0,"td",74),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Cost,"1.0-0")," ")}}const O=function(n,i){return{"text-danger":n,"text-success":i}};function ns(n,i){if(1&n&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 as(n,i){if(1&n&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 os(n,i){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,ns,3,8,"span",55),t.YNc(2,as,3,8,"span",55),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax)}}function rs(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Expense,"1.0-0"),"")}}function is(n,i){if(1&n&&(t.TgZ(0,"td",75),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.NetProfit,"1.0-0"),"")}}function ls(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.SalesTarget,"1.0-0"),"")}}function ss(n,i){if(1&n&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 ps(n,i){if(1&n&&(t.TgZ(0,"span",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 cs(n,i){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,ss,3,8,"span",55),t.YNc(2,ps,3,8,"span",55),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function _s(n,i){if(1&n&&(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,Hl,2,1,"td",66),t.YNc(6,Bl,2,5,"td",67),t.YNc(7,Gl,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,Kl,7,17,"td",43),t.YNc(20,ts,4,6,"td",55),t.YNc(21,es,3,4,"td",56),t.YNc(22,os,3,2,"td",43),t.YNc(23,rs,3,4,"td",43),t.ALo(24,"HideSumZero"),t.YNc(25,is,3,4,"td",57),t.YNc(26,ls,3,4,"td",43),t.ALo(27,"HideSumZero"),t.YNc(28,cs,3,2,"td",43),t.ALo(29,"HideSumZero"),t.ALo(30,"HideSumZero"),t.qZA()),2&n){const e=i.$implicit,o=i.index,a=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",a.isCompareData),t.xp6(1),t.Q6J("ngIf",a.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",!a.data.WithCategory&&t.xi3(18,26,a.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!a.data.WithCategory),t.xp6(1),t.Q6J("ngIf",a.isCompareData),t.xp6(1),t.Q6J("ngIf",a.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",a.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",a.pageData.IsExpense&&t.xi3(24,29,a.data.Data,"Expense")),t.xp6(2),t.Q6J("ngIf",a.pageData.IsExpense),t.xp6(1),t.Q6J("ngIf",t.xi3(27,32,a.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(29,35,a.data.Data,"AchievementWithTax")||t.xi3(30,38,a.data.Data,"Achievement"))}}function us(n,i){1&n&&t._UZ(0,"td",76)}function gs(n,i){1&n&&t._UZ(0,"td",76)}function ds(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 ms(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 Zs(n,i){if(1&n&&(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&n){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 hs(n,i){if(1&n&&(t.TgZ(0,"td",71),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(5,j,e.comparation<0,e.comparation>0)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.comparation,"1.0-0")," ")}}function xs(n,i){if(1&n&&(t.TgZ(0,"td",74),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 W=function(n,i){return{"text-success":n,"text-danger":i}};function Ts(n,i){if(1&n&&(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&n){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,W,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 Cs(n,i){if(1&n&&(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&n){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(14,W,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 fs(n,i){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,Ts,6,17,"span",55),t.YNc(2,Cs,6,17,"span",55),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax)}}function As(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 qs(n,i){if(1&n&&(t.TgZ(0,"td",75),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 Ds(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 ys(n,i){if(1&n&&(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&n){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 vs(n,i){if(1&n&&(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&n){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 Ss(n,i){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,ys,9,26,"span",55),t.YNc(2,vs,9,26,"span",55),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function Ms(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",33),t.TgZ(1,"table",34),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Il,2,0,"th",37),t.YNc(9,Ul,2,0,"th",37),t.YNc(10,wl,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,Fl,2,1,"th",42),t.ALo(18,"HideSumZero"),t.YNc(19,Nl,2,1,"th",42),t.YNc(20,Pl,2,0,"th",43),t.YNc(21,Ll,2,0,"th",44),t.YNc(22,Ql,2,1,"th",42),t.YNc(23,Yl,2,0,"th",45),t.ALo(24,"HideSumZero"),t.YNc(25,Rl,2,0,"th",46),t.YNc(26,kl,2,0,"th",47),t.ALo(27,"HideSumZero"),t.YNc(28,El,2,0,"th",48),t.ALo(29,"HideSumZero"),t.ALo(30,"HideSumZero"),t.qZA(),t.qZA(),t.TgZ(31,"tbody"),t.YNc(32,_s,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,us,1,0,"td",52),t.YNc(38,gs,1,0,"td",52),t.YNc(39,ds,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,ms,4,7,"td",43),t.ALo(53,"HideSumZero"),t.YNc(54,Zs,5,7,"td",54),t.YNc(55,hs,3,8,"td",55),t.YNc(56,xs,4,7,"td",56),t.YNc(57,fs,3,2,"td",43),t.YNc(58,As,4,7,"td",43),t.ALo(59,"HideSumZero"),t.YNc(60,qs,4,7,"td",57),t.YNc(61,Ds,4,7,"td",43),t.ALo(62,"HideSumZero"),t.YNc(63,Ss,3,2,"td",43),t.ALo(64,"HideSumZero"),t.ALo(65,"HideSumZero"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Os=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},Is=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]},ws=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]},Ns=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Graphic"]};let Ps=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/OutletPerformanceDetail","ReportLoader/OutletPerformance"),this.httpService=e,this.csvConverter=o,this.isCompareData=!1,this.hideMore=!0,this.DateFilterType=!1,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}];const a=new Date;this.Year=a.getFullYear(),this.Month=a.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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Count":return this.compare(a.Count,r.Count,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Gross":return this.compare(a.Gross,r.Gross,l);case"SalesNet":case"SalesTaxNet":return this.compare(a.SalesNet,r.SalesNet,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"SalesWithTax":return this.compare(a.SalesWithTax,r.SalesWithTax,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(a.ProfitWithTax,r.ProfitWithTax,l);case"Expense":return this.compare(a.Expense,r.Expense,l);case"NetProfit":return this.compare(a.NetProfit,r.NetProfit,l);case"Target":case"SalesTarget":return this.compare(a.SalesTarget,r.SalesTarget,l);case"Achievement":return this.compare(a.Achievement,r.Achievement,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-detail-outlet-performance"]],features:[t.qOj],decls:26,vars:14,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],["title","Chart View",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Compare",3,"model","modelChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],["id","more-filter","container",""],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"freeze","header"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Count","class","align-right",4,"ngIf"],["mat-sort-header","Quantity",1,"align-right"],["mat-sort-header","Gross",1,"align-right"],["mat-sort-header","SalesNet",1,"align-right"],["class","align-right",3,"mat-sort-header",4,"ngIf"],["class","text-right",4,"ngIf"],["mat-sort-header","Cost","class","align-right",4,"ngIf"],["mat-sort-header","Expense","class","align-right",4,"ngIf"],["mat-sort-header","NetProfit","class","align-right",4,"ngIf"],["mat-sort-header","Target","class","align-right",4,"ngIf"],["mat-sort-header","Achievement","class","align-right","title","Achievement",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"freeze","body"],["class","empty-column",4,"ngIf"],[1,"text-right"],["class","text-right text-primary",4,"ngIf"],[3,"ngClass",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[2,"width","35px"],["mat-sort-header","Count",1,"align-right"],[1,"align-right",3,"mat-sort-header"],["mat-sort-header","Cost",1,"align-right"],["mat-sort-header","Expense",1,"align-right"],["mat-sort-header","NetProfit",1,"align-right"],["mat-sort-header","Target",1,"align-right"],["mat-sort-header","Achievement","title","Achievement",1,"align-right"],["style","width: 35px; text-align: center",4,"ngIf"],["style","width: 35px; text-align: center",3,"ngClass",4,"ngIf"],[2,"width","35px","text-align","center"],[2,"width","35px","text-align","center",3,"ngClass"],[3,"routerLink","queryParams"],[3,"ngClass"],[4,"ngIf","ngIfElse"],["INCREASE",""],[1,"text-right","text-danger"],[1,"text-right","text-success"],[1,"empty-column"],[1,"text-right","text-primary"],[1,"font-weight-bold"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,yl,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,Ol,17,9,"div",10),t.YNc(20,Jl,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,Ms,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,Os)),t.xp6(5),t.Q6J("routerLink",t.DdM(11,Is)),t.xp6(3),t.Q6J("routerLink",t.DdM(12,ws)),t.xp6(3),t.Q6J("routerLink",t.DdM(13,Ns)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,q.P,f.QB,m.YE,m.nU,s.sg,s.mk],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:[""]}),n})();function Ls(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/OutletGroupPerformance","Sales Transaction ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function Qs(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",18),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 Ys(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Year=a})("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(a){return t.CHM(e),t.oxw(2).Month=a})("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&n){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 Rs(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).isCompareData=a})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare()}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.isCompareData)}}function ks(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().DateFilterType=a}),t.qZA(),t.qZA(),t.YNc(5,Qs,5,2,"div",15),t.YNc(6,Ys,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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.YNc(11,Rs,4,1,"div",15),t.qZA()}if(2&n){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 Es(n,i){1&n&&(t.TgZ(0,"th",48),t._uU(1,"Prev"),t.qZA())}function Hs(n,i){1&n&&(t.TgZ(0,"th",48),t._uU(1,"Now"),t.qZA())}function Vs(n,i){1&n&&(t.TgZ(0,"th",49),t._uU(1," \xb1 (%) "),t.qZA())}function Bs(n,i){1&n&&(t.TgZ(0,"th",50),t._uU(1," Cost "),t.qZA())}function Gs(n,i){if(1&n&&(t.TgZ(0,"th",34),t._uU(1,"Profit "),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"ProfitWithTax":"Profit")}}function js(n,i){if(1&n&&(t.TgZ(0,"td",48),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.PrevIndex," ")}}const Ws=function(n,i){return{rankDown:n,rankUp:i,"number key":!0}};function $s(n,i){if(1&n&&(t.TgZ(0,"td",53),t._uU(1),t.qZA()),2&n){const e=t.oxw(),o=e.$implicit,a=e.index;t.Q6J("ngClass",t.WLB(2,Ws,o.PrevIndex<a+1,o.PrevIndex>a+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}const K=function(n,i){return{"text-danger":n,"text-success":i,"text-right":!0}};function Ks(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(5,K,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0")," ")}}function Xs(n,i){if(1&n&&(t.TgZ(0,"td",55),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Cost,".0-0")," ")}}function zs(n,i){if(1&n&&(t.TgZ(0,"td",56),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 tp(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,js,2,1,"td",28),t.YNc(2,$s,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,Ks,3,8,"td",45),t.YNc(24,Xs,3,4,"td",46),t.YNc(25,zs,3,4,"td",47),t.qZA()),2&n){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 ep(n,i){1&n&&t._UZ(0,"td",42)}function np(n,i){1&n&&t._UZ(0,"td",42)}function ap(n,i){if(1&n&&(t.TgZ(0,"td",54),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(5,K,e.comparation,e.comparation)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.comparation,".0-0")," ")}}function op(n,i){if(1&n&&(t.TgZ(0,"td",55),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data,"Cost"),".0-0")," ")}}function rp(n,i){if(1&n&&(t.TgZ(0,"td",56),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,t.xi3(3,4,e.data,"ProfitWithTax"),".0-0")," ")}}function ip(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",25),t.TgZ(1,"table",26),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(2,"thead",27),t.TgZ(3,"tr"),t.YNc(4,Es,2,0,"th",28),t.YNc(5,Hs,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,Vs,2,0,"th",36),t.YNc(21,Bs,2,0,"th",37),t.YNc(22,Gs,2,1,"th",38),t.qZA(),t.qZA(),t.TgZ(23,"tbody"),t.YNc(24,tp,26,30,"tr",39),t.qZA(),t.TgZ(25,"tfoot"),t.TgZ(26,"tr",40),t.YNc(27,ep,1,0,"td",41),t.YNc(28,np,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,ap,3,8,"td",45),t.YNc(56,op,4,7,"td",46),t.YNc(57,rp,4,7,"td",47),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 sp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},cp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance"]};let _p=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/OutletGroupPerformance","ReportLoader/OutletPerformance"),this.httpService=e,this.csvConverter=o,this.isCompareData=!1,this.DateFilterType=!0,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.first=!0,this.RadioDateFilterType=[{Key:!0,Value:"Predefined"},{Key:!1,Value:"Range"}];const a=new Date;this.Year=a.getFullYear(),this.Month=a.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((a,r)=>{const l="asc"===e.direction;switch(a.Name=a.Name?a.Name:"",r.Name=r.Name?r.Name:"",e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Count":return this.compare(a.Count,r.Count,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Gross":return this.compare(a.Gross,r.Gross,l);case"SalesNet":return this.compare(a.SalesNet,r.SalesNet,l);case"SalesWithTax":return this.compare(a.SalesWithTax,r.SalesWithTax,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"SalesTaxNet":return this.compare(a.SalesTaxNet,r.SalesTaxNet,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(a.ProfitWithTax,r.ProfitWithTax,l);default:return 0}}):this.data.Data=o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-outlet-group-performance"]],features:[t.qOj],decls:16,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],["name","Compare",3,"model","modelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Name"],["mat-sort-header","Count",1,"align-right",2,"width","70px"],["mat-sort-header","Quantity",1,"align-right",2,"width","70px"],["mat-sort-header","Gross",1,"align-right",2,"width","120px"],["mat-sort-header","SalesNet",1,"align-right",2,"width","120px"],[1,"align-right",2,"width","120px",3,"mat-sort-header"],["mat-sort-header","SalesWithTax","altprop","SalesNet",1,"align-right",2,"width","120px",3,"altpropcond"],["style","width: 50px;",4,"ngIf"],["mat-sort-header","Cost","style","width: 120px;","class","align-right",4,"ngIf"],["style","width: 120px;","class","align-right",3,"mat-sort-header",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","empty-column",4,"ngIf"],[1,"empty-column"],[1,"text-right"],[1,"text-right","text-primary"],[3,"ngClass",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[2,"width","35px"],[2,"width","50px"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["style","width: 35px;",3,"ngClass",4,"ngIf"],[1,"text-right",2,"width","70px"],[2,"width","35px",3,"ngClass"],[3,"ngClass"],[1,"text-right","text-danger"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ls,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,ks,12,7,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,ip,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,sp)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,cp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,q.P,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ,T.qU],styles:[""]}),n})();function up(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!0,"Monthly Outlet PErformance ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",12),t._uU(2,"Export"),t.qZA()}}function gp(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 dp=function(n){return{"align-right":n}};function mp(n,i){if(1&n&&(t.TgZ(0,"th",22),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.Q6J("mat-sort-header",e)("ngClass",t.VKq(3,dp,"Outlet"!=e)),t.xp6(1),t.Oqu(e)}}function Zp(n,i){if(1&n&&(t.TgZ(0,"div",25),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function hp(n,i){if(1&n&&(t.TgZ(0,"div",26),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,o[e])," ")}}function xp(n,i){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,Zp,2,1,"div",23),t.YNc(2,hp,3,3,"div",24),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Q6J("ngIf","Outlet"==e),t.xp6(1),t.Q6J("ngIf","Outlet"!=e)}}function Tp(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,xp,3,2,"td",20),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKeys(e))}}function Cp(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e))}}function fp(n,i){if(1&n&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",27),t.TgZ(2,"td",28),t._uU(3,"Total : "),t.qZA(),t.YNc(4,Cp,3,3,"td",29),t.qZA(),t.qZA()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.DataFooter)}}function Ap(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(2,"thead",18),t.TgZ(3,"tr"),t.YNc(4,mp,2,5,"th",19),t.qZA(),t.qZA(),t.TgZ(5,"tbody"),t.YNc(6,Tp,2,1,"tr",20),t.qZA(),t.YNc(7,fp,5,1,"tfoot",21),t.qZA(),t.qZA()}if(2&n){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 Dp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance"]},vp=function(){return["/menu/Reports/Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance"]};let Sp=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/MonthlyOutletPerformance","ReportLoader/MonthlyReportSales"),this.httpService=e,this.csvConverter=o,this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0)}getKeys(e){return Object.keys(e)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;for(let h=0;h<this.data.Dataheader.length;h++)if(e.active==this.data.Dataheader[h])return this.compare(a[this.data.Dataheader[h]],r[this.data.Dataheader[h]],l)}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-outlet-monthly-performance"]],features:[t.qOj],decls:16,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"table-light","sticky-top-thead"],[3,"mat-sort-header","ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"mat-sort-header","ngClass"],["style","color: black",4,"ngIf"],["style","color: black;text-align:right",4,"ngIf"],[2,"color","black"],[2,"color","black","text-align","right"],[1,"table-footer"],[1,""],["class","text-right",4,"ngFor","ngForOf"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,up,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,gp,13,6,"div",9),t.qZA(),t.qZA(),t.TgZ(14,"content"),t.YNc(15,Ap,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,Dp)),t.xp6(5),t.Q6J("routerLink",t.DdM(8,vp)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,m.YE,s.sg,m.nU,s.mk],pipes:[s.JJ],styles:[""]}),n})();function Mp(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/SalesPerson","Sales_Performance.csv")}),t._UZ(1,"i",8),t._uU(2,"Export"),t.qZA()}}function bp(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesGroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",13),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.DeliveryID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Op(n,i){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Sales Group"),t.qZA())}function Jp(n,i){1&n&&(t.TgZ(0,"th",40),t._uU(1," Cost "),t.qZA())}function Ip(n,i){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Profit "),t.qZA())}function Up(n,i){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Target "),t.qZA())}function wp(n,i){1&n&&(t.TgZ(0,"th",43),t._uU(1,"Ach(%) "),t.qZA())}function Fp(n,i){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Group)}}function Np(n,i){if(1&n&&(t.TgZ(0,"td",46),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Cost))}}function Pp(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.lcZ(2,1,e.Profit)," ")}}function Lp(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Target)," ")}}function Qp(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Achievement),"")}}const Yp=function(){return["/menu/Contacts/Contact/Sales_Person/Info"]},Rp=function(n){return{ID:n}},kp=function(){return["/menu/Reports/Sales_Report/Standard/Detail"]},Ep=function(n,i,e){return{SalesPersonID:n,From:i,To:e}};function Hp(n,i){if(1&n&&(t.TgZ(0,"tr"),t.TgZ(1,"td",44),t.TgZ(2,"a",45),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Fp,2,1,"td",33),t.TgZ(5,"td",35),t.TgZ(6,"a",45),t.ALo(7,"date"),t.ALo(8,"date"),t._uU(9),t.ALo(10,"number"),t.qZA(),t.qZA(),t.TgZ(11,"td",36),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",36),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"td",36),t._uU(18),t.ALo(19,"number"),t.qZA(),t.TgZ(20,"td",35),t._uU(21),t.ALo(22,"number"),t.qZA(),t.YNc(23,Np,3,3,"td",37),t.YNc(24,Pp,3,3,"td",38),t.YNc(25,Lp,3,3,"td",38),t.YNc(26,Qp,3,3,"td",38),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(36,Yp))("queryParams",t.VKq(37,Rp,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",o.data.Show),t.xp6(2),t.Q6J("routerLink",t.DdM(39,kp))("queryParams",t.kEZ(40,Ep,e.ID,t.xi3(7,15,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(8,18,o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(3),t.Oqu(t.xi3(10,21,e.Orders,".0-0")),t.xp6(3),t.Oqu(t.xi3(13,24,e.Quantity,".0-0")),t.xp6(3),t.Oqu(t.xi3(16,27,e.Sales,".0-0")),t.xp6(3),t.Oqu(t.xi3(19,30,e.Tax,".0-0")),t.xp6(3),t.Oqu(t.xi3(22,33,e.SalesNTax,".0-0")),t.xp6(2),t.Q6J("ngIf",o.pageData.HasRoleCost),t.xp6(1),t.Q6J("ngIf",o.pageData.HasRoleProfit),t.xp6(1),t.Q6J("ngIf",o.data.ShowSalesTarget),t.xp6(1),t.Q6J("ngIf",o.data.ShowSalesTarget)}}function Vp(n,i){1&n&&t._UZ(0,"td")}function Bp(n,i){if(1&n&&(t.TgZ(0,"td",46),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Cost")),"")}}function Gp(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Profit")),"")}}function jp(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Target")),"")}}function Wp(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.ALo(4,"sum"),t.qZA()),2&n){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 $p(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Op,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,Jp,2,0,"th",27),t.YNc(18,Ip,2,0,"th",28),t.YNc(19,Up,2,0,"th",29),t.YNc(20,wp,2,0,"th",30),t.qZA(),t.qZA(),t.TgZ(21,"tbody"),t.YNc(22,Hp,27,44,"tr",31),t.qZA(),t.TgZ(23,"tfoot"),t.TgZ(24,"tr",32),t.YNc(25,Vp,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,Bp,4,6,"td",37),t.YNc(49,Gp,4,6,"td",38),t.YNc(50,jp,4,6,"td",38),t.YNc(51,Wp,5,9,"td",38),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Xp=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report"]},tc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Sales_Commission"]};let ec=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/SalesPerson","ReportLoader/SalesPerson"),this.httpService=e,this.csvConverter=o}postInit(){this.menuData.H=this.data.PageTitle}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(a.Name=null==a.Name?"":a.Name,r.Name=null==r.Name?"":r.Name,a.Group=null==a.Group?"":a.Group,r.Group=null==r.Group?"":r.Group,e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Group":return this.compare(a.Group.toLocaleLowerCase(),r.Group.toLocaleLowerCase(),l);case"Orders":return this.compare(a.Orders,r.Orders,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"SalesNTax":return this.compare(a.SalesNTax,r.SalesNTax,l);case"Target":return this.compare(a.Target,r.Target,l);case"Achievement":return this.compare(a.Achievement,r.Achievement,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-sales-person"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["role","button","title","Target",1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["role","button","title","Target",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales Group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","Name"],["mat-sort-header","Group",4,"ngIf"],["mat-sort-header","Orders",1,"align-right",2,"width","80px"],["mat-sort-header","Quantity",1,"align-right",2,"width","100px"],["mat-sort-header","Sales",1,"align-right",2,"width","120px"],["mat-sort-header","Tax",1,"align-right",2,"width","90px"],["mat-sort-header","SalesNTax",1,"align-right",2,"width","120px"],["mat-sort-header","Cost","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","Profit","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","Target","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","Achievement","style","width: 120px;","class","align-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[4,"ngIf"],[1,"empty-column","text-right"],[1,"text-right","text-primary"],[1,"text-right"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],["mat-sort-header","Group"],["mat-sort-header","Cost",1,"align-right",2,"width","120px"],["mat-sort-header","Profit",1,"align-right",2,"width","120px"],["mat-sort-header","Target",1,"align-right",2,"width","120px"],["mat-sort-header","Achievement",1,"align-right",2,"width","120px"],[1,"text-primary"],[3,"routerLink","queryParams"],[1,"text-right","text-danger"],[1,"text-right","text-success"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Mp,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,bp,22,11,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,$p,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,Xp)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,tc)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function nc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/GetSalesPersonCommissionGroupBySales","Sales_Commission.csv")}),t._UZ(1,"i",8),t._uU(2,"Export"),t.qZA()}}function ac(n,i){if(1&n&&(t.TgZ(0,"span",16),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function oc(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,ac,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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesGroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(18,"datepicker",15),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 rc(n,i){1&n&&(t.TgZ(0,"th",31),t._uU(1,"Sales Target"),t.qZA())}function ic(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.SalesTarget,".0-0"),"")}}const lc=function(n,i,e){return{ID:n,from:i,to:e}},X="/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report",sc=function(n){return[X,n]};function pc(n,i){if(1&n&&(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,ic,3,4,"td",33),t.ALo(19,"sum"),t.qZA()),2&n){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,sc,t.kEZ(27,lc,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 cc(n,i){1&n&&t._UZ(0,"td",34)}function _c(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",17),t.TgZ(1,"table",18),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,rc,2,0,"th",25),t.ALo(15,"sum"),t.qZA(),t.qZA(),t.TgZ(16,"tbody"),t.YNc(17,pc,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,cc,1,0,"td",30),t.ALo(39,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 uc=function(){return[X]},gc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person"]};let dc=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetSalesPersonCommissionGroupBySales","ReportLoader/SalesPerson"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"TotalOrders":return this.compare(a.TotalOrders,r.TotalOrders,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"GrossRevenue":return this.compare(a.GrossRevenue,r.GrossRevenue,l);case"TotalCommission":return this.compare(a.TotalCommission,r.TotalCommission,l);case"SalesTarget":return this.compare(a.SalesTarget,r.SalesTarget,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-sales-commision"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],["role","button","title","Target",1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["role","button","title","Target",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name","text","Sales Person"],["mat-sort-header","TotalOrders",1,"align-right",2,"width","110px"],["mat-sort-header","Quantity",1,"align-right",2,"width","110px"],["mat-sort-header","GrossRevenue",1,"align-right",2,"width","150px"],["mat-sort-header","TotalCommission",1,"align-right",2,"width","150px"],["mat-sort-header","SalesTarget","style","width: 150px;","class","align-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column","text-right"],[1,"text-right"],["class","empty-column",4,"ngIf"],["mat-sort-header","SalesTarget",1,"align-right",2,"width","150px"],[3,"routerLink"],["class","text-right",4,"ngIf"],[1,"empty-column"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,nc,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,oc,19,9,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,_c,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,uc)),t.xp6(2),t.Q6J("routerLink",t.DdM(8,gc)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,c.ir,f.QB,m.YE,m.nU,s.sg],pipes:[T.qU,s.JJ,s.uU],styles:[""]}),n})();function mc(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.ID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",15),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Zc=function(){return["/menu/Products/Catalog/Variants/Info"]},z=function(n){return{ID:n}};function hc(n,i){if(1&n&&(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&n){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(22,Zc))("queryParams",t.VKq(23,z,e.VariantID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.hij(" ",t.lcZ(8,10,e.Quantity),""),t.xp6(3),t.hij(" ",t.lcZ(11,12,e.VariantCommission),""),t.xp6(3),t.hij(" ",t.lcZ(14,14,e.GroupCommission),""),t.xp6(3),t.hij(" ",t.lcZ(17,16,e.TotalCommission),""),t.xp6(3),t.hij(" ",t.lcZ(20,18,e.UnitPrice*e.Quantity),""),t.xp6(3),t.hij(" ",t.lcZ(23,20,e.NettSales)," ")}}const xc=function(){return["/menu/Contacts/Contact/Sales_Person/Info"]};function Tc(n,i){if(1&n&&(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,hc,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&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(41,xc))("queryParams",t.VKq(42,z,e.ID)),t.xp6(2),t.Oqu(e.Name),t.xp6(3),t.Oqu(e.GroupName),t.xp6(6),t.Q6J("ngForOf",e.Item),t.xp6(6),t.hij(" ",t.lcZ(20,9,t.xi3(21,11,o.filterData(t.xi3(22,14,o.data.Data,"Item"),"SalesID",e.ID),"Quantity"))," "),t.xp6(6),t.hij(" ",t.lcZ(26,17,t.xi3(27,19,o.filterData(t.xi3(28,22,o.data.Data,"Item"),"SalesID",e.ID),"TotalCommission"))," "),t.xp6(5),t.hij(" ",t.lcZ(31,25,t.xi3(32,27,o.filterData(t.xi3(33,30,o.data.Data,"Item"),"SalesID",e.ID),"Revenue"))," "),t.xp6(5),t.hij(" ",t.lcZ(36,33,t.xi3(37,35,o.filterData(t.xi3(38,38,o.data.Data,"Item"),"SalesID",e.ID),"NettSales"))," ")}}function Cc(n,i){if(1&n&&(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,Tc,39,44,"div",27),t.qZA()),2&n){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"]},Dc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report/Commission_Report_Detail"]},yc=function(n,i){return{From:n,To:i}};let vc=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/GetSalesPersonCommissionGroupByProduct","ReportLoader/SalesCommissionLoader",null,a),this.httpService=e,this.csvConverter=o,this.activatedRoute=a}print(){window.print()}filterData(e,o,a){return e.filter(function(r){return r[o]==a})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-commision-report"]],features:[t.qOj],decls:20,vars:18,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"btn-group","mr-6"],[1,"pointer","btn","btn-outline-secondary",3,"click"],[1,"fa","fa-print"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["role","button","title","Sales Person Commission Summary",1,"btn","btn-outline-secondary","mr-6",3,"routerLink"],["role","button","title","Sales Person Statistics",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales Person",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"columnSpan"],["colspan","3",1,"empty-column"],["colspan","2",1,"text-center"],[2,"width","140px"],[1,"text-right",2,"width","100px"],[1,"text-right",2,"width","120px"],[1,"text-right",2,"width","150px"],[1,"text-right",2,"width","130px"],[4,"ngFor","ngForOf"],[1,"mt-11","ml-3"],[1,"h5","font-weight-bold","text-primary",3,"routerLink","queryParams"],[1,"items"],[1,"table-sm","border","w-100"],[1,"table-footer"],["colspan","2",1,"text-right","empty-column"],[1,"text-right","text-success"],["colspan","2",1,"text-right","text-success","empty-column"],[1,"border"],[3,"routerLink","queryParams"],[1,"border",2,"width","140px"],[1,"text-right","text-success","border",2,"width","100px"],[1,"text-right","text-success","border",2,"width","120px"],[1,"text-right","text-success","border",2,"width","150px"],[1,"text-right","text-success","border",2,"width","130px"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"div",1),t.TgZ(3,"a",2),t.NdJ("click",function(){return o.print()}),t._UZ(4,"i",3),t._uU(5," Print"),t.qZA(),t.TgZ(6,"a",4),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/SalesPersonGroupByProduct","Sales_Commission_byProduct.csv")}),t._UZ(7,"i",5),t._uU(8,"Export"),t.qZA(),t.qZA(),t.TgZ(9,"a",6),t._uU(10,"Return to Summary"),t.qZA(),t.TgZ(11,"a",7),t.ALo(12,"date"),t.ALo(13,"date"),t._uU(14,"View Detail"),t.qZA(),t.qZA(),t.TgZ(15,"filters"),t.TgZ(16,"div",8),t.YNc(17,mc,14,7,"div",9),t.qZA(),t.qZA(),t.TgZ(18,"content"),t.YNc(19,Cc,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,Dc))("queryParams",t.WLB(15,yc,t.xi3(12,7,null==o.pageData.Filter?null:o.pageData.Filter.From,"ddMMyyyy"),t.xi3(13,10,null==o.pageData.Filter?null:o.pageData.Filter.To,"ddMMyyyy"))),t.xp6(6),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.uU,s.JJ,T.qU,T.J1],styles:[""]}),n})();function Sc(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Mc(n,i){if(1&n&&(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&n){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 bc(n,i){if(1&n&&(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,Mc,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&n){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 Jc=function(){return["/menu/Reports/Sales_Report/Standard/Sales_Person/Commission_Report"]},Ic=function(n){return{ID:n}};let Uc=(()=>{class n extends d.n{constructor(e,o,a,r){super(e,"Report/GetSalesPersonCommissionDetail","ReportLoader/SalesCommissionDetailLoader",null,r),this.httpService=e,this.csvConverter=o,this.datePipe=a,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(a=>null!=o[a]&&o[a].toString().toLowerCase().includes(e.toLowerCase())))}getID(){return this.pageData.Filter.ID?this.pageData.Filter.ID:C.gT.GuidEmpty}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(s.uU),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-commision-report-detail"]],features:[t.qOj],decls:12,vars:9,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales Person",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","120px"],[1,"text-right",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[1,"text-right"],[1,"text-right","text-success"],[3,"href"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()})("textChange",function(r){return o.getFilterData(r)}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetSalesPersonCommissionDetail",o.data.SalesName?o.data.SalesName:"_Commission_Detail_"+o.transformDate(o.pageData.Filter.From,"dd_MMM")+"-"+o.transformDate(o.pageData.Filter.To,"dd_MMM")+".csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Back"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Sc,10,4,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,bc,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,Jc))("queryParams",t.VKq(7,Ic,o.getID())),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function wc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/GetNonStandardPrice","Non-Standard Price.csv")}),t._UZ(1,"i",7),t._uU(2,"Export"),t.qZA()}}function Fc(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.VariantID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",12),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.PriceTypeID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Note=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Nc(n,i){1&n&&(t.TgZ(0,"th",23),t._uU(1,"Original Cost"),t.qZA())}function Pc(n,i){1&n&&(t.TgZ(0,"th",23),t._uU(1,"Cost"),t.qZA())}function Lc(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.VariantUnitCost))}}function Qc(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}const Yc=function(){return["/menu/Products/Catalog/Variants/Info"]},Rc=function(n){return{ID:n}};function kc(n,i){if(1&n&&(t.TgZ(0,"tr",26),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t.TgZ(4,"a",27),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t.TgZ(9,"a",28),t._uU(10),t.qZA(),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.YNc(14,Lc,3,3,"td",29),t.YNc(15,Qc,3,3,"td",29),t.TgZ(16,"td",30),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"td",30),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"td"),t._UZ(23,"i",31),t.qZA(),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Q6J("routerLink",t.DdM(20,Yc))("queryParams",t.VKq(21,Rc,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.MGl("href","/A/Orders/Orders/Customer_Invoice/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(13,13,e.Created,"dd MMM yyyy")),t.xp6(2),t.Q6J("ngIf",o.pageData.HasCostRole),t.xp6(1),t.Q6J("ngIf",o.pageData.HasCostRole),t.xp6(2),t.Oqu(t.lcZ(18,16,e.VariantUnitPrice)),t.xp6(3),t.Oqu(t.lcZ(21,18,e.UnitPrice)),t.xp6(3),t.Q6J("innerHtml",e.Note,t.oJD)}}function Ec(n,i){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-paginator",32),t.NdJ("page",function(a){return t.CHM(e),t.oxw(2).onPaginationChange(a)}),t.qZA(),t.BQk()}if(2&n){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 Hc(n,i){if(1&n&&(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,Nc,2,0,"th",22),t.YNc(15,Pc,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,kc,24,23,"tr",24),t.qZA(),t.qZA(),t.YNc(24,Ec,2,3,"ng-container",25),t.qZA()),2&n){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 Bc=function(){return["/menu/Reports/Sales_Report/Standard/Discounted_Sales"]};let Gc=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetNonStandardPrice","ReportLoader/NonStandardPrice"),this.httpService=e,this.csvConverter=o,this.PriceType=[{Key:0,Value:"All"},{Key:1,Value:"Edited"}],this.sourcedata=[]}postInit(){this.sourcedata=this.data.Data}getFilterData(e){this.data.Data=this.sourcedata.filter(o=>Object.keys(o).some(a=>null!=o[a]&&o[a].toString().toLowerCase().includes(e.toLowerCase())))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-non-standard-price"]],features:[t.qOj],decls:10,vars:7,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","PriceType",3,"model","options","modelChange"],["type","text",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","90px"],[2,"width","150px"],[2,"width","75px"],[2,"width","100px"],["class","text-right","style","width: 100px",4,"ngIf"],[1,"text-right",2,"width","100px"],["class","border-bottom",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],["class","text-right",4,"ngIf"],[1,"text-right"],[2,"word-break","break-all",3,"innerHtml"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("textChange",function(r){return o.getFilterData(r)})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,wc,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,Fc,22,8,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Hc,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,Bc)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,D.J,f.QB,q.P,p.Fj,s.sg,L.NW],pipes:[s.uU,s.JJ],styles:[""]}),n})();function jc(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",25),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/ReportPurchaseDetail","Purchase Transaction.csv")}),t._UZ(1,"i",26),t._uU(2,"Export"),t.qZA()}}function Wc(n,i){if(1&n&&(t.TgZ(0,"th",27),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" UnitPrice(",e.data.Symbol,")")}}function $c(n,i){if(1&n&&(t.TgZ(0,"th",28),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" Total(",e.data.Symbol,")")}}function Kc(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1," /"),t.qZA())}function Xc(n,i){if(1&n&&(t.TgZ(0,"a",31),t.TgZ(1,"span",42),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.POID,"",t.LSH),t.xp6(2),t.Oqu("#"+e.PONumber)}}function zc(n,i){if(1&n&&(t.TgZ(0,"th",49),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,null==e?null:e.UnitPrice))}}function t_(n,i){if(1&n&&(t.TgZ(0,"th",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.Total)," ")}}function e_(n,i){if(1&n&&(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,zc,3,3,"th",46),t.TgZ(11,"th",47),t._uU(12),t.qZA(),t.YNc(13,t_,3,3,"th",48),t.qZA()),2&n){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 n_(n,i){if(1&n&&(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&n){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 a_(n,i){if(1&n&&(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,Kc,2,0,"span",33),t.YNc(7,Xc,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,e_,14,9,"tr",23),t.qZA(),t.YNc(24,n_,15,7,"tfoot",41),t.qZA(),t.qZA()),2&n){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 o_(n,i){if(1&n&&(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&n){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 r_(n,i){if(1&n&&(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&n){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 i_(n,i){if(1&n&&(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,o_,10,8,"div",33),t.YNc(53,r_,12,8,"div",33),t.qZA(),t.qZA()),2&n){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 l_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,jc,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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(22,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.IsDesc=a}),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,Wc,2,1,"th",19),t.TgZ(45,"th",20),t._uU(46,"%"),t.qZA(),t.YNc(47,$c,2,1,"th",21),t.qZA(),t.qZA(),t.TgZ(48,"tbody"),t.TgZ(49,"tr"),t.TgZ(50,"td",22),t.YNc(51,a_,25,20,"div",23),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(52,i_,54,34,"div",24),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 s_=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetPurchaseTransactionDetail","ReportLoader/GetPurchaseTransactionDetail"),this.httpService=e,this.csvConverter=o,this.AscDscRadio=[{Key:!1,Value:"Asc"},{Key:!0,Value:"Desc"}]}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,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,l_,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,D.J,f.QB,q.P,s.sg],pipes:[s.uU,T.qU,s.JJ],styles:[""]}),n})();function p_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/ReportPurchaseSummary","Purchase Summary.csv")}),t._UZ(1,"i",32),t._uU(2,"Export"),t.qZA()}}function c_(n,i){1&n&&t._UZ(0,"br")}function __(n,i){if(1&n&&(t.TgZ(0,"a",33),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.SupplierPOID,"",t.LSH),t.xp6(1),t.Oqu(e.PONumber)}}function u_(n,i){if(1&n&&(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,c_,1,0,"br",34),t.YNc(7,__,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&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.ID,"",t.LSH),t.xp6(1),t.hij(" >",e.Number,""),t.xp6(1),t.Q6J("ngIf",o.pageData.DualNumber),t.xp6(1),t.Q6J("ngIf",o.pageData.DualNumber),t.xp6(2),t.Oqu(t.xi3(10,13,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.SupplierNameDisplay),t.xp6(2),t.Oqu(t.lcZ(15,16,e.TotalItemQuantity)),t.xp6(3),t.Oqu(t.lcZ(18,18,e.Sales)),t.xp6(3),t.Oqu(t.lcZ(21,20,e.Tax)),t.xp6(3),t.Oqu(t.lcZ(24,22,e.TotalAmount)),t.xp6(3),t.Oqu(t.lcZ(27,24,e.PaymentAmount)),t.xp6(3),t.Oqu(e.PaymentStateLabel)}}function g_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Number=a})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,p_,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",3),t.TgZ(5,"div",4),t.TgZ(6,"div"),t.TgZ(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(14,"datepicker",7),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.StateID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),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(a){return t.CHM(e),t.oxw().sortData(a)}),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,u_,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&n){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 d_=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/ReportPurchaseSummary","ReportLoader/GetReportPurchaseSummary",null,a),this.httpService=e,this.csvConverter=o,this.url=a}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((a,r)=>{const l="asc"===e.direction;switch(a.EntityName=null==a.EntityName?"":a.EntityName,r.EntityName=null==r.EntityName?"":r.EntityName,a.SupplierNameDisplay=null==a.SupplierNameDisplay?"":a.SupplierNameDisplay,r.SupplierNameDisplay=null==r.SupplierNameDisplay?"":r.SupplierNameDisplay,e.active){case"EntityName":return this.compare(a.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"Number":return this.compare(a.Number,r.Number,l);case"Date":return this.compare(a.Date,r.Date,l);case"SupplierNameDisplay":return this.compare(a.SupplierNameDisplay.toLocaleLowerCase(),r.SupplierNameDisplay.toLocaleLowerCase(),l);case"TotalItemQuantity":return this.compare(a.TotalItemQuantity,r.TotalItemQuantity,l);case"Total":return this.compare(a.TotalAmount,r.TotalAmount,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"PaymentAmount":return this.compare(a.PaymentAmount,r.PaymentAmount,l);case"PaymentState":return this.compare(a.PaymentStateLabel,r.PaymentStateLabel,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,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,g_,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,D.J,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function m_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/TopPurchaseExport","Top_Supplier.csv")}),t._UZ(1,"i",24),t._uU(2,"Export"),t.qZA()}}const Z_=function(){return["/menu/Contacts/Contact/Suppliers/Info"]},h_=function(n){return{ID:n}},x_=function(n,i,e){return{SupplierID:n,From:i,To:e}},T_=function(){return["/menu/Reports/Purchases_Report/Summary"]};function C_(n,i){if(1&n&&(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&n){const e=i.$implicit,o=i.index,a=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Q6J("routerLink",t.DdM(19,Z_))("queryParams",t.VKq(20,h_,e.SupplierID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(10,9,e.Quantity)),t.xp6(3),t.Q6J("queryParams",t.kEZ(22,x_,e.SupplierID,t.xi3(13,11,a.pageData.Filter.From,"ddMMyyyy"),t.xi3(14,14,a.pageData.Filter.To,"ddMMyyyy")))("routerLink",t.DdM(26,T_)),t.xp6(3),t.Oqu(t.lcZ(16,17,e.Total))}}function f_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,m_,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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(18,"datepicker",8),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),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(a){return t.CHM(e),t.oxw().sortData(a)}),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,C_,17,27,"tr",18),t.qZA(),t.TgZ(40,"tfoot"),t.TgZ(41,"tr",19),t._UZ(42,"th",20),t.TgZ(43,"th",21),t._uU(44,"Total Quantity"),t.qZA(),t.TgZ(45,"th",21),t._uU(46,"Total Purchase"),t.qZA(),t.qZA(),t.TgZ(47,"tr"),t._UZ(48,"td",22),t.TgZ(49,"td",21),t._uU(50),t.qZA(),t.TgZ(51,"td",21),t._uU(52),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 A_=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/TopSupplier","ReportLoader/TopSupplierLoader"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Code":return this.compare(a.Code,r.Code,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Total":return this.compare(a.Total,r.Total,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-top-supplier"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a Group",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","35px"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","80px"],["mat-sort-header","Quantity",1,"align-right",2,"width","120px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"thead-light"],["colspan","3",1,"bg-white","border-bottom-0"],[1,"text-right"],["colspan","3",1,"bg-white","border-top-0"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"border-bottom"],[1,"text-left"],[3,"routerLink","queryParams"],[1,"text-right","text-success"],[3,"queryParams","routerLink"]],template:function(e,o){1&e&&t.YNc(0,f_,53,14,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg,g.yS],pipes:[s.JJ,s.uU],styles:[""]}),n})();function q_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/PurchasesByProductExport","Purchases_By_Product.csv")}),t._UZ(1,"i",22),t._uU(2,"Export"),t.qZA()}}const D_=function(n){return{"pl-lg-12":n}},y_=function(n){return[n]},v_=function(n){return{ID:n}};function S_(n,i){if(1&n&&(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&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(14,D_,!e.IsParent)),t.xp6(1),t.Q6J("routerLink",t.VKq(16,y_,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,v_,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 M_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Text=a})("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,q_,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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(18,"datepicker",8),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.GroupByProduct=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.BrandID=a}),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,S_,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&n){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 b_=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/PurchasesByProductList","ReportLoader/PurchasesByProductLoader"),this.httpService=e,this.csvConverter=o,this.GroupByRadio=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}filterData(e,o,a){return e.filter(function(r){return r[o]==a})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,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,M_,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,q.P,D.J,s.sg,s.mk,g.yS],pipes:[s.JJ,T.qU],styles:[""]}),n})();function O_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",8),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.convertToCSV(a.csvConverter,!0,"PurchaseHistory.csv")}),t._UZ(1,"i",9),t._uU(2,"Export"),t.qZA()}}function J_(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)("inputTextValue",e.pageData.ProductName)}}function I_(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.VariantID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.VariantID)("inputTextValue",e.pageData.VariantName)}}function U_(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.ByProduct=a})("modelChange",function(){return t.CHM(e),t.oxw().getListData()}),t.qZA(),t.qZA(),t.YNc(13,J_,4,2,"div",14),t.YNc(14,I_,4,2,"div",14),t.TgZ(15,"div"),t.TgZ(16,"h6"),t._uU(17,"From/To"),t.qZA(),t.TgZ(18,"datepicker",15),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(19,"datepicker",16),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 w_(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.OrderByNumber=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.BrandID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 F_(n,i){1&n&&(t.TgZ(0,"th"),t._uU(1,"Product"),t.qZA())}function N_(n,i){1&n&&(t.TgZ(0,"th"),t._uU(1,"Variant"),t.qZA())}function P_(n,i){1&n&&(t.TgZ(0,"th",40),t._uU(1," Measurement"),t.qZA())}function L_(n,i){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Cost"),t.qZA())}function Q_(n,i){if(1&n&&(t.TgZ(0,"th",42),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" Total(",e.data.CurrencySymbol,")")}}function Y_(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.VariantUnitQuantity),"")}}function R_(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitPrice))}}function k_(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Total))}}function E_(n,i){if(1&n&&(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,Y_,3,3,"td",39),t.YNc(20,R_,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,k_,3,3,"td",39),t.qZA()),2&n){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 H_(n,i){1&n&&t._UZ(0,"td",37)}function V_(n,i){1&n&&t._UZ(0,"td",37)}function B_(n,i){1&n&&t._UZ(0,"td",37)}function G_(n,i){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Total")),"")}}function j_(n,i){if(1&n&&(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,F_,2,0,"th",14),t.YNc(15,N_,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,P_,2,0,"th",30),t.YNc(24,L_,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,Q_,2,1,"th",32),t.qZA(),t.qZA(),t.TgZ(30,"tbody"),t.YNc(31,E_,26,19,"tr",33),t.qZA(),t.TgZ(32,"tfoot"),t.TgZ(33,"tr",34),t._UZ(34,"td",35),t.YNc(35,H_,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,V_,1,0,"td",36),t.YNc(44,B_,1,0,"td",36),t._UZ(45,"td",37),t._UZ(46,"td",37),t.YNc(47,G_,4,6,"td",39),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){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 W_=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/ProductPurchaseHistory","ReportLoader/ProductPurchaseHistoryLoader",null,a),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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-product-purchase-history"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","Scope",3,"model","options","modelChange"],[4,"ngIf"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["inputID","Key","requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","inputTextValue","ngModelChange"],["id","more-filter","container",""],["name","OrderBy",3,"model","options","modelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetProductBrandSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","100px"],[2,"width","80px"],[2,"width","70px"],[1,"text-right",2,"width","50px"],["style","width: 60px;","class","text-right",4,"ngIf"],["style","width: 75px;","class","text-right",4,"ngIf"],["style","width: 80px;","class","text-right",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"empty-column"],["class","empty-column",4,"ngIf"],[1,"empty-column"],[1,"text-right"],["class","text-right",4,"ngIf"],[1,"text-right",2,"width","60px"],[1,"text-right",2,"width","75px"],[1,"text-right",2,"width","80px"],[1,"border-bottom"],[3,"href"],[3,"innerHTML"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,O_,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,U_,20,9,"div",3),t.YNc(6,w_,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,j_,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,D.J,q.P,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function $_(n,i){if(1&n&&(t.TgZ(0,"tr",19),t.TgZ(1,"td"),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td",16),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td",16),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",16),t._uU(11),t.ALo(12,"number"),t.qZA(),t.qZA()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(t.xi3(3,4,e.Date,"EEEE")),t.xp6(3),t.Oqu(t.lcZ(6,7,e.Day)),t.xp6(3),t.Oqu(t.lcZ(9,9,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(12,11,e.PurchaseTotal))}}const X_=function(){return["/menu/Reports/Purchases_Report/Daily_Purchase/Monthly_Purchase"]};function z_(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",2),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/DailyPurchaseReport","DailyPurchaseReport.csv")}),t._UZ(3,"i",3),t._uU(4," Export "),t.qZA(),t.TgZ(5,"a",4),t._uU(6,"View Month"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",5),t.TgZ(9,"div",6),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Outlet"),t.qZA(),t.TgZ(13,"ng-select",7),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Category"),t.qZA(),t.TgZ(17,"ng-select",8),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Year"),t.qZA(),t.TgZ(21,"ng-select",9),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Month"),t.qZA(),t.TgZ(25,"ng-select",10),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Month=a}),t.qZA(),t.qZA(),t.TgZ(26,"div"),t.TgZ(27,"h6"),t._uU(28,"Currency"),t.qZA(),t.TgZ(29,"ng-select",11),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),t.qZA(),t.qZA(),t.TgZ(30,"div"),t.TgZ(31,"h6"),t._uU(32,"Multiply Unit Qty"),t.qZA(),t.TgZ(33,"radio-options",12),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.MultiplyUnitQuantity=a}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(34,"content"),t.TgZ(35,"div",13),t.TgZ(36,"table",14),t.TgZ(37,"thead",15),t.TgZ(38,"tr"),t.TgZ(39,"th"),t._uU(40,"Day"),t.qZA(),t.TgZ(41,"th",16),t._uU(42,"Dt."),t.qZA(),t.TgZ(43,"th",16),t._uU(44,"Quantity"),t.qZA(),t.TgZ(45,"th",16),t._uU(46,"Purchases"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(47,"tbody"),t.YNc(48,$_,13,13,"tr",17),t.qZA(),t.TgZ(49,"tr"),t.TgZ(50,"td",18),t._uU(51,"Total"),t.qZA(),t.TgZ(52,"td",16),t._uU(53),t.ALo(54,"number"),t.ALo(55,"sum"),t.qZA(),t.TgZ(56,"td",16),t._uU(57),t.ALo(58,"number"),t.ALo(59,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(5),t.Q6J("routerLink",t.DdM(29,X_)),t.xp6(8),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListIDs)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Month)("items",e.Months),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",e.pageData.Options.Currencies),t.xp6(4),t.Q6J("model",e.pageData.Filter.MultiplyUnitQuantity)("options",e.YesNoRadio),t.xp6(15),t.Q6J("ngForOf",e.data),t.xp6(5),t.Oqu(t.lcZ(54,19,t.xi3(55,21,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(58,24,t.xi3(59,26,e.data,"PurchaseTotal")))}}let tu=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetPurchasePeriodDaily","ReportLoader/GetReportPurchaseDaily"),this.httpService=e,this.csvConverter=o,this.Years=[],this.Months=[],this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const a=new Date;this.Years=C.gT.GenerateYears(a.getFullYear(),11,!0),this.Months=C.gT.Months}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-daily-purchases"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","value","Export","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["role","button","title","View Month",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["placeholder","Month","bindLabel","Label","bindValue","ID",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","GroupBy",3,"model","options","modelChange"],[1,"container-fluid","mt-5"],[1,"table","w-25"],[1,"thead-light"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],["colspan","2",1,"text-right"],[1,"border-bottom"]],template:function(e,o){1&e&&t.YNc(0,z_,60,30,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,c.w9,p.JJ,p.On,q.P,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function eu(n,i){if(1&n&&(t.TgZ(0,"tr",20),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",16),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",16),t._uU(7),t.ALo(8,"number"),t.qZA(),t.qZA()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.MonthLabel),t.xp6(2),t.Oqu(t.lcZ(5,3,e.Quantity)),t.xp6(3),t.Oqu(t.lcZ(8,5,e.Income))}}const nu=function(){return["/menu/Reports/Purchases_Report/Daily_Purchase"]};function au(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",2),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/MonthlyPurchaseReport","DailyPurchaseReport.csv")}),t._UZ(3,"i",3),t._uU(4," Export "),t.qZA(),t.TgZ(5,"a",4),t._uU(6,"View Daily"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",5),t.TgZ(9,"div",6),t.TgZ(10,"div"),t.TgZ(11,"h6"),t._uU(12,"Outlet"),t.qZA(),t.TgZ(13,"ng-select",7),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h6"),t._uU(16,"Category"),t.qZA(),t.TgZ(17,"ng-select",8),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.qZA(),t.qZA(),t.TgZ(18,"div"),t.TgZ(19,"h6"),t._uU(20,"Year"),t.qZA(),t.TgZ(21,"ng-select",9),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),t.qZA(),t.qZA(),t.TgZ(22,"div"),t.TgZ(23,"h6"),t._uU(24,"Currency"),t.qZA(),t.TgZ(25,"ng-select",10),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),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",11),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.MultiplyUnitQuantity=a}),t.qZA(),t.qZA(),t.TgZ(30,"div"),t.TgZ(31,"h6"),t._uU(32,"Supplier"),t.qZA(),t.TgZ(33,"autocompleteV2",12),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(34,"content"),t.TgZ(35,"div",13),t.TgZ(36,"table",14),t.TgZ(37,"thead",15),t.TgZ(38,"tr"),t.TgZ(39,"th"),t._uU(40,"Month"),t.qZA(),t.TgZ(41,"th",16),t._uU(42,"Quantity"),t.qZA(),t.TgZ(43,"th",16),t._uU(44,"Purchases"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(45,"tbody"),t.YNc(46,eu,9,7,"tr",17),t.qZA(),t.TgZ(47,"tr",18),t.TgZ(48,"td",19),t._uU(49,"Total"),t.qZA(),t.TgZ(50,"td",16),t._uU(51),t.ALo(52,"number"),t.ALo(53,"sum"),t.qZA(),t.TgZ(54,"td",16),t._uU(55),t.ALo(56,"number"),t.ALo(57,"sum"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(5),t.Q6J("routerLink",t.DdM(27,nu)),t.xp6(8),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Year)("items",e.Years),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CurrencyID)("items",e.pageData.Options.Currencies),t.xp6(4),t.Q6J("model",e.pageData.Filter.MultiplyUnitQuantity)("options",e.YesNoRadio),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(13),t.Q6J("ngForOf",e.data),t.xp6(5),t.Oqu(t.lcZ(52,17,t.xi3(53,19,e.data,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(56,22,t.xi3(57,24,e.data,"Income")))}}let ou=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetPurchasePeriodMonthly","ReportLoader/GetReportPurchaseMonthly"),this.httpService=e,this.csvConverter=o,this.Years=[],this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const a=new Date;this.Years=C.gT.GenerateYears(a.getFullYear(),11,!0)}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-monthly-purchase"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","value","Export","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["role","button","title","View Month",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["placeholder","Year",3,"ngModel","items","ngModelChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","GroupBy",3,"model","options","modelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table","w-25"],[1,"thead-light"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","1",1,"text-right"],[1,"border-bottom"]],template:function(e,o){1&e&&t.YNc(0,au,58,28,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,c.w9,p.JJ,p.On,q.P,D.J,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function ru(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t._UZ(1,"actions"),t.TgZ(2,"filters"),t.TgZ(3,"div",2),t.TgZ(4,"div",3),t.TgZ(5,"div"),t.TgZ(6,"h6"),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"ng-select",4),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Year=a}),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&n){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 iu=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/MonthlyPurchasesVolume","ReportLoader/GetMonthlyPurchaseVolume"),this.httpService=e,this.Years=[],this.ChartData={};const a=new Date;this.Years=C.gT.GenerateYears(a.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 n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,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,ru,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,b.D],styles:[""]}),n})();function lu(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.convertToCSV(a.csvConverter,!0,"Purchased_Sales_Report.csv")}),t._UZ(1,"i",20),t._uU(2,"Export"),t.qZA()}}function su(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Period=a}),t.qZA(),t.qZA()}if(2&n){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 pu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",23),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 cu=function(){return["/menu/Products/Catalog/Products/Info"]},_u=function(n){return{ID:n}};function uu(n,i){if(1&n&&(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&n){const e=i.$implicit,o=i.index;t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Q6J("routerLink",t.DdM(14,cu))("queryParams",t.VKq(15,_u,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 gu(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,lu,3,0,"a",2),t.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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.qZA(),t.qZA(),t.YNc(14,su,4,2,"div",7),t.YNc(15,pu,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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.Predefined=a}),t.qZA(),t.TgZ(24,"h6"),t._uU(25,"Inventory Only"),t.qZA(),t.TgZ(26,"radio-options",10),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.InventoryOnly=a}),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,uu,17,17,"tr",18),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 du=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/PruchasedSalesReportList","ReportLoader/PurchaseSalesReportLoader"),this.httpService=e,this.csvConverter=o,this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Range"}],this.GroupRadio=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,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,gu,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,q.P,s.sg,f.QB,g.yS],pipes:[s.JJ],styles:[""]}),n})();function mu(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",31),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/OutletPerformancePurchase","Purchases Transaction ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",32),t._uU(2,"Export"),t.qZA()}}function Zu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Compare=a})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare("Data")}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.Compare)}}function hu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",35),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 xu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Year=a})("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(a){return t.CHM(e),t.oxw(2).Month=a})("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&n){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 Tu(n,i){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Prev"),t.qZA())}function Cu(n,i){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Now"),t.qZA())}function fu(n,i){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Trans"),t.qZA())}function Au(n,i){if(1&n&&(t.TgZ(0,"th",43),t._uU(1,"Tax"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet")}}function qu(n,i){if(1&n&&(t.TgZ(0,"th",43),t._uU(1," Purchase + Tax"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet")}}function Du(n,i){if(1&n&&(t.TgZ(0,"td",46),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PrevIndex)}}const yu=function(n,i){return{rankDown:n,rankUp:i,"number key":!0}};function vu(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.qZA()),2&n){const e=t.oxw(),o=e.$implicit,a=e.index;t.Q6J("ngClass",t.WLB(2,yu,o.PrevIndex<a+1,o.PrevIndex>a+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function Su(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Count,".0-0"))}}function Mu(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Tax,".0-0"),"")}}const bu=function(n,i,e){return{EntityID:n,From:i,To:e}},Ou=function(){return["/menu/Reports/Purchases_Report/Summary"]};function Ju(n,i){if(1&n&&(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&n){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("queryParams",t.kEZ(12,bu,e.EntityID,t.xi3(2,3,o.pageData.Filter.From,"ddMMyyyy"),t.xi3(3,6,o.pageData.Filter.To,"ddMMyyyy")))("routerLink",t.DdM(16,Ou)),t.xp6(4),t.Oqu(t.xi3(6,9,e.SalesWithTax,".0-0"))}}function Iu(n,i){if(1&n&&(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,Du,2,1,"td",44),t.YNc(6,vu,2,5,"td",45),t.YNc(7,Su,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,Mu,3,4,"td",29),t.ALo(15,"HideSumZero"),t.YNc(16,Ju,7,17,"td",29),t.qZA()),2&n){const e=i.$implicit,o=i.index,a=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",a.Compare),t.xp6(1),t.Q6J("ngIf",a.Compare),t.xp6(1),t.Q6J("ngIf",!a.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",!a.data.WithCategory&&t.xi3(15,15,a.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!a.data.WithCategory)}}function Uu(n,i){1&n&&t._UZ(0,"td",49)}function wu(n,i){1&n&&t._UZ(0,"td",49)}function Fu(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 Nu(n,i){if(1&n&&(t.TgZ(0,"td",30),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 Pu(n,i){if(1&n&&(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&n){const e=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,1,t.xi3(4,4,e.data.Data,"SalesWithTax"),".0-0"))}}const Qu=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Group_Performance"]},Ru=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance"]};function ku(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,mu,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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),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(a){return t.CHM(e),t.oxw().IsPredefined=a})("modelChange",function(){return t.CHM(e),t.oxw().YearMonthToDateRange()}),t.qZA(),t.qZA(),t.YNc(26,Zu,4,1,"div",14),t.YNc(27,hu,5,2,"div",14),t.YNc(28,xu,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(a){return t.CHM(e),t.oxw().pageData.Filter.ExcludeComplementary=a}),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(a){return t.CHM(e),t.oxw().sortData(a)}),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,Tu,2,0,"th",20),t.YNc(43,Cu,2,0,"th",20),t.YNc(44,fu,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,Au,2,1,"th",24),t.ALo(50,"HideSumZero"),t.YNc(51,qu,2,1,"th",24),t.qZA(),t.qZA(),t.TgZ(52,"tbody"),t.YNc(53,Iu,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,Uu,1,0,"td",28),t.YNc(59,wu,1,0,"td",28),t.YNc(60,Fu,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,Nu,4,7,"td",29),t.ALo(70,"HideSumZero"),t.YNc(71,Pu,5,7,"td",29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(46,Qu)),t.xp6(5),t.Q6J("routerLink",t.DdM(47,Ru)),t.xp6(8),t.Q6J("ngModel",e.pageData.Filter.CategoryID)("items",null==e.pageData.Options?null:e.pageData.Options.Categories),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.TypeID)("items",null==e.pageData.Options?null:e.pageData.Options.Types),t.xp6(4),t.Q6J("model",e.IsPredefined)("options",e.RadioDateFilterType),t.xp6(1),t.Q6J("ngIf",e.IsPredefined),t.xp6(1),t.Q6J("ngIf",!e.IsPredefined),t.xp6(1),t.Q6J("ngIf",e.IsPredefined),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludeComplementary),t.xp6(10),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(5),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(50,28,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",!e.data.WithCategory),t.xp6(2),t.Oqu(t.xi3(63,31,t.xi3(64,34,e.data.Data,"Quantity"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(67,37,t.xi3(68,40,e.data.Data,"Sales"),".0-0")," "),t.xp6(3),t.Q6J("ngIf",!e.data.WithCategory&&t.xi3(70,43,e.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!e.data.WithCategory)}}let Eu=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/OutletPerformancePurchase","ReportLoader/OutletPurchasePerformance"),this.httpService=e,this.csvConverter=o,this.Compare=!1,this.IsPredefined=!0,this.Comparison=0,this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}];const a=new Date;this.Years=C.gT.GenerateYears(a.getFullYear(),11,!0),this.Year=a.getFullYear(),this.Month=a.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 a=Object.assign({},this.pageData.Filter);new Date,a.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),a.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(a)).subscribe(l=>{const h=e?l[e]:l;this.Comparison=0,o.forEach(x=>{x.PrevIndex="-",x.CurrentIndex="-",x.Increase="-";const J=h.filter(y=>y.EntityID==x.EntityID);if(x.CurrentIndex=x.Rank,J.length>0){const y=J[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 a(r,l,h){return(r<l?-1:1)*(h?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const h="asc"===e.direction;switch(r.Name=null==r.Name?"":r.Name,l.Name=null==l.Name?"":l.Name,e.active){case"Name":return a(r.Name.toLocaleLowerCase(),l.Name.toLocaleLowerCase(),h);case"Count":return a(r.Count,l.Count,h);case"SalesWithTax":return a(r.SalesWithTax,l.SalesWithTax,h);case"Quantity":return a(r.Quantity,l.Quantity,h);case"SalesNet":case"SalesTaxNet":return a(r.Sales,l.Sales,h);case"Tax":return a(r.Tax,l.Tax,h);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-purchase-outlet-performance"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["name","complementary",3,"model","modelChange"],[1,"container-fluid","mt-5"],["matSort","",1,"table",3,"matSortChange"],[1,"thead-light"],["mat-sort-header","Name",1,"freeze","header"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Count","class","align-right",4,"ngIf"],["mat-sort-header","Quantity",1,"align-right"],["mat-sort-header","SalesNet",1,"align-right"],["class","align-right",3,"mat-sort-header",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"freeze","body"],["class","empty-column",4,"ngIf"],["class","text-right",4,"ngIf"],[1,"text-right"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["name","compare",3,"model","modelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[2,"width","35px"],["mat-sort-header","Count",1,"align-right"],[1,"align-right",3,"mat-sort-header"],["style","width: 35px; text-align: center",4,"ngIf"],["style","width: 35px; text-align: center",3,"ngClass",4,"ngIf"],[2,"width","35px","text-align","center"],[2,"width","35px","text-align","center",3,"ngClass"],[3,"queryParams","routerLink"],[1,"empty-column"]],template:function(e,o){1&e&&t.YNc(0,ku,72,48,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,c.w9,p.JJ,p.On,q.P,m.YE,m.nU,s.sg,f.QB,s.mk],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:["table[_ngcontent-%COMP%] {\n width: 100%;\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}"]}),n})();function Hu(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",27),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.exportCSV(a.csvConverter,"ReportExport/OutletGroupPerformancePurchase","Purchases Transaction ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",28),t._uU(2,"Export"),t.qZA()}}function Vu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(3).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",33),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(3).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 Bu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(3).Year=a})("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(a){return t.CHM(e),t.oxw(3).Month=a})("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&n){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 Gu(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(3).Compare=a})("modelChange",function(){return t.CHM(e),t.oxw(3).OnCompare()}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("model",e.Compare)}}function ju(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).IsPredefined=a}),t.qZA(),t.qZA(),t.YNc(5,Vu,5,2,"div",26),t.YNc(6,Bu,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(a){return t.CHM(e),t.oxw(2).pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.YNc(11,Gu,4,1,"div",26),t.qZA()}if(2&n){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 Wu(n,i){1&n&&(t.TgZ(0,"th",40),t._uU(1,"Prev"),t.qZA())}function $u(n,i){1&n&&(t.TgZ(0,"th",40),t._uU(1,"Now"),t.qZA())}function Ku(n,i){1&n&&(t.TgZ(0,"th",41),t._uU(1," \xb1 (%) "),t.qZA())}function Xu(n,i){if(1&n&&(t.TgZ(0,"td",40),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.PrevIndex," ")}}const zu=function(n,i){return{rankDown:n,rankUp:i,"number key":!0}};function tg(n,i){if(1&n&&(t.TgZ(0,"td",45),t._uU(1),t.qZA()),2&n){const e=t.oxw(),o=e.$implicit,a=e.index;t.Q6J("ngClass",t.WLB(2,zu,o.PrevIndex<a+1,o.PrevIndex>a+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}const eg=function(n,i){return{"text-danger":n,"text-success":i,"text-right":!0}};function ng(n,i){if(1&n&&(t.TgZ(0,"td",46),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(5,eg,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0")," ")}}function ag(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,Xu,2,1,"td",14),t.YNc(2,tg,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,ng,3,8,"td",44),t.qZA()),2&n){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 og(n,i){1&n&&t._UZ(0,"td",24)}function rg(n,i){1&n&&t._UZ(0,"td",24)}function ig(n,i){1&n&&t._UZ(0,"td")}const lg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance"]},pg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance"]};function cg(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Hu,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,ju,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(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(17,"thead",13),t.TgZ(18,"tr"),t.YNc(19,Wu,2,0,"th",14),t.YNc(20,$u,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,Ku,2,0,"th",20),t.qZA(),t.qZA(),t.TgZ(34,"tbody"),t.YNc(35,ag,21,24,"tr",21),t.qZA(),t.TgZ(36,"tfoot"),t.TgZ(37,"tr",22),t.YNc(38,og,1,0,"td",23),t.YNc(39,rg,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,ig,1,0,"td",26),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasRoleExport),t.xp6(2),t.Q6J("routerLink",t.DdM(50,lg)),t.xp6(5),t.Q6J("routerLink",t.DdM(51,pg)),t.xp6(4),t.Q6J("ngIf",e.pageData.Filter),t.xp6(6),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(9),t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet"),t.xp6(2),t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet"),t.xp6(2),t.Q6J("ngIf",e.Compare),t.xp6(2),t.Q6J("ngForOf",e.data),t.xp6(3),t.Q6J("ngIf",e.Compare),t.xp6(1),t.Q6J("ngIf",e.Compare),t.xp6(3),t.Oqu(t.xi3(43,20,t.xi3(44,23,e.data,"Count"),".0-0")),t.xp6(4),t.Oqu(t.xi3(47,26,t.xi3(48,29,e.data,"Quantity"),".0-0")),t.xp6(4),t.hij(" ",t.xi3(51,32,t.xi3(52,35,e.data,"Sales"),".0-0")," "),t.xp6(4),t.hij(" ",t.xi3(55,38,t.xi3(56,41,e.data,"Tax"),".0-0")," "),t.xp6(5),t.Oqu(t.xi3(60,44,t.xi3(61,47,e.data,"SalesWithTax"),".0-0")),t.xp6(3),t.Q6J("ngIf",e.Compare)}}let _g=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/OutletGroupPerformancePurchase","ReportLoader/OutletPurchasePerformance"),this.httpService=e,this.csvConverter=o,this.Compare=!1,this.IsPredefined=!0,this.Comparison=0,this.RadioDateFilterType=[{Key:!0,Value:"Predefined"},{Key:!1,Value:"Range"}],this.first=!0,this.YesNoRadio=[{Key:!0,Value:"Yes"},{Key:!1,Value:"No"}];const a=new Date;this.Years=C.gT.GenerateYears(a.getFullYear(),11,!0),this.Year=a.getFullYear(),this.Month=a.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 a=Object.assign({},this.pageData.Filter);new Date,a.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),a.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(a)).subscribe(l=>{const h=e?l[e]:l;this.Comparison=0,o.forEach(x=>{x.PrevIndex="-",x.CurrentIndex="-",x.Increase="-";const J=h.filter(y=>y.EntityID==x.EntityID);if(x.CurrentIndex=x.Rank,J.length>0){const y=J[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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Count":return this.compare(a.Count,r.Count,l);case"SalesWithTax":return this.compare(a.SalesWithTax,r.SalesWithTax,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Sales":case"SalesNet":case"SalesTaxNet":return this.compare(a.Sales,r.Sales,l);case"Tax":return this.compare(a.Tax,r.Tax,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-purchase-outlet-group-performance"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],[1,"container-fluid","mt-5"],["matSort","",1,"table",3,"matSortChange"],[1,"thead-light"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Name"],["mat-sort-header","Count",1,"align-right",2,"width","70px"],["mat-sort-header","Quantity",1,"align-right",2,"width","70px"],["mat-sort-header","Sales",1,"align-right",2,"width","120px"],[1,"align-right",2,"width","120px",3,"mat-sort-header"],["style","width: 50px;",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","empty-column",4,"ngIf"],[1,"empty-column"],[1,"text-right"],[4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],["container",""],["name","Date Filter",3,"model","options","modelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],["name","compare",3,"model","modelChange"],[2,"width","35px"],[2,"width","50px"],["style","width: 35px;",3,"ngClass",4,"ngIf"],[1,"text-right",2,"width","70px"],[3,"ngClass",4,"ngIf"],[2,"width","35px",3,"ngClass"],[3,"ngClass"]],template:function(e,o){1&e&&t.YNc(0,cg,63,52,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,m.YE,m.nU,s.sg,q.P,c.w9,p.JJ,p.On,f.QB,s.mk],pipes:[s.JJ,T.qU],styles:[""]}),n})();function ug(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",17),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return a.convertToCSV(a.csvConverter,!0,"Monthly Outlet Performance ["+a.pageData.Filter.From+" - "+a.pageData.Filter.To+"].csv")}),t._UZ(1,"i",18),t._uU(2,"Export"),t.qZA()}}function gg(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Year=a}),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(a){return t.CHM(e),t.oxw(2).pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 dg(n,i){if(1&n&&(t.TgZ(0,"th",22),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.Q6J("mat-sort-header",e),t.xp6(1),t.Oqu(e)}}function mg(n,i){if(1&n&&(t.TgZ(0,"p",24),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(o[e])}}function Zg(n,i){if(1&n&&(t.TgZ(0,"p",24),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,o[e]))}}function hg(n,i){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,mg,2,1,"p",23),t.YNc(2,Zg,3,3,"p",23),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Q6J("ngIf","Outlet"==e),t.xp6(1),t.Q6J("ngIf","Outlet"!=e)}}function xg(n,i){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,hg,3,2,"td",15),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",o.getKey(e))}}function Tg(n,i){if(1&n&&(t.TgZ(0,"td",26),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e))}}function Cg(n,i){if(1&n&&(t.TgZ(0,"tfoot"),t.TgZ(1,"tr",25),t.TgZ(2,"td",26),t._uU(3,"Total : "),t.qZA(),t.YNc(4,Tg,3,3,"td",27),t.qZA(),t.qZA()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",e.data.DataFooter)}}const fg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance"]},qg=function(){return["/menu/Reports/Purchases_Report/Outlet_Performance/Outlet_Group_Performance"]};function Dg(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,ug,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,gg,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(a){return t.CHM(e),t.oxw().sortData(a)}),t.TgZ(17,"thead",13),t.TgZ(18,"tr"),t.YNc(19,dg,2,2,"th",14),t.qZA(),t.qZA(),t.TgZ(20,"tbody"),t.YNc(21,xg,2,1,"tr",15),t.qZA(),t.YNc(22,Cg,5,1,"tfoot",16),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.pageData.HasExportRole),t.xp6(2),t.Q6J("routerLink",t.DdM(9,fg)),t.xp6(5),t.Q6J("routerLink",t.DdM(10,qg)),t.xp6(4),t.Q6J("ngIf",e.pageData.Filter),t.xp6(6),t.Q6J("ngForOf",e.data.Dataheader),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}let yg=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/MonthlyOutletPerformancePurchase","ReportLoader/MonthlyReportPurchase"),this.httpService=e,this.csvConverter=o;const a=new Date;this.Years=C.gT.GenerateYears(a.getFullYear(),11,!0)}getKey(e){return Object.keys(e)}sortData(e){const o=this.data.Data.slice();function a(r,l,h){return(r<l?-1:1)*(h?1:-1)}this.data.Data=e.active&&""!==e.direction?o.sort((r,l)=>{const h="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]]?a(r[this.data.Dataheader[x]].toLocaleLowerCase(),l[this.data.Dataheader[x]].toLocaleLowerCase(),h):a(r[this.data.Dataheader[x]],l[this.data.Dataheader[x]],h)}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-purchase-outlet-monthly-performance"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary",3,"routerLink"],["data-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-right",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],[1,"container-fluid","mt-5"],["matSort","","id","tableGrid",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,Dg,23,11,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.pageData)},directives:[s.O5,u.p,g.yS,m.YE,s.sg,c.w9,p.JJ,p.On,m.nU],pipes:[s.JJ],styles:[""]}),n})();function vg(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",5),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/CitySalesExport","CitySalesReport.csv")}),t._UZ(1,"i",6),t._uU(2,"Export"),t.qZA()}}function Sg(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Mg(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(5,Sg,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(10,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.to=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CurrencyID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 bg(n,i){if(1&n&&(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&n){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 Og(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,bg,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&n){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 Jg=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/CitySales","ReportLoader/CitySalesLoader",o),this.httpService=e,this.csvConverter=a}postInit(e){this.menuData.H=e.PageTitle}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"CityCode":return this.compare(a.CityCode,r.CityCode,l);case"CityName":return this.compare(a.CityName,r.CityName,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Average":return this.compare(a.Average,r.Average,l);case"Total":return this.compare(a.Total,r.Total,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-city"]],features:[t.qOj],decls:8,vars:5,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],["container",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Symbol","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","CityCode",2,"width","80px"],["mat-sort-header","CityName",2,"width","220px"],["mat-sort-header","Quantity",1,"align-right",2,"width","70px"],["mat-sort-header","Total",1,"align-right",2,"width","100px"],["mat-sort-header","Average",1,"align-right",2,"width","100px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,vg,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,Mg,15,6,"div",3),t.qZA(),t.qZA(),t.TgZ(6,"content"),t.YNc(7,Og,34,22,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",null==o.pageData.Role?null:o.pageData.Role.HasExportRole),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function Ig(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.from=a}),t.qZA(),t.TgZ(9,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.to=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Ug=function(n,i,e,o){return{SalesTypeID:n,OutletID:i,From:e,To:o}},wg=function(n){return["/menu/Reports/Sales_Report/Standard/Detail",n]};function Fg(n,i){if(1&n&&(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&n){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,wg,t.l5B(23,Ug,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 Ng(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",10),t.TgZ(1,"table",11),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Fg,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&n){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 Pg=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/TypeSales","ReportLoader/TypeSalesLoader",o),this.httpService=e,this.csvConverter=a;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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"TypeName":return this.compare(a.TypeName,r.TypeName,l);case"Trans":return this.compare(a.Trans,r.Trans,l);case"Quality":return this.compare(a.Quality,r.Quality,l);case"Gross":return this.compare(a.Gross,r.Gross,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Cost":return this.compare(a.Cost,r.Cost,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-type"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","140px"],[1,"text-right",2,"width","70px"],[1,"text-right",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[1,"text-right","text-primary"],[1,"text-right","text-success"],[1,"text-right","text-danger"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"],[3,"routerLink"],[1,"text-right","text-success",3,"innerHtml"],[1,"text-right","text-danger",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"TypeSalesReport.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Ig,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Ng,42,31,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,s.sg,g.yS],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function Lg(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.EntityID)("items",null==e.pageData.Options?null:e.pageData.Options.Entities),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("date",e.pageData.Filter.To)}}function Qg(n,i){1&n&&(t.TgZ(0,"th",15),t._uU(1,"Profit"),t.qZA())}function Yg(n,i){if(1&n&&(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&n){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 Rg(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",10),t.TgZ(1,"table",11),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Qg,2,0,"th",16),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,Yg,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&n){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 kg=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/CustomerGroup","ReportLoader/CustomerGroupLoader",o),this.httpService=e,this.csvConverter=a,this.first=!0}preGetList(){if(this.first){const e=new Date,o=e.getMonth(),a=e.getFullYear();this.pageData.Filter.From=new Date(a,o,1).toDateString(),this.pageData.Filter.To=new Date(a,o+1,0).toDateString()}}postInit(e){if(this.menuData.H=e.PageTitle,this.first){const o=new Date,a=o.getMonth(),r=o.getFullYear();this.pageData.Filter.From=new Date(r,a,1),this.pageData.Filter.To=new Date(r,a+1,0),this.first=!1}}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"GroupName":return this.compare(a.GroupName,r.GroupName,l);case"Trans":return this.compare(a.Trans,r.Trans,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Gross":return this.compare(a.Gross,r.Gross,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-customer-group"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","140px"],[1,"text-right",2,"width","70px"],[1,"text-right",2,"width","120px"],["style","width: 120px;","class","text-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right"],[1,"text-right","text-success"],[1,"text-right","text-danger"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"],[1,"text-right","text-success",3,"innerHtml"],[1,"text-right","text-danger",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"CustomerGroupSalesReport.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Lg,10,4,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Rg,46,38,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function Eg(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",5),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/SalesGroup","SalesGroupPerformance.csv")}),t._UZ(1,"i",6),t._uU(2,"Export"),t.qZA()}}function Hg(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Vg(n,i){1&n&&(t.TgZ(0,"th",15),t._uU(1,"Profit"),t.qZA())}function Bg(n,i){if(1&n&&(t._UZ(0,"td",25),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHtml",t.lcZ(1,1,e.ActualProfit),t.oJD)}}function Gg(n,i){if(1&n&&(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,Bg,2,3,"td",24),t.qZA()),2&n){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 jg(n,i){if(1&n&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"ActualProfit")),"")}}function Wg(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.TgZ(1,"table",12),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Vg,2,0,"th",16),t.qZA(),t.qZA(),t.TgZ(15,"tbody"),t.YNc(16,Gg,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,jg,4,6,"td",21),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 $g=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/SalesGroup","ReportLoader/SalesGroupLoader",o),this.httpService=e,this.csvConverter=a,this.first=!0}preGetList(){if(this.first){const e=new Date,o=e.getMonth(),a=e.getFullYear();this.pageData.Filter.From=new Date(a,o,1).toDateString(),this.pageData.Filter.To=new Date(a,o+1,0).toDateString()}}postInit(e){if(this.menuData.H=e.PageTitle,this.first){const o=new Date,a=o.getMonth(),r=o.getFullYear();this.pageData.Filter.From=new Date(r,a,1),this.pageData.Filter.To=new Date(r,a+1,0),this.first=!1}}sortData(e){const o=this.data.List.slice();e.active&&""!==e.direction||(this.data.List=o)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-sales-group"]],features:[t.qOj],decls:8,vars:5,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-right",2,"width","120px"],["style","width: 120px;","class","text-right",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right","empty-column"],[1,"text-right"],["class","text-right ",4,"ngIf"],[3,"innerHtml"],[1,"text-right",3,"innerHtml"],["class","text-right text-success",3,"innerHtml",4,"ngIf"],[1,"text-right","text-success",3,"innerHtml"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Eg,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.TgZ(4,"div",2),t.YNc(5,Hg,10,4,"div",3),t.qZA(),t.qZA(),t.TgZ(6,"content"),t.YNc(7,Wg,28,9,"div",4),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.HasExportRole),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function Kg(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListIDs=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Xg(n,i){if(1&n&&t._UZ(0,"th",27),2&n){const e=i.$implicit;t.Q6J("innerHtml",e.Label+" ("+e.Rate+"%)",t.oJD)}}function zg(n,i){if(1&n&&(t._UZ(0,"td",31),t.ALo(1,"number"),t.ALo(2,"TaxDefault")),2&n){const e=i.index,o=t.oxw().$implicit,a=t.oxw(2);t.Q6J("innerHtml",t.lcZ(1,1,t.Dn7(2,3,a.data.Compenents,o,e)),t.oJD)}}function td(n,i){if(1&n&&(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,zg,3,7,"td",30),t.qZA()),2&n){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 ed(n,i){if(1&n&&(t.TgZ(0,"td",32),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.SumTaxAmount)," ")}}function nd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Xg,1,1,"th",21),t.qZA(),t.qZA(),t.TgZ(17,"tbody"),t.YNc(18,td,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,ed,3,3,"td",26),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 od=function(){return["/menu/Reports/Sales_Report/Advanced/Tax_Report/By_Outlet"]};let rd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/GetTaxReport","ReportLoader/GetTaxReport",o),this.httpService=e,this.csvConverter=a}getComponent(e){return e.Component=[],this.data.Compenents.forEach((o,a)=>{0!=e.Tax?(o.SalesTax=0==a?e.Sales:this.data.Compenents[a-1].SalesTax,o.SalesTax=0==a?o.SalesTax:o.SalesTax+o.SalesTax*this.data.Compenents[a-1].Rate/100,e.Component[a]=o.SalesTax*o.Rate/100,o.SumTaxAmount=o.SumTaxAmount+e.Component[a]):e.Component[a]=0}),e.Component}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(a.Name=null==a.Name?"":a.Name,r.Name=null==r.Name?"":r.Name,a.EntityName=null==a.EntityName?"":a.EntityName,r.EntityName=null==r.EntityName?"":r.EntityName,e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Outlet":return this.compare(a.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"Number":return this.compare(a.Number,r.Number,l);case"Date":return this.compare(a.Date,r.Date,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Tax":return this.compare(a.Tax,r.Tax,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-tax-report"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","text","textChange","onSubmit"],["title","Tax Report By Outlet",1,"btn","btn-success","mr-6",3,"routerLink"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Label","bindValue","ID","placeholder","Choose a Type",3,"ngModel","items","clearable","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Outlet",2,"width","150px"],["mat-sort-header","Number"],["mat-sort-header","Name"],["mat-sort-header","Date",2,"width","100px"],["mat-sort-header","Sales",1,"align-right",2,"width","150px"],["mat-sort-header","Tax",1,"align-right","text-right",2,"width","150px"],["style","width: 150px","class","align-right text-right",3,"innerHtml",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-right","empty-column"],[1,"text-right","text-success"],["class","text-right","style","width: 150px",4,"ngFor","ngForOf"],[1,"align-right","text-right",2,"width","150px",3,"innerHtml"],[3,"href"],[1,"text-right"],["class","text-right","style","width: 150px",3,"innerHtml",4,"ngFor","ngForOf"],[1,"text-right",2,"width","150px",3,"innerHtml"],[1,"text-right",2,"width","150px"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"By Outlet"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"TaxReport.csv")}),t._UZ(5,"i",3),t._uU(6,"Export"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Kg,14,8,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,nd,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,od)),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU,s.uU,T.X6],styles:[""]}),n})();function id(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 ld(n,i){1&n&&(t.TgZ(0,"th",25),t._uU(1,"Total Tax"),t.qZA())}function sd(n,i){if(1&n&&t._UZ(0,"th",26),2&n){const e=i.$implicit;t.Q6J("innerHtml",e.Label+" ("+e.Rate+"%)",t.oJD)}}function pd(n,i){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Tax))}}function cd(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e)," ")}}function _d(n,i){if(1&n&&(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,pd,3,3,"td",28),t.YNc(7,cd,3,3,"td",24),t.qZA()),2&n){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 ud(n,i){if(1&n&&(t.TgZ(0,"td",22),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Tax")),"")}}function gd(n,i){if(1&n&&(t.TgZ(0,"td",29),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=i.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.SumTaxAmount)," ")}}function dd(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.TgZ(1,"table",13),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,ld,2,0,"th",17),t.YNc(9,sd,1,1,"th",18),t.qZA(),t.qZA(),t.TgZ(10,"tbody"),t.YNc(11,_d,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,ud,4,6,"td",23),t.YNc(20,gd,3,3,"td",24),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(8),t.Q6J("ngIf",0==e.data.Compenents.length),t.xp6(1),t.Q6J("ngForOf",e.data.Compenents),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(5),t.Oqu(t.lcZ(17,6,t.xi3(18,8,e.data.Data,"Sales"))),t.xp6(3),t.Q6J("ngIf",0==e.data.Compenents.length),t.xp6(1),t.Q6J("ngForOf",e.data.Compenents)}}const md=function(){return["/menu/Reports/Sales_Report/Advanced/Tax_Report"]};let Zd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/GetTaxReportbyOutlet","ReportLoader/GetTaxReport",o),this.httpService=e,this.csvConverter=a}getComponent(e){return e.Component=[],this.data.Compenents.forEach((o,a)=>{o.SalesTax=0==a?e.Sales:this.data.Compenents[a-1].SalesTax,o.SalesTax=0==a?o.SalesTax:o.SalesTax+o.SalesTax*this.data.Compenents[a-1].Rate/100,e.Component[a]=o.SalesTax*o.Rate/100,o.SumTaxAmount=o.SumTaxAmount+e.Component[a]}),e.Component}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Outlet":return this.compare(a.EntityName,r.EntityName,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Tax":return this.compare(a.Tax,r.Tax,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-tax-report-by-outlet"]],features:[t.qOj],decls:12,vars:7,consts:[[3,"pageData","text","hideSearchBox","textChange","onSubmit"],["title","Tax Report By Outlet",1,"btn","btn-success","mr-6",3,"routerLink"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Label","bindValue","ID","placeholder","Choose a Type",3,"ngModel","items","clearable","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Outlet",2,"width","150px"],["mat-sort-header","Sales",1,"align-right",2,"width","150px"],["style","width: 150px","class","align-right","mat-sort-header","Tax",4,"ngIf"],["style","width: 150px","class","align-right",3,"innerHtml",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-right","empty-column"],[1,"text-right","text-success"],["class","text-right text-success",4,"ngIf"],["class","text-right","style","width: 150px",4,"ngFor","ngForOf"],["mat-sort-header","Tax",1,"align-right",2,"width","150px"],[1,"align-right",2,"width","150px",3,"innerHtml"],[1,"text-right"],["class","text-right",4,"ngIf"],[1,"text-right",2,"width","150px"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t._uU(3,"Tax Report"),t.qZA(),t.TgZ(4,"a",2),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"TaxReport.csv")}),t._UZ(5,"i",3),t._uU(6,"Export"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,id,14,7,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,dd,21,11,"div",6),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Number)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(6,md)),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,m.YE,m.nU,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function hd(n,i){if(1&n&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function xd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,hd,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(14,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Td=function(){return["/menu/Products/Catalog/Variants/Info"]},Cd=function(n){return{ID:n}};function fd(n,i){if(1&n&&(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&n){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(15,Td))("queryParams",t.VKq(16,Cd,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 Ad(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,fd,15,18,"tr",18),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(15),t.Q6J("ngForOf",e.data)}}let qd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/ProductLifeCycle","ReportLoader/ProductLifeCycle",o),this.httpService=e,this.csvConverter=a}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,r)=>{const l="asc"===e.direction;switch(a.Name=null==a.Name?"":a.Name,r.Name=null==r.Name?"":r.Name,a.EntityName=null==a.EntityName?"":a.EntityName,r.EntityName=null==r.EntityName?"":r.EntityName,e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Outlet":return this.compare(a.EntityName.toLocaleLowerCase(),r.EntityName.toLocaleLowerCase(),l);case"Number":return this.compare(a.Number,r.Number,l);case"Date":return this.compare(a.Date,r.Date,l);case"Sales":return this.compare(a.Sales,r.Sales,l);case"Tax":return this.compare(a.Tax,r.Tax,l);default:return 0}}):o}preGetList(){this.pageData.Filter.EntityID||delete this.pageData.Filter.EntityID}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-product-life-cycle"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Sales",3,"ngModel","items","ngModelChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"text-right"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"ProductLifeCycleReport.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,xd,19,8,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Ad,16,1,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,c.w9,p.JJ,p.On,c.ir,f.QB,m.YE,s.sg,g.yS],pipes:[s.uU,s.JJ],styles:[""]}),n})();function Dd(n,i){if(1&n&&(t.TgZ(0,"span",15),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function yd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",17),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 vd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.Year=a}),t.qZA(),t.qZA(),t.TgZ(6,"div",21),t.TgZ(7,"ng-select",22),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.Month=a}),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Sd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,Dd,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(a){return t.CHM(e),t.oxw().pageData.Filter.ByMonth=a}),t.qZA(),t.TgZ(14,"h6"),t._uU(15,"Group By"),t.qZA(),t.TgZ(16,"radio-options",11),t.NdJ("modelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.GroupBy=a}),t.qZA(),t.qZA(),t.YNc(17,yd,5,2,"div",12),t.YNc(18,vd,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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Md(n,i){if(1&n&&(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&n){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 bd(n,i){if(1&n&&(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&n){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 Od(n,i){if(1&n&&(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,Md,27,22,"tr",30),t.qZA(),t.YNc(26,bd,25,30,"tfoot",12),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(25),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.length>0)}}let Jd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/GetReportProductProfit","ReportLoader/GetReportProductProfit",o),this.httpService=e,this.csvConverter=a,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,a){let r=-1;(null==o||null==o)&&(o=11),(null==a||null==a||!a)&&(r=1);const l=[];for(let h=0;h<o;h++)l.push(e+h*r);return l}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-product-profit"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","Date Filter",3,"model","options","modelChange"],["name","Group By",3,"model","options","modelChange"],[4,"ngIf"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],[3,"title"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-right",2,"width","100px"],[2,"width","600px"],[2,"width","100px"],[1,"text-right",2,"width","200px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[1,"text-right",2,"width","35px"],[1,"text-right","text-success"],[1,"text-right","text-danger"],[1,"table-footer"],["colspan","3",1,"empty-column"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,o.data.Data,"ReportProductProfit.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Sd,27,12,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Od,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,q.P,p.Fj,D.J,f.QB,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function Id(n,i){if(1&n&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function Ud(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,Id,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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(14,"datepicker",11),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 wd(n,i){if(1&n&&(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&n){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 Fd(n,i){if(1&n&&(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,wd,14,10,"tr",16),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(15),t.Q6J("ngForOf",e.data.Data)}}let Nd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/GetExchangedSales","ReportLoader/GetExchangedSales",o),this.httpService=e,this.csvConverter=a}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-exchanged-sales"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[3,"title"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[3,"href"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetExchangedSales","ReportExchangedSales.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Ud,15,6,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Fd,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:[""]}),n})();function Pd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Ld(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.ProductID=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function Qd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.YNc(10,Pd,4,1,"div",10),t.YNc(11,Ld,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(a){return t.CHM(e),t.oxw().pageData.Filter.SearchBy=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Yd(n,i){if(1&n&&(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&n){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(n,i){if(1&n&&(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,Yd,11,8,"tr",21),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(13),t.Q6J("ngForOf",e.data.Data)}}let kd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/GetSalesRankByVariantModel","ReportLoader/GetSalesRankByVariantModel",o),this.httpService=e,this.csvConverter=a,this.RadioSearchBy=[{Key:!0,Value:"Name"},{Key:!1,Value:"Code"}]}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-variant-model-rank"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[4,"ngIf"],["name","Search By",3,"model","options","modelChange"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetProductSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetProductSuggestionByCode",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-right",2,"width","70px"],[2,"width","800px"],[1,"text-right",2,"width","100px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[1,"text-right"],[1,"text-success","text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/GetSalesRankByVariantModel","ReportSalesRankByVariantModel.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Qd,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,q.P,p.Fj,D.J,s.sg],pipes:[s.JJ],styles:[""]}),n})();function Ed(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",10),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.DiscountFrom=a}),t.qZA(),t.qZA(),t.TgZ(16,"div",14),t.TgZ(17,"input",13),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.DiscountTo=a}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Hd(n,i){if(1&n&&(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&n){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 Vd(n,i){if(1&n&&(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,Hd,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&n){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 Gd=function(){return["/menu/Reports/Sales_Report/Standard/Discounted_Sales/Discounted_Products"]};let jd=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/GetDiscountsales","ReportLoader/GetDiscountSales"),this.httpService=e,this.csvConverter=o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-discounted-sales"]],features:[t.qOj],decls:12,vars:6,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"row"],[1,"col-6","pr-2"],["type","number",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-6","pl-2"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-right",2,"width","25px"],[1,"text-right",2,"width","100px"],[1,"text-right",2,"width","150px"],[1,"text-right"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","6",1,"text-right"],[3,"href"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!0,"SalesTransaction.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Discounted Products"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,Ed,18,6,"div",5),t.qZA(),t.qZA(),t.TgZ(10,"content"),t.YNc(11,Vd,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,Gd)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,f.QB,p.wV,p.Fj,s.sg],pipes:[s.JJ,T.qU],styles:[""]}),n})();function Wd(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(13,"datepicker",10),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 $d(n,i){if(1&n&&(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&n){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 Kd(n,i){if(1&n&&(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,$d,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&n){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 Xd=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/SalesReturnList","ReportLoader/ReturnReportLoader",o),this.httpService=e,this.csvConverter=a}postInit(e){this.menuData.H=e.PageTitle}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(v._W),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-sales-return"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fas","fa-upload","mr-4"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","140px"],[1,"text-right"],[2,"width","30px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"empty-column"],[3,"href"],[1,"text-danger"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/SalesReturnExport",o.menuData.H+".csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.qZA(),t.TgZ(5,"filters"),t.TgZ(6,"div",3),t.YNc(7,Wd,14,5,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,Kd,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,D.J,f.QB,s.sg],pipes:[s.JJ,T.qU,s.uU],styles:[""]}),n})();function zd(n,i){if(1&n&&(t._UZ(0,"td",36),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHtml",t.lcZ(1,1,e.UnitCost),t.oJD)}}function tm(n,i){if(1&n&&(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,zd,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&n){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 em(n,i){if(1&n&&(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,tm,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&n){const e=i.$implicit,o=t.oxw(2);t.xp6(2),t.MGl("href","/A/Orders/Orders/Supplier_Bill/Info?ID=",e.InvoiceID,"",t.LSH),t.xp6(1),t.Q6J("innerHtml",e.EntityName+" #"+e.Number+" - "+t.xi3(4,6,e.Date,"dd MMM yyyy")+" ("+t.xi3(5,9,e.Created,"HH:mm")+") : ",t.oJD),t.xp6(4),t.hij(" ",t.xi3(8,12,e.CustomerNameDisplay," - {0}")," "),t.xp6(7),t.Q6J("ngForOf",e.Item),t.xp6(9),t.hij("",t.lcZ(24,15,o.data.Quantity),"\xa0"),t.xp6(8),t.hij("",t.lcZ(32,17,o.data.TotalPrice),"\xa0")}}function nm(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){return t.CHM(e),t.oxw().searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",2),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/PurchaseReturnList",a.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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.SupplierID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(20,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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,em,33,19,"div",17),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 am=(()=>{class n extends d.n{constructor(e,o){super(e,"Report/PurchaseReturnList","ReportLoader/ReturnReportLoader"),this.httpService=e,this.csvConverter=o}preGetList(){null===this.pageData.Filter.EntityID&&(this.pageData.Filter.EntityID=C.gT.GuidEmpty)}postInit(){this.menuData.H=this.data.PageTitle}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,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,nm,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,D.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}"]}),n})();function om(n,i){if(1&n&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&n){const e=i.item;t.s9C("title",e.Value),t.xp6(1),t.Oqu(e.Value)}}function rm(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.EntityID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CategoryID=a}),t.YNc(9,om,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(a){return t.CHM(e),t.oxw().pageData.Filter.SalesID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.CustomerID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.PageSize=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 im(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(5,"datepicker",20),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.ProductID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.VariantID=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 lm(n,i){1&n&&(t.TgZ(0,"th",39),t._uU(1," Cost "),t.qZA())}function sm(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Name)}}function pm(n,i){if(1&n&&(t.TgZ(0,"td",43),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}function cm(n,i){1&n&&(t.TgZ(0,"span"),t._uU(1,"%"),t.qZA())}function _m(n,i){if(1&n&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.DiscountAmount))}}function um(n,i){if(1&n&&(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,sm,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,pm,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,cm,2,0,"span",38),t.qZA(),t.YNc(30,_m,3,3,"div",38),t.qZA(),t.TgZ(31,"td",43),t._uU(32),t.ALo(33,"number"),t.qZA(),t.qZA()),2&n){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 gm(n,i){1&n&&t._UZ(0,"td",50)}function dm(n,i){if(1&n&&(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,gm,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&n){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 mm(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",23),t.TgZ(1,"table",24),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,lm,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,um,34,27,"tr",37),t.qZA(),t.YNc(27,dm,14,13,"tfoot",38),t.qZA(),t.qZA()}if(2&n){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 Zm=function(){return["/menu/Reports/Sales_Report/Standard/Products_Sold"]};let hm=(()=>{class n extends d.n{constructor(e,o,a){super(e,"Report/ProductSalesByInvoice","ReportLoader/ProductSalesByInvoice",null,a),this.httpService=e,this.csvConverter=o,this.activatedRoute=a,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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Outlet":return this.compare(a.Outlet,r.Outlet,l);case"Date":return this.compare(a.Date,r.Date,l);case"Number":return this.compare(a.Number,r.Number,l);case"Note":return this.compare(a.Note,r.Note,l);case"CustomerName":return this.compare(a.CustomerName,r.CustomerName,l);case"SalesPerson":return this.compare(a.SalesPerson,r.SalesPerson,l);case"UnitCost":return this.compare(a.UnitCost,r.UnitCost,l);case"UnitPrice":return this.compare(a.UnitPrice,r.UnitPrice,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Discount":return this.compare(a.Discount,r.Discount,l);case"Total":return this.compare(a.TotalAfterDiscount,r.TotalAfterDiscount,l);default:return 0}}):this.originalData}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-invoice-items"]],features:[t.qOj],decls:16,vars:7,consts:[[3,"pageData","text","textChange","onSubmit"],["role","button","title","Export",1,"btn","btn-outline-secondary","mr-6",3,"click"],["aria-hidden","true",1,"fas","fa-upload"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],["id","more-filter","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fas","fa-caret-down"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a Category",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose a Sales",3,"ngModel","items","ngModelChange"],["inputID","Key","requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["type","number","min","0",1,"w-100",3,"ngModel","ngModelChange"],[3,"title"],["id","more-filter","container",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName",1,"w-100",3,"inputTextValue","ngModel","ngModelChange"],["requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"inputTextValue","ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Outlet","width","100px"],["mat-sort-header","Date",2,"width","80px"],["mat-sort-header","Number",2,"width","120px"],["mat-sort-header","Note"],["mat-sort-header","CustomerName"],["mat-sort-header","SalesPerson"],["mat-sort-header","Quantity",1,"align-right",2,"width","60px"],["mat-sort-header","UnitCost","style","width: 120px;","class","align-right",4,"ngIf"],["mat-sort-header","UnitPrice",1,"align-right",2,"width","120px"],["mat-sort-header","Discount",1,"align-right",2,"width","45px"],["mat-sort-header","Total",1,"align-right",2,"width","120px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-sort-header","UnitCost",1,"align-right",2,"width","120px"],["target","_blank",3,"href"],[2,"word-break","break-all",3,"innerHtml"],[1,"text-info"],[1,"text-right"],["class","text-right",4,"ngIf"],[1,"text-right","text-danger"],[1,"table-footer"],["colspan","6",1,"text-right","empty-column"],["class","empty-column",4,"ngIf"],["colspan","2",1,"empty-column"],[1,"empty-column"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(r){return o.pageData.Filter.Number=r})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.TgZ(2,"a",1),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"Report/ProductSalesByInvoice","Invoice_Item_Details.csv")}),t._UZ(3,"i",2),t._uU(4,"Export"),t.qZA(),t.TgZ(5,"a",3),t._uU(6,"Group by Product"),t.qZA(),t.qZA(),t.TgZ(7,"filters"),t.TgZ(8,"div",4),t.YNc(9,rm,22,8,"div",5),t.YNc(10,im,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,mm,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,Zm)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(1),t.Q6J("ngIf",!o.hideMore),t.xp6(5),t.Q6J("ngIf",o.data))},directives:[u.p,g.yS,s.O5,c.w9,p.JJ,p.On,c.ir,D.J,p.qQ,p.wV,p.Fj,f.QB,m.YE,m.nU,s.sg],pipes:[s.uU,s.JJ,T.qU],styles:[""]}),n})();function xm(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"a",7),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.exportCSV(a.csvConverter,"ReportExport/CustomerBrand","Brand_Sales_Analysis.csv")}),t._UZ(1,"i",8),t._uU(2," Export "),t.qZA()}}function Tm(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.ListBrandID=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.From=a}),t.qZA(),t.TgZ(9,"datepicker",12),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.To=a}),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(a){return t.CHM(e),t.oxw().pageData.Filter.RowCount=a}),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 Cm(n,i){1&n&&(t.TgZ(0,"th",28),t._uU(1,"Total Cost"),t.qZA())}function fm(n,i){1&n&&(t.TgZ(0,"th",29),t._uU(1,"Profit"),t.qZA())}function Am(n,i){if(1&n&&(t.TgZ(0,"td",40),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.TotalCost?e.TotalCost:0),"")}}const tt=function(n,i){return{"text-danger":n,"text-success":i}};function qm(n,i){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,tt,e.Profit<0,e.Profit>0)),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.Profit),"")}}function Dm(n,i){if(1&n&&(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,Am,3,3,"td",38),t.YNc(10,qm,3,7,"td",39),t.qZA()),2&n){const e=i.$implicit,o=t.oxw(3);t.xp6(2),t.Oqu(e.BrandName),t.xp6(2),t.hij(" ",t.lcZ(5,5,e.Quantity?e.Quantity:0),""),t.xp6(3),t.hij(" ",t.lcZ(8,7,e.TotalSales?e.TotalSales:0),""),t.xp6(2),t.Q6J("ngIf",o.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",o.pageData.IsCostVisible)}}const ym=function(){return["/menu/Contacts/Contact/Customers/Info"]},vm=function(n){return{ID:n}};function Sm(n,i){if(1&n&&(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,Dm,11,9,"tr",34),t.qZA(),t.qZA(),t.qZA()),2&n){const e=i.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(8,ym))("queryParams",t.VKq(9,vm,e.CustomerID)),t.xp6(1),t.AsE(" ",e.Name," ",e.Title," "),t.xp6(2),t.Oqu(e.Email),t.xp6(2),t.Oqu(e.Mobile),t.xp6(2),t.Oqu(e.City),t.xp6(3),t.Q6J("ngForOf",e.Detail)}}function Mm(n,i){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,1,e.data.Total.TotalCost)," ")}}function bm(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.WLB(4,tt,e.data.Total.Profit<0,e.data.Total.Profit>0)),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.data.Total.Profit)," ")}}function Om(n,i){if(1&n&&(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,Mm,3,3,"td",45),t.YNc(10,bm,3,7,"td",46),t.qZA(),t.qZA()),2&n){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 Jm(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"table",15),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Cm,2,0,"th",24),t.YNc(19,fm,2,0,"th",25),t.qZA(),t.qZA(),t.TgZ(20,"tbody"),t.YNc(21,Sm,13,11,"tr",26),t.qZA(),t.YNc(22,Om,11,8,"tfoot",27),t.qZA(),t.qZA()}if(2&n){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 Im=function(){return["/menu/Reports/Sales_Report/Standard/Top_Brand"]};function wm(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).pageData.Filter.From=a}),t.qZA(),t.TgZ(4,"datepicker",9),t.NdJ("dateChange",function(a){return t.CHM(e),t.oxw(2).pageData.Filter.To=a}),t.qZA(),t.qZA()}if(2&n){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 Fm(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).isCompareData=a})("modelChange",function(){return t.CHM(e),t.oxw(2).OnCompare("Data")}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("model",e.isCompareData)}}function Nm(n,i){if(1&n){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(a){return t.CHM(e),t.oxw(2).Year=a})("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(a){return t.CHM(e),t.oxw(2).Month=a})("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&n){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 Pm(n,i){if(1&n){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(a){return t.CHM(e),t.oxw().pageData.Filter.TypeID=a}),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(a){return t.CHM(e),t.oxw().DateFilterType=a}),t.qZA(),t.qZA(),t.YNc(9,wm,5,2,"div",7),t.YNc(10,Fm,4,1,"div",7),t.YNc(11,Nm,8,4,"div",7),t.qZA()}if(2&n){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 Lm(n,i){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Prev"),t.qZA())}function Qm(n,i){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Now"),t.qZA())}function Ym(n,i){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Trans "),t.qZA())}function Rm(n,i){1&n&&(t.TgZ(0,"th",40),t._uU(1,"Qty"),t.qZA())}function km(n,i){if(1&n&&(t.TgZ(0,"th",41),t._uU(1,"Tax"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"Tax":"SalesNet")}}function Em(n,i){if(1&n&&(t.TgZ(0,"th",41),t._uU(1," Sales + Tax"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"SalesWithTax":"SalesTaxNet")}}function Hm(n,i){1&n&&(t.TgZ(0,"th",33),t._uU(1,"\xb1 (%)"),t.qZA())}function Vm(n,i){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Cost"),t.qZA())}function Bm(n,i){if(1&n&&(t.TgZ(0,"th",41),t._uU(1," Profit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("mat-sort-header",e.pageData.IgnoreTax?"ProfitWithTax":"Profit")}}function Gm(n,i){1&n&&(t.TgZ(0,"th",43),t._uU(1," Target"),t.qZA())}function jm(n,i){1&n&&(t.TgZ(0,"th",44),t._uU(1," Ach(%)"),t.qZA())}function Wm(n,i){if(1&n&&(t.TgZ(0,"td",47),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PrevIndex)}}const $m=function(n,i){return{rankDown:n,rankUp:i,"number key":!0}};function Km(n,i){if(1&n&&(t.TgZ(0,"td",48),t._uU(1),t.qZA()),2&n){const e=t.oxw(),o=e.$implicit,a=e.index;t.Q6J("ngClass",t.WLB(2,$m,o.PrevIndex<a+1,o.PrevIndex>a+1)),t.xp6(1),t.hij(" ",o.CurrentIndex," ")}}function Xm(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Quantity,".0-0"))}}function zm(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Count,".0-0"))}}function t1(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Tax,".0-0"))}}const e1=function(){return["/menu/Reports/Sales_Report/Standard/Detail"]},n1=function(n,i,e){return{From:n,To:i,TypeID:e}};function a1(n,i){if(1&n&&(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&n){const e=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(12,e1))("queryParams",t.kEZ(13,n1,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 et=function(n,i){return{"text-warning":n,"text-success":i,"text-right":!0}};function o1(n,i){if(1&n&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(5,et,e.IsNegative,e.IsPositive)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.Increase,".0-0"),"")}}function r1(n,i){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.Cost,".0-0")," ")}}function i1(n,i){if(1&n&&(t.TgZ(0,"td",52),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 l1(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.SalesTarget,".0-0"),"")}}const w=function(n,i){return{"text-danger":n,"text-success":i}};function s1(n,i){if(1&n&&(t.TgZ(0,"span",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 p1(n,i){if(1&n&&(t.TgZ(0,"span",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){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 c1(n,i){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,s1,3,8,"span",35),t.YNc(2,p1,3,8,"span",35),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function _1(n,i){if(1&n&&(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,Wm,2,1,"td",45),t.YNc(6,Km,2,5,"td",46),t.YNc(7,Xm,3,4,"td",25),t.YNc(8,zm,3,4,"td",25),t.TgZ(9,"td",33),t._uU(10),t.ALo(11,"number"),t.qZA(),t.YNc(12,t1,3,4,"td",25),t.ALo(13,"HideSumZero"),t.YNc(14,a1,7,17,"td",25),t.YNc(15,o1,3,8,"td",35),t.YNc(16,r1,3,4,"td",36),t.YNc(17,i1,3,4,"td",37),t.YNc(18,l1,3,4,"td",25),t.ALo(19,"HideSumZero"),t.YNc(20,c1,3,2,"td",25),t.ALo(21,"HideSumZero"),t.ALo(22,"HideSumZero"),t.qZA()),2&n){const e=i.$implicit,o=i.index,a=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",a.isCompareData),t.xp6(1),t.Q6J("ngIf",a.isCompareData),t.xp6(1),t.Q6J("ngIf",a.data.WithCategory),t.xp6(1),t.Q6J("ngIf",!a.data.WithCategory),t.xp6(2),t.Oqu(t.xi3(11,14,e.SalesNet,".0-0")),t.xp6(2),t.Q6J("ngIf",!a.data.WithCategory&&t.xi3(13,17,a.data.Data,"Tax")),t.xp6(2),t.Q6J("ngIf",!a.data.WithCategory),t.xp6(1),t.Q6J("ngIf",a.isCompareData),t.xp6(1),t.Q6J("ngIf",a.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",a.pageData.IsCostVisible),t.xp6(1),t.Q6J("ngIf",t.xi3(19,20,a.data.Data,"SalesTarget")),t.xp6(2),t.Q6J("ngIf",t.xi3(21,23,a.data.Data,"AchievementWithTax")||t.xi3(22,26,a.data.Data,"Achievement"))}}function u1(n,i){1&n&&t._UZ(0,"td",53)}function g1(n,i){1&n&&t._UZ(0,"td",53)}function d1(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 m1(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 Z1(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 h1(n,i){if(1&n&&(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&n){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 x1(n,i){if(1&n&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.WLB(5,et,e.comparation<0,e.comparation>0)),t.xp6(1),t.hij(" ",t.xi3(2,2,e.comparation,".0-0")," ")}}function T1(n,i){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 C1(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 f1(n,i){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 A1(n,i){if(1&n&&(t.TgZ(0,"td",52),t.YNc(1,C1,4,7,"span",7),t.YNc(2,f1,4,7,"span",7),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function q1(n,i){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){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 D1(n,i){if(1&n&&(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&n){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 y1(n,i){if(1&n&&(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&n){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 v1(n,i){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,D1,9,26,"span",35),t.YNc(2,y1,9,26,"span",35),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.pageData.IgnoreTax),t.xp6(1),t.Q6J("ngIf",e.pageData.IgnoreTax)}}function S1(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"table",17),t.NdJ("matSortChange",function(a){return t.CHM(e),t.oxw().sortData(a)}),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,Lm,2,0,"th",20),t.YNc(9,Qm,2,0,"th",20),t.YNc(10,Ym,2,0,"th",21),t.YNc(11,Rm,2,0,"th",22),t.TgZ(12,"th",23),t._uU(13,"Sales"),t.qZA(),t.YNc(14,km,2,1,"th",24),t.ALo(15,"HideSumZero"),t.YNc(16,Em,2,1,"th",24),t.YNc(17,Hm,2,0,"th",25),t.YNc(18,Vm,2,0,"th",26),t.YNc(19,Bm,2,1,"th",24),t.YNc(20,Gm,2,0,"th",27),t.ALo(21,"HideSumZero"),t.YNc(22,jm,2,0,"th",28),t.ALo(23,"HideSumZero"),t.ALo(24,"HideSumZero"),t.qZA(),t.qZA(),t.TgZ(25,"tbody"),t.YNc(26,_1,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,u1,1,0,"td",32),t.YNc(32,g1,1,0,"td",32),t.YNc(33,d1,4,7,"td",25),t.YNc(34,m1,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,Z1,4,7,"td",25),t.ALo(40,"HideSumZero"),t.YNc(41,h1,5,7,"td",34),t.YNc(42,x1,3,8,"td",35),t.YNc(43,T1,4,7,"td",36),t.YNc(44,A1,3,2,"td",37),t.YNc(45,q1,4,7,"td",25),t.ALo(46,"HideSumZero"),t.YNc(47,v1,3,2,"td",25),t.ALo(48,"HideSumZero"),t.ALo(49,"HideSumZero"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){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 b1(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"div"),t.TgZ(1,"h6"),t._uU(2,"Interval for Clustering"),t.qZA(),t.TgZ(3,"input",6),t.NdJ("ngModelChange",function(a){return t.CHM(e),t.oxw().pageData.Filter.Interval=a}),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.Interval)}}function O1(n,i){if(1&n&&(t.TgZ(0,"tr"),t.TgZ(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",14),t._uU(4),t.ALo(5,"number"),t.qZA(),t._UZ(6,"td"),t.qZA()),2&n){const e=i.$implicit;t.xp6(2),t.Oqu(e.Key),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Value))}}function J1(n,i){if(1&n&&(t.TgZ(0,"div",7),t.TgZ(1,"table",8),t.TgZ(2,"thead",9),t.TgZ(3,"tr",10),t.TgZ(4,"th",11),t._uU(5,"Interval"),t.qZA(),t.TgZ(6,"th",12),t._uU(7,"Amount Of Products"),t.qZA(),t._UZ(8,"th"),t.qZA(),t.qZA(),t.TgZ(9,"tbody"),t.YNc(10,O1,7,4,"tr",13),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(10),t.Q6J("ngForOf",e.data)}}const I1=[{path:"Sales_Report/Standard/Detail",component:Lt},{path:"Sales_Report/Standard/Summary",component:ue},{path:"Sales_Report/Standard/Top_Brand",component:qe},{path:"Sales_Report/Standard/Top_Brand/Brand_Sales_Analysis",component:(()=>{class n extends d.n{constructor(e,o){super(e,"Report/CustomerBrand","ReportLoader/CustomerBrand"),this.httpService=e,this.csvConverter=o}sortData(e){const o=this.data.Data.slice();e.active&&""!==e.direction?(this.data.Data=o.sort((a,r)=>{const l="asc"===e.direction;switch(a.Name=null==a.Name?"":a.Name,r.Name=null==r.Name?"":r.Name,e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),r.Name.toLocaleLowerCase(),l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);default:return 0}}),this.data.Detail=o.sort((a,r)=>{const l="asc"===e.direction;switch(e.active){case"SalesNTax":return this.compare(a.TotalSales,r.TotalSales,l);case"Cost":return this.compare(a.TotalCost,r.TotalCost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);default:return 0}})):this.data.Data=o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-brand-sales-analysis"]],features:[t.qOj],decls:11,vars:7,consts:[[3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary mr-6",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"d-flex"],["container","",4,"ngIf"],[1,"container-fluid","mt-5"],["class","table-responsive",4,"ngIf"],[1,"btn","btn-outline-secondary","mr-6",3,"click"],[1,"fa","fa-upload"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose Brand",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["type","text","autoNum","",3,"ngModel","ngModelChange"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name","text","Customer",2,"width","280px"],[2,"width","190px"],[2,"width","155px"],[2,"width","130px"],[2,"min-width","124px"],["mat-sort-header","Quantity","text","Qty",1,"text-right",2,"min-width","66px"],["mat-sort-header","SalesNTax","text","Total Sales",1,"text-right",2,"min-width","112px"],["mat-sort-header","Cost","text","Total Cost","class","text-right","style","min-width: 113px",4,"ngIf"],["mat-sort-header","Profit","text","Profit","class","text-right","style","min-width: 114px",4,"ngIf"],["class","border-bottom",4,"ngFor","ngForOf"],[4,"ngIf"],["mat-sort-header","Cost","text","Total Cost",1,"text-right",2,"min-width","113px"],["mat-sort-header","Profit","text","Profit",1,"text-right",2,"min-width","114px"],[1,"border-bottom"],[3,"routerLink","queryParams"],["colspan","5",1,"p-0"],[1,"w-100","border-top-0"],[4,"ngFor","ngForOf"],[1,"border-top-0","text-left",2,"min-width","124px"],[1,"border-top-0",2,"min-width","66px"],[1,"border-top-0","text-right",2,"min-width","112px"],["class","border-top-0 text-right","style","min-width: 113px",4,"ngIf"],["class","border-top-0 text-right","style","min-width: 114px",3,"ngClass",4,"ngIf"],[1,"border-top-0","text-right",2,"min-width","113px"],[1,"border-top-0","text-right",2,"min-width","114px",3,"ngClass"],[1,"footer"],["colspan","5"],[1,"text-right"],["class","text-right",4,"ngIf"],["class","text-right",3,"ngClass",4,"ngIf"],[1,"text-right",3,"ngClass"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,xm,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,Tm,14,6,"div",4),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.TgZ(9,"div",5),t.YNc(10,Jm,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,Im)),t.xp6(4),t.Q6J("ngIf",o.pageData.Filter),t.xp6(3),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,g.yS,c.w9,p.JJ,p.On,f.QB,p.Fj,M.b,m.YE,m.nU,s.sg,s.mk],pipes:[s.JJ],styles:[""]}),n})()},{path:"Sales_Report/Standard/Top_Customers",component:ke},{path:"Sales_Report/Standard/Top_Customers/Top_Customers_By_Age",component:ze},{path:"Sales_Report/Standard/Top_Customers/Top_Customers_By_Gender",component:cn},{path:"Sales_Report/Standard/Top_Customers/Top_Suppliers",component:Dn},{path:"Sales_Report/Standard/Products_Sold",component:pa},{path:"Sales_Report/Standard/Products_Sold/Product_Sales_by_Outlet",component:Ca},{path:"Sales_Report/Standard/Products_Sold/Product_Sales",component:Ua},{path:"Sales_Report/Standard/Products_Sold/Product_Sales_Vs_Delivery",component:Va},{path:"Sales_Report/Standard/Category_Sold",component:_o},{path:"Sales_Report/Standard/Category_Sold/Category_By_Outlet",component:Do},{path:"Sales_Report/Standard/Category_Sold/Category",component:Mo},{path:"Sales_Report/Standard/Peak_Hour",component:Lo},{path:"Sales_Report/Standard/Peak_Hour/Visitor",component:Vo},{path:"Sales_Report/Standard/Peak_Hour/Peak_Hour",component:rr},{path:"Sales_Report/Standard/Daily",component:mr},{path:"Sales_Report/Standard/Daily/Daily_Table",component:ri},{path:"Sales_Report/Standard/Daily/Yearly",component:k},{path:"Sales_Report/Standard/Monthly",component:qr},{path:"Sales_Report/Standard/Monthly/Monthly_Table",component:yi},{path:"Sales_Report/Standard/Monthly/Yearly_Table",component:k},{path:"Sales_Report/Standard/Daily/Daily_Quantity",component:Ii},{path:"Sales_Report/Standard/Daily/Daily_Quantity/Monthly",component:Li},{path:"Sales_Report/Standard/Outlet_Performance",component:Zl},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Graphic",component:Dl},{path:"Sales_Report/Standard/Outlet_Performance/Detail",component:Ps},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Group_Performance",component:_p},{path:"Sales_Report/Standard/Outlet_Performance/Outlet_Monthly_Perfomance",component:Sp},{path:"Sales_Report/Standard/Sales_Order_Type",component:(()=>{class n extends d.n{constructor(e,o){super(e,"Report/OutletPerformanceByType","ReportLoader/OutletPerformance"),this.httpService=e,this.csvConverter=o,this.isCompareData=!1,this.hideMore=!0,this.DateFilterType=!1,this.Months=[{ID:0,Label:"Jan"},{ID:1,Label:"Feb"},{ID:2,Label:"Mar"},{ID:3,Label:"Apr"},{ID:4,Label:"May"},{ID:5,Label:"Jun"},{ID:6,Label:"Jul"},{ID:7,Label:"Aug"},{ID:8,Label:"Sep"},{ID:9,Label:"Oct"},{ID:10,Label:"Nov"},{ID:11,Label:"Dec"}],this.Years=C.gT.GenerateYears((new Date).getFullYear(),11,!0),this.RadioDateFilterType=[{Key:!0,Value:"Month"},{Key:!1,Value:"Custom"}];const a=new Date;this.Year=a.getFullYear(),this.Month=a.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((a,r)=>{const l="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,r.Name,l);case"Count":return this.compare(a.Count,r.Count,l);case"Quantity":return this.compare(a.Quantity,r.Quantity,l);case"Gross":return this.compare(a.Gross,r.Gross,l);case"SalesNet":case"SalesTaxNet":return this.compare(a.SalesNet,r.SalesNet,l);case"Tax":return this.compare(a.Tax,r.Tax,l);case"SalesWithTax":return this.compare(a.SalesWithTax,r.SalesWithTax,l);case"Cost":return this.compare(a.Cost,r.Cost,l);case"Profit":return this.compare(a.Profit,r.Profit,l);case"ProfitWithTax":return this.compare(a.ProfitWithTax,r.ProfitWithTax,l);case"Expense":return this.compare(a.Expense,r.Expense,l);case"NetProfit":return this.compare(a.NetProfit,r.NetProfit,l);case"Target":case"SalesTarget":return this.compare(a.SalesTarget,r.SalesTarget,l);case"Achievement":return this.compare(a.Achievement,r.Achievement,l);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-by-sales-order-type"]],features:[t.qOj],decls:6,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],[1,"d-flex"],["container","",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose..",3,"ngModel","items","ngModelChange"],["name","Date Filter",3,"model","options","modelChange"],[4,"ngIf"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","Compare",3,"model","modelChange"],[1,"row"],[1,"col-6","pr-2"],["placeholder","Year",3,"ngModel","items","ngModelChange","change","clear"],[1,"col-6","pl-2"],["bindLabel","Label","bindValue","ID","placeholder","Month",3,"ngModel","items","ngModelChange","change","clear"],[1,"container-fluid","mt-5"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"freeze","header"],["style","width: 35px;",4,"ngIf"],["mat-sort-header","Count","class","align-right",4,"ngIf"],["mat-sort-header","Quantity","class","align-right",4,"ngIf"],["mat-sort-header","SalesNet",1,"align-right"],["class","align-right",3,"mat-sort-header",4,"ngIf"],["class","text-right",4,"ngIf"],["mat-sort-header","Cost","class","align-right",4,"ngIf"],["mat-sort-header","Target","class","align-right",4,"ngIf"],["mat-sort-header","Achievement","class","align-right","title","Achievement",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"freeze","body"],["class","empty-column",4,"ngIf"],[1,"text-right"],["class","text-right text-primary",4,"ngIf"],[3,"ngClass",4,"ngIf"],["class","text-right text-danger",4,"ngIf"],["class","text-right text-success",4,"ngIf"],[2,"width","35px"],["mat-sort-header","Count",1,"align-right"],["mat-sort-header","Quantity",1,"align-right"],[1,"align-right",3,"mat-sort-header"],["mat-sort-header","Cost",1,"align-right"],["mat-sort-header","Target",1,"align-right"],["mat-sort-header","Achievement","title","Achievement",1,"align-right"],["style","width: 35px; text-align: center",4,"ngIf"],["style","width: 35px; text-align: center",3,"ngClass",4,"ngIf"],[2,"width","35px","text-align","center"],[2,"width","35px","text-align","center",3,"ngClass"],[3,"routerLink","queryParams"],[3,"ngClass"],[1,"text-right","text-danger"],[1,"text-right","text-success"],[1,"empty-column"],[1,"text-right","text-primary"],[1,"font-weight-bold"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"filters"),t.TgZ(2,"div",1),t.YNc(3,Pm,12,7,"div",2),t.qZA(),t.qZA(),t.TgZ(4,"content"),t.YNc(5,S1,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,q.P,f.QB,m.YE,m.nU,s.sg,s.mk,g.yS],pipes:[T.aQ,s.JJ,T.qU,s.uU],styles:[""]}),n})()},{path:"Sales_Report/Standard/Sales_Person",component:ec},{path:"Sales_Report/Standard/Sales_Person/Sales_Commission",component:dc},{path:"Sales_Report/Standard/Sales_Person/Commission_Report",component:vc},{path:"Sales_Report/Standard/Sales_Person/Commission_Report/Commission_Report_Detail",component:Uc},{path:"Sales_Report/Standard/Discounted_Sales",component:jd},{path:"Purchases_Report/Detail",component:s_},{path:"Purchases_Report/Summary",component:d_},{path:"Purchases_Report/Top_Supplier",component:A_},{path:"Purchases_Report/Product_Bought",component:b_},{path:"Purchases_Report/Product_Purchase_History",component:W_},{path:"Purchases_Report/Daily_Purchase",component:tu},{path:"Purchases_Report/Daily_Purchase/Monthly_Purchase",component:ou},{path:"Purchases_Report/Purchase_Volume",component:iu},{path:"Purchases_Report/Purchased_Sales_Report",component:du},{path:"Purchases_Report/Outlet_Performance",component:Eu},{path:"Purchases_Report/Outlet_Performance/Outlet_Group_Performance",component:_g},{path:"Purchases_Report/Outlet_Performance/Outlet_Monthly_Perfomance",component:yg},{path:"Sales_Report/Group/City",component:Jg},{path:"Sales_Report/Group/Type",component:Pg},{path:"Sales_Report/Group/Customer_Group",component:kg},{path:"Sales_Report/Group/Sales_Group",component:$g},{path:"Sales_Report/Advanced/Tax_Report",component:rd},{path:"Sales_Report/Advanced/Tax_Report/By_Outlet",component:Zd},{path:"Sales_Report/Advanced/Product_Life_Cycle",component:qd},{path:"Sales_Report/Advanced/Product_Profit",component:Jd},{path:"Sales_Report/Advanced/Exchanged_Sales",component:Nd},{path:"Sales_Report/Advanced/Variant_Model_Rank",component:kd},{path:"Sales_Report/Standard/Discounted_Sales/Discounted_Products",component:Gc},{path:"Return/Sales_Return",component:Xd},{path:"Return/Purchase_Return",component:am},{path:"Sales_Report/Standard/Products_Sold/Invoice_Items",component:hm},{path:"Sales_Report/Standard/Price_Analysis",component:(()=>{class n extends d.n{constructor(e,o){super(e,"Report/UnitPriceAnalysis","ReportLoader/PriceAnalysis"),this.httpService=e,this.csvConverter=o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_.O),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-price-analysis"]],features:[t.qOj],decls:10,vars:4,consts:[[3,"pageData","hideSearchBox","onSubmit"],["container",""],[4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fas","fa-upload","mr-3"],["class","container-fluid mt-5",4,"ngIf"],["type","number",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","250px"],[2,"width","150px"],[4,"ngFor","ngForOf"],[1,"text-right"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"filters"),t.TgZ(2,"div",1),t.YNc(3,b1,4,1,"div",2),t.qZA(),t.qZA(),t.TgZ(4,"actions"),t.TgZ(5,"button",3),t.NdJ("click",function(){return o.exportCSV(o.csvConverter,"ReportExport/PriceAnalysis","PriceAnalysis.csv")}),t._UZ(6,"i",4),t._uU(7," Export "),t.qZA(),t.qZA(),t.TgZ(8,"content"),t.YNc(9,J1,11,1,"div",5),t.qZA(),t.qZA()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(6),t.Q6J("ngIf",o.data))},directives:[u.p,s.O5,p.wV,p.Fj,p.JJ,p.On,s.sg],pipes:[s.JJ],styles:[""]}),n})()},{path:"",redirectTo:"Sales_Report/Standard/Products_Sold",pathMatch:"full"}];let U1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[[g.Bz.forChild(I1)],g.Bz]}),n})();var w1=A(1768),F1=A(2060),N1=A(315);let P1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({providers:[s.uU],imports:[[u.R,T.dr,s.ez,U1,c.A0,f.ZU,p.u5,p.UX,at.FA,P.XK,ot.Fk,rt.c,P.Ng,it.Nh,L.TU,lt.vV,c.A0,m.JX,nt.p0,w1.X,I.d,q.K,U.N,b.Z,D.Q,F1.I,N1.T]]}),n})()}}]);