dealpos 11.9.0 → 11.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/POS/1078.8bfc110e38c131cd.js +1 -0
  2. package/POS/15.5f3e1e9a200ecd2a.js +1 -0
  3. package/POS/1729.115843650c06c12f.js +1 -0
  4. package/POS/{1930.bb031f48d8fe64c8.js → 1930.e9b016102ad85c78.js} +1 -1
  5. package/POS/{2141.03507a7f6beea26a.js → 2141.e80daa21c35ec72f.js} +1 -1
  6. package/POS/2489.38c045d44ef44a61.js +1 -0
  7. package/POS/2545.349f928367c400ee.js +1 -0
  8. package/POS/2668.d24ddcc06b764817.js +1 -0
  9. package/POS/3208.7b3c9a94ef2cc2ab.js +1 -0
  10. package/POS/{3353.200953732642656b.js → 3353.1ad45968333a2f02.js} +1 -1
  11. package/POS/343.f482b8b6c7e819f7.js +1 -0
  12. package/POS/3515.dac84326528348c8.js +1 -0
  13. package/POS/3632.232fbc360c8bbf65.js +1 -0
  14. package/POS/{4020.d9617c2c6f7cdd9a.js → 4020.bfd8a691f4632812.js} +1 -1
  15. package/POS/4177.66dde2ae420ee384.js +1 -0
  16. package/POS/4537.90ab8c7e3d63d725.js +1 -0
  17. package/POS/5418.508566538fe47f17.js +1 -0
  18. package/POS/5533.ed86d7ff065dbc45.js +1 -0
  19. package/POS/5563.ce8c5faf0d186acb.js +1 -0
  20. package/POS/{6268.247e25590ee250d7.js → 6268.8034431764728bfb.js} +1 -1
  21. package/POS/{7998.5d0e70bdd321ae03.js → 7998.8474b87eb6571409.js} +1 -1
  22. package/POS/8006.f6b9b6d2913d524f.js +1 -0
  23. package/POS/8105.286308f6593d3936.js +1 -0
  24. package/POS/8131.9518daf1e4493281.js +1 -0
  25. package/POS/9207.e4622a91f6059e43.js +1 -0
  26. package/POS/9564.9089fdc7e97ba170.js +1 -0
  27. package/POS/9612.1e76291b429ded57.js +1 -0
  28. package/POS/9826.e79f9ff08369c36c.js +1 -0
  29. package/POS/9844.c7d6bf51b4fecc1a.js +1 -0
  30. package/POS/common.a52d2783bfcac435.js +1 -0
  31. package/POS/index.html +2 -2
  32. package/POS/{main.3a1387cba0ccf083.js → main.c923aa115ae90442.js} +1 -1
  33. package/POS/runtime.9cce8702ed69b427.js +1 -0
  34. package/package.json +1 -1
  35. package/POS/15.67f5a64a48559b82.js +0 -1
  36. package/POS/1729.a24fece3a6093031.js +0 -1
  37. package/POS/1969.af5d7f10c4374b23.js +0 -1
  38. package/POS/2489.38e2063136aa88c2.js +0 -1
  39. package/POS/2545.7f6dd61f3c3e9d86.js +0 -1
  40. package/POS/3208.a56d9977533f0af2.js +0 -1
  41. package/POS/3515.c73ff6ef5ec9b77e.js +0 -1
  42. package/POS/3632.5438ea42a34320b8.js +0 -1
  43. package/POS/4177.882c43655e83e90f.js +0 -1
  44. package/POS/4537.a9b79438f21b32e0.js +0 -1
  45. package/POS/5418.513c3e7df4407d68.js +0 -1
  46. package/POS/5533.40980912b87d5ce5.js +0 -1
  47. package/POS/7266.9ce3015bc3d43a64.js +0 -1
  48. package/POS/8006.02c9f93ad9584ffd.js +0 -1
  49. package/POS/8105.5d3e09c03144b231.js +0 -1
  50. package/POS/8131.e944ac838fc91d56.js +0 -1
  51. package/POS/8289.7ca0379d116e5c59.js +0 -1
  52. package/POS/9207.f56fb5b179f0b5a9.js +0 -1
  53. package/POS/9564.7842ecfe7c7931df.js +0 -1
  54. package/POS/9612.81b6f228d928c6a5.js +0 -1
  55. package/POS/9826.045231aaf903e274.js +0 -1
  56. package/POS/9844.dccb982ca71c012e.js +0 -1
  57. package/POS/common.141c8cc2b24f2c92.js +0 -1
  58. package/POS/runtime.2deb4a2a0270fd0d.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1078],{22863:(st,N,d)=>{d.d(N,{M:()=>u});var p=d(11481),c=d(18505),g=d(34782);class u{constructor(m){this.httpService=m,this.menuData={T:null,N:null,H:null},this.menuData$=m.get("/api/Menu/"+this.GetRequestPayload()).pipe((0,c.b)(b=>{this.menuData=b,new p.Dx(document).setTitle(this.menuData.T)}),(0,g.d)())}GetRequestPayload(){let m=window.location.href;return m=m.split("menu/")[1],m=m.split(";")[0],m}}},47266:(st,N,d)=>{d.r(N),d.d(N,{ShiftModule:()=>$i});var p=d(24006),c=d(36895),g=d(36806),u=d(65412),x=d(96700),m=d(67327),b=d(42046),t=d(94650),A=d(97185),v=d(63165),T=d(83902);function lt(n,o){1&n&&(t.TgZ(0,"span",10),t._uU(1,"Mandatory"),t.qZA())}let ct=(()=>{class n{constructor(e,i,a){this.dialogRef=e,this.data=i,this.toastr=a,this.modalConfig=new b.O,this.Form={},this.VistorMandatory=!1,this.Form={},this.modalConfig.title="Closing Note",this.modalConfig.customWidth="350px",this.Form.Note=""}onOk(){this.data.VisitorMandatory&&m.gT.IsEmpty(this.Form.Visitors)?this.toastr.error("Visitor is mandatory",x.n.Error):this.dialogRef.close({Data:this.Form})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.so),t.Y36(u.WI),t.Y36(A._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["modal-close"]],decls:16,vars:5,consts:[[3,"config","onOk","onCancel","onClose"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["id","desc","placeholder","Note","rows","6",1,"form-control","w-100",3,"ngModel","ngModelChange"],["for","desc"],["type","text","autoNum","","name","visitor",1,"form-control",3,"required","ngModel","ngModelChange"],["visitor","ngModel"],["for","visitor"],["class","control-label","style","color:red;",4,"ngIf"],[1,"control-label",2,"color","red"]],template:function(e,i){if(1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"textarea",4),t.NdJ("ngModelChange",function(r){return i.Form.Note=r}),t.qZA(),t.TgZ(6,"label",5),t._uU(7,"Note"),t.qZA()()()(),t.TgZ(8,"div",1)(9,"div",2)(10,"div",3)(11,"input",6,7),t.NdJ("ngModelChange",function(r){return i.Form.Visitors=r}),t.qZA(),t.TgZ(13,"label",8),t._uU(14,"Visitors"),t.qZA(),t.YNc(15,lt,2,0,"span",9),t.qZA()()()()()),2&e){const a=t.MAs(12);t.Q6J("config",i.modalConfig),t.xp6(5),t.Q6J("ngModel",i.Form.Note),t.xp6(6),t.Q6J("required",i.data.VisitorMandatory)("ngModel",i.Form.Visitors),t.xp6(4),t.Q6J("ngIf",a.invalid&&(a.dirty||a.touched))}},dependencies:[c.O5,p.Fj,p.JJ,p.Q7,p.On,v.M,T.b]}),n})();var S=d(88796);const K=function(n){return{selected:n}};let B=(()=>{class n{constructor(e,i,a){this.dialogRef=e,this.data=i,this.toastr=a,this.LabelExpense=[],this.PaymentList=[],this.expense={},this.config=new b.O,this.Form=this.data.Form,this.LabelExpense=i.LabelExpense,this.PaymentList=i.PaymentList,this.expenseList=this.data.expenseList}ngOnInit(){this.config.title="Expense Detail"}onOk(){null==this.Form.ExpenseID&&(this.Form=null),null==this.Form.Amount?(this.toastr.error("Please enter a value on amount field",x.n.Error),this.Form=null):null==this.Form.PaymentID&&(this.toastr.error("Please enter a value on payment method field",x.n.Error),this.Form=null),this.dialogRef.close({Data:this.Form})}IsNotEmpty(e){return null!=e&&null!=e&&""!=e}updateExpense(e){this.expense=e}chaneExpense(){let e=this.LabelExpense.filter(i=>i.ID==this.Form.ExpenseID);Object.assign(this.Form,e[0])}chanePayment(){let e=this.PaymentList.find(i=>i.ID==this.Form.PaymentID);this.Form.PaymentName=e.Name}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.so),t.Y36(u.WI),t.Y36(A._W))},n.\u0275cmp=t.Xpm({type:n,selectors:[["modal-expense"]],decls:26,vars:14,consts:[[3,"config","onOk","onClose","onCancel"],[2,"width","350px"],[1,"row",3,"hidden"],[1,"col-sm-6"],[1,"form-floating-outline",3,"ngClass"],["id","label","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"ngModel","items","change","ngModelChange"],["for","label"],["id","payment","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"ngModel","items","change","ngModelChange"],["for","payment"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","name","Amount","autoNum","","autofocus","",1,"form-control",3,"ngModel","ngModelChange"],["for","amount"],["rows","5","id","desc","placeholder","Note",1,"form-control","w-100",3,"ngModel","ngModelChange"],["for","desc"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onClose",function(){return i.dialogRef.close()})("onCancel",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"ng-select",5),t.NdJ("change",function(){return i.chaneExpense()})("ngModelChange",function(r){return i.Form.ExpenseID=r}),t.qZA(),t.TgZ(7,"label",6),t._uU(8,"Select Label"),t.qZA()()(),t.TgZ(9,"div",3)(10,"div",4)(11,"ng-select",7),t.NdJ("change",function(){return i.chanePayment()})("ngModelChange",function(r){return i.Form.PaymentID=r}),t.qZA(),t.TgZ(12,"label",8),t._uU(13,"Payment Method"),t.qZA()()()(),t.TgZ(14,"div",9)(15,"div",10)(16,"div",11)(17,"input",12),t.NdJ("ngModelChange",function(r){return i.Form.Amount=r}),t.qZA(),t.TgZ(18,"label",13),t._uU(19,"Amount"),t.qZA()()()(),t.TgZ(20,"div",9)(21,"div",10)(22,"div",11)(23,"textarea",14),t.NdJ("ngModelChange",function(r){return i.Form.Note=r}),t.qZA(),t.TgZ(24,"label",15),t._uU(25,"Note"),t.qZA()()()()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(3),t.Q6J("hidden",i.LabelExpense.length<0),t.xp6(2),t.Q6J("ngClass",t.VKq(10,K,i.IsNotEmpty(i.Form.ExpenseID))),t.xp6(1),t.Q6J("ngModel",i.Form.ExpenseID)("items",i.LabelExpense),t.xp6(4),t.Q6J("ngClass",t.VKq(12,K,i.IsNotEmpty(i.Form.PaymentID))),t.xp6(1),t.Q6J("ngModel",i.Form.PaymentID)("items",i.PaymentList),t.xp6(6),t.Q6J("ngModel",i.Form.Amount),t.xp6(6),t.Q6J("ngModel",i.Form.Note))},dependencies:[c.mk,p.Fj,p.JJ,p.On,v.M,S.w9,T.b],encapsulation:2}),n})();class G{constructor(){}}var O=d(39300),pt=d(88651),C=d(89156),V=d(13337),q=d(30273),h=d(93669);const mt=function(){return["/print/RegisterClosure"]},ut=function(n){return{id:n}};function gt(n,o){if(1&n&&(t.TgZ(0,"a",7),t._uU(1," Print "),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,mt))("queryParams",t.VKq(3,ut,e.idModel))}}function ft(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"a",8),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.showCloseModal())}),t._uU(1," Close Register "),t.qZA()}}const ht=function(){return["/menu/Setup/Configuration/Module"]};function xt(n,o){1&n&&(t.TgZ(0,"h4"),t._uU(1," Register session config is inactive, click "),t.TgZ(2,"a",9),t._uU(3,"here"),t.qZA(),t._uU(4," to activate (Go to Shift Tab, look for active session) "),t.qZA()),2&n&&(t.xp6(2),t.Q6J("routerLink",t.DdM(1,ht)))}function Zt(n,o){if(1&n&&(t.TgZ(0,"div",13),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" ",e.MessageInfo," ")}}function vt(n,o){if(1&n&&(t.TgZ(0,"div",22)(1,"div",16)(2,"div",17)(3,"h2",18),t._UZ(4,"i",26),t._uU(5,"Invoice / Void"),t.qZA()(),t.TgZ(6,"div",20)(7,"div",24),t._uU(8),t.ALo(9,"number"),t.qZA()()()()),2&n){const e=t.oxw(4);t.xp6(8),t.AsE("",t.lcZ(9,2,e.data.Invoices.length)," / ",e.data.VoidInvoice.length,"")}}function Tt(n,o){if(1&n&&(t.TgZ(0,"div",22)(1,"div",16)(2,"div",27)(3,"h2",18),t._UZ(4,"i",28),t._uU(5,"Sales + Tax"),t.qZA()(),t.TgZ(6,"div",20)(7,"div",24),t._uU(8),t.ALo(9,"number"),t.qZA()()()()),2&n){const e=t.oxw(4);t.xp6(8),t.Oqu(t.lcZ(9,1,e.data.Session.SalesNSurcharge))}}function bt(n,o){if(1&n&&(t.TgZ(0,"div",14)(1,"div",15)(2,"div",16)(3,"div",17)(4,"h2",18),t._UZ(5,"i",19),t._uU(6),t.qZA()(),t.TgZ(7,"div",20)(8,"div",21),t._uU(9),t.qZA()()()(),t.TgZ(10,"div",22)(11,"div",16)(12,"div",17)(13,"h2",18),t._UZ(14,"i",23),t._uU(15,"Opening"),t.qZA()(),t.TgZ(16,"div",20)(17,"div",24),t._uU(18),t.qZA()()()(),t.TgZ(19,"div",22)(20,"div",16)(21,"div",17)(22,"h2",18),t._UZ(23,"i",23),t._uU(24,"Closing"),t.qZA()(),t.TgZ(25,"div",20)(26,"div",24),t._uU(27),t.qZA()()()(),t.YNc(28,vt,10,4,"div",25),t.YNc(29,Tt,10,3,"div",25),t.qZA()),2&n){const e=t.oxw(3);t.xp6(6),t.hij(" ",e.data.OutletName," / Cashier"),t.xp6(3),t.hij(" ",e.data.LoginID," "),t.xp6(9),t.Oqu(e.data.RegisterStartWithTimezone),t.xp6(9),t.Oqu(e.data.RegisterEndWithTimezone),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible)}}function At(n,o){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Received"),t.qZA())}function Ct(n,o){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Expected"),t.qZA())}function qt(n,o){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Differences"),t.qZA())}function yt(n,o){if(1&n&&(t.TgZ(0,"td",48),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.Received)," ")}}function St(n,o){if(1&n&&(t.TgZ(0,"td",48),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.Expected)," ")}}const W=function(n,o){return{"text-success":n,"text-danger":o}};function It(n,o){if(1&n&&(t.TgZ(0,"td",49),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.WLB(5,W,e.ShortOver>0,e.ShortOver<0)),t.xp6(1),t.hij(" ",t.lcZ(2,3,e.ShortOver)," ")}}function Mt(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"input",43),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).$implicit;return t.KtG(_.Start=a)})("keyup",function(){const r=t.CHM(e).$implicit,_=t.oxw(5);return t.KtG(_.myFunct(r))}),t.qZA()(),t.YNc(5,yt,3,3,"td",44),t.YNc(6,St,3,3,"td",44),t.TgZ(7,"td")(8,"input",45),t.NdJ("keyup",function(){const r=t.CHM(e).$implicit,_=t.oxw(5);return t.KtG(_.ChangeDifferences(r,!0))})("ngModelChange",function(a){const _=t.CHM(e).$implicit;return t.KtG(_.Amount=a)}),t.qZA()(),t.YNc(9,It,3,8,"td",46),t.TgZ(10,"td")(11,"input",47),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).$implicit;return t.KtG(_.Note=a)}),t.qZA()()()}if(2&n){const e=o.$implicit,i=t.oxw(5);t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("ngModel",e.Start)("readonly",!i.data.ExpectedPaymentVisible),t.xp6(1),t.Q6J("ngIf",i.data.PaymentReceiveVisible),t.xp6(1),t.Q6J("ngIf",i.data.ExpectedPaymentVisible),t.xp6(2),t.Q6J("ngModel",e.Amount),t.xp6(1),t.Q6J("ngIf",i.data.ExpectedPaymentVisible),t.xp6(2),t.Q6J("ngModel",e.Note)}}function Ut(n,o){if(1&n&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(6);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Payments,"Received"))," ")}}function Jt(n,o){if(1&n&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.qZA()),2&n){const e=t.oxw(6);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,e.data.Payments,"Expected"))," ")}}function Dt(n,o){if(1&n&&(t.TgZ(0,"td",52),t.ALo(1,"sum"),t.ALo(2,"sum"),t._uU(3),t.ALo(4,"number"),t.ALo(5,"sum"),t.qZA()),2&n){const e=t.oxw(6);t.Tol(t.WLB(14,W,t.xi3(1,3,e.data.Payments,"ShortOver")>0,t.xi3(2,6,e.data.Payments,"ShortOver")<0)),t.xp6(3),t.hij(" ",t.lcZ(4,9,t.xi3(5,11,e.data.Payments,"ShortOver"))," ")}}function Nt(n,o){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr")(2,"th"),t._uU(3,"Total:"),t.qZA(),t.TgZ(4,"td",50),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.qZA(),t.YNc(8,Ut,4,6,"td",51),t.YNc(9,Jt,4,6,"td",51),t.TgZ(10,"td",52),t._uU(11),t.ALo(12,"number"),t.ALo(13,"sum"),t.qZA(),t.YNc(14,Dt,6,17,"td",53),t.qZA()()),2&n){const e=t.oxw(5);t.xp6(5),t.hij(" ",t.lcZ(6,5,t.xi3(7,7,e.data.Payments,"Start"))," "),t.xp6(3),t.Q6J("ngIf",e.data.PaymentReceiveVisible),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(2),t.hij(" ",t.lcZ(12,10,t.xi3(13,12,e.data.Payments,"Amount"))," "),t.xp6(3),t.Q6J("ngIf",e.data.ExpectedPaymentVisible)}}function Ot(n,o){if(1&n&&(t.TgZ(0,"table",34)(1,"thead",35)(2,"tr")(3,"th",36),t._uU(4,"Payment"),t.qZA(),t.TgZ(5,"th",37),t._uU(6,"Start"),t.qZA(),t.YNc(7,At,2,0,"th",38),t.YNc(8,Ct,2,0,"th",38),t.TgZ(9,"th",37),t._uU(10,"Counted "),t.qZA(),t.YNc(11,qt,2,0,"th",39),t.TgZ(12,"th",40),t._uU(13,"Note"),t.qZA()()(),t.TgZ(14,"tbody"),t.YNc(15,Mt,12,8,"tr",41),t.qZA(),t.YNc(16,Nt,15,15,"tfoot",6),t.qZA()),2&n){const e=t.oxw(4);t.xp6(7),t.Q6J("ngIf",e.data.PaymentReceiveVisible),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(3),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(4),t.Q6J("ngForOf",e.data.Payments),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible)}}function Pt(n,o){if(1&n&&(t.TgZ(0,"div",14)(1,"div",29)(2,"div",30)(3,"div",17)(4,"h2"),t._uU(5,"Total Payments"),t.qZA()(),t.TgZ(6,"div",20)(7,"div",31)(8,"div",32),t.YNc(9,Ot,17,5,"table",33),t.qZA()()()()()()),2&n){const e=t.oxw(3);t.xp6(9),t.Q6J("ngIf",e.data.Payments.length>0)}}const P=function(n){return{active:n}};function Lt(n,o){if(1&n&&(t.TgZ(0,"li",87)(1,"a",88),t._uU(2,"Invoice"),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(1),t.Tol(t.VKq(2,P,e.data.InvoiceVisible))}}function Ft(n,o){if(1&n&&(t.TgZ(0,"li",87)(1,"a",89),t._uU(2,"Voided Invoice"),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(1),t.Tol(t.VKq(2,P,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible))}}function wt(n,o){if(1&n&&(t.TgZ(0,"li",87)(1,"a",90),t._uU(2,"Payment"),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(1),t.Tol(t.VKq(2,P,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible))}}function Qt(n,o){1&n&&(t.TgZ(0,"li",87)(1,"a",91),t._uU(2,"Expense"),t.qZA()())}function Et(n,o){if(1&n&&(t.TgZ(0,"li",87)(1,"a",92),t._uU(2,"Bank Note"),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(1),t.Tol(t.VKq(2,P,!e.data.InvoiceVisible&&!e.data.PaymentReceiveVisible))}}function Vt(n,o){1&n&&(t.TgZ(0,"li",87)(1,"a",93),t._uU(2,"Sales Return"),t.qZA()())}function Rt(n,o){1&n&&(t.TgZ(0,"th",103),t._uU(1,"Date"),t.qZA())}function kt(n,o){1&n&&(t.TgZ(0,"th",103),t._uU(1,"Date"),t.qZA())}function Yt(n,o){if(1&n&&(t._UZ(0,"td",102),t.ALo(1,"date")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.xi3(1,1,e.Created,"dd MMM yyyy"),t.oJD)}}function Ht(n,o){if(1&n&&(t._UZ(0,"td",102),t.ALo(1,"date")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.xi3(1,1,e.Date,"dd MMM yyyy"),t.oJD)}}const L=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},I=function(n){return{ID:n}},$t=function(n,o,e){return{"text-success":n,"text-warning":o,"text-danger":e}};function jt(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",84),t.TgZ(2,"td"),t._UZ(3,"a",104),t.qZA(),t.YNc(4,Yt,2,4,"td",105),t.YNc(5,Ht,2,4,"td",105),t._UZ(6,"td",102),t.ALo(7,"date"),t._UZ(8,"td",84),t.ALo(9,"number"),t._UZ(10,"td",84),t.ALo(11,"number"),t.qZA()),2&n){const e=o.$implicit,i=o.index,a=t.oxw(5);t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(18,L))("queryParams",t.VKq(19,I,e.ID))("innerHTML",e.Number,t.oJD),t.xp6(1),t.Q6J("ngIf",0==a.data.Session.Type),t.xp6(1),t.Q6J("ngIf",0!=a.data.Session.Type),t.xp6(1),t.Q6J("innerHTML",t.xi3(7,11,e.Created,"HH:mm"),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.lcZ(9,14,e.Quantity),t.oJD),t.xp6(2),t.Tol(t.kEZ(21,$t,3==e.PaymentStateID,2==e.PaymentStateID,1==e.PaymentStateID)),t.Q6J("innerHTML",t.lcZ(11,16,e.SalesNTax),t.oJD)}}function Kt(n,o){if(1&n&&(t.TgZ(0,"div",22)(1,"div",94)(2,"div",20)(3,"table",34)(4,"thead",69)(5,"tr")(6,"th",95),t._uU(7,"No "),t.qZA(),t.TgZ(8,"th",96),t._uU(9,"Number"),t.qZA(),t.YNc(10,Rt,2,0,"th",97),t.YNc(11,kt,2,0,"th",97),t.TgZ(12,"th",98),t._uU(13,"Time"),t.qZA(),t.TgZ(14,"th",99),t._uU(15,"Qty "),t.qZA(),t.TgZ(16,"th",100),t._uU(17," Nett"),t.qZA()()(),t.TgZ(18,"tbody"),t.YNc(19,jt,12,25,"tr",41),t.qZA(),t.TgZ(20,"tfoot")(21,"tr"),t._UZ(22,"td",101),t.TgZ(23,"td",48),t._UZ(24,"b",102),t.ALo(25,"number"),t.ALo(26,"sum"),t.qZA(),t.TgZ(27,"td",48),t._UZ(28,"b",102),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA()()()()()()()),2&n){const e=t.oxw(4);t.xp6(10),t.Q6J("ngIf",0==e.data.Session.Type),t.xp6(1),t.Q6J("ngIf",0!=e.data.Session.Type),t.xp6(8),t.Q6J("ngForOf",e.data.Invoices),t.xp6(5),t.Q6J("innerHTML",t.lcZ(25,5,t.xi3(26,7,e.data.Invoices,"Quantity")),t.oJD),t.xp6(4),t.Q6J("innerHTML",t.lcZ(29,10,t.xi3(30,12,e.data.Invoices,"SalesNTax")),t.oJD)}}function Bt(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",102),t.TgZ(2,"td")(3,"a",107),t._uU(4),t.qZA()(),t.TgZ(5,"td"),t._uU(6),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,"IsMinDate"),t.qZA(),t.TgZ(13,"td",48),t._uU(14),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(14,L))("queryParams",t.VKq(15,I,e.ID)),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(2),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(t.xi3(9,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(12,11,e.Due,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.Payment)}}function Gt(n,o){if(1&n&&(t.TgZ(0,"div",106)(1,"div",66)(2,"div",20)(3,"table",34)(4,"thead",69)(5,"tr")(6,"th",81),t._uU(7,"No"),t.qZA(),t.TgZ(8,"th",72),t._uU(9,"Number"),t.qZA(),t.TgZ(10,"th",72),t._uU(11,"Customer"),t.qZA(),t.TgZ(12,"th",72),t._uU(13,"Date"),t.qZA(),t.TgZ(14,"th",72),t._uU(15,"Due"),t.qZA(),t.TgZ(16,"th",72),t._uU(17,"Payment"),t.qZA()()(),t.TgZ(18,"tbody"),t.YNc(19,Bt,15,17,"tr",41),t.qZA()()()()()),2&n){const e=t.oxw(4);t.Q6J("hidden",!(e.data.VoidInvoice.length>0)),t.xp6(19),t.Q6J("ngForOf",e.data.VoidInvoice)}}function Wt(n,o){1&n&&t._UZ(0,"th",113),2&n&&t.Q6J("innerHTML",o.$implicit.Name,t.oJD)}function zt(n,o){if(1&n&&(t.TgZ(0,"td",48),t._uU(1),t.ALo(2,"number"),t.ALo(3,"FilterGetAmount"),t.qZA()),2&n){const e=o.$implicit,i=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,t.gM2(3,3,i.Amounts,"Key",e.ID,"Value"))," ")}}const Xt=function(n){return[n]};function te(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",84),t.TgZ(2,"td"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.ALo(7,"date"),t.qZA(),t.TgZ(8,"td")(9,"a",114),t._uU(10),t.qZA()(),t._UZ(11,"td",102),t.YNc(12,zt,4,8,"td",112),t.qZA()),2&n){const e=o.$implicit,i=o.index,a=t.oxw(5);t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Oqu(t.xi3(4,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(7,11,e.PostedDate,"dd MMM yyyy")),t.xp6(3),t.Q6J("routerLink",t.VKq(14,Xt,1==e.TypeID?"/menu/Orders/Orders/Customer_Invoice/Info":"/menu/Debt/Advance/AR_Collection"))("queryParams",t.VKq(16,I,e.InvoiceID)),t.xp6(1),t.Oqu(e.Number),t.xp6(1),t.Q6J("innerHTML",e.CustomerName,t.oJD),t.xp6(1),t.Q6J("ngForOf",a.data.PaymentMethods)}}function ee(n,o){if(1&n&&(t.TgZ(0,"td",48),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sum"),t.ALo(4,"GetChildrenArray"),t.qZA()),2&n){const e=o.$implicit,i=t.oxw(5);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.xi3(3,3,i.filterAmount(t.xi3(4,6,i.data.PaymentReceived,"Amounts"),"Key",e.ID),"Value"))," ")}}const R=function(n,o){return{show:n,active:o}};function ne(n,o){if(1&n&&(t.TgZ(0,"div",108)(1,"div",61)(2,"div",54)(3,"div",94)(4,"div",20)(5,"div",109)(6,"table",34)(7,"thead",69)(8,"tr")(9,"th",95),t._uU(10," No"),t.qZA(),t.TgZ(11,"th",72),t._uU(12,"Payment Date"),t.qZA(),t.TgZ(13,"th",72),t._uU(14,"Posted Date"),t.qZA(),t.TgZ(15,"th",72),t._uU(16,"Number"),t.qZA(),t.TgZ(17,"th",72),t._uU(18,"Customer"),t.qZA(),t.YNc(19,Wt,1,1,"th",110),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,te,13,18,"tr",41),t.qZA(),t.TgZ(22,"tfoot")(23,"tr")(24,"td",111)(25,"b"),t._uU(26,"Total :"),t.qZA()(),t.YNc(27,ee,5,9,"td",112),t.qZA()()()()()()()()()),2&n){const e=t.oxw(4);t.Tol(t.WLB(5,R,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible)),t.xp6(19),t.Q6J("ngForOf",e.data.PaymentMethods),t.xp6(2),t.Q6J("ngForOf",e.data.PaymentReceived),t.xp6(6),t.Q6J("ngForOf",e.data.PaymentMethods)}}function ie(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"button",117),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(5);return t.KtG(a.showExpenseModal())}),t._UZ(1,"i",118),t.qZA()}}function oe(n,o){if(1&n&&(t.TgZ(0,"th",115),t.YNc(1,ie,2,0,"button",116),t.qZA()),2&n){const e=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e.data.Session&&e.data.InputMode)}}function ae(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"i",119),t.NdJ("click",function(){t.CHM(e);const a=t.oxw().index,r=t.oxw(4);return t.KtG(r.DeleteExpenses(a))}),t.qZA()()}}function re(n,o){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,ae,2,0,"td",6),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td",48),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td",48),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA()()),2&n){const e=o.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.data.InputMode),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(6,5,e.Amount)),t.xp6(3),t.Oqu(e.PaymentName),t.xp6(2),t.Oqu(e.Note)}}function _e(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",123),t.NdJ("ngModelChange",function(a){t.CHM(e);const r=t.oxw().$implicit;return t.KtG(r.Quantity=a)})("keyup",function(){t.CHM(e);const a=t.oxw().$implicit,r=t.oxw(4);return t.KtG(r.DenominationTotal(a))}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.Quantity)}}function de(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td",120),t._uU(2),t.qZA(),t.TgZ(3,"td",121),t._uU(4),t.ALo(5,"number"),t.qZA(),t.YNc(6,_e,2,1,"td",6),t.TgZ(7,"td",122),t._uU(8),t.ALo(9,"number"),t.qZA()()),2&n){const e=o.$implicit,i=t.oxw(4);t.xp6(2),t.Oqu(e.PriceDisplay),t.xp6(1),t.Q6J("hidden",i.data.Session&&i.data.InputMode),t.xp6(1),t.hij(" ",t.lcZ(5,5,e.Quantity)," "),t.xp6(2),t.Q6J("ngIf",i.data.Session&&i.data.InputMode),t.xp6(2),t.Oqu(t.lcZ(9,7,e.Total))}}function se(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",102),t.TgZ(2,"td")(3,"a",114),t._UZ(4,"b",102),t.qZA()(),t._UZ(5,"td",102)(6,"td",84),t.ALo(7,"number"),t._UZ(8,"td",84),t.ALo(9,"number"),t._UZ(10,"td",102),t.ALo(11,"date"),t.qZA()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(15,L))("queryParams",t.VKq(16,I,e.InvoiceID)),t.xp6(1),t.Q6J("innerHTML",e.Number,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.CustomerName,t.oJD),t.xp6(1),t.Q6J("innerHTML",t.lcZ(7,8,e.Quantity),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.lcZ(9,10,e.UnitPrice),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.xi3(11,12,e.Created,"dd MMM yyyy"),t.oJD)}}function le(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",102),t.TgZ(2,"td"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"td")(6,"a",107),t._uU(7),t.qZA()(),t.TgZ(8,"td",48),t._uU(9),t.ALo(10,"number"),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Oqu(t.xi3(4,6,e.Created,"dd MMM yyyy")),t.xp6(3),t.Q6J("routerLink",t.DdM(11,L))("queryParams",t.VKq(12,I,e.InvoiceID)),t.xp6(1),t.hij(" ",e.InvoiceNumber," "),t.xp6(2),t.Oqu(t.lcZ(10,9,-1*e.Points))}}function ce(n,o){if(1&n&&(t.TgZ(0,"div",14)(1,"div",54)(2,"ul",55),t.YNc(3,Lt,3,4,"li",56),t.YNc(4,Ft,3,4,"li",56),t.YNc(5,wt,3,4,"li",56),t.YNc(6,Qt,3,0,"li",56),t.YNc(7,Et,3,4,"li",56),t.YNc(8,Vt,3,0,"li",56),t.TgZ(9,"li",57)(10,"a",58),t._uU(11,"Loyalty Point"),t.qZA()()(),t.TgZ(12,"div",59)(13,"div",60)(14,"div",61),t.YNc(15,Kt,31,15,"div",25),t.qZA()(),t.TgZ(16,"div",62)(17,"div",61),t.YNc(18,Gt,20,2,"div",63),t.qZA()(),t.YNc(19,ne,28,8,"div",64),t.TgZ(20,"div",65)(21,"div",61)(22,"div",54)(23,"div",66)(24,"div",67)(25,"table",68)(26,"thead",69)(27,"tr"),t.YNc(28,oe,2,1,"th",70),t.TgZ(29,"th",36),t._uU(30,"Label"),t.qZA(),t.TgZ(31,"th",71),t._uU(32," Amount "),t.qZA(),t.TgZ(33,"th",72),t._uU(34,"Payment"),t.qZA(),t.TgZ(35,"th",72),t._uU(36,"Note"),t.qZA()()(),t.TgZ(37,"tbody"),t.YNc(38,re,11,7,"tr",41),t.qZA()()()()()()(),t.TgZ(39,"div",73)(40,"div",61)(41,"div",54)(42,"div",74)(43,"div",20)(44,"table",75)(45,"thead",69)(46,"tr")(47,"th",72),t._uU(48,"Cash Denomination"),t.qZA(),t.TgZ(49,"th",76),t._uU(50," Qty"),t.qZA(),t.TgZ(51,"th",77),t._uU(52,"Total"),t.qZA()()(),t.TgZ(53,"tbody"),t.YNc(54,de,10,9,"tr",41),t.qZA(),t.TgZ(55,"tfoot")(56,"tr")(57,"th",78),t._uU(58,"Total:"),t.qZA(),t.TgZ(59,"td",79),t._uU(60),t.ALo(61,"number"),t.ALo(62,"sum"),t.qZA()()()()()()()()(),t.TgZ(63,"div",80)(64,"div",61)(65,"div",54)(66,"div",74)(67,"div",20)(68,"table",34)(69,"thead",69)(70,"tr")(71,"th",81),t._uU(72,"No"),t.qZA(),t.TgZ(73,"th",72),t._uU(74,"Number"),t.qZA(),t.TgZ(75,"th",72),t._uU(76,"Customer"),t.qZA(),t.TgZ(77,"th",48),t._uU(78,"Quantity"),t.qZA(),t.TgZ(79,"th",82),t._uU(80,"Price"),t.qZA(),t.TgZ(81,"th"),t._uU(82,"Date"),t.qZA()()(),t.TgZ(83,"tbody"),t.YNc(84,se,12,18,"tr",41),t.qZA(),t.TgZ(85,"tfoot")(86,"tr")(87,"td",83),t._uU(88,"Total"),t.qZA(),t._UZ(89,"td",84),t.ALo(90,"number"),t.ALo(91,"sum"),t._UZ(92,"td",84),t.ALo(93,"number"),t.ALo(94,"sum"),t.qZA()()()()()()()(),t.TgZ(95,"div",85)(96,"div",61)(97,"div",54)(98,"div",74)(99,"div",20)(100,"table",34)(101,"thead",69)(102,"tr")(103,"th",81),t._uU(104,"No"),t.qZA(),t.TgZ(105,"th",72),t._uU(106,"Date"),t.qZA(),t.TgZ(107,"th",72),t._uU(108,"Number"),t.qZA(),t.TgZ(109,"th",86),t._uU(110,"Point"),t.qZA()()(),t.TgZ(111,"tbody"),t.YNc(112,le,11,14,"tr",41),t.qZA()()()()()()()()()()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("ngIf",null!=e.data.Session&&e.data.InvoiceVisible),t.xp6(1),t.Q6J("ngIf",e.data.VoidInvoice.length>0),t.xp6(1),t.Q6J("ngIf",null!=e.data.Session&&e.data.PaymentReceiveVisible),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.SalesReturn.length>0),t.xp6(1),t.Q6J("hidden",!(e.data.LoyaltyPointhistory.length>0)),t.xp6(4),t.Tol(t.WLB(37,R,e.data.InvoiceVisible,e.data.InvoiceVisible)),t.xp6(2),t.Q6J("ngIf",null!=e.data.Session),t.xp6(3),t.Q6J("ngIf",e.data.InvoiceVisible),t.xp6(1),t.Q6J("ngIf",e.data.PaymentReceiveVisible),t.xp6(9),t.Q6J("ngIf",e.data.InputMode),t.xp6(10),t.Q6J("ngForOf",e.data.Expenses),t.xp6(1),t.Tol(t.WLB(40,R,!e.data.InvoiceVisible&&!e.data.PaymentReceiveVisible,!e.data.InvoiceVisible&&!e.data.PaymentReceiveVisible)),t.xp6(15),t.Q6J("ngForOf",e.data.Denominations),t.xp6(6),t.hij(" ",t.lcZ(61,22,t.xi3(62,24,e.data.Denominations,"Total"))," "),t.xp6(24),t.Q6J("ngForOf",e.data.SalesReturn),t.xp6(5),t.Q6J("innerHTML",t.lcZ(90,27,t.xi3(91,29,e.data.SalesReturn,"Quantity")),t.oJD),t.xp6(3),t.Q6J("innerHTML",t.lcZ(93,32,t.xi3(94,34,e.data.SalesReturn,"UnitPrice")),t.oJD),t.xp6(20),t.Q6J("ngForOf",e.data.LoyaltyPointhistory)}}function pe(n,o){if(1&n&&(t.TgZ(0,"div",124)(1,"h4",125),t._uU(2),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(2),t.hij(" ",e.data.Message," ")}}function me(n,o){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,Zt,2,1,"div",10),t.YNc(2,bt,30,6,"div",11),t.YNc(3,Pt,10,1,"div",11),t.YNc(4,ce,113,43,"div",11),t.YNc(5,pe,3,1,"div",12),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null!=e.MessageInfo||null!=e.MessageInfo),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.Message&&!e.data.Session)}}const ue=function(){return["/menu/Sell"]};function ge(n,o){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),t._uU(3," Back to POS "),t.qZA(),t.YNc(4,gt,2,5,"a",3),t.YNc(5,ft,2,0,"a",4),t.qZA(),t.TgZ(6,"content")(7,"div",5),t.YNc(8,xt,5,2,"h4",6),t.YNc(9,me,6,5,"div",6),t.qZA()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(8,ue)),t.xp6(2),t.Q6J("ngIf",!e.InputMode&&e.PrintUrl),t.xp6(1),t.Q6J("ngIf",e.data.Session&&e.InputMode),t.xp6(3),t.Q6J("ngIf",!e.data.ClosureEnabled),t.xp6(1),t.Q6J("ngIf",e.data.ClosureEnabled)}}let fe=(()=>{class n extends pt.U{constructor(e,i,a,r){super(e,"Shift/Closure",r),this.httpService=e,this.matDialog=i,this.localData=a,this.activatedRoute=r,this.Filter={},this.InputMode=!1,this.myFunct=function(_){_.Expected=_.Received+_.Start,this.ChangeDifferences(_)},this.DeleteExpenses=function(_){const l=this.data.Session.RegisterID,s=JSON.parse(localStorage.getItem(l));s.splice(_,1),localStorage.setItem(l,JSON.stringify(s)),this.data.Expenses.splice(_,1)},this.DenominationTotal=function(_){_.Total=_.Amount*_.Quantity},this.ChangeDifferences=function(_,l){this.data.ExpectedPaymentVisible&&(l||(_.Amount=_.Received+1*_.Start),_.ShortOver=_.Amount-(_.Received+1*_.Start))}}postBindForm(e){this.InputMode=e.InputMode,null!=this.data.Session&&null!=localStorage.getItem(this.data.Session.RegisterID)&&(this.data.Expenses=JSON.parse(localStorage.getItem(this.data.Session.RegisterID)))}showCloseModal(){this.matDialog.open(ct,{data:{VisitorMandatory:this.data.VisitorMandatory}}).afterClosed().subscribe(i=>{i&&(this.Visitors=i.Data.Visitors,this.Notes=i.Data.Note,void 0===this.Visitors&&(this.Visitors=0),this.CloseRegister())})}CloseRegister(){const e={RegisterID:this.data.Register.ID,Expenses:this.data.Expenses,Payments:this.data.Payments,Denominations:this.data.Denominations,Session:{...this.data.Session,Note:this.Notes,Visitors:this.Visitors}};this.httpService.post("/API/Shift/EndShift",JSON.stringify(e)).subscribe(i=>{this.InputMode=!1,this.idModel=i.Model.ID,this.PrintUrl=i.PrintUrl,this.MessageInfo=i.Message,localStorage.removeItem(this.data.Session.RegisterID)})}showExpenseModal(){this.matDialog.open(B,{data:{Form:new G,expenseList:this.data.Expenses,LabelExpense:this.data.LabelExpense,PaymentList:this.data.PaymentList,ID:this.data.Session.RegisterID}}).afterClosed().pipe((0,O.h)(i=>m.gT.IsNotEmpty(i))).subscribe(i=>{if(i.Data.RegisterSessionID=this.data.Session.RegisterID,null==localStorage.getItem(this.data.Session.RegisterID))localStorage.setItem(this.data.Session.RegisterID,JSON.stringify([i.Data]));else{const a=JSON.parse(localStorage.getItem(this.data.Session.RegisterID));a.push(i.Data),localStorage.setItem(this.data.Session.RegisterID,JSON.stringify(a))}this.data.Expenses.push(i.Data)})}filterAmount(e,i,a){return e.filter(function(r){return r[i]==a})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.O),t.Y36(u.uw),t.Y36(V.T),t.Y36(g.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-shift"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["role","button","matTooltipPosition","above","matTooltip","Back to POS",1,"btn","btn-outline-secondary","me-3",3,"routerLink"],["role","button","class","btn btn-outline-secondary me-3","target","_blank",3,"routerLink","queryParams",4,"ngIf"],["data-cy","CloseRegister","role","button","class","btn btn-primary text-white me-3","matTooltipPosition","above","matTooltip","Close Register",3,"click",4,"ngIf"],[1,"container-fluid","pt-4"],[4,"ngIf"],["role","button","target","_blank",1,"btn","btn-outline-secondary","me-3",3,"routerLink","queryParams"],["data-cy","CloseRegister","role","button","matTooltipPosition","above","matTooltip","Close Register",1,"btn","btn-primary","text-white","me-3",3,"click"],["target","_blank",3,"routerLink"],["class","alert alert-success","role","alert",4,"ngIf"],["class","row",4,"ngIf"],["class","clearfix pb-6",4,"ngIf"],["role","alert",1,"alert","alert-success"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"text-center"],["aria-hidden","true",1,"fa-solid","fa-location-dot"],[1,"card-body"],[1,"text-center","fw-normal","h5"],[1,"col"],[1,"fa-regular","fa-calendar-days","me-4"],[1,"h5","text-center","fw-normal"],["class","col",4,"ngIf"],[1,"fa-solid","fa-file-invoice","me-4"],[1,"card-header","px-0"],[1,"fa-solid","fa-cart-arrow-down","me-4"],[1,"col-12"],[1,"card","w-100"],[1,"col-12",2,"padding-left","0px","padding-right","0px"],[1,"table-responsive"],["class","table table-bordered",4,"ngIf"],[1,"table","table-bordered"],[1,"table-light"],[1,"border-end",2,"width","150px"],[1,"border-end","text-end","pe-10",2,"width","150px"],["class","border-end text-end pe-10","style","width: 150px;",4,"ngIf"],["style","width: 125px;","class","text-end pe-10",4,"ngIf"],[1,"border-start","text-end","pe-10"],[4,"ngFor","ngForOf"],[1,"text-end","pe-10",2,"width","125px"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","readonly","ngModelChange","keyup"],["class","text-end",4,"ngIf"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","keyup","ngModelChange"],["class","text-end pe-10",3,"class",4,"ngIf"],["type","text",1,"form-control",3,"ngModel","ngModelChange"],[1,"text-end"],[1,"text-end","pe-10"],[1,"text-end","fw-bold"],["class","text-end fw-bold",4,"ngIf"],[1,"text-end","pe-10","fw-bold"],["class","text-end pe-10 fw-bold",3,"class",4,"ngIf"],[1,"col-sm-12"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["class","nav-item",4,"ngIf"],[1,"nav-item",3,"hidden"],["id","loyalty-tab","data-bs-toggle","tab","href","#loyalty","role","tab","aria-controls","loyalty","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content"],["id","invoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"row","g-0"],["id","void","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["class","col-12",3,"hidden",4,"ngIf"],["class","tab-pane fade mt-0 pt-0","id","payment","role","tabpanel",3,"class",4,"ngIf"],["id","expense","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card","me-5"],[1,"card-body","py-5"],[1,"table","table-bordered","mb-6"],[1,"thead-light"],["class","border-end","width","15px",4,"ngIf"],[1,"border-end","text-end",2,"width","150px"],[1,"border-end"],["id","bank","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card","border-top-0"],[1,"table","table-bordered","custom-table"],[1,"border-end","text-end",2,"width","100px"],[1,"text-end","pe-8",2,"width","240px"],["colspan","2",1,"text-end"],[1,"text-end","pe-8","fw-bold"],["id","return","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end",2,"width","20px"],[1,"text-end","border-end"],["colspan","3"],[1,"text-end",3,"innerHTML"],["id","loyalty","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end","text-end"],[1,"nav-item"],["id","invoice-tab","data-bs-toggle","tab","href","#invoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link"],["expe","","id","void-tab","data-bs-toggle","tab","href","#void","role","tab","aria-controls","void","aria-selected","false",1,"nav-link"],["id","payment-tab","data-bs-toggle","tab","href","#payment","role","tab","aria-controls","payment","aria-selected","true",1,"nav-link"],["id","expense-tab","data-bs-toggle","tab","href","#expense","role","tab","aria-controls","expense","aria-selected","false",1,"nav-link"],["id","bank-tab","data-bs-toggle","tab","href","#bank","role","tab","aria-controls","bank","aria-selected","false",1,"nav-link"],["id","return-tab","data-bs-toggle","tab","href","#return","role","tab","aria-controls","return","aria-selected","false",1,"nav-link"],[1,"card","me-5","border-top-0"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end",2,"width","200px"],["class","border-end","style","width: 85px;",4,"ngIf"],[1,"border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","60px"],["colspan","4"],[3,"innerHTML"],[1,"border-end",2,"width","85px"],[1,"text-primary",3,"routerLink","queryParams","innerHTML"],[3,"innerHTML",4,"ngIf"],[1,"col-12",3,"hidden"],["target","_blank",1,"text-primary",3,"routerLink","queryParams"],["id","payment","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"table-responsive",2,"overflow-x","auto"],["class","text-end border-end",3,"innerHTML",4,"ngFor","ngForOf"],["colspan","5",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end","border-end",3,"innerHTML"],["target","_blank",3,"routerLink","queryParams"],["width","15px",1,"border-end"],["type","button","class","btn btn-outline-dark btn-sm bg-white text-black","matTooltipPosition","above","matTooltip","Add Expense",3,"click",4,"ngIf"],["type","button","matTooltipPosition","above","matTooltip","Add Expense",1,"btn","btn-outline-dark","btn-sm","bg-white","text-black",3,"click"],["aria-hidden","true",1,"fa-solid","fa-plus"],[1,"fa-solid","fa-xmark","fa-lg","text-danger",2,"cursor","pointer",3,"click"],[1,"fw-bold"],[1,"text-end",3,"hidden"],[1,"text-end","pe-8"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange","keyup"],[1,"clearfix","pb-6"],[1,"fw-bold","bg-secondary","py-8","ps-5"]],template:function(e,i){1&e&&t.YNc(0,ge,10,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[q.p,c.sg,c.O5,g.yS,p.Fj,p.JJ,p.On,T.b,c.JJ,c.uU,h.qU,h.J1,h.$k,h.f4],encapsulation:2}),n})();var y=d(82722),Z=d(54004),M=d(24351),U=d(77579),k=d(4077),Y=d(51161);const he=function(){return["/menu/Sell/Offline_Cache/Orders"]};function xe(n,o){if(1&n&&(t.TgZ(0,"a",8)(1,"b"),t._uU(2),t.qZA()()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.DdM(2,he)),t.xp6(2),t.hij("You have ",e.totalOfflineOrders," Offline Orders")}}const Ze=function(){return["/menu/Setup/Configuration/Module"]};function ve(n,o){1&n&&(t.TgZ(0,"h4",9),t._uU(1," Register session config is inactive, click "),t.TgZ(2,"a",8),t._uU(3,"here"),t.qZA(),t._uU(4," to activate (Go to Shift Tab, look for active session) "),t.qZA()),2&n&&(t.xp6(2),t.Q6J("routerLink",t.DdM(1,Ze)))}function Te(n,o){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.data.Warning," ")}}function be(n,o){1&n&&(t.TgZ(0,"td"),t._uU(1,"VACANT"),t.qZA())}function Ae(n,o){1&n&&(t.TgZ(0,"td",18),t._uU(1,"Active"),t.qZA())}function Ce(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2).$implicit,r=t.oxw(3);return t.KtG(r.CloseShift(a))}),t._uU(1,"End Shift"),t.qZA()}}function qe(n,o){if(1&n&&(t.TgZ(0,"td",19),t.YNc(1,Ce,2,0,"button",20),t.qZA()),2&n){const e=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e.roleService.sell.Edit)}}function ye(n,o){1&n&&t._UZ(0,"td")}function Se(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.YNc(3,be,2,0,"td",7),t.YNc(4,Ae,2,0,"td",16),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.ALo(9,"date"),t.qZA(),t.YNc(10,qe,2,1,"td",17),t.YNc(11,ye,1,0,"td",7),t.qZA()),2&n){const e=o.$implicit;t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf","Close"==e.State),t.xp6(1),t.Q6J("ngIf","Close"!=e.State),t.xp6(2),t.Oqu("Close"!=e.State?e.LoginID:"-"),t.xp6(2),t.Oqu("Close"!=e.State?t.xi3(9,7,e.Start,"HH:mm")+" - Now":"-"),t.xp6(2),t.Q6J("ngIf","Close"!=e.State),t.xp6(1),t.Q6J("ngIf","Close"==e.State)}}function Ie(n,o){if(1&n&&(t.TgZ(0,"div")(1,"div",11)(2,"table",12)(3,"thead",13)(4,"tr")(5,"th"),t._uU(6,"Outlet"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Status"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"Cashier"),t.qZA(),t.TgZ(11,"th"),t._uU(12,"Time"),t.qZA(),t.TgZ(13,"th",14),t._uU(14,"Action"),t.qZA()()(),t.TgZ(15,"tbody"),t.YNc(16,Se,12,10,"tr",15),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(16),t.Q6J("ngForOf",e.data.AccessibleRegisters)}}const Me=function(n){return{"bg-light-gray":n}};function Ue(n,o){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"content")(2,"div",2)(3,"h3",3),t.YNc(4,xe,3,3,"a",4),t.qZA(),t.YNc(5,ve,5,2,"h4",5),t.YNc(6,Te,2,1,"div",6),t.YNc(7,Ie,17,1,"div",7),t.qZA()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngClass",t.VKq(8,Me,!e.data.AccessibleRegisters||e.data.Session)),t.xp6(2),t.Q6J("ngIf",e.totalOfflineOrders>0),t.xp6(1),t.Q6J("ngIf",!e.data.ClosureEnabled),t.xp6(1),t.Q6J("ngIf",null!=e.data.Warning||null!=e.data.Warning),t.xp6(1),t.Q6J("ngIf",e.data.ClosureEnabled)}}let Je=(()=>{class n extends k.n{constructor(e,i,a,r){super(e,"Shift/ShiftList",null,a),this.httpService=e,this.localData=i,this._toastr=a,this.roleService=r,this.totalOfflineOrders=0,this.destroy$=new U.x,this.subscribeOfflineOrders()}subscribeOfflineOrders(){this.localData.findAllOrders().pipe((0,y.R)(this.destroy$)).subscribe(e=>{this.totalOfflineOrders=e.length})}CloseShift(e){confirm("Are you sure you want to End Shift?")&&this.httpService.post("/API/Shift/Closure",{RegisterID:e.ID,CashierID:e.CashierID}).pipe((0,y.R)(this.destroy$),(0,Z.U)(a=>({RegisterID:a.Register.ID,Note:"",Expenses:a.Expenses,Payments:a.Payments,Denominations:a.Denominations,Session:a.Session,Visitors:0})),(0,M.b)(a=>this.EndShift(a))).subscribe({next:a=>{this._toastr.success(a.Message,x.n.Success),localStorage.removeItem(a.Model.RegisterID),this.getListData()},error:a=>this._toastr.error(a,x.n.Error)})}EndShift(e){return this.httpService.post("/API/Shift/EndShift",e)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.O),t.Y36(V.T),t.Y36(A._W),t.Y36(Y.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-active-shift"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["id","ActiveShift",1,"container-fluid","mt-3",3,"ngClass"],[1,"fw-bold"],["target","_blank",3,"routerLink",4,"ngIf"],["class","fw-bold pb-10",4,"ngIf"],["class","alert alert-warning","role","alert",4,"ngIf"],[4,"ngIf"],["target","_blank",3,"routerLink"],[1,"fw-bold","pb-10"],["role","alert",1,"alert","alert-warning"],[1,"clearfix","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","110px"],[4,"ngFor","ngForOf"],["class","text-success",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-success"],[1,"text-center"],["class","btn btn-outline-danger",3,"click",4,"ngIf"],[1,"btn","btn-outline-danger",3,"click"]],template:function(e,i){1&e&&t.YNc(0,Ue,8,10,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[q.p,c.mk,c.sg,c.O5,g.yS,c.uU],encapsulation:2}),n})();var z=d(24424),X=d(59798),F=d(24537);function De(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"a",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.exportCSV(a.csvConverter,"ShiftExport/EndOFShiftList","Register_Closure.csv"))}),t._UZ(1,"i",22),t._uU(2," Export "),t.qZA()}}function Ne(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"a",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.httpPostListID("Shift/DeleteClosureHistory"))}),t._UZ(1,"i",24),t._uU(2,"Delete "),t.qZA()}}const Oe=function(){return["Register_Shift_Form"]};function Pe(n,o){1&n&&(t.TgZ(0,"a",25),t._uU(1,"Add"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,Oe))}function Le(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"th",17)(1,"input",26),t.NdJ("change",function(a){t.CHM(e);const r=t.oxw(2);return t.KtG(r.onSelectAllData(a.target.checked))}),t.qZA()()}}function Fe(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"td",17)(1,"input",31),t.NdJ("ngModelChange",function(a){t.CHM(e);const r=t.oxw().$implicit;return t.KtG(r.selected=a)}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.selected)}}const Qe=function(){return["/menu/Shift/Main/Previous_Shift/Register_Shift_Detail"]},Ee=function(n){return{ID:n}},Ve=function(){return["/print/RegisterClosure"]},Re=function(n){return{id:n}};function ke(n,o){if(1&n&&(t.TgZ(0,"tr",27),t.YNc(1,Fe,2,1,"td",14),t.TgZ(2,"td")(3,"a"),t._uU(4),t.qZA()(),t.TgZ(5,"td")(6,"a",28),t._uU(7),t.qZA()(),t.TgZ(8,"td"),t._uU(9),t.ALo(10,"date"),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,"number"),t.qZA(),t.TgZ(17,"td"),t._uU(18),t.ALo(19,"number"),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._uU(25),t.qZA(),t.TgZ(26,"td")(27,"a",29),t._UZ(28,"i",30),t.qZA()()()),2&n){const e=o.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",i.roleService.shift.Delete),t.xp6(3),t.hij(" ",e.LoginID," "),t.xp6(2),t.Q6J("routerLink",t.DdM(24,Qe))("queryParams",t.VKq(25,Ee,e.ID)),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(t.xi3(10,14,e.Start,"dd MMM yyyy HH:mm")),t.xp6(3),t.Oqu(t.xi3(13,17,e.End,"dd MMM yyyy HH:mm")),t.xp6(3),t.Oqu(t.lcZ(16,20,e.Sales+e.Tax)),t.xp6(3),t.Oqu(t.lcZ(19,22,e.Invoice_Count)),t.xp6(3),t.Oqu(e.EntityName),t.xp6(2),t.Oqu(e.Register),t.xp6(2),t.Oqu(e.Visitors),t.xp6(2),t.Q6J("routerLink",t.DdM(27,Ve))("queryParams",t.VKq(28,Re,e.ID))}}function Ye(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",32),t.NdJ("page",function(a){t.CHM(e);const r=t.oxw(2);return t.KtG(r.onPaginationChange(a))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function He(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.searchFromPageOne())}),t.TgZ(1,"actions"),t.YNc(2,De,3,0,"a",2),t.YNc(3,Ne,3,0,"a",3),t.YNc(4,Pe,2,2,"a",4),t.qZA(),t.TgZ(5,"filters")(6,"div",5)(7,"div",6)(8,"div")(9,"h6"),t._uU(10,"Outlet"),t.qZA(),t.TgZ(11,"ng-select",7),t.NdJ("ngModelChange",function(a){t.CHM(e);const r=t.oxw();return t.KtG(r.pageData.Filter.EntityID=a)}),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"From - To"),t.qZA(),t.TgZ(15,"datepicker",8),t.NdJ("dateChange",function(a){t.CHM(e);const r=t.oxw();return t.KtG(r.pageData.Filter.From=a)}),t.qZA(),t.TgZ(16,"datepicker",9),t.NdJ("dateChange",function(a){t.CHM(e);const r=t.oxw();return t.KtG(r.pageData.Filter.To=a)}),t.qZA()()()()(),t.TgZ(17,"content")(18,"div",10)(19,"div",11)(20,"table",12)(21,"thead",13)(22,"tr"),t.YNc(23,Le,2,0,"th",14),t.TgZ(24,"th",15),t._uU(25,"Cashier"),t.qZA(),t.TgZ(26,"th"),t._uU(27,"Number"),t.qZA(),t.TgZ(28,"th",16),t._uU(29,"Open"),t.qZA(),t.TgZ(30,"th",16),t._uU(31,"Close"),t.qZA(),t.TgZ(32,"th"),t._uU(33,"Sales + Tax"),t.qZA(),t.TgZ(34,"th"),t._uU(35,"Invoices"),t.qZA(),t.TgZ(36,"th"),t._uU(37,"Outlet"),t.qZA(),t.TgZ(38,"th"),t._uU(39,"Register"),t.qZA(),t.TgZ(40,"th"),t._uU(41,"Visitors"),t.qZA(),t._UZ(42,"th",17),t.qZA()(),t.TgZ(43,"tbody"),t.YNc(44,ke,29,30,"tr",18),t.qZA()()()(),t.TgZ(45,"div",19),t.YNc(46,Ye,1,3,"mat-paginator",20),t.qZA()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(2),t.Q6J("ngIf",e.roleService.global.Export),t.xp6(1),t.Q6J("ngIf",e.getSelectedData().length>0),t.xp6(1),t.Q6J("ngIf",e.roleService.shift.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("isFloatingLabel",!1)("date",e.pageData.Filter.From),t.xp6(1),t.Q6J("isFloatingLabel",!1)("date",e.pageData.Filter.To),t.xp6(7),t.Q6J("ngIf",e.roleService.shift.Delete),t.xp6(21),t.Q6J("ngForOf",e.data.Data),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}let $e=(()=>{class n extends k.n{constructor(e,i,a,r){super(e,"Shift/ClosureHistoryList","ShiftLoader/EndOFShift",a),this.httpService=e,this.csvConverter=i,this.roleService=r}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.O),t.Y36(z.O),t.Y36(A._W),t.Y36(Y.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-previous-shift"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["value","Delete","matTooltipPosition","above","matTooltip","Delete","class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["class","btn btn-success","matTooltipPosition","above","matTooltip","Add Product",3,"routerLink",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"items","ngModel","ngModelChange"],["placeholder","From","appearance","outline","name","From",3,"isFloatingLabel","date","dateChange"],["placeholder","To","appearance","outline","name","To",3,"isFloatingLabel","date","dateChange"],[1,"container-fluid","mt-3"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["style","width: 14px",4,"ngIf"],[2,"width","120px"],[2,"width","140px"],[2,"width","14px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"mt-2"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Delete","matTooltipPosition","above","matTooltip","Delete",1,"btn","btn-outline-secondary","me-3",3,"click"],[1,"fa-solid","fa-trash","me-3"],["matTooltipPosition","above","matTooltip","Add Product",1,"btn","btn-success",3,"routerLink"],["type","checkbox",3,"change"],[1,"border-bottom"],[3,"routerLink","queryParams"],["target","_blank",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"length","pageSize","pageIndex","page"]],template:function(e,i){1&e&&t.YNc(0,He,47,14,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[q.p,c.sg,c.O5,g.yS,p.Wl,p.JJ,p.On,X.NW,S.w9,F.QB,c.JJ,c.uU],encapsulation:2}),n})();const je=function(n){return{"p-left":n}};function Ke(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td",5),t._uU(2),t.qZA(),t.TgZ(3,"td",6),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",6),t._uU(7),t.ALo(8,"number"),t.qZA()()),2&n){const e=o.$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(8,je,!e.IsDebit)),t.xp6(1),t.Oqu(e.AccountName),t.xp6(2),t.Oqu(e.IsDebit?t.lcZ(5,4,e.Amount):""),t.xp6(3),t.Oqu(e.IsDebit?"":t.lcZ(8,6,e.Amount))}}let Be=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,this.Model=i,this.PostDate=new Date(this.Model.PostDate)}ngOnInit(){}onOk(){this.dialogRef.close({PostDate:this.PostDate})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.so),t.Y36(u.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["modal-journal"]],decls:22,vars:3,consts:[[3,"title","onOk","onClose","onCancel"],["name","From",3,"date","dateChange"],[1,"table","table-bordered",2,"margin-top","10px"],[1,"text-end",2,"width","150px"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-end"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onClose",function(){return i.dialogRef.close()})("onCancel",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div")(3,"table")(4,"tr")(5,"th"),t._uU(6,"Post Date"),t.qZA(),t.TgZ(7,"td"),t._uU(8,":"),t.qZA(),t.TgZ(9,"td")(10,"datepicker",1),t.NdJ("dateChange",function(r){return i.PostDate=r}),t.qZA()()()(),t.TgZ(11,"table",2)(12,"thead")(13,"tr")(14,"th"),t._uU(15,"Account"),t.qZA(),t.TgZ(16,"th",3),t._uU(17,"Debit"),t.qZA(),t.TgZ(18,"th",3),t._uU(19,"Credit"),t.qZA()()(),t.TgZ(20,"tbody"),t.YNc(21,Ke,9,10,"tr",4),t.qZA()()()()()),2&e&&(t.Q6J("title","Expense Detail"),t.xp6(10),t.Q6J("date",i.PostDate),t.xp6(11),t.Q6J("ngForOf",i.Model.JournalEntryList))},dependencies:[c.mk,c.sg,v.M,F.QB,c.JJ],styles:["td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] mat-form-field{padding-right:0!important;background:white}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-flex{width:117px;height:36px;border:1px solid rgb(221,221,221)}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-infix{border:none!important;top:5px}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-infix input{font-size:14px;color:#000;padding-left:5px}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-suffix{left:-128px;top:2px}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-suffix .mat-button-wrapper{color:#000}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-suffix>mat-datepicker-toggle>button{display:none}td[_ngcontent-%COMP%] datepicker[_ngcontent-%COMP%] .mat-form-field-underline{display:none}td[_ngcontent-%COMP%] datepicker.date-warnings[_ngcontent-%COMP%] .mat-form-field-flex{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}"]}),n})();var tt=d(65131);function Ge(n,o){if(1&n&&(t.TgZ(0,"div",3),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.data.Warning," ")}}function We(n,o){if(1&n&&(t.TgZ(0,"div",12)(1,"div",17)(2,"div",7)(3,"h2",8),t._UZ(4,"i",18),t._uU(5,"Invoice / Void"),t.qZA()(),t.TgZ(6,"div",14)(7,"div",15),t._uU(8),t.ALo(9,"number"),t.qZA()()()()),2&n){const e=t.oxw(3);t.xp6(8),t.AsE("",t.lcZ(9,2,e.data.Invoices.length)," / ",e.data.VoidInvoice.length,"")}}function ze(n,o){if(1&n&&(t.TgZ(0,"div",12)(1,"div",6)(2,"div",19)(3,"h2",8),t._UZ(4,"i",20),t._uU(5,"Sales + Tax + Surcharge"),t.qZA()(),t.TgZ(6,"div",14)(7,"div",15),t._uU(8),t.ALo(9,"number"),t.qZA()()()()),2&n){const e=t.oxw(3);t.xp6(8),t.Oqu(t.lcZ(9,1,e.data.Session.Sales+e.data.Session.Tax))}}function Xe(n,o){if(1&n&&(t.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h2",8),t._UZ(5,"i",9),t._uU(6),t.qZA()(),t.TgZ(7,"div",10)(8,"div",11),t._uU(9),t.qZA()()()(),t.TgZ(10,"div",12)(11,"div",6)(12,"div",7)(13,"h2",8),t._UZ(14,"i",13),t._uU(15,"Opening"),t.qZA()(),t.TgZ(16,"div",14)(17,"div",15),t._uU(18),t.qZA()()()(),t.TgZ(19,"div",12)(20,"div",6)(21,"div",7)(22,"h2",8),t._UZ(23,"i",13),t._uU(24,"Closing"),t.qZA()(),t.TgZ(25,"div",14)(26,"div",15),t._uU(27),t.qZA()()()(),t.YNc(28,We,10,4,"div",16),t.YNc(29,ze,10,3,"div",16),t.qZA()),2&n){const e=t.oxw(2);t.xp6(6),t.hij(" Cashier / ",e.data.Register.Name,""),t.xp6(3),t.AsE(" ",e.data.Cashier," / ",e.data.EntityName," "),t.xp6(9),t.Oqu(e.data.RegisterStartWithTimezone),t.xp6(9),t.Oqu(e.data.RegisterEndWithTimezone),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible)}}function tn(n,o){1&n&&(t.TgZ(0,"th",29),t._uU(1,"Expected "),t.qZA())}function en(n,o){1&n&&(t.TgZ(0,"th",34),t._uU(1," Differences"),t.qZA())}function nn(n,o){if(1&n&&(t.TgZ(0,"td",35),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.Expected)," ")}}const et=function(n,o){return{"text-success":n,"text-danger":o}};function on(n,o){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("ngClass",t.WLB(4,et,e.ShortOver>0,e.ShortOver<0)),t.xp6(1),t.hij(" ",t.lcZ(2,2,e.ShortOver)," ")}}function an(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",35),t._uU(4),t.ALo(5,"number"),t.qZA(),t.TgZ(6,"td",35),t._uU(7),t.ALo(8,"number"),t.qZA(),t.YNc(9,nn,3,3,"td",36),t.TgZ(10,"td",35),t._uU(11),t.ALo(12,"number"),t.qZA(),t.YNc(13,on,3,7,"td",37),t.TgZ(14,"td",35),t._uU(15),t.qZA()()),2&n){const e=o.$implicit,i=t.oxw(4);t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(5,7,e.Start)),t.xp6(3),t.Oqu(t.lcZ(8,9,e.Received)),t.xp6(2),t.Q6J("ngIf",i.data.ExpectedPaymentVisible),t.xp6(2),t.Oqu(t.lcZ(12,11,e.Amount)),t.xp6(2),t.Q6J("ngIf",i.data.ExpectedPaymentVisible),t.xp6(2),t.Oqu(e.Note)}}function rn(n,o){if(1&n&&(t.TgZ(0,"tfoot")(1,"tr")(2,"th",35),t._uU(3,"Total:"),t.qZA(),t.TgZ(4,"td",39),t._uU(5),t.ALo(6,"number"),t.ALo(7,"sum"),t.qZA(),t.TgZ(8,"td",39),t._uU(9),t.ALo(10,"number"),t.ALo(11,"sum"),t.qZA(),t.TgZ(12,"td",39),t._uU(13),t.ALo(14,"number"),t.ALo(15,"sum"),t.qZA(),t.TgZ(16,"td",39),t._uU(17),t.ALo(18,"number"),t.ALo(19,"sum"),t.qZA(),t.TgZ(20,"td",40),t.ALo(21,"sum"),t.ALo(22,"sum"),t._uU(23),t.ALo(24,"number"),t.ALo(25,"sum"),t.qZA()()()),2&n){const e=t.oxw(4);t.xp6(5),t.hij(" ",t.lcZ(6,6,t.xi3(7,8,e.data.Payment,"Start"))," "),t.xp6(4),t.hij(" ",t.lcZ(10,11,t.xi3(11,13,e.data.Payment,"Received"))," "),t.xp6(4),t.hij(" ",t.lcZ(14,16,t.xi3(15,18,e.data.Payment,"Expected"))," "),t.xp6(4),t.hij(" ",t.lcZ(18,21,t.xi3(19,23,e.data.Payment,"Amount"))," "),t.xp6(3),t.Q6J("ngClass",t.WLB(37,et,t.xi3(21,26,e.data.Payment,"ShortOver")>0,t.xi3(22,29,e.data.Payment,"ShortOver")<0)),t.xp6(3),t.hij(" ",t.lcZ(24,32,t.xi3(25,34,e.data.Payment,"ShortOver"))," ")}}function _n(n,o){if(1&n&&(t.TgZ(0,"table",26)(1,"thead",27)(2,"tr")(3,"th",28),t._uU(4,"Payment"),t.qZA(),t.TgZ(5,"th",29),t._uU(6,"Start"),t.qZA(),t.TgZ(7,"th",29),t._uU(8,"Received"),t.qZA(),t.YNc(9,tn,2,0,"th",30),t.TgZ(10,"th",29),t._uU(11,"Counted"),t.qZA(),t.YNc(12,en,2,0,"th",31),t.TgZ(13,"th",32),t._uU(14,"Note"),t.qZA()()(),t.TgZ(15,"tbody"),t.YNc(16,an,16,13,"tr",33),t.qZA(),t.YNc(17,rn,26,40,"tfoot",0),t.qZA()),2&n){const e=t.oxw(3);t.xp6(9),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(3),t.Q6J("ngIf",e.data.ExpectedPaymentVisible),t.xp6(4),t.Q6J("ngForOf",e.data.Payment),t.xp6(1),t.Q6J("ngIf",e.data.ExpectedPaymentVisible)}}function dn(n,o){if(1&n&&(t.TgZ(0,"div",4)(1,"div",21)(2,"div",22)(3,"div",7)(4,"h2"),t._uU(5,"Payments"),t.qZA()(),t.TgZ(6,"div",14)(7,"div",23)(8,"div",24),t.YNc(9,_n,18,4,"table",25),t.qZA()()()()()()),2&n){const e=t.oxw(2);t.xp6(9),t.Q6J("ngIf",e.data.Payment.length>0)}}const w=function(n){return{active:n}};function sn(n,o){if(1&n&&(t.TgZ(0,"li",68)(1,"a",69),t._uU(2,"Invoice"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(1),t.Tol(t.VKq(2,w,e.data.InvoiceVisible))}}function ln(n,o){if(1&n&&(t.TgZ(0,"li",68)(1,"a",70),t._uU(2,"Voided Invoice"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(1),t.Tol(t.VKq(2,w,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible))}}function cn(n,o){if(1&n&&(t.TgZ(0,"li",68)(1,"a",71),t._uU(2,"Payment"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(1),t.Tol(t.VKq(2,w,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible))}}function pn(n,o){1&n&&(t.TgZ(0,"li",68)(1,"a",72),t._uU(2,"Expense"),t.qZA()())}function mn(n,o){if(1&n&&(t.TgZ(0,"li",68)(1,"a",73),t._uU(2,"Bank Note"),t.qZA()()),2&n){const e=t.oxw(3);t.xp6(1),t.Tol(t.VKq(2,w,!e.data.InvoiceVisible&&!e.data.PaymentReceiveVisible))}}function un(n,o){1&n&&(t.TgZ(0,"li",68)(1,"a",74),t._uU(2,"Sales Return"),t.qZA()())}function gn(n,o){1&n&&(t.TgZ(0,"th",84),t._uU(1,"Date"),t.qZA())}function fn(n,o){1&n&&(t.TgZ(0,"th",84),t._uU(1,"Date"),t.qZA())}function hn(n,o){if(1&n&&(t._UZ(0,"td",83),t.ALo(1,"date")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.xi3(1,1,e.Created,"dd MMM yyyy"),t.oJD)}}function xn(n,o){if(1&n&&(t._UZ(0,"td",83),t.ALo(1,"date")),2&n){const e=t.oxw().$implicit;t.Q6J("innerHTML",t.xi3(1,1,e.Date,"dd MMM yyyy"),t.oJD)}}const Q=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},J=function(n){return{ID:n}},Zn=function(n,o,e){return{"text-success":n,"text-warning":o,"text-danger":e}};function vn(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",65),t.TgZ(2,"td")(3,"a",85),t._uU(4),t.qZA()(),t.YNc(5,hn,2,4,"td",86),t.YNc(6,xn,2,4,"td",86),t._UZ(7,"td",83),t.ALo(8,"date"),t._UZ(9,"td",65),t.ALo(10,"number"),t._UZ(11,"td",65),t.ALo(12,"number"),t.qZA()),2&n){const e=o.$implicit,i=o.index,a=t.oxw(4);t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(18,Q))("queryParams",t.VKq(19,J,e.ID)),t.xp6(1),t.Oqu(e.Number),t.xp6(1),t.Q6J("ngIf",0==a.data.Session.Type),t.xp6(1),t.Q6J("ngIf",0!=a.data.Session.Type),t.xp6(1),t.Q6J("innerHTML",t.xi3(8,11,e.Created,"HH:mm"),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.lcZ(10,14,e.Quantity),t.oJD),t.xp6(2),t.Tol(t.kEZ(21,Zn,3==e.PaymentStateID,2==e.PaymentStateID,1==e.PaymentStateID)),t.Q6J("innerHTML",t.lcZ(12,16,e.SalesNTax),t.oJD)}}function Tn(n,o){if(1&n&&(t.TgZ(0,"div",12)(1,"div",75)(2,"div",14)(3,"table",26)(4,"thead",55)(5,"tr")(6,"th",76),t._uU(7,"No"),t.qZA(),t.TgZ(8,"th",77),t._uU(9,"Number"),t.qZA(),t.YNc(10,gn,2,0,"th",78),t.YNc(11,fn,2,0,"th",78),t.TgZ(12,"th",79),t._uU(13,"Time"),t.qZA(),t.TgZ(14,"th",80),t._uU(15,"Qty"),t.qZA(),t.TgZ(16,"th",81),t._uU(17,"Nett"),t.qZA()()(),t.TgZ(18,"tbody"),t.YNc(19,vn,13,25,"tr",33),t.ALo(20,"sortBy"),t.qZA(),t.TgZ(21,"tfoot")(22,"tr"),t._UZ(23,"td",82),t.TgZ(24,"td",35),t._UZ(25,"b",83),t.ALo(26,"number"),t.ALo(27,"sum"),t.qZA(),t.TgZ(28,"td",35),t._UZ(29,"b",83),t.ALo(30,"number"),t.ALo(31,"sum"),t.qZA()()()()()()()),2&n){const e=t.oxw(3);t.xp6(10),t.Q6J("ngIf",0==e.data.Session.Type),t.xp6(1),t.Q6J("ngIf",0!=e.data.Session.Type),t.xp6(8),t.Q6J("ngForOf",t.Dn7(20,5,e.data.Invoices,"asc","Number")),t.xp6(6),t.Q6J("innerHTML",t.lcZ(26,9,t.xi3(27,11,e.data.Invoices,"Quantity")),t.oJD),t.xp6(4),t.Q6J("innerHTML",t.lcZ(30,14,t.xi3(31,16,e.data.Invoices,"SalesNTax")),t.oJD)}}function bn(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",83),t.TgZ(2,"td")(3,"a",89),t._uU(4),t.qZA()(),t.TgZ(5,"td"),t._uU(6),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,"IsMinDate"),t.qZA(),t.TgZ(13,"td",35),t._uU(14),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(14,Q))("queryParams",t.VKq(15,J,e.ID)),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(2),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(t.xi3(9,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(12,11,e.Due,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.Payment)}}function An(n,o){if(1&n&&(t.TgZ(0,"div",87)(1,"div",88)(2,"div",14)(3,"table",26)(4,"thead",55)(5,"tr")(6,"th",62),t._uU(7,"No"),t.qZA(),t.TgZ(8,"th",56),t._uU(9,"Number"),t.qZA(),t.TgZ(10,"th",56),t._uU(11,"Customer"),t.qZA(),t.TgZ(12,"th",56),t._uU(13,"Date"),t.qZA(),t.TgZ(14,"th",56),t._uU(15,"Due"),t.qZA(),t.TgZ(16,"th",56),t._uU(17,"Payment"),t.qZA()()(),t.TgZ(18,"tbody"),t.YNc(19,bn,15,17,"tr",33),t.qZA()()()()()),2&n){const e=t.oxw(3);t.Q6J("hidden",!(e.data.VoidInvoice.length>0)),t.xp6(19),t.Q6J("ngForOf",e.data.VoidInvoice)}}function Cn(n,o){1&n&&t._UZ(0,"th",95),2&n&&t.Q6J("innerHTML",o.$implicit.Name,t.oJD)}function qn(n,o){if(1&n&&(t.TgZ(0,"td",35),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=o.index,i=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,i.Amounts[e])," ")}}const yn=function(n){return[n]};function Sn(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",65),t.TgZ(2,"td")(3,"a",96),t._uU(4),t.qZA()(),t._UZ(5,"td",83),t.YNc(6,qn,3,3,"td",94),t.qZA()),2&n){const e=o.$implicit,i=o.index,a=t.oxw(4);t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("queryParams",t.VKq(6,J,e.InvoiceID))("routerLink",t.VKq(8,yn,1==e.TypeID?"/menu/Orders/Orders/Customer_Invoice/Info":"/menu/Debt/Advance/AR_Collection/Info")),t.xp6(1),t.Oqu(e.Number),t.xp6(1),t.Q6J("innerHTML",e.CustomerName,t.oJD),t.xp6(1),t.Q6J("ngForOf",a.data.paymentMethods)}}function In(n,o){if(1&n&&(t.TgZ(0,"td",35),t._uU(1),t.ALo(2,"number"),t.ALo(3,"sumArray"),t.qZA()),2&n){const e=o.index,i=t.oxw(4);t.xp6(1),t.hij(" ",t.lcZ(2,1,t.Dn7(3,3,i.data.PaymentRecived,"Amounts",e))," ")}}const H=function(n,o){return{show:n,active:o}};function Mn(n,o){if(1&n&&(t.TgZ(0,"div",90)(1,"div",47)(2,"div",21)(3,"div",75)(4,"div",14)(5,"div",91)(6,"table",26)(7,"thead",55)(8,"tr")(9,"th",76),t._uU(10,"No"),t.qZA(),t.TgZ(11,"th",56),t._uU(12,"Number"),t.qZA(),t.TgZ(13,"th",56),t._uU(14,"Customer"),t.qZA(),t.YNc(15,Cn,1,1,"th",92),t.qZA()(),t.TgZ(16,"tbody"),t.YNc(17,Sn,7,10,"tr",33),t.ALo(18,"sortBy"),t.qZA(),t.TgZ(19,"tfoot")(20,"tr")(21,"td",93)(22,"b"),t._uU(23,"Total :"),t.qZA()(),t.YNc(24,In,4,7,"td",94),t.qZA()()()()()()()()()),2&n){const e=t.oxw(3);t.Tol(t.WLB(9,H,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible,!e.data.InvoiceVisible&&e.data.PaymentReceiveVisible)),t.xp6(15),t.Q6J("ngForOf",e.data.paymentMethods),t.xp6(2),t.Q6J("ngForOf",t.Dn7(18,5,e.data.PaymentRecived,"asc","Number")),t.xp6(7),t.Q6J("ngForOf",e.data.paymentMethods)}}function Un(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"button",104),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(5);return t.KtG(a.showExpenseModal())}),t._UZ(1,"i",105),t.qZA()}}function Jn(n,o){if(1&n&&(t.TgZ(0,"th",102),t.YNc(1,Un,2,0,"button",103),t.qZA()),2&n){const e=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e.data.Session&&e.data.InputMode)}}function Dn(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"i",106),t.NdJ("click",function(){t.CHM(e);const a=t.oxw().index,r=t.oxw(4);return t.KtG(r.DeleteExpenses(a))}),t.qZA()()}}function Nn(n,o){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,Dn,2,0,"td",0),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td",35),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA()()),2&n){const e=o.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngIf",i.data.InputMode),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(6,5,e.Amount)),t.xp6(3),t.Oqu(e.PaymentName),t.xp6(2),t.Oqu(e.Note)}}function On(n,o){if(1&n&&(t.TgZ(0,"div",97)(1,"div",47)(2,"div",21)(3,"div",88)(4,"div",98)(5,"table",99)(6,"thead",55)(7,"tr"),t.YNc(8,Jn,2,1,"th",100),t.TgZ(9,"th",28),t._uU(10,"Label"),t.qZA(),t.TgZ(11,"th",101),t._uU(12,"Amount"),t.qZA(),t.TgZ(13,"th",56),t._uU(14,"Payment"),t.qZA(),t.TgZ(15,"th",56),t._uU(16,"Note"),t.qZA()()(),t.TgZ(17,"tbody"),t.YNc(18,Nn,11,7,"tr",33),t.qZA()()()()()()()),2&n){const e=t.oxw(3);t.xp6(8),t.Q6J("ngIf",e.data.InputMode),t.xp6(10),t.Q6J("ngForOf",e.data.Expenses)}}function Pn(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"td")(1,"input",110),t.NdJ("ngModelChange",function(a){t.CHM(e);const r=t.oxw().$implicit;return t.KtG(r.Quantity=a)})("keyup",function(){t.CHM(e);const a=t.oxw().$implicit,r=t.oxw(3);return t.KtG(r.DenominationTotal(a))}),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.Quantity)}}function Ln(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td",107),t._uU(2),t.qZA(),t.TgZ(3,"td",108),t._uU(4),t.ALo(5,"number"),t.qZA(),t.YNc(6,Pn,2,1,"td",0),t.TgZ(7,"td",109),t._uU(8),t.ALo(9,"number"),t.qZA()()),2&n){const e=o.$implicit,i=t.oxw(3);t.xp6(2),t.Oqu(e.PriceDisplay),t.xp6(1),t.Q6J("hidden",i.data.Session&&i.data.InputMode),t.xp6(1),t.hij(" ",t.lcZ(5,5,e.Quantity)," "),t.xp6(2),t.Q6J("ngIf",i.data.Session&&i.data.InputMode),t.xp6(2),t.Oqu(t.lcZ(9,7,e.Total))}}function Fn(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",83),t.TgZ(2,"td")(3,"a",111),t._UZ(4,"b",83),t.qZA()(),t._UZ(5,"td",83)(6,"td",65),t.ALo(7,"number"),t._UZ(8,"td",65),t.ALo(9,"number"),t._UZ(10,"td",83),t.ALo(11,"date"),t.qZA()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(15,Q))("queryParams",t.VKq(16,J,e.InvoiceID)),t.xp6(1),t.Q6J("innerHTML",e.Number,t.oJD),t.xp6(1),t.Q6J("innerHTML",e.CustomerName,t.oJD),t.xp6(1),t.Q6J("innerHTML",t.lcZ(7,8,e.Quantity),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.lcZ(9,10,e.UnitPrice),t.oJD),t.xp6(2),t.Q6J("innerHTML",t.xi3(11,12,e.Created,"dd MMM yyyy"),t.oJD)}}function wn(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",83),t.TgZ(2,"td"),t._uU(3),t.ALo(4,"date"),t.qZA(),t.TgZ(5,"td")(6,"a",89),t._uU(7),t.qZA()(),t.TgZ(8,"td",35),t._uU(9),t.ALo(10,"number"),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Oqu(t.xi3(4,6,e.Created,"dd MMM yyyy")),t.xp6(3),t.Q6J("routerLink",t.DdM(11,Q))("queryParams",t.VKq(12,J,e.InvoiceID)),t.xp6(1),t.hij(" ",e.InvoiceNumber," "),t.xp6(2),t.Oqu(t.lcZ(10,9,-1*e.Points))}}function Qn(n,o){if(1&n&&(t.TgZ(0,"div",4)(1,"div",21)(2,"ul",41),t.YNc(3,sn,3,4,"li",42),t.YNc(4,ln,3,4,"li",42),t.YNc(5,cn,3,4,"li",42),t.YNc(6,pn,3,0,"li",42),t.YNc(7,mn,3,4,"li",42),t.YNc(8,un,3,0,"li",42),t.TgZ(9,"li",43)(10,"a",44),t._uU(11,"Loyalty Point"),t.qZA()()(),t.TgZ(12,"div",45)(13,"div",46)(14,"div",47),t.YNc(15,Tn,32,19,"div",16),t.qZA()(),t.TgZ(16,"div",48)(17,"div",47),t.YNc(18,An,20,2,"div",49),t.qZA()(),t.YNc(19,Mn,25,12,"div",50),t.YNc(20,On,19,2,"div",51),t.TgZ(21,"div",52)(22,"div",47)(23,"div",21)(24,"div",53)(25,"div",14)(26,"table",54)(27,"thead",55)(28,"tr")(29,"th",56),t._uU(30,"Cash Denomination"),t.qZA(),t.TgZ(31,"th",57),t._uU(32,"Qty"),t.qZA(),t.TgZ(33,"th",58),t._uU(34,"Total"),t.qZA()()(),t.TgZ(35,"tbody"),t.YNc(36,Ln,10,9,"tr",33),t.qZA(),t.TgZ(37,"tfoot")(38,"tr")(39,"th",59),t._uU(40,"Total:"),t.qZA(),t.TgZ(41,"td",60),t._uU(42),t.ALo(43,"number"),t.ALo(44,"sum"),t.qZA()()()()()()()()(),t.TgZ(45,"div",61)(46,"div",47)(47,"div",21)(48,"div",53)(49,"div",14)(50,"table",26)(51,"thead",55)(52,"tr")(53,"th",62),t._uU(54,"No"),t.qZA(),t.TgZ(55,"th",56),t._uU(56,"Number"),t.qZA(),t.TgZ(57,"th",56),t._uU(58,"Customer"),t.qZA(),t.TgZ(59,"th",35),t._uU(60,"Quantity"),t.qZA(),t.TgZ(61,"th",63),t._uU(62,"Price"),t.qZA(),t.TgZ(63,"th"),t._uU(64,"Date"),t.qZA()()(),t.TgZ(65,"tbody"),t.YNc(66,Fn,12,18,"tr",33),t.qZA(),t.TgZ(67,"tfoot")(68,"tr")(69,"td",64),t._uU(70,"Total"),t.qZA(),t._UZ(71,"td",65),t.ALo(72,"number"),t.ALo(73,"sum"),t._UZ(74,"td",65),t.ALo(75,"number"),t.ALo(76,"sum"),t.qZA()()()()()()()(),t.TgZ(77,"div",66)(78,"div",47)(79,"div",21)(80,"div",53)(81,"div",14)(82,"table",26)(83,"thead",55)(84,"tr")(85,"th",62),t._uU(86,"No"),t.qZA(),t.TgZ(87,"th",56),t._uU(88,"Date"),t.qZA(),t.TgZ(89,"th",56),t._uU(90,"Number"),t.qZA(),t.TgZ(91,"th",67),t._uU(92,"Point"),t.qZA()()(),t.TgZ(93,"tbody"),t.YNc(94,wn,11,14,"tr",33),t.qZA()()()()()()()()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf",null!=e.data.Session&&e.data.InvoiceVisible),t.xp6(1),t.Q6J("ngIf",e.data.VoidInvoice.length>0),t.xp6(1),t.Q6J("ngIf",null!=e.data.Session&&e.data.PaymentReceiveVisible),t.xp6(1),t.Q6J("ngIf",e.data.Expenses.length>0),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.SalesReturn.length>0),t.xp6(1),t.Q6J("hidden",!(e.data.LoyaltyPointhistory.length>0)),t.xp6(4),t.Tol(t.WLB(36,H,e.data.InvoiceVisible,e.data.InvoiceVisible)),t.xp6(2),t.Q6J("ngIf",null!=e.data.Session),t.xp6(3),t.Q6J("ngIf",e.data.InvoiceVisible),t.xp6(1),t.Q6J("ngIf",e.data.PaymentReceiveVisible),t.xp6(1),t.Q6J("ngIf",e.data.Expenses.length>0),t.xp6(1),t.Tol(t.WLB(39,H,!e.data.InvoiceVisible&&!e.data.PaymentReceiveVisible,!e.data.InvoiceVisible&&!e.data.PaymentReceiveVisible)),t.xp6(15),t.Q6J("ngForOf",e.data.Denominations),t.xp6(6),t.hij(" ",t.lcZ(43,21,t.xi3(44,23,e.data.Denominations,"Total"))," "),t.xp6(24),t.Q6J("ngForOf",e.data.SalesReturn),t.xp6(5),t.Q6J("innerHTML",t.lcZ(72,26,t.xi3(73,28,e.data.SalesReturn,"Quantity")),t.oJD),t.xp6(3),t.Q6J("innerHTML",t.lcZ(75,31,t.xi3(76,33,e.data.SalesReturn,"UnitPrice")),t.oJD),t.xp6(20),t.Q6J("ngForOf",e.data.LoyaltyPointhistory)}}function En(n,o){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,Ge,2,1,"div",1),t.YNc(2,Xe,30,7,"div",2),t.YNc(3,dn,10,1,"div",2),t.YNc(4,Qn,95,42,"div",2),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",null!=e.data.Warning||null!=e.data.Warning),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.Session),t.xp6(1),t.Q6J("ngIf",e.data.Session)}}let Vn=(()=>{class n{constructor(e,i,a,r){this.datePipe=e,this.Service=i,this.localData=a,this.matDialog=r,this.isEdit=!1,this.InputMode=!1,this.Expense=new G,this.loyalty=!0,this.salesreturn=!0,this.void=!0,this.denomination=!0,this.paymentReceived=!0,this.invoice=!0,this.expense=!0,this.register=!0,this.myFunct=function(_){this.data.ExpectedPaymentVisible?(_.Amount=_.AmountSUM+1*_.Start,_.ShortOver=_.AmountSUM+1*_.Start-_.Amount):(_.AmountSUM=0,_.Amount=_.Start,_.ShortOver=0)},this.DeleteExpenses=function(_){const l=this.data.Session.RegisterID,s=JSON.parse(localStorage.getItem(l));s.splice(_,1),localStorage.setItem(l,JSON.stringify(s)),this.data.Expenses.splice(_,1)},this.DenominationTotal=function(_){_.Total=_.Amount*_.Quantity},this.ChangeDifferences=function(_){this.Data.ExpectedPaymentVisible?_.ShortOver=_.Amount-(_.AmountSUM+1*_.Start):(_.AmountSUM=0,_.ShortOver=0)}}ngOnInit(){}showExpenseModal(){this.matDialog.open(B,{data:{Form:this.Expense,LabelExpense:this.data.LabelExpense,PaymentList:this.data.PaymentList,ID:this.data.Session.RegisterID}}).afterClosed().subscribe(i=>{if(null==localStorage.getItem(i.Data.ID))localStorage.setItem(i.Data.ID,JSON.stringify([i.Data]));else{const a=JSON.parse(localStorage.getItem(i.Data.ID));a.push(i.Data),localStorage.setItem(i.Data.ID,JSON.stringify(a))}this.data.Expenses.push(i.Data)})}filterAmount(e,i,a){return e.filter(function(r){return r[i]==a})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(c.uU),t.Y36(C.O),t.Y36(V.T),t.Y36(u.uw))},n.\u0275cmp=t.Xpm({type:n,selectors:[["shift-info"]],inputs:{isEdit:"isEdit",data:"data",InputMode:"InputMode"},decls:1,vars:1,consts:[[4,"ngIf"],["class","alert alert-warning","role","alert",4,"ngIf"],["class","row",4,"ngIf"],["role","alert",1,"alert","alert-warning"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"text-center"],["aria-hidden","true",1,"fa-solid","fa-location-dot"],[1,"card-body","pt-0"],[1,"text-center","fw-normal","h5"],[1,"col"],[1,"fa-regular","fa-calendar-days","me-4"],[1,"card-body"],[1,"h5","text-center","fw-normal"],["class","col",4,"ngIf"],[1,"card",2,"width","224px !important"],[1,"fa-solid","fa-file-invoice","me-4"],[1,"card-header","px-0"],[1,"fa-solid","fa-cart-arrow-down","me-4"],[1,"col-sm-12"],[1,"card","w-100"],[1,"col-12",2,"padding-left","0","padding-right","0"],[1,"table-responsive"],["class","table table-bordered",4,"ngIf"],[1,"table","table-bordered"],[1,"table-light"],[1,"border-end",2,"width","150px"],[1,"border-end","text-end","pe-10"],["class","border-end text-end pe-10",4,"ngIf"],["style","width: 200px;","class","text-end pe-10",4,"ngIf"],[1,"border-start","text-end","pe-10"],[4,"ngFor","ngForOf"],[1,"text-end","pe-10",2,"width","200px"],[1,"text-end"],["class","text-end",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-end",3,"ngClass"],[1,"text-end","fw-bold"],[1,"text-end","fw-bold",3,"ngClass"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["class","nav-item",4,"ngIf"],[1,"nav-item",3,"hidden"],["id","loyalty-tab","data-bs-toggle","tab","href","#loyalty","role","tab","aria-controls","loyalty","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content"],["id","invoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"row","g-0"],["id","void","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["class","col-12",3,"hidden",4,"ngIf"],["class","tab-pane fade mt-0 pt-0","id","payment","role","tabpanel",3,"class",4,"ngIf"],["class","tab-pane fade mt-0 pt-0","id","expense","role","tabpanel",4,"ngIf"],["id","bank","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card","border-top-0"],[1,"table","table-bordered","custom-table"],[1,"thead-light"],[1,"border-end"],[1,"border-end","text-end",2,"width","100px"],[1,"text-end","pe-8",2,"width","240px"],["colspan","2",1,"text-end"],[1,"text-end","pe-8","fw-bold"],["id","return","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end",2,"width","20px"],[1,"text-end","border-end"],["colspan","3"],[1,"text-end",3,"innerHTML"],["id","loyalty","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end","text-end"],[1,"nav-item"],["id","invoice-tab","data-bs-toggle","tab","href","#invoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link"],["expe","","id","void-tab","data-bs-toggle","tab","href","#void","role","tab","aria-controls","void","aria-selected","false",1,"nav-link"],["id","payment-tab","data-bs-toggle","tab","href","#payment","role","tab","aria-controls","payment","aria-selected","true",1,"nav-link"],["id","expense-tab","data-bs-toggle","tab","href","#expense","role","tab","aria-controls","expense","aria-selected","false",1,"nav-link"],["id","bank-tab","data-bs-toggle","tab","href","#bank","role","tab","aria-controls","bank","aria-selected","false",1,"nav-link"],["id","return-tab","data-bs-toggle","tab","href","#return","role","tab","aria-controls","return","aria-selected","false",1,"nav-link"],[1,"card","me-5","border-top-0"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end",2,"width","200px"],["class","border-end","style","width: 85px;",4,"ngIf"],[1,"border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","60px"],["colspan","4"],[3,"innerHTML"],[1,"border-end",2,"width","85px"],[1,"text-primary",3,"routerLink","queryParams"],[3,"innerHTML",4,"ngIf"],[1,"col-12",3,"hidden"],[1,"card","me-5"],["target","_blank",1,"text-primary",3,"routerLink","queryParams"],["id","payment","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"table-responsive",2,"overflow-x","auto"],["class","text-end border-end",3,"innerHTML",4,"ngFor","ngForOf"],["colspan","3",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end","border-end",3,"innerHTML"],["target","_blank",3,"queryParams","routerLink"],["id","expense","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card-body","py-5"],[1,"table","table-bordered","mb-6"],["class","border-end","width","15px",4,"ngIf"],[1,"border-end","text-end",2,"width","150px"],["width","15px",1,"border-end"],["type","button","class","btn btn-outline-dark btn-sm bg-white text-black","matTooltipPosition","above","matTooltip","Add Expense",3,"click",4,"ngIf"],["type","button","matTooltipPosition","above","matTooltip","Add Expense",1,"btn","btn-outline-dark","btn-sm","bg-white","text-black",3,"click"],["aria-hidden","true",1,"fa-solid","fa-plus"],[1,"fa-solid","fa-xmark","fa-lg","text-danger",2,"cursor","pointer",3,"click"],[1,"fw-bold"],[1,"text-end",3,"hidden"],[1,"text-end","pe-8"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange","keyup"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,i){1&e&&t.YNc(0,En,5,4,"div",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[c.mk,c.sg,c.O5,p.Fj,p.JJ,p.On,T.b,g.yS,c.JJ,c.uU,h.qU,h.W7,h.$k,h.d5],encapsulation:2}),n})(),Rn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[c.ez,h.dr,v.d,p.u5,p.UX,tt.X,g.Bz]}),n})();function kn(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"a",9),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.exportCSV(a.csvConverter,"ShiftExport/EndOfShiftDetailExport","End_of_day_detail_report.csv"))}),t._UZ(1,"i",10),t._uU(2," Export "),t.qZA()}}const Yn=function(){return["/print/RegisterClosure"]},Hn=function(n){return{id:n}};function $n(n,o){if(1&n&&(t.TgZ(0,"div",5)(1,"a",6),t._UZ(2,"i",7),t._uU(3," Print "),t.qZA(),t.YNc(4,kn,3,0,"a",8),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("routerLink",t.DdM(3,Yn))("queryParams",t.VKq(4,Hn,e.data.Session.ID)),t.xp6(3),t.Q6J("ngIf",e.roleService.global.Export)}}const Kn=function(){return["/menu/Shift/Main/Previous_Shift/Register_Shift_Form"]},Bn=function(n){return{ID:n}};function Gn(n,o){if(1&n&&(t.TgZ(0,"a",13),t._UZ(1,"i",14),t._uU(2," Edit "),t.qZA()),2&n){const e=t.oxw(3);t.Q6J("routerLink",t.DdM(2,Kn))("queryParams",t.VKq(3,Bn,e.data.Session.ID))}}function Wn(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"a",15),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return t.KtG(a.delete(a.data.Session.ID))}),t._UZ(1,"i",16),t._uU(2," Delete"),t.qZA()}}function zn(n,o){if(1&n&&(t.TgZ(0,"div",5),t.YNc(1,Gn,3,5,"a",11),t.YNc(2,Wn,3,0,"a",12),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.roleService.shift.Edit),t.xp6(1),t.Q6J("ngIf",e.roleService.shift.Delete)}}function Xn(n,o){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,$n,5,6,"div",2),t.YNc(3,zn,3,2,"div",2),t.qZA(),t.TgZ(4,"content")(5,"div",3),t._UZ(6,"shift-info",4),t.qZA()()()),2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",e.data.Session.ID),t.xp6(1),t.Q6J("ngIf",e.data.Session.ID),t.xp6(3),t.Q6J("data",e.data)("InputMode",e.InputMode)}}let ti=(()=>{class n extends k.n{constructor(e,i,a,r,_,l,s){super(i,"Shift/EndOfShiftDetail",null,_,a),this.csvConverter=e,this.activatedRoute=a,this.matDialog=r,this.toaster=_,this.router=l,this.roleService=s,this.InputMode=!1,this.Detail=!0}preGetList(){this.route&&(this.pageData.Filter={ID:this.route.snapshot.queryParams.ID})}RefreshSalesTax(){this.httpService.post("/API/Report/RefreshValueSalesTax",JSON.stringify({Invoices:this.data.Invoices,Session:this.data.Session,VoidInvoice:this.data.VoidInvoice})).subscribe({next:i=>{this.data.Session=i},error:i=>this.toaster.error(i,x.n.Error)})}delete(e){confirm("Are you sure you want to delete this record?")&&null!=e&&this.httpService.post("/API/Shift/DeleteEndOFShiftDetail",JSON.stringify({ID:e})).subscribe({next:a=>{this.router.navigate(["/menu/Shift/Main/Previous_Shift"]),this.toaster.success("Success Delete Shift",x.n.Success)},error:a=>this.toaster.error(a,x.n.Error)})}showJournalModal(){this.matDialog.open(Be,{data:this.data}).afterClosed().subscribe(i=>{i&&this.httpService.post("/API/Report/RegenerateEODJournal",JSON.stringify({ID:this.data.Session.ID,PostDate:i.PostDate})).subscribe({next:r=>{this.getListData()},error:r=>this.toaster.error(r,x.n.Error)})})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(z.O),t.Y36(C.O),t.Y36(g.gz),t.Y36(u.uw),t.Y36(A._W),t.Y36(g.F0),t.Y36(Y.N))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-register-detail"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn-group mx-3",4,"ngIf"],[1,"container-fluid","bg-light-gray","pt-4"],[3,"data","InputMode"],[1,"btn-group","mx-3"],["matTooltipPosition","above","matTooltip","Print Original","target","_blank",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["class","btn btn-outline-secondary","matTooltipPosition","above","matTooltip","edit",3,"routerLink","queryParams",4,"ngIf"],["role","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["matTooltipPosition","above","matTooltip","edit",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash"]],template:function(e,i){1&e&&t.YNc(0,Xn,7,7,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",i.data)},dependencies:[q.p,c.O5,g.yS,Vn],encapsulation:2}),n})();var $=d(39646),nt=d(97272),it=d(34782),ot=d(11365),ei=d(63900),j=d(95698),ni=d(39841),ii=d(68675),oi=d(18505);let ai=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,this.config=new b.O,this.config.title="Close Shift",this.note=i.note,this.visitors=i.visitors}onOk(){this.dialogRef.close({note:this.note,visitors:this.visitors})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.so),t.Y36(u.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-close-shift"]],decls:14,vars:3,consts:[[3,"config","onOk","onCancel","onClose"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["id","desc","placeholder","Note","rows","6",1,"form-control","w-100",3,"ngModel","ngModelChange"],["for","desc"],["type","text","autoNum","","name","visitor",1,"form-control",3,"ngModel","ngModelChange"],["for","visitor"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onCancel",function(){return i.dialogRef.close()})("onClose",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"textarea",4),t.NdJ("ngModelChange",function(r){return i.note=r}),t.qZA(),t.TgZ(6,"label",5),t._uU(7,"Note"),t.qZA()()()(),t.TgZ(8,"div",1)(9,"div",2)(10,"div",3)(11,"input",6),t.NdJ("ngModelChange",function(r){return i.visitors=r}),t.qZA(),t.TgZ(12,"label",7),t._uU(13,"Visitors"),t.qZA()()()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(5),t.Q6J("ngModel",i.note),t.xp6(6),t.Q6J("ngModel",i.visitors))},dependencies:[p.Fj,p.JJ,p.On,v.M,T.b]}),n})();const at=function(n){return{selected:n}};let ri=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,this.config=new b.O,this.action="ADD",this.isNotEmpty=m.gT.IsNotEmpty,this.config.title="Expense",i.expense?(this.expense={...i.expense},this.action="EDIT"):this.expense={Amount:0,ExpenseID:m.gT.GuidEmpty,Name:"",Note:"",PaymentID:m.gT.GuidEmpty,PaymentName:""},this.labels=i.labels,this.methods=i.paymentMethods}onSelectLabel(e){this.expense.Name=e.Name}onSelectMethod(e){this.expense.PaymentName=e.Name}onOk(){this.dialogRef.close({action:this.action,expense:this.expense})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(u.so),t.Y36(u.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-modal-expense"]],decls:26,vars:13,consts:[[3,"config","onOk","onClose","onCancel"],[2,"width","350px"],[1,"row"],[1,"col-sm-6"],[1,"form-floating-outline",3,"ngClass"],["id","label","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"ngModel","items","change","ngModelChange"],["for","label"],["id","payment","bindLabel","Name","bindValue","ID",1,"productform","w-100",3,"ngModel","items","ngModelChange","change"],["for","payment"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","name","Amount","autoNum","","autofocus","",1,"form-control",3,"ngModel","ngModelChange"],["for","amount"],["rows","5","id","desc","placeholder","Note",1,"form-control","w-100",3,"ngModel","ngModelChange"],["for","desc"]],template:function(e,i){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return i.onOk()})("onClose",function(){return i.dialogRef.close()})("onCancel",function(){return i.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"ng-select",5),t.NdJ("change",function(r){return i.onSelectLabel(r)})("ngModelChange",function(r){return i.expense.ExpenseID=r}),t.qZA(),t.TgZ(7,"label",6),t._uU(8,"Select Label"),t.qZA()()(),t.TgZ(9,"div",3)(10,"div",4)(11,"ng-select",7),t.NdJ("ngModelChange",function(r){return i.expense.PaymentID=r})("change",function(r){return i.onSelectMethod(r)}),t.qZA(),t.TgZ(12,"label",8),t._uU(13,"Payment Method"),t.qZA()()()(),t.TgZ(14,"div",2)(15,"div",9)(16,"div",10)(17,"input",11),t.NdJ("ngModelChange",function(r){return i.expense.Amount=r}),t.qZA(),t.TgZ(18,"label",12),t._uU(19,"Amount"),t.qZA()()()(),t.TgZ(20,"div",2)(21,"div",9)(22,"div",10)(23,"textarea",13),t.NdJ("ngModelChange",function(r){return i.expense.Note=r}),t.qZA(),t.TgZ(24,"label",14),t._uU(25,"Note"),t.qZA()()()()()()()),2&e&&(t.Q6J("config",i.config),t.xp6(5),t.Q6J("ngClass",t.VKq(9,at,i.isNotEmpty(i.expense.ExpenseID))),t.xp6(1),t.Q6J("ngModel",i.expense.ExpenseID)("items",i.labels),t.xp6(4),t.Q6J("ngClass",t.VKq(11,at,i.isNotEmpty(i.expense.PaymentID))),t.xp6(1),t.Q6J("ngModel",i.expense.PaymentID)("items",i.methods),t.xp6(6),t.Q6J("ngModel",i.expense.Amount),t.xp6(6),t.Q6J("ngModel",i.expense.Note))},dependencies:[c.mk,p.Fj,p.JJ,p.On,v.M,S.w9,T.b]}),n})();var _i=d(55266),rt=d(70585);function di(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"button",6),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(2);return t.KtG(a.onPreview())}),t._uU(1,"Preview"),t.qZA()}}function si(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"button",7),t.NdJ("click",function(){const r=t.CHM(e).ngIf,_=t.oxw(2);return t.KtG(_.openCloseModal(r))}),t._uU(1),t.ALo(2,"async"),t.qZA()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(t.lcZ(2,1,e.isEdit$)?"Save":"Add")}}function li(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"h3"),t._UZ(6,"i",14),t._uU(7," Register "),t.qZA()(),t.TgZ(8,"div",15)(9,"ng-select",16),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf,l=t.oxw(3);return t.KtG(l.changeRegCash(_,a,"RegisterID"))}),t.ALo(10,"async"),t.ALo(11,"async"),t.qZA()()()(),t.TgZ(12,"div",11)(13,"div",12)(14,"div",13)(15,"h3"),t._UZ(16,"i",17),t._uU(17," Cashier "),t.qZA()(),t.TgZ(18,"div",15)(19,"ng-select",18),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf,l=t.oxw(3);return t.KtG(l.changeRegCash(_,a,"UserID"))}),t.ALo(20,"async"),t.qZA()()()(),t.TgZ(21,"div",11)(22,"div",12)(23,"div",13)(24,"h3"),t._UZ(25,"i",19),t._uU(26," Opening / Closing "),t.qZA()(),t.TgZ(27,"div",20)(28,"div",21)(29,"datepicker",22),t.NdJ("dateChange",function(a){const _=t.CHM(e).ngIf,l=t.oxw(3);return t.KtG(l.onChangeDate(_,a,"Start"))}),t.qZA(),t.TgZ(30,"p-calendar",23),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf,l=t.oxw(3);return t.KtG(l.onChangeTime(_,a,"StartTime"))}),t.qZA()(),t.TgZ(31,"span",24),t._uU(32,"/"),t.qZA(),t.TgZ(33,"div",21)(34,"datepicker",22),t.NdJ("dateChange",function(a){const _=t.CHM(e).ngIf,l=t.oxw(3);return t.KtG(l.onChangeDate(_,a,"End"))}),t.qZA(),t.TgZ(35,"p-calendar",23),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).ngIf,l=t.oxw(3);return t.KtG(l.onChangeTime(_,a,"EndTime"))}),t.qZA()()()()()()()}if(2&n){const e=o.ngIf,i=t.oxw(3);t.xp6(9),t.Q6J("readonly",t.lcZ(10,13,i.isEdit$))("items",t.lcZ(11,15,i.registers$))("ngModel",e.Form.RegisterID),t.xp6(10),t.Q6J("items",t.lcZ(20,17,i.cashiers$))("ngModel",e.Form.UserID),t.xp6(10),t.Q6J("date",e.Form.Start)("isFloatingLabel",!1),t.xp6(1),t.Q6J("ngModel",e.Form.StartTime)("timeOnly",!0),t.xp6(4),t.Q6J("date",e.Form.End)("isFloatingLabel",!1),t.xp6(1),t.Q6J("ngModel",e.Form.EndTime)("timeOnly",!0)}}function ci(n,o){if(1&n&&(t.ynx(0),t.YNc(1,li,36,19,"div",8),t.ALo(2,"async"),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",t.lcZ(2,1,e.endOfShiftForm$))}}function pi(n,o){1&n&&(t.TgZ(0,"th",83),t._uU(1,"Expected"),t.qZA())}function mi(n,o){1&n&&(t.TgZ(0,"th",87),t._uU(1," Differences"),t.qZA())}function ui(n,o){if(1&n&&(t.TgZ(0,"td",87),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.Expected)," ")}}const _t=function(n,o){return{"text-success":n,"text-danger":o}};function gi(n,o){if(1&n&&(t.TgZ(0,"td",87),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.Tol(t.WLB(5,_t,e.ShortOver>0,e.ShortOver<0)),t.xp6(1),t.hij(" ",t.lcZ(2,3,e.ShortOver)," ")}}function fi(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",89)(4,"input",90),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).$implicit,l=t.oxw(2).ngIf,s=t.oxw(3);return t.KtG(s.onChangeStart(l,_,a))}),t.qZA()(),t.TgZ(5,"td",87),t._uU(6),t.ALo(7,"number"),t.qZA(),t.YNc(8,ui,3,3,"td",85),t.TgZ(9,"td",89)(10,"input",91),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).$implicit,l=t.oxw(2).ngIf,s=t.oxw(3);return t.KtG(s.onChangeDifferences(l,_,a))}),t.qZA()(),t.YNc(11,gi,3,8,"td",92),t.TgZ(12,"td")(13,"input",93),t.NdJ("ngModelChange",function(a){const _=t.CHM(e).$implicit;return t.KtG(_.Note=a)}),t.qZA()()()}if(2&n){const e=o.$implicit,i=t.oxw(2).ngIf;t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Q6J("ngModel",e.Start)("disabled",!i.ExpectedPaymentVisible),t.xp6(2),t.hij(" ",t.lcZ(7,8,e.Received)," "),t.xp6(2),t.Q6J("ngIf",i.ExpectedPaymentVisible),t.xp6(2),t.Q6J("ngModel",e.Amount),t.xp6(1),t.Q6J("ngIf",i.ExpectedPaymentVisible),t.xp6(2),t.Q6J("ngModel",e.Note)}}function hi(n,o){if(1&n&&(t.TgZ(0,"section",76)(1,"div",10)(2,"div",77)(3,"div",78)(4,"div",79)(5,"h2"),t._uU(6,"Payments"),t.qZA()(),t.TgZ(7,"div",15)(8,"div",77)(9,"table",80)(10,"thead",81)(11,"tr")(12,"th",48),t._uU(13,"Payment"),t.qZA(),t.TgZ(14,"th",82),t._uU(15,"Start"),t.qZA(),t.TgZ(16,"th",83),t._uU(17,"Received"),t.qZA(),t.YNc(18,pi,2,0,"th",84),t.TgZ(19,"th",82),t._uU(20,"Counted"),t.qZA(),t.YNc(21,mi,2,0,"th",85),t.TgZ(22,"th",86),t._uU(23,"Note"),t.qZA()()(),t.TgZ(24,"tbody"),t.YNc(25,fi,14,10,"tr",61),t.qZA(),t.TgZ(26,"tfoot")(27,"tr")(28,"th"),t._uU(29,"Total:"),t.qZA(),t.TgZ(30,"td",87)(31,"b"),t._uU(32),t.ALo(33,"number"),t.ALo(34,"sum"),t.qZA()(),t.TgZ(35,"td",87)(36,"b"),t._uU(37),t.ALo(38,"number"),t.ALo(39,"sum"),t.qZA()(),t.TgZ(40,"td",87)(41,"b"),t._uU(42),t.ALo(43,"number"),t.ALo(44,"sum"),t.qZA()(),t.TgZ(45,"td",87)(46,"b"),t._uU(47),t.ALo(48,"number"),t.ALo(49,"sum"),t.qZA()(),t.TgZ(50,"td",88),t.ALo(51,"sum"),t.ALo(52,"sum"),t._uU(53),t.ALo(54,"number"),t.ALo(55,"sum"),t.qZA()()()()()()()()()()),2&n){const e=t.oxw().ngIf,i=t.oxw(3);t.xp6(18),t.Q6J("ngIf",e.ExpectedPaymentVisible),t.xp6(3),t.Q6J("ngIf",e.ExpectedPaymentVisible),t.xp6(4),t.Q6J("ngForOf",e.Payments)("ngForTrackBy",i.tbPayments),t.xp6(7),t.Oqu(t.lcZ(33,11,t.xi3(34,13,e.Payments,"Start"))),t.xp6(5),t.Oqu(t.lcZ(38,16,t.xi3(39,18,e.Payments,"Received"))),t.xp6(5),t.Oqu(t.lcZ(43,21,t.xi3(44,23,e.Payments,"Expected"))),t.xp6(5),t.Oqu(t.lcZ(48,26,t.xi3(49,28,e.Payments,"Amount"))),t.xp6(3),t.Tol(t.WLB(42,_t,t.xi3(51,31,e.Payments,"ShortOver")>0,t.xi3(52,34,e.Payments,"ShortOver")<0)),t.xp6(3),t.hij(" ",t.lcZ(54,37,t.xi3(55,39,e.Payments,"ShortOver"))," ")}}function xi(n,o){1&n&&(t.TgZ(0,"li",36)(1,"a",94),t._uU(2,"Invoice"),t.qZA()())}function Zi(n,o){1&n&&(t.TgZ(0,"li",36)(1,"a",95),t._uU(2,"Payment Received"),t.qZA()())}function vi(n,o){1&n&&(t.TgZ(0,"li",36)(1,"a",96),t._uU(2,"Void Invoice"),t.qZA()())}function Ti(n,o){1&n&&(t.TgZ(0,"li",36)(1,"a",97),t._uU(2,"Sales Return"),t.qZA()())}function bi(n,o){1&n&&(t.TgZ(0,"li",36)(1,"a",98),t._uU(2,"Loyalty Point History"),t.qZA()())}const E=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},D=function(n){return{ID:n}},Ai=function(n,o,e){return{"text-success":n,"text-warning":o,"text-danger":e}};function Ci(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td",67),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",106),t._uU(5),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.ALo(8,"date"),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.ALo(11,"date"),t.qZA(),t.TgZ(12,"td",67),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",107),t._uU(16),t.ALo(17,"number"),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(2),t.Oqu(i+1),t.xp6(2),t.Q6J("routerLink",t.DdM(19,E))("queryParams",t.VKq(20,D,e.ID)),t.xp6(1),t.hij(" ",e.Number,""),t.xp6(2),t.hij(" ",t.xi3(8,9,e.Date,"dd MMM yyyy"),""),t.xp6(3),t.Oqu(t.xi3(11,12,e.Created,"HH:mm")),t.xp6(3),t.Oqu(t.lcZ(14,15,e.Quantity)),t.xp6(2),t.Q6J("ngClass",t.kEZ(22,Ai,3==e.PaymentStateID,2==e.PaymentStateID,1==e.PaymentStateID)),t.xp6(1),t.Oqu(t.lcZ(17,17,e.SalesNTax))}}function qi(n,o){if(1&n&&(t.TgZ(0,"div",99)(1,"div",44)(2,"div",15)(3,"table",45)(4,"thead",46)(5,"tr")(6,"th",47),t._uU(7,"No"),t.qZA(),t.TgZ(8,"th",55),t._uU(9,"Number"),t.qZA(),t.TgZ(10,"th",100),t._uU(11," Date"),t.qZA(),t.TgZ(12,"th",101),t._uU(13,"Time"),t.qZA(),t.TgZ(14,"th",102),t._uU(15,"Qty"),t.qZA(),t.TgZ(16,"th",103),t._uU(17,"Nett"),t.qZA()()(),t.TgZ(18,"tbody"),t.YNc(19,Ci,18,26,"tr",50),t.qZA(),t.TgZ(20,"tfoot")(21,"tr"),t._UZ(22,"td",104),t.TgZ(23,"td",105),t._uU(24),t.ALo(25,"number"),t.ALo(26,"sum"),t.qZA(),t.TgZ(27,"td",105),t._uU(28),t.ALo(29,"number"),t.ALo(30,"sum"),t.qZA()()()()()()()),2&n){const e=t.oxw().ngIf;t.xp6(19),t.Q6J("ngForOf",e.Invoices),t.xp6(5),t.hij(" ",t.lcZ(25,3,t.xi3(26,5,e.Invoices,"Quantity"))," "),t.xp6(4),t.hij(" ",t.lcZ(29,8,t.xi3(30,10,e.Invoices,"SalesNTax"))," ")}}function yi(n,o){if(1&n&&(t.TgZ(0,"th",56),t._uU(1),t.qZA()),2&n){const e=o.$implicit;t.xp6(1),t.hij(" ",e.Name,"")}}function Si(n,o){if(1&n&&(t.TgZ(0,"td",67),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=o.index,i=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,i.Amounts[e]),"")}}const Ii=function(n){return[n]};function Mi(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td",67),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"a",108),t._uU(5),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.YNc(8,Si,3,3,"td",52),t.qZA()),2&n){const e=o.$implicit,i=o.index,a=t.oxw().ngIf;t.xp6(2),t.Oqu(i+1),t.xp6(2),t.Q6J("queryParams",t.VKq(6,D,e.InvoiceID))("routerLink",t.VKq(8,Ii,1==e.TypeID?"/menu/Orders/Orders/Customer_Invoice/Info":"/menu/Debt/Advance/AR_Collection/Info")),t.xp6(1),t.Oqu(e.Number),t.xp6(2),t.Oqu(e.CustomerName),t.xp6(1),t.Q6J("ngForOf",a.PaymentMethods)}}function Ui(n,o){if(1&n&&(t.TgZ(0,"td",67),t._uU(1),t.ALo(2,"number"),t.ALo(3,"SumWithIndex"),t.qZA()),2&n){const e=o.index,i=t.oxw().ngIf;t.xp6(1),t.hij(" ",t.lcZ(2,1,t.Dn7(3,3,i.PaymentReceived,"Amounts",e))," ")}}function Ji(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"th",109)(1,"h1")(2,"i",110),t.NdJ("click",function(){t.CHM(e);const a=t.oxw().ngIf,r=t.oxw(3);return t.KtG(r.openModalExpense(a))}),t.qZA()()()}}function Di(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"td",113)(1,"i",114),t.NdJ("click",function(){t.CHM(e);const a=t.oxw().index,r=t.oxw().ngIf,_=t.oxw(3);return t.KtG(_.removeExpense(r,a))}),t.qZA()()}}function Ni(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"tr",111),t.NdJ("click",function(){const a=t.CHM(e),r=a.index,_=a.$implicit,l=t.oxw().ngIf,s=t.oxw(3);return t.KtG(s.openModalExpense(l,r,_))}),t.YNc(1,Di,2,0,"td",112),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td",67),t._uU(5),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA()()}if(2&n){const e=o.$implicit,i=t.oxw().ngIf;t.xp6(1),t.Q6J("ngIf",i.InputMode),t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(t.lcZ(6,5,e.Amount)),t.xp6(3),t.Oqu(e.PaymentName),t.xp6(2),t.Oqu(e.Note)}}function Oi(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"input",91),t.NdJ("ngModelChange",function(a){const r=t.CHM(e),_=r.$implicit,l=r.index,s=t.oxw().ngIf,f=t.oxw(3);return t.KtG(f.onChangeDenomQty(s,_,a,l))}),t.qZA()(),t.TgZ(5,"td",67),t._uU(6),t.ALo(7,"number"),t.qZA()()}if(2&n){const e=o.$implicit;t.xp6(2),t.Oqu(e.PriceDisplay),t.xp6(2),t.Q6J("ngModel",e.Quantity),t.xp6(2),t.hij("",t.lcZ(7,3,e.Quantity*e.Amount)," ")}}function Pi(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",115),t.TgZ(2,"td")(3,"a",116),t._uU(4),t.qZA()(),t.TgZ(5,"td"),t._uU(6),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,"IsMinDate"),t.qZA(),t.TgZ(13,"td",67),t._uU(14),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(14,E))("queryParams",t.VKq(15,D,e.ID)),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(2),t.Oqu(e.CustomerName),t.xp6(2),t.Oqu(t.xi3(9,8,e.Date,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(12,11,e.Due,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.Payment)}}function Li(n,o){if(1&n&&(t.TgZ(0,"tr"),t._UZ(1,"td",115),t.TgZ(2,"td")(3,"a",117),t._uU(4),t.qZA()(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td",67),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"td",67),t._uU(11),t.ALo(12,"number"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.ALo(15,"date"),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(1),t.Q6J("innerHTML",i+1,t.oJD),t.xp6(2),t.Q6J("routerLink",t.DdM(15,E))("queryParams",t.VKq(16,D,e.InvoiceID)),t.xp6(1),t.hij(" ",e.Number," "),t.xp6(2),t.Oqu(e.CustomerName),t.xp6(2),t.hij(" ",t.lcZ(9,8,e.Quantity),""),t.xp6(3),t.hij(" ",t.lcZ(12,10,e.UnitPrice),""),t.xp6(3),t.Oqu(t.xi3(15,12,e.Created,"dd MMM yyyy"))}}function Fi(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"td")(7,"a",116),t._uU(8),t.qZA()(),t.TgZ(9,"td",67),t._uU(10),t.ALo(11,"number"),t.qZA()()),2&n){const e=o.$implicit,i=o.index;t.xp6(2),t.Oqu(i+1),t.xp6(2),t.Oqu(t.xi3(5,6,e.Created,"dd MMM yyyy")),t.xp6(3),t.Q6J("routerLink",t.DdM(11,E))("queryParams",t.VKq(12,D,e.InvoiceID)),t.xp6(1),t.hij(" ",e.InvoiceNumber," "),t.xp6(2),t.Oqu(t.lcZ(11,9,-1*e.Points))}}function wi(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"th"),t._uU(2),t.qZA(),t.TgZ(3,"td",71),t._uU(4,":"),t.qZA(),t.TgZ(5,"td",67),t._uU(6),t.ALo(7,"number"),t.qZA()()),2&n){const e=t.oxw().ngIf;t.xp6(2),t.Oqu(e.Label.Taxable),t.xp6(4),t.Oqu(t.lcZ(7,2,e.Session.Taxable))}}function Qi(n,o){if(1&n&&(t.TgZ(0,"tr")(1,"th"),t._uU(2),t.qZA(),t.TgZ(3,"td",71),t._uU(4,":"),t.qZA(),t.TgZ(5,"td",67),t._uU(6),t.qZA()()),2&n){const e=t.oxw().ngIf;t.xp6(2),t.Oqu(e.Label.TaxEmapt),t.xp6(4),t.Oqu(e.Session.TaxExempt)}}function Ei(n,o){if(1&n&&(t.TgZ(0,"div",9)(1,"section",25)(2,"div",10)(3,"div",26)(4,"div",12)(5,"div",13)(6,"h3"),t._UZ(7,"i",17),t._uU(8," Cashier / "),t._UZ(9,"i",14),t._uU(10," Register"),t.qZA()(),t.TgZ(11,"div",15)(12,"div",27),t._uU(13),t.qZA()()()(),t.TgZ(14,"div",28)(15,"div",12)(16,"div",13)(17,"h3"),t._UZ(18,"i",19),t._uU(19," Opening"),t.qZA()(),t.TgZ(20,"div",15)(21,"div",27),t._uU(22),t.ALo(23,"date"),t.qZA()()()(),t.TgZ(24,"div",28)(25,"div",12)(26,"div",13)(27,"h3"),t._UZ(28,"i",19),t._uU(29," Closing"),t.qZA()(),t.TgZ(30,"div",15)(31,"div",27),t._uU(32),t.ALo(33,"date"),t.qZA()()()(),t.TgZ(34,"div",28)(35,"div",12)(36,"div",13)(37,"h3"),t._UZ(38,"i",29),t._uU(39," Invoice / Void"),t.qZA()(),t.TgZ(40,"div",15)(41,"div",27),t._uU(42),t.qZA()()()(),t.TgZ(43,"div",28)(44,"div",12)(45,"div",13)(46,"h3"),t._UZ(47,"i",30),t._uU(48," Sales + Tax + Surcharge"),t.qZA()(),t.TgZ(49,"div",15)(50,"div",27),t._uU(51),t.ALo(52,"number"),t.qZA()()()()()(),t.YNc(53,hi,56,45,"section",31),t.TgZ(54,"section",32)(55,"div",10)(56,"div",33)(57,"ul",34),t.YNc(58,xi,3,0,"li",35),t.YNc(59,Zi,3,0,"li",35),t.TgZ(60,"li",36)(61,"a",37),t._uU(62,"Expense"),t.qZA()(),t.TgZ(63,"li",36)(64,"a",38),t._uU(65,"Denomination"),t.qZA()(),t.YNc(66,vi,3,0,"li",35),t.YNc(67,Ti,3,0,"li",35),t.TgZ(68,"li",36)(69,"a",39),t._uU(70,"Gross Sales History"),t.qZA()(),t.YNc(71,bi,3,0,"li",35),t.TgZ(72,"li",36)(73,"a",40),t._uU(74,"Z-Index"),t.qZA()()(),t.TgZ(75,"div",41),t.YNc(76,qi,31,13,"div",42),t.TgZ(77,"div",43)(78,"div",44)(79,"div",15)(80,"table",45)(81,"thead",46)(82,"tr")(83,"th",47),t._uU(84,"No"),t.qZA(),t.TgZ(85,"th",48),t._uU(86,"Number"),t.qZA(),t.TgZ(87,"th",48),t._uU(88,"Customer"),t.qZA(),t.YNc(89,yi,2,1,"th",49),t.qZA()(),t.TgZ(90,"tbody"),t.YNc(91,Mi,9,10,"tr",50),t.qZA(),t.TgZ(92,"tfoot")(93,"tr")(94,"td",51)(95,"b"),t._uU(96,"sum:"),t.qZA()(),t.YNc(97,Ui,4,7,"td",52),t.qZA()()()()()(),t.TgZ(98,"div",53)(99,"div",44)(100,"div",15)(101,"table",45)(102,"thead",46)(103,"tr"),t.YNc(104,Ji,3,0,"th",54),t.TgZ(105,"th",55),t._uU(106,"Label"),t.qZA(),t.TgZ(107,"th",56),t._uU(108,"Amount "),t.qZA(),t.TgZ(109,"th",48),t._uU(110,"Payment"),t.qZA(),t.TgZ(111,"th",48),t._uU(112,"Note"),t.qZA()()(),t.TgZ(113,"tbody"),t.YNc(114,Ni,11,7,"tr",57),t.qZA()()()()(),t.TgZ(115,"div",58)(116,"div",44)(117,"div",15)(118,"table",45)(119,"thead",46)(120,"tr")(121,"th",48),t._uU(122,"Cash Denomination "),t.qZA(),t.TgZ(123,"th",59),t._uU(124,"QTY"),t.qZA(),t.TgZ(125,"th",60),t._uU(126,"Total"),t.qZA()()(),t.TgZ(127,"tbody"),t.YNc(128,Oi,8,5,"tr",61),t.qZA(),t.TgZ(129,"tfoot")(130,"tr")(131,"th",62),t._uU(132,"Total:"),t.qZA(),t.TgZ(133,"td",63),t._uU(134),t.ALo(135,"number"),t.ALo(136,"async"),t.qZA()()()()()()(),t.TgZ(137,"div",64)(138,"div",44)(139,"div",15)(140,"table",45)(141,"thead",46)(142,"tr")(143,"th",65),t._uU(144,"No"),t.qZA(),t.TgZ(145,"th",48),t._uU(146,"Number"),t.qZA(),t.TgZ(147,"th",48),t._uU(148,"Customer"),t.qZA(),t.TgZ(149,"th",48),t._uU(150,"Date"),t.qZA(),t.TgZ(151,"th",48),t._uU(152,"Due"),t.qZA(),t.TgZ(153,"th",48),t._uU(154,"Payment"),t.qZA()()(),t.TgZ(155,"tbody"),t.YNc(156,Pi,15,17,"tr",50),t.qZA()()()()(),t.TgZ(157,"div",66)(158,"div",44)(159,"div",15)(160,"table",45)(161,"thead",46)(162,"tr")(163,"th",65),t._uU(164,"No"),t.qZA(),t.TgZ(165,"th",48),t._uU(166,"Number"),t.qZA(),t.TgZ(167,"th",48),t._uU(168,"Customer"),t.qZA(),t.TgZ(169,"th",67),t._uU(170,"Quantity"),t.qZA(),t.TgZ(171,"th",56),t._uU(172,"Price"),t.qZA(),t.TgZ(173,"th"),t._uU(174,"Date"),t.qZA()()(),t.TgZ(175,"tbody"),t.YNc(176,Li,16,18,"tr",50),t.qZA(),t.TgZ(177,"tfoot")(178,"tr")(179,"td",68),t._uU(180,"Total"),t.qZA(),t.TgZ(181,"td",67),t._uU(182),t.ALo(183,"number"),t.ALo(184,"sum"),t.qZA(),t.TgZ(185,"td",67),t._uU(186),t.ALo(187,"number"),t.ALo(188,"sum"),t.qZA()()()()()()(),t.TgZ(189,"div",69)(190,"div",44)(191,"div",15)(192,"table",70)(193,"tr")(194,"th"),t._uU(195,"Z-Count"),t.qZA(),t.TgZ(196,"td",71),t._uU(197,":"),t.qZA(),t.TgZ(198,"td",67),t._uU(199),t.ALo(200,"number"),t.qZA()(),t.TgZ(201,"tr")(202,"th"),t._uU(203,"Current"),t.qZA(),t.TgZ(204,"td",71),t._uU(205,":"),t.qZA(),t.TgZ(206,"td",67),t._uU(207),t.ALo(208,"number"),t.ALo(209,"sum"),t.qZA()(),t.TgZ(210,"tr")(211,"th"),t._uU(212,"Previous"),t.qZA(),t.TgZ(213,"td",71),t._uU(214,":"),t.qZA(),t.TgZ(215,"td",67),t._uU(216),t.ALo(217,"number"),t.qZA()(),t.TgZ(218,"tr")(219,"th"),t._uU(220,"Accumulated"),t.qZA(),t.TgZ(221,"td",71),t._uU(222,":"),t.qZA(),t.TgZ(223,"td",67),t._uU(224),t.ALo(225,"number"),t.ALo(226,"sum"),t.qZA()()()()()(),t.TgZ(227,"div",72)(228,"div",44)(229,"div",15)(230,"table",45)(231,"thead",46)(232,"tr")(233,"th",65),t._uU(234,"No"),t.qZA(),t.TgZ(235,"th",48),t._uU(236,"Date"),t.qZA(),t.TgZ(237,"th",48),t._uU(238,"Number"),t.qZA(),t.TgZ(239,"th",73),t._uU(240,"Point"),t.qZA()()(),t.TgZ(241,"tbody"),t.YNc(242,Fi,12,14,"tr",50),t.qZA()()()()(),t.TgZ(243,"div",74)(244,"div",44)(245,"div",15)(246,"table",70)(247,"tr")(248,"th"),t._uU(249,"Sales"),t.qZA(),t.TgZ(250,"td",71),t._uU(251,":"),t.qZA(),t.TgZ(252,"td",67),t._uU(253),t.ALo(254,"number"),t.qZA()(),t.TgZ(255,"tr")(256,"th"),t._uU(257),t.qZA(),t.TgZ(258,"td",71),t._uU(259,":"),t.qZA(),t.TgZ(260,"td",67),t._uU(261),t.ALo(262,"number"),t.qZA()(),t.TgZ(263,"tr")(264,"th"),t._uU(265,"Invoice Count"),t.qZA(),t.TgZ(266,"td",71),t._uU(267,":"),t.qZA(),t.TgZ(268,"td",67),t._uU(269),t.ALo(270,"number"),t.qZA()(),t.YNc(271,wi,8,4,"tr",75),t.YNc(272,Qi,7,2,"tr",75),t.TgZ(273,"tr")(274,"th"),t._uU(275,"Last Invoice"),t.qZA(),t.TgZ(276,"td",71),t._uU(277,":"),t.qZA(),t.TgZ(278,"td",67),t._uU(279),t.qZA()()()()()()()()()()()),2&n){const e=o.ngIf,i=t.oxw(3);t.xp6(13),t.AsE(" ",e.Session.UserName," / ",e.Session.RegisterName," "),t.xp6(9),t.hij(" ",t.xi3(23,38,e.Session.Start,"dd MMM yyyy HH:mm")," "),t.xp6(10),t.hij(" ",t.xi3(33,41,e.Session.End,"dd MMM yyyy HH:mm")," "),t.xp6(10),t.AsE(" ",e.Invoices.length," / ",e.VoidInvoice.length," "),t.xp6(9),t.hij(" ",t.lcZ(52,44,e.Session.Sales+e.Session.Tax+e.Session.Surcharge)," "),t.xp6(2),t.Q6J("ngIf",e.Payments.length>0),t.xp6(5),t.Q6J("ngIf",e.Invoices.length>0&&e.InvoiceVisible),t.xp6(1),t.Q6J("ngIf",e.PaymentReceived.length>0&&e.PaymentReceiveVisible),t.xp6(7),t.Q6J("ngIf",e.VoidInvoice.length>0),t.xp6(1),t.Q6J("ngIf",e.SalesReturn.length>0),t.xp6(4),t.Q6J("ngIf",e.LoyaltyPointhistory.length>0),t.xp6(5),t.Q6J("ngIf",e.Invoices.length>0&&e.InvoiceVisible),t.xp6(13),t.Q6J("ngForOf",e.PaymentMethods),t.xp6(2),t.Q6J("ngForOf",e.PaymentReceived),t.xp6(6),t.Q6J("ngForOf",e.PaymentMethods),t.xp6(7),t.Q6J("ngIf",e.InputMode),t.xp6(10),t.Q6J("ngForOf",e.Expenses),t.xp6(14),t.Q6J("ngForOf",e.Denominations)("ngForTrackBy",i.tbDenom),t.xp6(6),t.hij(" ",t.lcZ(135,46,t.lcZ(136,48,i.totalDenom$))," "),t.xp6(22),t.Q6J("ngForOf",e.VoidInvoice),t.xp6(20),t.Q6J("ngForOf",e.SalesReturn),t.xp6(6),t.Oqu(t.lcZ(183,50,t.xi3(184,52,e.SalesReturn,"Quantity"))),t.xp6(4),t.Oqu(t.lcZ(187,55,t.xi3(188,57,e.SalesReturn,"UnitPrice"))),t.xp6(13),t.Oqu(t.lcZ(200,60,e.Grosshistory)),t.xp6(8),t.hij("",t.lcZ(208,62,t.xi3(209,64,e.Invoices,"Final"))," "),t.xp6(9),t.Oqu(t.lcZ(217,67,e.AccumulatedHistory)),t.xp6(8),t.Oqu(t.lcZ(225,69,t.xi3(226,71,e.Invoices,"Final")+e.AccumulatedHistory)),t.xp6(18),t.Q6J("ngForOf",e.LoyaltyPointhistory),t.xp6(11),t.hij("",t.lcZ(254,74,e.Session.Sales)," "),t.xp6(4),t.Oqu(e.Label.Tax?e.Label.Tax:"Tax"),t.xp6(4),t.Oqu(t.lcZ(262,76,e.Session.Tax)),t.xp6(8),t.Oqu(t.lcZ(270,78,e.Session.Invoice_Count)),t.xp6(2),t.Q6J("ngIf",e.Label.TaxDetailVisible),t.xp6(1),t.Q6J("ngIf",e.Label.TaxDetailVisible),t.xp6(7),t.hij("",e.Session.LastNumber," ")}}function Vi(n,o){if(1&n&&(t.YNc(0,Ei,280,80,"div",8),t.ALo(1,"async")),2&n){const e=t.oxw(2);t.Q6J("ngIf",t.lcZ(1,1,e.previewEOSForm$))}}function Ri(n,o){if(1&n&&(t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,di,2,0,"button",2),t.ALo(3,"async"),t.YNc(4,si,3,3,"button",3),t.ALo(5,"async"),t.qZA(),t.TgZ(6,"content"),t.YNc(7,ci,3,3,"ng-container",4),t.ALo(8,"async"),t.YNc(9,Vi,2,3,"ng-template",null,5,t.W1O),t.qZA()()),2&n){const e=o.ngIf,i=t.MAs(10),a=t.oxw();t.Q6J("pageData",e)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",!t.lcZ(3,7,a.isPreview$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(5,9,a.previewEOSForm$)),t.xp6(3),t.Q6J("ngIf",!t.lcZ(8,11,a.isPreview$))("ngIfElse",i)}}const ki=[{path:"Main/My_Shift",component:fe},{path:"Main/Active_Shift",component:Je},{path:"Main/Previous_Shift",component:$e},{path:"Main/Previous_Shift/Register_Shift_Detail",component:ti},{path:"Main/Previous_Shift/Register_Shift_Form",component:(()=>{class n{constructor(e,i,a,r,_,l){this.http=i,this.matDialog=_,this.router=l,this.endOfShiftFormEndpoint="/API/ShiftLoader/EndOfShiftForm",this.previewEOSFormEndpoint="/API/Shift/PreviewEndOfShiftForm",this.saveRegisterEndpoint="/API/Shift/SaveRegister",this.destroy$=new U.x,this.fetchEOSForm=s=>f=>this.http.post(s,f),this.previewBtn=new U.x,this.previewBtn$=this.previewBtn.asObservable().pipe((0,y.R)(this.destroy$)),this.changeEOSForm=new U.x,this.changeEOSForm$=this.changeEOSForm.asObservable().pipe((0,y.R)(this.destroy$)),this.changePreview=new U.x,this.changePreview$=this.changePreview.asObservable().pipe((0,y.R)(this.destroy$)),this.isEdit$=(0,$.of)(a.snapshot.queryParams).pipe((0,Z.U)(s=>m.gT.IsNotEmpty(s.ID))),this.menu$=e.menu$,this.endOfShiftForm$=(0,nt.z)(this.menu$.pipe((0,M.b)(()=>(0,$.of)(a.snapshot.queryParams)),(0,M.b)(this.fetchEOSForm(this.endOfShiftFormEndpoint)),(0,it.d)()),this.changeEOSForm$),this.registers$=this.endOfShiftForm$.pipe((0,Z.U)(s=>s.Options.Register)),this.cashiers$=this.endOfShiftForm$.pipe((0,Z.U)(s=>s.Options.Cashier)),this.eosForm$=this.endOfShiftForm$.pipe((0,y.R)(this.destroy$),(0,Z.U)(s=>s.Form)),this.isEOSFormValid$=this.previewBtn$.pipe((0,ot.M)(this.eosForm$),(0,Z.U)(([,s])=>s),(0,ei.w)(s=>{let f=!0;return m.gT.IsEmpty(s.RegisterID)&&(r.info("Register is required.",x.n.Info),f=!1),m.gT.IsEmpty(s.UserID)&&(r.info("Cashier is required.",x.n.Info),f=!1),(0,$.of)(f)}),(0,O.h)(s=>s),(0,j.q)(1)),this.previewEOSForm$=(0,nt.z)((0,ni.a)(this.eosForm$,this.isEOSFormValid$).pipe((0,j.q)(1)).pipe((0,M.b)(([s,,])=>this.http.post(this.previewEOSFormEndpoint,s))),this.changePreview$).pipe((0,it.d)()),this.totalDenom$=this.previewEOSForm$.pipe((0,Z.U)(s=>s.Denominations),(0,Z.U)(s=>{let f=0;return s.forEach(dt=>f+=dt.Amount*dt.Quantity),f})),this.isPreview$=this.previewEOSForm$.pipe((0,Z.U)(()=>!0),(0,ii.O)(!1),(0,j.q)(2))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onPreview(){this.previewBtn.next()}onChangeDate(e,i,a){const r={...e,Form:{...e.Form,[a]:i}};this.changeEOSForm.next(r)}onChangeTime(e,i,a){const r=i.toTimeString().split(" ")[0].slice(0,5),_={...e,Form:{...e.Form,[a]:r}};this.changeEOSForm.next(_)}changeRegCash(e,i,a){const r={...e,Form:{...e.Form,[a]:i}};this.changeEOSForm.next(r)}onChangeStart(e,i,a){const r={...i,Start:a};e.ExpectedPaymentVisible&&(r.Expected=r.Received+r.Start,r.ShortOver=r.Amount-r.Expected),r.Amount=r.Received+r.Start;const _={...e,Payments:e.Payments.map(l=>l.Name==r.Name?r:l)};this.changePreview.next(_)}onChangeDifferences(e,i,a){const r={...i,Amount:a};r.ShortOver=r.Amount-r.Expected;const _={...e,Payments:e.Payments.map(l=>l.Name==r.Name?r:l)};this.changePreview.next(_)}tbPayments(e,i){return i.Name}tbDenom(e,i){return i.PriceDisplay}removeExpense(e,i){let a=[...e.Expenses];a.splice(i,1);const r={...e,Expenses:a};this.changePreview.next(r)}openModalExpense(e,i,a){this.matDialog.open(ri,{data:{expense:a,labels:e.LabelExpense,paymentMethods:e.PaymentList}}).afterClosed().pipe((0,O.h)(r=>m.gT.IsNotEmpty(r))).subscribe(r=>{let _;"ADD"==r.action?_=[...e.Expenses,r.expense]:"EDIT"==r.action&&(_=e.Expenses.map((s,f)=>i==f?r.expense:s));const l={...e,Expenses:_};this.changePreview.next(l)})}onChangeDenomQty(e,i,a,r){const _={...i,Quantity:a},l={...e,Denominations:e.Denominations.map((s,f)=>f==r?_:s)};this.changePreview.next(l)}openCloseModal(e){this.matDialog.open(ai,{data:{note:e.Session.Note,visitors:e.Session.Visitors}}).afterClosed().pipe((0,O.h)(i=>null!=i),(0,oi.b)(i=>{const a={...e,Session:{...e.Session,Note:i.note,Visitors:i.visitors}};this.changePreview.next(a)}),(0,ot.M)(this.previewEOSForm$),(0,Z.U)(([,i])=>({Session:i.Session,Expenses:i.Expenses,Payments:i.Payments,Denominations:i.Denominations})),(0,M.b)(i=>this.http.post(this.saveRegisterEndpoint,i))).subscribe({next:i=>{this.router.navigate(["/menu/Shift/Main/Previous_Shift/Register_Shift_Detail"],{queryParams:{ID:i.ID}})}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(_i.h),t.Y36(C.O),t.Y36(g.gz),t.Y36(A._W),t.Y36(u.uw),t.Y36(g.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["POS-register-shift-form-v2"]],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],["class","btn btn-success ms-5",3,"click",4,"ngIf"],[4,"ngIf","ngIfElse"],["isPreview",""],[1,"btn","btn-outline-secondary",3,"click"],[1,"btn","btn-success","ms-5",3,"click"],["class","container-fluid mt-5",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header","text-center"],[1,"fa-solid","fa-cash-register"],[1,"card-body"],["bindLabel","Name","bindValue","ID",3,"readonly","items","ngModel","ngModelChange"],[1,"fa-solid","fa-user"],["bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],[1,"fa-solid","fa-business-time"],[1,"card-body","text-center","oc-time","d-flex","align-items-center","justify-content-between"],[1,"d-flex","align-items-center"],["appearance","outline",3,"date","isFloatingLabel","dateChange"],[3,"ngModel","timeOnly","ngModelChange"],[1,"slash-oc",2,"font-size","20px","margin-bottom","15px"],["id","shift-info"],[1,"col-3"],[1,"text-center","fw-normal","h5"],[1,"col"],[1,"fa-solid","fa-file-invoice"],[1,"fa-solid","fa-cart-arrow-down","me-4"],["id","inp-payments",4,"ngIf"],["id","tab-shift"],[1,"col-sm-12"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["class","nav-item",4,"ngIf"],[1,"nav-item"],["id","expense-tab","data-bs-toggle","tab","href","#expense","role","tab","aria-controls","expense","aria-selected","false",1,"nav-link"],["id","denom-tab","data-bs-toggle","tab","href","#denom","role","tab","aria-controls","denom","aria-selected","false",1,"nav-link"],["id","gross-tab","data-bs-toggle","tab","href","#gross","role","tab","aria-controls","gross","aria-selected","false",1,"nav-link"],["id","index-tab","data-bs-toggle","tab","href","#index","role","tab","aria-controls","index","aria-selected","false",1,"nav-link"],["id","myTabContent",1,"tab-content"],["class","tab-pane fade mt-0 pt-0 show active","id","invoice","role","tabpanel",4,"ngIf"],["id","received","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"card","border-top-0"],[1,"table","table-bordered"],[1,"thead-light","sticky-top-thead"],[1,"text-end","border-end",2,"width","20px"],[1,"border-end"],["class","text-end border-end",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["colspan","3",1,"text-end"],["class","text-end",4,"ngFor","ngForOf"],["id","expense","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],["class","border-end","style","width: 50px;",4,"ngIf"],[1,"border-end",2,"width","200px"],[1,"text-end","border-end"],[3,"click",4,"ngFor","ngForOf"],["id","denom","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end",2,"width","100px"],[1,"border-end","text-end",2,"width","300px"],[4,"ngFor","ngForOf","ngForTrackBy"],["colspan","2",1,"text-end"],[1,"text-end","pe-8","fw-bold"],["id","void","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end",2,"width","20px"],["id","return","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"text-end"],["colspan","3"],["id","gross","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"table-sm","table-borderless"],[1,"sep"],["id","point","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[1,"border-end","text-end"],["id","index","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0"],[4,"ngIf"],["id","inp-payments"],[1,"col-12"],[1,"card","w-100"],[1,"card-header"],[1,"table","table-bordered","border-light-gray"],[1,"table-light"],[1,"border-end","text-end","pe-10",2,"width","150px"],[1,"border-end","text-end","pe-10"],["class","border-end text-end pe-10",4,"ngIf"],["class","text-end pe-10",4,"ngIf"],[1,"border-start","text-end","pe-10"],[1,"text-end","pe-10"],[1,"text-end","pe-10","fw-bold"],[2,"width","150px"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","disabled","ngModelChange"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModel","ngModelChange"],["class","text-end pe-10",3,"class",4,"ngIf"],["type","text",1,"form-control","text-end",3,"ngModel","ngModelChange"],["id","invoice-tab","data-bs-toggle","tab","href","#invoice","role","tab","aria-controls","invoice","aria-selected","false",1,"nav-link","active"],["id","received-tab","data-bs-toggle","tab","href","#received","role","tab","aria-controls","received","aria-selected","false",1,"nav-link"],["id","void-tab","data-bs-toggle","tab","href","#void","role","tab","aria-controls","void","aria-selected","false",1,"nav-link"],["id","return-tab","data-bs-toggle","tab","href","#return","role","tab","aria-controls","return","aria-selected","false",1,"nav-link"],["id","point-tab","data-bs-toggle","tab","href","#point","role","tab","aria-controls","point","aria-selected","false",1,"nav-link"],["id","invoice","role","tabpanel",1,"tab-pane","fade","mt-0","pt-0","show","active"],[1,"border-end",2,"width","85px"],[1,"border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","30px"],[1,"text-end","border-end",2,"width","60px"],["colspan","4"],[1,"text-end","fw-bold"],[1,"text-primary",3,"routerLink","queryParams"],[1,"text-end",3,"ngClass"],["target","_blank",3,"queryParams","routerLink"],[1,"border-end",2,"width","50px"],[1,"fa-regular","fa-plus","fa-2x",2,"background-color","white","border","1px solid #333","padding","2px 10px",3,"click"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],[1,"fa","fa-xmark","fa-lg","text-danger",2,"cursor","pointer",3,"click"],[3,"innerHTML"],["target","_blank",1,"text-primary",3,"routerLink","queryParams"],["target","_blank",3,"routerLink","queryParams"]],template:function(e,i){1&e&&(t.YNc(0,Ri,11,13,"mainpanel-cmp",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,i.menu$))},dependencies:[q.p,c.mk,c.sg,c.O5,g.yS,p.Fj,p.JJ,p.On,S.w9,T.b,F.QB,rt.f,c.Ov,c.JJ,c.uU,h.qU,h.$k,h.cU],styles:[".oc-time[_ngcontent-%COMP%] .mat-form-field-wrapper{width:115px}.oc-time[_ngcontent-%COMP%] p-calendar{margin-bottom:15px;margin-left:10px}.oc-time[_ngcontent-%COMP%] p-calendar input{width:45px}@media (max-width: 1400px){.oc-time[_ngcontent-%COMP%]{flex-direction:column!important}.slash-oc[_ngcontent-%COMP%]{display:none}}"]}),n})()},{path:"",redirectTo:"Main/My_Shift",pathMatch:"full"}];let Yi=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[g.Bz.forChild(ki),g.Bz]}),n})();var Hi=d(3848);let $i=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[q.R,c.ez,h.dr,Yi,p.u5,u.Is,X.TU,p.UX,v.d,S.A0,tt.X,F.ZU,Rn,rt._8,Hi.Nh]}),n})()}}]);