dealpos 12.1.0 → 12.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[3235],{98818:(Y,J,s)=>{s.d(J,{Y:()=>r});var r=(()=>{return(c=r||(r={}))[c.INPUT=0]="INPUT",c[c.INVENTORY=1]="INVENTORY",r;var c})()},3235:(Y,J,s)=>{s.r(J),s.d(J,{DeliveryModule:()=>Sl});var r=s(81180),c=s(36895),u=s(9116),M=s(4077),t=s(94650),m=s(89156),O=s(24424),x=s(97185),I=s(51161),d=s(24006),C=s(30273),b=s(24537),y=s(3077),g=s(88796),T=s(10266);function A(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(3);return t.KtG(i.httpPostListID("TransferOrder/Delete"))}),t._UZ(1,"i",34),t._uU(2," Delete"),t.qZA()}}function k(n,a){if(1&n&&(t.ynx(0),t.YNc(1,A,3,0,"a",32),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.role.logistic.Delete)}}function Q(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(2);return t.KtG(i.exportCSV(i.csvConverter,"TransferOrder/TransferOrderList","Transfer.csv"))}),t._UZ(1,"i",36),t._uU(2," Export "),t.qZA()}}const f=function(){return["/menu/Logistics/Archive/Transfer_Order/Form"]};function q(n,a){1&n&&(t.TgZ(0,"a",37),t._uU(1,"New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,f))}function h(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",38)(1,"div")(2,"h6"),t._uU(3,"From"),t.qZA(),t.TgZ(4,"datepicker",39),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",40),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",41),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 v(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",42)(1,"input",43),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()()}}function N(n,a){1&n&&(t.TgZ(0,"th",44),t._uU(1,"Price"),t.qZA())}function it(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",42)(1,"input",48),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 kt(n,a){if(1&n&&(t.TgZ(0,"td",44),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.Price))}}function Lt(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 Qt(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 Et=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]},Rt=function(n){return{ID:n}},Yt=function(n,a,e){return{"text-success":n,"text-warning":a,"text-danger":e}},Ht=function(){return["/print/Transfer"]},Vt=function(n,a){return{ID:n,Template:a}};function Kt(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,it,2,1,"td",22),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",45),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",44),t._uU(16),t.qZA(),t.YNc(17,kt,3,3,"td",27),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,Lt,2,1,"span",2),t.YNc(26,Qt,2,1,"span",2),t.qZA(),t.TgZ(27,"td")(28,"a",46),t._UZ(29,"i",47),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,Et))("queryParams",t.VKq(26,Rt,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,Yt,"Received"==e.StateLabel,"Dispatched"==e.StateLabel,"Approved"==e.StateLabel)),t.xp6(1),t.Oqu(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,Ht))("queryParams",t.WLB(33,Vt,e.ID,e.SourceTemplateID))}}function Gt(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,k,2,1,"ng-container",2),t.TgZ(3,"div",3),t.YNc(4,Q,3,0,"a",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,q,2,2,"a",6),t.qZA()(),t.TgZ(7,"filters")(8,"div",7)(9,"div",8)(10,"div")(11,"h6"),t._uU(12,"Source"),t.qZA(),t.TgZ(13,"ng-select",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Destination"),t.qZA(),t.TgZ(17,"ng-select",10),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.DestinationID=i)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Fulfillment"),t.qZA(),t.TgZ(21,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.StateID=i)}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"Tag"),t.qZA(),t.TgZ(25,"ng-select",12),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.TypeID=i)}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"Courier"),t.qZA(),t.TgZ(29,"ng-select",13),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CourierID=i)}),t.qZA()()(),t.YNc(30,h,13,5,"div",14),t.TgZ(31,"a",15),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.moreFilter=!i.moreFilter)}),t._uU(32,"More "),t._UZ(33,"i",16),t.qZA()()(),t.TgZ(34,"content")(35,"div",17)(36,"div",18)(37,"table",19)(38,"thead",20)(39,"tr",21),t.YNc(40,v,2,0,"th",22),t.TgZ(41,"th",23),t._uU(42,"Source"),t.qZA(),t.TgZ(43,"th",24),t._uU(44,"Destination"),t.qZA(),t.TgZ(45,"th"),t._uU(46,"Number"),t.qZA(),t.TgZ(47,"th",25),t._uU(48,"Date"),t.qZA(),t.TgZ(49,"th",25),t._uU(50,"Time"),t.qZA(),t.TgZ(51,"th",26),t._uU(52,"Qty"),t.qZA(),t.YNc(53,N,2,0,"th",27),t.TgZ(54,"th",25),t._uU(55,"Status"),t.qZA(),t.TgZ(56,"th",28),t._uU(57,"Creator"),t.qZA(),t.TgZ(58,"th",25),t._uU(59,"Tag"),t.qZA(),t.TgZ(60,"th",25),t._uU(61,"Courier"),t.qZA(),t._UZ(62,"th",29),t.qZA()(),t.YNc(63,Kt,30,36,"tbody",30),t.qZA()(),t.TgZ(64,"POS-complex-pagination",31),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(2),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 Bt=(()=>{class n extends M.n{constructor(e,o,i,l,p){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,"moreFilter",!1),this.csvConverter=o,this.role=p}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(x._W),t.Y36(u.gz),t.Y36(I.N))}),(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"],[1,"btn-group","me-5"],["class","btn btn-outline-secondary",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",3,"click"],["aria-hidden","true",1,"fas","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,Gt,65,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.Fj,d.Wl,d.JJ,d.On,C.p,b.QB,y.v,g.w9,T.gM,c.JJ,c.uU]})),n})();var Z=s(65938),P=s(42046),w=s(63165),V=s(83902);let jt=(()=>{class n{constructor(e,o,i,l){(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"config",new P.O),(0,r.Z)(this,"pageData",void 0),this.httpService=e,this.csvConverter=o,this.dialogRef=i,this.data=l,this.config.title="Export Outbound Logistics",this.config.okText="<i class='fas fa-upload'></i> Export",this.config.customWidth="300px",this.pageData=l.pageData}onOk(){this.pageData.Filter.Export=!0,this.httpService.post("/api/OutboundLogistics/OutboundLogisticsList",JSON.stringify(this.pageData.Filter)).subscribe(o=>{this.csvConverter.convertToCSV(o,"CustomerDelivery.csv")})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(Z.so),t.Y36(Z.WI))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-export-customer"]],decls:15,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"form-floating-outline"],["type","text","autoNum","","placeholder","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["type","text","autoNum","","placeholder","Page Size",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"input",5),t.NdJ("ngModelChange",function(l){return o.pageData.Filter.ExportPageNumber=l}),t.qZA(),t.TgZ(7,"label"),t._uU(8,"Page Number"),t.qZA()()()(),t.TgZ(9,"div",2)(10,"div",3)(11,"div",4)(12,"input",6),t.NdJ("ngModelChange",function(l){return o.pageData.Filter.ExportRowCount=l}),t.qZA(),t.TgZ(13,"label"),t._uU(14,"Page Size"),t.qZA()()()()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(6),t.Q6J("ngModel",o.pageData.Filter.ExportPageNumber),t.xp6(6),t.Q6J("ngModel",o.pageData.Filter.ExportRowCount))},dependencies:[w.M,d.Fj,d.JJ,d.On,V.b]})),n})();var at=s(11594),L=s(58393);function $t(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",27),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.httpPostListID("OutboundLogistics/Delete"))}),t._UZ(2,"i",28),t._uU(3," Delete"),t.qZA(),t.BQk()}}function Wt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",29),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExportDialog())}),t._UZ(1,"i",30),t._uU(2," Export "),t.qZA()}}const zt=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Form"]};function Xt(n,a){1&n&&(t.TgZ(0,"a",31),t._uU(1," New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,zt))}function te(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",32)(1,"input",33),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()()}}function ee(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",32)(1,"input",37),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 ne(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 oe(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)}}function ie(n,a){if(1&n&&(t.TgZ(0,"span"),t._UZ(1,"br")(2,"i",38),t._uU(3),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij(" ",e.SourceEntityName,"")}}const ae=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},mt=function(n){return{ID:n}},re=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},le=function(){return["/print/OutDelivery"]},ce=function(n,a){return{ID:n,Template:a}};function se(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,ee,2,1,"td",20),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._UZ(6,"a",34),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.ALo(9,"date"),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.ALo(12,"date"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA(),t.TgZ(15,"td"),t.YNc(16,ne,2,1,"span",2),t.YNc(17,oe,2,1,"span",2),t.qZA(),t.TgZ(18,"td"),t._UZ(19,"a",34),t.YNc(20,ie,4,1,"span",2),t.qZA(),t.TgZ(21,"td"),t._uU(22),t.ALo(23,"date"),t.qZA(),t.TgZ(24,"td")(25,"a",35),t._UZ(26,"i",36),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(26,ae))("queryParams",t.VKq(27,mt,e.ID))("innerHtml",e.Number,t.oJD),t.xp6(2),t.Oqu(t.xi3(9,17,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(12,20,e.Time,"HH:mm")),t.xp6(3),t.Oqu(e.CustomerName),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(29,re))("queryParams",t.VKq(30,mt,e.InvoiceID))("innerHtml",e.InvoiceNumber,t.oJD),t.xp6(1),t.Q6J("ngIf",e.EntityName!=e.SourceEntityName),t.xp6(2),t.Oqu(t.xi3(23,23,e.InvoiceDate,"dd MMM yyyy")),t.xp6(3),t.Q6J("routerLink",t.DdM(32,le))("queryParams",t.WLB(33,ce,e.ID,e.EntityPrintTemplateID))}}function de(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,$t,4,0,"ng-container",2),t.TgZ(3,"div",3),t.YNc(4,Wt,3,0,"a",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,Xt,2,2,"a",6),t.qZA()(),t.TgZ(7,"filters")(8,"div",7)(9,"div",8)(10,"div")(11,"h6"),t._uU(12,"Outlet"),t.qZA(),t.TgZ(13,"ng-select",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Customer"),t.qZA(),t.TgZ(17,"autocompleteV2",10),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CustomerID=i)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"Courier"),t.qZA(),t.TgZ(21,"ng-select",11),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.CourierID=i)}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"From"),t.qZA(),t.TgZ(25,"datepicker",12),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(26,"div")(27,"h6"),t._uU(28,"To"),t.qZA(),t.TgZ(29,"datepicker",13),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()(),t.TgZ(30,"div")(31,"h6"),t._uU(32,"Sort By"),t.qZA(),t.TgZ(33,"radio-options",14),t.NdJ("modelChange",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("modelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SortByDate=i)}),t.qZA()()()()(),t.TgZ(34,"content")(35,"div",15)(36,"div",16)(37,"table",17)(38,"thead",18)(39,"tr",19),t.YNc(40,te,2,0,"th",20),t.TgZ(41,"th",21),t._uU(42,"Outlet"),t.qZA(),t.TgZ(43,"th",21),t._uU(44,"Number"),t.qZA(),t.TgZ(45,"th",22),t._uU(46,"Delivery"),t.qZA(),t.TgZ(47,"th",23),t._uU(48,"Time"),t.qZA(),t.TgZ(49,"th"),t._uU(50,"Customer"),t.qZA(),t.TgZ(51,"th",21),t._uU(52,"Courier"),t.qZA(),t.TgZ(53,"th",21),t._uU(54,"Invoice #"),t.qZA(),t.TgZ(55,"th",22),t._uU(56,"Date"),t.qZA(),t._UZ(57,"th",24),t.qZA()(),t.YNc(58,se,27,36,"tbody",25),t.qZA()(),t.TgZ(59,"POS-complex-pagination",26),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(2),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("ngModel",e.pageData.Filter.CustomerID),t.xp6(4),t.Q6J("items",null==e.pageData.Options?null:e.pageData.Options.Courier)("ngModel",e.pageData.Filter.CourierID),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.sortByOptions)("model",e.pageData.Filter.SortByDate),t.xp6(7),t.Q6J("ngIf",e.role.logistic.Delete),t.xp6(18),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("total",e.data.Data.length)("pageData",e.pageData)}}let pe=(()=>{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}openExportDialog(){this.matDialog.open(jt,{data:{pageData:this.pageData}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(x._W),t.Y36(I.N),t.Y36(Z.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"],[1,"btn-group","me-5"],["class","btn btn-outline-secondary",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"],["bindLabel","Name","bindValue","ID","placeholder","Choose a courier",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[3,"options","model","modelChange"],[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"],[2,"width","10px"],[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",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"],["target","_blank","target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltipPosition","above","matTooltip","Outlet",1,"fa-solid","fa-house"]],template:function(e,o){1&e&&t.YNc(0,de,60,20,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.Wl,d.JJ,d.On,C.p,b.QB,at.P,L.J,y.v,g.w9,T.gM,c.uU]})),n})();function _e(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",24),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.httpPostListID("InboundLogistics/DeleteInboundLogistics"))}),t._UZ(2,"i",25),t._uU(3," Delete"),t.qZA(),t.BQk()}}function me(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",26),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.exportCSV(i.csvConverter,"InboundLogistics/InboundLogisticsList","SupplierDelivery.csv"))}),t._UZ(1,"i",27),t._uU(2," Export "),t.qZA()}}const ue=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Form"]};function ge(n,a){1&n&&(t.TgZ(0,"a",28),t._uU(1," New"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ue))}function fe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",29)(1,"input",30),t.NdJ("change",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.onSelectAllData(i.target.checked))}),t.qZA()()}}function he(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",29)(1,"input",35),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 xe=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]},ut=function(n){return{ID:n}},Ce=function(){return["/menu/Orders/Orders/Supplier_Bill/Info"]},Ze=function(n,a){return{ID:n,Template:a}};function ve(n,a){if(1&n&&(t.TgZ(0,"tbody")(1,"tr"),t.YNc(2,he,2,1,"td",18),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._UZ(6,"a",31),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._UZ(10,"a",31),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",32)(18,"a",33),t._UZ(19,"i",34),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,xe))("queryParams",t.VKq(19,ut,e.ID))("innerHtml",e.Number,t.oJD),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("routerLink",t.DdM(21,Ce))("queryParams",t.VKq(22,ut,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,Ze,e.ID,e.PrintTemplateID))}}function Te(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,_e,4,0,"ng-container",2),t.TgZ(3,"div",3),t.YNc(4,me,3,0,"a",4),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,ge,2,2,"a",6),t.qZA()(),t.TgZ(7,"filters")(8,"div",7)(9,"div",8)(10,"div")(11,"h6"),t._uU(12,"Outlet"),t.qZA(),t.TgZ(13,"ng-select",9),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.EntityID=i)}),t.qZA()(),t.TgZ(14,"div")(15,"h6"),t._uU(16,"Supplier"),t.qZA(),t.TgZ(17,"autocompleteV2",10),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.SupplierID=i)}),t.qZA()(),t.TgZ(18,"div")(19,"h6"),t._uU(20,"From"),t.qZA(),t.TgZ(21,"datepicker",11),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(22,"div")(23,"h6"),t._uU(24,"To"),t.qZA(),t.TgZ(25,"datepicker",12),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.pageData.Filter.To=i)}),t.qZA()()()()(),t.TgZ(26,"content")(27,"div",13)(28,"div",14)(29,"table",15)(30,"thead",16)(31,"tr",17),t.YNc(32,fe,2,0,"th",18),t.TgZ(33,"th",19),t._uU(34,"Outlet"),t.qZA(),t.TgZ(35,"th",19),t._uU(36,"Number"),t.qZA(),t.TgZ(37,"th",20),t._uU(38,"Supplier"),t.qZA(),t.TgZ(39,"th",19),t._uU(40,"PO Number"),t.qZA(),t.TgZ(41,"th",19),t._uU(42,"Date"),t.qZA(),t.TgZ(43,"th",21),t._uU(44,"Time"),t.qZA(),t._UZ(45,"th"),t.qZA()(),t.YNc(46,ve,20,27,"tbody",22),t.qZA()(),t.TgZ(47,"POS-complex-pagination",23),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(2),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 be=(()=>{class n extends M.n{constructor(e,o,i,l){super(e,"InboundLogistics/InboundLogisticsList","InboundLogisticsLoader/List",i),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"role",void 0),this.csvConverter=o,this.role=l}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(x._W),t.Y36(I.N))}),(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"],[1,"btn-group","ms-5","me-5"],["class","btn btn-outline-secondary",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",3,"click"],["aria-hidden","true",1,"fas","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,Te,48,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.Wl,d.JJ,d.On,C.p,b.QB,L.J,y.v,g.w9,T.gM,c.uU]})),n})();var ye=s(29881),_=s(67327),D=s(96700);let De=(()=>{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 P.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}`,D.n.Success),this.dialogRef.close()})}onClose(){this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(Z.WI),t.Y36(Z.so),t.Y36(m.O),t.Y36(x._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,d.Fj,d.JJ,d.On]})),n})(),Ie=(()=>{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 P.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,D.n.Success)}),this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(x._W),t.Y36(Z.so),t.Y36(Z.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})(),Oe=(()=>{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 P.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",D.n.Success)}),this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(x._W),t.Y36(Z.so),t.Y36(Z.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 U=s(93669);function Me(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",37),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openReceiveDialog())}),t._UZ(1,"i",38),t._uU(2," Receive Delivery"),t.qZA()}}function Ae(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",37),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openExchangedDialog())}),t._uU(1,"Invoice Exchanged"),t.qZA()}}const qe=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Form"]},B=function(n){return{ID:n}};function Se(n,a){if(1&n&&(t.TgZ(0,"a",39),t._UZ(1,"i",40),t._uU(2," Edit "),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,qe))("queryParams",t.VKq(3,B,e.data.Fulfillment.ID))}}function Pe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",41),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.deleteData("OutboundLogistics/DeleteDeliveryCustomer"))}),t._UZ(1,"i",42),t._uU(2," Delete "),t.qZA()}}function Ne(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",22),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 we(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",22),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.Customer?null:e.data.Customer.Address,t.oJD)}}const Ue=function(){return["/menu/Contacts/Contact/Customers/Info"]};function Je(n,a){if(1&n&&(t.TgZ(0,"div",16)(1,"div",17)(2,"h2"),t._UZ(3,"i",43),t._uU(4,"Customer "),t.qZA()(),t.TgZ(5,"div",20)(6,"table",21)(7,"tr")(8,"th",22),t._uU(9,"Name"),t.qZA(),t.TgZ(10,"td"),t._uU(11,":"),t.qZA(),t.TgZ(12,"td")(13,"a",23),t._uU(14),t.qZA()()(),t.YNc(15,Ne,7,1,"tr",44),t.YNc(16,we,6,1,"tr",44),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("routerLink",t.DdM(5,Ue))("queryParams",t.VKq(6,B,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 Fe(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",22),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 ke(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",22),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 Le(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",22),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",e.data.Recipient.Address,t.oJD)}}function Qe(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"th",22),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 Ee(n,a){if(1&n&&(t.TgZ(0,"div",16)(1,"div",17)(2,"h2"),t._UZ(3,"i",43),t._uU(4,"Recipient "),t.qZA()(),t.TgZ(5,"div",20)(6,"table",21),t.YNc(7,Fe,7,1,"tr",44),t.YNc(8,ke,7,1,"tr",44),t.YNc(9,Le,6,1,"tr",44),t.YNc(10,Qe,7,1,"tr",44),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 Re(n,a){if(1&n&&t._UZ(0,"p",49),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",e.Note,t.oJD)}}function Ye(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,Re,1,1,"p",47),t.qZA(),t.TgZ(9,"td",48),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,B,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 He(n,a){if(1&n&&(t.TgZ(0,"div",16)(1,"div",17)(2,"h2"),t._UZ(3,"i",50),t._uU(4,"Note "),t.qZA()(),t._UZ(5,"div",51),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",e.data.Fulfillment.Note,t.oJD)}}function Ve(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 Ke(n,a){if(1&n&&(t.TgZ(0,"div",52),t._UZ(1,"i",53),t.TgZ(2,"span")(3,"b"),t._uU(4," Created:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA(),t.YNc(7,Ve,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 gt=function(){return["/print/OutDelivery"]},Ge=function(n,a){return{ID:n,Template:a}},Be=function(n,a){return{ID:n,Template:a,Price:1}},je=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]};function $e(n,a){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,Me,3,0,"a",2),t.YNc(3,Ae,2,0,"a",2),t.TgZ(4,"div",3)(5,"a",4),t._UZ(6,"i",5),t._uU(7," Print "),t.qZA(),t._UZ(8,"button",6),t.TgZ(9,"ul",7)(10,"li",8)(11,"a",9),t._uU(12,"Print with Cost"),t.qZA()()()(),t.TgZ(13,"div",10),t.YNc(14,Se,3,5,"a",11),t.YNc(15,Pe,3,0,"a",12),t.qZA()(),t.TgZ(16,"content")(17,"div",13)(18,"div",14)(19,"div",15)(20,"div",16)(21,"div",17)(22,"h2"),t._UZ(23,"i",18),t._uU(24,"Order "),t.TgZ(25,"small",19),t._uU(26),t.qZA()()(),t.TgZ(27,"div",20)(28,"table",21)(29,"tr")(30,"th",22),t._uU(31,"Outlet"),t.qZA(),t.TgZ(32,"td"),t._uU(33,":"),t.qZA(),t.TgZ(34,"td"),t._uU(35),t.qZA()(),t.TgZ(36,"tr")(37,"th",22),t._uU(38,"Invoice"),t.qZA(),t.TgZ(39,"td"),t._uU(40,":"),t.qZA(),t.TgZ(41,"td")(42,"a",23),t._uU(43),t.qZA()()(),t.TgZ(44,"tr")(45,"th",22),t._uU(46,"Date"),t.qZA(),t.TgZ(47,"td"),t._uU(48,":"),t.qZA(),t.TgZ(49,"td"),t._uU(50),t.ALo(51,"date"),t.qZA()()()()(),t.YNc(52,Je,17,8,"div",24),t.YNc(53,Ee,11,4,"div",24),t.TgZ(54,"div",16)(55,"div",17)(56,"h2"),t._UZ(57,"i",25),t._uU(58,"Fulfillment "),t.qZA()(),t.TgZ(59,"div",20)(60,"table",21)(61,"tr")(62,"th",22),t._uU(63,"Outlet"),t.qZA(),t.TgZ(64,"td"),t._uU(65,":"),t.qZA(),t.TgZ(66,"td"),t._uU(67),t.qZA()(),t.TgZ(68,"tr")(69,"th",22),t._uU(70,"Date"),t.qZA(),t.TgZ(71,"td"),t._uU(72,":"),t.qZA(),t.TgZ(73,"td"),t._uU(74),t.ALo(75,"date"),t.qZA()(),t.TgZ(76,"tr")(77,"th",22),t._uU(78,"Number"),t.qZA(),t.TgZ(79,"td"),t._uU(80,":"),t.qZA(),t.TgZ(81,"td"),t._uU(82),t.qZA()(),t.TgZ(83,"tr")(84,"th",22),t._uU(85,"Courier"),t.qZA(),t.TgZ(86,"td"),t._uU(87,":"),t.qZA(),t.TgZ(88,"td"),t._uU(89),t.qZA()()()()()(),t.TgZ(90,"div",26)(91,"div",16)(92,"div",17)(93,"h2"),t._UZ(94,"i",27),t._uU(95,"Products "),t.qZA()(),t.TgZ(96,"div",20)(97,"table",28)(98,"thead",29)(99,"tr")(100,"th",30),t._uU(101,"No."),t.qZA(),t.TgZ(102,"th"),t._uU(103,"Products"),t.qZA(),t.TgZ(104,"th",22),t._uU(105,"Qty"),t.qZA()()(),t.TgZ(106,"tbody"),t.YNc(107,Ye,13,9,"tr",31),t.qZA(),t.TgZ(108,"tfoot",32)(109,"tr")(110,"td",33),t._uU(111,"Total"),t.qZA(),t.TgZ(112,"td",34),t._uU(113),t.ALo(114,"sum"),t.qZA()()()()()(),t.YNc(115,He,6,1,"div",24),t.qZA(),t.TgZ(116,"div",35),t.YNc(117,Ke,8,6,"div",36),t.qZA()()()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.role.order.View&&"Sent"==e.data.Fulfillment.Status),t.xp6(1),t.Q6J("ngIf",e.role.order.View&&"Received"==e.data.Fulfillment.Status),t.xp6(2),t.Q6J("routerLink",t.DdM(36,gt))("queryParams",t.WLB(37,Ge,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(6),t.Q6J("routerLink",t.DdM(40,gt))("queryParams",t.WLB(41,Be,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(3),t.Q6J("ngIf",e.role.logistic.Edit),t.xp6(1),t.Q6J("ngIf",e.role.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("routerLink",t.DdM(44,je))("queryParams",t.VKq(45,B,e.data.Order.InvoiceID)),t.xp6(1),t.hij(" ",e.data.Order.Number," "),t.xp6(7),t.Oqu(t.xi3(51,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(75,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(114,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 We=(()=>{class n extends ye.O{constructor(e,o,i,l,p,S){super(e,"OutboundLogistics/Info",o),(0,r.Z)(this,"httpService",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",_.gT.GuidEmpty),this.httpService=e,this.toaster=i,this.router=l,this.role=p,this.matDialog=S}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(De,{data:{invoiceID:this.data.ID}})}openReceiveDialog(){this.matDialog.open(Oe,{data:{Data:this.data}})}openExchangedDialog(){this.matDialog.open(Ie,{data:{Data:this.data}})}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(u.gz),t.Y36(x._W),t.Y36(u.F0),t.Y36(I.N),t.Y36(Z.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"],["class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],[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"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-muted","h6"],[1,"card-body"],[1,"table-sm","table-borderless"],[2,"width","50px"],["target","_blank",1,"ps-0",3,"routerLink","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"],[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","me-5",3,"click"],[1,"fa-solid","fa-truck"],[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"],[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,$e,118,47,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,C.p,c.uU,U.qU]})),n})();function ze(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.convertToCSV(i.csvConverter,!0,"Out_Stock_Report_By_Product.csv"))}),t._UZ(1,"i",24),t._uU(2," Export "),t.qZA()}}function Xe(n,a){1&n&&(t.TgZ(0,"th"),t._uU(1,"Outlet"),t.qZA())}function tn(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1,"Total"),t.qZA())}const en=function(){return["/menu/Outlets/Master/Outlets/Form"]},ft=function(n){return{ID:n}};function nn(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,en))("queryParams",t.VKq(4,ft,e.EntityID)),t.xp6(1),t.Oqu(e.EntityName)}}function on(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 an(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,nn,3,6,"td",14),t.TgZ(7,"td",27),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,on,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,ft,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 rn(n,a){1&n&&t._UZ(0,"td",30)}function ln(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.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.Data,"Total")))}}function cn(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,ze,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(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,Xe,2,0,"th",14),t.TgZ(33,"th",15),t._uU(34,"Qty"),t.qZA(),t.YNc(35,tn,2,0,"th",16),t.qZA()(),t.TgZ(36,"tbody"),t.YNc(37,an,11,10,"tr",17),t.qZA(),t.TgZ(38,"tfoot")(39,"tr",18),t.YNc(40,rn,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,ln,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.Oqu(t.lcZ(45,16,t.xi3(46,18,e.data.Data,"Quantity"))),t.xp6(3),t.Q6J("ngIf",e.roleService.sell.Create)}}let sn=(()=>{class n extends M.n{constructor(e,o,i){super(e,"OutboundLogistics/GetOutStockReportProduct","OutboundLogisticsLoader/GetOutStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=o,this.roleService=i}postInit(){this.menuData.H=this.data.PageTitle}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(I.N))}),(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"],["role","button","class","btn btn-outline-secondary",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"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","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,cn,48,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.JJ,d.On,C.p,b.QB,L.J,g.w9,c.JJ,U.qU]})),n})();function dn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",18),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.exportCSV(i.csvConverter,"OutboundLogistics/GetOutStockReportDetail","ReportOutgoingDetail.csv"))}),t._UZ(1,"i",19),t._uU(2," Export "),t.qZA()}}function pn(n,a){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Price"),t.qZA())}function _n(n,a){1&n&&(t.TgZ(0,"th",20),t._uU(1,"Total"),t.qZA())}function mn(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 un(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 rt=function(n){return{ID:n}};function gn(n,a){if(1&n&&(t.TgZ(0,"tr")(1,"td",32)(2,"a",33),t._uU(3),t.qZA()(),t.TgZ(4,"td",34),t._uU(5),t.qZA(),t.TgZ(6,"td",35),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,mn,3,4,"td",36),t.YNc(10,un,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,rt,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.Oqu(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 fn(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount : "),t.qZA())}function hn(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 xn=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},Cn=function(){return["/menu/Contacts/Contact/Customers/Info"]};function Zn(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,gn,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,fn,2,0,"th",31),t.YNc(28,hn,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,xn))("queryParams",t.VKq(21,rt,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,Cn))("queryParams",t.VKq(24,rt,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 vn(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,dn,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(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,pn,2,0,"th",15),t.YNc(31,_n,2,0,"th",15),t.qZA()(),t.TgZ(32,"tbody")(33,"tr")(34,"td",16),t.YNc(35,Zn,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 Tn=(()=>{class n extends M.n{constructor(e,o,i){super(e,"OutboundLogistics/GetOutStockReportDetail","OutboundLogisticsLoader/GetOutStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=o,this.roleService=i}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(I.N))}),(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"],["role","button","class","btn btn-outline-secondary",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"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","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,vn,36,12,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.JJ,d.On,C.p,b.QB,g.w9,c.JJ,c.uU,U.qU]})),n})();function bn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",22),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.convertToCSV(i.csvConverter,!0,"In_Stock_Report_By_Product.csv"))}),t._UZ(1,"i",23),t._uU(2," Export "),t.qZA()}}function yn(n,a){1&n&&(t.TgZ(0,"th"),t._uU(1,"Outlet"),t.qZA())}function Dn(n,a){1&n&&(t.TgZ(0,"th",14),t._uU(1,"Total"),t.qZA())}const In=function(){return["/menu/Outlets/Master/Outlets/Form"]},ht=function(n){return{ID:n}};function On(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,In))("queryParams",t.VKq(4,ht,e.EntityID)),t.xp6(1),t.Oqu(e.EntityName)}}function Mn(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 An(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,On,3,6,"td",13),t.TgZ(7,"td",25),t._uU(8),t.ALo(9,"number"),t.qZA(),t.YNc(10,Mn,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,ht,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 qn(n,a){1&n&&t._UZ(0,"td",28)}function Sn(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.Oqu(t.lcZ(2,1,t.xi3(3,3,e.data.List,"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,bn,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(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,yn,2,0,"th",13),t.TgZ(29,"th",14),t._uU(30,"Qty"),t.qZA(),t.YNc(31,Dn,2,0,"th",15),t.qZA()(),t.TgZ(32,"tbody"),t.YNc(33,An,11,10,"tr",16),t.qZA(),t.TgZ(34,"tfoot")(35,"tr",17),t.YNc(36,qn,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,Sn,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.Oqu(t.lcZ(41,15,t.xi3(42,17,e.data.List,"Quantity"))),t.xp6(3),t.Q6J("ngIf",e.roleService.product.Cost)}}let Nn=(()=>{class n extends M.n{constructor(e,o,i){super(e,"InboundLogistics/GetInStockReportProduct","InboundLogisticsLoader/GetInStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=o,this.roleService=i}postInit(){this.menuData.H=this.data.PageTitle}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(I.N))}),(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"],["role","button","class","btn btn-outline-secondary",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"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","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,Pn,44,20,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.JJ,d.On,C.p,b.QB,g.w9,c.JJ,U.qU]})),n})();function wn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",19),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.exportCSV(i.csvConverter,"InboundLogistics/GetInStockReportDetail","InStockReportDetail.csv"))}),t._UZ(1,"i",20),t._uU(2," Export "),t.qZA()}}function Un(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Cost"),t.qZA())}function Jn(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Total"),t.qZA())}const lt=function(n){return{ID:n}};function Fn(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,lt,e.SupplierID)),t.xp6(1),t.hij(" ",e.SupplierName," ")}}function kn(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.UnitCost,"1.0-2"))}}function Ln(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"))}}function Qn(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,kn,3,4,"td",36),t.YNc(9,Ln,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,lt,e.VariantID)),t.xp6(1),t.Oqu(e.VariantName),t.xp6(2),t.Oqu(e.VariantCode),t.xp6(2),t.Oqu(e.Quantity),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost)}}function En(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1,"Amount : "),t.qZA())}function Rn(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 Yn=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]};function Hn(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,Fn,5,4,"span",25),t.qZA(),t.TgZ(12,"table",26),t._UZ(13,"thead"),t.TgZ(14,"tbody",27),t.YNc(15,Qn,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,En,2,0,"th",30),t.YNc(28,Rn,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,Yn))("queryParams",t.VKq(22,lt,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 Vn(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,wn,3,0,"a",2),t.qZA(),t.TgZ(3,"filters")(4,"div",3)(5,"div",4)(6,"div")(7,"h6"),t._uU(8,"Outlet"),t.qZA(),t.TgZ(9,"ng-select",5),t.NdJ("ngModelChange",function(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,Un,2,0,"th",16),t.YNc(35,Jn,2,0,"th",16),t.qZA()(),t.TgZ(36,"tbody")(37,"tr")(38,"td",17),t.YNc(39,Hn,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 Kn=(()=>{class n extends M.n{constructor(e,o,i){super(e,"InboundLogistics/GetInStockReportDetail","InboundLogisticsLoader/GetInStockReporProduct"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),(0,r.Z)(this,"sortByOptions",[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}]),this.csvConverter=o,this.roleService=i}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(I.N))}),(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"],["role","button","class","btn btn-outline-secondary",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"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","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,Vn,40,13,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.JJ,d.On,C.p,b.QB,L.J,g.w9,c.JJ,c.uU,U.qU]})),n})();function Gn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",20),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.convertToCSV(i.csvConverter,!0,"In_Stock_Report_By_Product.csv"))}),t._UZ(1,"i",21),t._uU(2," Export "),t.qZA()}}function Bn(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 jn(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 $n=function(n){return{ID:n}};function Wn(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,jn,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,$n,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 zn(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,Gn,3,0,"a",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,Bn,2,1,"th",17),t.TgZ(41,"th",18),t._uU(42,"Total"),t.qZA()()(),t.TgZ(43,"tbody"),t.YNc(44,Wn,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 Xn=(()=>{class n extends M.n{constructor(e,o,i,l){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,"scopeOptions",[{Key:!1,Value:"Variant"},{Key:!0,Value:"Product"}]),this.csvConverter=o,this.roleService=i}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(I.N),t.Y36(u.gz))}),(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"],["role","button","class","btn btn-outline-secondary",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"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[2,"text-align","right"]],template:function(e,o){1&e&&t.YNc(0,zn,45,18,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.JJ,d.On,C.p,b.QB,at.P,L.J,g.w9]})),n})();function to(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.exportCSV(i.csvConverter,"TransferOrder/GetReport","Transfer Order.csv"))}),t._UZ(1,"i",24),t._uU(2," Export "),t.qZA()}}function eo(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1," Total Price "),t.qZA())}function no(n,a){1&n&&(t.TgZ(0,"th",25),t._uU(1," Total Cost "),t.qZA())}function oo(n,a){1&n&&t._UZ(0,"i",36)}function io(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 ao(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 ro=function(n){return{"bg-warning":n}},xt=function(n){return{ID:n}};function lo(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,io,2,3,"td",41),t.YNc(11,ao,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,ro,e.QtyRequested!=e.Quantity)),t.xp6(2),t.Q6J("queryParams",t.VKq(16,xt,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 co=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]};function so(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,oo,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,lo,12,18,"tr",35),t.qZA()()()()),2&n){const e=a.$implicit;t.xp6(3),t.Q6J("routerLink",t.DdM(12,co))("queryParams",t.VKq(13,xt,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 po(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 _o(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 mo(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,po,7,10,"div",46),t.YNc(10,_o,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 uo(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,to,3,0,"a",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,eo,2,0,"th",20),t.YNc(51,no,2,0,"th",20),t.qZA()()()(),t.YNc(52,so,17,15,"div",21),t.YNc(53,mo,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 go=(()=>{class n extends M.n{constructor(e,o,i){super(e,"TransferOrder/GetReport","TransferOrderLoader/TransferOutletDeliveryReport"),(0,r.Z)(this,"csvConverter",void 0),(0,r.Z)(this,"roleService",void 0),this.csvConverter=o,this.roleService=i}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(O.O),t.Y36(I.N))}),(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"],["role","button","class","btn btn-outline-secondary",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"],["role","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","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,uo,54,21,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.JJ,d.On,C.p,b.QB,g.w9,c.JJ,c.uU,U.qU,U.J1],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:15px!important}"]})),n})();var F=s(39300);let fo=(()=>{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 P.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(Z.WI),t.Y36(Z.so),t.Y36(m.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,d.Fj,d.JJ,d.On,b.QB]})),n})();function ho(n,a){if(1&n&&t._UZ(0,"p",15),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",e.Note,t.oJD)}}const xo=function(){return["/menu/Products/Catalog/Variants/Info"]},Co=function(n){return{ID:n}};function Zo(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,ho,1,1,"p",12),t.qZA(),t._UZ(6,"td",13),t.TgZ(7,"td",10),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td")(11,"input",14),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;t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Q6J("routerLink",t.DdM(10,xo))("queryParams",t.VKq(11,Co,e.VariantID))("innerHTML",e.Name,t.oJD),t.xp6(1),t.Q6J("ngIf",null!=e.Note),t.xp6(1),t.Q6J("innerHTML",e.Code,t.oJD),t.xp6(2),t.Oqu(t.lcZ(9,8,e.NewQty)),t.xp6(3),t.Q6J("ngModel",e.Quantity)}}const vo=function(){return["Name","Code"]};let To=(()=>{class n{constructor(e,o,i,l){(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,"filterText",""),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"config",void 0),this.dialogRef=o,this.httpService=i,this.toastr=l,this.data=JSON.parse(JSON.stringify(e.data)),this.config=new P.O,this.config.title="Send Confirmation"}onOk(){this.validateSubmitData()?(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"))):this.toastr.warning("Quantity Send Cannot be empty","Warning!")}validateSubmitData(){let e=!0;return this.data?.Items.forEach(o=>{null==o.Quantity&&(e=!1)}),e}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(Z.WI),t.Y36(Z.so),t.Y36(m.O),t.Y36(x._W))}),(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"],["class","text-muted","style","word-break:break-all",3,"innerHTML",4,"ngIf"],[3,"innerHTML"],["autoNum","","emptyInputBehavior","null","type","text",1,"text-end","form-control",2,"width","46px",3,"ngModel","ngModelChange"],[1,"text-muted",2,"word-break","break-all",3,"innerHTML"]],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,Zo,12,13,"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,vo),o.filterText)))},dependencies:[c.sg,c.O5,w.M,u.rH,d.Fj,d.JJ,d.On,V.b,c.JJ,U.Rt]})),n})();function bo(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 yo(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 Do(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 Io(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 Oo(n,a){1&n&&(t.TgZ(0,"button",10),t._UZ(1,"b",55),t.qZA())}const Mo=function(){return["/menu/Logistics/Archive/Transfer_Order/Receive"]},j=function(n){return{ID:n}};function Ao(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,Mo))("queryParams",t.VKq(3,j,e.data.ID))}}const qo=function(){return["/menu/Logistics/Archive/Transfer_Order/Form"]};function So(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,qo))("queryParams",t.VKq(3,j,e.data.ID))}}function Po(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 No(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 wo=function(){return["/menu/Adjustment/Adjustment/Archive/Info"]};function Uo(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,wo))("queryParams",t.VKq(4,j,e.data.AdjustmentID)),t.xp6(1),t.Oqu(e.data.Transfer.Note)}}function Jo(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 Fo(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 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.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,Fo,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 Lo(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 Qo(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 Eo(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 Ro(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 Yo(n,a){1&n&&(t.TgZ(0,"th",74),t._uU(1," Product Code "),t.qZA())}function Ho(n,a){1&n&&(t.TgZ(0,"th",35),t._uU(1,"Qty Req."),t.qZA())}function Vo(n,a){1&n&&(t.TgZ(0,"th",35),t._uU(1,"Inventory"),t.qZA())}function Ko(n,a){1&n&&(t.TgZ(0,"th",75),t._uU(1,"Cost"),t.qZA())}function Go(n,a){1&n&&(t.TgZ(0,"th",75),t._uU(1,"Total Cost"),t.qZA())}function Bo(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 jo(n,a){1&n&&(t.TgZ(0,"th",77),t._uU(1,"%"),t.qZA())}function $o(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 Wo(n,a){if(1&n&&t._UZ(0,"p",83),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",e.Note,t.oJD)}}function zo(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 Xo(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 ti=function(n){return{"bg-gradient-danger":n}};function ei(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,ti,e.Inventory<e.Quantity)),t.xp6(1),t.hij("",t.lcZ(2,4,e.Inventory)," "),t.xp6(3),t.Oqu(e.UOMName)}}function ni(n,a){if(1&n&&(t.TgZ(0,"td",84),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}function oi(n,a){if(1&n&&(t.TgZ(0,"td",84),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.Quantity*e.UnitCost))}}function ii(n,a){if(1&n&&(t.TgZ(0,"td",84),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitPrice))}}function ai(n,a){if(1&n&&(t.TgZ(0,"td",85),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.PriceDiscount)}}function ri(n,a){if(1&n&&(t.TgZ(0,"td",84),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.TotalPrice))}}const li=function(){return["/menu/Products/Catalog/Variants/Info"]};function ci(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,Wo,1,1,"p",79),t.qZA(),t.YNc(9,zo,2,1,"td",24),t.YNc(10,Xo,3,3,"td",43),t.TgZ(11,"td",42),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,ei,5,8,"td",80),t.YNc(15,ni,3,3,"td",81),t.YNc(16,oi,3,3,"td",81),t.YNc(17,ii,3,3,"td",81),t.YNc(18,ai,2,1,"td",82),t.YNc(19,ri,3,3,"td",81),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,li))("queryParams",t.VKq(18,j,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 si(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 di(n,a){1&n&&t._UZ(0,"td")}function pi(n,a){if(1&n&&(t.TgZ(0,"td",86)(1,"b"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sumMultiply"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.hij(" ",t.lcZ(3,1,t.Dn7(4,3,e.data.Items,"UnitCost","Quantity"))," ")}}function _i(n,a){if(1&n&&(t.TgZ(0,"td",87)(1,"b"),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,1,t.xi3(4,3,e.data.Items,"TotalPrice")))}}function mi(n,a){if(1&n&&(t.TgZ(0,"div",88),t._UZ(1,"i",89),t.TgZ(2,"span")(3,"b"),t._uU(4," Modified:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(5),t.AsE(" ",t.xi3(6,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}const ui=function(){return["/print/Transfer"]},Ct=function(n,a){return{ID:n,Template:a}},gi=function(){return["/print/TransferMini"]};function fi(n,a){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,bo,9,0,"div",2),t.TgZ(3,"div",3),t.YNc(4,yo,3,0,"a",4),t.YNc(5,Do,3,0,"a",5),t.YNc(6,Io,3,0,"a",4),t.YNc(7,Oo,2,0,"button",6),t.YNc(8,Ao,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,So,3,5,"a",14),t.YNc(20,Po,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,No,2,1,"td",24),t.YNc(67,Uo,3,6,"td",24),t.qZA(),t.YNc(68,Jo,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,ko,18,14,"div",25),t.YNc(75,Lo,17,11,"div",26),t.YNc(76,Qo,17,11,"div",26),t.YNc(77,Eo,15,11,"div",26),t.qZA()()(),t.TgZ(78,"div",27)(79,"div",19),t.YNc(80,Ro,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,Yo,2,0,"th",33),t.YNc(90,Ho,2,0,"th",34),t.TgZ(91,"th",35),t._uU(92,"Qty Sent"),t.qZA(),t.YNc(93,Vo,2,0,"th",34),t.YNc(94,Ko,2,0,"th",36),t.YNc(95,Go,2,0,"th",36),t.YNc(96,Bo,2,1,"th",37),t.YNc(97,jo,2,0,"th",38),t.YNc(98,$o,2,1,"th",39),t.qZA()(),t.TgZ(99,"tbody"),t.YNc(100,ci,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,si,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,di,1,0,"td",24),t._UZ(113,"td"),t.YNc(114,pi,5,7,"td",45),t.YNc(115,_i,5,6,"td",46),t.qZA()()()()()()(),t.YNc(116,mi,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,ui))("queryParams",t.WLB(55,Ct,e.data.ID,e.data.TemplateID)),t.xp6(6),t.Q6J("routerLink",t.DdM(58,gi))("queryParams",t.WLB(59,Ct,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(2),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 hi=(()=>{class n extends M.n{constructor(e,o,i,l,p,S,E){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",_.gT.MinDate),this.csvConverter=i,this.router=l,this.toastr=p,this.role=S,this.matDialog=E}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.",D.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(To,{data:{data:this.data}}).afterClosed().pipe((0,F.h)(e=>_.gT.IsNotEmpty(e))).subscribe(()=>this.getListData())}copyDelivery(){this.matDialog.open(fo,{data:{data:this.data}}).afterClosed().pipe((0,F.h)(e=>_.gT.IsNotEmpty(e))).subscribe(()=>this.getListData())}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(u.gz),t.Y36(O.O),t.Y36(u.F0),t.Y36(x._W),t.Y36(I.N),t.Y36(Z.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-muted","style","word-break:break-all",3,"innerHTML",4,"ngIf"],["class","text-center",3,"class",4,"ngIf"],["class","text-end",4,"ngIf"],["class","text-end text-danger",4,"ngIf"],[1,"text-muted",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,fi,117,62,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,C.p,c.JJ,c.uU,U.qU,U.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 xi(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 Ci=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Form"]},$=function(n){return{ID:n}};function Zi(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,Ci))("queryParams",t.VKq(3,$,e.data.Fulfillment.ID))}}function vi(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 Ti(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 bi(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 yi=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function Di(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,Ti,7,1,"tr",44),t.YNc(16,bi,6,1,"tr",44),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(13),t.Q6J("routerLink",t.DdM(5,yi))("queryParams",t.VKq(6,$,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 Ii(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.TgZ(8,"td",47),t._uU(9),t.TgZ(10,"div"),t._uU(11),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(6,$,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),t.xp6(2),t.Oqu(e.Code),t.xp6(2),t.hij("",e.Quantity," "),t.xp6(2),t.Oqu(e.UOMName)}}function Oi(n,a){if(1&n&&(t.TgZ(0,"div",15)(1,"div",16)(2,"h2"),t._UZ(3,"i",48),t._uU(4,"Note "),t.qZA()(),t._UZ(5,"div",49),t.qZA()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",e.data.Fulfillment.Note,t.oJD)}}function Mi(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 Ai(n,a){if(1&n&&(t.TgZ(0,"div",50),t._UZ(1,"i",51),t.TgZ(2,"span")(3,"b"),t._uU(4," Created:"),t.qZA(),t._uU(5),t.ALo(6,"date"),t.qZA(),t.YNc(7,Mi,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 qi=function(n,a){return{ID:n,Template:a}},Si=function(n,a){return{ID:n,Template:a,Cost:1}};function Pi(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,xi,4,0,"div",9),t.TgZ(12,"div",2),t.YNc(13,Zi,3,5,"a",10),t.YNc(14,vi,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,Di,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,Ii,12,8,"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,Oi,6,1,"div",22),t.qZA(),t.TgZ(108,"div",34),t.YNc(109,Ai,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,qi,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),t.xp6(6),t.Q6J("queryParams",t.WLB(34,Si,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,$,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.Oqu(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 Ni=(()=>{class n extends M.n{constructor(e,o,i,l,p,S){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=S}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,D.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(m.O),t.Y36(u.gz),t.Y36(O.O),t.Y36(u.F0),t.Y36(x._W),t.Y36(I.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,"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,Pi,110,39,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,C.p,c.uU,U.qU]})),n})();function wi(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 Ui(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 Zt=function(){return["/menu/Logistics/Setup/Courier/Form"]},Ji=function(n){return{ID:n}};function Fi(n,a){if(1&n&&(t.TgZ(0,"tr",13)(1,"td"),t.YNc(2,Ui,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,Zt))("queryParams",t.VKq(5,Ji,e.ID)),t.xp6(1),t.Oqu(e.Name)}}function ki(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,wi,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,Fi,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,Zt)),t.xp6(13),t.Q6J("ngForOf",e.data.Data)}}let Li=(()=>{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(m.O),t.Y36(x._W),t.Y36(I.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,ki,17,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.Wl,d.JJ,d.On,C.p,T.gM]})),n})();var W=s(88651);function Qi(n,a){1&n&&(t.TgZ(0,"span",14),t._uU(1,"name required"),t.qZA())}const Ei=function(){return["/menu/Logistics/Setup/Courier"]};function Ri(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,Qi,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,Ei)),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 Yi=(()=>{class n extends W.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(){_.gT.IsEmpty(this.formData.Name)&&(this.formData.Name="")}onSubmitSuccess(e){this.toaster.success("Success add new courier",D.n.Success),this.router.navigate(["/menu/Logistics/Setup/Courier"])}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(u.gz),t.Y36(x._W),t.Y36(u.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,Ri,23,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.formData&&null!=o.formData.Name)},dependencies:[c.O5,u.rH,d.Fj,d.JJ,d.Q7,d.On,C.p]})),n})();var Hi=s(22863),Vi=s(11989),ct=s(77579),vt=s(39841),z=s(82722),X=s(24351),Ki=s(18505),tt=s(23945);let Gi=(()=>{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 P.O),(0,r.Z)(this,"order",void 0),(0,r.Z)(this,"DeliveryTypes",Array()),this.dialogRef=e,this.storage=o,this.config=new P.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(Z.so),t.Y36(tt.O),t.Y36(Z.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,d.JJ,d.On,g.w9],styles:["ng-dropdown-panel.outlet-multiple[_ngcontent-%COMP%]{z-index:1100}"]})),n})();var et=s(50),K=s(26111);let Bi=(()=>{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 P.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 P.O,this.config.title="Empty outlet Inventory?",this.config.customWidth="500px",this.EntityID=this.data}onOk(){if(_.gT.IsEmpty(this.EntityID))return this.toastr.error("Please select outlet before proceeding..",D.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",D.n.Error),this.onClose()})}onClose(){this.dialogRef.close()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(Z.so),t.Y36(Z.WI),t.Y36(et.M),t.Y36(K.N),t.Y36(x._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 Tt=s(47634),bt=s(29677),ji=s(31906);let $i=(()=>{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 P.O),this._backEndService=e,this._dialogRef=o,this.config=new P.O,this.config.title="New Courier",this.config.customWidth="500px"}onOk(){_.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(et.M),t.Y36(Z.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,d.Fj,d.JJ,d.On]})),n})();var yt=s(86751),Wi=s(94768),st=s(98818),dt=s(54825);const zi=["quantity"],Dt=function(n){return{selected:n}};function Xi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"a",6),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,Dt,e.modalItemState.INVENTORY==e.currentTabState))}}function ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",17)(1,"div",18)(2,"autocompleteV2",19),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 ea(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",20,21),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 na(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",22,21),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 oa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",23)(1,"strong"),t._uU(2,"Discount (%)"),t.qZA(),t.TgZ(3,"input",22),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 ia(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",24)(1,"strong"),t._uU(2,"Price"),t.qZA(),t.TgZ(3,"input",22),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 aa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",24)(1,"strong"),t._uU(2,"Cost"),t.qZA(),t.TgZ(3,"input",22),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 ra(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",25)(1,"div",18)(2,"POS-tinymce-editor",26),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 la(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"h5",27),t._uU(2,"Serial: "),t.qZA(),t.TgZ(3,"ng-select",28),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.serials=i)})("ngModelChange",function(i){t.CHM(e);const l=t.oxw(2);return t.KtG(l.item.Quantity=i.length)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("readonly",e.item.ID!=e.guidEmpty)("items",e.item.Serial)("multiple",!0)("ngModel",e.serials)}}function ca(n,a){if(1&n&&(t.ynx(0),t.TgZ(1,"div",7),t.YNc(2,ta,3,2,"div",8),t.TgZ(3,"div",9)(4,"div",10)(5,"strong"),t._uU(6,"Qty"),t.qZA(),t.YNc(7,ea,2,1,"input",11),t.YNc(8,na,2,1,"ng-template",null,12,t.W1O),t.qZA(),t.YNc(10,oa,4,1,"div",13),t.YNc(11,ia,4,1,"div",14),t.YNc(12,aa,4,1,"div",14),t.qZA(),t.YNc(13,ra,3,1,"div",15),t.YNc(14,la,4,4,"ng-container",16),t.qZA(),t.BQk()),2&n){const e=t.MAs(9),o=t.oxw();t.xp6(1),t.Udp("height",4==(null==o.item||null==o.item.Variant?null:o.item.Variant.TypeID)?"150px":"350px"),t.xp6(1),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)),t.xp6(1),t.Q6J("ngIf",4==(null==o.item.Variant?null:o.item.Variant.TypeID))}}function sa(n,a){1&n&&(t.ynx(0),t._UZ(1,"i",48),t.TgZ(2,"h6"),t._uU(3,"No Image"),t.qZA(),t.BQk())}function da(n,a){if(1&n&&t._UZ(0,"img",49),2&n){const e=t.oxw(2);t.Q6J("src",e.item.Variant.ThumbnailUrl,t.LSH)}}function pa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",50),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 _a=function(){return["/menu/Products/Catalog/Variants/Info"]},ma=function(n){return{ID:n}};function ua(n,a){if(1&n&&(t.TgZ(0,"div",29)(1,"div",30)(2,"a",31),t.YNc(3,sa,4,0,"ng-container",4),t.YNc(4,da,1,1,"ng-template",null,32,t.W1O),t.qZA()(),t.TgZ(6,"div",33)(7,"table",34)(8,"tbody")(9,"tr")(10,"th",35),t._UZ(11,"i",36),t._uU(12,"Inventory"),t.qZA(),t.TgZ(13,"th",35),t._UZ(14,"i",37),t._uU(15),t.qZA(),t.TgZ(16,"th",35),t._UZ(17,"i",38),t._uU(18),t.qZA(),t.TgZ(19,"th",35),t._UZ(20,"i",39),t._uU(21," Diff"),t.qZA(),t.TgZ(22,"th",35),t._UZ(23,"i",40),t._uU(24," Action"),t.qZA()(),t.TgZ(25,"tr")(26,"th",41),t._uU(27," On Hand "),t.qZA(),t.TgZ(28,"td",42),t._uU(29),t.ALo(30,"number"),t.qZA(),t.TgZ(31,"td",42),t._uU(32),t.ALo(33,"number"),t.qZA(),t._UZ(34,"td",43)(35,"td",44),t.qZA(),t.TgZ(36,"tr")(37,"th",41),t._uU(38," Allocated "),t.qZA(),t.TgZ(39,"td",42),t._uU(40),t.ALo(41,"number"),t.qZA(),t.TgZ(42,"td",42),t._uU(43),t.ALo(44,"number"),t.qZA()(),t.TgZ(45,"tr")(46,"th",41),t._uU(47,"Available"),t.qZA(),t.TgZ(48,"td",42),t._uU(49),t.ALo(50,"number"),t.qZA(),t.TgZ(51,"td",42),t._uU(52),t.ALo(53,"number"),t.qZA()(),t.TgZ(54,"tr")(55,"th",41),t._uU(56,"ROP"),t.qZA(),t.TgZ(57,"td",42),t._uU(58),t.ALo(59,"number"),t.qZA(),t.TgZ(60,"td",42),t._uU(61),t.ALo(62,"number"),t.qZA(),t.TgZ(63,"td",45),t._uU(64),t.ALo(65,"number"),t.qZA()(),t.TgZ(66,"tr")(67,"th",41),t._uU(68,"Max"),t.qZA(),t.TgZ(69,"td",42),t._uU(70),t.ALo(71,"number"),t.qZA(),t.TgZ(72,"td",42),t._uU(73),t.ALo(74,"number"),t.qZA(),t.TgZ(75,"td",46),t._uU(76),t.ALo(77,"number"),t.qZA(),t.TgZ(78,"td"),t.YNc(79,pa,2,0,"button",47),t.qZA()()()()()()),2&n){const e=t.MAs(5),o=t.oxw();t.xp6(2),t.Q6J("routerLink",t.DdM(45,_a))("queryParams",t.VKq(46,ma,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(30,21,o.sourceOnHand)," "),t.xp6(3),t.hij(" ",t.lcZ(33,23,o.destinationOnHand)," "),t.xp6(8),t.hij(" ",t.lcZ(41,25,o.sourceAllocated)," "),t.xp6(3),t.hij(" ",t.lcZ(44,27,o.destinationAllocated)," "),t.xp6(6),t.hij(" ",t.lcZ(50,29,o.sourceOnHand-o.sourceAllocated)," "),t.xp6(3),t.hij(" ",t.lcZ(53,31,o.destinationOnHand-o.destinationAllocated)," "),t.xp6(6),t.Oqu(t.lcZ(59,33,o.sourceRop)),t.xp6(3),t.hij(" ",t.lcZ(62,35,o.destinationRop)," "),t.xp6(3),t.AsE(" ",o.destinationRopDiff>=0?"+":"","",t.lcZ(65,37,o.destinationRopDiff),""),t.xp6(6),t.Oqu(t.lcZ(71,39,o.sourceMax)),t.xp6(3),t.hij(" ",t.lcZ(74,41,o.destinationMax)," "),t.xp6(3),t.AsE(" ",o.destinationMaxDiff>=0?"+":"","",t.lcZ(77,43,o.destinationMaxDiff),""),t.xp6(3),t.Q6J("ngIf",!o.item.isMaxInventory)}}let It=(()=>{class n{constructor(e,o,i,l,p,S,E){if((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",_.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,"serials",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",st.Y),(0,r.Z)(this,"currentTabState",void 0),(0,r.Z)(this,"constants",_.gT),(0,r.Z)(this,"inventoryView",void 0),this.httpService=e,this.data=o,this.dialogRef=i,this.cartItemService=l,this.toastr=p,this.backendService=S,this.firstLoadService=E,this.config=new P.O,this.currentTabState=st.Y.INPUT,this.priceVisible=o.priceVisible,this.priceRestriction=o.priceRestriction,this.serials=[],this.entityID=o.entityID,this.isEditDelivery=o.isEditDelivery,this.costVisible=o.costVisible,this.costRole=o.costRole,this.inventoryView=o.inventoryView,_.gT.IsNotEmpty(o.itemInfo)){if(this.isEdit=!0,this.item=Object.assign({},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.item.Note){let ot=[];ot=this.item.Note.slice(1,this.item.Note.length-1).split(","),ot.forEach(_t=>this.serials.push(_t))}(_.gT.IsEmpty(this.item.Serial)||0==this.item.Serial.length)&&4==this.item.Variant.TypeID&&this.fillSerial()}else this.item=new Wi.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:_.gT.GuidEmpty,variantID:this.item.VariantID})).subscribe(o=>{this.item.Serial=o})}onOk(e){"Enter"!=e&&(_.gT.IsNotEmpty(this.item.VariantID)&&(this.checkWarningMaxInventory(),this.setMinimumQtyItem(),this.setSerialItem(),this.isEdit?this.cartItemService.updateItem({item:this.item,index:this.data.itemInfo.index}):this.cartItemService.addNewItem(this.item,!0)),this.dialogRef.close())}setMinimumQtyItem(){_.gT.IsEmpty(this.item.Quantity)&&(this.item.Quantity=1)}setSerialItem(){if(4==this.item.Variant.TypeID&&(this.serials[0]?.Serial||this.serials.length>0)){const e=this.serials.map(o=>_.gT.IsNotEmpty(o.Serial)?o.Serial:o);this.item.Note=JSON.stringify(e).replaceAll('\\"',""),this.item.Note=JSON.stringify(e).replaceAll('"',"")}}checkWarningMaxInventory(){this.item.Quantity>this.sourceMax&&this.toastr.warning(_.g7.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.fillSerial(),this._quantityElement?.nativeElement?.focus()})}requestUnitInStock(){_.gT.IsEmpty(this.entityID)?this.toastr.error("Please select outlet before proceeding..",D.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;_.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==st.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(m.O),t.Y36(Z.WI),t.Y36(Z.so),t.Y36(K.N),t.Y36(x._W),t.Y36(et.M),t.Y36(tt.O))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-item"]],viewQuery:function(e,o){if(1&e&&t.Gf(zi,5),2&e){let i;t.iGM(i=t.CRH())&&(o._quantityElement=i.first)}},decls:10,vars:7,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","ngIfElse"],["INVENTORY",""],["data-cy","product",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"],["disabled","","type","text","class","mt-5 w-100 form-control","autoNum","",3,"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"],["style","height: 200px;","class","row mt-5",4,"ngIf"],[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"],["disabled","","type","text","autoNum","",1,"mt-5","w-100","form-control",3,"ngModel","ngModelChange"],["quantity",""],["type","text","autoNum","",1,"w-100","form-control",3,"ngModel","ngModelChange"],[1,"col-auto","pe-0",2,"width","90px"],[1,"col-auto","pe-0",2,"width","112px"],[1,"row","mt-5",2,"height","200px"],["height","220px",3,"value","valueChange"],[1,"my-5"],["appendTo","Body","bindLabel","Serial",3,"readonly","items","multiple","ngModel","ngModelChange"],[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"],["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"]],template:function(e,o){if(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,Xi,2,3,"a",3),t.qZA()(),t.YNc(7,ca,15,10,"ng-container",4),t.YNc(8,ua,80,48,"ng-template",null,5,t.W1O),t.qZA()()),2&e){const i=t.MAs(9);t.Q6J("config",o.config),t.xp6(4),t.Q6J("ngClass",t.VKq(5,Dt,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.modalItemState.INPUT==o.currentTabState)("ngIfElse",i)}},dependencies:[c.mk,c.O5,w.M,u.rH,d.Fj,d.JJ,d.On,L.J,V.b,g.w9,dt.V,T.gM,c.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 Ot=s(78068),Mt=s(94601);const ga=["serialInput"];let fa=(()=>{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 P.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&&(_.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(Z.WI),t.Y36(Z.so),t.Y36(x._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(ga,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,d.Fj,d.JJ,d.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 ha=s(26128),xa=s(245),Ca=s(241),At=s(42011);function Za(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 va(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,Za,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 Ta=(()=>{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,va,19,13,"div",0),2&e&&t.Q6J("ngIf",o.deliveryData)},dependencies:[c.O5,d.Fj,d.JJ,d.On,b.QB,g.w9,g.ir,T.gM,U.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})(),ba=(()=>{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 ya(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 Da=function(n,a){return{ID:n,Template:a}},Ia=function(){return["/menu/Logistics/Archive/Transfer_Order/Info"]},Oa=function(n){return{ID:n}};let Ma=(()=>{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,ya,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,Da,o.deliveryComplete.OrderID,o.deliveryComplete.PrintTemplateID)),t.xp6(7),t.Q6J("routerLink",t.DdM(15,Ia))("queryParams",t.VKq(16,Oa,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:[c.sg,u.rH,c.JJ,U.qU]})),n})();var nt=s(41206),H=s(28255),Aa=s(67376);const qa=["cartContainer"];function Sa(n,a){1&n&&t._UZ(0,"th",19)}function Pa(n,a){1&n&&t._UZ(0,"th",20)}function Na(n,a){1&n&&(t.TgZ(0,"th",21),t._uU(1," Cost "),t.qZA())}function wa(n,a){1&n&&(t.TgZ(0,"th",22),t._uU(1,"Price"),t.qZA())}function Ua(n,a){1&n&&(t.TgZ(0,"th",23),t._uU(1,"%"),t.qZA())}function Ja(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Total"),t.qZA())}function Fa(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 ka(n,a){if(1&n&&(t.TgZ(0,"td",32),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.Variant.UOMName)}}function La(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 Qa(n,a){if(1&n&&(t.TgZ(0,"td",32),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Price)," ")}}function Ea(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 Ra(n,a){if(1&n&&(t.TgZ(0,"td",32),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,e.Price*e.Quantity*((100-e.Discount)/100))," ")}}function Ya(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,S=t.oxw();return t.KtG(S.onSelect({item:l,index:p}))})("contextmenu",function(i){const l=t.CHM(e),p=l.$implicit,S=l.index,E=t.oxw();return t.KtG(E.onContextMenu(i,p,S))}),t.TgZ(1,"td",26)(2,"i",27),t.NdJ("click",function(){const i=t.CHM(e),l=i.$implicit,p=i.index,S=t.oxw();return t.KtG(S.onRemove({item:l,index:p}))}),t.qZA()(),t.YNc(3,Fa,3,1,"td",28),t.TgZ(4,"td",29)(5,"span",30),t._uU(6),t._UZ(7,"br"),t.qZA(),t._UZ(8,"span",31),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA(),t.TgZ(11,"td",32),t._uU(12),t.ALo(13,"number"),t.qZA(),t.YNc(14,ka,2,1,"td",33),t.YNc(15,La,2,3,"td",34),t.YNc(16,Qa,3,3,"td",33),t.YNc(17,Ea,3,3,"td",35),t.YNc(18,Ra,3,3,"td",33),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("innerHTML",e.Note,t.oJD),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 Ha(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 Va=(()=>{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,nt.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 ct.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,F.h)(i=>_.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,z.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(tt.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(qa,5),t.Gf(H.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"],[3,"innerHTML"],[1,"text-end"],["class","text-end",4,"ngIf"],["class","text-end",3,"innerHTML",4,"ngIf"],["class","text-end text-danger disc",4,"ngIf"],[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,Sa,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,Pa,1,0,"th",9),t.YNc(16,Na,2,0,"th",10),t.YNc(17,wa,2,0,"th",11),t.YNc(18,Ua,2,0,"th",12),t.YNc(19,Ja,2,0,"th",13),t.qZA()(),t.TgZ(20,"tbody",14),t.NdJ("cdkDropListDropped",function(l){return o.drop(l)}),t.YNc(21,Ya,19,12,"tr",15),t.qZA()()()(),t._UZ(22,"div",16),t.TgZ(23,"mat-menu",null,17),t.YNc(25,Ha,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:[c.sg,c.O5,Aa.PQ,nt.Wj,nt.Zt,H.VK,H.OP,H.KA,H.p6,T.gM,c.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 Ka=function(){return["/menu/Logistics/Archive/Transfer_Order"]};function Ga(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,Ka)))}function Ba(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 ja(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,Ba,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 $a(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 Wa=(()=>{class n extends Hi.M{handleF4(){_.gT.IsEmpty(this.outletID)?this.toastr.error("Please select outlet before proceeding..",D.n.Error):!(this.matDialog.openDialogs.length>0)&&_.gT.IsNotEmpty(this.outletID)&&this.matDialog.open(It,{data:{item:null,entityID:this.outletID}})}handleF8(){this.isComplete&&this.newForm()}constructor(e,o,i,l,p,S,E,ot,_t,Pl){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=S,this.deliveryDataService=E,this.cartItemService=ot,this.toastr=_t,this.router=Pl,this.destroy$=new ct.x,this.deliveryDataService.Data$.pipe((0,z.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,z.R)(this.destroy$),(0,F.h)(R=>_.gT.IsNotEmpty(R.id)),(0,X.b)(R=>this.cartItemService.getItemById(R.id,R.entityID))).subscribe(R=>this.cartItemService.addNewItem(R))}ngOnInit(){this.initLoadForm()}ngOnDestroy(){this.deliveryDataService.pushNewValue(new Ot.j$),this.quickKeyService.Data=new Vi.AM,this.cartItemService.inventoryState="",this.cartItemService.lowOnStockInfo={EntityID:_.gT.GuidEmpty,Items:[]},this.destroy$.next(!0),this.destroy$.complete()}initLoadForm(){const e=this.activatedRoute.snapshot.queryParams;_.gT.IsNotEmpty(e.ID)&&!this.isVoid?(this.isEdit=!0,this.menuData$.pipe((0,X.b)(()=>this.firstLoadService.getStorage(_.Wz.LoadFormDelivery,e.ID))).subscribe(o=>this.fillData(o))):this.menuData$.pipe((0,X.b)(()=>this.firstLoadService.getStorage(_.Wz.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,vt.a)([this.backEndService.generateNumber(this.outletID,_.Wz.DeliveryGenerateNumber),this.backEndService.getQuickKey(this.outletID,_.Wz.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=ji.U.DeliveryPage,this.initRoles(),this.cartItemService.barcodeSerialEnabled=e.AppConfigJSON.ModuleSell.BarcodeSerialEnabled,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,_.Wz.DeliveryGenerateNumber).subscribe(o=>{this.deliveryData.Order.Number=o.Number}),_.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.backEndService.getQuickKey(this.outletID,_.Wz.GetQuickKey).subscribe(o=>this.initQuickKey(o)))}initRoles(){this.firstLoadService.role$.pipe((0,z.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=>{_.gT.IsEmpty(e.DiscountAmount)&&(e.DiscountAmount=0),this.cartItems.push(e)})}initDeliveryCart(){_.gT.IsNotEmpty(this.deliveryData.Order.ID)&&(this.fillCartItems(),this.cartItemService.updateCartItem(this.cartItems))}openOutletModal(){(!this.isEdit||this.isVoid)&&this.matDialog.open(yt.X,{data:{Entities:this.entities}}).afterClosed().pipe((0,F.h)(e=>e),(0,F.h)(e=>e.outlet.ID!=this.deliveryData.Order.DestinationEntityID||(this.toastr.error("Source Outlet can't be the same with Destination Outlet",D.n.Error),!1)),(0,Ki.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,X.b)(()=>(0,vt.a)([this.backEndService.generateNumber(this.outletID,_.Wz.DeliveryGenerateNumber),this.backEndService.getQuickKey(this.outletID,_.Wz.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",D.n.Error),setTimeout(()=>this.deliveryData.Order.DestinationEntityID=null,100))}openCourierModal(){this.matDialog.open($i).afterClosed().pipe((0,F.h)(e=>_.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(It,{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(Gi,{data:{deliveryData:this.deliveryData}})}openEmptyModal(){this.matDialog.open(Bi,{data:this.outletID})}submit(){if(!_.gT.IsEmpty(this.deliveryData.Order.DestinationEntityID))return _.gT.IsEmpty(this.deliveryData.Order.SourceEntityID)?(this.toastr.error("Please select outlet before proceeding..",D.n.Error),void this.openOutletModal()):void(0!=this.cartItems.length?this.deliveryData.Order.EntityID!==this.deliveryData.Order.DestinationEntityID?_.gT.IsEmpty(this.deliveryData.Order.Number)?this.toastr.error("Number cannot be empty.",D.n.Error):this.matDialog.open(bt.y,{data:{transactionData:this.deliveryData,api:_.Wz.SubmitOutletDelivery}}).afterClosed().pipe((0,F.h)(e=>_.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}`,D.n.Info),this.calculateTotal(),this.isComplete=!0}):this.toastr.error("Source Outlet can't be the same with Destination Outlet",D.n.Error):this.toastr.error("You must have at least one item.",D.n.Error));this.toastr.error("Please Choose your Destination!",D.n.Error)}openVoidModal(){this.matDialog.open(Tt.s).afterClosed().pipe((0,F.h)(e=>e)).subscribe(e=>{this.isVoid=e,this.deliveryDataService.pushNewValue(new Ot.j$),this.initLoadForm()})}onScanBarcode(e){this.cartItemService.addCartItemByCode(e,this.outletID)}openUploadModal(){this.matDialog.open(Mt.h).afterClosed().pipe((0,F.h)(e=>_.gT.IsNotEmpty(e)&&e.length>0)).subscribe(e=>e.forEach(o=>this.cartItemService.addNewItem(o,!0)))}onScanSerial(){this.matDialog.open(fa,{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(m.O),t.Y36(tt.O),t.Y36(u.gz),t.Y36(Z.uw),t.Y36(et.M),t.Y36(ha.w),t.Y36(xa.p),t.Y36(K.N),t.Y36(x._W),t.Y36(u.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,Ga,9,2,"ng-container",1),t.qZA(),t.TgZ(3,"content"),t.YNc(4,ja,7,10,"div",2),t.YNc(5,$a,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:[c.O5,u.rH,C.p,Ca.w,At.H,Ta,ba,Ma,Va],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})(),za=(()=>{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 P.O,this.config.title="Note",this.data=e.data}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(Z.WI),t.Y36(Z.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,d.Fj,d.JJ,d.On]})),n})();function Xa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr",19)(1,"td",20),t._uU(2),t.qZA(),t._UZ(3,"td",21)(4,"td",22),t.TgZ(5,"td")(6,"input",23),t.NdJ("ngModelChange",function(i){const p=t.CHM(e).$implicit;return t.KtG(p.Quantity=i)}),t.qZA()(),t._UZ(7,"td",22)(8,"td",22),t.TgZ(9,"td")(10,"textarea",24),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;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),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)}}const tr=function(n){return{ID:n}};function er(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,"section",6)(11,"div",7),t._UZ(12,"i",8),t.TgZ(13,"datepicker",9),t.NdJ("dateChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.data.Date=i)}),t.qZA()()()(),t.TgZ(14,"main")(15,"section")(16,"table",10)(17,"thead",11)(18,"tr")(19,"th",12),t._uU(20,"NO"),t.qZA(),t.TgZ(21,"th",13),t._uU(22,"NAME"),t.qZA(),t.TgZ(23,"th",14),t._uU(24,"CODE"),t.qZA(),t.TgZ(25,"th",15),t._uU(26,"QTY"),t.qZA(),t.TgZ(27,"th",16),t._uU(28,"TRANSFER"),t.qZA(),t.TgZ(29,"th",16),t._uU(30,"DIFF"),t.qZA(),t.TgZ(31,"th",17),t._uU(32,"NOTE"),t.qZA()()(),t.TgZ(33,"tbody"),t.YNc(34,Xa,11,8,"tr",18),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,tr,e.data.ID)),t.xp6(11),t.Q6J("date",e.data.Date),t.xp6(21),t.Q6J("ngForOf",e.data.Items)}}let nr=(()=>{class n extends W.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),this.toastr=i,this.matDialog=l,this.router=p}openNoteDialog(){this.matDialog.open(za,{data:{data:this.data}}).afterClosed().pipe((0,F.h)(e=>_.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!",D.n.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(m.O),t.Y36(u.gz),t.Y36(x._W),t.Y36(Z.uw),t.Y36(u.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,"iconed","date"],[1,"d-flex","align-items-center","g-0"],["aria-hidden","true","matTooltipPosition","above","matTooltip","Date",1,"fa-regular","fa-calendar-check","fa-2x","me-3","mb-7"],["width","70","appearance","outline",3,"date","dateChange"],[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","ngModelChange"],[1,"form-control",2,"height","2.375rem",3,"ngModel","ngModelChange"]],template:function(e,o){1&e&&t.YNc(0,er,35,8,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[c.sg,c.O5,u.rH,d.Fj,d.JJ,d.On,C.p,b.QB,V.b,T.gM]})),n})();var or=s(71884),ir=s(78372),ar=s(68675),rr=s(63900),lr=s(39646);function cr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ng-select",4),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.currentSerials=i)}),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("items",e.allSerials)("multiple",!0)("ngModel",e.currentSerials)}}function sr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",5)(1,"textarea",6),t.NdJ("ngModelChange",function(i){t.CHM(e);const l=t.oxw();return t.KtG(l.note=i)}),t.qZA(),t.TgZ(2,"label",7),t._uU(3,"Note"),t.qZA()()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.note)}}let qt=(()=>{class n{constructor(e,o,i){if((0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"config",void 0),(0,r.Z)(this,"note",void 0),(0,r.Z)(this,"outletFulfillmentID",void 0),(0,r.Z)(this,"currentSerials",void 0),(0,r.Z)(this,"allSerials",void 0),(0,r.Z)(this,"isSerialized",!1),this.dialogRef=o,this.config=new P.O,this.config.title=e?.name,this.config.customWidth="400px",this.note=e?.note,this.outletFulfillmentID=e?.outletFulfillmentID,4==e?.item.TypeID){if(this.isSerialized=!0,null==e?.item.Note)e.item.Note="",this.currentSerials=[];else{const l=e?.item.Note.slice(1,e?.item.Note.length-1).split(",");this.currentSerials=l}i.post("/api/catalog/variant/GetVariantSerial",{entityID:this.outletFulfillmentID,variantID:e?.item.VariantID}).subscribe({next:l=>this.allSerials=l})}}onClose(){this.dialogRef.close()}onOk(){if(this.isSerialized){let e="";e=this.currentSerials.join(","),e=`[${e}]`,this.note=e}this.dialogRef.close(this.note)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(Z.WI),t.Y36(Z.so),t.Y36(m.O))}),(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"],["appendTo","body","bindValue","Serial","bindLabel","Serial",3,"items","multiple","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["notSerialized",""],["appendTo","body","bindValue","Serial","bindLabel","Serial",3,"items","multiple","ngModel","ngModelChange"],[1,"form-floating-outline"],["name","note","id","note","cols","60","rows","8",1,"form-control",2,"width","100%",3,"ngModel","ngModelChange"],["for","note"]],template:function(e,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,cr,1,3,"ng-select",2),t.YNc(4,sr,4,1,"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:[c.O5,w.M,d.Fj,d.JJ,d.On,g.w9],changeDetection:0})),n})(),pt=(()=>{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,"outletFulfillmentID",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,console.log(p),this.checkIsSent(p,o),i&&this.checkIsEdit(p),this.cartItems.push(p)})}checkIsEdit(e){const o=this.formItems.find(i=>i.ID==e.ID);_.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);_.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(_.gT.IsEmpty(e))this.toastr.error("Code is empty",D.n.Error);else{let o=this.cartItems.find(i=>_.gT.IsNotEmpty(i.Code)&&i.Code==e);if(_.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}`,D.n.Success)}else this.toastr.error(`No variant with code ${e} found`,D.n.Error)}}openModalItemNote(e){console.log(e),console.log(this.outletFulfillmentID),this.matDialog.open(qt,{data:{note:e.Note,name:e.Name,item:e,outletFulfillmentID:this.outletFulfillmentID}}).afterClosed().pipe((0,F.h)(o=>_.gT.IsNotEmpty(o))).subscribe(o=>e.Note=o)}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.LFG(x._W),t.LFG(Z.uw))}),(0,r.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})(),dr=(()=>{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 P.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(Z.WI),t.Y36(Z.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})(),St=(()=>{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",D.n.Error),l=!1),e.forEach(p=>{if(p.QuantityDelivered>p.MaxDeliveryQuantity&&(this.toastr.error(`Delivery item of ${p.Name} is greater than ordered!`,D.n.Error),l=!1),4===p.TypeID)if("[]"!==p.Note&&null!=p.Note){const S=p.Note.split(",");(p.QuantityDelivered<0?-1*p.QuantityDelivered:p.QuantityDelivered)!=S.length&&""!=S[0]&&!p.Completed&&(this.toastr.error(`Can't edit delivery of ${p.Name}'s serial number`,D.n.Error),l=!1)}else 0!=p.QuantityDelivered&&(this.toastr.error(`Serial can not empty in product ${p.Name}`,D.n.Error),l=!1);o&&(p.QuantityDelivered<0?-1*p.QuantityDelivered:p.QuantityDelivered)!=p.BarcodeCount&&p.QuantityDelivered>0&&(this.dialog.open(dr,{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:D.n.Warning},width:"500px"}),l=!1)}),l}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,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(x._W),t.LFG(u.F0),t.LFG(Z.uw))}),(0,r.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})();var G=s(90811);function pr(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 _r(n,a){if(1&n&&(t.TgZ(0,"div",25),t.YNc(1,pr,6,4,"ng-container",26),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",0!=e.Quantity)}}function mr(n,a){if(1&n&&(t.TgZ(0,"div",21),t.YNc(1,_r,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 Pt=function(n){return[n]},ur=function(n,a){return{ID:n,Template:a}},gr=function(n){return{ID:n}};let Nt=(()=>{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,mr,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,Pt,"Outbound"==o.state?"/print/OutDelivery":"/print/InDelivery"))("queryParams",t.WLB(11,ur,o.afterSubmitData.ID,o.afterSubmitData.Template)),t.xp6(7),t.Q6J("routerLink",t.VKq(14,Pt,"Outbound"==o.state?"/menu/Logistics/Archive/Outbound_Logistics/Info":"/menu/Logistics/Archive/Inbound_Logistics/Info"))("queryParams",t.VKq(16,gr,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:[c.sg,c.O5,u.rH,c.JJ,U.qU],changeDetection:0})),n})(),wt=(()=>{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:[dt.V],changeDetection:0})),n})();function fr(n,a){1&n&&(t.TgZ(0,"th",9),t._uU(1," Pack Size"),t.qZA())}function hr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"input",20),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;t.Q6J("ngModel",e.QuantityDelivered)}}function xr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",21),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 Cr=function(n){return{ID:n}};function Zr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td")(2,"a",14),t._uU(3),t.qZA()(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t.YNc(7,hr,1,1,"input",15),t.qZA(),t.YNc(8,xr,2,1,"td",16),t.TgZ(9,"td",17),t._uU(10),t.qZA(),t.TgZ(11,"td",17),t._uU(12),t.qZA(),t.TgZ(13,"td",17),t._uU(14),t.qZA(),t.TgZ(15,"td",18)(16,"i",19),t.NdJ("click",function(){const l=t.CHM(e).$implicit,p=t.oxw();return t.KtG(p.openModalItemNote(l))}),t.qZA()()()}if(2&n){const e=a.$implicit,o=t.oxw();t.xp6(2),t.Q6J("queryParams",t.VKq(8,Cr,e.VariantID)),t.xp6(1),t.hij(" ",e.Name," "),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 Ut=(()=>{class n{constructor(e,o){(0,r.Z)(this,"productService",void 0),(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,"eventImport",void 0),this.productService=e,this.dialog=o,this.eventImport=new t.vpe}openModalItemNote(e){this.dialog.open(qt,{data:{note:e.Note,name:e.Name,item:e,outletFulfillmentID:this.productService.outletFulfillmentID}}).afterClosed().pipe((0,F.h)(o=>_.gT.IsNotEmpty(o))).subscribe(o=>e.Note=o)}onImport(){this.eventImport.emit()}}return(0,r.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(pt),t.Y36(Z.uw))}),(0,r.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-products-delivery-list"]],inputs:{isDeliveryPacking:"isDeliveryPacking",cartItems:"cartItems",state:"state"},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"],["autoNum","","class","form-control text-end","type","text",3,"ngModel","ngModelChange",4,"ngIf"],[4,"ngIf"],[1,"text-end"],[1,"text-center"],[1,"fa-regular","fa-note-sticky","fa-2x",3,"click"],["autoNum","","type","text",1,"form-control","text-end",3,"ngModel","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,fr,2,0,"th",10),t.TgZ(20,"th",11),t._uU(21),t.qZA(),t.TgZ(22,"th",11),t._uU(23),t.qZA(),t.TgZ(24,"th",11),t._uU(25,"Count"),t.qZA(),t._UZ(26,"th",12),t.qZA()(),t.TgZ(27,"tbody"),t.YNc(28,Zr,17,10,"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:[c.sg,c.O5,u.rH,d.Fj,d.JJ,d.On,V.b],changeDetection:0})),n})();const vr=function(){return["/menu/Logistics/Archive/Outbound_Logistics/Info"]},Jt=function(n){return{ID:n}};function Tr(n,a){if(1&n&&(t.TgZ(0,"a",7),t._uU(1,"Cancel"),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("routerLink",t.DdM(2,vr))("queryParams",t.VKq(3,Jt,e.param.ID||e.param.POID))}}const br=function(){return["/menu/Logistics/Archive/Outbound_Logistics"]};function yr(n,a){1&n&&(t.TgZ(0,"a",8),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,br))}function Dr(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,Tr,2,5,"a",4),t.YNc(2,yr,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 Ir(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 Or(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 Mr(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 Ar(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 qr(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 Sr(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,Ar,7,0,"ng-template",32),t.YNc(3,qr,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 Pr(n,a){if(1&n&&t.YNc(0,Sr,4,6,"ng-select",30),2&n){const e=t.oxw(3);t.Q6J("ngIf",!(e.isEdit||e.isPO))}}function Nr(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 wr(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 Ur(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,Nr,7,0,"ng-template",32),t.YNc(3,wr,9,9,"ng-template",33),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("items",e.unfulfilledInvoices)}}function Jr(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 Fr(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 kr=function(){return["/menu/Contacts/Contact/Customers/Info"]};function Lr(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,Jr,7,1,"tr",2),t.YNc(16,Fr,6,1,"tr",2),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(13),t.Q6J("routerLink",t.DdM(5,kr))("queryParams",t.VKq(6,Jt,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 Qr(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 Er(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 Rr(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 Yr(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 Hr(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,Qr,7,1,"tr",2),t.YNc(8,Er,7,1,"tr",2),t.YNc(9,Rr,6,1,"tr",2),t.YNc(10,Yr,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 Vr(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 Kr(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("isDeliveryPacking",e.isDeliveryPacking)("cartItems",e.cartItems),t.xp6(2),t.Q6J("form",e.form)}}function Gr(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,Ir,6,2,"ng-container",2),t.qZA(),t.TgZ(9,"div",15),t.YNc(10,Or,23,6,"table",16),t.YNc(11,Mr,3,1,"ng-container",17),t.YNc(12,Pr,1,1,"ng-template",null,18,t.W1O),t.YNc(14,Ur,4,1,"div",2),t.qZA()(),t.YNc(15,Lr,17,8,"div",19),t.YNc(16,Hr,11,4,"div",19),t.YNc(17,Vr,35,8,"div",19),t.qZA(),t.YNc(18,Kr,5,3,"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 Br(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 jr(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,Dr,5,3,"ng-container",2),t.qZA(),t.TgZ(3,"content"),t.YNc(4,Gr,19,9,"div",3),t.YNc(5,Br,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 $r=(()=>{class n extends W.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 ct.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,_.gT.IsEmpty(this.param.POID)&&_.gT.IsEmpty(this.param.ID)?(this.isEdit=!1,this.initOrderNumberOptions()):_.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,F.h)(e=>null!=e&&(""==e||e.length>=3)),(0,or.x)(),(0,ir.b)(500),(0,ar.O)(""),(0,rr.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,lr.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){_.gT.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}findSalesOrderAutoComplete(e){_.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(),_.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,_.gT.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.SalesOrder.EntityID),this.form.Header.Note=e.SalesOrder.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(_.gT.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Outbound #${this.form.Header.Number}`),this.productService.outletFulfillmentID=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);_.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(m.O),t.Y36(u.gz),t.Y36(pt),t.Y36(St))}),(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,"isDeliveryPacking","cartItems"],[3,"form"],["state","Outbound",3,"afterSubmitData","items","undo","newForm"]],template:function(e,o){1&e&&t.YNc(0,jr,6,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.storage)},dependencies:[c.O5,u.rH,d.Fj,d.JJ,d.On,C.p,b.QB,L.J,g.w9,g.ir,g.Cm,G.A9,G.Yi,T.gM,Nt,wt,Ut,c.Ov,c.uU,U.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 Wr=s(99036);let zr=(()=>{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 P.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(Z.WI),t.Y36(Z.so),t.Y36(Wr.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 Xr=function(){return["/menu/Logistics/Archive/Inbound_Logistics/Info"]},Ft=function(n){return{ID:n}};function tl(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,Xr))("queryParams",t.VKq(3,Ft,e.param.ID||e.param.POID))}}const el=function(){return["/menu/Logistics/Archive/Inbound_Logistics"]};function nl(n,a){1&n&&(t.TgZ(0,"a",8),t._uU(1,"Cancel"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,el))}function ol(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,tl,2,5,"a",4),t.YNc(2,nl,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 il(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 al(n,a){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",25)(2,"autocompleteV2",26),t.NdJ("onSelect",function(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 rl(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 ll(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 cl(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 sl(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,ll,7,0,"ng-template",29),t.YNc(3,cl,9,9,"ng-template",30),t.qZA()()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("items",e.unfulfilledInvoices)}}const dl=function(){return["/menu/Contacts/Contact/Suppliers/Info"]};function pl(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,dl))("queryParams",t.VKq(4,Ft,e.deliveryData.SupplierContact.ID)),t.xp6(1),t.hij(" ",null==e.deliveryData?null:e.deliveryData.SupplierContact.Name," ")}}function _l(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 ml(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 ul(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,pl,8,6,"tr",2),t.YNc(8,_l,7,1,"tr",2),t.YNc(9,ml,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 gl(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 fl(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("cartItems",e.cartItems),t.xp6(2),t.Q6J("form",e.form)}}function hl(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"h2"),t._UZ(6,"i",14),t._uU(7,"Purchase Order "),t.qZA(),t.YNc(8,il,6,2,"ng-container",2),t.qZA(),t.TgZ(9,"div",15),t.YNc(10,al,3,1,"ng-container",16),t.YNc(11,rl,2,0,"ng-template",null,17,t.W1O),t.YNc(13,sl,4,1,"div",2),t.qZA()(),t.YNc(14,ul,10,3,"div",18),t.YNc(15,gl,42,10,"div",18),t.qZA(),t.YNc(16,fl,5,2,"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 xl(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 Cl(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,ol,5,3,"ng-container",2),t.qZA(),t.TgZ(3,"content"),t.YNc(4,hl,17,7,"div",3),t.YNc(5,xl,2,2,"div",3),t.qZA()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",!e.isComplete),t.xp6(2),t.Q6J("ngIf",!e.isComplete),t.xp6(1),t.Q6J("ngIf",e.isComplete)}}const Zl=[{path:"Archive/Transfer_Order",component:Bt},{path:"Archive/Transfer_Order/Info",component:hi},{path:"Archive/Transfer_Order/Form",component:Wa},{path:"Archive/Transfer_Order/Receive",component:nr},{path:"Archive/Outbound_Logistics",component:pe},{path:"Archive/Outbound_Logistics/Info",component:We},{path:"Archive/Outbound_Logistics/Form",component:$r},{path:"Archive/Inbound_Logistics",component:be},{path:"Archive/Inbound_Logistics/Info",component:Ni},{path:"Archive/Inbound_Logistics/Form",component:(()=>{class n extends W.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,_.gT.IsEmpty(this.param.POID)&&_.gT.IsEmpty(this.param.ID)?this.isEdit=!1:_.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){_.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,_.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(),_.gT.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.PO.EntityID),this.form.Header.Note=e.PO.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(_.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);_.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(zr,{data:{title:"Import Products"}}).afterClosed().pipe((0,F.h)(e=>_.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(m.O),t.Y36(u.gz),t.Y36(pt),t.Y36(St),t.Y36(Z.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,"cartItems","eventImport"],[3,"form"],["state","Inbound",3,"afterSubmitData","items","undo","newForm"]],template:function(e,o){1&e&&t.YNc(0,Cl,6,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.storage)},dependencies:[c.O5,u.rH,d.Fj,d.JJ,d.On,C.p,b.QB,L.J,g.w9,g.ir,g.Cm,G.A9,G.Yi,T.gM,Nt,wt,Ut,c.uU,U.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})()},{path:"Report/Outbound/Product",component:sn},{path:"Report/Outbound/Detail",component:Tn},{path:"Report/Inbound/Product",component:Nn},{path:"Report/Inbound/Detail",component:Kn},{path:"Report/Transfer/Product",component:Xn},{path:"Report/Transfer/Transfer",component:go},{path:"Setup/Courier",component:Li},{path:"Setup/Courier/Form",component:Yi},{path:"",redirectTo:"Archive/Transfer_Order",pathMatch:"full"}];let vl=(()=>{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:[u.Bz.forChild(Zl),u.Bz]})),n})();var Tl=s(7155),bl=s(99602),yl=s(3238),Dl=s(71948),Il=s(284),Ol=s(88441),Ml=s(65131),Al=s(3848);let ql=(()=>{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.ez,w.d]})),n})(),Sl=(()=>{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.ez,w.d,vl,d.u5,d.UX,U.dr,Tl.p0,bl.FA,yl.XK,Dl.Fk,Il.c,C.R,b.ZU,at.K,Z.Is,Ol.S,L.Q,y.T,Ml.X,At.D,g.A0,nt._t,H.Tx,yt.U,bt.b,Tt.G,Mt.E,Al.Nh,dt.O,G.vV,T.AV,ql]})),n})()},88651:(Y,J,s)=>{s.d(J,{U:()=>M});var r=s(81180),c=s(24351),u=s(22863);class M extends u.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(m,O,x){super(m),(0,r.Z)(this,"formDataAPI",void 0),(0,r.Z)(this,"route",void 0),(0,r.Z)(this,"data",{}),this.formDataAPI=O,this.route=x;let I=this.route.snapshot.queryParams;this.menuData$.pipe((0,c.b)(()=>this.httpService.post(`/api/${this.formDataAPI}`,JSON.stringify(I)))).subscribe(d=>{this.data=d,this.postBindForm(d)})}postBindForm(m){}onSubmit(m,O=!1){this.preSubmitForm(),this.httpService.post(`/api/${m}`,JSON.stringify(this.formData)).subscribe({next:x=>{this.onSubmitSuccess(x)},error:x=>{this.onSubmitError(x)}})}compare(m,O,x){return(m<O?-1:1)*(x?1:-1)}preSubmitForm(){}onSubmitSuccess(m){}onSubmitError(m){}}},99036:(Y,J,s)=>{s.d(J,{A:()=>t});var r=s(81180),c=s(77579),u=s(94650),M=s(97185);let t=(()=>{class m{constructor(x){(0,r.Z)(this,"toastr",void 0),(0,r.Z)(this,"subject$",new c.x),this.toastr=x}onFileLoad(x){let d=x.target.result,C=!1,b=[],y=[],g=0;for(const T of d.split(/[\r\n]+/))if(C){let A={};for(let k=0;k<g;k++)A[y[k]]=T.split(",")[k];b.push(A)}else{for(let A=0;A<T.split(",").length;A++)g=T.split(",").length,y.push(T.split(",")[A].replace(/ /g,""));C=!0}return b.splice(-1),b}convert(x){const I=x.files,d=["csv"];if(I&&I.length){const C=x.files[0].name.split(".").pop().toLowerCase();if(d.indexOf(C)>-1){const y=I[0],g=new FileReader;return g.onload=T=>{const A=this.onFileLoad(T);this.subject$.next(A)},g.readAsText(y,"UTF-8"),this.subject$.asObservable()}this.toastr.error("Invalid File Type","Failed")}}}return(0,r.Z)(m,"\u0275fac",function(x){return new(x||m)(u.LFG(M._W))}),(0,r.Z)(m,"\u0275prov",u.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"})),m})()},94601:(Y,J,s)=>{s.d(J,{E:()=>d,h:()=>I});var r=s(81180),c=s(65938),u=s(42046),M=s(36895),t=s(63165),m=s(94650),O=s(97185),x=s(89156);let I=(()=>{class C{constructor(y,g,T,A){(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"dialogRef",void 0),(0,r.Z)(this,"toastService",void 0),(0,r.Z)(this,"httpService",void 0),(0,r.Z)(this,"modalConfig",void 0),(0,r.Z)(this,"flag",void 0),(0,r.Z)(this,"csvResult",void 0),(0,r.Z)(this,"sampleUrl","//res.cloudinary.com/pos/raw/upload/POS/CSV/ItemTransfer_Dealpos.csv"),(0,r.Z)(this,"apiUploadCsv","/API/TransferOrder/UploadCsv"),this.data=y,this.dialogRef=g,this.toastService=T,this.httpService=A,this.flag=!1,this.csvResult=[]}ngOnInit(){this.initModalConfig(),this.initUpload()}initUpload(){this.data&&(this.sampleUrl=this.data.sampleUrl,this.apiUploadCsv=this.data.API)}initModalConfig(){this.modalConfig=new u.O,this.modalConfig.title="Upload",this.modalConfig.customWidth="284px"}onSelectFile(y){const g=y.files;if(g&&g.length){var A=y.files[0].name.split(".").pop().toLowerCase();if(["csv"].indexOf(A)>-1){const Q=g[0],f=new FileReader;f.onload=q=>{this.onFileLoad(q)},f.readAsText(Q,"UTF-8")}else this.toastService.error("Invalid File Type","Failed")}}onFileLoad(y){let T=y.target.result,A=!1,k=[],Q=[],f=0;for(const h of T.split(/[\r\n]+/))if(A){let v={};for(let N=0;N<f;N++)v[Q[N]]=h.split(",")[N];k.push(v)}else{for(let v=0;v<h.split(",").length;v++)f=h.split(",").length,Q.push(h.split(",")[v].replace(/ /g,""));A=!0}let q=k.filter(h=>""!=h.Code);this.csvResult=q,this.flag=!0}onOk(){this.httpService.post(this.apiUploadCsv,JSON.stringify(this.csvResult)).subscribe(y=>{this.dialogRef.close(y)})}onClose(){this.dialogRef.close()}}return(0,r.Z)(C,"\u0275fac",function(y){return new(y||C)(m.Y36(c.WI),m.Y36(c.so),m.Y36(O._W),m.Y36(x.O))}),(0,r.Z)(C,"\u0275cmp",m.Xpm({type:C,selectors:[["POS-modal-upload"]],decls:14,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"modal-dialog"],[1,"modal-content","border-0"],[1,"noteBox",3,"href"],[1,"d-flex","justify-content-between"],["accept",".csv","id","csv","type","file","name","myfile",1,"form-control",3,"change"]],template:function(y,g){1&y&&(m.TgZ(0,"modal-material",0),m.NdJ("onOk",function(){return g.onOk()})("onCancel",function(){return g.onClose()})("onClose",function(){return g.onClose()}),m.TgZ(1,"content",1)(2,"div",2)(3,"div")(4,"a",3),m._uU(5,"Download Sample File"),m.qZA()(),m.TgZ(6,"div",4)(7,"table")(8,"tbody")(9,"tr")(10,"th"),m._uU(11," CSV: "),m.qZA(),m.TgZ(12,"td")(13,"input",5),m.NdJ("change",function(A){return g.onSelectFile(A.target)}),m.qZA()()()()()()()()()),2&y&&(m.Q6J("config",g.modalConfig),m.xp6(4),m.Q6J("href",g.sampleUrl,m.LSH))},dependencies:[t.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}"]})),C})(),d=(()=>{class C{}return(0,r.Z)(C,"\u0275fac",function(y){return new(y||C)}),(0,r.Z)(C,"\u0275mod",m.oAB({type:C})),(0,r.Z)(C,"\u0275inj",m.cJS({imports:[M.ez,t.d]})),C})()},31906:(Y,J,s)=>{s.d(J,{U:()=>r});var r=(()=>{return(c=r||(r={}))[c.BuyPage=1]="BuyPage",c[c.AdjustmentPage=2]="AdjustmentPage",c[c.DeliveryPage=3]="DeliveryPage",c[c.EstimatePage=4]="EstimatePage",r;var c})()},42046:(Y,J,s)=>{s.d(J,{O:()=>u});var r=s(81180),c=s(96700);class u{constructor(){(0,r.Z)(this,"title","New Modal"),(0,r.Z)(this,"okText","Ok (F2)"),(0,r.Z)(this,"cancelText","Cancel"),(0,r.Z)(this,"hideFooter",!1),(0,r.Z)(this,"hideCancel",!1),(0,r.Z)(this,"hideOk",!1),(0,r.Z)(this,"hideClose",!1),(0,r.Z)(this,"eMoney",!1),(0,r.Z)(this,"headerType",c.n.Success),(0,r.Z)(this,"validated",!0),(0,r.Z)(this,"customWidth","initial"),(0,r.Z)(this,"bodyScrollable",!1),(0,r.Z)(this,"hideScrollbar",!1),(0,r.Z)(this,"disableKeyup",!1),(0,r.Z)(this,"noPadding",!1)}}},63165:(Y,J,s)=>{s.d(J,{M:()=>k,d:()=>Q});var r=s(81180),c=s(94650),u=s(36895),M=s(42046),t=s(96700);function m(f,q){if(1&f){const h=c.EpF();c.TgZ(0,"div",8),c.NdJ("click",function(){c.CHM(h);const N=c.oxw();return c.KtG(N.onBack.emit())}),c.TgZ(1,"a",9),c._UZ(2,"i",10),c.qZA()()}}function O(f,q){if(1&f){const h=c.EpF();c.TgZ(0,"div")(1,"a",11),c.NdJ("click",function(){c.CHM(h);const N=c.oxw();return c.KtG(N.onClose.emit())}),c._UZ(2,"i",12),c.qZA()()}}function x(f,q){if(1&f){const h=c.EpF();c.TgZ(0,"a",16),c.NdJ("click",function(){c.CHM(h);const N=c.oxw(2);return c.KtG(N.onCancel.emit())}),c._uU(1),c.qZA()}if(2&f){const h=c.oxw(2);c.xp6(1),c.hij(" ",h.config.cancelText?h.config.cancelText:"Cancel","")}}function I(f,q){if(1&f){const h=c.EpF();c.TgZ(0,"button",17),c.NdJ("click",function(){c.CHM(h);const N=c.oxw(2);return c.KtG(N.onOk.emit())})("keyup.F2",function(){c.CHM(h);const N=c.oxw(2);return c.KtG(N.onOk.emit())}),c.qZA()}if(2&f){const h=c.oxw(2);c.Q6J("disabled",!h.config.validated||!h.dynamicValidated)("innerHTML",h.config.okText?h.config.okText:"Ok (F2)",c.oJD)}}function d(f,q){if(1&f&&(c.TgZ(0,"mat-dialog-actions",13),c.Hsn(1,2),c.YNc(2,x,2,1,"a",14),c.YNc(3,I,1,2,"button",15),c.qZA()),2&f){const h=c.oxw();c.xp6(2),c.Q6J("ngIf",!h.config.hideCancel),c.xp6(1),c.Q6J("ngIf",!h.config.hideOk)}}const C=[[["header"]],[["content"]],[["footer"]]],b=function(f,q){return{bodyScrollable:f,hideScrollbar:q}},y=function(f,q,h,v){return{"bg-success":f,"bg-warning":q,"bg-info":h,"bg-danger":v}},g=function(f){return{"mx-auto":f}},T=function(f,q){return{"show-footer":f,"p-0":q}},A=["header","content","footer"];let k=(()=>{class f{constructor(){(0,r.Z)(this,"config",void 0),(0,r.Z)(this,"dynamicValidated",!0),(0,r.Z)(this,"onOk",new c.vpe),(0,r.Z)(this,"onCancel",new c.vpe),(0,r.Z)(this,"onClose",new c.vpe),(0,r.Z)(this,"onBack",new c.vpe),(0,r.Z)(this,"headerType",t.n)}ngOnInit(){null==this.config&&(this.config=new M.O)}onKeyup(h){this.config.disableKeyup||("F2"==h.code&&this.onOk.emit("F2"),("Enter"==h.code||"NumpadEnter"==h.code)&&this.onOk.emit("Enter"))}}return(0,r.Z)(f,"\u0275fac",function(h){return new(h||f)}),(0,r.Z)(f,"\u0275cmp",c.Xpm({type:f,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:A,decls:11,vars:23,consts:[[1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"ngClass","keyup"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none",3,"ngClass"],[1,"fw-normal"],[4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],["class","w-100 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3",3,"click",4,"ngIf"],["class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3","data-cy","ConfirmOk",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","ConfirmOk",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML","click","keyup.F2"]],template:function(h,v){1&h&&(c.F$t(C),c.TgZ(0,"div",0),c.NdJ("keyup",function(it){return v.onKeyup(it)}),c.TgZ(1,"div",1),c.YNc(2,m,3,0,"div",2),c.TgZ(3,"div",3)(4,"h4",4),c._uU(5),c.qZA(),c.Hsn(6),c.qZA(),c.YNc(7,O,3,0,"div",5),c.qZA(),c.TgZ(8,"mat-dialog-content",6),c.Hsn(9,1),c.qZA(),c.YNc(10,d,4,2,"mat-dialog-actions",7),c.qZA()),2&h&&(c.Udp("width",v.config.customWidth),c.Q6J("ngClass",c.WLB(10,b,v.config.bodyScrollable,v.config.hideScrollbar)),c.xp6(1),c.Q6J("ngClass",c.l5B(13,y,v.headerType.Success==v.config.headerType,v.headerType.Warning==v.config.headerType,v.headerType.Info==v.config.headerType,v.headerType.Error==v.config.headerType)),c.xp6(1),c.Q6J("ngIf",v.config.eMoney),c.xp6(1),c.Q6J("ngClass",c.VKq(18,g,v.config.eMoney)),c.xp6(2),c.Oqu(v.config.title),c.xp6(2),c.Q6J("ngIf",!v.config.hideClose),c.xp6(1),c.Q6J("ngClass",c.WLB(20,T,!v.config.hideFooter,v.config.noPadding)),c.xp6(2),c.Q6J("ngIf",!v.config.hideFooter))},dependencies:[u.mk,u.O5],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:100%!important}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px!important;overflow-y:auto}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:400px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})),f})(),Q=(()=>{class f{}return(0,r.Z)(f,"\u0275fac",function(h){return new(h||f)}),(0,r.Z)(f,"\u0275mod",c.oAB({type:f})),(0,r.Z)(f,"\u0275inj",c.cJS({imports:[u.ez]})),f})()}}]);