dealpos 25.41.2 → 25.41.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/browser/{chunk-HVMUCZ5I.js → chunk-24QKQISF.js} +1 -1
  2. package/browser/{chunk-PPWXHE7X.js → chunk-2BNZCUNP.js} +1 -1
  3. package/browser/{chunk-XU5SOTZS.js → chunk-2EXFDYJN.js} +1 -1
  4. package/browser/{chunk-F4FAZ5ZL.js → chunk-2J7JBH5Q.js} +1 -1
  5. package/browser/{chunk-QHX74QID.js → chunk-2MVRUWW3.js} +1 -1
  6. package/browser/{chunk-V3YO2TDM.js → chunk-2QXPXRI6.js} +1 -1
  7. package/browser/{chunk-ILF7FISN.js → chunk-2U6W2RNU.js} +1 -1
  8. package/browser/{chunk-FBH7LG5C.js → chunk-2XAVDG2R.js} +1 -1
  9. package/browser/{chunk-X4LYU5XA.js → chunk-36CZUBXB.js} +1 -1
  10. package/browser/{chunk-UBMYMSUW.js → chunk-3D3ELK7I.js} +1 -1
  11. package/browser/{chunk-XUVY2IO6.js → chunk-3FE73ETM.js} +1 -1
  12. package/browser/{chunk-3MDUYQJU.js → chunk-3ITPIAO7.js} +1 -1
  13. package/browser/{chunk-HV6ZFQAQ.js → chunk-3UUHT4HG.js} +1 -1
  14. package/browser/{chunk-HUMRIGHZ.js → chunk-46WFGTJC.js} +1 -1
  15. package/browser/{chunk-DE2STA2G.js → chunk-4XFE7DMP.js} +2 -2
  16. package/browser/{chunk-SDADDOK4.js → chunk-4XFOSHBI.js} +1 -1
  17. package/browser/{chunk-N5QWMN2M.js → chunk-5POWTQ67.js} +1 -1
  18. package/browser/{chunk-L2PLXSAS.js → chunk-5YBGDA3S.js} +1 -1
  19. package/browser/{chunk-OFGVLEEZ.js → chunk-62VDXLDP.js} +1 -1
  20. package/browser/{chunk-RP636SRQ.js → chunk-66BLMMOK.js} +1 -1
  21. package/browser/{chunk-KZTKYVZF.js → chunk-6JJK75CC.js} +1 -1
  22. package/browser/{chunk-34DMF3QT.js → chunk-74QSXJ42.js} +1 -1
  23. package/browser/{chunk-JY5XX3QX.js → chunk-757ORJKN.js} +2 -2
  24. package/browser/{chunk-45BASVRZ.js → chunk-7G4UPOQP.js} +1 -1
  25. package/browser/{chunk-BAORXMVG.js → chunk-A5XBD65B.js} +1 -1
  26. package/browser/{chunk-FRO3O6SU.js → chunk-A6ZPTR67.js} +1 -1
  27. package/browser/{chunk-PZID6T4A.js → chunk-AC24RKU6.js} +1 -1
  28. package/browser/{chunk-J3C5CJEH.js → chunk-AJHV3SOU.js} +1 -1
  29. package/browser/{chunk-H54MTXKN.js → chunk-ATAC2AND.js} +1 -1
  30. package/browser/{chunk-W4BJ4JBG.js → chunk-BH4ZE4CF.js} +1 -1
  31. package/browser/{chunk-MFIRFGE2.js → chunk-BYEI3PJ6.js} +1 -1
  32. package/browser/{chunk-DNLMIUJF.js → chunk-C3WNOC5F.js} +1 -1
  33. package/browser/{chunk-QE22VQQ7.js → chunk-CIR6MTD4.js} +1 -1
  34. package/browser/{chunk-ZKRFSVUW.js → chunk-CKRE4XBG.js} +2 -2
  35. package/browser/{chunk-SQC25JWL.js → chunk-D32G7TJK.js} +1 -1
  36. package/browser/{chunk-B73NC3X2.js → chunk-DAMKEWK6.js} +1 -1
  37. package/browser/{chunk-EPBMDUPY.js → chunk-DF2W7YLH.js} +1 -1
  38. package/browser/{chunk-SO3422SX.js → chunk-DMK6CUHM.js} +1 -1
  39. package/browser/{chunk-7USMFPWJ.js → chunk-DVOCY3CZ.js} +1 -1
  40. package/browser/{chunk-4E2C3JC6.js → chunk-E3SP7B7S.js} +1 -1
  41. package/browser/{chunk-LDEAORXA.js → chunk-EDZXH4US.js} +1 -1
  42. package/browser/{chunk-DINWVJP7.js → chunk-EGOF4SFE.js} +1 -1
  43. package/browser/{chunk-4VMXYBU3.js → chunk-EGRPFCSJ.js} +2 -2
  44. package/browser/{chunk-Z3OYXF5N.js → chunk-EKOCQO55.js} +1 -1
  45. package/browser/{chunk-YQEL63SF.js → chunk-ESHN7M3P.js} +1 -1
  46. package/browser/{chunk-CIEDGY7H.js → chunk-FKYQUS5M.js} +1 -1
  47. package/browser/{chunk-EYV7AZ42.js → chunk-GBAAG52Z.js} +1 -1
  48. package/browser/{chunk-UESUOHI6.js → chunk-GLQBFUNO.js} +1 -1
  49. package/browser/{chunk-GZ2EJLH3.js → chunk-GVGUEGZI.js} +1 -1
  50. package/browser/{chunk-BAL3IIDS.js → chunk-H4CCCG5S.js} +1 -1
  51. package/browser/{chunk-HBC5DBVS.js → chunk-HS3NKKBN.js} +1 -1
  52. package/browser/chunk-I3O4QZ4X.js +1 -0
  53. package/browser/{chunk-TNLZPCYK.js → chunk-I4I6FJDX.js} +1 -1
  54. package/browser/{chunk-ZC4V4XIM.js → chunk-INWN4VE6.js} +1 -1
  55. package/browser/{chunk-6IIF7CKF.js → chunk-JJ4V6TS4.js} +1 -1
  56. package/browser/{chunk-24OZA3GF.js → chunk-K4P3FNHD.js} +1 -1
  57. package/browser/{chunk-G7VSP6EW.js → chunk-K5AWJ3PF.js} +1 -1
  58. package/browser/{chunk-LID6CN6L.js → chunk-K6YXV6DF.js} +1 -1
  59. package/browser/{chunk-YDXY6QHK.js → chunk-KEUOT5UT.js} +1 -1
  60. package/browser/{chunk-E4R5MW6J.js → chunk-KHIJN7MP.js} +14 -14
  61. package/browser/{chunk-AFYPHUZX.js → chunk-KMO6SBV2.js} +1 -1
  62. package/browser/{chunk-RZFAYPJW.js → chunk-KST6UNFB.js} +1 -1
  63. package/browser/{chunk-NPTTEU4B.js → chunk-LE5ZGH7A.js} +1 -1
  64. package/browser/{chunk-5DDIIEIO.js → chunk-LFRP6C5Y.js} +1 -1
  65. package/browser/{chunk-D5LBI5TH.js → chunk-LIVWB266.js} +1 -1
  66. package/browser/{chunk-PJHIUSNN.js → chunk-LJW6HW5T.js} +1 -1
  67. package/browser/{chunk-AKTKAREU.js → chunk-LX2RVE4Q.js} +1 -1
  68. package/browser/{chunk-UERDXH3W.js → chunk-MEMBBEAI.js} +1 -1
  69. package/browser/{chunk-SSE7KV5S.js → chunk-MPJPWARV.js} +1 -1
  70. package/browser/{chunk-VP42CBUF.js → chunk-NOEPKA4W.js} +1 -1
  71. package/browser/{chunk-6CJCT6YT.js → chunk-NRDJEOWR.js} +1 -1
  72. package/browser/{chunk-AAR4B3HZ.js → chunk-NTIVPZGS.js} +2 -2
  73. package/browser/{chunk-IXHBD564.js → chunk-NVGKWF2G.js} +1 -1
  74. package/browser/{chunk-I45IV26L.js → chunk-NXN7NE47.js} +1 -1
  75. package/browser/{chunk-UZFW2WNI.js → chunk-O5RZTQKV.js} +1 -1
  76. package/browser/{chunk-Z7LRKY4R.js → chunk-OGI634A2.js} +1 -1
  77. package/browser/{chunk-TLWH7QTW.js → chunk-OINGZOF4.js} +1 -1
  78. package/browser/{chunk-QHYHGORX.js → chunk-OK4CL2M4.js} +1 -1
  79. package/browser/{chunk-R5IO2SN4.js → chunk-P6TNAQ2F.js} +1 -1
  80. package/browser/{chunk-3VQLYVVB.js → chunk-PRGXQYOR.js} +1 -1
  81. package/browser/{chunk-O3HYW3PV.js → chunk-QKCOYSSN.js} +1 -1
  82. package/browser/{chunk-2F5STFEV.js → chunk-QTXCHVAR.js} +1 -1
  83. package/browser/{chunk-Y3CUYCSX.js → chunk-RB6SQ4EV.js} +1 -1
  84. package/browser/{chunk-ZIQAYIU4.js → chunk-RNILXGHZ.js} +1 -1
  85. package/browser/{chunk-ZFNJGBST.js → chunk-RTIMT7MB.js} +1 -1
  86. package/browser/{chunk-CSAGSFL3.js → chunk-S32IOJJR.js} +1 -1
  87. package/browser/{chunk-NA7ZJQET.js → chunk-SETNDGZG.js} +1 -1
  88. package/browser/{chunk-W2NHEKCW.js → chunk-SGIO47PC.js} +1 -1
  89. package/browser/{chunk-5PE5X2VB.js → chunk-SW2DBPIJ.js} +1 -1
  90. package/browser/{chunk-5TV4QYNO.js → chunk-T6L7V6VB.js} +1 -1
  91. package/browser/{chunk-YYR3XEAQ.js → chunk-T7EVNQJZ.js} +1 -1
  92. package/browser/{chunk-FZNAOCWZ.js → chunk-T7JKTLRY.js} +2 -2
  93. package/browser/{chunk-EPYFG6SH.js → chunk-T7UL42MO.js} +1 -1
  94. package/browser/{chunk-JJK4XCMN.js → chunk-TBQRBWDN.js} +1 -1
  95. package/browser/{chunk-DOTR5PYR.js → chunk-TDFRMUQQ.js} +1 -1
  96. package/browser/{chunk-WIB47ZGF.js → chunk-TDG64PZU.js} +1 -1
  97. package/browser/{chunk-S4FLFLTR.js → chunk-TU4DJ5OY.js} +1 -1
  98. package/browser/{chunk-GHLCUW72.js → chunk-TXL4UCFA.js} +1 -1
  99. package/browser/{chunk-65CKGM2C.js → chunk-U4QA2337.js} +1 -1
  100. package/browser/{chunk-M7G3WT32.js → chunk-UEKHGOJL.js} +1 -1
  101. package/browser/{chunk-BT6BH634.js → chunk-ULF57NM6.js} +1 -1
  102. package/browser/{chunk-6BXO4MVU.js → chunk-UMLR3NXV.js} +1 -1
  103. package/browser/{chunk-GVI4QM2F.js → chunk-UNFJ7644.js} +1 -1
  104. package/browser/{chunk-3XMWVJ2L.js → chunk-V5O3E5XQ.js} +1 -1
  105. package/browser/{chunk-WA5AGHFF.js → chunk-V7RYZJVN.js} +1 -1
  106. package/browser/{chunk-7KXMZBQB.js → chunk-V7XF5OHI.js} +1 -1
  107. package/browser/{chunk-4CRQAT4Y.js → chunk-VF6HKAFR.js} +1 -1
  108. package/browser/chunk-VKT5PPFS.js +1 -0
  109. package/browser/{chunk-6ZEEVCRE.js → chunk-W6BB4ADK.js} +1 -1
  110. package/browser/{chunk-AD5C5J25.js → chunk-WIRVWYB3.js} +1 -1
  111. package/browser/{chunk-KMA5VOEA.js → chunk-WS5EBPC2.js} +1 -1
  112. package/browser/{chunk-LOMNHHBV.js → chunk-WUBF7SHA.js} +1 -1
  113. package/browser/{chunk-N22LFPQL.js → chunk-WVFDCBPZ.js} +2 -2
  114. package/browser/{chunk-QJWMNNK6.js → chunk-XAZ4U5H6.js} +2 -2
  115. package/browser/{chunk-2EQ7Y56O.js → chunk-XR7Q6MPP.js} +2 -2
  116. package/browser/{chunk-GVSOBS5Q.js → chunk-Y2V6RDWT.js} +2 -2
  117. package/browser/{chunk-XHAPRGGF.js → chunk-Y726HBE5.js} +1 -1
  118. package/browser/{chunk-K3367VWX.js → chunk-YG2JH54R.js} +1 -1
  119. package/browser/{chunk-BZHL4W7T.js → chunk-YK6QAFHR.js} +1 -1
  120. package/browser/{chunk-5MZEP3D7.js → chunk-YUZ32SM6.js} +1 -1
  121. package/browser/chunk-YWZWCZZB.js +1 -0
  122. package/browser/{chunk-LGCRFIIA.js → chunk-YXVAJ7AI.js} +1 -1
  123. package/browser/{chunk-SN3DTCGO.js → chunk-YYZIKSOW.js} +1 -1
  124. package/browser/{chunk-3CCLSY4U.js → chunk-Z3VGSV3R.js} +1 -1
  125. package/browser/{chunk-GMX2JWEW.js → chunk-Z3VZQOTA.js} +1 -1
  126. package/browser/{chunk-7S5F6JOF.js → chunk-ZEWGIKVI.js} +1 -1
  127. package/browser/chunk-ZFQRWOU2.js +1 -0
  128. package/browser/{chunk-WEAIMPRM.js → chunk-ZJDIZNTX.js} +1 -1
  129. package/browser/{chunk-4SOJX57D.js → chunk-ZJMIEPWF.js} +1 -1
  130. package/browser/index.html +2 -2
  131. package/browser/{main-6UNPCULN.js → main-YLCIT32A.js} +2 -2
  132. package/package.json +1 -1
  133. package/browser/chunk-7E6SMB44.js +0 -1
  134. package/browser/chunk-EZCQYLCW.js +0 -1
  135. package/browser/chunk-PQUVDF3D.js +0 -1
  136. package/browser/chunk-Y4MHZTLF.js +0 -1
@@ -1,3 +1,3 @@
1
- import{a as Sr}from"./chunk-DNLMIUJF.js";import{b as Ir}from"./chunk-NPTTEU4B.js";import{a as br,b as Tr}from"./chunk-EPYFG6SH.js";import{a as Dr}from"./chunk-6ZEEVCRE.js";import{a as yr}from"./chunk-GZ2EJLH3.js";import{a as hr}from"./chunk-RWRT75NX.js";import{a as Wt}from"./chunk-ZFNJGBST.js";import{a as At,b as Bt}from"./chunk-UQKBA274.js";import"./chunk-PJHIUSNN.js";import{a as $o}from"./chunk-AKTKAREU.js";import{a as Go}from"./chunk-B56YVUVP.js";import{a as To}from"./chunk-LKFDM7AC.js";import{a as dr,b as ur}from"./chunk-WIB47ZGF.js";import{a as mr,b as zi}from"./chunk-CSAGSFL3.js";import{e as ir}from"./chunk-EPBMDUPY.js";import"./chunk-CHSEYRJF.js";import"./chunk-Z3E24JZW.js";import{a as qi}from"./chunk-I6E6PXQU.js";import{b as Ji,c as xr}from"./chunk-BT6BH634.js";import{a as gr,e as Cr,f as bt}from"./chunk-5TV4QYNO.js";import{a as Ki}from"./chunk-UESUOHI6.js";import{a as vr}from"./chunk-CMQAUCAH.js";import{a as _r}from"./chunk-W2NHEKCW.js";import"./chunk-TLANLIUC.js";import{a as pr}from"./chunk-R7MOZHCP.js";import{a as $i}from"./chunk-WA5AGHFF.js";import"./chunk-D3RDKDIY.js";import"./chunk-NQX7EX5A.js";import{a as sr}from"./chunk-FO3DCWRP.js";import{a as cr}from"./chunk-P3KIIKY4.js";import{a as er,b as nr,c as or}from"./chunk-WEAIMPRM.js";import{a as Ui}from"./chunk-DINWVJP7.js";import"./chunk-I2O3VGCS.js";import{b as Gi}from"./chunk-O5PHF6GW.js";import{a as Ko,c as Jo,e as Yo,f as Xo,g as Zo}from"./chunk-R5IO2SN4.js";import{a as zo,b as Qi}from"./chunk-BADUP5JT.js";import"./chunk-OPCIBNIJ.js";import"./chunk-G6C75N4Q.js";import"./chunk-PRKAXHSJ.js";import"./chunk-NQKVYQ6V.js";import"./chunk-WOZLNXGI.js";import{a as fr}from"./chunk-J3C5CJEH.js";import"./chunk-ZY3EJSWW.js";import{a as rr,b as ar,c as lr}from"./chunk-DPKYMDVN.js";import{b as tr}from"./chunk-UZFW2WNI.js";import{a as ht,b as St}from"./chunk-ZEZ2K35X.js";import{e as Pi}from"./chunk-6CJCT6YT.js";import{a as ct}from"./chunk-3CCOX4FN.js";import{a as Mo,b as Po,c as Fo,d as Rt,e as qo}from"./chunk-HV6ZFQAQ.js";import{d as se,e as ji}from"./chunk-Z7LRKY4R.js";import{b as No}from"./chunk-SN3DTCGO.js";import"./chunk-3RK6DDJD.js";import{a as Vo}from"./chunk-7UFQPOGN.js";import{a as Ai}from"./chunk-GZAARWM2.js";import{p as Eo,q as Oo}from"./chunk-2F5STFEV.js";import"./chunk-DWOLAWQN.js";import"./chunk-Y3CUYCSX.js";import"./chunk-T2PXIPKB.js";import"./chunk-QMCAG2HX.js";import{a as Bo}from"./chunk-GMX2JWEW.js";import{f as oi}from"./chunk-34DMF3QT.js";import{a as Ke,b as Uo}from"./chunk-NHTMJTLV.js";import{c as Io}from"./chunk-3XMWVJ2L.js";import{c as Ee}from"./chunk-W4BJ4JBG.js";import{b as be}from"./chunk-ILF7FISN.js";import{a as ve}from"./chunk-65CKGM2C.js";import"./chunk-5MZEP3D7.js";import"./chunk-NW73SHIZ.js";import{a as we}from"./chunk-NDM2ODJP.js";import{d as ne,e as Hi}from"./chunk-H54MTXKN.js";import"./chunk-MFIRFGE2.js";import"./chunk-OMVUFMMZ.js";import"./chunk-HPLAMF75.js";import"./chunk-QHYHGORX.js";import"./chunk-T6MTT57B.js";import{a as Fi,b as Vi,c as Lo}from"./chunk-4CRQAT4Y.js";import"./chunk-4L5G4WC4.js";import"./chunk-3NJFM55L.js";import"./chunk-2LFFOWKW.js";import"./chunk-OQCGVZVB.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import{b as te}from"./chunk-XHAPRGGF.js";import"./chunk-OI2RWAOV.js";import{a as Do}from"./chunk-7LXPGNYF.js";import{a as Ri,b as zr,c as mt}from"./chunk-CN5SHMHF.js";import{a as ko,d as Ro,f as Ao,h as Ni}from"./chunk-3M5M2T4L.js";import{F as We,G as Wi,m as wo,u as ye,v as he,w as Ve}from"./chunk-45BASVRZ.js";import{b as Ae,c as ii}from"./chunk-XOQ4SW2R.js";import{B as Qo,N as ni,O as Pe,g as Be,k as Ho,n as Bi,x as jo}from"./chunk-4SOJX57D.js";import"./chunk-GHC4BCCW.js";import"./chunk-GIKR6Y2K.js";import{a as Li,c as ki,d as Te}from"./chunk-3GV7FUAX.js";import{a as at,e as xe,f as $e,g as A,l as Wo}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-QCBXPOJL.js";import"./chunk-T2PMKO3M.js";import{a as Ce}from"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{A as So,F as ot,G as kt,a as yo,b as yt,c as fe,h as R,l as Ge,o as H,r as ho,s as ti}from"./chunk-CB33ZMNF.js";import"./chunk-TLWH7QTW.js";import{a as bo}from"./chunk-TNLZPCYK.js";import{a as T,d as ie}from"./chunk-TYBAV5LT.js";import"./chunk-O3HYW3PV.js";import{$ as ze,$a as l,$b as wi,Ac as E,Bc as P,Cc as Mi,D as Me,Db as Ye,E as k,Fa as di,Fc as X,I as je,Ib as n,Jb as i,Ka as _o,Kb as f,Lb as q,M as po,Ma as _t,Mb as U,N as zt,Ob as D,Od as pe,Q as mo,Qb as g,Qd as nt,Rb as s,Rd as z,Td as gt,Ub as _i,Va as W,Vb as vo,Vd as ee,W as Si,Wa as Xt,Wc as pt,Y as rt,Yc as K,Yd as L,Za as Zt,Zb as Ii,Zc as B,_b as Ti,aa as j,ca as co,cd as it,d as Ie,db as C,dc as Fe,e as dt,ec as p,ed as Se,fa as J,fb as fo,fc as b,ga as ue,gc as I,gd as _e,hc as Qe,ia as so,ic as xo,ja as $,jc as y,jd as Z,k as ke,ka as bi,kb as w,kc as h,lb as Di,lc as S,ma as Gt,mb as go,na as x,o as ut,ob as oe,pc as Ei,qb as _,qc as N,rc as M,sc as Re,t as V,tc as Oi,u as xt,ua as uo,ub as Co,va as d,vb as m,wa as u,wb as ui,wd as ei,x as ao,xb as Mt,y as si,z as lo,zb as ft,zc as v}from"./chunk-DJOHANFC.js";import{a as ae,b as le,d as ro,g as Ur}from"./chunk-7DCB7DB2.js";var Gr=()=>["/menu/Logistics/Archive/Transfer_Order/Form"],$r=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],Kr=t=>({ID:t}),Jr=(t,r,e)=>({"text-success":t,"text-warning":r,"text-danger":e}),Yr=()=>["/print/Transfer"],Xr=(t,r)=>({ID:t,Template:r});function Zr(t,r){if(t&1){let e=D();n(0,"a",23),g("click",function(){d(e);let o=s(3);return u(o.httpPostListID("TransferOrder/Delete"))}),f(1,"i",24),p(2," Delete"),i()}}function ea(t,r){if(t&1){let e=D();n(0,"a",23),g("click",function(){d(e);let o=s(3);return u(o.onVoid())}),f(1,"i",24),p(2," Void"),i()}}function ta(t,r){if(t&1&&(q(0),_(1,Zr,3,0,"a",22)(2,ea,3,0,"a",22),U()),t&2){let e=s(2);l(),m("ngIf",e.role.logistic.Delete&&!e.pageData.Config.IsVoidEnabled),l(),m("ngIf",e.role.logistic.TransferOrderVoid&&e.pageData.Config.IsVoidEnabled)}}function ia(t,r){if(t&1){let e=D();n(0,"button",25),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",26),p(2," Export "),i()}}function na(t,r){t&1&&(n(0,"a",27),p(1,"New"),i()),t&2&&m("routerLink",N(1,Gr))}function oa(t,r){if(t&1){let e=D();n(0,"div",28)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",29),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",30),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DestinationID,o)||(c.pageData.Filter.DestinationID=o),u(o)}),i(),n(7,"h6"),p(8,"Fulfillment"),i(),n(9,"ng-select",31),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.StateID,o)||(c.pageData.Filter.StateID=o),u(o)}),i(),n(10,"h6"),p(11,"Tag"),i(),n(12,"ng-select",32),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.TypeID,o)||(c.pageData.Filter.TypeID=o),u(o)}),i(),n(13,"h6"),p(14,"Courier"),i(),n(15,"ng-select",33),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CourierID,o)||(c.pageData.Filter.CourierID=o),u(o)}),i(),n(16,"h6"),p(17,"From"),i(),n(18,"datepicker",34),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(19,"h6"),p(20,"To"),i(),n(21,"datepicker",35),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(22,"h6"),p(23,"Creator"),i(),n(24,"autocompleteV2",36),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CreatorID,o)||(c.pageData.Filter.CreatorID=o),u(o)}),i(),n(25,"h6"),p(26,"Sort By"),i(),n(27,"radio-options",37),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SortBy,o)||(c.pageData.Filter.SortBy=o),u(o)}),i(),n(28,"h6"),p(29,"Page Size"),i(),n(30,"input",38),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.RowCount,o)||(c.pageData.Filter.RowCount=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.DestinationID),m("multiple",!1),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Deliveries),y("ngModel",e.pageData.Filter.StateID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Courier),y("ngModel",e.pageData.Filter.CourierID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.CreatorID),l(3),m("options",e.pageData.Options==null?null:e.pageData.Options.SortOption),y("model",e.pageData.Filter.SortBy),l(3),y("ngModel",e.pageData.Filter.RowCount),m("max",1e4)}}function ra(t,r){if(t&1){let e=D();n(0,"th",39)(1,"input",40),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function aa(t,r){t&1&&(n(0,"th",41),p(1," Price "),i())}function la(t,r){if(t&1){let e=D();n(0,"td",39)(1,"input",45),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.selected)}}function pa(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.Price)," ")}}function ma(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.Courier)}}function ca(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.CourierName)}}function sa(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,la,2,1,"td",12),n(3,"td"),p(4),i(),n(5,"td"),p(6),i(),n(7,"td"),f(8,"a",42),i(),n(9,"td"),p(10),v(11,"date"),i(),n(12,"td"),p(13),v(14,"date"),i(),n(15,"td",41),p(16),i(),_(17,pa,3,3,"td",17),n(18,"td"),p(19),i(),n(20,"td"),p(21),i(),n(22,"td"),p(23),i(),n(24,"td"),_(25,ma,2,1,"span",3)(26,ca,2,1,"span",3),i(),n(27,"td")(28,"a",43),f(29,"i",44),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.role.logistic.Delete&&!a.pageData.Config.IsVoidEnabled||a.role.logistic.TransferOrderVoid&&a.pageData.Config.IsVoidEnabled),l(2),b(e.Source),l(2),b(e.Destination),l(2),m("routerLink",N(25,$r))("queryParams",M(26,Kr,e.ID))("innerHTML",e.Number,W),l(2),b(P(11,19,e.Date,"dd MMM yyyy")),l(3),b(P(14,22,e.Created,"HH:mm")),l(3),b(e.Quantity),l(),m("ngIf",a.role.sell.PriceVisible&&a.pageData.Config.PriceVisible),l(),ft(Oi(28,Jr,e.StateLabel=="Received",e.StateLabel=="Dispatched",e.StateLabel=="Approved")),l(),I(" ",e.StateLabel," "),l(2),b(e.CreatorName),l(2),b(e.TypeName),l(2),m("ngIf",e.Courier!=null),l(),m("ngIf",e.CourierName!=null&&e.Courier==null),l(2),m("routerLink",N(32,Yr))("queryParams",Re(33,Xr,e.ID,e.SourceTemplateID))}}function da(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,ta,3,2,"ng-container",3)(3,ia,3,0,"button",4),n(4,"div",5),_(5,na,2,2,"a",6),i()(),n(6,"filters"),_(7,oa,31,21,"ng-template",null,0,X),i(),n(9,"content")(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11),_(15,ra,2,0,"th",12),n(16,"th",13),p(17,"Source"),i(),n(18,"th",14),p(19,"Destination"),i(),n(20,"th"),p(21,"Number"),i(),n(22,"th",15),p(23,"Date"),i(),n(24,"th",15),p(25,"Time"),i(),n(26,"th",16),p(27,"Qty"),i(),_(28,aa,2,0,"th",17),n(29,"th",15),p(30,"Status"),i(),n(31,"th",18),p(32,"Creator"),i(),n(33,"th",15),p(34,"Tag"),i(),n(35,"th",15),p(36,"Courier"),i(),f(37,"th",19),i()(),_(38,sa,30,36,"tbody",20),i()(),n(39,"POS-complex-pagination",21),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.getSelectedData().length>0),l(),m("ngIf",e.role.global.Export),l(2),m("ngIf",e.role.logistic.Create),l(10),m("ngIf",e.role.logistic.Delete&&!e.pageData.Config.IsVoidEnabled||e.role.logistic.TransferOrderVoid&&e.pageData.Config.IsVoidEnabled),l(13),m("ngIf",e.role.sell.PriceVisible&&e.pageData.Config.PriceVisible),l(10),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Yi=class t extends ve{constructor(e,a,o,c,O,Q,re){super(e,a,"TransferOrder/TransferOrderList","TransferOrderLoader/TransferOrderList",c,O);this.csvConverter=o;this.role=Q;this.matDialog=re}moreFilter=!1;openExportModal(){this.matDialog.open(be,{data:{title:"Transfer Order",exportTypes:[{ID:"TransferOrder/TransferOrderList",Value:"Default",FileName:"Transfer Order"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/TransferOrderRowsCount",pagination:!0}})}onVoid(){if(confirm("Are you sure you want to void these transfer order(s)?")==!1)return;let e=this.getSelectedData().map(a=>a.ID);e.length>0&&this.httpService.put("/api/transferorder/voidlisttransferorder",e,{},1e5,!0).subscribe(a=>{this.toastrService.success(a.Message,"Success"),this.getListData()},a=>this.toastrService.error(a.error.Message,"Error"))}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ee),C(pe),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-transfer-order"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],[2,"width","150px"],[2,"width","90px"],[1,"text-end",2,"width","50px"],["class","text-end",4,"ngIf"],[2,"width","120px"],[2,"width","16px"],[4,"ngFor","ngForOf"],["api","TransferOrder/TransferOrderRowsCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button","class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button",1,"btn","btn-success",3,"routerLink"],[1,"dialog-filter"],["placeholder","Source",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["bindLabel","Value","bindValue","Key","placeholder","Choose",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Options",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose a courier",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetUserSuggestion",1,"input-left","w-100","ac-filter",3,"ngModelChange","ngModel"],["name","SortBy",3,"modelChange","options","model"],["type","text","autoNum","",1,"form-control","input-filter",3,"ngModelChange","ngModel","max"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"text-end"],[3,"routerLink","queryParams","innerHTML"],["target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,da,40,12,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,fe,yt,R,H,ne,se,Rt,We,Ke,mt,Te,Ee,_e,Se],encapsulation:2})};var ua=()=>["/menu/Logistics/Archive/Outbound_Logistics/Form"],_a=()=>["/menu/Logistics/Archive/Outbound_Logistics/Info"],Yn=t=>({ID:t}),fa=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],ga=()=>["/menu/Orders/Order/Sales_Order/Info"];function Ca(t,r){if(t&1){let e=D();q(0),n(1,"a",21),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("OutboundLogistics/Delete"))}),f(2,"i",22),p(3," Delete"),i(),U()}}function va(t,r){if(t&1){let e=D();n(0,"button",23),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",24),p(2," Export "),i()}}function xa(t,r){t&1&&(n(0,"a",25),p(1," New"),i()),t&2&&m("routerLink",N(1,ua))}function ya(t,r){if(t&1){let e=D();n(0,"div",26)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",27),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6",28),p(5,"ORIGIN"),i(),n(6,"outlet-selector",27),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.OrderEntityID,o)||(c.pageData.Filter.OrderEntityID=o),u(o)}),i(),n(7,"h6"),p(8,"Customer"),i(),n(9,"autocompleteV2",29),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CustomerID,o)||(c.pageData.Filter.CustomerID=o),u(o)}),i(),n(10,"h6"),p(11,"From - To"),i(),n(12,"div")(13,"datepicker",30),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i()(),n(14,"div",31)(15,"datepicker",32),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()(),n(16,"h6"),p(17,"Number Filter Comparator"),i(),n(18,"ng-select",33),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.NumberFilterComparator,o)||(c.pageData.Filter.NumberFilterComparator=o),u(o)}),g("ngModelChange",function(){d(e);let o=s(2);return u(o.validateForLookbackDays())}),i(),n(19,"h6"),p(20,"Query Options"),i(),n(21,"ng-select",34),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.QueryOption,o)||(c.pageData.Filter.QueryOption=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.OrderEntityID),m("multiple",!1),l(3),y("ngModel",e.pageData.Filter.CustomerID),l(4),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(2),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.NumberFilterComparator),m("items",e.pageData.Options.NumberFilterComparatorOptions)("clearable",!1),l(3),y("ngModel",e.pageData.Filter.QueryOption),m("items",e.pageData.Options.QueryOptions)("clearable",!1)}}function ha(t,r){if(t&1){let e=D();n(0,"th",35)(1,"input",36),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function Sa(t,r){if(t&1){let e=D();n(0,"input",40),S("ngModelChange",function(o){d(e);let c=s(2).$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()}if(t&2){let e=s(2).$implicit;y("ngModel",e.selected)}}function ba(t,r){if(t&1&&(n(0,"td",35),_(1,Sa,1,1,"input",39),i()),t&2){let e=s().$implicit;l(),m("ngIf",e.WriteAccess)}}function Da(t,r){if(t&1&&(q(0),f(1,"a",41),U()),t&2){let e=s().$implicit;l(),m("routerLink",N(3,_a))("queryParams",M(4,Yn,e.ID))("innerHtml",e.Number,W)}}function Ia(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.Number)}}function Ta(t,r){if(t&1&&(n(0,"a",42),p(1),i()),t&2){let e=s().$implicit;m("routerLink",N(3,fa))("queryParams",M(4,Yn,e.InvoiceID)),l(),b(e.InvoiceNumber)}}function wa(t,r){if(t&1&&(n(0,"a",42),p(1),i()),t&2){let e=s().$implicit;m("routerLink",N(3,ga))("queryParams",M(4,Yn,e.OrderID)),l(),b(e.OrderNumber)}}function Ea(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,ba,2,1,"td",14),n(3,"td"),p(4),i(),n(5,"td"),_(6,Da,2,6,"ng-container",37)(7,Ia,2,1,"ng-template",null,1,X),i(),n(9,"td"),p(10),i(),n(11,"td"),p(12),i(),n(13,"td"),_(14,Ta,2,6,"a",38)(15,wa,2,6,"ng-template",null,2,X),i(),n(17,"td"),p(18),v(19,"date"),i(),n(20,"td"),p(21),v(22,"date"),i()()()),t&2){let e=r.$implicit,a=Fe(8),o=Fe(16),c=s(2);l(2),m("ngIf",c.role.logistic.Delete),l(2),b(e.EntityName),l(2),m("ngIf",e.WriteAccess)("ngIfElse",a),l(4),b(e.CustomerName),l(2),b(e.OrderEntityName),l(2),m("ngIf",e.InvoiceID)("ngIfElse",o),l(4),b(P(19,10,e.Date,"dd MMM yyyy")),l(3),b(P(22,13,e.Time,"HH:mm"))}}function Oa(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",4),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),g("textChange",function(){d(e);let o=s();return u(o.validateForLookbackDays())}),n(1,"actions"),_(2,Ca,4,0,"ng-container",5)(3,va,3,0,"button",6),n(4,"div",7),_(5,xa,2,2,"a",8),i()(),n(6,"filters"),_(7,ya,22,17,"ng-template",null,0,X),i(),n(9,"content")(10,"div",9)(11,"div",10)(12,"table",11)(13,"thead",12)(14,"tr",13),_(15,ha,2,0,"th",14),n(16,"th",15),p(17,"Outlet"),i(),n(18,"th"),p(19,"Number"),i(),n(20,"th",15),p(21,"Customer"),i(),n(22,"th",16),p(23,"ORIGIN"),i(),n(24,"th"),p(25,"Order#"),i(),n(26,"th",17),p(27,"Date"),i(),n(28,"th",18),p(29,"Time"),i()()(),_(30,Ea,23,16,"tbody",19),i()(),n(31,"POS-complex-pagination",20),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),m("searchBoxPlaceholder",e.searchPlaceholderText),l(2),m("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),l(),m("ngIf",e.role.global.Export),l(2),m("ngIf",e.role.logistic.Create),l(10),m("ngIf",e.role.logistic.Delete),l(15),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Xi=class t extends ve{constructor(e,a,o,c,O){super(e,a,"OutboundLogistics/OutboundLogisticsList","OutboundLogisticsLoader/List",o);this.role=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Outbound Logistics",exportTypes:[{ID:"OutboundLogistics/OutboundLogisticsList",Value:"Default",FileName:"Outbound Logistics"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"OutboundLogistics/OutboundLogisticsListCount",pagination:!0}})}sortByOptions=[{Key:!1,Value:"Date"},{Key:!0,Value:"Created"}];httpPostListID(e,a,o){if(a||(a="Are you sure you want to selected record/s?"),confirm(a)==!1)return;let c=this.getSelectedData().filter(O=>O.WriteAccess);c.length>0&&this.postListID(e,c,o)}get searchPlaceholderText(){return"Number "+(this.pageData?.Options?.NumberFilterComparatorOptions?.find(e=>e.Key===this.pageData?.Filter?.NumberFilterComparator)?.Value||"Starts With")}validateForLookbackDays(){this.pageData.Filter.Number&&(this.pageData.Filter.From==T.MinDate||!this.pageData.Filter.From)&&this.pageData.AppConfig.DefaultLookbackDays>0&&(this.pageData.Filter.NumberFilterComparator===3||this.pageData.Filter.NumberFilterComparator===2)&&(this.pageData.Filter.From=this.pageData.Filter.SearchLookbackDate,this.pageData.AppConfig.QueryOptionRecompile&&(this.pageData.Filter.QueryOption=1))}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["CustomerDisplay-customer-delivery"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],["ONLY_VIEW",""],["SALESORDER",""],[3,"pageData","text","isFilterOnDropdown","filter","searchBoxPlaceholder","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","searchBoxPlaceholder"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Delivery",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","130px"],["matTooltip","The Outlet where the order is placed","matTooltipPosition","above",2,"width","130px"],[2,"width","90px"],[2,"width","50px"],[4,"ngFor","ngForOf"],["api","OutboundLogistics/OutboundLogisticsListCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Delivery",1,"btn","btn-success",3,"routerLink"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["matTooltip","The Outlet where the order is placed","matTooltipPosition","above"],["requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer","notFoundMessageFor","customer",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose an Comparator",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose an Options",3,"ngModelChange","ngModel","items","clearable"],[2,"width","14px"],["type","checkbox",3,"change"],[4,"ngIf","ngIfElse"],["target","_blank",3,"routerLink","queryParams",4,"ngIf","ngIfElse"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"routerLink","queryParams","innerHtml"],["target","_blank",3,"routerLink","queryParams"]],template:function(a,o){a&1&&_(0,Oa,32,12,"mainpanel-cmp",3),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,yt,R,H,ne,se,We,Ke,Te,Ae,Ee,Se],encapsulation:2})};var Ma=()=>["/menu/Logistics/Archive/Inbound_Logistics/Form"],Pa=()=>["/menu/Logistics/Archive/Inbound_Logistics/Info"],wr=t=>({ID:t}),Fa=()=>["/menu/Orders/Orders/Supplier_Bill/Info"],Va=(t,r)=>({ID:t,Template:r});function Na(t,r){if(t&1){let e=D();q(0),n(1,"a",18),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("InboundLogistics/DeleteInboundLogistics"))}),f(2,"i",19),p(3," Delete"),i(),U()}}function La(t,r){if(t&1){let e=D();n(0,"button",20),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",21),p(2," Export"),i()}}function ka(t,r){t&1&&(n(0,"a",22),p(1," New"),i()),t&2&&m("routerLink",N(1,Ma))}function Ra(t,r){if(t&1){let e=D();n(0,"div",23)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Supplier"),i(),n(6,"autocompleteV2",25),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SupplierID,o)||(c.pageData.Filter.SupplierID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"datepicker",26),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(10,"h6"),p(11,"To"),i(),n(12,"datepicker",27),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),y("ngModel",e.pageData.Filter.SupplierID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To)}}function Aa(t,r){if(t&1){let e=D();n(0,"th",28)(1,"input",29),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function Ba(t,r){if(t&1){let e=D();n(0,"td",28)(1,"input",34),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.selected)}}function Wa(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,Ba,2,1,"td",12),n(3,"td"),p(4),i(),n(5,"td"),f(6,"a",30),i(),n(7,"td"),p(8),i(),n(9,"td"),f(10,"a",30),i(),n(11,"td"),p(12),v(13,"date"),i(),n(14,"td"),p(15),v(16,"date"),i(),n(17,"td",31)(18,"a",32),f(19,"i",33),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.role.logistic.Delete),l(2),b(e.EntityName),l(2),m("routerLink",N(18,Pa))("queryParams",M(19,wr,e.ID))("innerHtml",e.Number,W),l(2),b(e.Name),l(2),m("routerLink",N(21,Fa))("queryParams",M(22,wr,e.SupplierInvoiceID))("innerHtml",e.PONumber,W),l(2),b(P(13,12,e.Date,"dd MMM yyyy")),l(3),b(P(16,15,e.Time,"HH:mm")),l(3),m("queryParams",Re(24,Va,e.ID,e.PrintTemplateID))}}function Ha(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Na,4,0,"ng-container",3)(3,La,3,0,"button",4),n(4,"div",5),_(5,ka,2,2,"a",6),i()(),n(6,"filters"),_(7,Ra,13,8,"ng-template",null,0,X),i(),n(9,"content")(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11),_(15,Aa,2,0,"th",12),n(16,"th",13),p(17,"Outlet"),i(),n(18,"th",13),p(19,"Number"),i(),n(20,"th",14),p(21,"Supplier"),i(),n(22,"th",13),p(23,"PO Number"),i(),n(24,"th",13),p(25,"Date"),i(),n(26,"th",15),p(27,"Time"),i(),f(28,"th"),i()(),_(29,Wa,20,27,"tbody",16),i()(),n(30,"POS-complex-pagination",17),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),l(),m("ngIf",e.role.global.Export),l(2),m("ngIf",e.role.logistic.Create),l(10),m("ngIf",e.role.logistic.Delete),l(14),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Zi=class t extends ve{constructor(e,a,o,c,O,Q){super(e,a,"InboundLogistics/InboundLogisticsList","InboundLogisticsLoader/List",c);this.csvConverter=o;this.role=O;this.matDialog=Q}openExportModal(){this.matDialog.open(be,{data:{title:"Inbound Logistics",exportTypes:[{ID:"InboundLogistics/InboundLogisticsList",Value:"Default",FileName:"Inbound Logistics"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"InboundLogistics/InboundLogisticsRowsCount",pagination:!0}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["CustomerDisplay-supplier-delivery"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Delivery",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","120px"],[2,"width","500px"],[2,"width","90px"],[4,"ngFor","ngForOf"],["api","InboundLogistics/InboundLogisticsRowsCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Delivery",1,"btn","btn-success",3,"routerLink"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID","notFoundMessageFor","supplier",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[2,"width","14px"],["type","checkbox",3,"change"],[3,"routerLink","queryParams","innerHtml"],[1,"text-end"],["routerLink","/print/InDelivery","target","_blank",3,"queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,Ha,31,11,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,yt,R,H,ne,se,We,Ke,Ae,Ee,Se],encapsulation:2})};var en=class t{constructor(r,e,a,o){this.data=r;this.dialogRef=e;this.httpService=a;this.toastr=o;this.modalConfig=new ye,this.modalConfig.title="Email receipt to customer?",this.modalConfig.customWidth="400px"}modalConfig;email;ngOnInit(){}onOk(){let r={email:this.email,invoiceID:this.data.invoiceID};this.httpService.post("/api/Transaction/SendDeliveryEmail",r).subscribe(e=>{this.toastr.success(`Invoice Sent Successful to ${this.email}`,Ce.Success),this.dialogRef.close()})}onClose(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C($e),C(xe),C(L),C(ee))};static \u0275cmp=w({type:t,selectors:[["POS-modal-send-email"]],standalone:!1,decls:7,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[1,"form-floating-outline"],["type","text","id","email","placeholder","Email",1,"form-control",3,"ngModelChange","ngModel"],["for","email"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.onClose()})("onClose",function(){return a.onClose()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"input",3),S("ngModelChange",function(c){return h(a.email,c)||(a.email=c),c}),i(),n(5,"label",4),p(6,"Email"),i()()()()()),e&2&&(m("config",a.modalConfig),l(4),y("ngModel",a.email))},dependencies:[he,fe,R,H],encapsulation:2})};var Er=()=>["/print/OutDelivery"],Qa=(t,r)=>({ID:t,Template:r}),qa=(t,r)=>({ID:t,Template:r,Price:1}),Ua=()=>["/menu/Orders/Order/Sales_Order/Info"],gi=t=>({ID:t}),za=()=>["/menu/Logistics/Archive/Outbound_Logistics/Form"],Ga=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],$a=()=>["/menu/Contacts/Contact/Customers/Info"];function Ka(t,r){if(t&1&&(n(0,"a",40),f(1,"i",41),p(2," Edit "),i()),t&2){let e=s(2);m("routerLink",N(2,za))("queryParams",M(3,gi,e.data.Fulfillment.ID))}}function Ja(t,r){if(t&1){let e=D();n(0,"a",42),g("click",function(){d(e);let o=s(2);return u(o.deleteData("OutboundLogistics/DeleteDeliveryCustomer"))}),f(1,"i",43),p(2," Delete "),i()}}function Ya(t,r){if(t&1){let e=D();n(0,"li",44)(1,"a",45),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),p(2,"Export"),i()()}}function Xa(t,r){if(t&1){let e=D();n(0,"li",44)(1,"a",45),g("click",function(){d(e);let o=s(2);return u(o.openModalNote(o.data.Fulfillment.Note))}),p(2," Add Note "),i()()}}function Za(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Invoice"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",25),p(7),i()()()),t&2){let e=s(2);l(6),m("routerLink",N(3,Ga))("queryParams",M(4,gi,e.data.Order.InvoiceId)),l(),I(" ",e.data.Order.InvoiceNumber," ")}}function el(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Date"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),v(7,"date"),i()()),t&2){let e=s(2);l(6),b(P(7,1,e.data.Order.InvoiceDate,"dd MMM yyyy"))}}function tl(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Customer==null?null:e.data.Customer.Mobile)}}function il(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",47),i()),t&2){let e=s(3);l(5),m("innerHTML",e.data.Customer==null?null:e.data.Customer.Address,W)}}function nl(t,r){if(t&1&&(n(0,"div",14)(1,"div",27)(2,"h2"),f(3,"i",46),p(4,"Customer"),i()(),n(5,"div",21)(6,"table",22)(7,"tr")(8,"th",23),p(9,"Name"),i(),n(10,"td"),p(11,":"),i(),n(12,"td")(13,"a",25),p(14),i()()(),_(15,tl,7,1,"tr",24)(16,il,6,1,"tr",24),i()()()),t&2){let e=s(2);l(13),m("routerLink",N(5,$a))("queryParams",M(6,gi,e.data.Customer==null?null:e.data.Customer.ID)),l(),b(e.data.Customer==null?null:e.data.Customer.Name),l(),m("ngIf",e.data.Customer==null?null:e.data.Customer.Mobile),l(),m("ngIf",e.data.Customer==null?null:e.data.Customer.Address)}}function ol(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Name"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Recipient.Name)}}function rl(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Recipient.Phone)}}function al(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",47),i()),t&2){let e=s(3);l(5),m("innerHTML",e.data.Recipient.Address,W)}}function ll(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Recipient.City)}}function pl(t,r){if(t&1&&(n(0,"div",14)(1,"div",27)(2,"h2"),f(3,"i",46),p(4,"Recipient"),i()(),n(5,"div",21)(6,"table",22),_(7,ol,7,1,"tr",24)(8,rl,7,1,"tr",24)(9,al,6,1,"tr",24)(10,ll,7,1,"tr",24),i()()()),t&2){let e=s(2);l(7),m("ngIf",e.data.Recipient.Name),l(),m("ngIf",e.data.Recipient.Phone),l(),m("ngIf",e.data.Recipient.Address),l(),m("ngIf",e.data.Recipient.City)}}function ml(t,r){if(t&1&&(q(0),f(1,"app-serial-note",51),U()),t&2){let e=s().$implicit;l(),m("serials",e.Serial)}}function cl(t,r){if(t&1&&f(0,"p",52),t&2){let e=s().$implicit;m("innerHTML",e.Note,W)}}function sl(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td")(4,"a",48),p(5),i(),n(6,"div"),p(7),i(),_(8,ml,2,1,"ng-container",24)(9,cl,1,1,"p",49),i(),n(10,"td",50),p(11),v(12,"quantityFraction"),n(13,"div"),p(14),i()()()),t&2){let e=r.$implicit,a=r.index;l(2),b(a+1+"."),l(2),m("queryParams",M(10,gi,e.VariantID)),l(),I(" ",e.Name," "),l(2),b(e.Code),l(),m("ngIf",e.Serial),l(),m("ngIf",e.Note!=null),l(2),I(" ",E(12,8,e.Quantity)," "),l(3),b(e.UOMName)}}function dl(t,r){if(t&1&&(n(0,"div",14)(1,"div",27)(2,"h2"),f(3,"i",53),p(4,"Note"),i()(),f(5,"div",54),i()),t&2){let e=s(2);l(5),m("innerHTML",e.data.Fulfillment.Note,W)}}function ul(t,r){if(t&1&&(n(0,"span")(1,"b"),p(2,"Modified:"),i(),p(3),v(4,"date"),i()),t&2){let e=s(3);l(3),Qe(" ",P(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function _l(t,r){if(t&1&&(n(0,"div",55),f(1,"i",56),n(2,"span")(3,"b"),p(4," Created:"),i(),p(5),v(6,"date"),i(),_(7,ul,5,5,"span",24),i()),t&2){let e=s(2);l(5),Qe(" ",P(6,3,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),l(2),m("ngIf",e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.Date)}}function fl(t,r){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),f(4,"i",4),p(5," Print "),i(),f(6,"button",5),n(7,"ul",6)(8,"li")(9,"a",7),p(10,"Print with Cost"),i()()()(),n(11,"div",8),_(12,Ka,3,5,"a",9)(13,Ja,3,0,"a",10),i()(),n(14,"content")(15,"div",11)(16,"div",12)(17,"div",13)(18,"div",14)(19,"div",15)(20,"div")(21,"h2"),f(22,"i",16),p(23,"Order "),n(24,"small",17),p(25),i()()(),n(26,"div",8)(27,"button",5),f(28,"b",18),i(),n(29,"ul",19),_(30,Ya,3,0,"li",20)(31,Xa,3,0,"li",20),i()()(),n(32,"div",21)(33,"table",22)(34,"tr")(35,"th",23),p(36,"Outlet"),i(),n(37,"td"),p(38,":"),i(),n(39,"td"),p(40),i()(),q(41),_(42,Za,8,6,"tr",24)(43,el,8,4,"tr",24),U(),n(44,"tr")(45,"th",23),p(46,"SO Number"),i(),n(47,"td"),p(48,":"),i(),n(49,"td")(50,"a",25),p(51),i()()(),n(52,"tr")(53,"th",23),p(54,"SO Date"),i(),n(55,"td"),p(56,":"),i(),n(57,"td"),p(58),v(59,"date"),i()()()()(),_(60,nl,17,8,"div",26)(61,pl,11,4,"div",26),n(62,"div",14)(63,"div",27)(64,"h2"),f(65,"i",28),p(66,"Fulfillment"),i()(),n(67,"div",21)(68,"table",22)(69,"tr")(70,"th",23),p(71,"Outlet"),i(),n(72,"td"),p(73,":"),i(),n(74,"td"),p(75),i()(),n(76,"tr")(77,"th",23),p(78,"Date"),i(),n(79,"td"),p(80,":"),i(),n(81,"td"),p(82),v(83,"date"),i()(),n(84,"tr")(85,"th",23),p(86,"Number"),i(),n(87,"td"),p(88,":"),i(),n(89,"td"),p(90),i()(),n(91,"tr")(92,"th",23),p(93,"Courier"),i(),n(94,"td"),p(95,":"),i(),n(96,"td"),p(97),i()()()()()(),n(98,"div",29)(99,"div",14)(100,"div",27)(101,"h2"),f(102,"i",30),p(103,"Products"),i()(),n(104,"div",21)(105,"table",31)(106,"thead",32)(107,"tr")(108,"th",33),p(109,"No."),i(),n(110,"th"),p(111,"Products"),i(),n(112,"th",23),p(113,"Qty"),i()()(),n(114,"tbody"),_(115,sl,15,12,"tr",34),i(),n(116,"tfoot",35)(117,"tr")(118,"td",36),p(119," Total "),i(),n(120,"td",37),p(121),v(122,"sum"),v(123,"quantityFraction"),i()()()()()(),_(124,dl,6,1,"div",26),i(),n(125,"div",38),_(126,_l,8,6,"div",39),i()()()()()),t&2){let e=s();m("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(3),m("routerLink",N(40,Er))("queryParams",Re(41,Qa,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(6),m("routerLink",N(44,Er))("queryParams",Re(45,qa,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(3),m("ngIf",e.role.logistic.Edit&&e.data.WriteAccess),l(),m("ngIf",e.role.logistic.Delete),l(12),I(" (",e.data.Fulfillment.Status,") "),l(5),m("ngIf",e.role.global.Export),l(),m("ngIf",e.data.Fulfillment.Note==null),l(9),b(e.data.Order.OutletName),l(2),m("ngIf",e.data.Order.InvoiceNumber),l(),m("ngIf",e.data.Order.InvoiceDate),l(7),m("routerLink",N(48,Ua))("queryParams",M(49,gi,e.data.Order.SalesOrderId)),l(),I(" ",e.data.Order.SalesOrderNumber," "),l(7),I(" ",P(59,29,e.data.Order.SalesOrderDate,"dd MMM yyyy")," "),l(2),m("ngIf",e.data.Customer==null?null:e.data.Customer.ID),l(),m("ngIf",(e.data.Recipient==null?null:e.data.Recipient.ID)!=e.guidEmpty),l(14),I(" ",e.data.Fulfillment.OutletName," "),l(7),I(" ",P(83,32,e.data.Fulfillment.Date,"dd MMM yyyy")," "),l(8),I(" ",e.data.Fulfillment.Number," "),l(7),I(" ",e.data.Fulfillment.Courier," "),l(18),m("ngForOf",e.data.Items),l(6),I(" ",E(123,38,P(122,35,e.data.Items,"Quantity"))," "),l(3),m("ngIf",e.data==null?null:e.data.Fulfillment.Note),l(2),m("ngIf",!e.role.users.LogRestriction)}}var tn=class t extends yr{constructor(e,a,o,c,O,Q,re,Ue){super(e,a,"OutboundLogistics/Info",c);this.httpService=a;this.csvConverter=o;this.toaster=O;this.router=Q;this.role=re;this.matDialog=Ue}guidEmpty=T.GuidEmpty;openExportModal(){this.matDialog.open(be,{data:{title:"Outbound Logistics",exportTypes:[{ID:"OutboundLogistics/ExportInfo",Value:"Default"}],filterExport:{},getAllDataLengthAPI:"",pagination:!1}})}postBindData(e){e.Items=e.Items.filter(a=>a.Quantity!=0),this.menuData.H=`Outbound Logistics #${e.Fulfillment.Number}`}deleteData(e){confirm("Are you sure you want to delete this?")&&this.httpService.delete(`/API/${e}`,{params:[{key:"ID",value:this.data.Fulfillment.ID}]}).subscribe(()=>{this.toaster.success("Records are removed.","Success"),this.router.navigate(["/menu/Logistics/Archive/Outbound_Logistics"])})}openEmailDialog(){this.matDialog.open(en,{data:{invoiceID:this.data.ID}})}exportCSV(e,a,o){o=o||"export.csv",this.httpService.post(`/api/${a}`,this.data.Fulfillment).subscribe(c=>{e.convertToCSV(c,o)})}onUpdate(e,a){this.httpService.post(`/api/${e}`,a).subscribe(o=>{this.reload()})}reload(){let e="OutboundLogistics/Info",a={ID:this.data.Fulfillment.ID};this.httpService.post(`/api/${e}`,a).subscribe({next:o=>{this.data=o}})}openModalNote(e){this.matDialog.open(Sr,{data:e.SONote}).afterClosed().subscribe(o=>{if(e){var c={ID:this.data.Fulfillment.ID,Note:o};this.onUpdate("OutboundLogistics/UpdateNoteOutboundLogistics",c)}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(pe),C(ee),C(nt),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-customer-delivery-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"btn-group","me-5"],["target","_blank",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],["target","_blank",1,"dropdown-item",3,"routerLink","queryParams"],[1,"btn-group"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-body-secondary","h6"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],["class","dropdown-item",4,"ngIf"],[1,"card-body"],[1,"table-sm","table-borderless"],[2,"width","80px"],[4,"ngIf"],["target","_blank",1,"ps-0",3,"routerLink","queryParams"],["class","card",4,"ngIf"],[1,"card-header"],[1,"fa-solid","fa-truck","me-5"],[1,"col-8"],[1,"fa-solid","fa-box","me-5"],[1,"table"],[1,"thead-light"],[2,"width","40px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end","empty-column","fw-bold"],[1,"text-center","empty-column","fw-bold"],[1,"col-12"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash"],[1,"dropdown-item"],[3,"click"],[1,"fa-solid","fa-address-card","me-5"],[3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],["class","special-TinyMCE fst-italic text-warning mb-0","style","word-break: break-all",3,"innerHTML",4,"ngIf"],[1,"text-center"],[3,"serials"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body",3,"innerHTML"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(a,o){a&1&&_(0,fl,127,51,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,ne,ct,Se,Be,Ai],encapsulation:2})};var Or=t=>({ID:t}),gl=()=>["/menu/Outlets/Master/Outlets/Form"];function Cl(t,r){if(t&1){let e=D();n(0,"button",18),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",19),p(2," Export"),i()}}function vl(t,r){if(t&1){let e=D();n(0,"div",20)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",22),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",23),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(10,"h6"),p(11,"Supplier"),i(),n(12,"autocompleteV2",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SupplierID,o)||(c.pageData.Filter.SupplierID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.SupplierID)}}function xl(t,r){t&1&&(n(0,"th"),p(1,"Outlet"),i())}function yl(t,r){t&1&&(n(0,"th",25),p(1,"Total"),i())}function hl(t,r){if(t&1&&(n(0,"td")(1,"a",29),p(2),i()()),t&2){let e=s().$implicit;l(),m("routerLink",N(3,gl))("queryParams",M(4,Or,e.EntityID)),l(),b(e.EntityName)}}function Sl(t,r){if(t&1&&(n(0,"td",27),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.Total))}}function bl(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td")(4,"a",26),p(5),i()(),_(6,hl,3,6,"td",9),n(7,"td",27),p(8),v(9,"number"),i(),_(10,Sl,3,3,"td",28),i()),t&2){let e=r.$implicit,a=s(2);l(2),b(e.VariantCode),l(2),m("queryParams",M(8,Or,e.VariantID)),l(),b(e.VariantName),l(),m("ngIf",!a.data.isOutlet),l(2),b(E(9,6,e.Quantity)),l(2),m("ngIf",a.roleService.sell.Create)}}function Dl(t,r){t&1&&f(0,"td",30)}function Il(t,r){if(t&1&&(n(0,"td",16),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s(2);l(),I(" ",E(3,4,P(2,1,e.data.Data,"Total")),"")}}function Tl(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Cl,3,0,"button",3),i(),n(3,"filters"),_(4,vl,13,8,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Code"),i(),n(14,"th"),p(15,"Variant"),i(),_(16,xl,2,0,"th",9),n(17,"th",10),p(18,"Qty"),i(),_(19,yl,2,0,"th",11),i()(),n(20,"tbody"),_(21,bl,11,10,"tr",12),i(),n(22,"tfoot")(23,"tr",13),_(24,Dl,1,0,"td",14),n(25,"td",15),p(26,"Total :"),i(),n(27,"td",16),p(28),v(29,"sum"),v(30,"number"),i(),_(31,Il,4,6,"td",17),i()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(14),m("ngIf",!e.data.isOutlet),l(3),m("ngIf",e.roleService.sell.Create),l(2),m("ngForOf",e.data.Data),l(3),m("ngIf",!e.data.isOutlet),l(4),I("",E(30,14,P(29,11,e.data.Data,"Quantity"))," "),l(3),m("ngIf",e.roleService.sell.Create)}}var nn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"OutboundLogistics/GetOutStockReportProduct","OutboundLogisticsLoader/GetOutStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Out Stock Report By Product",exportTypes:[{ID:"OutboundLogistics/GetOutStockReportProduct",Value:"Default",FileName:"Out Stock Report By Product"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(){this.menuData.H=this.data.PageTitle}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-outgoing-product"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[4,"ngIf"],[1,"text-end",2,"width","200px"],["style","width:150px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","text-end empty-column",4,"ngIf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end",2,"background","#F0E68C"],["class","text-end","style","background: #F0E68C;",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],[1,"text-end",2,"width","150px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end","empty-column"]],template:function(a,o){a&1&&_(0,Tl,32,16,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,We,Ee,_e,Be],encapsulation:2})};var wl=()=>["/menu/Logistics/Archive/Outbound_Logistics/Info"],Zn=t=>({ID:t}),El=()=>["/menu/Contacts/Contact/Customers/Info"];function Ol(t,r){if(t&1){let e=D();n(0,"button",15),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",16),p(2," Export"),i()}}function Ml(t,r){if(t&1){let e=D();n(0,"div",17)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",18),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",20),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To)}}function Pl(t,r){t&1&&(n(0,"th",21),p(1,"Price"),i())}function Fl(t,r){t&1&&(n(0,"th",21),p(1,"Total"),i())}function Vl(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(P(2,1,e.Price,"1.0-2"))}}function Nl(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(P(2,1,e.Total,"1.0-2"))}}function Ll(t,r){if(t&1&&(n(0,"tr")(1,"td",33)(2,"a",34),p(3),i()(),n(4,"td",35),p(5),i(),n(6,"td",36),p(7),v(8,"number"),i(),_(9,Vl,3,4,"td",37)(10,Nl,3,4,"td",37),i()),t&2){let e=r.$implicit,a=s(3);l(2),m("queryParams",M(9,Zn,e.VariantID)),l(),b(e.VariantName),l(2),I(" ",e.VariantCode,""),l(2),I(" ",P(8,6,e.Quantity,"1.0-2"),""),l(2),m("ngIf",a.roleService.sell.PriceVisible),l(),m("ngIf",a.roleService.sell.PriceVisible)}}function kl(t,r){t&1&&(n(0,"th",39),p(1,"Amount : "),i())}function Rl(t,r){if(t&1&&(n(0,"th",39),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s().$implicit;l(),b(P(3,4,P(2,1,e.Variant,"Total"),"1.0-2"))}}function Al(t,r){if(t&1&&(n(0,"div",22)(1,"div")(2,"a",23)(3,"span",24),p(4),i()(),n(5,"span"),p(6),v(7,"date"),i(),n(8,"span"),p(9),i(),n(10,"a",25),p(11),i()(),n(12,"table",26),f(13,"thead"),n(14,"tbody",27),_(15,Ll,11,11,"tr",28),i()(),n(16,"table",26),f(17,"thead"),n(18,"tbody",29)(19,"tr"),f(20,"th",30),n(21,"th",31),p(22,"Total Qty : "),i(),n(23,"th",10),p(24),v(25,"sum"),v(26,"number"),i(),_(27,kl,2,0,"th",32)(28,Rl,4,7,"th",32),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink",N(20,wl))("queryParams",M(21,Zn,e.OrderDeliveryID)),l(2),b(e.OutletName+" #"+e.Number),l(2),I(" "," - "+P(7,12,e.Date,"dd MMM yyyy")," "),l(3),I(" "," - "," "),l(),m("routerLink",N(23,El))("queryParams",M(24,Zn,e.CustomerID)),l(),b(e.CustomerName),l(4),m("ngForOf",e.Variant),l(9),b(E(26,18,P(25,15,e.Variant,"Quantity"))),l(3),m("ngIf",a.roleService.sell.PriceVisible),l(),m("ngIf",a.roleService.sell.PriceVisible)}}function Bl(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Ol,3,0,"button",3),i(),n(3,"filters"),_(4,Ml,10,7,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),n(16,"th",10),p(17,"Qty"),i(),_(18,Pl,2,0,"th",11)(19,Fl,2,0,"th",11),i()(),n(20,"tbody")(21,"tr")(22,"td",12),_(23,Al,29,26,"div",13),i()()()()(),n(24,"POS-complex-pagination",14),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(16),m("ngIf",e.roleService.sell.PriceVisible),l(),m("ngIf",e.roleService.sell.PriceVisible),l(4),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var on=class t extends ve{constructor(e,a,o,c,O){super(e,a,"OutboundLogistics/GetOutStockReportDetail","OutboundLogisticsLoader/GetOutStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Report Outgoing Detail",exportTypes:[{ID:"OutboundLogistics/GetOutStockReportDetail",Value:"Default",FileName:"Report Outgoing Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"OutboundLogistics/GetOutStockReportDetailCount",pagination:!0}})}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-outgoing-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","400px"],[2,"width","150px"],[1,"text-end",2,"width","30px"],["class","text-end","style","width: 150px",4,"ngIf"],["colspan","5",1,"px-0","border-bottom-0"],["class","mb-5",4,"ngFor","ngForOf"],["api","OutboundLogistics/GetOutStockReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"text-end",2,"width","150px"],[1,"mb-5"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4"],[3,"routerLink","queryParams"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[4,"ngFor","ngForOf"],[1,"table","table-sm"],[2,"width","645px"],[1,"text-end",2,"width","75px"],["style","width: 90px","class","text-end",4,"ngIf"],[1,"border-start","border-end",2,"width","400px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","150px"],[1,"text-end","border-start","border-end",2,"width","30px"],["class","text-end border-start border-end","style","width: 150px",4,"ngIf"],[1,"text-end","border-start","border-end",2,"width","150px"],[1,"text-end",2,"width","90px"]],template:function(a,o){a&1&&_(0,Bl,25,10,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Ke,Ee,_e,Se,Be],encapsulation:2})};var Mr=t=>({ID:t}),Wl=()=>["/menu/Outlets/Master/Outlets/Form"];function Hl(t,r){if(t&1){let e=D();n(0,"button",18),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",19),p(2," Export"),i()}}function jl(t,r){if(t&1){let e=D();n(0,"div",20)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",22),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",23),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2)("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),y("ngModel",e.pageData.Filter.EntityID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To)}}function Ql(t,r){t&1&&(n(0,"th"),p(1,"Outlet"),i())}function ql(t,r){t&1&&(n(0,"th",10),p(1,"Total"),i())}function Ul(t,r){if(t&1&&(n(0,"td")(1,"a",27),p(2),i()()),t&2){let e=s().$implicit;l(),m("routerLink",N(3,Wl))("queryParams",M(4,Mr,e.EntityID)),l(),b(e.EntityName)}}function zl(t,r){if(t&1&&(n(0,"td",25),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.Total))}}function Gl(t,r){if(t&1&&(n(0,"tr")(1,"td")(2,"a",24),p(3),i()(),n(4,"td"),p(5),i(),_(6,Ul,3,6,"td",9),n(7,"td",25),p(8),v(9,"number"),i(),_(10,zl,3,3,"td",26),i()),t&2){let e=r.$implicit,a=s(2);l(2),m("queryParams",M(8,Mr,e.VariantID)),l(),b(e.VariantCode),l(2),b(e.VariantName),l(),m("ngIf",!a.data.isOutlet),l(2),b(E(9,6,e.Quantity)),l(2),m("ngIf",a.roleService.product.Cost)}}function $l(t,r){t&1&&f(0,"td",28)}function Kl(t,r){if(t&1&&(n(0,"td",16),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s(2);l(),I(" ",E(3,4,P(2,1,e.data.List,"Total")),"")}}function Jl(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Hl,3,0,"button",3),i(),n(3,"filters"),_(4,jl,10,7,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Code"),i(),n(14,"th"),p(15,"Variant"),i(),_(16,Ql,2,0,"th",9),n(17,"th",10),p(18,"Qty"),i(),_(19,ql,2,0,"th",11),i()(),n(20,"tbody"),_(21,Gl,11,10,"tr",12),i(),n(22,"tfoot")(23,"tr",13),_(24,$l,1,0,"td",14),n(25,"td",15),p(26,"Total :"),i(),n(27,"td",16),p(28),v(29,"sum"),v(30,"number"),i(),_(31,Kl,4,6,"td",17),i()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(14),m("ngIf",!e.data.isOutlet),l(3),m("ngIf",e.roleService.product.Cost),l(2),m("ngForOf",e.data.List),l(3),m("ngIf",!e.data.isOutlet),l(4),I("",E(30,14,P(29,11,e.data.List,"Quantity"))," "),l(3),m("ngIf",e.roleService.product.Cost)}}var rn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"InboundLogistics/GetInStockReportProduct","InboundLogisticsLoader/GetInStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Product Stock In Report",exportTypes:[{ID:"InboundLogistics/GetInStockReportProduct",Value:"Default",FileName:"Product Stock In Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(){this.menuData.H=this.data.PageTitle}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-incoming-product"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[4,"ngIf"],[1,"text-end",2,"width","50px"],["style","width:50px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","text-end empty-column",4,"ngIf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end",2,"background","#F0E68C"],["class","text-end","style","background: #F0E68C;",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","outlets","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end","empty-column"]],template:function(a,o){a&1&&_(0,Jl,32,16,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Ee,_e,Be],encapsulation:2})};var Yl=()=>["/menu/Logistics/Archive/Inbound_Logistics/Info"],eo=t=>({ID:t});function Xl(t,r){if(t&1){let e=D();n(0,"button",15),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",16),p(2," Export"),i()}}function Zl(t,r){if(t&1){let e=D();n(0,"div",17)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",18),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",20),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(10,"h6"),p(11,"Supplier"),i(),n(12,"autocompleteV2",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SupplierID,o)||(c.pageData.Filter.SupplierID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2)("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),y("ngModel",e.pageData.Filter.EntityID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.SupplierID)}}function ep(t,r){t&1&&(n(0,"th",22),p(1,"Cost"),i())}function tp(t,r){t&1&&(n(0,"th",22),p(1,"Total"),i())}function ip(t,r){if(t&1&&(n(0,"span"),p(1," - "),n(2,"span")(3,"a",32),p(4),i()()()),t&2){let e=s().$implicit;l(3),m("queryParams",M(2,eo,e.SupplierID)),l(),I(" ",e.SupplierName," ")}}function np(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I("",P(2,1,e.UnitCost,"1.0-2")," ")}}function op(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I("",P(2,1,e.Total,"1.0-2")," ")}}function rp(t,r){if(t&1&&(n(0,"tr")(1,"td",33)(2,"a",34),p(3),i()(),n(4,"td",35),p(5),i(),n(6,"td",36),p(7),i(),_(8,np,3,4,"td",37)(9,op,3,4,"td",37),i()),t&2){let e=r.$implicit,a=s(3);l(2),m("queryParams",M(6,eo,e.VariantID)),l(),b(e.VariantName),l(2),I(" ",e.VariantCode,""),l(2),I(" ",e.Quantity,""),l(),m("ngIf",a.roleService.product.Cost),l(),m("ngIf",a.roleService.product.Cost)}}function ap(t,r){t&1&&(n(0,"th",22),p(1,"Amount : "),i())}function lp(t,r){if(t&1&&(n(0,"th",22),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s().$implicit;l(),b(P(3,4,P(2,1,e.Variant,"Total"),"1.0-2"))}}function pp(t,r){if(t&1&&(n(0,"div",23)(1,"div")(2,"a",24)(3,"span",25),p(4),i()(),n(5,"span"),p(6),v(7,"date"),i(),n(8,"span"),p(9),v(10,"date"),i(),_(11,ip,5,4,"span",26),i(),n(12,"table",27),f(13,"thead"),n(14,"tbody",28),_(15,rp,10,8,"tr",29),i()(),n(16,"table",27),f(17,"thead"),n(18,"tbody",30)(19,"tr"),f(20,"th",8),n(21,"th",9),p(22,"Total Qty : "),i(),n(23,"th",10),p(24),v(25,"sum"),v(26,"number"),i(),_(27,ap,2,0,"th",31)(28,lp,4,7,"th",31),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink",N(21,Yl))("queryParams",M(22,eo,e.InDeliveryID)),l(2),b(e.OutletName+" #"+e.InDeliveryNumber),l(2),I(" "," - In Date: "+P(7,10,e.InDeliveryDate,"dd MMM yyyy")," "),l(3),I(" "," - PO Date: "+P(10,13,e.PODate,"dd MMM yyyy")," "),l(2),m("ngIf",e.SupplierName),l(4),m("ngForOf",e.Variant),l(9),b(E(26,19,P(25,16,e.Variant,"Quantity"))),l(3),m("ngIf",a.roleService.product.Cost),l(),m("ngIf",a.roleService.product.Cost)}}function mp(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Xl,3,0,"button",3),i(),n(3,"filters"),_(4,Zl,13,8,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),n(16,"th",10),p(17,"Qty"),i(),_(18,ep,2,0,"th",11)(19,tp,2,0,"th",11),i()(),n(20,"tbody")(21,"tr")(22,"td",12),_(23,pp,29,24,"div",13),i()()()()(),n(24,"POS-complex-pagination",14),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(16),m("ngIf",e.roleService.product.Cost),l(),m("ngIf",e.roleService.product.Cost),l(4),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var an=class t extends ve{constructor(e,a,o,c,O){super(e,a,"InboundLogistics/GetInStockReportDetail","InboundLogisticsLoader/GetInStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Stock In Report",exportTypes:[{ID:"InboundLogistics/GetInStockReportDetail",Value:"Default",FileName:"Stock In Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"InboundLogistics/GetInStockReportDetailCount",pagination:!0}})}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-incoming-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[1,"text-end",2,"width","75px"],[1,"text-end",2,"width","30px"],["class","text-end","style","width: 90px",4,"ngIf"],["colspan","5",1,"px-0","border-bottom-0"],["class","mb-5",4,"ngFor","ngForOf"],["api","InboundLogistics/GetInStockReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","outlets","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],[1,"text-end",2,"width","90px"],[1,"mb-5"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4"],[4,"ngIf"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[4,"ngFor","ngForOf"],[1,"table","table-sm","table-borderless"],["style","width: 90px","class","text-end",4,"ngIf"],["routerLink","/menu/Contacts/Contact/Suppliers/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","645px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","75px"],[1,"text-end","border-start","border-end",2,"width","30px"],["class","text-end border-start border-end","style","width: 90px",4,"ngIf"],[1,"text-end","border-start","border-end",2,"width","90px"]],template:function(a,o){a&1&&_(0,mp,25,10,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,We,Ke,Ee,_e,Se,Be],encapsulation:2})};var sp=t=>({ID:t});function dp(t,r){if(t&1){let e=D();n(0,"button",13),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",14),p(2," Export "),i()}}function up(t,r){if(t&1){let e=D();n(0,"div",15)(1,"h6"),p(2,"Courier"),i(),n(3,"ng-select",16),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CourierID,o)||(c.pageData.Filter.CourierID=o),u(o)}),i(),n(4,"h6"),p(5,"Category"),i(),n(6,"POS-product-category-select",17),S("selectedCategoryIDChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CategoryID,o)||(c.pageData.Filter.CategoryID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"datepicker",18),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),g("dateChange",function(){d(e);let o=s(2);return u(o.getListData())}),i(),n(10,"h6"),p(11,"To"),i(),n(12,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),g("dateChange",function(){d(e);let o=s(2);return u(o.getListData())}),i(),n(13,"h6"),p(14,"Scope"),i(),n(15,"radio-options",20),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.Product,o)||(c.pageData.Filter.Product=o),u(o)}),g("modelChange",function(){d(e);let o=s(2);return u(o.getListData())}),i(),n(16,"h6"),p(17,"Product"),i(),n(18,"autocompleteV2",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.ProductID,o)||(c.pageData.Filter.ProductID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Courier),y("ngModel",e.pageData.Filter.CourierID),l(3),y("selectedCategoryID",e.pageData.Filter.CategoryID),m("showClear",!0),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),m("options",e.scopeOptions),y("model",e.pageData.Filter.Product),l(3),y("ngModel",e.pageData.Filter.ProductID),m("inputTextValue",e.pageData.Filter.Name)}}function _p(t,r){if(t&1&&(n(0,"th",11),p(1),i()),t&2){let e=r.$implicit;l(),I(" ",e," ")}}function fp(t,r){if(t&1&&(n(0,"td",11),p(1),i()),t&2){let e=r.$implicit;l(),I(" ",e," ")}}function gp(t,r){if(t&1&&(n(0,"tr")(1,"td")(2,"a",22),p(3),i()(),n(4,"td",23),p(5),i(),_(6,fp,2,1,"td",10),n(7,"td",11),p(8),i()()),t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink","/menu/Products/Catalog/"+(a.pageData.Filter.Product?"Products":"Variants")+"/Info")("queryParams",M(6,sp,e.ID)),l(),I(" ",e.Name," "),l(2),b(e.Code),l(),m("ngForOf",e.Quantities),l(2),b(e.Total)}}function Cp(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,dp,3,0,"button",3),i(),n(3,"filters"),_(4,up,19,12,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),_(16,_p,2,1,"th",10),n(17,"th",11),p(18,"Total"),i()()(),n(19,"tbody"),_(20,gp,9,8,"tr",12),i()()()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(14),m("ngForOf",e.data.Outlet),l(4),m("ngForOf",e.data.Data)}}var ln=class t extends ve{constructor(e,a,o,c,O,Q){super(e,a,"TransferOrder/DeliveryOutletByProduct","TransferOrderLoader/DeliveryOutletByProduct",null,O);this.csvConverter=o;this.roleService=c;this.matDialog=Q}openExportModal(){this.matDialog.open(be,{data:{title:"In Stock Report By Product",exportTypes:[{ID:"TransferOrder/DeliveryOutletByProduct",Value:"Default",FileName:"In Stock Report By Product"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}scopeOptions=[{Key:!1,Value:"Variant"},{Key:!0,Value:"Product"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(pe),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-transfer-product"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","hideSearchBox","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","10%","text-align","right"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModelChange","items","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["name","scopeOptions",3,"modelChange","options","model"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName","placeholder","Product","inputID","ProductID",1,"form-control","ac-filter",3,"ngModelChange","ngModel","inputTextValue"],[3,"routerLink","queryParams"],[2,"text-align","right"]],template:function(a,o){a&1&&_(0,Cp,21,8,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Rt,We,Te,oi],encapsulation:2})};var vp=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],Pr=t=>({ID:t}),xp=t=>({"bg-warning":t});function yp(t,r){if(t&1){let e=D();n(0,"button",16),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",17),p(2," Export "),i()}}function hp(t,r){if(t&1){let e=D();n(0,"div",18)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",19),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",20),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DestinationID,o)||(c.pageData.Filter.DestinationID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"datepicker",21),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(10,"h6"),p(11,"To"),i(),n(12,"datepicker",22),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(13,"h6"),p(14,"Category"),i(),n(15,"POS-product-category-select",23),S("selectedCategoryIDChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CategoryID,o)||(c.pageData.Filter.CategoryID=o),u(o)}),i(),n(16,"h6"),p(17,"Type"),i(),n(18,"ng-select",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.TypeID,o)||(c.pageData.Filter.TypeID=o),u(o)}),i(),n(19,"h6"),p(20,"Delivery"),i(),n(21,"ng-select",25),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DeliveryID,o)||(c.pageData.Filter.DeliveryID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",4),y("ngModel",e.pageData.Filter.DestinationID),m("multiple",!1),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("selectedCategoryID",e.pageData.Filter.CategoryID),m("showClear",!0),l(3),m("items",e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),l(3),m("items",e.pageData.Options.Deliveries),y("ngModel",e.pageData.Filter.DeliveryID)}}function Sp(t,r){t&1&&(n(0,"th",26),p(1," Total Price "),i())}function bp(t,r){t&1&&(n(0,"th",26),p(1," Total Cost "),i())}function Dp(t,r){t&1&&f(0,"i",37)}function Ip(t,r){if(t&1&&(f(0,"td",43),v(1,"number")),t&2){let e=s().$implicit;m("innerHTML",E(1,1,e.UnitPrice),W)}}function Tp(t,r){if(t&1&&(f(0,"td",43),v(1,"number")),t&2){let e=s().$implicit;m("innerHTML",E(1,1,e.UnitCost),W)}}function wp(t,r){if(t&1&&(n(0,"tr")(1,"td",8)(2,"a",38),p(3),i()(),f(4,"td",39)(5,"td",40)(6,"td",41),v(7,"number"),f(8,"td",41),v(9,"number"),_(10,Ip,2,3,"td",42)(11,Tp,2,3,"td",42),i()),t&2){let e=r.$implicit,a=s().$implicit,o=s(2);ft(M(14,xp,e.QtyRequested!=e.Quantity)),l(2),m("queryParams",M(16,Pr,e.VariantID)),l(),I(" ",e.VariantName," "),l(),m("innerHTML",e.Code,W),l(),m("innerHTML",a.StateLabel,W),l(),m("innerHTML",E(7,10,e.QtyRequested),W),l(2),m("innerHTML",E(9,12,e.Quantity),W),l(2),m("ngIf",o.roleService.sell.PriceVisible),l(),m("ngIf",o.roleService.product.Cost)}}function Ep(t,r){if(t&1&&(n(0,"div",27)(1,"div",28)(2,"div",29)(3,"a",30),f(4,"span",31),v(5,"date"),i()()(),n(6,"div",32)(7,"span"),p(8),i(),f(9,"br"),_(10,Dp,1,0,"i",33),f(11,"span",34),i(),n(12,"div",5)(13,"table",35)(14,"tbody"),_(15,wp,12,18,"tr",36),i()()()()),t&2){let e=r.$implicit;l(3),m("routerLink",N(12,vp))("queryParams",M(13,Pr,e.ID)),l(),m("innerHTML","# "+e.Number+" - "+P(5,9,e.Date,"dd MMM yyyy"),W),l(4),xo("",e.Source," > ",e.Destination," - ",e.TypeName,""),l(2),m("ngIf",e.Note),l(),m("innerHTML",e.Note,W),l(4),m("ngForOf",e.Items)}}function Op(t,r){if(t&1&&(n(0,"div")(1,"strong"),p(2,"Total Unit Price :"),i(),f(3,"span",46),v(4,"GetChildrenArray"),v(5,"sum"),v(6,"number"),i()),t&2){let e=s(3);l(3),m("innerHTML",P(6,7,P(5,4,P(4,1,e.data.Data,"Items"),"UnitPrice"),"1.0-2"),W)}}function Mp(t,r){if(t&1&&(n(0,"div")(1,"strong"),p(2,"Total Unit Cost :"),i(),f(3,"span",46),v(4,"GetChildrenArray"),v(5,"sum"),v(6,"number"),i()),t&2){let e=s(3);l(3),m("innerHTML",P(6,7,P(5,4,P(4,1,e.data.Data,"Items"),"UnitCost"),"1.0-2"),W)}}function Pp(t,r){if(t&1&&(n(0,"div",44)(1,"div",45)(2,"div")(3,"strong"),p(4,"Total Quantity"),i(),f(5,"span",46),v(6,"GetChildrenArray"),v(7,"sum"),v(8,"number"),i(),_(9,Op,7,10,"div",47)(10,Mp,7,10,"div",47),i()()),t&2){let e=s(2);l(5),m("innerHTML",E(8,9,P(7,6,P(6,3,e.data.Data,"Items"),"Quantity")),W),l(4),m("ngIf",e.roleService.sell.PriceVisible),l(),m("ngIf",e.roleService.product.Cost)}}function Fp(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,yp,3,0,"button",3),i(),n(3,"filters"),_(4,hp,22,16,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),n(16,"th",10),p(17,"Delivery"),i(),n(18,"th",11),p(19,"Qty Req"),i(),n(20,"th",11),p(21,"Qty Sent"),i(),_(22,Sp,2,0,"th",12)(23,bp,2,0,"th",12),i()()()(),_(24,Ep,16,15,"div",13)(25,Pp,11,11,"div",14),n(26,"POS-complex-pagination",15),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(20),m("ngIf",e.roleService.sell.PriceVisible),l(),m("ngIf",e.roleService.product.Cost),l(),m("ngForOf",e.data.Data),l(),m("ngIf",e.data.Data.length>0),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var pn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"TransferOrder/GetReport","TransferOrderLoader/TransferOutletDeliveryReport");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Transfer Order Report",exportTypes:[{ID:"TransferOrder/GetReport",Value:"Default",FileName:"Transfer Order Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/GetReportCount",pagination:!0}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-transfer-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","float-thead","{ top: 60, autoReflow: true }",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-start",2,"width","700px"],[2,"width","115px"],[1,"text-end",2,"width","75px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 90px",4,"ngIf"],["class","mt-7 ms-5",4,"ngFor","ngForOf"],["class","mt-6",4,"ngIf"],["api","TransferOrder/GetReportCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Choose destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose type",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose",3,"ngModelChange","items","ngModel"],[1,"text-end",2,"width","90px"],[1,"mt-7","ms-5"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",3,"innerHTML"],[1,"mt-4"],["class","fa-solid fa-note-sticky me-3",4,"ngIf"],[1,"fst-italic",3,"innerHTML"],[1,"table","table-striped","table-bordered"],[3,"class",4,"ngFor","ngForOf"],[1,"fa-solid","fa-note-sticky","me-3"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start",2,"width","115px",3,"innerHTML"],[1,"text-end","border-start",2,"width","75px",3,"innerHTML"],[1,"text-end","border-start",2,"width","50px",3,"innerHTML"],["class","text-end border-start","style","width: 90px",3,"innerHTML",4,"ngIf"],[1,"text-end","border-start",2,"width","90px",3,"innerHTML"],[1,"mt-6"],[1,"zebra","d-flex","justify-content-end"],[1,"text-end",3,"innerHTML"],[4,"ngIf"]],template:function(a,o){a&1&&_(0,Fp,27,11,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Ke,Te,oi,Ee,_e,Se,Be,Qo],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:15px!important}"]})};function Vp(t,r){if(t&1){let e=D();n(0,"div",2)(1,"div",6)(2,"datepicker",7),S("dateChange",function(o){d(e);let c=s();return h(c.date,o)||(c.date=o),u(o)}),i()(),n(3,"div",8)(4,"p-datepicker",9),S("ngModelChange",function(o){d(e);let c=s();return h(c.time,o)||(c.time=o),u(o)}),i()()()}if(t&2){let e=s();l(2),y("date",e.date),l(2),y("ngModel",e.time),m("timeOnly",!0)}}var Ci=class t{constructor(r){this.dialogRef=r;let e=this.data?.title||"Receive Delivery";this.type.update(a=>this.data?.type||a),this.config=new ye,this.config.title=e,this.config.customWidth="450px"}data=x($e);role=x(ie);type=_t("RECEIVE");config;date=new Date;time=new Date;note="";onOk(r){if(r=="Enter")return;this.date&&(this.date=new Date(this.date),this.date.setHours(this.time.getHours(),this.time.getMinutes(),this.time.getSeconds()));let e={Date:this.date,Note:this.note};this.dialogRef.close(e)}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-modal-receive"]],decls:7,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[1,"row","mb-8"],[1,"row"],[1,"col"],["height","200px",3,"ngModelChange","ngModel"],[1,"col","pe-1"],["appearance","outline",3,"dateChange","date"],[1,"col","ps-1"],[3,"ngModelChange","ngModel","timeOnly"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(c){return a.onOk(c)})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),n(1,"content")(2,"div",1),_(3,Vp,5,3,"div",2),n(4,"div",3)(5,"div",4)(6,"POS-tinymce-editor",5),S("ngModelChange",function(c){return h(a.note,c)||(a.note=c),c}),i()()()()()()),e&2&&(m("config",a.config),l(3),Ye(a.role.global!=null&&a.role.global.Date&&a.type()=="RECEIVE"?3:-1),l(3),y("ngModel",a.note))},dependencies:[Z,Ve,he,ot,R,H,ji,se,Qi,zo,St,ht],styles:[".p-inputtext.p-component{margin-left:10px;margin-top:1px;height:45.4px}"]})};var Fr=Ur(zr(),1),Vr=(()=>{class t{set _emptyInputBehavior(e){e&&(this.emptyInputBehavior=e,this.updateNumericSettings())}set _max(e){e&&(this.max=e,this.updateNumericSettings())}set _min(e){e&&(this.min=e,this.updateNumericSettings())}constructor(e){this.elementRef=e,this.percentage=!1,this.decimalPlaces=4,this.modifyValueOnWheel=!0,this.disabled=!1,this.emptyInputBehavior="focus",this.max="999999999999999.9999",this.min="-999999999999999.9999",this.propagateChange=o=>{},this.preventNegative=!1;let a={digitGroupSeparator:",",decimalCharacter:".",decimalPlaces:this.decimalPlaces,maximumValue:this.max,minimumValue:this.min,allowDecimalPadding:!1,showWarnings:!1};this.numericElement=new Fr.default(this.elementRef.nativeElement,null,a)}ngOnInit(){this.percentage&&(this.max="100"),this.preventNegative&&(this.min="0.00"),this.updateNumericSettings()}updateNumericSettings(){let e={maximumValue:this.max,minimumValue:this.min,readOnly:this.isElementDisabled(),decimalPlaces:this.decimalPlaces,modifyValueOnWheel:this.modifyValueOnWheel,emptyInputBehavior:this.emptyInputBehavior};this.numericElement.update(e)}onKeyUp(){let e=this.numericElement.getNumber();this.propagateChange(e)}onPaste(){let e=this.numericElement.getNumber();this.propagateChange(e)}isElementDisabled(){let e=!1,a=this.elementRef.nativeElement.readOnly;return this.elementRef.nativeElement.disabled=this.disabled,a===!0&&!this.disabled&&(e=!0),e}writeValue(e){e!=null&&this.numericElement.set(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}static{this.\u0275fac=function(a){return new(a||t)(C(_o))}}static{this.\u0275dir=go({type:t,selectors:[["","autoNum",""]],hostBindings:function(a,o){a&1&&g("keyup",function(){return o.onKeyUp()})},inputs:{percentage:"percentage",preventNegative:"preventNegative",decimalPlaces:"decimalPlaces",modifyValueOnWheel:"modifyValueOnWheel",disabled:"disabled",_emptyInputBehavior:[0,"emptyInputBehavior","_emptyInputBehavior"],_max:[0,"max","_max"],_min:[0,"min","_min"]},features:[Ei([{provide:yo,useExisting:so(()=>t),multi:!0}])]})}}return t})();var Np=()=>["Name","Code"],Lp=()=>["/menu/Products/Catalog/Variants/Info"],kp=t=>({ID:t});function Rp(t,r){if(t&1&&(q(0),f(1,"p",19),U()),t&2){let e=s().$implicit;l(),m("innerHTML",e.SerialNote,W)}}function Ap(t,r){if(t&1&&f(0,"p",19),t&2){let e=s(2).$implicit;m("innerHTML",e.Note,W)}}function Bp(t,r){if(t&1&&_(0,Ap,1,1,"p",20),t&2){let e=s().$implicit;m("ngIf",e.Note!=null)}}function Wp(t,r){if(t&1){let e=D();n(0,"tr")(1,"td",14),p(2),i(),n(3,"td"),f(4,"a",15),_(5,Rp,2,1,"ng-container",16)(6,Bp,1,1,"ng-template",null,0,X),i(),f(8,"td",17),n(9,"td",14),p(10),v(11,"number"),i(),n(12,"td")(13,"input",18),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Quantity,o)||(c.Quantity=o),u(o)}),i()()()}if(t&2){let e=r.$implicit,a=r.index,o=Fe(7),c=s();l(2),b(a+1+"."),l(2),m("routerLink",N(12,Lp))("queryParams",M(13,kp,e.VariantID))("innerHTML",e.Name,W),l(),m("ngIf",e.SerialNote)("ngIfElse",o),l(3),m("innerHTML",e.Code,W),l(2),b(E(11,10,e.NewQty)),l(3),y("ngModel",e.Quantity),m("disabled",e.TypeID==c.serialized)}}function Hp(t,r){if(t&1){let e=D();n(0,"div")(1,"POS-tinymce-editor",21),S("ngModelChange",function(o){d(e);let c=s();return h(c.dispatchedNote,o)||(c.dispatchedNote=o),u(o)}),i()()}if(t&2){let e=s();l(),y("ngModel",e.dispatchedNote)}}var cn=class t{constructor(r,e){this.dt=r;this.dialogRef=e;this.data=r.data,this.setMaxSendQuantity(),this.config=new ye,this.config.title="Send Confirmation",this.config.bodyScrollable=!0,this.config.customWidth="550px"}filterText="";data;config;serialized=4;dispatchedNote=_t("");currentTabState=_t("Item");onOk(){this.data.ID=this.data.ID||this.data.Transfer.ID,this.data.Delivery.DispatchedNote=this.dispatchedNote(),this.data.Note=this.dispatchedNote(),this.dialogRef.close(this.data)}setMaxSendQuantity(){this.data.Items=this.data.Items.map(r=>(r.maxSend=this.calculateSerialQty(r.Serial?r.Serial:[]),r))}calculateSerialQty(r=[]){let e=0;return r.forEach(a=>{e+=a.Qty}),e}static \u0275fac=function(e){return new(e||t)(C($e),C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-modal-send-confirmation"]],decls:24,vars:9,consts:[["DEFAULT_NOTE",""],[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[3,"onTabChange"],["tabTitle","Item"],["type","text","placeholder","Search product..",1,"form-control","mb-5",3,"ngModelChange","ngModel"],[1,"table","table-bordered","custom-table"],[1,"thead-light"],[1,"text-center","border-end",2,"width","1px"],[1,"border-end",2,"width","400px"],[1,"border-end",2,"width","70px"],[1,"text-center","border-end",2,"width","30px"],[4,"ngFor","ngForOf"],["tabTitle","Note"],[1,"text-center"],["target","_blank",3,"routerLink","queryParams","innerHTML"],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["autoNum","","emptyInputBehavior","null","type","text",1,"text-end","form-control",2,"width","46px",3,"ngModelChange","ngModel","disabled"],[1,"text-body-secondary",2,"word-break","break-all",3,"innerHTML"],["class","text-body-secondary","style","word-break: break-all",3,"innerHTML",4,"ngIf"],[3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"modal-material",1),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),n(1,"content")(2,"div",2)(3,"custom-tabs",3),g("onTabChange",function(c){return a.currentTabState.set(c)}),n(4,"tab",4)(5,"input",5),S("ngModelChange",function(c){return h(a.filterText,c)||(a.filterText=c),c}),i(),n(6,"table",6)(7,"thead",7)(8,"tr")(9,"th",8),p(10,"No"),i(),n(11,"th",9),p(12,"Name"),i(),n(13,"th",10),p(14,"Code"),i(),n(15,"th",11),p(16," Qty Req. "),i(),n(17,"th",11),p(18," Qty Send "),i()()(),n(19,"tbody"),_(20,Wp,14,15,"tr",12),v(21,"FilterByArray"),i()()(),n(22,"tab",13),_(23,Hp,2,1,"div"),i()()()()()),e&2&&(m("config",a.config),l(5),y("ngModel",a.filterText),l(15),m("ngForOf",Mi(21,4,a.data.Items,N(8,Np),a.filterText)),l(3),Ye(a.currentTabState()=="Note"?23:-1))},dependencies:[Z,K,B,_e,Ve,he,gt,z,ni,jo,ot,fe,R,H,St,ht,rr,lr,ar,Vr],encapsulation:2})};var jp=()=>["/print/Transfer"],Nr=(t,r)=>({ID:t,Template:r}),Qp=()=>["/print/TransferMini"],qp=t=>({"opacity-50 cursor-auto":t}),Up=()=>["/menu/Logistics/Archive/Transfer_Order/Receive"],dn=t=>({ID:t}),zp=()=>["/menu/Logistics/Archive/Transfer_Order/Form"],Gp=()=>["/menu/Logistics/Setup/Recycle_Bin"],$p=()=>["/menu/Adjustment/Adjustment/Archive/Info"],Kp=()=>["/menu/Products/Catalog/Variants/Info"],Jp=t=>({"bg-gradient-danger":t}),Yp=()=>["/menu/Logistics/Report/Transfer/History"],Xp=t=>({TransferOrderID:t});function Zp(t,r){if(t&1){let e=D();n(0,"div",46)(1,"button",47),g("click",function(){d(e);let o=s(2);return u(o.export("TransferOrder/ExportInfo","Transfer Order"))}),f(2,"i",48),p(3,"Export "),i(),f(4,"button",49),n(5,"ul",7)(6,"li",50),g("click",function(){d(e);let o=s(2);return u(o.export("TransferOrder/ExportDetailInfo","Transfer Order Detail.csv"))}),n(7,"a"),p(8,"Export with Detail"),i()()()()}}function em(t,r){if(t&1){let e=D();n(0,"a",56),g("click",function(){d(e);let o=s(3);return u(o.onApproveDelivery())}),f(1,"i",57),p(2,"\xA0Approve Delivery "),i()}}function tm(t,r){if(t&1){let e=D();n(0,"a",58),g("click",function(){d(e);let o=s(3);return u(o.onDispatchDelivery())}),f(1,"i",59),p(2,"\xA0Send"),i()}}function im(t,r){if(t&1){let e=D();n(0,"button",60),g("click",function(){d(e);let o=s(3);return u(o.role.logistic.TransferOrderReceiver?o.onReceiveDelivery():null)}),f(1,"i",57),p(2,"\xA0Receive Delivery "),i()}if(t&2){let e=s(3);_i("matTooltip",e.role.logistic.TransferOrderReceiver?"":"Receiving delivery requires the transfer order receiver role"),m("ngClass",M(2,qp,!e.role.logistic.TransferOrderReceiver))}}function nm(t,r){if(t&1&&(n(0,"button",61),f(1,"b",62),i()),t&2){let e=s(3);m("disabled",!e.role.logistic.TransferOrderReceiver)}}function om(t,r){if(t&1&&(n(0,"ul",63)(1,"li")(2,"a",8),p(3,"Receive and Adjust"),i()()()),t&2){let e=s(3);l(2),m("routerLink",N(2,Up))("queryParams",M(3,dn,e.data.ID))}}function rm(t,r){if(t&1&&(n(0,"div",46),_(1,em,3,0,"a",51)(2,tm,3,0,"a",52)(3,im,3,4,"button",53)(4,nm,2,1,"button",54)(5,om,4,5,"ul",55),i()),t&2){let e=s(2);l(),m("ngIf",e.data.Config.EligibleToApprove&&e.role.logistic.TransferOrderApproval&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToSend&&e.role.logistic.TransferOrderEditor&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToReceive&&e.data.Config.HasReceiverRole&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToReceive&&e.role.adjustment.Create&&e.data.Config.HasReceiverRole&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToReceive&&e.role.adjustment.Create&&e.data.Config.HasReceiverRole&&!e.data.Transfer.IsVoided)}}function am(t,r){if(t&1&&(n(0,"a",64),f(1,"i",65),p(2,"Edit"),i()),t&2){let e=s(2);m("routerLink",N(2,zp))("queryParams",M(3,dn,e.data.ID))}}function lm(t,r){if(t&1){let e=D();n(0,"a",67),g("click",function(){d(e);let o=s(3);return u(o.deleteData())}),f(1,"i",68),p(2,"Delete"),i()}}function pm(t,r){if(t&1){let e=D();n(0,"a",67),g("click",function(){d(e);let o=s(3);return u(o.onVoid())}),f(1,"i",68),p(2,"Void"),i()}}function mm(t,r){if(t&1&&(q(0),_(1,lm,3,0,"a",66)(2,pm,3,0,"a",66),U()),t&2){let e=s(2);l(),m("ngIf",e.role.logistic.Delete&&(!e.data.Config.IsVoidEnabled||e.data.Transfer.IsVoided)),l(),m("ngIf",e.role.logistic.TransferOrderVoid&&e.data.Config.IsVoidEnabled&&!e.data.Transfer.IsVoided)}}function cm(t,r){t&1&&(n(0,"a",69),f(1,"i",70),n(2,"span",71),p(3,"Voided"),i()()),t&2&&m("routerLink",N(1,Gp))}function sm(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"Adjusted at"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",45),p(7),i()()()),t&2){let e=s(2);l(6),m("routerLink",N(3,$p))("queryParams",M(4,dn,e.data.AdjustmentID)),l(),b(e.data.Transfer==null?null:e.data.Transfer.AdjustedAt)}}function dm(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"Journal"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",72),p(7,"View Journal"),i()()()),t&2){let e=s(2);l(6),vo("href","https://accounting.dealpos.app/pages/journal-entry;TransID=",e.data.ID,"",Xt)}}function um(t,r){if(t&1&&(q(0),n(1,"div",80),p(2,"Receive Note:"),i(),f(3,"div",81),U()),t&2){let e=s(3);l(3),m("innerHTML",e.data.Delivery.ReceivedNote,W)}}function _m(t,r){if(t&1&&(n(0,"div",12)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),n(10,"div",77),f(11,"div",78),i()(),n(12,"div",79)(13,"h4"),p(14,"Received By"),i(),n(15,"p",74),p(16),i(),_(17,um,4,1,"ng-container",10),i()()),t&2){let e=s(2);Mt("pb-8",e.data.Delivery.ReceivedNote),l(3),I(" ",P(4,8,e.data.Delivery.ReceivedDate,"dd MMM yyyy")," "),l(3),I(" ",P(7,11,e.data.Delivery.ReceivedDate,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Received)"?"blue":"black"),l(7),b(e.data.Delivery.ReceiveBy),l(),m("ngIf",e.data.Delivery.ReceivedNote)}}function fm(t,r){if(t&1&&(n(0,"div",80),p(1,"Dispatch Note:"),i(),f(2,"div",81)),t&2){let e=s(3);l(2),m("innerHTML",e.data.Delivery==null?null:e.data.Delivery.DispatchedNote,W)}}function gm(t,r){if(t&1&&(n(0,"div",82)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),n(10,"div",77),f(11,"div",78),i()(),n(12,"div",79)(13,"h4"),p(14,"Dispatched By"),i(),n(15,"p",74),p(16),i(),_(17,fm,3,1),i()()),t&2){let e=s(2);l(3),I(" ",P(4,6,e.data.Delivery.DispatchedDate,"dd MMM yyyy")," "),l(3),I(" ",P(7,9,e.data.Delivery.DispatchedDate,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Dispatched)"?"blue":"black"),l(7),b(e.data.Delivery.DispatchedBy),l(),Ye(e.data.Delivery!=null&&e.data.Delivery.DispatchedNote?17:-1)}}function Cm(t,r){if(t&1&&(n(0,"div",80),p(1,"Approve Note:"),i(),f(2,"div",81)),t&2){let e=s(3);l(2),m("innerHTML",e.data.Delivery==null?null:e.data.Delivery.ApprovedNote,W)}}function vm(t,r){if(t&1&&(n(0,"div",82)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),n(10,"div",77),f(11,"div",78),i()(),n(12,"div",79)(13,"h4"),p(14,"Approved By"),i(),n(15,"p",74),p(16),i(),_(17,Cm,3,1),i()()),t&2){let e=s(2);l(3),b(P(4,6,e.data.Delivery.ApproveDate,"dd MMM yyyy")),l(3),I(" ",P(7,9,e.data.Delivery.ApproveDate,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Approve)"?"blue":"black"),l(7),b(e.data.Delivery.ApproveBy),l(),Ye(e.data.Delivery!=null&&e.data.Delivery.ApprovedNote?17:-1)}}function xm(t,r){if(t&1&&(n(0,"div",80),p(1,"Created Note:"),i(),f(2,"div",81)),t&2){let e=s(3);l(2),m("innerHTML",e.data.Transfer==null?null:e.data.Transfer.Note,W)}}function ym(t,r){if(t&1&&(n(0,"div",12)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),i(),n(10,"div",79)(11,"h4"),p(12,"Created By"),i(),n(13,"p",74),p(14),i(),_(15,xm,3,1),i()()),t&2){let e=s(2);l(3),I(" ",P(4,6,e.data.CreatedInfo.Created.Date,"dd MMM yyyy")," "),l(3),I(" ",P(7,9,e.data.CreatedInfo.Created.Date,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Request)"?"blue":"black"),l(5),b(e.data.CreatedInfo.Created.User),l(),Ye(e.data.Transfer!=null&&e.data.Transfer.Note?15:-1)}}function hm(t,r){if(t&1&&(n(0,"small",86),p(1),v(2,"number"),i()),t&2){let e=s(3);l(),I(" (Weight ",E(2,1,e.totalWeight())," gr) ")}}function Sm(t,r){if(t&1){let e=D();n(0,"div",21)(1,"div",83)(2,"div",84)(3,"h2",85),p(4,"Items"),i(),_(5,hm,3,3,"small",86),i(),n(6,"div")(7,"div",46)(8,"button",6),f(9,"b",62),i(),n(10,"ul",87)(11,"li")(12,"a",50),g("click",function(){d(e);let o=s(2);return u(o.showRequested=!o.showRequested)}),p(13),i()(),n(14,"li")(15,"a",50),g("click",function(){d(e);let o=s(2);return u(o.showOnHand=!o.showOnHand)}),p(16),i()()()()()()()}if(t&2){let e=s(2);l(5),Ye(e.totalWeight()?5:-1),l(8),I("",e.showRequested?"Hide":"Show"," requested"),l(3),I("",e.showOnHand?"Hide":"Show"," current on hand inventory")}}function bm(t,r){t&1&&(n(0,"th",88),p(1," Product Code "),i())}function Dm(t,r){t&1&&(n(0,"th",33),p(1," Qty Req. "),i())}function Im(t,r){t&1&&(n(0,"th",33),p(1," On Hand "),i())}function Tm(t,r){t&1&&(n(0,"th",89),p(1," Cost "),i())}function wm(t,r){t&1&&(n(0,"th",89),p(1," Total Cost "),i())}function Em(t,r){if(t&1&&(n(0,"th",90),p(1),i()),t&2){let e=s(2);l(),I(" Price (",e.data.CurrencySimbol,") ")}}function Om(t,r){t&1&&(n(0,"th",91),p(1," % "),i())}function Mm(t,r){if(t&1&&(n(0,"th",92),p(1),i()),t&2){let e=s(2);l(),I(" Total (",e.data.CurrencySimbol,") ")}}function Pm(t,r){if(t&1&&(q(0),f(1,"p",97),U()),t&2){let e=s().$implicit;l(),m("innerHTML",e.Note,W)}}function Fm(t,r){if(t&1&&(n(0,"td"),p(1),i()),t&2){let e=s().$implicit;l(),I(" ",e.ProductCode," ")}}function Vm(t,r){if(t&1&&(n(0,"td",40),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.QtyRequested)," ")}}function Nm(t,r){if(t&1&&(n(0,"td",40),p(1),v(2,"number"),n(3,"div"),p(4),i()()),t&2){let e=s().$implicit;ft(M(6,Jp,e.Inventory<e.Quantity)),l(),I(" ",E(2,4,e.Inventory)," "),l(3),b(e.UOMName)}}function Lm(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.UnitCost)," ")}}function km(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.Quantity*e.UnitCost)," ")}}function Rm(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.UnitPrice)," ")}}function Am(t,r){if(t&1&&(n(0,"td",99),p(1),i()),t&2){let e=s().$implicit;l(),I(" ",e.PriceDiscount," ")}}function Bm(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.TotalPrice)," ")}}function Wm(t,r){if(t&1&&(n(0,"tr")(1,"td",40),p(2),i(),n(3,"td")(4,"a",45),p(5),i(),n(6,"div"),p(7),i(),f(8,"app-serial-note",93),_(9,Pm,2,1,"ng-container",10),i(),_(10,Fm,2,1,"td",10)(11,Vm,3,3,"td",41),n(12,"td",40),p(13),v(14,"number"),i(),_(15,Nm,5,8,"td",94)(16,Lm,3,3,"td",95)(17,km,3,3,"td",95)(18,Rm,3,3,"td",95)(19,Am,2,1,"td",96)(20,Bm,3,3,"td",95),i()),t&2){let e=r.$implicit,a=r.index,o=s(2);l(2),b(a+1+"."),l(2),m("routerLink",N(18,Kp))("queryParams",M(19,dn,e.VariantID)),l(),b(e.Name),l(2),b(e.Code),l(),m("serials",e.Serial),l(),m("ngIf",e.Note),l(),m("ngIf",o.data.Config.ProductCodeVisible),l(),m("ngIf",o.showRequested),l(2),b(E(14,16,e.Quantity)),l(2),m("ngIf",o.showOnHand),l(),m("ngIf",o.data.Config.CostVisible&&o.role.product.Cost),l(),m("ngIf",o.data.Config.CostVisible&&o.role.product.Cost),l(),m("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible),l(),m("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible&&o.data.Config.DiscountVisible),l(),m("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible)}}function Hm(t,r){if(t&1&&(n(0,"td",40),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s(2);l(),I(" ",E(3,4,P(2,1,e.data.Items,"QtyRequested"))," ")}}function jm(t,r){t&1&&f(0,"td")}function Qm(t,r){if(t&1&&(n(0,"td",100)(1,"b"),p(2),v(3,"sumMultiply"),v(4,"number"),i()()),t&2){let e=s(2);l(2),I(" ",E(4,5,Mi(3,1,e.data.Items,"UnitCost","Quantity"))," ")}}function qm(t,r){if(t&1&&(n(0,"td",101)(1,"b"),p(2),v(3,"sum"),v(4,"number"),i()()),t&2){let e=s(2);l(2),b(E(4,4,P(3,1,e.data.Items,"TotalPrice")))}}function Um(t,r){if(t&1&&(n(0,"span")(1,"b"),p(2," Modified:"),i(),p(3),v(4,"date"),i()),t&2){let e=s(3);l(3),Qe(" ",P(4,2,e.data.CreatedInfo==null||e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo==null||e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.User," ")}}function zm(t,r){if(t&1&&(n(0,"a",45)(1,"div",102),f(2,"i",103),n(3,"span",104)(4,"b"),p(5," Created:"),i(),p(6),v(7,"date"),i(),_(8,Um,5,5,"span"),i()()),t&2){let e=s(2);m("routerLink",N(8,Yp))("queryParams",M(9,Xp,e.data.ID)),l(6),Qe(" ",P(7,5,e.data.CreatedInfo==null||e.data.CreatedInfo.Created==null?null:e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo==null||e.data.CreatedInfo.Created==null?null:e.data.CreatedInfo.Created.User," "),l(2),Ye(e.data.CreatedInfo.Modified.Date!=e.minDate?8:-1)}}function Gm(t,r){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"actions"),_(2,Zp,9,0,"div",2)(3,rm,6,5,"div",2),n(4,"div",3)(5,"a",4),f(6,"i",5),p(7,"Print "),i(),f(8,"button",6),n(9,"ul",7)(10,"li")(11,"a",8),p(12,"Print with Mini"),i()()()(),n(13,"div",3),_(14,am,3,5,"a",9)(15,mm,3,2,"ng-container",10),i()(),n(16,"content")(17,"div",11)(18,"div",12)(19,"div",13)(20,"div",14)(21,"div",15)(22,"h2",16),f(23,"i",17),p(24),i(),_(25,cm,4,2,"a",18),i(),n(26,"div",19)(27,"table",20)(28,"tr")(29,"th"),p(30,"Tag"),i(),n(31,"td"),p(32,":"),i(),n(33,"td"),p(34),i()(),n(35,"tr")(36,"th"),p(37,"Date"),i(),n(38,"td"),p(39,":"),i(),n(40,"td"),p(41),v(42,"date"),i()(),n(43,"tr")(44,"th"),p(45,"Courier"),i(),n(46,"td"),p(47,":"),i(),n(48,"td"),p(49),i()(),n(50,"tr")(51,"th"),p(52,"Status"),i(),n(53,"td"),p(54,":"),i(),n(55,"td"),p(56),i()(),_(57,sm,8,6,"tr")(58,dm,8,2,"tr",10),i()()(),n(59,"div",14)(60,"div",21)(61,"h2"),p(62),i()(),n(63,"div",19),_(64,_m,18,14,"div",22)(65,gm,18,12,"div",23)(66,vm,18,12,"div",23)(67,ym,16,12,"div",24),i()()(),n(68,"div",25)(69,"div",14),_(70,Sm,17,3,"div",26),n(71,"div",19)(72,"table",27)(73,"thead",28)(74,"tr")(75,"th",29),p(76,"No"),i(),n(77,"th",30),p(78,"Name"),i(),_(79,bm,2,0,"th",31)(80,Dm,2,0,"th",32),n(81,"th",33),p(82,"Qty Sent"),i(),_(83,Im,2,0,"th",32)(84,Tm,2,0,"th",34)(85,wm,2,0,"th",34)(86,Em,2,1,"th",35)(87,Om,2,0,"th",36)(88,Mm,2,1,"th",37),i()(),n(89,"tbody"),_(90,Wm,21,21,"tr",38),i(),n(91,"tfoot",39)(92,"tr")(93,"td",40)(94,"b"),p(95,"Total"),i()(),_(96,Hm,4,6,"td",41),n(97,"td",42)(98,"b"),p(99),v(100,"sum"),v(101,"number"),i()(),_(102,jm,1,0,"td",10)(103,Qm,5,7,"td",43)(104,qm,5,6,"td",44),i()()()()()()(),_(105,zm,9,11,"a",45),i()()()),t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("titleLimit",50),l(2),m("ngIf",e.role.global.Export),l(),m("ngIf",!e.data.Transfer.IsVoided),l(2),m("routerLink",N(51,jp))("queryParams",Re(52,Nr,e.data.ID,e.data.TemplateID)),l(6),m("routerLink",N(55,Qp))("queryParams",Re(56,Nr,e.data.ID,e.data.TemplateID)),l(3),m("ngIf",e.data.Config.isEditor&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.HasOutletSourceWriteAccess),l(9),Qe("\xA0",e.data.Transfer.Source," to ",e.data.Transfer.Destination," "),l(),m("ngIf",e.data.Transfer.IsVoided),l(9),b(e.data.Transfer.Type),l(7),b(P(42,43,e.data.Transfer.Date,"dd MMM yyyy")),l(8),b(e.data.Transfer.Courier),l(7),b(e.data.Transfer.Status),l(),Ye(e.data.Config.IsAdjusted&&(e.data.Transfer!=null&&e.data.Transfer.AdjustedAt)?57:-1),l(),m("ngIf",e.data.JournalUrl),l(4),b(e.data.Delivery.HeadDelivery),l(2),m("ngIf",e.data.Delivery.ReceivedDate),l(),m("ngIf",e.data.Delivery.DispatchedDate),l(),m("ngIf",e.data.Delivery.ApproveBy),l(),m("ngIf",e.data.CreatedInfo.Created.Date),l(3),m("ngIf",e.data.Items.length>0),l(9),m("ngIf",e.data.Config.ProductCodeVisible),l(),m("ngIf",e.showRequested),l(3),m("ngIf",e.showOnHand),l(),m("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),l(),m("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible&&e.data.Config.DiscountVisible),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),l(2),m("ngForOf",e.data.Items),l(3),Co("colspan",e.data.Config.ProductCodeVisible?"3":"2"),l(3),m("ngIf",e.showRequested),l(3),I(" ",E(101,49,P(100,46,e.data.Items,"Quantity"))," "),l(3),m("ngIf",e.showOnHand),l(),m("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),l(),Ye(e.role.users.LogRestriction?-1:105)}}var sn=class t extends ve{constructor(e,a,o,c,O,Q,re,Ue){super(e,a,"TransferOrder/Info",null,null,o);this.csvConverter=c;this.router=O;this.toastr=Q;this.role=re;this.matDialog=Ue}currentDeliveryState;minDate=T.MinDate;showOnHand=!1;showRequested=!1;totalWeight=_t(0);preGetList(){let e=this.route.snapshot.queryParams;this.pageData.Filter=e}postInit(){this.menuData.H=this.data.PageTitle,this.currentDeliveryState=this.data.Delivery.HeadDelivery.split(" ")[1],this.calculateWeight()}calculateWeight(){let a=this.data.Items.filter(o=>o.Weight).reduce((o,c)=>o+c.Weight*c.Quantity,0);this.totalWeight.set(a)}deleteData(){confirm("Are you sure you want to delete selected record/s?")&&this.httpService.delete("/API/TransferOrder/DeleteTransferOrderInfo",{params:[{key:"ID",value:this.data.ID}]}).subscribe(()=>{this.toastr.success("Records are removed.",Ce.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])})}export(e,a){this.httpService.get(`/api/${e}`,[{key:"ID",value:this.route.snapshot.queryParams.ID}]).subscribe(o=>{this.csvConverter.convertToCSV(o,a)})}onVoid(){confirm("Are you sure you want to void this record/s?")&&this.httpService.put("/api/TransferOrder/VoidTransferOrder",{ID:this.data.ID},{},1e5).subscribe(e=>{this.toastr.success(e.Message,"Success"),this.data.Transfer.IsVoided=!0,this.menuData.H=this.menuData.H})}onApproveDelivery(){this.matDialog.open(Ci,{data:{title:"Approve Delivery",type:"APPROVE"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e)),j(e=>{let a={ID:this.data.ID||this.data.Transfer.ID,Note:e.Note};return this.httpService.post(Pe.ApproveDelivery,a)})).subscribe(()=>this.getListData())}onDispatchDelivery(){this.matDialog.open(cn,{data:{data:this.data}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e)),j(e=>this.httpService.post(Pe.SendTransferOrder,e))).subscribe(()=>this.getListData())}onReceiveDelivery(){this.matDialog.open(Ci,{data:{type:"RECEIVE"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e)),j(e=>{let a={ID:this.data.ID||this.data.Transfer.ID,Date:e.Date,Note:e.Note};return this.httpService.post(Pe.ReceiveTransferOrder,a)})).subscribe(()=>this.getListData())}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(we),C(nt),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-transfer-order-info"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown","titleLimit",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown","titleLimit"],["class","btn-group",4,"ngIf"],[1,"btn-group","ms-5"],["target","_blank",1,"btn","btn-outline-secondary",2,"float","left",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],["target","_blank",1,"dropdown-item",3,"routerLink","queryParams"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[1,"container-fluid","card-container","mt-5"],[1,"row"],[1,"col-sm-4"],[1,"card"],[1,"card-header","d-flex","align-items-center"],[1,"title","mb-0","d-flex","align-items-center"],["aria-hidden","true",1,"fa","fa-location-dot"],["class","badge rounded-pill d-flex align-items-center gap-3 fs-5 bg-danger text-white ms-3",3,"routerLink",4,"ngIf"],[1,"card-body"],[1,"table-sm","table-borderless"],[1,"card-header"],["class","row",3,"pb-8",4,"ngIf"],["class","row pb-8",4,"ngIf"],["class","row",4,"ngIf"],[1,"col-sm-8"],["class","card-header",4,"ngIf"],["id","tableGrid",1,"table","custom-table","w-100"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","1px"],[2,"width","100%"],["style","width: 400px",4,"ngIf"],["style","width: 30px","class","text-center",4,"ngIf"],[1,"text-center",2,"width","30px"],["style","width: 85px","class","text-end",4,"ngIf"],["style","width: 100px","class","text-end",4,"ngIf"],["style","width: 20px","class","text-end",4,"ngIf"],["style","width: 110px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-center"],["class","text-center",4,"ngIf"],[1,"text-center","empty-column"],["class","text-end","colspan","1",4,"ngIf"],["class","text-end","colspan","2",4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],[1,"btn-group"],[1,"btn","btn-outline-secondary",2,"float","left",3,"click"],[1,"fas","fa-upload","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle","border-start-0"],[1,"dropdown-item",3,"click"],["class","btn btn-outline-secondary ms-5","role","button",3,"click",4,"ngIf"],["style","cursor: pointer","class","btn btn-outline-secondary ms-5","role","button",3,"click",4,"ngIf"],["class","btn btn-outline-secondary ms-5","role","button","matTooltipPosition","above",3,"ngClass","matTooltip","click",4,"ngIf"],["class","btn btn-outline-secondary btn-sm dropdown-toggle","data-bs-toggle","dropdown",3,"disabled",4,"ngIf"],["class","dropdown-menu dropdown-menu-end","style","cursor: pointer; color: black",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","ms-5",3,"click"],[1,"fa-solid","fa-truck"],["role","button",1,"btn","btn-outline-secondary","ms-5",2,"cursor","pointer",3,"click"],[1,"fa-solid","fa-check"],["role","button","matTooltipPosition","above",1,"btn","btn-outline-secondary","ms-5",3,"click","ngClass","matTooltip"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle",3,"disabled"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer","color","black"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"badge","rounded-pill","d-flex","align-items-center","gap-3","fs-5","bg-danger","text-white","ms-3",3,"routerLink"],["aria-hidden","true",1,"fa","fa-trash","me-2"],[2,"font-size","12px"],["target","_blank",3,"href"],[1,"col","text-end"],[1,"mt-3"],[1,"col-3","text-center","position-relative"],[1,"fa-solid","fa-angle-up","current-status-icon"],[1,"d-flex","justify-content-center","h-100"],[1,"timeline"],[1,"col-5"],[1,"fw-bold"],[3,"innerHTML"],[1,"row","pb-8"],[1,"d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark",2,"z-index","1021"],[2,"width","400px"],[1,"text-end",2,"width","85px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","20px"],[1,"text-end",2,"width","110px"],[3,"serials"],["class","text-center",3,"class",4,"ngIf"],["class","text-end",4,"ngIf"],["class","text-end text-danger",4,"ngIf"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"text-end"],[1,"text-end","text-danger"],["colspan","1",1,"text-end"],["colspan","2",1,"text-end"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"],[1,"me-2"]],template:function(a,o){a&1&&_(0,Gm,106,59,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[pt,K,B,z,ne,Ae,ct,_e,Se,Be,Ho],styles:[".current-status-icon[_ngcontent-%COMP%]{background-color:#fff;border-radius:50%;box-shadow:0 2px #b8b8b8;width:35px;height:35px;font-size:35px}.timeline[_ngcontent-%COMP%]{border-left:3px solid #e1e1e1;height:100%;width:0px}"]})};var $m=(t,r)=>({ID:t,Template:r}),Km=(t,r)=>({ID:t,Template:r,Cost:1}),_n=t=>({ID:t}),Jm=()=>["/menu/Logistics/Archive/Inbound_Logistics/Form"],Ym=()=>["/menu/Contacts/Contact/Suppliers/Info"];function Xm(t,r){if(t&1){let e=D();n(0,"div",2)(1,"a",35),g("click",function(){d(e);let o=s(2);return u(o.export("InboundLogistics/ExportInfoItems","Transfer Item Inbound Logistics.csv"))}),f(2,"i",36),p(3,"Export "),i()()}}function Zm(t,r){if(t&1&&(n(0,"a",37),f(1,"i",38),p(2,"Edit"),i()),t&2){let e=s(2);m("routerLink",N(2,Jm))("queryParams",M(3,_n,e.data.Fulfillment.ID))}}function ec(t,r){if(t&1){let e=D();n(0,"a",39),g("click",function(){d(e);let o=s(2);return u(o.deleteData())}),f(1,"i",40),p(2,"Delete"),i()}}function tc(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Supplier==null?null:e.data.Supplier.Mobile)}}function ic(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",44),i()),t&2){let e=s(3);l(5),m("innerHTML",e.data.Supplier==null?null:e.data.Supplier.Address,W)}}function nc(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",41),p(4,"Supplier "),i()(),n(5,"div",18)(6,"table",19)(7,"tr")(8,"th"),p(9,"Name"),i(),n(10,"td"),p(11,":"),i(),n(12,"td")(13,"a",42),p(14),i()()(),_(15,tc,7,1,"tr",43)(16,ic,6,1,"tr",43),i()()()),t&2){let e=s(2);l(13),m("routerLink",N(5,Ym))("queryParams",M(6,_n,e.data.Supplier==null?null:e.data.Supplier.ID)),l(),b(e.data.Supplier==null?null:e.data.Supplier.Name),l(),m("ngIf",e.data.Supplier==null?null:e.data.Supplier.Mobile),l(),m("ngIf",e.data.Supplier==null?null:e.data.Supplier.Address)}}function oc(t,r){if(t&1&&(q(0),f(1,"p",48),U()),t&2){let e=s().$implicit;l(),m("innerHTML",e==null?null:e.Note,W)}}function rc(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td")(4,"a",45),p(5),i(),n(6,"div"),p(7),i(),f(8,"app-serial-note",46),_(9,oc,2,1,"ng-container",43),i(),n(10,"td",47),p(11),n(12,"div"),p(13),i()()()),t&2){let e=r.$implicit,a=r.index;l(2),b(a+1+"."),l(2),m("queryParams",M(8,_n,e.VariantID)),l(),I(" ",e.Name," "),l(2),b(e.Code),l(),m("serials",e.Serial),l(),m("ngIf",e.Note!=null),l(2),I("",e.Quantity," "),l(2),b(e.UOMName)}}function ac(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",49),p(4,"Note "),i()(),f(5,"div",50),i()),t&2){let e=s(2);l(5),m("innerHTML",e.data.Fulfillment.Note,W)}}function lc(t,r){if(t&1&&(n(0,"span")(1,"b"),p(2,"Modified:"),i(),p(3),v(4,"date"),i()),t&2){let e=s(3);l(3),Qe(" ",P(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function pc(t,r){if(t&1&&(n(0,"div",51),f(1,"i",52),n(2,"span")(3,"b"),p(4," Created:"),i(),p(5),v(6,"date"),i(),_(7,lc,5,5,"span",43),i()),t&2){let e=s(2);l(5),Qe(" ",P(6,3,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),l(2),m("ngIf",e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.Date)}}function mc(t,r){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),f(4,"i",4),p(5,"Print "),i(),f(6,"button",5),n(7,"ul",6)(8,"li")(9,"a",7),p(10,"Print with Cost"),i()()()(),_(11,Xm,4,0,"div",8),n(12,"div",2),_(13,Zm,3,5,"a",9)(14,ec,3,0,"a",10),i()(),n(15,"content")(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14)(20,"div",15)(21,"h2"),f(22,"i",16),p(23,"Order "),n(24,"small",17),p(25),i()()(),n(26,"div",18)(27,"table",19)(28,"tr")(29,"th"),p(30,"Outlet"),i(),n(31,"td"),p(32,":"),i(),n(33,"td"),p(34),i()(),n(35,"tr")(36,"th"),p(37,"Bill"),i(),n(38,"td"),p(39,":"),i(),n(40,"td")(41,"a",20),p(42),i(),p(43),v(44,"date"),i()()()()(),_(45,nc,17,8,"div",21),n(46,"div",14)(47,"div",15)(48,"h2"),f(49,"i",22),p(50,"Fulfillment "),i()(),n(51,"div",18)(52,"table",19)(53,"tr")(54,"th"),p(55,"Outlet"),i(),n(56,"td"),p(57,":"),i(),n(58,"td"),p(59),i()(),n(60,"tr")(61,"th"),p(62,"Date"),i(),n(63,"td"),p(64,":"),i(),n(65,"td"),p(66),v(67,"date"),i()(),n(68,"tr")(69,"th"),p(70,"Number"),i(),n(71,"td"),p(72,":"),i(),n(73,"td"),p(74),i()(),n(75,"tr")(76,"th"),p(77,"Courier"),i(),n(78,"td"),p(79,":"),i(),n(80,"td"),p(81),i()()()()()(),n(82,"div",23)(83,"div",14)(84,"div",15)(85,"h2"),f(86,"i",24),p(87,"Products "),i()(),n(88,"div",18)(89,"table",25)(90,"thead",26)(91,"tr")(92,"th",27),p(93,"No."),i(),n(94,"th"),p(95,"Products"),i(),n(96,"th",28),p(97,"Qty"),i()()(),n(98,"tbody"),_(99,rc,14,10,"tr",29),i(),n(100,"tfoot",30)(101,"tr")(102,"td",31),p(103,"Total"),i(),n(104,"td",32),p(105),v(106,"sum"),i()()()()()(),_(107,ac,6,1,"div",21),i(),n(108,"div",33),_(109,pc,8,6,"div",34),i()()()()()),t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(3),m("queryParams",Re(31,$m,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(6),m("queryParams",Re(34,Km,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(2),m("ngIf",e.roleService.global.Export),l(2),m("ngIf",e.roleService.logistic.Edit),l(),m("ngIf",e.roleService.logistic.Delete),l(11),I(" (",e.data.Fulfillment.Status,") "),l(9),b(e.data.Order.OutletName),l(7),m("queryParams",M(37,_n,e.data.Order.InvoiceID)),l(),I(" ",e.data.Order.Number," "),l(),I(" - ",P(44,22,e.data.Order.Date,"dd MMM yyyy")," "),l(2),m("ngIf",e.data.Supplier==null?null:e.data.Supplier.ID),l(14),I(" ",e.data.Fulfillment.OutletName," "),l(7),I(" ",P(67,25,e.data.Fulfillment.Date,"dd MMM yyyy")," "),l(8),I(" ",e.data.Fulfillment.Number," "),l(7),I(" ",e.data.Fulfillment.Courier," "),l(18),m("ngForOf",e.data.Items),l(6),I("",P(106,28,e.data.Items,"Quantity")," "),l(2),m("ngIf",e.data==null?null:e.data.Fulfillment.Note),l(2),m("ngIf",!e.roleService.users.LogRestriction)}}var un=class t extends ve{constructor(e,a,o,c,O,Q,re){super(e,a,"InboundLogistics/DetailInfo",null,null,o);this.csvConverter=c;this.router=O;this.toastr=Q;this.roleService=re}preGetList(){let e=this.route.snapshot.queryParams;this.pageData.Filter.ID=e.ID}postInit(e){e.Items=e.Items.filter(a=>a.Quantity!=0),this.menuData.H=`Inbound Logistics #${e.Fulfillment.Number}`}deleteData(){confirm("Are you sure you want to delete selected record/s?")&&this.httpService.delete("/API/InboundLogistics/DeleteInfo",{params:[{key:"ID",value:this.data.Fulfillment.ID}]}).subscribe(e=>{this.toastr.success(e.Message,Ce.Success),this.router.navigate(["/menu/Logistics/Archive/Inbound_Logistics"])})}export(e,a){this.httpService.get(`/api/${e}`,[{key:"ID",value:this.route.snapshot.queryParams.ID}]).subscribe(o=>{this.csvConverter.convertToCSV(o,a)})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(we),C(nt),C(ee),C(ie))};static \u0275cmp=w({type:t,selectors:[["POS-supplier-delivery-info"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn-group","me-5"],["routerLink","/print/InDelivery",1,"btn","btn-outline-secondary",2,"float","left",3,"queryParams"],[1,"fa-solid","fa-print","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],["routerLink","/print/InDelivery",1,"dropdown-item",3,"queryParams"],["class","btn-group me-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-body-secondary","h6"],[1,"card-body"],[1,"table-sm","table-borderless"],["target","_blank","routerLink","/menu/Orders/Orders/Supplier_Bill/Info",3,"queryParams"],["class","card",4,"ngIf"],[1,"fa-solid","fa-truck","me-5"],[1,"col-8"],[1,"fa-solid","fa-box","me-5"],[1,"table"],[1,"thead-light"],[2,"width","40px"],[2,"width","50px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end","empty-column","fw-bold"],[1,"text-center","empty-column","fw-bold"],[1,"col-12"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",2,"float","left",3,"click"],[1,"fas","fa-upload","me-3"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"fa-solid","fa-address-card","me-5"],["target","_blank",3,"routerLink","queryParams"],[4,"ngIf"],[3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],[3,"serials"],[1,"text-center"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body",3,"innerHTML"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(a,o){a&1&&_(0,mc,110,39,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,ne,ct,Se,Be],encapsulation:2})};function cc(t,r){if(t&1){let e=D();q(0),n(1,"POS-uppy",3),g("fileUploaded",function(o){d(e);let c=s(2);return u(c.onSelectFile(o))}),i(),U()}t&2&&(l(),m("subtitle","Accepted file formats: .csv & max file size: 1 MB"))}function sc(t,r){if(t&1){let e=D();q(0),n(1,"POS-uppy",3),g("fileUploaded",function(o){d(e);let c=s(2);return u(c.onSelectFile(o))}),i(),U()}t&2&&(l(),m("subtitle","Accepted file formats: .csv & max file size: 1 MB"))}function dc(t,r){if(t&1&&_(0,cc,2,1,"ng-container",2)(1,sc,2,1,"ng-container",2),t&2){let e=s();m("ngIf",e.uploadState()===e.uploadStateEnum.Idle||e.uploadState()===e.uploadStateEnum.Uploading),l(),m("ngIf",e.uploadState()===e.uploadStateEnum.Success||e.uploadState()===e.uploadStateEnum.Error)}}var fn=class t{constructor(r,e,a){this.dialogRef=r;this.toastService=e;this.httpService=a;this.config=new ye,this.config.title="Import Courier"}config;file;uploadState=_t(0);uploadStateEnum=cr;onSelectFile(r){this.file=r}onOk(){this.uploadState.set(1);let r=new FormData;r.append("File",this.file),this.httpService.postFormData("/api/transferorder/ImportCourier",r).subscribe({next:e=>{this.uploadState.set(2),this.toastService.success(e.Message,Ce.Success),this.dialogRef.close("Success")},error:e=>{this.uploadState.set(3)}})}onClose(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe),C(ee),C(L))};static \u0275cmp=w({type:t,selectors:[["POS-modal-upload-courier"]],standalone:!1,decls:3,vars:1,consts:[["modalContent",""],[3,"onOk","onCancel","onClose","config"],[4,"ngIf"],["sampleUrl","https://cdn.dealpos.xyz/web-import-template/Courier-Import-Template.csv",3,"fileUploaded","subtitle"]],template:function(e,a){if(e&1){let o=D();n(0,"modal-material",1),g("onOk",function(){return d(o),u(a.onOk())})("onCancel",function(){return d(o),u(a.onClose())})("onClose",function(){return d(o),u(a.onClose())}),_(1,dc,2,2,"ng-template",null,0,X),i()}e&2&&m("config",a.config)},dependencies:[B,he,Gi],encapsulation:2})};var uc=()=>["/menu/Logistics/Setup/Courier/Form"],_c=t=>({"border-end-0":t}),fc=()=>["/menu/Logistics/Setup/Courier/Info"],gc=t=>({ID:t}),Cc=t=>({"text-decoration-line-through":t});function vc(t,r){if(t&1){let e=D();n(0,"a",17),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("TransferOrder/RemoveCourier"))}),f(1,"i",18),p(2,"Delete "),i()}}function xc(t,r){if(t&1){let e=D();n(0,"button",19),g("click",function(){d(e);let o=s(2);return u(o.onImport())}),f(1,"i",20),p(2,"Import "),i()}if(t&2){let e=s(2);ft(M(2,_c,e.roleService.global.Export))}}function yc(t,r){if(t&1){let e=D();n(0,"button",19),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",21),p(2," Export "),i()}}function hc(t,r){if(t&1){let e=D();n(0,"div",22)(1,"h6"),p(2,"Discontinued"),i(),n(3,"radio-options",23),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.Bin,o)||(c.pageData.Filter.Bin=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),y("model",e.pageData.Filter.Bin),m("options",e.radioOption)}}function Sc(t,r){if(t&1){let e=D();n(0,"input",27),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()}if(t&2){let e=s().$implicit;y("ngModel",e.selected)}}function bc(t,r){if(t&1&&(n(0,"tr",24)(1,"td"),_(2,Sc,1,1,"input",25),i(),n(3,"td")(4,"a",26)(5,"span"),p(6),i()()(),n(7,"td"),p(8),i()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.roleService.logistic.Delete),l(2),m("routerLink",N(7,fc))("queryParams",M(8,gc,e.ID)),l(),ft(M(10,Cc,e.Bin)),l(),I(" ",e.Name," "),l(2),b(e.OutletName)}}function Dc(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,vc,3,0,"a",3),n(3,"div",4),_(4,xc,3,4,"button",5)(5,yc,3,0,"button",6),i(),n(6,"a",7),p(7,"Add"),i()(),n(8,"filters"),_(9,hc,4,2,"ng-template",null,0,X),i(),n(11,"content")(12,"div",8)(13,"div",9)(14,"table",10)(15,"thead",11)(16,"tr")(17,"th",12)(18,"input",13),g("change",function(o){d(e);let c=s();return u(c.onSelectAllData(o.target.checked))}),i()(),n(19,"th"),p(20,"Name"),i(),n(21,"th"),p(22,"Destination Outlet Filter"),i()()(),n(23,"tbody"),_(24,bc,9,12,"tr",14),i()()(),n(25,"div",15)(26,"POS-complex-pagination",16),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.getSelectedData().length>0),l(2),m("ngIf",e.roleService.logistic.Create),l(),m("ngIf",e.roleService.global.Export),l(),m("routerLink",N(11,uc)),l(18),m("ngForOf",e.data.Data),l(2),m("total",e.data.Data.length)("pageData",e.pageData)}}var gn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"TransferOrder/GetCourierList","TransferOrderLoader/GetCourierListLoader",o);this.roleService=c;this.matDialog=O;this.radioOption=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"},{Key:null,Value:"All"}]}radioOption;onImport(){this.matDialog.open(fn).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(()=>this.getListData())}openExportModal(){this.matDialog.open(be,{data:{title:"Courier",exportTypes:[{ID:"TransferOrderExport/GetCourierList",Value:"Default",FileName:"Courier"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/GetCourierListCount",pagination:!0}})}postInit(e){this.data.Data=e.Data.map(a=>le(ae({},a),{OutletName:a.Outlet?a.Outlet?.join(", "):""}))}preInitList(){this.pageData.Filter.Bin=!1}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-courier"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["value","Delete","matTooltipPosition","above","matTooltip","Delete","class","btn btn-danger me-3",3,"click",4,"ngIf"],[1,"btn-group","ms-3","me-6"],["class","btn btn-outline-secondary",3,"class","click",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"button","btn","btn-success",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","14px"],["type","checkbox",3,"change"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-sm-block","mt-2"],["api","TransferOrder/GetCourierListCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["value","Delete","matTooltipPosition","above","matTooltip","Delete",1,"btn","btn-danger","me-3",3,"click"],[1,"fas","fa-trash","me-3"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-download","me-3"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["name","CourierStatus",3,"modelChange","model","options"],[1,"border-bottom"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[3,"routerLink","queryParams"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,Dc,27,12,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,yt,R,H,ne,Rt,Ke,Ae],encapsulation:2})};var Ic=()=>["/menu/Logistics/Setup/Courier"];function Tc(t,r){t&1&&(n(0,"span",21),p(1,"Name is required"),i())}function wc(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2)(1,"actions")(2,"a",3),p(3,"Cancel"),i(),n(4,"button",4),g("click",function(){d(e);let o=s();return u(o.onSubmit("TransferOrder/UpdateCourierList"))}),p(5," Save "),i()(),n(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"div",9)(12,"h3"),p(13,"General"),i()(),n(14,"div",10)(15,"div",6)(16,"div",11)(17,"div",12)(18,"input",13,0),S("ngModelChange",function(o){d(e);let c=s();return h(c.formData.Name,o)||(c.formData.Name=o),u(o)}),i(),n(20,"label"),p(21,"Name"),i(),_(22,Tc,2,0,"span",14),i()(),n(23,"div",11)(24,"div",12)(25,"div",15)(26,"label"),p(27,"Suspend"),i(),n(28,"mat-radio-group",16),S("ngModelChange",function(o){d(e);let c=s();return h(c.formData.Bin,o)||(c.formData.Bin=o),u(o)}),n(29,"mat-radio-button",17),p(30,"Yes"),i(),n(31,"mat-radio-button",18),p(32," No "),i()()()()()()()()()(),n(33,"div",6)(34,"div",7)(35,"div",8)(36,"div",9)(37,"h3"),p(38,"Destination Outlet Filter"),i()(),n(39,"div",10)(40,"div",6)(41,"div",7)(42,"outlet-selector",19),S("ngModelChange",function(o){d(e);let c=s();return h(c.formData.EntityID,o)||(c.formData.EntityID=o),u(o)}),i(),n(43,"small",20),p(44," This restriction only applies for the destination outlet in the "),n(45,"strong"),p(46,"Transfer Order Form"),i(),p(47,". "),i()()()()()()()()()()}if(t&2){let e=Fe(19),a=s();m("pageData",a.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),m("routerLink",N(14,Ic)),l(2),m("disabled",!a.formData.Name),l(14),y("ngModel",a.formData.Name),l(4),m("ngIf",e.invalid&&(e.dirty||e.touched)),l(6),y("ngModel",a.formData.Bin),l(),m("value",!0),l(2),m("value",!1),l(11),m("multiple",!0),y("ngModel",a.formData.EntityID),m("maxSelectedLabels",10)("isFloatLabel",!0)}}var Cn=class t extends Wt{constructor(e,a,o,c,O){super(e,a,"TransferOrderLoader/CourierFormInitial",o);this.toaster=c;this.router=O}postBindForm(){T.IsEmpty(this.formData.Name)&&(this.formData.Name="")}onSubmitSuccess(e){this.toaster.success(e.Message,Ce.Success),this.router.navigate(["/menu/Logistics/Setup/Courier"])}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(ee),C(nt))};static \u0275cmp=w({type:t,selectors:[["POS-courier-form"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["name","ngModel"],[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],[1,"form-floating-outline"],["type","text","autofocus","","required","","name","Name","id","Name","placeholder","Name",1,"form-control",3,"ngModelChange","ngModel"],["class","control-label text-danger",4,"ngIf"],[1,"form-floating-outline","radio","border","rounded"],["aria-label","Select an option","color","primary",3,"ngModelChange","ngModel"],[3,"value"],[1,"ps-3","mt-4",3,"value"],[3,"ngModelChange","multiple","ngModel","maxSelectedLabels","isFloatLabel"],[1,"form-text","text-muted","outlet-info"],[1,"control-label","text-danger"]],template:function(a,o){a&1&&_(0,wc,48,15,"mainpanel-cmp",1),a&2&&m("ngIf",o.formData&&o.formData.Name!=null)},dependencies:[B,z,fe,R,So,H,Mo,Po,ne,Ee],styles:[".outlet-info[_ngcontent-%COMP%]{display:block;margin-top:.4rem;font-size:.85rem;color:#6c757d}.outlet-info[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#495057}.outlet-info[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-style:italic;color:#5a6268}"]})};var vn=class t{constructor(r,e){this.dt=r;this.dialogRef=e;this.config=new ye,this.config.title="Receive Note",this.data=r.data}config;data;onSave(){this.dialogRef.close(this.data)}static \u0275fac=function(e){return new(e||t)(C($e),C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-modal-note"]],standalone:!1,decls:4,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],["cols","24","rows","6",1,"form-control",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.onSave()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"textarea",2),S("ngModelChange",function(c){return h(a.data.Note,c)||(a.data.Note=c),c}),i()()()()),e&2&&(m("config",a.config),l(3),y("ngModel",a.data.Note))},dependencies:[he,fe,R,H],encapsulation:2})};var Lr=t=>({ID:t}),Ec=()=>["/menu/Products/Catalog/Variants/Info"],Oc=t=>({"bg-gradient-warning":t});function Mc(t,r){if(t&1){let e=D();n(0,"tr",27)(1,"td")(2,"a",28),p(3),i()(),f(4,"td",29),n(5,"td")(6,"input",30),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Quantity,o)||(c.Quantity=o),u(o)}),i()(),n(7,"td",31),p(8),v(9,"number"),i(),n(10,"td",32),p(11),v(12,"number"),i(),n(13,"td")(14,"textarea",33),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Note,o)||(c.Note=o),u(o)}),i()()()}if(t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink",N(16,Ec))("queryParams",M(17,Lr,e.VariantID)),l(),b(e.Name),l(),m("innerHTML",e.Code,W),l(2),y("ngModel",e.Quantity),m("max",e.Transfer)("disabled",e.TypeID==a.serialized),l(2),I(" ",E(9,12,e.Transfer)," "),l(2),m("ngClass",M(19,Oc,e.Quantity-e.Transfer!=0)),l(),I(" ",E(12,14,e.Quantity-e.Transfer)," "),l(3),y("ngModel",e.Note),m("disabled",e.TypeID==a.serialized)}}function Pc(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),p(3,"Cancel"),i(),n(4,"button",3),g("click",function(){d(e);let o=s();return u(o.openNoteDialog())}),p(5,"Save"),i()(),n(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h2"),f(13,"i",9),p(14),i()(),n(15,"div",10)(16,"div",11)(17,"div",12),p(18,"Date"),i(),n(19,"div",13),p(20,":"),i(),n(21,"div",14)(22,"datepicker",15),S("dateChange",function(o){d(e);let c=s();return h(c.data.Date,o)||(c.data.Date=o),u(o)}),i()()(),n(23,"div",16)(24,"div",12),p(25,"Courier"),i(),n(26,"div",13),p(27,":"),i(),n(28,"div",14),p(29),i()(),n(30,"div",17)(31,"div",12),p(32,"Note"),i(),n(33,"div",13),p(34,":"),i(),f(35,"div",18),i()()()(),n(36,"div",19)(37,"div",7)(38,"div",8)(39,"h2"),p(40,"Products"),i()(),n(41,"div",10)(42,"table",20)(43,"thead",21)(44,"tr")(45,"th",22),p(46,"NAME"),i(),n(47,"th",23),p(48,"CODE"),i(),n(49,"th",24),p(50,"QTY"),i(),n(51,"th",24),p(52,"TRANSFER"),i(),n(53,"th",24),p(54,"DIFF"),i(),n(55,"th",25),p(56,"NOTE"),i()()(),n(57,"tbody"),_(58,Mc,15,21,"tr",26),i()()()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),m("queryParams",M(10,Lr,e.data.ID)),l(12),I(" ",e.data==null?null:e.data.Outlet," "),l(8),m("width",100),y("date",e.data.Date),l(7),I(" ",e.data.Courier," "),l(6),m("innerHTML",e.data.Note,W),l(23),m("ngForOf",e.data.Items)}}var xn=class t extends Wt{constructor(e,a,o,c,O,Q,re){super(a,o,"TransferOrder/ReceiveOutletDelivery",c);this.title=e;this.toastr=O;this.matDialog=Q;this.router=re}serialized=4;postBindForm(e){this.menuData.H=e.PageTitle,this.title.setTitle("Receive & Adjust")}openNoteDialog(){this.matDialog.open(vn,{data:{data:{Note:null}},width:"400px"}).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(e=>{let a=le(ae({},this.data),{Note:e?.Note});this.httpService.post("/api/TransferOrder/CheckOut",a).subscribe(o=>this.onSubmitSuccess(o))})}onSubmitSuccess(e){this.toastr.success("Delivery has been received!",Ce.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])}static \u0275fac=function(a){return new(a||t)(C(ei),C(te),C(L),C(pe),C(ee),C(A),C(nt))};static \u0275cmp=w({type:t,selectors:[["POS-receive-transfer-order"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["routerLink","/menu/Logistics/Archive/Transfer_Order/Info",1,"btn","me-5","btn-outline-secondary",3,"queryParams"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-3","col-lg-12","col-xl-3","col-sm-12"],[1,"card"],[1,"card-header"],["aria-hidden","true",1,"fa","fa-location-dot"],[1,"card-body"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[2,"width","20%"],[1,"me-2",2,"width","5%"],[1,"w-75"],["appearance","outline",3,"dateChange","width","date"],[1,"d-flex","align-items-center","justify-content-between","w-100","mt-8"],[1,"d-flex","align-items-center","justify-content-between","w-100",2,"margin-top","28px"],[1,"w-75","text-break",3,"innerHTML"],[1,"col-xs-12","col-md-9","col-lg-12","col-xl-9","col-sm-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[1,"text-end",2,"width","60px"],[1,"text-end",2,"width","250px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams"],[1,"text-end",3,"innerHTML"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","ngModel","max","disabled"],[1,"text-end"],[1,"text-end",3,"ngClass"],["rows","3",1,"form-control",3,"ngModelChange","ngModel","disabled"]],template:function(a,o){a&1&&_(0,Pc,59,12,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[pt,K,B,z,fe,R,H,ne,se,mt,_e],encapsulation:2})};var ri=class t{constructor(r,e,a){this.data=r;this.dialogRef=e;this.convertCsvService=a;this.modalConfig=new ye,this.modalConfig.title=r.title}modalConfig;convertedData;onSelectFile(r){this.convertCsvService.convert(r).subscribe(e=>{this.convertedData=e})}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(this.convertedData)}static \u0275fac=function(e){return new(e||t)(C($e),C(xe),C(sr))};static \u0275cmp=w({type:t,selectors:[["app-modal-import"]],standalone:!1,decls:14,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"modal-dialog"],[1,"modal-content","border-0"],["href","//res.cloudinary.com/pos/raw/upload/v1671075053/POS/CSV/Inbound_QTY.csv",1,"noteBox"],[1,"d-flex","justify-content-between"],["accept",".csv","id","csv","type","file","name","myfile",1,"form-control",3,"change"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.onClose()})("onClose",function(){return a.onClose()}),n(1,"content",1)(2,"div",2)(3,"div")(4,"a",3),p(5,"Download Template File"),i()(),n(6,"div",4)(7,"table")(8,"tbody")(9,"tr")(10,"th"),p(11," CSV: "),i(),n(12,"td")(13,"input",5),g("change",function(c){return a.onSelectFile(c.target)}),i()()()()()()()()()),e&2&&m("config",a.modalConfig)},dependencies:[he],styles:[".noteBox[_ngcontent-%COMP%]{background-color:#ffffe1;border:1px solid #cacaca;padding:3px;display:block;outline:0;margin-bottom:5px;font-size:11px;text-decoration:none}"]})};var yn=class t{httpService=x(L);constructor(){}getUnfulfilledOrderByNumberOrReferenceNumber(r){return this.httpService.get(Pe.GetUnfulfilledOrderByNumberOrReferenceNumber,[{key:"orderNumberOrReferenceNumber",value:r}])}getUnfulfilledOrderByNumber(r){return this.httpService.post(Pe.GetUnfulfilledNumberByNumber,{Prefix:r,Count:20})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var jt=class t{constructor(r,e){this.toastr=r;this.matDialog=e}cartItems;formItems;entityID;bindCartItems(r=[],e=[],a){this.cartItems=[],r.forEach(o=>{let c=Object.assign({},o);c.QuantityDelivered=o.Quantity,c.Sent=0,c.BarcodeCount=0,c.Completed=!1,c.MaxDeliveryQuantity=c.Quantity,c=this.setSerialSourceItem(c),this.checkIsSent(c,e),a&&this.checkIsEdit(c),this.cartItems.push(c)})}setSerialSourceItem(r){return r.TypeID==4&&(r.serialSources=r?.Serial?JSON.parse(JSON.stringify(r?.Serial)):[]),r}checkIsEdit(r){let e=this.formItems.find(a=>a.ID==r.ID);T.IsNotEmpty(e)?(r.QuantityDelivered=e.Quantity,r.Completed=!1,r.MaxDeliveryQuantity=r.Quantity-r.Sent+e.Quantity):r.Completed||(r.QuantityDelivered=0)}checkIsSent(r,e){let a=e?.find(o=>o.ID==r.ID);T.IsNotEmpty(a)&&(r.Sent=a.Quantity,r.QuantityDelivered=r.Quantity-r.Sent,r.MaxDeliveryQuantity=r.Quantity-r.Sent,r.Completed=r.QuantityDelivered==0)}onScanBarcode(r){if(T.IsEmpty(r))this.toastr.error("Code is empty",Ce.Error);else{let e=this.cartItems.find(a=>T.IsNotEmpty(a.Code)&&a.Code==r);if(T.IsNotEmpty(e)){this.cartItems.filter(o=>o.Code==r).forEach(o=>o.BarcodeCount+=1);let a=[];this.cartItems.forEach(o=>a.push(o)),this.cartItems=a,this.toastr.success(`${e.Name} (${e.Code}) count: ${e.BarcodeCount}`,Ce.Success)}else this.toastr.error(`No variant with code ${r} found`,Ce.Error)}}static \u0275fac=function(e){return new(e||t)(Gt(ee),Gt(A))};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var ai=class t{constructor(r,e,a){this.toastr=r;this.router=e;this.dialog=a}validate(r,e,a){let o=!0;return r.filter(c=>c.QuantityDelivered!=0).length==0&&!a&&(this.toastr.error("Deliver at least one item",Ce.Error),o=!1),r.forEach(c=>{c.QuantityDelivered>c.MaxDeliveryQuantity&&(this.toastr.error(`Delivery item of ${c.Name} is greater than ordered!`,Ce.Error),o=!1)}),o=this.checkBarcodeConfig(r,e),o}checkBarcodeConfig(r,e){if(!e)return!0;let a=r.some(c=>(c.QuantityDelivered<0?c.QuantityDelivered*-1:c.QuantityDelivered)!=c.BarcodeCount&&c.QuantityDelivered>0),o=!0;return a&&(this.dialog.open(er,{id:"modalLogisticInfoId",data:{title:"Logistic - Quantity Counter Config Enabled",message:`You must scan the product to be sent one by one before the record can be SAVED or you can turn off the config by following
1
+ import{a as Sr}from"./chunk-C3WNOC5F.js";import{b as Ir}from"./chunk-LE5ZGH7A.js";import{a as br,b as Tr}from"./chunk-T7UL42MO.js";import{a as Dr}from"./chunk-W6BB4ADK.js";import{a as yr}from"./chunk-GVGUEGZI.js";import{a as hr}from"./chunk-RWRT75NX.js";import{a as Wt}from"./chunk-RTIMT7MB.js";import{a as At,b as Bt}from"./chunk-UQKBA274.js";import"./chunk-LJW6HW5T.js";import{a as $o}from"./chunk-LX2RVE4Q.js";import{a as Go}from"./chunk-B56YVUVP.js";import{a as To}from"./chunk-LKFDM7AC.js";import{a as dr,b as ur}from"./chunk-TDG64PZU.js";import{a as mr,b as zi}from"./chunk-S32IOJJR.js";import{e as ir}from"./chunk-DF2W7YLH.js";import"./chunk-CHSEYRJF.js";import"./chunk-Z3E24JZW.js";import{a as qi}from"./chunk-I6E6PXQU.js";import{b as Ji,c as xr}from"./chunk-ULF57NM6.js";import{a as gr,e as Cr,f as bt}from"./chunk-T6L7V6VB.js";import{a as Ki}from"./chunk-GLQBFUNO.js";import{a as vr}from"./chunk-CMQAUCAH.js";import{a as _r}from"./chunk-SGIO47PC.js";import"./chunk-TLANLIUC.js";import{a as pr}from"./chunk-R7MOZHCP.js";import{a as $i}from"./chunk-V7RYZJVN.js";import"./chunk-D3RDKDIY.js";import"./chunk-NQX7EX5A.js";import{a as sr}from"./chunk-FO3DCWRP.js";import{a as cr}from"./chunk-P3KIIKY4.js";import{a as er,b as nr,c as or}from"./chunk-ZJDIZNTX.js";import{a as Ui}from"./chunk-EGOF4SFE.js";import"./chunk-I2O3VGCS.js";import{b as Gi}from"./chunk-O5PHF6GW.js";import{a as Ko,c as Jo,e as Yo,f as Xo,g as Zo}from"./chunk-P6TNAQ2F.js";import{a as zo,b as Qi}from"./chunk-BADUP5JT.js";import"./chunk-OPCIBNIJ.js";import"./chunk-G6C75N4Q.js";import"./chunk-PRKAXHSJ.js";import"./chunk-NQKVYQ6V.js";import"./chunk-WOZLNXGI.js";import{a as fr}from"./chunk-AJHV3SOU.js";import"./chunk-ZY3EJSWW.js";import{a as rr,b as ar,c as lr}from"./chunk-DPKYMDVN.js";import{b as tr}from"./chunk-O5RZTQKV.js";import{a as ht,b as St}from"./chunk-ZEZ2K35X.js";import{e as Pi}from"./chunk-NRDJEOWR.js";import{a as ct}from"./chunk-3CCOX4FN.js";import{a as Mo,b as Po,c as Fo,d as Rt,e as qo}from"./chunk-3UUHT4HG.js";import{d as se,e as ji}from"./chunk-OGI634A2.js";import{b as No}from"./chunk-YYZIKSOW.js";import"./chunk-3RK6DDJD.js";import{a as Vo}from"./chunk-7UFQPOGN.js";import{a as Ai}from"./chunk-GZAARWM2.js";import{p as Eo,q as Oo}from"./chunk-QTXCHVAR.js";import"./chunk-DWOLAWQN.js";import"./chunk-RB6SQ4EV.js";import"./chunk-T2PXIPKB.js";import"./chunk-QMCAG2HX.js";import{a as Bo}from"./chunk-Z3VZQOTA.js";import{f as oi}from"./chunk-74QSXJ42.js";import{a as Ke,b as Uo}from"./chunk-NHTMJTLV.js";import{c as Io}from"./chunk-V5O3E5XQ.js";import{c as Ee}from"./chunk-BH4ZE4CF.js";import{b as be}from"./chunk-2U6W2RNU.js";import{a as ve}from"./chunk-U4QA2337.js";import"./chunk-YUZ32SM6.js";import"./chunk-NW73SHIZ.js";import{a as we}from"./chunk-NDM2ODJP.js";import{d as ne,e as Hi}from"./chunk-ATAC2AND.js";import"./chunk-BYEI3PJ6.js";import"./chunk-OMVUFMMZ.js";import"./chunk-HPLAMF75.js";import"./chunk-OK4CL2M4.js";import"./chunk-T6MTT57B.js";import{a as Fi,b as Vi,c as Lo}from"./chunk-VF6HKAFR.js";import"./chunk-4L5G4WC4.js";import"./chunk-3NJFM55L.js";import"./chunk-2LFFOWKW.js";import"./chunk-OQCGVZVB.js";import"./chunk-UAI7BPPY.js";import"./chunk-6IW4MVP2.js";import{b as te}from"./chunk-Y726HBE5.js";import"./chunk-OI2RWAOV.js";import{a as Do}from"./chunk-7LXPGNYF.js";import{a as Ri,b as zr,c as mt}from"./chunk-CN5SHMHF.js";import{a as ko,d as Ro,f as Ao,h as Ni}from"./chunk-3M5M2T4L.js";import{F as We,G as Wi,m as wo,u as ye,v as he,w as Ve}from"./chunk-7G4UPOQP.js";import{b as Ae,c as ii}from"./chunk-XOQ4SW2R.js";import{B as Qo,N as ni,O as Pe,g as Be,k as Ho,n as Bi,x as jo}from"./chunk-ZJMIEPWF.js";import"./chunk-GHC4BCCW.js";import"./chunk-GIKR6Y2K.js";import{a as Li,c as ki,d as Te}from"./chunk-3GV7FUAX.js";import{a as at,e as xe,f as $e,g as A,l as Wo}from"./chunk-6BL2JKZG.js";import"./chunk-REQUYIUO.js";import"./chunk-QCBXPOJL.js";import"./chunk-T2PMKO3M.js";import{a as Ce}from"./chunk-2FWFPV5I.js";import"./chunk-OE7PM4Y4.js";import{A as So,F as ot,G as kt,a as yo,b as yt,c as fe,h as R,l as Ge,o as H,r as ho,s as ti}from"./chunk-CB33ZMNF.js";import"./chunk-OINGZOF4.js";import{a as bo}from"./chunk-I4I6FJDX.js";import{a as T,d as ie}from"./chunk-TYBAV5LT.js";import"./chunk-QKCOYSSN.js";import{$ as ze,$a as l,$b as wi,Ac as E,Bc as P,Cc as Mi,D as Me,Db as Ye,E as k,Fa as di,Fc as X,I as je,Ib as n,Jb as i,Ka as _o,Kb as f,Lb as q,M as po,Ma as _t,Mb as U,N as zt,Ob as D,Od as pe,Q as mo,Qb as g,Qd as nt,Rb as s,Rd as z,Td as gt,Ub as _i,Va as W,Vb as vo,Vd as ee,W as Si,Wa as Xt,Wc as pt,Y as rt,Yc as K,Yd as L,Za as Zt,Zb as Ii,Zc as B,_b as Ti,aa as j,ca as co,cd as it,d as Ie,db as C,dc as Fe,e as dt,ec as p,ed as Se,fa as J,fb as fo,fc as b,ga as ue,gc as I,gd as _e,hc as Qe,ia as so,ic as xo,ja as $,jc as y,jd as Z,k as ke,ka as bi,kb as w,kc as h,lb as Di,lc as S,ma as Gt,mb as go,na as x,o as ut,ob as oe,pc as Ei,qb as _,qc as N,rc as M,sc as Re,t as V,tc as Oi,u as xt,ua as uo,ub as Co,va as d,vb as m,wa as u,wb as ui,wd as ei,x as ao,xb as Mt,y as si,z as lo,zb as ft,zc as v}from"./chunk-DJOHANFC.js";import{a as ae,b as le,d as ro,g as Ur}from"./chunk-7DCB7DB2.js";var Gr=()=>["/menu/Logistics/Archive/Transfer_Order/Form"],$r=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],Kr=t=>({ID:t}),Jr=(t,r,e)=>({"text-success":t,"text-warning":r,"text-danger":e}),Yr=()=>["/print/Transfer"],Xr=(t,r)=>({ID:t,Template:r});function Zr(t,r){if(t&1){let e=D();n(0,"a",23),g("click",function(){d(e);let o=s(3);return u(o.httpPostListID("TransferOrder/Delete"))}),f(1,"i",24),p(2," Delete"),i()}}function ea(t,r){if(t&1){let e=D();n(0,"a",23),g("click",function(){d(e);let o=s(3);return u(o.onVoid())}),f(1,"i",24),p(2," Void"),i()}}function ta(t,r){if(t&1&&(q(0),_(1,Zr,3,0,"a",22)(2,ea,3,0,"a",22),U()),t&2){let e=s(2);l(),m("ngIf",e.role.logistic.Delete&&!e.pageData.Config.IsVoidEnabled),l(),m("ngIf",e.role.logistic.TransferOrderVoid&&e.pageData.Config.IsVoidEnabled)}}function ia(t,r){if(t&1){let e=D();n(0,"button",25),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",26),p(2," Export "),i()}}function na(t,r){t&1&&(n(0,"a",27),p(1,"New"),i()),t&2&&m("routerLink",N(1,Gr))}function oa(t,r){if(t&1){let e=D();n(0,"div",28)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",29),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",30),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DestinationID,o)||(c.pageData.Filter.DestinationID=o),u(o)}),i(),n(7,"h6"),p(8,"Fulfillment"),i(),n(9,"ng-select",31),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.StateID,o)||(c.pageData.Filter.StateID=o),u(o)}),i(),n(10,"h6"),p(11,"Tag"),i(),n(12,"ng-select",32),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.TypeID,o)||(c.pageData.Filter.TypeID=o),u(o)}),i(),n(13,"h6"),p(14,"Courier"),i(),n(15,"ng-select",33),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CourierID,o)||(c.pageData.Filter.CourierID=o),u(o)}),i(),n(16,"h6"),p(17,"From"),i(),n(18,"datepicker",34),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(19,"h6"),p(20,"To"),i(),n(21,"datepicker",35),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(22,"h6"),p(23,"Creator"),i(),n(24,"autocompleteV2",36),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CreatorID,o)||(c.pageData.Filter.CreatorID=o),u(o)}),i(),n(25,"h6"),p(26,"Sort By"),i(),n(27,"radio-options",37),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SortBy,o)||(c.pageData.Filter.SortBy=o),u(o)}),i(),n(28,"h6"),p(29,"Page Size"),i(),n(30,"input",38),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.RowCount,o)||(c.pageData.Filter.RowCount=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.DestinationID),m("multiple",!1),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Deliveries),y("ngModel",e.pageData.Filter.StateID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Courier),y("ngModel",e.pageData.Filter.CourierID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.CreatorID),l(3),m("options",e.pageData.Options==null?null:e.pageData.Options.SortOption),y("model",e.pageData.Filter.SortBy),l(3),y("ngModel",e.pageData.Filter.RowCount),m("max",1e4)}}function ra(t,r){if(t&1){let e=D();n(0,"th",39)(1,"input",40),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function aa(t,r){t&1&&(n(0,"th",41),p(1," Price "),i())}function la(t,r){if(t&1){let e=D();n(0,"td",39)(1,"input",45),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.selected)}}function pa(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.Price)," ")}}function ma(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.Courier)}}function ca(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.CourierName)}}function sa(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,la,2,1,"td",12),n(3,"td"),p(4),i(),n(5,"td"),p(6),i(),n(7,"td"),f(8,"a",42),i(),n(9,"td"),p(10),v(11,"date"),i(),n(12,"td"),p(13),v(14,"date"),i(),n(15,"td",41),p(16),i(),_(17,pa,3,3,"td",17),n(18,"td"),p(19),i(),n(20,"td"),p(21),i(),n(22,"td"),p(23),i(),n(24,"td"),_(25,ma,2,1,"span",3)(26,ca,2,1,"span",3),i(),n(27,"td")(28,"a",43),f(29,"i",44),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.role.logistic.Delete&&!a.pageData.Config.IsVoidEnabled||a.role.logistic.TransferOrderVoid&&a.pageData.Config.IsVoidEnabled),l(2),b(e.Source),l(2),b(e.Destination),l(2),m("routerLink",N(25,$r))("queryParams",M(26,Kr,e.ID))("innerHTML",e.Number,W),l(2),b(P(11,19,e.Date,"dd MMM yyyy")),l(3),b(P(14,22,e.Created,"HH:mm")),l(3),b(e.Quantity),l(),m("ngIf",a.role.sell.PriceVisible&&a.pageData.Config.PriceVisible),l(),ft(Oi(28,Jr,e.StateLabel=="Received",e.StateLabel=="Dispatched",e.StateLabel=="Approved")),l(),I(" ",e.StateLabel," "),l(2),b(e.CreatorName),l(2),b(e.TypeName),l(2),m("ngIf",e.Courier!=null),l(),m("ngIf",e.CourierName!=null&&e.Courier==null),l(2),m("routerLink",N(32,Yr))("queryParams",Re(33,Xr,e.ID,e.SourceTemplateID))}}function da(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,ta,3,2,"ng-container",3)(3,ia,3,0,"button",4),n(4,"div",5),_(5,na,2,2,"a",6),i()(),n(6,"filters"),_(7,oa,31,21,"ng-template",null,0,X),i(),n(9,"content")(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11),_(15,ra,2,0,"th",12),n(16,"th",13),p(17,"Source"),i(),n(18,"th",14),p(19,"Destination"),i(),n(20,"th"),p(21,"Number"),i(),n(22,"th",15),p(23,"Date"),i(),n(24,"th",15),p(25,"Time"),i(),n(26,"th",16),p(27,"Qty"),i(),_(28,aa,2,0,"th",17),n(29,"th",15),p(30,"Status"),i(),n(31,"th",18),p(32,"Creator"),i(),n(33,"th",15),p(34,"Tag"),i(),n(35,"th",15),p(36,"Courier"),i(),f(37,"th",19),i()(),_(38,sa,30,36,"tbody",20),i()(),n(39,"POS-complex-pagination",21),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.getSelectedData().length>0),l(),m("ngIf",e.role.global.Export),l(2),m("ngIf",e.role.logistic.Create),l(10),m("ngIf",e.role.logistic.Delete&&!e.pageData.Config.IsVoidEnabled||e.role.logistic.TransferOrderVoid&&e.pageData.Config.IsVoidEnabled),l(13),m("ngIf",e.role.sell.PriceVisible&&e.pageData.Config.PriceVisible),l(10),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Yi=class t extends ve{constructor(e,a,o,c,O,Q,re){super(e,a,"TransferOrder/TransferOrderList","TransferOrderLoader/TransferOrderList",c,O);this.csvConverter=o;this.role=Q;this.matDialog=re}moreFilter=!1;openExportModal(){this.matDialog.open(be,{data:{title:"Transfer Order",exportTypes:[{ID:"TransferOrder/TransferOrderList",Value:"Default",FileName:"Transfer Order"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/TransferOrderRowsCount",pagination:!0}})}onVoid(){if(confirm("Are you sure you want to void these transfer order(s)?")==!1)return;let e=this.getSelectedData().map(a=>a.ID);e.length>0&&this.httpService.put("/api/transferorder/voidlisttransferorder",e,{},1e5,!0).subscribe(a=>{this.toastrService.success(a.Message,"Success"),this.getListData()},a=>this.toastrService.error(a.error.Message,"Error"))}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ee),C(pe),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-transfer-order"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],[2,"width","150px"],[2,"width","90px"],[1,"text-end",2,"width","50px"],["class","text-end",4,"ngIf"],[2,"width","120px"],[2,"width","16px"],[4,"ngFor","ngForOf"],["api","TransferOrder/TransferOrderRowsCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button","class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button",1,"btn","btn-success",3,"routerLink"],[1,"dialog-filter"],["placeholder","Source",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["bindLabel","Value","bindValue","Key","placeholder","Choose",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Options",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose a courier",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetUserSuggestion",1,"input-left","w-100","ac-filter",3,"ngModelChange","ngModel"],["name","SortBy",3,"modelChange","options","model"],["type","text","autoNum","",1,"form-control","input-filter",3,"ngModelChange","ngModel","max"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"text-end"],[3,"routerLink","queryParams","innerHTML"],["target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,da,40,12,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,fe,yt,R,H,ne,se,Rt,We,Ke,mt,Te,Ee,_e,Se],encapsulation:2})};var ua=()=>["/menu/Logistics/Archive/Outbound_Logistics/Form"],_a=()=>["/menu/Logistics/Archive/Outbound_Logistics/Info"],Yn=t=>({ID:t}),fa=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],ga=()=>["/menu/Orders/Order/Sales_Order/Info"];function Ca(t,r){if(t&1){let e=D();q(0),n(1,"a",21),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("OutboundLogistics/Delete"))}),f(2,"i",22),p(3," Delete"),i(),U()}}function va(t,r){if(t&1){let e=D();n(0,"button",23),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",24),p(2," Export "),i()}}function xa(t,r){t&1&&(n(0,"a",25),p(1," New"),i()),t&2&&m("routerLink",N(1,ua))}function ya(t,r){if(t&1){let e=D();n(0,"div",26)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",27),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6",28),p(5,"ORIGIN"),i(),n(6,"outlet-selector",27),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.OrderEntityID,o)||(c.pageData.Filter.OrderEntityID=o),u(o)}),i(),n(7,"h6"),p(8,"Customer"),i(),n(9,"autocompleteV2",29),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CustomerID,o)||(c.pageData.Filter.CustomerID=o),u(o)}),i(),n(10,"h6"),p(11,"From - To"),i(),n(12,"div")(13,"datepicker",30),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i()(),n(14,"div",31)(15,"datepicker",32),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()(),n(16,"h6"),p(17,"Number Filter Comparator"),i(),n(18,"ng-select",33),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.NumberFilterComparator,o)||(c.pageData.Filter.NumberFilterComparator=o),u(o)}),g("ngModelChange",function(){d(e);let o=s(2);return u(o.validateForLookbackDays())}),i(),n(19,"h6"),p(20,"Query Options"),i(),n(21,"ng-select",34),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.QueryOption,o)||(c.pageData.Filter.QueryOption=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.OrderEntityID),m("multiple",!1),l(3),y("ngModel",e.pageData.Filter.CustomerID),l(4),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(2),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.NumberFilterComparator),m("items",e.pageData.Options.NumberFilterComparatorOptions)("clearable",!1),l(3),y("ngModel",e.pageData.Filter.QueryOption),m("items",e.pageData.Options.QueryOptions)("clearable",!1)}}function ha(t,r){if(t&1){let e=D();n(0,"th",35)(1,"input",36),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function Sa(t,r){if(t&1){let e=D();n(0,"input",40),S("ngModelChange",function(o){d(e);let c=s(2).$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()}if(t&2){let e=s(2).$implicit;y("ngModel",e.selected)}}function ba(t,r){if(t&1&&(n(0,"td",35),_(1,Sa,1,1,"input",39),i()),t&2){let e=s().$implicit;l(),m("ngIf",e.WriteAccess)}}function Da(t,r){if(t&1&&(q(0),f(1,"a",41),U()),t&2){let e=s().$implicit;l(),m("routerLink",N(3,_a))("queryParams",M(4,Yn,e.ID))("innerHtml",e.Number,W)}}function Ia(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.Number)}}function Ta(t,r){if(t&1&&(n(0,"a",42),p(1),i()),t&2){let e=s().$implicit;m("routerLink",N(3,fa))("queryParams",M(4,Yn,e.InvoiceID)),l(),b(e.InvoiceNumber)}}function wa(t,r){if(t&1&&(n(0,"a",42),p(1),i()),t&2){let e=s().$implicit;m("routerLink",N(3,ga))("queryParams",M(4,Yn,e.OrderID)),l(),b(e.OrderNumber)}}function Ea(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,ba,2,1,"td",14),n(3,"td"),p(4),i(),n(5,"td"),_(6,Da,2,6,"ng-container",37)(7,Ia,2,1,"ng-template",null,1,X),i(),n(9,"td"),p(10),i(),n(11,"td"),p(12),i(),n(13,"td"),_(14,Ta,2,6,"a",38)(15,wa,2,6,"ng-template",null,2,X),i(),n(17,"td"),p(18),v(19,"date"),i(),n(20,"td"),p(21),v(22,"date"),i()()()),t&2){let e=r.$implicit,a=Fe(8),o=Fe(16),c=s(2);l(2),m("ngIf",c.role.logistic.Delete),l(2),b(e.EntityName),l(2),m("ngIf",e.WriteAccess)("ngIfElse",a),l(4),b(e.CustomerName),l(2),b(e.OrderEntityName),l(2),m("ngIf",e.InvoiceID)("ngIfElse",o),l(4),b(P(19,10,e.Date,"dd MMM yyyy")),l(3),b(P(22,13,e.Time,"HH:mm"))}}function Oa(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",4),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),g("textChange",function(){d(e);let o=s();return u(o.validateForLookbackDays())}),n(1,"actions"),_(2,Ca,4,0,"ng-container",5)(3,va,3,0,"button",6),n(4,"div",7),_(5,xa,2,2,"a",8),i()(),n(6,"filters"),_(7,ya,22,17,"ng-template",null,0,X),i(),n(9,"content")(10,"div",9)(11,"div",10)(12,"table",11)(13,"thead",12)(14,"tr",13),_(15,ha,2,0,"th",14),n(16,"th",15),p(17,"Outlet"),i(),n(18,"th"),p(19,"Number"),i(),n(20,"th",15),p(21,"Customer"),i(),n(22,"th",16),p(23,"ORIGIN"),i(),n(24,"th"),p(25,"Order#"),i(),n(26,"th",17),p(27,"Date"),i(),n(28,"th",18),p(29,"Time"),i()()(),_(30,Ea,23,16,"tbody",19),i()(),n(31,"POS-complex-pagination",20),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),m("searchBoxPlaceholder",e.searchPlaceholderText),l(2),m("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),l(),m("ngIf",e.role.global.Export),l(2),m("ngIf",e.role.logistic.Create),l(10),m("ngIf",e.role.logistic.Delete),l(15),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Xi=class t extends ve{constructor(e,a,o,c,O){super(e,a,"OutboundLogistics/OutboundLogisticsList","OutboundLogisticsLoader/List",o);this.role=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Outbound Logistics",exportTypes:[{ID:"OutboundLogistics/OutboundLogisticsList",Value:"Default",FileName:"Outbound Logistics"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"OutboundLogistics/OutboundLogisticsListCount",pagination:!0}})}sortByOptions=[{Key:!1,Value:"Date"},{Key:!0,Value:"Created"}];httpPostListID(e,a,o){if(a||(a="Are you sure you want to selected record/s?"),confirm(a)==!1)return;let c=this.getSelectedData().filter(O=>O.WriteAccess);c.length>0&&this.postListID(e,c,o)}get searchPlaceholderText(){return"Number "+(this.pageData?.Options?.NumberFilterComparatorOptions?.find(e=>e.Key===this.pageData?.Filter?.NumberFilterComparator)?.Value||"Starts With")}validateForLookbackDays(){this.pageData.Filter.Number&&(this.pageData.Filter.From==T.MinDate||!this.pageData.Filter.From)&&this.pageData.AppConfig.DefaultLookbackDays>0&&(this.pageData.Filter.NumberFilterComparator===3||this.pageData.Filter.NumberFilterComparator===2)&&(this.pageData.Filter.From=this.pageData.Filter.SearchLookbackDate,this.pageData.AppConfig.QueryOptionRecompile&&(this.pageData.Filter.QueryOption=1))}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["CustomerDisplay-customer-delivery"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],["ONLY_VIEW",""],["SALESORDER",""],[3,"pageData","text","isFilterOnDropdown","filter","searchBoxPlaceholder","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","searchBoxPlaceholder"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Delivery",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","130px"],["matTooltip","The Outlet where the order is placed","matTooltipPosition","above",2,"width","130px"],[2,"width","90px"],[2,"width","50px"],[4,"ngFor","ngForOf"],["api","OutboundLogistics/OutboundLogisticsListCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Delivery",1,"btn","btn-success",3,"routerLink"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["matTooltip","The Outlet where the order is placed","matTooltipPosition","above"],["requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer","notFoundMessageFor","customer",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose an Comparator",3,"ngModelChange","ngModel","items","clearable"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose an Options",3,"ngModelChange","ngModel","items","clearable"],[2,"width","14px"],["type","checkbox",3,"change"],[4,"ngIf","ngIfElse"],["target","_blank",3,"routerLink","queryParams",4,"ngIf","ngIfElse"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"routerLink","queryParams","innerHtml"],["target","_blank",3,"routerLink","queryParams"]],template:function(a,o){a&1&&_(0,Oa,32,12,"mainpanel-cmp",3),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,yt,R,H,ne,se,We,Ke,Te,Ae,Ee,Se],encapsulation:2})};var Ma=()=>["/menu/Logistics/Archive/Inbound_Logistics/Form"],Pa=()=>["/menu/Logistics/Archive/Inbound_Logistics/Info"],wr=t=>({ID:t}),Fa=()=>["/menu/Orders/Orders/Supplier_Bill/Info"],Va=(t,r)=>({ID:t,Template:r});function Na(t,r){if(t&1){let e=D();q(0),n(1,"a",18),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("InboundLogistics/DeleteInboundLogistics"))}),f(2,"i",19),p(3," Delete"),i(),U()}}function La(t,r){if(t&1){let e=D();n(0,"button",20),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",21),p(2," Export"),i()}}function ka(t,r){t&1&&(n(0,"a",22),p(1," New"),i()),t&2&&m("routerLink",N(1,Ma))}function Ra(t,r){if(t&1){let e=D();n(0,"div",23)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Supplier"),i(),n(6,"autocompleteV2",25),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SupplierID,o)||(c.pageData.Filter.SupplierID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"datepicker",26),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(10,"h6"),p(11,"To"),i(),n(12,"datepicker",27),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),y("ngModel",e.pageData.Filter.SupplierID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To)}}function Aa(t,r){if(t&1){let e=D();n(0,"th",28)(1,"input",29),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function Ba(t,r){if(t&1){let e=D();n(0,"td",28)(1,"input",34),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.selected)}}function Wa(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,Ba,2,1,"td",12),n(3,"td"),p(4),i(),n(5,"td"),f(6,"a",30),i(),n(7,"td"),p(8),i(),n(9,"td"),f(10,"a",30),i(),n(11,"td"),p(12),v(13,"date"),i(),n(14,"td"),p(15),v(16,"date"),i(),n(17,"td",31)(18,"a",32),f(19,"i",33),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.role.logistic.Delete),l(2),b(e.EntityName),l(2),m("routerLink",N(18,Pa))("queryParams",M(19,wr,e.ID))("innerHtml",e.Number,W),l(2),b(e.Name),l(2),m("routerLink",N(21,Fa))("queryParams",M(22,wr,e.SupplierInvoiceID))("innerHtml",e.PONumber,W),l(2),b(P(13,12,e.Date,"dd MMM yyyy")),l(3),b(P(16,15,e.Time,"HH:mm")),l(3),m("queryParams",Re(24,Va,e.ID,e.PrintTemplateID))}}function Ha(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Na,4,0,"ng-container",3)(3,La,3,0,"button",4),n(4,"div",5),_(5,ka,2,2,"a",6),i()(),n(6,"filters"),_(7,Ra,13,8,"ng-template",null,0,X),i(),n(9,"content")(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11),_(15,Aa,2,0,"th",12),n(16,"th",13),p(17,"Outlet"),i(),n(18,"th",13),p(19,"Number"),i(),n(20,"th",14),p(21,"Supplier"),i(),n(22,"th",13),p(23,"PO Number"),i(),n(24,"th",13),p(25,"Date"),i(),n(26,"th",15),p(27,"Time"),i(),f(28,"th"),i()(),_(29,Wa,20,27,"tbody",16),i()(),n(30,"POS-complex-pagination",17),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),l(),m("ngIf",e.role.global.Export),l(2),m("ngIf",e.role.logistic.Create),l(10),m("ngIf",e.role.logistic.Delete),l(14),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Zi=class t extends ve{constructor(e,a,o,c,O,Q){super(e,a,"InboundLogistics/InboundLogisticsList","InboundLogisticsLoader/List",c);this.csvConverter=o;this.role=O;this.matDialog=Q}openExportModal(){this.matDialog.open(be,{data:{title:"Inbound Logistics",exportTypes:[{ID:"InboundLogistics/InboundLogisticsList",Value:"Default",FileName:"Inbound Logistics"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"InboundLogistics/InboundLogisticsRowsCount",pagination:!0}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["CustomerDisplay-supplier-delivery"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],[4,"ngIf"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"btn-group"],["class","btn btn-success","role","button","matTooltipPosition","above","matTooltip","Add Delivery",3,"routerLink",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","120px"],[2,"width","500px"],[2,"width","90px"],[4,"ngFor","ngForOf"],["api","InboundLogistics/InboundLogisticsRowsCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fas","fa-trash"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["role","button","matTooltipPosition","above","matTooltip","Add Delivery",1,"btn","btn-success",3,"routerLink"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID","notFoundMessageFor","supplier",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[2,"width","14px"],["type","checkbox",3,"change"],[3,"routerLink","queryParams","innerHtml"],[1,"text-end"],["routerLink","/print/InDelivery","target","_blank",3,"queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,Ha,31,11,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,yt,R,H,ne,se,We,Ke,Ae,Ee,Se],encapsulation:2})};var en=class t{constructor(r,e,a,o){this.data=r;this.dialogRef=e;this.httpService=a;this.toastr=o;this.modalConfig=new ye,this.modalConfig.title="Email receipt to customer?",this.modalConfig.customWidth="400px"}modalConfig;email;ngOnInit(){}onOk(){let r={email:this.email,invoiceID:this.data.invoiceID};this.httpService.post("/api/Transaction/SendDeliveryEmail",r).subscribe(e=>{this.toastr.success(`Invoice Sent Successful to ${this.email}`,Ce.Success),this.dialogRef.close()})}onClose(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C($e),C(xe),C(L),C(ee))};static \u0275cmp=w({type:t,selectors:[["POS-modal-send-email"]],standalone:!1,decls:7,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[1,"form-floating-outline"],["type","text","id","email","placeholder","Email",1,"form-control",3,"ngModelChange","ngModel"],["for","email"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.onClose()})("onClose",function(){return a.onClose()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"input",3),S("ngModelChange",function(c){return h(a.email,c)||(a.email=c),c}),i(),n(5,"label",4),p(6,"Email"),i()()()()()),e&2&&(m("config",a.modalConfig),l(4),y("ngModel",a.email))},dependencies:[he,fe,R,H],encapsulation:2})};var Er=()=>["/print/OutDelivery"],Qa=(t,r)=>({ID:t,Template:r}),qa=(t,r)=>({ID:t,Template:r,Price:1}),Ua=()=>["/menu/Orders/Order/Sales_Order/Info"],gi=t=>({ID:t}),za=()=>["/menu/Logistics/Archive/Outbound_Logistics/Form"],Ga=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],$a=()=>["/menu/Contacts/Contact/Customers/Info"];function Ka(t,r){if(t&1&&(n(0,"a",40),f(1,"i",41),p(2," Edit "),i()),t&2){let e=s(2);m("routerLink",N(2,za))("queryParams",M(3,gi,e.data.Fulfillment.ID))}}function Ja(t,r){if(t&1){let e=D();n(0,"a",42),g("click",function(){d(e);let o=s(2);return u(o.deleteData("OutboundLogistics/DeleteDeliveryCustomer"))}),f(1,"i",43),p(2," Delete "),i()}}function Ya(t,r){if(t&1){let e=D();n(0,"li",44)(1,"a",45),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),p(2,"Export"),i()()}}function Xa(t,r){if(t&1){let e=D();n(0,"li",44)(1,"a",45),g("click",function(){d(e);let o=s(2);return u(o.openModalNote(o.data.Fulfillment.Note))}),p(2," Add Note "),i()()}}function Za(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Invoice"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",25),p(7),i()()()),t&2){let e=s(2);l(6),m("routerLink",N(3,Ga))("queryParams",M(4,gi,e.data.Order.InvoiceId)),l(),I(" ",e.data.Order.InvoiceNumber," ")}}function el(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Date"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),v(7,"date"),i()()),t&2){let e=s(2);l(6),b(P(7,1,e.data.Order.InvoiceDate,"dd MMM yyyy"))}}function tl(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Customer==null?null:e.data.Customer.Mobile)}}function il(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",47),i()),t&2){let e=s(3);l(5),m("innerHTML",e.data.Customer==null?null:e.data.Customer.Address,W)}}function nl(t,r){if(t&1&&(n(0,"div",14)(1,"div",27)(2,"h2"),f(3,"i",46),p(4,"Customer"),i()(),n(5,"div",21)(6,"table",22)(7,"tr")(8,"th",23),p(9,"Name"),i(),n(10,"td"),p(11,":"),i(),n(12,"td")(13,"a",25),p(14),i()()(),_(15,tl,7,1,"tr",24)(16,il,6,1,"tr",24),i()()()),t&2){let e=s(2);l(13),m("routerLink",N(5,$a))("queryParams",M(6,gi,e.data.Customer==null?null:e.data.Customer.ID)),l(),b(e.data.Customer==null?null:e.data.Customer.Name),l(),m("ngIf",e.data.Customer==null?null:e.data.Customer.Mobile),l(),m("ngIf",e.data.Customer==null?null:e.data.Customer.Address)}}function ol(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Name"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Recipient.Name)}}function rl(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Recipient.Phone)}}function al(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",47),i()),t&2){let e=s(3);l(5),m("innerHTML",e.data.Recipient.Address,W)}}function ll(t,r){if(t&1&&(n(0,"tr")(1,"th",23),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Recipient.City)}}function pl(t,r){if(t&1&&(n(0,"div",14)(1,"div",27)(2,"h2"),f(3,"i",46),p(4,"Recipient"),i()(),n(5,"div",21)(6,"table",22),_(7,ol,7,1,"tr",24)(8,rl,7,1,"tr",24)(9,al,6,1,"tr",24)(10,ll,7,1,"tr",24),i()()()),t&2){let e=s(2);l(7),m("ngIf",e.data.Recipient.Name),l(),m("ngIf",e.data.Recipient.Phone),l(),m("ngIf",e.data.Recipient.Address),l(),m("ngIf",e.data.Recipient.City)}}function ml(t,r){if(t&1&&(q(0),f(1,"app-serial-note",51),U()),t&2){let e=s().$implicit;l(),m("serials",e.Serial)}}function cl(t,r){if(t&1&&f(0,"p",52),t&2){let e=s().$implicit;m("innerHTML",e.Note,W)}}function sl(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td")(4,"a",48),p(5),i(),n(6,"div"),p(7),i(),_(8,ml,2,1,"ng-container",24)(9,cl,1,1,"p",49),i(),n(10,"td",50),p(11),v(12,"quantityFraction"),n(13,"div"),p(14),i()()()),t&2){let e=r.$implicit,a=r.index;l(2),b(a+1+"."),l(2),m("queryParams",M(10,gi,e.VariantID)),l(),I(" ",e.Name," "),l(2),b(e.Code),l(),m("ngIf",e.Serial),l(),m("ngIf",e.Note!=null),l(2),I(" ",E(12,8,e.Quantity)," "),l(3),b(e.UOMName)}}function dl(t,r){if(t&1&&(n(0,"div",14)(1,"div",27)(2,"h2"),f(3,"i",53),p(4,"Note"),i()(),f(5,"div",54),i()),t&2){let e=s(2);l(5),m("innerHTML",e.data.Fulfillment.Note,W)}}function ul(t,r){if(t&1&&(n(0,"span")(1,"b"),p(2,"Modified:"),i(),p(3),v(4,"date"),i()),t&2){let e=s(3);l(3),Qe(" ",P(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function _l(t,r){if(t&1&&(n(0,"div",55),f(1,"i",56),n(2,"span")(3,"b"),p(4," Created:"),i(),p(5),v(6,"date"),i(),_(7,ul,5,5,"span",24),i()),t&2){let e=s(2);l(5),Qe(" ",P(6,3,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),l(2),m("ngIf",e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.Date)}}function fl(t,r){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),f(4,"i",4),p(5," Print "),i(),f(6,"button",5),n(7,"ul",6)(8,"li")(9,"a",7),p(10,"Print with Cost"),i()()()(),n(11,"div",8),_(12,Ka,3,5,"a",9)(13,Ja,3,0,"a",10),i()(),n(14,"content")(15,"div",11)(16,"div",12)(17,"div",13)(18,"div",14)(19,"div",15)(20,"div")(21,"h2"),f(22,"i",16),p(23,"Order "),n(24,"small",17),p(25),i()()(),n(26,"div",8)(27,"button",5),f(28,"b",18),i(),n(29,"ul",19),_(30,Ya,3,0,"li",20)(31,Xa,3,0,"li",20),i()()(),n(32,"div",21)(33,"table",22)(34,"tr")(35,"th",23),p(36,"Outlet"),i(),n(37,"td"),p(38,":"),i(),n(39,"td"),p(40),i()(),q(41),_(42,Za,8,6,"tr",24)(43,el,8,4,"tr",24),U(),n(44,"tr")(45,"th",23),p(46,"SO Number"),i(),n(47,"td"),p(48,":"),i(),n(49,"td")(50,"a",25),p(51),i()()(),n(52,"tr")(53,"th",23),p(54,"SO Date"),i(),n(55,"td"),p(56,":"),i(),n(57,"td"),p(58),v(59,"date"),i()()()()(),_(60,nl,17,8,"div",26)(61,pl,11,4,"div",26),n(62,"div",14)(63,"div",27)(64,"h2"),f(65,"i",28),p(66,"Fulfillment"),i()(),n(67,"div",21)(68,"table",22)(69,"tr")(70,"th",23),p(71,"Outlet"),i(),n(72,"td"),p(73,":"),i(),n(74,"td"),p(75),i()(),n(76,"tr")(77,"th",23),p(78,"Date"),i(),n(79,"td"),p(80,":"),i(),n(81,"td"),p(82),v(83,"date"),i()(),n(84,"tr")(85,"th",23),p(86,"Number"),i(),n(87,"td"),p(88,":"),i(),n(89,"td"),p(90),i()(),n(91,"tr")(92,"th",23),p(93,"Courier"),i(),n(94,"td"),p(95,":"),i(),n(96,"td"),p(97),i()()()()()(),n(98,"div",29)(99,"div",14)(100,"div",27)(101,"h2"),f(102,"i",30),p(103,"Products"),i()(),n(104,"div",21)(105,"table",31)(106,"thead",32)(107,"tr")(108,"th",33),p(109,"No."),i(),n(110,"th"),p(111,"Products"),i(),n(112,"th",23),p(113,"Qty"),i()()(),n(114,"tbody"),_(115,sl,15,12,"tr",34),i(),n(116,"tfoot",35)(117,"tr")(118,"td",36),p(119," Total "),i(),n(120,"td",37),p(121),v(122,"sum"),v(123,"quantityFraction"),i()()()()()(),_(124,dl,6,1,"div",26),i(),n(125,"div",38),_(126,_l,8,6,"div",39),i()()()()()),t&2){let e=s();m("pageData",e.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(3),m("routerLink",N(40,Er))("queryParams",Re(41,Qa,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(6),m("routerLink",N(44,Er))("queryParams",Re(45,qa,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(3),m("ngIf",e.role.logistic.Edit&&e.data.WriteAccess),l(),m("ngIf",e.role.logistic.Delete),l(12),I(" (",e.data.Fulfillment.Status,") "),l(5),m("ngIf",e.role.global.Export),l(),m("ngIf",e.data.Fulfillment.Note==null),l(9),b(e.data.Order.OutletName),l(2),m("ngIf",e.data.Order.InvoiceNumber),l(),m("ngIf",e.data.Order.InvoiceDate),l(7),m("routerLink",N(48,Ua))("queryParams",M(49,gi,e.data.Order.SalesOrderId)),l(),I(" ",e.data.Order.SalesOrderNumber," "),l(7),I(" ",P(59,29,e.data.Order.SalesOrderDate,"dd MMM yyyy")," "),l(2),m("ngIf",e.data.Customer==null?null:e.data.Customer.ID),l(),m("ngIf",(e.data.Recipient==null?null:e.data.Recipient.ID)!=e.guidEmpty),l(14),I(" ",e.data.Fulfillment.OutletName," "),l(7),I(" ",P(83,32,e.data.Fulfillment.Date,"dd MMM yyyy")," "),l(8),I(" ",e.data.Fulfillment.Number," "),l(7),I(" ",e.data.Fulfillment.Courier," "),l(18),m("ngForOf",e.data.Items),l(6),I(" ",E(123,38,P(122,35,e.data.Items,"Quantity"))," "),l(3),m("ngIf",e.data==null?null:e.data.Fulfillment.Note),l(2),m("ngIf",!e.role.users.LogRestriction)}}var tn=class t extends yr{constructor(e,a,o,c,O,Q,re,Ue){super(e,a,"OutboundLogistics/Info",c);this.httpService=a;this.csvConverter=o;this.toaster=O;this.router=Q;this.role=re;this.matDialog=Ue}guidEmpty=T.GuidEmpty;openExportModal(){this.matDialog.open(be,{data:{title:"Outbound Logistics",exportTypes:[{ID:"OutboundLogistics/ExportInfo",Value:"Default"}],filterExport:{},getAllDataLengthAPI:"",pagination:!1}})}postBindData(e){e.Items=e.Items.filter(a=>a.Quantity!=0),this.menuData.H=`Outbound Logistics #${e.Fulfillment.Number}`}deleteData(e){confirm("Are you sure you want to delete this?")&&this.httpService.delete(`/API/${e}`,{params:[{key:"ID",value:this.data.Fulfillment.ID}]}).subscribe(()=>{this.toaster.success("Records are removed.","Success"),this.router.navigate(["/menu/Logistics/Archive/Outbound_Logistics"])})}openEmailDialog(){this.matDialog.open(en,{data:{invoiceID:this.data.ID}})}exportCSV(e,a,o){o=o||"export.csv",this.httpService.post(`/api/${a}`,this.data.Fulfillment).subscribe(c=>{e.convertToCSV(c,o)})}onUpdate(e,a){this.httpService.post(`/api/${e}`,a).subscribe(o=>{this.reload()})}reload(){let e="OutboundLogistics/Info",a={ID:this.data.Fulfillment.ID};this.httpService.post(`/api/${e}`,a).subscribe({next:o=>{this.data=o}})}openModalNote(e){this.matDialog.open(Sr,{data:e.SONote}).afterClosed().subscribe(o=>{if(e){var c={ID:this.data.Fulfillment.ID,Note:o};this.onUpdate("OutboundLogistics/UpdateNoteOutboundLogistics",c)}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(pe),C(ee),C(nt),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-customer-delivery-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"btn-group","me-5"],["target","_blank",1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],["target","_blank",1,"dropdown-item",3,"routerLink","queryParams"],[1,"btn-group"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-body-secondary","h6"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],["class","dropdown-item",4,"ngIf"],[1,"card-body"],[1,"table-sm","table-borderless"],[2,"width","80px"],[4,"ngIf"],["target","_blank",1,"ps-0",3,"routerLink","queryParams"],["class","card",4,"ngIf"],[1,"card-header"],[1,"fa-solid","fa-truck","me-5"],[1,"col-8"],[1,"fa-solid","fa-box","me-5"],[1,"table"],[1,"thead-light"],[2,"width","40px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end","empty-column","fw-bold"],[1,"text-center","empty-column","fw-bold"],[1,"col-12"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash"],[1,"dropdown-item"],[3,"click"],[1,"fa-solid","fa-address-card","me-5"],[3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],["class","special-TinyMCE fst-italic text-warning mb-0","style","word-break: break-all",3,"innerHTML",4,"ngIf"],[1,"text-center"],[3,"serials"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body",3,"innerHTML"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(a,o){a&1&&_(0,fl,127,51,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,ne,ct,Se,Be,Ai],encapsulation:2})};var Or=t=>({ID:t}),gl=()=>["/menu/Outlets/Master/Outlets/Form"];function Cl(t,r){if(t&1){let e=D();n(0,"button",18),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",19),p(2," Export"),i()}}function vl(t,r){if(t&1){let e=D();n(0,"div",20)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",22),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",23),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(10,"h6"),p(11,"Supplier"),i(),n(12,"autocompleteV2",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SupplierID,o)||(c.pageData.Filter.SupplierID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.SupplierID)}}function xl(t,r){t&1&&(n(0,"th"),p(1,"Outlet"),i())}function yl(t,r){t&1&&(n(0,"th",25),p(1,"Total"),i())}function hl(t,r){if(t&1&&(n(0,"td")(1,"a",29),p(2),i()()),t&2){let e=s().$implicit;l(),m("routerLink",N(3,gl))("queryParams",M(4,Or,e.EntityID)),l(),b(e.EntityName)}}function Sl(t,r){if(t&1&&(n(0,"td",27),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.Total))}}function bl(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td")(4,"a",26),p(5),i()(),_(6,hl,3,6,"td",9),n(7,"td",27),p(8),v(9,"number"),i(),_(10,Sl,3,3,"td",28),i()),t&2){let e=r.$implicit,a=s(2);l(2),b(e.VariantCode),l(2),m("queryParams",M(8,Or,e.VariantID)),l(),b(e.VariantName),l(),m("ngIf",!a.data.isOutlet),l(2),b(E(9,6,e.Quantity)),l(2),m("ngIf",a.roleService.sell.Create)}}function Dl(t,r){t&1&&f(0,"td",30)}function Il(t,r){if(t&1&&(n(0,"td",16),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s(2);l(),I(" ",E(3,4,P(2,1,e.data.Data,"Total")),"")}}function Tl(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Cl,3,0,"button",3),i(),n(3,"filters"),_(4,vl,13,8,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Code"),i(),n(14,"th"),p(15,"Variant"),i(),_(16,xl,2,0,"th",9),n(17,"th",10),p(18,"Qty"),i(),_(19,yl,2,0,"th",11),i()(),n(20,"tbody"),_(21,bl,11,10,"tr",12),i(),n(22,"tfoot")(23,"tr",13),_(24,Dl,1,0,"td",14),n(25,"td",15),p(26,"Total :"),i(),n(27,"td",16),p(28),v(29,"sum"),v(30,"number"),i(),_(31,Il,4,6,"td",17),i()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(14),m("ngIf",!e.data.isOutlet),l(3),m("ngIf",e.roleService.sell.Create),l(2),m("ngForOf",e.data.Data),l(3),m("ngIf",!e.data.isOutlet),l(4),I("",E(30,14,P(29,11,e.data.Data,"Quantity"))," "),l(3),m("ngIf",e.roleService.sell.Create)}}var nn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"OutboundLogistics/GetOutStockReportProduct","OutboundLogisticsLoader/GetOutStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Out Stock Report By Product",exportTypes:[{ID:"OutboundLogistics/GetOutStockReportProduct",Value:"Default",FileName:"Out Stock Report By Product"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(){this.menuData.H=this.data.PageTitle}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-outgoing-product"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[4,"ngIf"],[1,"text-end",2,"width","200px"],["style","width:150px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","text-end empty-column",4,"ngIf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end",2,"background","#F0E68C"],["class","text-end","style","background: #F0E68C;",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],[1,"text-end",2,"width","150px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end","empty-column"]],template:function(a,o){a&1&&_(0,Tl,32,16,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,We,Ee,_e,Be],encapsulation:2})};var wl=()=>["/menu/Logistics/Archive/Outbound_Logistics/Info"],Zn=t=>({ID:t}),El=()=>["/menu/Contacts/Contact/Customers/Info"];function Ol(t,r){if(t&1){let e=D();n(0,"button",15),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",16),p(2," Export"),i()}}function Ml(t,r){if(t&1){let e=D();n(0,"div",17)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",18),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",20),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To)}}function Pl(t,r){t&1&&(n(0,"th",21),p(1,"Price"),i())}function Fl(t,r){t&1&&(n(0,"th",21),p(1,"Total"),i())}function Vl(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(P(2,1,e.Price,"1.0-2"))}}function Nl(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(P(2,1,e.Total,"1.0-2"))}}function Ll(t,r){if(t&1&&(n(0,"tr")(1,"td",33)(2,"a",34),p(3),i()(),n(4,"td",35),p(5),i(),n(6,"td",36),p(7),v(8,"number"),i(),_(9,Vl,3,4,"td",37)(10,Nl,3,4,"td",37),i()),t&2){let e=r.$implicit,a=s(3);l(2),m("queryParams",M(9,Zn,e.VariantID)),l(),b(e.VariantName),l(2),I(" ",e.VariantCode,""),l(2),I(" ",P(8,6,e.Quantity,"1.0-2"),""),l(2),m("ngIf",a.roleService.sell.PriceVisible),l(),m("ngIf",a.roleService.sell.PriceVisible)}}function kl(t,r){t&1&&(n(0,"th",39),p(1,"Amount : "),i())}function Rl(t,r){if(t&1&&(n(0,"th",39),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s().$implicit;l(),b(P(3,4,P(2,1,e.Variant,"Total"),"1.0-2"))}}function Al(t,r){if(t&1&&(n(0,"div",22)(1,"div")(2,"a",23)(3,"span",24),p(4),i()(),n(5,"span"),p(6),v(7,"date"),i(),n(8,"span"),p(9),i(),n(10,"a",25),p(11),i()(),n(12,"table",26),f(13,"thead"),n(14,"tbody",27),_(15,Ll,11,11,"tr",28),i()(),n(16,"table",26),f(17,"thead"),n(18,"tbody",29)(19,"tr"),f(20,"th",30),n(21,"th",31),p(22,"Total Qty : "),i(),n(23,"th",10),p(24),v(25,"sum"),v(26,"number"),i(),_(27,kl,2,0,"th",32)(28,Rl,4,7,"th",32),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink",N(20,wl))("queryParams",M(21,Zn,e.OrderDeliveryID)),l(2),b(e.OutletName+" #"+e.Number),l(2),I(" "," - "+P(7,12,e.Date,"dd MMM yyyy")," "),l(3),I(" "," - "," "),l(),m("routerLink",N(23,El))("queryParams",M(24,Zn,e.CustomerID)),l(),b(e.CustomerName),l(4),m("ngForOf",e.Variant),l(9),b(E(26,18,P(25,15,e.Variant,"Quantity"))),l(3),m("ngIf",a.roleService.sell.PriceVisible),l(),m("ngIf",a.roleService.sell.PriceVisible)}}function Bl(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Ol,3,0,"button",3),i(),n(3,"filters"),_(4,Ml,10,7,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),n(16,"th",10),p(17,"Qty"),i(),_(18,Pl,2,0,"th",11)(19,Fl,2,0,"th",11),i()(),n(20,"tbody")(21,"tr")(22,"td",12),_(23,Al,29,26,"div",13),i()()()()(),n(24,"POS-complex-pagination",14),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(16),m("ngIf",e.roleService.sell.PriceVisible),l(),m("ngIf",e.roleService.sell.PriceVisible),l(4),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var on=class t extends ve{constructor(e,a,o,c,O){super(e,a,"OutboundLogistics/GetOutStockReportDetail","OutboundLogisticsLoader/GetOutStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Report Outgoing Detail",exportTypes:[{ID:"OutboundLogistics/GetOutStockReportDetail",Value:"Default",FileName:"Report Outgoing Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"OutboundLogistics/GetOutStockReportDetailCount",pagination:!0}})}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-outgoing-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","400px"],[2,"width","150px"],[1,"text-end",2,"width","30px"],["class","text-end","style","width: 150px",4,"ngIf"],["colspan","5",1,"px-0","border-bottom-0"],["class","mb-5",4,"ngFor","ngForOf"],["api","OutboundLogistics/GetOutStockReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"text-end",2,"width","150px"],[1,"mb-5"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4"],[3,"routerLink","queryParams"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[4,"ngFor","ngForOf"],[1,"table","table-sm"],[2,"width","645px"],[1,"text-end",2,"width","75px"],["style","width: 90px","class","text-end",4,"ngIf"],[1,"border-start","border-end",2,"width","400px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","150px"],[1,"text-end","border-start","border-end",2,"width","30px"],["class","text-end border-start border-end","style","width: 150px",4,"ngIf"],[1,"text-end","border-start","border-end",2,"width","150px"],[1,"text-end",2,"width","90px"]],template:function(a,o){a&1&&_(0,Bl,25,10,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Ke,Ee,_e,Se,Be],encapsulation:2})};var Mr=t=>({ID:t}),Wl=()=>["/menu/Outlets/Master/Outlets/Form"];function Hl(t,r){if(t&1){let e=D();n(0,"button",18),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",19),p(2," Export"),i()}}function jl(t,r){if(t&1){let e=D();n(0,"div",20)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",22),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",23),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2)("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),y("ngModel",e.pageData.Filter.EntityID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To)}}function Ql(t,r){t&1&&(n(0,"th"),p(1,"Outlet"),i())}function ql(t,r){t&1&&(n(0,"th",10),p(1,"Total"),i())}function Ul(t,r){if(t&1&&(n(0,"td")(1,"a",27),p(2),i()()),t&2){let e=s().$implicit;l(),m("routerLink",N(3,Wl))("queryParams",M(4,Mr,e.EntityID)),l(),b(e.EntityName)}}function zl(t,r){if(t&1&&(n(0,"td",25),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.Total))}}function Gl(t,r){if(t&1&&(n(0,"tr")(1,"td")(2,"a",24),p(3),i()(),n(4,"td"),p(5),i(),_(6,Ul,3,6,"td",9),n(7,"td",25),p(8),v(9,"number"),i(),_(10,zl,3,3,"td",26),i()),t&2){let e=r.$implicit,a=s(2);l(2),m("queryParams",M(8,Mr,e.VariantID)),l(),b(e.VariantCode),l(2),b(e.VariantName),l(),m("ngIf",!a.data.isOutlet),l(2),b(E(9,6,e.Quantity)),l(2),m("ngIf",a.roleService.product.Cost)}}function $l(t,r){t&1&&f(0,"td",28)}function Kl(t,r){if(t&1&&(n(0,"td",16),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s(2);l(),I(" ",E(3,4,P(2,1,e.data.List,"Total")),"")}}function Jl(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Hl,3,0,"button",3),i(),n(3,"filters"),_(4,jl,10,7,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Code"),i(),n(14,"th"),p(15,"Variant"),i(),_(16,Ql,2,0,"th",9),n(17,"th",10),p(18,"Qty"),i(),_(19,ql,2,0,"th",11),i()(),n(20,"tbody"),_(21,Gl,11,10,"tr",12),i(),n(22,"tfoot")(23,"tr",13),_(24,$l,1,0,"td",14),n(25,"td",15),p(26,"Total :"),i(),n(27,"td",16),p(28),v(29,"sum"),v(30,"number"),i(),_(31,Kl,4,6,"td",17),i()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(14),m("ngIf",!e.data.isOutlet),l(3),m("ngIf",e.roleService.product.Cost),l(2),m("ngForOf",e.data.List),l(3),m("ngIf",!e.data.isOutlet),l(4),I("",E(30,14,P(29,11,e.data.List,"Quantity"))," "),l(3),m("ngIf",e.roleService.product.Cost)}}var rn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"InboundLogistics/GetInStockReportProduct","InboundLogisticsLoader/GetInStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Product Stock In Report",exportTypes:[{ID:"InboundLogistics/GetInStockReportProduct",Value:"Default",FileName:"Product Stock In Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}postInit(){this.menuData.H=this.data.PageTitle}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-incoming-product"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","80px"],[4,"ngIf"],[1,"text-end",2,"width","50px"],["style","width:50px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],["class","text-end empty-column",4,"ngIf"],["colspan","2",1,"text-end","empty-column"],[1,"text-end",2,"background","#F0E68C"],["class","text-end","style","background: #F0E68C;",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","outlets","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"text-end"],["class","text-end",4,"ngIf"],[3,"routerLink","queryParams"],[1,"text-end","empty-column"]],template:function(a,o){a&1&&_(0,Jl,32,16,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Ee,_e,Be],encapsulation:2})};var Yl=()=>["/menu/Logistics/Archive/Inbound_Logistics/Info"],eo=t=>({ID:t});function Xl(t,r){if(t&1){let e=D();n(0,"button",15),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",16),p(2," Export"),i()}}function Zl(t,r){if(t&1){let e=D();n(0,"div",17)(1,"h6"),p(2,"Outlet"),i(),n(3,"outlet-selector",18),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"From"),i(),n(6,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(7,"h6"),p(8,"To"),i(),n(9,"datepicker",20),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(10,"h6"),p(11,"Supplier"),i(),n(12,"autocompleteV2",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SupplierID,o)||(c.pageData.Filter.SupplierID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2)("outlets",e.pageData.Options==null?null:e.pageData.Options.Entities),y("ngModel",e.pageData.Filter.EntityID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.SupplierID)}}function ep(t,r){t&1&&(n(0,"th",22),p(1,"Cost"),i())}function tp(t,r){t&1&&(n(0,"th",22),p(1,"Total"),i())}function ip(t,r){if(t&1&&(n(0,"span"),p(1," - "),n(2,"span")(3,"a",32),p(4),i()()()),t&2){let e=s().$implicit;l(3),m("queryParams",M(2,eo,e.SupplierID)),l(),I(" ",e.SupplierName," ")}}function np(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I("",P(2,1,e.UnitCost,"1.0-2")," ")}}function op(t,r){if(t&1&&(n(0,"td",38),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I("",P(2,1,e.Total,"1.0-2")," ")}}function rp(t,r){if(t&1&&(n(0,"tr")(1,"td",33)(2,"a",34),p(3),i()(),n(4,"td",35),p(5),i(),n(6,"td",36),p(7),i(),_(8,np,3,4,"td",37)(9,op,3,4,"td",37),i()),t&2){let e=r.$implicit,a=s(3);l(2),m("queryParams",M(6,eo,e.VariantID)),l(),b(e.VariantName),l(2),I(" ",e.VariantCode,""),l(2),I(" ",e.Quantity,""),l(),m("ngIf",a.roleService.product.Cost),l(),m("ngIf",a.roleService.product.Cost)}}function ap(t,r){t&1&&(n(0,"th",22),p(1,"Amount : "),i())}function lp(t,r){if(t&1&&(n(0,"th",22),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s().$implicit;l(),b(P(3,4,P(2,1,e.Variant,"Total"),"1.0-2"))}}function pp(t,r){if(t&1&&(n(0,"div",23)(1,"div")(2,"a",24)(3,"span",25),p(4),i()(),n(5,"span"),p(6),v(7,"date"),i(),n(8,"span"),p(9),v(10,"date"),i(),_(11,ip,5,4,"span",26),i(),n(12,"table",27),f(13,"thead"),n(14,"tbody",28),_(15,rp,10,8,"tr",29),i()(),n(16,"table",27),f(17,"thead"),n(18,"tbody",30)(19,"tr"),f(20,"th",8),n(21,"th",9),p(22,"Total Qty : "),i(),n(23,"th",10),p(24),v(25,"sum"),v(26,"number"),i(),_(27,ap,2,0,"th",31)(28,lp,4,7,"th",31),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink",N(21,Yl))("queryParams",M(22,eo,e.InDeliveryID)),l(2),b(e.OutletName+" #"+e.InDeliveryNumber),l(2),I(" "," - In Date: "+P(7,10,e.InDeliveryDate,"dd MMM yyyy")," "),l(3),I(" "," - PO Date: "+P(10,13,e.PODate,"dd MMM yyyy")," "),l(2),m("ngIf",e.SupplierName),l(4),m("ngForOf",e.Variant),l(9),b(E(26,19,P(25,16,e.Variant,"Quantity"))),l(3),m("ngIf",a.roleService.product.Cost),l(),m("ngIf",a.roleService.product.Cost)}}function mp(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,Xl,3,0,"button",3),i(),n(3,"filters"),_(4,Zl,13,8,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),n(16,"th",10),p(17,"Qty"),i(),_(18,ep,2,0,"th",11)(19,tp,2,0,"th",11),i()(),n(20,"tbody")(21,"tr")(22,"td",12),_(23,pp,29,24,"div",13),i()()()()(),n(24,"POS-complex-pagination",14),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(16),m("ngIf",e.roleService.product.Cost),l(),m("ngIf",e.roleService.product.Cost),l(4),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var an=class t extends ve{constructor(e,a,o,c,O){super(e,a,"InboundLogistics/GetInStockReportDetail","InboundLogisticsLoader/GetInStockReporProduct");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Stock In Report",exportTypes:[{ID:"InboundLogistics/GetInStockReportDetail",Value:"Default",FileName:"Stock In Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"InboundLogistics/GetInStockReportDetailCount",pagination:!0}})}sortByOptions=[{Key:!1,Value:"Code"},{Key:!0,Value:"Name"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-incoming-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","645px"],[1,"text-end",2,"width","75px"],[1,"text-end",2,"width","30px"],["class","text-end","style","width: 90px",4,"ngIf"],["colspan","5",1,"px-0","border-bottom-0"],["class","mb-5",4,"ngFor","ngForOf"],["api","InboundLogistics/GetInStockReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","outlets","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier","inputID","SupplierID",1,"form-control","ac-filter",3,"ngModelChange","ngModel"],[1,"text-end",2,"width","90px"],[1,"mb-5"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4"],[4,"ngIf"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[4,"ngFor","ngForOf"],[1,"table","table-sm","table-borderless"],["style","width: 90px","class","text-end",4,"ngIf"],["routerLink","/menu/Contacts/Contact/Suppliers/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","645px"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start","border-end",2,"width","75px"],[1,"text-end","border-start","border-end",2,"width","30px"],["class","text-end border-start border-end","style","width: 90px",4,"ngIf"],[1,"text-end","border-start","border-end",2,"width","90px"]],template:function(a,o){a&1&&_(0,mp,25,10,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,We,Ke,Ee,_e,Se,Be],encapsulation:2})};var sp=t=>({ID:t});function dp(t,r){if(t&1){let e=D();n(0,"button",13),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",14),p(2," Export "),i()}}function up(t,r){if(t&1){let e=D();n(0,"div",15)(1,"h6"),p(2,"Courier"),i(),n(3,"ng-select",16),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CourierID,o)||(c.pageData.Filter.CourierID=o),u(o)}),i(),n(4,"h6"),p(5,"Category"),i(),n(6,"POS-product-category-select",17),S("selectedCategoryIDChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CategoryID,o)||(c.pageData.Filter.CategoryID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"datepicker",18),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),g("dateChange",function(){d(e);let o=s(2);return u(o.getListData())}),i(),n(10,"h6"),p(11,"To"),i(),n(12,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),g("dateChange",function(){d(e);let o=s(2);return u(o.getListData())}),i(),n(13,"h6"),p(14,"Scope"),i(),n(15,"radio-options",20),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.Product,o)||(c.pageData.Filter.Product=o),u(o)}),g("modelChange",function(){d(e);let o=s(2);return u(o.getListData())}),i(),n(16,"h6"),p(17,"Product"),i(),n(18,"autocompleteV2",21),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.ProductID,o)||(c.pageData.Filter.ProductID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Courier),y("ngModel",e.pageData.Filter.CourierID),l(3),y("selectedCategoryID",e.pageData.Filter.CategoryID),m("showClear",!0),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),m("options",e.scopeOptions),y("model",e.pageData.Filter.Product),l(3),y("ngModel",e.pageData.Filter.ProductID),m("inputTextValue",e.pageData.Filter.Name)}}function _p(t,r){if(t&1&&(n(0,"th",11),p(1),i()),t&2){let e=r.$implicit;l(),I(" ",e," ")}}function fp(t,r){if(t&1&&(n(0,"td",11),p(1),i()),t&2){let e=r.$implicit;l(),I(" ",e," ")}}function gp(t,r){if(t&1&&(n(0,"tr")(1,"td")(2,"a",22),p(3),i()(),n(4,"td",23),p(5),i(),_(6,fp,2,1,"td",10),n(7,"td",11),p(8),i()()),t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink","/menu/Products/Catalog/"+(a.pageData.Filter.Product?"Products":"Variants")+"/Info")("queryParams",M(6,sp,e.ID)),l(),I(" ",e.Name," "),l(2),b(e.Code),l(),m("ngForOf",e.Quantities),l(2),b(e.Total)}}function Cp(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,dp,3,0,"button",3),i(),n(3,"filters"),_(4,up,19,12,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),_(16,_p,2,1,"th",10),n(17,"th",11),p(18,"Total"),i()()(),n(19,"tbody"),_(20,gp,9,8,"tr",12),i()()()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(14),m("ngForOf",e.data.Outlet),l(4),m("ngForOf",e.data.Data)}}var ln=class t extends ve{constructor(e,a,o,c,O,Q){super(e,a,"TransferOrder/DeliveryOutletByProduct","TransferOrderLoader/DeliveryOutletByProduct",null,O);this.csvConverter=o;this.roleService=c;this.matDialog=Q}openExportModal(){this.matDialog.open(be,{data:{title:"In Stock Report By Product",exportTypes:[{ID:"TransferOrder/DeliveryOutletByProduct",Value:"Default",FileName:"In Stock Report By Product"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}scopeOptions=[{Key:!1,Value:"Variant"},{Key:!0,Value:"Product"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(pe),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-transfer-product"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","hideSearchBox","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","25%"],[2,"width","10%","text-align","right"],["class","text-end",4,"ngFor","ngForOf"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose...",3,"ngModelChange","items","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["name","scopeOptions",3,"modelChange","options","model"],["requestUrl","/API/AC/GetProductSuggestionByCodeNName","placeholder","Product","inputID","ProductID",1,"form-control","ac-filter",3,"ngModelChange","ngModel","inputTextValue"],[3,"routerLink","queryParams"],[2,"text-align","right"]],template:function(a,o){a&1&&_(0,Cp,21,8,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Rt,We,Te,oi],encapsulation:2})};var vp=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],Pr=t=>({ID:t}),xp=t=>({"bg-warning":t});function yp(t,r){if(t&1){let e=D();n(0,"button",16),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",17),p(2," Export "),i()}}function hp(t,r){if(t&1){let e=D();n(0,"div",18)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",19),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",20),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DestinationID,o)||(c.pageData.Filter.DestinationID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"datepicker",21),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(10,"h6"),p(11,"To"),i(),n(12,"datepicker",22),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(13,"h6"),p(14,"Category"),i(),n(15,"POS-product-category-select",23),S("selectedCategoryIDChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CategoryID,o)||(c.pageData.Filter.CategoryID=o),u(o)}),i(),n(16,"h6"),p(17,"Type"),i(),n(18,"ng-select",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.TypeID,o)||(c.pageData.Filter.TypeID=o),u(o)}),i(),n(19,"h6"),p(20,"Delivery"),i(),n(21,"ng-select",25),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DeliveryID,o)||(c.pageData.Filter.DeliveryID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",4),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",4),y("ngModel",e.pageData.Filter.DestinationID),m("multiple",!1),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("selectedCategoryID",e.pageData.Filter.CategoryID),m("showClear",!0),l(3),m("items",e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),l(3),m("items",e.pageData.Options.Deliveries),y("ngModel",e.pageData.Filter.DeliveryID)}}function Sp(t,r){t&1&&(n(0,"th",26),p(1," Total Price "),i())}function bp(t,r){t&1&&(n(0,"th",26),p(1," Total Cost "),i())}function Dp(t,r){t&1&&f(0,"i",37)}function Ip(t,r){if(t&1&&(f(0,"td",43),v(1,"number")),t&2){let e=s().$implicit;m("innerHTML",E(1,1,e.UnitPrice),W)}}function Tp(t,r){if(t&1&&(f(0,"td",43),v(1,"number")),t&2){let e=s().$implicit;m("innerHTML",E(1,1,e.UnitCost),W)}}function wp(t,r){if(t&1&&(n(0,"tr")(1,"td",8)(2,"a",38),p(3),i()(),f(4,"td",39)(5,"td",40)(6,"td",41),v(7,"number"),f(8,"td",41),v(9,"number"),_(10,Ip,2,3,"td",42)(11,Tp,2,3,"td",42),i()),t&2){let e=r.$implicit,a=s().$implicit,o=s(2);ft(M(14,xp,e.QtyRequested!=e.Quantity)),l(2),m("queryParams",M(16,Pr,e.VariantID)),l(),I(" ",e.VariantName," "),l(),m("innerHTML",e.Code,W),l(),m("innerHTML",a.StateLabel,W),l(),m("innerHTML",E(7,10,e.QtyRequested),W),l(2),m("innerHTML",E(9,12,e.Quantity),W),l(2),m("ngIf",o.roleService.sell.PriceVisible),l(),m("ngIf",o.roleService.product.Cost)}}function Ep(t,r){if(t&1&&(n(0,"div",27)(1,"div",28)(2,"div",29)(3,"a",30),f(4,"span",31),v(5,"date"),i()()(),n(6,"div",32)(7,"span"),p(8),i(),f(9,"br"),_(10,Dp,1,0,"i",33),f(11,"span",34),i(),n(12,"div",5)(13,"table",35)(14,"tbody"),_(15,wp,12,18,"tr",36),i()()()()),t&2){let e=r.$implicit;l(3),m("routerLink",N(12,vp))("queryParams",M(13,Pr,e.ID)),l(),m("innerHTML","# "+e.Number+" - "+P(5,9,e.Date,"dd MMM yyyy"),W),l(4),xo("",e.Source," > ",e.Destination," - ",e.TypeName,""),l(2),m("ngIf",e.Note),l(),m("innerHTML",e.Note,W),l(4),m("ngForOf",e.Items)}}function Op(t,r){if(t&1&&(n(0,"div")(1,"strong"),p(2,"Total Unit Price :"),i(),f(3,"span",46),v(4,"GetChildrenArray"),v(5,"sum"),v(6,"number"),i()),t&2){let e=s(3);l(3),m("innerHTML",P(6,7,P(5,4,P(4,1,e.data.Data,"Items"),"UnitPrice"),"1.0-2"),W)}}function Mp(t,r){if(t&1&&(n(0,"div")(1,"strong"),p(2,"Total Unit Cost :"),i(),f(3,"span",46),v(4,"GetChildrenArray"),v(5,"sum"),v(6,"number"),i()),t&2){let e=s(3);l(3),m("innerHTML",P(6,7,P(5,4,P(4,1,e.data.Data,"Items"),"UnitCost"),"1.0-2"),W)}}function Pp(t,r){if(t&1&&(n(0,"div",44)(1,"div",45)(2,"div")(3,"strong"),p(4,"Total Quantity"),i(),f(5,"span",46),v(6,"GetChildrenArray"),v(7,"sum"),v(8,"number"),i(),_(9,Op,7,10,"div",47)(10,Mp,7,10,"div",47),i()()),t&2){let e=s(2);l(5),m("innerHTML",E(8,9,P(7,6,P(6,3,e.data.Data,"Items"),"Quantity")),W),l(4),m("ngIf",e.roleService.sell.PriceVisible),l(),m("ngIf",e.roleService.product.Cost)}}function Fp(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,yp,3,0,"button",3),i(),n(3,"filters"),_(4,hp,22,16,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),p(13,"Name"),i(),n(14,"th",9),p(15,"Code"),i(),n(16,"th",10),p(17,"Delivery"),i(),n(18,"th",11),p(19,"Qty Req"),i(),n(20,"th",11),p(21,"Qty Sent"),i(),_(22,Sp,2,0,"th",12)(23,bp,2,0,"th",12),i()()()(),_(24,Ep,16,15,"div",13)(25,Pp,11,11,"div",14),n(26,"POS-complex-pagination",15),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(20),m("ngIf",e.roleService.sell.PriceVisible),l(),m("ngIf",e.roleService.product.Cost),l(),m("ngForOf",e.data.Data),l(),m("ngIf",e.data.Data.length>0),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var pn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"TransferOrder/GetReport","TransferOrderLoader/TransferOutletDeliveryReport");this.csvConverter=o;this.roleService=c;this.matDialog=O}openExportModal(){this.matDialog.open(be,{data:{title:"Transfer Order Report",exportTypes:[{ID:"TransferOrder/GetReport",Value:"Default",FileName:"Transfer Order Report"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/GetReportCount",pagination:!0}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-report-transfer-detail"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid","float-thead","{ top: 60, autoReflow: true }",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"text-start",2,"width","700px"],[2,"width","115px"],[1,"text-end",2,"width","75px"],[1,"text-end",2,"width","50px"],["class","text-end","style","width: 90px",4,"ngIf"],["class","mt-7 ms-5",4,"ngFor","ngForOf"],["class","mt-6",4,"ngIf"],["api","TransferOrder/GetReportCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Choose an Outlet",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Choose destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose type",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Value","bindValue","Key","placeholder","Choose",3,"ngModelChange","items","ngModel"],[1,"text-end",2,"width","90px"],[1,"mt-7","ms-5"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",3,"innerHTML"],[1,"mt-4"],["class","fa-solid fa-note-sticky me-3",4,"ngIf"],[1,"fst-italic",3,"innerHTML"],[1,"table","table-striped","table-bordered"],[3,"class",4,"ngFor","ngForOf"],[1,"fa-solid","fa-note-sticky","me-3"],["routerLink","/menu/Products/Catalog/Variants/Info",3,"queryParams"],[1,"border-start",2,"width","115px",3,"innerHTML"],[1,"text-end","border-start",2,"width","75px",3,"innerHTML"],[1,"text-end","border-start",2,"width","50px",3,"innerHTML"],["class","text-end border-start","style","width: 90px",3,"innerHTML",4,"ngIf"],[1,"text-end","border-start",2,"width","90px",3,"innerHTML"],[1,"mt-6"],[1,"zebra","d-flex","justify-content-end"],[1,"text-end",3,"innerHTML"],[4,"ngIf"]],template:function(a,o){a&1&&_(0,Fp,27,11,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,Ke,Te,oi,Ee,_e,Se,Be,Qo],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:15px!important}"]})};function Vp(t,r){if(t&1){let e=D();n(0,"div",2)(1,"div",6)(2,"datepicker",7),S("dateChange",function(o){d(e);let c=s();return h(c.date,o)||(c.date=o),u(o)}),i()(),n(3,"div",8)(4,"p-datepicker",9),S("ngModelChange",function(o){d(e);let c=s();return h(c.time,o)||(c.time=o),u(o)}),i()()()}if(t&2){let e=s();l(2),y("date",e.date),l(2),y("ngModel",e.time),m("timeOnly",!0)}}var Ci=class t{constructor(r){this.dialogRef=r;let e=this.data?.title||"Receive Delivery";this.type.update(a=>this.data?.type||a),this.config=new ye,this.config.title=e,this.config.customWidth="450px"}data=x($e);role=x(ie);type=_t("RECEIVE");config;date=new Date;time=new Date;note="";onOk(r){if(r=="Enter")return;this.date&&(this.date=new Date(this.date),this.date.setHours(this.time.getHours(),this.time.getMinutes(),this.time.getSeconds()));let e={Date:this.date,Note:this.note};this.dialogRef.close(e)}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-modal-receive"]],decls:7,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[1,"row","mb-8"],[1,"row"],[1,"col"],["height","200px",3,"ngModelChange","ngModel"],[1,"col","pe-1"],["appearance","outline",3,"dateChange","date"],[1,"col","ps-1"],[3,"ngModelChange","ngModel","timeOnly"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(c){return a.onOk(c)})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),n(1,"content")(2,"div",1),_(3,Vp,5,3,"div",2),n(4,"div",3)(5,"div",4)(6,"POS-tinymce-editor",5),S("ngModelChange",function(c){return h(a.note,c)||(a.note=c),c}),i()()()()()()),e&2&&(m("config",a.config),l(3),Ye(a.role.global!=null&&a.role.global.Date&&a.type()=="RECEIVE"?3:-1),l(3),y("ngModel",a.note))},dependencies:[Z,Ve,he,ot,R,H,ji,se,Qi,zo,St,ht],styles:[".p-inputtext.p-component{margin-left:10px;margin-top:1px;height:45.4px}"]})};var Fr=Ur(zr(),1),Vr=(()=>{class t{set _emptyInputBehavior(e){e&&(this.emptyInputBehavior=e,this.updateNumericSettings())}set _max(e){e&&(this.max=e,this.updateNumericSettings())}set _min(e){e&&(this.min=e,this.updateNumericSettings())}constructor(e){this.elementRef=e,this.percentage=!1,this.decimalPlaces=4,this.modifyValueOnWheel=!0,this.disabled=!1,this.emptyInputBehavior="focus",this.max="999999999999999.9999",this.min="-999999999999999.9999",this.propagateChange=o=>{},this.preventNegative=!1;let a={digitGroupSeparator:",",decimalCharacter:".",decimalPlaces:this.decimalPlaces,maximumValue:this.max,minimumValue:this.min,allowDecimalPadding:!1,showWarnings:!1};this.numericElement=new Fr.default(this.elementRef.nativeElement,null,a)}ngOnInit(){this.percentage&&(this.max="100"),this.preventNegative&&(this.min="0.00"),this.updateNumericSettings()}updateNumericSettings(){let e={maximumValue:this.max,minimumValue:this.min,readOnly:this.isElementDisabled(),decimalPlaces:this.decimalPlaces,modifyValueOnWheel:this.modifyValueOnWheel,emptyInputBehavior:this.emptyInputBehavior};this.numericElement.update(e)}onKeyUp(){let e=this.numericElement.getNumber();this.propagateChange(e)}onPaste(){let e=this.numericElement.getNumber();this.propagateChange(e)}isElementDisabled(){let e=!1,a=this.elementRef.nativeElement.readOnly;return this.elementRef.nativeElement.disabled=this.disabled,a===!0&&!this.disabled&&(e=!0),e}writeValue(e){e!=null&&this.numericElement.set(e)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}static{this.\u0275fac=function(a){return new(a||t)(C(_o))}}static{this.\u0275dir=go({type:t,selectors:[["","autoNum",""]],hostBindings:function(a,o){a&1&&g("keyup",function(){return o.onKeyUp()})},inputs:{percentage:"percentage",preventNegative:"preventNegative",decimalPlaces:"decimalPlaces",modifyValueOnWheel:"modifyValueOnWheel",disabled:"disabled",_emptyInputBehavior:[0,"emptyInputBehavior","_emptyInputBehavior"],_max:[0,"max","_max"],_min:[0,"min","_min"]},features:[Ei([{provide:yo,useExisting:so(()=>t),multi:!0}])]})}}return t})();var Np=()=>["Name","Code"],Lp=()=>["/menu/Products/Catalog/Variants/Info"],kp=t=>({ID:t});function Rp(t,r){if(t&1&&(q(0),f(1,"p",19),U()),t&2){let e=s().$implicit;l(),m("innerHTML",e.SerialNote,W)}}function Ap(t,r){if(t&1&&f(0,"p",19),t&2){let e=s(2).$implicit;m("innerHTML",e.Note,W)}}function Bp(t,r){if(t&1&&_(0,Ap,1,1,"p",20),t&2){let e=s().$implicit;m("ngIf",e.Note!=null)}}function Wp(t,r){if(t&1){let e=D();n(0,"tr")(1,"td",14),p(2),i(),n(3,"td"),f(4,"a",15),_(5,Rp,2,1,"ng-container",16)(6,Bp,1,1,"ng-template",null,0,X),i(),f(8,"td",17),n(9,"td",14),p(10),v(11,"number"),i(),n(12,"td")(13,"input",18),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Quantity,o)||(c.Quantity=o),u(o)}),i()()()}if(t&2){let e=r.$implicit,a=r.index,o=Fe(7),c=s();l(2),b(a+1+"."),l(2),m("routerLink",N(12,Lp))("queryParams",M(13,kp,e.VariantID))("innerHTML",e.Name,W),l(),m("ngIf",e.SerialNote)("ngIfElse",o),l(3),m("innerHTML",e.Code,W),l(2),b(E(11,10,e.NewQty)),l(3),y("ngModel",e.Quantity),m("disabled",e.TypeID==c.serialized)}}function Hp(t,r){if(t&1){let e=D();n(0,"div")(1,"POS-tinymce-editor",21),S("ngModelChange",function(o){d(e);let c=s();return h(c.dispatchedNote,o)||(c.dispatchedNote=o),u(o)}),i()()}if(t&2){let e=s();l(),y("ngModel",e.dispatchedNote)}}var cn=class t{constructor(r,e){this.dt=r;this.dialogRef=e;this.data=r.data,this.setMaxSendQuantity(),this.config=new ye,this.config.title="Send Confirmation",this.config.bodyScrollable=!0,this.config.customWidth="550px"}filterText="";data;config;serialized=4;dispatchedNote=_t("");currentTabState=_t("Item");onOk(){this.data.ID=this.data.ID||this.data.Transfer.ID,this.data.Delivery.DispatchedNote=this.dispatchedNote(),this.data.Note=this.dispatchedNote(),this.dialogRef.close(this.data)}setMaxSendQuantity(){this.data.Items=this.data.Items.map(r=>(r.maxSend=this.calculateSerialQty(r.Serial?r.Serial:[]),r))}calculateSerialQty(r=[]){let e=0;return r.forEach(a=>{e+=a.Qty}),e}static \u0275fac=function(e){return new(e||t)(C($e),C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-modal-send-confirmation"]],decls:24,vars:9,consts:[["DEFAULT_NOTE",""],[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[3,"onTabChange"],["tabTitle","Item"],["type","text","placeholder","Search product..",1,"form-control","mb-5",3,"ngModelChange","ngModel"],[1,"table","table-bordered","custom-table"],[1,"thead-light"],[1,"text-center","border-end",2,"width","1px"],[1,"border-end",2,"width","400px"],[1,"border-end",2,"width","70px"],[1,"text-center","border-end",2,"width","30px"],[4,"ngFor","ngForOf"],["tabTitle","Note"],[1,"text-center"],["target","_blank",3,"routerLink","queryParams","innerHTML"],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["autoNum","","emptyInputBehavior","null","type","text",1,"text-end","form-control",2,"width","46px",3,"ngModelChange","ngModel","disabled"],[1,"text-body-secondary",2,"word-break","break-all",3,"innerHTML"],["class","text-body-secondary","style","word-break: break-all",3,"innerHTML",4,"ngIf"],[3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"modal-material",1),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),n(1,"content")(2,"div",2)(3,"custom-tabs",3),g("onTabChange",function(c){return a.currentTabState.set(c)}),n(4,"tab",4)(5,"input",5),S("ngModelChange",function(c){return h(a.filterText,c)||(a.filterText=c),c}),i(),n(6,"table",6)(7,"thead",7)(8,"tr")(9,"th",8),p(10,"No"),i(),n(11,"th",9),p(12,"Name"),i(),n(13,"th",10),p(14,"Code"),i(),n(15,"th",11),p(16," Qty Req. "),i(),n(17,"th",11),p(18," Qty Send "),i()()(),n(19,"tbody"),_(20,Wp,14,15,"tr",12),v(21,"FilterByArray"),i()()(),n(22,"tab",13),_(23,Hp,2,1,"div"),i()()()()()),e&2&&(m("config",a.config),l(5),y("ngModel",a.filterText),l(15),m("ngForOf",Mi(21,4,a.data.Items,N(8,Np),a.filterText)),l(3),Ye(a.currentTabState()=="Note"?23:-1))},dependencies:[Z,K,B,_e,Ve,he,gt,z,ni,jo,ot,fe,R,H,St,ht,rr,lr,ar,Vr],encapsulation:2})};var jp=()=>["/print/Transfer"],Nr=(t,r)=>({ID:t,Template:r}),Qp=()=>["/print/TransferMini"],qp=t=>({"opacity-50 cursor-auto":t}),Up=()=>["/menu/Logistics/Archive/Transfer_Order/Receive"],dn=t=>({ID:t}),zp=()=>["/menu/Logistics/Archive/Transfer_Order/Form"],Gp=()=>["/menu/Logistics/Setup/Recycle_Bin"],$p=()=>["/menu/Adjustment/Adjustment/Archive/Info"],Kp=()=>["/menu/Products/Catalog/Variants/Info"],Jp=t=>({"bg-gradient-danger":t}),Yp=()=>["/menu/Logistics/Report/Transfer/History"],Xp=t=>({TransferOrderID:t});function Zp(t,r){if(t&1){let e=D();n(0,"div",46)(1,"button",47),g("click",function(){d(e);let o=s(2);return u(o.export("TransferOrder/ExportInfo","Transfer Order"))}),f(2,"i",48),p(3,"Export "),i(),f(4,"button",49),n(5,"ul",7)(6,"li",50),g("click",function(){d(e);let o=s(2);return u(o.export("TransferOrder/ExportDetailInfo","Transfer Order Detail.csv"))}),n(7,"a"),p(8,"Export with Detail"),i()()()()}}function em(t,r){if(t&1){let e=D();n(0,"a",56),g("click",function(){d(e);let o=s(3);return u(o.onApproveDelivery())}),f(1,"i",57),p(2,"\xA0Approve Delivery "),i()}}function tm(t,r){if(t&1){let e=D();n(0,"a",58),g("click",function(){d(e);let o=s(3);return u(o.onDispatchDelivery())}),f(1,"i",59),p(2,"\xA0Send"),i()}}function im(t,r){if(t&1){let e=D();n(0,"button",60),g("click",function(){d(e);let o=s(3);return u(o.role.logistic.TransferOrderReceiver?o.onReceiveDelivery():null)}),f(1,"i",57),p(2,"\xA0Receive Delivery "),i()}if(t&2){let e=s(3);_i("matTooltip",e.role.logistic.TransferOrderReceiver?"":"Receiving delivery requires the transfer order receiver role"),m("ngClass",M(2,qp,!e.role.logistic.TransferOrderReceiver))}}function nm(t,r){if(t&1&&(n(0,"button",61),f(1,"b",62),i()),t&2){let e=s(3);m("disabled",!e.role.logistic.TransferOrderReceiver)}}function om(t,r){if(t&1&&(n(0,"ul",63)(1,"li")(2,"a",8),p(3,"Receive and Adjust"),i()()()),t&2){let e=s(3);l(2),m("routerLink",N(2,Up))("queryParams",M(3,dn,e.data.ID))}}function rm(t,r){if(t&1&&(n(0,"div",46),_(1,em,3,0,"a",51)(2,tm,3,0,"a",52)(3,im,3,4,"button",53)(4,nm,2,1,"button",54)(5,om,4,5,"ul",55),i()),t&2){let e=s(2);l(),m("ngIf",e.data.Config.EligibleToApprove&&e.role.logistic.TransferOrderApproval&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToSend&&e.role.logistic.TransferOrderEditor&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToReceive&&e.data.Config.HasReceiverRole&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToReceive&&e.role.adjustment.Create&&e.data.Config.HasReceiverRole&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.Config.EligibleToReceive&&e.role.adjustment.Create&&e.data.Config.HasReceiverRole&&!e.data.Transfer.IsVoided)}}function am(t,r){if(t&1&&(n(0,"a",64),f(1,"i",65),p(2,"Edit"),i()),t&2){let e=s(2);m("routerLink",N(2,zp))("queryParams",M(3,dn,e.data.ID))}}function lm(t,r){if(t&1){let e=D();n(0,"a",67),g("click",function(){d(e);let o=s(3);return u(o.deleteData())}),f(1,"i",68),p(2,"Delete"),i()}}function pm(t,r){if(t&1){let e=D();n(0,"a",67),g("click",function(){d(e);let o=s(3);return u(o.onVoid())}),f(1,"i",68),p(2,"Void"),i()}}function mm(t,r){if(t&1&&(q(0),_(1,lm,3,0,"a",66)(2,pm,3,0,"a",66),U()),t&2){let e=s(2);l(),m("ngIf",e.role.logistic.Delete&&(!e.data.Config.IsVoidEnabled||e.data.Transfer.IsVoided)),l(),m("ngIf",e.role.logistic.TransferOrderVoid&&e.data.Config.IsVoidEnabled&&!e.data.Transfer.IsVoided)}}function cm(t,r){t&1&&(n(0,"a",69),f(1,"i",70),n(2,"span",71),p(3,"Voided"),i()()),t&2&&m("routerLink",N(1,Gp))}function sm(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"Adjusted at"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",45),p(7),i()()()),t&2){let e=s(2);l(6),m("routerLink",N(3,$p))("queryParams",M(4,dn,e.data.AdjustmentID)),l(),b(e.data.Transfer==null?null:e.data.Transfer.AdjustedAt)}}function dm(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"Journal"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",72),p(7,"View Journal"),i()()()),t&2){let e=s(2);l(6),vo("href","https://accounting.dealpos.app/pages/journal-entry;TransID=",e.data.ID,"",Xt)}}function um(t,r){if(t&1&&(q(0),n(1,"div",80),p(2,"Receive Note:"),i(),f(3,"div",81),U()),t&2){let e=s(3);l(3),m("innerHTML",e.data.Delivery.ReceivedNote,W)}}function _m(t,r){if(t&1&&(n(0,"div",12)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),n(10,"div",77),f(11,"div",78),i()(),n(12,"div",79)(13,"h4"),p(14,"Received By"),i(),n(15,"p",74),p(16),i(),_(17,um,4,1,"ng-container",10),i()()),t&2){let e=s(2);Mt("pb-8",e.data.Delivery.ReceivedNote),l(3),I(" ",P(4,8,e.data.Delivery.ReceivedDate,"dd MMM yyyy")," "),l(3),I(" ",P(7,11,e.data.Delivery.ReceivedDate,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Received)"?"blue":"black"),l(7),b(e.data.Delivery.ReceiveBy),l(),m("ngIf",e.data.Delivery.ReceivedNote)}}function fm(t,r){if(t&1&&(n(0,"div",80),p(1,"Dispatch Note:"),i(),f(2,"div",81)),t&2){let e=s(3);l(2),m("innerHTML",e.data.Delivery==null?null:e.data.Delivery.DispatchedNote,W)}}function gm(t,r){if(t&1&&(n(0,"div",82)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),n(10,"div",77),f(11,"div",78),i()(),n(12,"div",79)(13,"h4"),p(14,"Dispatched By"),i(),n(15,"p",74),p(16),i(),_(17,fm,3,1),i()()),t&2){let e=s(2);l(3),I(" ",P(4,6,e.data.Delivery.DispatchedDate,"dd MMM yyyy")," "),l(3),I(" ",P(7,9,e.data.Delivery.DispatchedDate,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Dispatched)"?"blue":"black"),l(7),b(e.data.Delivery.DispatchedBy),l(),Ye(e.data.Delivery!=null&&e.data.Delivery.DispatchedNote?17:-1)}}function Cm(t,r){if(t&1&&(n(0,"div",80),p(1,"Approve Note:"),i(),f(2,"div",81)),t&2){let e=s(3);l(2),m("innerHTML",e.data.Delivery==null?null:e.data.Delivery.ApprovedNote,W)}}function vm(t,r){if(t&1&&(n(0,"div",82)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),n(10,"div",77),f(11,"div",78),i()(),n(12,"div",79)(13,"h4"),p(14,"Approved By"),i(),n(15,"p",74),p(16),i(),_(17,Cm,3,1),i()()),t&2){let e=s(2);l(3),b(P(4,6,e.data.Delivery.ApproveDate,"dd MMM yyyy")),l(3),I(" ",P(7,9,e.data.Delivery.ApproveDate,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Approve)"?"blue":"black"),l(7),b(e.data.Delivery.ApproveBy),l(),Ye(e.data.Delivery!=null&&e.data.Delivery.ApprovedNote?17:-1)}}function xm(t,r){if(t&1&&(n(0,"div",80),p(1,"Created Note:"),i(),f(2,"div",81)),t&2){let e=s(3);l(2),m("innerHTML",e.data.Transfer==null?null:e.data.Transfer.Note,W)}}function ym(t,r){if(t&1&&(n(0,"div",12)(1,"div",73)(2,"h4"),p(3),v(4,"date"),i(),n(5,"p",74),p(6),v(7,"date"),i()(),n(8,"div",75),f(9,"i",76),i(),n(10,"div",79)(11,"h4"),p(12,"Created By"),i(),n(13,"p",74),p(14),i(),_(15,xm,3,1),i()()),t&2){let e=s(2);l(3),I(" ",P(4,6,e.data.CreatedInfo.Created.Date,"dd MMM yyyy")," "),l(3),I(" ",P(7,9,e.data.CreatedInfo.Created.Date,"HH:mm a")," "),l(3),ui("color",e.currentDeliveryState=="(Request)"?"blue":"black"),l(5),b(e.data.CreatedInfo.Created.User),l(),Ye(e.data.Transfer!=null&&e.data.Transfer.Note?15:-1)}}function hm(t,r){if(t&1&&(n(0,"small",86),p(1),v(2,"number"),i()),t&2){let e=s(3);l(),I(" (Weight ",E(2,1,e.totalWeight())," gr) ")}}function Sm(t,r){if(t&1){let e=D();n(0,"div",21)(1,"div",83)(2,"div",84)(3,"h2",85),p(4,"Items"),i(),_(5,hm,3,3,"small",86),i(),n(6,"div")(7,"div",46)(8,"button",6),f(9,"b",62),i(),n(10,"ul",87)(11,"li")(12,"a",50),g("click",function(){d(e);let o=s(2);return u(o.showRequested=!o.showRequested)}),p(13),i()(),n(14,"li")(15,"a",50),g("click",function(){d(e);let o=s(2);return u(o.showOnHand=!o.showOnHand)}),p(16),i()()()()()()()}if(t&2){let e=s(2);l(5),Ye(e.totalWeight()?5:-1),l(8),I("",e.showRequested?"Hide":"Show"," requested"),l(3),I("",e.showOnHand?"Hide":"Show"," current on hand inventory")}}function bm(t,r){t&1&&(n(0,"th",88),p(1," Product Code "),i())}function Dm(t,r){t&1&&(n(0,"th",33),p(1," Qty Req. "),i())}function Im(t,r){t&1&&(n(0,"th",33),p(1," On Hand "),i())}function Tm(t,r){t&1&&(n(0,"th",89),p(1," Cost "),i())}function wm(t,r){t&1&&(n(0,"th",89),p(1," Total Cost "),i())}function Em(t,r){if(t&1&&(n(0,"th",90),p(1),i()),t&2){let e=s(2);l(),I(" Price (",e.data.CurrencySimbol,") ")}}function Om(t,r){t&1&&(n(0,"th",91),p(1," % "),i())}function Mm(t,r){if(t&1&&(n(0,"th",92),p(1),i()),t&2){let e=s(2);l(),I(" Total (",e.data.CurrencySimbol,") ")}}function Pm(t,r){if(t&1&&(q(0),f(1,"p",97),U()),t&2){let e=s().$implicit;l(),m("innerHTML",e.Note,W)}}function Fm(t,r){if(t&1&&(n(0,"td"),p(1),i()),t&2){let e=s().$implicit;l(),I(" ",e.ProductCode," ")}}function Vm(t,r){if(t&1&&(n(0,"td",40),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.QtyRequested)," ")}}function Nm(t,r){if(t&1&&(n(0,"td",40),p(1),v(2,"number"),n(3,"div"),p(4),i()()),t&2){let e=s().$implicit;ft(M(6,Jp,e.Inventory<e.Quantity)),l(),I(" ",E(2,4,e.Inventory)," "),l(3),b(e.UOMName)}}function Lm(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.UnitCost)," ")}}function km(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.Quantity*e.UnitCost)," ")}}function Rm(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.UnitPrice)," ")}}function Am(t,r){if(t&1&&(n(0,"td",99),p(1),i()),t&2){let e=s().$implicit;l(),I(" ",e.PriceDiscount," ")}}function Bm(t,r){if(t&1&&(n(0,"td",98),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.TotalPrice)," ")}}function Wm(t,r){if(t&1&&(n(0,"tr")(1,"td",40),p(2),i(),n(3,"td")(4,"a",45),p(5),i(),n(6,"div"),p(7),i(),f(8,"app-serial-note",93),_(9,Pm,2,1,"ng-container",10),i(),_(10,Fm,2,1,"td",10)(11,Vm,3,3,"td",41),n(12,"td",40),p(13),v(14,"number"),i(),_(15,Nm,5,8,"td",94)(16,Lm,3,3,"td",95)(17,km,3,3,"td",95)(18,Rm,3,3,"td",95)(19,Am,2,1,"td",96)(20,Bm,3,3,"td",95),i()),t&2){let e=r.$implicit,a=r.index,o=s(2);l(2),b(a+1+"."),l(2),m("routerLink",N(18,Kp))("queryParams",M(19,dn,e.VariantID)),l(),b(e.Name),l(2),b(e.Code),l(),m("serials",e.Serial),l(),m("ngIf",e.Note),l(),m("ngIf",o.data.Config.ProductCodeVisible),l(),m("ngIf",o.showRequested),l(2),b(E(14,16,e.Quantity)),l(2),m("ngIf",o.showOnHand),l(),m("ngIf",o.data.Config.CostVisible&&o.role.product.Cost),l(),m("ngIf",o.data.Config.CostVisible&&o.role.product.Cost),l(),m("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible),l(),m("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible&&o.data.Config.DiscountVisible),l(),m("ngIf",o.data.Config.PriceVisible&&o.role.sell.PriceVisible)}}function Hm(t,r){if(t&1&&(n(0,"td",40),p(1),v(2,"sum"),v(3,"number"),i()),t&2){let e=s(2);l(),I(" ",E(3,4,P(2,1,e.data.Items,"QtyRequested"))," ")}}function jm(t,r){t&1&&f(0,"td")}function Qm(t,r){if(t&1&&(n(0,"td",100)(1,"b"),p(2),v(3,"sumMultiply"),v(4,"number"),i()()),t&2){let e=s(2);l(2),I(" ",E(4,5,Mi(3,1,e.data.Items,"UnitCost","Quantity"))," ")}}function qm(t,r){if(t&1&&(n(0,"td",101)(1,"b"),p(2),v(3,"sum"),v(4,"number"),i()()),t&2){let e=s(2);l(2),b(E(4,4,P(3,1,e.data.Items,"TotalPrice")))}}function Um(t,r){if(t&1&&(n(0,"span")(1,"b"),p(2," Modified:"),i(),p(3),v(4,"date"),i()),t&2){let e=s(3);l(3),Qe(" ",P(4,2,e.data.CreatedInfo==null||e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo==null||e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.User," ")}}function zm(t,r){if(t&1&&(n(0,"a",45)(1,"div",102),f(2,"i",103),n(3,"span",104)(4,"b"),p(5," Created:"),i(),p(6),v(7,"date"),i(),_(8,Um,5,5,"span"),i()()),t&2){let e=s(2);m("routerLink",N(8,Yp))("queryParams",M(9,Xp,e.data.ID)),l(6),Qe(" ",P(7,5,e.data.CreatedInfo==null||e.data.CreatedInfo.Created==null?null:e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo==null||e.data.CreatedInfo.Created==null?null:e.data.CreatedInfo.Created.User," "),l(2),Ye(e.data.CreatedInfo.Modified.Date!=e.minDate?8:-1)}}function Gm(t,r){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"actions"),_(2,Zp,9,0,"div",2)(3,rm,6,5,"div",2),n(4,"div",3)(5,"a",4),f(6,"i",5),p(7,"Print "),i(),f(8,"button",6),n(9,"ul",7)(10,"li")(11,"a",8),p(12,"Print with Mini"),i()()()(),n(13,"div",3),_(14,am,3,5,"a",9)(15,mm,3,2,"ng-container",10),i()(),n(16,"content")(17,"div",11)(18,"div",12)(19,"div",13)(20,"div",14)(21,"div",15)(22,"h2",16),f(23,"i",17),p(24),i(),_(25,cm,4,2,"a",18),i(),n(26,"div",19)(27,"table",20)(28,"tr")(29,"th"),p(30,"Tag"),i(),n(31,"td"),p(32,":"),i(),n(33,"td"),p(34),i()(),n(35,"tr")(36,"th"),p(37,"Date"),i(),n(38,"td"),p(39,":"),i(),n(40,"td"),p(41),v(42,"date"),i()(),n(43,"tr")(44,"th"),p(45,"Courier"),i(),n(46,"td"),p(47,":"),i(),n(48,"td"),p(49),i()(),n(50,"tr")(51,"th"),p(52,"Status"),i(),n(53,"td"),p(54,":"),i(),n(55,"td"),p(56),i()(),_(57,sm,8,6,"tr")(58,dm,8,2,"tr",10),i()()(),n(59,"div",14)(60,"div",21)(61,"h2"),p(62),i()(),n(63,"div",19),_(64,_m,18,14,"div",22)(65,gm,18,12,"div",23)(66,vm,18,12,"div",23)(67,ym,16,12,"div",24),i()()(),n(68,"div",25)(69,"div",14),_(70,Sm,17,3,"div",26),n(71,"div",19)(72,"table",27)(73,"thead",28)(74,"tr")(75,"th",29),p(76,"No"),i(),n(77,"th",30),p(78,"Name"),i(),_(79,bm,2,0,"th",31)(80,Dm,2,0,"th",32),n(81,"th",33),p(82,"Qty Sent"),i(),_(83,Im,2,0,"th",32)(84,Tm,2,0,"th",34)(85,wm,2,0,"th",34)(86,Em,2,1,"th",35)(87,Om,2,0,"th",36)(88,Mm,2,1,"th",37),i()(),n(89,"tbody"),_(90,Wm,21,21,"tr",38),i(),n(91,"tfoot",39)(92,"tr")(93,"td",40)(94,"b"),p(95,"Total"),i()(),_(96,Hm,4,6,"td",41),n(97,"td",42)(98,"b"),p(99),v(100,"sum"),v(101,"number"),i()(),_(102,jm,1,0,"td",10)(103,Qm,5,7,"td",43)(104,qm,5,6,"td",44),i()()()()()()(),_(105,zm,9,11,"a",45),i()()()),t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("titleLimit",50),l(2),m("ngIf",e.role.global.Export),l(),m("ngIf",!e.data.Transfer.IsVoided),l(2),m("routerLink",N(51,jp))("queryParams",Re(52,Nr,e.data.ID,e.data.TemplateID)),l(6),m("routerLink",N(55,Qp))("queryParams",Re(56,Nr,e.data.ID,e.data.TemplateID)),l(3),m("ngIf",e.data.Config.isEditor&&!e.data.Transfer.IsVoided),l(),m("ngIf",e.data.HasOutletSourceWriteAccess),l(9),Qe("\xA0",e.data.Transfer.Source," to ",e.data.Transfer.Destination," "),l(),m("ngIf",e.data.Transfer.IsVoided),l(9),b(e.data.Transfer.Type),l(7),b(P(42,43,e.data.Transfer.Date,"dd MMM yyyy")),l(8),b(e.data.Transfer.Courier),l(7),b(e.data.Transfer.Status),l(),Ye(e.data.Config.IsAdjusted&&(e.data.Transfer!=null&&e.data.Transfer.AdjustedAt)?57:-1),l(),m("ngIf",e.data.JournalUrl),l(4),b(e.data.Delivery.HeadDelivery),l(2),m("ngIf",e.data.Delivery.ReceivedDate),l(),m("ngIf",e.data.Delivery.DispatchedDate),l(),m("ngIf",e.data.Delivery.ApproveBy),l(),m("ngIf",e.data.CreatedInfo.Created.Date),l(3),m("ngIf",e.data.Items.length>0),l(9),m("ngIf",e.data.Config.ProductCodeVisible),l(),m("ngIf",e.showRequested),l(3),m("ngIf",e.showOnHand),l(),m("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),l(),m("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible&&e.data.Config.DiscountVisible),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),l(2),m("ngForOf",e.data.Items),l(3),Co("colspan",e.data.Config.ProductCodeVisible?"3":"2"),l(3),m("ngIf",e.showRequested),l(3),I(" ",E(101,49,P(100,46,e.data.Items,"Quantity"))," "),l(3),m("ngIf",e.showOnHand),l(),m("ngIf",e.data.Config.CostVisible&&e.role.product.Cost),l(),m("ngIf",e.data.Config.PriceVisible&&e.role.sell.PriceVisible),l(),Ye(e.role.users.LogRestriction?-1:105)}}var sn=class t extends ve{constructor(e,a,o,c,O,Q,re,Ue){super(e,a,"TransferOrder/Info",null,null,o);this.csvConverter=c;this.router=O;this.toastr=Q;this.role=re;this.matDialog=Ue}currentDeliveryState;minDate=T.MinDate;showOnHand=!1;showRequested=!1;totalWeight=_t(0);preGetList(){let e=this.route.snapshot.queryParams;this.pageData.Filter=e}postInit(){this.menuData.H=this.data.PageTitle,this.currentDeliveryState=this.data.Delivery.HeadDelivery.split(" ")[1],this.calculateWeight()}calculateWeight(){let a=this.data.Items.filter(o=>o.Weight).reduce((o,c)=>o+c.Weight*c.Quantity,0);this.totalWeight.set(a)}deleteData(){confirm("Are you sure you want to delete selected record/s?")&&this.httpService.delete("/API/TransferOrder/DeleteTransferOrderInfo",{params:[{key:"ID",value:this.data.ID}]}).subscribe(()=>{this.toastr.success("Records are removed.",Ce.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])})}export(e,a){this.httpService.get(`/api/${e}`,[{key:"ID",value:this.route.snapshot.queryParams.ID}]).subscribe(o=>{this.csvConverter.convertToCSV(o,a)})}onVoid(){confirm("Are you sure you want to void this record/s?")&&this.httpService.put("/api/TransferOrder/VoidTransferOrder",{ID:this.data.ID},{},1e5).subscribe(e=>{this.toastr.success(e.Message,"Success"),this.data.Transfer.IsVoided=!0,this.menuData.H=this.menuData.H})}onApproveDelivery(){this.matDialog.open(Ci,{data:{title:"Approve Delivery",type:"APPROVE"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e)),j(e=>{let a={ID:this.data.ID||this.data.Transfer.ID,Note:e.Note};return this.httpService.post(Pe.ApproveDelivery,a)})).subscribe(()=>this.getListData())}onDispatchDelivery(){this.matDialog.open(cn,{data:{data:this.data}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e)),j(e=>this.httpService.post(Pe.SendTransferOrder,e))).subscribe(()=>this.getListData())}onReceiveDelivery(){this.matDialog.open(Ci,{data:{type:"RECEIVE"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e)),j(e=>{let a={ID:this.data.ID||this.data.Transfer.ID,Date:e.Date,Note:e.Note};return this.httpService.post(Pe.ReceiveTransferOrder,a)})).subscribe(()=>this.getListData())}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(we),C(nt),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-transfer-order-info"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown","titleLimit",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown","titleLimit"],["class","btn-group",4,"ngIf"],[1,"btn-group","ms-5"],["target","_blank",1,"btn","btn-outline-secondary",2,"float","left",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],["target","_blank",1,"dropdown-item",3,"routerLink","queryParams"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[1,"container-fluid","card-container","mt-5"],[1,"row"],[1,"col-sm-4"],[1,"card"],[1,"card-header","d-flex","align-items-center"],[1,"title","mb-0","d-flex","align-items-center"],["aria-hidden","true",1,"fa","fa-location-dot"],["class","badge rounded-pill d-flex align-items-center gap-3 fs-5 bg-danger text-white ms-3",3,"routerLink",4,"ngIf"],[1,"card-body"],[1,"table-sm","table-borderless"],[1,"card-header"],["class","row",3,"pb-8",4,"ngIf"],["class","row pb-8",4,"ngIf"],["class","row",4,"ngIf"],[1,"col-sm-8"],["class","card-header",4,"ngIf"],["id","tableGrid",1,"table","custom-table","w-100"],[1,"thead-light","sticky-top-thead"],[1,"text-center",2,"width","1px"],[2,"width","100%"],["style","width: 400px",4,"ngIf"],["style","width: 30px","class","text-center",4,"ngIf"],[1,"text-center",2,"width","30px"],["style","width: 85px","class","text-end",4,"ngIf"],["style","width: 100px","class","text-end",4,"ngIf"],["style","width: 20px","class","text-end",4,"ngIf"],["style","width: 110px","class","text-end",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"table-footer"],[1,"text-center"],["class","text-center",4,"ngIf"],[1,"text-center","empty-column"],["class","text-end","colspan","1",4,"ngIf"],["class","text-end","colspan","2",4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],[1,"btn-group"],[1,"btn","btn-outline-secondary",2,"float","left",3,"click"],[1,"fas","fa-upload","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle","border-start-0"],[1,"dropdown-item",3,"click"],["class","btn btn-outline-secondary ms-5","role","button",3,"click",4,"ngIf"],["style","cursor: pointer","class","btn btn-outline-secondary ms-5","role","button",3,"click",4,"ngIf"],["class","btn btn-outline-secondary ms-5","role","button","matTooltipPosition","above",3,"ngClass","matTooltip","click",4,"ngIf"],["class","btn btn-outline-secondary btn-sm dropdown-toggle","data-bs-toggle","dropdown",3,"disabled",4,"ngIf"],["class","dropdown-menu dropdown-menu-end","style","cursor: pointer; color: black",4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","ms-5",3,"click"],[1,"fa-solid","fa-truck"],["role","button",1,"btn","btn-outline-secondary","ms-5",2,"cursor","pointer",3,"click"],[1,"fa-solid","fa-check"],["role","button","matTooltipPosition","above",1,"btn","btn-outline-secondary","ms-5",3,"click","ngClass","matTooltip"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle",3,"disabled"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end",2,"cursor","pointer","color","black"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"badge","rounded-pill","d-flex","align-items-center","gap-3","fs-5","bg-danger","text-white","ms-3",3,"routerLink"],["aria-hidden","true",1,"fa","fa-trash","me-2"],[2,"font-size","12px"],["target","_blank",3,"href"],[1,"col","text-end"],[1,"mt-3"],[1,"col-3","text-center","position-relative"],[1,"fa-solid","fa-angle-up","current-status-icon"],[1,"d-flex","justify-content-center","h-100"],[1,"timeline"],[1,"col-5"],[1,"fw-bold"],[3,"innerHTML"],[1,"row","pb-8"],[1,"d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark",2,"z-index","1021"],[2,"width","400px"],[1,"text-end",2,"width","85px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","20px"],[1,"text-end",2,"width","110px"],[3,"serials"],["class","text-center",3,"class",4,"ngIf"],["class","text-end",4,"ngIf"],["class","text-end text-danger",4,"ngIf"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"text-end"],[1,"text-end","text-danger"],["colspan","1",1,"text-end"],["colspan","2",1,"text-end"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"],[1,"me-2"]],template:function(a,o){a&1&&_(0,Gm,106,59,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[pt,K,B,z,ne,Ae,ct,_e,Se,Be,Ho],styles:[".current-status-icon[_ngcontent-%COMP%]{background-color:#fff;border-radius:50%;box-shadow:0 2px #b8b8b8;width:35px;height:35px;font-size:35px}.timeline[_ngcontent-%COMP%]{border-left:3px solid #e1e1e1;height:100%;width:0px}"]})};var $m=(t,r)=>({ID:t,Template:r}),Km=(t,r)=>({ID:t,Template:r,Cost:1}),_n=t=>({ID:t}),Jm=()=>["/menu/Logistics/Archive/Inbound_Logistics/Form"],Ym=()=>["/menu/Contacts/Contact/Suppliers/Info"];function Xm(t,r){if(t&1){let e=D();n(0,"div",2)(1,"a",35),g("click",function(){d(e);let o=s(2);return u(o.export("InboundLogistics/ExportInfoItems","Transfer Item Inbound Logistics.csv"))}),f(2,"i",36),p(3,"Export "),i()()}}function Zm(t,r){if(t&1&&(n(0,"a",37),f(1,"i",38),p(2,"Edit"),i()),t&2){let e=s(2);m("routerLink",N(2,Jm))("queryParams",M(3,_n,e.data.Fulfillment.ID))}}function ec(t,r){if(t&1){let e=D();n(0,"a",39),g("click",function(){d(e);let o=s(2);return u(o.deleteData())}),f(1,"i",40),p(2,"Delete"),i()}}function tc(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(3);l(6),b(e.data.Supplier==null?null:e.data.Supplier.Mobile)}}function ic(t,r){if(t&1&&(n(0,"tr")(1,"th"),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",44),i()),t&2){let e=s(3);l(5),m("innerHTML",e.data.Supplier==null?null:e.data.Supplier.Address,W)}}function nc(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",41),p(4,"Supplier "),i()(),n(5,"div",18)(6,"table",19)(7,"tr")(8,"th"),p(9,"Name"),i(),n(10,"td"),p(11,":"),i(),n(12,"td")(13,"a",42),p(14),i()()(),_(15,tc,7,1,"tr",43)(16,ic,6,1,"tr",43),i()()()),t&2){let e=s(2);l(13),m("routerLink",N(5,Ym))("queryParams",M(6,_n,e.data.Supplier==null?null:e.data.Supplier.ID)),l(),b(e.data.Supplier==null?null:e.data.Supplier.Name),l(),m("ngIf",e.data.Supplier==null?null:e.data.Supplier.Mobile),l(),m("ngIf",e.data.Supplier==null?null:e.data.Supplier.Address)}}function oc(t,r){if(t&1&&(q(0),f(1,"p",48),U()),t&2){let e=s().$implicit;l(),m("innerHTML",e==null?null:e.Note,W)}}function rc(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td")(4,"a",45),p(5),i(),n(6,"div"),p(7),i(),f(8,"app-serial-note",46),_(9,oc,2,1,"ng-container",43),i(),n(10,"td",47),p(11),n(12,"div"),p(13),i()()()),t&2){let e=r.$implicit,a=r.index;l(2),b(a+1+"."),l(2),m("queryParams",M(8,_n,e.VariantID)),l(),I(" ",e.Name," "),l(2),b(e.Code),l(),m("serials",e.Serial),l(),m("ngIf",e.Note!=null),l(2),I("",e.Quantity," "),l(2),b(e.UOMName)}}function ac(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",49),p(4,"Note "),i()(),f(5,"div",50),i()),t&2){let e=s(2);l(5),m("innerHTML",e.data.Fulfillment.Note,W)}}function lc(t,r){if(t&1&&(n(0,"span")(1,"b"),p(2,"Modified:"),i(),p(3),v(4,"date"),i()),t&2){let e=s(3);l(3),Qe(" ",P(4,2,e.data.CreatedInfo.Modified.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Modified.User," ")}}function pc(t,r){if(t&1&&(n(0,"div",51),f(1,"i",52),n(2,"span")(3,"b"),p(4," Created:"),i(),p(5),v(6,"date"),i(),_(7,lc,5,5,"span",43),i()),t&2){let e=s(2);l(5),Qe(" ",P(6,3,e.data.CreatedInfo.Created.Date,"dd MMM yyyy HH:mm")," / ",e.data.CreatedInfo.Created.User," "),l(2),m("ngIf",e.data.CreatedInfo.Modified==null?null:e.data.CreatedInfo.Modified.Date)}}function mc(t,r){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"actions")(2,"div",2)(3,"a",3),f(4,"i",4),p(5,"Print "),i(),f(6,"button",5),n(7,"ul",6)(8,"li")(9,"a",7),p(10,"Print with Cost"),i()()()(),_(11,Xm,4,0,"div",8),n(12,"div",2),_(13,Zm,3,5,"a",9)(14,ec,3,0,"a",10),i()(),n(15,"content")(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14)(20,"div",15)(21,"h2"),f(22,"i",16),p(23,"Order "),n(24,"small",17),p(25),i()()(),n(26,"div",18)(27,"table",19)(28,"tr")(29,"th"),p(30,"Outlet"),i(),n(31,"td"),p(32,":"),i(),n(33,"td"),p(34),i()(),n(35,"tr")(36,"th"),p(37,"Bill"),i(),n(38,"td"),p(39,":"),i(),n(40,"td")(41,"a",20),p(42),i(),p(43),v(44,"date"),i()()()()(),_(45,nc,17,8,"div",21),n(46,"div",14)(47,"div",15)(48,"h2"),f(49,"i",22),p(50,"Fulfillment "),i()(),n(51,"div",18)(52,"table",19)(53,"tr")(54,"th"),p(55,"Outlet"),i(),n(56,"td"),p(57,":"),i(),n(58,"td"),p(59),i()(),n(60,"tr")(61,"th"),p(62,"Date"),i(),n(63,"td"),p(64,":"),i(),n(65,"td"),p(66),v(67,"date"),i()(),n(68,"tr")(69,"th"),p(70,"Number"),i(),n(71,"td"),p(72,":"),i(),n(73,"td"),p(74),i()(),n(75,"tr")(76,"th"),p(77,"Courier"),i(),n(78,"td"),p(79,":"),i(),n(80,"td"),p(81),i()()()()()(),n(82,"div",23)(83,"div",14)(84,"div",15)(85,"h2"),f(86,"i",24),p(87,"Products "),i()(),n(88,"div",18)(89,"table",25)(90,"thead",26)(91,"tr")(92,"th",27),p(93,"No."),i(),n(94,"th"),p(95,"Products"),i(),n(96,"th",28),p(97,"Qty"),i()()(),n(98,"tbody"),_(99,rc,14,10,"tr",29),i(),n(100,"tfoot",30)(101,"tr")(102,"td",31),p(103,"Total"),i(),n(104,"td",32),p(105),v(106,"sum"),i()()()()()(),_(107,ac,6,1,"div",21),i(),n(108,"div",33),_(109,pc,8,6,"div",34),i()()()()()),t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(3),m("queryParams",Re(31,$m,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(6),m("queryParams",Re(34,Km,e.data.Fulfillment.ID,e.data.PrintConfig.ID)),l(2),m("ngIf",e.roleService.global.Export),l(2),m("ngIf",e.roleService.logistic.Edit),l(),m("ngIf",e.roleService.logistic.Delete),l(11),I(" (",e.data.Fulfillment.Status,") "),l(9),b(e.data.Order.OutletName),l(7),m("queryParams",M(37,_n,e.data.Order.InvoiceID)),l(),I(" ",e.data.Order.Number," "),l(),I(" - ",P(44,22,e.data.Order.Date,"dd MMM yyyy")," "),l(2),m("ngIf",e.data.Supplier==null?null:e.data.Supplier.ID),l(14),I(" ",e.data.Fulfillment.OutletName," "),l(7),I(" ",P(67,25,e.data.Fulfillment.Date,"dd MMM yyyy")," "),l(8),I(" ",e.data.Fulfillment.Number," "),l(7),I(" ",e.data.Fulfillment.Courier," "),l(18),m("ngForOf",e.data.Items),l(6),I("",P(106,28,e.data.Items,"Quantity")," "),l(2),m("ngIf",e.data==null?null:e.data.Fulfillment.Note),l(2),m("ngIf",!e.roleService.users.LogRestriction)}}var un=class t extends ve{constructor(e,a,o,c,O,Q,re){super(e,a,"InboundLogistics/DetailInfo",null,null,o);this.csvConverter=c;this.router=O;this.toastr=Q;this.roleService=re}preGetList(){let e=this.route.snapshot.queryParams;this.pageData.Filter.ID=e.ID}postInit(e){e.Items=e.Items.filter(a=>a.Quantity!=0),this.menuData.H=`Inbound Logistics #${e.Fulfillment.Number}`}deleteData(){confirm("Are you sure you want to delete selected record/s?")&&this.httpService.delete("/API/InboundLogistics/DeleteInfo",{params:[{key:"ID",value:this.data.Fulfillment.ID}]}).subscribe(e=>{this.toastr.success(e.Message,Ce.Success),this.router.navigate(["/menu/Logistics/Archive/Inbound_Logistics"])})}export(e,a){this.httpService.get(`/api/${e}`,[{key:"ID",value:this.route.snapshot.queryParams.ID}]).subscribe(o=>{this.csvConverter.convertToCSV(o,a)})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(we),C(nt),C(ee),C(ie))};static \u0275cmp=w({type:t,selectors:[["POS-supplier-delivery-info"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn-group","me-5"],["routerLink","/print/InDelivery",1,"btn","btn-outline-secondary",2,"float","left",3,"queryParams"],[1,"fa-solid","fa-print","me-3"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu",2,"cursor","pointer"],["routerLink","/print/InDelivery",1,"dropdown-item",3,"queryParams"],["class","btn-group me-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-4"],[1,"card"],[1,"card-header"],[1,"fa-solid","fa-receipt","me-5"],[1,"text-body-secondary","h6"],[1,"card-body"],[1,"table-sm","table-borderless"],["target","_blank","routerLink","/menu/Orders/Orders/Supplier_Bill/Info",3,"queryParams"],["class","card",4,"ngIf"],[1,"fa-solid","fa-truck","me-5"],[1,"col-8"],[1,"fa-solid","fa-box","me-5"],[1,"table"],[1,"thead-light"],[2,"width","40px"],[2,"width","50px"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","2",1,"text-end","empty-column","fw-bold"],[1,"text-center","empty-column","fw-bold"],[1,"col-12"],["class","alert alert-warning",4,"ngIf"],[1,"btn","btn-outline-secondary",2,"float","left",3,"click"],[1,"fas","fa-upload","me-3"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-pen-to-square","me-3"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-trash","me-3"],[1,"fa-solid","fa-address-card","me-5"],["target","_blank",3,"routerLink","queryParams"],[4,"ngIf"],[3,"innerHTML"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",3,"queryParams"],[3,"serials"],[1,"text-center"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body",3,"innerHTML"],[1,"alert","alert-warning"],["aria-hidden","true",1,"fa-regular","fa-file-lines"]],template:function(a,o){a&1&&_(0,mc,110,39,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,ne,ct,Se,Be],encapsulation:2})};function cc(t,r){if(t&1){let e=D();q(0),n(1,"POS-uppy",3),g("fileUploaded",function(o){d(e);let c=s(2);return u(c.onSelectFile(o))}),i(),U()}t&2&&(l(),m("subtitle","Accepted file formats: .csv & max file size: 1 MB"))}function sc(t,r){if(t&1){let e=D();q(0),n(1,"POS-uppy",3),g("fileUploaded",function(o){d(e);let c=s(2);return u(c.onSelectFile(o))}),i(),U()}t&2&&(l(),m("subtitle","Accepted file formats: .csv & max file size: 1 MB"))}function dc(t,r){if(t&1&&_(0,cc,2,1,"ng-container",2)(1,sc,2,1,"ng-container",2),t&2){let e=s();m("ngIf",e.uploadState()===e.uploadStateEnum.Idle||e.uploadState()===e.uploadStateEnum.Uploading),l(),m("ngIf",e.uploadState()===e.uploadStateEnum.Success||e.uploadState()===e.uploadStateEnum.Error)}}var fn=class t{constructor(r,e,a){this.dialogRef=r;this.toastService=e;this.httpService=a;this.config=new ye,this.config.title="Import Courier"}config;file;uploadState=_t(0);uploadStateEnum=cr;onSelectFile(r){this.file=r}onOk(){this.uploadState.set(1);let r=new FormData;r.append("File",this.file),this.httpService.postFormData("/api/transferorder/ImportCourier",r).subscribe({next:e=>{this.uploadState.set(2),this.toastService.success(e.Message,Ce.Success),this.dialogRef.close("Success")},error:e=>{this.uploadState.set(3)}})}onClose(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe),C(ee),C(L))};static \u0275cmp=w({type:t,selectors:[["POS-modal-upload-courier"]],standalone:!1,decls:3,vars:1,consts:[["modalContent",""],[3,"onOk","onCancel","onClose","config"],[4,"ngIf"],["sampleUrl","https://cdn.dealpos.xyz/web-import-template/Courier-Import-Template.csv",3,"fileUploaded","subtitle"]],template:function(e,a){if(e&1){let o=D();n(0,"modal-material",1),g("onOk",function(){return d(o),u(a.onOk())})("onCancel",function(){return d(o),u(a.onClose())})("onClose",function(){return d(o),u(a.onClose())}),_(1,dc,2,2,"ng-template",null,0,X),i()}e&2&&m("config",a.config)},dependencies:[B,he,Gi],encapsulation:2})};var uc=()=>["/menu/Logistics/Setup/Courier/Form"],_c=t=>({"border-end-0":t}),fc=()=>["/menu/Logistics/Setup/Courier/Info"],gc=t=>({ID:t}),Cc=t=>({"text-decoration-line-through":t});function vc(t,r){if(t&1){let e=D();n(0,"a",17),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("TransferOrder/RemoveCourier"))}),f(1,"i",18),p(2,"Delete "),i()}}function xc(t,r){if(t&1){let e=D();n(0,"button",19),g("click",function(){d(e);let o=s(2);return u(o.onImport())}),f(1,"i",20),p(2,"Import "),i()}if(t&2){let e=s(2);ft(M(2,_c,e.roleService.global.Export))}}function yc(t,r){if(t&1){let e=D();n(0,"button",19),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",21),p(2," Export "),i()}}function hc(t,r){if(t&1){let e=D();n(0,"div",22)(1,"h6"),p(2,"Discontinued"),i(),n(3,"radio-options",23),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.Bin,o)||(c.pageData.Filter.Bin=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),y("model",e.pageData.Filter.Bin),m("options",e.radioOption)}}function Sc(t,r){if(t&1){let e=D();n(0,"input",27),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()}if(t&2){let e=s().$implicit;y("ngModel",e.selected)}}function bc(t,r){if(t&1&&(n(0,"tr",24)(1,"td"),_(2,Sc,1,1,"input",25),i(),n(3,"td")(4,"a",26)(5,"span"),p(6),i()()(),n(7,"td"),p(8),i()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.roleService.logistic.Delete),l(2),m("routerLink",N(7,fc))("queryParams",M(8,gc,e.ID)),l(),ft(M(10,Cc,e.Bin)),l(),I(" ",e.Name," "),l(2),b(e.OutletName)}}function Dc(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Text,o)||(c.pageData.Filter.Text=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,vc,3,0,"a",3),n(3,"div",4),_(4,xc,3,4,"button",5)(5,yc,3,0,"button",6),i(),n(6,"a",7),p(7,"Add"),i()(),n(8,"filters"),_(9,hc,4,2,"ng-template",null,0,X),i(),n(11,"content")(12,"div",8)(13,"div",9)(14,"table",10)(15,"thead",11)(16,"tr")(17,"th",12)(18,"input",13),g("change",function(o){d(e);let c=s();return u(c.onSelectAllData(o.target.checked))}),i()(),n(19,"th"),p(20,"Name"),i(),n(21,"th"),p(22,"Destination Outlet Filter"),i()()(),n(23,"tbody"),_(24,bc,9,12,"tr",14),i()()(),n(25,"div",15)(26,"POS-complex-pagination",16),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Text),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.getSelectedData().length>0),l(2),m("ngIf",e.roleService.logistic.Create),l(),m("ngIf",e.roleService.global.Export),l(),m("routerLink",N(11,uc)),l(18),m("ngForOf",e.data.Data),l(2),m("total",e.data.Data.length)("pageData",e.pageData)}}var gn=class t extends ve{constructor(e,a,o,c,O){super(e,a,"TransferOrder/GetCourierList","TransferOrderLoader/GetCourierListLoader",o);this.roleService=c;this.matDialog=O;this.radioOption=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"},{Key:null,Value:"All"}]}radioOption;onImport(){this.matDialog.open(fn).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(()=>this.getListData())}openExportModal(){this.matDialog.open(be,{data:{title:"Courier",exportTypes:[{ID:"TransferOrderExport/GetCourierList",Value:"Default",FileName:"Courier"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"TransferOrder/GetCourierListCount",pagination:!0}})}postInit(e){this.data.Data=e.Data.map(a=>le(ae({},a),{OutletName:a.Outlet?a.Outlet?.join(", "):""}))}preInitList(){this.pageData.Filter.Bin=!1}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(ee),C(ie),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-courier"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["value","Delete","matTooltipPosition","above","matTooltip","Delete","class","btn btn-danger me-3",3,"click",4,"ngIf"],[1,"btn-group","ms-3","me-6"],["class","btn btn-outline-secondary",3,"class","click",4,"ngIf"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"button","btn","btn-success",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","14px"],["type","checkbox",3,"change"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-sm-block","mt-2"],["api","TransferOrder/GetCourierListCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["value","Delete","matTooltipPosition","above","matTooltip","Delete",1,"btn","btn-danger","me-3",3,"click"],[1,"fas","fa-trash","me-3"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-download","me-3"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["name","CourierStatus",3,"modelChange","model","options"],[1,"border-bottom"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[3,"routerLink","queryParams"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,Dc,27,12,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,yt,R,H,ne,Rt,Ke,Ae],encapsulation:2})};var Ic=()=>["/menu/Logistics/Setup/Courier"];function Tc(t,r){t&1&&(n(0,"span",21),p(1,"Name is required"),i())}function wc(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2)(1,"actions")(2,"a",3),p(3,"Cancel"),i(),n(4,"button",4),g("click",function(){d(e);let o=s();return u(o.onSubmit("TransferOrder/UpdateCourierList"))}),p(5," Save "),i()(),n(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"div",9)(12,"h3"),p(13,"General"),i()(),n(14,"div",10)(15,"div",6)(16,"div",11)(17,"div",12)(18,"input",13,0),S("ngModelChange",function(o){d(e);let c=s();return h(c.formData.Name,o)||(c.formData.Name=o),u(o)}),i(),n(20,"label"),p(21,"Name"),i(),_(22,Tc,2,0,"span",14),i()(),n(23,"div",11)(24,"div",12)(25,"div",15)(26,"label"),p(27,"Suspend"),i(),n(28,"mat-radio-group",16),S("ngModelChange",function(o){d(e);let c=s();return h(c.formData.Bin,o)||(c.formData.Bin=o),u(o)}),n(29,"mat-radio-button",17),p(30,"Yes"),i(),n(31,"mat-radio-button",18),p(32," No "),i()()()()()()()()()(),n(33,"div",6)(34,"div",7)(35,"div",8)(36,"div",9)(37,"h3"),p(38,"Destination Outlet Filter"),i()(),n(39,"div",10)(40,"div",6)(41,"div",7)(42,"outlet-selector",19),S("ngModelChange",function(o){d(e);let c=s();return h(c.formData.EntityID,o)||(c.formData.EntityID=o),u(o)}),i(),n(43,"small",20),p(44," This restriction only applies for the destination outlet in the "),n(45,"strong"),p(46,"Transfer Order Form"),i(),p(47,". "),i()()()()()()()()()()}if(t&2){let e=Fe(19),a=s();m("pageData",a.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),m("routerLink",N(14,Ic)),l(2),m("disabled",!a.formData.Name),l(14),y("ngModel",a.formData.Name),l(4),m("ngIf",e.invalid&&(e.dirty||e.touched)),l(6),y("ngModel",a.formData.Bin),l(),m("value",!0),l(2),m("value",!1),l(11),m("multiple",!0),y("ngModel",a.formData.EntityID),m("maxSelectedLabels",10)("isFloatLabel",!0)}}var Cn=class t extends Wt{constructor(e,a,o,c,O){super(e,a,"TransferOrderLoader/CourierFormInitial",o);this.toaster=c;this.router=O}postBindForm(){T.IsEmpty(this.formData.Name)&&(this.formData.Name="")}onSubmitSuccess(e){this.toaster.success(e.Message,Ce.Success),this.router.navigate(["/menu/Logistics/Setup/Courier"])}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(ee),C(nt))};static \u0275cmp=w({type:t,selectors:[["POS-courier-form"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["name","ngModel"],[3,"pageData","hideSearchDropdown","hideSearchBox",4,"ngIf"],[3,"pageData","hideSearchDropdown","hideSearchBox"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"routerLink"],["type","button","role","button",1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-6"],[1,"form-floating-outline"],["type","text","autofocus","","required","","name","Name","id","Name","placeholder","Name",1,"form-control",3,"ngModelChange","ngModel"],["class","control-label text-danger",4,"ngIf"],[1,"form-floating-outline","radio","border","rounded"],["aria-label","Select an option","color","primary",3,"ngModelChange","ngModel"],[3,"value"],[1,"ps-3","mt-4",3,"value"],[3,"ngModelChange","multiple","ngModel","maxSelectedLabels","isFloatLabel"],[1,"form-text","text-muted","outlet-info"],[1,"control-label","text-danger"]],template:function(a,o){a&1&&_(0,wc,48,15,"mainpanel-cmp",1),a&2&&m("ngIf",o.formData&&o.formData.Name!=null)},dependencies:[B,z,fe,R,So,H,Mo,Po,ne,Ee],styles:[".outlet-info[_ngcontent-%COMP%]{display:block;margin-top:.4rem;font-size:.85rem;color:#6c757d}.outlet-info[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#495057}.outlet-info[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-style:italic;color:#5a6268}"]})};var vn=class t{constructor(r,e){this.dt=r;this.dialogRef=e;this.config=new ye,this.config.title="Receive Note",this.data=r.data}config;data;onSave(){this.dialogRef.close(this.data)}static \u0275fac=function(e){return new(e||t)(C($e),C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-modal-note"]],standalone:!1,decls:4,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],["cols","24","rows","6",1,"form-control",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.onSave()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"textarea",2),S("ngModelChange",function(c){return h(a.data.Note,c)||(a.data.Note=c),c}),i()()()()),e&2&&(m("config",a.config),l(3),y("ngModel",a.data.Note))},dependencies:[he,fe,R,H],encapsulation:2})};var Lr=t=>({ID:t}),Ec=()=>["/menu/Products/Catalog/Variants/Info"],Oc=t=>({"bg-gradient-warning":t});function Mc(t,r){if(t&1){let e=D();n(0,"tr",27)(1,"td")(2,"a",28),p(3),i()(),f(4,"td",29),n(5,"td")(6,"input",30),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Quantity,o)||(c.Quantity=o),u(o)}),i()(),n(7,"td",31),p(8),v(9,"number"),i(),n(10,"td",32),p(11),v(12,"number"),i(),n(13,"td")(14,"textarea",33),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Note,o)||(c.Note=o),u(o)}),i()()()}if(t&2){let e=r.$implicit,a=s(2);l(2),m("routerLink",N(16,Ec))("queryParams",M(17,Lr,e.VariantID)),l(),b(e.Name),l(),m("innerHTML",e.Code,W),l(2),y("ngModel",e.Quantity),m("max",e.Transfer)("disabled",e.TypeID==a.serialized),l(2),I(" ",E(9,12,e.Transfer)," "),l(2),m("ngClass",M(19,Oc,e.Quantity-e.Transfer!=0)),l(),I(" ",E(12,14,e.Quantity-e.Transfer)," "),l(3),y("ngModel",e.Note),m("disabled",e.TypeID==a.serialized)}}function Pc(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",1)(1,"actions")(2,"a",2),p(3,"Cancel"),i(),n(4,"button",3),g("click",function(){d(e);let o=s();return u(o.openNoteDialog())}),p(5,"Save"),i()(),n(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h2"),f(13,"i",9),p(14),i()(),n(15,"div",10)(16,"div",11)(17,"div",12),p(18,"Date"),i(),n(19,"div",13),p(20,":"),i(),n(21,"div",14)(22,"datepicker",15),S("dateChange",function(o){d(e);let c=s();return h(c.data.Date,o)||(c.data.Date=o),u(o)}),i()()(),n(23,"div",16)(24,"div",12),p(25,"Courier"),i(),n(26,"div",13),p(27,":"),i(),n(28,"div",14),p(29),i()(),n(30,"div",17)(31,"div",12),p(32,"Note"),i(),n(33,"div",13),p(34,":"),i(),f(35,"div",18),i()()()(),n(36,"div",19)(37,"div",7)(38,"div",8)(39,"h2"),p(40,"Products"),i()(),n(41,"div",10)(42,"table",20)(43,"thead",21)(44,"tr")(45,"th",22),p(46,"NAME"),i(),n(47,"th",23),p(48,"CODE"),i(),n(49,"th",24),p(50,"QTY"),i(),n(51,"th",24),p(52,"TRANSFER"),i(),n(53,"th",24),p(54,"DIFF"),i(),n(55,"th",25),p(56,"NOTE"),i()()(),n(57,"tbody"),_(58,Mc,15,21,"tr",26),i()()()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),m("queryParams",M(10,Lr,e.data.ID)),l(12),I(" ",e.data==null?null:e.data.Outlet," "),l(8),m("width",100),y("date",e.data.Date),l(7),I(" ",e.data.Courier," "),l(6),m("innerHTML",e.data.Note,W),l(23),m("ngForOf",e.data.Items)}}var xn=class t extends Wt{constructor(e,a,o,c,O,Q,re){super(a,o,"TransferOrder/ReceiveOutletDelivery",c);this.title=e;this.toastr=O;this.matDialog=Q;this.router=re}serialized=4;postBindForm(e){this.menuData.H=e.PageTitle,this.title.setTitle("Receive & Adjust")}openNoteDialog(){this.matDialog.open(vn,{data:{data:{Note:null}},width:"400px"}).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(e=>{let a=le(ae({},this.data),{Note:e?.Note});this.httpService.post("/api/TransferOrder/CheckOut",a).subscribe(o=>this.onSubmitSuccess(o))})}onSubmitSuccess(e){this.toastr.success("Delivery has been received!",Ce.Success),this.router.navigate(["/menu/Logistics/Archive/Transfer_Order"])}static \u0275fac=function(a){return new(a||t)(C(ei),C(te),C(L),C(pe),C(ee),C(A),C(nt))};static \u0275cmp=w({type:t,selectors:[["POS-receive-transfer-order"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["routerLink","/menu/Logistics/Archive/Transfer_Order/Info",1,"btn","me-5","btn-outline-secondary",3,"queryParams"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-3","col-lg-12","col-xl-3","col-sm-12"],[1,"card"],[1,"card-header"],["aria-hidden","true",1,"fa","fa-location-dot"],[1,"card-body"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[2,"width","20%"],[1,"me-2",2,"width","5%"],[1,"w-75"],["appearance","outline",3,"dateChange","width","date"],[1,"d-flex","align-items-center","justify-content-between","w-100","mt-8"],[1,"d-flex","align-items-center","justify-content-between","w-100",2,"margin-top","28px"],[1,"w-75","text-break",3,"innerHTML"],[1,"col-xs-12","col-md-9","col-lg-12","col-xl-9","col-sm-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[1,"text-end",2,"width","60px"],[1,"text-end",2,"width","250px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams"],[1,"text-end",3,"innerHTML"],["type","text","autoNum","",1,"form-control","text-end",3,"ngModelChange","ngModel","max","disabled"],[1,"text-end"],[1,"text-end",3,"ngClass"],["rows","3",1,"form-control",3,"ngModelChange","ngModel","disabled"]],template:function(a,o){a&1&&_(0,Pc,59,12,"mainpanel-cmp",0),a&2&&m("ngIf",o.data)},dependencies:[pt,K,B,z,fe,R,H,ne,se,mt,_e],encapsulation:2})};var ri=class t{constructor(r,e,a){this.data=r;this.dialogRef=e;this.convertCsvService=a;this.modalConfig=new ye,this.modalConfig.title=r.title}modalConfig;convertedData;onSelectFile(r){this.convertCsvService.convert(r).subscribe(e=>{this.convertedData=e})}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(this.convertedData)}static \u0275fac=function(e){return new(e||t)(C($e),C(xe),C(sr))};static \u0275cmp=w({type:t,selectors:[["app-modal-import"]],standalone:!1,decls:14,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"modal-dialog"],[1,"modal-content","border-0"],["href","//res.cloudinary.com/pos/raw/upload/v1671075053/POS/CSV/Inbound_QTY.csv",1,"noteBox"],[1,"d-flex","justify-content-between"],["accept",".csv","id","csv","type","file","name","myfile",1,"form-control",3,"change"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.onClose()})("onClose",function(){return a.onClose()}),n(1,"content",1)(2,"div",2)(3,"div")(4,"a",3),p(5,"Download Template File"),i()(),n(6,"div",4)(7,"table")(8,"tbody")(9,"tr")(10,"th"),p(11," CSV: "),i(),n(12,"td")(13,"input",5),g("change",function(c){return a.onSelectFile(c.target)}),i()()()()()()()()()),e&2&&m("config",a.modalConfig)},dependencies:[he],styles:[".noteBox[_ngcontent-%COMP%]{background-color:#ffffe1;border:1px solid #cacaca;padding:3px;display:block;outline:0;margin-bottom:5px;font-size:11px;text-decoration:none}"]})};var yn=class t{httpService=x(L);constructor(){}getUnfulfilledOrderByNumberOrReferenceNumber(r){return this.httpService.get(Pe.GetUnfulfilledOrderByNumberOrReferenceNumber,[{key:"orderNumberOrReferenceNumber",value:r}])}getUnfulfilledOrderByNumber(r){return this.httpService.post(Pe.GetUnfulfilledNumberByNumber,{Prefix:r,Count:20})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var jt=class t{constructor(r,e){this.toastr=r;this.matDialog=e}cartItems;formItems;entityID;bindCartItems(r=[],e=[],a){this.cartItems=[],r.forEach(o=>{let c=Object.assign({},o);c.QuantityDelivered=o.Quantity,c.Sent=0,c.BarcodeCount=0,c.Completed=!1,c.MaxDeliveryQuantity=c.Quantity,c=this.setSerialSourceItem(c),this.checkIsSent(c,e),a&&this.checkIsEdit(c),this.cartItems.push(c)})}setSerialSourceItem(r){return r.TypeID==4&&(r.serialSources=r?.Serial?JSON.parse(JSON.stringify(r?.Serial)):[]),r}checkIsEdit(r){let e=this.formItems.find(a=>a.ID==r.ID);T.IsNotEmpty(e)?(r.QuantityDelivered=e.Quantity,r.Completed=!1,r.MaxDeliveryQuantity=r.Quantity-r.Sent+e.Quantity):r.Completed||(r.QuantityDelivered=0)}checkIsSent(r,e){let a=e?.find(o=>o.ID==r.ID);T.IsNotEmpty(a)&&(r.Sent=a.Quantity,r.QuantityDelivered=r.Quantity-r.Sent,r.MaxDeliveryQuantity=r.Quantity-r.Sent,r.Completed=r.QuantityDelivered==0)}onScanBarcode(r){if(T.IsEmpty(r))this.toastr.error("Code is empty",Ce.Error);else{let e=this.cartItems.find(a=>T.IsNotEmpty(a.Code)&&a.Code==r);if(T.IsNotEmpty(e)){this.cartItems.filter(o=>o.Code==r).forEach(o=>o.BarcodeCount+=1);let a=[];this.cartItems.forEach(o=>a.push(o)),this.cartItems=a,this.toastr.success(`${e.Name} (${e.Code}) count: ${e.BarcodeCount}`,Ce.Success)}else this.toastr.error(`No variant with code ${r} found`,Ce.Error)}}static \u0275fac=function(e){return new(e||t)(Gt(ee),Gt(A))};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var ai=class t{constructor(r,e,a){this.toastr=r;this.router=e;this.dialog=a}validate(r,e,a){let o=!0;return r.filter(c=>c.QuantityDelivered!=0).length==0&&!a&&(this.toastr.error("Deliver at least one item",Ce.Error),o=!1),r.forEach(c=>{c.QuantityDelivered>c.MaxDeliveryQuantity&&(this.toastr.error(`Delivery item of ${c.Name} is greater than ordered!`,Ce.Error),o=!1)}),o=this.checkBarcodeConfig(r,e),o}checkBarcodeConfig(r,e){if(!e)return!0;let a=r.some(c=>(c.QuantityDelivered<0?c.QuantityDelivered*-1:c.QuantityDelivered)!=c.BarcodeCount&&c.QuantityDelivered>0),o=!0;return a&&(this.dialog.open(er,{id:"modalLogisticInfoId",data:{title:"Logistic - Quantity Counter Config Enabled",message:`You must scan the product to be sent one by one before the record can be SAVED or you can turn off the config by following
2
2
  <a href="https://support.dealpos.com/en/articles/4773890-send-outbound-logistic-with-barcode-scan" target="_blank">this article</a>
3
- .`,headerType:Ce.Warning},width:"500px"}),o=!1),o}convertCartItemsToForm(r){return r.filter(a=>!a.Completed).map(a=>({ID:a.ID,Name:a.Name,VariantID:a.VariantID,Quantity:a.QuantityDelivered,PackSize:a.PackSize,Serial:a.Serial,UnitQuantity:1,Note:a.Note,InventoryTypeID:a.TypeID}))}newForm(r){this.router.navigate([`/menu/Logistics/Archive/${r}/Form`]).then(()=>window.location.reload())}undo(r,e){this.router.navigate([`/menu/Logistics/Archive/${e}/Form`],{queryParams:{ID:r}}).then(()=>window.location.reload())}mappingItemWithCsv(r,e){return e=e.map(a=>(r.forEach(o=>{o.Quantity=parseFloat(o.Quantity),o.Code==a.Code&&(a.QuantityDelivered=o.Quantity)}),a)),e}toastrShowToastrNotFoundItems(r,e){let a=r.filter(o=>{let c=e.find(O=>O.Code==o.Code);return!!T.IsEmpty(c)});a.length>0&&this.toastr.error(`Items with code ${a.map(o=>o.Code)?.join(", ")} is not found`,"Not Found Items")}static \u0275fac=function(e){return new(e||t)(Gt(ee),Gt(nt),Gt(A))};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Rr=t=>[t],Fc=(t,r)=>({ID:t,Template:r}),Vc=t=>({ID:t});function Nc(t,r){if(t&1&&(q(0),n(1,"div",27),p(2),i(),n(3,"div",27),p(4),v(5,"number"),i(),U()),t&2){let e=s().$implicit;l(2),b(e.Name),l(2),b(E(5,2,e.Quantity))}}function Lc(t,r){if(t&1&&(n(0,"div",25),_(1,Nc,6,4,"ng-container",26),i()),t&2){let e=r.$implicit;l(),m("ngIf",e.Quantity!=0)}}function kc(t,r){if(t&1&&(n(0,"div",21),_(1,Lc,2,1,"div",22),n(2,"div",23)(3,"div",24),p(4,"Total Delivered Quantity:"),i(),n(5,"div",24),p(6),v(7,"sum"),v(8,"number"),i()()()),t&2){let e=s();l(),m("ngForOf",e.items),l(5),I("",E(8,5,P(7,2,e.items,"Quantity"))," ")}}var li=class t{afterSubmitData;items;state;undo=new di;newForm=new di;onUndo(){this.undo.emit(this.afterSubmitData.ID)}onNewForm(){this.newForm.emit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-complete-customer-supplier"]],inputs:{afterSubmitData:"afterSubmitData",items:"items",state:"state"},outputs:{undo:"undo",newForm:"newForm"},standalone:!1,decls:27,vars:18,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","py-5"],[1,"btn","bg-light-gray","btn-secondary",3,"click"],[1,"fa-solid","fa-reply","me-2"],["target","_blank",1,"btn","bg-light-gray","btn-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],["class","card-body",4,"ngIf"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[4,"ngIf"],[1,"col","text-end"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),f(5,"i",5),p(6),i()(),n(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),g("click",function(){return a.onNewForm()}),p(11),i()()()(),n(12,"div",10)(13,"div",11)(14,"button",12),g("click",function(){return a.onUndo()}),f(15,"i",13),p(16,"Undo"),i(),n(17,"a",14),f(18,"i",15),p(19,"Print Receipt"),i()()()()(),n(20,"div",16)(21,"div",2)(22,"div",17)(23,"h2",18)(24,"a",19),p(25),i()()(),_(26,kc,9,7,"div",20),i()()()),e&2&&(l(6),I("",a.state," Logistics Complete"),l(5),I("New ",a.state," Logistics (F8)"),l(6),m("routerLink",M(9,Rr,a.state=="Outbound"?"/print/OutDelivery":"/print/InDelivery"))("queryParams",Re(11,Fc,a.afterSubmitData.ID,a.afterSubmitData.Template)),l(7),m("routerLink",M(14,Rr,a.state=="Outbound"?"/menu/Logistics/Archive/Outbound_Logistics/Info":"/menu/Logistics/Archive/Inbound_Logistics/Info"))("queryParams",M(16,Vc,a.afterSubmitData.ID)),l(),Qe("",a.state," Logistics #",a.afterSubmitData.DeliveryNumber,""),l(),m("ngIf",a.items.length>0))},dependencies:[K,B,z,_e,Be],encapsulation:2,changeDetection:0})};var pi=class t{form;tinyEditorApiKey="zc58cdrrftek5r5igtmjiar7ed4n3wr00hzd4w4mvtx8mpxa";static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-tinymce-note"]],inputs:{form:"form"},standalone:!1,decls:6,vars:1,consts:[[1,"card-header"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body"],["height","220px",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"h2"),f(2,"i",1),p(3,"Note "),i()(),n(4,"div",2)(5,"POS-tinymce-editor",3),S("ngModelChange",function(c){return h(a.form.Header.Note,c)||(a.form.Header.Note=c),c}),i()()),e&2&&(l(5),y("ngModel",a.form.Header.Note))},dependencies:[R,H,ht],encapsulation:2,changeDetection:0})};var Ac=t=>({"mt-10":t});function Bc(t,r){if(t&1){let e=D();n(0,"mat-chip-row",19),g("removed",function(){let o=d(e).$implicit,c=s(3);return u(c.onRemoveSerialChip(o))}),p(1),n(2,"button",20),f(3,"i",21),i()()}if(t&2){let e=r.$implicit;l(),I(" ",e," ")}}function Wc(t,r){if(t&1){let e=D();q(0),n(1,"div",10)(2,"div",11)(3,"mat-form-field",12),g("keyup.enter",function(o){return d(e),u(o.stopPropagation())}),n(4,"mat-chip-grid",null,1),_(6,Bc,4,1,"mat-chip-row",13),n(7,"input",14,2),g("matChipInputTokenEnd",function(o){d(e);let c=Fe(8),O=s(2);return u(O.addSerial(o,c))}),i()()()(),n(9,"div",15)(10,"button",16),g("click",function(){d(e);let o=s(2);return u(o.submitSerial())}),f(11,"i",17),n(12,"strong",18),p(13,"ADD"),i()()()(),U()}if(t&2){let e=Fe(5),a=s(2);l(6),m("ngForOf",a.selectedSerialCode),l(),m("matChipInputFor",e)("matChipInputSeparatorKeyCodes",a.separatorKeysCodes)}}function Hc(t,r){if(t&1){let e=D();n(0,"ng-select",22),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.selectedSerialCode,o)||(c.selectedSerialCode=o),u(o)}),g("change",function(o){d(e);let c=s(2);return u(c.onSelectSerial(o))}),i()}if(t&2){let e=s(2);m("items",e.serialSources)("multiple",!0),y("ngModel",e.selectedSerialCode),m("disabled",e.isStateEdit)}}function jc(t,r){t&1&&f(0,"th",31)}function Qc(t,r){if(t&1){let e=D();n(0,"td",34)(1,"i",35),g("click",function(){d(e);let o=s().index,c=s(3);return u(c.onRemoveSerial(o))}),i()()}}function qc(t,r){if(t&1){let e=D();n(0,"tr"),_(1,Qc,2,0,"td",32),n(2,"td"),p(3),i(),n(4,"td")(5,"input",33),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Quantity,o)||(c.Quantity=o),u(o)}),i()()()}if(t&2){let e=r.$implicit,a=s(3);l(),m("ngIf",!a.isStateEdit),l(2),b(e.Number),l(2),y("ngModel",e.Quantity),m("disabled",a.isStateEdit)("decimalPlaces",0)}}function Uc(t,r){if(t&1&&(q(0),n(1,"div",23)(2,"div",24)(3,"table",25)(4,"thead",26)(5,"tr"),_(6,jc,1,0,"th",27),n(7,"th",28),p(8,"Serial Number"),i(),n(9,"th",29),p(10,"Quantity"),i()()(),n(11,"tbody"),_(12,qc,6,5,"tr",30),i()()()(),U()),t&2){let e=s(2);l(6),m("ngIf",!e.isStateEdit),l(6),m("ngForOf",e.selectedSerial)}}function zc(t,r){if(t&1&&(q(0),_(1,Wc,14,3,"ng-container",9)(2,Hc,1,4,"ng-template",null,0,X)(4,Uc,13,2,"ng-container",5),U()),t&2){let e=Fe(3),a=s();l(),m("ngIf",a.isEmptySerial&&a.state=="Inbound_Logistics")("ngIfElse",e),l(3),m("ngIf",a.selectedSerial.length>0)}}var hn=class t{constructor(r,e,a,o,c){this.data=r;this.dialogRef=e;this.toastr=a;this.logisticProductService=o;this.productService=c;this.config=new ye,this.config.title=r?.name,this.config.customWidth="550px",this.note=r?.note,this.fulfillmentOutletId=r.fulfillmentOutletId,this.state=this.data.state,this.isStateEdit=this.data.isEdit,this.initItemSerial()}separatorKeysCodes=[13,188];config;note;fulfillmentOutletId;isSerialized=!1;selectedSerial=[];serialSources=[];selectedSerialCode;isFocusInputSerial=!1;isEmptySerial=!1;state;isStateEdit;initItemSerial(){if(this.data?.item.TypeID==4){let r=this.data?.item?.serialSources;this.isEmptySerial=r?.length==0,this.isSerialized=!0,this.initSerialSources();let e=this.data?.item.Serial?this.data?.item.Serial:[];this.initSelectedSerial(e),this.mapSerialToCode()}}initSerialSources(){this.state=="Outbound_Logistics"?this.productService.getVariantSerial(this.fulfillmentOutletId,this.data?.item?.VariantID).pipe(V(r=>r.map(e=>({Number:e.Number,Quantity:e.Quantity,ExpiryDate:e.ExpiryDate})))).subscribe(r=>{this.serialSources=r}):this.serialSources=this.data?.item?.serialSources}initSelectedSerial(r){this.selectedSerial=r?.map((e,a)=>({Number:e.Number,Quantity:e.Quantity,ExpiryDate:e.ExpiryDate}))}mapSerialToCode(){this.selectedSerialCode=this.selectedSerial.map(r=>r.Number)}onSelectSerial(r){let e;this.selectedSerial=r.map(a=>(e=this.selectedSerial.find(o=>o.Number==a.Number),{Number:a.Number,Quantity:T.IsNotEmpty(e)?e.Quantity:1,ExpiryDate:a.ExpiryDate}))}onRemoveSerial(r){this.selectedSerial.splice(r,1),this.mapSerialToCode()}onFocusAddSerial(){this.isFocusInputSerial=!0}onBlurAddSerial(){this.isFocusInputSerial=!1}submitSerial(){let r=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...r],this.selectedSerialCode=[]}generateSerialData(){this.selectedSerialCode=this.selectedSerialCode.filter(a=>this.selectedSerial.findIndex(o=>o.Number==a)==-1);let r;return this.selectedSerialCode.map(a=>(r=this.serialSources.find(o=>o.Number==a),{Number:a,Quantity:1,ExpiryDate:null}))}onClose(){this.dialogRef.close()}onOk(r){!this.isFocusInputSerial&&r!="Enter"&&(this.isSerialized?this.selectedSerial.length>0?this.onCloseDialog():this.generateSerialFromCode():this.dialogRef.close({note:this.note,serials:[]}))}generateSerialFromCode(){this.selectedSerialCode.length>0?(this.selectedSerial=this.generateSerialData(),this.onCloseDialog()):this.toastr.warning("Serials cannot be empty","Warning!")}onCloseDialog(){if(this.calculateSerialQty()>this.data?.item?.Quantity){this.toastr.warning("Quantity of serials cannot be more than Item Quantity","Warning!");return}let e=this.getSubmitedSerialData();this.dialogRef.close({note:this.note,serials:e})}getSubmitedSerialData(){return this.selectedSerial.map(e=>({Number:e.Number,Quantity:e.Quantity}))}calculateSerialQty(){return this.selectedSerial?.map(e=>e.Quantity)?.reduce((e,a)=>e+a)}onRemoveSerialChip(r){this.selectedSerialCode=this.selectedSerialCode.filter(e=>e!==r)}addSerial(r,e){let a=(r.value||"").trim();if(a)if(this.selectedSerialCode.find(o=>o==a)){e.value="",this.toastr.info("Serial already exists",Ce.Info);return}else this.selectedSerialCode.push(a);r.chipInput.clear()}static \u0275fac=function(e){return new(e||t)(C($e),C(xe),C(ee),C(jt),C(Ui))};static \u0275cmp=w({type:t,selectors:[["POS-modal-item-note"]],standalone:!1,decls:8,vars:7,consts:[["SERIAL_OPTIONS",""],["chipGrid",""],["inputChip",""],[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[4,"ngIf"],[1,"form-floating-outline",3,"ngClass"],["name","note","id","note","cols","60",1,"form-control",2,"width","100%",3,"ngModelChange","rows","ngModel"],["for","note"],[4,"ngIf","ngIfElse"],[1,"input-group","mb-3"],[1,"col"],["appearance","outline",1,"serial-chip",3,"keyup.enter"],[3,"removed",4,"ngFor","ngForOf"],["placeholder","E.g. Serial1 Serial2",3,"matChipInputTokenEnd","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"col-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm","add-chip",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-1","fs-6"],[1,"headings-font-family","h6","font-weight-bold"],[3,"removed"],["matChipRemove",""],[1,"fa-solid","fa-circle-xmark"],["appendTo","body","bindValue","Number","bindLabel","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"ngModelChange","change","items","multiple","ngModel","disabled"],[1,"row","mt-8"],[1,"col-12"],[1,"table","table-bordered"],[1,"thead-light"],["class","border-end","style","width: 40px",4,"ngIf"],[1,"border-end"],[1,"border-end","text-end",2,"width","60px"],[4,"ngFor","ngForOf"],[1,"border-end",2,"width","40px"],["class","text-center",4,"ngIf"],["type","text","placeholder","Qty","autoNum","",1,"form-control","text-end",3,"ngModelChange","ngModel","disabled","decimalPlaces"],[1,"text-center"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(e,a){e&1&&(n(0,"modal-material",3),g("onOk",function(c){return a.onOk(c)})("onCancel",function(){return a.onClose()})("onClose",function(){return a.onClose()}),n(1,"content")(2,"div",4),_(3,zc,5,3,"ng-container",5),n(4,"div",6)(5,"textarea",7),S("ngModelChange",function(c){return h(a.note,c)||(a.note=c),c}),i(),n(6,"label",8),p(7,"Note"),i()()()()()),e&2&&(m("config",a.config),l(3),m("ngIf",a.isSerialized),l(),m("ngClass",M(5,Ac,a.isSerialized)),l(),m("rows",a.isSerialized?3:8),y("ngModel",a.note))},dependencies:[pt,K,B,he,fe,R,H,wo,mt,Te,Yo,Xo,Ko,Jo],styles:[".serial-chip[_ngcontent-%COMP%]{width:100%}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input, .serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:40px!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading{border-color:#ccc!important}.serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.add-chip[_ngcontent-%COMP%]{height:calc(100% - 18.4px);margin-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}"],changeDetection:0})};var Gc=t=>({ID:t});function $c(t,r){if(t&1){let e=D();n(0,"div")(1,"button",13),g("click",function(){d(e);let o=s();return u(o.onImport())}),f(2,"i",14),p(3," Import "),i()()}}function Kc(t,r){t&1&&(n(0,"th",8),p(1," Pack Size "),i())}function Jc(t,r){if(t&1&&f(0,"p",24),t&2){let e=s().$implicit;m("innerHTML",e==null?null:e.Note,W)}}function Yc(t,r){if(t&1){let e=D();n(0,"input",25),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.QuantityDelivered,o)||(c.QuantityDelivered=o),u(o)}),i()}if(t&2){let e=s().$implicit,a=s();y("ngModel",e.QuantityDelivered),m("disabled",a.isEdit&&e.TypeID==4)}}function Xc(t,r){if(t&1){let e=D();n(0,"td")(1,"input",26),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.PackSize,o)||(c.PackSize=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.PackSize)}}function Zc(t,r){t&1&&(q(0),f(1,"i",27),U())}function es(t,r){t&1&&f(0,"i",28)}function ts(t,r){if(t&1){let e=D();n(0,"tr")(1,"td")(2,"a",15),p(3),i(),f(4,"app-serial-note",16),_(5,Jc,1,1,"p",17),i(),n(6,"td"),p(7),i(),n(8,"td"),_(9,Yc,1,2,"input",18),i(),_(10,Xc,2,1,"td",19),n(11,"td",20),p(12),v(13,"quantityFraction"),i(),n(14,"td",20),p(15),v(16,"quantityFraction"),i(),n(17,"td",20),p(18),v(19,"quantityFraction"),i(),n(20,"td",21)(21,"div",22),g("click",function(){let o=d(e),c=o.$implicit,O=o.index,Q=s();return u(Q.openModalItemNote(c,O))}),_(22,Zc,2,0,"ng-container",23)(23,es,1,0,"ng-template",null,0,X),i()()()}if(t&2){let e=r.$implicit,a=Fe(24),o=s();l(2),m("queryParams",M(18,Gc,e.VariantID)),l(),I(" ",e.Name," "),l(),m("serials",e.Serial),l(),m("ngIf",e.Note!=null),l(2),b(e.Code),l(2),m("ngIf",!e.Completed),l(),m("ngIf",o.isDeliveryPacking),l(2),I(" ",E(13,12,e.Sent)," "),l(3),I(" ",E(16,14,e.Quantity)," "),l(3),I(" ",E(19,16,e.BarcodeCount)," "),l(4),m("ngIf",e.TypeID==4)("ngIfElse",a)}}var mi=class t{constructor(r){this.dialog=r;this.eventImport=new di}isDeliveryPacking;cartItems;state;isEdit;fulfillmentOutletId;hasImportBtn=!0;eventImport;openModalItemNote(r,e){this.dialog.open(hn,{data:{note:r.Note,name:r.Name,item:r,state:this.state,isEdit:this.isEdit,fulfillmentOutletId:this.fulfillmentOutletId}}).afterClosed().pipe(k(a=>T.IsNotEmpty(a))).subscribe(a=>{r.TypeID==4&&(r.Serial=a.serials,r.QuantityDelivered=this.calculateSerialQty(a.serials)),r.Note=a.note,this.updateCartItems(r,e)})}updateCartItems(r,e){this.cartItems=this.cartItems.map((a,o)=>(e==o&&(a=r),a))}calculateSerialQty(r=[]){let e=0;return r.forEach(a=>{e+=a.Quantity}),e}onImport(){this.eventImport.emit()}static \u0275fac=function(e){return new(e||t)(C(A))};static \u0275cmp=w({type:t,selectors:[["POS-products-delivery-list"]],inputs:{isDeliveryPacking:"isDeliveryPacking",cartItems:"cartItems",state:"state",isEdit:"isEdit",fulfillmentOutletId:"fulfillmentOutletId",hasImportBtn:"hasImportBtn"},outputs:{eventImport:"eventImport"},standalone:!1,decls:27,vars:5,consts:[["STANDART",""],[1,"card-header"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-box","me-5"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light","sticky-top-thead"],[1,"border-end"],[1,"border-end","text-end",2,"width","80px"],["class","border-end text-end","style","width: 80px",4,"ngIf"],[1,"border-end","text-end",2,"width","55px"],[1,"border-end",2,"width","55px"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","py-3","px-5",3,"click"],["aria-hidden","true",1,"fa-solid","fa-download"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",1,"d-block",3,"queryParams"],[3,"serials"],["class","special-TinyMCE fst-italic text-warning mb-0","style","word-break: break-all",3,"innerHTML",4,"ngIf"],["autoNum","","class","form-control text-end","type","text",3,"ngModel","disabled","ngModelChange",4,"ngIf"],[4,"ngIf"],[1,"text-end"],[1,"text-center"],[3,"click"],[4,"ngIf","ngIfElse"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],["autoNum","","type","text",1,"form-control","text-end",3,"ngModelChange","ngModel","disabled"],["type","text","autoNum","",1,"form-control",2,"direction","rtl",3,"ngModelChange","ngModel"],["matTooltip","Choose Serial Number",1,"fa-solid","fa-barcode","cursor-pointer","fa-2x"],["matTooltip","Note","matTooltipPosition","above",1,"fa-regular","fa-note-sticky","fa-2x","cursor-pointer"]],template:function(e,a){e&1&&(n(0,"div",1)(1,"div",2)(2,"h2"),f(3,"i",3),p(4,"Products"),i(),_(5,$c,4,0,"div"),i()(),n(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th",7),p(11,"Products"),i(),n(12,"th",7),p(13,"Code"),i(),n(14,"th",8),p(15,"Qty"),i(),_(16,Kc,2,0,"th",9),n(17,"th",10),p(18),i(),n(19,"th",10),p(20),i(),n(21,"th",10),p(22,"Count"),i(),n(23,"th",11),p(24,"Action"),i()()(),n(25,"tbody"),_(26,ts,25,20,"tr",12),i()()()),e&2&&(l(5),Ye(a.hasImportBtn?5:-1),l(11),m("ngIf",a.isDeliveryPacking),l(2),I(" ",a.state=="Outbound_Logistics"?"Sent":"Received"," "),l(2),I(" Order",a.state=="Inbound_Logistics"?"ed":""," "),l(6),m("ngForOf",a.cartItems))},dependencies:[K,B,z,fe,R,H,mt,Ae,ct,Ai],encapsulation:2})};var ns=()=>["/menu/Logistics/Archive/Outbound_Logistics/Info"],io=t=>({ID:t}),os=()=>["/menu/Logistics/Archive/Outbound_Logistics"],rs=()=>["/menu/Orders/Order/Sales_Order/Info"],as=()=>["/menu/Contacts/Contact/Customers/Info"];function ls(t,r){if(t&1&&(n(0,"a",7),p(1,"Cancel"),i()),t&2){let e=s(3);m("routerLink",N(2,ns))("queryParams",M(3,io,e.param.ID||e.param.POID))}}function ps(t,r){t&1&&(n(0,"a",8),p(1,"Cancel"),i()),t&2&&m("routerLink",N(1,os))}function ms(t,r){if(t&1){let e=D();q(0),_(1,ls,2,5,"a",4)(2,ps,2,2,"a",5),n(3,"button",6),g("click",function(){d(e);let o=s(2);return u(o.validate())}),p(4),i(),U()}if(t&2){let e=s(2);l(),m("ngIf",e.isEdit),l(),m("ngIf",!e.isEdit),l(2),I(" ",e.isEdit?"Save":"Add"," ")}}function cs(t,r){if(t&1){let e=D();q(0),n(1,"mat-button-toggle-group",20)(2,"mat-button-toggle",21),g("click",function(){d(e);let o=s(4);return o.onTabChange("invoiceSearch"),u(o.searchLogisticType="invoice")}),f(3,"i",22),i(),n(4,"mat-button-toggle",23),g("click",function(){d(e);let o=s(4);return o.onTabChange("customerSearch"),u(o.searchLogisticType="customer")}),f(5,"i",24),i(),n(6,"mat-button-toggle",25),g("click",function(){d(e);let o=s(4);return o.onTabChange("numberSearch"),u(o.searchLogisticType="number")}),f(7,"i",26),i()(),U()}if(t&2){let e=s(4);l(2),m("checked",e.searchLogisticType=="invoice"),l(2),m("checked",e.searchLogisticType=="customer"),l(2),m("checked",e.searchLogisticType=="number")}}function ss(t,r){t&1&&(n(0,"div",10)(1,"div",31),p(2,"Outlet"),i(),n(3,"div",32),p(4,"Date"),i(),n(5,"div",33),p(6,"Number"),i(),n(7,"div",33),p(8,"Reference"),i()())}function ds(t,r){if(t&1&&(n(0,"div",10)(1,"div",34),p(2),v(3,"limitTo"),i(),n(4,"div",35),p(5),v(6,"date"),i(),n(7,"div",36),p(8),i(),n(9,"div",36),p(10),i()()),t&2){let e=r.item;l(2),I(" ",P(3,4,e.OutletName,25)," "),l(3),I(" ",P(6,7,e.Date,"dd MMM yyyy")," "),l(3),I(" ",e.Number," "),l(2),I(" ",e.ReferenceNumber," ")}}function us(t,r){if(t&1){let e=D();n(0,"ng-select",28),v(1,"async"),g("change",function(o){d(e);let c=s(5);return u(c.findSalesOrderAutoComplete(o))}),_(2,ss,9,0,"ng-template",29)(3,ds,11,10,"ng-template",30),i()}if(t&2){let e=s(5);m("items",E(1,4,e.orders$))("typeahead",e.orderInput$)("ngModel",e.selectedSOID)("readonly",e.isEdit||e.isPO)}}function _s(t,r){if(t&1&&_(0,us,4,6,"ng-select",27),t&2){let e=s(4);m("ngIf",!(e.isEdit||e.isPO))}}function fs(t,r){if(t&1){let e=D();n(0,"div",19)(1,"autocompleteV2",37),g("onSelect",function(o){d(e);let c=s(4);return u(c.getUnfulfilledInvoices(o))}),i()()}if(t&2){let e=s(4);l(),m("inputTextValue",e.customerName)}}function gs(t,r){if(t&1){let e=D();n(0,"div",19)(1,"autocompleteV2",38),g("onInputEnter",function(o){d(e);let c=s(4);return u(c.scanUnfullfilledOrders(o))}),i()()}if(t&2){let e=s(4);l(),m("inputTextValue",e.scanResultUnfulfilledOrder())}}function Cs(t,r){t&1&&(n(0,"div",10)(1,"div",40),p(2,"Outlet"),i(),n(3,"div",34),p(4,"Date"),i(),n(5,"div",41),p(6,"Number"),i()())}function vs(t,r){if(t&1&&(n(0,"div",10)(1,"div",40),p(2),v(3,"limitTo"),i(),n(4,"div",34),p(5),v(6,"date"),i(),n(7,"div",42),p(8),i()()),t&2){let e=r.item;l(2),I(" ",P(3,3,e.EntityName,25)," "),l(3),I(" ",P(6,6,e.Date,"dd MMM yyyy")," "),l(3),I(" ",e.Number," ")}}function xs(t,r){if(t&1){let e=D();n(0,"div")(1,"ng-select",39),g("change",function(o){d(e);let c=s(4);return u(c.findSalesOrderByCustomer(o))}),_(2,Cs,7,0,"ng-template",29)(3,vs,9,9,"ng-template",30),i()()}if(t&2){let e=s(4);l(),m("items",e.unfulfilledInvoices)}}function ys(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",16),p(4,"Choose Order"),i(),_(5,cs,8,3,"ng-container",2),i(),n(6,"div",17),_(7,_s,1,1,"ng-select",18)(8,fs,2,1,"div",19)(9,gs,2,1,"div",19)(10,xs,4,1,"div",2),i()()),t&2){let e=s(3);l(5),m("ngIf",!e.isEdit&&!e.isPO),l(2),Ye(e.searchLogisticType=="invoice"?7:e.searchLogisticType=="customer"?8:9),l(3),m("ngIf",e.unfulfilledInvoices.length>0&&e.searchLogisticType=="customer")}}function hs(t,r){if(t&1&&(n(0,"a",45),p(1),i()),t&2){let e=s(4);m("routerLink",N(3,rs))("queryParams",M(4,io,e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.ID)),l(),I(" ",e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.Number," ")}}function Ss(t,r){if(t&1&&(n(0,"tr")(1,"th",46),p(2,"Ref. Number"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),I(" ",e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.ReferenceNumber," ")}}function bs(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",16),p(4,"Sales Order"),i()(),n(5,"div",17)(6,"table",43)(7,"tr")(8,"th",44),p(9,"Outlet"),i(),n(10,"td"),p(11,":"),i(),n(12,"td"),p(13),i()(),n(14,"tr")(15,"th",44),p(16,"Number"),i(),n(17,"td"),p(18,":"),i(),n(19,"td"),_(20,hs,2,6,"a",45),i()(),n(21,"tr")(22,"th",44),p(23,"Date"),i(),n(24,"td"),p(25,":"),i(),n(26,"td"),p(27),v(28,"date"),i()(),_(29,Ss,7,1,"tr",2),i()()()),t&2){let e=s(3);l(13),b(e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.EntityName),l(7),Ye(!(e.deliveryData==null||e.deliveryData.SalesOrder==null)&&e.deliveryData.SalesOrder.Number?20:-1),l(7),I(" ",P(28,4,e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.Date,"dd MMM yyyy")," "),l(2),m("ngIf",e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.ReferenceNumber)}}function Ds(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Customer.Mobile)}}function Is(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",50),i()),t&2){let e=s(4);l(5),m("innerHTML",e.deliveryData.Customer.Address,W)}}function Ts(t,r){if(t&1&&(n(0,"div",14)(1,"div",47)(2,"h2"),f(3,"i",48),p(4,"Customer"),i()(),n(5,"div",17)(6,"table",43)(7,"tr")(8,"th",49),p(9,"Name"),i(),n(10,"td"),p(11,":"),i(),n(12,"td")(13,"a",45),p(14),i()()(),_(15,Ds,7,1,"tr",2)(16,Is,6,1,"tr",2),i()()()),t&2){let e=s(3);l(13),m("routerLink",N(5,as))("queryParams",M(6,io,e.deliveryData.Customer.ID)),l(),b(e.deliveryData.Customer.Name),l(),m("ngIf",e.deliveryData.Customer.Mobile),l(),m("ngIf",e.deliveryData.Customer.Address)}}function ws(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Name"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Recipient.Name)}}function Es(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Recipient.Phone)}}function Os(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",50),i()),t&2){let e=s(4);l(5),m("innerHTML",e.deliveryData.Recipient.Address,W)}}function Ms(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Recipient.City)}}function Ps(t,r){if(t&1&&(n(0,"div",14)(1,"div",47)(2,"h2"),f(3,"i",48),p(4,"Recipient"),i()(),n(5,"div",17)(6,"table",43),_(7,ws,7,1,"tr",2)(8,Es,7,1,"tr",2)(9,Os,6,1,"tr",2)(10,Ms,7,1,"tr",2),i()()()),t&2){let e=s(3);l(7),m("ngIf",e.deliveryData.Recipient.Name),l(),m("ngIf",e.deliveryData.Recipient.Phone),l(),m("ngIf",e.deliveryData.Recipient.Address),l(),m("ngIf",e.deliveryData.Recipient.City)}}function Fs(t,r){if(t&1&&(p(0),v(1,"limitTo")),t&2){let e=r.item;I(" ",P(1,1,e.Name,20)," ")}}function Vs(t,r){if(t&1){let e=D();n(0,"div",14)(1,"div",47)(2,"h2"),f(3,"i",51),p(4,"Fulfillment"),i()(),n(5,"div",17)(6,"div",52)(7,"div",49),p(8,"Outlet"),i(),n(9,"div",53),p(10,":"),i(),n(11,"div",54)(12,"ng-select",55),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.EntityID,o)||(c.form.Header.EntityID=o),u(o)}),g("ngModelChange",function(o){d(e);let c=s(3);return u(c.onFulfillmentChange(o))}),_(13,Fs,2,4,"ng-template",56),i()()(),n(14,"div",52)(15,"div",49),p(16,"Date"),i(),n(17,"div",53),p(18,":"),i(),n(19,"div",54)(20,"datepicker",57),S("dateChange",function(o){d(e);let c=s(3);return h(c.form.Header.Date,o)||(c.form.Header.Date=o),u(o)}),i()()(),n(21,"div",52)(22,"div",49),p(23,"Number"),i(),n(24,"div",53),p(25,":"),i(),n(26,"div",54)(27,"input",58),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.Number,o)||(c.form.Header.Number=o),u(o)}),i()()(),n(28,"div",52)(29,"div",49),p(30,"Courier"),i(),n(31,"div",53),p(32,":"),i(),n(33,"div",54)(34,"ng-select",59),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.CourierID,o)||(c.form.Header.CourierID=o),u(o)}),i()()()()()}if(t&2){let e=s(3);l(12),Mt("diff",e.form.Header.EntityID!=e.deliveryData.SalesOrder.EntityID),m("readonly",e.isEdit&&!e.isPO)("items",e.storage.Entities),y("ngModel",e.form.Header.EntityID),l(8),m("isFloatingLabel",!1),y("date",e.form.Header.Date),l(7),y("ngModel",e.form.Header.Number),l(7),m("items",e.storage.Courier),y("ngModel",e.form.Header.CourierID)}}function Ns(t,r){if(t&1){let e=D();n(0,"div",60)(1,"div",14)(2,"POS-products-delivery-list",61),g("eventImport",function(){d(e);let o=s(3);return u(o.onImportItems())}),i()(),n(3,"div",14),f(4,"POS-tinymce-note",62),i()()}if(t&2){let e=s(3);l(2),m("isEdit",e.isEdit)("isDeliveryPacking",e.isDeliveryPacking)("cartItems",e.cartItems)("fulfillmentOutletId",e.form.Header.EntityID),l(2),m("form",e.form)}}function Ls(t,r){if(t&1&&(n(0,"div",9)(1,"div",10)(2,"div",11),_(3,ys,11,3,"div",12)(4,bs,30,7,"div",12)(5,Ts,17,8,"div",12)(6,Ps,11,4,"div",12)(7,Vs,35,10,"div",12),i(),_(8,Ns,5,5,"div",13),i()()),t&2){let e=s(2);l(3),m("ngIf",!(e.isEdit||e.isPO)),l(),m("ngIf",e.deliveryData),l(),m("ngIf",e.deliveryData==null||e.deliveryData.Customer==null?null:e.deliveryData.Customer.ID),l(),m("ngIf",e.deliveryData==null||e.deliveryData.Recipient==null?null:e.deliveryData.Recipient.ID),l(),m("ngIf",e.deliveryData),l(),m("ngIf",e.deliveryData)}}function ks(t,r){if(t&1){let e=D();n(0,"div",9)(1,"POS-complete-customer-supplier",63),g("undo",function(o){d(e);let c=s(2);return u(c.undo(o))})("newForm",function(){d(e);let o=s(2);return u(o.newForm())}),i()()}if(t&2){let e=s(2);l(),m("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function Rs(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",1),g("barcodeQueryChange",function(o){d(e);let c=s();return u(c.onScanBarcode(o))}),n(1,"actions"),_(2,ms,5,3,"ng-container",2),i(),n(3,"content"),_(4,Ls,9,6,"div",3)(5,ks,2,2,"div",3),i()()}if(t&2){let e=s();m("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),m("ngIf",!e.isComplete),l(2),m("ngIf",!e.isComplete),l(),m("ngIf",e.isComplete)}}var Sn=class t extends Wt{constructor(e,a,o,c,O,Q,re,Ue){super(e,a,"OutboundLogisticsLoader/GetStorage",o);this.productService=c;this.formService=O;this.productHttpService=Q;this.dialog=re;this.datePipe=Ue;this.form={Header:{},Items:[]},this.searchLogisticType="invoice"}outboundLogisticsService=x(yn);storage;deliveryData;isEdit;form;param;isDeliveryPacking;configBarcodeCount;orderInvoice;isComplete;afterSubmitData;isPO;searchLogisticType;orderInput$=new Ie;orders$;cartItemSource;selectedSOID;scanResultUnfulfilledOrder=_t(null);customerName;unfulfilledInvoices=[];handleF8(){this.isComplete&&this.newForm()}initializeFormState(){this.param=this.route.snapshot.queryParams,T.IsEmpty(this.param.POID)&&T.IsEmpty(this.param.ID)?(this.isEdit=!1,this.initOrderNumberOptions()):T.IsNotEmpty(this.param.POID)?(this.isPO=!0,this.getDeliveryItems(this.param.POID)):(this.isEdit=!0,this.isPO=!1,this.getDeliveryItems(this.param.ID))}initOrderNumberOptions(){this.orders$=this.orderInput$.pipe(k(e=>e!=null&&(e==""||e.length>=3)),mo(),po(500),ze(""),j(e=>this.outboundLogisticsService.getUnfulfilledOrderByNumber(e)))}scanUnfullfilledOrders(e){this.outboundLogisticsService.getUnfulfilledOrderByNumberOrReferenceNumber(e).pipe(J(a=>{this.formatOrderScanresult(a)})).subscribe({next:this.bindDeliveryData(),error:a=>{this.scanResultUnfulfilledOrder.set(null)}})}formatOrderScanresult(e){let a=e?.SalesOrder.EntityName,o=e?.SalesOrder.Date?new Date(e?.SalesOrder.Date):null,c=e?.SalesOrder.ReferenceNumber?`- ${e?.SalesOrder.ReferenceNumber}`:"",O=e?.SalesOrder.Number?`- ${e?.SalesOrder.Number}`:"",Q=o?`- ${this.datePipe.transform(o,"dd MMM yyyy")}`:"",re=`${a} ${Q} ${O} ${c}`;this.scanResultUnfulfilledOrder.set(re)}initOrderNumberOnEdit(){if(this.isEdit||this.isPO){let e={ID:this.deliveryData.SalesOrder.ID,Display:`${this.deliveryData.SalesOrder.Number} - ${this.deliveryData.SalesOrder.EntityName} - ${this.deliveryData.SalesOrder.Date}`};this.orders$=ut([e]),this.selectedSOID=e.ID}}postBindForm(e){this.storage=e,this.isDeliveryPacking=e.AppConfigJSON.DeliveryPacking,this.configBarcodeCount=e.AppConfigJSON.ModuleDelivery.CustomerDelivery.QtyCount,this.initializeFormState(),!this.isEdit&&!this.isPO&&this.setFocusToAutoComplete()}setFocusToAutoComplete(e="customerSearch"){setTimeout(()=>{let a=document.getElementById(e);a&&a.focus()},100)}validate(){if(this.formService.validate(this.cartItems,this.configBarcodeCount,this.isEdit)){this.form.Items=this.formService.convertCartItemsToForm(this.cartItems),this.data.Form=this.form,this.isEdit&&(this.data.Form.Mode=1);let e=this.form.Header.CourierID;T.IsEmpty(e)&&(this.form.Header.CourierID=T.GuidEmpty),this.onSubmit("OutDelivery/SubmitOrder")}}findSalesOrderByCustomer(e){T.IsNotEmpty(e.ID)&&(this.getDeliveryItems(e.ID),this.scanResultUnfulfilledOrder.set(null))}onTabChange(e){this.setFocusToAutoComplete(e)}findSalesOrderAutoComplete(e){T.IsNotEmpty(e)?(this.getDeliveryItems(e.ID),this.scanResultUnfulfilledOrder.set(null)):this.orderInput$.next("")}getDeliveryItems(e){let a,o;this.isPO||!this.isEdit?(a="GetByPOID",this.form.Header.CustomerPOID=e,o={POID:this.param.POID||e}):(a="GetByID",o={ID:this.param.ID}),this.httpService.post(`/API/OutboundLogisticsLoader/${a}`,o).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,this.initOrderNumberOnEdit(),T.IsNotEmpty(this.deliveryData.Data)&&(this.productService.formItems=this.deliveryData.Data.Items),this.productService.bindCartItems(e.OrderedItems,e.SentItems,this.isEdit),this.cartItemSource=T.cloneObject(this.productService.cartItems),this.orderInvoice=e.Label,this.isPO||!this.isEdit?(this.form.Header.Number=e.SalesOrder.GenerateDeliveryNumber,this.form.Header.Date=new Date,T.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.SalesOrder.EntityID),this.form.Header.Note=e.SalesOrder.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(T.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Outbound #${this.form.Header.Number}`),this.productService.entityID=this.form.Header.EntityID}}onScanBarcode(e){this.productService.onScanBarcode(e)}get cartItems(){return this.productService.cartItems}newForm(){this.formService.newForm("Outbound_Logistics")}onSubmitSuccess(e){this.isComplete=!0,this.afterSubmitData=e}undo(e){this.formService.undo(e,"Outbound_Logistics")}assignDefaultWarehouse(e){let a=this.storage.Entities.find(o=>o.ID==e);T.IsNotEmpty(a)&&(this.form.Header.EntityID=a.ID)}getUnfulfilledInvoices(e){this.httpService.post("/API/OutDelivery/GetUnfulfilledOrdersByCustomerID",{id:e}).subscribe(a=>{this.unfulfilledInvoices=a,this.scanResultUnfulfilledOrder.set(null)})}onFulfillmentChange(e){let a=this.cartItems.map(o=>o.VariantID);T.IsNotEmpty(e)&&a.length>0&&this.productHttpService.getSerialByVarianIds(e,a).subscribe(o=>{this.updateSerialItem(o)})}updateSerialItem(e){let a=[],o=T.cloneObject(this.cartItemSource);this.productService.cartItems=o.map(c=>(c.TypeID==4&&(a=e.find(O=>O.VariantID==c.VariantID)?.Serial,a&&(c.Serial=this.filterSerialBySelectedSerial(c.Serial,a),c.Serial=this.setSerialQuantity(c))),c))}filterSerialBySelectedSerial(e=[],a){let o;return a.filter(O=>(o=e.findIndex(Q=>Q.Number==O.Number),o!==-1))}setSerialQuantity(e){let a=e.serialSources,o=e.Serial,c;return o=o.map(O=>(c=a.findIndex(Q=>Q.Number==O.Number),c!==-1&&(O.Quantity=O.Quantity<a[c].Quantity?O.Quantity:a[c].Quantity),O)),o}onImportItems(){this.dialog.open(ri,{data:{title:"Import Products"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(e=>{this.formService.toastrShowToastrNotFoundItems(e,this.cartItems),this.productService.cartItems=this.formService.mappingItemWithCsv(e,this.cartItems)})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(jt),C(ai),C(Ui),C(A),C(Se))};static \u0275cmp=w({type:t,selectors:[["POS-outbound-logistics-form"]],hostBindings:function(a,o){a&1&&g("keydown.F8",function(O){return o.handleF8(O)},!1,Zt)},standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange",4,"ngIf"],[3,"barcodeQueryChange","pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox"],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success","ms-5",3,"click"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-5","col-lg-12","col-xl-5","col-sm-12","sales-order"],["class","card",4,"ngIf"],["class","col-xs-12 col-md-7 col-lg-12 col-xl-7 col-sm-12",4,"ngIf"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa-solid","fa-receipt","me-5"],[1,"card-body"],["bindLabel","Display","bindValue","Key","placeholder","Invoice Number",1,"orders-search",3,"items","typeahead","ngModel","readonly"],[1,"form-floating-outline","my-0"],["name","fontStyle","aria-label","Font Style",2,"height","30px"],["matTooltipPosition","above","matTooltip","Search by Invoice Number",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Customer",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-address-book"],["matTooltipPosition","above","matTooltip","Scan Invoice / Packing Slip Barcode",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-scanner-gun"],["class","orders-search","bindLabel","Display","bindValue","Key","placeholder","Invoice Number",3,"items","typeahead","ngModel","readonly","change",4,"ngIf"],["bindLabel","Display","bindValue","Key","placeholder","Invoice Number",1,"orders-search",3,"change","items","typeahead","ngModel","readonly"],["ng-header-tmp",""],["ng-option-tmp",""],[1,"col-3","fw-bold"],[1,"col-2","fw-bold","px-2"],[1,"col-3","fw-bold","px-2"],[1,"col-3"],[1,"col-2","px-2"],[1,"col-3","px-2"],["inputID","customerSearch","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer Name","notFoundMessageFor","customer",1,"w-100",3,"onSelect","inputTextValue"],["inputID","numberSearch","placeholder","Scan Order Here","notFoundMessageFor","order",1,"w-100",3,"onInputEnter","inputTextValue"],["appendTo","body","bindLabel","Number","bindValue","Key",1,"custom-panel-dropdown",3,"change","items"],[1,"col-5"],[1,"col-4"],[1,"col-4","text-wrap"],[1,"table-sm","table-borderless"],[2,"width","50px"],["target","_blank",3,"routerLink","queryParams"],[2,"width","80px"],[1,"card-header"],[1,"fa-solid","fa-address-card","me-5"],[2,"width","55px"],[3,"innerHTML"],[1,"fa-solid","fa-truck","me-5"],[1,"d-flex","align-items-center","justify-content-between","w-100","mb-3"],[1,"me-2",2,"width","5px"],[1,"w-100"],["bindLabel","Name","bindValue","ID",1,"p-0",3,"ngModelChange","readonly","items","ngModel"],["ng-label-tmp",""],["appearance","outline",1,"p-0",3,"dateChange","isFloatingLabel","date"],["type","text",1,"form-control","ps-4",2,"height","35px !important","width","100%",3,"ngModelChange","ngModel"],["placeholder","Select Courier","bindLabel","Name","bindValue","ID",1,"p-0",3,"ngModelChange","items","ngModel"],[1,"col-xs-12","col-md-7","col-lg-12","col-xl-7","col-sm-12"],["state","Outbound_Logistics",3,"eventImport","isEdit","isDeliveryPacking","cartItems","fulfillmentOutletId"],[3,"form"],["state","Outbound",3,"undo","newForm","afterSubmitData","items"]],template:function(a,o){a&1&&_(0,Rs,6,7,"mainpanel-cmp",0),a&2&&m("ngIf",o.storage)},dependencies:[B,z,fe,R,H,ne,se,We,Te,Fi,Vi,Ae,Li,ki,li,pi,mi,it,Se,Bi],styles:["datepicker[_ngcontent-%COMP%] div.mat-mdc-text-field-wrapper{padding-bottom:0!important}autocompleteV2[_ngcontent-%COMP%] input{font-size:12px;height:36px} mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:30px!important} .diff .ng-select-container{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .mat-button-toggle-checkbox-wrapper{display:none!important} .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0!important}.orders-search[_ngcontent-%COMP%] .ng-dropdown-panel{width:45vw}"]})};var As=()=>["/menu/Logistics/Archive/Inbound_Logistics/Info"],Hr=t=>({ID:t}),Bs=()=>["/menu/Logistics/Archive/Inbound_Logistics"],Ws=()=>["/menu/Contacts/Contact/Suppliers/Info"];function Hs(t,r){if(t&1&&(n(0,"a",8),p(1,"Cancel"),i()),t&2){let e=s(3);m("routerLink",N(2,As))("queryParams",M(3,Hr,e.param.ID||e.param.POID))}}function js(t,r){t&1&&(n(0,"a",9),p(1,"Cancel"),i()),t&2&&m("routerLink",N(1,Bs))}function Qs(t,r){if(t&1){let e=D();q(0),_(1,Hs,2,5,"a",5)(2,js,2,2,"a",6),n(3,"button",7),g("click",function(){d(e);let o=s(2);return u(o.validate())}),p(4),i(),U()}if(t&2){let e=s(2);l(),m("ngIf",e.isEdit),l(),m("ngIf",!e.isEdit),l(2),b(e.isEdit?"Save":"Add")}}function qs(t,r){if(t&1){let e=D();q(0),n(1,"mat-button-toggle-group",20)(2,"mat-button-toggle",21),g("click",function(){d(e);let o=s(3);return u(o.searchLogisticType="invoice")}),f(3,"i",22),i(),n(4,"mat-button-toggle",23),g("click",function(){d(e);let o=s(3);return u(o.searchLogisticType="customer")}),f(5,"i",24),i()(),U()}if(t&2){let e=s(3);l(2),m("checked",e.searchLogisticType=="invoice"),l(2),m("checked",e.searchLogisticType=="customer")}}function Us(t,r){if(t&1){let e=D();q(0),n(1,"div",25)(2,"autocompleteV2",26),g("onSelect",function(o){d(e);let c=s(3);return u(c.getDeliveryItems(o))}),i()(),U()}if(t&2){let e=s(3);l(2),m("inputTextValue",e.orderInvoice)}}function zs(t,r){if(t&1){let e=D();n(0,"div",25)(1,"autocompleteV2",27),g("onSelect",function(o){d(e);let c=s(3);return u(c.getUnfulfilledInvoices(o))}),i()()}}function Gs(t,r){t&1&&(n(0,"div",11)(1,"div",31),p(2," Outlet "),i(),n(3,"div",32),p(4," Date "),i(),n(5,"div",33),p(6," Number "),i()())}function $s(t,r){if(t&1&&(n(0,"div",11)(1,"div",31),p(2),v(3,"limitTo"),i(),n(4,"div",32),p(5),v(6,"date"),i(),n(7,"div",34),p(8),i()()),t&2){let e=r.item;l(2),I(" ",P(3,3,e.EntityName,25)," "),l(3),I(" ",P(6,6,e.Date,"dd MMM yyyy")," "),l(3),I(" ",e.Number," ")}}function Ks(t,r){if(t&1){let e=D();n(0,"div")(1,"ng-select",28),g("change",function(o){d(e);let c=s(3);return u(c.findSalesOrderByCustomer(o))}),_(2,Gs,7,0,"ng-template",29)(3,$s,9,9,"ng-template",30),i()()}if(t&2){let e=s(3);l(),m("items",e.unfulfilledInvoices)}}function Js(t,r){if(t&1&&(n(0,"tr")(1,"th",38),p(2,"Name"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",39),p(7),i()()()),t&2){let e=s(4);l(6),m("routerLink",N(3,Ws))("queryParams",M(4,Hr,e.deliveryData.SupplierContact.ID)),l(),I(" ",e.deliveryData==null?null:e.deliveryData.SupplierContact.Name," ")}}function Ys(t,r){if(t&1&&(n(0,"tr")(1,"th",38),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData==null?null:e.deliveryData.SupplierContact.Phone)}}function Xs(t,r){if(t&1&&(n(0,"tr")(1,"th",38),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",40),i()),t&2){let e=s(4);l(5),m("innerHTML",e.deliveryData==null?null:e.deliveryData.SupplierContact.Address,W)}}function Zs(t,r){if(t&1&&(n(0,"div",13)(1,"div",35)(2,"h2"),f(3,"i",36),p(4,"Supplier "),i()(),n(5,"div",16)(6,"table",37),_(7,Js,8,6,"tr",3)(8,Ys,7,1,"tr",3)(9,Xs,6,1,"tr",3),i()()()),t&2){let e=s(3);l(7),m("ngIf",e.deliveryData==null?null:e.deliveryData.SupplierContact.Name),l(),m("ngIf",e.deliveryData==null?null:e.deliveryData.SupplierContact.Phone),l(),m("ngIf",e.deliveryData==null?null:e.deliveryData.SupplierContact.Address)}}function ed(t,r){if(t&1){let e=D();n(0,"div",13)(1,"div",35)(2,"h2"),f(3,"i",41),p(4,"Fulfillment "),i()(),n(5,"div",16)(6,"div",42)(7,"div",38),p(8,"Outlet"),i(),n(9,"div",43),p(10,":"),i(),n(11,"div",44)(12,"ng-select",45),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.EntityID,o)||(c.form.Header.EntityID=o),u(o)}),i()()(),n(13,"div",42)(14,"div",38),p(15,"Date"),i(),n(16,"div",43),p(17,":"),i(),n(18,"div",44)(19,"datepicker",46),S("dateChange",function(o){d(e);let c=s(3);return h(c.form.Header.Date,o)||(c.form.Header.Date=o),u(o)}),i()()(),n(20,"div",42)(21,"div",38),p(22,"Number"),i(),n(23,"div",43),p(24,":"),i(),n(25,"div",44)(26,"input",47),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.Number,o)||(c.form.Header.Number=o),u(o)}),i()()(),n(27,"div",48)(28,"div",38),p(29,"Courier"),i(),n(30,"div",43),p(31,":"),i(),n(32,"div",44)(33,"ng-select",49),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.CourierID,o)||(c.form.Header.CourierID=o),u(o)}),i()()()()()}if(t&2){let e=s(3);l(12),m("readonly",e.isEdit&&!e.isPO)("items",e.storage.Entities),y("ngModel",e.form.Header.EntityID),l(7),m("isFloatingLabel",!1),y("date",e.form.Header.Date),l(7),y("ngModel",e.form.Header.Number),l(7),m("items",e.storage.Courier),y("ngModel",e.form.Header.CourierID)}}function td(t,r){if(t&1){let e=D();n(0,"div",50)(1,"div",13)(2,"POS-products-delivery-list",51),g("eventImport",function(){d(e);let o=s(3);return u(o.onImport())}),i()(),n(3,"div",13),f(4,"POS-tinymce-note",52),i()()}if(t&2){let e=s(3);l(2),m("isEdit",e.isEdit)("cartItems",e.cartItems),l(2),m("form",e.form)}}function id(t,r){if(t&1&&(n(0,"div",10)(1,"div",11)(2,"div",12)(3,"div",13)(4,"div",14)(5,"h2"),f(6,"i",15),p(7,"Purchase Order "),i(),_(8,qs,6,2,"ng-container",3),i(),n(9,"div",16),_(10,Us,3,1,"ng-container",17)(11,zs,2,0,"ng-template",null,0,X)(13,Ks,4,1,"div",3),i()(),_(14,Zs,10,3,"div",18)(15,ed,34,8,"div",18),i(),_(16,td,5,3,"div",19),i()()),t&2){let e=Fe(12),a=s(2);l(8),m("ngIf",!a.isEdit&&!a.isPO),l(2),m("ngIf",a.searchLogisticType=="invoice")("ngIfElse",e),l(3),m("ngIf",a.unfulfilledInvoices.length>0&&a.searchLogisticType=="customer"),l(),m("ngIf",a.deliveryData==null||a.deliveryData.SupplierContact==null?null:a.deliveryData.SupplierContact.ID),l(),m("ngIf",a.deliveryData),l(),m("ngIf",a.deliveryData)}}function nd(t,r){if(t&1){let e=D();n(0,"div",10)(1,"POS-complete-customer-supplier",53),g("undo",function(o){d(e);let c=s(2);return u(c.undo(o))})("newForm",function(){d(e);let o=s(2);return u(o.newForm())}),i()()}if(t&2){let e=s(2);l(),m("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function od(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),g("barcodeQueryChange",function(o){d(e);let c=s();return u(c.onScanBarcode(o))}),n(1,"actions"),_(2,Qs,5,3,"ng-container",3),i(),n(3,"content"),_(4,id,17,7,"div",4)(5,nd,2,2,"div",4),i()()}if(t&2){let e=s();m("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),m("ngIf",!e.isComplete),l(2),m("ngIf",!e.isComplete),l(),m("ngIf",e.isComplete)}}var bn=class t extends Wt{constructor(e,a,o,c,O,Q){super(e,a,"InboundLogisticsLoader/GetStorage",o);this.productService=c;this.formService=O;this.dialog=Q;this.form={Header:{},Items:[]}}toastr=x(ee);searchLogisticType="invoice";unfulfilledInvoices=[];storage;deliveryData;isEdit;form;param;configBarcodeCount;orderInvoice;isComplete;afterSubmitData;isPO;initializeFormState(){this.param=this.route.snapshot.queryParams,T.IsEmpty(this.param.POID)&&T.IsEmpty(this.param.ID)?this.isEdit=!1:T.IsNotEmpty(this.param.POID)?(this.isPO=!0,this.getDeliveryItems(this.param.POID)):(this.isPO=!1,this.isEdit=!0,this.getDeliveryItems(this.param.ID))}postBindForm(e){this.storage=e,this.productService.formItems=this.storage.Data?.Items,this.configBarcodeCount=e.AppConfigJSON.ModuleDelivery.CustomerDelivery.InBoundQtyCount,this.initializeFormState(),!this.isEdit&&!this.isPO&&this.setFocusToAutoComplete()}setFocusToAutoComplete(){setTimeout(()=>{let e=document.getElementById("orderNumber");e&&e.focus()},100)}findSalesOrderByCustomer(e){T.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}getDeliveryItems(e){let a,o;this.isPO||!this.isEdit?(a="GetByPOID",this.form.Header.PurchaseOrderID=e,o={POID:this.param.POID||e}):(a="GetByID",o={ID:this.param.ID}),this.httpService.post(`/API/InDelivery/${a}`,o).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,T.IsNotEmpty(this.deliveryData.Data)&&(this.productService.formItems=this.deliveryData.Data.Items),this.productService.bindCartItems(e.PurchasedItems,e.SentItems,this.isEdit),this.orderInvoice=e.Label,this.isPO||!this.isEdit?(this.form.Header.Number=e.PO.Number,this.form.Header.Date=new Date().toJSON(),T.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.PO.EntityID),this.form.Header.Note=e.PO.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(T.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Inbound #${this.form.Header.Number}`)}}assignDefaultWarehouse(e){let a=this.storage.Entities.find(o=>o.ID==e);T.IsNotEmpty(a)&&(this.form.Header.EntityID=a.ID)}get cartItems(){return this.productService.cartItems}onScanBarcode(e){this.productService.onScanBarcode(e)}validate(){this.formService.validate(this.cartItems,this.configBarcodeCount,this.isEdit)&&(this.form.Items=this.formService.convertCartItemsToForm(this.cartItems),this.data.Form=this.form,this.isEdit&&(this.data.Form.Mode=1),this.onSubmit("InDelivery/SubmitOrder"))}newForm(){this.formService.newForm("Inbound_Logistics")}onSubmitSuccess(e){this.isComplete=!0,this.afterSubmitData=e}undo(e){this.formService.undo(e,"Inbound_Logistics")}onImport(){this.dialog.open(ri,{data:{title:"Import Products"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(e=>{this.formService.toastrShowToastrNotFoundItems(e,this.cartItems),this.productService.cartItems=this.formService.mappingItemWithCsv(e,this.cartItems)})}getUnfulfilledInvoices(e){this.httpService.post("/API/InboundLogistics/GetUnfulfilledOrdersBySupplierID",{ID:e}).subscribe(a=>this.unfulfilledInvoices=a)}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(jt),C(ai),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-inbound-logistics-form"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["CUSTOMER",""],[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange",4,"ngIf"],[3,"barcodeQueryChange","pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox"],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success","ms-5",3,"click"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-4","col-lg-12","col-xl-4","col-sm-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa-solid","fa-receipt","me-5"],[1,"card-body"],[4,"ngIf","ngIfElse"],["class","card",4,"ngIf"],["class","col-xs-12 col-md-8 col-lg-12 col-xl-8 col-sm-12",4,"ngIf"],["name","fontStyle","aria-label","Font Style",2,"height","30px"],["matTooltipPosition","above","matTooltip","Search by Invoice Number",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Supplier",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-address-book"],[1,"form-floating-outline"],["inputID","orderNumber","requestUrl","/API/AC/SearchBillOrderByNumber","placeholder","Invoice Number",1,"w-100",3,"onSelect","inputTextValue"],["inputID","customerName","requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier Name","notFoundMessageFor","supplier",1,"w-100",3,"onSelect"],["appendTo","body","bindLabel","Number","bindValue","Key",1,"custom-panel-dropdown",3,"change","items"],["ng-header-tmp",""],["ng-option-tmp",""],[1,"col-5"],[1,"col-3"],[1,"col-4"],[1,"col-4","text-wrap"],[1,"card-header"],[1,"fa-solid","fa-address-card","me-5"],[1,"table-sm","table-borderless"],[2,"width","55px"],["target","_blank",3,"routerLink","queryParams"],[3,"innerHTML"],[1,"fa-solid","fa-truck","me-5"],[1,"d-flex","align-items-center","justify-content-between","w-100","mb-3"],[1,"me-2",2,"width","5px"],[1,"w-100"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","readonly","items","ngModel"],["appearance","outline",3,"dateChange","isFloatingLabel","date"],["type","text",1,"form-control","ps-4",2,"height","35px !important",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","justify-content-between","w-100"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],[1,"col-xs-12","col-md-8","col-lg-12","col-xl-8","col-sm-12"],["state","Inbound_Logistics",3,"eventImport","isEdit","cartItems"],[3,"form"],["state","Inbound",3,"undo","newForm","afterSubmitData","items"]],template:function(a,o){a&1&&_(0,od,6,7,"mainpanel-cmp",1),a&2&&m("ngIf",o.storage)},dependencies:[B,z,fe,R,H,ne,se,We,Te,Fi,Vi,Ae,Li,ki,li,pi,mi,Se,Bi],styles:["datepicker[_ngcontent-%COMP%] div.mat-mdc-text-field-wrapper{padding-bottom:0!important}autocompleteV2[_ngcontent-%COMP%] input{font-size:16px} mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:30px!important}"]})};var jr=t=>({ID:t});function rd(t,r){if(t&1){let e=D();n(0,"button",17),g("click",function(){d(e);let o=s();return u(o.openExportModal())}),f(1,"i",18),p(2," Export"),i()}}function ad(t,r){if(t&1){let e=D();n(0,"div",19)(1,"h6"),p(2,"Outlet"),i(),n(3,"ng-select",20),S("ngModelChange",function(o){d(e);let c=s();return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Logistics Service"),i(),n(6,"ng-select",21),S("ngModelChange",function(o){d(e);let c=s();return h(c.pageData.Filter.LogisticServiceID,o)||(c.pageData.Filter.LogisticServiceID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"div")(10,"datepicker",22),S("dateChange",function(o){d(e);let c=s();return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i()(),n(11,"h6"),p(12,"To"),i(),n(13,"div")(14,"datepicker",23),S("dateChange",function(o){d(e);let c=s();return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()(),n(15,"h6"),p(16,"Time"),i(),n(17,"div",24)(18,"div",25)(19,"app-timepicker",26),S("timeChange",function(o){d(e);let c=s();return h(c.pageData.Filter.StartTime,o)||(c.pageData.Filter.StartTime=o),u(o)}),i()(),n(20,"div",25)(21,"app-timepicker",26),S("timeChange",function(o){d(e);let c=s();return h(c.pageData.Filter.EndTime,o)||(c.pageData.Filter.EndTime=o),u(o)}),i()()()()}if(t&2){let e=s();l(3),y("ngModel",e.pageData.Filter.EntityID),m("items",e.pageData.Options==null?null:e.pageData.Options.Entities),l(3),y("ngModel",e.pageData.Filter.LogisticServiceID),m("items",e.pageData.Options==null?null:e.pageData.Options.LogisticServices),l(4),y("date",e.pageData.Filter.From),l(4),y("date",e.pageData.Filter.To),l(5),m("fullWidth",!0),y("time",e.pageData.Filter.StartTime),l(2),m("fullWidth",!0),y("time",e.pageData.Filter.EndTime)}}function ld(t,r){if(t&1&&(n(0,"li",32),p(1),i()),t&2){let e=r.$implicit;l(),Qe(" ",e.Name," x ",e.VariantUnitQuantity," ")}}function pd(t,r){if(t&1&&(n(0,"tr",27)(1,"td"),p(2),i(),n(3,"td")(4,"a",28),p(5),i()(),n(6,"td"),p(7),i(),n(8,"td")(9,"a",29),p(10),i()(),n(11,"td"),p(12),i(),n(13,"td")(14,"ul",30),_(15,ld,2,2,"li",31),i()()()),t&2){let e=r.$implicit;l(2),b(e.OutletName),l(2),m("queryParams",M(8,jr,e.InvoiceID)),l(),b(e.Number),l(2),b(e.LogisticDisplayName),l(2),m("queryParams",M(10,jr,e.CustomerID)),l(),b(e.CustomerName),l(2),b(e.Fulfillment),l(3),m("ngForOf",e.SalesOrderItem)}}function md(t,r){if(t&1){let e=D();n(0,"span",33),g("click",function(){d(e);let o=s();return u(o.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount"))}),n(1,"i",34),p(2,"?"),i()()}}function cd(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s();l(),b(E(2,1,e.listTotal))}}function sd(t,r){if(t&1){let e=D();n(0,"a",35),g("click",function(){d(e);let o=s();return u(o.NextPage(!0))}),f(1,"i",36),p(2," Next"),i()}}function dd(t,r){if(t&1){let e=D();n(0,"a",37),g("click",function(){d(e);let o=s();return u(o.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount",!0))}),f(1,"i",38),p(2," Show All"),i()}}var Dn=class t extends Bo{constructor(e,a,o,c,O){super(e,a,"SalesReport/LogisticServiceDetail","SalesReportLoader/LogisticServiceDetail",null,o);this.matDialog=c;this.roleService=O}preInitList(){this.pageData.Filter.StartTime=="00:00:00"&&this.pageData.Filter.EndTime=="00:00:00"&&(this.pageData.Filter.EndTime="23:59:59"),this.initTimeFilter()}initTimeFilter(){let e=this.pageData.Filter.StartTime;e=T.IsNotEmpty(e)?e.substring(0,5):null;let a=this.pageData.Filter.EndTime;a=T.IsNotEmpty(a)?a.substring(0,5):null,this.pageData.Filter.StartTime=e,this.pageData.Filter.EndTime=a}postInit(e){this.extendData?(this.infiniteList=this.infiniteList.concat(e.Data),this.postExtendData(e),this.extendData=!1):(this.infiniteList=e.Data,this.assignAggregate(e)),this.nextPageDisabled=!(e.Data.length<this.pageData.Filter.RowCount),this.originalData=e.Data,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(e)}openExportModal(){this.matDialog.open(be,{data:{title:"Logistic Service Detail",exportTypes:[{ID:"ReportExport/LogisticServiceDetail",Value:"Default",FileName:"Logistics Service Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"SalesReport/LogisticServiceDetailCount",pagination:!0}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(A),C(ie))};static \u0275cmp=w({type:t,selectors:[["POS-logistics-service-detail"]],standalone:!1,features:[oe],decls:36,vars:14,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose Logistic Service",3,"ngModelChange","ngModel","items"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"border-bottom"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",3,"queryParams"],["routerLink","/menu/Contacts/Contact/Customers/Info",3,"queryParams"],[1,"list-inline","m-0"],["class","list-inline-item me-10",4,"ngFor","ngForOf"],[1,"list-inline-item","me-10"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retreive rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(a,o){if(a&1){let c=D();n(0,"mainpanel-cmp",1),S("textChange",function(Q){return d(c),h(o.pageData.Filter.Name,Q)||(o.pageData.Filter.Name=Q),u(Q)}),g("onSubmit",function(){return d(c),u(o.searchFromPageOne())}),S("filterChange",function(Q){return d(c),h(o.pageData.Filter,Q)||(o.pageData.Filter=Q),u(Q)}),n(1,"actions"),_(2,rd,3,0,"button",2),i(),n(3,"filters"),_(4,ad,22,10,"ng-template",null,0,X),i(),n(6,"content")(7,"div",3)(8,"table",4)(9,"thead",5)(10,"tr",6)(11,"th"),p(12,"Outlet"),i(),n(13,"th"),p(14,"Number"),i(),n(15,"th"),p(16,"Logistics"),i(),n(17,"th",7),p(18,"Customer"),i(),n(19,"th"),p(20,"Fulfillment"),i(),n(21,"th"),p(22,"Product"),i()()(),n(23,"tbody"),_(24,pd,16,12,"tr",8),i()(),n(25,"div",9)(26,"div",10)(27,"div",11),p(28),v(29,"number"),_(30,md,3,0,"span",12)(31,cd,3,3,"span",13),p(32),i()(),n(33,"div",14),_(34,sd,3,0,"a",15)(35,dd,3,0,"a",16),i()()()()()}a&2&&(m("pageData",o.menuData),y("text",o.pageData.Filter.Name),m("isFilterOnDropdown",!1),y("filter",o.pageData.Filter),l(2),m("ngIf",o.roleService.global.Export),l(22),m("ngForOf",o.infiniteList),l(4),I(" Showing 1 - ",E(29,12,o.pageData.Filter.RowCount*(o.pageData.Filter.PageNumber-1)+(o.data==null||o.data.Data==null?null:o.data.Data.length))," of "),l(2),m("ngIf",!o.pageData.HideStoreApiCount),l(),m("ngIf",o.pageData.HideStoreApiCount),l(),I(" records ~ ",o.pageData.Filter.PageNumber," Page "),l(2),m("ngIf",o.nextPageDisabled&&!o.goToLast),l(),m("ngIf",o.nextPageDisabled&&!o.goToLast))},dependencies:[K,B,z,R,H,ne,se,Te,Ae,qi,_e],encapsulation:2})};var Le=class t{http=x(L);route=x(pe);loadForm$=this.route.queryParamMap.pipe(j(r=>this.http.get(`/API/transferorderloader${r.get("ID")?"/"+r.get("ID"):""}/LoadTransferOrderForm`)),rt(1));config$=this.loadForm$.pipe(V(r=>r.AppConfigJSON));deliveryTypes$=this.loadForm$.pipe(V(r=>r.DeliveryTypes));destinations$=this.loadForm$.pipe(V(r=>r.DestinationEntities));outlets$=this.loadForm$.pipe(V(r=>r.Entities));data$=this.loadForm$.pipe(V(r=>r.Data),k(r=>T.IsNotEmpty(r.Order)));items$=this.data$.pipe(V(r=>r.Items.map(e=>le(ae({},e.Variant),{Quantity:e.Quantity,Total:e.Price*e.Quantity*(e.Discount/100),VariantID:e.VariantID,UnitPrice:e.Price,UnitCost:e.Cost,Serial:e.Serial,ID:e.ID,Note:e.Note,Discount:e.Discount}))));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Oe=class t{_createNewTransaction=new Ie;router=x(nt);createNewTransaction$=this._createNewTransaction.asObservable();constructor(){}createNewTransaction(){this._createNewTransaction.next(),this.router.navigate([],{queryParams:{ID:null}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var ce=class t{loadForm=x(Le);lowOnStock=x(At);overOnStock=x(Bt);toastr=x(ee);route=x(pe);isEdit=T.IsNotEmpty(this.route.snapshot.queryParams.ID);newTrans=x(Oe);sourceOutlet=new Ge({value:{ID:T.GuidEmpty,Name:"Source"},disabled:this.isEdit});sourceOutletID$=si(()=>this.sourceOutlet.valueChanges.pipe(ze(this.sourceOutlet.value))).pipe(V(r=>r.ID));destinationOutlet=new Ge({value:{ID:T.GuidEmpty,Name:"Destination"},disabled:this.isEdit});destinationOutletID$=si(()=>this.destinationOutlet.valueChanges.pipe(ze(this.destinationOutlet.value))).pipe(V(r=>r.ID));assignSourceOutlet$=this.loadForm.outlets$.pipe(k(()=>T.IsNotEmpty(this.route.snapshot.queryParams.ID)),ue(this.loadForm.data$),V(([r,e])=>r.find(o=>o.ID===e.Order.SourceEntityID)),J(r=>this.sourceOutlet.setValue(r)));assignDestinationOutlet$=this.loadForm.destinations$.pipe(k(()=>T.IsNotEmpty(this.route.snapshot.queryParams.ID)),ue(this.loadForm.data$),V(([r,e])=>r.find(o=>o.ID===e.Order.DestinationEntityID)),J(r=>this.destinationOutlet.setValue(r)));resetAndWarnOnSameOutlet$=Me(this.destinationOutlet.valueChanges.pipe(V(r=>le(ae({},r),{outletType:"destination"}))),this.sourceOutlet.valueChanges.pipe(V(r=>le(ae({},r),{outletType:"source"})))).pipe(k(r=>T.IsNotEmpty(r.ID)),V(r=>r.outletType=="destination"?r.ID===this.sourceOutlet.value.ID:r.ID===this.destinationOutlet.value.ID),k(r=>r),J(()=>{this.destinationOutlet.setValue({ID:T.GuidEmpty,Name:"Destination"}),this.toastr.warning("Source and destination outlet cannot be the same","Warning")}));resetSourceOutletID$=this.newTrans.createNewTransaction$.pipe(J(()=>{console.log("reset source outlet"),this.sourceOutlet.setValue({ID:T.GuidEmpty,Name:"Source"})}));enableOutletOnNewTransaction$=this.newTrans.createNewTransaction$.pipe(J(()=>{this.sourceOutlet.enable(),this.destinationOutlet.enable()}));resetDestinationOutletID$=Me(this.newTrans.createNewTransaction$).pipe(J(()=>this.destinationOutlet.setValue({ID:T.GuidEmpty,Name:"Destination"})));assignDestinationIDFromInventoryROP=this.lowOnStock.destinationOutlet$;assignSourceOutletFromOverInventory=this.overOnStock.outletSource$;constructor(){xt([this.assignSourceOutlet$.pipe(ze(null)),this.assignSourceOutletFromOverInventory.pipe(ze(null))]).pipe(V(([r,e])=>T.IsNotEmpty(r)?r:e),k(r=>T.IsNotEmpty(r)),at()).subscribe(r=>{console.log(`Source Outlet: ${r.Name}`),this.sourceOutlet.setValue(r)}),xt([this.assignDestinationOutlet$.pipe(ze(null)),this.assignDestinationIDFromInventoryROP.pipe(ze(null))]).pipe(V(([r,e])=>T.IsNotEmpty(r)?r:e),k(r=>T.IsNotEmpty(r)),at()).subscribe(r=>{console.log(`Destination Outlet: ${r.Name}`),this.destinationOutlet.setValue(r)}),this.resetAndWarnOnSameOutlet$.subscribe(),this.resetSourceOutletID$.subscribe(),this.resetDestinationOutletID$.subscribe(),this.enableOutletOnNewTransaction$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac})};var It=class t{outlet=x(ce);matDialog=x(A);_import=new Ie;import$=this._import.asObservable();importedCart$=this.import$.pipe(ue(this.outlet.sourceOutletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.matDialog.open($i,{data:{sampleUrl:"https://res.cloudinary.com/pos/raw/upload/v1699867624/POS/CSV/ImportTransferOrder_DealPOS_New.csv",fileEndpoint:"/API/TransferOrder/UploadCsv",outletID:e,useUppy:!0}}).afterClosed()),k(r=>T.IsNotEmpty(r)),V(r=>r.map(e=>le(ae({},e.Variant),{Quantity:e.Quantity,Total:e.Price*e.Quantity,VariantID:e.VariantID,UnitPrice:e.Price,UnitCost:e.Cost,Serial:e.Serial,Note:e.Note,Discount:e.Discount,DiscountAmount:e.DiscountAmount}))));constructor(){}import(){this._import.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var In=class t{constructor(r){this.dialogRef=r;this.config.title="Empty outlet Inventory?",this.config.customWidth="500px"}config=new ye;ok(){this.dialogRef.close("empty")}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-clear-outlet"]],decls:4,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"h4",1),p(3,"This will populate cart with all inventory from source outlet!"),i()()()),e&2&&m("config",a.config)},dependencies:[Z,Ve,he],encapsulation:2})};var Tt=class t{outlet=x(ce);http=x(L);matDialog=x(A);outletID$=this.outlet.sourceOutletID$;_clearOutlet=new Ie;clearOutlet$=this._clearOutlet.asObservable();populateCartWithAllItemsFromSourceOutlet$=this.clearOutlet$.pipe(j(()=>this.matDialog.open(In).afterClosed()),k(r=>T.IsNotEmpty(r)),ue(this.outletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.http.get(Pe.getAllOutletInventory,[{key:"EntityID",value:e}]).pipe(je(()=>ke))));constructor(){}clearOutlet(){this._clearOutlet.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var wt=class t{outlet=x(ce);http=x(L);route=x(pe);loadRegister$=this.outlet.sourceOutletID$.pipe(k(r=>T.IsNotEmpty(r)),V(r=>[r,T.IsNotEmpty(this.route.snapshot.queryParams.ID)]),J(console.log),j(([r,e])=>this.http.get("/api/TransferOrderLoader/LoadRegister",[{key:"EntityID",value:r},{key:"IsEdit",value:e}])),rt(1));constructor(){this.loadRegister$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var $t=class t{outlet=x(ce);http=x(L);loadRegister=x(wt);outletID$=this.outlet.sourceOutletID$;quickKeyItems$=this.loadRegister.loadRegister$.pipe(V(r=>r.QuickKey));itemQuickKeyID=new Ge(T.GuidEmpty);itemQuickKey$=si(()=>this.itemQuickKeyID.valueChanges.pipe(ze(this.itemQuickKeyID.value))).pipe(k(r=>T.IsNotEmpty(r)),ue(this.outletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.http.get(Pe.GetVariantByID,[{key:"ID",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Et=class t{outlet=x(ce);http=x(L);_scanSerial=new Ie;scanSerial$=this._scanSerial.asObservable();item$=this.scanSerial$.pipe(ue(this.outlet.sourceOutletID$),j(([r,e])=>this.http.get(Pe.GetVariantBySerial,[{key:"Serial",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));constructor(){}scanSerial(r){this._scanSerial.next(r)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Tn=class t{constructor(r){this.dialogRef=r;this.config.title="Void Transaction?"}config=new ye;ok(){this.dialogRef.close("void")}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-void"]],decls:4,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"h4",1),p(3,"This will erase all current data. Are you sure?"),i()()()),e&2&&m("config",a.config)},dependencies:[Z,Ve,he],encapsulation:2})};var Je=class t{matDialog=x(A);_void=new Ie;void$=this._void.asObservable().pipe(j(()=>this.matDialog.open(Tn).afterClosed()),k(r=>T.IsNotEmpty(r)),rt(1));void(){this._void.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Kt=class t{outlet=x(ce);http=x(L);variantAutocomplete=new Ge(null);getVariantByCode$=this.variantAutocomplete.valueChanges.pipe(k(r=>T.IsNotEmpty(r)&&r.type=="Code"),V(r=>r.str),ue(this.outlet.sourceOutletID$),j(([r,e])=>this.http.get(Pe.GetVariantByCode,[{key:"Code",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));getVariantByID$=this.variantAutocomplete.valueChanges.pipe(k(r=>T.IsNotEmpty(r)&&r.type=="ID"),V(r=>r.str),ue(this.outlet.sourceOutletID$),j(([r,e])=>this.http.get(Pe.GetVariantByID,[{key:"ID",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var _d=["quantity"],no=t=>({selected:t}),fd=()=>["/menu/Products/Catalog/Variants/Info"],gd=t=>({ID:t}),Cd=t=>({"table-light":t});function vd(t,r){if(t&1){let e=D();n(0,"a",10),g("click",function(){d(e);let o=s();return u(o.onTabChange("Product"))}),p(1," Product "),i()}if(t&2){let e=s();m("ngClass",M(1,no,e.tabState=="Product"))}}function xd(t,r){if(t&1){let e=D();q(0),n(1,"a",11),g("click",function(){d(e);let o=s();return u(o.onTabChange("Serial"))}),p(2," Serial "),i(),U()}if(t&2){let e=s();l(),m("ngClass",M(1,no,e.tabState=="Serial"))}}function yd(t,r){if(t&1&&(q(0),n(1,"div",19)(2,"div",22),f(3,"POS-variant-autocomplete",23),i()(),U()),t&2){let e=s(2);l(3),m("formControl",e.variantAutocomplete)("isOnModalVariant",!0)}}function hd(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s(2);l(),I("(",e.variant.UOMName,")")}}function Sd(t,r){if(t&1){let e=D();n(0,"div",24)(1,"strong"),p(2,"Price"),i(),n(3,"input",25,2),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.variant.UnitPrice,o)||(c.variant.UnitPrice=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("simpleKeyboard",e.keyboard),y("ngModel",e.variant.UnitPrice)}}function bd(t,r){if(t&1){let e=D();n(0,"div",24)(1,"strong"),p(2,"Cost"),i(),n(3,"input",25,2),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.variant.UnitCost,o)||(c.variant.UnitCost=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("simpleKeyboard",e.keyboard),y("ngModel",e.variant.UnitCost)}}function Dd(t,r){if(t&1){let e=D();q(0),n(1,"div",12),_(2,yd,4,2,"ng-container",8),n(3,"div",13)(4,"div",14)(5,"strong"),p(6," Qty "),_(7,hd,2,1,"span",8),i(),n(8,"input",15,0),S("ngModelChange",function(o){d(e);let c=s();return h(c.variant.Quantity,o)||(c.variant.Quantity=o),u(o)}),i()(),_(10,Sd,5,2,"div",16)(11,bd,5,2,"div",16),n(12,"div",17)(13,"strong"),p(14,"Discount %"),i(),n(15,"input",18,1),S("ngModelChange",function(o){d(e);let c=s();return h(c.variant.Discount,o)||(c.variant.Discount=o),u(o)}),i()()(),n(17,"div",19)(18,"div",20)(19,"POS-tinymce-editor",21),S("ngModelChange",function(o){d(e);let c=s();return h(c.variant.Note,o)||(c.variant.Note=o),u(o)}),i()()()(),U()}if(t&2){let e=s();l(2),m("ngIf",e.isCreate),l(5),m("ngIf",e.variant.UOMName),l(),m("simpleKeyboard",e.keyboard)("decimalPlaces",e.isSerialItem?0:4),y("ngModel",e.variant.Quantity),m("disabled",e.isEditBuyForm&&e.isSerialItem),l(2),m("ngIf",e.appConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible),l(),m("ngIf",e.appConfigJSON.ModuleDelivery.OutletDelivery.CostVisible),l(4),m("simpleKeyboard",e.keyboard),y("ngModel",e.variant.Discount),m("readonly",!e.role.sell.Discount),l(4),y("ngModel",e.variant.Note)}}function Id(t,r){t&1&&(q(0),f(1,"i",32),n(2,"h6"),p(3,"No Image"),i(),U())}function Td(t,r){if(t&1&&f(0,"img",33),t&2){let e=s(2);m("src",e.variant.ThumbnailUrl,Xt)}}function wd(t,r){if(t&1&&(n(0,"th",34),f(1,"i",36),p(2),i()),t&2){let e=s(3);l(2),I("",e.destinationName," ")}}function Ed(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.onHand)," ")}}function Od(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.allocated)," ")}}function Md(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.onHand-e.destination.allocated)," ")}}function Pd(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.rop)," ")}}function Fd(t,r){if(t&1&&(n(0,"td",49),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),Qe(" ",e.destination.ropDiff>=0?"+":"","",E(2,2,e.destination.ropDiff)," ")}}function Vd(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.max)," ")}}function Nd(t,r){if(t&1&&(n(0,"td",50),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),Qe(" ",e.destination.maxDiff>=0?"+":"","",E(2,2,e.destination.maxDiff)," ")}}function Ld(t,r){if(t&1){let e=D();n(0,"button",51),g("click",function(){d(e);let o=s().ngIf,c=s(2);return u(c.setQuantityToMax(o))}),p(1," Place Order "),i()}}function kd(t,r){if(t&1&&(n(0,"tbody")(1,"tr")(2,"th",34),f(3,"i",35),p(4,"Inventory "),i(),n(5,"th",34),f(6,"i",36),p(7),i(),_(8,wd,3,1,"th",37),n(9,"th",34),f(10,"i",38),p(11," Diff "),i(),n(12,"th",34),f(13,"i",39),p(14," Action "),i()(),n(15,"tr")(16,"th",40),p(17,"On Hand"),i(),n(18,"td",41),p(19),v(20,"number"),i(),_(21,Ed,3,3,"td",42),f(22,"td",43)(23,"td",44),i(),n(24,"tr")(25,"th",40),p(26,"Allocated"),i(),n(27,"td",41),p(28),v(29,"number"),i(),_(30,Od,3,3,"td",42),i(),n(31,"tr")(32,"th",40),p(33,"Available"),i(),n(34,"td",41),p(35),v(36,"number"),i(),_(37,Md,3,3,"td",42),i(),n(38,"tr")(39,"th",40),p(40,"ROP"),i(),n(41,"td",41),p(42),v(43,"number"),i(),_(44,Pd,3,3,"td",42)(45,Fd,3,4,"td",45),i(),n(46,"tr")(47,"th",40),p(48,"Max"),i(),n(49,"td",41),p(50),v(51,"number"),i(),_(52,Vd,3,3,"td",42)(53,Nd,3,4,"td",46),n(54,"td",47),_(55,Ld,2,0,"button",48),i()()()),t&2){let e=r.ngIf,a=s(2);l(7),I("",a.outletName," "),l(),m("ngIf",a.isEmptyDestinationID()),l(11),I(" ",E(20,16,e.source.onHand)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(7),I(" ",E(29,18,e.source.allocated)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(5),I(" ",E(36,20,e.source.onHand-e.source.allocated)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(5),I(" ",E(43,22,e.source.rop)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(),m("ngIf",a.isEmptyDestinationID()),l(5),I(" ",E(51,24,e.source.max)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(),m("ngIf",a.isEmptyDestinationID()),l(),m("ngClass",M(26,Cd,a.variant.Quantity==e.source.max-e.source.onHand-e.source.allocated)),l(),m("ngIf",a.variant.Quantity!=e.source.max-e.source.onHand-e.source.allocated)}}function Rd(t,r){if(t&1&&(q(0),n(1,"div",26)(2,"div",27)(3,"a",28),_(4,Id,4,0,"ng-container",29)(5,Td,1,1,"ng-template",null,3,X),i()(),n(7,"div",30)(8,"table",31),_(9,kd,56,28,"tbody",8),v(10,"async"),i()()(),U()),t&2){let e=Fe(6),a=s();l(3),m("routerLink",N(7,fd))("queryParams",M(8,gd,a.variant==null?null:a.variant.ID)),l(),m("ngIf",(a.variant==null?null:a.variant.ThumbnailUrl)==null)("ngIfElse",e),l(5),m("ngIf",E(10,5,a.variantStock$))}}function Ad(t,r){if(t&1){let e=D();q(0),n(1,"app-item-serial",52),S("cartItemChange",function(o){d(e);let c=s();return h(c.variant,o)||(c.variant=o),u(o)}),i(),U()}if(t&2){let e=s();l(),m("entityId",e.outletID),y("cartItem",e.variant),m("disabled",e.isEditBuyForm)}}var xi=class t{constructor(r,e,a,o,c,O){this.dialogRef=r;this.http=a;this.role=o;this.toastr=O;this.config=new ye,this.config.title=e.variant?.Name??"Add Variant",this.config.customWidth="750px",this.appConfigJSON=e.appConfigJSON,this.unitQtyLabel=this.appConfigJSON.ModuleSell.ProductDialog.UnitQtyLabel,this.numpadVisible=this.appConfigJSON.ModuleSell.NumPadVisible,this.numpadVisible&&(this.keyboard=c.keyboard),this.isEditBuyForm=e.isEditBuyForm,this.outletID=e.outletID,this.outletName=e.outletName,this.destinationID=e.destinationID,this.destinationName=e.destinationName,this.variant=e.variant;let re=this.appConfigJSON?.ModuleSell?.ProductDialog?.QuantityToOneInDialog?1:null;if(this.variant)this.isSerialItem=this.variant.TypeID==4,this.variantStock$=this.getOnInventory();else{this.isCreate=!0,this.variant={Quantity:re,UnitQuantity:1,OrderPrice:0,Total:0,Note:"",UnitPrice:0,ThumbnailUrl:"",UOMName:"",TypeID:0,Discount:0,ID:"",Serial:[],UnitCost:0,VariantID:T.GuidEmpty};let Ue=this.variantAutocomplete.valueChanges.pipe(k(Y=>Y.type=="Code"),V(Y=>Y.str),j(Y=>a.get(Pe.GetVariantByCode,[{key:"Code",value:Y},{key:"EntityID",value:this.outletID}]).pipe(je(()=>ke))),V(Y=>this.setUnitPrice(Y)),V(Y=>le(ae({},Y),{Quantity:re,Total:Y.UnitPrice,VariantID:Y.ID})),J(Y=>this.config.title=Y.Name)),ci=this.variantAutocomplete.valueChanges.pipe(k(Y=>Y.type=="ID"),V(Y=>Y.str),j(Y=>a.get(Pe.GetVariantByID,[{key:"ID",value:Y},{key:"EntityID",value:this.outletID}]).pipe(je(()=>ke))),V(Y=>this.setUnitPrice(Y)),V(Y=>le(ae({},Y),{Quantity:re,Total:Y.UnitPrice,VariantID:Y.ID})),J(Y=>this.config.title=Y.Name));Me(Ue,ci).pipe(J(Y=>this.setFocusField("quantity")),rt(1)).subscribe(Y=>{this.variant=Y,this.isSerialItem=this.variant.TypeID==4,this.showInventory=!0,this.variantStock$=this.getOnInventory()})}}variantAutocomplete=new Ge;_quantityElement;variant;variantStock$=ke;isSerialItem=!1;outletID;outletName;destinationID;destinationName;appConfigJSON;numpadVisible;keyboard;isEditBuyForm=!1;unitQtyLabel;config;tabState="Cart";isCreate=!1;showInventory=!1;serials=[];isFocusOnSerialInput=!1;_onGetInventory=new dt(void 0);onGetInventory$=this._onGetInventory.asObservable();setFocusField(r){switch(r){case"quantity":this._quantityElement.nativeElement.focus();break}}onTabChange(r){this.tabState=r}ok(){if(!this.isFocusOnSerialInput){if(this.checkQuantityIsNull(),this.isSerialItem){if(this.serials.length){let a=this.serials.map(o=>({Quantity:1,Number:o}));this.variant.Serial=[...this.variant.Serial,...a]}let r=this.variant.Serial?.map(a=>a.Quantity).reduce((a,o)=>a+o,0)??0,e=this.variant.Quantity;if(r!=e){this.toastr.warning("Serial Quantity must be equal to Variant Quantity","Warning");return}}this.dialogRef.close({item:le(ae({},this.variant),{Total:this.variant.UnitPrice*this.variant.UnitQuantity*this.variant.Quantity*((100-(this.variant.Discount??0))/100)})})}}close(){this.dialogRef.close()}checkQuantityIsNull(){this.variant.Quantity==null&&(this.variant.Quantity=1)}setQuantityToMax(r){let e=r.destination.onHand-r.destination.allocated;r.destination.max>=e?(this.variant.Quantity=r.destination.max-e,this.toastr.success("Qty adjusted to Max Inventory","Success"),this.ok()):this.toastr.warning("Your Inventory Available is more than Max Inventory","Warning")}getOnInventory(){let r=a=>{let o=a.OnHand-a.Allocated;return{onHand:a.OnHand,allocated:a.Allocated,rop:a.ROP,max:a.Max,maxDiff:a.Max-o,ropDiff:a.ROP-o}},e=lo({source:this.http.get(Pe.GetVariantStockByID,[{key:"ID",value:this.variant.VariantID},{key:"EntityID",value:this.outletID}]).pipe(V(r)),destination:this.http.get(Pe.GetVariantStockByID,[{key:"ID",value:this.variant.VariantID},{key:"EntityID",value:this.destinationID}]).pipe(V(r))});return this.onGetInventory$.pipe(co((a,o)=>a?ut(a):e,null),V(a=>a),rt(1))}setUnitPrice(r){return ae({},r)}isEmptyDestinationID(){return!T.IsEmpty(this.destinationID)}static \u0275fac=function(e){return new(e||t)(C(xe),C($e),C(L),C(ie),C(nr),C(ee))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-item"]],viewQuery:function(e,a){if(e&1&&Ii(_d,5),e&2){let o;Ti(o=wi())&&(a._quantityElement=o.first)}},decls:12,vars:9,consts:[["quantity",""],["discount",""],["price",""],["SHOW_IMAGE",""],[3,"onOk","onCancel","onClose","config"],[1,"row","border-bottom","mx-5"],["data-cy","input_sell",1,"btn","btn-link",3,"click","ngClass"],["class","btn btn-link","data-cy","product",3,"ngClass","click",4,"ngIf"],[4,"ngIf"],[1,"mx-8"],["data-cy","product",1,"btn","btn-link",3,"click","ngClass"],["data-cy","serial",1,"btn","btn-link",3,"click","ngClass"],[1,"mt-8"],[1,"row","mt-8"],[1,"col-auto","mb-4","pe-0",2,"width","82px"],["id","txtCartQuantity","keyboardType","number","type","text","autoNum","",1,"form-control","input-numpad",3,"ngModelChange","simpleKeyboard","decimalPlaces","ngModel","disabled"],["class","col-auto pe-0","style","width: 112px",4,"ngIf"],[1,"col-auto","pe-0",2,"width","90px"],["id","inputDiscount","keyboardType","number","type","text","autoNum","","percentage","",1,"form-control",3,"ngModelChange","simpleKeyboard","ngModel","readonly"],[1,"row"],[1,"col","tinymce"],["height","210px",3,"ngModelChange","ngModel"],[1,"col"],[3,"formControl","isOnModalVariant"],[1,"col-auto","pe-0",2,"width","112px"],["id","inputPrice","keyboardType","number","type","text","autoNum","",1,"form-control",3,"ngModelChange","simpleKeyboard","ngModel"],[1,"row","mt-6"],[1,"col-sm-3","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],[1,"col-sm-9"],[1,"table","table-bordered","text-center","inventory-table","w-100"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[1,"bg-light-orange"],["aria-hidden","true",1,"fa-box-archive","fa-solid","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-house","fa-1x","me-2"],["class","bg-light-orange",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-plus-minus","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-sliders","fa-1x","me-2"],[1,"table-light","text-start"],[1,"text-end"],["class","text-end",4,"ngIf"],["rowspan","3",1,"table-light"],["rowspan","4",1,"table-light"],["class","text-danger",4,"ngIf"],["class","text-success",4,"ngIf"],[3,"ngClass"],["style","font-size: 12px","type","button","class","btn btn-success btn-sm me-2","matTooltipPosition","above","matTooltip","Adjust Bought Qty to max Inventory",3,"click",4,"ngIf"],[1,"text-danger"],[1,"text-success"],["type","button","matTooltipPosition","above","matTooltip","Adjust Bought Qty to max Inventory",1,"btn","btn-success","btn-sm","me-2",2,"font-size","12px",3,"click"],[3,"cartItemChange","entityId","cartItem","disabled"]],template:function(e,a){e&1&&(n(0,"modal-material",4),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",5)(3,"div")(4,"a",6),g("click",function(){return a.onTabChange("Cart")}),p(5," Cart "),i(),_(6,vd,2,3,"a",7)(7,xd,3,3,"ng-container",8),i()(),n(8,"div",9),_(9,Dd,20,12,"ng-container",8)(10,Rd,11,10,"ng-container",8)(11,Ad,2,3,"ng-container",8),i()()()),e&2&&(m("config",a.config),l(4),m("ngClass",M(7,no,a.tabState=="Cart")),l(2),m("ngIf",a.appConfigJSON.ModuleDelivery.OutletDelivery.Inventory&&(!a.isCreate||a.showInventory)&&a.role.inventory.View),l(),m("ngIf",a.isSerialItem),l(2),m("ngIf",a.tabState=="Cart"),l(),m("ngIf",a.tabState=="Product"&&a.role.inventory.View),l(),m("ngIf",a.tabState=="Serial"))},dependencies:[Z,pt,B,it,_e,St,ht,ot,fe,R,H,Pi,Ve,he,Ri,mt,Wi,gt,z,pr,or,Ki,kt,ti,zi,mr],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}p-chips[_ngcontent-%COMP%] ul.p-inputtext{width:570px;max-width:570px;border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] ul.p-inputtext li.p-chips-input-token>input[type=text]{border:none}p-chips[_ngcontent-%COMP%] .p-chips .p-chips-multiple-container:not(.p-disabled):hover{border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container{display:inline-block}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container .p-chips-token{margin:2px;background:#96bf48}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}"]})};var Nt=class t{loadForm=x(Le);newTransaction=x(Oe);isEdit=new dt(!1);isEdit$=this.isEdit.asObservable();constructor(){this.loadForm.data$.subscribe(()=>this.setIsEdit(!0)),this.newTransaction.createNewTransaction$.subscribe(()=>this.setIsEdit(!1))}setIsEdit(r){this.isEdit.next(r)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ot=class t{outlet=x(ce);loadForm=x(Le);route=x(pe);matDialog=x(A);isEdit$=x(Nt).isEdit$;_addItem=new Ie;addItem$=this._addItem.asObservable().pipe(j(()=>ut({outletID:this.outlet.sourceOutlet.value.ID,outletName:this.outlet.sourceOutlet.value.Name,destinationID:this.outlet.destinationOutlet.value.ID,destinationName:this.outlet.destinationOutlet.value.Name})),j(r=>xt([this.loadForm.config$,ut(r)]).pipe(zt(1))),ue(this.isEdit$),j(([[r,e],a])=>this.matDialog.open(xi,{data:{appConfigJSON:r,isEdit:a,outletID:e.outletID,outletName:e.outletName,destinationID:e.destinationID,destinationName:e.destinationName}}).afterClosed()),k(r=>T.IsNotEmpty(r?.item)),V(r=>r.item));_editItem=new Ie;editItem$=this._editItem.asObservable().pipe(j(r=>ut({outletID:this.outlet.sourceOutlet.value.ID,outletName:this.outlet.sourceOutlet.value.Name,destinationID:this.outlet.destinationOutlet.value.ID,destinationName:this.outlet.destinationOutlet.value.Name,item:r.item,index:r.index})),j(r=>xt([this.loadForm.config$,ut(r)]).pipe(zt(1))),ue(this.isEdit$),j(([[r,e],a])=>this.matDialog.open(xi,{data:{appConfigJSON:r,isEdit:a,outletID:e.outletID,outletName:e.outletName,destinationID:e.destinationID,destinationName:e.destinationName,variant:e.item}}).afterClosed().pipe(k(o=>T.IsNotEmpty(o?.item)),V(o=>({item:o.item,index:e.index})))));addItem(){this._addItem.next()}editItem(r,e){this._editItem.next({item:ae({},r),index:e})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var tt=class t{importCart=x(It);clearOutlet=x(Tt);loadForm=x(Le);quickKey=x($t);scanSerialService=x(Et);void=x(Je);newTrans=x(Oe);variantAutocomplete=x(Kt);itemDialog=x(Ot);lowOnStock=x(At);overOnStock=x(Bt);_cartAction=new Ie;cartAction$=this._cartAction.asObservable();outletService=x(ce);RFIDService=x(Ji);constructor(){this.outletService.sourceOutletID$.pipe(j(r=>this.RFIDService.processGroupedData(r)),J(r=>this.rfid(r))).subscribe(),this.cart$.subscribe(),Me(this.importCart.importedCart$,this.clearOutlet.populateCartWithAllItemsFromSourceOutlet$).pipe(V(r=>({action:"addBulkItems",items:r}))).subscribe(r=>this._cartAction.next(r)),Me(this.loadForm.items$,this.lowOnStock.items$,this.overOnStock.items$).pipe(k(r=>T.IsNotEmpty(r)&&r.length>0),V(r=>({action:"replaceCart",items:r}))).subscribe(r=>this._cartAction.next(r)),this.scanSerialService.item$.pipe(V(r=>({action:"scanSerial",item:this.formatItemObject(r)}))).subscribe(r=>this._cartAction.next(r)),Me(this.void.void$,this.newTrans.createNewTransaction$).subscribe(()=>this._cartAction.next({action:"emptyCart"})),Me(this.variantAutocomplete.getVariantByCode$,this.variantAutocomplete.getVariantByID$,this.quickKey.itemQuickKey$).pipe(V(r=>({action:"add",item:r}))).subscribe(r=>this._cartAction.next(r)),this.itemDialog.addItem$.pipe(V(r=>({action:"addToNewRow",item:r}))).subscribe(r=>this._cartAction.next(r)),this.itemDialog.editItem$.pipe(V(r=>({action:"update",item:r.item,index:r.index}))).subscribe(r=>this._cartAction.next(r))}rearrangeCart(r){this._cartAction.next({action:"rearrangeCart",ev:r})}remove(r){this._cartAction.next({action:"remove",index:r})}add(r){this._cartAction.next({action:"add",item:r})}addToNewRow(r){this._cartAction.next({action:"addToNewRow",item:r})}addbulkItems(r){this._cartAction.next({action:"addBulkItems",items:r})}replaceCart(r){this._cartAction.next({action:"replaceCart",items:r})}scanSerial(r){this._cartAction.next({action:"scanSerial",item:r})}return(r){this._cartAction.next({action:"return",index:r})}purchase(r){this._cartAction.next({action:"purchase",index:r})}rfid(r){this._cartAction.next({action:"rfid",items:r})}formatItemObject=r=>{let o=r,{ID:e}=o,a=ro(o,["ID"]);return le(ae({},a),{Quantity:a.Quantity??1,Total:a.Total??a.UnitPrice,VariantID:e})};cart$=this.cartAction$.pipe(Si((r,e)=>{let a=[...r],o=[],c=e.action;if(c=="add"){let O=e.item,Q=a.findIndex(re=>re.VariantID==O.ID);o=Q!=-1?a.map((re,Ue)=>Ue==Q?le(ae({},re),{Quantity:re.Quantity+1,Total:re.Total+re.UnitPrice}):re):[...a,this.formatItemObject(O)]}else if(c=="update"){let O=e.item,Q=e.index;o=a.map((re,Ue)=>Ue==Q?ae({},O):re)}else if(c=="remove"){let O=e.index;o=a.filter((Q,re)=>re!=O)}else if(c=="addToNewRow"){let O=e.item;o=[...a,this.formatItemObject(O)]}else if(c=="addBulkItems"){let O=e.items;o=[...a,...O.map(Q=>this.formatItemObject(Q))]}else if(c=="replaceCart")o=[...e.items];else if(c=="rearrangeCart"){let O=e.ev;o=a,ko(o,O.previousIndex,O.currentIndex)}else if(c=="emptyCart")o=[];else if(c=="scanSerial"){let O=le(ae({},e.item),{Serial:[{Number:e.item.Serial.Number,Quantity:1,ExpiryDate:e.item.Serial.ExpiryDate}]});if(!!a.find(re=>re.VariantID==O.VariantID)){let re=O.Serial[0],Ue=a.find(Y=>Y.VariantID==O.VariantID),Lt=!!Ue.Serial.find(Y=>Y.Number==re.Number)?[...Ue.Serial].map(Y=>Y.Number==re.Number?le(ae({},Y),{Quantity:Y.Quantity+1}):Y):[...Ue.Serial,re];o=a.map(Y=>Y.VariantID==O.VariantID?le(ae({},Y),{Quantity:Y.Quantity+1,Total:Y.Total+Y.UnitPrice,Serial:Lt}):Y)}else o=[...a,le(ae({},O),{Quantity:1,Total:O.UnitPrice})]}else if(c=="return"){let O=e.index;o=a.map((Q,re)=>re==O?le(ae({},Q),{Quantity:-Math.abs(Q.Quantity),Total:-Math.abs(Q.Total)}):Q)}else if(c=="purchase"){let O=e.index;o=a.map((Q,re)=>re==O?le(ae({},Q),{Quantity:Math.abs(Q.Quantity),Total:Math.abs(Q.Total)}):Q)}else if(c==="rfid"){let O=e.items;console.log("items",O);let Q=[];Object.keys(O).forEach(re=>{if(O.hasOwnProperty(re)){let Ue=O[re];if(Ue&&Object.keys(Ue.variant).length>0){let ci=a.findIndex(Lt=>Lt.Code.toLowerCase()===re.toLowerCase());if(ci!==-1){let Lt=Number(Ue.count);a[ci].Quantity+=Lt,delete O[re],Q=[...a]}else{let Lt=Ue.variant,Y=Number(Ue.count),qr=this.formatItemObject(le(ae({},Lt),{Quantity:Y}));delete O[re],Q=[...a,qr]}}}}),o=[...Q]}return o},[]),ze([]),rt(1));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var wn=class t{constructor(r){this.dialogRef=r;this.config.title="New Courier",this.config.customWidth="500px"}config=new ye;courier="";ok(){T.IsNotEmpty(this.courier)?this.dialogRef.close(this.courier):this.close()}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-add-courier"]],decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","placeholder","Add New Courier",1,"form-control",3,"ngModelChange","ngModel"],["for","newCourier"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"input",4),S("ngModelChange",function(c){return h(a.courier,c)||(a.courier=c),c}),i(),n(6,"label",5),p(7,"Add New Courier"),i()()()()()()),e&2&&(m("config",a.config),l(5),y("ngModel",a.courier))},dependencies:[Z,Ve,he,ot,fe,R,H],encapsulation:2})};var Qt=class t{http=x(L);loadForm=x(Le);toastr=x(ee);void=x(Je);matDialog=x(A);newTrans=x(Oe);outletService=x(ce);courierSubject=new dt([]);courierID=new Ge(null);_addNewCourier=new Ie;addNewCourier$=this._addNewCourier.asObservable().pipe(j(()=>this.matDialog.open(wn).afterClosed()),k(r=>T.IsNotEmpty(r)),j(r=>this.http.post("/API/TransferOrder/UpdateCourierList",{name:r}).pipe(V(e=>le(ae({},e),{Name:r}))).pipe(je(()=>ke))),J(r=>{this.courierID.setValue(r.ID),this.toastr.success(r.Message,Ce.Success)}));initialCouriers$=this.courierSubject.asObservable();couriers$=ao(this.initialCouriers$,this.addNewCourier$).pipe(Si((r,e)=>{let a=[];return Array.isArray(e)==!1?a=[...r,e]:a=e,a},[]));assignCourierID$=Me(this.loadForm.data$.pipe(V(r=>r.Order.CourierID==T.GuidEmpty?null:r.Order.CourierID),J(r=>this.courierID.setValue(r))),this.initialCouriers$.pipe(V(r=>{let e=null;return r?.length==1&&(e=r[0].ID),e}))).pipe(J(r=>{this.courierID.setValue(r)}));resetCourierID$=Me(this.void.void$,this.newTrans.createNewTransaction$).pipe(J(()=>this.courierID.setValue(null)));constructor(){this.assignCourierID$.subscribe(),this.resetCourierID$.subscribe(),this.listenDestinationChanges()}listenDestinationChanges(){this.outletService.destinationOutletID$.pipe(j(r=>T.IsEmpty(r)?ke:this.getCouriersByDestinationId(r).pipe()),at()).subscribe()}getCouriersByDestinationId(r){return this.http.get(`${Pe.GetCourierByOutletDestination}/${r}`).pipe(J(e=>{this.courierSubject.next(e.Data)}),je(e=>ke))}addNewCourier(){this._addNewCourier.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Jt=class t{loadForm=x(Le);void=x(Je);newTrans=x(Oe);invoiceDate=new Ge(new Date);assignInvoiceDate$=this.loadForm.data$.pipe(V(r=>r.Order.Date),J(r=>this.invoiceDate.setValue(r)));resetInvoiceDate$=Me(this.void.void$,this.newTrans.createNewTransaction$).pipe(J(()=>this.invoiceDate.setValue(new Date)));constructor(){this.assignInvoiceDate$.subscribe(),this.resetInvoiceDate$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var yi=class t{route=x(pe);void=x(Je);newTransaction=x(Oe);overOnStock=x(Bt);isOpenOutletDialog=new dt(!1);lowOnStock=x(At);outletService=x(ce);isOpenOutletDialog$=this.isOpenOutletDialog.asObservable().pipe(ue(this.outletService.sourceOutletID$),V(([r,e])=>T.IsNotEmpty(e)?!1:r));_onCloseOutletDialog=new dt(!1);isOpenDestinationDialog$=this._onCloseOutletDialog.pipe(ue(this.lowOnStock.destinationOutlet$.pipe(ze(null)),this.overOnStock.outletSource$.pipe(ze(null))),V(([r,e,a])=>{let o=!1;return T.IsNotEmpty(e)&&T.IsNotEmpty(e?.ID)?o=!1:T.IsNotEmpty(a)&&T.IsNotEmpty(a?.ID)?o=!0:o=r,o}));onCloseOutletDialog(){this._onCloseOutletDialog.next(!0)}isEdit$=ut(T.IsNotEmpty(this.route.snapshot.queryParams.ID)).pipe(J(r=>this.isOpenOutletDialog.next(!r)));reopenOutletDialog=this.void.void$.pipe(J(()=>this.isOpenOutletDialog.next(!0)));onCreateNewTransaction=this.newTransaction.createNewTransaction$.pipe(J(()=>this.isOpenOutletDialog.next(!0)));constructor(){this.isEdit$.subscribe(),this.reopenOutletDialog.subscribe(),this.onCreateNewTransaction.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Yt=class t{route=x(pe);outlet=x(ce);http=x(L);loadForm=x(Le);void=x(Je);newTrans=x(Oe);loadRegister=x(wt);outletID$=this.outlet.sourceOutletID$;orderNumber=new Ge("");assignGeneratedNumber$=this.loadRegister.loadRegister$.pipe(k(()=>T.IsEmpty(this.route.snapshot.queryParams.ID)),V(r=>r.Number),J(r=>this.orderNumber.setValue(r)));assignOrderNumber$=this.loadForm.data$.pipe(V(r=>r.Order.Number),J(r=>this.orderNumber.setValue(r)));resetOrderNumber$=this.newTrans.createNewTransaction$.pipe(J(()=>this.orderNumber.setValue("")));generateOrderNumberOnNewTransaction$=this.newTrans.createNewTransaction$.pipe(ue(this.outletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.http.post("/API/TransferOrder/GenerateNumber",{ID:e})),J(r=>this.orderNumber.setValue(r.Number)));constructor(){this.assignGeneratedNumber$.subscribe(),this.assignOrderNumber$.subscribe(),this.generateOrderNumberOnNewTransaction$.subscribe(),this.resetOrderNumber$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Bd=()=>["/menu/Products/Catalog/Variants/Info"],Wd=t=>({ID:t});function Hd(t,r){if(t&1&&(n(0,"div"),p(1),i()),t&2){let e=r.$implicit;l(),b(e)}}function jd(t,r){if(t&1&&(n(0,"tr")(1,"td")(2,"a",11),p(3),i(),n(4,"small",12),p(5),i()(),n(6,"td",13),p(7),i(),n(8,"td",13),p(9),i(),n(10,"td",13),p(11),i(),n(12,"td",13),p(13),i(),n(14,"td",13),p(15),i(),n(16,"td",13),p(17),i(),n(18,"td"),_(19,Hd,2,1,"div",10),i()()),t&2){let e=r.$implicit;l(2),m("routerLink",N(11,Bd))("queryParams",M(12,Wd,e.VariantID)),l(),b(e.Name),l(2),b(e.Code),l(2),b(e.RequestQuantity),l(2),b(e.SourceInventory.Available),l(2),b(e.DestinationInventory.Available),l(2),b(e.DestinationInventory.ROP),l(2),b(e.DestinationInventory.Max),l(2),b(e.RecommendedQuantity),l(2),m("ngForOf",e.Notes)}}var En=class t{constructor(r,e){this.dialogRef=r;this.config.title="Analyze",this.config.customWidth="700px",this.config.hideFooter=!0,this.config.bodyScrollable=!0,this.inventory=e.inventory,console.log(this.inventory)}config=new ye;inventory;close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe),C($e))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-analyze-inventory"]],decls:26,vars:2,consts:[[3,"onCancel","onClose","config"],[1,"container-fluid"],[1,"row"],[1,"col-12"],["id","tableGrid",1,"table","table-bordered"],[1,"thead-light"],["matTooltip","Source Inventory","matTooltipPosition","above",1,"fa-solid","fa-house"],["matTooltip","Destination Inventory","matTooltipPosition","above",1,"fa-solid","fa-truck"],["matTooltip","Source Outlet ROP","matTooltipPosition","above"],["matTooltip","Source Outlet MAX","matTooltipPosition","above"],[4,"ngFor","ngForOf"],["target","_blank",3,"routerLink","queryParams"],[1,"d-block"],[1,"text-end"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"table",4)(6,"thead",5)(7,"tr")(8,"th"),p(9,"Product"),i(),n(10,"th"),p(11,"Req"),i(),n(12,"th"),f(13,"i",6),i(),n(14,"th"),f(15,"i",7),i(),n(16,"th",8),p(17,"ROP"),i(),n(18,"th",9),p(19,"MAX"),i(),n(20,"th"),p(21,"Recommend"),i(),n(22,"th"),p(23,"Note"),i()()(),n(24,"tbody"),_(25,jd,20,14,"tr",10),i()()()()()()()),e&2&&(m("config",a.config),l(25),m("ngForOf",a.inventory))},dependencies:[Z,K,ii,Ae,Ve,he,gt,z],encapsulation:2})};var qt=class t{http=x(L);outlet=x(ce);matDialog=x(A);cart=x(tt);_analyze=new Ie;analyze$=this._analyze.asObservable();analyzeInventory$=this.analyze$.pipe(j(()=>xt([this.outlet.sourceOutletID$,this.outlet.destinationOutletID$,this.cart.cart$]).pipe(zt(1))),k(([r,e,a])=>T.IsNotEmpty(r)&&T.IsNotEmpty(e)&&a.length>0),j(([r,e,a])=>this.http.post("/API/TransferOrder/Analyze",{DestinationOutlet:e,Items:a.map(o=>le(ae({},o),{ID:o.VariantID})),SourceOutlet:r}).pipe(V(o=>o.map(c=>le(ae({},c),{Code:a.find(O=>O.VariantID===c.VariantID)?.Code,VariantID:a.find(O=>O.VariantID===c.VariantID)?.VariantID,Name:a.find(O=>O.VariantID===c.VariantID)?.Name}))),je(()=>ke))),j(r=>this.matDialog.open(En,{data:{inventory:r}}).afterClosed()));constructor(){this.analyzeInventory$.subscribe()}analyze(){this._analyze.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var oo=t=>({selected:t});function Qd(t,r){if(t&1){let e=D();n(0,"div",9)(1,"label",10)(2,"input",11),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.typeID,o)||(c.typeID=o),u(o)}),i(),p(3),i()()}if(t&2){let e=r.$implicit,a=r.index,o=s(2);l(),_i("for","potype-"+a),m("ngClass",M(6,oo,o.typeID==e.ID)),l(),_i("id","potype-"+a),y("ngModel",o.typeID),m("value",e.ID),l(),I(" ",e.Name," ")}}function qd(t,r){if(t&1&&(n(0,"div",6),q(1),n(2,"div",7),_(3,Qd,4,8,"div",8),i(),U(),i()),t&2){let e=s();l(3),m("ngForOf",e.deliveryTypes)}}function Ud(t,r){if(t&1){let e=D();n(0,"div",6),q(1),n(2,"div",7)(3,"POS-tinymce-editor",12),S("ngModelChange",function(o){d(e);let c=s();return h(c.note,o)||(c.note=o),u(o)}),i()(),U(),i()}if(t&2){let e=s();l(3),y("ngModel",e.note)}}var On=class t{constructor(r,e){this.dialogRef=r;this.config.title="Notes",this.config.customWidth="600px",this.deliveryTypes=e.deliveryTypes,this.typeID=e.typeID,this.note=e.note||""}currentTabState=1;modalTabState=ur;config=new ye;deliveryTypes;typeID="";note="";ok(){this.dialogRef.close({typeID:this.typeID,note:this.note})}close(){this.dialogRef.close()}onTabChange(r){this.currentTabState=r}static \u0275fac=function(e){return new(e||t)(C(xe),C($e))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-delivery-type"]],decls:11,vars:9,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[1,"row","border-bottom"],["data-cy","tab-note",1,"btn","btn-link","note-tab",3,"click","ngClass"],["data-cy","tab-type",1,"btn","btn-link","note-tab",3,"click","ngClass"],["class","row mt-8",4,"ngIf"],[1,"row","mt-8"],[1,"col-12"],["class","rad-btn",4,"ngFor","ngForOf"],[1,"rad-btn"],[3,"for","ngClass"],["type","radio",3,"ngModelChange","ngModel","value","id"],[3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"div")(5,"a",3),g("click",function(){return a.onTabChange(a.modalTabState.NOTE)}),p(6," Note "),i(),n(7,"a",4),g("click",function(){return a.onTabChange(a.modalTabState.TYPE)}),p(8," Tag "),i()()(),_(9,qd,4,1,"div",5)(10,Ud,4,1,"div",5),i()()()),e&2&&(m("config",a.config),l(5),m("ngClass",M(5,oo,a.modalTabState.NOTE==a.currentTabState)),l(2),m("ngClass",M(7,oo,a.modalTabState.TYPE==a.currentTabState)),l(2),m("ngIf",a.modalTabState.TYPE==a.currentTabState),l(),m("ngIf",a.modalTabState.NOTE==a.currentTabState))},dependencies:[Z,pt,K,B,ot,fe,ho,R,H,Ve,he,St,ht],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}content[_ngcontent-%COMP%] > div.container-fluid[_ngcontent-%COMP%]{min-height:200px}.tinymce[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{z-index:2;position:absolute;right:15px;bottom:19px}.tinymce[_ngcontent-%COMP%] editor[_ngcontent-%COMP%]{height:max-content;z-index:1}.rad-btn[_ngcontent-%COMP%]{position:relative;display:inline-block}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #dddddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label.selected[_ngcontent-%COMP%]{background:#dcdcdc;border:1px solid #dcdcdc}.btn-link.note-tab[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.note-tab.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}a.btn.btn-link.note-tab[_ngcontent-%COMP%]{color:inherit}.ng-select.currency-option[_ngcontent-%COMP%]{width:36%!important}.col-12[_ngcontent-%COMP%]{height:250px}"]})};var Ut=class t{loadForm=x(Le);void=x(Je);matDialog=x(A);newTrans=x(Oe);isEdit$=x(Nt).isEdit$;typeID=new Ge(T.GuidEmpty);note=new Ge("");assignNote$=this.loadForm.data$.pipe(V(r=>r.Order?.Note??""),J(r=>this.note.setValue(r)));assignDefaultTypeID$=this.loadForm.deliveryTypes$.pipe(ue(this.isEdit$),k(([r,e])=>!e),V(([r,e])=>r[0]?.ID),J(r=>this.typeID.setValue(r)));assignTypeID$=this.loadForm.data$.pipe(V(r=>r.Order.TypeID),J(r=>this.typeID.setValue(r)));resetTypeID$=Me(this.void.void$,this.newTrans.createNewTransaction$).pipe(j(()=>this.loadForm.deliveryTypes$),V(r=>r[0]?.ID),J(r=>{this.typeID.setValue(r),this.note.setValue("")}));_openTypeIDDialog=new Ie;openTypeIDDialog$=this._openTypeIDDialog.asObservable().pipe(ue(this.loadForm.deliveryTypes$),j(([r,e])=>this.matDialog.open(On,{data:{typeID:this.typeID.value,deliveryTypes:e,note:this.note.value}}).afterClosed()),k(r=>T.IsNotEmpty(r)),J(r=>{this.typeID.setValue(r?.typeID),this.note.setValue(r?.note)}));constructor(){console.log("TypeIDService initialized"),this.assignDefaultTypeID$.pipe(at()).subscribe(),this.assignTypeID$.pipe(at()).subscribe(),this.resetTypeID$.pipe(at()).subscribe(),this.openTypeIDDialog$.pipe(at()).subscribe(),this.assignNote$.pipe(at()).subscribe()}openDeliveryTypeDialog(){this._openTypeIDDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var vt=class t{http=x(L);matDialog=x(A);outlet=x(ce);date=x(Jt);number=x(Yt);courier=x(Qt);deliveryTypeID=x(Ut);cart=x(tt);loadForm=x(Le);loadRegister=x(wt);_processTransaction=new Ie;processTransaction$=this._processTransaction.asObservable();submitOrder$=this.processTransaction$.pipe(j(()=>xt([this.outlet.sourceOutletID$,this.outlet.destinationOutletID$,this.cart.cart$]).pipe(zt(1))),k(([r,e,a])=>T.IsNotEmpty(r)&&T.IsNotEmpty(e)&&a.length>0),V(()=>this.deliveryTypeID.note.value),ue(this.cart.cart$,this.loadRegister.loadRegister$.pipe(V(r=>r.NewOrderID)),this.loadForm.loadForm$),j(([r,e,a,o])=>{let c={Order:{SourceEntityID:this.outlet.sourceOutlet.value.ID,DestinationEntityID:this.outlet.destinationOutlet.value.ID,Date:this.date.invoiceDate.value,Number:this.number.orderNumber.value,CourierID:T.IsEmpty(this.courier.courierID.value)?T.GuidEmpty:this.courier.courierID.value,TypeID:this.deliveryTypeID.typeID.value,Note:r,ID:o.Data.Order?.ID,StateID:o.Data.Order?.StateID},Items:e,NewOrderID:a};return this.http.post("/api/TransferOrder/SubmitOrder2",c).pipe(V(O=>le(ae({},O),{PrintTemplateID:o.Entities.find(Q=>Q.ID===this.outlet.sourceOutlet.value.ID)?.PrintTemplateID})),je(()=>ke))}),rt(1));constructor(){this.submitOrder$.subscribe()}processTransaction(){this._processTransaction.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Mn=class t{toastr=x(ee);clearOutlet=x(Tt);analyze=x(qt);outlet=x(ce);scanSerial=x(Et);cart=x(tt);processTransaction=x(vt);importCart=x(It);toastrOnEmptySourceOutlet$=Me(this.clearOutlet.clearOutlet$,this.analyze.analyze$,this.scanSerial.scanSerial$,this.processTransaction.processTransaction$,this.importCart.import$).pipe(ue(this.outlet.sourceOutletID$),k(([r,e])=>e===T.GuidEmpty),J(()=>this.toastr.info("Please select source outlet",Ce.Info)));toastrOnEmptyDestinationOutlet$=Me(this.analyze.analyze$,this.processTransaction.processTransaction$).pipe(ue(this.outlet.destinationOutletID$),k(([r,e])=>e===T.GuidEmpty),J(()=>this.toastr.info("Please select destination outlet",Ce.Info)));toastrOnEmptyCart$=Me(this.analyze.analyze$,this.processTransaction.processTransaction$).pipe(ue(this.cart.cart$),k(([r,e])=>e.length===0),J(()=>this.toastr.info("Please add item to cart",Ce.Info)));constructor(){this.toastrOnEmptySourceOutlet$.subscribe(),this.toastrOnEmptyDestinationOutlet$.subscribe(),this.toastrOnEmptyCart$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var hi=class t{createNewTransaction=x(Oe);processTransaction=x(vt);_isComplete=new dt(!1);isComplete$=this._isComplete.asObservable();constructor(){this.createNewTransaction.createNewTransaction$.subscribe(()=>this._isComplete.next(!1)),this.processTransaction.submitOrder$.subscribe(()=>this._isComplete.next(!0))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var zd=(t,r)=>({ID:t,Template:r}),Gd=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],$d=t=>({ID:t});function Kd(t,r){if(t&1&&(n(0,"div",25)(1,"div",26),p(2),i(),n(3,"div",26),p(4),i()()),t&2){let e=r.$implicit;l(2),b(e.Name),l(2),b(e.Quantity)}}var Pn=class t{handleF8(){this.createNewTransaction()}pageSetup=x(te);title=x(ei);afterProcessData;cartItems;orderNumber;newTransService=x(Oe);toastr=x(ee);menu$;fullContainerEl=document.getElementById("full-container");constructor(){this.pageSetup.setMenu$(),this.menu$=this.pageSetup.menu$.pipe(V(r=>le(ae({},r),{H:"Transfer Order",T:r.T.replace("undefined","Transfer Order")})),J(r=>this.title.setTitle(r.T)))}ngOnChanges(){this.orderNumber&&this.afterProcessData&&this.orderNumber!==this.afterProcessData.InvoiceNumber&&this.toastr.warning("Your transfer order number is changed to "+this.afterProcessData.InvoiceNumber,"Transfer Order Number Changed!")}ngAfterViewInit(){this.fullContainerEl.classList.remove("full-container")}ngOnDestroy(){this.fullContainerEl.classList.add("full-container")}createNewTransaction(){this.newTransService.createNewTransaction()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-complete"]],hostBindings:function(e,a){e&1&&g("keydown.F8",function(){return a.handleF8()},!1,Zt)},inputs:{afterProcessData:"afterProcessData",cartItems:"cartItems",orderNumber:"orderNumber"},features:[uo],decls:37,vars:23,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"order-complete"],[1,"container-fluid","pt-8"],[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","py-5"],["target","_blank",1,"btn","bg-light-gray","btn-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[1,"col","text-end"]],template:function(e,a){e&1&&(n(0,"mainpanel-cmp",0),v(1,"async"),n(2,"content")(3,"section",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"h1",7),f(10,"i",8),p(11,"Transfer Order Complete "),i()(),n(12,"div",9)(13,"div",10)(14,"div",11)(15,"a",12),g("click",function(){return a.createNewTransaction()}),p(16,"New Transfer Order (F8)"),i()()()(),n(17,"div",13)(18,"div",14)(19,"a",15),f(20,"i",16),p(21,"Print Receipt"),i()()()()(),n(22,"div",17)(23,"div",5)(24,"div",18)(25,"h3",19)(26,"a",20),p(27),i()()(),n(28,"div",21),_(29,Kd,5,2,"div",22),n(30,"div",23)(31,"div",24),p(32,"Total:"),i(),n(33,"div",24),p(34),v(35,"sum"),v(36,"number"),i()()()()()()()()()()),e&2&&(m("pageData",E(1,10,a.menu$))("hideSearchDropdown",!0)("hideSearchBox",!0),l(19),m("routerLink","/print/"+(a.afterProcessData.PrintMode=="1"?"Transfer":"TransferMini"))("queryParams",Re(17,zd,a.afterProcessData.OrderID,a.afterProcessData.PrintTemplateID)),l(7),m("routerLink",N(20,Gd))("queryParams",M(21,$d,a.afterProcessData.OrderID)),l(),I("Transfer Order #",a.afterProcessData.InvoiceNumber,""),l(2),m("ngForOf",a.cartItems),l(5),I(" ",E(36,15,P(35,12,a.cartItems,"Quantity"))," "))},dependencies:[Z,K,it,_e,ni,Be,gt,z,Hi,ne],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block;text-align:left}.order-complete[_ngcontent-%COMP%]{display:none}}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.125);padding-bottom:.9375rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{max-width:500px;margin-top:30px;margin-bottom:30px}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:15px!important}"]})};var Fn=class t{analyzeService=x(qt);analyze(){this.analyzeService.analyze()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-analyze"]],decls:1,vars:0,consts:[["icon","fa-sharp fa-solid fa-magnifying-glass-chart","label","Analyze",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.analyze()}),i())},dependencies:[Z,bt],encapsulation:2})};var Vn=class t{voidService=x(Je);voidTransaction(){this.voidService.void()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-void"]],decls:1,vars:0,consts:[["icon","fa-solid fa-rectangle-xmark","label","Void",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.voidTransaction()}),i())},dependencies:[Z,bt],encapsulation:2})};var Nn=class t{importCartService=x(It);importCart(){this.importCartService.import()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-import-cart"]],decls:1,vars:0,consts:[["icon","fa-solid fa-upload","label","Upload",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.importCart()}),i())},dependencies:[Z,bt],encapsulation:2})};var Jd=["serialInput"],Ln=class t{constructor(r,e,a){this.dialogRef=r;this.toastr=e;this.scanSerialService=a;this.modalConfig.title="Scan Serial",this.modalConfig.customWidth="350px",this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}serialInputEl;modalConfig=new ye;serial;ngOnInit(){}onKeyDown(r){r.key=="Enter"&&(T.IsNotEmpty(this.serial)?(this.scanSerialService.scanSerial(this.serial),this.serial=null):this.toastr.warning("Serial Can`t be empty","Warning!"),this.setFocusInput())}setFocusInput(){this.serialInputEl&&setTimeout(()=>{this.serialInputEl?.nativeElement?.focus()},500)}static \u0275fac=function(e){return new(e||t)(C(xe),C(ee),C(Et))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-scan-serial"]],viewQuery:function(e,a){if(e&1&&Ii(Jd,5),e&2){let o;Ti(o=wi())&&(a.serialInputEl=o.first)}},decls:7,vars:2,consts:[["serialInput",""],[3,"onClose","config"],[1,"input-group","mt-3"],["type","text","placeholder","Input Product By Serial","aria-label","Serial",1,"form-control",3,"ngModelChange","keydown","ngModel"],[1,"input-group-text"],[1,"fa-solid","fa-barcode","fs-4"]],template:function(e,a){if(e&1){let o=D();n(0,"modal-material",1),g("onClose",function(){return d(o),u(a.dialogRef.close())}),n(1,"content")(2,"div",2)(3,"input",3,0),S("ngModelChange",function(O){return d(o),h(a.serial,O)||(a.serial=O),u(O)}),g("keydown",function(O){return d(o),u(a.onKeyDown(O))}),i(),n(5,"span",4),f(6,"i",5),i()()()()}e&2&&(m("config",a.modalConfig),l(3),y("ngModel",a.serial))},dependencies:[Z,ot,fe,R,H,Ve,he],encapsulation:2})};var kn=class t{vcr=x(fo);matDialog=x(A);scanSerial(){this.matDialog.open(Ln,{viewContainerRef:this.vcr})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-scan-serial"]],decls:1,vars:0,consts:[["icon","fa-solid fa-barcode-read","label","Serial",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.scanSerial()}),i())},dependencies:[Z,bt],encapsulation:2})};var Rn=class t{handleF8(){this.addItem()}itemDialog=x(Ot);addItem(){this.itemDialog.addItem()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-add-item"]],hostBindings:function(e,a){e&1&&g("keydown.F4",function(){return a.handleF8()},!1,Zt)},decls:1,vars:0,consts:[["icon","fa-circle-plus fa-solid","label","Add",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.addItem()}),i())},dependencies:[Z,bt],encapsulation:2})};var Yd=t=>({disabled:t}),Xd=(t,r)=>({red:t,green:r}),An=class t{RFIDService=x(Ji);matDialog=x(A);constructor(){}onOpenModal(){this.matDialog.open(xr).componentInstance.onOK.pipe(J(({hostURL:e,bufferTime:a})=>{this.RFIDService.bufferTime=a,this.RFIDService.intializeWebSocket(e)})).subscribe()}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-connect-rfid"]],decls:8,vars:13,consts:[[1,"dropdown-item","px-1","d-flex",3,"click","ngClass"],["aria-hidden","true",1,"fa-solid","fa-wifi","fs-2"],[1,"pe-0","ps-4","fs-6"],[1,"blob",2,"position","absolute","top","0","right","0",3,"ngClass"]],template:function(e,a){e&1&&(n(0,"div",0),v(1,"async"),g("click",function(){return a.onOpenModal()}),f(2,"i",1),n(3,"label",2),p(4,"Connect RFID"),i(),f(5,"div",3),v(6,"async"),v(7,"async"),i()),e&2&&(m("ngClass",M(8,Yd,E(1,2,a.RFIDService.isConnected))),l(5),m("ngClass",Re(10,Xd,!E(6,4,a.RFIDService.isConnected),E(7,6,a.RFIDService.isConnected))))},dependencies:[Ve,pt,it],styles:[".disabled[_ngcontent-%COMP%]{color:gray;pointer-events:none;cursor:not-allowed}.blob[_ngcontent-%COMP%]{background:#000;border-radius:50%;box-shadow:0 0 #000;height:15px;width:15px;transform:scale(1);animation:_ngcontent-%COMP%_pulse-black 2s infinite}@keyframes _ngcontent-%COMP%_pulse-black{0%{transform:scale(.95);box-shadow:0 0 #000000b3}70%{transform:scale(1);box-shadow:0 0 0 10px #0000}to{transform:scale(.95);box-shadow:0 0 #0000}}.blob.white[_ngcontent-%COMP%]{background:#fff;box-shadow:0 0 #fff;animation:_ngcontent-%COMP%_pulse-white 2s infinite}@keyframes _ngcontent-%COMP%_pulse-white{0%{transform:scale(.95);box-shadow:0 0 #ffffffb3}70%{transform:scale(1);box-shadow:0 0 0 10px #fff0}to{transform:scale(.95);box-shadow:0 0 #fff0}}.blob.red[_ngcontent-%COMP%]{background:#ff5252;box-shadow:0 0 #ff5252;animation:_ngcontent-%COMP%_pulse-red 2s infinite}@keyframes _ngcontent-%COMP%_pulse-red{0%{transform:scale(.95);box-shadow:0 0 #ff5252b3}70%{transform:scale(1);box-shadow:0 0 0 10px #ff525200}to{transform:scale(.95);box-shadow:0 0 #ff525200}}.blob.orange[_ngcontent-%COMP%]{background:#ff793f;box-shadow:0 0 #ff793f;animation:_ngcontent-%COMP%_pulse-orange 2s infinite}@keyframes _ngcontent-%COMP%_pulse-orange{0%{transform:scale(.95);box-shadow:0 0 #ff793fb3}70%{transform:scale(1);box-shadow:0 0 0 10px #ff793f00}to{transform:scale(.95);box-shadow:0 0 #ff793f00}}.blob.yellow[_ngcontent-%COMP%]{background:#ffb142;box-shadow:0 0 #ffb142;animation:_ngcontent-%COMP%_pulse-yellow 2s infinite}@keyframes _ngcontent-%COMP%_pulse-yellow{0%{transform:scale(.95);box-shadow:0 0 #ffb142b3}70%{transform:scale(1);box-shadow:0 0 0 10px #ffb14200}to{transform:scale(.95);box-shadow:0 0 #ffb14200}}.blob.blue[_ngcontent-%COMP%]{background:#34ace0;box-shadow:0 0 #34ace0;animation:_ngcontent-%COMP%_pulse-blue 2s infinite}@keyframes _ngcontent-%COMP%_pulse-blue{0%{transform:scale(.95);box-shadow:0 0 #34ace0b3}70%{transform:scale(1);box-shadow:0 0 0 10px #34ace000}to{transform:scale(.95);box-shadow:0 0 #34ace000}}.blob.green[_ngcontent-%COMP%]{background:#77d933;box-shadow:0 0 #77d933;animation:_ngcontent-%COMP%_pulse-green 2s infinite}@keyframes _ngcontent-%COMP%_pulse-green{0%{transform:scale(.95);box-shadow:0 0 #33d938b3}70%{transform:scale(1);box-shadow:0 0 0 10px #33d9b200}to{transform:scale(.95);box-shadow:0 0 #33d9b200}}.blob.purple[_ngcontent-%COMP%]{background:#8e44ad;box-shadow:0 0 #8e44ad;animation:_ngcontent-%COMP%_pulse-purple 2s infinite}@keyframes _ngcontent-%COMP%_pulse-purple{0%{transform:scale(.95);box-shadow:0 0 #8e44adb3}70%{transform:scale(1);box-shadow:0 0 0 10px #8e44ad00}to{transform:scale(.95);box-shadow:0 0 #8e44ad00}}"]})};var Bn=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-more-action-shell"]],decls:28,vars:0,consts:[["id","moreMenu","data-bs-toggle","dropdown",1,"d-flex","align-items-center","cursor-pointer"],[1,"me-2"],[1,"fa-solid","fa-caret-down","fa-lg"],[1,"fs-6","headings-font-family","pb-1"],[1,"h-100","d-flex","align-items-center","justify-content-between"],["aria-labelledby","moreMenu",1,"dropdown-menu","more-actions"],[1,"d-flex",2,"width","33rem"],[1,"dropdown-header","text-dark","col"],[1,"h5","mb-4"],[1,"dropdown-divider","m-0"],[1,"cursor-pointer"],[1,"position-relative"]],template:function(e,a){e&1&&(n(0,"span",0)(1,"span",1),f(2,"i",2),i(),n(3,"span",3),p(4,"More Actions"),i()(),n(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),p(10,"Order"),i(),f(11,"div",9),n(12,"li",10),f(13,"POS-analyze"),i(),n(14,"li",10),f(15,"POS-void"),i()(),n(16,"div",7)(17,"div",8),p(18,"Item"),i(),f(19,"div",9),n(20,"li",10),f(21,"POS-add-item"),i(),n(22,"li",10),f(23,"POS-scan-serial"),i(),n(24,"li",10),f(25,"POS-import-cart"),i(),n(26,"li",11),f(27,"POS-connect-rfid"),i()()()()())},dependencies:[Z,Fn,Vn,Nn,kn,Rn,An],encapsulation:2})};var Wn=class t{courierService=x(Qt);courierForm=this.courierService.courierID;couriers$=this.courierService.couriers$;addNewCourier(){this.courierService.addNewCourier()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-courier-selection"]],decls:4,vars:4,consts:[[1,"d-flex","align-items-center"],["matTooltipPosition","below","matTooltip","New courier form",1,"fa-solid","fa-user","pointer",3,"click"],["bindLabel","Name","bindValue","ID","placeholder","Assign courier",1,"courier-select","w-100",3,"items","formControl"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"i",1),g("click",function(){return a.addNewCourier()}),i(),f(2,"ng-select",2),v(3,"async"),i()),e&2&&(l(2),m("items",E(3,2,a.couriers$))("formControl",a.courierForm))},dependencies:[Z,it,Te,kt,R,ti,ii,Ae],styles:[".courier-select .ng-select-container{border:none} .courier-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border:none;box-shadow:none}"]})};function Zd(t,r){if(t&1&&(n(0,"td",22),p(1),i()),t&2){let e=s().index;l(),I(" ",e+1,". ")}}function e0(t,r){if(t&1&&(q(0),n(1,"div",23),f(2,"img",24),i(),U()),t&2){let e=s().$implicit;l(2),m("src",e.ThumbnailUrl,Xt)}}function t0(t,r){t&1&&(n(0,"div",25),f(1,"i",26),i())}function i0(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.Quantity))}}function n0(t,r){t&1&&(n(0,"span",27),p(1," x "),i())}function o0(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.UnitQuantity))}}function r0(t,r){if(t&1&&(q(0),n(1,"div",28),p(2),v(3,"number"),i(),U()),t&2){let e=s().$implicit;l(2),I(" ",P(3,1,e.UnitPrice,"1.0-4")," ")}}function a0(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I("-",E(2,1,e.Discount),"%")}}function l0(t,r){if(t&1&&(q(0),n(1,"span",29),p(2),v(3,"number"),i(),U()),t&2){let e=s().$implicit;l(2),I(" ",E(3,1,e.Total)," ")}}function p0(t,r){if(t&1){let e=D();n(0,"tr",7),g("contextmenu",function(){let o=d(e).index,c=s(2);return u(c.onContextMenu(o))})("click",function(){let o=d(e),c=o.$implicit,O=o.index,Q=s(2);return u(Q.update(c,O))}),_(1,Zd,2,1,"td",8),n(2,"td",9)(3,"div",10),_(4,e0,3,1,"ng-container",11)(5,t0,2,0,"ng-template",null,1,X),n(7,"div",12)(8,"div"),p(9),i(),n(10,"span",13),p(11),i(),f(12,"app-serial-note",14)(13,"small",15),i()()(),n(14,"td",16)(15,"span"),_(16,i0,3,3,"span",17)(17,n0,2,0,"span",18)(18,o0,3,3,"span",17),i()(),n(19,"td"),_(20,r0,4,4,"ng-container",17),i(),n(21,"td",19),_(22,a0,3,3,"span",17),i(),n(23,"td",16),_(24,l0,4,3,"ng-container",17),i(),n(25,"td",20)(26,"i",21),g("click",function(){let o=d(e).index,c=s(2);return u(c.deleteVariant(o))}),i()()()}if(t&2){let e=r.$implicit,a=Fe(6),o=s(2);m("cdkDragDisabled",!o.enabledDragDrop),l(),m("ngIf",o.appConfigJSON==null?null:o.appConfigJSON.ModuleSell.Grid.RowNumberVisible),l(),Mt("ps-0",o.appConfigJSON==null?null:o.appConfigJSON.ModuleSell.Grid.RowNumberVisible),l(2),m("ngIf",e.ThumbnailUrl)("ngIfElse",a),l(5),b(e.Name),l(2),b(e.Code),l(),m("serials",e.Serial),l(),m("innerHtml",e.Note,W),l(3),m("ngIf",e.Quantity!=1||e.UnitQuantity>1),l(),m("ngIf",e.UnitQuantity>1||e.UnitQuantity<-1),l(),m("ngIf",e.UnitQuantity>1||e.UnitQuantity<-1),l(2),m("ngIf",(o.appConfigJSON==null?null:o.appConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible)&&e.Total!=e.UnitPrice),l(2),m("ngIf",e.Discount),l(2),m("ngIf",(o.appConfigJSON==null?null:o.appConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible)&&e.Total)}}function m0(t,r){if(t&1){let e=D();n(0,"div",3)(1,"table",4)(2,"tbody",5),g("cdkDropListDropped",function(o){d(e);let c=s();return u(c.drop(o))}),_(3,p0,27,16,"tr",6),i()()()}if(t&2){let e=s();l(3),m("ngForOf",e.cart)}}function c0(t,r){t&1&&(n(0,"div",30)(1,"div",31)(2,"div",32)(3,"div",33)(4,"div",34),f(5,"i",35),i(),n(6,"div",36)(7,"span"),p(8,"Empty Cart"),i(),f(9,"br"),n(10,"span"),p(11,"Add products to the cart"),i(),f(12,"br"),n(13,"span"),p(14,"or scan barcode"),i()()()()()())}var Hn=class t{cart=[];appConfigJSON;role=x(ie);cartService=x(tt);itemDialog=x(Ot);enabledDragDrop=!0;onOpenContextMenuIndex=-1;constructor(){this.setDragDropEnabled()}setDragDropEnabled(){T.isMobileDevice&&(this.enabledDragDrop=!1)}onContextMenu(r){this.onOpenContextMenuIndex=r}onReturn(){this.cartService.return(this.onOpenContextMenuIndex)}onPurchase(){this.cartService.purchase(this.onOpenContextMenuIndex)}deleteVariant(r){this.cartService.remove(r)}update(r,e){this.itemDialog.editItem(r,e)}drop(r){this.cartService.rearrangeCart(r)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-cart-display"]],inputs:{cart:"cart",appConfigJSON:"appConfigJSON"},decls:3,vars:2,consts:[["EMPTY_CART",""],["NO_IMAGE",""],["PinScrollingBottom","","class","h-100","style","overflow-y: auto",4,"ngIf","ngIfElse"],["PinScrollingBottom","",1,"h-100",2,"overflow-y","auto"],[1,"table","table-borderless"],["cdkDropList","",3,"cdkDropListDropped"],["class","border-bottom","cdkDrag","",3,"cdkDragDisabled","contextmenu","click",4,"ngFor","ngForOf"],["cdkDrag","",1,"border-bottom",3,"contextmenu","click","cdkDragDisabled"],["style","width: 10px",4,"ngIf"],[2,"width","50%"],[1,"d-flex"],[4,"ngIf","ngIfElse"],[1,"ms-4","d-flex","flex-column","justify-content-center",2,"line-height","18px"],[1,"fw-normal","fs-6","text-muted"],[3,"serials"],["title","Note",1,"special-TinyMCE","m-0","fst-italic","d-block",3,"innerHtml"],[1,"text-end"],[4,"ngIf"],["class","fs-6",4,"ngIf"],[1,"text-end","text-danger"],[1,"text-end",2,"width","75px"],[1,"fa-solid","fa-trash","fs-4","text-danger","pointer",3,"click"],[2,"width","10px"],[1,"ratio","ratio-1x1",2,"width","55px"],[1,"item-image",3,"src"],[1,"item-image","d-flex","justify-content-center","align-items-center","text-center","fs-1"],[1,"fa-solid","fa-image",2,"color","#b4b4b4c2"],[1,"fs-6"],[1,"fs-5","text-end"],[1,"fs-5"],[1,"row","g-0","h-100"],[1,"col-12"],[1,"d-flex","justify-content-center","align-items-center","h-100"],[1,"row"],[1,"col-12","d-flex","justify-content-center"],[1,"fa-regular","fa-cart-arrow-up","text-secondary",2,"font-size","110px"],[1,"col-12","justify-content-center","text-center","mt-5","empty-cart-description","text-secondary","headings-font-family"]],template:function(e,a){if(e&1&&_(0,m0,4,1,"div",2)(1,c0,15,0,"ng-template",null,0,X),e&2){let o=Fe(2);m("ngIf",a.cart.length)("ngIfElse",o)}},dependencies:[Z,K,B,_e,Ni,Ao,Ro,Cr,ct,hr],styles:[".item-image[_ngcontent-%COMP%]{height:50px;width:56px;display:block;border:solid 1px #dddddd;border-radius:5px;object-fit:contain}.example-menu[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;min-width:180px;max-width:280px;background-color:#fff;padding:6px 0}.example-menu-item[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer;border:none;-webkit-user-select:none;user-select:none;min-width:64px;line-height:36px;padding:0 16px;display:flex;align-items:center;flex-direction:row;flex:1}.example-menu-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.example-menu-item[_ngcontent-%COMP%]:active{background-color:#dcdcdc}.table[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(caption) > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding:12px 10px} .cdk-menu.cdk-menu-group.example-menu{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.empty-cart-description[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#c7c7c7}"]})};var jn=class t{clearOutletService=x(Tt);clearOutlet(){this.clearOutletService.clearOutlet()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-clear-outlet"]],decls:3,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"]],template:function(e,a){e&1&&(n(0,"button",0),g("click",function(){return a.clearOutlet()}),n(1,"span"),p(2,"Empty"),i()())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};var Qn=class t{processTransactionService=x(vt);cart=x(tt);items$=this.cart.cart$.pipe(V(r=>r.length));qtyTotal$=this.cart.cart$.pipe(V(r=>r.reduce((e,a)=>e+a.Quantity,0)));processTransaction(){this.processTransactionService.processTransaction()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-process"]],decls:6,vars:6,consts:[["type","button",1,"btn","btn-success","w-100","fs-3","px-0","py-6",2,"border-left","0.1px solid #fff",3,"click"],[1,"fs-6"]],template:function(e,a){e&1&&(n(0,"button",0),g("click",function(){return a.processTransaction()}),p(1," Process "),n(2,"small",1),p(3),v(4,"async"),v(5,"async"),i()()),e&2&&(l(3),Qe("(",E(4,2,a.items$)," items, ",E(5,4,a.qtyTotal$)," Qty)"))},dependencies:[Z,it],encapsulation:2})};var qn=class t{deliveryTypeService=x(Ut);openDeliveryTypeDialog(){this.deliveryTypeService.openDeliveryTypeDialog()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-delivery-type-note"]],decls:2,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"],[1,"fa-regular","fa-note-sticky","fa-xl"]],template:function(e,a){e&1&&(n(0,"button",0),g("click",function(){return a.openDeliveryTypeDialog()}),f(1,"i",1),i())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};var Un=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-cart-action-shell"]],decls:6,vars:0,consts:[[1,"row","g-0","pb-6","px-5"],[1,"col-5","d-flex","justify-content-between","pe-5",2,"column-gap","12px"],[2,"flex-grow","1"],[2,"flex-grow","3"],[1,"col-7"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"div",1),f(2,"POS-delivery-type-note",2)(3,"POS-clear-outlet",3),i(),n(4,"div",4),f(5,"POS-process"),i()())},dependencies:[Z,jn,Qn,qn],encapsulation:2})};function s0(t,r){if(t&1&&(q(0),f(1,"POS-complete",2),v(2,"async"),v(3,"async"),U()),t&2){let e=s();l(),m("afterProcessData",E(2,3,e.completeData$))("cartItems",E(3,5,e.cart$))("orderNumber",e.orderNumberForm.value)}}function d0(t,r){if(t&1){let e=D();n(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"POS-select-outlet-form",8),v(6,"async"),v(7,"async"),g("onCloseDialog",function(){d(e);let o=s();return u(o.onCloseDialog())}),i(),f(8,"i",9)(9,"POS-select-outlet-form",10),v(10,"async"),v(11,"async"),i(),f(12,"POS-invoice-number-form",11),v(13,"async"),f(14,"POS-invoice-date",12),i()(),n(15,"div",13)(16,"div",14)(17,"div",15),f(18,"POS-more-action-shell"),i(),n(19,"div",16),f(20,"POS-courier-selection"),i(),n(21,"div",17)(22,"div",18)(23,"button",19),v(24,"async"),g("click",function(){d(e);let o=s();return u(o.collapseSidebar())}),f(25,"span",20)(26,"span",20)(27,"span",20),i()()()()()(),n(28,"div",21)(29,"div",5),f(30,"POS-quick-key",22),v(31,"async"),i(),n(32,"div",23)(33,"div",24)(34,"div",25),f(35,"POS-variant-autocomplete",26),i()(),f(36,"POS-cart-display",27),v(37,"async"),v(38,"async"),f(39,"POS-cart-action-shell"),i()()()}if(t&2){let e=s();l(5),m("outlets",E(6,24,e.outlets$))("isOpenAfterLoad",E(7,26,e.isOpenOutletDialog$))("formControl",e.sourceOutletForm)("limitOutletText",e.limitOutletText),l(4),m("outlets",E(10,28,e.destination$))("isOpenAfterLoad",E(11,30,e.isOpenDestinationDialog$))("hideLocationIcon",!0)("formControl",e.destinationOutletForm)("limitOutletText",e.limitOutletText)("sourceOutletID",e.sourceOutletForm.value.ID),l(3),m("formControl",e.orderNumberForm)("isEdit",E(13,32,e.isEdit$)),l(2),m("formControl",e.dateForm)("tooltip",e.role.global!=null&&e.role.global.Date?"":"Date role is required"),l(9),Mt("change",E(24,34,e.toggleState$)),l(6),Mt("pt-5",e.sourceOutletForm.value.ID),l(),m("quickKey",E(31,36,e.quickKeyItems$))("outletID",e.sourceOutletForm.value.ID)("formControl",e.itemQuickKeyID),l(5),m("formControl",e.variantAutocompleteForm),l(),m("cart",E(37,38,e.cart$))("appConfigJSON",E(38,40,e.appConfigJSON$))}}var zn=class t{limitOutletText=12;isEditService=x(Nt);isEdit$=this.isEditService.isEdit$;isComplete=x(hi);outlet=x(ce);loadForm=x(Le);isOpenOutletDialog=x(yi);orderNumber=x(Yt);invoiceDate=x(Jt);quickKeyItems=x($t);cart=x(tt);intercom=x(bo);lowOnStock=x(At);overOnStock=x(Bt);variantAutocomplete=x(Kt);processTransaction=x(vt);toggle=x(Do);title=x(ei);role=x(ie);isComplete$=this.isComplete.isComplete$;sourceOutletForm=this.outlet.sourceOutlet;destinationOutletForm=this.outlet.destinationOutlet;outlets$=this.loadForm.outlets$;destination$=this.sourceOutletForm?.valueChanges.pipe(ze(this.sourceOutletForm?.value),j(r=>this.loadForm.destinations$.pipe(V(e=>e?.filter(o=>o.ID!==r?.ID)))));isOpenOutletDialog$=this.isOpenOutletDialog.isOpenOutletDialog$;isOpenDestinationDialog$=this.isOpenOutletDialog.isOpenDestinationDialog$;orderNumberForm=this.orderNumber.orderNumber;dateForm=this.invoiceDate.invoiceDate;quickKeyItems$=this.quickKeyItems.quickKeyItems$;itemQuickKeyID=this.quickKeyItems.itemQuickKeyID;appConfigJSON$=this.loadForm.config$;cart$=this.cart.cart$;variantAutocompleteForm=this.variantAutocomplete.variantAutocomplete;completeData$=this.processTransaction.submitOrder$;toggleState$=this.toggle.toggleState$;constructor(){this.title.setTitle(this.title.getTitle()+" | Transfer Order"),this.role?.sell?.Number==!1&&this.orderNumberForm.disable(),this.role.global.Date==!1&&this.dateForm.disable(),Me(this.outlet.sourceOutletID$,this.outlet.destinationOutletID$,this.cart$).pipe(at()).subscribe(()=>this.focusSearchInput())}focusSearchInput(){let r=document.getElementById("product_search");r&&r.focus()}ngAfterViewInit(){this.intercom.hideLauncher()}ngOnDestroy(){this.intercom.showLauncher(),this.lowOnStock.resetLowOnStock(),this.overOnStock.resetOverOnStock()}collapseSidebar(){this.toggle.toggleSidebar()}onCloseDialog(){this.isOpenOutletDialog.onCloseOutletDialog()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-transfer-order-v2"]],features:[Ei([tt,Qt,Jt,yi,Yt,ce,$t,qt,Tt,Oe,It,Mn,hi,vt,Et,Ut,Je,Kt,te,Ot,wt,Nt])],decls:4,vars:4,consts:[["ISNOTCOMPLETE",""],[4,"ngIf","ngIfElse"],[3,"afterProcessData","cartItems","orderNumber"],[1,"container-fluid"],[1,"row","header","border-bottom"],[1,"col-5","border-end"],[1,"left-toolbar-container","h-100","d-flex","align-items-center","justify-content-between"],[1,"d-flex"],[3,"onCloseDialog","outlets","isOpenAfterLoad","formControl","limitOutletText"],[1,"fa-solid","fa-arrow-right","ms-4","me-2","mt-2"],["dialogTitle","Choose Destination Outlet",3,"outlets","isOpenAfterLoad","hideLocationIcon","formControl","limitOutletText","sourceOutletID"],["transactionType","Transfer Order",3,"formControl","isEdit"],[3,"formControl","tooltip"],[1,"col-7","d-flex","align-items-center"],[1,"row","flex-grow-1"],[1,"col-lg-7","col-5","d-flex","align-items-center"],[1,"col-5","ps-0"],[1,"col-2"],[1,"navbar","mobile-button","border-bottom-0"],["type","button","aria-controls","navigation-index","aria-expanded","false","aria-label","Toggle navigation",1,"navbar-toggler","navbar-toggler-right","float-end","toggle-menu","ps-2","pe-0","border-0",2,"width","max-content","height","max-content",3,"click"],[1,"navbar-toggler-bar","burger-lines"],[1,"row","content"],[3,"quickKey","outletID","formControl"],[1,"col-7","pt-5","px-0","d-flex","flex-column"],[1,"row","w-100","ms-0"],[1,"col-12","px-0"],["inputID","product_search",3,"formControl"],[1,"cart-display",3,"cart","appConfigJSON"]],template:function(e,a){if(e&1&&(_(0,s0,4,7,"ng-container",1),v(1,"async"),_(2,d0,40,42,"ng-template",null,0,X)),e&2){let o=Fe(3);m("ngIf",E(1,2,a.isComplete$))("ngIfElse",o)}},dependencies:[Z,B,it,Pn,_r,kt,R,ti,fr,tr,Bn,Wn,gr,Hn,Un,Ki],styles:[".left-toolbar-container[_ngcontent-%COMP%]{position:relative}.left-toolbar-container[_ngcontent-%COMP%] POS-invoice-number-form[_ngcontent-%COMP%]{position:absolute;top:34px;left:32px}.header[_ngcontent-%COMP%]{min-height:60px}.content[_ngcontent-%COMP%]{min-height:calc(100vh - 60px)}.supplier-more-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cart-display[_ngcontent-%COMP%]{flex-grow:1;height:0px;overflow-y:auto}input[_ngcontent-%COMP%]{width:100%;height:38px!important;border:0;border-bottom:1px solid #ced4da;padding-left:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i[_ngcontent-%COMP%]{font-size:16px;top:10.6px;left:13px}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]{transition:.4s}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(1){-webkit-transform:rotate(-45deg) translate(-8px,4px);transform:rotate(-45deg) translate(-8px,4px)}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(2){opacity:0}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(45deg) translate(-5px,0px);transform:rotate(45deg) translate(-5px)}.mobile-button[_ngcontent-%COMP%]{display:none}@media (max-width: 990px){.mobile-button[_ngcontent-%COMP%]{display:block}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.more-actions[_ngcontent-%COMP%] div.d-flex[_ngcontent-%COMP%]{width:30rem}"]})};var u0=()=>["/menu/Logistics/Setup/Courier/Form"],_0=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],f0=t=>({ID:t}),g0=(t,r,e)=>({"text-success":t,"text-warning":r,"text-danger":e}),C0=()=>["/print/Transfer"],v0=(t,r)=>({ID:t,Template:r});function x0(t,r){if(t&1){let e=D();n(0,"a",20),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("TransferOrder/Delete"))}),f(1,"i",21),p(2," Delete"),i()}}function y0(t,r){if(t&1){let e=D();n(0,"div",22)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",23),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DestinationID,o)||(c.pageData.Filter.DestinationID=o),u(o)}),i(),n(7,"h6"),p(8,"Fulfillment"),i(),n(9,"ng-select",25),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.StateID,o)||(c.pageData.Filter.StateID=o),u(o)}),i(),n(10,"h6"),p(11,"Tag"),i(),n(12,"ng-select",26),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.TypeID,o)||(c.pageData.Filter.TypeID=o),u(o)}),i(),n(13,"h6"),p(14,"Courier"),i(),n(15,"ng-select",27),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CourierID,o)||(c.pageData.Filter.CourierID=o),u(o)}),i(),n(16,"h6"),p(17,"From"),i(),n(18,"datepicker",28),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(19,"h6"),p(20,"To"),i(),n(21,"datepicker",29),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(22,"h6"),p(23,"Creator"),i(),n(24,"autocompleteV2",30),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CreatorID,o)||(c.pageData.Filter.CreatorID=o),u(o)}),i(),n(25,"h6"),p(26,"Sort By"),i(),n(27,"radio-options",31),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SortBy,o)||(c.pageData.Filter.SortBy=o),u(o)}),i(),n(28,"h6"),p(29,"Page Size"),i(),n(30,"input",32),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.RowCount,o)||(c.pageData.Filter.RowCount=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.DestinationID),m("multiple",!1),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Deliveries),y("ngModel",e.pageData.Filter.StateID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Courier),y("ngModel",e.pageData.Filter.CourierID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.CreatorID),l(3),m("options",e.pageData.Options==null?null:e.pageData.Options.SortOption),y("model",e.pageData.Filter.SortBy),l(3),y("ngModel",e.pageData.Filter.RowCount),m("max",1e4)}}function h0(t,r){if(t&1){let e=D();n(0,"th",33)(1,"input",34),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function S0(t,r){t&1&&(n(0,"th",35),p(1," Price "),i())}function b0(t,r){if(t&1){let e=D();n(0,"td",33)(1,"input",40),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.selected)}}function D0(t,r){if(t&1&&(n(0,"td",35),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.Price)," ")}}function I0(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.Courier)}}function T0(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.CourierName)}}function w0(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,b0,2,1,"td",10),n(3,"td"),p(4),i(),n(5,"td"),p(6),i(),n(7,"td"),f(8,"a",36),i(),n(9,"td"),p(10),v(11,"date"),i(),n(12,"td"),p(13),v(14,"date"),i(),n(15,"td",35),p(16),i(),_(17,D0,3,3,"td",15),n(18,"td"),p(19),i(),n(20,"td"),p(21),i(),n(22,"td"),p(23),i(),n(24,"td"),_(25,I0,2,1,"span",37)(26,T0,2,1,"span",37),i(),n(27,"td")(28,"a",38),f(29,"i",39),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.role.logistic.Delete),l(2),b(e.Source),l(2),b(e.Destination),l(2),m("routerLink",N(25,_0))("queryParams",M(26,f0,e.ID))("innerHTML",e.Number,W),l(2),b(P(11,19,e.Date,"dd MMM yyyy")),l(3),b(P(14,22,e.Created,"HH:mm")),l(3),b(e.Quantity),l(),m("ngIf",a.role.sell.PriceVisible&&a.pageData.Config.PriceVisible),l(),ft(Oi(28,g0,e.StateLabel=="Received",e.StateLabel=="Dispatched",e.StateLabel=="Approved")),l(),I(" ",e.StateLabel," "),l(2),b(e.CreatorName),l(2),b(e.TypeName),l(2),m("ngIf",e.Courier!=null),l(),m("ngIf",e.CourierName!=null&&e.Courier==null),l(2),m("routerLink",N(32,C0))("queryParams",Re(33,v0,e.ID,e.SourceTemplateID))}}function E0(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,x0,3,0,"a",3),n(3,"a",4),p(4,"Add"),i()(),n(5,"filters"),_(6,y0,31,21,"ng-template",null,0,X),i(),n(8,"content")(9,"div",5)(10,"div",6)(11,"table",7)(12,"thead",8)(13,"tr",9),_(14,h0,2,0,"th",10),n(15,"th",11),p(16,"Source"),i(),n(17,"th",12),p(18,"Destination"),i(),n(19,"th"),p(20,"Number"),i(),n(21,"th",13),p(22,"Date"),i(),n(23,"th",13),p(24,"Time"),i(),n(25,"th",14),p(26,"Qty"),i(),_(27,S0,2,0,"th",15),n(28,"th",13),p(29,"Status"),i(),n(30,"th",16),p(31,"Creator"),i(),n(32,"th",13),p(33,"Tag"),i(),n(34,"th",13),p(35,"Courier"),i(),f(36,"th",17),i()(),_(37,w0,30,36,"tbody",18),i()(),n(38,"POS-complex-pagination",19),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),l(),m("routerLink",N(11,u0)),l(11),m("ngIf",e.role.logistic.Delete),l(13),m("ngIf",e.role.sell.PriceVisible&&e.pageData.Config.PriceVisible),l(10),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Gn=class t extends ve{constructor(e,a,o,c){super(e,a,"transferorder/VoidedTransferOrderList","TransferOrderLoader/TransferOrderList",o);this.roleService=c}radioOption;role=x(ie);static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(ee),C(ie))};static \u0275cmp=w({type:t,selectors:[["POS-recycle-bin"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["role","button","class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],[1,"button","btn","btn-success",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],[2,"width","150px"],[2,"width","90px"],[1,"text-end",2,"width","50px"],["class","text-end",4,"ngIf"],[2,"width","120px"],[2,"width","16px"],[4,"ngFor","ngForOf"],["api","TransferOrder/VoidedTransferOrderRowsCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"dialog-filter"],["placeholder","Source",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["bindLabel","Value","bindValue","Key","placeholder","Choose",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Options",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose a courier",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetUserSuggestion",1,"input-left","w-100","ac-filter",3,"ngModelChange","ngModel"],["name","SortBy",3,"modelChange","options","model"],["type","text","autoNum","",1,"form-control","input-filter",3,"ngModelChange","ngModel","max"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"text-end"],[3,"routerLink","queryParams","innerHTML"],[4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,E0,39,12,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,fe,yt,R,H,ne,se,Rt,We,Ke,mt,Te,Ee,_e,Se],encapsulation:2})};var O0=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],M0=t=>({ID:t});function P0(t,r){if(t&1){let e=D();n(0,"button",12),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",13),p(2," Export "),i()}}function F0(t,r){if(t&1){let e=D();n(0,"div",14)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",15),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.OutletSourceIds,o)||(c.pageData.Filter.OutletSourceIds=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",16),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.OutletDestinationIds,o)||(c.pageData.Filter.OutletDestinationIds=o),u(o)}),i(),n(7,"h6"),p(8,"Action"),i(),n(9,"ng-select",17),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.ActionTypeID,o)||(c.pageData.Filter.ActionTypeID=o),u(o)}),i(),n(10,"h6"),p(11,"From"),i(),n(12,"datepicker",18),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(13,"h6"),p(14,"To"),i(),n(15,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(16,"h6"),p(17,"Creator"),i(),n(18,"autocompleteV2",20),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.UserID,o)||(c.pageData.Filter.UserID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.OutletSourceIds),m("multiple",!0),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.OutletDestinationIds),m("multiple",!0),l(3),m("items",e.pageData.Options.ActionTypeOptions),y("ngModel",e.pageData.Filter.ActionTypeID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.UserID)}}function V0(t,r){if(t&1&&f(0,"a",24),t&2){let e=s().$implicit;m("routerLink",N(3,O0))("queryParams",M(4,M0,e.TransferOrderID))("innerHTML",e.TransferOrderNumber,W)}}function N0(t,r){if(t&1&&(n(0,"span",25),p(1),i()),t&2){let e=s().$implicit;l(),I(" ",e.TransferOrderNumber,"")}}function L0(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td"),p(4),i(),n(5,"td"),_(6,V0,1,6,"a",21)(7,N0,2,1,"span",22),i(),n(8,"td"),p(9),v(10,"date"),i(),n(11,"td"),p(12),v(13,"date"),i(),n(14,"td"),p(15),i(),n(16,"td"),p(17),i(),n(18,"td"),p(19),i(),f(20,"td",23),i()),t&2){let e=r.$implicit;l(2),b(e.OutletSourceName),l(2),b(e.OutletDestinationName),l(2),m("ngIf",!e.IsDeleted),l(),m("ngIf",e.IsDeleted),l(2),b(P(10,10,e.Created,"dd MMM yyyy")),l(3),b(P(13,13,e.Created,"HH:mm")),l(3),b(e.CreatorUserName),l(2),b(e.Quantity),l(2),b(e.ActionType),l(),m("innerHTML",e.Note,W)}}function k0(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.TransferOrderNumber,o)||(c.pageData.Filter.TransferOrderNumber=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,P0,3,0,"button",3),i(),n(3,"filters"),_(4,F0,19,13,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th"),p(13,"Outlet"),i(),n(14,"th"),p(15,"Destination"),i(),n(16,"th",8),p(17,"Number"),i(),n(18,"th"),p(19,"Date"),i(),n(20,"th"),p(21,"Time"),i(),n(22,"th"),p(23,"By"),i(),n(24,"th"),p(25,"Qty"),i(),n(26,"th"),p(27,"Action"),i(),n(28,"th",9),p(29,"Note"),i()()(),n(30,"tbody"),_(31,L0,21,16,"tr",10),i()()(),n(32,"POS-complex-pagination",11),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.TransferOrderNumber),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(29),m("ngForOf",e.data),l(),m("total",e.data.length)("pageData",e.pageData)}}var $n=class t extends ve{constructor(e,a,o,c,O,Q){super(e,a,"TransferOrder/gettransferorderupdatehistories","TransferOrderLoader/loadtransferorderupdatehistory",null,O);this.csvConverter=o;this.roleService=c;this.matDialog=Q}openExportModal(){this.matDialog.open(be,{data:{title:"Transfer Order Update History",exportTypes:[{ID:"transferorderexport/gettransferorderupdatehistories",Value:"Default"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}scopeOptions=[{Key:!1,Value:"Variant"},{Key:!0,Value:"Product"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(pe),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-transfer-update-history"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[2,"width","400px"],[4,"ngFor","ngForOf"],["api","transferorder/gettransferorderupdatehistoriescount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Source",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["bindLabel","Value","bindValue","Key","appendTo","body",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetUserSuggestion",1,"input-left","w-100","ac-filter",3,"ngModelChange","ngModel"],[3,"routerLink","queryParams","innerHTML",4,"ngIf"],["class","text-danger",4,"ngIf"],[3,"innerHTML"],[3,"routerLink","queryParams","innerHTML"],[1,"text-danger"]],template:function(a,o){a&1&&_(0,k0,33,8,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,We,Ke,Te,Ee,Se],encapsulation:2})};var R0=[{path:"Archive/Transfer_Order",component:Yi},{path:"Archive/Transfer_Order/Info",component:sn},{path:"Archive/Transfer_Order/Form",component:zn},{path:"Archive/Transfer_Order/Receive",component:xn},{path:"Archive/Outbound_Logistics",component:Xi},{path:"Archive/Outbound_Logistics/Info",component:tn},{path:"Archive/Outbound_Logistics/Form",component:Sn},{path:"Archive/Inbound_Logistics",component:Zi},{path:"Archive/Inbound_Logistics/Info",component:un},{path:"Archive/Inbound_Logistics/Form",component:bn},{path:"Report/Outbound/Product",component:nn},{path:"Report/Outbound/Detail",component:on},{path:"Report/Outbound/Logistics_Service",component:$o},{path:"Report/Outbound/Logistics_Service/Detail",component:Dn},{path:"Report/Inbound/Product",component:rn},{path:"Report/Inbound/Detail",component:an},{path:"Report/Transfer/Product",component:ln},{path:"Report/Transfer/Detail",component:pn},{path:"Report/Transfer/History",component:$n},{path:"Setup/Courier",component:gn},{path:"Setup/Courier/Form",component:Cn},{path:"Setup/Courier/Info",loadComponent:()=>import("./chunk-EYV7AZ42.js").then(t=>t.CourierInfoComponent)},{path:"Setup/Recycle_Bin",component:Gn},{path:"",redirectTo:"Archive/Transfer_Order",pathMatch:"full"}],Kn=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=Di({type:t});static \u0275inj=bi({imports:[gt.forChild(R0),gt]})};var Qr=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=Di({type:t});static \u0275inj=bi({imports:[Z,Ve,Kn,ot,kt,ni,To,Eo,Oo,Fo,No,Hi,ji,qo,Wo,br,Wi,Uo,Ri,Te,Ni,ir,Dr,Ir,Tr,$i,Pi,St,Lo,ii,zi,vr,dr,Io,Qi,ct,oi,qi,Ee,Go,Vo,Zo,Gi]})};export{Qr as DeliveryModule};
3
+ .`,headerType:Ce.Warning},width:"500px"}),o=!1),o}convertCartItemsToForm(r){return r.filter(a=>!a.Completed).map(a=>({ID:a.ID,Name:a.Name,VariantID:a.VariantID,Quantity:a.QuantityDelivered,PackSize:a.PackSize,Serial:a.Serial,UnitQuantity:1,Note:a.Note,InventoryTypeID:a.TypeID}))}newForm(r){this.router.navigate([`/menu/Logistics/Archive/${r}/Form`]).then(()=>window.location.reload())}undo(r,e){this.router.navigate([`/menu/Logistics/Archive/${e}/Form`],{queryParams:{ID:r}}).then(()=>window.location.reload())}mappingItemWithCsv(r,e){return e=e.map(a=>(r.forEach(o=>{o.Quantity=parseFloat(o.Quantity),o.Code==a.Code&&(a.QuantityDelivered=o.Quantity)}),a)),e}toastrShowToastrNotFoundItems(r,e){let a=r.filter(o=>{let c=e.find(O=>O.Code==o.Code);return!!T.IsEmpty(c)});a.length>0&&this.toastr.error(`Items with code ${a.map(o=>o.Code)?.join(", ")} is not found`,"Not Found Items")}static \u0275fac=function(e){return new(e||t)(Gt(ee),Gt(nt),Gt(A))};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Rr=t=>[t],Fc=(t,r)=>({ID:t,Template:r}),Vc=t=>({ID:t});function Nc(t,r){if(t&1&&(q(0),n(1,"div",27),p(2),i(),n(3,"div",27),p(4),v(5,"number"),i(),U()),t&2){let e=s().$implicit;l(2),b(e.Name),l(2),b(E(5,2,e.Quantity))}}function Lc(t,r){if(t&1&&(n(0,"div",25),_(1,Nc,6,4,"ng-container",26),i()),t&2){let e=r.$implicit;l(),m("ngIf",e.Quantity!=0)}}function kc(t,r){if(t&1&&(n(0,"div",21),_(1,Lc,2,1,"div",22),n(2,"div",23)(3,"div",24),p(4,"Total Delivered Quantity:"),i(),n(5,"div",24),p(6),v(7,"sum"),v(8,"number"),i()()()),t&2){let e=s();l(),m("ngForOf",e.items),l(5),I("",E(8,5,P(7,2,e.items,"Quantity"))," ")}}var li=class t{afterSubmitData;items;state;undo=new di;newForm=new di;onUndo(){this.undo.emit(this.afterSubmitData.ID)}onNewForm(){this.newForm.emit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-complete-customer-supplier"]],inputs:{afterSubmitData:"afterSubmitData",items:"items",state:"state"},outputs:{undo:"undo",newForm:"newForm"},standalone:!1,decls:27,vars:18,consts:[[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","py-5"],[1,"btn","bg-light-gray","btn-secondary",3,"click"],[1,"fa-solid","fa-reply","me-2"],["target","_blank",1,"btn","bg-light-gray","btn-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],["class","card-body",4,"ngIf"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[4,"ngIf"],[1,"col","text-end"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),f(5,"i",5),p(6),i()(),n(7,"div",6)(8,"div",7)(9,"div",8)(10,"a",9),g("click",function(){return a.onNewForm()}),p(11),i()()()(),n(12,"div",10)(13,"div",11)(14,"button",12),g("click",function(){return a.onUndo()}),f(15,"i",13),p(16,"Undo"),i(),n(17,"a",14),f(18,"i",15),p(19,"Print Receipt"),i()()()()(),n(20,"div",16)(21,"div",2)(22,"div",17)(23,"h2",18)(24,"a",19),p(25),i()()(),_(26,kc,9,7,"div",20),i()()()),e&2&&(l(6),I("",a.state," Logistics Complete"),l(5),I("New ",a.state," Logistics (F8)"),l(6),m("routerLink",M(9,Rr,a.state=="Outbound"?"/print/OutDelivery":"/print/InDelivery"))("queryParams",Re(11,Fc,a.afterSubmitData.ID,a.afterSubmitData.Template)),l(7),m("routerLink",M(14,Rr,a.state=="Outbound"?"/menu/Logistics/Archive/Outbound_Logistics/Info":"/menu/Logistics/Archive/Inbound_Logistics/Info"))("queryParams",M(16,Vc,a.afterSubmitData.ID)),l(),Qe("",a.state," Logistics #",a.afterSubmitData.DeliveryNumber,""),l(),m("ngIf",a.items.length>0))},dependencies:[K,B,z,_e,Be],encapsulation:2,changeDetection:0})};var pi=class t{form;tinyEditorApiKey="zc58cdrrftek5r5igtmjiar7ed4n3wr00hzd4w4mvtx8mpxa";static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-tinymce-note"]],inputs:{form:"form"},standalone:!1,decls:6,vars:1,consts:[[1,"card-header"],[1,"fa-solid","fa-note-sticky","me-5"],[1,"card-body"],["height","220px",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"h2"),f(2,"i",1),p(3,"Note "),i()(),n(4,"div",2)(5,"POS-tinymce-editor",3),S("ngModelChange",function(c){return h(a.form.Header.Note,c)||(a.form.Header.Note=c),c}),i()()),e&2&&(l(5),y("ngModel",a.form.Header.Note))},dependencies:[R,H,ht],encapsulation:2,changeDetection:0})};var Ac=t=>({"mt-10":t});function Bc(t,r){if(t&1){let e=D();n(0,"mat-chip-row",19),g("removed",function(){let o=d(e).$implicit,c=s(3);return u(c.onRemoveSerialChip(o))}),p(1),n(2,"button",20),f(3,"i",21),i()()}if(t&2){let e=r.$implicit;l(),I(" ",e," ")}}function Wc(t,r){if(t&1){let e=D();q(0),n(1,"div",10)(2,"div",11)(3,"mat-form-field",12),g("keyup.enter",function(o){return d(e),u(o.stopPropagation())}),n(4,"mat-chip-grid",null,1),_(6,Bc,4,1,"mat-chip-row",13),n(7,"input",14,2),g("matChipInputTokenEnd",function(o){d(e);let c=Fe(8),O=s(2);return u(O.addSerial(o,c))}),i()()()(),n(9,"div",15)(10,"button",16),g("click",function(){d(e);let o=s(2);return u(o.submitSerial())}),f(11,"i",17),n(12,"strong",18),p(13,"ADD"),i()()()(),U()}if(t&2){let e=Fe(5),a=s(2);l(6),m("ngForOf",a.selectedSerialCode),l(),m("matChipInputFor",e)("matChipInputSeparatorKeyCodes",a.separatorKeysCodes)}}function Hc(t,r){if(t&1){let e=D();n(0,"ng-select",22),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.selectedSerialCode,o)||(c.selectedSerialCode=o),u(o)}),g("change",function(o){d(e);let c=s(2);return u(c.onSelectSerial(o))}),i()}if(t&2){let e=s(2);m("items",e.serialSources)("multiple",!0),y("ngModel",e.selectedSerialCode),m("disabled",e.isStateEdit)}}function jc(t,r){t&1&&f(0,"th",31)}function Qc(t,r){if(t&1){let e=D();n(0,"td",34)(1,"i",35),g("click",function(){d(e);let o=s().index,c=s(3);return u(c.onRemoveSerial(o))}),i()()}}function qc(t,r){if(t&1){let e=D();n(0,"tr"),_(1,Qc,2,0,"td",32),n(2,"td"),p(3),i(),n(4,"td")(5,"input",33),S("ngModelChange",function(o){let c=d(e).$implicit;return h(c.Quantity,o)||(c.Quantity=o),u(o)}),i()()()}if(t&2){let e=r.$implicit,a=s(3);l(),m("ngIf",!a.isStateEdit),l(2),b(e.Number),l(2),y("ngModel",e.Quantity),m("disabled",a.isStateEdit)("decimalPlaces",0)}}function Uc(t,r){if(t&1&&(q(0),n(1,"div",23)(2,"div",24)(3,"table",25)(4,"thead",26)(5,"tr"),_(6,jc,1,0,"th",27),n(7,"th",28),p(8,"Serial Number"),i(),n(9,"th",29),p(10,"Quantity"),i()()(),n(11,"tbody"),_(12,qc,6,5,"tr",30),i()()()(),U()),t&2){let e=s(2);l(6),m("ngIf",!e.isStateEdit),l(6),m("ngForOf",e.selectedSerial)}}function zc(t,r){if(t&1&&(q(0),_(1,Wc,14,3,"ng-container",9)(2,Hc,1,4,"ng-template",null,0,X)(4,Uc,13,2,"ng-container",5),U()),t&2){let e=Fe(3),a=s();l(),m("ngIf",a.isEmptySerial&&a.state=="Inbound_Logistics")("ngIfElse",e),l(3),m("ngIf",a.selectedSerial.length>0)}}var hn=class t{constructor(r,e,a,o,c){this.data=r;this.dialogRef=e;this.toastr=a;this.logisticProductService=o;this.productService=c;this.config=new ye,this.config.title=r?.name,this.config.customWidth="550px",this.note=r?.note,this.fulfillmentOutletId=r.fulfillmentOutletId,this.state=this.data.state,this.isStateEdit=this.data.isEdit,this.initItemSerial()}separatorKeysCodes=[13,188];config;note;fulfillmentOutletId;isSerialized=!1;selectedSerial=[];serialSources=[];selectedSerialCode;isFocusInputSerial=!1;isEmptySerial=!1;state;isStateEdit;initItemSerial(){if(this.data?.item.TypeID==4){let r=this.data?.item?.serialSources;this.isEmptySerial=r?.length==0,this.isSerialized=!0,this.initSerialSources();let e=this.data?.item.Serial?this.data?.item.Serial:[];this.initSelectedSerial(e),this.mapSerialToCode()}}initSerialSources(){this.state=="Outbound_Logistics"?this.productService.getVariantSerial(this.fulfillmentOutletId,this.data?.item?.VariantID).pipe(V(r=>r.map(e=>({Number:e.Number,Quantity:e.Quantity,ExpiryDate:e.ExpiryDate})))).subscribe(r=>{this.serialSources=r}):this.serialSources=this.data?.item?.serialSources}initSelectedSerial(r){this.selectedSerial=r?.map((e,a)=>({Number:e.Number,Quantity:e.Quantity,ExpiryDate:e.ExpiryDate}))}mapSerialToCode(){this.selectedSerialCode=this.selectedSerial.map(r=>r.Number)}onSelectSerial(r){let e;this.selectedSerial=r.map(a=>(e=this.selectedSerial.find(o=>o.Number==a.Number),{Number:a.Number,Quantity:T.IsNotEmpty(e)?e.Quantity:1,ExpiryDate:a.ExpiryDate}))}onRemoveSerial(r){this.selectedSerial.splice(r,1),this.mapSerialToCode()}onFocusAddSerial(){this.isFocusInputSerial=!0}onBlurAddSerial(){this.isFocusInputSerial=!1}submitSerial(){let r=this.generateSerialData();this.selectedSerial=[...this.selectedSerial,...r],this.selectedSerialCode=[]}generateSerialData(){this.selectedSerialCode=this.selectedSerialCode.filter(a=>this.selectedSerial.findIndex(o=>o.Number==a)==-1);let r;return this.selectedSerialCode.map(a=>(r=this.serialSources.find(o=>o.Number==a),{Number:a,Quantity:1,ExpiryDate:null}))}onClose(){this.dialogRef.close()}onOk(r){!this.isFocusInputSerial&&r!="Enter"&&(this.isSerialized?this.selectedSerial.length>0?this.onCloseDialog():this.generateSerialFromCode():this.dialogRef.close({note:this.note,serials:[]}))}generateSerialFromCode(){this.selectedSerialCode.length>0?(this.selectedSerial=this.generateSerialData(),this.onCloseDialog()):this.toastr.warning("Serials cannot be empty","Warning!")}onCloseDialog(){if(this.calculateSerialQty()>this.data?.item?.Quantity){this.toastr.warning("Quantity of serials cannot be more than Item Quantity","Warning!");return}let e=this.getSubmitedSerialData();this.dialogRef.close({note:this.note,serials:e})}getSubmitedSerialData(){return this.selectedSerial.map(e=>({Number:e.Number,Quantity:e.Quantity}))}calculateSerialQty(){return this.selectedSerial?.map(e=>e.Quantity)?.reduce((e,a)=>e+a)}onRemoveSerialChip(r){this.selectedSerialCode=this.selectedSerialCode.filter(e=>e!==r)}addSerial(r,e){let a=(r.value||"").trim();if(a)if(this.selectedSerialCode.find(o=>o==a)){e.value="",this.toastr.info("Serial already exists",Ce.Info);return}else this.selectedSerialCode.push(a);r.chipInput.clear()}static \u0275fac=function(e){return new(e||t)(C($e),C(xe),C(ee),C(jt),C(Ui))};static \u0275cmp=w({type:t,selectors:[["POS-modal-item-note"]],standalone:!1,decls:8,vars:7,consts:[["SERIAL_OPTIONS",""],["chipGrid",""],["inputChip",""],[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[4,"ngIf"],[1,"form-floating-outline",3,"ngClass"],["name","note","id","note","cols","60",1,"form-control",2,"width","100%",3,"ngModelChange","rows","ngModel"],["for","note"],[4,"ngIf","ngIfElse"],[1,"input-group","mb-3"],[1,"col"],["appearance","outline",1,"serial-chip",3,"keyup.enter"],[3,"removed",4,"ngFor","ngForOf"],["placeholder","E.g. Serial1 Serial2",3,"matChipInputTokenEnd","matChipInputFor","matChipInputSeparatorKeyCodes"],[1,"col-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm","add-chip",3,"click"],["aria-hidden","true",1,"fa","fa-plus","me-1","fs-6"],[1,"headings-font-family","h6","font-weight-bold"],[3,"removed"],["matChipRemove",""],[1,"fa-solid","fa-circle-xmark"],["appendTo","body","bindValue","Number","bindLabel","Number","placeholder","Insert Number",1,"ng-select-multiple",3,"ngModelChange","change","items","multiple","ngModel","disabled"],[1,"row","mt-8"],[1,"col-12"],[1,"table","table-bordered"],[1,"thead-light"],["class","border-end","style","width: 40px",4,"ngIf"],[1,"border-end"],[1,"border-end","text-end",2,"width","60px"],[4,"ngFor","ngForOf"],[1,"border-end",2,"width","40px"],["class","text-center",4,"ngIf"],["type","text","placeholder","Qty","autoNum","",1,"form-control","text-end",3,"ngModelChange","ngModel","disabled","decimalPlaces"],[1,"text-center"],["aria-hidden","true","title","Remove serial",1,"fa","fa-xmark","text-danger","cursor-pointer","fa-2x",3,"click"]],template:function(e,a){e&1&&(n(0,"modal-material",3),g("onOk",function(c){return a.onOk(c)})("onCancel",function(){return a.onClose()})("onClose",function(){return a.onClose()}),n(1,"content")(2,"div",4),_(3,zc,5,3,"ng-container",5),n(4,"div",6)(5,"textarea",7),S("ngModelChange",function(c){return h(a.note,c)||(a.note=c),c}),i(),n(6,"label",8),p(7,"Note"),i()()()()()),e&2&&(m("config",a.config),l(3),m("ngIf",a.isSerialized),l(),m("ngClass",M(5,Ac,a.isSerialized)),l(),m("rows",a.isSerialized?3:8),y("ngModel",a.note))},dependencies:[pt,K,B,he,fe,R,H,wo,mt,Te,Yo,Xo,Ko,Jo],styles:[".serial-chip[_ngcontent-%COMP%]{width:100%}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input, .serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:40px!important}.serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch, .serial-chip[_ngcontent-%COMP%] .mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading{border-color:#ccc!important}.serial-chip[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.add-chip[_ngcontent-%COMP%]{height:calc(100% - 18.4px);margin-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}"],changeDetection:0})};var Gc=t=>({ID:t});function $c(t,r){if(t&1){let e=D();n(0,"div")(1,"button",13),g("click",function(){d(e);let o=s();return u(o.onImport())}),f(2,"i",14),p(3," Import "),i()()}}function Kc(t,r){t&1&&(n(0,"th",8),p(1," Pack Size "),i())}function Jc(t,r){if(t&1&&f(0,"p",24),t&2){let e=s().$implicit;m("innerHTML",e==null?null:e.Note,W)}}function Yc(t,r){if(t&1){let e=D();n(0,"input",25),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.QuantityDelivered,o)||(c.QuantityDelivered=o),u(o)}),i()}if(t&2){let e=s().$implicit,a=s();y("ngModel",e.QuantityDelivered),m("disabled",a.isEdit&&e.TypeID==4)}}function Xc(t,r){if(t&1){let e=D();n(0,"td")(1,"input",26),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.PackSize,o)||(c.PackSize=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.PackSize)}}function Zc(t,r){t&1&&(q(0),f(1,"i",27),U())}function es(t,r){t&1&&f(0,"i",28)}function ts(t,r){if(t&1){let e=D();n(0,"tr")(1,"td")(2,"a",15),p(3),i(),f(4,"app-serial-note",16),_(5,Jc,1,1,"p",17),i(),n(6,"td"),p(7),i(),n(8,"td"),_(9,Yc,1,2,"input",18),i(),_(10,Xc,2,1,"td",19),n(11,"td",20),p(12),v(13,"quantityFraction"),i(),n(14,"td",20),p(15),v(16,"quantityFraction"),i(),n(17,"td",20),p(18),v(19,"quantityFraction"),i(),n(20,"td",21)(21,"div",22),g("click",function(){let o=d(e),c=o.$implicit,O=o.index,Q=s();return u(Q.openModalItemNote(c,O))}),_(22,Zc,2,0,"ng-container",23)(23,es,1,0,"ng-template",null,0,X),i()()()}if(t&2){let e=r.$implicit,a=Fe(24),o=s();l(2),m("queryParams",M(18,Gc,e.VariantID)),l(),I(" ",e.Name," "),l(),m("serials",e.Serial),l(),m("ngIf",e.Note!=null),l(2),b(e.Code),l(2),m("ngIf",!e.Completed),l(),m("ngIf",o.isDeliveryPacking),l(2),I(" ",E(13,12,e.Sent)," "),l(3),I(" ",E(16,14,e.Quantity)," "),l(3),I(" ",E(19,16,e.BarcodeCount)," "),l(4),m("ngIf",e.TypeID==4)("ngIfElse",a)}}var mi=class t{constructor(r){this.dialog=r;this.eventImport=new di}isDeliveryPacking;cartItems;state;isEdit;fulfillmentOutletId;hasImportBtn=!0;eventImport;openModalItemNote(r,e){this.dialog.open(hn,{data:{note:r.Note,name:r.Name,item:r,state:this.state,isEdit:this.isEdit,fulfillmentOutletId:this.fulfillmentOutletId}}).afterClosed().pipe(k(a=>T.IsNotEmpty(a))).subscribe(a=>{r.TypeID==4&&(r.Serial=a.serials,r.QuantityDelivered=this.calculateSerialQty(a.serials)),r.Note=a.note,this.updateCartItems(r,e)})}updateCartItems(r,e){this.cartItems=this.cartItems.map((a,o)=>(e==o&&(a=r),a))}calculateSerialQty(r=[]){let e=0;return r.forEach(a=>{e+=a.Quantity}),e}onImport(){this.eventImport.emit()}static \u0275fac=function(e){return new(e||t)(C(A))};static \u0275cmp=w({type:t,selectors:[["POS-products-delivery-list"]],inputs:{isDeliveryPacking:"isDeliveryPacking",cartItems:"cartItems",state:"state",isEdit:"isEdit",fulfillmentOutletId:"fulfillmentOutletId",hasImportBtn:"hasImportBtn"},outputs:{eventImport:"eventImport"},standalone:!1,decls:27,vars:5,consts:[["STANDART",""],[1,"card-header"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-box","me-5"],[1,"card-body"],[1,"table","table-bordered"],[1,"thead-light","sticky-top-thead"],[1,"border-end"],[1,"border-end","text-end",2,"width","80px"],["class","border-end text-end","style","width: 80px",4,"ngIf"],[1,"border-end","text-end",2,"width","55px"],[1,"border-end",2,"width","55px"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","py-3","px-5",3,"click"],["aria-hidden","true",1,"fa-solid","fa-download"],["routerLink","/menu/Products/Catalog/Variants/Info","target","_blank",1,"d-block",3,"queryParams"],[3,"serials"],["class","special-TinyMCE fst-italic text-warning mb-0","style","word-break: break-all",3,"innerHTML",4,"ngIf"],["autoNum","","class","form-control text-end","type","text",3,"ngModel","disabled","ngModelChange",4,"ngIf"],[4,"ngIf"],[1,"text-end"],[1,"text-center"],[3,"click"],[4,"ngIf","ngIfElse"],[1,"special-TinyMCE","fst-italic","text-warning","mb-0",2,"word-break","break-all",3,"innerHTML"],["autoNum","","type","text",1,"form-control","text-end",3,"ngModelChange","ngModel","disabled"],["type","text","autoNum","",1,"form-control",2,"direction","rtl",3,"ngModelChange","ngModel"],["matTooltip","Choose Serial Number",1,"fa-solid","fa-barcode","cursor-pointer","fa-2x"],["matTooltip","Note","matTooltipPosition","above",1,"fa-regular","fa-note-sticky","fa-2x","cursor-pointer"]],template:function(e,a){e&1&&(n(0,"div",1)(1,"div",2)(2,"h2"),f(3,"i",3),p(4,"Products"),i(),_(5,$c,4,0,"div"),i()(),n(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr")(10,"th",7),p(11,"Products"),i(),n(12,"th",7),p(13,"Code"),i(),n(14,"th",8),p(15,"Qty"),i(),_(16,Kc,2,0,"th",9),n(17,"th",10),p(18),i(),n(19,"th",10),p(20),i(),n(21,"th",10),p(22,"Count"),i(),n(23,"th",11),p(24,"Action"),i()()(),n(25,"tbody"),_(26,ts,25,20,"tr",12),i()()()),e&2&&(l(5),Ye(a.hasImportBtn?5:-1),l(11),m("ngIf",a.isDeliveryPacking),l(2),I(" ",a.state=="Outbound_Logistics"?"Sent":"Received"," "),l(2),I(" Order",a.state=="Inbound_Logistics"?"ed":""," "),l(6),m("ngForOf",a.cartItems))},dependencies:[K,B,z,fe,R,H,mt,Ae,ct,Ai],encapsulation:2})};var ns=()=>["/menu/Logistics/Archive/Outbound_Logistics/Info"],io=t=>({ID:t}),os=()=>["/menu/Logistics/Archive/Outbound_Logistics"],rs=()=>["/menu/Orders/Order/Sales_Order/Info"],as=()=>["/menu/Contacts/Contact/Customers/Info"];function ls(t,r){if(t&1&&(n(0,"a",7),p(1,"Cancel"),i()),t&2){let e=s(3);m("routerLink",N(2,ns))("queryParams",M(3,io,e.param.ID||e.param.POID))}}function ps(t,r){t&1&&(n(0,"a",8),p(1,"Cancel"),i()),t&2&&m("routerLink",N(1,os))}function ms(t,r){if(t&1){let e=D();q(0),_(1,ls,2,5,"a",4)(2,ps,2,2,"a",5),n(3,"button",6),g("click",function(){d(e);let o=s(2);return u(o.validate())}),p(4),i(),U()}if(t&2){let e=s(2);l(),m("ngIf",e.isEdit),l(),m("ngIf",!e.isEdit),l(2),I(" ",e.isEdit?"Save":"Add"," ")}}function cs(t,r){if(t&1){let e=D();q(0),n(1,"mat-button-toggle-group",20)(2,"mat-button-toggle",21),g("click",function(){d(e);let o=s(4);return o.onTabChange("invoiceSearch"),u(o.searchLogisticType="invoice")}),f(3,"i",22),i(),n(4,"mat-button-toggle",23),g("click",function(){d(e);let o=s(4);return o.onTabChange("customerSearch"),u(o.searchLogisticType="customer")}),f(5,"i",24),i(),n(6,"mat-button-toggle",25),g("click",function(){d(e);let o=s(4);return o.onTabChange("numberSearch"),u(o.searchLogisticType="number")}),f(7,"i",26),i()(),U()}if(t&2){let e=s(4);l(2),m("checked",e.searchLogisticType=="invoice"),l(2),m("checked",e.searchLogisticType=="customer"),l(2),m("checked",e.searchLogisticType=="number")}}function ss(t,r){t&1&&(n(0,"div",10)(1,"div",31),p(2,"Outlet"),i(),n(3,"div",32),p(4,"Date"),i(),n(5,"div",33),p(6,"Number"),i(),n(7,"div",33),p(8,"Reference"),i()())}function ds(t,r){if(t&1&&(n(0,"div",10)(1,"div",34),p(2),v(3,"limitTo"),i(),n(4,"div",35),p(5),v(6,"date"),i(),n(7,"div",36),p(8),i(),n(9,"div",36),p(10),i()()),t&2){let e=r.item;l(2),I(" ",P(3,4,e.OutletName,25)," "),l(3),I(" ",P(6,7,e.Date,"dd MMM yyyy")," "),l(3),I(" ",e.Number," "),l(2),I(" ",e.ReferenceNumber," ")}}function us(t,r){if(t&1){let e=D();n(0,"ng-select",28),v(1,"async"),g("change",function(o){d(e);let c=s(5);return u(c.findSalesOrderAutoComplete(o))}),_(2,ss,9,0,"ng-template",29)(3,ds,11,10,"ng-template",30),i()}if(t&2){let e=s(5);m("items",E(1,4,e.orders$))("typeahead",e.orderInput$)("ngModel",e.selectedSOID)("readonly",e.isEdit||e.isPO)}}function _s(t,r){if(t&1&&_(0,us,4,6,"ng-select",27),t&2){let e=s(4);m("ngIf",!(e.isEdit||e.isPO))}}function fs(t,r){if(t&1){let e=D();n(0,"div",19)(1,"autocompleteV2",37),g("onSelect",function(o){d(e);let c=s(4);return u(c.getUnfulfilledInvoices(o))}),i()()}if(t&2){let e=s(4);l(),m("inputTextValue",e.customerName)}}function gs(t,r){if(t&1){let e=D();n(0,"div",19)(1,"autocompleteV2",38),g("onInputEnter",function(o){d(e);let c=s(4);return u(c.scanUnfullfilledOrders(o))}),i()()}if(t&2){let e=s(4);l(),m("inputTextValue",e.scanResultUnfulfilledOrder())}}function Cs(t,r){t&1&&(n(0,"div",10)(1,"div",40),p(2,"Outlet"),i(),n(3,"div",34),p(4,"Date"),i(),n(5,"div",41),p(6,"Number"),i()())}function vs(t,r){if(t&1&&(n(0,"div",10)(1,"div",40),p(2),v(3,"limitTo"),i(),n(4,"div",34),p(5),v(6,"date"),i(),n(7,"div",42),p(8),i()()),t&2){let e=r.item;l(2),I(" ",P(3,3,e.EntityName,25)," "),l(3),I(" ",P(6,6,e.Date,"dd MMM yyyy")," "),l(3),I(" ",e.Number," ")}}function xs(t,r){if(t&1){let e=D();n(0,"div")(1,"ng-select",39),g("change",function(o){d(e);let c=s(4);return u(c.findSalesOrderByCustomer(o))}),_(2,Cs,7,0,"ng-template",29)(3,vs,9,9,"ng-template",30),i()()}if(t&2){let e=s(4);l(),m("items",e.unfulfilledInvoices)}}function ys(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",16),p(4,"Choose Order"),i(),_(5,cs,8,3,"ng-container",2),i(),n(6,"div",17),_(7,_s,1,1,"ng-select",18)(8,fs,2,1,"div",19)(9,gs,2,1,"div",19)(10,xs,4,1,"div",2),i()()),t&2){let e=s(3);l(5),m("ngIf",!e.isEdit&&!e.isPO),l(2),Ye(e.searchLogisticType=="invoice"?7:e.searchLogisticType=="customer"?8:9),l(3),m("ngIf",e.unfulfilledInvoices.length>0&&e.searchLogisticType=="customer")}}function hs(t,r){if(t&1&&(n(0,"a",45),p(1),i()),t&2){let e=s(4);m("routerLink",N(3,rs))("queryParams",M(4,io,e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.ID)),l(),I(" ",e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.Number," ")}}function Ss(t,r){if(t&1&&(n(0,"tr")(1,"th",46),p(2,"Ref. Number"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),I(" ",e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.ReferenceNumber," ")}}function bs(t,r){if(t&1&&(n(0,"div",14)(1,"div",15)(2,"h2"),f(3,"i",16),p(4,"Sales Order"),i()(),n(5,"div",17)(6,"table",43)(7,"tr")(8,"th",44),p(9,"Outlet"),i(),n(10,"td"),p(11,":"),i(),n(12,"td"),p(13),i()(),n(14,"tr")(15,"th",44),p(16,"Number"),i(),n(17,"td"),p(18,":"),i(),n(19,"td"),_(20,hs,2,6,"a",45),i()(),n(21,"tr")(22,"th",44),p(23,"Date"),i(),n(24,"td"),p(25,":"),i(),n(26,"td"),p(27),v(28,"date"),i()(),_(29,Ss,7,1,"tr",2),i()()()),t&2){let e=s(3);l(13),b(e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.EntityName),l(7),Ye(!(e.deliveryData==null||e.deliveryData.SalesOrder==null)&&e.deliveryData.SalesOrder.Number?20:-1),l(7),I(" ",P(28,4,e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.Date,"dd MMM yyyy")," "),l(2),m("ngIf",e.deliveryData==null||e.deliveryData.SalesOrder==null?null:e.deliveryData.SalesOrder.ReferenceNumber)}}function Ds(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Customer.Mobile)}}function Is(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",50),i()),t&2){let e=s(4);l(5),m("innerHTML",e.deliveryData.Customer.Address,W)}}function Ts(t,r){if(t&1&&(n(0,"div",14)(1,"div",47)(2,"h2"),f(3,"i",48),p(4,"Customer"),i()(),n(5,"div",17)(6,"table",43)(7,"tr")(8,"th",49),p(9,"Name"),i(),n(10,"td"),p(11,":"),i(),n(12,"td")(13,"a",45),p(14),i()()(),_(15,Ds,7,1,"tr",2)(16,Is,6,1,"tr",2),i()()()),t&2){let e=s(3);l(13),m("routerLink",N(5,as))("queryParams",M(6,io,e.deliveryData.Customer.ID)),l(),b(e.deliveryData.Customer.Name),l(),m("ngIf",e.deliveryData.Customer.Mobile),l(),m("ngIf",e.deliveryData.Customer.Address)}}function ws(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Name"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Recipient.Name)}}function Es(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Recipient.Phone)}}function Os(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",50),i()),t&2){let e=s(4);l(5),m("innerHTML",e.deliveryData.Recipient.Address,W)}}function Ms(t,r){if(t&1&&(n(0,"tr")(1,"th",49),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData.Recipient.City)}}function Ps(t,r){if(t&1&&(n(0,"div",14)(1,"div",47)(2,"h2"),f(3,"i",48),p(4,"Recipient"),i()(),n(5,"div",17)(6,"table",43),_(7,ws,7,1,"tr",2)(8,Es,7,1,"tr",2)(9,Os,6,1,"tr",2)(10,Ms,7,1,"tr",2),i()()()),t&2){let e=s(3);l(7),m("ngIf",e.deliveryData.Recipient.Name),l(),m("ngIf",e.deliveryData.Recipient.Phone),l(),m("ngIf",e.deliveryData.Recipient.Address),l(),m("ngIf",e.deliveryData.Recipient.City)}}function Fs(t,r){if(t&1&&(p(0),v(1,"limitTo")),t&2){let e=r.item;I(" ",P(1,1,e.Name,20)," ")}}function Vs(t,r){if(t&1){let e=D();n(0,"div",14)(1,"div",47)(2,"h2"),f(3,"i",51),p(4,"Fulfillment"),i()(),n(5,"div",17)(6,"div",52)(7,"div",49),p(8,"Outlet"),i(),n(9,"div",53),p(10,":"),i(),n(11,"div",54)(12,"ng-select",55),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.EntityID,o)||(c.form.Header.EntityID=o),u(o)}),g("ngModelChange",function(o){d(e);let c=s(3);return u(c.onFulfillmentChange(o))}),_(13,Fs,2,4,"ng-template",56),i()()(),n(14,"div",52)(15,"div",49),p(16,"Date"),i(),n(17,"div",53),p(18,":"),i(),n(19,"div",54)(20,"datepicker",57),S("dateChange",function(o){d(e);let c=s(3);return h(c.form.Header.Date,o)||(c.form.Header.Date=o),u(o)}),i()()(),n(21,"div",52)(22,"div",49),p(23,"Number"),i(),n(24,"div",53),p(25,":"),i(),n(26,"div",54)(27,"input",58),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.Number,o)||(c.form.Header.Number=o),u(o)}),i()()(),n(28,"div",52)(29,"div",49),p(30,"Courier"),i(),n(31,"div",53),p(32,":"),i(),n(33,"div",54)(34,"ng-select",59),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.CourierID,o)||(c.form.Header.CourierID=o),u(o)}),i()()()()()}if(t&2){let e=s(3);l(12),Mt("diff",e.form.Header.EntityID!=e.deliveryData.SalesOrder.EntityID),m("readonly",e.isEdit&&!e.isPO)("items",e.storage.Entities),y("ngModel",e.form.Header.EntityID),l(8),m("isFloatingLabel",!1),y("date",e.form.Header.Date),l(7),y("ngModel",e.form.Header.Number),l(7),m("items",e.storage.Courier),y("ngModel",e.form.Header.CourierID)}}function Ns(t,r){if(t&1){let e=D();n(0,"div",60)(1,"div",14)(2,"POS-products-delivery-list",61),g("eventImport",function(){d(e);let o=s(3);return u(o.onImportItems())}),i()(),n(3,"div",14),f(4,"POS-tinymce-note",62),i()()}if(t&2){let e=s(3);l(2),m("isEdit",e.isEdit)("isDeliveryPacking",e.isDeliveryPacking)("cartItems",e.cartItems)("fulfillmentOutletId",e.form.Header.EntityID),l(2),m("form",e.form)}}function Ls(t,r){if(t&1&&(n(0,"div",9)(1,"div",10)(2,"div",11),_(3,ys,11,3,"div",12)(4,bs,30,7,"div",12)(5,Ts,17,8,"div",12)(6,Ps,11,4,"div",12)(7,Vs,35,10,"div",12),i(),_(8,Ns,5,5,"div",13),i()()),t&2){let e=s(2);l(3),m("ngIf",!(e.isEdit||e.isPO)),l(),m("ngIf",e.deliveryData),l(),m("ngIf",e.deliveryData==null||e.deliveryData.Customer==null?null:e.deliveryData.Customer.ID),l(),m("ngIf",e.deliveryData==null||e.deliveryData.Recipient==null?null:e.deliveryData.Recipient.ID),l(),m("ngIf",e.deliveryData),l(),m("ngIf",e.deliveryData)}}function ks(t,r){if(t&1){let e=D();n(0,"div",9)(1,"POS-complete-customer-supplier",63),g("undo",function(o){d(e);let c=s(2);return u(c.undo(o))})("newForm",function(){d(e);let o=s(2);return u(o.newForm())}),i()()}if(t&2){let e=s(2);l(),m("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function Rs(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",1),g("barcodeQueryChange",function(o){d(e);let c=s();return u(c.onScanBarcode(o))}),n(1,"actions"),_(2,ms,5,3,"ng-container",2),i(),n(3,"content"),_(4,Ls,9,6,"div",3)(5,ks,2,2,"div",3),i()()}if(t&2){let e=s();m("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),m("ngIf",!e.isComplete),l(2),m("ngIf",!e.isComplete),l(),m("ngIf",e.isComplete)}}var Sn=class t extends Wt{constructor(e,a,o,c,O,Q,re,Ue){super(e,a,"OutboundLogisticsLoader/GetStorage",o);this.productService=c;this.formService=O;this.productHttpService=Q;this.dialog=re;this.datePipe=Ue;this.form={Header:{},Items:[]},this.searchLogisticType="invoice"}outboundLogisticsService=x(yn);storage;deliveryData;isEdit;form;param;isDeliveryPacking;configBarcodeCount;orderInvoice;isComplete;afterSubmitData;isPO;searchLogisticType;orderInput$=new Ie;orders$;cartItemSource;selectedSOID;scanResultUnfulfilledOrder=_t(null);customerName;unfulfilledInvoices=[];handleF8(){this.isComplete&&this.newForm()}initializeFormState(){this.param=this.route.snapshot.queryParams,T.IsEmpty(this.param.POID)&&T.IsEmpty(this.param.ID)?(this.isEdit=!1,this.initOrderNumberOptions()):T.IsNotEmpty(this.param.POID)?(this.isPO=!0,this.getDeliveryItems(this.param.POID)):(this.isEdit=!0,this.isPO=!1,this.getDeliveryItems(this.param.ID))}initOrderNumberOptions(){this.orders$=this.orderInput$.pipe(k(e=>e!=null&&(e==""||e.length>=3)),mo(),po(500),ze(""),j(e=>this.outboundLogisticsService.getUnfulfilledOrderByNumber(e)))}scanUnfullfilledOrders(e){this.outboundLogisticsService.getUnfulfilledOrderByNumberOrReferenceNumber(e).pipe(J(a=>{this.formatOrderScanresult(a)})).subscribe({next:this.bindDeliveryData(),error:a=>{this.scanResultUnfulfilledOrder.set(null)}})}formatOrderScanresult(e){let a=e?.SalesOrder.EntityName,o=e?.SalesOrder.Date?new Date(e?.SalesOrder.Date):null,c=e?.SalesOrder.ReferenceNumber?`- ${e?.SalesOrder.ReferenceNumber}`:"",O=e?.SalesOrder.Number?`- ${e?.SalesOrder.Number}`:"",Q=o?`- ${this.datePipe.transform(o,"dd MMM yyyy")}`:"",re=`${a} ${Q} ${O} ${c}`;this.scanResultUnfulfilledOrder.set(re)}initOrderNumberOnEdit(){if(this.isEdit||this.isPO){let e={ID:this.deliveryData.SalesOrder.ID,Display:`${this.deliveryData.SalesOrder.Number} - ${this.deliveryData.SalesOrder.EntityName} - ${this.deliveryData.SalesOrder.Date}`};this.orders$=ut([e]),this.selectedSOID=e.ID}}postBindForm(e){this.storage=e,this.isDeliveryPacking=e.AppConfigJSON.DeliveryPacking,this.configBarcodeCount=e.AppConfigJSON.ModuleDelivery.CustomerDelivery.QtyCount,this.initializeFormState(),!this.isEdit&&!this.isPO&&this.setFocusToAutoComplete()}setFocusToAutoComplete(e="customerSearch"){setTimeout(()=>{let a=document.getElementById(e);a&&a.focus()},100)}validate(){if(this.formService.validate(this.cartItems,this.configBarcodeCount,this.isEdit)){this.form.Items=this.formService.convertCartItemsToForm(this.cartItems),this.data.Form=this.form,this.isEdit&&(this.data.Form.Mode=1);let e=this.form.Header.CourierID;T.IsEmpty(e)&&(this.form.Header.CourierID=T.GuidEmpty),this.onSubmit("OutDelivery/SubmitOrder")}}findSalesOrderByCustomer(e){T.IsNotEmpty(e.ID)&&(this.getDeliveryItems(e.ID),this.scanResultUnfulfilledOrder.set(null))}onTabChange(e){this.setFocusToAutoComplete(e)}findSalesOrderAutoComplete(e){T.IsNotEmpty(e)?(this.getDeliveryItems(e.ID),this.scanResultUnfulfilledOrder.set(null)):this.orderInput$.next("")}getDeliveryItems(e){let a,o;this.isPO||!this.isEdit?(a="GetByPOID",this.form.Header.CustomerPOID=e,o={POID:this.param.POID||e}):(a="GetByID",o={ID:this.param.ID}),this.httpService.post(`/API/OutboundLogisticsLoader/${a}`,o).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,this.initOrderNumberOnEdit(),T.IsNotEmpty(this.deliveryData.Data)&&(this.productService.formItems=this.deliveryData.Data.Items),this.productService.bindCartItems(e.OrderedItems,e.SentItems,this.isEdit),this.cartItemSource=T.cloneObject(this.productService.cartItems),this.orderInvoice=e.Label,this.isPO||!this.isEdit?(this.form.Header.Number=e.SalesOrder.GenerateDeliveryNumber,this.form.Header.Date=new Date,T.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.SalesOrder.EntityID),this.form.Header.Note=e.SalesOrder.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(T.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Outbound #${this.form.Header.Number}`),this.productService.entityID=this.form.Header.EntityID}}onScanBarcode(e){this.productService.onScanBarcode(e)}get cartItems(){return this.productService.cartItems}newForm(){this.formService.newForm("Outbound_Logistics")}onSubmitSuccess(e){this.isComplete=!0,this.afterSubmitData=e}undo(e){this.formService.undo(e,"Outbound_Logistics")}assignDefaultWarehouse(e){let a=this.storage.Entities.find(o=>o.ID==e);T.IsNotEmpty(a)&&(this.form.Header.EntityID=a.ID)}getUnfulfilledInvoices(e){this.httpService.post("/API/OutDelivery/GetUnfulfilledOrdersByCustomerID",{id:e}).subscribe(a=>{this.unfulfilledInvoices=a,this.scanResultUnfulfilledOrder.set(null)})}onFulfillmentChange(e){let a=this.cartItems.map(o=>o.VariantID);T.IsNotEmpty(e)&&a.length>0&&this.productHttpService.getSerialByVarianIds(e,a).subscribe(o=>{this.updateSerialItem(o)})}updateSerialItem(e){let a=[],o=T.cloneObject(this.cartItemSource);this.productService.cartItems=o.map(c=>(c.TypeID==4&&(a=e.find(O=>O.VariantID==c.VariantID)?.Serial,a&&(c.Serial=this.filterSerialBySelectedSerial(c.Serial,a),c.Serial=this.setSerialQuantity(c))),c))}filterSerialBySelectedSerial(e=[],a){let o;return a.filter(O=>(o=e.findIndex(Q=>Q.Number==O.Number),o!==-1))}setSerialQuantity(e){let a=e.serialSources,o=e.Serial,c;return o=o.map(O=>(c=a.findIndex(Q=>Q.Number==O.Number),c!==-1&&(O.Quantity=O.Quantity<a[c].Quantity?O.Quantity:a[c].Quantity),O)),o}onImportItems(){this.dialog.open(ri,{data:{title:"Import Products"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(e=>{this.formService.toastrShowToastrNotFoundItems(e,this.cartItems),this.productService.cartItems=this.formService.mappingItemWithCsv(e,this.cartItems)})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(jt),C(ai),C(Ui),C(A),C(Se))};static \u0275cmp=w({type:t,selectors:[["POS-outbound-logistics-form"]],hostBindings:function(a,o){a&1&&g("keydown.F8",function(O){return o.handleF8(O)},!1,Zt)},standalone:!1,features:[oe],decls:1,vars:1,consts:[[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange",4,"ngIf"],[3,"barcodeQueryChange","pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox"],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success","ms-5",3,"click"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-5","col-lg-12","col-xl-5","col-sm-12","sales-order"],["class","card",4,"ngIf"],["class","col-xs-12 col-md-7 col-lg-12 col-xl-7 col-sm-12",4,"ngIf"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa-solid","fa-receipt","me-5"],[1,"card-body"],["bindLabel","Display","bindValue","Key","placeholder","Invoice Number",1,"orders-search",3,"items","typeahead","ngModel","readonly"],[1,"form-floating-outline","my-0"],["name","fontStyle","aria-label","Font Style",2,"height","30px"],["matTooltipPosition","above","matTooltip","Search by Invoice Number",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Customer",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-address-book"],["matTooltipPosition","above","matTooltip","Scan Invoice / Packing Slip Barcode",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-scanner-gun"],["class","orders-search","bindLabel","Display","bindValue","Key","placeholder","Invoice Number",3,"items","typeahead","ngModel","readonly","change",4,"ngIf"],["bindLabel","Display","bindValue","Key","placeholder","Invoice Number",1,"orders-search",3,"change","items","typeahead","ngModel","readonly"],["ng-header-tmp",""],["ng-option-tmp",""],[1,"col-3","fw-bold"],[1,"col-2","fw-bold","px-2"],[1,"col-3","fw-bold","px-2"],[1,"col-3"],[1,"col-2","px-2"],[1,"col-3","px-2"],["inputID","customerSearch","requestUrl","/API/AC/GetCustomerSuggestion","placeholder","Customer Name","notFoundMessageFor","customer",1,"w-100",3,"onSelect","inputTextValue"],["inputID","numberSearch","placeholder","Scan Order Here","notFoundMessageFor","order",1,"w-100",3,"onInputEnter","inputTextValue"],["appendTo","body","bindLabel","Number","bindValue","Key",1,"custom-panel-dropdown",3,"change","items"],[1,"col-5"],[1,"col-4"],[1,"col-4","text-wrap"],[1,"table-sm","table-borderless"],[2,"width","50px"],["target","_blank",3,"routerLink","queryParams"],[2,"width","80px"],[1,"card-header"],[1,"fa-solid","fa-address-card","me-5"],[2,"width","55px"],[3,"innerHTML"],[1,"fa-solid","fa-truck","me-5"],[1,"d-flex","align-items-center","justify-content-between","w-100","mb-3"],[1,"me-2",2,"width","5px"],[1,"w-100"],["bindLabel","Name","bindValue","ID",1,"p-0",3,"ngModelChange","readonly","items","ngModel"],["ng-label-tmp",""],["appearance","outline",1,"p-0",3,"dateChange","isFloatingLabel","date"],["type","text",1,"form-control","ps-4",2,"height","35px !important","width","100%",3,"ngModelChange","ngModel"],["placeholder","Select Courier","bindLabel","Name","bindValue","ID",1,"p-0",3,"ngModelChange","items","ngModel"],[1,"col-xs-12","col-md-7","col-lg-12","col-xl-7","col-sm-12"],["state","Outbound_Logistics",3,"eventImport","isEdit","isDeliveryPacking","cartItems","fulfillmentOutletId"],[3,"form"],["state","Outbound",3,"undo","newForm","afterSubmitData","items"]],template:function(a,o){a&1&&_(0,Rs,6,7,"mainpanel-cmp",0),a&2&&m("ngIf",o.storage)},dependencies:[B,z,fe,R,H,ne,se,We,Te,Fi,Vi,Ae,Li,ki,li,pi,mi,it,Se,Bi],styles:["datepicker[_ngcontent-%COMP%] div.mat-mdc-text-field-wrapper{padding-bottom:0!important}autocompleteV2[_ngcontent-%COMP%] input{font-size:12px;height:36px} mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:30px!important} .diff .ng-select-container{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important} .mat-button-toggle-checkbox-wrapper{display:none!important} .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0!important}.orders-search[_ngcontent-%COMP%] .ng-dropdown-panel{width:45vw}"]})};var As=()=>["/menu/Logistics/Archive/Inbound_Logistics/Info"],Hr=t=>({ID:t}),Bs=()=>["/menu/Logistics/Archive/Inbound_Logistics"],Ws=()=>["/menu/Contacts/Contact/Suppliers/Info"];function Hs(t,r){if(t&1&&(n(0,"a",8),p(1,"Cancel"),i()),t&2){let e=s(3);m("routerLink",N(2,As))("queryParams",M(3,Hr,e.param.ID||e.param.POID))}}function js(t,r){t&1&&(n(0,"a",9),p(1,"Cancel"),i()),t&2&&m("routerLink",N(1,Bs))}function Qs(t,r){if(t&1){let e=D();q(0),_(1,Hs,2,5,"a",5)(2,js,2,2,"a",6),n(3,"button",7),g("click",function(){d(e);let o=s(2);return u(o.validate())}),p(4),i(),U()}if(t&2){let e=s(2);l(),m("ngIf",e.isEdit),l(),m("ngIf",!e.isEdit),l(2),b(e.isEdit?"Save":"Add")}}function qs(t,r){if(t&1){let e=D();q(0),n(1,"mat-button-toggle-group",20)(2,"mat-button-toggle",21),g("click",function(){d(e);let o=s(3);return u(o.searchLogisticType="invoice")}),f(3,"i",22),i(),n(4,"mat-button-toggle",23),g("click",function(){d(e);let o=s(3);return u(o.searchLogisticType="customer")}),f(5,"i",24),i()(),U()}if(t&2){let e=s(3);l(2),m("checked",e.searchLogisticType=="invoice"),l(2),m("checked",e.searchLogisticType=="customer")}}function Us(t,r){if(t&1){let e=D();q(0),n(1,"div",25)(2,"autocompleteV2",26),g("onSelect",function(o){d(e);let c=s(3);return u(c.getDeliveryItems(o))}),i()(),U()}if(t&2){let e=s(3);l(2),m("inputTextValue",e.orderInvoice)}}function zs(t,r){if(t&1){let e=D();n(0,"div",25)(1,"autocompleteV2",27),g("onSelect",function(o){d(e);let c=s(3);return u(c.getUnfulfilledInvoices(o))}),i()()}}function Gs(t,r){t&1&&(n(0,"div",11)(1,"div",31),p(2," Outlet "),i(),n(3,"div",32),p(4," Date "),i(),n(5,"div",33),p(6," Number "),i()())}function $s(t,r){if(t&1&&(n(0,"div",11)(1,"div",31),p(2),v(3,"limitTo"),i(),n(4,"div",32),p(5),v(6,"date"),i(),n(7,"div",34),p(8),i()()),t&2){let e=r.item;l(2),I(" ",P(3,3,e.EntityName,25)," "),l(3),I(" ",P(6,6,e.Date,"dd MMM yyyy")," "),l(3),I(" ",e.Number," ")}}function Ks(t,r){if(t&1){let e=D();n(0,"div")(1,"ng-select",28),g("change",function(o){d(e);let c=s(3);return u(c.findSalesOrderByCustomer(o))}),_(2,Gs,7,0,"ng-template",29)(3,$s,9,9,"ng-template",30),i()()}if(t&2){let e=s(3);l(),m("items",e.unfulfilledInvoices)}}function Js(t,r){if(t&1&&(n(0,"tr")(1,"th",38),p(2,"Name"),i(),n(3,"td"),p(4,":"),i(),n(5,"td")(6,"a",39),p(7),i()()()),t&2){let e=s(4);l(6),m("routerLink",N(3,Ws))("queryParams",M(4,Hr,e.deliveryData.SupplierContact.ID)),l(),I(" ",e.deliveryData==null?null:e.deliveryData.SupplierContact.Name," ")}}function Ys(t,r){if(t&1&&(n(0,"tr")(1,"th",38),p(2,"Phone"),i(),n(3,"td"),p(4,":"),i(),n(5,"td"),p(6),i()()),t&2){let e=s(4);l(6),b(e.deliveryData==null?null:e.deliveryData.SupplierContact.Phone)}}function Xs(t,r){if(t&1&&(n(0,"tr")(1,"th",38),p(2,"City"),i(),n(3,"td"),p(4,":"),i(),f(5,"td",40),i()),t&2){let e=s(4);l(5),m("innerHTML",e.deliveryData==null?null:e.deliveryData.SupplierContact.Address,W)}}function Zs(t,r){if(t&1&&(n(0,"div",13)(1,"div",35)(2,"h2"),f(3,"i",36),p(4,"Supplier "),i()(),n(5,"div",16)(6,"table",37),_(7,Js,8,6,"tr",3)(8,Ys,7,1,"tr",3)(9,Xs,6,1,"tr",3),i()()()),t&2){let e=s(3);l(7),m("ngIf",e.deliveryData==null?null:e.deliveryData.SupplierContact.Name),l(),m("ngIf",e.deliveryData==null?null:e.deliveryData.SupplierContact.Phone),l(),m("ngIf",e.deliveryData==null?null:e.deliveryData.SupplierContact.Address)}}function ed(t,r){if(t&1){let e=D();n(0,"div",13)(1,"div",35)(2,"h2"),f(3,"i",41),p(4,"Fulfillment "),i()(),n(5,"div",16)(6,"div",42)(7,"div",38),p(8,"Outlet"),i(),n(9,"div",43),p(10,":"),i(),n(11,"div",44)(12,"ng-select",45),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.EntityID,o)||(c.form.Header.EntityID=o),u(o)}),i()()(),n(13,"div",42)(14,"div",38),p(15,"Date"),i(),n(16,"div",43),p(17,":"),i(),n(18,"div",44)(19,"datepicker",46),S("dateChange",function(o){d(e);let c=s(3);return h(c.form.Header.Date,o)||(c.form.Header.Date=o),u(o)}),i()()(),n(20,"div",42)(21,"div",38),p(22,"Number"),i(),n(23,"div",43),p(24,":"),i(),n(25,"div",44)(26,"input",47),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.Number,o)||(c.form.Header.Number=o),u(o)}),i()()(),n(27,"div",48)(28,"div",38),p(29,"Courier"),i(),n(30,"div",43),p(31,":"),i(),n(32,"div",44)(33,"ng-select",49),S("ngModelChange",function(o){d(e);let c=s(3);return h(c.form.Header.CourierID,o)||(c.form.Header.CourierID=o),u(o)}),i()()()()()}if(t&2){let e=s(3);l(12),m("readonly",e.isEdit&&!e.isPO)("items",e.storage.Entities),y("ngModel",e.form.Header.EntityID),l(7),m("isFloatingLabel",!1),y("date",e.form.Header.Date),l(7),y("ngModel",e.form.Header.Number),l(7),m("items",e.storage.Courier),y("ngModel",e.form.Header.CourierID)}}function td(t,r){if(t&1){let e=D();n(0,"div",50)(1,"div",13)(2,"POS-products-delivery-list",51),g("eventImport",function(){d(e);let o=s(3);return u(o.onImport())}),i()(),n(3,"div",13),f(4,"POS-tinymce-note",52),i()()}if(t&2){let e=s(3);l(2),m("isEdit",e.isEdit)("cartItems",e.cartItems),l(2),m("form",e.form)}}function id(t,r){if(t&1&&(n(0,"div",10)(1,"div",11)(2,"div",12)(3,"div",13)(4,"div",14)(5,"h2"),f(6,"i",15),p(7,"Purchase Order "),i(),_(8,qs,6,2,"ng-container",3),i(),n(9,"div",16),_(10,Us,3,1,"ng-container",17)(11,zs,2,0,"ng-template",null,0,X)(13,Ks,4,1,"div",3),i()(),_(14,Zs,10,3,"div",18)(15,ed,34,8,"div",18),i(),_(16,td,5,3,"div",19),i()()),t&2){let e=Fe(12),a=s(2);l(8),m("ngIf",!a.isEdit&&!a.isPO),l(2),m("ngIf",a.searchLogisticType=="invoice")("ngIfElse",e),l(3),m("ngIf",a.unfulfilledInvoices.length>0&&a.searchLogisticType=="customer"),l(),m("ngIf",a.deliveryData==null||a.deliveryData.SupplierContact==null?null:a.deliveryData.SupplierContact.ID),l(),m("ngIf",a.deliveryData),l(),m("ngIf",a.deliveryData)}}function nd(t,r){if(t&1){let e=D();n(0,"div",10)(1,"POS-complete-customer-supplier",53),g("undo",function(o){d(e);let c=s(2);return u(c.undo(o))})("newForm",function(){d(e);let o=s(2);return u(o.newForm())}),i()()}if(t&2){let e=s(2);l(),m("afterSubmitData",e.afterSubmitData)("items",e.form.Items)}}function od(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),g("barcodeQueryChange",function(o){d(e);let c=s();return u(c.onScanBarcode(o))}),n(1,"actions"),_(2,Qs,5,3,"ng-container",3),i(),n(3,"content"),_(4,id,17,7,"div",4)(5,nd,2,2,"div",4),i()()}if(t&2){let e=s();m("pageData",e.menuData)("showBarcodeScanner",e.deliveryData&&!e.isComplete)("hideSearchDropdown",!0)("hideSearchBox",!0),l(2),m("ngIf",!e.isComplete),l(2),m("ngIf",!e.isComplete),l(),m("ngIf",e.isComplete)}}var bn=class t extends Wt{constructor(e,a,o,c,O,Q){super(e,a,"InboundLogisticsLoader/GetStorage",o);this.productService=c;this.formService=O;this.dialog=Q;this.form={Header:{},Items:[]}}toastr=x(ee);searchLogisticType="invoice";unfulfilledInvoices=[];storage;deliveryData;isEdit;form;param;configBarcodeCount;orderInvoice;isComplete;afterSubmitData;isPO;initializeFormState(){this.param=this.route.snapshot.queryParams,T.IsEmpty(this.param.POID)&&T.IsEmpty(this.param.ID)?this.isEdit=!1:T.IsNotEmpty(this.param.POID)?(this.isPO=!0,this.getDeliveryItems(this.param.POID)):(this.isPO=!1,this.isEdit=!0,this.getDeliveryItems(this.param.ID))}postBindForm(e){this.storage=e,this.productService.formItems=this.storage.Data?.Items,this.configBarcodeCount=e.AppConfigJSON.ModuleDelivery.CustomerDelivery.InBoundQtyCount,this.initializeFormState(),!this.isEdit&&!this.isPO&&this.setFocusToAutoComplete()}setFocusToAutoComplete(){setTimeout(()=>{let e=document.getElementById("orderNumber");e&&e.focus()},100)}findSalesOrderByCustomer(e){T.IsNotEmpty(e.ID)&&this.getDeliveryItems(e.ID)}getDeliveryItems(e){let a,o;this.isPO||!this.isEdit?(a="GetByPOID",this.form.Header.PurchaseOrderID=e,o={POID:this.param.POID||e}):(a="GetByID",o={ID:this.param.ID}),this.httpService.post(`/API/InDelivery/${a}`,o).subscribe({next:this.bindDeliveryData()})}bindDeliveryData(){return e=>{this.deliveryData=e,T.IsNotEmpty(this.deliveryData.Data)&&(this.productService.formItems=this.deliveryData.Data.Items),this.productService.bindCartItems(e.PurchasedItems,e.SentItems,this.isEdit),this.orderInvoice=e.Label,this.isPO||!this.isEdit?(this.form.Header.Number=e.PO.Number,this.form.Header.Date=new Date().toJSON(),T.IsEmpty(this.form.Header.EntityID)&&(this.form.Header.EntityID=e.PO.EntityID),this.form.Header.Note=e.PO.Note,this.assignDefaultWarehouse(e.DefaultWarehouse)):(T.IsNotEmpty(e.Data?.Header)&&(this.form.Header=e.Data.Header),this.menuData.H=`Editing Inbound #${this.form.Header.Number}`)}}assignDefaultWarehouse(e){let a=this.storage.Entities.find(o=>o.ID==e);T.IsNotEmpty(a)&&(this.form.Header.EntityID=a.ID)}get cartItems(){return this.productService.cartItems}onScanBarcode(e){this.productService.onScanBarcode(e)}validate(){this.formService.validate(this.cartItems,this.configBarcodeCount,this.isEdit)&&(this.form.Items=this.formService.convertCartItemsToForm(this.cartItems),this.data.Form=this.form,this.isEdit&&(this.data.Form.Mode=1),this.onSubmit("InDelivery/SubmitOrder"))}newForm(){this.formService.newForm("Inbound_Logistics")}onSubmitSuccess(e){this.isComplete=!0,this.afterSubmitData=e}undo(e){this.formService.undo(e,"Inbound_Logistics")}onImport(){this.dialog.open(ri,{data:{title:"Import Products"}}).afterClosed().pipe(k(e=>T.IsNotEmpty(e))).subscribe(e=>{this.formService.toastrShowToastrNotFoundItems(e,this.cartItems),this.productService.cartItems=this.formService.mappingItemWithCsv(e,this.cartItems)})}getUnfulfilledInvoices(e){this.httpService.post("/API/InboundLogistics/GetUnfulfilledOrdersBySupplierID",{ID:e}).subscribe(a=>this.unfulfilledInvoices=a)}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(jt),C(ai),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-inbound-logistics-form"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["CUSTOMER",""],[3,"pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox","barcodeQueryChange",4,"ngIf"],[3,"barcodeQueryChange","pageData","showBarcodeScanner","hideSearchDropdown","hideSearchBox"],[4,"ngIf"],["class","container-fluid mt-5",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink","queryParams",4,"ngIf"],["class","btn btn-outline-secondary",3,"routerLink",4,"ngIf"],[1,"btn","btn-success","ms-5",3,"click"],[1,"btn","btn-outline-secondary",3,"routerLink","queryParams"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"row"],[1,"col-xs-12","col-md-4","col-lg-12","col-xl-4","col-sm-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa-solid","fa-receipt","me-5"],[1,"card-body"],[4,"ngIf","ngIfElse"],["class","card",4,"ngIf"],["class","col-xs-12 col-md-8 col-lg-12 col-xl-8 col-sm-12",4,"ngIf"],["name","fontStyle","aria-label","Font Style",2,"height","30px"],["matTooltipPosition","above","matTooltip","Search by Invoice Number",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-hashtag"],["matTooltipPosition","above","matTooltip","Search by Supplier",1,"w-100","toggle-search",3,"click","checked"],[1,"fa-solid","fa-address-book"],[1,"form-floating-outline"],["inputID","orderNumber","requestUrl","/API/AC/SearchBillOrderByNumber","placeholder","Invoice Number",1,"w-100",3,"onSelect","inputTextValue"],["inputID","customerName","requestUrl","/API/AC/GetSupplierSuggestion","placeholder","Supplier Name","notFoundMessageFor","supplier",1,"w-100",3,"onSelect"],["appendTo","body","bindLabel","Number","bindValue","Key",1,"custom-panel-dropdown",3,"change","items"],["ng-header-tmp",""],["ng-option-tmp",""],[1,"col-5"],[1,"col-3"],[1,"col-4"],[1,"col-4","text-wrap"],[1,"card-header"],[1,"fa-solid","fa-address-card","me-5"],[1,"table-sm","table-borderless"],[2,"width","55px"],["target","_blank",3,"routerLink","queryParams"],[3,"innerHTML"],[1,"fa-solid","fa-truck","me-5"],[1,"d-flex","align-items-center","justify-content-between","w-100","mb-3"],[1,"me-2",2,"width","5px"],[1,"w-100"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","readonly","items","ngModel"],["appearance","outline",3,"dateChange","isFloatingLabel","date"],["type","text",1,"form-control","ps-4",2,"height","35px !important",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","justify-content-between","w-100"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],[1,"col-xs-12","col-md-8","col-lg-12","col-xl-8","col-sm-12"],["state","Inbound_Logistics",3,"eventImport","isEdit","cartItems"],[3,"form"],["state","Inbound",3,"undo","newForm","afterSubmitData","items"]],template:function(a,o){a&1&&_(0,od,6,7,"mainpanel-cmp",1),a&2&&m("ngIf",o.storage)},dependencies:[B,z,fe,R,H,ne,se,We,Te,Fi,Vi,Ae,Li,ki,li,pi,mi,Se,Bi],styles:["datepicker[_ngcontent-%COMP%] div.mat-mdc-text-field-wrapper{padding-bottom:0!important}autocompleteV2[_ngcontent-%COMP%] input{font-size:16px} mat-button-toggle.toggle-search>button>span.mat-button-toggle-label-content{line-height:30px!important}"]})};var jr=t=>({ID:t});function rd(t,r){if(t&1){let e=D();n(0,"button",17),g("click",function(){d(e);let o=s();return u(o.openExportModal())}),f(1,"i",18),p(2," Export"),i()}}function ad(t,r){if(t&1){let e=D();n(0,"div",19)(1,"h6"),p(2,"Outlet"),i(),n(3,"ng-select",20),S("ngModelChange",function(o){d(e);let c=s();return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Logistics Service"),i(),n(6,"ng-select",21),S("ngModelChange",function(o){d(e);let c=s();return h(c.pageData.Filter.LogisticServiceID,o)||(c.pageData.Filter.LogisticServiceID=o),u(o)}),i(),n(7,"h6"),p(8,"From"),i(),n(9,"div")(10,"datepicker",22),S("dateChange",function(o){d(e);let c=s();return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i()(),n(11,"h6"),p(12,"To"),i(),n(13,"div")(14,"datepicker",23),S("dateChange",function(o){d(e);let c=s();return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i()(),n(15,"h6"),p(16,"Time"),i(),n(17,"div",24)(18,"div",25)(19,"app-timepicker",26),S("timeChange",function(o){d(e);let c=s();return h(c.pageData.Filter.StartTime,o)||(c.pageData.Filter.StartTime=o),u(o)}),i()(),n(20,"div",25)(21,"app-timepicker",26),S("timeChange",function(o){d(e);let c=s();return h(c.pageData.Filter.EndTime,o)||(c.pageData.Filter.EndTime=o),u(o)}),i()()()()}if(t&2){let e=s();l(3),y("ngModel",e.pageData.Filter.EntityID),m("items",e.pageData.Options==null?null:e.pageData.Options.Entities),l(3),y("ngModel",e.pageData.Filter.LogisticServiceID),m("items",e.pageData.Options==null?null:e.pageData.Options.LogisticServices),l(4),y("date",e.pageData.Filter.From),l(4),y("date",e.pageData.Filter.To),l(5),m("fullWidth",!0),y("time",e.pageData.Filter.StartTime),l(2),m("fullWidth",!0),y("time",e.pageData.Filter.EndTime)}}function ld(t,r){if(t&1&&(n(0,"li",32),p(1),i()),t&2){let e=r.$implicit;l(),Qe(" ",e.Name," x ",e.VariantUnitQuantity," ")}}function pd(t,r){if(t&1&&(n(0,"tr",27)(1,"td"),p(2),i(),n(3,"td")(4,"a",28),p(5),i()(),n(6,"td"),p(7),i(),n(8,"td")(9,"a",29),p(10),i()(),n(11,"td"),p(12),i(),n(13,"td")(14,"ul",30),_(15,ld,2,2,"li",31),i()()()),t&2){let e=r.$implicit;l(2),b(e.OutletName),l(2),m("queryParams",M(8,jr,e.InvoiceID)),l(),b(e.Number),l(2),b(e.LogisticDisplayName),l(2),m("queryParams",M(10,jr,e.CustomerID)),l(),b(e.CustomerName),l(2),b(e.Fulfillment),l(3),m("ngForOf",e.SalesOrderItem)}}function md(t,r){if(t&1){let e=D();n(0,"span",33),g("click",function(){d(e);let o=s();return u(o.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount"))}),n(1,"i",34),p(2,"?"),i()()}}function cd(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s();l(),b(E(2,1,e.listTotal))}}function sd(t,r){if(t&1){let e=D();n(0,"a",35),g("click",function(){d(e);let o=s();return u(o.NextPage(!0))}),f(1,"i",36),p(2," Next"),i()}}function dd(t,r){if(t&1){let e=D();n(0,"a",37),g("click",function(){d(e);let o=s();return u(o.StoreRowsCountAPIResult("SalesReport/LogisticServiceDetailCount",!0))}),f(1,"i",38),p(2," Show All"),i()}}var Dn=class t extends Bo{constructor(e,a,o,c,O){super(e,a,"SalesReport/LogisticServiceDetail","SalesReportLoader/LogisticServiceDetail",null,o);this.matDialog=c;this.roleService=O}preInitList(){this.pageData.Filter.StartTime=="00:00:00"&&this.pageData.Filter.EndTime=="00:00:00"&&(this.pageData.Filter.EndTime="23:59:59"),this.initTimeFilter()}initTimeFilter(){let e=this.pageData.Filter.StartTime;e=T.IsNotEmpty(e)?e.substring(0,5):null;let a=this.pageData.Filter.EndTime;a=T.IsNotEmpty(a)?a.substring(0,5):null,this.pageData.Filter.StartTime=e,this.pageData.Filter.EndTime=a}postInit(e){this.extendData?(this.infiniteList=this.infiniteList.concat(e.Data),this.postExtendData(e),this.extendData=!1):(this.infiniteList=e.Data,this.assignAggregate(e)),this.nextPageDisabled=!(e.Data.length<this.pageData.Filter.RowCount),this.originalData=e.Data,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(e)}openExportModal(){this.matDialog.open(be,{data:{title:"Logistic Service Detail",exportTypes:[{ID:"ReportExport/LogisticServiceDetail",Value:"Default",FileName:"Logistics Service Detail"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"SalesReport/LogisticServiceDetailCount",pagination:!0}})}static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(pe),C(A),C(ie))};static \u0275cmp=w({type:t,selectors:[["POS-logistics-service-detail"]],standalone:!1,features:[oe],decls:36,vars:14,consts:[["pageFilterTemplate",""],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","150px"],["class","border-bottom",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load next page",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","matTooltipPosition","above","matTooltip","Load all products",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID","placeholder","Choose an outlet",3,"ngModelChange","ngModel","items"],["bindLabel","Name","bindValue","ID","placeholder","Choose Logistic Service",3,"ngModelChange","ngModel","items"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"row"],[1,"col-6"],[3,"timeChange","fullWidth","time"],[1,"border-bottom"],["routerLink","/menu/Orders/Orders/Customer_Invoice/Info",3,"queryParams"],["routerLink","/menu/Contacts/Contact/Customers/Info",3,"queryParams"],[1,"list-inline","m-0"],["class","list-inline-item me-10",4,"ngFor","ngForOf"],[1,"list-inline-item","me-10"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retreive rows count",1,"border","p-3"],["role","button","matTooltipPosition","above","matTooltip","Load next page",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],["role","button","matTooltipPosition","above","matTooltip","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-share"]],template:function(a,o){if(a&1){let c=D();n(0,"mainpanel-cmp",1),S("textChange",function(Q){return d(c),h(o.pageData.Filter.Name,Q)||(o.pageData.Filter.Name=Q),u(Q)}),g("onSubmit",function(){return d(c),u(o.searchFromPageOne())}),S("filterChange",function(Q){return d(c),h(o.pageData.Filter,Q)||(o.pageData.Filter=Q),u(Q)}),n(1,"actions"),_(2,rd,3,0,"button",2),i(),n(3,"filters"),_(4,ad,22,10,"ng-template",null,0,X),i(),n(6,"content")(7,"div",3)(8,"table",4)(9,"thead",5)(10,"tr",6)(11,"th"),p(12,"Outlet"),i(),n(13,"th"),p(14,"Number"),i(),n(15,"th"),p(16,"Logistics"),i(),n(17,"th",7),p(18,"Customer"),i(),n(19,"th"),p(20,"Fulfillment"),i(),n(21,"th"),p(22,"Product"),i()()(),n(23,"tbody"),_(24,pd,16,12,"tr",8),i()(),n(25,"div",9)(26,"div",10)(27,"div",11),p(28),v(29,"number"),_(30,md,3,0,"span",12)(31,cd,3,3,"span",13),p(32),i()(),n(33,"div",14),_(34,sd,3,0,"a",15)(35,dd,3,0,"a",16),i()()()()()}a&2&&(m("pageData",o.menuData),y("text",o.pageData.Filter.Name),m("isFilterOnDropdown",!1),y("filter",o.pageData.Filter),l(2),m("ngIf",o.roleService.global.Export),l(22),m("ngForOf",o.infiniteList),l(4),I(" Showing 1 - ",E(29,12,o.pageData.Filter.RowCount*(o.pageData.Filter.PageNumber-1)+(o.data==null||o.data.Data==null?null:o.data.Data.length))," of "),l(2),m("ngIf",!o.pageData.HideStoreApiCount),l(),m("ngIf",o.pageData.HideStoreApiCount),l(),I(" records ~ ",o.pageData.Filter.PageNumber," Page "),l(2),m("ngIf",o.nextPageDisabled&&!o.goToLast),l(),m("ngIf",o.nextPageDisabled&&!o.goToLast))},dependencies:[K,B,z,R,H,ne,se,Te,Ae,qi,_e],encapsulation:2})};var Le=class t{http=x(L);route=x(pe);loadForm$=this.route.queryParamMap.pipe(j(r=>this.http.get(`/API/transferorderloader${r.get("ID")?"/"+r.get("ID"):""}/LoadTransferOrderForm`)),rt(1));config$=this.loadForm$.pipe(V(r=>r.AppConfigJSON));deliveryTypes$=this.loadForm$.pipe(V(r=>r.DeliveryTypes));destinations$=this.loadForm$.pipe(V(r=>r.DestinationEntities));outlets$=this.loadForm$.pipe(V(r=>r.Entities));data$=this.loadForm$.pipe(V(r=>r.Data),k(r=>T.IsNotEmpty(r.Order)));items$=this.data$.pipe(V(r=>r.Items.map(e=>le(ae({},e.Variant),{Quantity:e.Quantity,Total:e.Price*e.Quantity*(e.Discount/100),VariantID:e.VariantID,UnitPrice:e.Price,UnitCost:e.Cost,Serial:e.Serial,ID:e.ID,Note:e.Note,Discount:e.Discount}))));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Oe=class t{_createNewTransaction=new Ie;router=x(nt);createNewTransaction$=this._createNewTransaction.asObservable();constructor(){}createNewTransaction(){this._createNewTransaction.next(),this.router.navigate([],{queryParams:{ID:null}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var ce=class t{loadForm=x(Le);lowOnStock=x(At);overOnStock=x(Bt);toastr=x(ee);route=x(pe);isEdit=T.IsNotEmpty(this.route.snapshot.queryParams.ID);newTrans=x(Oe);sourceOutlet=new Ge({value:{ID:T.GuidEmpty,Name:"Source"},disabled:this.isEdit});sourceOutletID$=si(()=>this.sourceOutlet.valueChanges.pipe(ze(this.sourceOutlet.value))).pipe(V(r=>r.ID));destinationOutlet=new Ge({value:{ID:T.GuidEmpty,Name:"Destination"},disabled:this.isEdit});destinationOutletID$=si(()=>this.destinationOutlet.valueChanges.pipe(ze(this.destinationOutlet.value))).pipe(V(r=>r.ID));assignSourceOutlet$=this.loadForm.outlets$.pipe(k(()=>T.IsNotEmpty(this.route.snapshot.queryParams.ID)),ue(this.loadForm.data$),V(([r,e])=>r.find(o=>o.ID===e.Order.SourceEntityID)),J(r=>this.sourceOutlet.setValue(r)));assignDestinationOutlet$=this.loadForm.destinations$.pipe(k(()=>T.IsNotEmpty(this.route.snapshot.queryParams.ID)),ue(this.loadForm.data$),V(([r,e])=>r.find(o=>o.ID===e.Order.DestinationEntityID)),J(r=>this.destinationOutlet.setValue(r)));resetAndWarnOnSameOutlet$=Me(this.destinationOutlet.valueChanges.pipe(V(r=>le(ae({},r),{outletType:"destination"}))),this.sourceOutlet.valueChanges.pipe(V(r=>le(ae({},r),{outletType:"source"})))).pipe(k(r=>T.IsNotEmpty(r.ID)),V(r=>r.outletType=="destination"?r.ID===this.sourceOutlet.value.ID:r.ID===this.destinationOutlet.value.ID),k(r=>r),J(()=>{this.destinationOutlet.setValue({ID:T.GuidEmpty,Name:"Destination"}),this.toastr.warning("Source and destination outlet cannot be the same","Warning")}));resetSourceOutletID$=this.newTrans.createNewTransaction$.pipe(J(()=>{console.log("reset source outlet"),this.sourceOutlet.setValue({ID:T.GuidEmpty,Name:"Source"})}));enableOutletOnNewTransaction$=this.newTrans.createNewTransaction$.pipe(J(()=>{this.sourceOutlet.enable(),this.destinationOutlet.enable()}));resetDestinationOutletID$=Me(this.newTrans.createNewTransaction$).pipe(J(()=>this.destinationOutlet.setValue({ID:T.GuidEmpty,Name:"Destination"})));assignDestinationIDFromInventoryROP=this.lowOnStock.destinationOutlet$;assignSourceOutletFromOverInventory=this.overOnStock.outletSource$;constructor(){xt([this.assignSourceOutlet$.pipe(ze(null)),this.assignSourceOutletFromOverInventory.pipe(ze(null))]).pipe(V(([r,e])=>T.IsNotEmpty(r)?r:e),k(r=>T.IsNotEmpty(r)),at()).subscribe(r=>{console.log(`Source Outlet: ${r.Name}`),this.sourceOutlet.setValue(r)}),xt([this.assignDestinationOutlet$.pipe(ze(null)),this.assignDestinationIDFromInventoryROP.pipe(ze(null))]).pipe(V(([r,e])=>T.IsNotEmpty(r)?r:e),k(r=>T.IsNotEmpty(r)),at()).subscribe(r=>{console.log(`Destination Outlet: ${r.Name}`),this.destinationOutlet.setValue(r)}),this.resetAndWarnOnSameOutlet$.subscribe(),this.resetSourceOutletID$.subscribe(),this.resetDestinationOutletID$.subscribe(),this.enableOutletOnNewTransaction$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac})};var It=class t{outlet=x(ce);matDialog=x(A);_import=new Ie;import$=this._import.asObservable();importedCart$=this.import$.pipe(ue(this.outlet.sourceOutletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.matDialog.open($i,{data:{sampleUrl:"https://res.cloudinary.com/pos/raw/upload/v1699867624/POS/CSV/ImportTransferOrder_DealPOS_New.csv",fileEndpoint:"/API/TransferOrder/UploadCsv",outletID:e,useUppy:!0}}).afterClosed()),k(r=>T.IsNotEmpty(r)),V(r=>r.map(e=>le(ae({},e.Variant),{Quantity:e.Quantity,Total:e.Price*e.Quantity,VariantID:e.VariantID,UnitPrice:e.Price,UnitCost:e.Cost,Serial:e.Serial,Note:e.Note,Discount:e.Discount,DiscountAmount:e.DiscountAmount}))));constructor(){}import(){this._import.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var In=class t{constructor(r){this.dialogRef=r;this.config.title="Empty outlet Inventory?",this.config.customWidth="500px"}config=new ye;ok(){this.dialogRef.close("empty")}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-clear-outlet"]],decls:4,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"h4",1),p(3,"This will populate cart with all inventory from source outlet!"),i()()()),e&2&&m("config",a.config)},dependencies:[Z,Ve,he],encapsulation:2})};var Tt=class t{outlet=x(ce);http=x(L);matDialog=x(A);outletID$=this.outlet.sourceOutletID$;_clearOutlet=new Ie;clearOutlet$=this._clearOutlet.asObservable();populateCartWithAllItemsFromSourceOutlet$=this.clearOutlet$.pipe(j(()=>this.matDialog.open(In).afterClosed()),k(r=>T.IsNotEmpty(r)),ue(this.outletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.http.get(Pe.getAllOutletInventory,[{key:"EntityID",value:e}]).pipe(je(()=>ke))));constructor(){}clearOutlet(){this._clearOutlet.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var wt=class t{outlet=x(ce);http=x(L);route=x(pe);loadRegister$=this.outlet.sourceOutletID$.pipe(k(r=>T.IsNotEmpty(r)),V(r=>[r,T.IsNotEmpty(this.route.snapshot.queryParams.ID)]),J(console.log),j(([r,e])=>this.http.get("/api/TransferOrderLoader/LoadRegister",[{key:"EntityID",value:r},{key:"IsEdit",value:e}])),rt(1));constructor(){this.loadRegister$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var $t=class t{outlet=x(ce);http=x(L);loadRegister=x(wt);outletID$=this.outlet.sourceOutletID$;quickKeyItems$=this.loadRegister.loadRegister$.pipe(V(r=>r.QuickKey));itemQuickKeyID=new Ge(T.GuidEmpty);itemQuickKey$=si(()=>this.itemQuickKeyID.valueChanges.pipe(ze(this.itemQuickKeyID.value))).pipe(k(r=>T.IsNotEmpty(r)),ue(this.outletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.http.get(Pe.GetVariantByID,[{key:"ID",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Et=class t{outlet=x(ce);http=x(L);_scanSerial=new Ie;scanSerial$=this._scanSerial.asObservable();item$=this.scanSerial$.pipe(ue(this.outlet.sourceOutletID$),j(([r,e])=>this.http.get(Pe.GetVariantBySerial,[{key:"Serial",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));constructor(){}scanSerial(r){this._scanSerial.next(r)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Tn=class t{constructor(r){this.dialogRef=r;this.config.title="Void Transaction?"}config=new ye;ok(){this.dialogRef.close("void")}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-void"]],decls:4,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"h4",1),p(3,"This will erase all current data. Are you sure?"),i()()()),e&2&&m("config",a.config)},dependencies:[Z,Ve,he],encapsulation:2})};var Je=class t{matDialog=x(A);_void=new Ie;void$=this._void.asObservable().pipe(j(()=>this.matDialog.open(Tn).afterClosed()),k(r=>T.IsNotEmpty(r)),rt(1));void(){this._void.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Kt=class t{outlet=x(ce);http=x(L);variantAutocomplete=new Ge(null);getVariantByCode$=this.variantAutocomplete.valueChanges.pipe(k(r=>T.IsNotEmpty(r)&&r.type=="Code"),V(r=>r.str),ue(this.outlet.sourceOutletID$),j(([r,e])=>this.http.get(Pe.GetVariantByCode,[{key:"Code",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));getVariantByID$=this.variantAutocomplete.valueChanges.pipe(k(r=>T.IsNotEmpty(r)&&r.type=="ID"),V(r=>r.str),ue(this.outlet.sourceOutletID$),j(([r,e])=>this.http.get(Pe.GetVariantByID,[{key:"ID",value:r},{key:"EntityID",value:e}]).pipe(je(()=>ke))));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var _d=["quantity"],no=t=>({selected:t}),fd=()=>["/menu/Products/Catalog/Variants/Info"],gd=t=>({ID:t}),Cd=t=>({"table-light":t});function vd(t,r){if(t&1){let e=D();n(0,"a",10),g("click",function(){d(e);let o=s();return u(o.onTabChange("Product"))}),p(1," Product "),i()}if(t&2){let e=s();m("ngClass",M(1,no,e.tabState=="Product"))}}function xd(t,r){if(t&1){let e=D();q(0),n(1,"a",11),g("click",function(){d(e);let o=s();return u(o.onTabChange("Serial"))}),p(2," Serial "),i(),U()}if(t&2){let e=s();l(),m("ngClass",M(1,no,e.tabState=="Serial"))}}function yd(t,r){if(t&1&&(q(0),n(1,"div",19)(2,"div",22),f(3,"POS-variant-autocomplete",23),i()(),U()),t&2){let e=s(2);l(3),m("formControl",e.variantAutocomplete)("isOnModalVariant",!0)}}function hd(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s(2);l(),I("(",e.variant.UOMName,")")}}function Sd(t,r){if(t&1){let e=D();n(0,"div",24)(1,"strong"),p(2,"Price"),i(),n(3,"input",25,2),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.variant.UnitPrice,o)||(c.variant.UnitPrice=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("simpleKeyboard",e.keyboard),y("ngModel",e.variant.UnitPrice)}}function bd(t,r){if(t&1){let e=D();n(0,"div",24)(1,"strong"),p(2,"Cost"),i(),n(3,"input",25,2),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.variant.UnitCost,o)||(c.variant.UnitCost=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("simpleKeyboard",e.keyboard),y("ngModel",e.variant.UnitCost)}}function Dd(t,r){if(t&1){let e=D();q(0),n(1,"div",12),_(2,yd,4,2,"ng-container",8),n(3,"div",13)(4,"div",14)(5,"strong"),p(6," Qty "),_(7,hd,2,1,"span",8),i(),n(8,"input",15,0),S("ngModelChange",function(o){d(e);let c=s();return h(c.variant.Quantity,o)||(c.variant.Quantity=o),u(o)}),i()(),_(10,Sd,5,2,"div",16)(11,bd,5,2,"div",16),n(12,"div",17)(13,"strong"),p(14,"Discount %"),i(),n(15,"input",18,1),S("ngModelChange",function(o){d(e);let c=s();return h(c.variant.Discount,o)||(c.variant.Discount=o),u(o)}),i()()(),n(17,"div",19)(18,"div",20)(19,"POS-tinymce-editor",21),S("ngModelChange",function(o){d(e);let c=s();return h(c.variant.Note,o)||(c.variant.Note=o),u(o)}),i()()()(),U()}if(t&2){let e=s();l(2),m("ngIf",e.isCreate),l(5),m("ngIf",e.variant.UOMName),l(),m("simpleKeyboard",e.keyboard)("decimalPlaces",e.isSerialItem?0:4),y("ngModel",e.variant.Quantity),m("disabled",e.isEditBuyForm&&e.isSerialItem),l(2),m("ngIf",e.appConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible),l(),m("ngIf",e.appConfigJSON.ModuleDelivery.OutletDelivery.CostVisible),l(4),m("simpleKeyboard",e.keyboard),y("ngModel",e.variant.Discount),m("readonly",!e.role.sell.Discount),l(4),y("ngModel",e.variant.Note)}}function Id(t,r){t&1&&(q(0),f(1,"i",32),n(2,"h6"),p(3,"No Image"),i(),U())}function Td(t,r){if(t&1&&f(0,"img",33),t&2){let e=s(2);m("src",e.variant.ThumbnailUrl,Xt)}}function wd(t,r){if(t&1&&(n(0,"th",34),f(1,"i",36),p(2),i()),t&2){let e=s(3);l(2),I("",e.destinationName," ")}}function Ed(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.onHand)," ")}}function Od(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.allocated)," ")}}function Md(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.onHand-e.destination.allocated)," ")}}function Pd(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.rop)," ")}}function Fd(t,r){if(t&1&&(n(0,"td",49),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),Qe(" ",e.destination.ropDiff>=0?"+":"","",E(2,2,e.destination.ropDiff)," ")}}function Vd(t,r){if(t&1&&(n(0,"td",41),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),I(" ",E(2,1,e.destination.max)," ")}}function Nd(t,r){if(t&1&&(n(0,"td",50),p(1),v(2,"number"),i()),t&2){let e=s().ngIf;l(),Qe(" ",e.destination.maxDiff>=0?"+":"","",E(2,2,e.destination.maxDiff)," ")}}function Ld(t,r){if(t&1){let e=D();n(0,"button",51),g("click",function(){d(e);let o=s().ngIf,c=s(2);return u(c.setQuantityToMax(o))}),p(1," Place Order "),i()}}function kd(t,r){if(t&1&&(n(0,"tbody")(1,"tr")(2,"th",34),f(3,"i",35),p(4,"Inventory "),i(),n(5,"th",34),f(6,"i",36),p(7),i(),_(8,wd,3,1,"th",37),n(9,"th",34),f(10,"i",38),p(11," Diff "),i(),n(12,"th",34),f(13,"i",39),p(14," Action "),i()(),n(15,"tr")(16,"th",40),p(17,"On Hand"),i(),n(18,"td",41),p(19),v(20,"number"),i(),_(21,Ed,3,3,"td",42),f(22,"td",43)(23,"td",44),i(),n(24,"tr")(25,"th",40),p(26,"Allocated"),i(),n(27,"td",41),p(28),v(29,"number"),i(),_(30,Od,3,3,"td",42),i(),n(31,"tr")(32,"th",40),p(33,"Available"),i(),n(34,"td",41),p(35),v(36,"number"),i(),_(37,Md,3,3,"td",42),i(),n(38,"tr")(39,"th",40),p(40,"ROP"),i(),n(41,"td",41),p(42),v(43,"number"),i(),_(44,Pd,3,3,"td",42)(45,Fd,3,4,"td",45),i(),n(46,"tr")(47,"th",40),p(48,"Max"),i(),n(49,"td",41),p(50),v(51,"number"),i(),_(52,Vd,3,3,"td",42)(53,Nd,3,4,"td",46),n(54,"td",47),_(55,Ld,2,0,"button",48),i()()()),t&2){let e=r.ngIf,a=s(2);l(7),I("",a.outletName," "),l(),m("ngIf",a.isEmptyDestinationID()),l(11),I(" ",E(20,16,e.source.onHand)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(7),I(" ",E(29,18,e.source.allocated)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(5),I(" ",E(36,20,e.source.onHand-e.source.allocated)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(5),I(" ",E(43,22,e.source.rop)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(),m("ngIf",a.isEmptyDestinationID()),l(5),I(" ",E(51,24,e.source.max)," "),l(2),m("ngIf",a.isEmptyDestinationID()),l(),m("ngIf",a.isEmptyDestinationID()),l(),m("ngClass",M(26,Cd,a.variant.Quantity==e.source.max-e.source.onHand-e.source.allocated)),l(),m("ngIf",a.variant.Quantity!=e.source.max-e.source.onHand-e.source.allocated)}}function Rd(t,r){if(t&1&&(q(0),n(1,"div",26)(2,"div",27)(3,"a",28),_(4,Id,4,0,"ng-container",29)(5,Td,1,1,"ng-template",null,3,X),i()(),n(7,"div",30)(8,"table",31),_(9,kd,56,28,"tbody",8),v(10,"async"),i()()(),U()),t&2){let e=Fe(6),a=s();l(3),m("routerLink",N(7,fd))("queryParams",M(8,gd,a.variant==null?null:a.variant.ID)),l(),m("ngIf",(a.variant==null?null:a.variant.ThumbnailUrl)==null)("ngIfElse",e),l(5),m("ngIf",E(10,5,a.variantStock$))}}function Ad(t,r){if(t&1){let e=D();q(0),n(1,"app-item-serial",52),S("cartItemChange",function(o){d(e);let c=s();return h(c.variant,o)||(c.variant=o),u(o)}),i(),U()}if(t&2){let e=s();l(),m("entityId",e.outletID),y("cartItem",e.variant),m("disabled",e.isEditBuyForm)}}var xi=class t{constructor(r,e,a,o,c,O){this.dialogRef=r;this.http=a;this.role=o;this.toastr=O;this.config=new ye,this.config.title=e.variant?.Name??"Add Variant",this.config.customWidth="750px",this.appConfigJSON=e.appConfigJSON,this.unitQtyLabel=this.appConfigJSON.ModuleSell.ProductDialog.UnitQtyLabel,this.numpadVisible=this.appConfigJSON.ModuleSell.NumPadVisible,this.numpadVisible&&(this.keyboard=c.keyboard),this.isEditBuyForm=e.isEditBuyForm,this.outletID=e.outletID,this.outletName=e.outletName,this.destinationID=e.destinationID,this.destinationName=e.destinationName,this.variant=e.variant;let re=this.appConfigJSON?.ModuleSell?.ProductDialog?.QuantityToOneInDialog?1:null;if(this.variant)this.isSerialItem=this.variant.TypeID==4,this.variantStock$=this.getOnInventory();else{this.isCreate=!0,this.variant={Quantity:re,UnitQuantity:1,OrderPrice:0,Total:0,Note:"",UnitPrice:0,ThumbnailUrl:"",UOMName:"",TypeID:0,Discount:0,ID:"",Serial:[],UnitCost:0,VariantID:T.GuidEmpty};let Ue=this.variantAutocomplete.valueChanges.pipe(k(Y=>Y.type=="Code"),V(Y=>Y.str),j(Y=>a.get(Pe.GetVariantByCode,[{key:"Code",value:Y},{key:"EntityID",value:this.outletID}]).pipe(je(()=>ke))),V(Y=>this.setUnitPrice(Y)),V(Y=>le(ae({},Y),{Quantity:re,Total:Y.UnitPrice,VariantID:Y.ID})),J(Y=>this.config.title=Y.Name)),ci=this.variantAutocomplete.valueChanges.pipe(k(Y=>Y.type=="ID"),V(Y=>Y.str),j(Y=>a.get(Pe.GetVariantByID,[{key:"ID",value:Y},{key:"EntityID",value:this.outletID}]).pipe(je(()=>ke))),V(Y=>this.setUnitPrice(Y)),V(Y=>le(ae({},Y),{Quantity:re,Total:Y.UnitPrice,VariantID:Y.ID})),J(Y=>this.config.title=Y.Name));Me(Ue,ci).pipe(J(Y=>this.setFocusField("quantity")),rt(1)).subscribe(Y=>{this.variant=Y,this.isSerialItem=this.variant.TypeID==4,this.showInventory=!0,this.variantStock$=this.getOnInventory()})}}variantAutocomplete=new Ge;_quantityElement;variant;variantStock$=ke;isSerialItem=!1;outletID;outletName;destinationID;destinationName;appConfigJSON;numpadVisible;keyboard;isEditBuyForm=!1;unitQtyLabel;config;tabState="Cart";isCreate=!1;showInventory=!1;serials=[];isFocusOnSerialInput=!1;_onGetInventory=new dt(void 0);onGetInventory$=this._onGetInventory.asObservable();setFocusField(r){switch(r){case"quantity":this._quantityElement.nativeElement.focus();break}}onTabChange(r){this.tabState=r}ok(){if(!this.isFocusOnSerialInput){if(this.checkQuantityIsNull(),this.isSerialItem){if(this.serials.length){let a=this.serials.map(o=>({Quantity:1,Number:o}));this.variant.Serial=[...this.variant.Serial,...a]}let r=this.variant.Serial?.map(a=>a.Quantity).reduce((a,o)=>a+o,0)??0,e=this.variant.Quantity;if(r!=e){this.toastr.warning("Serial Quantity must be equal to Variant Quantity","Warning");return}}this.dialogRef.close({item:le(ae({},this.variant),{Total:this.variant.UnitPrice*this.variant.UnitQuantity*this.variant.Quantity*((100-(this.variant.Discount??0))/100)})})}}close(){this.dialogRef.close()}checkQuantityIsNull(){this.variant.Quantity==null&&(this.variant.Quantity=1)}setQuantityToMax(r){let e=r.destination.onHand-r.destination.allocated;r.destination.max>=e?(this.variant.Quantity=r.destination.max-e,this.toastr.success("Qty adjusted to Max Inventory","Success"),this.ok()):this.toastr.warning("Your Inventory Available is more than Max Inventory","Warning")}getOnInventory(){let r=a=>{let o=a.OnHand-a.Allocated;return{onHand:a.OnHand,allocated:a.Allocated,rop:a.ROP,max:a.Max,maxDiff:a.Max-o,ropDiff:a.ROP-o}},e=lo({source:this.http.get(Pe.GetVariantStockByID,[{key:"ID",value:this.variant.VariantID},{key:"EntityID",value:this.outletID}]).pipe(V(r)),destination:this.http.get(Pe.GetVariantStockByID,[{key:"ID",value:this.variant.VariantID},{key:"EntityID",value:this.destinationID}]).pipe(V(r))});return this.onGetInventory$.pipe(co((a,o)=>a?ut(a):e,null),V(a=>a),rt(1))}setUnitPrice(r){return ae({},r)}isEmptyDestinationID(){return!T.IsEmpty(this.destinationID)}static \u0275fac=function(e){return new(e||t)(C(xe),C($e),C(L),C(ie),C(nr),C(ee))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-item"]],viewQuery:function(e,a){if(e&1&&Ii(_d,5),e&2){let o;Ti(o=wi())&&(a._quantityElement=o.first)}},decls:12,vars:9,consts:[["quantity",""],["discount",""],["price",""],["SHOW_IMAGE",""],[3,"onOk","onCancel","onClose","config"],[1,"row","border-bottom","mx-5"],["data-cy","input_sell",1,"btn","btn-link",3,"click","ngClass"],["class","btn btn-link","data-cy","product",3,"ngClass","click",4,"ngIf"],[4,"ngIf"],[1,"mx-8"],["data-cy","product",1,"btn","btn-link",3,"click","ngClass"],["data-cy","serial",1,"btn","btn-link",3,"click","ngClass"],[1,"mt-8"],[1,"row","mt-8"],[1,"col-auto","mb-4","pe-0",2,"width","82px"],["id","txtCartQuantity","keyboardType","number","type","text","autoNum","",1,"form-control","input-numpad",3,"ngModelChange","simpleKeyboard","decimalPlaces","ngModel","disabled"],["class","col-auto pe-0","style","width: 112px",4,"ngIf"],[1,"col-auto","pe-0",2,"width","90px"],["id","inputDiscount","keyboardType","number","type","text","autoNum","","percentage","",1,"form-control",3,"ngModelChange","simpleKeyboard","ngModel","readonly"],[1,"row"],[1,"col","tinymce"],["height","210px",3,"ngModelChange","ngModel"],[1,"col"],[3,"formControl","isOnModalVariant"],[1,"col-auto","pe-0",2,"width","112px"],["id","inputPrice","keyboardType","number","type","text","autoNum","",1,"form-control",3,"ngModelChange","simpleKeyboard","ngModel"],[1,"row","mt-6"],[1,"col-sm-3","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],[1,"col-sm-9"],[1,"table","table-bordered","text-center","inventory-table","w-100"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[1,"bg-light-orange"],["aria-hidden","true",1,"fa-box-archive","fa-solid","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-house","fa-1x","me-2"],["class","bg-light-orange",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-plus-minus","fa-1x","me-2"],["aria-hidden","true",1,"fa-solid","fa-sliders","fa-1x","me-2"],[1,"table-light","text-start"],[1,"text-end"],["class","text-end",4,"ngIf"],["rowspan","3",1,"table-light"],["rowspan","4",1,"table-light"],["class","text-danger",4,"ngIf"],["class","text-success",4,"ngIf"],[3,"ngClass"],["style","font-size: 12px","type","button","class","btn btn-success btn-sm me-2","matTooltipPosition","above","matTooltip","Adjust Bought Qty to max Inventory",3,"click",4,"ngIf"],[1,"text-danger"],[1,"text-success"],["type","button","matTooltipPosition","above","matTooltip","Adjust Bought Qty to max Inventory",1,"btn","btn-success","btn-sm","me-2",2,"font-size","12px",3,"click"],[3,"cartItemChange","entityId","cartItem","disabled"]],template:function(e,a){e&1&&(n(0,"modal-material",4),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",5)(3,"div")(4,"a",6),g("click",function(){return a.onTabChange("Cart")}),p(5," Cart "),i(),_(6,vd,2,3,"a",7)(7,xd,3,3,"ng-container",8),i()(),n(8,"div",9),_(9,Dd,20,12,"ng-container",8)(10,Rd,11,10,"ng-container",8)(11,Ad,2,3,"ng-container",8),i()()()),e&2&&(m("config",a.config),l(4),m("ngClass",M(7,no,a.tabState=="Cart")),l(2),m("ngIf",a.appConfigJSON.ModuleDelivery.OutletDelivery.Inventory&&(!a.isCreate||a.showInventory)&&a.role.inventory.View),l(),m("ngIf",a.isSerialItem),l(2),m("ngIf",a.tabState=="Cart"),l(),m("ngIf",a.tabState=="Product"&&a.role.inventory.View),l(),m("ngIf",a.tabState=="Serial"))},dependencies:[Z,pt,B,it,_e,St,ht,ot,fe,R,H,Pi,Ve,he,Ri,mt,Wi,gt,z,pr,or,Ki,kt,ti,zi,mr],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}p-chips[_ngcontent-%COMP%] ul.p-inputtext{width:570px;max-width:570px;border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] ul.p-inputtext li.p-chips-input-token>input[type=text]{border:none}p-chips[_ngcontent-%COMP%] .p-chips .p-chips-multiple-container:not(.p-disabled):hover{border:1px solid #C8D3DF}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container{display:inline-block}p-chips[_ngcontent-%COMP%] .p-chips-multiple-container .p-chips-token{margin:2px;background:#96bf48}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}"]})};var Nt=class t{loadForm=x(Le);newTransaction=x(Oe);isEdit=new dt(!1);isEdit$=this.isEdit.asObservable();constructor(){this.loadForm.data$.subscribe(()=>this.setIsEdit(!0)),this.newTransaction.createNewTransaction$.subscribe(()=>this.setIsEdit(!1))}setIsEdit(r){this.isEdit.next(r)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ot=class t{outlet=x(ce);loadForm=x(Le);route=x(pe);matDialog=x(A);isEdit$=x(Nt).isEdit$;_addItem=new Ie;addItem$=this._addItem.asObservable().pipe(j(()=>ut({outletID:this.outlet.sourceOutlet.value.ID,outletName:this.outlet.sourceOutlet.value.Name,destinationID:this.outlet.destinationOutlet.value.ID,destinationName:this.outlet.destinationOutlet.value.Name})),j(r=>xt([this.loadForm.config$,ut(r)]).pipe(zt(1))),ue(this.isEdit$),j(([[r,e],a])=>this.matDialog.open(xi,{data:{appConfigJSON:r,isEdit:a,outletID:e.outletID,outletName:e.outletName,destinationID:e.destinationID,destinationName:e.destinationName}}).afterClosed()),k(r=>T.IsNotEmpty(r?.item)),V(r=>r.item));_editItem=new Ie;editItem$=this._editItem.asObservable().pipe(j(r=>ut({outletID:this.outlet.sourceOutlet.value.ID,outletName:this.outlet.sourceOutlet.value.Name,destinationID:this.outlet.destinationOutlet.value.ID,destinationName:this.outlet.destinationOutlet.value.Name,item:r.item,index:r.index})),j(r=>xt([this.loadForm.config$,ut(r)]).pipe(zt(1))),ue(this.isEdit$),j(([[r,e],a])=>this.matDialog.open(xi,{data:{appConfigJSON:r,isEdit:a,outletID:e.outletID,outletName:e.outletName,destinationID:e.destinationID,destinationName:e.destinationName,variant:e.item}}).afterClosed().pipe(k(o=>T.IsNotEmpty(o?.item)),V(o=>({item:o.item,index:e.index})))));addItem(){this._addItem.next()}editItem(r,e){this._editItem.next({item:ae({},r),index:e})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var tt=class t{importCart=x(It);clearOutlet=x(Tt);loadForm=x(Le);quickKey=x($t);scanSerialService=x(Et);void=x(Je);newTrans=x(Oe);variantAutocomplete=x(Kt);itemDialog=x(Ot);lowOnStock=x(At);overOnStock=x(Bt);_cartAction=new Ie;cartAction$=this._cartAction.asObservable();outletService=x(ce);RFIDService=x(Ji);constructor(){this.outletService.sourceOutletID$.pipe(j(r=>this.RFIDService.processGroupedData(r)),J(r=>this.rfid(r))).subscribe(),this.cart$.subscribe(),Me(this.importCart.importedCart$,this.clearOutlet.populateCartWithAllItemsFromSourceOutlet$).pipe(V(r=>({action:"addBulkItems",items:r}))).subscribe(r=>this._cartAction.next(r)),Me(this.loadForm.items$,this.lowOnStock.items$,this.overOnStock.items$).pipe(k(r=>T.IsNotEmpty(r)&&r.length>0),V(r=>({action:"replaceCart",items:r}))).subscribe(r=>this._cartAction.next(r)),this.scanSerialService.item$.pipe(V(r=>({action:"scanSerial",item:this.formatItemObject(r)}))).subscribe(r=>this._cartAction.next(r)),Me(this.void.void$,this.newTrans.createNewTransaction$).subscribe(()=>this._cartAction.next({action:"emptyCart"})),Me(this.variantAutocomplete.getVariantByCode$,this.variantAutocomplete.getVariantByID$,this.quickKey.itemQuickKey$).pipe(V(r=>({action:"add",item:r}))).subscribe(r=>this._cartAction.next(r)),this.itemDialog.addItem$.pipe(V(r=>({action:"addToNewRow",item:r}))).subscribe(r=>this._cartAction.next(r)),this.itemDialog.editItem$.pipe(V(r=>({action:"update",item:r.item,index:r.index}))).subscribe(r=>this._cartAction.next(r))}rearrangeCart(r){this._cartAction.next({action:"rearrangeCart",ev:r})}remove(r){this._cartAction.next({action:"remove",index:r})}add(r){this._cartAction.next({action:"add",item:r})}addToNewRow(r){this._cartAction.next({action:"addToNewRow",item:r})}addbulkItems(r){this._cartAction.next({action:"addBulkItems",items:r})}replaceCart(r){this._cartAction.next({action:"replaceCart",items:r})}scanSerial(r){this._cartAction.next({action:"scanSerial",item:r})}return(r){this._cartAction.next({action:"return",index:r})}purchase(r){this._cartAction.next({action:"purchase",index:r})}rfid(r){this._cartAction.next({action:"rfid",items:r})}formatItemObject=r=>{let o=r,{ID:e}=o,a=ro(o,["ID"]);return le(ae({},a),{Quantity:a.Quantity??1,Total:a.Total??a.UnitPrice,VariantID:e})};cart$=this.cartAction$.pipe(Si((r,e)=>{let a=[...r],o=[],c=e.action;if(c=="add"){let O=e.item,Q=a.findIndex(re=>re.VariantID==O.ID);o=Q!=-1?a.map((re,Ue)=>Ue==Q?le(ae({},re),{Quantity:re.Quantity+1,Total:re.Total+re.UnitPrice}):re):[...a,this.formatItemObject(O)]}else if(c=="update"){let O=e.item,Q=e.index;o=a.map((re,Ue)=>Ue==Q?ae({},O):re)}else if(c=="remove"){let O=e.index;o=a.filter((Q,re)=>re!=O)}else if(c=="addToNewRow"){let O=e.item;o=[...a,this.formatItemObject(O)]}else if(c=="addBulkItems"){let O=e.items;o=[...a,...O.map(Q=>this.formatItemObject(Q))]}else if(c=="replaceCart")o=[...e.items];else if(c=="rearrangeCart"){let O=e.ev;o=a,ko(o,O.previousIndex,O.currentIndex)}else if(c=="emptyCart")o=[];else if(c=="scanSerial"){let O=le(ae({},e.item),{Serial:[{Number:e.item.Serial.Number,Quantity:1,ExpiryDate:e.item.Serial.ExpiryDate}]});if(!!a.find(re=>re.VariantID==O.VariantID)){let re=O.Serial[0],Ue=a.find(Y=>Y.VariantID==O.VariantID),Lt=!!Ue.Serial.find(Y=>Y.Number==re.Number)?[...Ue.Serial].map(Y=>Y.Number==re.Number?le(ae({},Y),{Quantity:Y.Quantity+1}):Y):[...Ue.Serial,re];o=a.map(Y=>Y.VariantID==O.VariantID?le(ae({},Y),{Quantity:Y.Quantity+1,Total:Y.Total+Y.UnitPrice,Serial:Lt}):Y)}else o=[...a,le(ae({},O),{Quantity:1,Total:O.UnitPrice})]}else if(c=="return"){let O=e.index;o=a.map((Q,re)=>re==O?le(ae({},Q),{Quantity:-Math.abs(Q.Quantity),Total:-Math.abs(Q.Total)}):Q)}else if(c=="purchase"){let O=e.index;o=a.map((Q,re)=>re==O?le(ae({},Q),{Quantity:Math.abs(Q.Quantity),Total:Math.abs(Q.Total)}):Q)}else if(c==="rfid"){let O=e.items;console.log("items",O);let Q=[];Object.keys(O).forEach(re=>{if(O.hasOwnProperty(re)){let Ue=O[re];if(Ue&&Object.keys(Ue.variant).length>0){let ci=a.findIndex(Lt=>Lt.Code.toLowerCase()===re.toLowerCase());if(ci!==-1){let Lt=Number(Ue.count);a[ci].Quantity+=Lt,delete O[re],Q=[...a]}else{let Lt=Ue.variant,Y=Number(Ue.count),qr=this.formatItemObject(le(ae({},Lt),{Quantity:Y}));delete O[re],Q=[...a,qr]}}}}),o=[...Q]}return o},[]),ze([]),rt(1));static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var wn=class t{constructor(r){this.dialogRef=r;this.config.title="New Courier",this.config.customWidth="500px"}config=new ye;courier="";ok(){T.IsNotEmpty(this.courier)?this.dialogRef.close(this.courier):this.close()}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-add-courier"]],decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row"],[1,"col-sm-12"],[1,"form-floating-outline"],["type","text","placeholder","Add New Courier",1,"form-control",3,"ngModelChange","ngModel"],["for","newCourier"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"input",4),S("ngModelChange",function(c){return h(a.courier,c)||(a.courier=c),c}),i(),n(6,"label",5),p(7,"Add New Courier"),i()()()()()()),e&2&&(m("config",a.config),l(5),y("ngModel",a.courier))},dependencies:[Z,Ve,he,ot,fe,R,H],encapsulation:2})};var Qt=class t{http=x(L);loadForm=x(Le);toastr=x(ee);void=x(Je);matDialog=x(A);newTrans=x(Oe);outletService=x(ce);courierSubject=new dt([]);courierID=new Ge(null);_addNewCourier=new Ie;addNewCourier$=this._addNewCourier.asObservable().pipe(j(()=>this.matDialog.open(wn).afterClosed()),k(r=>T.IsNotEmpty(r)),j(r=>this.http.post("/API/TransferOrder/UpdateCourierList",{name:r}).pipe(V(e=>le(ae({},e),{Name:r}))).pipe(je(()=>ke))),J(r=>{this.courierID.setValue(r.ID),this.toastr.success(r.Message,Ce.Success)}));initialCouriers$=this.courierSubject.asObservable();couriers$=ao(this.initialCouriers$,this.addNewCourier$).pipe(Si((r,e)=>{let a=[];return Array.isArray(e)==!1?a=[...r,e]:a=e,a},[]));assignCourierID$=Me(this.loadForm.data$.pipe(V(r=>r.Order.CourierID==T.GuidEmpty?null:r.Order.CourierID),J(r=>this.courierID.setValue(r))),this.initialCouriers$.pipe(V(r=>{let e=null;return r?.length==1&&(e=r[0].ID),e}))).pipe(J(r=>{this.courierID.setValue(r)}));resetCourierID$=Me(this.void.void$,this.newTrans.createNewTransaction$).pipe(J(()=>this.courierID.setValue(null)));constructor(){this.assignCourierID$.subscribe(),this.resetCourierID$.subscribe(),this.listenDestinationChanges()}listenDestinationChanges(){this.outletService.destinationOutletID$.pipe(j(r=>T.IsEmpty(r)?ke:this.getCouriersByDestinationId(r).pipe()),at()).subscribe()}getCouriersByDestinationId(r){return this.http.get(`${Pe.GetCourierByOutletDestination}/${r}`).pipe(J(e=>{this.courierSubject.next(e.Data)}),je(e=>ke))}addNewCourier(){this._addNewCourier.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Jt=class t{loadForm=x(Le);void=x(Je);newTrans=x(Oe);invoiceDate=new Ge(new Date);assignInvoiceDate$=this.loadForm.data$.pipe(V(r=>r.Order.Date),J(r=>this.invoiceDate.setValue(r)));resetInvoiceDate$=Me(this.void.void$,this.newTrans.createNewTransaction$).pipe(J(()=>this.invoiceDate.setValue(new Date)));constructor(){this.assignInvoiceDate$.subscribe(),this.resetInvoiceDate$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var yi=class t{route=x(pe);void=x(Je);newTransaction=x(Oe);overOnStock=x(Bt);isOpenOutletDialog=new dt(!1);lowOnStock=x(At);outletService=x(ce);isOpenOutletDialog$=this.isOpenOutletDialog.asObservable().pipe(ue(this.outletService.sourceOutletID$),V(([r,e])=>T.IsNotEmpty(e)?!1:r));_onCloseOutletDialog=new dt(!1);isOpenDestinationDialog$=this._onCloseOutletDialog.pipe(ue(this.lowOnStock.destinationOutlet$.pipe(ze(null)),this.overOnStock.outletSource$.pipe(ze(null))),V(([r,e,a])=>{let o=!1;return T.IsNotEmpty(e)&&T.IsNotEmpty(e?.ID)?o=!1:T.IsNotEmpty(a)&&T.IsNotEmpty(a?.ID)?o=!0:o=r,o}));onCloseOutletDialog(){this._onCloseOutletDialog.next(!0)}isEdit$=ut(T.IsNotEmpty(this.route.snapshot.queryParams.ID)).pipe(J(r=>this.isOpenOutletDialog.next(!r)));reopenOutletDialog=this.void.void$.pipe(J(()=>this.isOpenOutletDialog.next(!0)));onCreateNewTransaction=this.newTransaction.createNewTransaction$.pipe(J(()=>this.isOpenOutletDialog.next(!0)));constructor(){this.isEdit$.subscribe(),this.reopenOutletDialog.subscribe(),this.onCreateNewTransaction.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Yt=class t{route=x(pe);outlet=x(ce);http=x(L);loadForm=x(Le);void=x(Je);newTrans=x(Oe);loadRegister=x(wt);outletID$=this.outlet.sourceOutletID$;orderNumber=new Ge("");assignGeneratedNumber$=this.loadRegister.loadRegister$.pipe(k(()=>T.IsEmpty(this.route.snapshot.queryParams.ID)),V(r=>r.Number),J(r=>this.orderNumber.setValue(r)));assignOrderNumber$=this.loadForm.data$.pipe(V(r=>r.Order.Number),J(r=>this.orderNumber.setValue(r)));resetOrderNumber$=this.newTrans.createNewTransaction$.pipe(J(()=>this.orderNumber.setValue("")));generateOrderNumberOnNewTransaction$=this.newTrans.createNewTransaction$.pipe(ue(this.outletID$),k(([r,e])=>T.IsNotEmpty(e)),j(([r,e])=>this.http.post("/API/TransferOrder/GenerateNumber",{ID:e})),J(r=>this.orderNumber.setValue(r.Number)));constructor(){this.assignGeneratedNumber$.subscribe(),this.assignOrderNumber$.subscribe(),this.generateOrderNumberOnNewTransaction$.subscribe(),this.resetOrderNumber$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Bd=()=>["/menu/Products/Catalog/Variants/Info"],Wd=t=>({ID:t});function Hd(t,r){if(t&1&&(n(0,"div"),p(1),i()),t&2){let e=r.$implicit;l(),b(e)}}function jd(t,r){if(t&1&&(n(0,"tr")(1,"td")(2,"a",11),p(3),i(),n(4,"small",12),p(5),i()(),n(6,"td",13),p(7),i(),n(8,"td",13),p(9),i(),n(10,"td",13),p(11),i(),n(12,"td",13),p(13),i(),n(14,"td",13),p(15),i(),n(16,"td",13),p(17),i(),n(18,"td"),_(19,Hd,2,1,"div",10),i()()),t&2){let e=r.$implicit;l(2),m("routerLink",N(11,Bd))("queryParams",M(12,Wd,e.VariantID)),l(),b(e.Name),l(2),b(e.Code),l(2),b(e.RequestQuantity),l(2),b(e.SourceInventory.Available),l(2),b(e.DestinationInventory.Available),l(2),b(e.DestinationInventory.ROP),l(2),b(e.DestinationInventory.Max),l(2),b(e.RecommendedQuantity),l(2),m("ngForOf",e.Notes)}}var En=class t{constructor(r,e){this.dialogRef=r;this.config.title="Analyze",this.config.customWidth="700px",this.config.hideFooter=!0,this.config.bodyScrollable=!0,this.inventory=e.inventory,console.log(this.inventory)}config=new ye;inventory;close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||t)(C(xe),C($e))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-analyze-inventory"]],decls:26,vars:2,consts:[[3,"onCancel","onClose","config"],[1,"container-fluid"],[1,"row"],[1,"col-12"],["id","tableGrid",1,"table","table-bordered"],[1,"thead-light"],["matTooltip","Source Inventory","matTooltipPosition","above",1,"fa-solid","fa-house"],["matTooltip","Destination Inventory","matTooltipPosition","above",1,"fa-solid","fa-truck"],["matTooltip","Source Outlet ROP","matTooltipPosition","above"],["matTooltip","Source Outlet MAX","matTooltipPosition","above"],[4,"ngFor","ngForOf"],["target","_blank",3,"routerLink","queryParams"],[1,"d-block"],[1,"text-end"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"div",3)(5,"table",4)(6,"thead",5)(7,"tr")(8,"th"),p(9,"Product"),i(),n(10,"th"),p(11,"Req"),i(),n(12,"th"),f(13,"i",6),i(),n(14,"th"),f(15,"i",7),i(),n(16,"th",8),p(17,"ROP"),i(),n(18,"th",9),p(19,"MAX"),i(),n(20,"th"),p(21,"Recommend"),i(),n(22,"th"),p(23,"Note"),i()()(),n(24,"tbody"),_(25,jd,20,14,"tr",10),i()()()()()()()),e&2&&(m("config",a.config),l(25),m("ngForOf",a.inventory))},dependencies:[Z,K,ii,Ae,Ve,he,gt,z],encapsulation:2})};var qt=class t{http=x(L);outlet=x(ce);matDialog=x(A);cart=x(tt);_analyze=new Ie;analyze$=this._analyze.asObservable();analyzeInventory$=this.analyze$.pipe(j(()=>xt([this.outlet.sourceOutletID$,this.outlet.destinationOutletID$,this.cart.cart$]).pipe(zt(1))),k(([r,e,a])=>T.IsNotEmpty(r)&&T.IsNotEmpty(e)&&a.length>0),j(([r,e,a])=>this.http.post("/API/TransferOrder/Analyze",{DestinationOutlet:e,Items:a.map(o=>le(ae({},o),{ID:o.VariantID})),SourceOutlet:r}).pipe(V(o=>o.map(c=>le(ae({},c),{Code:a.find(O=>O.VariantID===c.VariantID)?.Code,VariantID:a.find(O=>O.VariantID===c.VariantID)?.VariantID,Name:a.find(O=>O.VariantID===c.VariantID)?.Name}))),je(()=>ke))),j(r=>this.matDialog.open(En,{data:{inventory:r}}).afterClosed()));constructor(){this.analyzeInventory$.subscribe()}analyze(){this._analyze.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var oo=t=>({selected:t});function Qd(t,r){if(t&1){let e=D();n(0,"div",9)(1,"label",10)(2,"input",11),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.typeID,o)||(c.typeID=o),u(o)}),i(),p(3),i()()}if(t&2){let e=r.$implicit,a=r.index,o=s(2);l(),_i("for","potype-"+a),m("ngClass",M(6,oo,o.typeID==e.ID)),l(),_i("id","potype-"+a),y("ngModel",o.typeID),m("value",e.ID),l(),I(" ",e.Name," ")}}function qd(t,r){if(t&1&&(n(0,"div",6),q(1),n(2,"div",7),_(3,Qd,4,8,"div",8),i(),U(),i()),t&2){let e=s();l(3),m("ngForOf",e.deliveryTypes)}}function Ud(t,r){if(t&1){let e=D();n(0,"div",6),q(1),n(2,"div",7)(3,"POS-tinymce-editor",12),S("ngModelChange",function(o){d(e);let c=s();return h(c.note,o)||(c.note=o),u(o)}),i()(),U(),i()}if(t&2){let e=s();l(3),y("ngModel",e.note)}}var On=class t{constructor(r,e){this.dialogRef=r;this.config.title="Notes",this.config.customWidth="600px",this.deliveryTypes=e.deliveryTypes,this.typeID=e.typeID,this.note=e.note||""}currentTabState=1;modalTabState=ur;config=new ye;deliveryTypes;typeID="";note="";ok(){this.dialogRef.close({typeID:this.typeID,note:this.note})}close(){this.dialogRef.close()}onTabChange(r){this.currentTabState=r}static \u0275fac=function(e){return new(e||t)(C(xe),C($e))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-delivery-type"]],decls:11,vars:9,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container-fluid"],[1,"row","border-bottom"],["data-cy","tab-note",1,"btn","btn-link","note-tab",3,"click","ngClass"],["data-cy","tab-type",1,"btn","btn-link","note-tab",3,"click","ngClass"],["class","row mt-8",4,"ngIf"],[1,"row","mt-8"],[1,"col-12"],["class","rad-btn",4,"ngFor","ngForOf"],[1,"rad-btn"],[3,"for","ngClass"],["type","radio",3,"ngModelChange","ngModel","value","id"],[3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(n(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),n(1,"content")(2,"div",1)(3,"div",2)(4,"div")(5,"a",3),g("click",function(){return a.onTabChange(a.modalTabState.NOTE)}),p(6," Note "),i(),n(7,"a",4),g("click",function(){return a.onTabChange(a.modalTabState.TYPE)}),p(8," Tag "),i()()(),_(9,qd,4,1,"div",5)(10,Ud,4,1,"div",5),i()()()),e&2&&(m("config",a.config),l(5),m("ngClass",M(5,oo,a.modalTabState.NOTE==a.currentTabState)),l(2),m("ngClass",M(7,oo,a.modalTabState.TYPE==a.currentTabState)),l(2),m("ngIf",a.modalTabState.TYPE==a.currentTabState),l(),m("ngIf",a.modalTabState.NOTE==a.currentTabState))},dependencies:[Z,pt,K,B,ot,fe,ho,R,H,Ve,he,St,ht],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}content[_ngcontent-%COMP%] > div.container-fluid[_ngcontent-%COMP%]{min-height:200px}.tinymce[_ngcontent-%COMP%] a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{z-index:2;position:absolute;right:15px;bottom:19px}.tinymce[_ngcontent-%COMP%] editor[_ngcontent-%COMP%]{height:max-content;z-index:1}.rad-btn[_ngcontent-%COMP%]{position:relative;display:inline-block}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #dddddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label.selected[_ngcontent-%COMP%]{background:#dcdcdc;border:1px solid #dcdcdc}.btn-link.note-tab[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.note-tab.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}a.btn.btn-link.note-tab[_ngcontent-%COMP%]{color:inherit}.ng-select.currency-option[_ngcontent-%COMP%]{width:36%!important}.col-12[_ngcontent-%COMP%]{height:250px}"]})};var Ut=class t{loadForm=x(Le);void=x(Je);matDialog=x(A);newTrans=x(Oe);isEdit$=x(Nt).isEdit$;typeID=new Ge(T.GuidEmpty);note=new Ge("");assignNote$=this.loadForm.data$.pipe(V(r=>r.Order?.Note??""),J(r=>this.note.setValue(r)));assignDefaultTypeID$=this.loadForm.deliveryTypes$.pipe(ue(this.isEdit$),k(([r,e])=>!e),V(([r,e])=>r[0]?.ID),J(r=>this.typeID.setValue(r)));assignTypeID$=this.loadForm.data$.pipe(V(r=>r.Order.TypeID),J(r=>this.typeID.setValue(r)));resetTypeID$=Me(this.void.void$,this.newTrans.createNewTransaction$).pipe(j(()=>this.loadForm.deliveryTypes$),V(r=>r[0]?.ID),J(r=>{this.typeID.setValue(r),this.note.setValue("")}));_openTypeIDDialog=new Ie;openTypeIDDialog$=this._openTypeIDDialog.asObservable().pipe(ue(this.loadForm.deliveryTypes$),j(([r,e])=>this.matDialog.open(On,{data:{typeID:this.typeID.value,deliveryTypes:e,note:this.note.value}}).afterClosed()),k(r=>T.IsNotEmpty(r)),J(r=>{this.typeID.setValue(r?.typeID),this.note.setValue(r?.note)}));constructor(){console.log("TypeIDService initialized"),this.assignDefaultTypeID$.pipe(at()).subscribe(),this.assignTypeID$.pipe(at()).subscribe(),this.resetTypeID$.pipe(at()).subscribe(),this.openTypeIDDialog$.pipe(at()).subscribe(),this.assignNote$.pipe(at()).subscribe()}openDeliveryTypeDialog(){this._openTypeIDDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var vt=class t{http=x(L);matDialog=x(A);outlet=x(ce);date=x(Jt);number=x(Yt);courier=x(Qt);deliveryTypeID=x(Ut);cart=x(tt);loadForm=x(Le);loadRegister=x(wt);_processTransaction=new Ie;processTransaction$=this._processTransaction.asObservable();submitOrder$=this.processTransaction$.pipe(j(()=>xt([this.outlet.sourceOutletID$,this.outlet.destinationOutletID$,this.cart.cart$]).pipe(zt(1))),k(([r,e,a])=>T.IsNotEmpty(r)&&T.IsNotEmpty(e)&&a.length>0),V(()=>this.deliveryTypeID.note.value),ue(this.cart.cart$,this.loadRegister.loadRegister$.pipe(V(r=>r.NewOrderID)),this.loadForm.loadForm$),j(([r,e,a,o])=>{let c={Order:{SourceEntityID:this.outlet.sourceOutlet.value.ID,DestinationEntityID:this.outlet.destinationOutlet.value.ID,Date:this.date.invoiceDate.value,Number:this.number.orderNumber.value,CourierID:T.IsEmpty(this.courier.courierID.value)?T.GuidEmpty:this.courier.courierID.value,TypeID:this.deliveryTypeID.typeID.value,Note:r,ID:o.Data.Order?.ID,StateID:o.Data.Order?.StateID},Items:e,NewOrderID:a};return this.http.post("/api/TransferOrder/SubmitOrder2",c).pipe(V(O=>le(ae({},O),{PrintTemplateID:o.Entities.find(Q=>Q.ID===this.outlet.sourceOutlet.value.ID)?.PrintTemplateID})),je(()=>ke))}),rt(1));constructor(){this.submitOrder$.subscribe()}processTransaction(){this._processTransaction.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var Mn=class t{toastr=x(ee);clearOutlet=x(Tt);analyze=x(qt);outlet=x(ce);scanSerial=x(Et);cart=x(tt);processTransaction=x(vt);importCart=x(It);toastrOnEmptySourceOutlet$=Me(this.clearOutlet.clearOutlet$,this.analyze.analyze$,this.scanSerial.scanSerial$,this.processTransaction.processTransaction$,this.importCart.import$).pipe(ue(this.outlet.sourceOutletID$),k(([r,e])=>e===T.GuidEmpty),J(()=>this.toastr.info("Please select source outlet",Ce.Info)));toastrOnEmptyDestinationOutlet$=Me(this.analyze.analyze$,this.processTransaction.processTransaction$).pipe(ue(this.outlet.destinationOutletID$),k(([r,e])=>e===T.GuidEmpty),J(()=>this.toastr.info("Please select destination outlet",Ce.Info)));toastrOnEmptyCart$=Me(this.analyze.analyze$,this.processTransaction.processTransaction$).pipe(ue(this.cart.cart$),k(([r,e])=>e.length===0),J(()=>this.toastr.info("Please add item to cart",Ce.Info)));constructor(){this.toastrOnEmptySourceOutlet$.subscribe(),this.toastrOnEmptyDestinationOutlet$.subscribe(),this.toastrOnEmptyCart$.subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var hi=class t{createNewTransaction=x(Oe);processTransaction=x(vt);_isComplete=new dt(!1);isComplete$=this._isComplete.asObservable();constructor(){this.createNewTransaction.createNewTransaction$.subscribe(()=>this._isComplete.next(!1)),this.processTransaction.submitOrder$.subscribe(()=>this._isComplete.next(!0))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=$({token:t,factory:t.\u0275fac,providedIn:"root"})};var zd=(t,r)=>({ID:t,Template:r}),Gd=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],$d=t=>({ID:t});function Kd(t,r){if(t&1&&(n(0,"div",25)(1,"div",26),p(2),i(),n(3,"div",26),p(4),i()()),t&2){let e=r.$implicit;l(2),b(e.Name),l(2),b(e.Quantity)}}var Pn=class t{handleF8(){this.createNewTransaction()}pageSetup=x(te);title=x(ei);afterProcessData;cartItems;orderNumber;newTransService=x(Oe);toastr=x(ee);menu$;fullContainerEl=document.getElementById("full-container");constructor(){this.pageSetup.setMenu$(),this.menu$=this.pageSetup.menu$.pipe(V(r=>le(ae({},r),{H:"Transfer Order",T:r.T.replace("undefined","Transfer Order")})),J(r=>this.title.setTitle(r.T)))}ngOnChanges(){this.orderNumber&&this.afterProcessData&&this.orderNumber!==this.afterProcessData.InvoiceNumber&&this.toastr.warning("Your transfer order number is changed to "+this.afterProcessData.InvoiceNumber,"Transfer Order Number Changed!")}ngAfterViewInit(){this.fullContainerEl.classList.remove("full-container")}ngOnDestroy(){this.fullContainerEl.classList.add("full-container")}createNewTransaction(){this.newTransService.createNewTransaction()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-complete"]],hostBindings:function(e,a){e&1&&g("keydown.F8",function(){return a.handleF8()},!1,Zt)},inputs:{afterProcessData:"afterProcessData",cartItems:"cartItems",orderNumber:"orderNumber"},features:[uo],decls:37,vars:23,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"order-complete"],[1,"container-fluid","pt-8"],[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body","border-top"],[1,"row",2,"height","150px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","py-5"],["target","_blank",1,"btn","bg-light-gray","btn-secondary",3,"routerLink","queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body"],["class","row justify-content-between mb-3",4,"ngFor","ngForOf"],[1,"row","justify-content-end","border-top",2,"margin-top","15px","padding-top","15px"],[1,"col-4","text-end"],[1,"row","justify-content-between","mb-3"],[1,"col","text-end"]],template:function(e,a){e&1&&(n(0,"mainpanel-cmp",0),v(1,"async"),n(2,"content")(3,"section",1)(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"h1",7),f(10,"i",8),p(11,"Transfer Order Complete "),i()(),n(12,"div",9)(13,"div",10)(14,"div",11)(15,"a",12),g("click",function(){return a.createNewTransaction()}),p(16,"New Transfer Order (F8)"),i()()()(),n(17,"div",13)(18,"div",14)(19,"a",15),f(20,"i",16),p(21,"Print Receipt"),i()()()()(),n(22,"div",17)(23,"div",5)(24,"div",18)(25,"h3",19)(26,"a",20),p(27),i()()(),n(28,"div",21),_(29,Kd,5,2,"div",22),n(30,"div",23)(31,"div",24),p(32,"Total:"),i(),n(33,"div",24),p(34),v(35,"sum"),v(36,"number"),i()()()()()()()()()()),e&2&&(m("pageData",E(1,10,a.menu$))("hideSearchDropdown",!0)("hideSearchBox",!0),l(19),m("routerLink","/print/"+(a.afterProcessData.PrintMode=="1"?"Transfer":"TransferMini"))("queryParams",Re(17,zd,a.afterProcessData.OrderID,a.afterProcessData.PrintTemplateID)),l(7),m("routerLink",N(20,Gd))("queryParams",M(21,$d,a.afterProcessData.OrderID)),l(),I("Transfer Order #",a.afterProcessData.InvoiceNumber,""),l(2),m("ngForOf",a.cartItems),l(5),I(" ",E(36,15,P(35,12,a.cartItems,"Quantity"))," "))},dependencies:[Z,K,it,_e,ni,Be,gt,z,Hi,ne],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block;text-align:left}.order-complete[_ngcontent-%COMP%]{display:none}}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.125);padding-bottom:.9375rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{max-width:500px;margin-top:30px;margin-bottom:30px}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:middle;line-height:15px!important}"]})};var Fn=class t{analyzeService=x(qt);analyze(){this.analyzeService.analyze()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-analyze"]],decls:1,vars:0,consts:[["icon","fa-sharp fa-solid fa-magnifying-glass-chart","label","Analyze",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.analyze()}),i())},dependencies:[Z,bt],encapsulation:2})};var Vn=class t{voidService=x(Je);voidTransaction(){this.voidService.void()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-void"]],decls:1,vars:0,consts:[["icon","fa-solid fa-rectangle-xmark","label","Void",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.voidTransaction()}),i())},dependencies:[Z,bt],encapsulation:2})};var Nn=class t{importCartService=x(It);importCart(){this.importCartService.import()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-import-cart"]],decls:1,vars:0,consts:[["icon","fa-solid fa-upload","label","Upload",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.importCart()}),i())},dependencies:[Z,bt],encapsulation:2})};var Jd=["serialInput"],Ln=class t{constructor(r,e,a){this.dialogRef=r;this.toastr=e;this.scanSerialService=a;this.modalConfig.title="Scan Serial",this.modalConfig.customWidth="350px",this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}serialInputEl;modalConfig=new ye;serial;ngOnInit(){}onKeyDown(r){r.key=="Enter"&&(T.IsNotEmpty(this.serial)?(this.scanSerialService.scanSerial(this.serial),this.serial=null):this.toastr.warning("Serial Can`t be empty","Warning!"),this.setFocusInput())}setFocusInput(){this.serialInputEl&&setTimeout(()=>{this.serialInputEl?.nativeElement?.focus()},500)}static \u0275fac=function(e){return new(e||t)(C(xe),C(ee),C(Et))};static \u0275cmp=w({type:t,selectors:[["POS-dialog-scan-serial"]],viewQuery:function(e,a){if(e&1&&Ii(Jd,5),e&2){let o;Ti(o=wi())&&(a.serialInputEl=o.first)}},decls:7,vars:2,consts:[["serialInput",""],[3,"onClose","config"],[1,"input-group","mt-3"],["type","text","placeholder","Input Product By Serial","aria-label","Serial",1,"form-control",3,"ngModelChange","keydown","ngModel"],[1,"input-group-text"],[1,"fa-solid","fa-barcode","fs-4"]],template:function(e,a){if(e&1){let o=D();n(0,"modal-material",1),g("onClose",function(){return d(o),u(a.dialogRef.close())}),n(1,"content")(2,"div",2)(3,"input",3,0),S("ngModelChange",function(O){return d(o),h(a.serial,O)||(a.serial=O),u(O)}),g("keydown",function(O){return d(o),u(a.onKeyDown(O))}),i(),n(5,"span",4),f(6,"i",5),i()()()()}e&2&&(m("config",a.modalConfig),l(3),y("ngModel",a.serial))},dependencies:[Z,ot,fe,R,H,Ve,he],encapsulation:2})};var kn=class t{vcr=x(fo);matDialog=x(A);scanSerial(){this.matDialog.open(Ln,{viewContainerRef:this.vcr})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-scan-serial"]],decls:1,vars:0,consts:[["icon","fa-solid fa-barcode-read","label","Serial",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.scanSerial()}),i())},dependencies:[Z,bt],encapsulation:2})};var Rn=class t{handleF8(){this.addItem()}itemDialog=x(Ot);addItem(){this.itemDialog.addItem()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-add-item"]],hostBindings:function(e,a){e&1&&g("keydown.F4",function(){return a.handleF8()},!1,Zt)},decls:1,vars:0,consts:[["icon","fa-circle-plus fa-solid","label","Add",3,"click"]],template:function(e,a){e&1&&(n(0,"POS-dropdown-item-more-action",0),g("click",function(){return a.addItem()}),i())},dependencies:[Z,bt],encapsulation:2})};var Yd=t=>({disabled:t}),Xd=(t,r)=>({red:t,green:r}),An=class t{RFIDService=x(Ji);matDialog=x(A);constructor(){}onOpenModal(){this.matDialog.open(xr).componentInstance.onOK.pipe(J(({hostURL:e,bufferTime:a})=>{this.RFIDService.bufferTime=a,this.RFIDService.intializeWebSocket(e)})).subscribe()}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-connect-rfid"]],decls:8,vars:13,consts:[[1,"dropdown-item","px-1","d-flex",3,"click","ngClass"],["aria-hidden","true",1,"fa-solid","fa-wifi","fs-2"],[1,"pe-0","ps-4","fs-6"],[1,"blob",2,"position","absolute","top","0","right","0",3,"ngClass"]],template:function(e,a){e&1&&(n(0,"div",0),v(1,"async"),g("click",function(){return a.onOpenModal()}),f(2,"i",1),n(3,"label",2),p(4,"Connect RFID"),i(),f(5,"div",3),v(6,"async"),v(7,"async"),i()),e&2&&(m("ngClass",M(8,Yd,E(1,2,a.RFIDService.isConnected))),l(5),m("ngClass",Re(10,Xd,!E(6,4,a.RFIDService.isConnected),E(7,6,a.RFIDService.isConnected))))},dependencies:[Ve,pt,it],styles:[".disabled[_ngcontent-%COMP%]{color:gray;pointer-events:none;cursor:not-allowed}.blob[_ngcontent-%COMP%]{background:#000;border-radius:50%;box-shadow:0 0 #000;height:15px;width:15px;transform:scale(1);animation:_ngcontent-%COMP%_pulse-black 2s infinite}@keyframes _ngcontent-%COMP%_pulse-black{0%{transform:scale(.95);box-shadow:0 0 #000000b3}70%{transform:scale(1);box-shadow:0 0 0 10px #0000}to{transform:scale(.95);box-shadow:0 0 #0000}}.blob.white[_ngcontent-%COMP%]{background:#fff;box-shadow:0 0 #fff;animation:_ngcontent-%COMP%_pulse-white 2s infinite}@keyframes _ngcontent-%COMP%_pulse-white{0%{transform:scale(.95);box-shadow:0 0 #ffffffb3}70%{transform:scale(1);box-shadow:0 0 0 10px #fff0}to{transform:scale(.95);box-shadow:0 0 #fff0}}.blob.red[_ngcontent-%COMP%]{background:#ff5252;box-shadow:0 0 #ff5252;animation:_ngcontent-%COMP%_pulse-red 2s infinite}@keyframes _ngcontent-%COMP%_pulse-red{0%{transform:scale(.95);box-shadow:0 0 #ff5252b3}70%{transform:scale(1);box-shadow:0 0 0 10px #ff525200}to{transform:scale(.95);box-shadow:0 0 #ff525200}}.blob.orange[_ngcontent-%COMP%]{background:#ff793f;box-shadow:0 0 #ff793f;animation:_ngcontent-%COMP%_pulse-orange 2s infinite}@keyframes _ngcontent-%COMP%_pulse-orange{0%{transform:scale(.95);box-shadow:0 0 #ff793fb3}70%{transform:scale(1);box-shadow:0 0 0 10px #ff793f00}to{transform:scale(.95);box-shadow:0 0 #ff793f00}}.blob.yellow[_ngcontent-%COMP%]{background:#ffb142;box-shadow:0 0 #ffb142;animation:_ngcontent-%COMP%_pulse-yellow 2s infinite}@keyframes _ngcontent-%COMP%_pulse-yellow{0%{transform:scale(.95);box-shadow:0 0 #ffb142b3}70%{transform:scale(1);box-shadow:0 0 0 10px #ffb14200}to{transform:scale(.95);box-shadow:0 0 #ffb14200}}.blob.blue[_ngcontent-%COMP%]{background:#34ace0;box-shadow:0 0 #34ace0;animation:_ngcontent-%COMP%_pulse-blue 2s infinite}@keyframes _ngcontent-%COMP%_pulse-blue{0%{transform:scale(.95);box-shadow:0 0 #34ace0b3}70%{transform:scale(1);box-shadow:0 0 0 10px #34ace000}to{transform:scale(.95);box-shadow:0 0 #34ace000}}.blob.green[_ngcontent-%COMP%]{background:#77d933;box-shadow:0 0 #77d933;animation:_ngcontent-%COMP%_pulse-green 2s infinite}@keyframes _ngcontent-%COMP%_pulse-green{0%{transform:scale(.95);box-shadow:0 0 #33d938b3}70%{transform:scale(1);box-shadow:0 0 0 10px #33d9b200}to{transform:scale(.95);box-shadow:0 0 #33d9b200}}.blob.purple[_ngcontent-%COMP%]{background:#8e44ad;box-shadow:0 0 #8e44ad;animation:_ngcontent-%COMP%_pulse-purple 2s infinite}@keyframes _ngcontent-%COMP%_pulse-purple{0%{transform:scale(.95);box-shadow:0 0 #8e44adb3}70%{transform:scale(1);box-shadow:0 0 0 10px #8e44ad00}to{transform:scale(.95);box-shadow:0 0 #8e44ad00}}"]})};var Bn=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-more-action-shell"]],decls:28,vars:0,consts:[["id","moreMenu","data-bs-toggle","dropdown",1,"d-flex","align-items-center","cursor-pointer"],[1,"me-2"],[1,"fa-solid","fa-caret-down","fa-lg"],[1,"fs-6","headings-font-family","pb-1"],[1,"h-100","d-flex","align-items-center","justify-content-between"],["aria-labelledby","moreMenu",1,"dropdown-menu","more-actions"],[1,"d-flex",2,"width","33rem"],[1,"dropdown-header","text-dark","col"],[1,"h5","mb-4"],[1,"dropdown-divider","m-0"],[1,"cursor-pointer"],[1,"position-relative"]],template:function(e,a){e&1&&(n(0,"span",0)(1,"span",1),f(2,"i",2),i(),n(3,"span",3),p(4,"More Actions"),i()(),n(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),p(10,"Order"),i(),f(11,"div",9),n(12,"li",10),f(13,"POS-analyze"),i(),n(14,"li",10),f(15,"POS-void"),i()(),n(16,"div",7)(17,"div",8),p(18,"Item"),i(),f(19,"div",9),n(20,"li",10),f(21,"POS-add-item"),i(),n(22,"li",10),f(23,"POS-scan-serial"),i(),n(24,"li",10),f(25,"POS-import-cart"),i(),n(26,"li",11),f(27,"POS-connect-rfid"),i()()()()())},dependencies:[Z,Fn,Vn,Nn,kn,Rn,An],encapsulation:2})};var Wn=class t{courierService=x(Qt);courierForm=this.courierService.courierID;couriers$=this.courierService.couriers$;addNewCourier(){this.courierService.addNewCourier()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-courier-selection"]],decls:4,vars:4,consts:[[1,"d-flex","align-items-center"],["matTooltipPosition","below","matTooltip","New courier form",1,"fa-solid","fa-user","pointer",3,"click"],["bindLabel","Name","bindValue","ID","placeholder","Assign courier",1,"courier-select","w-100",3,"items","formControl"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"i",1),g("click",function(){return a.addNewCourier()}),i(),f(2,"ng-select",2),v(3,"async"),i()),e&2&&(l(2),m("items",E(3,2,a.couriers$))("formControl",a.courierForm))},dependencies:[Z,it,Te,kt,R,ti,ii,Ae],styles:[".courier-select .ng-select-container{border:none} .courier-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border:none;box-shadow:none}"]})};function Zd(t,r){if(t&1&&(n(0,"td",22),p(1),i()),t&2){let e=s().index;l(),I(" ",e+1,". ")}}function e0(t,r){if(t&1&&(q(0),n(1,"div",23),f(2,"img",24),i(),U()),t&2){let e=s().$implicit;l(2),m("src",e.ThumbnailUrl,Xt)}}function t0(t,r){t&1&&(n(0,"div",25),f(1,"i",26),i())}function i0(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.Quantity))}}function n0(t,r){t&1&&(n(0,"span",27),p(1," x "),i())}function o0(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),b(E(2,1,e.UnitQuantity))}}function r0(t,r){if(t&1&&(q(0),n(1,"div",28),p(2),v(3,"number"),i(),U()),t&2){let e=s().$implicit;l(2),I(" ",P(3,1,e.UnitPrice,"1.0-4")," ")}}function a0(t,r){if(t&1&&(n(0,"span"),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I("-",E(2,1,e.Discount),"%")}}function l0(t,r){if(t&1&&(q(0),n(1,"span",29),p(2),v(3,"number"),i(),U()),t&2){let e=s().$implicit;l(2),I(" ",E(3,1,e.Total)," ")}}function p0(t,r){if(t&1){let e=D();n(0,"tr",7),g("contextmenu",function(){let o=d(e).index,c=s(2);return u(c.onContextMenu(o))})("click",function(){let o=d(e),c=o.$implicit,O=o.index,Q=s(2);return u(Q.update(c,O))}),_(1,Zd,2,1,"td",8),n(2,"td",9)(3,"div",10),_(4,e0,3,1,"ng-container",11)(5,t0,2,0,"ng-template",null,1,X),n(7,"div",12)(8,"div"),p(9),i(),n(10,"span",13),p(11),i(),f(12,"app-serial-note",14)(13,"small",15),i()()(),n(14,"td",16)(15,"span"),_(16,i0,3,3,"span",17)(17,n0,2,0,"span",18)(18,o0,3,3,"span",17),i()(),n(19,"td"),_(20,r0,4,4,"ng-container",17),i(),n(21,"td",19),_(22,a0,3,3,"span",17),i(),n(23,"td",16),_(24,l0,4,3,"ng-container",17),i(),n(25,"td",20)(26,"i",21),g("click",function(){let o=d(e).index,c=s(2);return u(c.deleteVariant(o))}),i()()()}if(t&2){let e=r.$implicit,a=Fe(6),o=s(2);m("cdkDragDisabled",!o.enabledDragDrop),l(),m("ngIf",o.appConfigJSON==null?null:o.appConfigJSON.ModuleSell.Grid.RowNumberVisible),l(),Mt("ps-0",o.appConfigJSON==null?null:o.appConfigJSON.ModuleSell.Grid.RowNumberVisible),l(2),m("ngIf",e.ThumbnailUrl)("ngIfElse",a),l(5),b(e.Name),l(2),b(e.Code),l(),m("serials",e.Serial),l(),m("innerHtml",e.Note,W),l(3),m("ngIf",e.Quantity!=1||e.UnitQuantity>1),l(),m("ngIf",e.UnitQuantity>1||e.UnitQuantity<-1),l(),m("ngIf",e.UnitQuantity>1||e.UnitQuantity<-1),l(2),m("ngIf",(o.appConfigJSON==null?null:o.appConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible)&&e.Total!=e.UnitPrice),l(2),m("ngIf",e.Discount),l(2),m("ngIf",(o.appConfigJSON==null?null:o.appConfigJSON.ModuleDelivery.OutletDelivery.PriceVisible)&&e.Total)}}function m0(t,r){if(t&1){let e=D();n(0,"div",3)(1,"table",4)(2,"tbody",5),g("cdkDropListDropped",function(o){d(e);let c=s();return u(c.drop(o))}),_(3,p0,27,16,"tr",6),i()()()}if(t&2){let e=s();l(3),m("ngForOf",e.cart)}}function c0(t,r){t&1&&(n(0,"div",30)(1,"div",31)(2,"div",32)(3,"div",33)(4,"div",34),f(5,"i",35),i(),n(6,"div",36)(7,"span"),p(8,"Empty Cart"),i(),f(9,"br"),n(10,"span"),p(11,"Add products to the cart"),i(),f(12,"br"),n(13,"span"),p(14,"or scan barcode"),i()()()()()())}var Hn=class t{cart=[];appConfigJSON;role=x(ie);cartService=x(tt);itemDialog=x(Ot);enabledDragDrop=!0;onOpenContextMenuIndex=-1;constructor(){this.setDragDropEnabled()}setDragDropEnabled(){T.isMobileDevice&&(this.enabledDragDrop=!1)}onContextMenu(r){this.onOpenContextMenuIndex=r}onReturn(){this.cartService.return(this.onOpenContextMenuIndex)}onPurchase(){this.cartService.purchase(this.onOpenContextMenuIndex)}deleteVariant(r){this.cartService.remove(r)}update(r,e){this.itemDialog.editItem(r,e)}drop(r){this.cartService.rearrangeCart(r)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-cart-display"]],inputs:{cart:"cart",appConfigJSON:"appConfigJSON"},decls:3,vars:2,consts:[["EMPTY_CART",""],["NO_IMAGE",""],["PinScrollingBottom","","class","h-100","style","overflow-y: auto",4,"ngIf","ngIfElse"],["PinScrollingBottom","",1,"h-100",2,"overflow-y","auto"],[1,"table","table-borderless"],["cdkDropList","",3,"cdkDropListDropped"],["class","border-bottom","cdkDrag","",3,"cdkDragDisabled","contextmenu","click",4,"ngFor","ngForOf"],["cdkDrag","",1,"border-bottom",3,"contextmenu","click","cdkDragDisabled"],["style","width: 10px",4,"ngIf"],[2,"width","50%"],[1,"d-flex"],[4,"ngIf","ngIfElse"],[1,"ms-4","d-flex","flex-column","justify-content-center",2,"line-height","18px"],[1,"fw-normal","fs-6","text-muted"],[3,"serials"],["title","Note",1,"special-TinyMCE","m-0","fst-italic","d-block",3,"innerHtml"],[1,"text-end"],[4,"ngIf"],["class","fs-6",4,"ngIf"],[1,"text-end","text-danger"],[1,"text-end",2,"width","75px"],[1,"fa-solid","fa-trash","fs-4","text-danger","pointer",3,"click"],[2,"width","10px"],[1,"ratio","ratio-1x1",2,"width","55px"],[1,"item-image",3,"src"],[1,"item-image","d-flex","justify-content-center","align-items-center","text-center","fs-1"],[1,"fa-solid","fa-image",2,"color","#b4b4b4c2"],[1,"fs-6"],[1,"fs-5","text-end"],[1,"fs-5"],[1,"row","g-0","h-100"],[1,"col-12"],[1,"d-flex","justify-content-center","align-items-center","h-100"],[1,"row"],[1,"col-12","d-flex","justify-content-center"],[1,"fa-regular","fa-cart-arrow-up","text-secondary",2,"font-size","110px"],[1,"col-12","justify-content-center","text-center","mt-5","empty-cart-description","text-secondary","headings-font-family"]],template:function(e,a){if(e&1&&_(0,m0,4,1,"div",2)(1,c0,15,0,"ng-template",null,0,X),e&2){let o=Fe(2);m("ngIf",a.cart.length)("ngIfElse",o)}},dependencies:[Z,K,B,_e,Ni,Ao,Ro,Cr,ct,hr],styles:[".item-image[_ngcontent-%COMP%]{height:50px;width:56px;display:block;border:solid 1px #dddddd;border-radius:5px;object-fit:contain}.example-menu[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;min-width:180px;max-width:280px;background-color:#fff;padding:6px 0}.example-menu-item[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer;border:none;-webkit-user-select:none;user-select:none;min-width:64px;line-height:36px;padding:0 16px;display:flex;align-items:center;flex-direction:row;flex:1}.example-menu-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.example-menu-item[_ngcontent-%COMP%]:active{background-color:#dcdcdc}.table[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(caption) > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding:12px 10px} .cdk-menu.cdk-menu-group.example-menu{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.empty-cart-description[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#c7c7c7}"]})};var jn=class t{clearOutletService=x(Tt);clearOutlet(){this.clearOutletService.clearOutlet()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-clear-outlet"]],decls:3,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"]],template:function(e,a){e&1&&(n(0,"button",0),g("click",function(){return a.clearOutlet()}),n(1,"span"),p(2,"Empty"),i()())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};var Qn=class t{processTransactionService=x(vt);cart=x(tt);items$=this.cart.cart$.pipe(V(r=>r.length));qtyTotal$=this.cart.cart$.pipe(V(r=>r.reduce((e,a)=>e+a.Quantity,0)));processTransaction(){this.processTransactionService.processTransaction()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-process"]],decls:6,vars:6,consts:[["type","button",1,"btn","btn-success","w-100","fs-3","px-0","py-6",2,"border-left","0.1px solid #fff",3,"click"],[1,"fs-6"]],template:function(e,a){e&1&&(n(0,"button",0),g("click",function(){return a.processTransaction()}),p(1," Process "),n(2,"small",1),p(3),v(4,"async"),v(5,"async"),i()()),e&2&&(l(3),Qe("(",E(4,2,a.items$)," items, ",E(5,4,a.qtyTotal$)," Qty)"))},dependencies:[Z,it],encapsulation:2})};var qn=class t{deliveryTypeService=x(Ut);openDeliveryTypeDialog(){this.deliveryTypeService.openDeliveryTypeDialog()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-delivery-type-note"]],decls:2,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"],[1,"fa-regular","fa-note-sticky","fa-xl"]],template:function(e,a){e&1&&(n(0,"button",0),g("click",function(){return a.openDeliveryTypeDialog()}),f(1,"i",1),i())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})};var Un=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-cart-action-shell"]],decls:6,vars:0,consts:[[1,"row","g-0","pb-6","px-5"],[1,"col-5","d-flex","justify-content-between","pe-5",2,"column-gap","12px"],[2,"flex-grow","1"],[2,"flex-grow","3"],[1,"col-7"]],template:function(e,a){e&1&&(n(0,"div",0)(1,"div",1),f(2,"POS-delivery-type-note",2)(3,"POS-clear-outlet",3),i(),n(4,"div",4),f(5,"POS-process"),i()())},dependencies:[Z,jn,Qn,qn],encapsulation:2})};function s0(t,r){if(t&1&&(q(0),f(1,"POS-complete",2),v(2,"async"),v(3,"async"),U()),t&2){let e=s();l(),m("afterProcessData",E(2,3,e.completeData$))("cartItems",E(3,5,e.cart$))("orderNumber",e.orderNumberForm.value)}}function d0(t,r){if(t&1){let e=D();n(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"POS-select-outlet-form",8),v(6,"async"),v(7,"async"),g("onCloseDialog",function(){d(e);let o=s();return u(o.onCloseDialog())}),i(),f(8,"i",9)(9,"POS-select-outlet-form",10),v(10,"async"),v(11,"async"),i(),f(12,"POS-invoice-number-form",11),v(13,"async"),f(14,"POS-invoice-date",12),i()(),n(15,"div",13)(16,"div",14)(17,"div",15),f(18,"POS-more-action-shell"),i(),n(19,"div",16),f(20,"POS-courier-selection"),i(),n(21,"div",17)(22,"div",18)(23,"button",19),v(24,"async"),g("click",function(){d(e);let o=s();return u(o.collapseSidebar())}),f(25,"span",20)(26,"span",20)(27,"span",20),i()()()()()(),n(28,"div",21)(29,"div",5),f(30,"POS-quick-key",22),v(31,"async"),i(),n(32,"div",23)(33,"div",24)(34,"div",25),f(35,"POS-variant-autocomplete",26),i()(),f(36,"POS-cart-display",27),v(37,"async"),v(38,"async"),f(39,"POS-cart-action-shell"),i()()()}if(t&2){let e=s();l(5),m("outlets",E(6,24,e.outlets$))("isOpenAfterLoad",E(7,26,e.isOpenOutletDialog$))("formControl",e.sourceOutletForm)("limitOutletText",e.limitOutletText),l(4),m("outlets",E(10,28,e.destination$))("isOpenAfterLoad",E(11,30,e.isOpenDestinationDialog$))("hideLocationIcon",!0)("formControl",e.destinationOutletForm)("limitOutletText",e.limitOutletText)("sourceOutletID",e.sourceOutletForm.value.ID),l(3),m("formControl",e.orderNumberForm)("isEdit",E(13,32,e.isEdit$)),l(2),m("formControl",e.dateForm)("tooltip",e.role.global!=null&&e.role.global.Date?"":"Date role is required"),l(9),Mt("change",E(24,34,e.toggleState$)),l(6),Mt("pt-5",e.sourceOutletForm.value.ID),l(),m("quickKey",E(31,36,e.quickKeyItems$))("outletID",e.sourceOutletForm.value.ID)("formControl",e.itemQuickKeyID),l(5),m("formControl",e.variantAutocompleteForm),l(),m("cart",E(37,38,e.cart$))("appConfigJSON",E(38,40,e.appConfigJSON$))}}var zn=class t{limitOutletText=12;isEditService=x(Nt);isEdit$=this.isEditService.isEdit$;isComplete=x(hi);outlet=x(ce);loadForm=x(Le);isOpenOutletDialog=x(yi);orderNumber=x(Yt);invoiceDate=x(Jt);quickKeyItems=x($t);cart=x(tt);intercom=x(bo);lowOnStock=x(At);overOnStock=x(Bt);variantAutocomplete=x(Kt);processTransaction=x(vt);toggle=x(Do);title=x(ei);role=x(ie);isComplete$=this.isComplete.isComplete$;sourceOutletForm=this.outlet.sourceOutlet;destinationOutletForm=this.outlet.destinationOutlet;outlets$=this.loadForm.outlets$;destination$=this.sourceOutletForm?.valueChanges.pipe(ze(this.sourceOutletForm?.value),j(r=>this.loadForm.destinations$.pipe(V(e=>e?.filter(o=>o.ID!==r?.ID)))));isOpenOutletDialog$=this.isOpenOutletDialog.isOpenOutletDialog$;isOpenDestinationDialog$=this.isOpenOutletDialog.isOpenDestinationDialog$;orderNumberForm=this.orderNumber.orderNumber;dateForm=this.invoiceDate.invoiceDate;quickKeyItems$=this.quickKeyItems.quickKeyItems$;itemQuickKeyID=this.quickKeyItems.itemQuickKeyID;appConfigJSON$=this.loadForm.config$;cart$=this.cart.cart$;variantAutocompleteForm=this.variantAutocomplete.variantAutocomplete;completeData$=this.processTransaction.submitOrder$;toggleState$=this.toggle.toggleState$;constructor(){this.title.setTitle(this.title.getTitle()+" | Transfer Order"),this.role?.sell?.Number==!1&&this.orderNumberForm.disable(),this.role.global.Date==!1&&this.dateForm.disable(),Me(this.outlet.sourceOutletID$,this.outlet.destinationOutletID$,this.cart$).pipe(at()).subscribe(()=>this.focusSearchInput())}focusSearchInput(){let r=document.getElementById("product_search");r&&r.focus()}ngAfterViewInit(){this.intercom.hideLauncher()}ngOnDestroy(){this.intercom.showLauncher(),this.lowOnStock.resetLowOnStock(),this.overOnStock.resetOverOnStock()}collapseSidebar(){this.toggle.toggleSidebar()}onCloseDialog(){this.isOpenOutletDialog.onCloseOutletDialog()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=w({type:t,selectors:[["POS-transfer-order-v2"]],features:[Ei([tt,Qt,Jt,yi,Yt,ce,$t,qt,Tt,Oe,It,Mn,hi,vt,Et,Ut,Je,Kt,te,Ot,wt,Nt])],decls:4,vars:4,consts:[["ISNOTCOMPLETE",""],[4,"ngIf","ngIfElse"],[3,"afterProcessData","cartItems","orderNumber"],[1,"container-fluid"],[1,"row","header","border-bottom"],[1,"col-5","border-end"],[1,"left-toolbar-container","h-100","d-flex","align-items-center","justify-content-between"],[1,"d-flex"],[3,"onCloseDialog","outlets","isOpenAfterLoad","formControl","limitOutletText"],[1,"fa-solid","fa-arrow-right","ms-4","me-2","mt-2"],["dialogTitle","Choose Destination Outlet",3,"outlets","isOpenAfterLoad","hideLocationIcon","formControl","limitOutletText","sourceOutletID"],["transactionType","Transfer Order",3,"formControl","isEdit"],[3,"formControl","tooltip"],[1,"col-7","d-flex","align-items-center"],[1,"row","flex-grow-1"],[1,"col-lg-7","col-5","d-flex","align-items-center"],[1,"col-5","ps-0"],[1,"col-2"],[1,"navbar","mobile-button","border-bottom-0"],["type","button","aria-controls","navigation-index","aria-expanded","false","aria-label","Toggle navigation",1,"navbar-toggler","navbar-toggler-right","float-end","toggle-menu","ps-2","pe-0","border-0",2,"width","max-content","height","max-content",3,"click"],[1,"navbar-toggler-bar","burger-lines"],[1,"row","content"],[3,"quickKey","outletID","formControl"],[1,"col-7","pt-5","px-0","d-flex","flex-column"],[1,"row","w-100","ms-0"],[1,"col-12","px-0"],["inputID","product_search",3,"formControl"],[1,"cart-display",3,"cart","appConfigJSON"]],template:function(e,a){if(e&1&&(_(0,s0,4,7,"ng-container",1),v(1,"async"),_(2,d0,40,42,"ng-template",null,0,X)),e&2){let o=Fe(3);m("ngIf",E(1,2,a.isComplete$))("ngIfElse",o)}},dependencies:[Z,B,it,Pn,_r,kt,R,ti,fr,tr,Bn,Wn,gr,Hn,Un,Ki],styles:[".left-toolbar-container[_ngcontent-%COMP%]{position:relative}.left-toolbar-container[_ngcontent-%COMP%] POS-invoice-number-form[_ngcontent-%COMP%]{position:absolute;top:34px;left:32px}.header[_ngcontent-%COMP%]{min-height:60px}.content[_ngcontent-%COMP%]{min-height:calc(100vh - 60px)}.supplier-more-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cart-display[_ngcontent-%COMP%]{flex-grow:1;height:0px;overflow-y:auto}input[_ngcontent-%COMP%]{width:100%;height:38px!important;border:0;border-bottom:1px solid #ced4da;padding-left:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i[_ngcontent-%COMP%]{font-size:16px;top:10.6px;left:13px}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]{transition:.4s}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(1){-webkit-transform:rotate(-45deg) translate(-8px,4px);transform:rotate(-45deg) translate(-8px,4px)}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(2){opacity:0}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(45deg) translate(-5px,0px);transform:rotate(45deg) translate(-5px)}.mobile-button[_ngcontent-%COMP%]{display:none}@media (max-width: 990px){.mobile-button[_ngcontent-%COMP%]{display:block}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.more-actions[_ngcontent-%COMP%] div.d-flex[_ngcontent-%COMP%]{width:30rem}"]})};var u0=()=>["/menu/Logistics/Setup/Courier/Form"],_0=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],f0=t=>({ID:t}),g0=(t,r,e)=>({"text-success":t,"text-warning":r,"text-danger":e}),C0=()=>["/print/Transfer"],v0=(t,r)=>({ID:t,Template:r});function x0(t,r){if(t&1){let e=D();n(0,"a",20),g("click",function(){d(e);let o=s(2);return u(o.httpPostListID("TransferOrder/Delete"))}),f(1,"i",21),p(2," Delete"),i()}}function y0(t,r){if(t&1){let e=D();n(0,"div",22)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",23),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.EntityID,o)||(c.pageData.Filter.EntityID=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",24),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.DestinationID,o)||(c.pageData.Filter.DestinationID=o),u(o)}),i(),n(7,"h6"),p(8,"Fulfillment"),i(),n(9,"ng-select",25),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.StateID,o)||(c.pageData.Filter.StateID=o),u(o)}),i(),n(10,"h6"),p(11,"Tag"),i(),n(12,"ng-select",26),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.TypeID,o)||(c.pageData.Filter.TypeID=o),u(o)}),i(),n(13,"h6"),p(14,"Courier"),i(),n(15,"ng-select",27),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CourierID,o)||(c.pageData.Filter.CourierID=o),u(o)}),i(),n(16,"h6"),p(17,"From"),i(),n(18,"datepicker",28),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(19,"h6"),p(20,"To"),i(),n(21,"datepicker",29),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(22,"h6"),p(23,"Creator"),i(),n(24,"autocompleteV2",30),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.CreatorID,o)||(c.pageData.Filter.CreatorID=o),u(o)}),i(),n(25,"h6"),p(26,"Sort By"),i(),n(27,"radio-options",31),S("modelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.SortBy,o)||(c.pageData.Filter.SortBy=o),u(o)}),i(),n(28,"h6"),p(29,"Page Size"),i(),n(30,"input",32),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.RowCount,o)||(c.pageData.Filter.RowCount=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.EntityID),m("multiple",!1),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.DestinationID),m("multiple",!1),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Deliveries),y("ngModel",e.pageData.Filter.StateID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),l(3),m("items",e.pageData.Options==null?null:e.pageData.Options.Courier),y("ngModel",e.pageData.Filter.CourierID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.CreatorID),l(3),m("options",e.pageData.Options==null?null:e.pageData.Options.SortOption),y("model",e.pageData.Filter.SortBy),l(3),y("ngModel",e.pageData.Filter.RowCount),m("max",1e4)}}function h0(t,r){if(t&1){let e=D();n(0,"th",33)(1,"input",34),g("change",function(o){d(e);let c=s(2);return u(c.onSelectAllData(o.target.checked))}),i()()}}function S0(t,r){t&1&&(n(0,"th",35),p(1," Price "),i())}function b0(t,r){if(t&1){let e=D();n(0,"td",33)(1,"input",40),S("ngModelChange",function(o){d(e);let c=s().$implicit;return h(c.selected,o)||(c.selected=o),u(o)}),i()()}if(t&2){let e=s().$implicit;l(),y("ngModel",e.selected)}}function D0(t,r){if(t&1&&(n(0,"td",35),p(1),v(2,"number"),i()),t&2){let e=s().$implicit;l(),I(" ",E(2,1,e.Price)," ")}}function I0(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.Courier)}}function T0(t,r){if(t&1&&(n(0,"span"),p(1),i()),t&2){let e=s().$implicit;l(),b(e.CourierName)}}function w0(t,r){if(t&1&&(n(0,"tbody")(1,"tr"),_(2,b0,2,1,"td",10),n(3,"td"),p(4),i(),n(5,"td"),p(6),i(),n(7,"td"),f(8,"a",36),i(),n(9,"td"),p(10),v(11,"date"),i(),n(12,"td"),p(13),v(14,"date"),i(),n(15,"td",35),p(16),i(),_(17,D0,3,3,"td",15),n(18,"td"),p(19),i(),n(20,"td"),p(21),i(),n(22,"td"),p(23),i(),n(24,"td"),_(25,I0,2,1,"span",37)(26,T0,2,1,"span",37),i(),n(27,"td")(28,"a",38),f(29,"i",39),i()()()()),t&2){let e=r.$implicit,a=s(2);l(2),m("ngIf",a.role.logistic.Delete),l(2),b(e.Source),l(2),b(e.Destination),l(2),m("routerLink",N(25,_0))("queryParams",M(26,f0,e.ID))("innerHTML",e.Number,W),l(2),b(P(11,19,e.Date,"dd MMM yyyy")),l(3),b(P(14,22,e.Created,"HH:mm")),l(3),b(e.Quantity),l(),m("ngIf",a.role.sell.PriceVisible&&a.pageData.Config.PriceVisible),l(),ft(Oi(28,g0,e.StateLabel=="Received",e.StateLabel=="Dispatched",e.StateLabel=="Approved")),l(),I(" ",e.StateLabel," "),l(2),b(e.CreatorName),l(2),b(e.TypeName),l(2),m("ngIf",e.Courier!=null),l(),m("ngIf",e.CourierName!=null&&e.Courier==null),l(2),m("routerLink",N(32,C0))("queryParams",Re(33,v0,e.ID,e.SourceTemplateID))}}function E0(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.Number,o)||(c.pageData.Filter.Number=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,x0,3,0,"a",3),n(3,"a",4),p(4,"Add"),i()(),n(5,"filters"),_(6,y0,31,21,"ng-template",null,0,X),i(),n(8,"content")(9,"div",5)(10,"div",6)(11,"table",7)(12,"thead",8)(13,"tr",9),_(14,h0,2,0,"th",10),n(15,"th",11),p(16,"Source"),i(),n(17,"th",12),p(18,"Destination"),i(),n(19,"th"),p(20,"Number"),i(),n(21,"th",13),p(22,"Date"),i(),n(23,"th",13),p(24,"Time"),i(),n(25,"th",14),p(26,"Qty"),i(),_(27,S0,2,0,"th",15),n(28,"th",13),p(29,"Status"),i(),n(30,"th",16),p(31,"Creator"),i(),n(32,"th",13),p(33,"Tag"),i(),n(34,"th",13),p(35,"Courier"),i(),f(36,"th",17),i()(),_(37,w0,30,36,"tbody",18),i()(),n(38,"POS-complex-pagination",19),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.Number),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.role.logistic.Delete&&e.getSelectedData().length>0),l(),m("routerLink",N(11,u0)),l(11),m("ngIf",e.role.logistic.Delete),l(13),m("ngIf",e.role.sell.PriceVisible&&e.pageData.Config.PriceVisible),l(10),m("ngForOf",e.data.Data),l(),m("total",e.data.Data.length)("pageData",e.pageData)}}var Gn=class t extends ve{constructor(e,a,o,c){super(e,a,"transferorder/VoidedTransferOrderList","TransferOrderLoader/TransferOrderList",o);this.roleService=c}radioOption;role=x(ie);static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(ee),C(ie))};static \u0275cmp=w({type:t,selectors:[["POS-recycle-bin"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["role","button","class","btn btn-outline-secondary me-5",3,"click",4,"ngIf"],[1,"button","btn","btn-success",3,"routerLink"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],["style","width: 14px",4,"ngIf"],[2,"width","100px"],[2,"width","150px"],[2,"width","90px"],[1,"text-end",2,"width","50px"],["class","text-end",4,"ngIf"],[2,"width","120px"],[2,"width","16px"],[4,"ngFor","ngForOf"],["api","TransferOrder/VoidedTransferOrderRowsCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["role","button",1,"btn","btn-outline-secondary","me-5",3,"click"],[1,"fas","fa-trash"],[1,"dialog-filter"],["placeholder","Source",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["bindLabel","Value","bindValue","Key","placeholder","Choose",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Options",3,"ngModelChange","items","ngModel"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose a courier",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetUserSuggestion",1,"input-left","w-100","ac-filter",3,"ngModelChange","ngModel"],["name","SortBy",3,"modelChange","options","model"],["type","text","autoNum","",1,"form-control","input-filter",3,"ngModelChange","ngModel","max"],[2,"width","14px"],["type","checkbox",3,"change"],[1,"text-end"],[3,"routerLink","queryParams","innerHTML"],[4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-print"],["type","checkbox",3,"ngModelChange","ngModel"]],template:function(a,o){a&1&&_(0,E0,39,12,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,fe,yt,R,H,ne,se,Rt,We,Ke,mt,Te,Ee,_e,Se],encapsulation:2})};var O0=()=>["/menu/Logistics/Archive/Transfer_Order/Info"],M0=t=>({ID:t});function P0(t,r){if(t&1){let e=D();n(0,"button",12),g("click",function(){d(e);let o=s(2);return u(o.openExportModal())}),f(1,"i",13),p(2," Export "),i()}}function F0(t,r){if(t&1){let e=D();n(0,"div",14)(1,"h6"),p(2,"Source"),i(),n(3,"outlet-selector",15),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.OutletSourceIds,o)||(c.pageData.Filter.OutletSourceIds=o),u(o)}),i(),n(4,"h6"),p(5,"Destination"),i(),n(6,"outlet-selector",16),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.OutletDestinationIds,o)||(c.pageData.Filter.OutletDestinationIds=o),u(o)}),i(),n(7,"h6"),p(8,"Action"),i(),n(9,"ng-select",17),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.ActionTypeID,o)||(c.pageData.Filter.ActionTypeID=o),u(o)}),i(),n(10,"h6"),p(11,"From"),i(),n(12,"datepicker",18),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.From,o)||(c.pageData.Filter.From=o),u(o)}),i(),n(13,"h6"),p(14,"To"),i(),n(15,"datepicker",19),S("dateChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.To,o)||(c.pageData.Filter.To=o),u(o)}),i(),n(16,"h6"),p(17,"Creator"),i(),n(18,"autocompleteV2",20),S("ngModelChange",function(o){d(e);let c=s(2);return h(c.pageData.Filter.UserID,o)||(c.pageData.Filter.UserID=o),u(o)}),i()()}if(t&2){let e=s(2);l(3),m("accessType",2),y("ngModel",e.pageData.Filter.OutletSourceIds),m("multiple",!0),l(3),m("accessType",2),y("ngModel",e.pageData.Filter.OutletDestinationIds),m("multiple",!0),l(3),m("items",e.pageData.Options.ActionTypeOptions),y("ngModel",e.pageData.Filter.ActionTypeID),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.From),l(3),m("isFloatingLabel",!1),y("date",e.pageData.Filter.To),l(3),y("ngModel",e.pageData.Filter.UserID)}}function V0(t,r){if(t&1&&f(0,"a",24),t&2){let e=s().$implicit;m("routerLink",N(3,O0))("queryParams",M(4,M0,e.TransferOrderID))("innerHTML",e.TransferOrderNumber,W)}}function N0(t,r){if(t&1&&(n(0,"span",25),p(1),i()),t&2){let e=s().$implicit;l(),I(" ",e.TransferOrderNumber,"")}}function L0(t,r){if(t&1&&(n(0,"tr")(1,"td"),p(2),i(),n(3,"td"),p(4),i(),n(5,"td"),_(6,V0,1,6,"a",21)(7,N0,2,1,"span",22),i(),n(8,"td"),p(9),v(10,"date"),i(),n(11,"td"),p(12),v(13,"date"),i(),n(14,"td"),p(15),i(),n(16,"td"),p(17),i(),n(18,"td"),p(19),i(),f(20,"td",23),i()),t&2){let e=r.$implicit;l(2),b(e.OutletSourceName),l(2),b(e.OutletDestinationName),l(2),m("ngIf",!e.IsDeleted),l(),m("ngIf",e.IsDeleted),l(2),b(P(10,10,e.Created,"dd MMM yyyy")),l(3),b(P(13,13,e.Created,"HH:mm")),l(3),b(e.CreatorUserName),l(2),b(e.Quantity),l(2),b(e.ActionType),l(),m("innerHTML",e.Note,W)}}function k0(t,r){if(t&1){let e=D();n(0,"mainpanel-cmp",2),S("textChange",function(o){d(e);let c=s();return h(c.pageData.Filter.TransferOrderNumber,o)||(c.pageData.Filter.TransferOrderNumber=o),u(o)}),g("onSubmit",function(){d(e);let o=s();return u(o.searchFromPageOne())}),S("filterChange",function(o){d(e);let c=s();return h(c.pageData.Filter,o)||(c.pageData.Filter=o),u(o)}),n(1,"actions"),_(2,P0,3,0,"button",3),i(),n(3,"filters"),_(4,F0,19,13,"ng-template",null,0,X),i(),n(6,"content")(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th"),p(13,"Outlet"),i(),n(14,"th"),p(15,"Destination"),i(),n(16,"th",8),p(17,"Number"),i(),n(18,"th"),p(19,"Date"),i(),n(20,"th"),p(21,"Time"),i(),n(22,"th"),p(23,"By"),i(),n(24,"th"),p(25,"Qty"),i(),n(26,"th"),p(27,"Action"),i(),n(28,"th",9),p(29,"Note"),i()()(),n(30,"tbody"),_(31,L0,21,16,"tr",10),i()()(),n(32,"POS-complex-pagination",11),g("jumpToPage",function(){d(e);let o=s();return u(o.getListData())})("previousPage",function(){d(e);let o=s();return u(o.getListData())})("nextPage",function(){d(e);let o=s();return u(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData),y("text",e.pageData.Filter.TransferOrderNumber),m("isFilterOnDropdown",!1),y("filter",e.pageData.Filter),l(2),m("ngIf",e.roleService.global.Export),l(29),m("ngForOf",e.data),l(),m("total",e.data.length)("pageData",e.pageData)}}var $n=class t extends ve{constructor(e,a,o,c,O,Q){super(e,a,"TransferOrder/gettransferorderupdatehistories","TransferOrderLoader/loadtransferorderupdatehistory",null,O);this.csvConverter=o;this.roleService=c;this.matDialog=Q}openExportModal(){this.matDialog.open(be,{data:{title:"Transfer Order Update History",exportTypes:[{ID:"transferorderexport/gettransferorderupdatehistories",Value:"Default"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!1}})}scopeOptions=[{Key:!1,Value:"Variant"},{Key:!0,Value:"Product"}];static \u0275fac=function(a){return new(a||t)(C(te),C(L),C(we),C(ie),C(pe),C(A))};static \u0275cmp=w({type:t,selectors:[["POS-transfer-update-history"]],standalone:!1,features:[oe],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","text","isFilterOnDropdown","filter","textChange","onSubmit","filterChange",4,"ngIf"],[3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom","hidden-xxs"],[1,"thead-light","sticky-top-thead"],[2,"width","150px"],[2,"width","400px"],[4,"ngFor","ngForOf"],["api","transferorder/gettransferorderupdatehistoriescount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],["placeholder","Source",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["placeholder","Destination",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel","multiple"],["bindLabel","Value","bindValue","Key","appendTo","body",3,"ngModelChange","items","ngModel"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date"],["requestUrl","/API/AC/GetUserSuggestion",1,"input-left","w-100","ac-filter",3,"ngModelChange","ngModel"],[3,"routerLink","queryParams","innerHTML",4,"ngIf"],["class","text-danger",4,"ngIf"],[3,"innerHTML"],[3,"routerLink","queryParams","innerHTML"],[1,"text-danger"]],template:function(a,o){a&1&&_(0,k0,33,8,"mainpanel-cmp",1),a&2&&m("ngIf",o.data)},dependencies:[K,B,z,R,H,ne,se,We,Ke,Te,Ee,Se],encapsulation:2})};var R0=[{path:"Archive/Transfer_Order",component:Yi},{path:"Archive/Transfer_Order/Info",component:sn},{path:"Archive/Transfer_Order/Form",component:zn},{path:"Archive/Transfer_Order/Receive",component:xn},{path:"Archive/Outbound_Logistics",component:Xi},{path:"Archive/Outbound_Logistics/Info",component:tn},{path:"Archive/Outbound_Logistics/Form",component:Sn},{path:"Archive/Inbound_Logistics",component:Zi},{path:"Archive/Inbound_Logistics/Info",component:un},{path:"Archive/Inbound_Logistics/Form",component:bn},{path:"Report/Outbound/Product",component:nn},{path:"Report/Outbound/Detail",component:on},{path:"Report/Outbound/Logistics_Service",component:$o},{path:"Report/Outbound/Logistics_Service/Detail",component:Dn},{path:"Report/Inbound/Product",component:rn},{path:"Report/Inbound/Detail",component:an},{path:"Report/Transfer/Product",component:ln},{path:"Report/Transfer/Detail",component:pn},{path:"Report/Transfer/History",component:$n},{path:"Setup/Courier",component:gn},{path:"Setup/Courier/Form",component:Cn},{path:"Setup/Courier/Info",loadComponent:()=>import("./chunk-GBAAG52Z.js").then(t=>t.CourierInfoComponent)},{path:"Setup/Recycle_Bin",component:Gn},{path:"",redirectTo:"Archive/Transfer_Order",pathMatch:"full"}],Kn=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=Di({type:t});static \u0275inj=bi({imports:[gt.forChild(R0),gt]})};var Qr=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=Di({type:t});static \u0275inj=bi({imports:[Z,Ve,Kn,ot,kt,ni,To,Eo,Oo,Fo,No,Hi,ji,qo,Wo,br,Wi,Uo,Ri,Te,Ni,ir,Dr,Ir,Tr,$i,Pi,St,Lo,ii,zi,vr,dr,Io,Qi,ct,oi,qi,Ee,Go,Vo,Zo,Gi]})};export{Qr as DeliveryModule};