dealpos 12.2.2 → 12.2.4
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/2004.f3082cf57d2bdd1c.js +1 -0
- package/POS/2527.ee572f77820fd7c7.js +1 -0
- package/POS/2750.53e735d02123ddda.js +1 -0
- package/POS/3337.7b3e691f22aa2e50.js +1 -0
- package/POS/4177.6c8fdeca3238ae91.js +1 -0
- package/POS/4941.11991efa0c9ca9f6.js +1 -0
- package/POS/4970.49b3d0e2b41a4736.js +1 -0
- package/POS/500.502b63b835c94db3.js +1 -0
- package/POS/5189.42546270f70cc578.js +1 -0
- package/POS/5453.b8eb5ec710c13e3f.js +1 -0
- package/POS/5510.84d47b3fed683d57.js +1 -0
- package/POS/5586.6557e4bd206a28bd.js +1 -0
- package/POS/6303.1882ce2541c62af6.js +1 -0
- package/POS/6664.1983a13a18aa2c16.js +1 -0
- package/POS/6756.262b1c28c019159f.js +1 -0
- package/POS/6840.d0036ec626577639.js +1 -0
- package/POS/7193.e0f947762f7150e2.js +1 -0
- package/POS/{7298.19d75745aecb3523.js → 7298.f11b8d33926c7f79.js} +1 -1
- package/POS/7516.1e8312abf0fdfbfe.js +1 -0
- package/POS/{8126.a38cad86f4c81065.js → 8126.2a3f67a7639fa6c8.js} +1 -1
- package/POS/8317.5eadaac9d81f9a5f.js +1 -0
- package/POS/8401.3424c8d9d82c1a46.js +1 -0
- package/POS/8425.8d3419e0fb226dda.js +1 -0
- package/POS/{8761.7c5539bff80a4998.js → 8761.1b45a09f1df46068.js} +1 -1
- package/POS/9042.6c4d3181c84b2cb8.js +1 -0
- package/POS/9612.6a332f69514c0983.js +1 -0
- package/POS/9757.4892e7e75edfcada.js +1 -0
- package/POS/{2527.7e671ae42215b675.js → 9841.5c1c03ebf5b7893e.js} +1 -1
- package/POS/common.530cd99e46c8d250.js +1 -0
- package/POS/index.html +2 -2
- package/POS/{main.5719023b63890082.js → main.965c0562a49fac7a.js} +1 -1
- package/POS/runtime.5b99dd33a914eec2.js +1 -0
- package/package.json +1 -1
- package/POS/2004.7dc740293b38e114.js +0 -1
- package/POS/2526.b4ad12c60a108246.js +0 -1
- package/POS/2750.4f3502081043c30b.js +0 -1
- package/POS/3337.3f4f382f45acff41.js +0 -1
- package/POS/4177.98ff79b4b72c8768.js +0 -1
- package/POS/4941.8c2fb6ad16dc21d1.js +0 -1
- package/POS/4970.4b720eacff390388.js +0 -1
- package/POS/500.0c17a4a814815447.js +0 -1
- package/POS/5189.6d0b24db775d8a7c.js +0 -1
- package/POS/5510.479c025aed7612fc.js +0 -1
- package/POS/6303.5724083b307f1ed5.js +0 -1
- package/POS/6551.7ed8f31c22230139.js +0 -1
- package/POS/6664.567ef29551e80239.js +0 -1
- package/POS/6756.ac761ce454dbfce0.js +0 -1
- package/POS/6840.123d77eead78424d.js +0 -1
- package/POS/6911.3b1b89c2d61a261c.js +0 -1
- package/POS/7193.6b127da2a149cb73.js +0 -1
- package/POS/7516.481c1df6180e492c.js +0 -1
- package/POS/8317.f9654b9e65973243.js +0 -1
- package/POS/8401.82c1cc0352887254.js +0 -1
- package/POS/9498.2b6e42b23bdba39a.js +0 -1
- package/POS/9612.0ffe44a08279c42b.js +0 -1
- package/POS/9757.7255467eb7a81e5f.js +0 -1
- package/POS/common.5c2bee0b1072850d.js +0 -1
- package/POS/runtime.f4e420d04496da7f.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[5189],{75189:($,Q,s)=>{s.r(Q),s.d(Q,{DeliveryModule:()=>_c});var r=s(81180),d=s(36895),c=s(9116),M=s(4077),P=s(17554),t=s(94650),h=s(89156),Z=s(24424),v=s(97185),O=s(51161),g=s(65412),_=s(24006),b=s(30273),y=s(98085),F=s(3077),C=s(88796),S=s(10266);function rt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",32),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.httpPostListID("TransferOrder/Delete"))}),t._UZ(1,"i",33),t._uU(2," Delete"),t.qZA()}}function lt(n,a){if(1&n&&(t.ynx(0),t.YNc(1,rt,3,0,"a",31),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.role.logistic.Delete)}}function ct(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",35),t._uU(2," Export"),t.qZA()}}const st=function(){return["/menu/Logistics/Archive/Transfer_Order/Form"]};function dt(n,a){1&n&&(t.TgZ(0,"a",36),t._uU(1,"New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,st))}function pt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",37)(1,"div")(2,"h6"),t._uU(3,"From"),t.qZA(),t.TgZ(4,"datepicker",38),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"To"),t.qZA(),t.TgZ(8,"datepicker",39),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.pageData.Filter.To=o)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Page Size"),t.qZA(),t.TgZ(12,"input",40),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.pageData.Filter.RowCount=o)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.RowCount)}}function x(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",41)(1,"input",42),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(o.target.checked))}),t.qZA()()}}function U(n,a){1&n&&(t.TgZ(0,"th",43),t._uU(1,"Price "),t.qZA())}function m(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",41)(1,"input",47),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.selected=o)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)}}function f(n,a){if(1&n&&(t.TgZ(0,"td",43),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Price),"")}}function D(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Courier)}}function A(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.CourierName)}}const _t=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]},Wt=function(n){return{ID:n}},zt=function(n,a,e){return{"text-success":n,"text-warning":a,"text-danger":e}},Xt=function(){return["/print/Transfer"]},te=function(n,a){return{ID:n,Template:a}};function ee(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,m,2,1,"td",21),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t._UZ(8,"a",44),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.ALo(11,"date"),t.qZA(),t.TgZ(12,"td"),t._uU(13),t.ALo(14,"date"),t.qZA(),t.TgZ(15,"td",43),t._uU(16),t.qZA(),t.YNc(17,f,3,3,"td",26),t.TgZ(18,"td"),t._uU(19),t.qZA(),t.TgZ(20,"td"),t._uU(21),t.qZA(),t.TgZ(22,"td"),t._uU(23),t.qZA(),t.TgZ(24,"td"),t.YNc(25,D,2,1,"span",2),t.YNc(26,A,2,1,"span",2),t.qZA(),t.TgZ(27,"td")(28,"a",45),t._UZ(29,"i",46),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngIf",i.role.logistic.Delete),t.xp6(2),t.Oqu(e.Source),t.xp6(2),t.Oqu(e.Destination),t.xp6(2),t.Q6J("routerLink",t.DdM(25,_t))("queryParams",t.VKq(26,Wt,e.ID))("innerHTML",e.Number,t.oJD),t.xp6(2),t.Oqu(t.xi3(11,19,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(14,22,e.Created,"HH:mm")),t.xp6(3),t.Oqu(e.Quantity),t.xp6(1),t.Q6J("ngIf",i.role.sell.PriceVisible&&i.pageData.Config.PriceVisible),t.xp6(1),t.Tol(t.kEZ(28,zt,"Received"==e.StateLabel,"Dispatched"==e.StateLabel,"Approved"==e.StateLabel)),t.xp6(1),t.hij(" ",e.StateLabel,""),t.xp6(2),t.Oqu(e.CreatorName),t.xp6(2),t.Oqu(e.TypeName),t.xp6(2),t.Q6J("ngIf",null!=e.Courier),t.xp6(1),t.Q6J("ngIf",null!=e.CourierName&&null==e.Courier),t.xp6(2),t.Q6J("routerLink",t.DdM(32,Xt))("queryParams",t.WLB(33,te,e.ID,e.SourceTemplateID))}}function ne(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Number=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,lt,2,1,"ng-container",2),t.YNc(3,ct,3,0,"button",3),t.TgZ(4,"div",4),t.YNc(5,dt,2,2,"a",5),t.qZA()(),t.TgZ(6,"filters")(7,"div",6)(8,"div",7)(9,"div")(10,"h6"),t._uU(11,"Source"),t.qZA(),t.TgZ(12,"ng-select",8),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Destination"),t.qZA(),t.TgZ(16,"ng-select",9),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DestinationID=o)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"Fulfillment"),t.qZA(),t.TgZ(20,"ng-select",10),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.StateID=o)}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"Tag"),t.qZA(),t.TgZ(24,"ng-select",11),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.TypeID=o)}),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"Courier"),t.qZA(),t.TgZ(28,"ng-select",12),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CourierID=o)}),t.qZA()()(),t.YNc(29,pt,13,5,"div",13),t.TgZ(30,"a",14),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.moreFilter=!o.moreFilter)}),t._uU(31,"More "),t._UZ(32,"i",15),t.qZA()()(),t.TgZ(33,"content")(34,"div",16)(35,"div",17)(36,"table",18)(37,"thead",19)(38,"tr",20),t.YNc(39,x,2,0,"th",21),t.TgZ(40,"th",22),t._uU(41,"Source"),t.qZA(),t.TgZ(42,"th",23),t._uU(43,"Destination"),t.qZA(),t.TgZ(44,"th"),t._uU(45,"Number"),t.qZA(),t.TgZ(46,"th",24),t._uU(47,"Date"),t.qZA(),t.TgZ(48,"th",24),t._uU(49,"Time"),t.qZA(),t.TgZ(50,"th",25),t._uU(51,"Qty"),t.qZA(),t.YNc(52,U,2,0,"th",26),t.TgZ(53,"th",24),t._uU(54,"Status"),t.qZA(),t.TgZ(55,"th",27),t._uU(56,"Creator"),t.qZA(),t.TgZ(57,"th",24),t._uU(58,"Tag"),t.qZA(),t.TgZ(59,"th",24),t._uU(60,"Courier"),t.qZA(),t._UZ(61,"th",28),t.qZA()(),t.YNc(62,ee,30,36,"tbody",29),t.qZA()(),t.TgZ(63,"POS-complex-pagination",30),t.NdJ("jumpToPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())})("previousPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())})("nextPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.role.global.Export),t.xp6(2),t.Q6J("ngIf",e.role.logistic.Create),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.Entities)("ngModel",e.pageData.Filter.DestinationID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Deliveries)("ngModel",e.pageData.Filter.StateID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Types)("ngModel",e.pageData.Filter.TypeID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Courier)("ngModel",e.pageData.Filter.CourierID),t.xp6(1),t.Q6J("ngIf",e.moreFilter),t.xp6(10),t.Q6J("ngIf",e.role.logistic.Delete),t.xp6(13),t.Q6J("ngIf",e.role.sell.PriceVisible&&e.pageData.Config.PriceVisible),t.xp6(10),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let ie=(()=>{class n extends M.n{constructor(e,i,o,l,p,I){super(e,"TransferOrder/TransferOrderList","TransferOrderLoader/TransferOrderList",o,l),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"role",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"moreFilter",!1),this.csvConverter=i,this.role=p,this.matDialog=I}openExportModal(){this.matDialog.open(P.H,{data:{title:"Transfer Order",exportTypes:[{ID:"TransferOrder/TransferOrderList",Value:"Default",FileName:"Transfer Order"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/TransferOrderRowsCount",pagination:!0}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(v._W),t.Y36(c.gz),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-transfer-order"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Product",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Source",3,"items","ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Destination",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose",3,"items","ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose Options",3,"items","ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose a courier",3,"items","ngModel","ngModelChange"],["id","more-filter","class","ms-6","class","ms-6","container","",4,"ngIf"],[1,"more",3,"click"],[1,"fa-solid","fa-caret-down"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],[2,"width","150px"],[2,"width","90px"],[1,"text-end",2,"width","50px"],["class","text-end",4,"ngIf"],[2,"width","120px"],[2,"width","16px"],[4,"ngFor","ngForOf"],["api","TransferOrder/TransferOrderRowsCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],["role","button","class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Product",1,"btn","btn-success",3,"routerLink"],["id","more-filter","container","",1,"ms-6"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"text-end"],[3,"routerLink","queryParams","innerHTML"],["target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModel","ngModelChange"]],template:function(e,i){1&e&&t.YNc(0,ne,64,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.Fj,_.Wl,_.JJ,_.On,b.p,y.QB,F.v,C.w9,S.gM,d.JJ,d.uU]})),n})();var k=s(58393);function oe(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",23),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.httpPostListID("OutboundLogistics/Delete"))}),t._UZ(2,"i",24),t._uU(3," Delete"),t.qZA(),t.BQk()}}function ae(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",26),t._uU(2," Export"),t.qZA()}}const re=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Form"]};function le(n,a){1&n&&(t.TgZ(0,"a",27),t._uU(1," New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,re))}function ce(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",28)(1,"input",29),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(o.target.checked))}),t.qZA()()}}function se(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",33),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2).$implicit;return t.KtG(l.selected=o)}),t.qZA()}if(2&n){const e=t.oxw(2).$implicit;t.Q6J("ngModel",e.selected)}}function de(n,a){if(1&n&&(t.TgZ(0,"td",28),t.YNc(1,se,1,1,"input",32),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.WriteAccess)}}const pe=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},_e=function(n){return{ID:n}};function me(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"a",34),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,pe))("queryParams",t.VKq(4,_e,e.ID))("innerHtml",e.Number,t.oJD)}}function ue(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Number)}}function ge(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,de,2,1,"td",17),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t.YNc(8,me,2,6,"ng-container",30),t.YNc(9,ue,2,1,"ng-template",null,31,t.W1O),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.TgZ(14,"td"),t._uU(15),t.ALo(16,"date"),t.qZA(),t.TgZ(17,"td"),t._uU(18),t.qZA()()()),2&n){const e=a.$implicit,i=t.MAs(10),o=t.oxw(2);t.xp6(2),t.Q6J("ngIf",o.role.logistic.Delete),t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Oqu(e.OrderEntityName),t.xp6(2),t.Q6J("ngIf",e.WriteAccess)("ngIfElse",i),t.xp6(4),t.Oqu(t.xi3(13,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(16,11,e.Time,"HH:mm")),t.xp6(3),t.Oqu(e.CustomerName)}}function fe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Number=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,oe,4,0,"ng-container",2),t.YNc(3,ae,3,0,"button",3),t.TgZ(4,"div",4),t.YNc(5,le,2,2,"a",5),t.qZA()(),t.TgZ(6,"filters")(7,"div",6)(8,"div",7)(9,"div")(10,"h6"),t._uU(11,"Outlet"),t.qZA(),t.TgZ(12,"ng-select",8),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Order"),t.qZA(),t.TgZ(16,"ng-select",8),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.OrderEntityID=o)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"Customer"),t.qZA(),t.TgZ(20,"autocompleteV2",9),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CustomerID=o)}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"From"),t.qZA(),t.TgZ(24,"datepicker",10),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"To"),t.qZA(),t.TgZ(28,"datepicker",11),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()()()()(),t.TgZ(29,"content")(30,"div",12)(31,"div",13)(32,"table",14)(33,"thead",15)(34,"tr",16),t.YNc(35,ce,2,0,"th",17),t.TgZ(36,"th",18),t._uU(37,"Outlet"),t.qZA(),t.TgZ(38,"th",18),t._uU(39,"Order"),t.qZA(),t.TgZ(40,"th",18),t._uU(41,"Number"),t.qZA(),t.TgZ(42,"th",19),t._uU(43,"Date"),t.qZA(),t.TgZ(44,"th",20),t._uU(45,"Time"),t.qZA(),t.TgZ(46,"th"),t._uU(47,"Customer"),t.qZA()()(),t.YNc(48,ge,19,14,"tbody",21),t.qZA()(),t.TgZ(49,"POS-complex-pagination",22),t.NdJ("jumpToPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())})("previousPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())})("nextPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.role.global.Export),t.xp6(2),t.Q6J("ngIf",e.role.logistic.Create),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.Entities)("ngModel",e.pageData.Filter.OrderEntityID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(7),t.Q6J("ngIf",e.role.logistic.Delete),t.xp6(13),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let he=(()=>{class n extends M.n{constructor(e,i,o,l){super(e,"OutboundLogistics/OutboundLogisticsList","OutboundLogisticsLoader/List",i),(0,r.Z)(this,"role",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Date"},{Key:!0,Value:"Created"}]),this.role=o,this.matDialog=l}openExportModal(){this.matDialog.open(P.H,{data:{title:"Outbound Logistics",exportTypes:[{ID:"OutboundLogistics/OutboundLogisticsList",Value:"Default",FileName:"Outbound Logistics"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"OutboundLogistics/OutboundLogisticsListCount",pagination:!0}})}httpPostListID(e,i,o){if(i||(i="Are you sure you want to selected record/s?"),0==confirm(i))return;let l=this.getSelectedData().filter(p=>p.WriteAccess);l.length>0&&this.postListID(e,l,o)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(v._W),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["CustomerDisplay-customer-delivery"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Delivery",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer","notFoundMessageFor","customer",1,"form-control",3,"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-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","120px"],[2,"width","90px"],[2,"width","50px"],[4,"ngFor","ngForOf"],["api","OutboundLogistics/OutboundLogisticsListCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Delivery",1,"btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox",3,"change"],[4,"ngIf","ngIfElse"],["ONLY_VIEW",""],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams","innerHtml"]],template:function(e,i){1&e&&t.YNc(0,fe,50,18,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.Wl,_.JJ,_.On,b.p,y.QB,k.J,F.v,C.w9,S.gM,d.uU]})),n})();function xe(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",23),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.httpPostListID("InboundLogistics/DeleteInboundLogistics"))}),t._UZ(2,"i",24),t._uU(3," Delete"),t.qZA(),t.BQk()}}function Ce(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",26),t._uU(2," Export"),t.qZA()}}const Ze=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Form"]};function ve(n,a){1&n&&(t.TgZ(0,"a",27),t._uU(1," New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Ze))}function Te(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",28)(1,"input",29),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(o.target.checked))}),t.qZA()()}}function be(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",28)(1,"input",34),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.selected=o)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)}}const De=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]},Dt=function(n){return{ID:n}},ye=function(){return["/menu/Orders/Orders/Supplier_Bill/Info"]},Ie=function(n,a){return{ID:n,Template:a}};function Oe(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,be,2,1,"td",17),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._UZ(6,"a",30),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._UZ(10,"a",30),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.ALo(13,"date"),t.qZA(),t.TgZ(14,"td"),t._uU(15),t.ALo(16,"date"),t.qZA(),t.TgZ(17,"td",31)(18,"a",32),t._UZ(19,"i",33),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngIf",i.role.logistic.Delete),t.xp6(2),t.Oqu(e.EntityName),t.xp6(2),t.Q6J("routerLink",t.DdM(18,De))("queryParams",t.VKq(19,Dt,e.ID))("innerHtml",e.Number,t.oJD),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("routerLink",t.DdM(21,ye))("queryParams",t.VKq(22,Dt,e.SupplierInvoiceID))("innerHtml",e.PONumber,t.oJD),t.xp6(2),t.Oqu(t.xi3(13,12,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(16,15,e.Time,"HH:mm")),t.xp6(3),t.Q6J("queryParams",t.WLB(24,Ie,e.ID,e.PrintTemplateID))}}function Me(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Number=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,xe,4,0,"ng-container",2),t.YNc(3,Ce,3,0,"button",3),t.TgZ(4,"div",4),t.YNc(5,ve,2,2,"a",5),t.qZA()(),t.TgZ(6,"filters")(7,"div",6)(8,"div",7)(9,"div")(10,"h6"),t._uU(11,"Outlet"),t.qZA(),t.TgZ(12,"ng-select",8),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Supplier"),t.qZA(),t.TgZ(16,"autocompleteV2",9),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=o)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"From"),t.qZA(),t.TgZ(20,"datepicker",10),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"To"),t.qZA(),t.TgZ(24,"datepicker",11),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()()()()(),t.TgZ(25,"content")(26,"div",12)(27,"div",13)(28,"table",14)(29,"thead",15)(30,"tr",16),t.YNc(31,Te,2,0,"th",17),t.TgZ(32,"th",18),t._uU(33,"Outlet"),t.qZA(),t.TgZ(34,"th",18),t._uU(35,"Number"),t.qZA(),t.TgZ(36,"th",19),t._uU(37,"Supplier"),t.qZA(),t.TgZ(38,"th",18),t._uU(39,"PO Number"),t.qZA(),t.TgZ(40,"th",18),t._uU(41,"Date"),t.qZA(),t.TgZ(42,"th",20),t._uU(43,"Time"),t.qZA(),t._UZ(44,"th"),t.qZA()(),t.YNc(45,Oe,20,27,"tbody",21),t.qZA()(),t.TgZ(46,"POS-complex-pagination",22),t.NdJ("jumpToPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())})("previousPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())})("nextPage",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("text",e.pageData.Filter.Number),t.xp6(2),t.Q6J("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.role.global.Export),t.xp6(2),t.Q6J("ngIf",e.role.logistic.Create),t.xp6(7),t.Q6J("items",e.pageData.Options)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(7),t.Q6J("ngIf",e.role.logistic.Delete),t.xp6(14),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let Ae=(()=>{class n extends M.n{constructor(e,i,o,l,p){super(e,"InboundLogistics/InboundLogisticsList","InboundLogisticsLoader/List",o),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"role",void 0),(0,r.Z)(this,"matDialog",void 0),this.csvConverter=i,this.role=l,this.matDialog=p}openExportModal(){this.matDialog.open(P.H,{data:{title:"Inbound Logistics",exportTypes:[{ID:"InboundLogistics/InboundLogisticsList",Value:"Default",FileName:"Inbound Logistics"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"InboundLogistics/InboundLogisticsRowsCount",pagination:!0}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(v._W),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["CustomerDisplay-supplier-delivery"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Delivery",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID","notFoundMessageFor","supplier",1,"form-control",3,"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-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","120px"],[2,"width","500px"],[2,"width","90px"],[4,"ngFor","ngForOf"],["api","InboundLogistics/InboundLogisticsRowsCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Delivery",1,"btn","btn-success",3,"routerLink"],[2,"width","14px"],["type","checkbox",3,"change"],[3,"routerLink","queryParams","innerHtml"],[1,"text-end"],["routerLink","/print/InDelivery","target","_blank",3,"queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModel","ngModelChange"]],template:function(e,i){1&e&&t.YNc(0,Me,47,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.Wl,_.JJ,_.On,b.p,y.QB,k.J,F.v,C.w9,S.gM,d.uU]})),n})();var Se=s(29881),u=s(67327),T=s(96700),q=s(42046),w=s(63165);let qe=(()=>{class n{constructor(e,i,o,l){(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"modalConfig",void 0),(0,r.Z)(this,"email",void 0),this.data=e,this.dialogRef=i,this.httpService=o,this.toastr=l,this.modalConfig=new q.O,this.modalConfig.title="Email receipt to customer?",this.modalConfig.customWidth="400px"}ngOnInit(){}onOk(){this.httpService.post("/api/Transaction/SendDeliveryEmail",{email:this.email,invoiceID:this.data.invoiceID}).subscribe(i=>{this.toastr.success(`Invoice Sent Successful to ${this.email}`,T.n.Success),this.dialogRef.close()})}onClose(){this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so),t.Y36(h.O),t.Y36(v._W))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-send-email"]],decls:7,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],[1,"form-floating-outline"],["type","text","id","email","placeholder","Email",1,"form-control",3,"ngModel","ngModelChange"],["for","email"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"input",3),t.NdJ("ngModelChange",function(l){return i.email=l}),t.qZA(),t.TgZ(5,"label",4),t._uU(6,"Email"),t.qZA()()()()()),2&e&&(t.Q6J("config",i.modalConfig),t.xp6(4),t.Q6J("ngModel",i.email))},dependencies:[w.M,_.Fj,_.JJ,_.On]})),n})(),Ne=(()=>{class n{constructor(e,i,o,l){(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"toaster",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"config",new q.O),this.httpService=e,this.toaster=i,this.dialogRef=o,this.data=l,this.config.title="Delivery is Received ?",this.config.customWidth="280px"}onOk(){this.httpService.post("/API/OutboundLogistics/Exchange",JSON.stringify(this.data.Data.Fulfillment.ID)).subscribe(i=>{this.data.Data.InvoiceExchanged=!0,this.data.Data.Fulfillment.Status="Invoice Exchanged",this.toaster.success(i.Message,T.n.Success)}),this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(v._W),t.Y36(g.so),t.Y36(g.WI))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-invoice-exchanged"]],decls:3,vars:1,consts:[[3,"config","onOk","onCancel","onClose"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content"),t._uU(2," Please confirm to exchange received state? "),t.qZA()()),2&e&&t.Q6J("config",i.config)},dependencies:[w.M]})),n})(),we=(()=>{class n{constructor(e,i,o,l){(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"toaster",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"config",new q.O),this.httpService=e,this.toaster=i,this.dialogRef=o,this.data=l,this.config.title="Invoice Exchanged ?",this.config.customWidth="260px"}onOk(){this.httpService.post("/API/OutboundLogistics/Receive",JSON.stringify(this.data.Data.Fulfillment.ID)).subscribe(i=>{this.data.Data.Fulfillment.Status="Received",this.toaster.success("Success Confirm items is received",T.n.Success)}),this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(v._W),t.Y36(g.so),t.Y36(g.WI))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-receive-delivery"]],decls:3,vars:1,consts:[[3,"config","onOk","onCancel","onClose"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content"),t._uU(2," Please confirm item is received? "),t.qZA()()),2&e&&t.Q6J("config",i.config)},dependencies:[w.M]})),n})();var Pe=s(75130),Y=s(17342),N=s(93669);const Ue=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Form"]},W=function(n){return{ID:n}};function Je(n,a){if(1&n&&(t.TgZ(0,"a",40),t._UZ(1,"i",41),t._uU(2," Edit "),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,Ue))("queryParams",t.VKq(3,W,e.data.Fulfillment.ID))}}function Fe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.deleteData("OutboundLogistics/DeleteDeliveryCustomer"))}),t._UZ(1,"i",43),t._uU(2," Delete "),t.qZA()}}function Le(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"li",7)(1,"a",44),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.exportCSV(o.csvConverter,"OutboundLogistics/ExportInfo","OutboundLogistics#"+o.data.Fulfillment.Number+".csv"))}),t._uU(2,"Export"),t.qZA()()}}function Qe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"li",7)(1,"a",44),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openModalNote(o.data.Fulfillment.Note))}),t._uU(2," Add Note "),t.qZA()()}}function ke(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",24),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(6),t.Oqu(null==e.data.Customer?null:e.data.Customer.Mobile)}}function Ee(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",24),t._uU(2,"City"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t._UZ(5,"td",47),t.qZA()),2&n){const e=t.oxw(3);t.xp6(5),t.Q6J("innerHTML",null==e.data.Customer?null:e.data.Customer.Address,t.oJD)}}const Re=function(){return["/menu/Contacts/Contact/Customers/Info"]};function Ye(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",27)(2,"h2"),t._UZ(3,"i",45),t._uU(4,"Customer "),t.qZA()(),t.TgZ(5,"div",22)(6,"table",23)(7,"tr")(8,"th",24),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"td"),t._uU(11,":"),t.qZA(),t.TgZ(12,"td")(13,"a",25),t._uU(14),t.qZA()()(),t.YNc(15,ke,7,1,"tr",46),t.YNc(16,Ee,6,1,"tr",46),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("routerLink",t.DdM(5,Re))("queryParams",t.VKq(6,W,null==e.data.Customer?null:e.data.Customer.ID)),t.xp6(1),t.Oqu(null==e.data.Customer?null:e.data.Customer.Name),t.xp6(1),t.Q6J("ngIf",null==e.data.Customer?null:e.data.Customer.Mobile),t.xp6(1),t.Q6J("ngIf",null==e.data.Customer?null:e.data.Customer.Address)}}function He(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",24),t._uU(2,"Name"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(6),t.Oqu(e.data.Recipient.Name)}}function Ve(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",24),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(6),t.Oqu(e.data.Recipient.Phone)}}function Ke(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",24),t._uU(2,"City"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t._UZ(5,"td",47),t.qZA()),2&n){const e=t.oxw(3);t.xp6(5),t.Q6J("innerHTML",e.data.Recipient.Address,t.oJD)}}function Ge(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",24),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(6),t.Oqu(e.data.Recipient.City)}}function Be(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",27)(2,"h2"),t._UZ(3,"i",45),t._uU(4,"Recipient "),t.qZA()(),t.TgZ(5,"div",22)(6,"table",23),t.YNc(7,He,7,1,"tr",46),t.YNc(8,Ve,7,1,"tr",46),t.YNc(9,Ke,6,1,"tr",46),t.YNc(10,Ge,7,1,"tr",46),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(7),t.Q6J("ngIf",e.data.Recipient.Name),t.xp6(1),t.Q6J("ngIf",e.data.Recipient.Phone),t.xp6(1),t.Q6J("ngIf",e.data.Recipient.Address),t.xp6(1),t.Q6J("ngIf",e.data.Recipient.City)}}function je(n,a){if(1&n&&t._UZ(0,"p",52),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",e.Note,t.oJD)}}function $e(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",48),t._uU(5),t.qZA(),t.TgZ(6,"div"),t._uU(7),t.qZA(),t._UZ(8,"app-serial-note",49),t.YNc(9,je,1,1,"p",50),t.qZA(),t.TgZ(10,"td",51),t._uU(11),t.TgZ(12,"div"),t._uU(13),t.qZA()()()),2&n){const e=a.$implicit,i=a.index;t.xp6(2),t.Oqu(i+1+"."),t.xp6(2),t.Q6J("queryParams",t.VKq(8,W,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("serials",e.Serial),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(2),t.hij("",e.Quantity," "),t.xp6(2),t.Oqu(e.UOMName)}}function We(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",27)(2,"h2"),t._UZ(3,"i",53),t._uU(4,"Note "),t.qZA()(),t._UZ(5,"div",54),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",e.data.Fulfillment.Note,t.oJD)}}function ze(n,a){if(1&n&&(t.TgZ(0,"span")(1,"b"),t._uU(2,"Modified:"),t.qZA(),t._uU(3),t.ALo(4,"date"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.AsE(" ",t.xi3(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function Xe(n,a){if(1&n&&(t.TgZ(0,"div",55),t._UZ(1,"i",56),t.TgZ(2,"span")(3,"b"),t._uU(4," Created:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA(),t.YNc(7,ze,5,5,"span",46),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.AsE(" ",t.xi3(6,3,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),t.xp6(2),t.Q6J("ngIf",null==e.data.CreatedInfo.Modified?null:e.data.CreatedInfo.Modified.Date)}}const yt=function(){return["/print/OutDelivery"]},tn=function(n,a){return{ID:n,Template:a}},en=function(n,a){return{ID:n,Template:a,Price:1}},nn=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]};function on(n,a){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),t._UZ(4,"i",4),t._uU(5," Print "),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6)(8,"li",7)(9,"a",8),t._uU(10,"Print with Cost"),t.qZA()()()(),t.TgZ(11,"div",9),t.YNc(12,Je,3,5,"a",10),t.YNc(13,Fe,3,0,"a",11),t.qZA()(),t.TgZ(14,"content")(15,"div",12)(16,"div",13)(17,"div",14)(18,"div",15)(19,"div",16)(20,"div")(21,"h2"),t._UZ(22,"i",17),t._uU(23,"Order "),t.TgZ(24,"small",18),t._uU(25),t.qZA()()(),t.TgZ(26,"div",9)(27,"button",5),t._UZ(28,"b",19),t.qZA(),t.TgZ(29,"ul",20),t.YNc(30,Le,3,0,"li",21),t.YNc(31,Qe,3,0,"li",21),t.qZA()()(),t.TgZ(32,"div",22)(33,"table",23)(34,"tr")(35,"th",24),t._uU(36,"Outlet"),t.qZA(),t.TgZ(37,"td"),t._uU(38,":"),t.qZA(),t.TgZ(39,"td"),t._uU(40),t.qZA()(),t.TgZ(41,"tr")(42,"th",24),t._uU(43,"Invoice"),t.qZA(),t.TgZ(44,"td"),t._uU(45,":"),t.qZA(),t.TgZ(46,"td")(47,"a",25),t._uU(48),t.qZA()()(),t.TgZ(49,"tr")(50,"th",24),t._uU(51,"Date"),t.qZA(),t.TgZ(52,"td"),t._uU(53,":"),t.qZA(),t.TgZ(54,"td"),t._uU(55),t.ALo(56,"date"),t.qZA()()()()(),t.YNc(57,Ye,17,8,"div",26),t.YNc(58,Be,11,4,"div",26),t.TgZ(59,"div",15)(60,"div",27)(61,"h2"),t._UZ(62,"i",28),t._uU(63,"Fulfillment "),t.qZA()(),t.TgZ(64,"div",22)(65,"table",23)(66,"tr")(67,"th",24),t._uU(68,"Outlet"),t.qZA(),t.TgZ(69,"td"),t._uU(70,":"),t.qZA(),t.TgZ(71,"td"),t._uU(72),t.qZA()(),t.TgZ(73,"tr")(74,"th",24),t._uU(75,"Date"),t.qZA(),t.TgZ(76,"td"),t._uU(77,":"),t.qZA(),t.TgZ(78,"td"),t._uU(79),t.ALo(80,"date"),t.qZA()(),t.TgZ(81,"tr")(82,"th",24),t._uU(83,"Number"),t.qZA(),t.TgZ(84,"td"),t._uU(85,":"),t.qZA(),t.TgZ(86,"td"),t._uU(87),t.qZA()(),t.TgZ(88,"tr")(89,"th",24),t._uU(90,"Courier"),t.qZA(),t.TgZ(91,"td"),t._uU(92,":"),t.qZA(),t.TgZ(93,"td"),t._uU(94),t.qZA()()()()()(),t.TgZ(95,"div",29)(96,"div",15)(97,"div",27)(98,"h2"),t._UZ(99,"i",30),t._uU(100,"Products "),t.qZA()(),t.TgZ(101,"div",22)(102,"table",31)(103,"thead",32)(104,"tr")(105,"th",33),t._uU(106,"No."),t.qZA(),t.TgZ(107,"th"),t._uU(108,"Products"),t.qZA(),t.TgZ(109,"th",24),t._uU(110,"Qty"),t.qZA()()(),t.TgZ(111,"tbody"),t.YNc(112,$e,14,10,"tr",34),t.qZA(),t.TgZ(113,"tfoot",35)(114,"tr")(115,"td",36),t._uU(116,"Total"),t.qZA(),t.TgZ(117,"td",37),t._uU(118),t.ALo(119,"sum"),t.qZA()()()()()(),t.YNc(120,We,6,1,"div",26),t.qZA(),t.TgZ(121,"div",38),t.YNc(122,Xe,8,6,"div",39),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(3),t.Q6J("routerLink",t.DdM(36,yt))("queryParams",t.WLB(37,tn,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(6),t.Q6J("routerLink",t.DdM(40,yt))("queryParams",t.WLB(41,en,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(3),t.Q6J("ngIf",e.role.logistic.Edit&&e.data.WriteAccess),t.xp6(1),t.Q6J("ngIf",e.role.logistic.Delete),t.xp6(12),t.hij(" (",e.data.Fulfillment.Status,") "),t.xp6(5),t.Q6J("ngIf",e.role.global.Export),t.xp6(1),t.Q6J("ngIf",null==e.data.Fulfillment.Note),t.xp6(9),t.Oqu(e.data.Order.OutletName),t.xp6(7),t.Q6J("routerLink",t.DdM(44,nn))("queryParams",t.VKq(45,W,e.data.Order.InvoiceID)),t.xp6(1),t.hij(" ",e.data.Order.Number," "),t.xp6(7),t.Oqu(t.xi3(56,27,e.data.Order.Date,"dd MMM yyyy")),t.xp6(2),t.Q6J("ngIf",null==e.data.Customer?null:e.data.Customer.ID),t.xp6(1),t.Q6J("ngIf",(null==e.data.Recipient?null:e.data.Recipient.ID)!=e.guidEmpty),t.xp6(14),t.hij(" ",e.data.Fulfillment.OutletName," "),t.xp6(7),t.hij(" ",t.xi3(80,30,e.data.Fulfillment.Date,"dd MMM yyyy")," "),t.xp6(8),t.hij(" ",e.data.Fulfillment.Number," "),t.xp6(7),t.hij(" ",e.data.Fulfillment.Courier," "),t.xp6(18),t.Q6J("ngForOf",e.data.Items),t.xp6(6),t.Oqu(t.xi3(119,33,e.data.Items,"Quantity")),t.xp6(2),t.Q6J("ngIf",null==e.data?null:e.data.Fulfillment.Note),t.xp6(2),t.Q6J("ngIf",!e.role.users.LogRestriction)}}let an=(()=>{class n extends Se.O{constructor(e,i,o,l,p,I,L){super(e,"OutboundLogistics/Info",o),(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"toaster",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"role",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"guidEmpty",u.gT.GuidEmpty),this.httpService=e,this.csvConverter=i,this.toaster=l,this.router=p,this.role=I,this.matDialog=L}postBindData(e){e.Items=e.Items.filter(i=>0!=i.Quantity),this.menuData.H=`Outbound Logistics #${e.Fulfillment.Number}`}deleteData(e){confirm("Are you sure you want to delete this?")&&this.httpService.post(`/API/${e}`,JSON.stringify(this.data.Fulfillment.ID)).subscribe(()=>{this.toaster.success("Records are removed.","Success"),this.router.navigate(["/menu/Logistics/Archive/Outbound_Logistics"])})}openEmailDialog(){this.matDialog.open(qe,{data:{invoiceID:this.data.ID}})}openReceiveDialog(){this.matDialog.open(we,{data:{Data:this.data}})}openExchangedDialog(){this.matDialog.open(Ne,{data:{Data:this.data}})}exportCSV(e,i,o){o=o||"export.csv",this.httpService.post(`/api/${i}`,JSON.stringify(this.data.Fulfillment)).subscribe(l=>{e.convertToCSV(l,o)})}onUpdate(e,i){this.httpService.post(`/api/${e}`,JSON.stringify(i)).subscribe(o=>{this.reload()})}reload(){this.httpService.post("/api/OutboundLogistics/Info",JSON.stringify({ID:this.data.Fulfillment.ID})).subscribe({next:o=>{this.data=o}})}openModalNote(e){let i={SONote:null};e&&(i=e),this.matDialog.open(Pe.B,{data:{form:i}}).afterClosed().subscribe(l=>{l&&this.onUpdate("OutboundLogistics/UpdateNoteOutboundLogistics",{ID:this.data.Fulfillment.ID,Note:l.SONote})})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(c.gz),t.Y36(v._W),t.Y36(c.F0),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-customer-delivery-detail"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"btn-group","me-5"],["target","_blank",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item"],["target","_blank",3,"routerLink","queryParams"],[1,"btn-group"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-muted","h6"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],["class","dropdown-item",4,"ngIf"],[1,"card-body"],[1,"table-sm","table-borderless"],[2,"width","50px"],["target","_blank",1,"ps-0",3,"routerLink","queryParams"],["class","card",4,"ngIf"],[1,"card-header"],[1,"fa-solid","fa-truck","me-5"],[1,"col-8"],[1,"fa-solid","fa-box","me-5"],[1,"table"],[1,"thead-light"],[2,"width","40px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end","empty-column","fw-bold"],[1,"text-center","empty-column","fw-bold"],[1,"col-12"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash"],[3,"click"],[1,"fa-solid","fa-address-card","me-5"],[4,"ngIf"],[3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],[3,"serials"],["class","special-TinyMCE fst-italic text-warning mb-0","style","word-break: break-all;",3,"innerHTML",4,"ngIf"],[1,"text-center"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body",3,"innerHTML"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(e,i){1&e&&t.YNc(0,on,123,47,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,b.p,Y.B,d.uU,N.qU]})),n})();function rn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function ln(n,a){1&n&&(t.TgZ(0,"th"),t._uU(1,"Outlet"),t.qZA())}function cn(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1,"Total"),t.qZA())}const sn=function(){return["/menu/Outlets/Master/Outlets/Form"]},It=function(n){return{ID:n}};function dn(n,a){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,sn))("queryParams",t.VKq(4,It,e.EntityID)),t.xp6(1),t.Oqu(e.EntityName)}}function pn(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Total))}}function _n(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",26),t._uU(5),t.qZA()(),t.YNc(6,dn,3,6,"td",14),t.TgZ(7,"td",27),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,pn,3,3,"td",28),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.Q6J("queryParams",t.VKq(8,It,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(1),t.Q6J("ngIf",!i.data.isOutlet),t.xp6(2),t.Oqu(t.lcZ(9,6,e.Quantity)),t.xp6(2),t.Q6J("ngIf",i.roleService.sell.Create)}}function mn(n,a){1&n&&t._UZ(0,"td",30)}function un(n,a){if(1&n&&(t.TgZ(0,"td",21),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Total")),"")}}function gn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,rn,3,0,"button",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(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Supplier"),t.qZA(),t.TgZ(21,"autocompleteV2",8),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=o)}),t.qZA()()()()(),t.TgZ(22,"content")(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead",12)(27,"tr")(28,"th",13),t._uU(29,"Code"),t.qZA(),t.TgZ(30,"th"),t._uU(31,"Variant"),t.qZA(),t.YNc(32,ln,2,0,"th",14),t.TgZ(33,"th",15),t._uU(34,"Qty"),t.qZA(),t.YNc(35,cn,2,0,"th",16),t.qZA()(),t.TgZ(36,"tbody"),t.YNc(37,_n,11,10,"tr",17),t.qZA(),t.TgZ(38,"tfoot")(39,"tr",18),t.YNc(40,mn,1,0,"td",19),t.TgZ(41,"td",20),t._uU(42,"Total :"),t.qZA(),t.TgZ(43,"td",21),t._uU(44),t.ALo(45,"number"),t.ALo(46,"sum"),t.qZA(),t.YNc(47,un,4,6,"td",22),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(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(11),t.Q6J("ngIf",!e.data.isOutlet),t.xp6(3),t.Q6J("ngIf",e.roleService.sell.Create),t.xp6(2),t.Q6J("ngForOf",e.data.Data),t.xp6(3),t.Q6J("ngIf",!e.data.isOutlet),t.xp6(4),t.hij("",t.lcZ(45,16,t.xi3(46,18,e.data.Data,"Quantity"))," "),t.xp6(3),t.Q6J("ngIf",e.roleService.sell.Create)}}let fn=(()=>{class n extends M.n{constructor(e,i,o,l){super(e,"OutboundLogistics/GetOutStockReportProduct","OutboundLogisticsLoader/GetOutStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=i,this.roleService=o,this.matDialog=l}openExportModal(){this.matDialog.open(P.H,{data:{title:"Out Stock Report By Product",exportTypes:[{ID:"OutboundLogistics/GetOutStockReportProduct",Value:"Default",FileName:"Out Stock Report By Product"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(){this.menuData.H=this.data.PageTitle}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-report-outgoing-product"]],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 me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[4,"ngIf"],[1,"text-end",2,"width","200px"],["style","width:150px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","text-end empty-column",4,"ngIf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end",2,"background","#F0E68C"],["class","text-end","style","background: #F0E68C;",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"text-end",2,"width","150px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end","empty-column"]],template:function(e,i){1&e&&t.YNc(0,gn,48,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,k.J,C.w9,d.JJ,N.qU]})),n})();function hn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",19),t._uU(2," Export"),t.qZA()}}function xn(n,a){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Price"),t.qZA())}function Cn(n,a){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Total"),t.qZA())}function Zn(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Price,"1.0-2"))}}function vn(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.Total,"1.0-2"))}}const mt=function(n){return{ID:n}};function Tn(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td",32)(2,"a",33),t._uU(3),t.qZA()(),t.TgZ(4,"td",34),t._uU(5),t.qZA(),t.TgZ(6,"td",35),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,Zn,3,4,"td",36),t.YNc(10,vn,3,4,"td",36),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(2),t.Q6J("queryParams",t.VKq(9,mt,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.hij(" ",e.VariantCode,""),t.xp6(2),t.hij(" ",t.xi3(8,6,e.Quantity,"1.0-2"),""),t.xp6(2),t.Q6J("ngIf",i.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",i.roleService.sell.PriceVisible)}}function bn(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount : "),t.qZA())}function Dn(n,a){if(1&n&&(t.TgZ(0,"th",38),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,t.xi3(3,4,e.Variant,"Total"),"1.0-2"))}}const yn=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},In=function(){return["/menu/Contacts/Contact/Customers/Info"]};function On(n,a){if(1&n&&(t.TgZ(0,"div",21)(1,"div")(2,"a",22)(3,"span",23),t._uU(4),t.qZA()(),t.TgZ(5,"span"),t._uU(6),t.ALo(7,"date"),t.qZA(),t.TgZ(8,"span"),t._uU(9),t.qZA(),t.TgZ(10,"a",24),t._uU(11),t.qZA()(),t.TgZ(12,"table",25),t._UZ(13,"thead"),t.TgZ(14,"tbody",26),t.YNc(15,Tn,11,11,"tr",27),t.qZA()(),t.TgZ(16,"table",25),t._UZ(17,"thead"),t.TgZ(18,"tbody",28)(19,"tr"),t._UZ(20,"th",29),t.TgZ(21,"th",30),t._uU(22,"Total Qty : "),t.qZA(),t.TgZ(23,"th",14),t._uU(24),t.ALo(25,"number"),t.ALo(26,"sum"),t.qZA(),t.YNc(27,bn,2,0,"th",31),t.YNc(28,Dn,4,7,"th",31),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(20,yn))("queryParams",t.VKq(21,mt,e.OrderDeliveryID)),t.xp6(2),t.Oqu(e.OutletName+" #"+e.Number),t.xp6(2),t.hij(" "," - "+t.xi3(7,12,e.Date,"dd MMM yyyy")," "),t.xp6(3),t.hij(" "," - "," "),t.xp6(1),t.Q6J("routerLink",t.DdM(23,In))("queryParams",t.VKq(24,mt,e.CustomerID)),t.xp6(1),t.Oqu(e.CustomerName),t.xp6(4),t.Q6J("ngForOf",e.Variant),t.xp6(9),t.Oqu(t.lcZ(25,15,t.xi3(26,17,e.Variant,"Quantity"))),t.xp6(3),t.Q6J("ngIf",i.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",i.roleService.sell.PriceVisible)}}function Mn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,hn,3,0,"button",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(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()()()()(),t.TgZ(18,"content")(19,"div",8)(20,"div",9)(21,"table",10)(22,"thead",11)(23,"tr")(24,"th",12),t._uU(25,"Name"),t.qZA(),t.TgZ(26,"th",13),t._uU(27,"Code"),t.qZA(),t.TgZ(28,"th",14),t._uU(29,"Qty"),t.qZA(),t.YNc(30,xn,2,0,"th",15),t.YNc(31,Cn,2,0,"th",15),t.qZA()(),t.TgZ(32,"tbody")(33,"tr")(34,"td",16),t.YNc(35,On,29,26,"div",17),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(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(13),t.Q6J("ngIf",e.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",e.roleService.sell.PriceVisible),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}let An=(()=>{class n extends M.n{constructor(e,i,o,l){super(e,"OutboundLogistics/GetOutStockReportDetail","OutboundLogisticsLoader/GetOutStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=i,this.roleService=o,this.matDialog=l}openExportModal(){this.matDialog.open(P.H,{data:{title:"Report Outgoing Detail",exportTypes:[{ID:"OutboundLogistics/GetOutStockReportDetail",Value:"Default",FileName:"Report Outgoing Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-report-outgoing-detail"]],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 me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",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-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","400px"],[2,"width","150px"],[1,"text-end",2,"width","30px"],["class","text-end","style","width: 150px",4,"ngIf"],["colspan","5",1,"px-0","border-bottom-0"],["class","mb-5",4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"text-end",2,"width","150px"],[1,"mb-5"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4"],[3,"routerLink","queryParams"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[4,"ngFor","ngForOf"],[1,"table","table-sm"],[2,"width","645px"],[1,"text-end",2,"width","75px"],["style","width: 90px","class","text-end",4,"ngIf"],[1,"border-start","border-end",2,"width","400px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","150px"],[1,"text-end","border-start","border-end",2,"width","30px"],["class","text-end border-start border-end","style","width: 150px",4,"ngIf"],[1,"text-end","border-start","border-end",2,"width","150px"],[1,"text-end",2,"width","90px"]],template:function(e,i){1&e&&t.YNc(0,Mn,36,12,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,C.w9,d.JJ,d.uU,N.qU]})),n})();function Sn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",22),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",23),t._uU(2," Export"),t.qZA()}}function qn(n,a){1&n&&(t.TgZ(0,"th"),t._uU(1,"Outlet"),t.qZA())}function Nn(n,a){1&n&&(t.TgZ(0,"th",14),t._uU(1,"Total"),t.qZA())}const wn=function(){return["/menu/Outlets/Master/Outlets/Form"]},Ot=function(n){return{ID:n}};function Pn(n,a){if(1&n&&(t.TgZ(0,"td")(1,"a",27),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("routerLink",t.DdM(3,wn))("queryParams",t.VKq(4,Ot,e.EntityID)),t.xp6(1),t.Oqu(e.EntityName)}}function Un(n,a){if(1&n&&(t.TgZ(0,"td",25),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Total))}}function Jn(n,a){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.YNc(6,Pn,3,6,"td",13),t.TgZ(7,"td",25),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,Un,3,3,"td",26),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("queryParams",t.VKq(8,Ot,e.VariantID)),t.xp6(1),t.Oqu(e.VariantCode),t.xp6(2),t.Oqu(e.VariantName),t.xp6(1),t.Q6J("ngIf",!i.data.isOutlet),t.xp6(2),t.Oqu(t.lcZ(9,6,e.Quantity)),t.xp6(2),t.Q6J("ngIf",i.roleService.product.Cost)}}function Fn(n,a){1&n&&t._UZ(0,"td",28)}function Ln(n,a){if(1&n&&(t.TgZ(0,"td",20),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.List,"Total")),"")}}function Qn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Sn,3,0,"button",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(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()()()()(),t.TgZ(18,"content")(19,"div",8)(20,"div",9)(21,"table",10)(22,"thead",11)(23,"tr")(24,"th",12),t._uU(25,"Code"),t.qZA(),t.TgZ(26,"th"),t._uU(27,"Variant"),t.qZA(),t.YNc(28,qn,2,0,"th",13),t.TgZ(29,"th",14),t._uU(30,"Qty"),t.qZA(),t.YNc(31,Nn,2,0,"th",15),t.qZA()(),t.TgZ(32,"tbody"),t.YNc(33,Jn,11,10,"tr",16),t.qZA(),t.TgZ(34,"tfoot")(35,"tr",17),t.YNc(36,Fn,1,0,"td",18),t.TgZ(37,"td",19),t._uU(38,"Total :"),t.qZA(),t.TgZ(39,"td",20),t._uU(40),t.ALo(41,"number"),t.ALo(42,"sum"),t.qZA(),t.YNc(43,Ln,4,6,"td",21),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(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(11),t.Q6J("ngIf",!e.data.isOutlet),t.xp6(3),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(2),t.Q6J("ngForOf",e.data.List),t.xp6(3),t.Q6J("ngIf",!e.data.isOutlet),t.xp6(4),t.hij("",t.lcZ(41,15,t.xi3(42,17,e.data.List,"Quantity"))," "),t.xp6(3),t.Q6J("ngIf",e.roleService.product.Cost)}}let kn=(()=>{class n extends M.n{constructor(e,i,o,l){super(e,"InboundLogistics/GetInStockReportProduct","InboundLogisticsLoader/GetInStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=i,this.roleService=o,this.matDialog=l}openExportModal(){this.matDialog.open(P.H,{data:{title:"Product Stock In Report",exportTypes:[{ID:"InboundLogistics/GetInStockReportProduct",Value:"Default",FileName:"Product Stock In Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(){this.menuData.H=this.data.PageTitle}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-report-incoming-product"]],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 me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",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-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[4,"ngIf"],[1,"text-end",2,"width","50px"],["style","width:50px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","text-end empty-column",4,"ngIf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end",2,"background","#F0E68C"],["class","text-end","style","background: #F0E68C;",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end","empty-column"]],template:function(e,i){1&e&&t.YNc(0,Qn,44,20,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,C.w9,d.JJ,N.qU]})),n})();function En(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",20),t._uU(2," Export"),t.qZA()}}function Rn(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Cost"),t.qZA())}function Yn(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Total"),t.qZA())}const ut=function(n){return{ID:n}};function Hn(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1," - "),t.TgZ(2,"span")(3,"a",31),t._uU(4),t.qZA()()()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("queryParams",t.VKq(2,ut,e.SupplierID)),t.xp6(1),t.hij(" ",e.SupplierName," ")}}function Vn(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.UnitCost,"1.0-2")," ")}}function Kn(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",t.xi3(2,1,e.Total,"1.0-2")," ")}}function Gn(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td",32)(2,"a",33),t._uU(3),t.qZA()(),t.TgZ(4,"td",34),t._uU(5),t.qZA(),t.TgZ(6,"td",35),t._uU(7),t.qZA(),t.YNc(8,Vn,3,4,"td",36),t.YNc(9,Kn,3,4,"td",36),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(2),t.Q6J("queryParams",t.VKq(6,ut,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.hij(" ",e.VariantCode,""),t.xp6(2),t.hij(" ",e.Quantity,""),t.xp6(1),t.Q6J("ngIf",i.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",i.roleService.product.Cost)}}function Bn(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Amount : "),t.qZA())}function jn(n,a){if(1&n&&(t.TgZ(0,"th",21),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,t.xi3(3,4,e.Variant,"Total"),"1.0-2"))}}const $n=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]};function Wn(n,a){if(1&n&&(t.TgZ(0,"div",22)(1,"div")(2,"a",23)(3,"span",24),t._uU(4),t.qZA()(),t.TgZ(5,"span"),t._uU(6),t.ALo(7,"date"),t.qZA(),t.TgZ(8,"span"),t._uU(9),t.ALo(10,"date"),t.qZA(),t.YNc(11,Hn,5,4,"span",25),t.qZA(),t.TgZ(12,"table",26),t._UZ(13,"thead"),t.TgZ(14,"tbody",27),t.YNc(15,Gn,10,8,"tr",28),t.qZA()(),t.TgZ(16,"table",26),t._UZ(17,"thead"),t.TgZ(18,"tbody",29)(19,"tr"),t._UZ(20,"th",13),t.TgZ(21,"th",14),t._uU(22,"Total Qty : "),t.qZA(),t.TgZ(23,"th",15),t._uU(24),t.ALo(25,"number"),t.ALo(26,"sum"),t.qZA(),t.YNc(27,Bn,2,0,"th",30),t.YNc(28,jn,4,7,"th",30),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(21,$n))("queryParams",t.VKq(22,ut,e.InDeliveryID)),t.xp6(2),t.Oqu(e.OutletName+" #"+e.InDeliveryNumber),t.xp6(2),t.hij(" "," - In Date: "+t.xi3(7,10,e.InDeliveryDate,"dd MMM yyyy")," "),t.xp6(3),t.hij(" "," - PO Date: "+t.xi3(10,13,e.PODate,"dd MMM yyyy")," "),t.xp6(2),t.Q6J("ngIf",e.SupplierName),t.xp6(4),t.Q6J("ngForOf",e.Variant),t.xp6(9),t.Oqu(t.lcZ(25,16,t.xi3(26,18,e.Variant,"Quantity"))),t.xp6(3),t.Q6J("ngIf",i.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",i.roleService.product.Cost)}}function zn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,En,3,0,"button",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(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Supplier"),t.qZA(),t.TgZ(21,"autocompleteV2",8),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=o)}),t.qZA()()()()(),t.TgZ(22,"content")(23,"div",9)(24,"div",10)(25,"table",11)(26,"thead",12)(27,"tr")(28,"th",13),t._uU(29,"Name"),t.qZA(),t.TgZ(30,"th",14),t._uU(31,"Code"),t.qZA(),t.TgZ(32,"th",15),t._uU(33,"Qty"),t.qZA(),t.YNc(34,Rn,2,0,"th",16),t.YNc(35,Yn,2,0,"th",16),t.qZA()(),t.TgZ(36,"tbody")(37,"tr")(38,"td",17),t.YNc(39,Wn,29,24,"div",18),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(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.SupplierID),t.xp6(13),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}let Xn=(()=>{class n extends M.n{constructor(e,i,o,l){super(e,"InboundLogistics/GetInStockReportDetail","InboundLogisticsLoader/GetInStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=i,this.roleService=o,this.matDialog=l}openExportModal(){this.matDialog.open(P.H,{data:{title:"Stock In Report",exportTypes:[{ID:"InboundLogistics/GetInStockReportDetail",Value:"Default",FileName:"Stock In Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-report-incoming-detail"]],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 me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[1,"text-end",2,"width","75px"],[1,"text-end",2,"width","30px"],["class","text-end","style","width: 90px",4,"ngIf"],["colspan","5",1,"px-0","border-bottom-0"],["class","mb-5",4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"text-end",2,"width","90px"],[1,"mb-5"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4"],[4,"ngIf"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[4,"ngFor","ngForOf"],[1,"table","table-sm","table-borderless"],["style","width: 90px","class","text-end",4,"ngIf"],["routerLink","/menu/Contacts/Contact/Suppliers/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","645px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","75px"],[1,"text-end","border-start","border-end",2,"width","30px"],["class","text-end border-start border-end","style","width: 90px",4,"ngIf"],[1,"text-end","border-start","border-end",2,"width","90px"]],template:function(e,i){1&e&&t.YNc(0,zn,40,13,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,k.J,C.w9,d.JJ,d.uU,N.qU]})),n})();var gt=s(11594);function ti(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",20),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",21),t._uU(2," Export"),t.qZA()}}function ei(n,a){if(1&n&&(t.TgZ(0,"th",18),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function ni(n,a){if(1&n&&(t.TgZ(0,"td",18),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}const ii=function(n){return{ID:n}};function oi(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"a",22),t._uU(3),t.qZA()(),t.TgZ(4,"td",23),t._uU(5),t.qZA(),t.YNc(6,ni,2,1,"td",17),t.TgZ(7,"td",18),t._uU(8),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Q6J("queryParams",t.VKq(5,ii,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngForOf",e.Quantities),t.xp6(2),t.Oqu(e.Total)}}function ai(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,ti,3,0,"button",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Courier"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CourierID=o)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Categories"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CategoryID=o)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"From"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)})("dateChange",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"To"),t.qZA(),t.TgZ(21,"datepicker",8),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)})("dateChange",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Scope"),t.qZA(),t.TgZ(25,"radio-options",9),t.NdJ("modelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Product=o)})("modelChange",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.getListData())}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Product"),t.qZA(),t.TgZ(29,"autocompleteV2",10),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.ProductID=o)}),t.qZA()()()()(),t.TgZ(30,"content")(31,"div",11)(32,"div",12)(33,"table",13)(34,"thead",14)(35,"tr")(36,"th",15),t._uU(37,"Nama"),t.qZA(),t.TgZ(38,"th",16),t._uU(39,"Code"),t.qZA(),t.YNc(40,ei,2,1,"th",17),t.TgZ(41,"th",18),t._uU(42,"Total"),t.qZA()()(),t.TgZ(43,"tbody"),t.YNc(44,oi,9,7,"tr",19),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("text",e.pageData.Filter.Text),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(7),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Courier)("ngModel",e.pageData.Filter.CourierID),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(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("options",e.scopeOptions)("model",e.pageData.Filter.Product),t.xp6(4),t.Q6J("ngModel",e.pageData.Filter.ProductID)("inputTextValue",e.pageData.Filter.Name),t.xp6(11),t.Q6J("ngForOf",e.data.Outlet),t.xp6(4),t.Q6J("ngForOf",e.data.Data)}}let ri=(()=>{class n extends M.n{constructor(e,i,o,l,p){super(e,"TransferOrder/DeliveryOutletByProduct","TransferOrderLoader/DeliveryOutletByProduct",null,l),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"scopeOptions",[{Key:!1,Value:"Variant"},{Key:!0,Value:"Product"}]),this.csvConverter=i,this.roleService=o,this.matDialog=p}openExportModal(){this.matDialog.open(P.H,{data:{title:"In Stock Report By Product",exportTypes:[{ID:"TransferOrder/DeliveryOutletByProduct",Value:"Default",FileName:"In Stock Report By Product"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(O.N),t.Y36(c.gz),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-report-transfer-product"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","text","textChange","onSubmit"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["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","scopeOptions",3,"options","model","modelChange"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName","placeholder","Product","inputID","ProductID",1,"form-control",3,"ngModel","inputTextValue","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","10%","text-align","right"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[2,"text-align","right"]],template:function(e,i){1&e&&t.YNc(0,ai,45,18,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,gt.P,k.J,C.w9]})),n})();function li(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openExportModal())}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function ci(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1," Total Price "),t.qZA())}function si(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1," Total Cost "),t.qZA())}function di(n,a){1&n&&t._UZ(0,"i",36)}function pi(n,a){if(1&n&&(t._UZ(0,"td",42),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.lcZ(1,1,e.UnitPrice),t.oJD)}}function _i(n,a){if(1&n&&(t._UZ(0,"td",42),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.lcZ(1,1,e.UnitCost),t.oJD)}}const mi=function(n){return{"bg-warning":n}},Mt=function(n){return{ID:n}};function ui(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td",16)(2,"a",37),t._uU(3),t.qZA()(),t._UZ(4,"td",38)(5,"td",39)(6,"td",40),t.ALo(7,"number"),t._UZ(8,"td",40),t.ALo(9,"number"),t.YNc(10,pi,2,3,"td",41),t.YNc(11,_i,2,3,"td",41),t.qZA()),2&n){const e=a.$implicit,i=t.oxw().$implicit,o=t.oxw(2);t.Tol(t.VKq(14,mi,e.QtyRequested!=e.Quantity)),t.xp6(2),t.Q6J("queryParams",t.VKq(16,Mt,e.VariantID)),t.xp6(1),t.hij(" ",e.VariantName," "),t.xp6(1),t.Q6J("innerHTML",e.Code,t.oJD),t.xp6(1),t.Q6J("innerHTML",i.StateLabel,t.oJD),t.xp6(1),t.Q6J("innerHTML",t.lcZ(7,10,e.QtyRequested),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.lcZ(9,12,e.Quantity),t.oJD),t.xp6(2),t.Q6J("ngIf",o.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost)}}const gi=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]};function fi(n,a){if(1&n&&(t.TgZ(0,"div",26)(1,"div",27)(2,"div",28)(3,"a",29),t._UZ(4,"span",30),t.ALo(5,"date"),t.qZA()()(),t.TgZ(6,"div",31)(7,"span"),t._uU(8),t.qZA(),t._UZ(9,"br"),t.YNc(10,di,1,0,"i",32),t.TgZ(11,"span",33),t._uU(12),t.qZA()(),t.TgZ(13,"div",13)(14,"table",34)(15,"tbody"),t.YNc(16,ui,12,18,"tr",35),t.qZA()()()()),2&n){const e=a.$implicit;t.xp6(3),t.Q6J("routerLink",t.DdM(12,gi))("queryParams",t.VKq(13,Mt,e.ID)),t.xp6(1),t.Q6J("innerHTML","# "+e.Number+" - "+t.xi3(5,9,e.Date,"dd MMM yyyy"),t.oJD),t.xp6(4),t.lnq("",e.Source," > ",e.Destination," - ",e.TypeName,""),t.xp6(2),t.Q6J("ngIf",e.Note),t.xp6(2),t.Oqu(e.Note),t.xp6(4),t.Q6J("ngForOf",e.Items)}}function hi(n,a){if(1&n&&(t.TgZ(0,"div")(1,"strong"),t._uU(2,"Total Unit Price :"),t.qZA(),t._UZ(3,"span",45),t.ALo(4,"number"),t.ALo(5,"sum"),t.ALo(6,"GetChildrenArray"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("innerHTML",t.xi3(4,1,t.xi3(5,4,t.xi3(6,7,e.data.Data,"Items"),"UnitPrice"),"1.0-2"),t.oJD)}}function xi(n,a){if(1&n&&(t.TgZ(0,"div")(1,"strong"),t._uU(2,"Total Unit Cost :"),t.qZA(),t._UZ(3,"span",45),t.ALo(4,"number"),t.ALo(5,"sum"),t.ALo(6,"GetChildrenArray"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("innerHTML",t.xi3(4,1,t.xi3(5,4,t.xi3(6,7,e.data.Data,"Items"),"UnitCost"),"1.0-2"),t.oJD)}}function Ci(n,a){if(1&n&&(t.TgZ(0,"div",43)(1,"div",44)(2,"div")(3,"strong"),t._uU(4,"Total Quantity"),t.qZA(),t._UZ(5,"span",45),t.ALo(6,"number"),t.ALo(7,"sum"),t.ALo(8,"GetChildrenArray"),t.qZA(),t.YNc(9,hi,7,10,"div",46),t.YNc(10,xi,7,10,"div",46),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",t.lcZ(6,3,t.xi3(7,5,t.xi3(8,8,e.data.Data,"Items"),"Quantity")),t.oJD),t.xp6(4),t.Q6J("ngIf",e.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",e.roleService.product.Cost)}}function Zi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,li,3,0,"button",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Source"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=o)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Destination"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DestinationID=o)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"From"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=o)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"To"),t.qZA(),t.TgZ(21,"datepicker",8),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=o)}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Category"),t.qZA(),t.TgZ(25,"ng-select",9),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CategoryID=o)}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Type"),t.qZA(),t.TgZ(29,"ng-select",10),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.TypeID=o)}),t.qZA()(),t.TgZ(30,"div")(31,"h6"),t._uU(32,"Delivery"),t.qZA(),t.TgZ(33,"ng-select",11),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DeliveryID=o)}),t.qZA()()()()(),t.TgZ(34,"content")(35,"div",12)(36,"div",13)(37,"table",14)(38,"thead",15)(39,"tr")(40,"th",16),t._uU(41," Name "),t.qZA(),t.TgZ(42,"th",17),t._uU(43," Code "),t.qZA(),t.TgZ(44,"th",18),t._uU(45," Delivery "),t.qZA(),t.TgZ(46,"th",19),t._uU(47," Qty Req "),t.qZA(),t.TgZ(48,"th",19),t._uU(49," Qty Sent "),t.qZA(),t.YNc(50,ci,2,0,"th",20),t.YNc(51,si,2,0,"th",20),t.qZA()()()(),t.YNc(52,fi,17,15,"div",21),t.YNc(53,Ci,11,11,"div",22),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(7),t.Q6J("items",e.pageData.Options.Entities)("ngModel",e.pageData.Filter.EntityID),t.xp6(4),t.Q6J("items",e.pageData.Options.Destination)("ngModel",e.pageData.Filter.DestinationID),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(4),t.Q6J("items",e.pageData.Options.Categories)("ngModel",e.pageData.Filter.CategoryID),t.xp6(4),t.Q6J("items",e.pageData.Options.Types)("ngModel",e.pageData.Filter.TypeID),t.xp6(4),t.Q6J("items",e.pageData.Options.Deliveries)("ngModel",e.pageData.Filter.DeliveryID),t.xp6(17),t.Q6J("ngIf",e.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data.length>0)}}let vi=(()=>{class n extends M.n{constructor(e,i,o,l){super(e,"TransferOrder/GetReport","TransferOrderLoader/TransferOutletDeliveryReport"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"matDialog",void 0),this.csvConverter=i,this.roleService=o,this.matDialog=l}openExportModal(){this.matDialog.open(P.H,{data:{title:"Transfer Order Report",exportTypes:[{ID:"TransferOrder/GetReport",Value:"Default",FileName:"Transfer Order Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(Z.O),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-report-transfer-detail"]],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 me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"items","ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose destination",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose a category",3,"items","ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID","placeholder","Choose type",3,"items","ngModel","ngModelChange"],["bindLabel","Value","bindValue","Key","placeholder","Choose",3,"items","ngModel","ngModelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","float-thead","{ top: 60, autoReflow: true }",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-start",2,"width","700px"],[2,"width","115px"],[1,"text-end",2,"width","75px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 90px",4,"ngIf"],["class","mt-7 ms-5",4,"ngFor","ngForOf"],["class","mt-6",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"text-end",2,"width","90px"],[1,"mt-7","ms-5"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",3,"innerHTML"],[1,"mt-4"],["class","fa-solid fa-note-sticky me-3",4,"ngIf"],[1,"fst-italic"],[1,"table","table-striped","table-bordered"],[3,"class",4,"ngFor","ngForOf"],[1,"fa-solid","fa-note-sticky","me-3"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start",2,"width","115px",3,"innerHTML"],[1,"text-end","border-start",2,"width","75px",3,"innerHTML"],[1,"text-end","border-start",2,"width","50px",3,"innerHTML"],["class","text-end border-start","style","width: 90px",3,"innerHTML",4,"ngIf"],[1,"text-end","border-start",2,"width","90px",3,"innerHTML"],[1,"mt-6"],[1,"zebra","d-flex","justify-content-end"],[1,"text-end",3,"innerHTML"],[4,"ngIf"]],template:function(e,i){1&e&&t.YNc(0,Zi,54,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,C.w9,d.JJ,d.uU,N.qU,N.J1],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:15px!important}"]})),n})();var J=s(39300);let Ti=(()=>{class n{constructor(e,i,o){(0,r.Z)(this,"dt",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"config",void 0),this.dt=e,this.dialogRef=i,this.httpService=o,this.data=e.data,this.config=new q.O,this.config.title="Send Confirmation"}onOk(e){"Enter"!=e&&(this.data.ID=this.data.ID||this.data.Transfer.ID,this.httpService.post("/api/TransferOrder/ReceiveTransferOrder",JSON.stringify(this.data)).subscribe(()=>this.dialogRef.close("send")))}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so),t.Y36(h.O))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-receive"]],decls:18,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],[1,"modal-table"],["appearance","outline",3,"date","dateChange"],[1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(l){return i.onOk(l)})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"table",2)(4,"tr")(5,"th"),t._uU(6,"Date"),t.qZA(),t.TgZ(7,"td"),t._uU(8,":"),t.qZA(),t.TgZ(9,"td")(10,"datepicker",3),t.NdJ("dateChange",function(l){return i.data.Date=l}),t.qZA()()(),t.TgZ(11,"tr")(12,"th"),t._uU(13,"Note"),t.qZA(),t.TgZ(14,"td"),t._uU(15,":"),t.qZA(),t.TgZ(16,"td")(17,"textarea",4),t.NdJ("ngModelChange",function(l){return i.data.Note=l}),t.qZA()()()()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(10),t.Q6J("date",i.data.Date),t.xp6(7),t.Q6J("ngModel",i.data.Note))},dependencies:[w.M,_.Fj,_.JJ,_.On,y.QB]})),n})();var V=s(16571),K=s(83902);function bi(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"p",16),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.SerialNote,t.oJD)}}function Di(n,a){if(1&n&&t._UZ(0,"p",16),2&n){const e=t.oxw(2).$implicit;t.Q6J("innerHTML",e.Note,t.oJD)}}function yi(n,a){if(1&n&&t.YNc(0,Di,1,1,"p",17),2&n){const e=t.oxw().$implicit;t.Q6J("ngIf",null!=e.Note)}}const Ii=function(){return["/menu/Products/Catalog/Variants/Info"]},Oi=function(n){return{ID:n}};function Mi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td",10),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._UZ(4,"a",11),t.YNc(5,bi,2,1,"ng-container",12),t.YNc(6,yi,1,1,"ng-template",null,13,t.W1O),t.qZA(),t._UZ(8,"td",14),t.TgZ(9,"td",10),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td")(13,"input",15),t.NdJ("ngModelChange",function(o){const p=t.CHM(e).$implicit;return t.KtG(p.Quantity=o)}),t.qZA()()()}if(2&n){const e=a.$implicit,i=a.index,o=t.MAs(7),l=t.oxw();t.xp6(2),t.Oqu(i+1+"."),t.xp6(2),t.Q6J("routerLink",t.DdM(12,Ii))("queryParams",t.VKq(13,Oi,e.VariantID))("innerHTML",e.Name,t.oJD),t.xp6(1),t.Q6J("ngIf",e.SerialNote)("ngIfElse",o),t.xp6(3),t.Q6J("innerHTML",e.Code,t.oJD),t.xp6(2),t.Oqu(t.lcZ(11,10,e.NewQty)),t.xp6(3),t.Q6J("ngModel",e.Quantity)("disabled",e.TypeID==l.serialized)}}const Ai=function(){return["Name","Code"]};let Si=(()=>{class n{constructor(e,i,o){(0,r.Z)(this,"dt",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"filterText",""),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"config",void 0),(0,r.Z)(this,"serialized",V.J.Serialized),this.dt=e,this.dialogRef=i,this.httpService=o,this.data=e.data,this.setMaxSendQuantity(),this.config=new q.O,this.config.title="Send Confirmation"}onOk(){this.data.ID=this.data.ID||this.data.Transfer.ID,this.httpService.post("/api/TransferOrder/SendTransferOrder",JSON.stringify(this.data)).subscribe(()=>this.dialogRef.close("send"))}setMaxSendQuantity(){this.data.Items=this.data.Items.map(e=>(e.maxSend=this.calculateSerialQty(e.Serial?e.Serial:[]),e))}calculateSerialQty(e=[]){let i=0;return e.forEach(o=>{i+=o.Qty}),i}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so),t.Y36(h.O))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-send-confirmation"]],decls:20,vars:8,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],["type","text","placeholder","Search product..",1,"form-control","mb-5",2,"width","320px",3,"ngModel","ngModelChange"],[1,"table","table-bordered","custom-table"],[1,"thead-light"],[1,"text-center","border-end",2,"width","1px"],[1,"border-end",2,"width","400px"],[1,"border-end",2,"width","70px"],[1,"text-center","border-end",2,"width","30px"],[4,"ngFor","ngForOf"],[1,"text-center"],["target","_blank",3,"routerLink","queryParams","innerHTML"],[4,"ngIf","ngIfElse"],["DEFAULT_NOTE",""],[3,"innerHTML"],["autoNum","","emptyInputBehavior","null","type","text",1,"text-end","form-control",2,"width","46px",3,"ngModel","disabled","ngModelChange"],[1,"text-muted",2,"word-break","break-all",3,"innerHTML"],["class","text-muted","style","word-break:break-all",3,"innerHTML",4,"ngIf"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"input",2),t.NdJ("ngModelChange",function(l){return i.filterText=l}),t.qZA(),t.TgZ(4,"table",3)(5,"thead",4)(6,"tr")(7,"th",5),t._uU(8,"No"),t.qZA(),t.TgZ(9,"th",6),t._uU(10,"Name"),t.qZA(),t.TgZ(11,"th",7),t._uU(12,"Code"),t.qZA(),t.TgZ(13,"th",8),t._uU(14,"Qty Req."),t.qZA(),t.TgZ(15,"th",8),t._uU(16,"Qty Send"),t.qZA()()(),t.TgZ(17,"tbody"),t.YNc(18,Mi,14,15,"tr",9),t.ALo(19,"FilterByArray"),t.qZA()()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(3),t.Q6J("ngModel",i.filterText),t.xp6(15),t.Q6J("ngForOf",t.Dn7(19,3,i.data.Items,t.DdM(7,Ai),i.filterText)))},dependencies:[d.sg,d.O5,w.M,c.rH,_.Fj,_.JJ,_.On,K.b,d.JJ,N.Rt]})),n})();function qi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",3)(1,"button",48),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.export("TransferOrder/ExportInfo","Transfer Order"))}),t._UZ(2,"i",49),t._uU(3,"Export "),t.qZA(),t._UZ(4,"button",10),t.TgZ(5,"ul",11)(6,"li",50),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.export("TransferOrder/ExportDetailInfo","Transfer Order Detail.csv"))}),t.TgZ(7,"a"),t._uU(8,"Export with Detail"),t.qZA()()()()}}function Ni(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",51),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.approveDelivery("TransferOrder/ApproveTransferOrder",{ID:o.data.ID}))}),t._UZ(1,"i",52),t._uU(2,"\xa0Approve Delivery "),t.qZA()}}function wi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",53),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.sendDialog())}),t._UZ(1,"i",54),t._uU(2,"\xa0Send"),t.qZA()}}function Pi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",51),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.copyDelivery())}),t._UZ(1,"i",52),t._uU(2,"\xa0Receive Delivery "),t.qZA()}}function Ui(n,a){1&n&&(t.TgZ(0,"button",10),t._UZ(1,"b",55),t.qZA())}const Ji=function(){return["/menu/Logistics/Archive/Transfer_Order/Receive"]},z=function(n){return{ID:n}};function Fi(n,a){if(1&n&&(t.TgZ(0,"ul",56)(1,"li",12)(2,"a",13),t._uU(3,"Receive and Adjust"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(2,Ji))("queryParams",t.VKq(3,z,e.data.ID))}}const Li=function(){return["/menu/Logistics/Archive/Transfer_Order/Form"]};function Qi(n,a){if(1&n&&(t.TgZ(0,"a",57),t._UZ(1,"i",58),t._uU(2,"Edit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,Li))("queryParams",t.VKq(3,z,e.data.ID))}}function ki(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.deleteData())}),t._UZ(1,"i",60),t._uU(2,"Delete"),t.qZA()}}function Ei(n,a){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"span",61),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("innerHTML",e.data.Transfer.Note,t.oJD)}}const Ri=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]};function Yi(n,a){if(1&n&&(t.TgZ(0,"td")(1,"a",13),t._uU(2),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(3,Ri))("queryParams",t.VKq(4,z,e.data.AdjustmentID)),t.xp6(1),t.Oqu(e.data.Transfer.Note)}}function Hi(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"Journal"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td")(6,"a",62),t._uU(7,"View Journal"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(6),t.MGl("href","https://accounting.dealpos.app/pages/journal-entry;TransID=",e.data.ID,"",t.LSH)}}function Vi(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"span",70),t._uU(2,"Receive Note: "),t.qZA(),t._UZ(3,"span",61),t.BQk()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("innerHTML",e.data.Delivery.ReceivedNote,t.oJD)}}function Ki(n,a){if(1&n&&(t.TgZ(0,"div",17)(1,"div",63)(2,"h4"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"p",64),t._uU(6),t.ALo(7,"date"),t.qZA()(),t.TgZ(8,"div",65),t._UZ(9,"i",66),t.TgZ(10,"div",67),t._UZ(11,"div",68),t.qZA()(),t.TgZ(12,"div",69)(13,"h4"),t._uU(14,"Received By"),t.qZA(),t.TgZ(15,"p",64),t._uU(16),t.qZA(),t.YNc(17,Vi,4,1,"ng-container",24),t.qZA()()),2&n){const e=t.oxw(2);t.ekj("pb-8",e.data.Delivery.ReceivedNote),t.xp6(3),t.Oqu(t.xi3(4,8,e.data.Delivery.ReceivedDate,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(7,11,e.data.Delivery.ReceivedDate,"HH:mm a")),t.xp6(3),t.Udp("color","(Received)"==e.currentDeliveryState?"blue":"black"),t.xp6(7),t.Oqu(e.data.Delivery.ReceiveBy),t.xp6(1),t.Q6J("ngIf",e.data.Delivery.ReceivedNote)}}function Gi(n,a){if(1&n&&(t.TgZ(0,"div",17)(1,"div",63)(2,"h4"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"p",64),t._uU(6),t.ALo(7,"date"),t.qZA()(),t.TgZ(8,"div",65),t._UZ(9,"i",66),t.TgZ(10,"div",67),t._UZ(11,"div",68),t.qZA()(),t.TgZ(12,"div",69)(13,"h4"),t._uU(14,"Dispatched By"),t.qZA(),t.TgZ(15,"p",64),t._uU(16),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.xi3(4,5,e.data.Delivery.DispatchedDate,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(7,8,e.data.Delivery.DispatchedDate,"HH:mm a")),t.xp6(3),t.Udp("color","(Dispatched)"==e.currentDeliveryState?"blue":"black"),t.xp6(7),t.Oqu(e.data.Delivery.DispatchedBy)}}function Bi(n,a){if(1&n&&(t.TgZ(0,"div",17)(1,"div",63)(2,"h4"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"p",64),t._uU(6),t.ALo(7,"date"),t.qZA()(),t.TgZ(8,"div",65),t._UZ(9,"i",66),t.TgZ(10,"div",67),t._UZ(11,"div",68),t.qZA()(),t.TgZ(12,"div",69)(13,"h4"),t._uU(14,"Approved By"),t.qZA(),t.TgZ(15,"p",64),t._uU(16),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.xi3(4,5,e.data.Delivery.ApproveDate,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(7,8,e.data.Delivery.ApproveDate,"HH:mm a")),t.xp6(3),t.Udp("color","(Approve)"==e.currentDeliveryState?"blue":"black"),t.xp6(7),t.Oqu(e.data.Delivery.ApproveBy)}}function ji(n,a){if(1&n&&(t.TgZ(0,"div",17)(1,"div",63)(2,"h4"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"p",64),t._uU(6),t.ALo(7,"date"),t.qZA()(),t.TgZ(8,"div",65),t._UZ(9,"i",66),t.qZA(),t.TgZ(10,"div",69)(11,"h4"),t._uU(12,"Created By"),t.qZA(),t.TgZ(13,"p",64),t._uU(14),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.xi3(4,5,e.data.CreatedInfo.Created.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(7,8,e.data.CreatedInfo.Created.Date,"HH:mm a")),t.xp6(3),t.Udp("color","(Request)"==e.currentDeliveryState?"blue":"black"),t.xp6(5),t.Oqu(e.data.CreatedInfo.Created.User)}}function $i(n,a){if(1&n&&(t.TgZ(0,"div",20)(1,"div",71)(2,"h2",72),t._uU(3,"Items"),t.qZA(),t.TgZ(4,"small",73),t._uU(5),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(5),t.hij(" ",e.data.TotalWeight,"")}}function Wi(n,a){1&n&&(t.TgZ(0,"th",74),t._uU(1," Product Code "),t.qZA())}function zi(n,a){1&n&&(t.TgZ(0,"th",35),t._uU(1," Qty Req."),t.qZA())}function Xi(n,a){1&n&&(t.TgZ(0,"th",35),t._uU(1,"Inventory "),t.qZA())}function to(n,a){1&n&&(t.TgZ(0,"th",75),t._uU(1,"Cost"),t.qZA())}function eo(n,a){1&n&&(t.TgZ(0,"th",75),t._uU(1,"Total Cost"),t.qZA())}function no(n,a){if(1&n&&(t.TgZ(0,"th",76),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" Price (",e.data.CurrencySimbol,") ")}}function io(n,a){1&n&&(t.TgZ(0,"th",77),t._uU(1," %"),t.qZA())}function oo(n,a){if(1&n&&(t.TgZ(0,"th",78),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" Total (",e.data.CurrencySimbol,") ")}}function ao(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"p",83),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD)}}function ro(n,a){if(1&n&&(t.TgZ(0,"td"),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.ProductCode)}}function lo(n,a){if(1&n&&(t.TgZ(0,"td",42),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.QtyRequested))}}const co=function(n){return{"bg-gradient-danger":n}};function so(n,a){if(1&n&&(t.TgZ(0,"td",42),t._uU(1),t.ALo(2,"number"),t.TgZ(3,"div"),t._uU(4),t.qZA()()),2&n){const e=t.oxw().$implicit;t.Tol(t.VKq(6,co,e.Inventory<e.Quantity)),t.xp6(1),t.hij(" ",t.lcZ(2,4,e.Inventory)," "),t.xp6(3),t.Oqu(e.UOMName)}}function po(n,a){if(1&n&&(t.TgZ(0,"td",84),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.UnitCost),"")}}function _o(n,a){if(1&n&&(t.TgZ(0,"td",84),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.Quantity*e.UnitCost))}}function mo(n,a){if(1&n&&(t.TgZ(0,"td",84),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.UnitPrice),"")}}function uo(n,a){if(1&n&&(t.TgZ(0,"td",85),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.PriceDiscount,"")}}function go(n,a){if(1&n&&(t.TgZ(0,"td",84),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.TotalPrice),"")}}const fo=function(){return["/menu/Products/Catalog/Variants/Info"]};function ho(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td",42),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",13),t._uU(5),t.qZA(),t.TgZ(6,"div"),t._uU(7),t.qZA(),t._UZ(8,"app-serial-note",79),t.YNc(9,ao,2,1,"ng-container",24),t.qZA(),t.YNc(10,ro,2,1,"td",24),t.YNc(11,lo,3,3,"td",43),t.TgZ(12,"td",42),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,so,5,8,"td",80),t.YNc(16,po,3,3,"td",81),t.YNc(17,_o,3,3,"td",81),t.YNc(18,mo,3,3,"td",81),t.YNc(19,uo,2,1,"td",82),t.YNc(20,go,3,3,"td",81),t.qZA()),2&n){const e=a.$implicit,i=a.index,o=t.oxw(2);t.xp6(2),t.Oqu(i+1+"."),t.xp6(2),t.Q6J("routerLink",t.DdM(18,fo))("queryParams",t.VKq(19,z,e.VariantID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("serials",e.Serial),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(1),t.Q6J("ngIf",o.data.Config.ProductCodeVisible),t.xp6(1),t.Q6J("ngIf",o.data.Config.isQtyRequested),t.xp6(2),t.Oqu(t.lcZ(14,16,e.Quantity)),t.xp6(2),t.Q6J("ngIf",o.data.Config.IsState<2&&o.data.Config.InventoryVisible),t.xp6(1),t.Q6J("ngIf",o.data.Config.CostVisible&&o.role.product.Cost),t.xp6(1),t.Q6J("ngIf",o.data.Config.CostVisible&&o.role.product.Cost),t.xp6(1),t.Q6J("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible&&o.data.Config.DiscountVisible),t.xp6(1),t.Q6J("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible)}}function xo(n,a){if(1&n&&(t.TgZ(0,"td",42),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.Items,"QtyRequested")))}}function Co(n,a){1&n&&t._UZ(0,"td")}function Zo(n,a){if(1&n&&(t.TgZ(0,"td",86)(1,"b"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sumMultiply"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.lcZ(3,1,t.Dn7(4,3,e.data.Items,"UnitCost","Quantity"))," ")}}function vo(n,a){if(1&n&&(t.TgZ(0,"td",87)(1,"b"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,1,t.xi3(4,3,e.data.Items,"TotalPrice")))}}function To(n,a){if(1&n&&(t.TgZ(0,"div",88),t._UZ(1,"i",89),t.TgZ(2,"span")(3,"b"),t._uU(4," Modified:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(5),t.AsE(" ",t.xi3(6,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}const bo=function(){return["/print/Transfer"]},At=function(n,a){return{ID:n,Template:a}},Do=function(){return["/print/TransferMini"]};function yo(n,a){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,qi,9,0,"div",2),t.TgZ(3,"div",3),t.YNc(4,Ni,3,0,"a",4),t.YNc(5,wi,3,0,"a",5),t.YNc(6,Pi,3,0,"a",4),t.YNc(7,Ui,2,0,"button",6),t.YNc(8,Fi,4,5,"ul",7),t.qZA(),t.TgZ(9,"div",3)(10,"a",8),t._UZ(11,"i",9),t._uU(12,"Print "),t.qZA(),t._UZ(13,"button",10),t.TgZ(14,"ul",11)(15,"li",12)(16,"a",13),t._uU(17,"Print with Mini"),t.qZA()()()(),t.TgZ(18,"div",3),t.YNc(19,Qi,3,5,"a",14),t.YNc(20,ki,3,0,"a",15),t.qZA()(),t.TgZ(21,"content")(22,"div",16)(23,"div",17)(24,"div",18)(25,"div",19)(26,"div",20)(27,"h2"),t._UZ(28,"i",21),t._uU(29),t.qZA()(),t.TgZ(30,"div",22)(31,"table",23)(32,"tr")(33,"th"),t._uU(34,"Tag"),t.qZA(),t.TgZ(35,"td"),t._uU(36,":"),t.qZA(),t.TgZ(37,"td"),t._uU(38),t.qZA()(),t.TgZ(39,"tr")(40,"th"),t._uU(41,"Date"),t.qZA(),t.TgZ(42,"td"),t._uU(43,":"),t.qZA(),t.TgZ(44,"td"),t._uU(45),t.ALo(46,"date"),t.qZA()(),t.TgZ(47,"tr")(48,"th"),t._uU(49,"Courier"),t.qZA(),t.TgZ(50,"td"),t._uU(51,":"),t.qZA(),t.TgZ(52,"td"),t._uU(53),t.qZA()(),t.TgZ(54,"tr")(55,"th"),t._uU(56,"Status"),t.qZA(),t.TgZ(57,"td"),t._uU(58,":"),t.qZA(),t.TgZ(59,"td"),t._uU(60),t.qZA()(),t.TgZ(61,"tr")(62,"th"),t._uU(63,"Note"),t.qZA(),t.TgZ(64,"td"),t._uU(65,":"),t.qZA(),t.YNc(66,Ei,2,1,"td",24),t.YNc(67,Yi,3,6,"td",24),t.qZA(),t.YNc(68,Hi,8,1,"tr",24),t.qZA()()(),t.TgZ(69,"div",19)(70,"div",20)(71,"h2"),t._uU(72),t.qZA()(),t.TgZ(73,"div",22),t.YNc(74,Ki,18,14,"div",25),t.YNc(75,Gi,17,11,"div",26),t.YNc(76,Bi,17,11,"div",26),t.YNc(77,ji,15,11,"div",26),t.qZA()()(),t.TgZ(78,"div",27)(79,"div",19),t.YNc(80,$i,6,1,"div",28),t.TgZ(81,"div",22)(82,"table",29)(83,"thead",30)(84,"tr")(85,"th",31),t._uU(86,"No"),t.qZA(),t.TgZ(87,"th",32),t._uU(88,"Name"),t.qZA(),t.YNc(89,Wi,2,0,"th",33),t.YNc(90,zi,2,0,"th",34),t.TgZ(91,"th",35),t._uU(92,"Qty Sent"),t.qZA(),t.YNc(93,Xi,2,0,"th",34),t.YNc(94,to,2,0,"th",36),t.YNc(95,eo,2,0,"th",36),t.YNc(96,no,2,1,"th",37),t.YNc(97,io,2,0,"th",38),t.YNc(98,oo,2,1,"th",39),t.qZA()(),t.TgZ(99,"tbody"),t.YNc(100,ho,21,21,"tr",40),t.qZA(),t.TgZ(101,"tfoot",41)(102,"tr")(103,"td",42)(104,"b"),t._uU(105,"Total"),t.qZA()(),t.YNc(106,xo,4,6,"td",43),t.TgZ(107,"td",44)(108,"b"),t._uU(109),t.ALo(110,"number"),t.ALo(111,"sum"),t.qZA()(),t.YNc(112,Co,1,0,"td",24),t.YNc(113,Zo,5,7,"td",45),t.YNc(114,vo,5,6,"td",46),t.qZA()()()()()()(),t.YNc(115,To,7,5,"div",47),t.qZA()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.role.global.Export),t.xp6(2),t.Q6J("ngIf",e.data.Config.EligibleToApprove),t.xp6(1),t.Q6J("ngIf",e.data.Config.EligibleToSend&&e.role.logistic.TransferOrderEditor),t.xp6(1),t.Q6J("ngIf",e.data.Config.EligibleToReceive&&e.data.Config.HasReceiverRole),t.xp6(1),t.Q6J("ngIf",e.data.Config.EligibleToReceive&&e.role.adjustment.Edit&&e.data.Config.HasReceiverRole),t.xp6(1),t.Q6J("ngIf",e.data.Config.EligibleToReceive&&e.role.adjustment.Edit),t.xp6(2),t.Q6J("routerLink",t.DdM(54,bo))("queryParams",t.WLB(55,At,e.data.ID,e.data.TemplateID)),t.xp6(6),t.Q6J("routerLink",t.DdM(58,Do))("queryParams",t.WLB(59,At,e.data.ID,e.data.TemplateID)),t.xp6(3),t.Q6J("ngIf",e.data.Config.isEditor),t.xp6(1),t.Q6J("ngIf",e.role.logistic.Delete),t.xp6(9),t.AsE("\xa0",e.data.Transfer.Source," to ",e.data.Transfer.Destination," "),t.xp6(9),t.Oqu(e.data.Transfer.Type),t.xp6(7),t.Oqu(t.xi3(46,46,e.data.Transfer.Date,"dd MMM yyyy")),t.xp6(8),t.Oqu(e.data.Transfer.Courier),t.xp6(7),t.Oqu(e.data.Transfer.Status),t.xp6(6),t.Q6J("ngIf",!e.data.Config.IsAdjusted),t.xp6(1),t.Q6J("ngIf",e.data.Config.IsAdjusted),t.xp6(1),t.Q6J("ngIf",e.data.JournalUrl),t.xp6(4),t.Oqu(e.data.Delivery.HeadDelivery),t.xp6(2),t.Q6J("ngIf",e.data.Delivery.ReceivedDate),t.xp6(1),t.Q6J("ngIf",e.data.Delivery.DispatchedDate),t.xp6(1),t.Q6J("ngIf",e.data.Delivery.ApproveDate),t.xp6(1),t.Q6J("ngIf",e.data.CreatedInfo.Created.Date),t.xp6(3),t.Q6J("ngIf",e.data.Items.length>0),t.xp6(9),t.Q6J("ngIf",e.data.Config.ProductCodeVisible),t.xp6(1),t.Q6J("ngIf",e.data.Config.isQtyRequested),t.xp6(3),t.Q6J("ngIf",e.data.Config.IsState<2&&e.data.Config.InventoryVisible),t.xp6(1),t.Q6J("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),t.xp6(1),t.Q6J("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),t.xp6(1),t.Q6J("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible&&e.data.Config.DiscountVisible),t.xp6(1),t.Q6J("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),t.xp6(2),t.Q6J("ngForOf",e.data.Items),t.xp6(3),t.uIk("colspan",e.data.Config.ProductCodeVisible?"3":"2"),t.xp6(3),t.Q6J("ngIf",e.data.Config.isQtyRequested),t.xp6(3),t.hij(" ",t.lcZ(110,49,t.xi3(111,51,e.data.Items,"Quantity"))," "),t.xp6(3),t.Q6J("ngIf",e.data.Config.IsState<2&&e.data.Config.InventoryVisible),t.xp6(1),t.Q6J("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),t.xp6(1),t.Q6J("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",!e.role.users.LogRestriction&&e.data.CreatedInfo.Modified.Date!=e.minDate)}}let Io=(()=>{class n extends M.n{constructor(e,i,o,l,p,I,L){super(e,"TransferOrder/Info",null,null,i),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"role",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"currentDeliveryState",void 0),(0,r.Z)(this,"minDate",u.gT.MinDate),this.csvConverter=o,this.router=l,this.toastr=p,this.role=I,this.matDialog=L}preGetList(){this.pageData.Filter=this.route.snapshot.queryParams}postInit(){this.menuData.H=this.data.PageTitle,this.currentDeliveryState=this.data.Delivery.HeadDelivery.split(" ")[1]}deleteData(){confirm("Are you sure you want to delete selected record/s?")&&this.httpService.post("/API/TransferOrder/DeleteTransferOrderInfo",JSON.stringify(this.data.ID)).subscribe(()=>{this.toastr.success("Records are removed.",T.n.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])})}export(e,i){this.httpService.post(`/api/${e}`,JSON.stringify(this.route.snapshot.queryParams.ID)).subscribe(o=>{this.csvConverter.convertToCSV(o,i)})}approveDelivery(e,i){this.httpService.post(`/api/${e}`,JSON.stringify(i)).subscribe(()=>window.location.reload())}sendDialog(){this.matDialog.open(Si,{data:{data:this.data}}).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e))).subscribe(()=>this.getListData())}copyDelivery(){this.matDialog.open(Ti,{data:{data:this.data}}).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e))).subscribe(()=>this.getListData())}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(Z.O),t.Y36(c.F0),t.Y36(v._W),t.Y36(O.N),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-transfer-order-info"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn-group me-5",4,"ngIf"],[1,"btn-group","me-5"],["class","btn btn-outline-secondary","role","button",3,"click",4,"ngIf"],["style","cursor: pointer;","class","btn btn-outline-secondary","role","button",3,"click",4,"ngIf"],["class","btn btn-outline-secondary btn-sm dropdown-toggle","data-bs-toggle","dropdown",4,"ngIf"],["class","dropdown-menu dropdown-menu-end","style","cursor: pointer; color: black",4,"ngIf"],["target","_blank",1,"btn","btn-outline-secondary",2,"float","left",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item"],["target","_blank",3,"routerLink","queryParams"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","card-container","mt-5"],[1,"row"],[1,"col-sm-4"],[1,"card"],[1,"card-header"],["aria-hidden","true",1,"fa","fa-location-dot"],[1,"card-body"],[1,"table-sm","table-borderless"],[4,"ngIf"],["class","row",3,"pb-8",4,"ngIf"],["class","row",4,"ngIf"],[1,"col-sm-8"],["class","card-header",4,"ngIf"],["id","tableGrid",1,"table","custom-table","w-100"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","1px"],[2,"width","100%"],["style","width: 400px",4,"ngIf"],["style","width: 30px","class","text-center",4,"ngIf"],[1,"text-center",2,"width","30px"],["style","width: 85px","class","text-end",4,"ngIf"],["style","width: 100px","class","text-end",4,"ngIf"],["style","width: 20px","class","text-end",4,"ngIf"],["style","width: 110px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-center"],["class","text-center",4,"ngIf"],[1,"text-center","empty-column"],["class","text-end","colspan","1",4,"ngIf"],["class","text-end","colspan","2",4,"ngIf"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",2,"float","left",3,"click"],[1,"fas","fa-upload","me-3"],[1,"dropdown-item",3,"click"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-truck"],["role","button",1,"btn","btn-outline-secondary",2,"cursor","pointer",3,"click"],[1,"fa-solid","fa-check"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer","color","black"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash","me-3"],[3,"innerHTML"],["target","_blank",3,"href"],[1,"col-auto","text-end"],[1,"mt-3"],[1,"col-3","text-center","position-relative"],[1,"fa-solid","fa-angle-up","current-status-icon"],[1,"d-flex","justify-content-center","h-100"],[1,"timeline"],[1,"col-4"],[1,"fw-bold"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-muted","h6"],[2,"width","400px"],[1,"text-end",2,"width","85px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","20px"],[1,"text-end",2,"width","110px"],[3,"serials"],["class","text-center",3,"class",4,"ngIf"],["class","text-end",4,"ngIf"],["class","text-end text-danger",4,"ngIf"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"text-end"],[1,"text-end","text-danger"],["colspan","1",1,"text-end"],["colspan","2",1,"text-end"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(e,i){1&e&&t.YNc(0,yo,116,62,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,b.p,Y.B,d.JJ,d.uU,N.qU,N.o4],styles:[".current-status-icon[_ngcontent-%COMP%]{background-color:#fff;border-radius:50%;box-shadow:0 2px #b8b8b8;width:35px;height:35px;font-size:35px}.timeline[_ngcontent-%COMP%]{border-left:3px solid #e1e1e1;height:100%;width:0px}"]})),n})();function Oo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",2)(1,"a",36),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.export("InboundLogistics/ExportInfoItems","Transfer Item Inbound Logistics.csv"))}),t._UZ(2,"i",37),t._uU(3,"Export "),t.qZA()()}}const Mo=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Form"]},X=function(n){return{ID:n}};function Ao(n,a){if(1&n&&(t.TgZ(0,"a",38),t._UZ(1,"i",39),t._uU(2,"Edit"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,Mo))("queryParams",t.VKq(3,X,e.data.Fulfillment.ID))}}function So(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.deleteData())}),t._UZ(1,"i",41),t._uU(2,"Delete"),t.qZA()}}function qo(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(6),t.Oqu(null==e.data.Supplier?null:e.data.Supplier.Mobile)}}function No(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"City"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t._UZ(5,"td",45),t.qZA()),2&n){const e=t.oxw(3);t.xp6(5),t.Q6J("innerHTML",null==e.data.Supplier?null:e.data.Supplier.Address,t.oJD)}}const wo=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function Po(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",16)(2,"h2"),t._UZ(3,"i",42),t._uU(4,"Supplier "),t.qZA()(),t.TgZ(5,"div",19)(6,"table",20)(7,"tr")(8,"th"),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"td"),t._uU(11,":"),t.qZA(),t.TgZ(12,"td")(13,"a",43),t._uU(14),t.qZA()()(),t.YNc(15,qo,7,1,"tr",44),t.YNc(16,No,6,1,"tr",44),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("routerLink",t.DdM(5,wo))("queryParams",t.VKq(6,X,null==e.data.Supplier?null:e.data.Supplier.ID)),t.xp6(1),t.Oqu(null==e.data.Supplier?null:e.data.Supplier.Name),t.xp6(1),t.Q6J("ngIf",null==e.data.Supplier?null:e.data.Supplier.Mobile),t.xp6(1),t.Q6J("ngIf",null==e.data.Supplier?null:e.data.Supplier.Address)}}function Uo(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"p",49),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",null==e?null:e.Note,t.oJD)}}function Jo(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",46),t._uU(5),t.qZA(),t.TgZ(6,"div"),t._uU(7),t.qZA(),t._UZ(8,"app-serial-note",47),t.YNc(9,Uo,2,1,"ng-container",44),t.qZA(),t.TgZ(10,"td",48),t._uU(11),t.TgZ(12,"div"),t._uU(13),t.qZA()()()),2&n){const e=a.$implicit,i=a.index;t.xp6(2),t.Oqu(i+1+"."),t.xp6(2),t.Q6J("queryParams",t.VKq(8,X,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("serials",e.Serial),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(2),t.hij("",e.Quantity," "),t.xp6(2),t.Oqu(e.UOMName)}}function Fo(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",16)(2,"h2"),t._UZ(3,"i",50),t._uU(4,"Note "),t.qZA()(),t._UZ(5,"div",51),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",e.data.Fulfillment.Note,t.oJD)}}function Lo(n,a){if(1&n&&(t.TgZ(0,"span")(1,"b"),t._uU(2,"Modified:"),t.qZA(),t._uU(3),t.ALo(4,"date"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.AsE(" ",t.xi3(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function Qo(n,a){if(1&n&&(t.TgZ(0,"div",52),t._UZ(1,"i",53),t.TgZ(2,"span")(3,"b"),t._uU(4," Created:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA(),t.YNc(7,Lo,5,5,"span",44),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.AsE(" ",t.xi3(6,3,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),t.xp6(2),t.Q6J("ngIf",null==e.data.CreatedInfo.Modified?null:e.data.CreatedInfo.Modified.Date)}}const ko=function(n,a){return{ID:n,Template:a}},Eo=function(n,a){return{ID:n,Template:a,Cost:1}};function Ro(n,a){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),t._UZ(4,"i",4),t._uU(5,"Print "),t.qZA(),t._UZ(6,"button",5),t.TgZ(7,"ul",6)(8,"li",7)(9,"a",8),t._uU(10,"Print with Cost"),t.qZA()()()(),t.YNc(11,Oo,4,0,"div",9),t.TgZ(12,"div",2),t.YNc(13,Ao,3,5,"a",10),t.YNc(14,So,3,0,"a",11),t.qZA()(),t.TgZ(15,"content")(16,"div",12)(17,"div",13)(18,"div",14)(19,"div",15)(20,"div",16)(21,"h2"),t._UZ(22,"i",17),t._uU(23,"Order "),t.TgZ(24,"small",18),t._uU(25),t.qZA()()(),t.TgZ(26,"div",19)(27,"table",20)(28,"tr")(29,"th"),t._uU(30,"Outlet"),t.qZA(),t.TgZ(31,"td"),t._uU(32,":"),t.qZA(),t.TgZ(33,"td"),t._uU(34),t.qZA()(),t.TgZ(35,"tr")(36,"th"),t._uU(37,"Invoice"),t.qZA(),t.TgZ(38,"td"),t._uU(39,":"),t.qZA(),t.TgZ(40,"td")(41,"a",21),t._uU(42),t.qZA(),t._uU(43),t.ALo(44,"date"),t.qZA()()()()(),t.YNc(45,Po,17,8,"div",22),t.TgZ(46,"div",15)(47,"div",16)(48,"h2"),t._UZ(49,"i",23),t._uU(50,"Fulfillment "),t.qZA()(),t.TgZ(51,"div",19)(52,"table",20)(53,"tr")(54,"th"),t._uU(55,"Outlet"),t.qZA(),t.TgZ(56,"td"),t._uU(57,":"),t.qZA(),t.TgZ(58,"td"),t._uU(59),t.qZA()(),t.TgZ(60,"tr")(61,"th"),t._uU(62,"Date"),t.qZA(),t.TgZ(63,"td"),t._uU(64,":"),t.qZA(),t.TgZ(65,"td"),t._uU(66),t.ALo(67,"date"),t.qZA()(),t.TgZ(68,"tr")(69,"th"),t._uU(70,"Number"),t.qZA(),t.TgZ(71,"td"),t._uU(72,":"),t.qZA(),t.TgZ(73,"td"),t._uU(74),t.qZA()(),t.TgZ(75,"tr")(76,"th"),t._uU(77,"Courier"),t.qZA(),t.TgZ(78,"td"),t._uU(79,":"),t.qZA(),t.TgZ(80,"td"),t._uU(81),t.qZA()()()()()(),t.TgZ(82,"div",24)(83,"div",15)(84,"div",16)(85,"h2"),t._UZ(86,"i",25),t._uU(87,"Products "),t.qZA()(),t.TgZ(88,"div",19)(89,"table",26)(90,"thead",27)(91,"tr")(92,"th",28),t._uU(93,"No."),t.qZA(),t.TgZ(94,"th"),t._uU(95,"Products"),t.qZA(),t.TgZ(96,"th",29),t._uU(97,"Qty"),t.qZA()()(),t.TgZ(98,"tbody"),t.YNc(99,Jo,14,10,"tr",30),t.qZA(),t.TgZ(100,"tfoot",31)(101,"tr")(102,"td",32),t._uU(103,"Total"),t.qZA(),t.TgZ(104,"td",33),t._uU(105),t.ALo(106,"sum"),t.qZA()()()()()(),t.YNc(107,Fo,6,1,"div",22),t.qZA(),t.TgZ(108,"div",34),t.YNc(109,Qo,8,6,"div",35),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(3),t.Q6J("queryParams",t.WLB(31,ko,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(6),t.Q6J("queryParams",t.WLB(34,Eo,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(2),t.Q6J("ngIf",e.roleService.logistic.Edit),t.xp6(1),t.Q6J("ngIf",e.roleService.logistic.Delete),t.xp6(11),t.hij(" (",e.data.Fulfillment.Status,") "),t.xp6(9),t.Oqu(e.data.Order.OutletName),t.xp6(7),t.Q6J("queryParams",t.VKq(37,X,e.data.Order.InvoiceID)),t.xp6(1),t.hij(" ",e.data.Order.Number," "),t.xp6(1),t.hij(" - ",t.xi3(44,22,e.data.Order.Date,"dd MMM yyyy")," "),t.xp6(2),t.Q6J("ngIf",null==e.data.Supplier?null:e.data.Supplier.ID),t.xp6(14),t.hij(" ",e.data.Fulfillment.OutletName," "),t.xp6(7),t.hij(" ",t.xi3(67,25,e.data.Fulfillment.Date,"dd MMM yyyy")," "),t.xp6(8),t.hij(" ",e.data.Fulfillment.Number," "),t.xp6(7),t.hij(" ",e.data.Fulfillment.Courier," "),t.xp6(18),t.Q6J("ngForOf",e.data.Items),t.xp6(6),t.hij("",t.xi3(106,28,e.data.Items,"Quantity")," "),t.xp6(2),t.Q6J("ngIf",null==e.data?null:e.data.Fulfillment.Note),t.xp6(2),t.Q6J("ngIf",!e.roleService.users.LogRestriction)}}let Yo=(()=>{class n extends M.n{constructor(e,i,o,l,p,I){super(e,"InboundLogistics/DetailInfo",null,null,i),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"roleService",void 0),this.csvConverter=o,this.router=l,this.toastr=p,this.roleService=I}preGetList(){this.pageData.Filter.ID=this.route.snapshot.queryParams.ID}postInit(e){e.Items=e.Items.filter(i=>0!=i.Quantity),this.menuData.H=`Inbound Logistics #${e.Fulfillment.Number}`}deleteData(){confirm("Are you sure you want to delete selected record/s?")&&this.httpService.post("/API/InboundLogistics/DeleteInfo",JSON.stringify(this.data.Fulfillment.ID)).subscribe(e=>{this.toastr.success(e.Message,T.n.Success),this.router.navigate(["/menu/Logistics/Archive/Inbound_Logistics"])})}export(e,i){this.httpService.post(`/api/${e}`,JSON.stringify(this.route.snapshot.queryParams.ID)).subscribe(o=>{this.csvConverter.convertToCSV(o,i)})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(Z.O),t.Y36(c.F0),t.Y36(v._W),t.Y36(O.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-supplier-delivery-info"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn-group","me-5"],["routerLink","/print/InDelivery",1,"btn","btn-outline-secondary",2,"float","left",3,"queryParams"],[1,"fa-solid","fa-print","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],[1,"dropdown-item"],["routerLink","/print/InDelivery",3,"queryParams"],["class","btn-group me-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-muted","h6"],[1,"card-body"],[1,"table-sm","table-borderless"],["target","_blank","routerLink","/menu/Orders/Orders/Supplier_Bill/Info",3,"queryParams"],["class","card",4,"ngIf"],[1,"fa-solid","fa-truck","me-5"],[1,"col-8"],[1,"fa-solid","fa-box","me-5"],[1,"table"],[1,"thead-light"],[2,"width","40px"],[2,"width","50px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end","empty-column","fw-bold"],[1,"text-center","empty-column","fw-bold"],[1,"col-12"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",2,"float","left",3,"click"],[1,"fas","fa-upload","me-3"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"fa-solid","fa-address-card","me-5"],["target","_blank",3,"routerLink","queryParams"],[4,"ngIf"],[3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],[3,"serials"],[1,"text-center"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body",3,"innerHTML"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(e,i){1&e&&t.YNc(0,Ro,110,39,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,b.p,Y.B,d.uU,N.qU]})),n})();function Ho(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",16),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.httpPostListID("TransferOrder/RemoveCourier"))}),t._UZ(1,"i",17),t._uU(2,"Delete "),t.qZA()}}function Vo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",21),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.selected=o)}),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.Q6J("ngModel",e.selected)}}const ft=function(){return["/menu/Logistics/Setup/Courier/Form"]},St=function(n){return{ID:n}};function Ko(n,a){if(1&n&&(t.TgZ(0,"a",22)(1,"s"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().$implicit;t.Q6J("routerLink",t.DdM(3,ft))("queryParams",t.VKq(4,St,e.ID)),t.xp6(2),t.hij(" ",e.Name," ")}}function Go(n,a){if(1&n&&(t.TgZ(0,"a",22),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("routerLink",t.DdM(3,ft))("queryParams",t.VKq(4,St,e.ID)),t.xp6(1),t.hij(" ",e.Name," ")}}function Bo(n,a){if(1&n&&(t.TgZ(0,"tr",18)(1,"td"),t.YNc(2,Vo,1,1,"input",19),t.qZA(),t.TgZ(3,"td"),t.YNc(4,Ko,3,6,"a",20),t.YNc(5,Go,2,6,"a",20),t.qZA()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngIf",i.roleService.logistic.Delete),t.xp6(2),t.Q6J("ngIf",e.Bin),t.xp6(1),t.Q6J("ngIf",!e.Bin)}}function jo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",23),t.NdJ("page",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onPaginationChange(o))}),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 $o(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=o)})("onSubmit",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Ho,3,0,"a",2),t.TgZ(3,"a",3),t._uU(4,"Add"),t.qZA()(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Status"),t.qZA(),t.TgZ(11,"radio-options",6),t.NdJ("modelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Bin=o)}),t.qZA()()()()(),t.TgZ(12,"content")(13,"div",7)(14,"div",8)(15,"table",9)(16,"thead",10)(17,"tr")(18,"th",11)(19,"input",12),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.onSelectAllData(o.target.checked))}),t.qZA()(),t.TgZ(20,"th"),t._uU(21,"Name"),t.qZA()()(),t.TgZ(22,"tbody"),t.YNc(23,Bo,6,3,"tr",13),t.qZA()()(),t.TgZ(24,"div",14),t.YNc(25,jo,1,3,"mat-paginator",15),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.getSelectedData().length>0),t.xp6(1),t.Q6J("routerLink",t.DdM(8,ft)),t.xp6(8),t.Q6J("model",e.pageData.Filter.Bin)("options",e.radioOption),t.xp6(12),t.Q6J("ngForOf",e.data.Data),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}let Wo=(()=>{class n extends M.n{constructor(e,i,o){super(e,"TransferOrder/GetCourierList","TransferOrderLoader/GetCourierListLoader",i),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"radioOption",void 0),this.roleService=o,this.radioOption=[{Key:!1,Value:"Suspended"},{Key:!0,Value:"Active"},{Key:null,Value:"All"}]}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(v._W),t.Y36(O.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-courier"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","text","textChange","onSubmit",4,"ngIf"],[3,"pageData","text","textChange","onSubmit"],["value","Delete","matTooltipPosition","above","matTooltip","Delete","class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"button","btn","btn-success",3,"routerLink"],[1,"d-flex"],["container",""],["name","CourierStatus",3,"model","options","modelChange"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","14px"],["type","checkbox",3,"change"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"mt-2"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],["value","Delete","matTooltipPosition","above","matTooltip","Delete",1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fas","fa-trash","me-3"],[1,"border-bottom"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[3,"routerLink","queryParams",4,"ngIf"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"routerLink","queryParams"],[3,"length","pageSize","pageIndex","page"]],template:function(e,i){1&e&&t.YNc(0,$o,26,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.Wl,_.JJ,_.On,b.p,gt.P,S.gM]})),n})();var tt=s(88651),ht=s(71948);function zo(n,a){1&n&&(t.TgZ(0,"span",19),t._uU(1,"name required"),t.qZA())}const Xo=function(){return["/menu/Logistics/Setup/Courier"]};function ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onSubmit("TransferOrder/UpdateCourierList"))}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h3"),t._uU(13,"General"),t.qZA()(),t.TgZ(14,"div",9)(15,"div",5)(16,"div",10)(17,"div",11)(18,"input",12,13),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.formData.Name=o)}),t.qZA(),t.TgZ(20,"label"),t._uU(21,"Name"),t.qZA(),t.YNc(22,zo,2,0,"span",14),t.qZA()(),t.TgZ(23,"div",10)(24,"div",11)(25,"div",15)(26,"label"),t._uU(27,"Suspend"),t.qZA(),t.TgZ(28,"mat-radio-group",16),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.formData.Bin=o)}),t.TgZ(29,"mat-radio-button",17),t._uU(30,"Yes"),t.qZA(),t.TgZ(31,"mat-radio-button",18),t._uU(32," No "),t.qZA()()()()()()()()()()()()()}if(2&n){const e=t.MAs(19),i=t.oxw();t.Q6J("pageData",i.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(10,Xo)),t.xp6(2),t.Q6J("disabled",!i.formData.Name),t.xp6(14),t.Q6J("ngModel",i.formData.Name),t.xp6(4),t.Q6J("ngIf",e.invalid&&(e.dirty||e.touched)),t.xp6(6),t.Q6J("ngModel",i.formData.Bin),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}let ea=(()=>{class n extends tt.U{constructor(e,i,o,l){super(e,"TransferOrderLoader/CourierFormInitial",i),(0,r.Z)(this,"toaster",void 0),(0,r.Z)(this,"router",void 0),this.toaster=o,this.router=l}postBindForm(){u.gT.IsEmpty(this.formData.Name)&&(this.formData.Name="")}onSubmitSuccess(e){this.toaster.success("Success add new courier",T.n.Success),this.router.navigate(["/menu/Logistics/Setup/Courier"])}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(v._W),t.Y36(c.F0))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-courier-form"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"disabled","click"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],[1,"form-floating-outline"],["type","text","autofocus","","required","","name","Name","id","Name","placeholder","Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["class","control-label","style","color:red;",4,"ngIf"],[1,"form-floating-outline","radio","border","rounded"],["aria-label","Select an option",3,"ngModel","ngModelChange"],[3,"value"],[1,"ps-3","mt-4",3,"value"],[1,"control-label",2,"color","red"]],template:function(e,i){1&e&&t.YNc(0,ta,33,11,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.formData&&null!=i.formData.Name)},dependencies:[d.O5,c.rH,_.Fj,_.JJ,_.Q7,_.On,ht.VQ,ht.U0,b.p]})),n})();var na=s(22863),ia=s(11989),G=s(94768),E=s(54850),xt=s(77579),qt=s(39841),et=s(82722),nt=s(24351),oa=s(18505),Nt=s(54004),it=s(23945);let aa=(()=>{class n{constructor(e,i,o){(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"storage",void 0),(0,r.Z)(this,"config",new q.O),(0,r.Z)(this,"order",void 0),(0,r.Z)(this,"DeliveryTypes",Array()),this.dialogRef=e,this.storage=i,this.config=new q.O,this.config.title="Notes",this.config.customWidth="300px",this.order=o.deliveryData.Order,this.DeliveryTypes=this.storage.Data.DeliveryTypes}onClose(){this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.so),t.Y36(it.O),t.Y36(g.WI))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-delivery-note"]],decls:6,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],[1,"mb-3"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModel","items","ngModelChange"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onClose()})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"h6",2),t._uU(4,"Type"),t.qZA(),t.TgZ(5,"ng-select",3),t.NdJ("ngModelChange",function(l){return i.order.TypeID=l}),t.qZA()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(5),t.Q6J("ngModel",i.order.TypeID)("items",i.DeliveryTypes))},dependencies:[w.M,_.JJ,_.On,C.w9],styles:["ng-dropdown-panel.outlet-multiple[_ngcontent-%COMP%]{z-index:1100}"]})),n})();var ot=s(50),B=s(26111);let ra=(()=>{class n{constructor(e,i,o,l,p){(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"_backEndService",void 0),(0,r.Z)(this,"cartItemService",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"config",new q.O),(0,r.Z)(this,"EntityID",void 0),this.dialogRef=e,this.data=i,this._backEndService=o,this.cartItemService=l,this.toastr=p,this.config=new q.O,this.config.title="Empty outlet Inventory?",this.config.customWidth="500px",this.EntityID=this.data}onOk(){if(u.gT.IsEmpty(this.EntityID))return this.toastr.error("Please select outlet before proceeding..",T.n.Error),void this.onClose();this._backEndService.clearOutlet(this.EntityID).subscribe(e=>{this.cartItemService.updateCartItem(e),0==e.length&&this.toastr.error("Stock is empty",T.n.Error),this.onClose()})}onClose(){this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.so),t.Y36(g.WI),t.Y36(ot.M),t.Y36(B.N),t.Y36(v._W))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-empty-outlet"]],decls:4,vars:1,consts:[[3,"config","onOk","onCancel","onClose"],[1,"fw-normal"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),t.TgZ(1,"content")(2,"h4",1),t._uU(3,"This will populate cart with all inventory from source outlet!"),t.qZA()()()),2&e&&t.Q6J("config",i.config)},dependencies:[w.M]})),n})();var wt=s(47634),Pt=s(29677),la=s(31906);let ca=(()=>{class n{constructor(e,i){(0,r.Z)(this,"_backEndService",void 0),(0,r.Z)(this,"_dialogRef",void 0),(0,r.Z)(this,"Courier",void 0),(0,r.Z)(this,"config",new q.O),this._backEndService=e,this._dialogRef=i,this.config=new q.O,this.config.title="New Courier",this.config.customWidth="500px"}onOk(){u.gT.IsEmpty(this.Courier)?alert("Please enter courier"):this._backEndService.updateCourierList(this.Courier).subscribe(e=>{this._dialogRef.close({ID:e.ID,Name:this.Courier,Message:e.Message})})}onClose(){this._dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(ot.M),t.Y36(g.so))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-courier"]],decls:8,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","placeholder","Add New Courier",1,"form-control",3,"ngModel","ngModelChange"],["for","bewCourier"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"input",4),t.NdJ("ngModelChange",function(l){return i.Courier=l}),t.qZA(),t.TgZ(6,"label",5),t._uU(7,"Add New Courier"),t.qZA()()()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(5),t.Q6J("ngModel",i.Courier))},dependencies:[w.M,_.Fj,_.JJ,_.On]})),n})();var Ut=s(86751),sa=s(29990),Ct=s(98818),Zt=s(50494),vt=s(54825),Jt=s(78639);const da=["quantity"],Tt=function(n){return{selected:n}};function pa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",5),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onTabChange(o.modalItemState.INVENTORY))}),t._uU(1," Product "),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Tt,e.modalItemState.INVENTORY==e.currentTabState))}}function _a(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",6),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onTabChange(o.modalItemState.SERIAL))}),t._uU(2," Serial "),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(1,Tt,e.modalItemState.SERIAL==e.currentTabState))}}function ma(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"div",16)(2,"autocompleteV2",18),t.NdJ("onSelect",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.addItem(o))}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("clearOnSelect",!0)("inputTextValue",null==e.item||null==e.item.Variant?null:e.item.Variant.Name)}}function ua(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",19,20),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Quantity=o)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("disabled",!0)("ngModel",e.item.Quantity)}}function ga(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",21,20),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Quantity=o)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("ngModel",e.item.Quantity)}}function fa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",22)(1,"strong"),t._uU(2,"Discount (%)"),t.qZA(),t.TgZ(3,"input",21),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Discount=o)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Discount)}}function ha(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",23)(1,"strong"),t._uU(2,"Price"),t.qZA(),t.TgZ(3,"input",21),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Price=o)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Price)}}function xa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",23)(1,"strong"),t._uU(2,"Cost"),t.qZA(),t.TgZ(3,"input",21),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Cost=o)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Cost)}}function Ca(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",7),t.YNc(2,ma,3,2,"div",8),t.TgZ(3,"div",9)(4,"div",10)(5,"strong"),t._uU(6,"Qty"),t.qZA(),t.YNc(7,ua,2,2,"input",11),t.YNc(8,ga,2,1,"ng-template",null,12,t.W1O),t.qZA(),t.YNc(10,fa,4,1,"div",13),t.YNc(11,ha,4,1,"div",14),t.YNc(12,xa,4,1,"div",14),t.qZA(),t.TgZ(13,"div",15)(14,"div",16)(15,"POS-tinymce-editor",17),t.NdJ("valueChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.item.Note=o)}),t.qZA()()()(),t.BQk()}if(2&n){const e=t.MAs(9),i=t.oxw();t.xp6(2),t.Q6J("ngIf",!i.isEdit),t.xp6(5),t.Q6J("ngIf",i.isEditDelivery&&4==(null==i.item||null==i.item.Variant?null:i.item.Variant.TypeID))("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",i.priceVisible),t.xp6(1),t.Q6J("ngIf",i.priceVisible),t.xp6(1),t.Q6J("ngIf",i.costVisible&&i.costRole),t.xp6(3),t.Q6J("value",i.item.Note)}}function Za(n,a){1&n&&(t.ynx(0),t._UZ(1,"i",44),t.TgZ(2,"h6"),t._uU(3,"No Image"),t.qZA(),t.BQk())}function va(n,a){if(1&n&&t._UZ(0,"img",45),2&n){const e=t.oxw(2);t.Q6J("src",e.item.Variant.ThumbnailUrl,t.LSH)}}function Ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",46),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.setQuantityToMax())}),t._uU(1," Place Order "),t.qZA()}}const ba=function(){return["/menu/Products/Catalog/Variants/Info"]},Da=function(n){return{ID:n}};function ya(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",24)(2,"div",25)(3,"a",26),t.YNc(4,Za,4,0,"ng-container",27),t.YNc(5,va,1,1,"ng-template",null,28,t.W1O),t.qZA()(),t.TgZ(7,"div",29)(8,"table",30)(9,"tbody")(10,"tr")(11,"th",31),t._UZ(12,"i",32),t._uU(13,"Inventory"),t.qZA(),t.TgZ(14,"th",31),t._UZ(15,"i",33),t._uU(16),t.qZA(),t.TgZ(17,"th",31),t._UZ(18,"i",34),t._uU(19),t.qZA(),t.TgZ(20,"th",31),t._UZ(21,"i",35),t._uU(22," Diff"),t.qZA(),t.TgZ(23,"th",31),t._UZ(24,"i",36),t._uU(25," Action"),t.qZA()(),t.TgZ(26,"tr")(27,"th",37),t._uU(28," On Hand "),t.qZA(),t.TgZ(29,"td",38),t._uU(30),t.ALo(31,"number"),t.qZA(),t.TgZ(32,"td",38),t._uU(33),t.ALo(34,"number"),t.qZA(),t._UZ(35,"td",39)(36,"td",40),t.qZA(),t.TgZ(37,"tr")(38,"th",37),t._uU(39," Allocated "),t.qZA(),t.TgZ(40,"td",38),t._uU(41),t.ALo(42,"number"),t.qZA(),t.TgZ(43,"td",38),t._uU(44),t.ALo(45,"number"),t.qZA()(),t.TgZ(46,"tr")(47,"th",37),t._uU(48,"Available"),t.qZA(),t.TgZ(49,"td",38),t._uU(50),t.ALo(51,"number"),t.qZA(),t.TgZ(52,"td",38),t._uU(53),t.ALo(54,"number"),t.qZA()(),t.TgZ(55,"tr")(56,"th",37),t._uU(57,"ROP"),t.qZA(),t.TgZ(58,"td",38),t._uU(59),t.ALo(60,"number"),t.qZA(),t.TgZ(61,"td",38),t._uU(62),t.ALo(63,"number"),t.qZA(),t.TgZ(64,"td",41),t._uU(65),t.ALo(66,"number"),t.qZA()(),t.TgZ(67,"tr")(68,"th",37),t._uU(69,"Max"),t.qZA(),t.TgZ(70,"td",38),t._uU(71),t.ALo(72,"number"),t.qZA(),t.TgZ(73,"td",38),t._uU(74),t.ALo(75,"number"),t.qZA(),t.TgZ(76,"td",42),t._uU(77),t.ALo(78,"number"),t.qZA(),t.TgZ(79,"td"),t.YNc(80,Ta,2,0,"button",43),t.qZA()()()()()(),t.BQk()),2&n){const e=t.MAs(6),i=t.oxw();t.xp6(3),t.Q6J("routerLink",t.DdM(45,ba))("queryParams",t.VKq(46,Da,null==i.item||null==i.item.Variant?null:i.item.Variant.ID)),t.xp6(1),t.Q6J("ngIf",null==(null==i.item||null==i.item.Variant?null:i.item.Variant.ThumbnailUrl))("ngIfElse",e),t.xp6(12),t.Oqu(i.outletSourceName),t.xp6(3),t.Oqu(i.outletDestinationName),t.xp6(11),t.hij(" ",t.lcZ(31,21,i.sourceOnHand)," "),t.xp6(3),t.hij(" ",t.lcZ(34,23,i.destinationOnHand)," "),t.xp6(8),t.hij(" ",t.lcZ(42,25,i.sourceAllocated)," "),t.xp6(3),t.hij(" ",t.lcZ(45,27,i.destinationAllocated)," "),t.xp6(6),t.hij(" ",t.lcZ(51,29,i.sourceOnHand-i.sourceAllocated)," "),t.xp6(3),t.hij(" ",t.lcZ(54,31,i.destinationOnHand-i.destinationAllocated)," "),t.xp6(6),t.Oqu(t.lcZ(60,33,i.sourceRop)),t.xp6(3),t.hij(" ",t.lcZ(63,35,i.destinationRop)," "),t.xp6(3),t.AsE(" ",i.destinationRopDiff>=0?"+":"","",t.lcZ(66,37,i.destinationRopDiff),""),t.xp6(6),t.Oqu(t.lcZ(72,39,i.sourceMax)),t.xp6(3),t.hij(" ",t.lcZ(75,41,i.destinationMax)," "),t.xp6(3),t.AsE(" ",i.destinationMaxDiff>=0?"+":"","",t.lcZ(78,43,i.destinationMaxDiff),""),t.xp6(3),t.Q6J("ngIf",!i.item.isMaxInventory)}}function Ia(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-item-serial",47),t.NdJ("cartItemChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.item=o)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("entityId",e.entityID)("cartItem",e.item)("disabled",e.isEditDelivery)}}let Ft=(()=>{class n{constructor(e,i,o,l,p,I,L){(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"cartItemService",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"backendService",void 0),(0,r.Z)(this,"firstLoadService",void 0),(0,r.Z)(this,"_quantityElement",void 0),(0,r.Z)(this,"guidEmpty",u.gT.GuidEmpty),(0,r.Z)(this,"config",void 0),(0,r.Z)(this,"item",void 0),(0,r.Z)(this,"isEdit",!1),(0,r.Z)(this,"isEditDelivery",void 0),(0,r.Z)(this,"priceVisible",void 0),(0,r.Z)(this,"priceRestriction",void 0),(0,r.Z)(this,"extraTitle",void 0),(0,r.Z)(this,"toggleInventory",void 0),(0,r.Z)(this,"entityID",void 0),(0,r.Z)(this,"destinationOnHand",void 0),(0,r.Z)(this,"destinationAllocated",void 0),(0,r.Z)(this,"destinationRop",void 0),(0,r.Z)(this,"destinationMax",void 0),(0,r.Z)(this,"destinationRopDiff",void 0),(0,r.Z)(this,"destinationMaxDiff",void 0),(0,r.Z)(this,"outletDestinationName",void 0),(0,r.Z)(this,"sourceOnHand",void 0),(0,r.Z)(this,"sourceAllocated",void 0),(0,r.Z)(this,"sourceRop",void 0),(0,r.Z)(this,"sourceMax",void 0),(0,r.Z)(this,"outletSourceName",void 0),(0,r.Z)(this,"showInventory",!1),(0,r.Z)(this,"costVisible",void 0),(0,r.Z)(this,"costRole",void 0),(0,r.Z)(this,"modalItemState",Ct.Y),(0,r.Z)(this,"currentTabState",void 0),(0,r.Z)(this,"constants",u.gT),(0,r.Z)(this,"inventoryView",void 0),(0,r.Z)(this,"isSerialItem",void 0),this.httpService=e,this.data=i,this.dialogRef=o,this.cartItemService=l,this.toastr=p,this.backendService=I,this.firstLoadService=L,this.config=new q.O,this.currentTabState=Ct.Y.INPUT,this.priceVisible=i.priceVisible,this.priceRestriction=i.priceRestriction,this.entityID=i.entityID,this.isEditDelivery=i.isEditDelivery,this.costVisible=i.costVisible,this.costRole=i.costRole,this.inventoryView=i.inventoryView,u.gT.IsNotEmpty(i.itemInfo)?(this.isEdit=!0,this.item=(0,Zt.yE)(G.t,this.data.itemInfo.item),this.config.title=this.item.Variant.Name,null!=this.item.Variant.Ordered&&(this.extraTitle=` Inventory: ${this.item.Variant.UnitsInStock}, Allocated: ${this.item.Variant.Ordered}`,this.toggleInventory=!0),this.isSerialItem=this.item.isSerialType()):(this.item=new G.t,this.item.Quantity=null,this.config.title="Add Item"),this.config.customWidth="725px",this.initOutletName()}initOutletName(){if(this.data.entityDestination){let l=this.firstLoadService.Data.DestinationEntities.find(p=>p.ID==this.data.entityDestination.ID);l&&(this.outletDestinationName=l.Name)}const i=this.firstLoadService.Data.Entities.find(o=>o.ID==this.data.entityID);i&&(this.outletSourceName=i.Name)}fillSerial(){this.item.Serial=[],this.httpService.post("/api/catalog/variant/GetVariantSerial",JSON.stringify({entityID:this.data.entityID,soID:u.gT.GuidEmpty,variantID:this.item.VariantID})).subscribe(i=>{this.item.Serial=i})}onOk(e){if("Enter"!=e){if(u.gT.IsNotEmpty(this.item.VariantID)){if(!this.item.checkMatchSerialWithQuantity())return void this.toastr.warning("Serial must be equal with the quantity","Warning!");this.checkWarningMaxInventory(),this.isEdit?this.cartItemService.updateItem({item:this.item,index:this.data.itemInfo.index}):this.cartItemService.addNewItem(this.item,!0)}this.dialogRef.close()}}checkWarningMaxInventory(){this.item.Quantity>this.sourceMax&&this.toastr.warning(sa.g.maxInventory,"Warning!")}addItem(e){this.cartItemService.getItemById(e,this.data.entityID).subscribe(i=>{this.item=i,this.item.Quantity=1,this.config.title=this.item.Variant.Name,this.isSerialItem=this.item.isSerialType(),this.isEditDelivery=!1,this.fillSerial(),this._quantityElement?.nativeElement?.focus()})}requestUnitInStock(){u.gT.IsEmpty(this.entityID)?this.toastr.error("Please select outlet before proceeding..",T.n.Error):this.httpService.post("/API/catalog/variant/GetInventoryByVariantID",JSON.stringify({id:this.item.Variant.ID,entityID:this.entityID})).subscribe(i=>{this.item.Variant.UnitsInStock=i.UnitsInStock,this.extraTitle=` Inventory: ${i.UnitsInStock}`,void 0!==i.Allocated&&(this.item.Variant.Ordered=i.Allocated,this.extraTitle+=`, Allocated: ${i.Allocated}`),this.toggleInventory=!0})}getDestinationInventory(){let e=this.item.VariantID;u.gT.IsNotEmpty(this.data.entityDestination)?this.backendService.getItemStock(e,this.data.entityDestination.ID).subscribe(o=>{if(o){this.showInventory=!0,this.destinationOnHand=o.OnHand,this.destinationAllocated=o.Allocated,this.destinationRop=o.ROP,this.destinationMax=o.Max;let l=this.destinationOnHand-this.destinationAllocated;this.destinationMaxDiff=this.destinationMax-l,this.destinationRopDiff=this.destinationRop-l}}):this.toastr.warning("Select the destination to view inventory detail","Warning")}getSourceInventory(){this.backendService.getItemStock(this.item.VariantID,this.data.entityID).subscribe(o=>{this.sourceOnHand=o.OnHand,this.sourceAllocated=o.Allocated,this.sourceMax=o.Max,this.sourceRop=o.ROP})}onTabChange(e){this.currentTabState=e,e==Ct.Y.INVENTORY&&!this.showInventory&&(this.getDestinationInventory(),this.getSourceInventory())}setQuantityToMax(){this.destinationMax>=this.destinationOnHand-this.destinationAllocated?(this.item.Quantity=this.destinationMaxDiff,this.item.isMaxInventory=!0,this.onOk("F2"),this.toastr.success("Qty adjusted to Max Inventory","Success")):this.toastr.warning("Your Inventory Available is more than Max Inventory","Warning")}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(g.WI),t.Y36(g.so),t.Y36(B.N),t.Y36(v._W),t.Y36(ot.M),t.Y36(it.O))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-item"]],viewQuery:function(e,i){if(1&e&&t.Gf(da,5),2&e){let o;t.iGM(o=t.CRH())&&(i._quantityElement=o.first)}},decls:11,vars:9,consts:[[3,"config","onOk","onCancel","onClose"],[1,"row","border-bottom"],["data-cy","input_sell",1,"btn","btn-link",3,"ngClass","click"],["class","btn btn-link","data-cy","product",3,"ngClass","click",4,"ngIf"],[4,"ngIf"],["data-cy","product",1,"btn","btn-link",3,"ngClass","click"],["data-cy","serial",1,"btn","btn-link",3,"ngClass","click"],[1,"container-fluid"],["class","row mt-5",4,"ngIf"],[1,"row","mt-5","w-100"],[1,"col-auto","mb-4","pe-0",2,"width","82px"],["type","text","class","w-100 form-control","autoNum","",3,"disabled","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["allowInputQty",""],["class","col-auto pe-0","style","width: 90px",4,"ngIf"],["class","col-auto pe-0","style","width: 112px",4,"ngIf"],[1,"row","mt-5"],[1,"col-12"],["height","220px",3,"value","valueChange"],["placeholder","Search product by name / code","requestUrl","/API/AC/GetVariantSuggestionByCodeNName",1,"input-left","w-100",3,"clearOnSelect","inputTextValue","onSelect"],["type","text","autoNum","",1,"w-100","form-control",3,"disabled","ngModel","ngModelChange"],["quantity",""],["type","text","autoNum","",1,"w-100","form-control",3,"ngModel","ngModelChange"],[1,"col-auto","pe-0",2,"width","90px"],[1,"col-auto","pe-0",2,"width","112px"],[1,"row","mt-6"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-muted"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],["SHOW_IMAGE",""],[1,"col-sm-8"],[1,"table","table-bordered","text-center","inventory-table","w-auto"],[1,"bg-light-orange"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-house","fa-solid","fa-1x","me-2"],["aria-hidden","true",1,"fa","fa-truck","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-plus-minus","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-sliders","fa-1x","me-2"],[1,"table-light","text-start"],[1,"text-end"],["rowspan","3",1,"table-light"],["rowspan","4",1,"table-light"],[1,"text-danger"],[1,"text-success"],["style","font-size: 12px;","type","button","class","btn btn-success btn-sm me-2","matTooltipPosition","above","matTooltip","Adjust Bought Qty to max Inventory",3,"click",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],["type","button","matTooltipPosition","above","matTooltip","Adjust Bought Qty to max Inventory",1,"btn","btn-success","btn-sm","me-2",2,"font-size","12px",3,"click"],[3,"entityId","cartItem","disabled","cartItemChange"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(l){return i.onOk(l)})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div")(4,"a",2),t.NdJ("click",function(){return i.onTabChange(i.modalItemState.INPUT)}),t._uU(5," Cart "),t.qZA(),t.YNc(6,pa,2,3,"a",3),t.YNc(7,_a,3,3,"ng-container",4),t.qZA()(),t.YNc(8,Ca,16,7,"ng-container",4),t.YNc(9,ya,81,48,"ng-container",4),t.YNc(10,Ia,2,3,"ng-container",4),t.qZA()()),2&e&&(t.Q6J("config",i.config),t.xp6(4),t.Q6J("ngClass",t.VKq(7,Tt,i.modalItemState.INPUT==i.currentTabState)),t.xp6(2),t.Q6J("ngIf",(null==i.item||null==i.item.Variant?null:i.item.Variant.Name)&&i.inventoryView),t.xp6(1),t.Q6J("ngIf",i.isSerialItem),t.xp6(1),t.Q6J("ngIf",i.modalItemState.INPUT==i.currentTabState),t.xp6(1),t.Q6J("ngIf",i.modalItemState.INVENTORY==i.currentTabState),t.xp6(1),t.Q6J("ngIf",i.modalItemState.SERIAL==i.currentTabState))},dependencies:[d.mk,d.O5,w.M,c.rH,_.Fj,_.JJ,_.On,k.J,K.b,vt.V,S.gM,Jt.t,d.JJ],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px,#f5c6cb 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#28a745,#28a745 15px,#a2dbb0 15px,#a2dbb0 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}"]})),n})();var Lt=s(78068),Qt=s(94601);const Oa=["serialInput"];let Ma=(()=>{class n{constructor(e,i,o,l){(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"cartItemService",void 0),(0,r.Z)(this,"serialInputEl",void 0),(0,r.Z)(this,"modalConfig",new q.O),(0,r.Z)(this,"serial",void 0),this.data=e,this.dialogRef=i,this.toastr=o,this.cartItemService=l,this.modalConfig.title="Scan Serial",this.modalConfig.customWidth="350px",this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}ngOnInit(){}onKeyDown(e){"Enter"==e.key&&(u.gT.IsNotEmpty(this.serial)?(this.cartItemService.addCartItemBySerial(this.serial,this.data.entityID),this.serial=null):this.toastr.warning("Serial Can`t be empty","Warning!"),this.setFocusInput())}setFocusInput(){this.serialInputEl&&setTimeout(()=>{this.serialInputEl?.nativeElement?.focus()},500)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so),t.Y36(v._W),t.Y36(B.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["app-modal-scan-serial"]],viewQuery:function(e,i){if(1&e&&t.Gf(Oa,5),2&e){let o;t.iGM(o=t.CRH())&&(i.serialInputEl=o.first)}},decls:7,vars:2,consts:[[3,"config","onClose"],[1,"input-group","mt-3"],["type","text","placeholder","Input Product By Serial","aria-label","Serial",1,"form-control",3,"ngModel","ngModelChange","keydown"],["serialInput",""],[1,"input-group-text"],[1,"fa-solid","fa-barcode","fs-4"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"input",2,3),t.NdJ("ngModelChange",function(l){return i.serial=l})("keydown",function(l){return i.onKeyDown(l)}),t.qZA(),t.TgZ(5,"span",4),t._UZ(6,"i",5),t.qZA()()()()),2&e&&(t.Q6J("config",i.modalConfig),t.xp6(3),t.Q6J("ngModel",i.serial))},dependencies:[w.M,_.Fj,_.JJ,_.On],styles:["input[_ngcontent-%COMP%]{height:55px;border-bottom-left-radius:4px;border-top-left-radius:4px}span.input-group-text[_ngcontent-%COMP%]{border-bottom-right-radius:4px;border-top-right-radius:4px}"]})),n})();var Aa=s(26128),Sa=s(245),qa=s(241),kt=s(42011);function Na(n,a){if(1&n&&(t.TgZ(0,"span",19),t._uU(1),t.qZA()),2&n){const e=a.item;t.Q6J("matTooltip",e.Name),t.xp6(1),t.Oqu(e.Name)}}function wa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.openOutletModal())}),t._UZ(2,"i",3)(3,"input",4),t.ALo(4,"limitTo"),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"i",6),t.TgZ(7,"ng-select",7),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.DestinationEntityID=o)})("change",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onSelectDestination())}),t.YNc(8,Na,2,2,"ng-template",8),t.qZA()(),t.TgZ(9,"div",9)(10,"datepicker",10),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.Date=o)}),t.qZA()(),t.TgZ(11,"div",11),t._UZ(12,"i",12),t.TgZ(13,"input",13),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.Number=o)}),t.qZA()(),t.TgZ(14,"div",14),t._UZ(15,"i",15),t.TgZ(16,"ng-select",16),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.CourierID=o)}),t.qZA(),t.TgZ(17,"a",17),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.openCourierModal())}),t._UZ(18,"i",18),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("value",t.xi3(4,10,e.outletName,20))("placeholder",e.outletName),t.xp6(4),t.Q6J("disabled",e.isEdit&&!e.isVoid)("ngModel",e.deliveryData.Order.DestinationEntityID)("items",e.entities),t.xp6(3),t.Q6J("disabled",!e.dateEditor)("date",e.deliveryData.Order.Date),t.xp6(3),t.Q6J("ngModel",e.deliveryData.Order.Number),t.xp6(3),t.Q6J("ngModel",e.deliveryData.Order.CourierID)("items",e.couriers)}}let Pa=(()=>{class n{constructor(){(0,r.Z)(this,"onOpenOutletModal",new t.vpe),(0,r.Z)(this,"onOpenCourierModal",new t.vpe),(0,r.Z)(this,"selectDestination",new t.vpe),(0,r.Z)(this,"deliveryData",void 0),(0,r.Z)(this,"outletName",void 0),(0,r.Z)(this,"couriers",void 0),(0,r.Z)(this,"entities",void 0),(0,r.Z)(this,"isEdit",void 0),(0,r.Z)(this,"isVoid",void 0),(0,r.Z)(this,"dateEditor",void 0)}openOutletModal(){this.onOpenOutletModal.emit()}openCourierModal(){this.onOpenCourierModal.emit()}onSelectDestination(){this.selectDestination.emit()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-toolbar"]],inputs:{deliveryData:"deliveryData",outletName:"outletName",couriers:"couriers",entities:"entities",isEdit:"isEdit",isVoid:"isVoid",dateEditor:"dateEditor"},outputs:{onOpenOutletModal:"onOpenOutletModal",onOpenCourierModal:"onOpenCourierModal",selectDestination:"selectDestination"},decls:1,vars:1,consts:[["class","row g-0 py-4",4,"ngIf"],[1,"row","g-0","py-4"],[1,"col-auto","home","me-3",3,"click"],["matTooltipPosition","above","matTooltip","Outlet",1,"fa-solid","fa-house"],["readonly","",1,"outlet","cursor",3,"value","placeholder"],[1,"ms-0","col-auto","truck","date","d-flex"],[1,"fa","fa-truck","ps-2"],["bindLabel","Name","bindValue","ID","placeholder","Choose a destination",1,"outlet-multiple",3,"disabled","ngModel","items","ngModelChange","change"],["ng-option-tmp",""],[1,"col-auto","date","datepicker","me-3"],["appearance","fill","name","orderDate",3,"disabled","date","dateChange"],[1,"col-auto","number","me-3"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Order number",1,"fa-regular","fa-file-lines"],["type","text","placeholder","Transfer Order Number",1,"number",2,"width","135px",3,"ngModel","ngModelChange"],[1,"ms-0","col-auto","date","d-flex"],["matTooltipPosition","above","matTooltip","Outlet",1,"fa","fa-user","ps-2"],["bindLabel","Name","bindValue","ID","placeholder","Choose a courier",1,"outlet-multiple",3,"ngModel","items","ngModelChange"],["matTooltipPosition","above","matTooltip","Add new Courier?",1,"ms-5","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-circle-plus"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){1&e&&t.YNc(0,wa,19,13,"div",0),2&e&&t.Q6J("ngIf",i.deliveryData)},dependencies:[d.O5,_.Fj,_.JJ,_.On,y.QB,C.w9,C.ir,S.gM,N.OI],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px,#f5c6cb 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#28a745,#28a745 15px,#a2dbb0 15px,#a2dbb0 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:3px!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex{background-color:#e9ecef!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex input{opacity:1!important;color:#00000061!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field{padding-right:0!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field .mat-mdc-text-field-wrapper{padding-bottom:0;background-color:#fff;padding-left:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-flex{width:147px;height:35px;border:1px solid rgb(207,207,207);margin-left:40px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix{border:none!important;top:5px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix input{font-size:14px;color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:4px;padding-bottom:4px;padding-left:8px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix{position:relative;left:-140px;top:1px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix .mat-mdc-button-persistent-ripple{color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix button.mat-mdc-icon-button.mat-mdc-button-base{padding:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mdc-line-ripple{display:none}.date[_ngcontent-%COMP%] datepicker.date-warnings[_ngcontent-%COMP%] .mat-mdc-form-field-flex{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px,#f9e79f 30px)!important}.col-auto[_ngcontent-%COMP%]{font-size:.875rem;height:-moz-fit-content;height:fit-content}.col-auto[_ngcontent-%COMP%]:last-child{margin-right:0}.col-auto[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.25rem;color:#3b3b3b;margin-right:5px;line-height:unset!important;position:relative;top:2px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .col-auto[_ngcontent-%COMP%] span.outlet[_ngcontent-%COMP%]{padding:4px 8px 3px 5px;border:1px solid #dddddd;font-size:.875rem}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:36px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background-color:#e9ecef!important;opacity:1!important;color:#00000061!important}.col-auto[_ngcontent-%COMP%] .outlet[_ngcontent-%COMP%]{width:165px;color:#337ab7;background:#ffffff}.col-auto[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:150px}.col-auto.customer[_ngcontent-%COMP%] autocomplete[_ngcontent-%COMP%] input{font-size:14px}.col-auto.sales[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] input{font-size:14px}.col-auto[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%]{width:150px}.header[_ngcontent-%COMP%]{border-bottom:1px solid #dde2eb}@media (max-width: 1190px){.home[_ngcontent-%COMP%], .truck[_ngcontent-%COMP%]{margin-right:0}.datepicker[_ngcontent-%COMP%]{margin-left:33px!important;margin-right:4px!important}.number[_ngcontent-%COMP%]{margin-right:0}}"]})),n})(),Ua=(()=>{class n{constructor(){(0,r.Z)(this,"onOpenEmptyModal",new t.vpe),(0,r.Z)(this,"onOpenDeliveryNoteModal",new t.vpe),(0,r.Z)(this,"onOpenVoidModal",new t.vpe),(0,r.Z)(this,"onSubmit",new t.vpe)}openEmptyModal(){this.onOpenEmptyModal.emit()}openDeliveryNoteModal(){this.onOpenDeliveryNoteModal.emit()}openVoidModal(){this.onOpenVoidModal.emit()}submit(){this.onSubmit.emit()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-cart-action"]],outputs:{onOpenEmptyModal:"onOpenEmptyModal",onOpenDeliveryNoteModal:"onOpenDeliveryNoteModal",onOpenVoidModal:"onOpenVoidModal",onSubmit:"onSubmit"},decls:12,vars:0,consts:[[1,"mt-5","d-flex","action-button","justify-content-between"],[1,"btn","btn-gray",2,"height","60px",3,"click"],[1,"fa-solid","fa-cogs"],[1,"fa-solid","fa-note-sticky"],[1,"fa-solid","fa-rectangle-xmark"],[1,"btn","btn-success",2,"height","60px","width","200px",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"button",1),t.NdJ("click",function(){return i.openEmptyModal()}),t._UZ(2,"i",2),t._uU(3," EMPTY "),t.qZA(),t.TgZ(4,"button",1),t.NdJ("click",function(){return i.openDeliveryNoteModal()}),t._UZ(5,"i",3),t._uU(6," NOTE "),t.qZA(),t.TgZ(7,"button",1),t.NdJ("click",function(){return i.openVoidModal()}),t._UZ(8,"i",4),t._uU(9," VOID "),t.qZA(),t.TgZ(10,"button",5),t.NdJ("click",function(){return i.submit()}),t._uU(11," PROCESS "),t.qZA()())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;font-weight:700;color:#545454!important;background:linear-gradient(to bottom,#fff 0%,#eee 100%)}button[_ngcontent-%COMP%]{font-size:18px}.action-button[_ngcontent-%COMP%]{gap:8px}.action-button[_ngcontent-%COMP%]{width:550px}@media (max-width: 1222px){.action-button[_ngcontent-%COMP%]{width:450px}}@media (max-width: 1210px){.action-button[_ngcontent-%COMP%]{width:480px}button[_ngcontent-%COMP%]{font-size:14px}}@media (max-width: 1092px){.action-button[_ngcontent-%COMP%]{width:400px;gap:12px}button[_ngcontent-%COMP%]{font-size:12px}}@media (max-width: 991px){.action-button[_ngcontent-%COMP%]{width:431px;gap:12px}button[_ngcontent-%COMP%]{font-size:14px}}"]})),n})();function Ja(n,a){if(1&n&&(t.TgZ(0,"div",22)(1,"div",23),t._uU(2),t.qZA(),t.TgZ(3,"div",23),t._uU(4),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(e.Variant.Name),t.xp6(2),t.Oqu(e.Quantity)}}const Fa=function(n,a){return{ID:n,Template:a}},La=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]},Qa=function(n){return{ID:n}};let ka=(()=>{class n{constructor(){(0,r.Z)(this,"deliveryComplete",void 0),(0,r.Z)(this,"total",void 0),(0,r.Z)(this,"cartItems",void 0),(0,r.Z)(this,"onUndo",new t.vpe),(0,r.Z)(this,"onNewForm",new t.vpe)}undo(){this.onUndo.emit()}newForm(){this.onNewForm.emit()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-complete"]],inputs:{deliveryComplete:"deliveryComplete",total:"total",cartItems:"cartItems"},outputs:{onUndo:"onUndo",onNewForm:"onNewForm"},decls:32,vars:18,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","py-5"],["target","_blank",1,"btn","bg-light-gray","btn-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[1,"col","text-end"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),t._UZ(5,"i",5),t._uU(6,"Transfer Order Complete"),t.qZA()(),t.TgZ(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),t.NdJ("click",function(){return i.newForm()}),t._uU(11,"New Transfer Order (F8)"),t.qZA()()()(),t.TgZ(12,"div",10)(13,"div",11)(14,"a",12),t._UZ(15,"i",13),t._uU(16,"Print Receipt"),t.qZA()()()()(),t.TgZ(17,"div",14)(18,"div",2)(19,"div",15)(20,"h2",16)(21,"a",17),t._uU(22),t.qZA()()(),t.TgZ(23,"div",18),t.YNc(24,Ja,5,2,"div",19),t.TgZ(25,"div",20)(26,"div",21),t._uU(27,"Total:"),t.qZA(),t.TgZ(28,"div",21),t._uU(29),t.ALo(30,"number"),t.ALo(31,"sum"),t.qZA()()()()()()),2&e&&(t.xp6(14),t.Q6J("routerLink","/print/"+("1"==i.deliveryComplete.PrintMode?"Transfer":"TransferMini"))("queryParams",t.WLB(12,Fa,i.deliveryComplete.OrderID,i.deliveryComplete.PrintTemplateID)),t.xp6(7),t.Q6J("routerLink",t.DdM(15,La))("queryParams",t.VKq(16,Qa,i.deliveryComplete.OrderID)),t.xp6(1),t.hij("Transfer Order #",i.deliveryComplete.InvoiceNumber,""),t.xp6(2),t.Q6J("ngForOf",i.cartItems),t.xp6(5),t.Oqu(t.lcZ(30,7,t.xi3(31,9,i.cartItems,"Quantity"))))},dependencies:[d.sg,c.rH,d.JJ,N.qU]})),n})();var at=s(41206),H=s(28255),Ea=s(67376);const Ra=["cartContainer"];function Ya(n,a){1&n&&t._UZ(0,"th",19)}function Ha(n,a){1&n&&t._UZ(0,"th",20)}function Va(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1," Cost "),t.qZA())}function Ka(n,a){1&n&&(t.TgZ(0,"th",22),t._uU(1,"Price"),t.qZA())}function Ga(n,a){1&n&&(t.TgZ(0,"th",23),t._uU(1,"%"),t.qZA())}function Ba(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Total"),t.qZA())}function ja(n,a){if(1&n&&(t.TgZ(0,"td")(1,"small"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().index;t.xp6(2),t.hij("",e+1,".")}}function $a(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"span",36),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD)}}function Wa(n,a){if(1&n&&(t.TgZ(0,"td",32),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",e.Variant.UOMName," ")}}function za(n,a){if(1&n&&(t._UZ(0,"td",37),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.lcZ(1,1,e.Cost),t.oJD)}}function Xa(n,a){if(1&n&&(t.TgZ(0,"td",32),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.Price)," ")}}function tr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",0==e.Discount?"":"-"+t.lcZ(2,1,e.Discount)," ")}}function er(n,a){if(1&n&&(t.TgZ(0,"td",32),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.Price*e.Quantity*((100-e.Discount)/100))," ")}}function nr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr",25),t.NdJ("click",function(){const o=t.CHM(e),l=o.$implicit,p=o.index,I=t.oxw();return t.KtG(I.onSelect({item:l,index:p}))})("contextmenu",function(o){const l=t.CHM(e),p=l.$implicit,I=l.index,L=t.oxw();return t.KtG(L.onContextMenu(o,p,I))}),t.TgZ(1,"td",26)(2,"i",27),t.NdJ("click",function(){const o=t.CHM(e),l=o.$implicit,p=o.index,I=t.oxw();return t.KtG(I.onRemove({item:l,index:p}))}),t.qZA()(),t.YNc(3,ja,3,1,"td",28),t.TgZ(4,"td",29)(5,"span",30),t._uU(6),t._UZ(7,"br"),t.qZA(),t._UZ(8,"app-serial-note",31),t.YNc(9,$a,2,1,"ng-container",28),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.TgZ(12,"td",32),t._uU(13),t.ALo(14,"number"),t.qZA(),t.YNc(15,Wa,2,1,"td",33),t.YNc(16,za,2,3,"td",34),t.YNc(17,Xa,3,3,"td",33),t.YNc(18,tr,3,3,"td",35),t.YNc(19,er,3,3,"td",33),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.xp6(3),t.Q6J("ngIf",i.appConfig.ModuleSell.Grid.RowNumberVisible),t.xp6(3),t.hij(" ",e.Variant.Name," "),t.xp6(2),t.Q6J("serials",e.Serial),t.xp6(1),t.Q6J("ngIf",e.Note),t.xp6(2),t.Oqu(e.Variant.Code),t.xp6(2),t.hij(" ",t.lcZ(14,11,e.Quantity)," "),t.xp6(2),t.Q6J("ngIf",i.appConfig.ModuleDelivery.OutletDelivery.UOMVisible),t.xp6(1),t.Q6J("ngIf",i.role.Cost&&i.appConfig.ModuleDelivery.OutletDelivery.CostVisible),t.xp6(1),t.Q6J("ngIf",i.role.PriceVisible&&i.appConfig.ModuleDelivery.OutletDelivery.PriceVisible),t.xp6(1),t.Q6J("ngIf",i.role.Discount),t.xp6(1),t.Q6J("ngIf",i.role.PriceVisible&&i.appConfig.ModuleDelivery.OutletDelivery.PriceVisible)}}function ir(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",39),t.NdJ("click",function(){const l=t.CHM(e).item,p=t.oxw();return t.KtG(p.onReverse(l,!0))}),t._uU(1,"Return"),t.qZA(),t.TgZ(2,"button",39),t.NdJ("click",function(){const l=t.CHM(e).item,p=t.oxw();return t.KtG(p.onReverse(l,!1))}),t._uU(3,"Purchase"),t.qZA()}}let or=(()=>{class n{onContextMenu(e,i,o){e.preventDefault(),this.contextMenuPosition.x=e.clientX+"px",this.contextMenuPosition.y=e.clientY+"px",i.Index=o,this.contextMenu.menuData={item:i},this.contextMenu.openMenu()}drop(e){(0,at.bA)(this.cartItems,e.previousIndex,e.currentIndex),this.cartItemService.updateCartItem(this.cartItems),this.onDragItem.emit(this.cartItems),this.cartItemsChange.emit(this.cartItems)}constructor(e,i){(0,r.Z)(this,"loadService",void 0),(0,r.Z)(this,"cartItemService",void 0),(0,r.Z)(this,"cartItems",void 0),(0,r.Z)(this,"cartItemsChange",void 0),(0,r.Z)(this,"onSelectItem",void 0),(0,r.Z)(this,"onReturnItem",void 0),(0,r.Z)(this,"onPurchaseItem",void 0),(0,r.Z)(this,"onRemoveItem",void 0),(0,r.Z)(this,"onDragItem",void 0),(0,r.Z)(this,"cartContainer",void 0),(0,r.Z)(this,"contextMenu",void 0),(0,r.Z)(this,"contextMenuPosition",{x:"0px",y:"0px"}),(0,r.Z)(this,"destroy$",void 0),(0,r.Z)(this,"appConfig",void 0),(0,r.Z)(this,"role",void 0),this.loadService=e,this.cartItemService=i,this.cartItems=[],this.destroy$=new xt.x,this.onSelectItem=new t.vpe,this.onReturnItem=new t.vpe,this.onPurchaseItem=new t.vpe,this.onRemoveItem=new t.vpe,this.onDragItem=new t.vpe,this.cartItemsChange=new t.vpe,this.cartItemService.notifyNewItem$.pipe((0,J.h)(o=>u.gT.IsNotEmpty(o))).subscribe({next:o=>{setTimeout(()=>{this.cartContainer.nativeElement.scrollTop=this.cartContainer.nativeElement.scrollHeight},1)}})}ngOnInit(){this.initAppConfig(),this.initRole()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initAppConfig(){this.appConfig=this.loadService.Data.AppConfigJSON}initRole(){this.loadService.role$.pipe((0,et.R)(this.destroy$)).subscribe(e=>{this.role=e})}onRemove(e){this.onRemoveItem.emit(e)}onSelect(e){this.onSelectItem.emit(e)}onReverse(e,i){i?(e.Quantity>0&&(e.Quantity=-1*e.Quantity),this.onReturnItem.emit(e)):(e.Quantity<0&&(e.Quantity=-1*e.Quantity),this.onPurchaseItem.emit(e))}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(it.O),t.Y36(B.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-cart-display"]],viewQuery:function(e,i){if(1&e&&(t.Gf(Ra,5),t.Gf(H.p6,7)),2&e){let o;t.iGM(o=t.CRH())&&(i.cartContainer=o.first),t.iGM(o=t.CRH())&&(i.contextMenu=o.first)}},inputs:{cartItems:"cartItems"},outputs:{cartItemsChange:"cartItemsChange",onSelectItem:"onSelectItem",onReturnItem:"onReturnItem",onPurchaseItem:"onPurchaseItem",onRemoveItem:"onRemoveItem",onDragItem:"onDragItem"},decls:26,vars:12,consts:[[1,"cashier"],[1,"row","g-0","cart-table","border-bottom"],["cdkScrollable","",1,"col"],["cartContainer",""],[1,"table"],[2,"width","18px"],["style","width: 36px",4,"ngIf"],[1,"text-start",2,"width","250px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 0.75rem",4,"ngIf"],["style","width: 5rem;","class","text-end",4,"ngIf"],["class","text-end","style","width: 70px;",4,"ngIf"],["class","disc text-end","style","width: 20px;",4,"ngIf"],["class","text-end","style","width: 85px;",4,"ngIf"],["cdkDropList","",1,"itemList",3,"cdkDropListDropped"],["class","item","cdkDrag","",3,"click","contextmenu",4,"ngFor","ngForOf"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["contextMenu","matMenu"],["matMenuContent",""],[2,"width","36px"],[1,"text-end",2,"width","0.75rem"],[1,"text-end",2,"width","5rem"],[1,"text-end",2,"width","70px"],[1,"disc","text-end",2,"width","20px"],[1,"text-end",2,"width","85px"],["cdkDrag","",1,"item",3,"click","contextmenu"],[1,"cursor"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Click to Remove",1,"fa","fa-xmark","text-danger",3,"click"],[4,"ngIf"],[1,"text-start"],[1,"d-block"],[3,"serials"],[1,"text-end"],["class","text-end",4,"ngIf"],["class","text-end",3,"innerHTML",4,"ngIf"],["class","text-end text-danger disc",4,"ngIf"],[3,"innerHTML"],[1,"text-end",3,"innerHTML"],[1,"text-end","text-danger","disc"],["mat-menu-item","",3,"click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2,3)(4,"table",4)(5,"thead")(6,"tr"),t._UZ(7,"th",5),t.YNc(8,Ya,1,0,"th",6),t.TgZ(9,"th",7),t._uU(10,"Item"),t.qZA(),t.TgZ(11,"th"),t._uU(12,"Code"),t.qZA(),t.TgZ(13,"th",8),t._uU(14,"Qty"),t.qZA(),t.YNc(15,Ha,1,0,"th",9),t.YNc(16,Va,2,0,"th",10),t.YNc(17,Ka,2,0,"th",11),t.YNc(18,Ga,2,0,"th",12),t.YNc(19,Ba,2,0,"th",13),t.qZA()(),t.TgZ(20,"tbody",14),t.NdJ("cdkDropListDropped",function(l){return i.drop(l)}),t.YNc(21,nr,20,13,"tr",15),t.qZA()()()(),t._UZ(22,"div",16),t.TgZ(23,"mat-menu",null,17),t.YNc(25,ir,4,0,"ng-template",18),t.qZA()()),2&e){const o=t.MAs(24);t.xp6(8),t.Q6J("ngIf",i.appConfig.ModuleSell.Grid.RowNumberVisible),t.xp6(7),t.Q6J("ngIf",i.appConfig.ModuleDelivery.OutletDelivery.UOMVisible),t.xp6(1),t.Q6J("ngIf",i.role.Cost&&i.appConfig.ModuleDelivery.OutletDelivery.CostVisible),t.xp6(1),t.Q6J("ngIf",i.role.PriceVisible&&i.appConfig.ModuleDelivery.OutletDelivery.PriceVisible),t.xp6(1),t.Q6J("ngIf",i.role.Discount),t.xp6(1),t.Q6J("ngIf",i.role.PriceVisible&&i.appConfig.ModuleDelivery.OutletDelivery.PriceVisible),t.xp6(2),t.Q6J("ngForOf",i.cartItems),t.xp6(1),t.Udp("left",i.contextMenuPosition.x)("top",i.contextMenuPosition.y),t.Q6J("matMenuTriggerFor",o)}},dependencies:[d.sg,d.O5,Ea.PQ,at.Wj,at.Zt,H.VK,H.OP,H.KA,H.p6,S.gM,Y.B,d.JJ],styles:["div.row.cart-table[_ngcontent-%COMP%]{border-left:solid 1px #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%]{overflow:auto;height:250px}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background:#FBFBF7;border-left:none}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-size:.75rem;padding:9px 5px!important}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:21px;font-size:.75rem;border-bottom:1px solid #CFCFCF}div.row.cart-table[_ngcontent-%COMP%] div.col[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-right:0}.cdk-drag-preview[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.item[_ngcontent-%COMP%]:last-child{border:none}.itemList.cdk-drop-list-dragging[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cashier[_ngcontent-%COMP%]{width:550px;max-width:50rem;min-width:30rem}@media (max-width: 1222px){.cashier[_ngcontent-%COMP%]{width:450px}}@media (max-width: 1210px){.cashier[_ngcontent-%COMP%]{width:480px}}@media (max-width: 1092px){.cashier[_ngcontent-%COMP%]{min-width:20rem;width:400px!important}}@media (max-width: 991px){.cashier[_ngcontent-%COMP%]{min-width:10rem;width:431px}}"]})),n})();const ar=function(){return["/menu/Logistics/Archive/Transfer_Order"]};function rr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div")(2,"button",4),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onScanSerial())}),t.TgZ(3,"div",5),t._UZ(4,"i",6),t.TgZ(5,"span"),t._uU(6,"Scan Serial"),t.qZA()()(),t.TgZ(7,"a",7),t._uU(8,"Cancel"),t.qZA()(),t.BQk()}2&n&&(t.xp6(7),t.Q6J("routerLink",t.DdM(1,ar)))}function lr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"POS-cart-header",16),t.NdJ("onCreateItem",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.selectItem())})("onOpenUploadModal",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openUploadModal())})("onAddItem",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.addItem(o))})("onScanCode",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onScanBarcode(o))}),t.qZA(),t.TgZ(2,"POS-cart-display",17),t.NdJ("onRemoveItem",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.removeItem(o))})("onSelectItem",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectItem(o))})("onDragItem",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.saveItemAfterDrag(o))}),t.qZA(),t.TgZ(3,"POS-cart-action",18),t.NdJ("onOpenEmptyModal",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openEmptyModal())})("onOpenDeliveryNoteModal",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openDeliveryNoteModal())})("onOpenVoidModal",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.openVoidModal())})("onSubmit",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.submit())}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("cartItems",e.cartItems)("isUpload",!0),t.xp6(1),t.Q6J("cartItems",e.cartItems)}}function cr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",9)(2,"POS-toolbar",10),t.NdJ("onOpenOutletModal",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.openOutletModal())})("onOpenCourierModal",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.openCourierModal())})("selectDestination",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.onSelectDestination())}),t.qZA()(),t.TgZ(3,"div",11)(4,"div",12),t._UZ(5,"pos-quick-key",13),t.qZA(),t.YNc(6,lr,4,3,"div",14),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("deliveryData",e.deliveryData)("outletName",e.outletName)("couriers",e.couriers)("entities",e.destinationEntities)("isEdit",e.isEdit)("isVoid",e.isVoid)("dateEditor",e.dateEditor),t.xp6(3),t.Q6J("quickKeyId",e.quickKeyId)("outletID",e.outletID),t.xp6(1),t.Q6J("ngIf",e.deliveryStorage)}}function sr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",19)(1,"POS-complete",20),t.NdJ("onUndo",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.undo())})("onNewForm",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.newForm())}),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("deliveryComplete",e.completeInfo)("total",e.total)("cartItems",e.cartItems)}}let dr=(()=>{class n extends na.M{handleF4(){u.gT.IsEmpty(this.outletID)?this.toastr.error("Please select outlet before proceeding..",T.n.Error):!(this.matDialog.openDialogs.length>0)&&u.gT.IsNotEmpty(this.outletID)&&this.matDialog.open(Ft,{data:{item:null,entityID:this.outletID}})}handleF8(){this.isComplete&&this.newForm()}constructor(e,i,o,l,p,I,L,mc,uc,gc){super(e),(0,r.Z)(this,"firstLoadService",void 0),(0,r.Z)(this,"activatedRoute",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"backEndService",void 0),(0,r.Z)(this,"quickKeyService",void 0),(0,r.Z)(this,"deliveryDataService",void 0),(0,r.Z)(this,"cartItemService",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"quickKeyId",void 0),(0,r.Z)(this,"cartItems",[]),(0,r.Z)(this,"outletName","Choose an Outlet"),(0,r.Z)(this,"outletID",void 0),(0,r.Z)(this,"templateID",void 0),(0,r.Z)(this,"deliveryData",void 0),(0,r.Z)(this,"entities",[]),(0,r.Z)(this,"couriers",[]),(0,r.Z)(this,"deliveryStorage",void 0),(0,r.Z)(this,"quantity",0),(0,r.Z)(this,"destroy$",void 0),(0,r.Z)(this,"completeInfo",void 0),(0,r.Z)(this,"isComplete",!1),(0,r.Z)(this,"total",0),(0,r.Z)(this,"destinationEntities",void 0),(0,r.Z)(this,"isVoid",!1),(0,r.Z)(this,"isEdit",!1),(0,r.Z)(this,"deliveryEditor",void 0),(0,r.Z)(this,"priceRestriction",void 0),(0,r.Z)(this,"priceVisible",void 0),(0,r.Z)(this,"dateEditor",void 0),(0,r.Z)(this,"costRole",void 0),(0,r.Z)(this,"inventoryView",void 0),this.firstLoadService=i,this.activatedRoute=o,this.matDialog=l,this.backEndService=p,this.quickKeyService=I,this.deliveryDataService=L,this.cartItemService=mc,this.toastr=uc,this.router=gc,this.destroy$=new xt.x,this.deliveryDataService.Data$.pipe((0,et.R)(this.destroy$)).subscribe(R=>{this.deliveryData=R,this.isVoid&&(this.deliveryData.Order.EntityID=this.deliveryData.Order.SourceEntityID=this.outletID),this.fillCartItems(),this.quantity=this.cartItems.length}),this.quickKeyService.onSelectQuickeyItem$.pipe((0,et.R)(this.destroy$),(0,J.h)(R=>u.gT.IsNotEmpty(R.id)),(0,nt.b)(R=>this.cartItemService.getItemById(R.id,R.entityID))).subscribe(R=>this.cartItemService.addNewItem(R))}ngOnInit(){this.initLoadForm()}ngOnDestroy(){this.deliveryDataService.pushNewValue(new Lt.j$),this.quickKeyService.Data=new ia.AM,this.cartItemService.inventoryState="",this.cartItemService.lowOnStockInfo={EntityID:u.gT.GuidEmpty,Items:[]},this.destroy$.next(!0),this.destroy$.complete()}initLoadForm(){const e=this.activatedRoute.snapshot.queryParams;u.gT.IsNotEmpty(e.ID)&&!this.isVoid?(this.isEdit=!0,this.menuData$.pipe((0,nt.b)(()=>this.firstLoadService.getStorage(E.W.LoadFormDelivery,e.ID))).subscribe(i=>this.fillData(i))):this.menuData$.pipe((0,nt.b)(()=>this.firstLoadService.getStorage(E.W.LoadFormDelivery,null))).subscribe(i=>{this.fillData(i),"low"==this.cartItemService.inventoryState||""==this.cartItemService.inventoryState?this.openOutletModal():(this.deliveryData.Order.SourceEntityID=this.cartItemService.lowOnStockInfo.EntityID,this.entities.forEach(o=>{o.ID===this.deliveryData.Order.SourceEntityID&&(this.outletID=o.ID,this.outletName=o.Name,this.quickKeyId=o.QuickKeyTemplateID,this.templateID=o.PrintTemplateID)}),(0,qt.a)([this.backEndService.generateNumber(this.outletID,E.W.DeliveryGenerateNumber),this.backEndService.getQuickKey(this.outletID,E.W.GetQuickKey)]).subscribe(([o,l])=>{this.deliveryData.Order.Number=o.Number,this.initQuickKey(l),document.getElementById("product").focus()}))})}fillData(e){this.deliveryStorage=e,this.firstLoadService.pageState=la.U.DeliveryPage,this.initRoles(),this.entities=this.deliveryStorage.Entities,this.destinationEntities=e.DestinationEntities,this.couriers=this.deliveryStorage.Courier,this.deliveryData.Order.TypeID=e.DeliveryTypes[0]?e.DeliveryTypes[0].ID:null,this.deliveryData.Order.Date=this.deliveryStorage.ServerTime.toString(),""!=this.cartItemService.inventoryState&&(this.cartItemService.lowOnStockInfo.Items=this.cartItemService.lowOnStockInfo.Items.map(i=>({VariantID:i.ID||i.VariantID,Variant:{Name:i.Product||i.Variant,Code:i.Code||i.Variant?.Code},Discount:0,Price:i.UnitPrice,Cost:i.UnitCost,Quantity:"low"==this.cartItemService.inventoryState?i.Max-i.Inventory:i.UnitsInStock-i.MaxStock})),this.deliveryData.Items=this.cartItemService.lowOnStockInfo.Items,this.cartItems=this.deliveryData.Items,"low"==this.cartItemService.inventoryState?this.deliveryData.Order.DestinationEntityID=this.cartItemService.lowOnStockInfo.EntityID:this.deliveryData.Order.EntityID=this.cartItemService.lowOnStockInfo.EntityID),this.isVoid&&this.backEndService.generateNumber(this.outletID,E.W.DeliveryGenerateNumber).subscribe(i=>{this.deliveryData.Order.Number=i.Number}),u.gT.IsNotEmpty(this.deliveryStorage.Data.Order)&&(this.deliveryData.Order=this.deliveryStorage.Data.Order,this.deliveryData.Items=this.deliveryStorage.Data.Items,this.deliveryData.OrderItems=this.deliveryStorage.Data.OrderItems,this.menuData.H=`Edit Delivery #${this.deliveryData.Order.Number}`,this.initDeliveryCart(),this.entities.forEach(i=>{i.ID===this.deliveryData.Order.SourceEntityID&&(this.outletID=i.ID,this.outletName=i.Name,this.quickKeyId=i.QuickKeyTemplateID,this.templateID=i.PrintTemplateID)}),this.mappingItemToClass(),this.deliveryDataService.Data.Items=(0,Zt.yE)(G.t,this.cartItems),this.backEndService.getQuickKey(this.outletID,E.W.GetQuickKey).subscribe(i=>this.initQuickKey(i)))}mappingItemToClass(){let e;this.cartItems=this.cartItems.map(i=>(e=new G.t,i.Variant.Serial=i.Serial,e.Quantity=i.Quantity,e.Note=i.Note,e.patchByVariant(i.Variant),e))}initRoles(){this.firstLoadService.initRoles(),this.firstLoadService.role$.pipe((0,et.R)(this.destroy$)).subscribe(e=>{this.deliveryEditor=e.DeliveryEditor,this.priceRestriction=e.PriceVisible,this.dateEditor=e.DeliveryDateEditor,this.costRole=e.Cost,this.inventoryView=e.InventoryView})}initQuickKey(e){this.quickKeyService.Data=e,this.quickKeyService.EntityID=this.outletID}fillCartItems(){this.cartItems=[],this.deliveryData.Items.forEach(e=>{u.gT.IsEmpty(e.DiscountAmount)&&(e.DiscountAmount=0),this.cartItems.push(e)})}initDeliveryCart(){u.gT.IsNotEmpty(this.deliveryData.Order.ID)&&(this.fillCartItems(),this.cartItemService.updateCartItem(this.cartItems))}openOutletModal(){(!this.isEdit||this.isVoid)&&this.matDialog.open(Ut.X,{data:{Entities:this.entities}}).afterClosed().pipe((0,J.h)(e=>e),(0,J.h)(e=>e.outlet.ID!=this.deliveryData.Order.DestinationEntityID||(this.toastr.error("Source Outlet can't be the same with Destination Outlet",T.n.Error),!1)),(0,oa.b)(e=>{this.outletName=e.outlet.Name,this.outletID=e.outlet.ID,this.quickKeyId=e.outlet.QuickKeyTemplateID,this.templateID=e.outlet.PrintTemplateID,this.deliveryData.Order.EntityID=this.deliveryData.Order.SourceEntityID=this.outletID}),(0,nt.b)(()=>(0,qt.a)([this.backEndService.generateNumber(this.outletID,E.W.DeliveryGenerateNumber),this.backEndService.getQuickKey(this.outletID,E.W.GetQuickKey)]))).subscribe(([e,i])=>{this.deliveryData.Order.Number=e.Number,this.initQuickKey(i),document.getElementById("product").focus()})}onSelectDestination(){this.deliveryData.Order.EntityID==this.deliveryData.Order.DestinationEntityID&&(this.toastr.error("Source Outlet can't be the same with Destination Outlet",T.n.Error),setTimeout(()=>this.deliveryData.Order.DestinationEntityID=null,100))}openCourierModal(){this.matDialog.open(ca).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e))).subscribe(e=>{const i={ID:e.ID,Name:e.Name};this.couriers=[...this.couriers,i],this.deliveryData.Order.CourierID=i.ID})}saveItemAfterDrag(e){this.cartItemService.updateCartItem(e)}removeItem(e){this.cartItemService.removeItem(e)}selectItem(e){this.matDialog.open(Ft,{data:{itemInfo:e,entityID:this.outletID,entityDestination:this.findDestinationByID(this.deliveryData.Order.DestinationEntityID),priceVisible:this.deliveryStorage.AppConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible,priceRestriction:this.priceRestriction,costVisible:this.deliveryStorage.AppConfigJSON.ModuleDelivery.OutletDelivery.CostVisible,costRole:this.costRole,quantityToOneInDialog:this.deliveryStorage.AppConfigJSON.ModuleSell.ProductDialog.QuantityToOneInDialog,isEditDelivery:this.isEdit,inventoryView:this.inventoryView,entities:this.entities}})}findDestinationByID(e){return this.destinationEntities.find(o=>o.ID==e)}addItem(e){this.cartItemService.getItemById(e,this.outletID).subscribe(i=>this.cartItemService.addNewItem(i))}openDeliveryNoteModal(){this.matDialog.open(aa,{data:{deliveryData:this.deliveryData}})}openEmptyModal(){this.matDialog.open(ra,{data:this.outletID})}submit(){if(!u.gT.IsEmpty(this.deliveryData.Order.DestinationEntityID))return u.gT.IsEmpty(this.deliveryData.Order.SourceEntityID)?(this.toastr.error("Please select outlet before proceeding..",T.n.Error),void this.openOutletModal()):void(0!=this.cartItems.length?this.deliveryData.Order.EntityID!==this.deliveryData.Order.DestinationEntityID?u.gT.IsEmpty(this.deliveryData.Order.Number)?this.toastr.error("Number cannot be empty.",T.n.Error):this.validateSerialQty()?this.matDialog.open(Pt.y,{data:{transactionData:this.deliveryData,api:E.W.SubmitOutletDelivery}}).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e))).subscribe(e=>{this.completeInfo=e,this.completeInfo.deliveryEditor=this.deliveryEditor,this.completeInfo.PrintTemplateID=this.templateID;const i=this.destinationEntities.find(o=>o.ID===this.deliveryData.Order.DestinationEntityID).Name;this.toastr.warning(`Your items is delivered to ${i}`,T.n.Info),this.calculateTotal(),this.isComplete=!0}):this.toastr.error("Serial must be equal with the quantity",T.n.Error):this.toastr.error("Source Outlet can't be the same with Destination Outlet",T.n.Error):this.toastr.error("You must have at least one item.",T.n.Error));this.toastr.error("Please Choose your Destination!",T.n.Error)}validateSerialQty(){let e=!0;return this.cartItems.forEach(i=>{i.isSerialType()&&!i.checkMatchSerialWithQuantity()&&(e=!1)}),e}openVoidModal(){this.matDialog.open(wt.s).afterClosed().pipe((0,J.h)(e=>e)).subscribe(e=>{this.isVoid=e,this.deliveryDataService.pushNewValue(new Lt.j$),this.initLoadForm()})}onScanBarcode(e){this.cartItemService.addCartItemByCode(e,this.outletID)}openUploadModal(){this.matDialog.open(Qt.h).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e)&&e.length>0),(0,Nt.U)(e=>(0,Zt.yE)(G.t,e))).subscribe(e=>e.forEach(i=>this.cartItemService.addNewItem(i,!0)))}onScanSerial(){this.matDialog.open(Ma,{data:{entityID:this.outletID}})}calculateTotal(){this.cartItems.forEach(e=>this.total+=e.Price*e.Quantity*((100-e.Discount)/100))}undo(){this.router.navigate(["/menu/Logistics/Archive/Transfer_Order/Form"],{queryParams:{ID:this.completeInfo.OrderID}}).then(()=>window.location.reload())}newForm(){this.router.navigate(["/menu/Logistics/Archive/Transfer_Order/Form"]).then(()=>window.location.reload())}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(it.O),t.Y36(c.gz),t.Y36(g.uw),t.Y36(ot.M),t.Y36(Aa.w),t.Y36(Sa.p),t.Y36(B.N),t.Y36(v._W),t.Y36(c.F0))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-transfer-order-form"]],hostBindings:function(e,i){1&e&&t.NdJ("keydown.F4",function(l){return i.handleF4(l)},!1,t.Jf7)("keydown.F8",function(l){return i.handleF8(l)},!1,t.Jf7)},features:[t.qOj],decls:6,vars:6,consts:[[3,"hideSearchDropdown","hideSearchBox","pageData"],[4,"ngIf"],["class","container-fluid",4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],[1,"btn","btn-outline-secondary","me-4",3,"click"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-barcode-read","fs-4","text-black","me-2"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid"],[1,"border-bottom"],[3,"deliveryData","outletName","couriers","entities","isEdit","isVoid","dateEditor","onOpenOutletModal","onOpenCourierModal","selectDestination"],[1,"row","body","g-0","mt-4","main-container"],[1,"col-auto"],[3,"quickKeyId","outletID"],["class","col-auto cart",4,"ngIf"],[1,"col-auto","cart"],[3,"cartItems","isUpload","onCreateItem","onOpenUploadModal","onAddItem","onScanCode"],[3,"cartItems","onRemoveItem","onSelectItem","onDragItem"],[3,"onOpenEmptyModal","onOpenDeliveryNoteModal","onOpenVoidModal","onSubmit"],[1,"container-fluid","mt-5"],[3,"deliveryComplete","total","cartItems","onUndo","onNewForm"]],template:function(e,i){1&e&&(t.TgZ(0,"mainpanel-cmp",0)(1,"actions"),t.YNc(2,rr,9,2,"ng-container",1),t.qZA(),t.TgZ(3,"content"),t.YNc(4,cr,7,10,"div",2),t.YNc(5,sr,2,3,"div",3),t.qZA()()),2&e&&(t.Q6J("hideSearchDropdown",!0)("hideSearchBox",!0)("pageData",i.menuData),t.xp6(2),t.Q6J("ngIf",!i.isComplete),t.xp6(2),t.Q6J("ngIf",!i.isComplete),t.xp6(1),t.Q6J("ngIf",i.isComplete))},dependencies:[d.O5,c.rH,b.p,qa.w,kt.H,Pa,Ua,ka,or],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px,#f5c6cb 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#28a745,#28a745 15px,#a2dbb0 15px,#a2dbb0 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:3px!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex{background-color:#e9ecef!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-form-field-flex input{opacity:1!important;color:#00000061!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field{padding-right:0!important}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field .mat-mdc-text-field-wrapper{padding-bottom:0;background-color:#fff;padding-left:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-flex{width:147px;height:35px;border:1px solid rgb(207,207,207);margin-left:40px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix{border:none!important;top:5px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-infix input{font-size:14px;color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:4px;padding-bottom:4px;padding-left:8px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix{position:relative;left:-140px;top:1px}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix .mat-mdc-button-persistent-ripple{color:#000}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-mdc-form-field-icon-suffix button.mat-mdc-icon-button.mat-mdc-button-base{padding:0}.date[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mdc-line-ripple{display:none}.date[_ngcontent-%COMP%] datepicker.date-warnings[_ngcontent-%COMP%] .mat-mdc-form-field-flex{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px,#f9e79f 30px)!important}div.row.cart-header[_ngcontent-%COMP%]{border:solid 1px #cfcfcf;border-bottom:none;border-radius:3px 3px 0 0;background:#f2f7fa;color:#222}div.row.cart-header[_ngcontent-%COMP%] .right-bottom[_ngcontent-%COMP%]{font-size:9px;right:-6px;bottom:-10px}.small[_ngcontent-%COMP%]{margin-right:5px!important}.small[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:143px}.small[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:140px}.small[_ngcontent-%COMP%] .select2-container[_ngcontent-%COMP%]{font-size:12px}.col-auto[_ngcontent-%COMP%]{margin-right:22px;font-size:.875rem;height:-moz-fit-content;height:fit-content}.col-auto[_ngcontent-%COMP%]:last-child{margin-right:0}.col-auto[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.25rem;color:#3b3b3b;margin-right:5px;line-height:unset!important;position:relative;top:2px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .col-auto[_ngcontent-%COMP%] span.outlet[_ngcontent-%COMP%]{padding:4px 8px 3px 5px;border:1px solid #dddddd;font-size:.875rem}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:36px}.col-auto[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background-color:#e9ecef!important;opacity:1!important;color:#00000061!important}.col-auto[_ngcontent-%COMP%] .outlet[_ngcontent-%COMP%]{width:165px;color:#337ab7;background:#ffffff}.col-auto[_ngcontent-%COMP%] .number[_ngcontent-%COMP%]{width:150px}.col-auto.customer[_ngcontent-%COMP%] autocomplete[_ngcontent-%COMP%] input{font-size:14px}.col-auto.sales[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] input{font-size:14px}.col-auto[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%]{width:150px}.header[_ngcontent-%COMP%]{border-bottom:1px solid #dde2eb}@media (max-width: 1400px){.main-container[_ngcontent-%COMP%]{width:100%!important}}"]})),n})(),pr=(()=>{class n{constructor(e,i){(0,r.Z)(this,"dt",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"config",void 0),(0,r.Z)(this,"data",void 0),this.dt=e,this.dialogRef=i,this.config=new q.O,this.config.title="Note",this.data=e.data}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-note"]],decls:4,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],["cols","24","rows","6",3,"ngModel","ngModelChange"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.dialogRef.close("save")})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"textarea",2),t.NdJ("ngModelChange",function(l){return i.data.Note=l}),t.qZA()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(3),t.Q6J("ngModel",i.data.Note))},dependencies:[w.M,_.Fj,_.JJ,_.On]})),n})();function _r(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr",18)(1,"td",19),t._uU(2),t.qZA(),t._UZ(3,"td",20)(4,"td",21),t.TgZ(5,"td")(6,"input",22),t.NdJ("ngModelChange",function(o){const p=t.CHM(e).$implicit;return t.KtG(p.Quantity=o)}),t.qZA()(),t._UZ(7,"td",21)(8,"td",21),t.TgZ(9,"td")(10,"textarea",23),t.NdJ("ngModelChange",function(o){const p=t.CHM(e).$implicit;return t.KtG(p.Note=o)}),t.qZA()()()}if(2&n){const e=a.$implicit,i=a.index,o=t.oxw(2);t.xp6(2),t.Oqu(i+1+"."),t.xp6(1),t.Q6J("innerHTML",e.Name,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.Code,t.oJD),t.xp6(2),t.Q6J("ngModel",e.Quantity)("max",e.Transfer)("disabled",e.TypeID==o.serialized),t.xp6(1),t.Q6J("innerHTML",e.Transfer,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.Quantity-e.Transfer,t.oJD),t.xp6(2),t.Q6J("ngModel",e.Note)("disabled",e.TypeID==o.serialized)}}const mr=function(n){return{ID:n}};function ur(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3,"Cancel"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.openNoteDialog())}),t._uU(5,"Save"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"section",5)(9,"hgroup")(10,"div",6)(11,"datepicker",7),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.data.Date=o)}),t.qZA()()(),t.TgZ(12,"main",8)(13,"section")(14,"table",9)(15,"thead",10)(16,"tr")(17,"th",11),t._uU(18,"NO"),t.qZA(),t.TgZ(19,"th",12),t._uU(20,"NAME"),t.qZA(),t.TgZ(21,"th",13),t._uU(22,"CODE"),t.qZA(),t.TgZ(23,"th",14),t._uU(24,"QTY"),t.qZA(),t.TgZ(25,"th",15),t._uU(26,"TRANSFER"),t.qZA(),t.TgZ(27,"th",15),t._uU(28,"DIFF"),t.qZA(),t.TgZ(29,"th",16),t._uU(30,"NOTE"),t.qZA()()(),t.TgZ(31,"tbody"),t.YNc(32,_r,11,10,"tr",17),t.qZA()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("queryParams",t.VKq(6,mr,e.data.ID)),t.xp6(9),t.Q6J("date",e.data.Date),t.xp6(21),t.Q6J("ngForOf",e.data.Items)}}let gr=(()=>{class n extends tt.U{constructor(e,i,o,l,p){super(e,"TransferOrder/ReceiveOutletDelivery",i),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"serialized",V.J.Serialized),this.toastr=o,this.matDialog=l,this.router=p}openNoteDialog(){this.matDialog.open(pr,{data:{data:this.data}}).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e))).subscribe(()=>{this.httpService.post("/api/TransferOrder/CheckOut",JSON.stringify(this.data)).subscribe(e=>this.onSubmitSuccess(e))})}onSubmitSuccess(e){this.toastr.success("Delivery has been received!",T.n.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(v._W),t.Y36(g.uw),t.Y36(c.F0))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-receive-transfer-order"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["routerLink","/menu/Logistics/Archive/Transfer_Order/Info",1,"btn","me-5","btn-outline-secondary",3,"queryParams"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","mt-5"],[1,"cashier"],[1,"d-flex","align-items-center","g-0"],["width","70","appearance","outline",3,"date","dateChange"],[1,"mt-6"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[1,"text-end",2,"width","50px"],[1,"text-end",2,"width","60px"],[1,"text-end",2,"width","250px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],[1,"text-center"],[3,"innerHTML"],[1,"text-end",3,"innerHTML"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","max","disabled","ngModelChange"],[1,"form-control",2,"height","2.375rem",3,"ngModel","disabled","ngModelChange"]],template:function(e,i){1&e&&t.YNc(0,ur,33,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[d.sg,d.O5,c.rH,_.Fj,_.JJ,_.On,b.p,y.QB,K.b]})),n})();var fr=s(71884),hr=s(78372),xr=s(68675),Cr=s(63900),Zr=s(39646);let bt=(()=>{class n{constructor(e,i){(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"cartItems",void 0),(0,r.Z)(this,"formItems",void 0),(0,r.Z)(this,"entityID",void 0),this.toastr=e,this.matDialog=i}bindCartItems(e=[],i=[],o){this.cartItems=[],e.forEach(l=>{let p=Object.assign({},l);p.QuantityDelivered=l.Quantity,p.Sent=0,p.BarcodeCount=0,p.Completed=!1,p.MaxDeliveryQuantity=p.Quantity,p=this.setSerialSourceItem(p),this.checkIsSent(p,i),o&&this.checkIsEdit(p),this.cartItems.push(p)})}setSerialSourceItem(e){return e.TypeID==V.J.Serialized&&(e.serialSources=e?.Serial?JSON.parse(JSON.stringify(e?.Serial)):[]),e}checkIsEdit(e){const i=this.formItems.find(o=>o.ID==e.ID);u.gT.IsNotEmpty(i)?(e.QuantityDelivered=i.Quantity,e.Completed=!1,e.MaxDeliveryQuantity=e.Quantity-e.Sent+i.Quantity):e.Completed||(e.QuantityDelivered=0)}checkIsSent(e,i){const o=i?.find(l=>l.ID==e.ID);u.gT.IsNotEmpty(o)&&(e.Sent=o.Quantity,e.QuantityDelivered=e.Quantity-e.Sent,e.MaxDeliveryQuantity=e.Quantity-e.Sent,e.Completed=0==e.QuantityDelivered)}onScanBarcode(e){if(u.gT.IsEmpty(e))this.toastr.error("Code is empty",T.n.Error);else{let i=this.cartItems.find(o=>u.gT.IsNotEmpty(o.Code)&&o.Code==e);if(u.gT.IsNotEmpty(i)){this.cartItems.filter(l=>l.Code==e).forEach(l=>l.BarcodeCount+=1);let o=[];this.cartItems.forEach(l=>o.push(l)),this.cartItems=o,this.toastr.success(`${i.Name} (${i.Code}) count: ${i.BarcodeCount}`,T.n.Success)}else this.toastr.error(`No variant with code ${e} found`,T.n.Error)}}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.LFG(v._W),t.LFG(g.uw))}),(0,r.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})(),vr=(()=>{class n{constructor(e,i){(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"modalConfig",void 0),this.data=e,this.dialogRef=i,this.modalConfig=new q.O,this.modalConfig.title=e.title,this.modalConfig.headerType=e.headerType,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close"}onClose(){this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["app-modal-info"]],decls:4,vars:2,consts:[[3,"config","onCancel","onClose"],[1,"container-fluid"],[3,"innerHTML"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),t.TgZ(1,"content")(2,"div",1),t._UZ(3,"div",2),t.qZA()()()),2&e&&(t.Q6J("config",i.modalConfig),t.xp6(3),t.Q6J("innerHTML",null==i.data?null:i.data.message,t.oJD))},dependencies:[w.M]})),n})(),Et=(()=>{class n{constructor(e,i,o){(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"router",void 0),(0,r.Z)(this,"dialog",void 0),this.toastr=e,this.router=i,this.dialog=o}validate(e,i,o){let l=!0;return 0==e.filter(p=>0!=p.QuantityDelivered).length&&!o&&(this.toastr.error("Deliver at least one item",T.n.Error),l=!1),e.forEach(p=>{p.QuantityDelivered>p.MaxDeliveryQuantity&&(this.toastr.error(`Delivery item of ${p.Name} is greater than ordered!`,T.n.Error),l=!1),4===p.TypeID&&(p.Serial&&p.Serial.length>0?(p.QuantityDelivered<0?-1*p.QuantityDelivered:p.QuantityDelivered)==this.calculateSerialQty(p.Serial)||(this.toastr.error(`Can't edit delivery of ${p.Name}'s serial number`,T.n.Error),l=!1):0!=p.QuantityDelivered&&(this.toastr.error(`Serial can not empty in product ${p.Name}`,T.n.Error),l=!1)),i&&(p.QuantityDelivered<0?-1*p.QuantityDelivered:p.QuantityDelivered)!=p.BarcodeCount&&p.QuantityDelivered>0&&(this.dialog.open(vr,{id:"modalLogisticInfoId",data:{title:"Logistic - Quantity Counter Config Enabled",message:'You must scan the product to be sent one by one before the record can be SAVED or you can turn off the config by following \n <a href="https://support.dealpos.com/en/articles/4773890-send-outbound-logistic-with-barcode-scan" target="_blank">this article</a>\n .',headerType:T.n.Warning},width:"500px"}),l=!1)}),l}calculateSerialQty(e=[]){let i=0;return e.forEach(o=>{i+=o.Qty}),i}convertCartItemsToForm(e){return e.filter(o=>!o.Completed).map(o=>({ID:o.ID,Name:o.Name,VariantID:o.VariantID,Quantity:o.QuantityDelivered,PackSize:o.PackSize,Serial:o.Serial,UnitQuantity:1,Note:o.Note}))}newForm(e){this.router.navigate([`/menu/Logistics/Archive/${e}/Form`]).then(()=>window.location.reload())}undo(e,i){this.router.navigate([`/menu/Logistics/Archive/${i}/Form`],{queryParams:{ID:e}}).then(()=>window.location.reload())}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.LFG(v._W),t.LFG(c.F0),t.LFG(g.uw))}),(0,r.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})();var j=s(90811);function Tr(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",27),t._uU(2),t.qZA(),t.TgZ(3,"div",27),t._uU(4),t.ALo(5,"number"),t.qZA(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(5,2,e.Quantity))}}function br(n,a){if(1&n&&(t.TgZ(0,"div",25),t.YNc(1,Tr,6,4,"ng-container",26),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",0!=e.Quantity)}}function Dr(n,a){if(1&n&&(t.TgZ(0,"div",21),t.YNc(1,br,2,1,"div",22),t.TgZ(2,"div",23)(3,"div",24),t._uU(4,"Total Delivered Quantity:"),t.qZA(),t.TgZ(5,"div",24),t._uU(6),t.ALo(7,"number"),t.ALo(8,"sum"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.items),t.xp6(5),t.hij("",t.lcZ(7,2,t.xi3(8,4,e.items,"Quantity"))," ")}}const Rt=function(n){return[n]},yr=function(n,a){return{ID:n,Template:a}},Ir=function(n){return{ID:n}};let Yt=(()=>{class n{constructor(){(0,r.Z)(this,"afterSubmitData",void 0),(0,r.Z)(this,"items",void 0),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"undo",new t.vpe),(0,r.Z)(this,"newForm",new t.vpe)}onUndo(){this.undo.emit(this.afterSubmitData.ID)}onNewForm(){this.newForm.emit()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-complete-customer-supplier"]],inputs:{afterSubmitData:"afterSubmitData",items:"items",state:"state"},outputs:{undo:"undo",newForm:"newForm"},decls:27,vars:18,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","py-5"],[1,"btn","bg-light-gray","btn-secondary",3,"click"],[1,"fa-solid","fa-reply","me-2"],["target","_blank",1,"btn","bg-light-gray","btn-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],["class","card-body",4,"ngIf"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[4,"ngIf"],[1,"col","text-end"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),t._UZ(5,"i",5),t._uU(6),t.qZA()(),t.TgZ(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),t.NdJ("click",function(){return i.onNewForm()}),t._uU(11),t.qZA()()()(),t.TgZ(12,"div",10)(13,"div",11)(14,"button",12),t.NdJ("click",function(){return i.onUndo()}),t._UZ(15,"i",13),t._uU(16,"Undo"),t.qZA(),t.TgZ(17,"a",14),t._UZ(18,"i",15),t._uU(19,"Print Receipt"),t.qZA()()()()(),t.TgZ(20,"div",16)(21,"div",2)(22,"div",17)(23,"h2",18)(24,"a",19),t._uU(25),t.qZA()()(),t.YNc(26,Dr,9,7,"div",20),t.qZA()()()),2&e&&(t.xp6(6),t.hij("",i.state," Logistics Complete"),t.xp6(5),t.hij("New ",i.state," Logistics (F8)"),t.xp6(6),t.Q6J("routerLink",t.VKq(9,Rt,"Outbound"==i.state?"/print/OutDelivery":"/print/InDelivery"))("queryParams",t.WLB(11,yr,i.afterSubmitData.ID,i.afterSubmitData.Template)),t.xp6(7),t.Q6J("routerLink",t.VKq(14,Rt,"Outbound"==i.state?"/menu/Logistics/Archive/Outbound_Logistics/Info":"/menu/Logistics/Archive/Inbound_Logistics/Info"))("queryParams",t.VKq(16,Ir,i.afterSubmitData.ID)),t.xp6(1),t.AsE("",i.state," Logistics #",i.afterSubmitData.DeliveryNumber,""),t.xp6(1),t.Q6J("ngIf",i.items.length>0))},dependencies:[d.sg,d.O5,c.rH,d.JJ,N.qU],changeDetection:0})),n})(),Ht=(()=>{class n{constructor(){(0,r.Z)(this,"form",void 0),(0,r.Z)(this,"tinyEditorApiKey","zc58cdrrftek5r5igtmjiar7ed4n3wr00hzd4w4mvtx8mpxa")}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-tinymce-note"]],inputs:{form:"form"},decls:6,vars:1,consts:[[1,"card-header"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body"],["height","220px",3,"value","valueChange"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._UZ(2,"i",1),t._uU(3,"Note "),t.qZA()(),t.TgZ(4,"div",2)(5,"POS-tinymce-editor",3),t.NdJ("valueChange",function(l){return i.form.Header.Note=l}),t.qZA()()),2&e&&(t.xp6(5),t.Q6J("value",i.form.Header.Note))},dependencies:[vt.V],changeDetection:0})),n})();var Or=s(18810),Vt=s(29766);function Mr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",6)(2,"p-chips",7),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectedSerialCode=o)})("onFocus",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.onFocusAddSerial())})("onBlur",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.onBlurAddSerial())}),t.qZA(),t.TgZ(3,"button",8),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.submitSerial())}),t._UZ(4,"i",9),t.TgZ(5,"strong",10),t._uU(6,"ADD"),t.qZA()()(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("placeholder","E.g. Serial1 Serial2")("allowDuplicate",!1)("ngModel",e.selectedSerialCode)("disabled",e.isStateEdit)}}function Ar(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ng-select",11),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectedSerialCode=o)})("change",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectSerial(o))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("items",e.serialSources)("multiple",!0)("ngModel",e.selectedSerialCode)("disabled",e.isStateEdit)}}function Sr(n,a){1&n&&t._UZ(0,"th",20)}function qr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",23)(1,"i",24),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index,l=t.oxw(3);return t.KtG(l.onRemoveSerial(o))}),t.qZA()()}}function Nr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr"),t.YNc(1,qr,2,0,"td",21),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"input",22),t.NdJ("ngModelChange",function(o){const p=t.CHM(e).$implicit;return t.KtG(p.Qty=o)}),t.qZA()()()}if(2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!i.isStateEdit),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Q6J("ngModel",e.Qty)("disabled",i.isStateEdit)}}function wr(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",12)(2,"div",13)(3,"table",14)(4,"thead",15)(5,"tr"),t.YNc(6,Sr,1,0,"th",16),t.TgZ(7,"th",17),t._uU(8,"Serial"),t.qZA(),t.TgZ(9,"th",18),t._uU(10,"Quantity"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,Nr,6,4,"tr",19),t.qZA()()()(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(6),t.Q6J("ngIf",!e.isStateEdit),t.xp6(6),t.Q6J("ngForOf",e.selectedSerial)}}function Pr(n,a){if(1&n&&(t.ynx(0),t.YNc(1,Mr,7,4,"ng-container",2),t.YNc(2,Ar,1,4,"ng-template",null,4,t.W1O),t.YNc(4,wr,13,2,"ng-container",5),t.BQk()),2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("ngIf",i.isEmptySerial&&"Inbound_Logistics"==i.state)("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",i.selectedSerial.length>0)}}function Ur(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"textarea",26),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.note=o)}),t.qZA(),t.TgZ(2,"label",27),t._uU(3,"Note"),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.note)}}let Jr=(()=>{class n{constructor(e,i,o,l,p){(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"logisticProductService",void 0),(0,r.Z)(this,"productService",void 0),(0,r.Z)(this,"config",void 0),(0,r.Z)(this,"note",void 0),(0,r.Z)(this,"entityID",void 0),(0,r.Z)(this,"isSerialized",!1),(0,r.Z)(this,"selectedSerial",[]),(0,r.Z)(this,"serialSources",[]),(0,r.Z)(this,"selectedSerialCode",void 0),(0,r.Z)(this,"isFocusInputSerial",!1),(0,r.Z)(this,"isEmptySerial",!1),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"isStateEdit",void 0),this.data=e,this.dialogRef=i,this.toastr=o,this.logisticProductService=l,this.productService=p,this.config=new q.O,this.config.title=e?.name,this.config.customWidth="550px",this.note=e?.note,this.entityID=l.entityID,this.state=this.data.state,this.isStateEdit=this.data.isEdit,this.initItemSerial()}initItemSerial(){if(this.data?.item.TypeID==V.J.Serialized){let e=this.data?.item?.serialSources;this.isEmptySerial=0==e?.length,this.isSerialized=!0,this.initSerialSources(),this.initSelectedSerial(this.data?.item.Serial?this.data?.item.Serial:[]),this.mapSerialToCode()}}initSerialSources(){this.isEmptySerial&&"Outbound_Logistics"==this.state?this.productService.getVariantSerial(this.entityID,this.data?.item?.VariantID).pipe((0,Nt.U)(e=>e.map(i=>({Code:i.Serial,Qty:i.Quantity})))).subscribe(e=>{this.serialSources=e}):this.serialSources=this.data?.item?.serialSources}initSelectedSerial(e){this.selectedSerial=e?.map((i,o)=>({Code:i.Code,Qty:i.Qty}))}mapSerialToCode(){this.selectedSerialCode=this.selectedSerial.map(e=>e.Code)}onSelectSerial(e){this.selectedSerial=e.map(i=>({Code:i.Code,Qty:1}))}onRemoveSerial(e){this.selectedSerial.splice(e,1),this.mapSerialToCode()}onFocusAddSerial(){this.isFocusInputSerial=!0}onBlurAddSerial(){this.isFocusInputSerial=!1}submitSerial(){const e=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...e],this.selectedSerialCode=[]}generateSerialData(){let e;return this.selectedSerialCode=this.selectedSerialCode.filter(o=>-1==this.selectedSerial.findIndex(l=>l.Code==o)),this.selectedSerialCode.map(o=>(e=this.serialSources.find(l=>l.Code==o),{Code:o,Qty:1}))}onClose(){this.dialogRef.close()}onOk(){this.isFocusInputSerial||(this.isSerialized?this.selectedSerial.length>0?this.onCloseDialog():this.generateSerialFromCode():this.dialogRef.close({note:this.note,serials:[]}))}generateSerialFromCode(){this.selectedSerialCode.length>0?(this.selectedSerial=this.generateSerialData(),this.onCloseDialog()):this.toastr.warning("Serials cannot be empty","Warning!")}onCloseDialog(){if(this.calculateSerialQty()>this.data?.item?.Quantity)return void this.toastr.warning("Quantity of serials cannot be more than Item Quantity","Warning!");const i=this.getSubmitedSerialData();this.dialogRef.close({note:this.note,serials:i})}getSubmitedSerialData(){return this.selectedSerial.map(i=>({Code:i.Code,Qty:i.Qty}))}calculateSerialQty(){return this.selectedSerial?.map(i=>i.Qty)?.reduce((i,o)=>i+o)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so),t.Y36(v._W),t.Y36(bt),t.Y36(Or.y))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-item-note"]],decls:6,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],[4,"ngIf","ngIfElse"],["notSerialized",""],["SERIAL_OPTIONS",""],[4,"ngIf"],[1,"input-group","mb-3"],[3,"placeholder","allowDuplicate","ngModel","disabled","ngModelChange","onFocus","onBlur"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-3"],[1,"headings-font-family","h4","font-weight-bold"],["appendTo","body","bindValue","Code","bindLabel","Code","placeholder","Select Serial",1,"outlet-multiple",3,"items","multiple","ngModel","disabled","ngModelChange","change"],[1,"row","mt-8"],[1,"col-12"],[1,"table","table-bordered"],[1,"thead-light"],["class","border-end","style","width: 40px",4,"ngIf"],[1,"border-end"],[1,"border-end","text-end",2,"width","60px"],[4,"ngFor","ngForOf"],[1,"border-end",2,"width","40px"],["class","text-center",4,"ngIf"],["type","text","placeholder","Qty","autoNum","",1,"form-control","text-end",3,"ngModel","disabled","ngModelChange"],[1,"text-center"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"],[1,"form-floating-outline"],["name","note","id","note","cols","60","rows","8",1,"form-control",2,"width","100%",3,"ngModel","ngModelChange"],["for","note"]],template:function(e,i){if(1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),t.TgZ(1,"content")(2,"div",1),t.YNc(3,Pr,5,3,"ng-container",2),t.YNc(4,Ur,4,1,"ng-template",null,3,t.W1O),t.qZA()()()),2&e){const o=t.MAs(5);t.Q6J("config",i.config),t.xp6(3),t.Q6J("ngIf",i.isSerialized)("ngIfElse",o)}},dependencies:[d.sg,d.O5,w.M,_.Fj,_.JJ,_.On,K.b,C.w9,Vt.cL],styles:["p-chips[_ngcontent-%COMP%] ul.p-inputtext{width:425px;max-width:570px;border:1px solid #C8D3DF;border-top-right-radius:0;border-bottom-right-radius:0}p-chips[_ngcontent-%COMP%] ul.p-inputtext li.p-chips-input-token>input[type=text]{border:none}p-chips[_ngcontent-%COMP%] .p-chips .p-chips-multiple-container:not(.p-disabled):hover{border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container{display:inline-block}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container .p-chips-token{margin:2px;background:#96bf48}"],changeDetection:0})),n})();function Fr(n,a){1&n&&(t.TgZ(0,"th",9),t._uU(1," Pack Size"),t.qZA())}function Lr(n,a){if(1&n&&t._UZ(0,"p",24),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",null==e?null:e.Note,t.oJD)}}function Qr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",25),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.QuantityDelivered=o)}),t.qZA()}if(2&n){const e=t.oxw().$implicit,i=t.oxw();t.Q6J("ngModel",e.QuantityDelivered)("disabled",i.isEdit&&4==e.TypeID)}}function kr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",26),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.PackSize=o)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.PackSize)}}function Er(n,a){1&n&&(t.ynx(0),t._UZ(1,"i",27),t.BQk())}function Rr(n,a){1&n&&t._UZ(0,"i",28)}const Yr=function(n){return{ID:n}};function Hr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td")(2,"a",14),t._uU(3),t.qZA(),t._UZ(4,"app-serial-note",15),t.YNc(5,Lr,1,1,"p",16),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t.YNc(9,Qr,1,2,"input",17),t.qZA(),t.YNc(10,kr,2,1,"td",18),t.TgZ(11,"td",19),t._uU(12),t.qZA(),t.TgZ(13,"td",19),t._uU(14),t.qZA(),t.TgZ(15,"td",19),t._uU(16),t.qZA(),t.TgZ(17,"td",20)(18,"div",21),t.NdJ("click",function(){const o=t.CHM(e),l=o.$implicit,p=o.index,I=t.oxw();return t.KtG(I.openModalItemNote(l,p))}),t.YNc(19,Er,2,0,"ng-container",22),t.YNc(20,Rr,1,0,"ng-template",null,23,t.W1O),t.qZA()()()}if(2&n){const e=a.$implicit,i=t.MAs(21),o=t.oxw();t.xp6(2),t.Q6J("queryParams",t.VKq(12,Yr,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(1),t.Q6J("serials",e.Serial),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Q6J("ngIf",!e.Completed),t.xp6(1),t.Q6J("ngIf",o.isDeliveryPacking),t.xp6(2),t.hij(" ",e.Sent," "),t.xp6(2),t.hij(" ",e.Quantity," "),t.xp6(2),t.hij(" ",e.BarcodeCount," "),t.xp6(3),t.Q6J("ngIf",4==e.TypeID)("ngIfElse",i)}}let Kt=(()=>{class n{constructor(e){(0,r.Z)(this,"dialog",void 0),(0,r.Z)(this,"isDeliveryPacking",void 0),(0,r.Z)(this,"cartItems",void 0),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"isEdit",void 0),(0,r.Z)(this,"eventImport",void 0),this.dialog=e,this.eventImport=new t.vpe}openModalItemNote(e,i){this.dialog.open(Jr,{data:{note:e.Note,name:e.Name,item:e,state:this.state,isEdit:this.isEdit}}).afterClosed().pipe((0,J.h)(o=>u.gT.IsNotEmpty(o))).subscribe(o=>{e.TypeID==V.J.Serialized&&(e.Serial=o.serials,e.QuantityDelivered=this.calculateSerialQty(o.serials)),e.Note=o.note,this.updateCartItems(e,i)})}updateCartItems(e,i){this.cartItems=this.cartItems.map((o,l)=>(i==l&&(o=e),o))}calculateSerialQty(e=[]){let i=0;return e.forEach(o=>{i+=o.Qty}),i}onImport(){this.eventImport.emit()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-products-delivery-list"]],inputs:{isDeliveryPacking:"isDeliveryPacking",cartItems:"cartItems",state:"state",isEdit:"isEdit"},outputs:{eventImport:"eventImport"},decls:29,vars:4,consts:[[1,"card-header"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-box","me-5"],[1,"btn","btn-outline-secondary","py-3","px-5",3,"click"],["aria-hidden","true",1,"fa-solid","fa-download"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light","sticky-top-thead"],[1,"border-end"],[1,"border-end","text-end",2,"width","80px"],["class","border-end text-end","style","width: 80px",4,"ngIf"],[1,"border-end","text-end",2,"width","55px"],[1,"border-end",2,"width","55px"],[4,"ngFor","ngForOf"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",1,"d-block",3,"queryParams"],[3,"serials"],["class","special-TinyMCE fst-italic text-warning mb-0","style","word-break: break-all;",3,"innerHTML",4,"ngIf"],["autoNum","","class","form-control text-end","type","text",3,"ngModel","disabled","ngModelChange",4,"ngIf"],[4,"ngIf"],[1,"text-end"],[1,"text-center"],[3,"click"],[4,"ngIf","ngIfElse"],["STANDART",""],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],["autoNum","","type","text",1,"form-control","text-end",3,"ngModel","disabled","ngModelChange"],["type","text","autoNum","",1,"form-control",2,"direction","rtl",3,"ngModel","ngModelChange"],[1,"fa-solid","fa-barcode","cursor-pointer","fa-2x"],["matTooltip","Note","matTooltipPosition","above",1,"fa-regular","fa-note-sticky","fa-2x","cursor-pointer"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h2"),t._UZ(3,"i",2),t._uU(4,"Products "),t.qZA(),t.TgZ(5,"div")(6,"button",3),t.NdJ("click",function(){return i.onImport()}),t._UZ(7,"i",4),t._uU(8," Import "),t.qZA()()()(),t.TgZ(9,"div",5)(10,"table",6)(11,"thead",7)(12,"tr")(13,"th",8),t._uU(14,"Products"),t.qZA(),t.TgZ(15,"th",8),t._uU(16,"Code"),t.qZA(),t.TgZ(17,"th",9),t._uU(18,"Qty"),t.qZA(),t.YNc(19,Fr,2,0,"th",10),t.TgZ(20,"th",11),t._uU(21),t.qZA(),t.TgZ(22,"th",11),t._uU(23),t.qZA(),t.TgZ(24,"th",11),t._uU(25,"Count"),t.qZA(),t._UZ(26,"th",12),t.qZA()(),t.TgZ(27,"tbody"),t.YNc(28,Hr,22,14,"tr",13),t.qZA()()()),2&e&&(t.xp6(19),t.Q6J("ngIf",i.isDeliveryPacking),t.xp6(2),t.Oqu("Outbound_Logistics"==i.state?"Sent":"Received"),t.xp6(2),t.hij("Order","Inbound_Logistics"==i.state?"ed":""," "),t.xp6(5),t.Q6J("ngForOf",i.cartItems))},dependencies:[d.sg,d.O5,c.rH,_.Fj,_.JJ,_.On,K.b,S.gM,Y.B]})),n})();const Vr=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},Gt=function(n){return{ID:n}};function Kr(n,a){if(1&n&&(t.TgZ(0,"a",7),t._uU(1,"Cancel"),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("routerLink",t.DdM(2,Vr))("queryParams",t.VKq(3,Gt,e.param.ID||e.param.POID))}}const Gr=function(){return["/menu/Logistics/Archive/Outbound_Logistics"]};function Br(n,a){1&n&&(t.TgZ(0,"a",8),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Gr))}function jr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,Kr,2,5,"a",4),t.YNc(2,Br,2,2,"a",5),t.TgZ(3,"button",6),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.validate())}),t._uU(4),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.isEdit),t.xp6(1),t.Q6J("ngIf",!e.isEdit),t.xp6(2),t.Oqu(e.isEdit?"Save":"Add")}}function $r(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-button-toggle-group",21)(2,"mat-button-toggle",22),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.searchLogisticType="invoice")}),t._UZ(3,"i",23),t.qZA(),t.TgZ(4,"mat-button-toggle",24),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.searchLogisticType="customer")}),t._UZ(5,"i",25),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("checked","invoice"==e.searchLogisticType),t.xp6(2),t.Q6J("checked","customer"==e.searchLogisticType)}}function Wr(n,a){if(1&n&&(t.TgZ(0,"table",26)(1,"tr")(2,"th",27),t._uU(3,"Outlet"),t.qZA(),t.TgZ(4,"td"),t._uU(5,":"),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA()(),t.TgZ(8,"tr")(9,"th",27),t._uU(10,"Invoice"),t.qZA(),t.TgZ(11,"td"),t._uU(12,":"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA()(),t.TgZ(15,"tr")(16,"th",27),t._uU(17,"Date"),t.qZA(),t.TgZ(18,"td"),t._uU(19,":"),t.qZA(),t.TgZ(20,"td"),t._uU(21),t.ALo(22,"date"),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(7),t.Oqu(e.deliveryData.SalesOrder.EntityName),t.xp6(7),t.hij(" ",e.deliveryData.SalesOrder.Number," "),t.xp6(7),t.Oqu(t.xi3(22,3,e.deliveryData.SalesOrder.Date,"dd MMM yyyy"))}}function zr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",28)(2,"autocompleteV2",29),t.NdJ("onSelect",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.getUnfulfilledInvoices(o))}),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("inputTextValue",e.customerName)}}function Xr(n,a){1&n&&(t.TgZ(0,"div",10)(1,"div",34),t._uU(2," Outlet "),t.qZA(),t.TgZ(3,"div",35),t._uU(4," Date "),t.qZA(),t.TgZ(5,"div",35),t._uU(6," Number "),t.qZA()())}function tl(n,a){if(1&n&&(t.TgZ(0,"div",10)(1,"div",34),t._uU(2),t.ALo(3,"limitTo"),t.qZA(),t.TgZ(4,"div",35),t._uU(5),t.ALo(6,"date"),t.qZA(),t.TgZ(7,"div",35),t._uU(8),t.qZA()()),2&n){const e=a.item;t.xp6(2),t.hij(" ",t.xi3(3,3,e.Value.EntityName,25)," "),t.xp6(3),t.hij(" ",t.xi3(6,6,e.Value.Date,"dd MMM yyyy")," "),t.xp6(3),t.hij(" ",e.Value.Number," ")}}function el(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ng-select",31),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw(4);return t.KtG(l.findSalesOrderAutoComplete(o))}),t.ALo(1,"async"),t.YNc(2,Xr,7,0,"ng-template",32),t.YNc(3,tl,9,9,"ng-template",33),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("items",t.lcZ(1,4,e.orders$))("typeahead",e.orderInput$)("ngModel",e.selectedSOID)("readonly",e.isEdit||e.isPO)}}function nl(n,a){if(1&n&&t.YNc(0,el,4,6,"ng-select",30),2&n){const e=t.oxw(3);t.Q6J("ngIf",!(e.isEdit||e.isPO))}}function il(n,a){1&n&&(t.TgZ(0,"div",10)(1,"div",37),t._uU(2," Outlet "),t.qZA(),t.TgZ(3,"div",35),t._uU(4," Date "),t.qZA(),t.TgZ(5,"div",38),t._uU(6," Number "),t.qZA()())}function ol(n,a){if(1&n&&(t.TgZ(0,"div",10)(1,"div",37),t._uU(2),t.ALo(3,"limitTo"),t.qZA(),t.TgZ(4,"div",35),t._uU(5),t.ALo(6,"date"),t.qZA(),t.TgZ(7,"div",39),t._uU(8),t.qZA()()),2&n){const e=a.item;t.xp6(2),t.hij(" ",t.xi3(3,3,e.EntityName,25)," "),t.xp6(3),t.hij(" ",t.xi3(6,6,e.Date,"dd MMM yyyy")," "),t.xp6(3),t.hij(" ",e.Number," ")}}function al(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"ng-select",36),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.findSalesOrderByCustomer(o))}),t.YNc(2,il,7,0,"ng-template",32),t.YNc(3,ol,9,9,"ng-template",33),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("items",e.unfulfilledInvoices)}}function rl(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",42),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(6),t.Oqu(e.deliveryData.Customer.Mobile)}}function ll(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",42),t._uU(2,"City"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t._UZ(5,"td",44),t.qZA()),2&n){const e=t.oxw(4);t.xp6(5),t.Q6J("innerHTML",e.deliveryData.Customer.Address,t.oJD)}}const cl=function(){return["/menu/Contacts/Contact/Customers/Info"]};function sl(n,a){if(1&n&&(t.TgZ(0,"div",12)(1,"div",40)(2,"h2"),t._UZ(3,"i",41),t._uU(4,"Customer "),t.qZA()(),t.TgZ(5,"div",15)(6,"table",26)(7,"tr")(8,"th",42),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"td"),t._uU(11,":"),t.qZA(),t.TgZ(12,"td")(13,"a",43),t._uU(14),t.qZA()()(),t.YNc(15,rl,7,1,"tr",2),t.YNc(16,ll,6,1,"tr",2),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(13),t.Q6J("routerLink",t.DdM(5,cl))("queryParams",t.VKq(6,Gt,e.deliveryData.Customer.ID)),t.xp6(1),t.Oqu(e.deliveryData.Customer.Name),t.xp6(1),t.Q6J("ngIf",e.deliveryData.Customer.Mobile),t.xp6(1),t.Q6J("ngIf",e.deliveryData.Customer.Address)}}function dl(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",42),t._uU(2,"Name"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(6),t.Oqu(e.deliveryData.Recipient.Name)}}function pl(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",42),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(6),t.Oqu(e.deliveryData.Recipient.Phone)}}function _l(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",42),t._uU(2,"City"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t._UZ(5,"td",44),t.qZA()),2&n){const e=t.oxw(4);t.xp6(5),t.Q6J("innerHTML",e.deliveryData.Recipient.Address,t.oJD)}}function ml(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",42),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(6),t.Oqu(e.deliveryData.Recipient.City)}}function ul(n,a){if(1&n&&(t.TgZ(0,"div",12)(1,"div",40)(2,"h2"),t._UZ(3,"i",41),t._uU(4,"Recipient "),t.qZA()(),t.TgZ(5,"div",15)(6,"table",26),t.YNc(7,dl,7,1,"tr",2),t.YNc(8,pl,7,1,"tr",2),t.YNc(9,_l,6,1,"tr",2),t.YNc(10,ml,7,1,"tr",2),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(7),t.Q6J("ngIf",e.deliveryData.Recipient.Name),t.xp6(1),t.Q6J("ngIf",e.deliveryData.Recipient.Phone),t.xp6(1),t.Q6J("ngIf",e.deliveryData.Recipient.Address),t.xp6(1),t.Q6J("ngIf",e.deliveryData.Recipient.City)}}function gl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",40)(2,"h2"),t._UZ(3,"i",45),t._uU(4,"Fulfillment "),t.qZA()(),t.TgZ(5,"div",15)(6,"table",46)(7,"tr")(8,"th",42),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"td"),t._uU(11,":"),t.qZA(),t.TgZ(12,"td")(13,"ng-select",47),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.EntityID=o)}),t.qZA()()(),t.TgZ(14,"tr")(15,"th",42),t._uU(16,"Date"),t.qZA(),t.TgZ(17,"td"),t._uU(18,":"),t.qZA(),t.TgZ(19,"td")(20,"datepicker",48),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Date=o)}),t.qZA()()(),t.TgZ(21,"tr")(22,"th",42),t._uU(23,"Number"),t.qZA(),t.TgZ(24,"td"),t._uU(25,":"),t.qZA(),t.TgZ(26,"td")(27,"input",49),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Number=o)}),t.qZA()()(),t.TgZ(28,"tr")(29,"th",42),t._uU(30,"Courier"),t.qZA(),t.TgZ(31,"td"),t._uU(32,":"),t.qZA(),t.TgZ(33,"td")(34,"ng-select",50),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.CourierID=o)}),t.qZA()()()()()()}if(2&n){const e=t.oxw(3);t.xp6(13),t.Q6J("readonly",e.isEdit&&!e.isPO)("items",e.storage.Entities)("ngModel",e.form.Header.EntityID),t.xp6(7),t.Q6J("isFloatingLabel",!1)("date",e.form.Header.Date),t.xp6(7),t.Q6J("ngModel",e.form.Header.Number),t.xp6(7),t.Q6J("items",e.storage.Courier)("ngModel",e.form.Header.CourierID)}}function fl(n,a){if(1&n&&(t.TgZ(0,"div",51)(1,"div",12),t._UZ(2,"POS-products-delivery-list",52),t.qZA(),t.TgZ(3,"div",12),t._UZ(4,"POS-tinymce-note",53),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("isEdit",e.isEdit)("isDeliveryPacking",e.isDeliveryPacking)("cartItems",e.cartItems),t.xp6(2),t.Q6J("form",e.form)}}function hl(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"h2"),t._UZ(6,"i",14),t._uU(7,"Sales Order "),t.qZA(),t.YNc(8,$r,6,2,"ng-container",2),t.qZA(),t.TgZ(9,"div",15),t.YNc(10,Wr,23,6,"table",16),t.YNc(11,zr,3,1,"ng-container",17),t.YNc(12,nl,1,1,"ng-template",null,18,t.W1O),t.YNc(14,al,4,1,"div",2),t.qZA()(),t.YNc(15,sl,17,8,"div",19),t.YNc(16,ul,11,4,"div",19),t.YNc(17,gl,35,8,"div",19),t.qZA(),t.YNc(18,fl,5,4,"div",20),t.qZA()()),2&n){const e=t.MAs(13),i=t.oxw(2);t.xp6(8),t.Q6J("ngIf",!i.isEdit&&!i.isPO),t.xp6(2),t.Q6J("ngIf",(i.isEdit||i.isPO)&&i.deliveryData),t.xp6(1),t.Q6J("ngIf","customer"==i.searchLogisticType)("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",i.unfulfilledInvoices.length>0&&"customer"==i.searchLogisticType),t.xp6(1),t.Q6J("ngIf",null==i.deliveryData||null==i.deliveryData.Customer?null:i.deliveryData.Customer.ID),t.xp6(1),t.Q6J("ngIf",null==i.deliveryData||null==i.deliveryData.Recipient?null:i.deliveryData.Recipient.ID),t.xp6(1),t.Q6J("ngIf",i.deliveryData),t.xp6(1),t.Q6J("ngIf",i.deliveryData)}}function xl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"POS-complete-customer-supplier",54),t.NdJ("undo",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.undo(o))})("newForm",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.newForm())}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function Cl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("barcodeQueryChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.onScanBarcode(o))}),t.TgZ(1,"actions"),t.YNc(2,jr,5,3,"ng-container",2),t.qZA(),t.TgZ(3,"content"),t.YNc(4,hl,19,9,"div",3),t.YNc(5,xl,2,2,"div",3),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",!e.isComplete),t.xp6(2),t.Q6J("ngIf",!e.isComplete),t.xp6(1),t.Q6J("ngIf",e.isComplete)}}let Zl=(()=>{class n extends tt.U{constructor(e,i,o,l){super(e,"OutboundLogisticsLoader/GetStorage",i),(0,r.Z)(this,"productService",void 0),(0,r.Z)(this,"formService",void 0),(0,r.Z)(this,"storage",void 0),(0,r.Z)(this,"deliveryData",void 0),(0,r.Z)(this,"isEdit",void 0),(0,r.Z)(this,"form",void 0),(0,r.Z)(this,"param",void 0),(0,r.Z)(this,"isDeliveryPacking",void 0),(0,r.Z)(this,"configBarcodeCount",void 0),(0,r.Z)(this,"orderInvoice",void 0),(0,r.Z)(this,"isComplete",void 0),(0,r.Z)(this,"afterSubmitData",void 0),(0,r.Z)(this,"isPO",void 0),(0,r.Z)(this,"searchLogisticType",void 0),(0,r.Z)(this,"orderInput$",new xt.x),(0,r.Z)(this,"orders$",void 0),(0,r.Z)(this,"selectedSOID",void 0),(0,r.Z)(this,"customerName",void 0),(0,r.Z)(this,"unfulfilledInvoices",[]),this.productService=o,this.formService=l,this.form={Header:{},Items:[]},this.searchLogisticType="invoice"}handleF8(){this.isComplete&&this.newForm()}initializeFormState(){this.param=this.route.snapshot.queryParams,u.gT.IsEmpty(this.param.POID)&&u.gT.IsEmpty(this.param.ID)?(this.isEdit=!1,this.initOrderNumberOptions()):u.gT.IsNotEmpty(this.param.POID)?(this.isPO=!0,this.getDeliveryItems(this.param.POID)):(this.isEdit=!0,this.isPO=!1,this.getDeliveryItems(this.param.ID))}initOrderNumberOptions(){this.orders$=this.orderInput$.pipe((0,J.h)(e=>null!=e&&(""==e||e.length>=3)),(0,fr.x)(),(0,hr.b)(500),(0,xr.O)(""),(0,Cr.w)(e=>this.httpService.post("/API/AC/SearchUnfulfilledOrderByNumber",JSON.stringify({prefix:e,count:20}))))}initOrderNumberOnEdit(){if(this.isEdit||this.isPO){let e={Key:this.deliveryData.SalesOrder.ID,Value:this.deliveryData.SalesOrder};e.Value.Display=`${this.deliveryData.SalesOrder.Number} - ${this.deliveryData.SalesOrder.EntityName} - ${this.deliveryData.SalesOrder.Date}`,this.orders$=(0,Zr.of)([e]),this.selectedSOID=e.Key}}postBindForm(e){this.storage=e,this.isDeliveryPacking=e.AppConfigJSON.DeliveryPacking,this.configBarcodeCount=e.AppConfigJSON.ModuleDelivery.CustomerDelivery.QtyCount,this.initializeFormState(),!this.isEdit&&!this.isPO&&this.setFocusToAutoComplete()}setFocusToAutoComplete(){setTimeout(()=>{let e=document.getElementById("customerName");e&&e.focus()},100)}validate(){this.formService.validate(this.cartItems,this.configBarcodeCount,this.isEdit)&&(this.form.Items=this.formService.convertCartItemsToForm(this.cartItems),this.data.Form=this.form,this.isEdit&&(this.data.Form.Mode=1),this.onSubmit("OutDelivery/SubmitOrder"))}findSalesOrderByCustomer(e){u.gT.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}findSalesOrderAutoComplete(e){u.gT.IsNotEmpty(e)?this.getDeliveryItems(e.Key):this.orderInput$.next("")}getDeliveryItems(e){let i,o;this.isPO||!this.isEdit?(i="GetByPOID",this.form.Header.CustomerPOID=e,o={POID:this.param.POID||e}):(i="GetByID",o={ID:this.param.ID}),this.httpService.post(`/API/OutDelivery/${i}`,JSON.stringify(o)).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,this.initOrderNumberOnEdit(),u.gT.IsNotEmpty(this.deliveryData.Data)&&(this.productService.formItems=this.deliveryData.Data.Items),this.productService.bindCartItems(e.OrderedItems,e.SentItems,this.isEdit),this.orderInvoice=e.Label,this.isPO||!this.isEdit?(this.form.Header.Number=e.SalesOrder.GenerateDeliveryNumber,this.form.Header.Date=new Date,u.gT.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.SalesOrder.EntityID),this.form.Header.Note=e.SalesOrder.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(u.gT.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Outbound #${this.form.Header.Number}`),this.productService.entityID=this.form.Header.EntityID}}onScanBarcode(e){this.productService.onScanBarcode(e)}get cartItems(){return this.productService.cartItems}newForm(){this.formService.newForm("Outbound_Logistics")}onSubmitSuccess(e){this.isComplete=!0,this.afterSubmitData=e}undo(e){this.formService.undo(e,"Outbound_Logistics")}assignDefaultWarehouse(e){const i=this.storage.Entities.find(o=>o.ID==e);u.gT.IsNotEmpty(i)&&(this.form.Header.EntityID=i.ID)}getUnfulfilledInvoices(e){this.httpService.post("/API/OutDelivery/GetUnfulfilledOrdersByCustomerID",JSON.stringify({id:e})).subscribe(i=>this.unfulfilledInvoices=i)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(bt),t.Y36(Et))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-outbound-logistics-form"]],hostBindings:function(e,i){1&e&&t.NdJ("keydown.F8",function(l){return i.handleF8(l)},!1,t.Jf7)},features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange",4,"ngIf"],[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange"],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success","ms-5",3,"click"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-4","col-lg-12","col-xl-4","col-sm-12","sales-order"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa-solid","fa-receipt","me-5"],[1,"card-body"],["class","table-sm table-borderless",4,"ngIf"],[4,"ngIf","ngIfElse"],["INVOICE",""],["class","card",4,"ngIf"],["class","col-xs-12 col-md-8 col-lg-12 col-xl-8 col-sm-12",4,"ngIf"],["name","fontStyle","aria-label","Font Style",2,"height","30px"],["matTooltipPosition","above","matTooltip","Search by Invoice Number",1,"w-100","toggle-search",3,"checked","click"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Customer",1,"w-100","toggle-search",3,"checked","click"],[1,"fa-solid","fa-address-book"],[1,"table-sm","table-borderless"],[2,"width","50px"],[1,"form-floating-outline","mt-3"],["inputID","customerName","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer Name","notFoundMessageFor","customer",1,"w-100",3,"inputTextValue","onSelect"],["bindLabel","Value.Display","bindValue","Key","placeholder","Invoice Number",3,"items","typeahead","ngModel","readonly","change",4,"ngIf"],["bindLabel","Value.Display","bindValue","Key","placeholder","Invoice Number",3,"items","typeahead","ngModel","readonly","change"],["ng-header-tmp",""],["ng-option-tmp",""],[1,"col-6"],[1,"col-3"],["appendTo","body","bindLabel","Number","bindValue","Key",1,"custom-panel-dropdown",3,"items","change"],[1,"col-5"],[1,"col-4"],[1,"col-4","text-wrap"],[1,"card-header"],[1,"fa-solid","fa-address-card","me-5"],[2,"width","55px"],["target","_blank",3,"routerLink","queryParams"],[3,"innerHTML"],[1,"fa-solid","fa-truck","me-5"],[1,"table-sm"],["bindLabel","Name","bindValue","ID",1,"p-0",2,"width","200px",3,"readonly","items","ngModel","ngModelChange"],["width","80","appearance","outline",1,"p-0",3,"isFloatingLabel","date","dateChange"],["type","text",1,"form-control","ps-4",2,"height","35px !important","width","100%","width","200px",3,"ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID",1,"p-0",2,"width","200px",3,"items","ngModel","ngModelChange"],[1,"col-xs-12","col-md-8","col-lg-12","col-xl-8","col-sm-12"],["state","Outbound_Logistics",3,"isEdit","isDeliveryPacking","cartItems"],[3,"form"],["state","Outbound",3,"afterSubmitData","items","undo","newForm"]],template:function(e,i){1&e&&t.YNc(0,Cl,6,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.storage)},dependencies:[d.O5,c.rH,_.Fj,_.JJ,_.On,b.p,y.QB,k.J,C.w9,C.ir,C.Cm,j.A9,j.Yi,S.gM,Yt,Ht,Kt,d.Ov,d.uU,N.OI],styles:["datepicker[_ngcontent-%COMP%] div.mat-mdc-text-field-wrapper{padding-bottom:0!important}autocompleteV2[_ngcontent-%COMP%] input{font-size:16px} mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:30px!important}"]})),n})();var vl=s(99036);let Tl=(()=>{class n{constructor(e,i,o){(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"convertCsvService",void 0),(0,r.Z)(this,"modalConfig",void 0),(0,r.Z)(this,"convertedData",void 0),this.data=e,this.dialogRef=i,this.convertCsvService=o,this.modalConfig=new q.O,this.modalConfig.title=e.title}onSelectFile(e){this.convertCsvService.convert(e).subscribe(i=>{this.convertedData=i})}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(this.convertedData)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.WI),t.Y36(g.so),t.Y36(vl.A))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["app-modal-import"]],decls:14,vars:1,consts:[[3,"config","onOk","onCancel","onClose"],[1,"modal-dialog"],[1,"modal-content","border-0"],["href","//res.cloudinary.com/pos/raw/upload/v1671075053/POS/CSV/Inbound_QTY.csv",1,"noteBox"],[1,"d-flex","justify-content-between"],["accept",".csv","id","csv","type","file","name","myfile",1,"form-control",3,"change"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),t.TgZ(1,"content",1)(2,"div",2)(3,"div")(4,"a",3),t._uU(5,"Download Sample File"),t.qZA()(),t.TgZ(6,"div",4)(7,"table")(8,"tbody")(9,"tr")(10,"th"),t._uU(11," CSV: "),t.qZA(),t.TgZ(12,"td")(13,"input",5),t.NdJ("change",function(l){return i.onSelectFile(l.target)}),t.qZA()()()()()()()()()),2&e&&t.Q6J("config",i.modalConfig)},dependencies:[w.M],styles:[".noteBox[_ngcontent-%COMP%]{background-color:#ffffe1;border:1px solid #cacaca;padding:3px;display:block;outline:0;margin-bottom:5px;font-size:11px;text-decoration:none}"]})),n})();const bl=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]},Bt=function(n){return{ID:n}};function Dl(n,a){if(1&n&&(t.TgZ(0,"a",7),t._uU(1,"Cancel"),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("routerLink",t.DdM(2,bl))("queryParams",t.VKq(3,Bt,e.param.ID||e.param.POID))}}const yl=function(){return["/menu/Logistics/Archive/Inbound_Logistics"]};function Il(n,a){1&n&&(t.TgZ(0,"a",8),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,yl))}function Ol(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,Dl,2,5,"a",4),t.YNc(2,Il,2,2,"a",5),t.TgZ(3,"button",6),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.validate())}),t._uU(4),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.isEdit),t.xp6(1),t.Q6J("ngIf",!e.isEdit),t.xp6(2),t.Oqu(e.isEdit?"Save":"Add")}}function Ml(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-button-toggle-group",20)(2,"mat-button-toggle",21),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.searchLogisticType="invoice")}),t._UZ(3,"i",22),t.qZA(),t.TgZ(4,"mat-button-toggle",23),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.searchLogisticType="customer")}),t._UZ(5,"i",24),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("checked","invoice"==e.searchLogisticType),t.xp6(2),t.Q6J("checked","customer"==e.searchLogisticType)}}function Al(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",25)(2,"autocompleteV2",26),t.NdJ("onSelect",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.getDeliveryItems(o))}),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("inputTextValue",e.orderInvoice)}}function Sl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"autocompleteV2",27),t.NdJ("onSelect",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.getUnfulfilledInvoices(o))}),t.qZA()()}}function ql(n,a){1&n&&(t.TgZ(0,"div",10)(1,"div",31),t._uU(2," Outlet "),t.qZA(),t.TgZ(3,"div",32),t._uU(4," Date "),t.qZA(),t.TgZ(5,"div",11),t._uU(6," Number "),t.qZA()())}function Nl(n,a){if(1&n&&(t.TgZ(0,"div",10)(1,"div",31),t._uU(2),t.ALo(3,"limitTo"),t.qZA(),t.TgZ(4,"div",32),t._uU(5),t.ALo(6,"date"),t.qZA(),t.TgZ(7,"div",33),t._uU(8),t.qZA()()),2&n){const e=a.item;t.xp6(2),t.hij(" ",t.xi3(3,3,e.EntityName,25)," "),t.xp6(3),t.hij(" ",t.xi3(6,6,e.Date,"dd MMM yyyy")," "),t.xp6(3),t.hij(" ",e.Number," ")}}function wl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"ng-select",28),t.NdJ("change",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.findSalesOrderByCustomer(o))}),t.YNc(2,ql,7,0,"ng-template",29),t.YNc(3,Nl,9,9,"ng-template",30),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("items",e.unfulfilledInvoices)}}const Pl=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function Ul(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",37),t._uU(2,"Name"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td")(6,"a",38),t._uU(7),t.qZA()()()),2&n){const e=t.oxw(4);t.xp6(6),t.Q6J("routerLink",t.DdM(3,Pl))("queryParams",t.VKq(4,Bt,e.deliveryData.SupplierContact.ID)),t.xp6(1),t.hij(" ",null==e.deliveryData?null:e.deliveryData.SupplierContact.Name," ")}}function Jl(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",37),t._uU(2,"Phone"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(6),t.Oqu(null==e.deliveryData?null:e.deliveryData.SupplierContact.Phone)}}function Fl(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",37),t._uU(2,"City"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t._UZ(5,"td",39),t.qZA()),2&n){const e=t.oxw(4);t.xp6(5),t.Q6J("innerHTML",null==e.deliveryData?null:e.deliveryData.SupplierContact.Address,t.oJD)}}function Ll(n,a){if(1&n&&(t.TgZ(0,"div",12)(1,"div",34)(2,"h2"),t._UZ(3,"i",35),t._uU(4,"Supplier "),t.qZA()(),t.TgZ(5,"div",15)(6,"table",36),t.YNc(7,Ul,8,6,"tr",2),t.YNc(8,Jl,7,1,"tr",2),t.YNc(9,Fl,6,1,"tr",2),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(7),t.Q6J("ngIf",null==e.deliveryData?null:e.deliveryData.SupplierContact.Name),t.xp6(1),t.Q6J("ngIf",null==e.deliveryData?null:e.deliveryData.SupplierContact.Phone),t.xp6(1),t.Q6J("ngIf",null==e.deliveryData?null:e.deliveryData.SupplierContact.Address)}}function Ql(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",12)(1,"div",34)(2,"h2"),t._UZ(3,"i",40),t._uU(4,"Fulfillment "),t.qZA()(),t.TgZ(5,"div",15)(6,"table",41)(7,"tr")(8,"th",37),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"td"),t._uU(11,":"),t.qZA(),t.TgZ(12,"td")(13,"ng-select",42),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.EntityID=o)}),t.qZA()()(),t.TgZ(14,"tr")(15,"th",37),t._uU(16,"Date"),t.qZA(),t.TgZ(17,"td"),t._uU(18,":"),t.qZA(),t.TgZ(19,"td")(20,"datepicker",43),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Date=o)}),t.qZA()()(),t.TgZ(21,"tr")(22,"th",37),t._uU(23,"Due"),t.qZA(),t.TgZ(24,"td"),t._uU(25,":"),t.qZA(),t.TgZ(26,"td")(27,"datepicker",43),t.NdJ("dateChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.PaymentDue=o)}),t.qZA()()(),t.TgZ(28,"tr")(29,"th",37),t._uU(30,"Number"),t.qZA(),t.TgZ(31,"td"),t._uU(32,":"),t.qZA(),t.TgZ(33,"td")(34,"input",44),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Number=o)}),t.qZA()()(),t.TgZ(35,"tr")(36,"th",37),t._uU(37,"Courier"),t.qZA(),t.TgZ(38,"td"),t._uU(39,":"),t.qZA(),t.TgZ(40,"td")(41,"ng-select",45),t.NdJ("ngModelChange",function(o){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.CourierID=o)}),t.qZA()()()()()()}if(2&n){const e=t.oxw(3);t.xp6(13),t.Q6J("readonly",e.isEdit&&!e.isPO)("items",e.storage.Entities)("ngModel",e.form.Header.EntityID),t.xp6(7),t.Q6J("isFloatingLabel",!1)("date",e.form.Header.Date),t.xp6(7),t.Q6J("isFloatingLabel",!1)("date",e.form.Header.PaymentDue),t.xp6(7),t.Q6J("ngModel",e.form.Header.Number),t.xp6(7),t.Q6J("items",e.storage.Courier)("ngModel",e.form.Header.CourierID)}}function kl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",46)(1,"div",12)(2,"POS-products-delivery-list",47),t.NdJ("eventImport",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.onImport())}),t.qZA()(),t.TgZ(3,"div",12),t._UZ(4,"POS-tinymce-note",48),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("isEdit",e.isEdit)("cartItems",e.cartItems),t.xp6(2),t.Q6J("form",e.form)}}function El(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"h2"),t._UZ(6,"i",14),t._uU(7,"Purchase Order "),t.qZA(),t.YNc(8,Ml,6,2,"ng-container",2),t.qZA(),t.TgZ(9,"div",15),t.YNc(10,Al,3,1,"ng-container",16),t.YNc(11,Sl,2,0,"ng-template",null,17,t.W1O),t.YNc(13,wl,4,1,"div",2),t.qZA()(),t.YNc(14,Ll,10,3,"div",18),t.YNc(15,Ql,42,10,"div",18),t.qZA(),t.YNc(16,kl,5,3,"div",19),t.qZA()()),2&n){const e=t.MAs(12),i=t.oxw(2);t.xp6(8),t.Q6J("ngIf",!i.isEdit&&!i.isPO),t.xp6(2),t.Q6J("ngIf","invoice"==i.searchLogisticType)("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",i.unfulfilledInvoices.length>0&&"customer"==i.searchLogisticType),t.xp6(1),t.Q6J("ngIf",null==i.deliveryData||null==i.deliveryData.SupplierContact?null:i.deliveryData.SupplierContact.ID),t.xp6(1),t.Q6J("ngIf",i.deliveryData),t.xp6(1),t.Q6J("ngIf",i.deliveryData)}}function Rl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"POS-complete-customer-supplier",49),t.NdJ("undo",function(o){t.CHM(e);const l=t.oxw(2);return t.KtG(l.undo(o))})("newForm",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.newForm())}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function Yl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("barcodeQueryChange",function(o){t.CHM(e);const l=t.oxw();return t.KtG(l.onScanBarcode(o))}),t.TgZ(1,"actions"),t.YNc(2,Ol,5,3,"ng-container",2),t.qZA(),t.TgZ(3,"content"),t.YNc(4,El,17,7,"div",3),t.YNc(5,Rl,2,2,"div",3),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",!e.isComplete),t.xp6(2),t.Q6J("ngIf",!e.isComplete),t.xp6(1),t.Q6J("ngIf",e.isComplete)}}let Hl=(()=>{class n extends tt.U{constructor(e,i,o,l,p){super(e,"InboundLogisticsLoader/GetStorage",i),(0,r.Z)(this,"productService",void 0),(0,r.Z)(this,"formService",void 0),(0,r.Z)(this,"dialog",void 0),(0,r.Z)(this,"searchLogisticType","invoice"),(0,r.Z)(this,"unfulfilledInvoices",[]),(0,r.Z)(this,"storage",void 0),(0,r.Z)(this,"deliveryData",void 0),(0,r.Z)(this,"isEdit",void 0),(0,r.Z)(this,"form",void 0),(0,r.Z)(this,"param",void 0),(0,r.Z)(this,"configBarcodeCount",void 0),(0,r.Z)(this,"orderInvoice",void 0),(0,r.Z)(this,"isComplete",void 0),(0,r.Z)(this,"afterSubmitData",void 0),(0,r.Z)(this,"isPO",void 0),this.productService=o,this.formService=l,this.dialog=p,this.form={Header:{},Items:[]}}initializeFormState(){this.param=this.route.snapshot.queryParams,u.gT.IsEmpty(this.param.POID)&&u.gT.IsEmpty(this.param.ID)?this.isEdit=!1:u.gT.IsNotEmpty(this.param.POID)?(this.isPO=!0,this.getDeliveryItems(this.param.POID)):(this.isPO=!1,this.isEdit=!0,this.getDeliveryItems(this.param.ID))}postBindForm(e){this.storage=e,this.productService.formItems=this.storage.Data?.Items,this.configBarcodeCount=e.AppConfigJSON.ModuleDelivery.CustomerDelivery.InBoundQtyCount,this.initializeFormState(),!this.isEdit&&!this.isPO&&this.setFocusToAutoComplete()}setFocusToAutoComplete(){setTimeout(()=>{let e=document.getElementById("orderNumber");e&&e.focus()},100)}findSalesOrderByCustomer(e){u.gT.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}getDeliveryItems(e){let i,o;this.isPO||!this.isEdit?(i="GetByPOID",this.form.Header.PurchaseOrderID=e,o={POID:this.param.POID||e}):(i="GetByID",o={ID:this.param.ID}),this.httpService.post(`/API/InDelivery/${i}`,JSON.stringify(o)).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,u.gT.IsNotEmpty(this.deliveryData.Data)&&(this.productService.formItems=this.deliveryData.Data.Items),this.productService.bindCartItems(e.PurchasedItems,e.SentItems,this.isEdit),this.orderInvoice=e.Label,this.isPO||!this.isEdit?(this.form.Header.Number=e.PO.Number,this.form.Header.Date=(new Date).toJSON(),u.gT.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.PO.EntityID),this.form.Header.Note=e.PO.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(u.gT.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Inbound #${this.form.Header.Number}`)}}assignDefaultWarehouse(e){const i=this.storage.Entities.find(o=>o.ID==e);u.gT.IsNotEmpty(i)&&(this.form.Header.EntityID=i.ID)}get cartItems(){return this.productService.cartItems}onScanBarcode(e){this.productService.onScanBarcode(e)}validate(){this.formService.validate(this.cartItems,this.configBarcodeCount,this.isEdit)&&(this.form.Items=this.formService.convertCartItemsToForm(this.cartItems),this.data.Form=this.form,this.isEdit&&(this.data.Form.Mode=1),this.onSubmit("InDelivery/SubmitOrder"))}newForm(){this.formService.newForm("Inbound_Logistics")}onSubmitSuccess(e){this.isComplete=!0,this.afterSubmitData=e}undo(e){this.formService.undo(e,"Inbound_Logistics")}onImport(){this.dialog.open(Tl,{data:{title:"Import Products"}}).afterClosed().pipe((0,J.h)(e=>u.gT.IsNotEmpty(e))).subscribe(e=>{this.mappingItemWithCsv(e)})}mappingItemWithCsv(e){this.productService.cartItems=this.productService.cartItems.map(i=>(e.forEach(o=>{o.Quantity=parseFloat(o.Quantity),o.Code==i.Code&&(i.QuantityDelivered=o.Quantity)}),i))}getUnfulfilledInvoices(e){this.httpService.post("/API/InboundLogistics/GetUnfulfilledOrdersBySupplierID",JSON.stringify({ID:e})).subscribe(i=>this.unfulfilledInvoices=i)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(bt),t.Y36(Et),t.Y36(g.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-inbound-logistics-form"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange",4,"ngIf"],[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange"],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success","ms-5",3,"click"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa-solid","fa-receipt","me-5"],[1,"card-body"],[4,"ngIf","ngIfElse"],["CUSTOMER",""],["class","card",4,"ngIf"],["class","col-8",4,"ngIf"],["name","fontStyle","aria-label","Font Style",2,"height","30px"],["matTooltipPosition","above","matTooltip","Search by Invoice Number",1,"w-100","toggle-search",3,"checked","click"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Supplier",1,"w-100","toggle-search",3,"checked","click"],[1,"fa-solid","fa-address-book"],[1,"form-floating-outline"],["inputID","orderNumber","requestUrl","/API/AC/SearchBillOrderByNumber","placeholder","Invoice Number",1,"w-100",3,"inputTextValue","onSelect"],["inputID","customerName","requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier Name","notFoundMessageFor","supplier",1,"w-100",3,"onSelect"],["appendTo","body","bindLabel","Number","bindValue","Key",1,"custom-panel-dropdown",3,"items","change"],["ng-header-tmp",""],["ng-option-tmp",""],[1,"col-5"],[1,"col-3"],[1,"col-4","text-wrap"],[1,"card-header"],[1,"fa-solid","fa-address-card","me-5"],[1,"table-sm","table-borderless"],[2,"width","55px"],["target","_blank",3,"routerLink","queryParams"],[3,"innerHTML"],[1,"fa-solid","fa-truck","me-5"],[1,"table-sm"],["bindLabel","Name","bindValue","ID",3,"readonly","items","ngModel","ngModelChange"],["width","100px","appearance","outline",3,"isFloatingLabel","date","dateChange"],["type","text",1,"form-control","ms-2","ps-4",2,"height","35px !important","width","97%",3,"ngModel","ngModelChange"],["bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],[1,"col-8"],["state","Inbound_Logistics",3,"isEdit","cartItems","eventImport"],[3,"form"],["state","Inbound",3,"afterSubmitData","items","undo","newForm"]],template:function(e,i){1&e&&t.YNc(0,Yl,6,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.storage)},dependencies:[d.O5,c.rH,_.Fj,_.JJ,_.On,b.p,y.QB,k.J,C.w9,C.ir,C.Cm,j.A9,j.Yi,S.gM,Yt,Ht,Kt,d.uU,N.OI],styles:["datepicker[_ngcontent-%COMP%] div.mat-mdc-text-field-wrapper{padding-bottom:0!important}autocompleteV2[_ngcontent-%COMP%] input{font-size:16px} mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:30px!important}"]})),n})();var Vl=s(62612),Kl=s(23410),jt=s(70585);function Gl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.openExportModal())}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function Bl(n,a){if(1&n&&(t.TgZ(0,"li",30),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.AsE(" ",e.Name," x ",e.VariantUnitQuantity," ")}}const $t=function(n){return{ID:n}};function jl(n,a){if(1&n&&(t.TgZ(0,"tr",25)(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",26),t._uU(5),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td")(9,"a",27),t._uU(10),t.qZA()(),t.TgZ(11,"td"),t._uU(12),t.qZA(),t.TgZ(13,"td")(14,"ul",28),t.YNc(15,Bl,2,2,"li",29),t.qZA()()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(e.OutletName),t.xp6(2),t.Q6J("queryParams",t.VKq(8,$t,e.InvoiceID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(e.LogisticDisplayName),t.xp6(2),t.Q6J("queryParams",t.VKq(10,$t,e.CustomerID)),t.xp6(1),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(e.Fulfillment),t.xp6(3),t.Q6J("ngForOf",e.SalesOrderItem)}}function $l(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"span",31),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount"))}),t.TgZ(1,"i",32),t._uU(2,"?"),t.qZA()()}}function Wl(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(t.lcZ(2,1,e.listTotal))}}function zl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",33),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.NextPage(!0))}),t._UZ(1,"i",34),t._uU(2," Next"),t.qZA()}}function Xl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",35),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount",!0))}),t._UZ(1,"i",36),t._uU(2," Show All"),t.qZA()}}const ec=[{path:"Archive/Transfer_Order",component:ie},{path:"Archive/Transfer_Order/Info",component:Io},{path:"Archive/Transfer_Order/Form",component:dr},{path:"Archive/Transfer_Order/Receive",component:gr},{path:"Archive/Outbound_Logistics",component:he},{path:"Archive/Outbound_Logistics/Info",component:an},{path:"Archive/Outbound_Logistics/Form",component:Zl},{path:"Archive/Inbound_Logistics",component:Ae},{path:"Archive/Inbound_Logistics/Info",component:Yo},{path:"Archive/Inbound_Logistics/Form",component:Hl},{path:"Report/Outbound/Product",component:fn},{path:"Report/Outbound/Detail",component:An},{path:"Report/Outbound/Logistics_Service",component:Vl.k},{path:"Report/Outbound/Logistics_Service/Detail",component:(()=>{class n extends Kl.X{constructor(e,i,o,l){super(e,"SalesReport/LogisticServiceDetail","SalesReportLoader/LogisticServiceDetail",null,i),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"roleService",void 0),this.matDialog=o,this.roleService=l}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount,"00:00:00"==this.pageData.Filter.StartTime&&"00:00:00"==this.pageData.Filter.EndTime&&(this.pageData.Filter.EndTime="23:59:59")}postInit(e){if("00:00:00"!=this.pageData.Filter.StartTime||"00:00:00"!=this.pageData.Filter.EndTime){const i=this.pageData.Filter.StartTime,o=this.pageData.Filter.EndTime,l=i[0]+i[1],p=i[3]+i[4],I=o[0]+o[1],L=o[3]+o[4];this.pageData.Filter.StartTime=new Date(this.pageData.Filter.From),this.pageData.Filter.StartTime.setHours(l),this.pageData.Filter.StartTime.setMinutes(p),this.pageData.Filter.EndTime=new Date(this.pageData.Filter.To),this.pageData.Filter.EndTime.setHours(I),this.pageData.Filter.EndTime.setMinutes(L)}this.extendData?(this.infiniteList=this.infiniteList.concat(e.Data),this.postExtendData(e),this.extendData=!1):(this.infiniteList=e.Data,this.assignAggregate(e)),this.nextPageDisabled=!(e.Data.length<this.pageData.Filter.RowCount),this.originalData=e.Data,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(e)}openExportModal(){this.matDialog.open(P.H,{data:{title:"Logistic Service Detail",exportTypes:[{ID:"ReportExport/LogisticServiceDetail",Value:"Default",FileName:"Logistics Service Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"SalesReport/LogisticServiceDetailCount",pagination:!0}})}onChangeTime(e,i){const o=e.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[i]=o}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(g.uw),t.Y36(O.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-logistics-service-detail"]],features:[t.qOj],decls:60,vars:22,consts:[[3,"pageData","text","textChange","onSubmit"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModel","items","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[2,"display","flex","column-gap","20px"],[3,"ngModel","timeOnly","ngModelChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],["class","border-bottom",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","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"border-bottom"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",3,"queryParams"],["routerLink","/menu/Contacts/Contact/Customers/Info",3,"queryParams"],[1,"list-inline","m-0"],["class","list-inline-item me-10",4,"ngFor","ngForOf"],[1,"list-inline-item","me-10"],[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,i){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(l){return i.pageData.Filter.Name=l})("onSubmit",function(){return i.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,Gl,3,0,"button",1),t.qZA(),t.TgZ(3,"filters")(4,"div",2)(5,"div",3)(6,"div")(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",4),t.NdJ("ngModelChange",function(l){return i.pageData.Filter.EntityID=l}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Logistics Service"),t.qZA(),t.TgZ(13,"ng-select",4),t.NdJ("ngModelChange",function(l){return i.pageData.Filter.LogisticServiceID=l}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"From"),t.qZA(),t.TgZ(17,"div")(18,"datepicker",5),t.NdJ("dateChange",function(l){return i.pageData.Filter.From=l}),t.qZA()()(),t.TgZ(19,"div")(20,"h6"),t._uU(21,"To"),t.qZA(),t.TgZ(22,"div")(23,"datepicker",6),t.NdJ("dateChange",function(l){return i.pageData.Filter.To=l}),t.qZA()()(),t.TgZ(24,"div")(25,"h6"),t._uU(26,"Time"),t.qZA(),t.TgZ(27,"div",7)(28,"p-calendar",8),t.NdJ("ngModelChange",function(l){return i.onChangeTime(l,"StartTime")}),t.qZA(),t.TgZ(29,"p-calendar",8),t.NdJ("ngModelChange",function(l){return i.onChangeTime(l,"EndTime")}),t.qZA()()()()()(),t.TgZ(30,"content")(31,"div",9)(32,"table",10)(33,"thead",11)(34,"tr",12)(35,"th"),t._uU(36,"Outlet"),t.qZA(),t.TgZ(37,"th"),t._uU(38,"Number"),t.qZA(),t.TgZ(39,"th"),t._uU(40,"Logistics"),t.qZA(),t.TgZ(41,"th",13),t._uU(42,"Customer"),t.qZA(),t.TgZ(43,"th"),t._uU(44,"Fulfillment"),t.qZA(),t.TgZ(45,"th"),t._uU(46,"Product"),t.qZA()()(),t.TgZ(47,"tbody"),t.YNc(48,jl,16,12,"tr",14),t.qZA()(),t.TgZ(49,"div",15)(50,"div",16)(51,"div",17),t._uU(52),t.ALo(53,"number"),t.YNc(54,$l,3,0,"span",18),t.YNc(55,Wl,3,3,"span",19),t._uU(56),t.qZA()(),t.TgZ(57,"div",20),t.YNc(58,zl,3,0,"a",21),t.YNc(59,Xl,3,0,"a",22),t.qZA()()()()()),2&e&&(t.Q6J("pageData",i.menuData)("text",i.pageData.Filter.Name),t.xp6(2),t.Q6J("ngIf",i.roleService.global.Export),t.xp6(7),t.Q6J("ngModel",i.pageData.Filter.EntityID)("items",null==i.pageData.Options?null:i.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",i.pageData.Filter.LogisticServiceID)("items",null==i.pageData.Options?null:i.pageData.Options.LogisticServices),t.xp6(5),t.Q6J("date",i.pageData.Filter.From),t.xp6(5),t.Q6J("date",i.pageData.Filter.To),t.xp6(5),t.Q6J("ngModel",i.pageData.Filter.StartTime)("timeOnly",!0),t.xp6(1),t.Q6J("ngModel",i.pageData.Filter.EndTime)("timeOnly",!0),t.xp6(19),t.Q6J("ngForOf",i.infiniteList),t.xp6(4),t.hij(" Showing 1 - ",t.lcZ(53,20,i.pageData.Filter.RowCount*(i.pageData.Filter.PageNumber-1)+(null==i.data||null==i.data.Data?null:i.data.Data.length))," of "),t.xp6(2),t.Q6J("ngIf",!i.pageData.HideStoreApiCount),t.xp6(1),t.Q6J("ngIf",i.pageData.HideStoreApiCount),t.xp6(1),t.hij(" records ~ ",i.pageData.Filter.PageNumber," Page "),t.xp6(2),t.Q6J("ngIf",i.nextPageDisabled&&!i.goToLast),t.xp6(1),t.Q6J("ngIf",i.nextPageDisabled&&!i.goToLast))},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,y.QB,C.w9,S.gM,jt.f,d.JJ]})),n})()},{path:"Report/Inbound/Product",component:kn},{path:"Report/Inbound/Detail",component:Xn},{path:"Report/Transfer/Product",component:ri},{path:"Report/Transfer/Transfer",component:vi},{path:"Setup/Courier",component:Wo},{path:"Setup/Courier/Form",component:ea},{path:"",redirectTo:"Archive/Transfer_Order",pathMatch:"full"}];let nc=(()=>{class n{}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275mod",t.oAB({type:n})),(0,r.Z)(n,"\u0275inj",t.cJS({imports:[c.Bz.forChild(ec),c.Bz]})),n})();var ic=s(7155),oc=s(99602),ac=s(3238),rc=s(44144),lc=s(88441),cc=s(65131),sc=s(3848);let dc=(()=>{class n{}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275mod",t.oAB({type:n})),(0,r.Z)(n,"\u0275inj",t.cJS({imports:[d.ez,w.d]})),n})();var pc=s(96308);let _c=(()=>{class n{}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,r.Z)(n,"\u0275mod",t.oAB({type:n})),(0,r.Z)(n,"\u0275inj",t.cJS({imports:[d.ez,w.d,nc,_.u5,_.UX,N.dr,ic.p0,oc.FA,ac.XK,ht.Fk,rc.c,b.R,y.ZU,gt.K,g.Is,lc.S,k.Q,F.T,cc.X,kt.D,C.A0,at._t,H.Tx,Ut.U,Pt.b,wt.G,Qt.E,sc.Nh,vt.O,j.vV,S.AV,Jt.g,Vt.Gg,dc,pc.JX,jt._8,Y.B]})),n})()},88651:($,Q,s)=>{s.d(Q,{U:()=>M});var r=s(81180),d=s(24351),c=s(22863);class M extends c.M{get formData(){return this.data.Form}get options(){return this.data.Options?this.data.Options:{}}get Roles(){return this.data.Roles?this.data.Roles:{}}constructor(t,h,Z){super(t),(0,r.Z)(this,"formDataAPI",void 0),(0,r.Z)(this,"route",void 0),(0,r.Z)(this,"data",{}),this.formDataAPI=h,this.route=Z;let v=this.route.snapshot.queryParams;this.menuData$.pipe((0,d.b)(()=>this.httpService.post(`/api/${this.formDataAPI}`,JSON.stringify(v)))).subscribe(O=>{this.data=O,this.postBindForm(O)})}postBindForm(t){}onSubmit(t,h=!1){this.preSubmitForm(),this.httpService.post(`/api/${t}`,JSON.stringify(this.formData)).subscribe({next:Z=>{this.onSubmitSuccess(Z)},error:Z=>{this.onSubmitError(Z)}})}compare(t,h,Z){return(t<h?-1:1)*(Z?1:-1)}preSubmitForm(){}onSubmitSuccess(t){}onSubmitError(t){}}},99036:($,Q,s)=>{s.d(Q,{A:()=>P});var r=s(81180),d=s(77579),c=s(94650),M=s(97185);let P=(()=>{class t{constructor(Z){(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"subject$",new d.x),this.toastr=Z}onFileLoad(Z){let O=Z.target.result,g=!1,_=[],b=[],y=0;for(const F of O.split(/[\r\n]+/))if(g){let C={};for(let S=0;S<y;S++)C[b[S]]=F.split(",")[S];_.push(C)}else{for(let C=0;C<F.split(",").length;C++)y=F.split(",").length,b.push(F.split(",")[C].replace(/ /g,""));g=!0}return _.splice(-1),_}convert(Z){const v=Z.files,O=["csv"];if(v&&v.length){const g=Z.files[0].name.split(".").pop().toLowerCase();if(O.indexOf(g)>-1){const b=v[0],y=new FileReader;return y.onload=F=>{const C=this.onFileLoad(F);this.subject$.next(C)},y.readAsText(b,"UTF-8"),this.subject$.asObservable()}this.toastr.error("Invalid File Type","Failed")}}}return(0,r.Z)(t,"\u0275fac",function(Z){return new(Z||t)(c.LFG(M._W))}),(0,r.Z)(t,"\u0275prov",c.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"})),t})()},78639:($,Q,s)=>{s.d(Q,{g:()=>pt,t:()=>dt});var r=s(81180),d=s(36895),c=s(94650),M=s(24006),P=s(88794),t=s(88796),h=s(65131),Z=s(93669),v=s(29766),O=s(54004),g=s(18505),_=s(34782),b=s(18810),y=s(83902);function F(x,U){if(1&x){const m=c.EpF();c.ynx(0),c.TgZ(1,"div",6)(2,"p-chips",7),c.NdJ("ngModelChange",function(D){c.CHM(m);const A=c.oxw(2);return c.KtG(A.serials=D)})("ngModelChange",function(D){c.CHM(m);const A=c.oxw(2);return c.KtG(A.addSerial(D))}),c.qZA(),c.TgZ(3,"button",8),c.NdJ("click",function(){c.CHM(m);const D=c.oxw(2);return c.KtG(D.submitSerial())}),c._UZ(4,"i",9),c.TgZ(5,"strong",10),c._uU(6,"ADD"),c.qZA()()(),c.BQk()}if(2&x){const m=c.oxw(2);c.xp6(2),c.Q6J("placeholder","E.g. Serial1 Serial2")("allowDuplicate",!1)("ngModel",m.serials)}}function C(x,U){if(1&x){const m=c.EpF();c.TgZ(0,"ng-select",11),c.NdJ("ngModelChange",function(D){c.CHM(m);const A=c.oxw(2);return c.KtG(A.serials=D)})("remove",function(D){c.CHM(m);const A=c.oxw(2);return c.KtG(A.onRemoveSerialFromOption(D.value))})("change",function(D){c.CHM(m);const A=c.oxw(2);return c.KtG(A.onSelectSerial(D))}),c.ALo(1,"async"),c.qZA()}if(2&x){const m=c.oxw(2);c.Q6J("items",c.lcZ(1,3,m.serials$))("ngModel",m.serials)("multiple",!0)}}function S(x,U){if(1&x&&(c.ynx(0),c.TgZ(1,"div",2)(2,"div",3),c.YNc(3,F,7,3,"ng-container",4),c.YNc(4,C,2,5,"ng-template",null,5,c.W1O),c.qZA()(),c.BQk()),2&x){const m=c.MAs(5),f=c.oxw();c.xp6(3),c.Q6J("ngIf",f.isReturn)("ngIfElse",m)}}function rt(x,U){1&x&&(c.ynx(0),c._UZ(1,"th",18),c.BQk())}function lt(x,U){if(1&x){const m=c.EpF();c.ynx(0),c.TgZ(1,"td",20)(2,"i",21),c.NdJ("click",function(){c.CHM(m);const D=c.oxw().index,A=c.oxw(2);return c.KtG(A.onRemoveSerial(D))}),c.qZA()(),c.BQk()}}function ct(x,U){if(1&x){const m=c.EpF();c.TgZ(0,"tr"),c.YNc(1,lt,3,0,"ng-container",1),c.TgZ(2,"td"),c._uU(3),c.qZA(),c.TgZ(4,"td")(5,"input",19),c.NdJ("ngModelChange",function(D){const _t=c.CHM(m).$implicit;return c.KtG(_t.Qty=D)})("change",function(){c.CHM(m);const D=c.oxw(2);return c.KtG(D.onChangeQty())}),c.qZA()()()}if(2&x){const m=U.$implicit,f=c.oxw(2);c.xp6(1),c.Q6J("ngIf",!f.disabled),c.xp6(2),c.Oqu(m.Code),c.xp6(2),c.Q6J("ngModel",m.Qty)("disabled",f.disabled)}}function st(x,U){if(1&x&&(c.ynx(0),c.TgZ(1,"div",12)(2,"div",3)(3,"table",13)(4,"thead",14)(5,"tr"),c.YNc(6,rt,2,0,"ng-container",1),c.TgZ(7,"th",15),c._uU(8,"Serial"),c.qZA(),c.TgZ(9,"th",16),c._uU(10,"Quantity"),c.qZA()()(),c.TgZ(11,"tbody"),c.YNc(12,ct,6,4,"tr",17),c.qZA()()()(),c.BQk()),2&x){const m=c.oxw();c.xp6(6),c.Q6J("ngIf",!m.disabled),c.xp6(6),c.Q6J("ngForOf",m.selectedSerial)}}let dt=(()=>{class x{set cartItem(m){m&&(this._cartItem=m,this.initSelectedSerial(),m.Quantity<0?this.isReturn=!0:this.getSerialVariant())}get cartItem(){return this._cartItem}constructor(m){(0,r.Z)(this,"productService",void 0),(0,r.Z)(this,"_cartItem",void 0),(0,r.Z)(this,"isReturn",!1),(0,r.Z)(this,"disabled",!1),(0,r.Z)(this,"cartItemChange",void 0),(0,r.Z)(this,"entityId",void 0),(0,r.Z)(this,"serials",void 0),(0,r.Z)(this,"serialsChange",void 0),(0,r.Z)(this,"serials$",void 0),(0,r.Z)(this,"selectedSerial",[]),this.productService=m,this.cartItemChange=new c.vpe,this.serialsChange=new c.vpe}initSelectedSerial(){const m=this.cartItem.Serial;m&&m.length>0&&(this.selectedSerial=m)}getSerialVariant(){let f;this.serials$=this.productService.getVariantSerial(this.entityId,this.cartItem.VariantID).pipe((0,O.U)(D=>D.map(A=>(f=new P.D,f.Code=A.Serial,f.Qty=A.Quantity?A.Quantity:1,f))),(0,g.b)(()=>{this.isReturn||(this.serials=this.generateSerialCode(this.selectedSerial))}),(0,_.d)())}generateSerialCode(m=[]){return m.map(f=>f.Code)}onSelectSerial(m){let f=m.filter(D=>-1==this.selectedSerial.findIndex(A=>A.Code==D.Code));f.length>0&&(f[0].Qty=1,this.selectedSerial=[...this.selectedSerial,...f],this.updateCartItem())}onRemoveSerial(m){this.selectedSerial=this.selectedSerial.filter((f,D)=>D!==m),this.serials=this.generateSerialCode(this.selectedSerial),this.updateCartItem()}onRemoveSerialFromOption(m){this.selectedSerial=this.selectedSerial.filter(f=>f.Code!==m.Code),this.serials=this.generateSerialCode(this.selectedSerial)}onChangeQty(){this.updateCartItem()}submitSerial(){const m=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...m],this.serials=[],this.updateCartItem()}generateSerialData(){return this.serials.filter(f=>-1==this.selectedSerial.findIndex(D=>D.Code==f)).map(f=>({Code:f,Qty:this.isReturn?-1:1}))}addSerial(m){this.serials=m,this.serialsChange.emit(this.serials)}updateCartItem(){this.cartItem.Serial=this.selectedSerial,this.calculateSerialQty(),this.cartItemChange.emit(this.cartItem)}calculateSerialQty(){let m=0;this.selectedSerial.forEach(f=>{m+=f.Qty}),this.cartItem.Quantity=m}}return(0,r.Z)(x,"\u0275fac",function(m){return new(m||x)(c.Y36(b.y))}),(0,r.Z)(x,"\u0275cmp",c.Xpm({type:x,selectors:[["app-item-serial"]],inputs:{disabled:"disabled",cartItem:"cartItem",entityId:"entityId",serials:"serials"},outputs:{cartItemChange:"cartItemChange",serialsChange:"serialsChange"},decls:3,vars:2,consts:[[1,"my-8"],[4,"ngIf"],[1,"row"],[1,"col-12"],[4,"ngIf","ngIfElse"],["NOT_RETURN",""],[1,"input-group","mb-3"],[3,"placeholder","allowDuplicate","ngModel","ngModelChange"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-3"],[1,"headings-font-family","h4","font-weight-bold"],["bindLabel","Code","appendTo","body","bindValue","Code","placeholder","Insert Serial",3,"items","ngModel","multiple","ngModelChange","remove","change"],[1,"row","mt-8"],[1,"table","table-bordered"],[1,"thead-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","60px"],[4,"ngFor","ngForOf"],[1,"border-end",2,"width","40px"],["type","text","placeholder","Serial Quantity","autoNum","",1,"form-control","text-end",3,"ngModel","disabled","ngModelChange","change"],[1,"text-center"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(m,f){1&m&&(c.TgZ(0,"div",0),c.YNc(1,S,6,2,"ng-container",1),c.YNc(2,st,13,2,"ng-container",1),c.qZA()),2&m&&(c.xp6(1),c.Q6J("ngIf",!f.disabled),c.xp6(1),c.Q6J("ngIf",f.selectedSerial.length>0))},dependencies:[d.sg,d.O5,t.w9,M.Fj,M.JJ,M.On,y.b,v.cL,d.Ov],styles:["p-chips[_ngcontent-%COMP%] ul.p-inputtext{width:552px;max-width:570px;border:1px solid #C8D3DF;border-top-right-radius:0;border-bottom-right-radius:0}p-chips[_ngcontent-%COMP%] ul.p-inputtext li.p-chips-input-token>input[type=text]{border:none}p-chips[_ngcontent-%COMP%] .p-chips .p-chips-multiple-container:not(.p-disabled):hover{border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container{display:inline-block}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container .p-chips-token{margin:2px;background:#96bf48}"]})),x})(),pt=(()=>{class x{}return(0,r.Z)(x,"\u0275fac",function(m){return new(m||x)}),(0,r.Z)(x,"\u0275mod",c.oAB({type:x})),(0,r.Z)(x,"\u0275inj",c.cJS({imports:[d.ez,Z.dr,t.A0,M.u5,h.X,v.Gg]})),x})()},31906:($,Q,s)=>{s.d(Q,{U:()=>r});var r=(()=>{return(d=r||(r={}))[d.BuyPage=1]="BuyPage",d[d.AdjustmentPage=2]="AdjustmentPage",d[d.DeliveryPage=3]="DeliveryPage",d[d.EstimatePage=4]="EstimatePage",r;var d})()}}]);
|