dealpos 11.9.0 → 11.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/POS/1729.b0ca35fa67d28544.js +1 -0
- package/POS/{1930.bb031f48d8fe64c8.js → 1930.e9b016102ad85c78.js} +1 -1
- package/POS/1969.a82eb76a17faadb7.js +1 -0
- package/POS/{2141.03507a7f6beea26a.js → 2141.bfe2c038c7bf7347.js} +1 -1
- package/POS/2489.38c045d44ef44a61.js +1 -0
- package/POS/2545.349f928367c400ee.js +1 -0
- package/POS/3208.7b3c9a94ef2cc2ab.js +1 -0
- package/POS/{3353.200953732642656b.js → 3353.ca15f574f4465cf5.js} +1 -1
- package/POS/{3632.5438ea42a34320b8.js → 3632.166d850b3e7d06eb.js} +1 -1
- package/POS/{4020.d9617c2c6f7cdd9a.js → 4020.bfd8a691f4632812.js} +1 -1
- package/POS/4177.66dde2ae420ee384.js +1 -0
- package/POS/4537.e392493abe4f2ac3.js +1 -0
- package/POS/5418.508566538fe47f17.js +1 -0
- package/POS/5533.ed86d7ff065dbc45.js +1 -0
- package/POS/{6268.247e25590ee250d7.js → 6268.8034431764728bfb.js} +1 -1
- package/POS/7266.24046cc8be44426f.js +1 -0
- package/POS/{7998.5d0e70bdd321ae03.js → 7998.8474b87eb6571409.js} +1 -1
- package/POS/8006.f6b9b6d2913d524f.js +1 -0
- package/POS/8105.75bd7a8301f7f8eb.js +1 -0
- package/POS/8131.9518daf1e4493281.js +1 -0
- package/POS/9207.7460332ac008f6d4.js +1 -0
- package/POS/9564.6cfb458c88d53d3b.js +1 -0
- package/POS/9826.e79f9ff08369c36c.js +1 -0
- package/POS/9844.c7d6bf51b4fecc1a.js +1 -0
- package/POS/index.html +2 -2
- package/POS/{main.3a1387cba0ccf083.js → main.7bc4f650b804fc33.js} +1 -1
- package/POS/runtime.39db9884265cbae4.js +1 -0
- package/package.json +1 -1
- package/POS/1729.a24fece3a6093031.js +0 -1
- package/POS/1969.af5d7f10c4374b23.js +0 -1
- package/POS/2489.38e2063136aa88c2.js +0 -1
- package/POS/2545.7f6dd61f3c3e9d86.js +0 -1
- package/POS/3208.a56d9977533f0af2.js +0 -1
- package/POS/4177.882c43655e83e90f.js +0 -1
- package/POS/4537.a9b79438f21b32e0.js +0 -1
- package/POS/5418.513c3e7df4407d68.js +0 -1
- package/POS/5533.40980912b87d5ce5.js +0 -1
- package/POS/7266.9ce3015bc3d43a64.js +0 -1
- package/POS/8006.02c9f93ad9584ffd.js +0 -1
- package/POS/8105.5d3e09c03144b231.js +0 -1
- package/POS/8131.e944ac838fc91d56.js +0 -1
- package/POS/9207.f56fb5b179f0b5a9.js +0 -1
- package/POS/9564.7842ecfe7c7931df.js +0 -1
- package/POS/9826.045231aaf903e274.js +0 -1
- package/POS/9844.dccb982ca71c012e.js +0 -1
- package/POS/runtime.2deb4a2a0270fd0d.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1729],{24424:(V,S,p)=>{p.d(S,{O:()=>m});var c=p(69751),l=p(94650);let m=(()=>{class q{constructor(){this.csvPrefixFormat=""}convertToCSV(T,f){let Z;if("string"==typeof T)Z=T;else{var y="object"==typeof T?T:JSON.parse(T);Z=this.transformToCSVStringFormat(y)}this.exportCSV(Z,f)}isNumeric(T){return/^-?\d+$/.test(T)}parseCSV(T){return new c.y(Z=>{let y=new FileReader;y.onload=()=>{let U=y.result.split(/\r\n|\n/),g=U[0].split(","),s=[];for(let t=0;t<U.length;t++){let u=U[t].split(",");if(u.length==g.length){let x=[];for(let v=0;v<g.length;v++)this.isNumeric(u[v])?x.push(parseFloat(u[v])):x.push(u[v]);s.push(x)}else{var b=U[t].split(new RegExp(',(?![^"]*"(?:(?:[^"]*"){2})*[^"]*$)'));let x=[];for(let v=0;v<b.length;v++)this.isNumeric(b[v])?x.push(parseFloat(b[v])):x.push(b[v]);s.push(x)}}Z.next(s)},y.readAsBinaryString(T)})}transformToCSVStringFormat(T){if(!T||!T.length)return;const Z=Object.keys(T[0]);return T.map(w=>Z.map(U=>{let g=w[U]??"";return g=g instanceof Date?g.toLocaleString():g.toString().replace(/"/g,'""'),g.search(/("|,|\n)/g)>=0&&(g=`"${g}"`),g}).join(",")).join("\n")}exportCSV(T,f){var Z=new Blob([T],{type:"text/csv;charset=utf8;"}),y=document.createElement("a");y.setAttribute("href",window.URL.createObjectURL(Z)),y.setAttribute("download",f),document.body.appendChild(y),y.click(),document.body.removeChild(y)}}return q.\u0275fac=function(T){return new(T||q)},q.\u0275prov=l.Yz7({token:q,factory:q.\u0275fac,providedIn:"root"}),q})()},7210:(V,S,p)=>{p.r(S),p.d(S,{InventoryModule:()=>hi});var c=p(36895),l=p(24006),m=p(96308),q=p(7155),M=p(99602),T=p(3238),f=p(71948),Z=p(44144),y=p(3848),w=p(59798),U=p(90811),g=p(36806),s=p(67327),b=p(23410),t=p(94650),u=p(89156),x=p(24424),v=p(97185),D=p(51161),I=p(30273),h=p(88796),F=p(11594),O=p(10266);function st(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",14)(1,"a",15),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/ByCategory",a.GetCSVName()))}),t._UZ(2,"i",16),t._uU(3," Export "),t.qZA(),t._UZ(4,"button",17),t.TgZ(5,"ul",18)(6,"li",19)(7,"a",20),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/InventoryProductByOutlet","ProductQuantityWithOutlet.csv"))}),t._uU(8,"Export With Outlet"),t.qZA()()()()}}function ut(n,r){if(1&n&&(t.TgZ(0,"span",21),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function dt(n,r){if(1&n&&(t.TgZ(0,"span",21),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}const R=function(){return["/menu/Products/Catalog/Variants/Info"]},Y=function(n){return{ID:n}};function gt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"a",56),t._uU(2),t.qZA(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,R))("queryParams",t.VKq(4,Y,e.ID)),t.xp6(1),t.Oqu(e.Model)}}function mt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"span",60),t._uU(2),t.qZA(),t.BQk()),2&n){const e=t.oxw(2).$implicit;t.xp6(2),t.Oqu(e.Model)}}function xt(n,r){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.hij(" - ",e.Code," ")}}function ft(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"a",56)(2,"h4",59),t._uU(3),t.qZA(),t.YNc(4,mt,3,1,"ng-container",48),t.YNc(5,xt,2,1,"ng-container",48),t.qZA(),t.BQk()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(5,R))("queryParams",t.VKq(6,Y,e.ID)),t.xp6(2),t.Oqu(o.Name),t.xp6(1),t.Q6J("ngIf","Default"!==e.Model),t.xp6(1),t.Q6J("ngIf",o.Code)}}const ht=function(n){return{VariantID:n}};function Tt(n,r){if(1&n&&(t.TgZ(0,"div")(1,"a",61),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=t.oxw().$implicit,o=t.oxw(5);t.xp6(1),t.Q6J("queryParams",t.VKq(5,ht,e.ID)),t.xp6(1),t.hij(" (",t.xi3(3,2,e.Allocated,"."+o.data.Decimal+"-"+o.data.Decimal)," allocated) ")}}function Ct(n,r){if(1&n&&(t.TgZ(0,"div")(1,"a",62),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=t.oxw().$implicit,o=t.oxw(5);t.xp6(2),t.hij(" (",t.xi3(3,1,e.Available,"."+o.data.Decimal+"-"+o.data.Decimal)," available) ")}}function Zt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td"),t.YNc(3,gt,3,6,"ng-container",48),t.YNc(4,ft,6,8,"ng-container",48),t.qZA(),t.TgZ(5,"td",26),t._uU(6),t.qZA(),t.TgZ(7,"td",27),t._uU(8),t.ALo(9,"number"),t.YNc(10,Tt,4,7,"div",48),t.YNc(11,Ct,4,4,"div",48),t.qZA(),t.TgZ(12,"td",57)(13,"span",54),t._uU(14),t.ALo(15,"number"),t.qZA(),t._uU(16),t.qZA(),t.TgZ(17,"td",29),t._uU(18),t.ALo(19,"number"),t.qZA(),t.TgZ(20,"td",30),t._uU(21),t.ALo(22,"number"),t.qZA(),t.TgZ(23,"td",58),t._uU(24),t.ALo(25,"number"),t.qZA(),t.TgZ(26,"td",31),t._uU(27),t.qZA()(),t.BQk()),2&n){const e=r.$implicit,o=t.oxw().$implicit,a=t.oxw(4);t.xp6(1),t.Tol(e.Quantity<=e.MinStock?"bg-low-danger border-bottom":"border-bottom"),t.xp6(2),t.Q6J("ngIf",o.Variants.length>1),t.xp6(1),t.Q6J("ngIf",o.Variants.length<=1),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.hij(" ",t.xi3(9,19,e.Quantity,"."+a.data.Decimal+"-"+a.data.Decimal)," "),t.xp6(2),t.Q6J("ngIf",e.Allocated>0),t.xp6(1),t.Q6J("ngIf",e.Allocated>0&&e.Available>0),t.xp6(2),t.Q6J("hidden",1==e.UnitQuantity),t.xp6(1),t.hij(" = \xa0 ",t.lcZ(15,22,e.Quantity*e.UnitQuantity)," "),t.xp6(2),t.hij(" ",e.UOMName," "),t.xp6(1),t.Q6J("hidden",!a.roleService.product.Cost),t.xp6(1),t.hij(" ",t.lcZ(19,24,e.UnitCost),""),t.xp6(2),t.Q6J("hidden",a.roleService.sell.PriceVisibleRestriction),t.xp6(1),t.hij(" ",t.lcZ(22,26,e.UnitPrice),""),t.xp6(2),t.Q6J("hidden",!a.roleService.product.Cost),t.xp6(1),t.hij(" ",t.xi3(25,28,e.Margin,"1.0-2"),""),t.xp6(2),t.Q6J("hidden",!a.roleService.sell.Discount),t.xp6(1),t.hij(" ",e.Discount,"")}}const yt=function(){return["/menu/Products/Catalog/Products/Info"]};function vt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr",54)(2,"td",55)(3,"h3")(4,"a",56),t._uU(5),t.TgZ(6,"small",54),t._uU(7,"- "),t.qZA(),t._uU(8),t.qZA(),t.TgZ(9,"small"),t._uU(10),t.ALo(11,"number"),t.qZA()()()(),t.YNc(12,Zt,28,31,"ng-container",32),t.BQk()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("hidden",e.Variants.length<=1),t.xp6(3),t.Q6J("routerLink",t.DdM(10,yt))("queryParams",t.VKq(11,Y,e.ID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(1),t.Q6J("hidden",!e.Code),t.xp6(2),t.hij(" ",e.Code," "),t.xp6(2),t.hij("[ Product Qty : ",t.lcZ(11,8,e.VariantsQuantity)," ]"),t.xp6(2),t.Q6J("ngForOf",e.Variants)}}function Dt(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",52)(3,"h3",53),t._uU(4),t.qZA()()(),t.YNc(5,vt,13,13,"ng-container",32),t.BQk()),2&n){const e=r.$implicit;t.xp6(4),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngForOf",e.Products)}}function It(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"span",63),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryReportRowsCount"))}),t.TgZ(1,"i",64),t._uU(2,"?"),t.qZA()()}}function bt(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(t.lcZ(2,1,e.listTotal))}}function At(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",65),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.NextPage(!0))}),t._UZ(1,"i",66),t._uU(2," Next"),t.qZA()}}function qt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",67),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryReportRowsCount",!0))}),t._UZ(1,"i",68),t._uU(2," Show All"),t.qZA()}}const Ot=function(){return["/menu/Inventory/Quantity/Valuation/Summary"]};function wt(n,r){if(1&n&&(t.TgZ(0,"div",22)(1,"div",23)(2,"table",24)(3,"thead",25)(4,"tr")(5,"th"),t._uU(6," Name "),t.qZA(),t.TgZ(7,"th",26),t._uU(8," Code "),t.qZA(),t.TgZ(9,"th",27),t._uU(10," Qty "),t.qZA(),t.TgZ(11,"th",28),t._uU(12," uom "),t.qZA(),t.TgZ(13,"th",29),t._uU(14," Cost "),t.qZA(),t.TgZ(15,"th",30),t._uU(16," Price "),t.qZA(),t.TgZ(17,"th",30),t._uU(18," Margin(%) "),t.qZA(),t.TgZ(19,"th",31),t._uU(20," Discount(%) "),t.qZA()()(),t.TgZ(21,"tbody"),t.YNc(22,Dt,6,2,"ng-container",32),t.qZA()(),t.TgZ(23,"div",33)(24,"div",34)(25,"p",35),t._uU(26,"*Incomplete Inventory Aggregate"),t.qZA(),t.TgZ(27,"a",36),t._uU(28,"View Total Inventory"),t.qZA()(),t.TgZ(29,"div",37)(30,"table",38)(31,"thead",25)(32,"tr")(33,"th",39),t._uU(34," Total Quantity "),t.qZA(),t.TgZ(35,"th",39),t._uU(36," Quantity * Content "),t.qZA(),t.TgZ(37,"th",40),t._uU(38," Total Inventory COST ( "),t._UZ(39,"span",41),t.ALo(40,"number"),t._uU(41,"%) "),t.qZA(),t.TgZ(42,"th",40),t._uU(43," Total Inventory Value when SOLD "),t.qZA()()(),t.TgZ(44,"tbody")(45,"tr"),t._UZ(46,"td",42),t.ALo(47,"number"),t._UZ(48,"td",42),t.ALo(49,"number"),t._UZ(50,"td",43),t.ALo(51,"number"),t._UZ(52,"td",43),t.ALo(53,"number"),t.qZA()()()()(),t.TgZ(54,"div",44)(55,"div",45)(56,"div",46),t._uU(57),t.ALo(58,"number"),t.YNc(59,It,3,0,"span",47),t.YNc(60,bt,3,3,"span",48),t._uU(61),t.qZA()(),t.TgZ(62,"div",49),t.YNc(63,At,3,0,"a",50),t.YNc(64,qt,3,0,"a",51),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("hidden",!e.roleService.product.Cost),t.xp6(2),t.Q6J("hidden",e.roleService.sell.PriceVisibleRestriction),t.xp6(2),t.Q6J("hidden",!e.roleService.product.Cost),t.xp6(2),t.Q6J("hidden",!e.roleService.sell.Discount),t.xp6(3),t.Q6J("ngForOf",e.infiniteList),t.xp6(5),t.Q6J("routerLink",t.DdM(36,Ot)),t.xp6(10),t.Q6J("hidden",!e.roleService.product.Cost),t.xp6(2),t.Q6J("hidden",0==e.totalAggregate.TotalSales)("innerHtml",t.lcZ(40,22,e.totalAggregate.TotalCost/e.totalAggregate.TotalSales*100),t.oJD),t.xp6(3),t.Q6J("hidden",e.roleService.sell.PriceVisibleRestriction),t.xp6(4),t.Q6J("innerHtml",t.xi3(47,24,e.totalAggregate.TotalQuantity,"."+e.data.Decimal+"-"+e.data.Decimal),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.xi3(49,27,e.totalAggregate.TotalUnitQuantity,"."+e.data.Decimal+"-"+e.data.Decimal),t.oJD),t.xp6(2),t.Q6J("hidden",!e.roleService.product.Cost)("innerHtml",t.lcZ(51,30,e.totalAggregate.TotalCost),t.oJD),t.xp6(2),t.Q6J("hidden",e.roleService.sell.PriceVisibleRestriction)("innerHtml",t.lcZ(53,32,e.totalAggregate.TotalSales),t.oJD),t.xp6(5),t.hij(" Showing 1 - ",t.lcZ(58,34,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)}}function Mt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.FilterText=a)})("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,st,9,0,"div",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div")(6,"h6"),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"ng-select",4),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.ListIDs=a)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Brand"),t.qZA(),t.TgZ(12,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.BrandID=a)}),t.YNc(13,ut,2,2,"ng-template",6),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Category"),t.qZA(),t.TgZ(17,"ng-select",7),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(18,dt,2,2,"ng-template",6),t.qZA()(),t.TgZ(19,"div",8)(20,"h6"),t._uU(21,"Quantity From - To"),t.qZA(),t.TgZ(22,"input",9),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityFrom=a)}),t.qZA(),t._uU(23," - "),t.TgZ(24,"input",10),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityTo=a)}),t.qZA()(),t.TgZ(25,"div",11)(26,"h6"),t._uU(27,"Discontinued"),t.qZA(),t.TgZ(28,"radio-options",12),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()()()(),t.TgZ(29,"content"),t.YNc(30,wt,65,37,"div",13),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.FilterText),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(6),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.ListIDs),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Brands)("ngModel",e.pageData.Filter.BrandID),t.xp6(5),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.QuantityFrom),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.QuantityTo),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued),t.xp6(2),t.Q6J("ngIf",e.data)}}let j=(()=>{class n extends b.X{constructor(e,o,a,i){super(e,"Inventory/InventoryReport","InventoryLoader/InventoryReport"),this.csvConverter=o,this.toastrService=a,this.roleService=i,this.totalAggregate={TotalUnitQuantity:0,TotalCost:0,TotalSales:0,TotalQuantity:0}}preGetList(){null==this.pageData.Filter.QuantityFrom&&delete this.pageData.Filter.QuantityFrom,null==this.pageData.Filter.QuantityTo&&delete this.pageData.Filter.QuantityTo}preSearchFromPageOne(){const e=this.pageData.Filter.QuantityFrom,o=this.pageData.Filter.QuantityTo;s.gT.IsNotEmpty(e)&&s.gT.IsNotEmpty(o)&&e>o&&this.toastrService.warning("Filter Quantity from cannot be more than quantity to","Warning"),this.pageData.Filter.RowCount=this.oldRowCount,this.goToLast=!1}GetCSVName(){return s.gT.IsEmpty(this.pageData.Filter.EntityID)?"Inventory.Csv":"Inventory_"+this.pageData.Options.Entities.find(o=>o.ID==this.pageData.Filter.EntityID).Name+".Csv"}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount,s.gT.IsEmpty(this.pageData.Filter.EntityID)&&delete this.pageData.Filter.EntityID,s.gT.IsEmpty(this.pageData.Filter.CategoryID)&&delete this.pageData.Filter.CategoryID}assignAggregate(e){this.totalAggregate.TotalQuantity=e.Aggregate.TotalQuantity,this.totalAggregate.TotalUnitQuantity=e.Aggregate.TotalUnitQuantity,this.totalAggregate.TotalCost=e.Aggregate.TotalCost,this.totalAggregate.TotalSales=e.Aggregate.TotalSales}postExtendData(e){this.totalAggregate.TotalQuantity+=e.Aggregate.TotalQuantity,this.totalAggregate.TotalUnitQuantity+=e.Aggregate.TotalUnitQuantity,this.totalAggregate.TotalCost+=e.Aggregate.TotalCost,this.totalAggregate.TotalSales+=e.Aggregate.TotalSales}afterPostInit(e){let o=this.getAllVariants(e);this.nextPageDisabled=!(o.length<this.pageData.Filter.RowCount)}getAllVariants(e){let o=[];return e.Data.forEach(a=>{a.Products.forEach(i=>{o=[...o,...i.Variants]})}),o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(v._W),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-detail"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","text","textChange","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","text","textChange","onSubmit"],["class","btn-group ms-8",4,"ngIf"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlets",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a brand",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a category",3,"items","ngModel","ngModelChange"],[1,"d-inline","mb-2"],["type","number","name","QuantityFrom",1,"w-25","me-2",3,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2",3,"ngModel","ngModelChange"],[1,"mt-5"],["name","Discontinued",3,"model","modelChange"],["class","container-fluid mt-3",4,"ngIf"],[1,"btn-group","ms-8"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer"],[1,"dropdown-item"],[3,"click"],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","120px"],[1,"text-end",2,"width","100px"],[1,"fst-italic","small","fw-bold","text-end",2,"width","60px"],[1,"text-end",2,"width","120px",3,"hidden"],[1,"text-end",2,"width","80px",3,"hidden"],[1,"text-end",2,"width","100px",3,"hidden"],[4,"ngFor","ngForOf"],[1,"row","d-flex","justify-content-between","align-items-center"],[1,"col-md-4","text-center"],[1,"h3","text-warning"],["role","button",1,"btn","btn-outline-primary",3,"routerLink"],[1,"col-md-8"],[1,"table","table-borderless"],[1,"text-end"],[1,"text-end",3,"hidden"],[3,"hidden","innerHtml"],[1,"text-end",3,"innerHtml"],[1,"text-end",3,"hidden","innerHtml"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-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","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],["colspan","8",1,"border-bottom-0","pt-10"],[1,"fw-normal"],[3,"hidden"],["colspan","8",1,"border-bottom-0"],["target","_blank",3,"routerLink","queryParams"],[1,"small","fst-italic","text-end",2,"width","60px"],["runat","server",1,"text-end",2,"width","80px",3,"hidden"],[1,"d-inline-block"],[1,"ms-3"],["routerLink","/menu/Fulfillment/Allocated/Unfulfilled_Products",1,"text-warning",3,"queryParams"],[1,"text-success"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(e,o){1&e&&t.YNc(0,Mt,31,14,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData.Filter)},dependencies:[I.p,c.sg,c.O5,l.Fj,l.wV,l.JJ,l.On,g.yS,h.w9,h.ir,F.P,O.gM,c.JJ],styles:[".bg-low-danger[_ngcontent-%COMP%]{background-color:#f2dede!important}"]}),n})();var A=p(4077);function Ft(n,r){if(1&n&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function St(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",6),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",7),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(9,Ft,2,2,"ng-template",8),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Quantity From / To"),t.qZA(),t.TgZ(13,"input",9),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.QuantityFrom=a)}),t.qZA(),t.TgZ(14,"input",10),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.QuantityTo=a)}),t.qZA()(),t.TgZ(15,"div")(16,"h6"),t._uU(17,"Discontinued"),t.qZA(),t.TgZ(18,"radio-options",11),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.QuantityFrom),t.xp6(1),t.Q6J("ngModel",e.pageData.Filter.QuantityTo),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued)}}function Ut(n,r){if(1&n&&(t.TgZ(0,"th",18),t._uU(1," Total Inventory COST ( "),t._UZ(2,"span",24),t.ALo(3,"number"),t._uU(4,"%) "),t.qZA()),2&n){const e=t.oxw(4);t.xp6(2),t.Q6J("hidden",0==(null==e.data.Data?null:e.data.Data.UnitPrice))("innerHtml",t.lcZ(3,2,e.data.Data.UnitCost/e.data.Data.UnitPrice*100),t.oJD)}}function Jt(n,r){if(1&n&&(t._UZ(0,"td",21),t.ALo(1,"number")),2&n){const e=t.oxw(4);t.Q6J("innerHtml",t.lcZ(1,1,e.data.Data.UnitCost),t.oJD)}}function Nt(n,r){if(1&n&&(t.TgZ(0,"div",14)(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr")(5,"th",18),t._uU(6," Total Quantity "),t.qZA(),t.TgZ(7,"th",18),t._uU(8," Quantity * Content "),t.qZA(),t.YNc(9,Ut,5,4,"th",19),t.TgZ(10,"th",20),t._uU(11," Total Inventory Value when SOLD "),t.qZA()()(),t.TgZ(12,"tbody")(13,"tr"),t._UZ(14,"td",21),t.ALo(15,"number"),t._UZ(16,"td",21),t.ALo(17,"number"),t.YNc(18,Jt,2,3,"td",22),t._UZ(19,"td",23),t.ALo(20,"number"),t.qZA()()()()()),2&n){const e=t.oxw(3);t.xp6(9),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("hidden",!e.pageData.IsPriceVisible),t.xp6(4),t.Q6J("innerHtml",t.xi3(15,7,e.data.Data.Quantity,"."+e.data.Decimal+"-"+e.data.Decimal),t.oJD),t.xp6(2),t.Q6J("innerHtml",t.xi3(17,10,e.data.Data.VariantUnitQuantity,"."+e.data.Decimal+"-"+e.data.Decimal),t.oJD),t.xp6(2),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("hidden",!e.pageData.IsPriceVisible)("innerHtml",t.lcZ(20,13,e.data.Data.UnitPrice),t.oJD)}}function Lt(n,r){if(1&n&&(t.TgZ(0,"content"),t.YNc(1,Nt,21,15,"div",13),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.data)}}const Qt=function(){return["/menu/Inventory/Quantity/Valuation"]};function Pt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions")(2,"a",2),t._uU(3," Detail"),t.qZA()(),t.TgZ(4,"filters"),t.YNc(5,St,19,7,"div",3),t.qZA(),t.YNc(6,Lt,2,1,"content",4),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(5,Qt)),t.xp6(3),t.Q6J("ngIf",e.pageData.Filter),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter)}}let kt=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/InventorySumReport","InventoryLoader/InventoryReport",o),this.httpService=e,this.csvConverter=a,this.roleService=i}preGetList(){""==this.pageData.Filter.QuantityTo&&delete this.pageData.Filter.QuantityTo}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-summary"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["role","button",1,"btn","btn-success",3,"routerLink"],["container","","class","w-100",4,"ngIf"],[4,"ngIf"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","text","name","QuantityFrom",2,"width","40%",3,"ngModel","ngModelChange"],["type","text","name","QuantityTo",1,"ms-2",2,"width","40%",3,"ngModel","ngModelChange"],["name","Discontinued",3,"model","modelChange"],["matTooltipPosition","above",3,"matTooltip"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-end"],["class","text-end",4,"ngIf"],[1,"text-end",3,"hidden"],[1,"text-end",3,"innerHtml"],["class","text-end",3,"innerHtml",4,"ngIf"],[1,"text-end",3,"hidden","innerHtml"],[3,"hidden","innerHtml"]],template:function(e,o){1&e&&t.YNc(0,Pt,7,6,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData.Filter)},dependencies:[I.p,c.O5,l.Fj,l.JJ,l.On,g.yS,h.w9,h.ir,F.P,O.gM,c.JJ],encapsulation:2}),n})();var J=p(93669);function Et(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",4),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.export("default"))}),t._UZ(1,"i",5),t._uU(2,"Export "),t.qZA()}}function Vt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"div")(2,"h6"),t._uU(3,"Display Mode"),t.qZA(),t.TgZ(4,"radio-options",7),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.TypeID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Discontinued"),t.qZA(),t.TgZ(8,"radio-options",8),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(4),t.Q6J("model",e.pageData.Filter.TypeID)("options",e.Types),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued)}}const Yt=function(n){return{entityID:n}},Bt=function(n){return{ID:n,Tab:"Default"}};function Gt(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",22)(6,"a",23),t._uU(7),t.ALo(8,"number"),t.qZA()(),t.TgZ(9,"td",22)(10,"a",24),t._uU(11),t.ALo(12,"number"),t.qZA()(),t.TgZ(13,"td",22),t._uU(14),t.ALo(15,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Q6J("queryParams",t.VKq(16,Yt,e.ID)),t.xp6(1),t.Oqu(t.xi3(8,7,e.Inventory,"0.0-4")),t.xp6(3),t.Q6J("queryParams",t.VKq(18,Bt,e.ID)),t.xp6(1),t.Oqu(t.xi3(12,10,e.MinimumInventory,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(15,13,e.Difference,"0.0-4"))}}function Kt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"div",10)(2,"table",11),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(3,"thead",12)(4,"tr",13)(5,"th",14),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th",15),t._uU(8,"Code"),t.qZA(),t.TgZ(9,"th",16),t._uU(10,"On Hand"),t.qZA(),t.TgZ(11,"th",17),t._uU(12,"ROP"),t.qZA(),t.TgZ(13,"th",18),t._uU(14,"Difference"),t.qZA()()(),t.TgZ(15,"tbody"),t.YNc(16,Gt,16,20,"tr",19),t.qZA(),t.TgZ(17,"tfoot")(18,"tr",20),t._UZ(19,"td",21),t.TgZ(20,"td",21),t._uU(21,"Total : "),t.qZA(),t.TgZ(22,"td",22),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA(),t.TgZ(26,"td",22),t._uU(27),t.ALo(28,"number"),t.ALo(29,"sum"),t.qZA(),t.TgZ(30,"td",22),t._uU(31),t.ALo(32,"number"),t.ALo(33,"sum"),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.xp6(16),t.Q6J("ngForOf",e.data),t.xp6(7),t.Oqu(t.xi3(24,4,t.xi3(25,7,e.data,"Inventory"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(28,10,t.xi3(29,13,e.data,"MinimumInventory"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(32,16,t.xi3(33,19,e.data,"Difference"),"0.0-4"))}}let Ht=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/GetOutletList","InventoryLoader/InventoryReport",o),this.httpService=e,this.csvConverter=a,this.roleService=i,this.Types=[{Key:0,Value:"All"},{Key:1,Value:"Standard Inventory"}]}preInitList(){this.pageData.Filter.TypeID||(this.pageData.Filter={TypeID:1,Discontinued:!1})}postInit(e){this.originalData=e}sortData(e){const o=this.data.slice();function a(i,_,C){return(i<_?-1:1)*(C?1:-1)}this.data=e.active&&""!==e.direction?o.sort((i,_)=>{const C="asc"===e.direction;switch(i.Code=i.Code??"",_.Code=_.Code??"",e.active){case"Inventory":return a(i.Inventory,_.Inventory,C);case"Name":return a(i.Name.toLocaleLowerCase(),_.Name.toLocaleLowerCase(),C);case"Code":return a(i.Code.toLocaleLowerCase(),_.Code.toLocaleLowerCase(),C);case"MinimumInventory":return a(i.MinimumInventory,_.MinimumInventory,C);case"Difference":return a(i.Difference,_.Difference,C);default:return 0}}):this.originalData}export(e){this.exportCSV(this.csvConverter,"Inventory/ExportOutletInventory","outletinventory.csv")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-by-outlet"]],features:[t.qOj],decls:7,vars:5,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","","class","w-100",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-upload","me-3"],["container","",1,"w-100"],["name","Types",3,"model","options","modelChange"],["name","Discontinued",3,"model","modelChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","Name",1,"align-left",2,"width","40%"],["mat-sort-header","Code",1,"align-left",2,"width","10%"],["mat-sort-header","Inventory","arrowPosition","before",1,"flex-right"],["mat-sort-header","MinimumInventory","arrowPosition","before",1,"flex-right"],["mat-sort-header","Difference","arrowPosition","before",1,"flex-right"],[4,"ngFor","ngForOf"],[1,"table-footer","fw-bold"],[1,"empty-column"],[1,"text-end"],["routerLink","/menu/Inventory/Quantity/Low_On_Stock","target","_blank",3,"queryParams"],["routerLink","/menu/Outlets/Master/Outlets/Info","target","_blank",3,"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.YNc(2,Et,3,0,"button",1),t.qZA(),t.TgZ(3,"filters"),t.YNc(4,Vt,9,3,"div",2),t.qZA(),t.TgZ(5,"content"),t.YNc(6,Kt,34,22,"div",3),t.qZA()()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},dependencies:[I.p,c.sg,c.O5,g.yS,m.YE,m.nU,F.P,c.JJ,J.qU]}),n})();var $=p(83902);function Rt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"Inventory/OutletGroupProductList","StockByOutletGroup.csv"))}),t._UZ(1,"i",16),t._uU(2,"\xa0Export "),t.qZA()}}function jt(n,r){if(1&n&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function $t(n,r){if(1&n&&(t.TgZ(0,"th",29),t._uU(1),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.hij(" ",e.Name," ")}}function Wt(n,r){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.ProductCode,"")}}function zt(n,r){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.ALo(3,"groupStock"),t.qZA()),2&n){const e=r.$implicit,o=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,o.EntityStock,e.ID))," ")}}const Xt=function(n){return{ID:n}};function te(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",30),t._uU(3),t.qZA()(),t.YNc(4,Wt,2,1,"td",28),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.YNc(7,zt,4,6,"td",31),t.TgZ(8,"td",32),t._uU(9),t.ALo(10,"number"),t.ALo(11,"sum"),t.qZA(),t.TgZ(12,"td"),t._uU(13),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(3);t.xp6(2),t.Q6J("queryParams",t.VKq(12,Xt,e.ID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(1),t.Q6J("ngIf",o.pageData.IsProductCodeVisible),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngForOf",null==o.data?null:o.data.Entities),t.xp6(2),t.hij(" ",t.lcZ(10,7,t.xi3(11,9,e.EntityStock,"Value"))," "),t.xp6(4),t.hij(" ",e.UOM,"")}}function ee(n,r){1&n&&t._UZ(0,"td",35)}function ne(n,r){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Quantity)," ")}}function ae(n,r){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr",34),t._UZ(2,"td",35),t.YNc(3,ee,1,0,"td",36),t._UZ(4,"td",35),t.YNc(5,ne,3,3,"td",31),t.TgZ(6,"td",33),t._uU(7),t.ALo(8,"number"),t.ALo(9,"sum"),t.qZA(),t._UZ(10,"td",35),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("ngIf",e.pageData.IsProductCodeVisible),t.xp6(2),t.Q6J("ngForOf",null==e.data?null:e.data.Entities),t.xp6(2),t.hij(" ",t.lcZ(8,3,t.xi3(9,5,e.data.Entities,"Quantity"))," ")}}function oe(n,r){if(1&n&&(t.TgZ(0,"div",18)(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th"),t._uU(6," Product "),t.qZA(),t.TgZ(7,"th",22),t._uU(8," Product Code "),t.qZA(),t.TgZ(9,"th",23),t._uU(10," Code "),t.qZA(),t.YNc(11,$t,2,1,"th",24),t.TgZ(12,"th",25),t._uU(13," Total "),t.qZA(),t._UZ(14,"th",26),t.qZA()(),t.TgZ(15,"tbody"),t.YNc(16,te,14,14,"tr",27),t.qZA(),t.YNc(17,ae,11,8,"tfoot",28),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(7),t.Q6J("hidden",!e.pageData.IsProductCodeVisible),t.xp6(4),t.Q6J("ngForOf",null==e.data?null:e.data.Entities),t.xp6(5),t.Q6J("ngForOf",null==e.data?null:e.data.Data),t.xp6(1),t.Q6J("ngIf",(null==e.data?null:e.data.Data.length)>0)}}const ie=function(){return["/menu/Inventory/Quantity/Product_By_Outlet"]},le=function(){return["/menu/Inventory/Quantity/Product_By_Outlet/Category_By_Outlet"]};function ce(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Rt,3,0,"a",2),t.TgZ(3,"div",3)(4,"a",4),t._uU(5," Product by Outlet"),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6)(8,"li",7)(9,"a",8),t._uU(10,"Category by Outlet"),t.qZA()()()()(),t.TgZ(11,"filters")(12,"div",9)(13,"div")(14,"h6"),t._uU(15,"Category"),t.qZA(),t.TgZ(16,"ng-select",10),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(17,jt,2,2,"ng-template",11),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Quantity"),t.qZA(),t.TgZ(21,"input",12),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityFrom=a)}),t.qZA(),t._UZ(22,"i",13),t.TgZ(23,"input",12),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityTo=a)}),t.qZA()()()(),t.TgZ(24,"content"),t.YNc(25,oe,18,4,"div",14),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("routerLink",t.DdM(10,ie)),t.xp6(5),t.Q6J("routerLink",t.DdM(11,le)),t.xp6(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.QuantityFrom),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.QuantityTo),t.xp6(2),t.Q6J("ngIf",e.data)}}let _e=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/OutletGroupProductList","InventoryLoader/OutletGroupProductList",o),this.httpService=e,this.csvConverter=a,this.roleService=i}preGetList(){""==this.pageData.Filter.QuantityTo&&delete this.pageData.Filter.QuantityTo}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-by-outlet-group"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["value","Export","matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn-group","ms-8"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],["container","",1,"w-100"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","text","autoNum","",1,"me-2",2,"width","65px",3,"ngModel","ngModelChange"],[1,"fa","fa-arrow-right"],["class","container-fluid mt-3",4,"ngIf"],["value","Export","matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],["sorter","ProductCode",2,"width","120px",3,"hidden"],["sorter","Code",2,"width","120px"],["class","text-end small","style","width: 70px",4,"ngFor","ngForOf"],[1,"text-end",2,"width","75px"],[1,"UOMWidth"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-end","small",2,"width","70px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-center"],[1,"text-end"],[1,"table-footer"],[1,"empty-column"],["class","empty-column",4,"ngIf"]],template:function(e,o){1&e&&t.YNc(0,ce,26,12,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData.Filter)},dependencies:[I.p,c.sg,c.O5,l.Fj,l.JJ,l.On,g.yS,h.w9,h.ir,$.b,O.gM,c.JJ,J.qU,J.JG]}),n})();var N=p(24537),B=p(70585),W=p(35593),z=p(10805);function pe(n,r){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 t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/OutletProductList","InventoryByOutlet.csv"))}),t._UZ(1,"i",22),t._uU(2,"\xa0Export "),t.qZA()}}function se(n,r){if(1&n&&(t.TgZ(0,"span",23),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}const ue=function(n,r){return{"ttip-before-scroll":n,"ttip-after-scroll":r}};function de(n,r){if(1&n&&(t.TgZ(0,"span",40),t._uU(1),t.ALo(2,"keys"),t.qZA()),2&n){const e=t.oxw().index,o=t.oxw(3);t.Tol(t.WLB(5,ue,!o.isScroll,o.isScroll)),t.xp6(1),t.Oqu(t.lcZ(2,3,o.data.Title[0])[e].value)}}function ge(n,r){if(1&n&&(t.TgZ(0,"th",38),t.YNc(1,de,3,8,"span",39),t._uU(2),t.qZA()),2&n){const e=r.$implicit;t.ekj("ttip","z"==e.key[0]),t.Q6J("mat-sort-header",e.key),t.xp6(1),t.Q6J("ngIf","z"==e.key[0]),t.xp6(1),t.hij(" ",e.value," ")}}const me=function(n){return{ID:n}};function xe(n,r){if(1&n&&(t.TgZ(0,"td")(1,"a",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw().$implicit,a=t.oxw(3);t.xp6(1),t.Q6J("queryParams",t.VKq(4,me,o.ID)),t.xp6(1),t.hij(" ",a.isNumber(e.value)?t.lcZ(3,2,e.value):e.value," ")}}function fe(n,r){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,xe,4,6,"td",29),t.ALo(2,"keys"),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,e))}}function he(n,r){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Quantity)," ")}}function Te(n,r){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr",42),t._UZ(2,"td",43),t.TgZ(3,"td"),t._uU(4),t.ALo(5,"number"),t.ALo(6,"sum"),t.qZA(),t.YNc(7,he,3,3,"td",29),t.TgZ(8,"td"),t._uU(9),t.ALo(10,"number"),t.qZA(),t._UZ(11,"td"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.xi3(5,3,t.xi3(6,6,null==e.data?null:e.data.Data,"Total"),"1.0-0")),t.xp6(3),t.Q6J("ngForOf",e.Entities),t.xp6(2),t.hij(" ",t.lcZ(10,9,e.data.Total)," ")}}function Ce(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"span",44),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryOutletRowsCount"))}),t.TgZ(1,"i",45),t._uU(2,"?"),t.qZA()()}}function Ze(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(t.lcZ(2,1,e.listTotal))}}function ye(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",46),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.NextPage(!0))}),t._UZ(1,"i",47),t._uU(2," Next"),t.qZA()}}function ve(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",48),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryOutletRowsCount",!0))}),t._UZ(1,"i",49),t._uU(2," Show All"),t.qZA()}}function De(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",24)(1,"div",25)(2,"table",26),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.sortData(a))}),t.TgZ(3,"thead",27)(4,"tr"),t.YNc(5,ge,3,5,"th",28),t.ALo(6,"keys"),t.qZA()(),t.TgZ(7,"tbody"),t.YNc(8,fe,3,3,"tr",29),t.qZA(),t.YNc(9,Te,12,11,"tfoot",30),t.qZA()(),t.TgZ(10,"div",31)(11,"div",32)(12,"div",33),t._uU(13),t.ALo(14,"number"),t.YNc(15,Ce,3,0,"span",34),t.YNc(16,Ze,3,3,"span",30),t._uU(17),t.qZA()(),t.TgZ(18,"div",35),t.YNc(19,ye,3,0,"a",36),t.YNc(20,ve,3,0,"a",37),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("ngForOf",t.lcZ(6,9,null==e.data?null:e.data.dataheader[0])),t.xp6(3),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(14,11,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)}}const be=function(){return["/menu/Inventory/Quantity/Product_By_Outlet/Product_By_Outlet_Group"]},qe=function(){return["/menu/Inventory/Quantity/Product_By_Outlet/Category_By_Outlet"]},Oe=function(){return{standalone:!0}};function we(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.FilterText=a)})("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,pe,3,0,"a",2),t.TgZ(3,"div",3)(4,"a",4),t._uU(5," Product by Outlet Group"),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6)(8,"li",7)(9,"a",8),t._uU(10,"Category by Outlet"),t.qZA()()()()(),t.TgZ(11,"filters")(12,"div",9)(13,"div")(14,"h6"),t._uU(15,"Outlet"),t.qZA(),t.TgZ(16,"ng-select",10),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.ListEntityID=a)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"Category"),t.qZA(),t.TgZ(20,"ng-select",11),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(21,se,2,2,"ng-template",12),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Date - In the morning"),t.qZA(),t.TgZ(25,"datepicker",13),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Date=a)}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Time"),t.qZA(),t.TgZ(29,"p-calendar",14,15),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Time=a)}),t.TgZ(31,"p-footer")(32,"button",16),t.NdJ("click",function(){t.CHM(e);const a=t.MAs(30);return t.KtG(a.hideOverlay())}),t.qZA()()()(),t.TgZ(33,"div")(34,"h6"),t._uU(35,"Quantity From"),t.qZA(),t.TgZ(36,"input",17),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityFrom=a)}),t.qZA()(),t.TgZ(37,"div")(38,"h6"),t._uU(39,"Outlet Group"),t.qZA(),t.TgZ(40,"ng-select",18),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityGroupID=a)}),t.qZA()(),t.TgZ(41,"div")(42,"h6"),t._uU(43,"Discontinued"),t.qZA(),t.TgZ(44,"radio-options",19),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()()()(),t.TgZ(45,"content"),t.YNc(46,De,21,13,"div",20),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.FilterText),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("routerLink",t.DdM(20,be)),t.xp6(5),t.Q6J("routerLink",t.DdM(21,qe)),t.xp6(7),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.ListEntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("date",e.pageData.Filter.Date),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Time)("timeOnly",!0)("ngModelOptions",t.DdM(22,Oe)),t.xp6(7),t.Q6J("ngModel",e.pageData.Filter.QuantityFrom),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.EntityGroups)("ngModel",e.pageData.Filter.EntityGroupID),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued)("options",e.optionsDiscontinued),t.xp6(2),t.Q6J("ngIf",e.data)}}let Me=(()=>{class n extends b.X{constructor(e,o,a,i){super(e,"Inventory/OutletProductList","InventoryLoader/OutletProductList",o),this.httpService=e,this.csvConverter=a,this.roleService=i,this.Entities=[],this.optionsDiscontinued=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"},{Key:null,Value:"All"}],this.isScroll=!1}assignAggregate(e){this.Entities=e.Entities}postExtendData(e){for(let o of this.Entities){const a=e.Entities.find(i=>i.ID==o.ID);a&&(o.Quantity+=a.Quantity)}}toggleTooltipPosition(){this.isScroll=document.documentElement.scrollTop>=40}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount}sortData(e){const o=this.data.dataheader[0];if(o){const a=Object.keys(o),i=this.infiniteList.slice();if(!e.active||""===e.direction)return void(this.infiniteList=this.originalData);this.infiniteList=i.sort((_,C)=>{const P="asc"===e.direction;_.Code=_.Code??"",C.Code=C.Code??"",_.UOM=_.UOM??"",C.UOM=C.UOM??"";let E=0;return a.forEach(Q=>{e.active==Q&&(E="string"==typeof _[Q]?this.compare(_[Q].toLocaleLowerCase(),C[Q].toLocaleLowerCase(),P):this.compare(_[Q],C[Q],P))}),E})}}isNumber(e){return"number"==typeof e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-by-outlet-detail"]],hostBindings:function(e,o){1&e&&t.NdJ("scroll",function(){return o.toggleTooltipPosition()},!1,t.Jf7)},features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","text","textChange","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","text","textChange","onSubmit"],["matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn-group","ms-8"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer"],[1,"dropdown-item"],[3,"routerLink"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose an Outlet",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["name","Date",3,"date","dateChange"],[3,"ngModel","timeOnly","ngModelOptions","ngModelChange"],["myCalendar",""],["pButton","","type","button","label","Close",3,"click"],["type","text","name","QuantityFrom",1,"w-100",3,"ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["name","Discontinued",3,"model","options","modelChange"],["class","container-fluid mt-3",4,"ngIf"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","hidden-xxs",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["class","align-left",3,"ttip","mat-sort-header",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],[1,"align-left",3,"mat-sort-header"],["class","tooltiptext",3,"class",4,"ngIf"],[1,"tooltiptext"],["routerLink","/menu/Products/Catalog/Variants/Info",2,"color","black",3,"queryParams"],[1,"table-footer"],["colspan","2"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retreive rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(e,o){1&e&&t.YNc(0,we,47,23,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData.Filter)},dependencies:[I.p,c.sg,c.O5,l.Fj,l.JJ,l.On,g.yS,h.w9,h.ir,m.YE,m.nU,N.QB,F.P,B.f,W.Hq,z.$_,O.gM,c.JJ,J.qU,J.VO],styles:['.table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{display:none}.table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{color:#00f!important}.ttip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:120px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:9999;left:50%;margin-left:-60px}.ttip-before-scroll[_ngcontent-%COMP%]{bottom:200%}.ttip-before-scroll[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:black transparent transparent transparent}.ttip-after-scroll[_ngcontent-%COMP%]{top:200%}.ttip-after-scroll[_ngcontent-%COMP%]:after{content:" ";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent black transparent}.ttip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}']}),n})();function Fe(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",11)(1,"div")(2,"h6"),t._uU(3,"Discontinued"),t.qZA(),t.TgZ(4,"radio-options",12),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.DisplayDiscontinue=a)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(4),t.Q6J("model",e.pageData.Filter.DisplayDiscontinue)}}function Se(n,r){if(1&n&&(t.TgZ(0,"th"),t._uU(1),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Oqu(e.value)}}function Ue(n,r){if(1&n&&(t.TgZ(0,"p",20),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.value)}}function Je(n,r){if(1&n&&(t.TgZ(0,"p",20),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.value))}}function Ne(n,r){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,Ue,2,1,"p",19),t.YNc(2,Je,3,3,"p",19),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("ngIf","Category"==e.key),t.xp6(1),t.Q6J("ngIf","Category"!=e.key)}}function Le(n,r){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,Ne,3,2,"td",17),t.ALo(2,"keys"),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,1,e))}}function Qe(n,r){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.value))}}function Pe(n,r){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr",21)(2,"td"),t._uU(3,"Total : "),t.qZA(),t.YNc(4,Qe,3,3,"td",17),t.ALo(5,"keys"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("ngForOf",t.lcZ(5,1,null==e.data?null:e.data.Sum))}}function ke(n,r){if(1&n&&(t.TgZ(0,"div",13)(1,"div",14)(2,"table",15)(3,"thead",16)(4,"tr"),t.YNc(5,Se,2,1,"th",17),t.ALo(6,"keys"),t.qZA()(),t.TgZ(7,"tbody"),t.YNc(8,Le,3,3,"tr",17),t.qZA(),t.YNc(9,Pe,6,3,"tfoot",18),t.qZA()()()),2&n){const e=t.oxw();t.xp6(5),t.Q6J("ngForOf",t.lcZ(6,3,null==e.data?null:e.data.Dataheader)),t.xp6(3),t.Q6J("ngForOf",null==e.data?null:e.data.Data),t.xp6(1),t.Q6J("ngIf",(null==e.data?null:e.data.Data.length)>0)}}const Ee=function(){return["/menu/Inventory/Quantity/Product_By_Outlet"]},Ye=function(){return["/menu/Inventory/Quantity/Product_By_Outlet/Product_By_Outlet_Group"]};let Be=(()=>{class n extends A.n{constructor(e,o,a){super(e,"Inventory/GetCategoryByOutlet","InventoryLoader/OutletProductList",o),this.httpService=e,this.csvConverter=a}preInitList(){this.pageData.Filter.DisplayDiscontinue||(this.pageData.Filter={DisplayDiscontinue:!1})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Category_List_By_Outlet"]],features:[t.qOj],decls:17,vars:8,consts:[["filterWidth","270px",3,"pageData","text","textChange","onSubmit"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"btn-group","ms-8"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer"],[1,"dropdown-item"],["role","button",3,"routerLink"],["container","","class","w-100",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],["container","",1,"w-100"],["name","Discontinued",3,"model","modelChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],["style","color: black;",4,"ngIf"],[2,"color","black"],[1,"table-footer"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(i){return o.pageData.Filter.FilterText=i})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions")(2,"a",1),t.NdJ("click",function(){return o.convertToCSV(o.csvConverter,!0,"InventoryCategoryListByOutlet.csv")}),t._UZ(3,"i",2),t._uU(4," Export "),t.qZA(),t.TgZ(5,"div",3)(6,"a",4),t._uU(7," Product by Outlet "),t.qZA(),t._UZ(8,"button",5),t.TgZ(9,"ul",6)(10,"li",7)(11,"a",8),t._uU(12," Product by Outlet Group "),t.qZA()()()()(),t.TgZ(13,"filters"),t.YNc(14,Fe,5,1,"div",9),t.qZA(),t.TgZ(15,"content"),t.YNc(16,ke,10,5,"div",10),t.qZA()()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.FilterText),t.xp6(6),t.Q6J("routerLink",t.DdM(6,Ee)),t.xp6(5),t.Q6J("routerLink",t.DdM(7,Ye)),t.xp6(3),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},dependencies:[I.p,c.sg,c.O5,g.yS,F.P,O.gM,c.JJ,J.VO]}),n})();function Ge(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",4),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.convertToCSV(a.csvConverter,a.data.Data,"HighestQuantity.csv"))}),t._UZ(1,"i",5),t._uU(2," Export "),t.qZA()}}function Ke(n,r){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function He(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",8),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(9,Ke,2,2,"ng-template",9),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Row Count"),t.qZA(),t.TgZ(13,"input",10),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.RowCount=a)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Quantity From - To"),t.qZA(),t.TgZ(17,"input",11),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QtyFrom=a)}),t.qZA(),t._uU(18," - "),t.TgZ(19,"input",12),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QtyTo=a)}),t.qZA()(),t.TgZ(20,"div")(21,"h6"),t._uU(22,"Group By"),t.qZA(),t.TgZ(23,"radio-options",13),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CatalogLevel=a)})("modelChange",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.getListData())}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.QtyFrom),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.QtyTo),t.xp6(4),t.Q6J("model",e.pageData.Filter.CatalogLevel)("options",e.ScopeFilter)}}const Re=function(){return["/menu/Products/Catalog/Products/Info"]},X=function(n){return{ID:n}};function je(n,r){if(1&n&&(t.TgZ(0,"td")(1,"a",29),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,Re))("queryParams",t.VKq(4,X,e.ID)),t.xp6(1),t.Oqu(e.Name)}}const $e=function(){return["/menu/Products/Catalog/Variants/Info"]};function We(n,r){if(1&n&&(t.TgZ(0,"td")(1,"a",29),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,$e))("queryParams",t.VKq(4,X,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function ze(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.YNc(3,je,3,6,"td",27),t.YNc(4,We,3,6,"td",27),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td",28),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",28),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA(),t.TgZ(15,"td"),t._uU(16),t.ALo(17,"date"),t.qZA()()),2&n){const e=r.$implicit,o=r.index,a=t.oxw(2);t.xp6(2),t.Oqu(o+1),t.xp6(1),t.Q6J("ngIf",a.pageData.Filter.CatalogLevel),t.xp6(1),t.Q6J("ngIf",!a.pageData.Filter.CatalogLevel),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(9,8,e.UnitsInStock)),t.xp6(3),t.Oqu(t.lcZ(12,10,e.TotalSold)),t.xp6(3),t.Oqu(e.LastPurchased),t.xp6(2),t.Oqu(t.xi3(17,12,e.Released,"dd MMM y"))}}function Xe(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"div",16)(2,"table",17),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(3,"thead",18)(4,"tr")(5,"th",19),t._uU(6,"RANK"),t.qZA(),t.TgZ(7,"th",20),t._uU(8,"NAME"),t.qZA(),t.TgZ(9,"th",21),t._uU(10,"CODE"),t.qZA(),t.TgZ(11,"th",22),t._uU(12,"ON HAND"),t.qZA(),t.TgZ(13,"th",23),t._uU(14,"TOTAL SOLD"),t.qZA(),t.TgZ(15,"th",24),t._uU(16,"LAST PURCHASE"),t.qZA(),t.TgZ(17,"th",25),t._uU(18,"RELEASED"),t.qZA()()(),t.TgZ(19,"tbody"),t.YNc(20,ze,18,15,"tr",26),t.qZA()()()()}if(2&n){const e=t.oxw();t.xp6(20),t.Q6J("ngForOf",e.data.Data)}}let tn=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/InventoryCountRank","InventoryLoader/InventoryCountRank"),this.httpService=e,this.csvConverter=o,this.toastrService=a,this.roleService=i,this.ScopeFilter=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}]}postInit(){this.pageDatatemp=this.pageData,this.originalData=this.data.Data,this.pageData.Filter.Text&&this.SearchProduct()}preSearchFromPageOne(){const e=this.pageData.Filter.QtyFrom,o=this.pageData.Filter.QtyTo;s.gT.IsNotEmpty(e)&&s.gT.IsNotEmpty(o)&&e>o&&this.toastrService.warning("Filter Quantity from cannot be more than quantity to","Warning")}preGetList(){null==this.pageData.Filter.QtyFrom&&delete this.pageData.Filter.QtyFrom,null==this.pageData.Filter.QtyTo&&delete this.pageData.Filter.QtyTo}SearchProduct(){null!=this.pageData.Filter.Text&&this.pageData.Filter.Text.length>=3?this.data.Data=this.data.Data.filter(e=>-1!==e.Name.toLowerCase().indexOf(this.pageData.Filter.Text.toLowerCase())):this.pageData=this.data.Data}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;switch(a.Code=a.Code??"",i.Code=i.Code??"",a.LastPurchased=a.LastPurchased??"",i.LastPurchased=i.LastPurchased??"",e.active){case"Rank":return this.compare(a.rank,i.rank,_);case"Name":return this.compare(a.Name.toLocaleLowerCase(),i.Name.toLocaleLowerCase(),_);case"Code":return this.compare(a.Code.toLocaleLowerCase(),i.Code.toLocaleLowerCase(),_);case"UnitsInStock":return this.compare(a.UnitsInStock,i.UnitsInStock,_);case"TotalSold":return this.compare(a.TotalSold,i.TotalSold,_);case"Released":return this.compare(a.Released,i.Released,_);case"LastPurchased":return this.compare(a.LastPurchased.toLocaleLowerCase(),i.LastPurchased.toLocaleLowerCase(),_);default:return 0}}):this.originalData}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(v._W),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-count-rank"]],features:[t.qOj],decls:7,vars:5,consts:[["filterWidth","270px",3,"pageData","text","textChange","onSubmit"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","","class","w-100",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"w-100",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["type","text",3,"ngModel","ngModelChange"],["type","number","name","QuantityFrom",1,"w-25","me-2",3,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2",3,"ngModel","ngModelChange"],["name","Scope",3,"model","options","modelChange"],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","5px"],["mat-sort-header","Name",1,"align-left",2,"width","400px"],["mat-sort-header","Code",1,"align-left",2,"width","80px"],["mat-sort-header","UnitsInStock","arrowPosition","before",1,"flex-right",2,"width","80px"],["mat-sort-header","TotalSold","arrowPosition","before",1,"flex-right",2,"width","80px"],["mat-sort-header","LastPurchased",1,"align-left",2,"width","80px"],["mat-sort-header","Released",1,"align-left",2,"width","80px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-end","text-success"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(i){return o.pageData.Filter.Text=i})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Ge,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.YNc(4,He,24,10,"div",2),t.qZA(),t.TgZ(5,"content"),t.YNc(6,Xe,21,1,"div",3),t.qZA()()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},dependencies:[I.p,c.sg,c.O5,l.Fj,l.wV,l.JJ,l.On,g.yS,h.w9,h.ir,m.YE,m.nU,F.P,O.gM,c.JJ,c.uU]}),n})();var tt=p(26111),en=p(60769),k=p(58393);function nn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",30),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/ReorderExportData","ReorderPoint.csv"))}),t._UZ(1,"i",31),t._uU(2," Export "),t.qZA()}}function an(n,r){if(1&n&&(t.TgZ(0,"span",32),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function on(n,r){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.hij("+ ",t.lcZ(2,1,e.Max-e.Inventory),"")}}const rn=function(){return["/menu/Products/Catalog/Variants/Info"]},ln=function(n){return{ID:n}};function cn(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"td")(2,"input",34),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw().$implicit;return t.KtG(i.selected=a)}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",35)(6,"a",36),t._uU(7),t.qZA()(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td",37),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td",38),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td",39),t._uU(17),t.ALo(18,"number"),t.qZA(),t.TgZ(19,"td",40),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"td",39),t.YNc(23,on,3,3,"span",33),t.qZA(),t.BQk()}if(2&n){const e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngModel",e.selected),t.xp6(2),t.hij(" ",e.Outlet," "),t.xp6(2),t.Q6J("routerLink",t.DdM(19,rn))("queryParams",t.VKq(20,ln,e.ID)),t.xp6(1),t.Oqu(e.Product),t.xp6(2),t.hij(" ",e.Code," "),t.xp6(2),t.Oqu(t.lcZ(12,11,e.Inventory)),t.xp6(3),t.Oqu(t.lcZ(15,13,e.Min)),t.xp6(3),t.hij("+ ",t.lcZ(18,15,e.Min-e.Inventory),""),t.xp6(3),t.Oqu(t.lcZ(21,17,e.Max)),t.xp6(3),t.Q6J("ngIf",e.Max>e.Min)}}function _n(n,r){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,cn,24,22,"ng-container",33),t.qZA()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("ngIf",e.Min-e.Inventory>0)}}function pn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",41),t.NdJ("page",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onPaginationChange(a))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function sn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Text=a)})("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions")(2,"div"),t.YNc(3,nn,3,0,"a",2),t.TgZ(4,"div",3)(5,"button",4),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.makeLogistics())}),t._uU(6,"Create Transfer Order"),t.qZA(),t.TgZ(7,"button",5),t._UZ(8,"b",6),t.qZA(),t.TgZ(9,"ul",7)(10,"li",8),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.makePurchase())}),t.TgZ(11,"a"),t._uU(12,"Create Purchase Order"),t.qZA()()()()()(),t.TgZ(13,"filters")(14,"div",9)(15,"div",10)(16,"div")(17,"h6"),t._uU(18,"Outlet"),t.qZA(),t.TgZ(19,"ng-select",11),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.entityID=a)}),t.qZA()(),t.TgZ(20,"div")(21,"h6"),t._uU(22,"Category"),t.qZA(),t.TgZ(23,"ng-select",12),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(24,an,2,2,"ng-template",13),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"Supplier"),t.qZA(),t.TgZ(28,"autocompleteV2",14),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.SupplierID=a)}),t.qZA()()()()(),t.TgZ(29,"content")(30,"div",15)(31,"div",16)(32,"table",17),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(33,"thead",18)(34,"tr")(35,"th",19)(36,"input",20),t.NdJ("change",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectAllData(a.target.checked))}),t.qZA()(),t.TgZ(37,"th",21),t._uU(38,"Outlet"),t.qZA(),t.TgZ(39,"th",22),t._uU(40,"Product"),t.qZA(),t.TgZ(41,"th",23),t._uU(42,"Code"),t.qZA(),t.TgZ(43,"th",24),t._uU(44,"On Hand"),t.qZA(),t.TgZ(45,"th",25),t._uU(46,"ROP"),t.qZA(),t.TgZ(47,"th",26),t._uU(48,"Action"),t.qZA(),t.TgZ(49,"th",27),t._uU(50,"Max "),t.qZA(),t.TgZ(51,"th",26),t._uU(52,"Action"),t.qZA()()(),t.TgZ(53,"tbody"),t.YNc(54,_n,2,1,"tr",28),t.qZA()()(),t.YNc(55,pn,1,3,"mat-paginator",29),t.qZA()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Text),t.xp6(3),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("disabled",e.filterMakeLogistics()),t.xp6(2),t.Q6J("disabled",e.filterMakeLogistics()),t.xp6(12),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.listEntity)("ngModel",e.pageData.Filter.entityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(26),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.pagination.listTotal>0)}}let un=(()=>{class n extends A.n{constructor(e,o,a,i,_,C,P){super(e,"Inventory/GetReorderList","InventoryLoader/Reorder",null,C),this.csvConverter=o,this.logisticCartItemService=a,this.purchaseCartItemService=i,this.router=_,this.roleService=P}preInitList(){const e=[this.route.snapshot.queryParams.entityID];s.gT.IsNotEmpty(e[0])&&(this.pageData.Filter.entityID=e)}postInit(e){this.originalData=e.Data}makeLogistics(){this.logisticCartItemService.inventoryState="low",this.logisticCartItemService.lowOnStockInfo.EntityID=this.selectedData[0].EntityID,this.logisticCartItemService.lowOnStockInfo.Items=this.selectedData,this.router.navigate(["/menu/Logistics/Archive/Transfer_Order/Form"])}makePurchase(){this.purchaseCartItemService.inventoryState="low",this.purchaseCartItemService.entityID=this.selectedData[0].EntityID,this.purchaseCartItemService.cartItems=this.selectedData,this.router.navigate(["/menu/Buy/Entry/Order"])}filterMakeLogistics(){if(this.selectedData=this.data.Data.filter(e=>e.selected),this.selectedData.length>0){const e=this.selectedData[0].EntityID;return this.selectedData.filter(o=>o.EntityID==e).length!=this.selectedData.length}return!0}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction,C=typeof a[e.active];switch(s.gT.IsEmpty(a.Code)&&(a.Code=""),s.gT.IsEmpty(i.Code)&&(i.Code=""),C){case"string":return this.compare(a[e.active].toLocaleLowerCase(),i[e.active].toLocaleLowerCase(),_);case"number":return this.compare(a[e.active],i[e.active],_);default:return 0}}):this.originalData}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(tt.N),t.Y36(en.R),t.Y36(g.F0),t.Y36(g.gz),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-rop"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","ms-5",3,"disabled","click"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle",3,"disabled"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer"],[1,"dropdown-item",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["inputID","ContactID","requestUrl","/API/AC/GetSupplierSuggestion","notFoundMessageFor","supplier",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","32px"],["type","checkbox",3,"change"],["mat-sort-header","Outlet",2,"width","100px"],["mat-sort-header","Product"],["mat-sort-header","Code",2,"width","120px"],["mat-sort-header","Inventory","arrowPosition","before",1,"text-end","align-left",2,"width","88px"],["mat-sort-header","Min","arrowPosition","before",1,"flex-right","border-start",2,"width","80px"],[1,"text-end",2,"width","80px"],["mat-sort-header","Max","arrowPosition","before",1,"flex-right","border-start",2,"width","80px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["matTooltipPosition","above",3,"matTooltip"],[4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"word-break-product"],[3,"routerLink","queryParams"],[1,"text-end","text-danger"],[1,"text-end","border-start"],[1,"text-end","text-success"],[1,"text-end","border-start","text-primary"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&t.YNc(0,sn,56,13,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.Wl,l.JJ,l.On,g.yS,w.NW,h.w9,h.ir,m.YE,m.nU,k.J,O.gM,c.JJ],styles:[".word-break-product[_ngcontent-%COMP%]{max-width:22rem;word-wrap:break-word}"]}),n})();var L=p(11481);function dn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",13),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"Inventory/ExportInventoryTransit","Inventory In Transit.csv"))}),t._UZ(1,"i",14),t._uU(2," Export "),t.qZA()}}function gn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",16),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.entityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",17),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.CategoryID=a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.entityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID)}}const mn=function(){return["/menu/Products/Catalog/Variants/Info"]},xn=function(n){return{ID:n}};function fn(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",18),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",19),t._uU(9),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(6,mn))("queryParams",t.VKq(7,xn,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.CategoryName),t.xp6(2),t.Oqu(e.UnitsInStock)}}function hn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,dn,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.YNc(4,gn,9,5,"div",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"table",6)(9,"thead",7)(10,"tr")(11,"th",8),t._uU(12,"Name"),t.qZA(),t.TgZ(13,"th",9),t._uU(14,"Code"),t.qZA(),t.TgZ(15,"th",10),t._uU(16,"Category"),t.qZA(),t.TgZ(17,"th",11),t._uU(18,"Transit"),t.qZA()()(),t.TgZ(19,"tbody"),t.YNc(20,fn,10,9,"tr",12),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",e.pageData.Filter),t.xp6(16),t.Q6J("ngForOf",null==e.data?null:e.data.Data)}}let Tn=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/GetInventoryTransit","InventoryLoader/GetInventoryTransit"),this.httpService=e,this.csvConverter=o,this.pageTitle=a,this.roleService=i,this.pageTitle.setTitle(this.menuData.T)}preInitList(){this.pageData.Filter={}}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(L.Dx),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-on-transit"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","","class","w-100",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","70%"],[2,"width","7%"],[2,"width","12%"],[1,"text-end",2,"width","11%"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],[3,"routerLink","queryParams"],[1,"text-end"]],template:function(e,o){1&e&&t.YNc(0,hn,21,5,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9]}),n})();function Cn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",4),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.convertToCSV(a.csvConverter,!0,"InventoryAllocated.csv"))}),t._UZ(1,"i",5),t._uU(2," Export "),t.qZA()}}function Zn(n,r){if(1&n&&(t.TgZ(0,"span",10),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function yn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",7),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",8),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(9,Zn,2,2,"ng-template",9),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(4),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID)}}const vn=function(){return["/menu/Products/Catalog/Variants/Info"]},Dn=function(n){return{ID:n}},In=function(){return["/menu/Fulfillment/Allocated/Unfulfilled_Products"]},bn=function(n,r){return{VariantID:n,OutletID:r}};function An(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",19),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",20),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",20)(12,"a",21),t._uU(13),t.ALo(14,"number"),t.qZA()(),t.TgZ(15,"td",20),t._uU(16),t.ALo(17,"number"),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(16,vn))("queryParams",t.VKq(17,Dn,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.CategoryName),t.xp6(2),t.Oqu(t.lcZ(10,10,e.I.OnHand)),t.xp6(3),t.Q6J("routerLink",t.DdM(19,In))("queryParams",t.WLB(20,bn,e.ID,null==o.pageData||null==o.pageData.Filter?null:o.pageData.Filter.EntityID)),t.xp6(1),t.Oqu(t.lcZ(14,12,e.I.Allocated)),t.xp6(3),t.Oqu(t.lcZ(17,14,e.I.Available))}}function qn(n,r){if(1&n&&(t.TgZ(0,"div",11)(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr")(5,"th",15),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th",16),t._uU(8,"Code"),t.qZA(),t.TgZ(9,"th",16),t._uU(10,"Category"),t.qZA(),t.TgZ(11,"th",17),t._uU(12,"On Hand"),t.qZA(),t.TgZ(13,"th",17),t._uU(14,"Allocated"),t.qZA(),t.TgZ(15,"th",17),t._uU(16,"Available"),t.qZA()()(),t.TgZ(17,"tbody"),t.YNc(18,An,18,23,"tr",18),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(18),t.Q6J("ngForOf",e.data)}}let On=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/AllocatedInventory","InventoryLoader/AllocatedInventory",o),this.httpService=e,this.csvConverter=a,this.roleService=i}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["allocated_inventory"]],features:[t.qOj],decls:7,vars:5,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","","class","w-100",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"w-100",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[2,"width","60px"],[1,"text-end",2,"width","60px"],[4,"ngFor","ngForOf"],[3,"routerLink","queryParams"],[1,"text-end"],["target","_blank",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.YNc(2,Cn,3,0,"a",1),t.qZA(),t.TgZ(3,"filters"),t.YNc(4,yn,10,5,"div",2),t.qZA(),t.TgZ(5,"content"),t.YNc(6,qn,19,1,"div",3),t.qZA()()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,h.ir,O.gM,c.JJ],encapsulation:2}),n})(),et=(()=>{class n{constructor(e){this.datePipe=e}ConvertDateSubTitle(e,o){return e.getMonth()==o.getMonth()&&e.getFullYear()==o.getFullYear()?`[${e.getDate()} - ${o.getDate()} ${this.datePipe.transform(e,"MMM yyyy")}]`:`[${this.datePipe.transform(e,"dd MMM yyyy")} - ${this.datePipe.transform(o,"dd MMM yyyy")}]`}}return n.\u0275fac=function(e){return new(e||n)(t.LFG(c.uU))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function wn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",22),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"Inventory/GetinventoryTrafficByCategory","CategorySummary.csv"))}),t._UZ(1,"i",23),t._uU(2," Export "),t.qZA()}}function Mn(n,r){1&n&&(t.TgZ(0,"th",13),t._uU(1,"Cost"),t.qZA())}function Fn(n,r){if(1&n&&(t.TgZ(0,"td",19),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.Cost,"0.0-4"))}}function Sn(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",18),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",19),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,Fn,3,4,"td",20),t.TgZ(10,"td",18),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td",21),t._uU(14),t.ALo(15,"number"),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.xi3(5,7,e.Sold,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(8,10,e.Buy,"0.0-4")),t.xp6(2),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(2),t.Oqu(t.xi3(12,13,e.Adjust,"0.0-4")),t.xp6(2),t.Q6J("ngClass",e.Now>=0?"text-success":"text-danger"),t.xp6(1),t.Oqu(t.xi3(15,16,e.Now,"0.0-4"))}}function Un(n,r){if(1&n&&(t.TgZ(0,"td",19),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.xi3(2,1,t.xi3(3,4,e.data.Data,"Cost"),"0.0-4"))}}function Jn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,wn,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div")(6,"h6"),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"ng-select",4),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Category"),t.qZA(),t.TgZ(12,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"From - To"),t.qZA(),t.TgZ(16,"datepicker",6),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.From=a)}),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.To=a)}),t.qZA()()()(),t.TgZ(18,"content")(19,"div",8)(20,"div",9)(21,"table",10),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(22,"thead",11)(23,"tr")(24,"th",12),t._uU(25,"Name"),t.qZA(),t.TgZ(26,"th",13),t._uU(27,"Sold"),t.qZA(),t.TgZ(28,"th",13),t._uU(29,"Bought"),t.qZA(),t.YNc(30,Mn,2,0,"th",14),t.TgZ(31,"th",13),t._uU(32,"Adjustment"),t.qZA(),t.TgZ(33,"th",13),t._uU(34,"On Hand"),t.qZA()()(),t.TgZ(35,"tbody"),t.YNc(36,Sn,16,19,"tr",15),t.qZA(),t.TgZ(37,"tfoot")(38,"tr",16)(39,"td",17),t._uU(40,"Total:"),t.qZA(),t.TgZ(41,"td",18),t._uU(42),t.ALo(43,"number"),t.ALo(44,"sum"),t.qZA(),t.TgZ(45,"td",19),t._uU(46),t.ALo(47,"number"),t.ALo(48,"sum"),t.qZA(),t.YNc(49,Un,4,7,"td",20),t.TgZ(50,"td",18),t._uU(51),t.ALo(52,"number"),t.ALo(53,"sum"),t.qZA(),t.TgZ(54,"td",21),t.ALo(55,"sum"),t._uU(56),t.ALo(57,"number"),t.ALo(58,"sum"),t.qZA()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(6),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("multiple",!0)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(13),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(6),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.xi3(43,20,t.xi3(44,23,e.data.Data,"Sold"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(47,26,t.xi3(48,29,e.data.Data,"Buy"),"0.0-4")),t.xp6(3),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(2),t.Oqu(t.xi3(52,32,t.xi3(53,35,e.data.Data,"Adjust"),"0.0-4")),t.xp6(3),t.Q6J("ngClass",t.xi3(55,38,e.data.Data,"Now")>=0?"text-success":"text-danger"),t.xp6(2),t.Oqu(t.xi3(57,41,t.xi3(58,44,e.data.Data,"Now"),"0.0-4"))}}let Nn=(()=>{class n extends A.n{constructor(e,o,a,i,_){super(e,"Inventory/GetinventoryTrafficByCategory","InventoryLoader/GetEntitySummary"),this.httpService=e,this.csvConverter=o,this.pageTitle=a,this.converter=i,this.roleService=_,this.pageTitle.setTitle(this.menuData.T)}postInit(){this.data.Data=this.data.List,this.pageData.SubHeader=this.converter.ConvertDateSubTitle(new Date(this.pageData.Filter.From),new Date(this.pageData.Filter.To))}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;return"Name"===e.active?this.compare(a.Name.toLocaleLowerCase(),i.Name.toLocaleLowerCase(),_):0}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(L.Dx),t.Y36(et),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-rop"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","multiple","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"align-left"],[1,"text-end",2,"width","10%"],["class","text-end","style","width: 10%",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-end","empty-column"],[1,"text-end","text-success"],[1,"text-end","text-danger"],["class","text-end text-danger",4,"ngIf"],[1,"text-end",3,"ngClass"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"]],template:function(e,o){1&e&&t.YNc(0,Jn,59,47,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.mk,c.sg,c.O5,l.JJ,l.On,h.w9,m.YE,m.nU,N.QB,c.JJ,J.qU]}),n})();function Ln(n,r){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 t.KtG(a.exportCSV(a.csvConverter,"Inventory/StockTrafficEntityRecap","Stock Movement "+a.pageData.SubHeader+".csv"))}),t._UZ(1,"i",26),t._uU(2," \xa0Export "),t.qZA()}}function Qn(n,r){1&n&&(t.TgZ(0,"th",16),t._uU(1,"M"),t.qZA())}function Pn(n,r){if(1&n&&(t.TgZ(0,"td",22),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.Manufacture,"0.0-4"))}}const kn=function(){return["/menu/Outlets/Master/Outlets/Form"]},En=function(n){return{ID:n}},nt=function(n,r){return{"text-danger":n,"text-success":r}};function Vn(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",27),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",21),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",22),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",22),t._uU(19),t.ALo(20,"number"),t.qZA(),t.TgZ(21,"td",23),t._uU(22),t.ALo(23,"number"),t.qZA(),t.TgZ(24,"td",21),t._uU(25),t.ALo(26,"number"),t.qZA(),t.YNc(27,Pn,3,4,"td",24),t.TgZ(28,"td",21),t._uU(29),t.ALo(30,"number"),t.qZA(),t.TgZ(31,"td",21),t._uU(32),t.ALo(33,"number"),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(42,kn))("queryParams",t.VKq(43,En,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.xi3(8,15,e.Start,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(11,18,e.Sold,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(14,21,e.Received,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(17,24,e.TransferedIn,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(20,27,e.TransferedOut,"0.0-4")),t.xp6(2),t.Q6J("ngClass",t.WLB(45,nt,e.Adjustment<0,e.Adjustment>=0)),t.xp6(1),t.hij(" ",e.Adjustment<0?-1*e.Adjustment:t.xi3(23,30,e.Adjustment,"0.0-4"),""),t.xp6(3),t.Oqu(t.xi3(26,33,e.Produce,"0.0-4")),t.xp6(2),t.Q6J("ngIf",o.roleService.manufacture.View),t.xp6(2),t.Oqu(t.xi3(30,36,e.End,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(33,39,e.Now,"0.0-4"))}}function Yn(n,r){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.Oqu(t.xi3(2,1,t.xi3(3,4,e.data.Data,"Manufacture"),"0.0-4"))}}const Gn=function(){return["/menu/Inventory/Inventory_Traffic/Outlet_Inventory_Traffic/Outlet_Inventory_Traffic_Summary"]};function Kn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Ln,3,0,"a",2),t.TgZ(3,"a",3),t._uU(4,"Switch to Simple View"),t.qZA()(),t.TgZ(5,"filters")(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(11,"div")(12,"h6"),t._uU(13,"Category"),t.qZA(),t.TgZ(14,"ng-select",6),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.qZA()(),t.TgZ(15,"div")(16,"h6"),t._uU(17,"From - To"),t.qZA(),t.TgZ(18,"datepicker",7),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.From=a)}),t.qZA(),t.TgZ(19,"datepicker",8),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.To=a)}),t.qZA()(),t.TgZ(20,"div")(21,"h6"),t._uU(22,"Exclude Complemantary Item"),t.qZA(),t.TgZ(23,"radio-options",9),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.ExcludedTypeID=a)}),t.qZA()()()(),t.TgZ(24,"content")(25,"div",10)(26,"div",11)(27,"table",12)(28,"thead",13)(29,"tr")(30,"th",14),t._uU(31,"Name"),t.qZA(),t.TgZ(32,"th",15),t._uU(33,"Code"),t.qZA(),t.TgZ(34,"th",16),t._uU(35,"Start"),t.qZA(),t.TgZ(36,"th",16),t._uU(37,"Sold"),t.qZA(),t.TgZ(38,"th",16),t._uU(39,"Bought"),t.qZA(),t.TgZ(40,"th",16),t._uU(41,"T.In"),t.qZA(),t.TgZ(42,"th",16),t._uU(43,"T.Out"),t.qZA(),t.TgZ(44,"th",16),t._uU(45,"Adjust"),t.qZA(),t.TgZ(46,"th",16),t._uU(47,"P"),t.qZA(),t.YNc(48,Qn,2,0,"th",17),t.TgZ(49,"th",16),t._uU(50,"End"),t.qZA(),t.TgZ(51,"th",16),t._uU(52,"Now"),t.qZA()()(),t.TgZ(53,"tbody"),t.YNc(54,Vn,34,48,"tr",18),t.qZA(),t.TgZ(55,"tfoot")(56,"tr",19)(57,"th",20),t._uU(58,"Total:"),t.qZA(),t.TgZ(59,"td",21),t._uU(60),t.ALo(61,"number"),t.ALo(62,"sum"),t.qZA(),t.TgZ(63,"td",22),t._uU(64),t.ALo(65,"number"),t.ALo(66,"sum"),t.qZA(),t.TgZ(67,"td",21),t._uU(68),t.ALo(69,"number"),t.ALo(70,"sum"),t.qZA(),t.TgZ(71,"td",21),t._uU(72),t.ALo(73,"number"),t.ALo(74,"sum"),t.qZA(),t.TgZ(75,"td",22),t._uU(76),t.ALo(77,"number"),t.ALo(78,"sum"),t.qZA(),t.TgZ(79,"td",23),t.ALo(80,"sum"),t.ALo(81,"sum"),t._uU(82),t.ALo(83,"number"),t.ALo(84,"sum"),t.qZA(),t.TgZ(85,"td",21),t._uU(86),t.ALo(87,"number"),t.ALo(88,"sum"),t.qZA(),t.YNc(89,Yn,4,7,"td",24),t.TgZ(90,"td",21),t._uU(91),t.ALo(92,"number"),t.ALo(93,"sum"),t.qZA(),t.TgZ(94,"td",21),t._uU(95),t.ALo(96,"number"),t.ALo(97,"sum"),t.qZA()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(1),t.Q6J("routerLink",t.DdM(87,Gn)),t.xp6(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("model",e.pageData.Filter.ExcludedTypeID)("options",e.ExcludedType),t.xp6(25),t.Q6J("ngIf",e.roleService.manufacture.View),t.xp6(6),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.xi3(61,27,t.xi3(62,30,e.data.Data,"Start"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(65,33,t.xi3(66,36,e.data.Data,"Sold"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(69,39,t.xi3(70,42,e.data.Data,"Received"),"0.0-4")),t.xp6(4),t.hij("",t.xi3(73,45,t.xi3(74,48,e.data.Data,"TransferedIn"),"0.0-4")," "),t.xp6(4),t.hij("",t.xi3(77,51,t.xi3(78,54,e.data.Data,"TransferedOut"),"0.0-4")," "),t.xp6(3),t.Q6J("ngClass",t.WLB(88,nt,t.xi3(80,57,e.data.Data,"Adjustment")<0,t.xi3(81,60,e.data.Data,"Adjustment")>=0)),t.xp6(3),t.hij(" ",t.xi3(83,63,t.xi3(84,66,e.data.Data,"Adjustment"),"0.0-4"),""),t.xp6(4),t.Oqu(t.xi3(87,69,t.xi3(88,72,e.data.Data,"Produce"),"0.0-4")),t.xp6(3),t.Q6J("ngIf",e.roleService.manufacture.View),t.xp6(2),t.Oqu(t.xi3(92,75,t.xi3(93,78,e.data.Data,"End"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(96,81,t.xi3(97,84,e.data.Data,"Now"),"0.0-4"))}}let Hn=(()=>{class n extends A.n{constructor(e,o,a,i,_){super(e,"Inventory/StockTrafficEntityRecap","InventoryLoader/StockTrafficEntityRecap"),this.httpService=e,this.csvConverter=o,this.pageTitle=a,this.converter=i,this.roleService=_,this.adjTotal=0,this.ExcludedType=[{Key:0,Value:"Yes"},{Key:1,Value:"No"}],this.pageTitle.setTitle(this.menuData.T)}preGetList(){this.menuData.H="Outlet Inventory Traffic "+this.converter.ConvertDateSubTitle(new Date(this.pageData.Filter.From),new Date(this.pageData.Filter.To))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(L.Dx),t.Y36(et),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-outlet-inventory-traffic"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["role","button","class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Switch to Simple View",1,"button","btn","btn-success",3,"routerLink"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["name","ExcludedTypeID",3,"model","options","modelChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","300px"],[2,"width","50px"],[1,"text-end",2,"width","50px"],["style","width:50px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"empty-column","text-end"],[1,"text-end","text-success"],[1,"text-end","text-danger"],[1,"text-end",3,"ngClass"],["class","text-end text-danger",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,Kn,98,91,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.mk,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,N.QB,F.P,O.gM,c.JJ,J.qU]}),n})();function Rn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Product"),t.qZA(),t.TgZ(3,"autocompleteV2",9),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.ProductID=a)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.pageData.Filter.ProductID)}}function jn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",3)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",4),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.YNc(5,Rn,4,1,"div",5),t.TgZ(6,"div")(7,"h6"),t._uU(8,"From - To"),t.qZA(),t.TgZ(9,"datepicker",6),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.From=a)}),t.qZA(),t.TgZ(10,"datepicker",7),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.To=a)}),t.qZA()(),t.TgZ(11,"div")(12,"h6"),t._uU(13,"Note"),t.qZA(),t.TgZ(14,"input",8),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Notes=a)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(1),t.Q6J("ngIf",e.pageData.Filter),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Notes)}}const $n=function(){return["/menu/Orders/Orders/Supplier_Bill/Info"]},Wn=function(n){return{ID:n}};function zn(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",24),t._uU(5),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.ALo(8,"date"),t.qZA(),t.TgZ(9,"td",25),t._uU(10),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA(),t.TgZ(15,"td"),t._uU(16),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.VariantName),t.xp6(2),t.Q6J("routerLink",t.DdM(12,$n))("queryParams",t.VKq(13,Wn,e.InvoiceID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(8,9,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.LeftOverDisplay),t.xp6(2),t.Oqu(e.ProductionBatch),t.xp6(2),t.Oqu(e.ExpiredDate),t.xp6(2),t.Oqu(e.ExpiredDate)}}function Xn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",26),t.NdJ("page",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onPaginationChange(a))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function ta(n,r){if(1&n&&(t.TgZ(0,"div",10)(1,"div",11)(2,"table",12)(3,"thead",13)(4,"tr")(5,"th",14),t._uU(6,"Product"),t.qZA(),t.TgZ(7,"th",15),t._uU(8,"PO #"),t.qZA(),t.TgZ(9,"th",16),t._uU(10,"PO Date"),t.qZA(),t.TgZ(11,"th",17),t._uU(12,"Inventory X/Y"),t.qZA(),t.TgZ(13,"th",18),t._uU(14,"Production #"),t.qZA(),t.TgZ(15,"th",19),t._uU(16,"Expired"),t.qZA(),t.TgZ(17,"th",20),t._uU(18,"Note"),t.qZA()()(),t.TgZ(19,"tbody"),t.YNc(20,zn,17,15,"tr",21),t.qZA()()(),t.TgZ(21,"div",22),t.YNc(22,Xn,1,3,"mat-paginator",23),t.qZA()()),2&n){const e=t.oxw();t.xp6(20),t.Q6J("ngForOf",e.data.Data),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}let ea=(()=>{class n extends A.n{constructor(e,o){super(e,"Inventory/FifoIlustration","InventoryLoader/FifoIlustration"),this.httpService=e,this.pageTitle=o,this.pageTitle.setTitle(this.pageData.Title)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(L.Dx))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-FIFO_Illustration"]],features:[t.qOj],decls:5,vars:4,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["container","","class","w-100",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],[4,"ngIf"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["type","text",1,"ng-pristine","ng-valid","ng-empty","ng-touched",3,"ngModel","ngModelChange"],["inputID","productName","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"w-100",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName","arrowPosition","before",1,"align-left"],["mat-sort-header","Number","arrowPosition","before",1,"align-left"],["mat-sort-header","Date","arrowPosition","before",1,"align-left"],["mat-sort-header","LeftOverDisplay","arrowPosition","before",1,"align-left"],["mat-sort-header","ProductionBatch","arrowPosition","before",1,"align-left"],["mat-sort-header","ExpiredDate","arrowPosition","before",1,"align-left"],["mat-sort-header","Note","arrowPosition","before",1,"align-left"],[4,"ngFor","ngForOf"],[1,"mt-2"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"filters"),t.YNc(2,jn,15,8,"div",1),t.qZA(),t.TgZ(3,"content"),t.YNc(4,ta,23,2,"div",2),t.qZA()()),2&e&&(t.Q6J("pageData",o.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",o.pageData.Filter),t.xp6(2),t.Q6J("ngIf",o.data))},dependencies:[I.p,c.sg,c.O5,l.Fj,l.JJ,l.On,g.yS,w.NW,h.w9,m.YE,m.nU,N.QB,k.J,c.uU]}),n})();function na(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",16),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"Adjustment/ExportNegativeInventory","Negative_Stock.csv"))}),t._UZ(1,"i",17),t._uU(2," Export "),t.qZA()}}const aa=function(){return["/menu/Products/Catalog/Variants/Info"]},oa=function(n){return{ID:n}};function ia(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",18),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",19),t._uU(9),t.qZA(),t.TgZ(10,"td",20),t._uU(11),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(7,aa))("queryParams",t.VKq(8,oa,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Oqu(e.UnitsInStock),t.xp6(2),t.Oqu(e.UOMName)}}function ra(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,na,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div")(6,"h6"),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"ng-select",4),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Category"),t.qZA(),t.TgZ(12,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.qZA()()()(),t.TgZ(13,"content")(14,"div",6)(15,"div",7)(16,"table",8),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(17,"thead",9)(18,"tr")(19,"th",10),t._uU(20,"Name"),t.qZA(),t.TgZ(21,"th",11),t._uU(22,"Code"),t.qZA(),t.TgZ(23,"th",12),t._uU(24,"Outlet"),t.qZA(),t.TgZ(25,"th",13),t._uU(26,"Unit Stock"),t.qZA(),t._UZ(27,"th",14),t.qZA()(),t.TgZ(28,"tbody"),t.YNc(29,ia,12,10,"tr",15),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(6),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(17),t.Q6J("ngForOf",e.data.Data)}}let la=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Adjustment/GetNegativeQuantity","InventoryLoader/InventoryReport"),this.httpService=e,this.pageTitle=o,this.csvConverter=a,this.roleService=i,this.pageTitle.setTitle(this.menuData.T)}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;switch(null==a.Code&&(a.Code=""),null==i.Code&&(i.Code=""),e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),i.Name.toLocaleLowerCase(),_);case"Code":return this.compare(a.Code.toLocaleLowerCase(),i.Code.toLocaleLowerCase(),_);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(L.Dx),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-negative_inventory"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["role","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["matSort","",1,"table","border-bottom","w-100",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name"],["mat-sort-header","Code",2,"width","70px"],[2,"width","70px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","50px"],[4,"ngFor","ngForOf"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],[3,"routerLink","queryParams"],[1,"text-end","text-danger"],[1,"text-end"]],template:function(e,o){1&e&&t.YNc(0,ra,30,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,m.YE,m.nU]}),n})();function ca(n,r){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 t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/InventoryOrderByCompositeExport","InventoryComposite.csv"))}),t._UZ(1,"i",18),t._uU(2," \xa0Export "),t.qZA()}}function _a(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",19),t._uU(4),t.ALo(5,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Quantity))}}function pa(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",19),t._uU(4),t.ALo(5,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Quantity))}}function sa(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,ca,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CustomDateFrom=a)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CustomDateTo=a)}),t.qZA()()()()(),t.TgZ(18,"content")(19,"div",8)(20,"div",9)(21,"div",10)(22,"h5",11),t._uU(23,"Product"),t.qZA()(),t.TgZ(24,"div",12)(25,"table",13)(26,"thead",14)(27,"tr")(28,"th"),t._uU(29,"Name"),t.qZA(),t.TgZ(30,"th",15),t._uU(31,"Quantity"),t.qZA()()(),t.TgZ(32,"tbody"),t.YNc(33,_a,6,4,"tr",16),t.qZA()()()(),t.TgZ(34,"div",9)(35,"div",10)(36,"h5",11),t._uU(37,"Component"),t.qZA()(),t.TgZ(38,"div",12)(39,"table",13)(40,"thead",14)(41,"tr")(42,"th"),t._uU(43,"Name"),t.qZA(),t.TgZ(44,"th",15),t._uU(45,"Quantity"),t.qZA()()(),t.TgZ(46,"tbody"),t.YNc(47,pa,6,4,"tr",16),t.qZA()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(3),t.Oqu((e.pageData.CustomDateLabel||"Custom Date")+" From"),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.CustomDateFrom),t.xp6(3),t.Oqu((e.pageData.CustomDateLabel||"Custom Date")+" To"),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.CustomDateTo),t.xp6(16),t.Q6J("ngForOf",e.data.Data.Product),t.xp6(14),t.Q6J("ngForOf",e.data.Data.Composite)}}let ua=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/InventoryOrderByComposite","InventoryLoader/InventoryOrderByComposite"),this.httpService=e,this.csvConverter=o,this.pageTitle=a,this.roleService=i,this.pageTitle.setTitle(this.menuData.T)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(L.Dx),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Inventory-Order-By-Composite"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"container-fluid","mt-3"],[1,"row","mt-7"],[1,"col-sm-2"],[1,"font-weigh-bold"],[1,"col-sm-10"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"width","100px"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"text-end"]],template:function(e,o){1&e&&t.YNc(0,sa,48,13,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,h.w9,N.QB,c.JJ],encapsulation:2}),n})();function da(n,r){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 t.KtG(a.exportCSV(a.csvConverter,"Inventory/ExportEntitySummary","EntitySummary.csv"))}),t._UZ(1,"i",22),t._uU(2," \xa0Export "),t.qZA()}}const ga=function(){return["/menu/Outlets/Master/Outlets/Form"]},ma=function(n){return{ID:n}};function xa(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",23),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",19),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",19),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",20),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",19),t._uU(16),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"td",19),t._uU(19),t.ALo(20,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(24,ga))("queryParams",t.VKq(25,ma,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.xi3(8,9,e.Start,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(11,12,e.InStock,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(14,15,e.OutStock,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(17,18,e.End,"0.0-4")),t.xp6(3),t.Oqu(t.xi3(20,21,e.Different,"0.0-4"))}}const ha=function(){return["/menu/Inventory/Inventory_Traffic/Outlet_Inventory_Traffic"]};function Ta(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,da,3,0,"a",2),t.TgZ(3,"a",3),t._uU(4,"Switch to Detail"),t.qZA()(),t.TgZ(5,"filters")(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(11,"div")(12,"h6"),t._uU(13,"Category"),t.qZA(),t.TgZ(14,"ng-select",6),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.qZA()(),t.TgZ(15,"div")(16,"h6"),t._uU(17,"From - To"),t.qZA(),t.TgZ(18,"datepicker",7),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.From=a)}),t.qZA(),t.TgZ(19,"datepicker",8),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.To=a)}),t.qZA()()()(),t.TgZ(20,"content")(21,"div",9)(22,"div",10)(23,"table",11),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(24,"thead",12)(25,"tr")(26,"th",13),t._uU(27,"Name"),t.qZA(),t.TgZ(28,"th",14),t._uU(29,"Code"),t.qZA(),t.TgZ(30,"th",15),t._uU(31,"Start"),t.qZA(),t.TgZ(32,"th",15),t._uU(33,"In"),t.qZA(),t.TgZ(34,"th",15),t._uU(35,"Out"),t.qZA(),t.TgZ(36,"th",15),t._uU(37,"End"),t.qZA(),t.TgZ(38,"th",15),t._uU(39,"Diff"),t.qZA()()(),t.TgZ(40,"tbody"),t.YNc(41,xa,21,27,"tr",16),t.qZA(),t.TgZ(42,"tfoot")(43,"tr",17)(44,"th",18),t._uU(45,"Total:"),t.qZA(),t.TgZ(46,"td",19),t._uU(47),t.ALo(48,"number"),t.ALo(49,"sum"),t.qZA(),t.TgZ(50,"td",20),t._uU(51),t.ALo(52,"number"),t.ALo(53,"sum"),t.qZA(),t.TgZ(54,"td",19),t._uU(55),t.ALo(56,"number"),t.ALo(57,"sum"),t.qZA(),t.TgZ(58,"td",19),t._uU(59),t.ALo(60,"number"),t.ALo(61,"sum"),t.qZA(),t.TgZ(62,"td",20),t._uU(63),t.ALo(64,"number"),t.ALo(65,"sum"),t.qZA()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(1),t.Q6J("routerLink",t.DdM(48,ha)),t.xp6(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(22),t.Q6J("ngForOf",e.data.Data),t.xp6(6),t.Oqu(t.xi3(48,18,t.xi3(49,21,e.data.Data,"Start"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(52,24,t.xi3(53,27,e.data.Data,"InStock"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(56,30,t.xi3(57,33,e.data.Data,"OutStock"),"0.0-4")),t.xp6(4),t.Oqu(t.xi3(60,36,t.xi3(61,39,e.data.Data,"End"),"0.0-4")),t.xp6(4),t.hij(" ",t.xi3(64,42,t.xi3(65,45,e.data.Data,"Different"),"0.0-4")," ")}}let Ca=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/GetEntitySummary","InventoryLoader/GetinventoryTrafficDetailed"),this.httpService=e,this.csvConverter=o,this.pageTitle=a,this.roleService=i,this.pageTitle.setTitle(this.menuData.T)}postInit(){this.data.Data=this.data}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;switch(null==a.Code&&(a.Code=""),null==i.Code&&(i.Code=""),e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),i.Name.toLocaleLowerCase(),_);case"Code":return this.compare(a.Code.toLocaleLowerCase(),i.Code.toLocaleLowerCase(),_);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(L.Dx),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Outlet-Inventory-traffic-Summary"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Switch to Detail",1,"button","btn","btn-success","ms-6",3,"routerLink"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",2,"width","35%"],["mat-sort-header","Code",2,"width","35%"],[1,"text-end",2,"width","6%"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"empty-column","text-end"],[1,"text-end","text-success"],[1,"text-end","text-danger"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[3,"routerLink","queryParams"]],template:function(e,o){1&e&&t.YNc(0,Ta,66,49,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,m.YE,m.nU,N.QB,O.gM,c.JJ,J.qU],encapsulation:2}),n})();function Za(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",14),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"Inventory/GetDepletingInventory","Deffered_Revenue.csv"))}),t._UZ(1,"i",15),t._uU(2,"\xa0Export "),t.qZA()}}function ya(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",16)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",17),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Quantity "),t._UZ(8,"i",18),t.qZA(),t.TgZ(9,"input",19),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.Qty=a)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From - To"),t.qZA(),t.TgZ(13,"datepicker",20),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.From=a)}),t.qZA(),t.TgZ(14,"datepicker",21),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.To=a)}),t.qZA()(),t.TgZ(15,"div")(16,"h6"),t._uU(17,"Group By"),t.qZA(),t.TgZ(18,"radio-options",22),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.ByProduct=a)}),t.qZA()(),t.TgZ(19,"div")(20,"h6"),t._uU(21,"Row Count"),t.qZA(),t.TgZ(22,"input",23),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.RowCount=a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("multiple",!0)("ngModel",e.pageData.Filter.EntityID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.Qty),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("model",e.pageData.Filter.ByProduct)("options",e.GroupBy),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}const va=function(){return["/menu/Products/Catalog/Products/Info"]},Da=function(n){return{ID:n}};function Ia(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",24),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",25),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",25),t._uU(10),t.ALo(11,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(10,va))("queryParams",t.VKq(11,Da,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(8,6,e.ItemSold)),t.xp6(3),t.Oqu(t.lcZ(11,8,e.UnitsInStock))}}function ba(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",26),t.NdJ("page",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onPaginationChange(a))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function Aa(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Za,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.YNc(4,ya,23,11,"div",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"table",6),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(9,"thead",7)(10,"tr")(11,"th",8),t._uU(12,"Name"),t.qZA(),t.TgZ(13,"th",9),t._uU(14,"Code"),t.qZA(),t.TgZ(15,"th",10),t._uU(16,"Qty Sold"),t.qZA(),t.TgZ(17,"th",11),t._uU(18,"On Hand"),t.qZA()()(),t.TgZ(19,"tbody"),t.YNc(20,Ia,12,13,"tr",12),t.qZA()()(),t.TgZ(21,"div"),t.YNc(22,ba,1,3,"mat-paginator",13),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",e.pageData.Filter),t.xp6(16),t.Q6J("ngForOf",e.data.List),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}let qa=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/GetDepletingInventory","InventoryLoader/GetDepletingNG"),this.httpService=e,this.pageTitle=o,this.roleService=a,this.csvConverter=i,this.GroupBy=[{Key:!0,Value:"Product"},{Key:!1,Value:"Variant"}],this.pageTitle.setTitle(this.menuData.T)}sortData(e){const o=this.data.List.slice();this.data.List=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;switch(a.Code=a.Code??"",i.Code=i.Code??"",e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),i.Name.toLocaleLowerCase(),_);case"Code":return this.compare(a.Code.toLocaleLowerCase(),i.Code.toLocaleLowerCase(),_);case"ItemSold":return this.compare(a.ItemSold,i.ItemSold,_);case"UnitsInStock":return this.compare(a.UnitsInStock,i.UnitsInStock,_);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(L.Dx),t.Y36(D.N),t.Y36(x.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Depleting-Inventory"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["value","Export","matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","","class","w-100",4,"ngIf"],[1,"container-fluid","my-3"],[1,"table-responsive"],["matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"align-left",2,"width","600px"],["mat-sort-header","Code",1,"align-left",2,"width","80px"],["mat-sort-header","ItemSold","arrowPosition","before",1,"flex-right",2,"width","72px"],["mat-sort-header","UnitsInStock","arrowPosition","before",1,"flex-right",2,"width","71px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],["value","Export","matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","multiple","ngModel","ngModelChange"],[1,"fa-solid","fa-less-than-equal"],["type","text","name","Qty",3,"ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["name","ByProduct",3,"model","options","modelChange"],["type","text","name","RowCount",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"],[2,"text-align","right"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&t.YNc(0,Aa,23,6,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.Fj,l.JJ,l.On,g.yS,w.NW,h.w9,m.YE,m.nU,N.QB,F.P,O.gM,c.JJ],encapsulation:2}),n})();function Oa(n,r){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 t.KtG(a.exportCSV(a.csvConverter,"Inventory/InventorySerial","SerialInventory.csv"))}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function wa(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",26),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",27),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.CategoryID=a)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Discontinued"),t.qZA(),t.TgZ(12,"radio-options",28),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("multiple",!0)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued)}}function Ma(n,r){1&n&&(t.TgZ(0,"th",29),t._uU(1," Cost "),t.qZA())}function Fa(n,r){1&n&&(t.TgZ(0,"th",12),t._uU(1," Margin(%) "),t.qZA())}function Sa(n,r){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.Oqu(t.lcZ(2,1,e.UnitCost))}}function Ua(n,r){if(1&n&&(t.TgZ(0,"td",12),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.Margin))}}const at=function(n){return{ID:n}};function Ja(n,r){if(1&n&&(t.TgZ(0,"tr",39)(1,"td")(2,"a",40)(3,"span",35),t._uU(4),t.qZA(),t.TgZ(5,"span",35),t._uU(6),t.qZA()(),t.TgZ(7,"div"),t._uU(8),t.qZA()(),t.TgZ(9,"td",9),t._uU(10),t.qZA(),t.TgZ(11,"td",10),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,Sa,3,3,"td",41),t.TgZ(15,"td",12),t._uU(16),t.ALo(17,"number"),t.qZA(),t.YNc(18,Ua,3,3,"td",42),t.qZA()),2&n){const e=r.$implicit,o=t.oxw().$implicit,a=t.oxw(3);t.xp6(2),t.Q6J("queryParams",t.VKq(15,at,e.ID)),t.xp6(1),t.Q6J("hidden",o.Variants.length<=1),t.xp6(1),t.Oqu(e.Model),t.xp6(1),t.Q6J("hidden",o.Variants.length>1),t.xp6(1),t.hij(" ",o.Name+" ("+e.Model+")"," "),t.xp6(2),t.hij(" ",e.UOMName," "),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(13,11,e.Quantity)),t.xp6(2),t.Q6J("ngIf",a.roleService.product.Cost),t.xp6(2),t.Oqu(t.lcZ(17,13,e.UnitPrice)),t.xp6(2),t.Q6J("ngIf",a.roleService.product.Cost)}}function Na(n,r){if(1&n&&(t.TgZ(0,"div",34)(1,"div",35)(2,"h4")(3,"a",36),t._uU(4),t.qZA()()(),t.TgZ(5,"div",5)(6,"table",37)(7,"tbody"),t.YNc(8,Ja,19,17,"tr",38),t.qZA()()()()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("hidden",e.Variants.length<=1),t.xp6(2),t.Q6J("queryParams",t.VKq(4,at,e.ID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(4),t.Q6J("ngForOf",e.Variants)}}function La(n,r){if(1&n&&(t.TgZ(0,"div",30)(1,"div",31)(2,"h3",32),t._uU(3),t.qZA(),t.YNc(4,Na,9,6,"div",33),t.qZA()()),2&n){const e=r.$implicit;t.xp6(3),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngForOf",e.Products)}}function Qa(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Oa,3,0,"a",2),t.qZA(),t.TgZ(3,"filters"),t.YNc(4,wa,13,6,"div",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"table",6)(9,"thead",7)(10,"tr",8)(11,"th"),t._uU(12," Name "),t.qZA(),t.TgZ(13,"th",9),t._uU(14," Code "),t.qZA(),t.TgZ(15,"th",10),t._uU(16," Qty "),t.qZA(),t.YNc(17,Ma,2,0,"th",11),t.TgZ(18,"th",12),t._uU(19," Price "),t.qZA(),t.YNc(20,Fa,2,0,"th",13),t.qZA()()()(),t.YNc(21,La,5,2,"div",14),t.TgZ(22,"div",15)(23,"div",16)(24,"div",5)(25,"table",17)(26,"thead",7)(27,"tr")(28,"th",18),t._uU(29," Total Quantity "),t.qZA(),t.TgZ(30,"th",19),t._uU(31," Total Inventory COST ( "),t._UZ(32,"span",20),t.ALo(33,"number"),t._uU(34,"%) "),t.qZA(),t.TgZ(35,"th",19),t._uU(36," Total Inventory Value when SOLD "),t.qZA()()(),t.TgZ(37,"tbody")(38,"tr"),t._UZ(39,"td",21),t.ALo(40,"number"),t._UZ(41,"td",22),t.ALo(42,"number"),t._UZ(43,"td",22),t.ALo(44,"number"),t.qZA()()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",e.pageData.Filter),t.xp6(13),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(3),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngForOf",e.data.Data),t.xp6(9),t.Q6J("hidden",!e.roleService.product.Cost),t.xp6(2),t.Q6J("hidden",0==(null==e.data.Aggregate?null:e.data.Aggregate.TotalSales))("innerHtml",t.lcZ(33,16,e.data.Aggregate.TotalCost/e.data.Aggregate.TotalSales*100),t.oJD),t.xp6(3),t.Q6J("hidden",!e.roleService.product.Cost),t.xp6(4),t.Q6J("innerHtml",t.lcZ(40,18,e.data.Aggregate.TotalQuantity),t.oJD),t.xp6(2),t.Q6J("hidden",!e.roleService.product.Cost)("innerHtml",t.lcZ(42,20,e.data.Aggregate.TotalCost),t.oJD),t.xp6(2),t.Q6J("hidden",!e.roleService.product.Cost)("innerHtml",t.lcZ(44,22,e.data.Aggregate.TotalSales),t.oJD)}}let Pa=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/InventorySerial","InventoryLoader/InventorySerial"),this.httpService=e,this.csvConverter=o,this.roleService=a,this.pageTitle=i,this.pageTitle.setTitle("Serial Inventory")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(D.N),t.Y36(L.Dx))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-serial_inventory"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","","class","w-100",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","table-header"],[1,"thead-light","sticky-top-thead"],["id","trStockRecap"],[2,"width","120px"],[1,"text-end",2,"width","100px"],["class","text-end","style","width: 120px",4,"ngIf"],[1,"text-end",2,"width","80px"],["class","text-end","style","width: 80px",4,"ngIf"],["class","categorypack summary",4,"ngFor","ngForOf"],[1,"row","d-flex","justify-content-end","align-items-center","mt-5"],[1,"col-md-6"],[1,"table"],[1,"text-end"],[1,"text-end",3,"hidden"],[3,"hidden","innerHtml"],[1,"text-end",3,"innerHtml"],[1,"text-end",3,"hidden","innerHtml"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","multiple","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["name","Discontinued",3,"model","modelChange"],[1,"text-end",2,"width","120px"],[1,"categorypack","summary"],[1,"mt-10"],[1,"fw-normal"],["class","productpack mt-5",4,"ngFor","ngForOf"],[1,"productpack","mt-5"],[3,"hidden"],["routerLink","/menu/Products/Catalog/Products/Info",3,"queryParams"],[1,"table","table-borderless","mt-6"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],["style","width: 120px","class","text-end",4,"ngIf"],["style","width: 80px","class","text-end",4,"ngIf"]],template:function(e,o){1&e&&t.YNc(0,Qa,45,24,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,F.P,c.JJ]}),n})();const ka=["myCalendar"];function Ea(n,r){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 t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/InventoryExportByVariantLog","Inventory Timeline.csv"))}),t._UZ(1,"i",26),t._uU(2," Export "),t.qZA()}}function Va(n,r){if(1&n&&(t.TgZ(0,"span",37),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}const Ya=function(){return{standalone:!0}};function Ba(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",27)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",28),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.ListEntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",29),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(9,Va,2,2,"ng-template",30),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Date - In the morning"),t.qZA(),t.TgZ(13,"datepicker",31),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.Date=a)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Time"),t.qZA(),t.TgZ(17,"p-calendar",32,33),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onSelectTime(a))}),t.TgZ(19,"p-footer")(20,"button",34),t.NdJ("click",function(){t.CHM(e);const a=t.MAs(18);return t.KtG(a.hideOverlay())}),t.qZA()()()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"Supplier"),t.qZA(),t.TgZ(24,"autocompleteV2",35),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.SupplierID=a)}),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"Discontinued"),t.qZA(),t.TgZ(28,"radio-options",36),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("multiple",!0)("ngModel",e.pageData.Filter.ListEntityID)("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.Date),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.Time)("timeOnly",!0)("ngModelOptions",t.DdM(11,Ya)),t.xp6(7),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued)}}const ot=function(){return["/menu/Products/Catalog/Variants/Info"]},it=function(n){return{ID:n}},Ga=function(n,r){return{"text-danger":n,"text-success":r}};function Ka(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td",38)(2,"a",39),t._uU(3),t.qZA()(),t.TgZ(4,"td",40),t._uU(5),t.qZA(),t.TgZ(6,"td",41),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",42),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",42),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",42)(16,"a",43),t._uU(17),t.ALo(18,"number"),t.qZA()()()),2&n){const e=r.$implicit;t.xp6(1),t.ekj("bg-gradient-warning",0==e.In&&0==e.Out&&0==e.Now),t.xp6(1),t.Q6J("routerLink",t.DdM(21,ot))("queryParams",t.VKq(22,it,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(8,13,e.Start)),t.xp6(3),t.Oqu(t.lcZ(11,15,e.In)),t.xp6(3),t.Oqu(t.lcZ(14,17,e.Out)),t.xp6(3),t.Q6J("routerLink",t.DdM(24,ot))("queryParams",t.VKq(25,it,e.ID))("ngClass",t.WLB(27,Ga,e.Start>e.Now,e.Now>e.Start)),t.xp6(1),t.Oqu(t.lcZ(18,19,e.Now))}}function Ha(n,r){if(1&n&&(t.TgZ(0,"tr",44)(1,"td",45),t._uU(2,"Total:"),t.qZA(),t.TgZ(3,"td",46),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",47),t._uU(7),t.ALo(8,"number"),t.qZA(),t.TgZ(9,"td",47),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",47),t._uU(13),t.ALo(14,"number"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(4),t.Oqu(t.lcZ(5,4,e.data.Aggregate.Start)),t.xp6(3),t.Oqu(t.lcZ(8,6,e.data.Aggregate.In)),t.xp6(3),t.Oqu(t.lcZ(11,8,e.data.Aggregate.Out)),t.xp6(3),t.Oqu(t.lcZ(14,10,e.data.Aggregate.Now))}}function Ra(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"span",48),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryByVariantLogRowsCount"))}),t.TgZ(1,"i",49),t._uU(2,"?"),t.qZA()()}}function ja(n,r){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 $a(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",50),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.NextPage(!0))}),t._UZ(1,"i",51),t._uU(2," Next"),t.qZA()}}function Wa(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",52),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryByVariantLogRowsCount",!0))}),t._UZ(1,"i",53),t._uU(2," Show All"),t.qZA()}}const za=function(){return["Detailed_Inventory_Traffic_Log"]};function Xa(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Text=a)})("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Ea,3,0,"a",2),t.TgZ(3,"a",3),t._uU(4,"Breakdown"),t.qZA()(),t.TgZ(5,"filters")(6,"div",4),t.YNc(7,Ba,29,12,"div",5),t.qZA()(),t.TgZ(8,"content")(9,"div",6)(10,"div",7)(11,"table",8),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.sortData(a))}),t.TgZ(12,"thead",9)(13,"tr")(14,"th",10),t._uU(15,"Name"),t.qZA(),t.TgZ(16,"th",11),t._uU(17,"Code"),t.qZA(),t.TgZ(18,"th",12),t._uU(19),t.ALo(20,"date"),t.qZA(),t.TgZ(21,"th",13),t._uU(22,"In"),t.qZA(),t.TgZ(23,"th",13),t._uU(24,"Out"),t.qZA(),t.TgZ(25,"th",14),t._uU(26,"Qty Now"),t.qZA()()(),t.TgZ(27,"tbody"),t.YNc(28,Ka,19,30,"tr",15),t.qZA(),t.TgZ(29,"tfoot"),t.YNc(30,Ha,15,12,"tr",16),t.qZA()()(),t.TgZ(31,"div",17)(32,"div",18)(33,"div",19),t._uU(34),t.ALo(35,"number"),t.YNc(36,Ra,3,0,"span",20),t.YNc(37,ja,3,3,"span",21),t._uU(38),t.qZA()(),t.TgZ(39,"div",22),t.YNc(40,$a,3,0,"a",23),t.YNc(41,Wa,3,0,"a",24),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.roleService.global.Export),t.xp6(1),t.Q6J("routerLink",t.DdM(19,za)),t.xp6(4),t.Q6J("ngIf",e.pageData.Filter),t.xp6(12),t.hij(" ",t.xi3(20,14,null==e.data?null:e.data.Date,"d-MMM-yy")," "),t.xp6(9),t.Q6J("ngForOf",e.infiniteList),t.xp6(2),t.Q6J("ngIf",null==e.data?null:e.data.Aggregate),t.xp6(4),t.hij(" Showing 1 - ",t.lcZ(35,17,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 to=(()=>{class n extends b.X{constructor(e,o,a,i){super(e,"Inventory/InventoryByVariantLog","InventoryLoader/AtDate",o),this.httpService=e,this.csvConverter=a,this.roleService=i}close(){this.datePicker.overlayVisible=!1}preGetList(){this.data&&(this.pageData.Header="Inventory Timeline - "+(0,c.p6)(this.data.Date,"d MMM","en-US"))}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount}sortData(e){const o=this.infiniteList.slice();this.infiniteList=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;switch(e.active){case"Name":return this.compare(a.Name,i.Name,_);case"Code":return this.compare(a.Code,i.Code,_);default:return 0}}):this.originalData}exportformui(e){const o={Name:"Name",Code:"Code",QtyFrom:(0,c.p6)(this.pageData.Filter.Date,"d-MMM-yy","en-US"),In:"In",Out:"Out",QtyNow:"Qty Now",Cost:"Cost",TotalCost:"Total Cost",Price:"Price",TotalPrice:"Total Price"},a=[];let i=0,_=0,C=0,P=0,E=0,Q=0,_t=0,pt=0;this.data.data.forEach(d=>{const H={Name:d.Name,Code:d.Code?d.Code:"",QtyFrom:d.Start?d.Start:0,In:d.In?d.In:0,Out:d.Out?d.Out:0,QtyNow:d.Now?d.Now:0,Cost:d.UnitCost?d.UnitCost:0,TotalCost:d.Now*d.UnitCost!=0?d.Now*d.UnitCost:0,Price:d.UnitPrice?d.UnitPrice:0,TotalPrice:d.Now*d.UnitPrice?d.Now*d.UnitPrice:0};_t+=d.In?d.In:0,pt+=d.Out?d.Out:0,i+=d.UnitCost?d.UnitCost:0,_+=d.Now*d.UnitCost!=0?d.Now*d.UnitCost:0,C+=d.UnitPrice?d.UnitPrice:0,P+=d.Now*d.UnitPrice!=0?d.Now*d.UnitPrice:0,E+=d.Now?d.Now:0,Q+=d.Start?d.Start:0,this.pageData.CostVisible||(delete H.Cost,delete H.TotalCost),a.push(H)});const K={Name:"",Code:"Total",QtyFrom:Q,In:_t,Out:pt,QtyNow:E,Cost:i,TotalCost:_,Price:C,TotalPrice:P};this.pageData.CostVisible||(delete K.Cost,delete K.TotalCost,delete o.Cost,delete o.TotalCost),a.push(K),a.unshift(o)}onSelectTime(e){this.pageData.Filter.Time=e.toTimeString().slice(0,5)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-inventory-by-variant-log"]],viewQuery:function(e,o){if(1&e&&t.Gf(ka,5),2&e){let a;t.iGM(a=t.CRH())&&(o.datePicker=a.first)}},features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","text","textChange","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","text","textChange","onSubmit"],["class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Switch to Detail View",1,"button","btn","btn-success",3,"routerLink"],[1,"d-flex"],["container","","class","w-100",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"align-left","border-end"],["mat-sort-header","Code",1,"align-left","border-end",2,"width","150px"],[1,"text-end","border-end","bg-orange","text-white",2,"width","150px"],[1,"text-end","border-end",2,"width","150px"],[1,"text-end",2,"width","150px"],[4,"ngFor","ngForOf"],["class","table-footer",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-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","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","me-5",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose outlet",1,"outlet-multiple",3,"multiple","ngModel","items","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a category",1,"outlet-multiple",3,"ngModel","items","ngModelChange"],["ng-option-tmp",""],["name","Date",3,"date","dateChange"],[3,"ngModel","timeOnly","ngModelOptions","ngModelChange"],["myCalendar",""],["pButton","","type","button","label","Close",3,"click"],["inputID","Key","requestUrl","/API/AC/GetSupplierSuggestion","notFoundMessageFor","supplier",1,"w-100",3,"ngModel","ngModelChange"],["name","Bin",3,"model","modelChange"],["matTooltipPosition","above",3,"matTooltip"],[1,"border-end","border-start"],[3,"routerLink","queryParams"],[1,"border-end"],[1,"text-end","border-end","bg-orange","text-white"],[1,"text-end","border-end"],[3,"routerLink","queryParams","ngClass"],[1,"table-footer"],["colspan","2",1,"text-end"],[1,"text-end","bg-orange","text-white"],[1,"text-end"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retreive rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(e,o){1&e&&t.YNc(0,Xa,42,20,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.mk,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,h.ir,m.YE,m.nU,N.QB,F.P,B.f,W.Hq,z.$_,k.J,O.gM,c.JJ,c.uU],styles:["table.table[_ngcontent-%COMP%] .bg-orange[_ngcontent-%COMP%]{color:#805715!important;background-color:#fdeed4;border-color:#fce7c3}"]}),n})();function eo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"Inventory/GetinventoryTrafficDetailedByLog","Inventory_Movement.csv"))}),t._UZ(1,"i",7),t._uU(2," Export "),t.qZA()}}function no(n,r){if(1&n&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ao(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div")(2,"h6"),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"ng-select",9),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"Category"),t.qZA(),t.TgZ(8,"ng-select",10),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(9,no,2,2,"ng-template",11),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Group"),t.qZA(),t.TgZ(13,"ng-select",12),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.EntityGroupID=a)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Supplier"),t.qZA(),t.TgZ(17,"autocompleteV2",13),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.SupplierID=a)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"From - To"),t.qZA(),t.TgZ(21,"datepicker",14),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.From=a)}),t.qZA(),t.TgZ(22,"datepicker",15),t.NdJ("dateChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.To=a)}),t.qZA()(),t.TgZ(23,"div")(24,"h6"),t._uU(25,"Options"),t.qZA(),t.TgZ(26,"radio-options",16),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.pageData.Filter.DisplayMode=a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("multiple",!0)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.EntityGroups)("ngModel",e.pageData.Filter.EntityGroupID),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("model",e.pageData.Filter.DisplayMode)("options",e.pageData.Options.DisplayModes)}}function oo(n,r){1&n&&(t.TgZ(0,"th",44),t._uU(1,"D - In"),t.qZA())}function io(n,r){1&n&&(t.TgZ(0,"th",45),t._uU(1," D - Out"),t.qZA())}function ro(n,r){1&n&&(t.TgZ(0,"th",46),t._uU(1,"M - In"),t.qZA())}function lo(n,r){1&n&&(t.TgZ(0,"th",47),t._uU(1,"M - Out"),t.qZA())}function co(n,r){1&n&&(t.TgZ(0,"th",48),t._uU(1,"S +"),t.qZA())}function _o(n,r){1&n&&(t.TgZ(0,"th",49),t._uU(1,"S -"),t.qZA())}function po(n,r){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.hij(" ",t.lcZ(2,1,e.TransferedIn)," ")}}function so(n,r){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.TransferedOut)," ")}}function uo(n,r){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.hij(" ",t.lcZ(2,1,e.Produce)," ")}}function go(n,r){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.Manufacture)," ")}}function mo(n,r){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.hij(" ",t.lcZ(2,1,e.SplitFromParent)," ")}}function xo(n,r){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.Splittochild)," ")}}const fo=function(){return["/menu/Products/Catalog/Variants/Info"]},rt=function(n){return{ID:n}},ho=function(){return["/menu/Products/Catalog/Variants/Log"]};function To(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td",50)(2,"a",51),t._uU(3),t.qZA()(),t.TgZ(4,"td",52),t._uU(5),t.qZA(),t.TgZ(6,"td",39),t._uU(7),t.qZA(),t.TgZ(8,"td",40),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"td",41),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,po,3,3,"td",42),t.YNc(15,so,3,3,"td",43),t.YNc(16,uo,3,3,"td",42),t.YNc(17,go,3,3,"td",43),t.TgZ(18,"td",41),t._uU(19),t.ALo(20,"number"),t.qZA(),t.YNc(21,mo,3,3,"td",42),t.YNc(22,xo,3,3,"td",43),t.TgZ(23,"td",39),t._uU(24),t.qZA(),t.TgZ(25,"td",39)(26,"a",51),t._uU(27),t.ALo(28,"number"),t.qZA()()()),2&n){const e=r.$implicit,o=t.oxw(3);t.xp6(2),t.Q6J("routerLink",t.DdM(26,fo))("queryParams",t.VKq(27,rt,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.Start),t.xp6(2),t.hij("",t.lcZ(10,18,e.Sold)," "),t.xp6(3),t.hij("",t.lcZ(13,20,e.Received)," "),t.xp6(2),t.Q6J("ngIf",o.roleService.logistic.View),t.xp6(1),t.Q6J("ngIf",o.roleService.logistic.View),t.xp6(1),t.Q6J("ngIf",o.data.ShowData.ManufactureIN&&o.roleService.manufacture.View),t.xp6(1),t.Q6J("ngIf",o.data.ShowData.ManufactureOut&&o.roleService.manufacture.View),t.xp6(2),t.hij("",t.lcZ(20,22,e.Adjustment)," "),t.xp6(2),t.Q6J("ngIf",o.data.ShowData.SplitFromParent),t.xp6(1),t.Q6J("ngIf",o.data.ShowData.SplitToChild),t.xp6(2),t.Oqu(e.End),t.xp6(2),t.Q6J("routerLink",t.DdM(29,ho))("queryParams",t.VKq(30,rt,e.ID)),t.xp6(1),t.Oqu(t.lcZ(28,24,e.Now))}}function Co(n,r){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.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"TransferedIn"))," ")}}function Zo(n,r){if(1&n&&(t.TgZ(0,"td",40),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,"TransferedOut"))," ")}}function yo(n,r){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.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Produce"))," ")}}function vo(n,r){if(1&n&&(t.TgZ(0,"td",40),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,"Manufacture"))," ")}}function Do(n,r){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.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"SplitFromParent"))," ")}}function Io(n,r){if(1&n&&(t.TgZ(0,"td",40),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,"Splittochild"))," ")}}function bo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"table",20),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw(2);return t.KtG(i.sortData(a))}),t.TgZ(3,"thead",21)(4,"tr")(5,"th",22),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th",23),t._uU(8,"Code"),t.qZA(),t.TgZ(9,"th",24),t._uU(10),t.ALo(11,"date"),t.qZA(),t.TgZ(12,"th",25),t._uU(13,"Sold"),t.qZA(),t.TgZ(14,"th",26),t._uU(15,"Bought"),t.qZA(),t.YNc(16,oo,2,0,"th",27),t.YNc(17,io,2,0,"th",28),t.YNc(18,ro,2,0,"th",29),t.YNc(19,lo,2,0,"th",30),t.TgZ(20,"th",31),t._uU(21,"Adjust"),t.qZA(),t.YNc(22,co,2,0,"th",32),t.YNc(23,_o,2,0,"th",33),t.TgZ(24,"th",24),t._uU(25),t.ALo(26,"date"),t.qZA(),t.TgZ(27,"th",34),t._uU(28,"Now"),t.qZA()()(),t.TgZ(29,"tbody"),t.YNc(30,To,29,32,"tr",35),t.qZA(),t.TgZ(31,"tfoot")(32,"tr",36)(33,"td",37),t._uU(34),t.qZA(),t.TgZ(35,"td",38),t._uU(36,"Total:"),t.qZA(),t.TgZ(37,"td",39),t._uU(38),t.ALo(39,"number"),t.ALo(40,"sum"),t.qZA(),t.TgZ(41,"td",40),t._uU(42),t.ALo(43,"number"),t.ALo(44,"sum"),t.qZA(),t.TgZ(45,"td",41),t._uU(46),t.ALo(47,"number"),t.ALo(48,"sum"),t.qZA(),t.YNc(49,Co,4,6,"td",42),t.YNc(50,Zo,4,6,"td",43),t.YNc(51,yo,4,6,"td",42),t.YNc(52,vo,4,6,"td",43),t.TgZ(53,"td",41),t._uU(54),t.ALo(55,"number"),t.ALo(56,"sum"),t.qZA(),t.YNc(57,Do,4,6,"td",42),t.YNc(58,Io,4,6,"td",43),t.TgZ(59,"td",39),t._uU(60),t.ALo(61,"number"),t.ALo(62,"sum"),t.qZA(),t.TgZ(63,"td",41),t._uU(64),t.ALo(65,"number"),t.ALo(66,"sum"),t.qZA()()()()()()}if(2&n){const e=t.oxw(2);t.xp6(10),t.hij("",t.xi3(11,22,e.data.From,"ddMMM")," "),t.xp6(6),t.Q6J("ngIf",e.roleService.logistic.View),t.xp6(1),t.Q6J("ngIf",e.roleService.logistic.View),t.xp6(1),t.Q6J("ngIf",e.data.ShowData.ManufactureIN&&e.roleService.manufacture.View),t.xp6(1),t.Q6J("ngIf",e.data.ShowData.ManufactureOut&&e.roleService.manufacture.View),t.xp6(3),t.Q6J("ngIf",e.data.ShowData.SplitFromParent),t.xp6(1),t.Q6J("ngIf",e.data.ShowData.SplitToChild),t.xp6(2),t.hij("",t.xi3(26,25,e.data.To,"ddMMM")," "),t.xp6(5),t.Q6J("ngForOf",e.data.Data),t.xp6(4),t.hij("",e.data.Data.length," items"),t.xp6(4),t.hij("",t.lcZ(39,28,t.xi3(40,30,e.data.Data,"Start"))," "),t.xp6(4),t.hij("",t.lcZ(43,33,t.xi3(44,35,e.data.Data,"Sold"))," "),t.xp6(4),t.hij("",t.lcZ(47,38,t.xi3(48,40,e.data.Data,"Received"))," "),t.xp6(3),t.Q6J("ngIf",e.roleService.logistic.View),t.xp6(1),t.Q6J("ngIf",e.roleService.logistic.View),t.xp6(1),t.Q6J("ngIf",e.data.ShowData.ManufactureIN&&e.roleService.manufacture.View),t.xp6(1),t.Q6J("ngIf",e.data.ShowData.ManufactureOut&&e.roleService.manufacture.View),t.xp6(2),t.hij("",t.lcZ(55,43,t.xi3(56,45,e.data.Data,"Adjustment"))," "),t.xp6(3),t.Q6J("ngIf",e.data.ShowData.SplitFromParent),t.xp6(1),t.Q6J("ngIf",e.data.ShowData.SplitToChild),t.xp6(2),t.hij("",t.lcZ(61,48,t.xi3(62,50,e.data.Data,"End"))," "),t.xp6(4),t.hij("",t.lcZ(65,53,t.xi3(66,55,e.data.Data,"Now"))," ")}}const Ao=function(){return["/menu/Inventory/Quantity/Timeline"]};function qo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Text=a)})("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,eo,3,0,"a",2),t.TgZ(3,"a",3),t._uU(4,"Inventory Timeline"),t.qZA()(),t.TgZ(5,"filters"),t.YNc(6,ao,27,12,"div",4),t.qZA(),t.TgZ(7,"content"),t.YNc(8,bo,67,58,"div",5),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Text)("hidesearch",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(1),t.Q6J("routerLink",t.DdM(7,Ao)),t.xp6(3),t.Q6J("ngIf",null==e.pageData?null:e.pageData.Filter),t.xp6(2),t.Q6J("ngIf",e.data)}}let Oo=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/GetinventoryTrafficDetailedByLog","InventoryLoader/GetinventoryTrafficDetailed",o),this.httpService=e,this.csvConverter=a,this.roleService=i}preGetList(){this.pageData.Filter.Export=!1}sortData(e){const o=this.data.Data.slice();this.data.Data=e.active&&""!==e.direction?o.sort((a,i)=>{const _="asc"===e.direction;switch(a.Code=a.Code??"",i.Code=i.Code??"",e.active){case"Name":return this.compare(a.Name.toLocaleLowerCase(),i.Name.toLocaleLowerCase(),_);case"Code":return this.compare(a.Code.toLocaleLowerCase(),i.Code.toLocaleLowerCase(),_);default:return 0}}):o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-Product-inventory-traffic-Log"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","text","hidesearch","textChange","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","text","hidesearch","textChange","onSubmit"],["class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Switch to View",1,"button","btn","btn-success",3,"routerLink"],["container","","class","w-100",4,"ngIf"],["class","container-fluid mt-3",4,"ngIf"],[1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","multiple","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["inputID","ContactID","requestUrl","/API/AC/GetSupplierSuggestion",1,"w-100",3,"ngModel","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],["name","DisplayMode",3,"model","options","modelChange"],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","Name",1,"align-left","border-start","border-end"],["mat-sort-header","Code",1,"align-left","border-end",2,"width","120px"],[1,"text-end","border-end",2,"width","4.375\u202crem"],["matTooltipPosition","above","matTooltip","Sell",1,"text-end","border-end",2,"width","70px"],["matTooltipPosition","above","matTooltip","Buy",1,"text-end","border-end",2,"width","70px"],["class","text-end border-end","style","width: 70px","matTooltipPosition","above","matTooltip","Delivery In",4,"ngIf"],["class","text-end border-end","style","width: 70px","matTooltipPosition","above","matTooltip","Delivery Out",4,"ngIf"],["class","text-end border-end","style","width: 70px","matTooltipPosition","above","matTooltip","Raw Material used for Manufacturing",4,"ngIf"],["class","text-end border-end","style","width: 70px","matTooltipPosition","above","matTooltip","Goods produced on Manufacturing",4,"ngIf"],[1,"text-end","border-end",2,"width","70px"],["class","text-end border-end","style","width: 70px","matTooltipPosition","above","matTooltip","Split from parent",4,"ngIf"],["class","text-end border-end","style","width: 70px","matTooltipPosition","above","matTooltip","Split to child",4,"ngIf"],[1,"text-end",2,"width","70px"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-start","border-start","border-end"],[1,"text-end","empty-column","border-end"],[1,"text-end","border-end"],[1,"text-end","text-danger","border-end"],[1,"text-end","text-success","border-end"],["class","text-end text-success border-end",4,"ngIf"],["class","text-end text-danger border-end",4,"ngIf"],["matTooltipPosition","above","matTooltip","Delivery In",1,"text-end","border-end",2,"width","70px"],["matTooltipPosition","above","matTooltip","Delivery Out",1,"text-end","border-end",2,"width","70px"],["matTooltipPosition","above","matTooltip","Raw Material used for Manufacturing",1,"text-end","border-end",2,"width","70px"],["matTooltipPosition","above","matTooltip","Goods produced on Manufacturing",1,"text-end","border-end",2,"width","70px"],["matTooltipPosition","above","matTooltip","Split from parent",1,"text-end","border-end",2,"width","70px"],["matTooltipPosition","above","matTooltip","Split to child",1,"text-end","border-end",2,"width","70px"],[1,"border-start","border-end"],[3,"routerLink","queryParams"],[1,"border-end"]],template:function(e,o){1&e&&t.YNc(0,qo,9,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.pageData.Filter)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,h.ir,m.YE,m.nU,N.QB,F.P,k.J,O.gM,c.JJ,c.uU,J.qU]}),n})();function wo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.convertToCSV(a.csvConverter,a.data,"InventoryAwaiting.csv"))}),t._UZ(1,"i",16),t._uU(2," Export"),t.qZA()}}function Mo(n,r){if(1&n&&(t.TgZ(0,"span",17),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}const Fo=function(){return["/menu/Products/Catalog/Variants/Info"]},So=function(n){return{ID:n}},Uo=function(){return["/menu/Orders/Delivery/Products_to_Receive"]},Jo=function(n,r){return{ID:n,Name:r}};function No(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",18),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",19),t._uU(9),t.qZA(),t.TgZ(10,"td",19)(11,"a",18),t._uU(12),t.qZA()(),t.TgZ(13,"td",19),t._uU(14),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Q6J("routerLink",t.DdM(10,Fo))("queryParams",t.VKq(11,So,e.ID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(e.CategoryName),t.xp6(2),t.Oqu(e.UnitsInStock),t.xp6(2),t.Q6J("routerLink",t.DdM(13,Uo))("queryParams",t.WLB(14,Jo,e.ID,e.Name)),t.xp6(1),t.Oqu(e.Awaiting),t.xp6(2),t.Oqu(e.Future)}}function Lo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,wo,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div")(6,"h6"),t._uU(7,"Outlet"),t.qZA(),t.TgZ(8,"ng-select",4),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Category"),t.qZA(),t.TgZ(12,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(13,Mo,2,2,"ng-template",6),t.qZA()()()(),t.TgZ(14,"content")(15,"div",7)(16,"div",8)(17,"table",9)(18,"thead",10)(19,"tr")(20,"th",11),t._uU(21,"Name"),t.qZA(),t.TgZ(22,"th",12),t._uU(23,"Code"),t.qZA(),t.TgZ(24,"th",12),t._uU(25,"Category"),t.qZA(),t.TgZ(26,"th",13),t._uU(27,"On Hand"),t.qZA(),t.TgZ(28,"th",13),t._uU(29,"Awaiting"),t.qZA(),t.TgZ(30,"th",13),t._uU(31,"Future"),t.qZA()()(),t.TgZ(32,"tbody"),t.YNc(33,No,15,17,"tr",14),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(6),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(21),t.Q6J("ngForOf",e.data)}}let Qo=(()=>{class n extends A.n{constructor(e,o,a,i){super(e,"Inventory/InventoryAwaiting","InventoryLoader/InventoryAwaiting",o),this.httpService=e,this.csvConverter=a,this.roleService=i}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(v._W),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["CustomerDisplay-awaiting-inventory"]],features:[t.qOj],decls:1,vars:1,consts:[["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],["filterWidth","270px",3,"pageData","hideSearchBox","onSubmit"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["container","",1,"w-100"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",1,"w-100",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[2,"width","60px"],[1,"text-end",2,"width","60px"],[4,"ngFor","ngForOf"],["role","button","value","Export","matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],[1,"text-end"]],template:function(e,o){1&e&&t.YNc(0,Lo,34,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.JJ,l.On,g.yS,h.w9,h.ir,O.gM]}),n})();var Po=p(22863),ko=p(24351),lt=p(18505),Eo=p(34782),Vo=p(39646);function Yo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",10),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2).ngIf,i=t.oxw();return t.KtG(i.exportCsv(a,"InventoryExport/InventoryOver","InventoryOver.csv"))}),t._UZ(1,"i",11),t._uU(2," Export "),t.qZA()}}function Bo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"actions"),t.YNc(1,Yo,3,0,"a",8),t.TgZ(2,"button",9),t.NdJ("click",function(){const i=t.CHM(e).ngIf,_=t.oxw(2);return t.KtG(_.createTransferOrder(i.Data))}),t._uU(3,"Create Transfer Order"),t.qZA()()}if(2&n){const e=r.ngIf,o=t.oxw(2);t.xp6(1),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(1),t.Q6J("disabled",o.getSelectedData(e.Data))}}function Go(n,r){if(1&n&&(t.TgZ(0,"span",12),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}const Ko=function(n){return{ID:n}};function Ho(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td")(2,"input",26),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).$implicit;return t.KtG(_.selected=a)}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td")(6,"a",27),t._uU(7),t.qZA()(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td",28),t._uU(17),t.ALo(18,"number"),t.qZA()()}if(2&n){const e=r.$implicit;t.xp6(2),t.Q6J("ngModel",e.selected),t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Q6J("queryParams",t.VKq(14,Ko,e.VariantID)),t.xp6(1),t.hij(" ",e.Variant," "),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.Oqu(t.lcZ(12,8,e.UnitsInStock)),t.xp6(3),t.Oqu(t.lcZ(15,10,e.MaxStock)),t.xp6(3),t.hij(" ",t.lcZ(18,12,e.UnitsInStock-e.MaxStock)," ")}}function Ro(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",29),t.NdJ("page",function(a){t.CHM(e);const i=t.oxw(2).ngIf,_=t.oxw();return t.KtG(_.onChangePage(a,i))}),t.qZA()}if(2&n){const e=t.oxw().ngIf,o=t.oxw().ngIf;t.Q6J("length",e.ListTotal)("pageSize",o.RowCount)("pageIndex",0==o.PageNumber?0:o.PageNumber-1)}}function jo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"content")(1,"div",13)(2,"div",14)(3,"table",15),t.NdJ("matSortChange",function(a){const _=t.CHM(e).ngIf,C=t.oxw(2);return t.KtG(C.sortData(a,_))}),t.TgZ(4,"thead",16)(5,"tr")(6,"th",17)(7,"input",18),t.NdJ("change",function(a){const _=t.CHM(e).ngIf,C=t.oxw(2);return t.KtG(C.onSelectAllData(_.Data,a.target.checked))}),t.qZA()(),t.TgZ(8,"th",19),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"th",20),t._uU(11,"Product"),t.qZA(),t.TgZ(12,"th",21),t._uU(13,"Code"),t.qZA(),t.TgZ(14,"th",22),t._uU(15,"Available"),t.qZA(),t.TgZ(16,"th",23),t._uU(17,"Max"),t.qZA(),t.TgZ(18,"th"),t._uU(19,"Over"),t.qZA()()(),t.TgZ(20,"tbody"),t.YNc(21,Ho,19,16,"tr",24),t.qZA()()(),t.YNc(22,Ro,1,3,"mat-paginator",25),t.qZA()()}if(2&n){const e=r.ngIf;t.xp6(21),t.Q6J("ngForOf",e.Data),t.xp6(1),t.Q6J("ngIf",e.ListTotal>0)}}function $o(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"mainpanel-cmp",1),t.NdJ("textChange",function(a){const _=t.CHM(e).ngIf;return t.KtG(_.Text=a)})("onSubmit",function(){const i=t.CHM(e).ngIf,_=t.oxw();return t.KtG(_.search(i))}),t.YNc(2,Bo,4,2,"actions",0),t.ALo(3,"async"),t.TgZ(4,"filters")(5,"div",2)(6,"div",3)(7,"div")(8,"h6"),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"ng-select",4),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf;return t.KtG(_.ListEntityID=a)}),t.qZA()(),t.TgZ(11,"div")(12,"h6"),t._uU(13,"Category"),t.qZA(),t.TgZ(14,"ng-select",5),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf;return t.KtG(_.CategoryID=a)}),t.YNc(15,Go,2,2,"ng-template",6),t.qZA()(),t.TgZ(16,"div")(17,"h6"),t._uU(18,"Supplier"),t.qZA(),t.TgZ(19,"autocompleteV2",7),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf;return t.KtG(_.SupplierID=a)}),t.qZA()()()()(),t.YNc(20,jo,23,2,"content",0),t.ALo(21,"async"),t.qZA(),t.BQk()}if(2&n){const e=r.ngIf,o=t.oxw();t.xp6(1),t.Q6J("pageData",o.menuData)("text",e.Text),t.xp6(1),t.Q6J("ngIf",t.lcZ(3,10,o.data$)),t.xp6(8),t.Q6J("multiple",!0)("items",null==e.Options?null:e.Options.listEntity)("ngModel",e.ListEntityID),t.xp6(4),t.Q6J("items",null==e.Options?null:e.Options.Categories)("ngModel",e.CategoryID),t.xp6(5),t.Q6J("ngModel",e.SupplierID),t.xp6(1),t.Q6J("ngIf",t.lcZ(21,12,o.data$))}}function zo(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",33),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"InventoryExport/Daystozero","InventoryToZero.csv"))}),t._UZ(1,"i",34),t._uU(2,"Export "),t.qZA()}}function Xo(n,r){if(1&n&&(t.TgZ(0,"span",35),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}function ti(n,r){if(1&n&&(t.TgZ(0,"span",35),t._uU(1),t.qZA()),2&n){const e=r.item;t.s9C("matTooltip",e.Value),t.xp6(1),t.Oqu(e.Value)}}const ct=function(){return["/menu/Products/Catalog/Variants/Info"]},G=function(n){return{ID:n}};function ei(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"a",40),t._uU(2),t.qZA(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,ct))("queryParams",t.VKq(4,G,e.ID)),t.xp6(1),t.Oqu(e.Model)}}function ni(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"span",44),t._uU(2),t.qZA(),t.BQk()),2&n){const e=t.oxw(2).$implicit;t.xp6(2),t.Oqu(e.Model)}}function ai(n,r){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.hij(" - ",e.Code," ")}}function oi(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"a",40)(2,"h4",43),t._uU(3),t.qZA(),t.YNc(4,ni,3,1,"ng-container",29),t.YNc(5,ai,2,1,"ng-container",29),t.qZA(),t.BQk()),2&n){const e=t.oxw().$implicit,o=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(5,ct))("queryParams",t.VKq(6,G,e.ID)),t.xp6(2),t.Oqu(o.Name),t.xp6(1),t.Q6J("ngIf","Default"!==e.Model),t.xp6(1),t.Q6J("ngIf",o.Code)}}function ii(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",41),t.YNc(3,ei,3,6,"ng-container",29),t.YNc(4,oi,6,8,"ng-container",29),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td",42),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",42),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td",42),t._uU(14),t.ALo(15,"number"),t.qZA(),t.TgZ(16,"td",42),t._uU(17),t.ALo(18,"number"),t.qZA()(),t.BQk()),2&n){const e=r.$implicit,o=t.oxw().$implicit,a=t.oxw(3);t.xp6(3),t.Q6J("ngIf",o.Variants.length>1),t.xp6(1),t.Q6J("ngIf",o.Variants.length<=1),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(9,7,e.Available)),t.xp6(3),t.Oqu(t.lcZ(12,9,e.QuantitySold)),t.xp6(3),t.Oqu(t.xi3(15,11,e.QuantitySold/a.numberOfDays,"1.0-4")),t.xp6(3),t.hij(" ",e.Available>0?t.lcZ(18,14,e.Available/(e.QuantitySold/a.numberOfDays)):0," ")}}const ri=function(){return["/menu/Products/Catalog/Products/Info"]};function li(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr",38)(2,"td",39)(3,"h3")(4,"a",40),t._uU(5),t.TgZ(6,"small",38),t._uU(7,"- "),t.qZA(),t._uU(8),t.qZA(),t.TgZ(9,"small"),t._uU(10),t.ALo(11,"number"),t.qZA()()()(),t.YNc(12,ii,19,16,"ng-container",24),t.BQk()),2&n){const e=r.$implicit;t.xp6(1),t.Q6J("hidden",e.Variants.length<=1),t.xp6(3),t.Q6J("routerLink",t.DdM(10,ri))("queryParams",t.VKq(11,G,e.ID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(1),t.Q6J("hidden",!e.Code),t.xp6(2),t.hij(" ",e.Code," "),t.xp6(2),t.hij("[ Product Qty : ",t.lcZ(11,8,e.VariantsQuantity)," ]"),t.xp6(2),t.Q6J("ngForOf",e.Variants)}}function ci(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",36)(3,"h3",37),t._uU(4),t.qZA()()(),t.YNc(5,li,13,13,"ng-container",24),t.BQk()),2&n){const e=r.$implicit;t.xp6(4),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngForOf",e.Products)}}function _i(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"span",45),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryReportRowsCount"))}),t.TgZ(1,"i",46),t._uU(2,"?"),t.qZA()()}}function pi(n,r){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 si(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",47),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.NextPage(!0))}),t._UZ(1,"i",48),t._uU(2," Next"),t.qZA()}}function ui(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",49),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.StoreRowsCountAPIResult("Inventory/InventoryReportRowsCount",!0))}),t._UZ(1,"i",50),t._uU(2," Show All"),t.qZA()}}function di(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())})("textChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.FilterText=a)}),t.TgZ(1,"actions"),t.YNc(2,zo,3,0,"button",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlets"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.ListIDs=a)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Number Of Days"),t.qZA(),t.TgZ(13,"input",6),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.NumberOfDays=a)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Brand"),t.qZA(),t.TgZ(17,"ng-select",7),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.BrandID=a)}),t.YNc(18,Xo,2,2,"ng-template",8),t.qZA()(),t.TgZ(19,"div")(20,"h6"),t._uU(21,"Category"),t.qZA(),t.TgZ(22,"ng-select",9),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.CategoryID=a)}),t.YNc(23,ti,2,2,"ng-template",8),t.qZA()(),t.TgZ(24,"div",10)(25,"h6"),t._uU(26,"Quantity From - To"),t.qZA(),t.TgZ(27,"input",11),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityFrom=a)}),t.qZA(),t._uU(28," - "),t.TgZ(29,"input",12),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.QuantityTo=a)}),t.qZA()(),t.TgZ(30,"div",13)(31,"h6"),t._uU(32,"Discontinued"),t.qZA(),t.TgZ(33,"radio-options",14),t.NdJ("modelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.Discontinued=a)}),t.qZA()(),t.TgZ(34,"div")(35,"h6"),t._uU(36,"Row Count"),t.qZA(),t.TgZ(37,"input",15),t.NdJ("ngModelChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.pageData.Filter.RowCount=a)}),t.qZA()()()()(),t.TgZ(38,"content")(39,"div",16)(40,"div",17)(41,"table",18),t.NdJ("matSortChange",function(a){t.CHM(e);const i=t.oxw();return t.KtG(i.onSort(a))}),t.TgZ(42,"thead",19)(43,"tr")(44,"th"),t._uU(45," Variant "),t.qZA(),t.TgZ(46,"th",20),t._uU(47," Code "),t.qZA(),t.TgZ(48,"th",21),t._uU(49," Inventory "),t.qZA(),t.TgZ(50,"th",22),t._uU(51),t.ALo(52,"number"),t.qZA(),t.TgZ(53,"th",23),t._uU(54," Daily Sales "),t.qZA(),t.TgZ(55,"th",22),t._uU(56," Days to Zero "),t.qZA()()(),t.TgZ(57,"tbody"),t.YNc(58,ci,6,2,"ng-container",24),t.qZA()()(),t.TgZ(59,"div",25)(60,"div",26)(61,"div",27),t._uU(62),t.ALo(63,"number"),t.YNc(64,_i,3,0,"span",28),t.YNc(65,pi,3,3,"span",29),t._uU(66),t.qZA()(),t.TgZ(67,"div",30),t.YNc(68,si,3,0,"a",31),t.YNc(69,ui,3,0,"a",32),t.qZA()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.FilterText),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(7),t.Q6J("multiple",!0)("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.ListIDs),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.NumberOfDays),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Brands)("ngModel",e.pageData.Filter.BrandID),t.xp6(5),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(5),t.Q6J("ngModel",e.pageData.Filter.QuantityFrom),t.xp6(2),t.Q6J("ngModel",e.pageData.Filter.QuantityTo),t.xp6(4),t.Q6J("model",e.pageData.Filter.Discontinued),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount),t.xp6(14),t.hij(" (",t.lcZ(52,23,e.numberOfDays),") Days Sales "),t.xp6(7),t.Q6J("ngForOf",e.infiniteList),t.xp6(4),t.hij(" Showing 1 - ",t.lcZ(63,25,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)}}const gi=[{path:"",component:j},{path:"Quantity/Valuation",component:j},{path:"Quantity/Valuation/Summary",component:kt},{path:"Quantity/Outlet",component:Ht},{path:"Quantity/Product_By_Outlet/Category_By_Outlet",component:Be},{path:"Quantity/Product_By_Outlet",component:Me},{path:"Quantity/Product_By_Outlet/Product_By_Outlet_Group",component:_e},{path:"Quantity/Highest_Quantity",component:tn},{path:"Quantity/Low_On_Stock",component:un},{path:"Quantity/Inventory_Over_Max",component:(()=>{class n extends Po.M{constructor(e,o,a,i,_){super(e),this.cItemService=o,this.router=a,this.csvConverter=i,this.roleService=_}ngOnInit(){const e=this.httpService.post("/api/InventoryLoader/OverStock");this.menuAndLoader$=this.menuData$.pipe((0,ko.b)(()=>e),(0,lt.b)(o=>{this.data$=this.getData$(o)}))}search(e){e.PageNumber=1,0==e.ListEntityID?.length&&delete e.ListEntityID,this.data$=this.getData$(e)}getData$(e){return this.httpService.post("/api/Inventory/GetOverStockPage",JSON.stringify(e)).pipe((0,lt.b)(o=>this.originalSortedData=o.Data),(0,Eo.d)())}onChangePage(e,o){o.PageNumber=e.pageIndex+1,this.data$=this.getData$(o)}sortData(e,o){if(!e.active||""===e.direction)return void(o.Data=this.originalSortedData);const a=o.Data.slice();o.Data=a.sort((i,_)=>{const C="asc"===e.direction;switch(typeof i[e.active]){case"string":return this.compare(i[e.active].toLocaleLowerCase(),_[e.active].toLocaleLowerCase(),C);case"number":return this.compare(i[e.active],_[e.active],C);default:return 0}}),this.data$=(0,Vo.of)(o)}compare(e,o,a){return(e<o?-1:1)*(a?1:-1)}onSelectAllData(e,o){e.forEach(a=>a.selected=o)}getSelectedData(e){const o=e.filter(a=>a.selected);if(o.length>0){const a=o[0].EntityID;return o.filter(i=>i.EntityID==a).length!=o.length}return!0}createTransferOrder(e){const o=e.filter(a=>a.selected);this.cItemService.inventoryState="over",this.cItemService.lowOnStockInfo.EntityID=o[0].EntityID,this.cItemService.lowOnStockInfo.Items=o,this.router.navigate(["/menu/Logistics/Archive/Transfer_Order/Form"])}exportCsv(e,o,a){this.httpService.post(`/api/${o}`,JSON.stringify(e)).subscribe(i=>{this.csvConverter.convertToCSV(i,a)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(tt.N),t.Y36(g.F0),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-max-inventory"]],features:[t.qOj],decls:2,vars:3,consts:[[4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"multiple","items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["inputID","ContactID","requestUrl","/API/AC/GetSupplierSuggestion","notFoundMessageFor","supplier",1,"w-100",3,"ngModel","ngModelChange"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","ms-5",3,"disabled","click"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["matTooltipPosition","above",3,"matTooltip"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","32px"],["type","checkbox",3,"change"],["mat-sort-header","EntityName"],["mat-sort-header","Variant"],["mat-sort-header","VariantCode"],["mat-sort-header","UnitsInStock"],["mat-sort-header","MaxStock"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],[1,"text-success"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&(t.YNc(0,$o,22,14,"ng-container",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,o.menuAndLoader$))},dependencies:[I.p,c.sg,c.O5,l.Wl,l.JJ,l.On,g.yS,w.NW,h.w9,h.ir,m.YE,m.nU,k.J,O.gM,c.Ov,c.JJ]}),n})()},{path:"Quantity/In_Transit",component:Tn},{path:"Quantity/Inventory_To_Zero",component:(()=>{class n extends b.X{constructor(e,o,a){super(e,s.Wz.ForecastData,s.Wz.ForecastLoader),this.csvConverter=o,this.roleService=a,this.numberOfDays=30}onSort(e){this.infiniteList=e.active&&""!==e.direction?this.infiniteList.sort((o,a)=>s.gT.compare(o[e.active],a[e.active],"asc"===e.direction)):JSON.parse(JSON.stringify(this.originalData))}afterPostInit(e){this.numberOfDays=this.pageData.Filter.NumberOfDays;let o=this.getAllVariants(e);this.calculateDailySales(),this.originalData=JSON.parse(JSON.stringify(this.infiniteList)),this.nextPageDisabled=!(o.length<this.pageData.Filter.RowCount)}calculateDailySales(){this.infiniteList=this.infiniteList.map(e=>(e.dailySales=0,e.Products.forEach(o=>{o.Variants.forEach(a=>{e.dailySales+=a.QuantitySold/this.numberOfDays})}),e))}getAllVariants(e){let o=[];return e.Data.forEach(a=>{a.Products.forEach(i=>{o=[...o,...i.Variants]})}),o}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.O),t.Y36(x.O),t.Y36(D.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-forecast"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","onSubmit","textChange",4,"ngIf"],[3,"pageData","text","onSubmit","textChange"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlets",3,"multiple","items","ngModel","ngModelChange"],["type","text","autoNum","","name","NumberOfDays",1,"form-control",3,"ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a brand",3,"items","ngModel","ngModelChange"],["ng-option-tmp",""],["bindLabel","Value","bindValue","Key","placeholder","Choose a category",3,"items","ngModel","ngModelChange"],[1,"d-inline","mb-2"],["type","number","name","QuantityFrom",1,"w-25","me-2",3,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2",3,"ngModel","ngModelChange"],[1,"mt-5"],["name","Discontinued",3,"model","modelChange"],["type","text","autoNum","","name","RowCount",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["matSort","",1,"table","custom-table","mt-5",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[2,"width","100px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],["arrowPosition","before","mat-sort-header","dailySales",1,"text-end",2,"width","120px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-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","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-upload","me-3"],["matTooltipPosition","above",3,"matTooltip"],["colspan","6",1,"border-bottom-0","pt-10"],[1,"fw-normal"],[3,"hidden"],["colspan","6",1,"border-bottom-0"],["target","_blank",3,"routerLink","queryParams"],[1,"variant-overflow"],[1,"text-end"],[1,"d-inline-block"],[1,"ms-3"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(e,o){1&e&&t.YNc(0,di,70,27,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[I.p,c.sg,c.O5,l.Fj,l.wV,l.JJ,l.On,g.yS,h.w9,h.ir,m.YE,m.nU,F.P,$.b,O.gM,c.JJ],styles:[".variant-overflow[_ngcontent-%COMP%]{max-width:250px;text-overflow:ellipsis;overflow:hidden} .mat-tooltip-panel-above .inven.mat-tooltip:before, .mat-tooltip-panel-above .inven.mat-tooltip:after{left:68%!important}"]}),n})()},{path:"Quantity/Allocated_Inventory",component:On},{path:"Quantity/Awaiting_Inventory",component:Qo},{path:"Quantity/Timeline/Detailed_Inventory_Traffic_Log",component:Oo},{path:"Inventory_Traffic/Inventory_Order_By_Composite",component:ua},{path:"Inventory_Traffic/Category_Inventory_Traffic",component:Nn},{path:"Inventory_Traffic/Outlet_Inventory_Traffic",component:Hn},{path:"Inventory_Traffic/Outlet_Inventory_Traffic/Outlet_Inventory_Traffic_Summary",component:Ca},{path:"Inventory_Traffic/FIFO_Illustration",component:ea},{path:"Advanced/Serial_Inventory",component:Pa},{path:"Advanced/Depleting_Inventory",component:qa},{path:"Advanced/Negative",component:la},{path:"Quantity/Timeline",component:to}];let mi=(()=>{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(gi),g.Bz]}),n})();var xi=p(3077),fi=p(65131);let hi=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[I.R,c.ez,J.dr,l.u5,mi,f.Fk,l.UX,M.FA,T.XK,f.Fk,Z.c,T.Ng,y.Nh,w.TU,U.vV,h.A0,m.JX,q.p0,N.ZU,F.K,B._8,k.Q,xi.T,fi.X,O.AV]}),n})()},21750:(V,S,p)=>{p.d(S,{V:()=>l});var c=p(67327);class l{constructor(){this.Prefix=null,this.Seed=null,this.Digit=null}static Generate(q){let M="";if(q.Seed){let T=q.Seed+"";for(;T.length<q.Digit;)T="0"+T;M=c.gT.StringFormat(q.Prefix,T)}return M}}},69753:(V,S,p)=>{p.d(S,{O:()=>c});class c{}},50:(V,S,p)=>{p.d(S,{M:()=>q});var c=p(67327),l=p(94650),m=p(89156);let q=(()=>{class M{constructor(f){this.httpService=f}generateNumber(f,Z){return this.httpService.post(Z,JSON.stringify({ID:f}))}getQuickKey(f,Z){return this.httpService.post(Z,JSON.stringify(f))}updateCourierList(f){return this.httpService.post(c.Wz.UpdateCourierList,JSON.stringify({name:f}))}getVarianByCode(f,Z,y){return this.httpService.post(c.Wz.GetVariantByCode,{code:f,entityID:Z,barcodeSerial:y,Promotion:!0})}getVariantById(f,Z){return this.httpService.post(c.Wz.GetVariantByID,{id:f,entityID:Z})}submitTransaction(f,Z){return this.httpService.post(Z,f)}getPrintTemplateID(f){return this.httpService.post(c.Wz.GetPrintTemplateID,JSON.stringify(f))}createNewContact(f,Z){const y=[];return f.Group&&y.push(f.Group),this.httpService.post(c.Wz.CreateContact,{contact:f,type:Z,groups:y})}getItemStock(f,Z){return this.httpService.post(c.Wz.GetVariantStockByID,{id:f,entityID:Z})}clearOutlet(f){return this.httpService.post("/api/TransferOrder/ClearOutlet",JSON.stringify(f))}}return M.\u0275fac=function(f){return new(f||M)(l.LFG(m.O))},M.\u0275prov=l.Yz7({token:M,factory:M.\u0275fac,providedIn:"root"}),M})()},3077:(V,S,p)=>{p.d(S,{T:()=>g,v:()=>U});var c=p(36895),l=p(94650),m=p(24006),q=p(89156);function M(s,b){if(1&s&&(l.TgZ(0,"span"),l._uU(1),l.qZA()),2&s){const t=l.oxw();l.xp6(1),l.AsE(" Showing ",t.pageData.Filter.PageNumber*t.total-t.total+1," - ",t.pageData.Filter.PageNumber*t.total," ")}}function T(s,b){if(1&s&&(l.TgZ(0,"span"),l._uU(1),l.qZA()),2&s){const t=l.oxw();l.xp6(1),l.AsE(" Showing ",t.pageData.Filter.RowCount*t.pageData.Filter.PageNumber-t.pageData.Filter.RowCount+1," - ",t.pageData.Filter.RowCount*t.pageData.Filter.PageNumber-t.pageData.Filter.RowCount+t.total," ")}}function f(s,b){if(1&s){const t=l.EpF();l.TgZ(0,"span",8),l.NdJ("click",function(){l.CHM(t);const x=l.oxw();return l.KtG(x.StoreRowsCountAPIResult())}),l.TgZ(1,"i",9),l._uU(2,"?"),l.qZA()()}}function Z(s,b){if(1&s&&(l.TgZ(0,"span"),l._uU(1),l.ALo(2,"number"),l.qZA()),2&s){const t=l.oxw();l.xp6(1),l.hij(" of ",l.lcZ(2,1,t.listTotal),"")}}function y(s,b){if(1&s){const t=l.EpF();l.TgZ(0,"a",10),l.NdJ("click",function(){l.CHM(t);const x=l.oxw();return l.KtG(x.onPreviousPage())}),l._UZ(1,"i",11),l._uU(2," Previous"),l.qZA()}}function w(s,b){if(1&s){const t=l.EpF();l.TgZ(0,"a",10),l.NdJ("click",function(){l.CHM(t);const x=l.oxw();return l.KtG(x.onNextPage())}),l._UZ(1,"i",12),l._uU(2," Next"),l.qZA()}}let U=(()=>{class s{constructor(t){this.httpService=t,this.jumpToPage=new l.vpe,this.previousPage=new l.vpe,this.nextPage=new l.vpe,this.pageNumber=1,this.showingNumber=this.pageNumber,this.listTotal=-1}onJumpToPage(t){"Enter"===t.key&&(this.pageData.Filter.PageNumber=this.pageNumber,this.showingNumber=this.pageNumber,this.jumpToPage.emit())}onPreviousPage(){this.pageData.Filter.PageNumber-=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.previousPage.emit()}onNextPage(){this.pageData.Filter.PageNumber+=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.nextPage.emit()}StoreRowsCountAPIResult(){this.httpService.post("/api/"+this.api,JSON.stringify(this.pageData.Filter)).subscribe(t=>{this.listTotal=t.Count?t.Count:t,this.pageData.HideStoreApiCount=!0})}}return s.\u0275fac=function(t){return new(t||s)(l.Y36(q.O))},s.\u0275cmp=l.Xpm({type:s,selectors:[["POS-complex-pagination"]],inputs:{pageData:"pageData",total:"total",api:"api"},outputs:{jumpToPage:"jumpToPage",previousPage:"previousPage",nextPage:"nextPage"},decls:12,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],[4,"ngIf"],["style","cursor: pointer",3,"click",4,"ngIf"],["type","text","autoNum","","autoNum","",1,"text-end",2,"width","45px",3,"ngModel","keyup","ngModelChange"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm text-primary",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],[1,"border","p-3"],[1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-left"],[1,"fa-solid","fa-arrow-right"]],template:function(t,u){1&t&&(l.TgZ(0,"div",0)(1,"div",1)(2,"div",2),l.YNc(3,M,2,2,"span",3),l.YNc(4,T,2,2,"span",3),l.YNc(5,f,3,0,"span",4),l.YNc(6,Z,3,3,"span",3),l._uU(7," records ~ Page "),l.TgZ(8,"input",5),l.NdJ("keyup",function(v){return u.onJumpToPage(v)})("ngModelChange",function(v){return u.pageNumber=v}),l.qZA()()(),l.TgZ(9,"div",6),l.YNc(10,y,3,0,"a",7),l.YNc(11,w,3,0,"a",7),l.qZA()()),2&t&&(l.xp6(3),l.Q6J("ngIf",u.pageData.Filter.RowCount==u.total),l.xp6(1),l.Q6J("ngIf",u.pageData.Filter.RowCount!=u.total),l.xp6(1),l.Q6J("ngIf",!u.pageData.HideStoreApiCount),l.xp6(1),l.Q6J("ngIf",u.pageData.HideStoreApiCount),l.xp6(2),l.Q6J("ngModel",u.pageNumber),l.xp6(2),l.Q6J("ngIf",1!=u.pageData.Filter.PageNumber),l.xp6(1),l.Q6J("ngIf",u.total>=u.pageData.Filter.RowCount))},dependencies:[c.O5,m.Fj,m.JJ,m.On,c.JJ]}),s})(),g=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=l.oAB({type:s}),s.\u0275inj=l.cJS({imports:[c.ez,m.u5,m.UX]}),s})()}}]);
|