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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[5189],{75189:(B,Q,s)=>{s.r(Q),s.d(Q,{DeliveryModule:()=>lc});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),D=s(98085),F=s(3077),C=s(88796),S=s(10266);function at(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",32),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.httpPostListID("TransferOrder/Delete"))}),t._UZ(1,"i",33),t._uU(2," Delete"),t.qZA()}}function rt(n,a){if(1&n&&(t.ynx(0),t.YNc(1,at,3,0,"a",31),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.role.logistic.Delete)}}function lt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",35),t._uU(2," Export"),t.qZA()}}const ct=function(){return["/menu/Logistics/Archive/Transfer_Order/Form"]};function st(n,a){1&n&&(t.TgZ(0,"a",36),t._uU(1,"New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ct))}function dt(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(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(5,"div")(6,"h6"),t._uU(7,"To"),t.qZA(),t.TgZ(8,"datepicker",39),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.pageData.Filter.To=i)}),t.qZA()(),t.TgZ(9,"div")(10,"h6"),t._uU(11,"Page Size"),t.qZA(),t.TgZ(12,"input",40),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.pageData.Filter.RowCount=i)}),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(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()()}}function U(n,a){1&n&&(t.TgZ(0,"th",43),t._uU(1,"Price "),t.qZA())}function u(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",41)(1,"input",47),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.selected=i)}),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 y(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 pt=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]},Gt=function(n){return{ID:n}},Bt=function(n,a,e){return{"text-success":n,"text-warning":a,"text-danger":e}},jt=function(){return["/print/Transfer"]},$t=function(n,a){return{ID:n,Template:a}};function Wt(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,u,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,y,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,o=t.oxw(2);t.xp6(2),t.Q6J("ngIf",o.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,pt))("queryParams",t.VKq(26,Gt,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",o.role.sell.PriceVisible&&o.pageData.Config.PriceVisible),t.xp6(1),t.Tol(t.kEZ(28,Bt,"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,jt))("queryParams",t.WLB(33,$t,e.ID,e.SourceTemplateID))}}function zt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Number=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,rt,2,1,"ng-container",2),t.YNc(3,lt,3,0,"button",3),t.TgZ(4,"div",4),t.YNc(5,st,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Destination"),t.qZA(),t.TgZ(16,"ng-select",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DestinationID=i)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"Fulfillment"),t.qZA(),t.TgZ(20,"ng-select",10),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.StateID=i)}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"Tag"),t.qZA(),t.TgZ(24,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.TypeID=i)}),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"Courier"),t.qZA(),t.TgZ(28,"ng-select",12),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CourierID=i)}),t.qZA()()(),t.YNc(29,dt,13,5,"div",13),t.TgZ(30,"a",14),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.moreFilter=!i.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,Wt,30,36,"tbody",29),t.qZA()(),t.TgZ(63,"POS-complex-pagination",30),t.NdJ("jumpToPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("previousPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("nextPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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 Xt=(()=>{class n extends M.n{constructor(e,o,i,l,p,I){super(e,"TransferOrder/TransferOrderList","TransferOrderLoader/TransferOrderList",i,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=o,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,o){1&e&&t.YNc(0,zt,64,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.Fj,_.Wl,_.JJ,_.On,b.p,D.QB,F.v,C.w9,S.gM,d.JJ,d.uU]})),n})();var k=s(58393);function te(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 i=t.oxw(2);return t.KtG(i.httpPostListID("OutboundLogistics/Delete"))}),t._UZ(2,"i",24),t._uU(3," Delete"),t.qZA(),t.BQk()}}function ee(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",26),t._uU(2," Export"),t.qZA()}}const ne=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Form"]};function oe(n,a){1&n&&(t.TgZ(0,"a",27),t._uU(1," New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ne))}function ie(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",28)(1,"input",29),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()()}}function ae(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",33),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2).$implicit;return t.KtG(l.selected=i)}),t.qZA()}if(2&n){const e=t.oxw(2).$implicit;t.Q6J("ngModel",e.selected)}}function re(n,a){if(1&n&&(t.TgZ(0,"td",28),t.YNc(1,ae,1,1,"input",32),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.WriteAccess)}}const le=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},ce=function(n){return{ID:n}};function se(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,le))("queryParams",t.VKq(4,ce,e.ID))("innerHtml",e.Number,t.oJD)}}function de(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 pe(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,re,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,se,2,6,"ng-container",30),t.YNc(9,de,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,o=t.MAs(10),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.Oqu(e.OrderEntityName),t.xp6(2),t.Q6J("ngIf",e.WriteAccess)("ngIfElse",o),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 _e(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Number=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,te,4,0,"ng-container",2),t.YNc(3,ee,3,0,"button",3),t.TgZ(4,"div",4),t.YNc(5,oe,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Order"),t.qZA(),t.TgZ(16,"ng-select",8),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.OrderEntityID=i)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"Customer"),t.qZA(),t.TgZ(20,"autocompleteV2",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CustomerID=i)}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"From"),t.qZA(),t.TgZ(24,"datepicker",10),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(25,"div")(26,"h6"),t._uU(27,"To"),t.qZA(),t.TgZ(28,"datepicker",11),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()()()()(),t.TgZ(29,"content")(30,"div",12)(31,"div",13)(32,"table",14)(33,"thead",15)(34,"tr",16),t.YNc(35,ie,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,pe,19,14,"tbody",21),t.qZA()(),t.TgZ(49,"POS-complex-pagination",22),t.NdJ("jumpToPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("previousPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("nextPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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 ue=(()=>{class n extends M.n{constructor(e,o,i,l){super(e,"OutboundLogistics/OutboundLogisticsList","OutboundLogisticsLoader/List",o),(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=i,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,o,i){if(o||(o="Are you sure you want to selected record/s?"),0==confirm(o))return;let l=this.getSelectedData().filter(p=>p.WriteAccess);l.length>0&&this.postListID(e,l,i)}}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,o){1&e&&t.YNc(0,_e,50,18,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.Wl,_.JJ,_.On,b.p,D.QB,k.J,F.v,C.w9,S.gM,d.uU]})),n})();function me(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 i=t.oxw(2);return t.KtG(i.httpPostListID("InboundLogistics/DeleteInboundLogistics"))}),t._UZ(2,"i",24),t._uU(3," Delete"),t.qZA(),t.BQk()}}function ge(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",26),t._uU(2," Export"),t.qZA()}}const fe=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Form"]};function he(n,a){1&n&&(t.TgZ(0,"a",27),t._uU(1," New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,fe))}function xe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",28)(1,"input",29),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()()}}function Ce(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",28)(1,"input",34),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.selected=i)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)}}const Ze=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]},Ct=function(n){return{ID:n}},ve=function(){return["/menu/Orders/Orders/Supplier_Bill/Info"]},Te=function(n,a){return{ID:n,Template:a}};function be(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,Ce,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,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.Q6J("routerLink",t.DdM(18,Ze))("queryParams",t.VKq(19,Ct,e.ID))("innerHtml",e.Number,t.oJD),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("routerLink",t.DdM(21,ve))("queryParams",t.VKq(22,Ct,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,Te,e.ID,e.PrintTemplateID))}}function ye(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Number=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,me,4,0,"ng-container",2),t.YNc(3,ge,3,0,"button",3),t.TgZ(4,"div",4),t.YNc(5,he,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(13,"div")(14,"h6"),t._uU(15,"Supplier"),t.qZA(),t.TgZ(16,"autocompleteV2",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=i)}),t.qZA()(),t.TgZ(17,"div")(18,"h6"),t._uU(19,"From"),t.qZA(),t.TgZ(20,"datepicker",10),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(21,"div")(22,"h6"),t._uU(23,"To"),t.qZA(),t.TgZ(24,"datepicker",11),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()()()()(),t.TgZ(25,"content")(26,"div",12)(27,"div",13)(28,"table",14)(29,"thead",15)(30,"tr",16),t.YNc(31,xe,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,be,20,27,"tbody",21),t.qZA()(),t.TgZ(46,"POS-complex-pagination",22),t.NdJ("jumpToPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("previousPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("nextPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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 De=(()=>{class n extends M.n{constructor(e,o,i,l,p){super(e,"InboundLogistics/InboundLogisticsList","InboundLogisticsLoader/List",i),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"role",void 0),(0,r.Z)(this,"matDialog",void 0),this.csvConverter=o,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,o){1&e&&t.YNc(0,ye,47,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.Wl,_.JJ,_.On,b.p,D.QB,k.J,F.v,C.w9,S.gM,d.uU]})),n})();var Ie=s(29881),m=s(67327),T=s(96700),q=s(42046),w=s(63165);let Oe=(()=>{class n{constructor(e,o,i,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=o,this.httpService=i,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(o=>{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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"input",3),t.NdJ("ngModelChange",function(l){return o.email=l}),t.qZA(),t.TgZ(5,"label",4),t._uU(6,"Email"),t.qZA()()()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(4),t.Q6J("ngModel",o.email))},dependencies:[w.M,_.Fj,_.JJ,_.On]})),n})(),Me=(()=>{class n{constructor(e,o,i,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=o,this.dialogRef=i,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(o=>{this.data.Data.InvoiceExchanged=!0,this.data.Data.Fulfillment.Status="Invoice Exchanged",this.toaster.success(o.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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content"),t._uU(2," Please confirm to exchange received state? "),t.qZA()()),2&e&&t.Q6J("config",o.config)},dependencies:[w.M]})),n})(),Ae=(()=>{class n{constructor(e,o,i,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=o,this.dialogRef=i,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(o=>{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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content"),t._uU(2," Please confirm item is received? "),t.qZA()()),2&e&&t.Q6J("config",o.config)},dependencies:[w.M]})),n})();var Se=s(75130),N=s(93669);const qe=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Form"]},j=function(n){return{ID:n}};function Ne(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,qe))("queryParams",t.VKq(3,j,e.data.Fulfillment.ID))}}function we(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.deleteData("OutboundLogistics/DeleteDeliveryCustomer"))}),t._UZ(1,"i",43),t._uU(2," Delete "),t.qZA()}}function Pe(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 i=t.oxw(2);return t.KtG(i.exportCSV(i.csvConverter,"OutboundLogistics/ExportInfo","OutboundLogistics#"+i.data.Fulfillment.Number+".csv"))}),t._uU(2,"Export"),t.qZA()()}}function Ue(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 i=t.oxw(2);return t.KtG(i.openModalNote(i.data.Fulfillment.Note))}),t._uU(2," Add Note "),t.qZA()()}}function Je(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 Fe(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 Le=function(){return["/menu/Contacts/Contact/Customers/Info"]};function Qe(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,Je,7,1,"tr",46),t.YNc(16,Fe,6,1,"tr",46),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("routerLink",t.DdM(5,Le))("queryParams",t.VKq(6,j,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 ke(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 Ee(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 Re(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 Ye(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 He(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,ke,7,1,"tr",46),t.YNc(8,Ee,7,1,"tr",46),t.YNc(9,Re,6,1,"tr",46),t.YNc(10,Ye,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 Ve(n,a){if(1&n&&t._UZ(0,"p",51),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",e.Note,t.oJD)}}function Ke(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.YNc(8,Ve,1,1,"p",49),t.qZA(),t.TgZ(9,"td",50),t._uU(10),t.TgZ(11,"div"),t._uU(12),t.qZA()()()),2&n){const e=a.$implicit,o=a.index;t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Q6J("queryParams",t.VKq(7,j,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(2),t.hij("",e.Quantity," "),t.xp6(2),t.Oqu(e.UOMName)}}function Ge(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",27)(2,"h2"),t._UZ(3,"i",52),t._uU(4,"Note "),t.qZA()(),t._UZ(5,"div",53),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",e.data.Fulfillment.Note,t.oJD)}}function Be(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 je(n,a){if(1&n&&(t.TgZ(0,"div",54),t._UZ(1,"i",55),t.TgZ(2,"span")(3,"b"),t._uU(4," Created:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA(),t.YNc(7,Be,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 Zt=function(){return["/print/OutDelivery"]},$e=function(n,a){return{ID:n,Template:a}},We=function(n,a){return{ID:n,Template:a,Price:1}},ze=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]};function Xe(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,Ne,3,5,"a",10),t.YNc(13,we,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,Pe,3,0,"li",21),t.YNc(31,Ue,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,Qe,17,8,"div",26),t.YNc(58,He,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,Ke,13,9,"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,Ge,6,1,"div",26),t.qZA(),t.TgZ(121,"div",38),t.YNc(122,je,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,Zt))("queryParams",t.WLB(37,$e,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(6),t.Q6J("routerLink",t.DdM(40,Zt))("queryParams",t.WLB(41,We,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,ze))("queryParams",t.VKq(45,j,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 tn=(()=>{class n extends Ie.O{constructor(e,o,i,l,p,I,L){super(e,"OutboundLogistics/Info",i),(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",m.gT.GuidEmpty),this.httpService=e,this.csvConverter=o,this.toaster=l,this.router=p,this.role=I,this.matDialog=L}postBindData(e){e.Items=e.Items.filter(o=>0!=o.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(Oe,{data:{invoiceID:this.data.ID}})}openReceiveDialog(){this.matDialog.open(Ae,{data:{Data:this.data}})}openExchangedDialog(){this.matDialog.open(Me,{data:{Data:this.data}})}exportCSV(e,o,i){i=i||"export.csv",this.httpService.post(`/api/${o}`,JSON.stringify(this.data.Fulfillment)).subscribe(l=>{e.convertToCSV(l,i)})}onUpdate(e,o){this.httpService.post(`/api/${e}`,JSON.stringify(o)).subscribe(i=>{this.reload()})}reload(){this.httpService.post("/api/OutboundLogistics/Info",JSON.stringify({ID:this.data.Fulfillment.ID})).subscribe({next:i=>{this.data=i},error:i=>{console.log(i)}})}openModalNote(e){let o={SONote:null};e&&(o=e),this.matDialog.open(Se.B,{data:{form:o}}).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"],["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,o){1&e&&t.YNc(0,Xe,123,47,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,b.p,d.uU,N.qU]})),n})();function en(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function nn(n,a){1&n&&(t.TgZ(0,"th"),t._uU(1,"Outlet"),t.qZA())}function on(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1,"Total"),t.qZA())}const an=function(){return["/menu/Outlets/Master/Outlets/Form"]},vt=function(n){return{ID:n}};function rn(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,an))("queryParams",t.VKq(4,vt,e.EntityID)),t.xp6(1),t.Oqu(e.EntityName)}}function ln(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 cn(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,rn,3,6,"td",14),t.TgZ(7,"td",27),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,ln,3,3,"td",28),t.qZA()),2&n){const e=a.$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.Q6J("queryParams",t.VKq(8,vt,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(1),t.Q6J("ngIf",!o.data.isOutlet),t.xp6(2),t.Oqu(t.lcZ(9,6,e.Quantity)),t.xp6(2),t.Q6J("ngIf",o.roleService.sell.Create)}}function sn(n,a){1&n&&t._UZ(0,"td",30)}function dn(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 pn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Supplier"),t.qZA(),t.TgZ(21,"autocompleteV2",8),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=i)}),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,nn,2,0,"th",14),t.TgZ(33,"th",15),t._uU(34,"Qty"),t.qZA(),t.YNc(35,on,2,0,"th",16),t.qZA()(),t.TgZ(36,"tbody"),t.YNc(37,cn,11,10,"tr",17),t.qZA(),t.TgZ(38,"tfoot")(39,"tr",18),t.YNc(40,sn,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,dn,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 _n=(()=>{class n extends M.n{constructor(e,o,i,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=o,this.roleService=i,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,o){1&e&&t.YNc(0,pn,48,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.QB,k.J,C.w9,d.JJ,N.qU]})),n})();function un(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",19),t._uU(2," Export"),t.qZA()}}function mn(n,a){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Price"),t.qZA())}function gn(n,a){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Total"),t.qZA())}function fn(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 hn(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 _t=function(n){return{ID:n}};function xn(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,fn,3,4,"td",36),t.YNc(10,hn,3,4,"td",36),t.qZA()),2&n){const e=a.$implicit,o=t.oxw(3);t.xp6(2),t.Q6J("queryParams",t.VKq(9,_t,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",o.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",o.roleService.sell.PriceVisible)}}function Cn(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount : "),t.qZA())}function Zn(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 vn=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},Tn=function(){return["/menu/Contacts/Contact/Customers/Info"]};function bn(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,xn,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,Cn,2,0,"th",31),t.YNc(28,Zn,4,7,"th",31),t.qZA()()()()),2&n){const e=a.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(20,vn))("queryParams",t.VKq(21,_t,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,Tn))("queryParams",t.VKq(24,_t,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",o.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",o.roleService.sell.PriceVisible)}}function yn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,un,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),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,mn,2,0,"th",15),t.YNc(31,gn,2,0,"th",15),t.qZA()(),t.TgZ(32,"tbody")(33,"tr")(34,"td",16),t.YNc(35,bn,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 Dn=(()=>{class n extends M.n{constructor(e,o,i,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=o,this.roleService=i,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,o){1&e&&t.YNc(0,yn,36,12,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.QB,C.w9,d.JJ,d.uU,N.qU]})),n})();function In(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",22),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",23),t._uU(2," Export"),t.qZA()}}function On(n,a){1&n&&(t.TgZ(0,"th"),t._uU(1,"Outlet"),t.qZA())}function Mn(n,a){1&n&&(t.TgZ(0,"th",14),t._uU(1,"Total"),t.qZA())}const An=function(){return["/menu/Outlets/Master/Outlets/Form"]},Tt=function(n){return{ID:n}};function Sn(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,An))("queryParams",t.VKq(4,Tt,e.EntityID)),t.xp6(1),t.Oqu(e.EntityName)}}function qn(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 Nn(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,Sn,3,6,"td",13),t.TgZ(7,"td",25),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,qn,3,3,"td",26),t.qZA()),2&n){const e=a.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("queryParams",t.VKq(8,Tt,e.VariantID)),t.xp6(1),t.Oqu(e.VariantCode),t.xp6(2),t.Oqu(e.VariantName),t.xp6(1),t.Q6J("ngIf",!o.data.isOutlet),t.xp6(2),t.Oqu(t.lcZ(9,6,e.Quantity)),t.xp6(2),t.Q6J("ngIf",o.roleService.product.Cost)}}function wn(n,a){1&n&&t._UZ(0,"td",28)}function Pn(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 Un(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,In,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),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,On,2,0,"th",13),t.TgZ(29,"th",14),t._uU(30,"Qty"),t.qZA(),t.YNc(31,Mn,2,0,"th",15),t.qZA()(),t.TgZ(32,"tbody"),t.YNc(33,Nn,11,10,"tr",16),t.qZA(),t.TgZ(34,"tfoot")(35,"tr",17),t.YNc(36,wn,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,Pn,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 Jn=(()=>{class n extends M.n{constructor(e,o,i,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=o,this.roleService=i,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,o){1&e&&t.YNc(0,Un,44,20,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.QB,C.w9,d.JJ,N.qU]})),n})();function Fn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",20),t._uU(2," Export"),t.qZA()}}function Ln(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Cost"),t.qZA())}function Qn(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Total"),t.qZA())}const ut=function(n){return{ID:n}};function kn(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 En(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 Rn(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 Yn(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,En,3,4,"td",36),t.YNc(9,Rn,3,4,"td",36),t.qZA()),2&n){const e=a.$implicit,o=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",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost)}}function Hn(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Amount : "),t.qZA())}function Vn(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 Kn=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]};function Gn(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,kn,5,4,"span",25),t.qZA(),t.TgZ(12,"table",26),t._UZ(13,"thead"),t.TgZ(14,"tbody",27),t.YNc(15,Yn,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,Hn,2,0,"th",30),t.YNc(28,Vn,4,7,"th",30),t.qZA()()()()),2&n){const e=a.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(21,Kn))("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",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost)}}function Bn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,Fn,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"From"),t.qZA(),t.TgZ(13,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"To"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Supplier"),t.qZA(),t.TgZ(21,"autocompleteV2",8),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=i)}),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,Ln,2,0,"th",16),t.YNc(35,Qn,2,0,"th",16),t.qZA()(),t.TgZ(36,"tbody")(37,"tr")(38,"td",17),t.YNc(39,Gn,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 jn=(()=>{class n extends M.n{constructor(e,o,i,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=o,this.roleService=i,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,o){1&e&&t.YNc(0,Bn,40,13,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.QB,k.J,C.w9,d.JJ,d.uU,N.qU]})),n})();var bt=s(11594);function $n(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",20),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",21),t._uU(2," Export"),t.qZA()}}function Wn(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 zn(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 Xn=function(n){return{ID:n}};function to(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,zn,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,Xn,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 eo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,$n,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CourierID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Categories"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CategoryID=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"From"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)})("dateChange",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"To"),t.qZA(),t.TgZ(21,"datepicker",8),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)})("dateChange",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Product=i)})("modelChange",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Product"),t.qZA(),t.TgZ(29,"autocompleteV2",10),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.ProductID=i)}),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,Wn,2,1,"th",17),t.TgZ(41,"th",18),t._uU(42,"Total"),t.qZA()()(),t.TgZ(43,"tbody"),t.YNc(44,to,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 no=(()=>{class n extends M.n{constructor(e,o,i,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=o,this.roleService=i,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,o){1&e&&t.YNc(0,eo,45,18,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.QB,bt.P,k.J,C.w9]})),n})();function oo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportModal())}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function io(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1," Total Price "),t.qZA())}function ao(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1," Total Cost "),t.qZA())}function ro(n,a){1&n&&t._UZ(0,"i",36)}function lo(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 co(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 so=function(n){return{"bg-warning":n}},yt=function(n){return{ID:n}};function po(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,lo,2,3,"td",41),t.YNc(11,co,2,3,"td",41),t.qZA()),2&n){const e=a.$implicit,o=t.oxw().$implicit,i=t.oxw(2);t.Tol(t.VKq(14,so,e.QtyRequested!=e.Quantity)),t.xp6(2),t.Q6J("queryParams",t.VKq(16,yt,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",o.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",i.roleService.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",i.roleService.product.Cost)}}const _o=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]};function uo(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,ro,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,po,12,18,"tr",35),t.qZA()()()()),2&n){const e=a.$implicit;t.xp6(3),t.Q6J("routerLink",t.DdM(12,_o))("queryParams",t.VKq(13,yt,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 mo(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 go(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 fo(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,mo,7,10,"div",46),t.YNc(10,go,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 ho(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("textChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.Text=i)})("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,oo,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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(10,"div")(11,"h6"),t._uU(12,"Destination"),t.qZA(),t.TgZ(13,"ng-select",6),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DestinationID=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"From"),t.qZA(),t.TgZ(17,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"To"),t.qZA(),t.TgZ(21,"datepicker",8),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Category"),t.qZA(),t.TgZ(25,"ng-select",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CategoryID=i)}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Type"),t.qZA(),t.TgZ(29,"ng-select",10),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.TypeID=i)}),t.qZA()(),t.TgZ(30,"div")(31,"h6"),t._uU(32,"Delivery"),t.qZA(),t.TgZ(33,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DeliveryID=i)}),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,io,2,0,"th",20),t.YNc(51,ao,2,0,"th",20),t.qZA()()()(),t.YNc(52,uo,17,15,"div",21),t.YNc(53,fo,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 xo=(()=>{class n extends M.n{constructor(e,o,i,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=o,this.roleService=i,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,o){1&e&&t.YNc(0,ho,54,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.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 Co=(()=>{class n{constructor(e,o,i){(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=o,this.httpService=i,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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(l){return o.onOk(l)})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.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 o.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 o.data.Note=l}),t.qZA()()()()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(10),t.Q6J("date",o.data.Date),t.xp6(7),t.Q6J("ngModel",o.data.Note))},dependencies:[w.M,_.Fj,_.JJ,_.On,D.QB]})),n})();var H=s(16571),V=s(83902);function Zo(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 vo(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 To(n,a){if(1&n&&t.YNc(0,vo,1,1,"p",17),2&n){const e=t.oxw().$implicit;t.Q6J("ngIf",null!=e.Note)}}const bo=function(){return["/menu/Products/Catalog/Variants/Info"]},yo=function(n){return{ID:n}};function Do(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,Zo,2,1,"ng-container",12),t.YNc(6,To,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(i){const p=t.CHM(e).$implicit;return t.KtG(p.Quantity=i)}),t.qZA()()()}if(2&n){const e=a.$implicit,o=a.index,i=t.MAs(7),l=t.oxw();t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Q6J("routerLink",t.DdM(12,bo))("queryParams",t.VKq(13,yo,e.VariantID))("innerHTML",e.Name,t.oJD),t.xp6(1),t.Q6J("ngIf",e.SerialNote)("ngIfElse",i),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 Io=function(){return["Name","Code"]};let Oo=(()=>{class n{constructor(e,o,i){(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",H.J.Serialized),this.dt=e,this.dialogRef=o,this.httpService=i,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 o=0;return e.forEach(i=>{o+=i.Qty}),o}}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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"input",2),t.NdJ("ngModelChange",function(l){return o.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,Do,14,15,"tr",9),t.ALo(19,"FilterByArray"),t.qZA()()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(3),t.Q6J("ngModel",o.filterText),t.xp6(15),t.Q6J("ngForOf",t.Dn7(19,3,o.data.Items,t.DdM(7,Io),o.filterText)))},dependencies:[d.sg,d.O5,w.M,c.rH,_.Fj,_.JJ,_.On,V.b,d.JJ,N.Rt]})),n})();function Mo(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 i=t.oxw(2);return t.KtG(i.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 i=t.oxw(2);return t.KtG(i.export("TransferOrder/ExportDetailInfo","Transfer Order Detail.csv"))}),t.TgZ(7,"a"),t._uU(8,"Export with Detail"),t.qZA()()()()}}function Ao(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",51),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.approveDelivery("TransferOrder/ApproveTransferOrder",{ID:i.data.ID}))}),t._UZ(1,"i",52),t._uU(2,"\xa0Approve Delivery "),t.qZA()}}function So(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",53),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.sendDialog())}),t._UZ(1,"i",54),t._uU(2,"\xa0Send"),t.qZA()}}function qo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",51),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.copyDelivery())}),t._UZ(1,"i",52),t._uU(2,"\xa0Receive Delivery "),t.qZA()}}function No(n,a){1&n&&(t.TgZ(0,"button",10),t._UZ(1,"b",55),t.qZA())}const wo=function(){return["/menu/Logistics/Archive/Transfer_Order/Receive"]},$=function(n){return{ID:n}};function Po(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,wo))("queryParams",t.VKq(3,$,e.data.ID))}}const Uo=function(){return["/menu/Logistics/Archive/Transfer_Order/Form"]};function Jo(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,Uo))("queryParams",t.VKq(3,$,e.data.ID))}}function Fo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",59),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.deleteData())}),t._UZ(1,"i",60),t._uU(2,"Delete"),t.qZA()}}function Lo(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 Qo=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]};function ko(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,Qo))("queryParams",t.VKq(4,$,e.data.AdjustmentID)),t.xp6(1),t.Oqu(e.data.Transfer.Note)}}function Eo(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 Ro(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 Yo(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,Ro,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 Ho(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 Vo(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 Ko(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 Go(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 Bo(n,a){1&n&&(t.TgZ(0,"th",74),t._uU(1," Product Code "),t.qZA())}function jo(n,a){1&n&&(t.TgZ(0,"th",35),t._uU(1," Qty Req."),t.qZA())}function $o(n,a){1&n&&(t.TgZ(0,"th",35),t._uU(1,"Inventory "),t.qZA())}function Wo(n,a){1&n&&(t.TgZ(0,"th",75),t._uU(1,"Cost"),t.qZA())}function zo(n,a){1&n&&(t.TgZ(0,"th",75),t._uU(1,"Total Cost"),t.qZA())}function Xo(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 ti(n,a){1&n&&(t.TgZ(0,"th",77),t._uU(1," %"),t.qZA())}function ei(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 ni(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"p",82),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD)}}function oi(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 ii(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 ai=function(n){return{"bg-gradient-danger":n}};function ri(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,ai,e.Inventory<e.Quantity)),t.xp6(1),t.hij(" ",t.lcZ(2,4,e.Inventory)," "),t.xp6(3),t.Oqu(e.UOMName)}}function li(n,a){if(1&n&&(t.TgZ(0,"td",83),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 ci(n,a){if(1&n&&(t.TgZ(0,"td",83),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 si(n,a){if(1&n&&(t.TgZ(0,"td",83),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 di(n,a){if(1&n&&(t.TgZ(0,"td",84),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",e.PriceDiscount,"")}}function pi(n,a){if(1&n&&(t.TgZ(0,"td",83),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 _i=function(){return["/menu/Products/Catalog/Variants/Info"]};function ui(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.YNc(8,ni,2,1,"ng-container",24),t.qZA(),t.YNc(9,oi,2,1,"td",24),t.YNc(10,ii,3,3,"td",43),t.TgZ(11,"td",42),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,ri,5,8,"td",79),t.YNc(15,li,3,3,"td",80),t.YNc(16,ci,3,3,"td",80),t.YNc(17,si,3,3,"td",80),t.YNc(18,di,2,1,"td",81),t.YNc(19,pi,3,3,"td",80),t.qZA()),2&n){const e=a.$implicit,o=a.index,i=t.oxw(2);t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Q6J("routerLink",t.DdM(17,_i))("queryParams",t.VKq(18,$,e.VariantID)),t.xp6(1),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(1),t.Q6J("ngIf",i.data.Config.ProductCodeVisible),t.xp6(1),t.Q6J("ngIf",i.data.Config.isQtyRequested),t.xp6(2),t.Oqu(t.lcZ(13,15,e.Quantity)),t.xp6(2),t.Q6J("ngIf",i.data.Config.IsState<2&&i.data.Config.InventoryVisible),t.xp6(1),t.Q6J("ngIf",i.data.Config.CostVisible&&i.role.product.Cost),t.xp6(1),t.Q6J("ngIf",i.data.Config.CostVisible&&i.role.product.Cost),t.xp6(1),t.Q6J("ngIf",i.data.Config.PriceVisible&&i.role.sell.PriceVisible),t.xp6(1),t.Q6J("ngIf",i.data.Config.PriceVisible&&i.role.sell.PriceVisible&&i.data.Config.DiscountVisible),t.xp6(1),t.Q6J("ngIf",i.data.Config.PriceVisible&&i.role.sell.PriceVisible)}}function mi(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 gi(n,a){1&n&&t._UZ(0,"td")}function fi(n,a){if(1&n&&(t.TgZ(0,"td",85)(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 hi(n,a){if(1&n&&(t.TgZ(0,"td",86)(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 xi(n,a){if(1&n&&(t.TgZ(0,"div",87),t._UZ(1,"i",88),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 Ci=function(){return["/print/Transfer"]},Dt=function(n,a){return{ID:n,Template:a}},Zi=function(){return["/print/TransferMini"]};function vi(n,a){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,Mo,9,0,"div",2),t.TgZ(3,"div",3),t.YNc(4,Ao,3,0,"a",4),t.YNc(5,So,3,0,"a",5),t.YNc(6,qo,3,0,"a",4),t.YNc(7,No,2,0,"button",6),t.YNc(8,Po,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,Jo,3,5,"a",14),t.YNc(20,Fo,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,Lo,2,1,"td",24),t.YNc(67,ko,3,6,"td",24),t.qZA(),t.YNc(68,Eo,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,Yo,18,14,"div",25),t.YNc(75,Ho,17,11,"div",26),t.YNc(76,Vo,17,11,"div",26),t.YNc(77,Ko,15,11,"div",26),t.qZA()()(),t.TgZ(78,"div",27)(79,"div",19),t.YNc(80,Go,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,Bo,2,0,"th",33),t.YNc(90,jo,2,0,"th",34),t.TgZ(91,"th",35),t._uU(92,"Qty Sent"),t.qZA(),t.YNc(93,$o,2,0,"th",34),t.YNc(94,Wo,2,0,"th",36),t.YNc(95,zo,2,0,"th",36),t.YNc(96,Xo,2,1,"th",37),t.YNc(97,ti,2,0,"th",38),t.YNc(98,ei,2,1,"th",39),t.qZA()(),t.TgZ(99,"tbody"),t.YNc(100,ui,20,20,"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,mi,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,gi,1,0,"td",24),t.YNc(113,fi,5,7,"td",45),t.YNc(114,hi,5,6,"td",46),t.qZA()()()()()()(),t.YNc(115,xi,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,Ci))("queryParams",t.WLB(55,Dt,e.data.ID,e.data.TemplateID)),t.xp6(6),t.Q6J("routerLink",t.DdM(58,Zi))("queryParams",t.WLB(59,Dt,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 Ti=(()=>{class n extends M.n{constructor(e,o,i,l,p,I,L){super(e,"TransferOrder/Info",null,null,o),(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",m.gT.MinDate),this.csvConverter=i,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,o){this.httpService.post(`/api/${e}`,JSON.stringify(this.route.snapshot.queryParams.ID)).subscribe(i=>{this.csvConverter.convertToCSV(i,o)})}approveDelivery(e,o){this.httpService.post(`/api/${e}`,JSON.stringify(o)).subscribe(()=>window.location.reload())}sendDialog(){this.matDialog.open(Oo,{data:{data:this.data}}).afterClosed().pipe((0,J.h)(e=>m.gT.IsNotEmpty(e))).subscribe(()=>this.getListData())}copyDelivery(){this.matDialog.open(Co,{data:{data:this.data}}).afterClosed().pipe((0,J.h)(e=>m.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"],["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,o){1&e&&t.YNc(0,vi,116,62,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,b.p,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 bi(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 i=t.oxw(2);return t.KtG(i.export("InboundLogistics/ExportInfoItems","Transfer Item Inbound Logistics.csv"))}),t._UZ(2,"i",37),t._uU(3,"Export "),t.qZA()()}}const yi=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Form"]},W=function(n){return{ID:n}};function Di(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,yi))("queryParams",t.VKq(3,W,e.data.Fulfillment.ID))}}function Ii(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.deleteData())}),t._UZ(1,"i",41),t._uU(2,"Delete"),t.qZA()}}function Oi(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 Mi(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 Ai=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function Si(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,Oi,7,1,"tr",44),t.YNc(16,Mi,6,1,"tr",44),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("routerLink",t.DdM(5,Ai))("queryParams",t.VKq(6,W,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 qi(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"p",48),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",null==e?null:e.Note,t.oJD)}}function Ni(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.YNc(8,qi,2,1,"ng-container",44),t.qZA(),t.TgZ(9,"td",47),t._uU(10),t.TgZ(11,"div"),t._uU(12),t.qZA()()()),2&n){const e=a.$implicit,o=a.index;t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Q6J("queryParams",t.VKq(7,W,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(2),t.hij("",e.Quantity," "),t.xp6(2),t.Oqu(e.UOMName)}}function wi(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",16)(2,"h2"),t._UZ(3,"i",49),t._uU(4,"Note "),t.qZA()(),t._UZ(5,"div",50),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",e.data.Fulfillment.Note,t.oJD)}}function Pi(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 Ui(n,a){if(1&n&&(t.TgZ(0,"div",51),t._UZ(1,"i",52),t.TgZ(2,"span")(3,"b"),t._uU(4," Created:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA(),t.YNc(7,Pi,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 Ji=function(n,a){return{ID:n,Template:a}},Fi=function(n,a){return{ID:n,Template:a,Cost:1}};function Li(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,bi,4,0,"div",9),t.TgZ(12,"div",2),t.YNc(13,Di,3,5,"a",10),t.YNc(14,Ii,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,Si,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,Ni,13,9,"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,wi,6,1,"div",22),t.qZA(),t.TgZ(108,"div",34),t.YNc(109,Ui,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,Ji,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(6),t.Q6J("queryParams",t.WLB(34,Fi,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,W,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 Qi=(()=>{class n extends M.n{constructor(e,o,i,l,p,I){super(e,"InboundLogistics/DetailInfo",null,null,o),(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=i,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(o=>0!=o.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,o){this.httpService.post(`/api/${e}`,JSON.stringify(this.route.snapshot.queryParams.ID)).subscribe(i=>{this.csvConverter.convertToCSV(i,o)})}}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"],[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,o){1&e&&t.YNc(0,Li,110,39,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,b.p,d.uU,N.qU]})),n})();function ki(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",11),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.httpPostListID("TransferOrder/RemoveCourier"))}),t._UZ(1,"i",12),t._uU(2,"Delete "),t.qZA()}}function Ei(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",16),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.selected=i)}),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.Q6J("ngModel",e.selected)}}const It=function(){return["/menu/Logistics/Setup/Courier/Form"]},Ri=function(n){return{ID:n}};function Yi(n,a){if(1&n&&(t.TgZ(0,"tr",13)(1,"td"),t.YNc(2,Ei,1,1,"input",14),t.qZA(),t.TgZ(3,"td")(4,"a",15),t._uU(5),t.qZA()()()),2&n){const e=a.$implicit,o=t.oxw(2);t.xp6(2),t.Q6J("ngIf",o.roleService.logistic.Delete),t.xp6(2),t.Q6J("routerLink",t.DdM(4,It))("queryParams",t.VKq(5,Ri,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function Hi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,ki,3,0,"a",2),t.TgZ(3,"a",3),t._uU(4,"Add"),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"table",6)(9,"thead",7)(10,"tr")(11,"th",8)(12,"input",9),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()(),t.TgZ(13,"th"),t._uU(14,"Name"),t.qZA()()(),t.TgZ(15,"tbody"),t.YNc(16,Yi,6,7,"tr",10),t.qZA()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.getSelectedData().length>0),t.xp6(1),t.Q6J("routerLink",t.DdM(6,It)),t.xp6(13),t.Q6J("ngForOf",e.data.Data)}}let Vi=(()=>{class n extends M.n{constructor(e,o,i){super(e,"TransferOrderLoader/GetCourierList",null,o),(0,r.Z)(this,"roleService",void 0),this.roleService=i}postInit(){this.data.Data=this.data}}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","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["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,"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"],["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"],["type","checkbox",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&t.YNc(0,Hi,17,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.Wl,_.JJ,_.On,b.p,S.gM]})),n})();var z=s(88651);function Ki(n,a){1&n&&(t.TgZ(0,"span",14),t._uU(1,"name required"),t.qZA())}const Gi=function(){return["/menu/Logistics/Setup/Courier"]};function Bi(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 i=t.oxw();return t.KtG(i.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",6)(17,"div",10)(18,"input",11,12),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.formData.Name=i)}),t.qZA(),t.TgZ(20,"label"),t._uU(21,"Name"),t.qZA(),t.YNc(22,Ki,2,0,"span",13),t.qZA()()()()()()()()()()}if(2&n){const e=t.MAs(19),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(7,Gi)),t.xp6(2),t.Q6J("disabled",!o.formData.Name),t.xp6(14),t.Q6J("ngModel",o.formData.Name),t.xp6(4),t.Q6J("ngIf",e.invalid&&(e.dirty||e.touched))}}let ji=(()=>{class n extends z.U{constructor(e,o,i,l){super(e,"TransferOrderLoader/CourierFormInitial",o),(0,r.Z)(this,"toaster",void 0),(0,r.Z)(this,"router",void 0),this.toaster=i,this.router=l}postBindForm(){m.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-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[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,"control-label",2,"color","red"]],template:function(e,o){1&e&&t.YNc(0,Bi,23,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&null!=o.formData.Name)},dependencies:[d.O5,c.rH,_.Fj,_.JJ,_.Q7,_.On,b.p]})),n})();var $i=s(22863),Wi=s(11989),X=s(94768),E=s(54850),mt=s(77579),Ot=s(39841),tt=s(82722),et=s(24351),zi=s(18505),nt=s(23945);let Xi=(()=>{class n{constructor(e,o,i){(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=o,this.config=new q.O,this.config.title="Notes",this.config.customWidth="300px",this.order=i.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(nt.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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onClose()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.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 o.order.TypeID=l}),t.qZA()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(5),t.Q6J("ngModel",o.order.TypeID)("items",o.DeliveryTypes))},dependencies:[w.M,_.JJ,_.On,C.w9],styles:["ng-dropdown-panel.outlet-multiple[_ngcontent-%COMP%]{z-index:1100}"]})),n})();var ot=s(50),K=s(26111);let ta=(()=>{class n{constructor(e,o,i,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=o,this._backEndService=i,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(m.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(K.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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.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",o.config)},dependencies:[w.M]})),n})();var Mt=s(47634),At=s(29677),ea=s(31906);let na=(()=>{class n{constructor(e,o){(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=o,this.config=new q.O,this.config.title="New Courier",this.config.customWidth="500px"}onOk(){m.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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"input",4),t.NdJ("ngModelChange",function(l){return o.Courier=l}),t.qZA(),t.TgZ(6,"label",5),t._uU(7,"Add New Courier"),t.qZA()()()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(5),t.Q6J("ngModel",o.Courier))},dependencies:[w.M,_.Fj,_.JJ,_.On]})),n})();var St=s(86751),oa=s(29990),gt=s(98818),qt=s(50494),ft=s(54825),Nt=s(78639);const ia=["quantity"],ht=function(n){return{selected:n}};function aa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",5),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onTabChange(i.modalItemState.INVENTORY))}),t._uU(1," Product "),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,ht,e.modalItemState.INVENTORY==e.currentTabState))}}function ra(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 i=t.oxw();return t.KtG(i.onTabChange(i.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,ht,e.modalItemState.SERIAL==e.currentTabState))}}function la(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"div",16)(2,"autocompleteV2",17),t.NdJ("onSelect",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.addItem(i))}),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 ca(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",18,19),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Quantity=i)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("disabled",!0)("ngModel",e.item.Quantity)}}function sa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",20,19),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Quantity=i)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("ngModel",e.item.Quantity)}}function da(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",21)(1,"strong"),t._uU(2,"Discount (%)"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Discount=i)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Discount)}}function pa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",22)(1,"strong"),t._uU(2,"Price"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Price=i)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Price)}}function _a(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",22)(1,"strong"),t._uU(2,"Cost"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Cost=i)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngModel",e.item.Cost)}}function ua(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",15)(1,"div",16)(2,"POS-tinymce-editor",23),t.NdJ("valueChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Note=i)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("value",e.item.Note)}}function ma(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",7),t.YNc(2,la,3,2,"div",8),t.TgZ(3,"div",9)(4,"div",10)(5,"strong"),t._uU(6,"Qty"),t.qZA(),t.YNc(7,ca,2,2,"input",11),t.YNc(8,sa,2,1,"ng-template",null,12,t.W1O),t.qZA(),t.YNc(10,da,4,1,"div",13),t.YNc(11,pa,4,1,"div",14),t.YNc(12,_a,4,1,"div",14),t.qZA(),t.YNc(13,ua,3,1,"div",8),t.qZA(),t.BQk()),2&n){const e=t.MAs(9),o=t.oxw();t.xp6(2),t.Q6J("ngIf",!o.isEdit),t.xp6(5),t.Q6J("ngIf",o.isEditDelivery&&4==(null==o.item||null==o.item.Variant?null:o.item.Variant.TypeID))("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",o.priceVisible),t.xp6(1),t.Q6J("ngIf",o.priceVisible),t.xp6(1),t.Q6J("ngIf",o.costVisible&&o.costRole),t.xp6(1),t.Q6J("ngIf",4!=(null==o.item||null==o.item.Variant?null:o.item.Variant.TypeID))}}function ga(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 fa(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 ha(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",46),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.setQuantityToMax())}),t._uU(1," Place Order "),t.qZA()}}const xa=function(){return["/menu/Products/Catalog/Variants/Info"]},Ca=function(n){return{ID:n}};function Za(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",24)(2,"div",25)(3,"a",26),t.YNc(4,ga,4,0,"ng-container",27),t.YNc(5,fa,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,ha,2,0,"button",43),t.qZA()()()()()(),t.BQk()),2&n){const e=t.MAs(6),o=t.oxw();t.xp6(3),t.Q6J("routerLink",t.DdM(45,xa))("queryParams",t.VKq(46,Ca,null==o.item||null==o.item.Variant?null:o.item.Variant.ID)),t.xp6(1),t.Q6J("ngIf",null==(null==o.item||null==o.item.Variant?null:o.item.Variant.ThumbnailUrl))("ngIfElse",e),t.xp6(12),t.Oqu(o.outletSourceName),t.xp6(3),t.Oqu(o.outletDestinationName),t.xp6(11),t.hij(" ",t.lcZ(31,21,o.sourceOnHand)," "),t.xp6(3),t.hij(" ",t.lcZ(34,23,o.destinationOnHand)," "),t.xp6(8),t.hij(" ",t.lcZ(42,25,o.sourceAllocated)," "),t.xp6(3),t.hij(" ",t.lcZ(45,27,o.destinationAllocated)," "),t.xp6(6),t.hij(" ",t.lcZ(51,29,o.sourceOnHand-o.sourceAllocated)," "),t.xp6(3),t.hij(" ",t.lcZ(54,31,o.destinationOnHand-o.destinationAllocated)," "),t.xp6(6),t.Oqu(t.lcZ(60,33,o.sourceRop)),t.xp6(3),t.hij(" ",t.lcZ(63,35,o.destinationRop)," "),t.xp6(3),t.AsE(" ",o.destinationRopDiff>=0?"+":"","",t.lcZ(66,37,o.destinationRopDiff),""),t.xp6(6),t.Oqu(t.lcZ(72,39,o.sourceMax)),t.xp6(3),t.hij(" ",t.lcZ(75,41,o.destinationMax)," "),t.xp6(3),t.AsE(" ",o.destinationMaxDiff>=0?"+":"","",t.lcZ(78,43,o.destinationMaxDiff),""),t.xp6(3),t.Q6J("ngIf",!o.item.isMaxInventory)}}function va(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-item-serial",47),t.NdJ("cartItemChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.item=i)}),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 wt=(()=>{class n{constructor(e,o,i,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",m.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",gt.Y),(0,r.Z)(this,"currentTabState",void 0),(0,r.Z)(this,"constants",m.gT),(0,r.Z)(this,"inventoryView",void 0),(0,r.Z)(this,"isSerialItem",void 0),this.httpService=e,this.data=o,this.dialogRef=i,this.cartItemService=l,this.toastr=p,this.backendService=I,this.firstLoadService=L,this.config=new q.O,this.currentTabState=gt.Y.INPUT,this.priceVisible=o.priceVisible,this.priceRestriction=o.priceRestriction,this.entityID=o.entityID,this.isEditDelivery=o.isEditDelivery,this.costVisible=o.costVisible,this.costRole=o.costRole,this.inventoryView=o.inventoryView,m.gT.IsNotEmpty(o.itemInfo)?(this.isEdit=!0,this.item=(0,qt.yE)(X.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 X.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 o=this.firstLoadService.Data.Entities.find(i=>i.ID==this.data.entityID);o&&(this.outletSourceName=o.Name)}fillSerial(){this.item.Serial=[],this.httpService.post("/api/catalog/variant/GetVariantSerial",JSON.stringify({entityID:this.data.entityID,soID:m.gT.GuidEmpty,variantID:this.item.VariantID})).subscribe(o=>{this.item.Serial=o})}onOk(e){if("Enter"!=e){if(m.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(oa.g.maxInventory,"Warning!")}addItem(e){this.cartItemService.getItemById(e,this.data.entityID).subscribe(o=>{this.item=o,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(){m.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(o=>{this.item.Variant.UnitsInStock=o.UnitsInStock,this.extraTitle=` Inventory: ${o.UnitsInStock}`,void 0!==o.Allocated&&(this.item.Variant.Ordered=o.Allocated,this.extraTitle+=`, Allocated: ${o.Allocated}`),this.toggleInventory=!0})}getDestinationInventory(){let e=this.item.VariantID;m.gT.IsNotEmpty(this.data.entityDestination)?this.backendService.getItemStock(e,this.data.entityDestination.ID).subscribe(i=>{if(i){this.showInventory=!0,this.destinationOnHand=i.OnHand,this.destinationAllocated=i.Allocated,this.destinationRop=i.ROP,this.destinationMax=i.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(i=>{this.sourceOnHand=i.OnHand,this.sourceAllocated=i.Allocated,this.sourceMax=i.Max,this.sourceRop=i.ROP})}onTabChange(e){this.currentTabState=e,e==gt.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(K.N),t.Y36(v._W),t.Y36(ot.M),t.Y36(nt.O))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-item"]],viewQuery:function(e,o){if(1&e&&t.Gf(ia,5),2&e){let i;t.iGM(i=t.CRH())&&(o._quantityElement=i.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"],["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"],["height","220px",3,"value","valueChange"],[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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(l){return o.onOk(l)})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div")(4,"a",2),t.NdJ("click",function(){return o.onTabChange(o.modalItemState.INPUT)}),t._uU(5," Cart "),t.qZA(),t.YNc(6,aa,2,3,"a",3),t.YNc(7,ra,3,3,"ng-container",4),t.qZA()(),t.YNc(8,ma,14,7,"ng-container",4),t.YNc(9,Za,81,48,"ng-container",4),t.YNc(10,va,2,3,"ng-container",4),t.qZA()()),2&e&&(t.Q6J("config",o.config),t.xp6(4),t.Q6J("ngClass",t.VKq(7,ht,o.modalItemState.INPUT==o.currentTabState)),t.xp6(2),t.Q6J("ngIf",(null==o.item||null==o.item.Variant?null:o.item.Variant.Name)&&o.inventoryView),t.xp6(1),t.Q6J("ngIf",o.isSerialItem),t.xp6(1),t.Q6J("ngIf",o.modalItemState.INPUT==o.currentTabState),t.xp6(1),t.Q6J("ngIf",o.modalItemState.INVENTORY==o.currentTabState),t.xp6(1),t.Q6J("ngIf",o.modalItemState.SERIAL==o.currentTabState))},dependencies:[d.mk,d.O5,w.M,c.rH,_.Fj,_.JJ,_.On,k.J,V.b,ft.V,S.gM,Nt.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 Pt=s(78068),Ut=s(94601);const Ta=["serialInput"];let ba=(()=>{class n{constructor(e,o,i,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=o,this.toastr=i,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&&(m.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(K.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["app-modal-scan-serial"]],viewQuery:function(e,o){if(1&e&&t.Gf(Ta,5),2&e){let i;t.iGM(i=t.CRH())&&(o.serialInputEl=i.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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"input",2,3),t.NdJ("ngModelChange",function(l){return o.serial=l})("keydown",function(l){return o.onKeyDown(l)}),t.qZA(),t.TgZ(5,"span",4),t._UZ(6,"i",5),t.qZA()()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(3),t.Q6J("ngModel",o.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 ya=s(26128),Da=s(245),Ia=s(241),Jt=s(42011);function Oa(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 Ma(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 i=t.oxw();return t.KtG(i.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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.DestinationEntityID=i)})("change",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectDestination())}),t.YNc(8,Oa,2,2,"ng-template",8),t.qZA()(),t.TgZ(9,"div",9)(10,"datepicker",10),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.Date=i)}),t.qZA()(),t.TgZ(11,"div",11),t._UZ(12,"i",12),t.TgZ(13,"input",13),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.Number=i)}),t.qZA()(),t.TgZ(14,"div",14),t._UZ(15,"i",15),t.TgZ(16,"ng-select",16),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.deliveryData.Order.CourierID=i)}),t.qZA(),t.TgZ(17,"a",17),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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 Aa=(()=>{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,o){1&e&&t.YNc(0,Ma,19,13,"div",0),2&e&&t.Q6J("ngIf",o.deliveryData)},dependencies:[d.O5,_.Fj,_.JJ,_.On,D.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})(),Sa=(()=>{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,o){1&e&&(t.TgZ(0,"div",0)(1,"button",1),t.NdJ("click",function(){return o.openEmptyModal()}),t._UZ(2,"i",2),t._uU(3," EMPTY "),t.qZA(),t.TgZ(4,"button",1),t.NdJ("click",function(){return o.openDeliveryNoteModal()}),t._UZ(5,"i",3),t._uU(6," NOTE "),t.qZA(),t.TgZ(7,"button",1),t.NdJ("click",function(){return o.openVoidModal()}),t._UZ(8,"i",4),t._uU(9," VOID "),t.qZA(),t.TgZ(10,"button",5),t.NdJ("click",function(){return o.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 qa(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 Na=function(n,a){return{ID:n,Template:a}},wa=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]},Pa=function(n){return{ID:n}};let Ua=(()=>{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,o){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 o.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,qa,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"==o.deliveryComplete.PrintMode?"Transfer":"TransferMini"))("queryParams",t.WLB(12,Na,o.deliveryComplete.OrderID,o.deliveryComplete.PrintTemplateID)),t.xp6(7),t.Q6J("routerLink",t.DdM(15,wa))("queryParams",t.VKq(16,Pa,o.deliveryComplete.OrderID)),t.xp6(1),t.hij("Transfer Order #",o.deliveryComplete.InvoiceNumber,""),t.xp6(2),t.Q6J("ngForOf",o.cartItems),t.xp6(5),t.Oqu(t.lcZ(30,7,t.xi3(31,9,o.cartItems,"Quantity"))))},dependencies:[d.sg,c.rH,d.JJ,N.qU]})),n})();var it=s(41206),Y=s(28255),Ja=s(67376);const Fa=["cartContainer"];function La(n,a){1&n&&t._UZ(0,"th",19)}function Qa(n,a){1&n&&t._UZ(0,"th",20)}function ka(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1," Cost "),t.qZA())}function Ea(n,a){1&n&&(t.TgZ(0,"th",22),t._uU(1,"Price"),t.qZA())}function Ra(n,a){1&n&&(t.TgZ(0,"th",23),t._uU(1,"%"),t.qZA())}function Ya(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Total"),t.qZA())}function Ha(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 Va(n,a){if(1&n&&(t.ynx(0),t._UZ(1,"span",35),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.Note,t.oJD)}}function Ka(n,a){if(1&n&&(t.TgZ(0,"td",31),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",e.Variant.UOMName," ")}}function Ga(n,a){if(1&n&&(t._UZ(0,"td",36),t.ALo(1,"number")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.lcZ(1,1,e.Cost),t.oJD)}}function Ba(n,a){if(1&n&&(t.TgZ(0,"td",31),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 ja(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(" ",0==e.Discount?"":"-"+t.lcZ(2,1,e.Discount)," ")}}function $a(n,a){if(1&n&&(t.TgZ(0,"td",31),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 Wa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr",25),t.NdJ("click",function(){const i=t.CHM(e),l=i.$implicit,p=i.index,I=t.oxw();return t.KtG(I.onSelect({item:l,index:p}))})("contextmenu",function(i){const l=t.CHM(e),p=l.$implicit,I=l.index,L=t.oxw();return t.KtG(L.onContextMenu(i,p,I))}),t.TgZ(1,"td",26)(2,"i",27),t.NdJ("click",function(){const i=t.CHM(e),l=i.$implicit,p=i.index,I=t.oxw();return t.KtG(I.onRemove({item:l,index:p}))}),t.qZA()(),t.YNc(3,Ha,3,1,"td",28),t.TgZ(4,"td",29)(5,"span",30),t._uU(6),t._UZ(7,"br"),t.qZA(),t.YNc(8,Va,2,1,"ng-container",28),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td",31),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,Ka,2,1,"td",32),t.YNc(15,Ga,2,3,"td",33),t.YNc(16,Ba,3,3,"td",32),t.YNc(17,ja,3,3,"td",34),t.YNc(18,$a,3,3,"td",32),t.qZA()}if(2&n){const e=a.$implicit,o=t.oxw();t.xp6(3),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.RowNumberVisible),t.xp6(3),t.hij(" ",e.Variant.Name," "),t.xp6(2),t.Q6J("ngIf",e.Note),t.xp6(2),t.Oqu(e.Variant.Code),t.xp6(2),t.hij(" ",t.lcZ(13,10,e.Quantity)," "),t.xp6(2),t.Q6J("ngIf",o.appConfig.ModuleDelivery.OutletDelivery.UOMVisible),t.xp6(1),t.Q6J("ngIf",o.role.Cost&&o.appConfig.ModuleDelivery.OutletDelivery.CostVisible),t.xp6(1),t.Q6J("ngIf",o.role.PriceVisible&&o.appConfig.ModuleDelivery.OutletDelivery.PriceVisible),t.xp6(1),t.Q6J("ngIf",o.role.Discount),t.xp6(1),t.Q6J("ngIf",o.role.PriceVisible&&o.appConfig.ModuleDelivery.OutletDelivery.PriceVisible)}}function za(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),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",38),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 Xa=(()=>{class n{onContextMenu(e,o,i){e.preventDefault(),this.contextMenuPosition.x=e.clientX+"px",this.contextMenuPosition.y=e.clientY+"px",o.Index=i,this.contextMenu.menuData={item:o},this.contextMenu.openMenu()}drop(e){(0,it.bA)(this.cartItems,e.previousIndex,e.currentIndex),this.cartItemService.updateCartItem(this.cartItems),this.onDragItem.emit(this.cartItems),this.cartItemsChange.emit(this.cartItems)}constructor(e,o){(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=o,this.cartItems=[],this.destroy$=new mt.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)(i=>m.gT.IsNotEmpty(i))).subscribe({next:i=>{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,tt.R)(this.destroy$)).subscribe(e=>{this.role=e})}onRemove(e){this.onRemoveItem.emit(e)}onSelect(e){this.onSelectItem.emit(e)}onReverse(e,o){o?(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(nt.O),t.Y36(K.N))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-cart-display"]],viewQuery:function(e,o){if(1&e&&(t.Gf(Fa,5),t.Gf(Y.p6,7)),2&e){let i;t.iGM(i=t.CRH())&&(o.cartContainer=i.first),t.iGM(i=t.CRH())&&(o.contextMenu=i.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"],[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,o){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,La,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,Qa,1,0,"th",9),t.YNc(16,ka,2,0,"th",10),t.YNc(17,Ea,2,0,"th",11),t.YNc(18,Ra,2,0,"th",12),t.YNc(19,Ya,2,0,"th",13),t.qZA()(),t.TgZ(20,"tbody",14),t.NdJ("cdkDropListDropped",function(l){return o.drop(l)}),t.YNc(21,Wa,19,12,"tr",15),t.qZA()()()(),t._UZ(22,"div",16),t.TgZ(23,"mat-menu",null,17),t.YNc(25,za,4,0,"ng-template",18),t.qZA()()),2&e){const i=t.MAs(24);t.xp6(8),t.Q6J("ngIf",o.appConfig.ModuleSell.Grid.RowNumberVisible),t.xp6(7),t.Q6J("ngIf",o.appConfig.ModuleDelivery.OutletDelivery.UOMVisible),t.xp6(1),t.Q6J("ngIf",o.role.Cost&&o.appConfig.ModuleDelivery.OutletDelivery.CostVisible),t.xp6(1),t.Q6J("ngIf",o.role.PriceVisible&&o.appConfig.ModuleDelivery.OutletDelivery.PriceVisible),t.xp6(1),t.Q6J("ngIf",o.role.Discount),t.xp6(1),t.Q6J("ngIf",o.role.PriceVisible&&o.appConfig.ModuleDelivery.OutletDelivery.PriceVisible),t.xp6(2),t.Q6J("ngForOf",o.cartItems),t.xp6(1),t.Udp("left",o.contextMenuPosition.x)("top",o.contextMenuPosition.y),t.Q6J("matMenuTriggerFor",i)}},dependencies:[d.sg,d.O5,Ja.PQ,it.Wj,it.Zt,Y.VK,Y.OP,Y.KA,Y.p6,S.gM,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 tr=function(){return["/menu/Logistics/Archive/Transfer_Order"]};function er(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 i=t.oxw();return t.KtG(i.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,tr)))}function nr(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 i=t.oxw(2);return t.KtG(i.selectItem())})("onOpenUploadModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openUploadModal())})("onAddItem",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.addItem(i))})("onScanCode",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onScanBarcode(i))}),t.qZA(),t.TgZ(2,"POS-cart-display",17),t.NdJ("onRemoveItem",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.removeItem(i))})("onSelectItem",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectItem(i))})("onDragItem",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.saveItemAfterDrag(i))}),t.qZA(),t.TgZ(3,"POS-cart-action",18),t.NdJ("onOpenEmptyModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openEmptyModal())})("onOpenDeliveryNoteModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openDeliveryNoteModal())})("onOpenVoidModal",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openVoidModal())})("onSubmit",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.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 or(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 i=t.oxw();return t.KtG(i.openOutletModal())})("onOpenCourierModal",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openCourierModal())})("selectDestination",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectDestination())}),t.qZA()(),t.TgZ(3,"div",11)(4,"div",12),t._UZ(5,"pos-quick-key",13),t.qZA(),t.YNc(6,nr,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 ir(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 i=t.oxw();return t.KtG(i.undo())})("onNewForm",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.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 ar=(()=>{class n extends $i.M{handleF4(){m.gT.IsEmpty(this.outletID)?this.toastr.error("Please select outlet before proceeding..",T.n.Error):!(this.matDialog.openDialogs.length>0)&&m.gT.IsNotEmpty(this.outletID)&&this.matDialog.open(wt,{data:{item:null,entityID:this.outletID}})}handleF8(){this.isComplete&&this.newForm()}constructor(e,o,i,l,p,I,L,cc,sc,dc){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=o,this.activatedRoute=i,this.matDialog=l,this.backEndService=p,this.quickKeyService=I,this.deliveryDataService=L,this.cartItemService=cc,this.toastr=sc,this.router=dc,this.destroy$=new mt.x,this.deliveryDataService.Data$.pipe((0,tt.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,tt.R)(this.destroy$),(0,J.h)(R=>m.gT.IsNotEmpty(R.id)),(0,et.b)(R=>this.cartItemService.getItemById(R.id,R.entityID))).subscribe(R=>this.cartItemService.addNewItem(R))}ngOnInit(){this.initLoadForm()}ngOnDestroy(){this.deliveryDataService.pushNewValue(new Pt.j$),this.quickKeyService.Data=new Wi.AM,this.cartItemService.inventoryState="",this.cartItemService.lowOnStockInfo={EntityID:m.gT.GuidEmpty,Items:[]},this.destroy$.next(!0),this.destroy$.complete()}initLoadForm(){const e=this.activatedRoute.snapshot.queryParams;m.gT.IsNotEmpty(e.ID)&&!this.isVoid?(this.isEdit=!0,this.menuData$.pipe((0,et.b)(()=>this.firstLoadService.getStorage(E.W.LoadFormDelivery,e.ID))).subscribe(o=>this.fillData(o))):this.menuData$.pipe((0,et.b)(()=>this.firstLoadService.getStorage(E.W.LoadFormDelivery,null))).subscribe(o=>{this.fillData(o),"low"==this.cartItemService.inventoryState||""==this.cartItemService.inventoryState?this.openOutletModal():(this.deliveryData.Order.SourceEntityID=this.cartItemService.lowOnStockInfo.EntityID,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)}),(0,Ot.a)([this.backEndService.generateNumber(this.outletID,E.W.DeliveryGenerateNumber),this.backEndService.getQuickKey(this.outletID,E.W.GetQuickKey)]).subscribe(([i,l])=>{this.deliveryData.Order.Number=i.Number,this.initQuickKey(l),document.getElementById("product").focus()}))})}fillData(e){this.deliveryStorage=e,this.firstLoadService.pageState=ea.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(o=>({VariantID:o.ID||o.VariantID,Variant:{Name:o.Product||o.Variant,Code:o.Code||o.Variant?.Code},Discount:0,Price:o.UnitPrice,Cost:o.UnitCost,Quantity:"low"==this.cartItemService.inventoryState?o.Max-o.Inventory:o.UnitsInStock-o.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(o=>{this.deliveryData.Order.Number=o.Number}),m.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(o=>{o.ID===this.deliveryData.Order.SourceEntityID&&(this.outletID=o.ID,this.outletName=o.Name,this.quickKeyId=o.QuickKeyTemplateID,this.templateID=o.PrintTemplateID)}),this.mappingItemToClass(),this.deliveryDataService.Data.Items=(0,qt.yE)(X.t,this.cartItems),this.backEndService.getQuickKey(this.outletID,E.W.GetQuickKey).subscribe(o=>this.initQuickKey(o)))}mappingItemToClass(){let e;this.cartItems=this.cartItems.map(o=>(e=new X.t,o.Variant.Serial=o.Serial,e.Quantity=o.Quantity,e.patchByVariant(o.Variant),e))}initRoles(){this.firstLoadService.initRoles(),this.firstLoadService.role$.pipe((0,tt.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=>{m.gT.IsEmpty(e.DiscountAmount)&&(e.DiscountAmount=0),this.cartItems.push(e)})}initDeliveryCart(){m.gT.IsNotEmpty(this.deliveryData.Order.ID)&&(this.fillCartItems(),this.cartItemService.updateCartItem(this.cartItems))}openOutletModal(){(!this.isEdit||this.isVoid)&&this.matDialog.open(St.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,zi.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,et.b)(()=>(0,Ot.a)([this.backEndService.generateNumber(this.outletID,E.W.DeliveryGenerateNumber),this.backEndService.getQuickKey(this.outletID,E.W.GetQuickKey)]))).subscribe(([e,o])=>{this.deliveryData.Order.Number=e.Number,this.initQuickKey(o),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(na).afterClosed().pipe((0,J.h)(e=>m.gT.IsNotEmpty(e))).subscribe(e=>{const o={ID:e.ID,Name:e.Name};this.couriers=[...this.couriers,o],this.deliveryData.Order.CourierID=o.ID})}saveItemAfterDrag(e){this.cartItemService.updateCartItem(e)}removeItem(e){this.cartItemService.removeItem(e)}selectItem(e){this.matDialog.open(wt,{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(i=>i.ID==e)}addItem(e){this.cartItemService.getItemById(e,this.outletID).subscribe(o=>this.cartItemService.addNewItem(o))}openDeliveryNoteModal(){this.matDialog.open(Xi,{data:{deliveryData:this.deliveryData}})}openEmptyModal(){this.matDialog.open(ta,{data:this.outletID})}submit(){if(!m.gT.IsEmpty(this.deliveryData.Order.DestinationEntityID))return m.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?m.gT.IsEmpty(this.deliveryData.Order.Number)?this.toastr.error("Number cannot be empty.",T.n.Error):this.validateSerialQty()?this.matDialog.open(At.y,{data:{transactionData:this.deliveryData,api:E.W.SubmitOutletDelivery}}).afterClosed().pipe((0,J.h)(e=>m.gT.IsNotEmpty(e))).subscribe(e=>{this.completeInfo=e,this.completeInfo.deliveryEditor=this.deliveryEditor,this.completeInfo.PrintTemplateID=this.templateID;const o=this.destinationEntities.find(i=>i.ID===this.deliveryData.Order.DestinationEntityID).Name;this.toastr.warning(`Your items is delivered to ${o}`,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(o=>{o.checkMatchSerialWithQuantity()||(e=!1)}),e}openVoidModal(){this.matDialog.open(Mt.s).afterClosed().pipe((0,J.h)(e=>e)).subscribe(e=>{this.isVoid=e,this.deliveryDataService.pushNewValue(new Pt.j$),this.initLoadForm()})}onScanBarcode(e){this.cartItemService.addCartItemByCode(e,this.outletID)}openUploadModal(){this.matDialog.open(Ut.h).afterClosed().pipe((0,J.h)(e=>m.gT.IsNotEmpty(e)&&e.length>0)).subscribe(e=>e.forEach(o=>this.cartItemService.addNewItem(o,!0)))}onScanSerial(){this.matDialog.open(ba,{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(nt.O),t.Y36(c.gz),t.Y36(g.uw),t.Y36(ot.M),t.Y36(ya.w),t.Y36(Da.p),t.Y36(K.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,o){1&e&&t.NdJ("keydown.F4",function(l){return o.handleF4(l)},!1,t.Jf7)("keydown.F8",function(l){return o.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,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0)(1,"actions"),t.YNc(2,er,9,2,"ng-container",1),t.qZA(),t.TgZ(3,"content"),t.YNc(4,or,7,10,"div",2),t.YNc(5,ir,2,3,"div",3),t.qZA()()),2&e&&(t.Q6J("hideSearchDropdown",!0)("hideSearchBox",!0)("pageData",o.menuData),t.xp6(2),t.Q6J("ngIf",!o.isComplete),t.xp6(2),t.Q6J("ngIf",!o.isComplete),t.xp6(1),t.Q6J("ngIf",o.isComplete))},dependencies:[d.O5,c.rH,b.p,Ia.w,Jt.H,Aa,Sa,Ua,Xa],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})(),rr=(()=>{class n{constructor(e,o){(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=o,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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.dialogRef.close("save")})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"textarea",2),t.NdJ("ngModelChange",function(l){return o.data.Note=l}),t.qZA()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(3),t.Q6J("ngModel",o.data.Note))},dependencies:[w.M,_.Fj,_.JJ,_.On]})),n})();function lr(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(i){const p=t.CHM(e).$implicit;return t.KtG(p.Quantity=i)}),t.qZA()(),t._UZ(7,"td",21)(8,"td",21),t.TgZ(9,"td")(10,"textarea",23),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).$implicit;return t.KtG(p.Note=i)}),t.qZA()()()}if(2&n){const e=a.$implicit,o=a.index,i=t.oxw(2);t.xp6(2),t.Oqu(o+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==i.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==i.serialized)}}const cr=function(n){return{ID:n}};function sr(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 i=t.oxw();return t.KtG(i.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(i){t.CHM(e);const l=t.oxw();return t.KtG(l.data.Date=i)}),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,lr,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,cr,e.data.ID)),t.xp6(9),t.Q6J("date",e.data.Date),t.xp6(21),t.Q6J("ngForOf",e.data.Items)}}let dr=(()=>{class n extends z.U{constructor(e,o,i,l,p){super(e,"TransferOrder/ReceiveOutletDelivery",o),(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",H.J.Serialized),this.toastr=i,this.matDialog=l,this.router=p}openNoteDialog(){this.matDialog.open(rr,{data:{data:this.data}}).afterClosed().pipe((0,J.h)(e=>m.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,o){1&e&&t.YNc(0,sr,33,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[d.sg,d.O5,c.rH,_.Fj,_.JJ,_.On,b.p,D.QB,V.b]})),n})();var pr=s(71884),_r=s(78372),ur=s(68675),mr=s(63900),gr=s(39646);let xt=(()=>{class n{constructor(e,o){(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=o}bindCartItems(e=[],o=[],i){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,o),i&&this.checkIsEdit(p),this.cartItems.push(p)})}setSerialSourceItem(e){return e.TypeID==H.J.Serialized&&(e.serialSources=e?.Serial?JSON.parse(JSON.stringify(e?.Serial)):[]),e}checkIsEdit(e){const o=this.formItems.find(i=>i.ID==e.ID);m.gT.IsNotEmpty(o)?(e.QuantityDelivered=o.Quantity,e.Completed=!1,e.MaxDeliveryQuantity=e.Quantity-e.Sent+o.Quantity):e.Completed||(e.QuantityDelivered=0)}checkIsSent(e,o){const i=o?.find(l=>l.ID==e.ID);m.gT.IsNotEmpty(i)&&(e.Sent=i.Quantity,e.QuantityDelivered=e.Quantity-e.Sent,e.MaxDeliveryQuantity=e.Quantity-e.Sent,e.Completed=0==e.QuantityDelivered)}onScanBarcode(e){if(m.gT.IsEmpty(e))this.toastr.error("Code is empty",T.n.Error);else{let o=this.cartItems.find(i=>m.gT.IsNotEmpty(i.Code)&&i.Code==e);if(m.gT.IsNotEmpty(o)){this.cartItems.filter(l=>l.Code==e).forEach(l=>l.BarcodeCount+=1);let i=[];this.cartItems.forEach(l=>i.push(l)),this.cartItems=i,this.toastr.success(`${o.Name} (${o.Code}) count: ${o.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})(),fr=(()=>{class n{constructor(e,o){(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=o,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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),t.TgZ(1,"content")(2,"div",1),t._UZ(3,"div",2),t.qZA()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(3),t.Q6J("innerHTML",null==o.data?null:o.data.message,t.oJD))},dependencies:[w.M]})),n})(),Ft=(()=>{class n{constructor(e,o,i){(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=o,this.dialog=i}validate(e,o,i){let l=!0;return 0==e.filter(p=>0!=p.QuantityDelivered).length&&!i&&(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)),o&&(p.QuantityDelivered<0?-1*p.QuantityDelivered:p.QuantityDelivered)!=p.BarcodeCount&&p.QuantityDelivered>0&&(this.dialog.open(fr,{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 o=0;return e.forEach(i=>{o+=i.Qty}),o}convertCartItemsToForm(e){return e.filter(i=>!i.Completed).map(i=>({ID:i.ID,Name:i.Name,VariantID:i.VariantID,Quantity:i.QuantityDelivered,PackSize:i.PackSize,Serial:i.Serial,UnitQuantity:1,Note:i.Note}))}newForm(e){this.router.navigate([`/menu/Logistics/Archive/${e}/Form`]).then(()=>window.location.reload())}undo(e,o){this.router.navigate([`/menu/Logistics/Archive/${o}/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 G=s(90811);function hr(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 xr(n,a){if(1&n&&(t.TgZ(0,"div",25),t.YNc(1,hr,6,4,"ng-container",26),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",0!=e.Quantity)}}function Cr(n,a){if(1&n&&(t.TgZ(0,"div",21),t.YNc(1,xr,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 Lt=function(n){return[n]},Zr=function(n,a){return{ID:n,Template:a}},vr=function(n){return{ID:n}};let Qt=(()=>{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,o){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 o.onNewForm()}),t._uU(11),t.qZA()()()(),t.TgZ(12,"div",10)(13,"div",11)(14,"button",12),t.NdJ("click",function(){return o.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,Cr,9,7,"div",20),t.qZA()()()),2&e&&(t.xp6(6),t.hij("",o.state," Logistics Complete"),t.xp6(5),t.hij("New ",o.state," Logistics (F8)"),t.xp6(6),t.Q6J("routerLink",t.VKq(9,Lt,"Outbound"==o.state?"/print/OutDelivery":"/print/InDelivery"))("queryParams",t.WLB(11,Zr,o.afterSubmitData.ID,o.afterSubmitData.Template)),t.xp6(7),t.Q6J("routerLink",t.VKq(14,Lt,"Outbound"==o.state?"/menu/Logistics/Archive/Outbound_Logistics/Info":"/menu/Logistics/Archive/Inbound_Logistics/Info"))("queryParams",t.VKq(16,vr,o.afterSubmitData.ID)),t.xp6(1),t.AsE("",o.state," Logistics #",o.afterSubmitData.DeliveryNumber,""),t.xp6(1),t.Q6J("ngIf",o.items.length>0))},dependencies:[d.sg,d.O5,c.rH,d.JJ,N.qU],changeDetection:0})),n})(),kt=(()=>{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,o){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 o.form.Header.Note=l}),t.qZA()()),2&e&&(t.xp6(5),t.Q6J("value",o.form.Header.Note))},dependencies:[ft.V],changeDetection:0})),n})();var Tr=s(54004),br=s(18810),Et=s(29766);function yr(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(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectedSerialCode=i)})("onFocus",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onFocusAddSerial())})("onBlur",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onBlurAddSerial())}),t.qZA(),t.TgZ(3,"button",8),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.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 Dr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectedSerialCode=i)})("change",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectSerial(i))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("items",e.serialSources)("multiple",!0)("ngModel",e.selectedSerialCode)("disabled",e.isStateEdit)}}function Ir(n,a){1&n&&t._UZ(0,"th",20)}function Or(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 i=t.oxw().index,l=t.oxw(3);return t.KtG(l.onRemoveSerial(i))}),t.qZA()()}}function Mr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr"),t.YNc(1,Or,2,0,"td",21),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"input",22),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).$implicit;return t.KtG(p.Qty=i)}),t.qZA()()()}if(2&n){const e=a.$implicit,o=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!o.isStateEdit),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.Q6J("ngModel",e.Qty)("disabled",o.isStateEdit)}}function Ar(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,Ir,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,Mr,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 Sr(n,a){if(1&n&&(t.ynx(0),t.YNc(1,yr,7,4,"ng-container",2),t.YNc(2,Dr,1,4,"ng-template",null,4,t.W1O),t.YNc(4,Ar,13,2,"ng-container",5),t.BQk()),2&n){const e=t.MAs(3),o=t.oxw();t.xp6(1),t.Q6J("ngIf",o.isEmptySerial&&"Inbound_Logistics"==o.state)("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",o.selectedSerial.length>0)}}function qr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"textarea",26),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.note=i)}),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)("disabled",e.isStateEdit)}}let Nr=(()=>{class n{constructor(e,o,i,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=o,this.toastr=i,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==H.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,Tr.U)(e=>e.map(o=>({Code:o.Serial,Qty:o.Quantity})))).subscribe(e=>{this.serialSources=e}):this.serialSources=this.data?.item?.serialSources}initSelectedSerial(e){this.selectedSerial=e?.map((o,i)=>({Code:o.Code,Qty:o.Qty}))}mapSerialToCode(){this.selectedSerialCode=this.selectedSerial.map(e=>e.Code)}onSelectSerial(e){this.selectedSerial=e.map(o=>({Code:o.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(i=>-1==this.selectedSerial.findIndex(l=>l.Code==i)),this.selectedSerialCode.map(i=>(e=this.serialSources.find(l=>l.Code==i),{Code:i,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 o=this.getSubmitedSerialData();this.dialogRef.close({note:this.generateNote(o),serials:o})}getSubmitedSerialData(){return this.selectedSerial.map(o=>({Code:o.Code,Qty:o.Qty}))}calculateSerialQty(){return this.selectedSerial?.map(o=>o.Qty)?.reduce((o,i)=>o+i)}generateNote(e){let o="";return e?.length>0&&(o=`[${e.map((l,p)=>`${p>0?" ":""}${l.Code}${l.Qty>1?" Qty:"+l.Qty:""}`)}]`),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(xt),t.Y36(br.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","disabled","ngModelChange"],["for","note"]],template:function(e,o){if(1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.onClose()}),t.TgZ(1,"content")(2,"div",1),t.YNc(3,Sr,5,3,"ng-container",2),t.YNc(4,qr,4,2,"ng-template",null,3,t.W1O),t.qZA()()()),2&e){const i=t.MAs(5);t.Q6J("config",o.config),t.xp6(3),t.Q6J("ngIf",o.isSerialized)("ngIfElse",i)}},dependencies:[d.sg,d.O5,w.M,_.Fj,_.JJ,_.On,V.b,C.w9,Et.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 wr(n,a){1&n&&(t.TgZ(0,"th",9),t._uU(1," Pack Size"),t.qZA())}function Pr(n,a){if(1&n&&t._UZ(0,"p",21),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",null==e?null:e.Note,t.oJD)}}function Ur(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",22),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.QuantityDelivered=i)}),t.qZA()}if(2&n){const e=t.oxw().$implicit,o=t.oxw();t.Q6J("ngModel",e.QuantityDelivered)("disabled",o.isEdit)}}function Jr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",23),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw().$implicit;return t.KtG(l.PackSize=i)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.PackSize)}}const Fr=function(n){return{ID:n}};function Lr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td")(2,"a",14),t._uU(3),t.qZA(),t.YNc(4,Pr,1,1,"p",15),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t.YNc(8,Ur,1,2,"input",16),t.qZA(),t.YNc(9,Jr,2,1,"td",17),t.TgZ(10,"td",18),t._uU(11),t.qZA(),t.TgZ(12,"td",18),t._uU(13),t.qZA(),t.TgZ(14,"td",18),t._uU(15),t.qZA(),t.TgZ(16,"td",19)(17,"i",20),t.NdJ("click",function(){const i=t.CHM(e),l=i.$implicit,p=i.index,I=t.oxw();return t.KtG(I.openModalItemNote(l,p))}),t.qZA()()()}if(2&n){const e=a.$implicit,o=t.oxw();t.xp6(2),t.Q6J("queryParams",t.VKq(9,Fr,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),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," ")}}let Rt=(()=>{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,o){this.dialog.open(Nr,{data:{note:e.Note,name:e.Name,item:e,state:this.state,isEdit:this.isEdit}}).afterClosed().pipe((0,J.h)(i=>m.gT.IsNotEmpty(i))).subscribe(i=>{e.TypeID==H.J.Serialized&&(e.Serial=i.serials,e.QuantityDelivered=this.calculateSerialQty(i.serials)),e.Note=i.note,this.updateCartItems(e,o)})}updateCartItems(e,o){this.cartItems=this.cartItems.map((i,l)=>(o==l&&(i=e),i))}calculateSerialQty(e=[]){let o=0;return e.forEach(i=>{o+=i.Qty}),o}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",3,"queryParams"],["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"],["matTooltip","Note","matTooltipPosition","above",1,"fa-regular","fa-note-sticky","fa-2x","cursor-pointer",3,"click"],[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"]],template:function(e,o){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 o.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,wr,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,Lr,18,11,"tr",13),t.qZA()()()),2&e&&(t.xp6(19),t.Q6J("ngIf",o.isDeliveryPacking),t.xp6(2),t.Oqu("Outbound_Logistics"==o.state?"Sent":"Received"),t.xp6(2),t.hij("Order","Inbound_Logistics"==o.state?"ed":"",""),t.xp6(5),t.Q6J("ngForOf",o.cartItems))},dependencies:[d.sg,d.O5,c.rH,_.Fj,_.JJ,_.On,V.b,S.gM]})),n})();const Qr=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},Yt=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,Qr))("queryParams",t.VKq(3,Yt,e.param.ID||e.param.POID))}}const Er=function(){return["/menu/Logistics/Archive/Outbound_Logistics"]};function Rr(n,a){1&n&&(t.TgZ(0,"a",8),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Er))}function Yr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,kr,2,5,"a",4),t.YNc(2,Rr,2,2,"a",5),t.TgZ(3,"button",6),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.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 Hr(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 i=t.oxw(3);return t.KtG(i.searchLogisticType="invoice")}),t._UZ(3,"i",23),t.qZA(),t.TgZ(4,"mat-button-toggle",24),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.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 Vr(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 Kr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",28)(2,"autocompleteV2",29),t.NdJ("onSelect",function(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.getUnfulfilledInvoices(i))}),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("inputTextValue",e.customerName)}}function Gr(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 Br(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 jr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ng-select",31),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(4);return t.KtG(l.findSalesOrderAutoComplete(i))}),t.ALo(1,"async"),t.YNc(2,Gr,7,0,"ng-template",32),t.YNc(3,Br,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 $r(n,a){if(1&n&&t.YNc(0,jr,4,6,"ng-select",30),2&n){const e=t.oxw(3);t.Q6J("ngIf",!(e.isEdit||e.isPO))}}function Wr(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 zr(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 Xr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"ng-select",36),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.findSalesOrderByCustomer(i))}),t.YNc(2,Wr,7,0,"ng-template",32),t.YNc(3,zr,9,9,"ng-template",33),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("items",e.unfulfilledInvoices)}}function tl(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 el(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 nl=function(){return["/menu/Contacts/Contact/Customers/Info"]};function ol(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,tl,7,1,"tr",2),t.YNc(16,el,6,1,"tr",2),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(13),t.Q6J("routerLink",t.DdM(5,nl))("queryParams",t.VKq(6,Yt,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 il(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 al(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 rl(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 ll(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 cl(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,il,7,1,"tr",2),t.YNc(8,al,7,1,"tr",2),t.YNc(9,rl,6,1,"tr",2),t.YNc(10,ll,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 sl(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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.EntityID=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Date=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Number=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.CourierID=i)}),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 dl(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 pl(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,Hr,6,2,"ng-container",2),t.qZA(),t.TgZ(9,"div",15),t.YNc(10,Vr,23,6,"table",16),t.YNc(11,Kr,3,1,"ng-container",17),t.YNc(12,$r,1,1,"ng-template",null,18,t.W1O),t.YNc(14,Xr,4,1,"div",2),t.qZA()(),t.YNc(15,ol,17,8,"div",19),t.YNc(16,cl,11,4,"div",19),t.YNc(17,sl,35,8,"div",19),t.qZA(),t.YNc(18,dl,5,4,"div",20),t.qZA()()),2&n){const e=t.MAs(13),o=t.oxw(2);t.xp6(8),t.Q6J("ngIf",!o.isEdit&&!o.isPO),t.xp6(2),t.Q6J("ngIf",(o.isEdit||o.isPO)&&o.deliveryData),t.xp6(1),t.Q6J("ngIf","customer"==o.searchLogisticType)("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",o.unfulfilledInvoices.length>0&&"customer"==o.searchLogisticType),t.xp6(1),t.Q6J("ngIf",null==o.deliveryData||null==o.deliveryData.Customer?null:o.deliveryData.Customer.ID),t.xp6(1),t.Q6J("ngIf",null==o.deliveryData||null==o.deliveryData.Recipient?null:o.deliveryData.Recipient.ID),t.xp6(1),t.Q6J("ngIf",o.deliveryData),t.xp6(1),t.Q6J("ngIf",o.deliveryData)}}function _l(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"POS-complete-customer-supplier",54),t.NdJ("undo",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.undo(i))})("newForm",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.newForm())}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function ul(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("barcodeQueryChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.onScanBarcode(i))}),t.TgZ(1,"actions"),t.YNc(2,Yr,5,3,"ng-container",2),t.qZA(),t.TgZ(3,"content"),t.YNc(4,pl,19,9,"div",3),t.YNc(5,_l,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 ml=(()=>{class n extends z.U{constructor(e,o,i,l){super(e,"OutboundLogisticsLoader/GetStorage",o),(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 mt.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=i,this.formService=l,this.form={Header:{},Items:[]},this.searchLogisticType="invoice"}handleF8(){this.isComplete&&this.newForm()}initializeFormState(){this.param=this.route.snapshot.queryParams,m.gT.IsEmpty(this.param.POID)&&m.gT.IsEmpty(this.param.ID)?(this.isEdit=!1,this.initOrderNumberOptions()):m.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,pr.x)(),(0,_r.b)(500),(0,ur.O)(""),(0,mr.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,gr.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){m.gT.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}findSalesOrderAutoComplete(e){m.gT.IsNotEmpty(e)?this.getDeliveryItems(e.Key):this.orderInput$.next("")}getDeliveryItems(e){let o,i;this.isPO||!this.isEdit?(o="GetByPOID",this.form.Header.CustomerPOID=e,i={POID:this.param.POID||e}):(o="GetByID",i={ID:this.param.ID}),this.httpService.post(`/API/OutDelivery/${o}`,JSON.stringify(i)).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,this.initOrderNumberOnEdit(),m.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,m.gT.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.SalesOrder.EntityID),this.form.Header.Note=e.SalesOrder.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(m.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 o=this.storage.Entities.find(i=>i.ID==e);m.gT.IsNotEmpty(o)&&(this.form.Header.EntityID=o.ID)}getUnfulfilledInvoices(e){this.httpService.post("/API/OutDelivery/GetUnfulfilledOrdersByCustomerID",JSON.stringify({id:e})).subscribe(o=>this.unfulfilledInvoices=o)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(xt),t.Y36(Ft))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-outbound-logistics-form"]],hostBindings:function(e,o){1&e&&t.NdJ("keydown.F8",function(l){return o.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,o){1&e&&t.YNc(0,ul,6,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.storage)},dependencies:[d.O5,c.rH,_.Fj,_.JJ,_.On,b.p,D.QB,k.J,C.w9,C.ir,C.Cm,G.A9,G.Yi,S.gM,Qt,kt,Rt,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 gl=s(99036);let fl=(()=>{class n{constructor(e,o,i){(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=o,this.convertCsvService=i,this.modalConfig=new q.O,this.modalConfig.title=e.title}onSelectFile(e){this.convertCsvService.convert(e).subscribe(o=>{this.convertedData=o})}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(gl.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,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onClose()})("onClose",function(){return o.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 o.onSelectFile(l.target)}),t.qZA()()()()()()()()()),2&e&&t.Q6J("config",o.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 hl=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]},Ht=function(n){return{ID:n}};function xl(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,hl))("queryParams",t.VKq(3,Ht,e.param.ID||e.param.POID))}}const Cl=function(){return["/menu/Logistics/Archive/Inbound_Logistics"]};function Zl(n,a){1&n&&(t.TgZ(0,"a",8),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Cl))}function vl(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,xl,2,5,"a",4),t.YNc(2,Zl,2,2,"a",5),t.TgZ(3,"button",6),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.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 Tl(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 i=t.oxw(3);return t.KtG(i.searchLogisticType="invoice")}),t._UZ(3,"i",22),t.qZA(),t.TgZ(4,"mat-button-toggle",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.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 bl(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",25)(2,"autocompleteV2",26),t.NdJ("onSelect",function(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.getDeliveryItems(i))}),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(2),t.Q6J("inputTextValue",e.orderInvoice)}}function yl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"autocompleteV2",27),t.NdJ("onSelect",function(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.getUnfulfilledInvoices(i))}),t.qZA()()}}function Dl(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 Il(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 Ol(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"ng-select",28),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.findSalesOrderByCustomer(i))}),t.YNc(2,Dl,7,0,"ng-template",29),t.YNc(3,Il,9,9,"ng-template",30),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("items",e.unfulfilledInvoices)}}const Ml=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function Al(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,Ml))("queryParams",t.VKq(4,Ht,e.deliveryData.SupplierContact.ID)),t.xp6(1),t.hij(" ",null==e.deliveryData?null:e.deliveryData.SupplierContact.Name," ")}}function Sl(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 ql(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 Nl(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,Al,8,6,"tr",2),t.YNc(8,Sl,7,1,"tr",2),t.YNc(9,ql,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 wl(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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.EntityID=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Date=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.PaymentDue=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.Number=i)}),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(i){t.CHM(e);const l=t.oxw(3);return t.KtG(l.form.Header.CourierID=i)}),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 Pl(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 i=t.oxw(3);return t.KtG(i.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 Ul(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,Tl,6,2,"ng-container",2),t.qZA(),t.TgZ(9,"div",15),t.YNc(10,bl,3,1,"ng-container",16),t.YNc(11,yl,2,0,"ng-template",null,17,t.W1O),t.YNc(13,Ol,4,1,"div",2),t.qZA()(),t.YNc(14,Nl,10,3,"div",18),t.YNc(15,wl,42,10,"div",18),t.qZA(),t.YNc(16,Pl,5,3,"div",19),t.qZA()()),2&n){const e=t.MAs(12),o=t.oxw(2);t.xp6(8),t.Q6J("ngIf",!o.isEdit&&!o.isPO),t.xp6(2),t.Q6J("ngIf","invoice"==o.searchLogisticType)("ngIfElse",e),t.xp6(3),t.Q6J("ngIf",o.unfulfilledInvoices.length>0&&"customer"==o.searchLogisticType),t.xp6(1),t.Q6J("ngIf",null==o.deliveryData||null==o.deliveryData.SupplierContact?null:o.deliveryData.SupplierContact.ID),t.xp6(1),t.Q6J("ngIf",o.deliveryData),t.xp6(1),t.Q6J("ngIf",o.deliveryData)}}function Jl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"POS-complete-customer-supplier",49),t.NdJ("undo",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.undo(i))})("newForm",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.newForm())}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function Fl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("barcodeQueryChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.onScanBarcode(i))}),t.TgZ(1,"actions"),t.YNc(2,vl,5,3,"ng-container",2),t.qZA(),t.TgZ(3,"content"),t.YNc(4,Ul,17,7,"div",3),t.YNc(5,Jl,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 Ll=(()=>{class n extends z.U{constructor(e,o,i,l,p){super(e,"InboundLogisticsLoader/GetStorage",o),(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=i,this.formService=l,this.dialog=p,this.form={Header:{},Items:[]}}initializeFormState(){this.param=this.route.snapshot.queryParams,m.gT.IsEmpty(this.param.POID)&&m.gT.IsEmpty(this.param.ID)?this.isEdit=!1:m.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){m.gT.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}getDeliveryItems(e){let o,i;this.isPO||!this.isEdit?(o="GetByPOID",this.form.Header.PurchaseOrderID=e,i={POID:this.param.POID||e}):(o="GetByID",i={ID:this.param.ID}),this.httpService.post(`/API/InDelivery/${o}`,JSON.stringify(i)).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,m.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(),m.gT.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.PO.EntityID),this.form.Header.Note=e.PO.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(m.gT.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Inbound #${this.form.Header.Number}`)}}assignDefaultWarehouse(e){const o=this.storage.Entities.find(i=>i.ID==e);m.gT.IsNotEmpty(o)&&(this.form.Header.EntityID=o.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(fl,{data:{title:"Import Products"}}).afterClosed().pipe((0,J.h)(e=>m.gT.IsNotEmpty(e))).subscribe(e=>{this.mappingItemWithCsv(e)})}mappingItemWithCsv(e){this.productService.cartItems=this.productService.cartItems.map(o=>(e.forEach(i=>{i.Quantity=parseFloat(i.Quantity),i.Code==o.Code&&(o.QuantityDelivered=i.Quantity)}),o))}getUnfulfilledInvoices(e){this.httpService.post("/API/InboundLogistics/GetUnfulfilledOrdersBySupplierID",JSON.stringify({ID:e})).subscribe(o=>this.unfulfilledInvoices=o)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(h.O),t.Y36(c.gz),t.Y36(xt),t.Y36(Ft),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,o){1&e&&t.YNc(0,Fl,6,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.storage)},dependencies:[d.O5,c.rH,_.Fj,_.JJ,_.On,b.p,D.QB,k.J,C.w9,C.ir,C.Cm,G.A9,G.Yi,S.gM,Qt,kt,Rt,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 Ql=s(62612),kl=s(23410),Vt=s(70585);function El(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openExportModal())}),t._UZ(1,"i",24),t._uU(2," Export"),t.qZA()}}function Rl(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 Kt=function(n){return{ID:n}};function Yl(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,Rl,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,Kt,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,Kt,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 Hl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"span",31),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount"))}),t.TgZ(1,"i",32),t._uU(2,"?"),t.qZA()()}}function Vl(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 Kl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",33),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.NextPage(!0))}),t._UZ(1,"i",34),t._uU(2," Next"),t.qZA()}}function Gl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",35),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount",!0))}),t._UZ(1,"i",36),t._uU(2," Show All"),t.qZA()}}const jl=[{path:"Archive/Transfer_Order",component:Xt},{path:"Archive/Transfer_Order/Info",component:Ti},{path:"Archive/Transfer_Order/Form",component:ar},{path:"Archive/Transfer_Order/Receive",component:dr},{path:"Archive/Outbound_Logistics",component:ue},{path:"Archive/Outbound_Logistics/Info",component:tn},{path:"Archive/Outbound_Logistics/Form",component:ml},{path:"Archive/Inbound_Logistics",component:De},{path:"Archive/Inbound_Logistics/Info",component:Qi},{path:"Archive/Inbound_Logistics/Form",component:Ll},{path:"Report/Outbound/Product",component:_n},{path:"Report/Outbound/Detail",component:Dn},{path:"Report/Outbound/Logistics_Service",component:Ql.k},{path:"Report/Outbound/Logistics_Service/Detail",component:(()=>{class n extends kl.X{constructor(e,o,i,l){super(e,"SalesReport/LogisticServiceDetail","SalesReportLoader/LogisticServiceDetail",null,o),(0,r.Z)(this,"matDialog",void 0),(0,r.Z)(this,"roleService",void 0),this.matDialog=i,this.roleService=l}preInitList(){this.oldRowCount=this.pageData.Filter.RowCount}postInit(e){const o=this.pageData.Filter.StartTime,i=this.pageData.Filter.EndTime,l=o[0]+o[1],p=o[3]+o[4],I=i[0]+i[1],L=i[3]+i[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):(console.log(e),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,o){const i=e.toTimeString().split(" ")[0].slice(0,5);this.pageData.Filter[o]=i}}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,o){1&e&&(t.TgZ(0,"mainpanel-cmp",0),t.NdJ("textChange",function(l){return o.pageData.Filter.Name=l})("onSubmit",function(){return o.searchFromPageOne()}),t.TgZ(1,"actions"),t.YNc(2,El,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 o.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 o.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 o.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 o.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 o.onChangeTime(l,"StartTime")}),t.qZA(),t.TgZ(29,"p-calendar",8),t.NdJ("ngModelChange",function(l){return o.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,Yl,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,Hl,3,0,"span",18),t.YNc(55,Vl,3,3,"span",19),t._uU(56),t.qZA()(),t.TgZ(57,"div",20),t.YNc(58,Kl,3,0,"a",21),t.YNc(59,Gl,3,0,"a",22),t.qZA()()()()()),2&e&&(t.Q6J("pageData",o.menuData)("text",o.pageData.Filter.Name),t.xp6(2),t.Q6J("ngIf",o.roleService.global.Export),t.xp6(7),t.Q6J("ngModel",o.pageData.Filter.EntityID)("items",null==o.pageData.Options?null:o.pageData.Options.Entities),t.xp6(4),t.Q6J("ngModel",o.pageData.Filter.LogisticServiceID)("items",null==o.pageData.Options?null:o.pageData.Options.LogisticServices),t.xp6(5),t.Q6J("date",o.pageData.Filter.From),t.xp6(5),t.Q6J("date",o.pageData.Filter.To),t.xp6(5),t.Q6J("ngModel",o.pageData.Filter.StartTime)("timeOnly",!0),t.xp6(1),t.Q6J("ngModel",o.pageData.Filter.EndTime)("timeOnly",!0),t.xp6(19),t.Q6J("ngForOf",o.infiniteList),t.xp6(4),t.hij(" Showing 1 - ",t.lcZ(53,20,o.pageData.Filter.RowCount*(o.pageData.Filter.PageNumber-1)+(null==o.data||null==o.data.Data?null:o.data.Data.length))," of "),t.xp6(2),t.Q6J("ngIf",!o.pageData.HideStoreApiCount),t.xp6(1),t.Q6J("ngIf",o.pageData.HideStoreApiCount),t.xp6(1),t.hij(" records ~ ",o.pageData.Filter.PageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.nextPageDisabled&&!o.goToLast),t.xp6(1),t.Q6J("ngIf",o.nextPageDisabled&&!o.goToLast))},dependencies:[d.sg,d.O5,c.rH,_.JJ,_.On,b.p,D.QB,C.w9,S.gM,Vt.f,d.JJ]})),n})()},{path:"Report/Inbound/Product",component:Jn},{path:"Report/Inbound/Detail",component:jn},{path:"Report/Transfer/Product",component:no},{path:"Report/Transfer/Transfer",component:xo},{path:"Setup/Courier",component:Vi},{path:"Setup/Courier/Form",component:ji},{path:"",redirectTo:"Archive/Transfer_Order",pathMatch:"full"}];let $l=(()=>{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(jl),c.Bz]})),n})();var Wl=s(7155),zl=s(99602),Xl=s(3238),tc=s(71948),ec=s(44144),nc=s(88441),oc=s(65131),ic=s(3848);let ac=(()=>{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 rc=s(96308);let lc=(()=>{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,$l,_.u5,_.UX,N.dr,Wl.p0,zl.FA,Xl.XK,tc.Fk,ec.c,b.R,D.ZU,bt.K,g.Is,nc.S,k.Q,F.T,oc.X,Jt.D,C.A0,it._t,Y.Tx,St.U,At.b,Mt.G,Ut.E,ic.Nh,ft.O,G.vV,S.AV,Nt.g,Et.Gg,ac,rc.JX,Vt._8]})),n})()},88651:(B,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:(B,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=[],D=0;for(const F of O.split(/[\r\n]+/))if(g){let C={};for(let S=0;S<D;S++)C[b[S]]=F.split(",")[S];_.push(C)}else{for(let C=0;C<F.split(",").length;C++)D=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],D=new FileReader;return D.onload=F=>{const C=this.onFileLoad(F);this.subject$.next(C)},D.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:(B,Q,s)=>{s.d(Q,{g:()=>dt,t:()=>st});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),D=s(83902);function F(x,U){if(1&x){const u=c.EpF();c.ynx(0),c.TgZ(1,"div",6)(2,"p-chips",7),c.NdJ("ngModelChange",function(y){c.CHM(u);const A=c.oxw(2);return c.KtG(A.serials=y)})("ngModelChange",function(y){c.CHM(u);const A=c.oxw(2);return c.KtG(A.addSerial(y))}),c.qZA(),c.TgZ(3,"button",8),c.NdJ("click",function(){c.CHM(u);const y=c.oxw(2);return c.KtG(y.submitSerial())}),c._UZ(4,"i",9),c.TgZ(5,"strong",10),c._uU(6,"ADD"),c.qZA()()(),c.BQk()}if(2&x){const u=c.oxw(2);c.xp6(2),c.Q6J("placeholder","E.g. Serial1 Serial2")("allowDuplicate",!1)("ngModel",u.serials)}}function C(x,U){if(1&x){const u=c.EpF();c.TgZ(0,"ng-select",11),c.NdJ("ngModelChange",function(y){c.CHM(u);const A=c.oxw(2);return c.KtG(A.serials=y)})("remove",function(y){c.CHM(u);const A=c.oxw(2);return c.KtG(A.onRemoveSerialFromOption(y.value))})("change",function(y){c.CHM(u);const A=c.oxw(2);return c.KtG(A.onSelectSerial(y))}),c.ALo(1,"async"),c.qZA()}if(2&x){const u=c.oxw(2);c.Q6J("items",c.lcZ(1,3,u.serials$))("ngModel",u.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 u=c.MAs(5),f=c.oxw();c.xp6(3),c.Q6J("ngIf",f.isReturn)("ngIfElse",u)}}function at(x,U){1&x&&(c.ynx(0),c._UZ(1,"th",18),c.BQk())}function rt(x,U){if(1&x){const u=c.EpF();c.ynx(0),c.TgZ(1,"td",20)(2,"i",21),c.NdJ("click",function(){c.CHM(u);const y=c.oxw().index,A=c.oxw(2);return c.KtG(A.onRemoveSerial(y))}),c.qZA()(),c.BQk()}}function lt(x,U){if(1&x){const u=c.EpF();c.TgZ(0,"tr"),c.YNc(1,rt,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(y){const pt=c.CHM(u).$implicit;return c.KtG(pt.Qty=y)})("change",function(){c.CHM(u);const y=c.oxw(2);return c.KtG(y.onChangeQty())}),c.qZA()()()}if(2&x){const u=U.$implicit,f=c.oxw(2);c.xp6(1),c.Q6J("ngIf",!f.disabled),c.xp6(2),c.Oqu(u.Code),c.xp6(2),c.Q6J("ngModel",u.Qty)("disabled",f.disabled)}}function ct(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,at,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,lt,6,4,"tr",17),c.qZA()()()(),c.BQk()),2&x){const u=c.oxw();c.xp6(6),c.Q6J("ngIf",!u.disabled),c.xp6(6),c.Q6J("ngForOf",u.selectedSerial)}}let st=(()=>{class x{set cartItem(u){u&&(this._cartItem=u,this.initSelectedSerial(),u.Quantity<0?this.isReturn=!0:this.getSerialVariant())}get cartItem(){return this._cartItem}constructor(u){(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=u,this.cartItemChange=new c.vpe,this.serialsChange=new c.vpe}initSelectedSerial(){const u=this.cartItem.Serial;u&&u.length>0&&(this.selectedSerial=u)}getSerialVariant(){let f;this.serials$=this.productService.getVariantSerial(this.entityId,this.cartItem.VariantID).pipe((0,O.U)(y=>y.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(u=[]){return u.map(f=>f.Code)}onSelectSerial(u){let f=u.filter(y=>-1==this.selectedSerial.findIndex(A=>A.Code==y.Code));f.length>0&&(f[0].Qty=1,this.selectedSerial=[...this.selectedSerial,...f],this.updateCartItem())}onRemoveSerial(u){this.selectedSerial=this.selectedSerial.filter((f,y)=>y!==u),this.serials=this.generateSerialCode(this.selectedSerial),this.updateCartItem()}onRemoveSerialFromOption(u){this.selectedSerial=this.selectedSerial.filter(f=>f.Code!==u.Code),this.serials=this.generateSerialCode(this.selectedSerial)}onChangeQty(){this.updateCartItem()}submitSerial(){const u=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...u],this.serials=[],this.updateCartItem()}generateSerialData(){return this.serials.filter(f=>-1==this.selectedSerial.findIndex(y=>y.Code==f)).map(f=>({Code:f,Qty:this.isReturn?-1:1}))}addSerial(u){this.serials=u,this.serialsChange.emit(this.serials)}updateCartItem(){this.cartItem.Serial=this.selectedSerial,this.calculateSerialQty(),this.cartItem.generateNoteFromSerial(),this.cartItemChange.emit(this.cartItem)}calculateSerialQty(){let u=0;this.selectedSerial.forEach(f=>{u+=f.Qty}),this.cartItem.Quantity=u}}return(0,r.Z)(x,"\u0275fac",function(u){return new(u||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(u,f){1&u&&(c.TgZ(0,"div",0),c.YNc(1,S,6,2,"ng-container",1),c.YNc(2,ct,13,2,"ng-container",1),c.qZA()),2&u&&(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,D.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})(),dt=(()=>{class x{}return(0,r.Z)(x,"\u0275fac",function(u){return new(u||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:(B,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})()}}]);
|