dealposbooks 5.49.3 → 5.50.0

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 (168) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/assets/scss/style.scss +2 -4
  3. package/chunk-27SC6O47.js +1 -0
  4. package/{chunk-ELMSU4U7.js → chunk-2ABEICLB.js} +1 -1
  5. package/{chunk-KJCHFIF4.js → chunk-2JFOEOZ2.js} +1 -1
  6. package/{chunk-DTAREQVV.js → chunk-3ALAWCRA.js} +1 -1
  7. package/chunk-3GYSEQ25.js +1 -0
  8. package/{chunk-2XW2ZOT4.js → chunk-43JH7CKX.js} +1 -1
  9. package/chunk-47G2N7SA.js +1 -0
  10. package/{chunk-FWAGEKIF.js → chunk-4AGTFPOU.js} +1 -1
  11. package/{chunk-ME4V3YFW.js → chunk-4IMFKRR6.js} +1 -1
  12. package/chunk-4RBG4SFN.js +1 -0
  13. package/chunk-56CZGYL5.js +1 -0
  14. package/chunk-5N5QHECN.js +1 -0
  15. package/{chunk-DJXQKSLT.js → chunk-5U7KZJ3H.js} +1 -1
  16. package/{chunk-B4C3ZPN6.js → chunk-5VKDAA74.js} +1 -1
  17. package/chunk-65V5R4TS.js +1 -0
  18. package/{chunk-HCJK6VTO.js → chunk-6GILMLXA.js} +1 -1
  19. package/chunk-6GO647AV.js +1 -0
  20. package/chunk-7DBOORB2.js +1 -0
  21. package/{chunk-UPSNJEHO.js → chunk-7L5IAWG2.js} +1 -1
  22. package/chunk-A6T2KR7U.js +1 -0
  23. package/chunk-AF6G72MJ.js +1 -0
  24. package/chunk-ALLR2NXQ.js +1 -0
  25. package/chunk-BB2CNXSH.js +1 -0
  26. package/chunk-BFEM6LX7.js +2 -0
  27. package/{chunk-EBEY2MBR.js → chunk-BME4Z6DH.js} +1 -1
  28. package/chunk-BOQI2TMP.js +8 -0
  29. package/{chunk-DGACZ747.js → chunk-BTFX33U6.js} +1 -1
  30. package/{chunk-E7QWESN4.js → chunk-CN6AT4LE.js} +1 -1
  31. package/chunk-COSMZ2AH.js +1 -0
  32. package/chunk-DAFEIZYQ.js +1 -0
  33. package/{chunk-NMU2YBAB.js → chunk-DAM2WKDY.js} +1 -1
  34. package/chunk-DM2JLWKE.js +1 -0
  35. package/chunk-DM45YT57.js +1 -0
  36. package/chunk-DZCJWJUG.js +1 -0
  37. package/{chunk-WXIG4CXY.js → chunk-FHJOSHI3.js} +1 -1
  38. package/chunk-FHXTQXB7.js +160 -0
  39. package/{chunk-WMZF4DQK.js → chunk-FMAG3RQL.js} +1 -1
  40. package/{chunk-BKTBVFNX.js → chunk-FNGX2XFA.js} +1 -1
  41. package/{chunk-3DBSHDAQ.js → chunk-FTBQKOYS.js} +1 -1
  42. package/chunk-GAXDMEOS.js +1 -0
  43. package/chunk-GGQ7LRWG.js +0 -0
  44. package/{chunk-E6SW7I4D.js → chunk-GIRWHO6Q.js} +1 -1
  45. package/{chunk-BJMEZV24.js → chunk-GU4FXUJC.js} +1 -1
  46. package/{chunk-2VZ7JZIO.js → chunk-HMZX6SME.js} +1 -1
  47. package/chunk-HQHEWKLC.js +1 -0
  48. package/chunk-HU4J3ABZ.js +1 -0
  49. package/chunk-I2OULINE.js +1 -0
  50. package/{chunk-PPXXWO4E.js → chunk-II7KELI4.js} +1 -1
  51. package/{chunk-E3SH454T.js → chunk-IMPGOCFC.js} +1 -1
  52. package/{chunk-AD247LWQ.js → chunk-ISIYG4D5.js} +1 -1
  53. package/chunk-J3HFAWXU.js +229 -0
  54. package/chunk-JERRSTLA.js +1 -0
  55. package/chunk-JRBGNG24.js +1 -0
  56. package/{chunk-URH77XNK.js → chunk-JWNGZMSE.js} +1 -1
  57. package/{chunk-PGOSR3RI.js → chunk-KARG227P.js} +1 -1
  58. package/chunk-KL3TPLRB.js +2 -0
  59. package/{chunk-QPPFPDWZ.js → chunk-KONCSTVQ.js} +1 -1
  60. package/{chunk-2LNMV22E.js → chunk-KORGIX2B.js} +1 -1
  61. package/{chunk-VDXZGF3M.js → chunk-KQZMRRMA.js} +1 -1
  62. package/chunk-KXW5NWRO.js +1 -0
  63. package/{chunk-JD3HX7VY.js → chunk-KZU3VXLG.js} +1 -1
  64. package/{chunk-M4SSELXT.js → chunk-L4ENW4RK.js} +1 -1
  65. package/{chunk-IHKBTP2Y.js → chunk-LBXNL7E4.js} +1 -1
  66. package/{chunk-UVSR4LPB.js → chunk-LO4HJ77Y.js} +1 -1
  67. package/chunk-MGIEURA2.js +193 -0
  68. package/{chunk-VKNINE5Q.js → chunk-MJGBBYIO.js} +1 -1
  69. package/chunk-NHW7GVHK.js +1 -0
  70. package/{chunk-ME4ALIS7.js → chunk-O44DI62I.js} +1 -1
  71. package/{chunk-PKO36DGM.js → chunk-ON7PMYMV.js} +1 -1
  72. package/chunk-OOCCZG53.js +129 -0
  73. package/{chunk-AN4SAUSA.js → chunk-OW2ND5HU.js} +1 -1
  74. package/chunk-PB2MFYIM.js +1 -0
  75. package/chunk-Q4XWXOWE.js +1 -0
  76. package/chunk-RBNXJUFM.js +252 -0
  77. package/{chunk-F7XGJYCZ.js → chunk-RMHKEGL5.js} +1 -1
  78. package/{chunk-KGNH5JRZ.js → chunk-RVUOVLL5.js} +1 -1
  79. package/chunk-SASRJPT7.js +1 -0
  80. package/chunk-SJOOTBQ5.js +1 -0
  81. package/{chunk-3UAQHNUY.js → chunk-SLD7RSX6.js} +1 -1
  82. package/{chunk-CAS5GLLU.js → chunk-SOYJAYJK.js} +1 -1
  83. package/{chunk-KZHI6PGZ.js → chunk-SVGPDGYN.js} +1 -1
  84. package/chunk-SX4XIR77.js +1 -0
  85. package/{chunk-OBT3IJJQ.js → chunk-SXNOZOOP.js} +5 -5
  86. package/{chunk-RM5HLXNW.js → chunk-TAN6GLIH.js} +1 -1
  87. package/{chunk-5DRALZZF.js → chunk-TOR7QRRB.js} +1 -1
  88. package/{chunk-D6IS6PE6.js → chunk-U4AN6IWJ.js} +1 -1
  89. package/chunk-URGN4QVD.js +1 -0
  90. package/chunk-UTOLWW4T.js +1 -0
  91. package/chunk-VJROOSEO.js +7 -0
  92. package/chunk-VKUW7E75.js +1 -0
  93. package/{chunk-S27Z7D3D.js → chunk-VM56C6ZV.js} +1 -1
  94. package/chunk-VNZUZ5UI.js +1 -0
  95. package/{chunk-AMGBUOC4.js → chunk-VSDW2RJ5.js} +1 -1
  96. package/{chunk-U2VDC52W.js → chunk-WL6ZZCYW.js} +1 -1
  97. package/chunk-WYLIU52Q.js +1 -0
  98. package/{chunk-5B5AMMR3.js → chunk-X6KL7VKV.js} +1 -1
  99. package/chunk-XGU6GBEK.js +1 -0
  100. package/chunk-XN4CDKDI.js +1 -0
  101. package/chunk-XULSWUMO.js +1 -0
  102. package/chunk-YHLRDTIS.js +1 -0
  103. package/chunk-YQYRAH7V.js +1 -0
  104. package/{chunk-ENH6HA3V.js → chunk-YR5KRTHR.js} +1 -1
  105. package/{chunk-UD23HDLE.js → chunk-YU4Q7ASX.js} +1 -1
  106. package/chunk-Z3ZKNQZS.js +1 -0
  107. package/chunk-Z4XRTHAH.js +1 -0
  108. package/chunk-ZAMQ4RCL.js +1 -0
  109. package/chunk-ZC2ADHDH.js +130 -0
  110. package/{chunk-MHRSQRHT.js → chunk-ZC7ZENN7.js} +1 -1
  111. package/chunk-ZWNKUBMG.js +202 -0
  112. package/index.html +2 -2
  113. package/main-UCTZ3G6L.js +1 -0
  114. package/package.json +1 -1
  115. package/{styles-FYY2LVCE.css → styles-T5RGO2FA.css} +1 -1
  116. package/chunk-26LXGKDF.js +0 -1
  117. package/chunk-2BI7WNJP.js +0 -1
  118. package/chunk-3KEAMVYI.js +0 -202
  119. package/chunk-4G57L7HS.js +0 -1
  120. package/chunk-4OZIHMKI.js +0 -1
  121. package/chunk-4UVBCZJG.js +0 -1
  122. package/chunk-5LGAO5J4.js +0 -1
  123. package/chunk-6WWXJJID.js +0 -1
  124. package/chunk-A3P24MDP.js +0 -129
  125. package/chunk-A7OYELWP.js +0 -1
  126. package/chunk-ATFRJZK3.js +0 -1
  127. package/chunk-C5EDHVD7.js +0 -1
  128. package/chunk-C7ZPOAWO.js +0 -1
  129. package/chunk-CTINUVLP.js +0 -1
  130. package/chunk-D2CH2T3I.js +0 -229
  131. package/chunk-DJTQ4KQ7.js +0 -1
  132. package/chunk-ES2YST7G.js +0 -1
  133. package/chunk-F7PVAVLQ.js +0 -1
  134. package/chunk-FQRRGJBE.js +0 -1
  135. package/chunk-G4XX7EU2.js +0 -1
  136. package/chunk-I2IEFBTX.js +0 -1
  137. package/chunk-IQ4SHFOC.js +0 -252
  138. package/chunk-L3CQJPFS.js +0 -1
  139. package/chunk-LG5TMEPP.js +0 -1
  140. package/chunk-LNFCBMAA.js +0 -1
  141. package/chunk-LOMHQKQX.js +0 -1
  142. package/chunk-LUS3QGR4.js +0 -1
  143. package/chunk-N6LQW4C4.js +0 -1
  144. package/chunk-NXJQMUGV.js +0 -1
  145. package/chunk-OFI2JX7N.js +0 -1
  146. package/chunk-OFLGX5N4.js +0 -160
  147. package/chunk-OJTHBHGK.js +0 -1
  148. package/chunk-PW4Y2UWU.js +0 -1
  149. package/chunk-PZZCPZ6Q.js +0 -1
  150. package/chunk-Q4KG7LH6.js +0 -1
  151. package/chunk-QFFI46W6.js +0 -130
  152. package/chunk-QJ5XIVKM.js +0 -1
  153. package/chunk-RX37I2ZC.js +0 -1
  154. package/chunk-S6S265JY.js +0 -7
  155. package/chunk-SUWUVFH4.js +0 -1
  156. package/chunk-UK5OOIPU.js +0 -1
  157. package/chunk-V2P3PRZY.js +0 -1
  158. package/chunk-V65ONV6D.js +0 -1
  159. package/chunk-VMI3QWC6.js +0 -193
  160. package/chunk-VMI7LQOW.js +0 -1
  161. package/chunk-WRTIQGAC.js +0 -8
  162. package/chunk-XJFNZBHG.js +0 -1
  163. package/chunk-XWXTYJHR.js +0 -1
  164. package/chunk-YIEUIWT7.js +0 -1
  165. package/chunk-ZFNIPERQ.js +0 -2
  166. package/chunk-ZK43JB4A.js +0 -2
  167. package/chunk-ZZEOPBUT.js +0 -1
  168. package/main-WMHNA6IG.js +0 -1
package/chunk-PW4Y2UWU.js DELETED
@@ -1 +0,0 @@
1
- import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-RM5HLXNW.js";import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as de,b as fe}from"./chunk-3VQUNDVT.js";import{d as le,e as Je,i as Ke,j as qe,k as ne}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as Le}from"./chunk-BT7Y4ADP.js";import{a as re,b as pe}from"./chunk-DJXQKSLT.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import{a as W,b as j}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import{a as Ae,b as J}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as M}from"./chunk-D2CH2T3I.js";import"./chunk-S27Z7D3D.js";import{a as Y,b as $}from"./chunk-AD247LWQ.js";import{b as Q,c as Fe,d as Te,e as we,f as Me,g as De,h as Ye}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{o as He,w as N,x as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as V,f as ye,j as te,k as Pe,l as be,m as Oe,n as ze,o as Ie,u as Ee,w as H,x as ae}from"./chunk-VMI3QWC6.js";import{b as ie,d as Ue,e as D,l as A}from"./chunk-F7PVAVLQ.js";import"./chunk-KGNH5JRZ.js";import{a as ve}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{k as B,o as je,s as w}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as Se,Eb as x,Ec as z,Fc as oe,Ha as I,Mb as c,Oc as Ve,Pb as q,Pc as $e,Rb as Ce,Sb as P,Sc as u,Ub as b,Vb as O,Wb as r,Xb as a,Y as U,Yb as Z,_ as F,ac as v,bd as ee,c as ue,ca as he,cd as We,fc as y,gc as s,ia as h,ib as p,qa as C,ra as S,s as X,sc as m,tc as _,uc as E,wc as Be,yb as T}from"./chunk-6QJHEOXN.js";import{a as f,b as g}from"./chunk-YQFG5XE2.js";var k=(()=>{class t{constructor(){this.httpService=h(ve)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var R=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(R||{});var it={[R.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[R.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[R.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[R.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[R.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[R.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[R.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[R.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[R.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function _t(t,i){if(t&1){let e=v();r(0,"div",5)(1,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.onSubmit())}),a()()}}function gt(t,i){if(t&1&&(r(0,"p-tab",10),m(1),a()),t&2){let e=i.$implicit;c("value",e.value),p(),_(e.label)}}function xt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function ht(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ct(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",17),m(6),a()(),r(7,"p-select",18),x(8,xt,7,2,"ng-template",null,2,u)(10,ht,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function St(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function vt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function yt(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",20),m(6),a()(),r(7,"p-select",18),x(8,St,7,2,"ng-template",null,2,u)(10,vt,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function Pt(t,i){if(t&1&&(r(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),b(4,Ct,12,4,"div",14,P),a()(),r(6,"div",12)(7,"div",13),b(8,yt,12,4,"div",14,P),a()()()()),t&2){let e=i.$implicit,n=s(3);c("value",e.value),p(),c("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function bt(t,i){if(t&1){let e=v();r(0,"form",8),y("ngSubmit",function(){C(e);let o=s(2);return S(o.onSubmit())}),r(1,"p-tabs",9)(2,"p-tablist"),b(3,gt,2,2,"p-tab",10,P),a(),r(5,"p-tabpanels"),b(6,Pt,10,2,"p-tabpanel",10,P),a()()()}if(t&2){let e=s(2);c("formGroup",e.accountForm),p(),c("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function Ot(t,i){if(t&1&&x(0,bt,8,3,"form",7),t&2){let e=s();c("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(k),this.fb=h(Ee),this.tab=I(R.POSGLOBAL_SELL),this.tabs=I(Object.values(R).map(e=>({label:e,value:e}))),this.posIntegration=I(null),this.form=I([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=R}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(F(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return it[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:d,accountID:L}of l){let ce=`${d}_${L}`;o.has(ce)||(o.add(ce),n.push({typeID:d,accountID:L||Qe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(d=>{d!==o&&d.get("typeID")?.value===e&&d.get("accountID")?.value!==n&&d.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,_t,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),a())},dependencies:[M,ot,nt,tt,et,Xe,Ze,He,j,W,H,Pe,V,ye,w,B,A,G,N,ae,be,Ie,Oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,i){if(t&1&&(r(0,"th",7),m(1),a()),t&2){let e=i.$implicit;p(),_(e.name.slice(0,10))}}function Ft(t,i){if(t&1&&(r(0,"tr")(1,"th",6),m(2,"Method"),a()(),r(3,"tr"),b(4,Et,2,1,"th",7,P),a()),t&2){let e=s(3);p(4),O(e.paymentConfiguration().outlets)}}function Tt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.accountName)}}function wt(t,i){if(t&1&&(r(0,"tr")(1,"td",8)(2,"a",9),m(3),a()(),b(4,Tt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,It,e.id)),p(),_(e.name),p(),O(e.accounts)}}function Mt(t,i){if(t&1&&(r(0,"p-table",5),x(1,Ft,6,0,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),a()),t&2){let e=s(2);c("value",e.paymentConfiguration().payment)}}function Dt(t,i){if(t&1){let e=v();r(0,"app-main-panel",4),y("search",function(o){C(e);let l=s();return S(l.onSearch(o))}),x(1,Mt,5,1,"ng-template",null,0,u),a()}t&2&&c("isSearchableInput",!0)("scrollable",!0)}var pt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.paymentConfiguration=I(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(F(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(F(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&x(0,Dt,3,2,"app-main-panel",3),n&2&&c("ngIf",o.paymentConfiguration())},dependencies:[M,ne,le,Je,w,B,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var At={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ne=Fe(De(At),Te(t=>({first:ee(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:ee(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),Me(t=>{let i=h(k);return{updateFilter:n=>{Q(t,o=>g(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:de(ue(U(n=>i.fetchPOSOutletConfiguration(n).pipe(fe({next:o=>{Q(t,l=>g(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),we(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var kt=t=>[t];function Rt(t,i){if(t&1&&(r(0,"th"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.value)}}function Lt(t,i){if(t&1&&(r(0,"tr")(1,"th"),m(2,"Name"),a(),b(3,Rt,2,1,"th",null,P),a()),t&2){let e=s(2);p(3),O(e.store.data().listCOAType)}}function Nt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e)}}function Gt(t,i){if(t&1&&(r(0,"tr")(1,"td")(2,"a",7),m(3),a()(),b(4,Nt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,kt,e.OutletID)),p(),E(" ",e.OutletName,""),p(),O(e.Accounts)}}function Bt(t,i){if(t&1&&m(0),t&2){let e=s(2);Be(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Vt(t,i){t&1&&(r(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),a()()())}function $t(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",6),y("onPage",function(o){C(e);let l=s();return S(l.onPage(o))}),x(2,Lt,5,0,"ng-template",null,1,u)(4,Gt,6,4,"ng-template",null,2,u)(6,Bt,1,3,"ng-template",null,3,u)(8,Vt,4,0,"ng-template",null,4,u),a()()}if(t&2){let e=s();p(),c("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var lt=(()=>{class t{constructor(){this.store=h(Ne)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(g(f({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[Se([Ne])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();r(0,"app-main-panel",5),y("search",function(L){return C(l),S(o.onSearch(L))}),x(1,$t,10,5,"ng-template",null,0,u),a()}n&2&&c("isSearchableInput",!0)("scrollable",!0)},dependencies:[M,w,J,ne,le,A,D,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Wt=()=>({height:"calc(100vh - 100px)"}),jt=()=>({height:"calc(100vh - 150px)"});function Ut(t,i){if(t&1){let e=v();r(0,"a",5),m(1,"Cancel"),a(),r(2,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.updatePOsOutletConfiguration())}),a()}}function zt(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ht(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Yt(t,i){if(t&1&&(r(0,"div",12)(1,"span",14),m(2),a(),r(3,"p-select",15),x(4,zt,7,2,"ng-template",null,2,u)(6,Ht,7,2,"ng-template",null,3,u),a()()),t&2){let e,n=i.$implicit,o=i.$index,l=s(3);c("formGroupName",o),p(2),_((e=n.get("TypeName"))==null?null:e.value),p(),c("options",l.options.accounts)}}function Jt(t,i){t&1&&Z(0,"hr")}function Kt(t,i){if(t&1&&(r(0,"div",9)(1,"h3",10),m(2),Ve(3,"titlecase"),a(),r(4,"div",11),b(5,Yt,8,3,"div",12,P),a()(),x(7,Jt,1,0,"hr",13)),t&2){let e,n=i.$implicit,o=i.$index,l=i.$index,d=i.$count,L=s(2);c("formGroupName",o),p(2),E(" ",$e(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(L.getAccountsFormArray(l).controls),p(2),c("ngIf",l!==d-1)}}function qt(t,i){if(t&1&&(r(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Kt,8,5,null,null,P),a()()()()),t&2){let e=s();q(z(5,Wt)),p(),q(z(6,jt)),p(),c("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var mt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.outletForm=I(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=h(Ee)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),F(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,Ut,3,0,"ng-template",null,0,u)(3,qt,6,7,"ng-template",null,1,u),a()),n&2&&c("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,B,je,J,ae,Pe,V,ye,be,Ie,Oe,ze,j,W,$,Y,re,G,N,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=()=>({height:"calc(100vh - 100px)"}),en=()=>({width:"100%",height:"calc(100vh - 150px)"}),tn=()=>({width:"100%"});function nn(t,i){if(t&1){let e=v();r(0,"a",6),m(1,"Cancel"),a(),r(2,"p-button",7),y("onClick",function(){C(e);let o=s(3);return S(o.updatePOSOutletConfiguration())}),a()}}function on(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function an(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function rn(t,i){if(t&1){let e=v();r(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),a()(),Z(5,"div",13),r(6,"div",14)(7,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(4);return S(d.updateAccountById(o,l))}),x(8,on,7,2,"ng-template",null,2,u)(10,an,7,2,"ng-template",null,3,u),a()()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(4);p(4),_(e.outletName.slice(0,15)),p(3),q(z(7,tn)),c("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function pn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,rn,12,8,"div",9,P),a()()()),t&2){let e=s(3);q(z(4,Zt)),p(),q(z(5,en)),p(2),O(e.paymentForm().form.accounts)}}function ln(t,i){if(t&1&&(r(0,"app-main-panel",4),x(1,nn,3,0,"ng-template",null,0,u)(3,pn,5,6,"ng-template",null,1,u),a()),t&2){let e=s(2);c("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function mn(t,i){if(t&1&&x(0,ln,5,2,"app-main-panel",5),t&2){let e=s();c("ngIf",e.paymentForm())}}var st=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.paymentForm=I(null),this.router=h(Ue)}ngOnInit(){this.route.paramMap.pipe(X(e=>+e.get("id")),U(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),F(e=>{this.paymentForm.set(e)}),Le("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=g(f({},this.paymentForm()),{form:g(f({},this.paymentForm().form),{accounts:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Le("response"),F(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&x(0,mn,1,1,"app-main-panel",4),n&2&&Ce(o.paymentForm()?0:-1)},dependencies:[J,Ae,M,w,B,pe,re,j,W,H,V,te,A,D,G,N,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function sn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSTaxConfiguration())}),a()()}}function cn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",15)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function un(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",16)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function dn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"div",12)(2,"label",13),m(3),a(),r(4,"p-select",14),y("ngModelChange",function(o){let l=C(e).$index,d=s(2);return S(d.updateAccountID(o,l))}),x(5,cn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(2);p(3),_(e.name),p(),c("options",o.taxForm().options.chartOfAccount)("ngModel",o.taxForm().form[n].accountID)}}function fn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10),b(4,dn,9,3,"div",11,P),a()()()()),t&2){let e=s();p(4),O(e.taxForm().form)}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(k),this.taxForm=I(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(F(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=g(f({},this.taxForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(F(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,sn,4,0,"ng-template",null,0,u)(3,fn,6,0,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,J,w,j,W,pe,H,V,te,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var _n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,i){t&1&&Z(0,"p-button",6)}function hn(t,i){if(t&1&&x(0,xn,1,0,"p-button",5),t&2){let e=s();c("ngIf",e.hasCheckedItems())}}function Cn(t,i){t&1&&(r(0,"tr")(1,"th",8),Z(2,"p-tableHeaderCheckbox"),a(),r(3,"th"),m(4,"Name"),a(),r(5,"th"),m(6,"Description"),a()())}function Sn(t,i){if(t&1&&(r(0,"tr")(1,"td"),Z(2,"p-tableCheckbox",9),a(),r(3,"td")(4,"a",10),m(5),a()(),r(6,"td"),m(7),a()()),t&2){let e=i.$implicit;p(2),c("value",e),p(2),c("routerLink",oe(4,gn,e.id)),p(),_(e.name),p(2),_(e.description)}}function vn(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=s();return S(l.onSelectAll(o))}),x(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),a()()}if(t&2){let e=s();p(),c("value",e.writeoffList().data)("tableStyle",z(2,_n))}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(k),this.writeoffList=I(null),this.hasCheckedItems=ee(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(X(e=>g(f({},e),{data:e.data.map(n=>g(f({},n),{checked:!1}))})),F(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=g(f({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(g(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>g(f({},l),{checked:e.checked}));this.writeoffList.set(g(f({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,3,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,w,B,ne,le,Ke,qe,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Pn(t,i){if(t&1){let e=v();r(0,"div",6)(1,"a",7),m(2,"Cancel"),a(),r(3,"p-button",8),y("onClick",function(){C(e);let o=s(2);return S(o.updateWriteOffConfiguration())}),a()()}}function bn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function On(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function In(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateAccountById(o,l))}),x(5,bn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=s(3);p(3),_(e.name),p(),c("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,i){if(t&1&&(r(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,In,9,5,"div",12,P),a()()()()()),t&2){let e=s(2);p(),q(z(2,yn)),p(4),O(e.writeOffForm().form)}}function Fn(t,i){if(t&1&&(r(0,"app-main-panel",5),x(1,Pn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),a()),t&2){let e=s();c("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var dt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.route=h(ie),this.writeOffForm=I(null)}ngOnInit(){this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),F(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=g(f({},this.writeOffForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&x(0,Fn,5,2,"app-main-panel",4),n&2&&c("ngIf",o.writeOffForm())},dependencies:[M,w,B,J,Ae,pe,re,j,W,H,V,te,A,D,G,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Re=(()=>{class t{constructor(){this.httpService=h(ve)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}getExpenseOptionsLoader(){return this.httpService.get(void 0,"/api/SetupExpenseOptionLoader/GetExpenseOptions")}updatePOSExpenseOptionConfiguration(e){return this.httpService.put(void 0,"/api/SetupExpenseOption/UpdateExpenseAccount",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Tn={data:{expenseOptions:[],options:{chartOfAccountOptions:[]}}},Ge=Fe(De(Tn),Ye("POSExpenseOptionStore"),Te(t=>({hasCheckedRows:ee(()=>t.data().expenseOptions.some(i=>i.checked)),checkedInvoice:ee(()=>t.data().expenseOptions.filter(i=>i.checked).map(i=>i.id))})),Me(t=>{let i=h(Re);return{onRowSelect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!0}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onRowUnselect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!1}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>g(f({},d),{checked:n}));return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},getExpenseOptions:de(ue(U(()=>i.getExpenseOptions().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{expenseOptions:n.expenseOptions.map(l=>g(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}}))))),getExpenseOptionsLoader:de(ue(U(()=>i.getExpenseOptionsLoader().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{options:{chartOfAccountOptions:n.options.chartOfAccountOptions}})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),we({onInit:t=>{t.getExpenseOptions(),t.getExpenseOptionsLoader()}}));function wn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSExpenseOptionConfiguration())}),a()()}}function Mn(t,i){if(t&1&&(r(0,"div",5)(1,"div",14)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function Dn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function An(t,i){if(t&1){let e=v();r(0,"div",10)(1,"div",11)(2,"label",12),m(3),a(),r(4,"p-select",13),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateData(o,l))}),x(5,Mn,4,1,"ng-template",null,2,u)(7,Dn,4,1,"ng-template",null,3,u),a()()()}if(t&2){let e,n=i.$implicit,o=i.$index,l=s(3);p(3),_(n.name),p(),c("options",l.store.data().options.chartOfAccountOptions)("ngModel",((e=l.expenseOptForm().ListData[o])==null?null:e.AccountID)||"")}}function kn(t,i){if(t&1&&b(0,An,9,3,"div",10,P),t&2){let e=s(2);O(e.store.data().expenseOptions)}}function Rn(t,i){t&1&&(r(0,"div",9)(1,"p"),m(2,"No expense options available."),a()())}function Ln(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",8),x(4,kn,2,0)(5,Rn,3,0,"div",9),a()()()()),t&2){let e=s();p(4),Ce(e.store.data().expenseOptions&&e.store.data().expenseOptions.length?4:5)}}var ft=(()=>{class t{constructor(){this.store=h(Ge),this.expenseOptService=h(Re),this.expenseOptForm=I({ListData:[]}),this.originalData=I([]),We(()=>{let e=this.store.data().expenseOptions;if(e&&e.length>0){let n=e.map(o=>({ID:o.id,AccountID:o.accountID||""}));this.expenseOptForm.set({ListData:n}),this.originalData.set([...n])}})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}updatePOSExpenseOptionConfiguration(){let e=this.expenseOptForm().ListData,n=this.originalData(),o=e.filter((d,L)=>{let ce=n[L];return ce&&d.AccountID!==ce.AccountID});if(o.length===0)return;let l={ListData:o};this.expenseOptService.updatePOSExpenseOptionConfiguration(l).pipe(F(d=>{console.log("Update response:",d),this.originalData.set([...e])})).subscribe()}updateData(e,n){let l=[...this.expenseOptForm().ListData];l[n]&&(l[n]=g(f({},l[n]),{AccountID:e}),this.expenseOptForm.set({ListData:l}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[Se([Ge])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Expense Option",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-12"],[1,"col-4"],[1,"d-flex","flex-column","card","rounded-3","p-3","border"],["for",""],["filter","","filterBy","key,value","optionLabel","value","optionValue","key","placeholder","Select COA",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,wn,4,0,"ng-template",null,0,u)(3,Ln,6,1,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,ne,$,Y,G,N,w,D,j,W,ae,V,H,te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var za=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:at},{path:"outlets",component:lt},{path:"outlets/:id",component:mt},{path:"payments",component:pt},{path:"payments/:id",component:st},{path:"taxs",component:ct},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:ft}]}];export{za as POS_SETUP_ROUTES};
package/chunk-PZZCPZ6Q.js DELETED
@@ -1 +0,0 @@
1
- import{a as A}from"./chunk-ME4V3YFW.js";import{a as Me}from"./chunk-KZHI6PGZ.js";import{a as ne}from"./chunk-KJCHFIF4.js";import{b as Ne}from"./chunk-IHKBTP2Y.js";import{a as Re}from"./chunk-XKI7WLHE.js";import"./chunk-U2VDC52W.js";import{a as M,b as P}from"./chunk-3VQUNDVT.js";import{d as Ve,i as Je,j as De,k as ke}from"./chunk-DGACZ747.js";import{a as Ee,b as Ie}from"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import{a as Ae,b as Fe}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as Te}from"./chunk-D2CH2T3I.js";import"./chunk-S27Z7D3D.js";import{a as ge,b as he}from"./chunk-AD247LWQ.js";import{a as Se,b as w,c as Ce,d as ve,e as we,f as ye,g as je}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{n as ue,o as ce,w as fe,x as _e,y as xe,z as be}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{b as oe,e as re,f as ae,k as le,l as me,o as pe,u as se,x as de}from"./chunk-VMI3QWC6.js";import"./chunk-F7PVAVLQ.js";import"./chunk-KGNH5JRZ.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{h as X,j as Y,k as Z,p as ee,q as te,s as ie}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Cb as L,Dc as Q,Eb as g,Fc as E,Ha as D,Mb as s,Oc as I,Pc as $,Qc as R,Sc as C,Wb as a,Xb as r,Y as J,Yb as b,_ as B,ac as j,bd as y,c as F,db as G,eb as O,fc as T,gc as f,ia as v,ib as m,qa as h,ra as x,s as V,sc as p,tc as S,uc as k,wc as W,xc as K,yb as U,yc as N,zc as q}from"./chunk-6QJHEOXN.js";import{a as d,b as c}from"./chunk-YQFG5XE2.js";var He={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,outletName:""}},filter:{number:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,outletName:""}},z=Ce(je(He),ve(t=>({first:y(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:y(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:y(()=>t.data().data.some(l=>l.checked)),checkedAdjustment:y(()=>t.data().data.filter(l=>l.checked).map(l=>l.id))})),ye(t=>{let l=v(A);return{updateFilter(n){w(t,i=>c(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){w(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(d({},u),{checked:!0}):u);return c(d({},i),{data:c(d({},i.data),{data:o})})})},onRowUnselect(n){w(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(d({},u),{checked:!1}):u);return c(d({},i),{data:c(d({},i.data),{data:o})})})},onHeaderCheckboxToggle(n){w(t,i=>{let o=i.data.data.map(u=>c(d({},u),{checked:n}));return c(d({},i),{data:c(d({},i.data),{data:o})})})},getGJAdjustmentLoader:M(F(J(()=>l.getGJAdjustmentLoader().pipe(P({next:n=>{w(t,i=>c(d({},i),{meta:n}))},error:n=>{console.error("Error fetching adjustment loader:",n)}}))))),getAdjustmentJournal:M(F(V(n=>Object.entries(n).reduce((i,[o,u])=>(u!=null&&(i[o]=u),i),{})),J(n=>l.getAdjustmentJournal(n).pipe(V(i=>c(d({},i),{data:i.data.map(o=>c(d({},o),{checked:!1}))})),P({next:i=>{w(t,o=>c(d({},o),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),we(t=>({onInit:()=>{t.getGJAdjustmentLoader(),t.getAdjustmentJournal(t.filter)}})));var H=t=>({"ng-invalid ng-dirty":t});function Be(t,l){if(t&1){let e=j();a(0,"p-button",10),T("onClick",function(){h(e);let i=f(2);return x(i.generateAdjusmentJournal())}),r()}}function Ge(t,l){if(t&1&&g(0,Be,1,0,"p-button",9),t&2){let e=f();s("ngIf",e.store.hasCheckedRows())}}function Oe(t,l){t&1&&(a(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),r(),a(3,"th",13),p(4,"Tag"),r(),a(5,"th",14),p(6,"Number"),r(),a(7,"th",15),p(8,"Date"),r(),a(9,"th",14),p(10,"Adjustment Qty"),r(),a(11,"th",13),p(12,"Type"),r(),a(13,"th",16),p(14,"State"),r(),a(15,"th",17),p(16,"Note"),r(),b(17,"th",18),r())}function Ue(t,l){if(t&1&&(a(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",20),p(7),r()(),a(8,"td"),p(9),I(10,"date"),r(),a(11,"td"),p(12),I(13,"number"),r(),a(14,"td"),p(15),r(),a(16,"td"),p(17),r(),a(18,"td"),b(19,"div",21),r(),a(20,"td"),b(21,"p-button",22),r()()),t&2){let e=l.$implicit,n=f(2);m(2),s("value",e),m(2),S(e.outlet),m(2),s("href",n.authService.getTenantExternalURL()+"/menu/Adjustment/Adjustment/Archive/Info?ID="+e.id,O),m(),k(" ",e.number," "),m(2),S(R(10,12,e.date,"d MMM y")),m(3),S($(13,15,e.quantitySUM)),m(3),S(e.type),m(2),S(e.state),m(2),s("innerHTML",e.note,G),m(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Le(t,l){if(t&1&&p(0),t&2){let e=f(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function We(t,l){t&1&&(a(0,"tr")(1,"td",23)(2,"span"),p(3,"No records found."),r()()())}function Ke(t,l){if(t&1){let e=j();a(0,"p-panel")(1,"p-table",11),T("onRowSelect",function(i){h(e);let o=f();return x(o.onRowSelect(i))})("onRowUnselect",function(i){h(e);let o=f();return x(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){h(e);let o=f();return x(o.onHeaderCheckboxToggle(i))})("onPage",function(i){h(e);let o=f();return x(o.onPageChange(i))}),g(2,Oe,18,0,"ng-template",null,3,C)(4,Ue,22,17,"ng-template",null,4,C)(6,Le,1,3,"ng-template",null,5,C)(8,We,4,0,"ng-template",null,6,C),r()()}if(t&2){let e=f();m(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function qe(t,l){if(t&1&&(a(0,"span",33),p(1),I(2,"truncate"),r()),t&2){let e=l.$implicit;s("pTooltip",e.name),m(),k(" ",R(2,2,e.name,30)," ")}}function Qe(t,l){if(t&1&&(a(0,"div")(1,"span",35),p(2),r()()),t&2){let e=l.$implicit;m(2),S(e)}}function $e(t,l){if(t&1&&(a(0,"div"),g(1,Qe,3,1,"div",34),r()),t&2){let e=f(2);m(),s("ngForOf",e.getErrors("from"))}}function Xe(t,l){if(t&1&&(a(0,"div")(1,"span",35),p(2),r()()),t&2){let e=l.$implicit;m(2),S(e)}}function Ye(t,l){if(t&1&&(a(0,"div"),g(1,Xe,3,1,"div",34),r()),t&2){let e=f(2);m(),s("ngForOf",e.getErrors("to"))}}function Ze(t,l){if(t&1&&(a(0,"div")(1,"span",35),p(2),r()()),t&2){let e=l.$implicit;m(2),S(e)}}function et(t,l){if(t&1&&(a(0,"div"),g(1,Ze,3,1,"div",34),r()),t&2){let e=f(2);m(),s("ngForOf",e.getErrors("pageSize"))}}function tt(t,l){if(t&1&&(a(0,"form",24)(1,"div",25)(2,"label",26),p(3,"Tag"),r(),a(4,"p-select",27),g(5,qe,3,5,"ng-template",null,7,C),r()(),a(7,"div",25)(8,"label",26),p(9,"From - To"),r(),a(10,"div",28),b(11,"p-datepicker",29),g(12,$e,2,1,"div",30),b(13,"p-datepicker",31),g(14,Ye,2,1,"div",30),r()(),a(15,"div",25)(16,"label",26),p(17,"Page Size"),r(),b(18,"input",32),g(19,et,2,1,"div",30),r()()),t&2){let e=f();s("formGroup",e.form),m(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(7),s("iconDisplay","input")("showIcon",!0)("ngClass",E(13,H,e.isInvalid("from"))),m(),s("ngIf",e.isInvalid("from")),m(),s("iconDisplay","input")("showIcon",!0)("ngClass",E(15,H,e.isInvalid("to"))),m(),s("ngIf",e.isInvalid("to")),m(4),s("ngClass",E(17,H,e.isInvalid("pageSize"))),m(),s("ngIf",e.isInvalid("pageSize"))}}var Bt=(()=>{class t extends Re{constructor(){super(),this.store=v(z),this.generateJournalService=v(A),this.authService=v(ne),this.isDialogFilterVisible=D(!1),this.isInitDialogFilterVisible=D(!1),this.fb=v(se),this.dayjsService=v(Ne)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:n,to:i,pageNumber:o,pageSize:u,export:_,exportPageNumber:Pe,exportPageSize:ze}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(""),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(o),pageSize:this.fb.control(u),export:this.fb.control(_),exportPageNumber:this.fb.control(Pe),exportPageSize:this.fb.control(ze)})}onSearch(e){this.store.updateFilter(c(d({},this.store.filter()),{number:e,pageNumber:1}))}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((n,[i,o])=>{switch(i){case"from":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;case"to":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;default:n[i]=o===null?"":o;break}return n},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let n=e.first/e.rows;this.store.updateFilter(c(d({},this.store.filter()),{pageNumber:n+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).pipe(B(()=>this.store.getAdjustmentJournal(this.store.filter))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-adjustment-journal"]],features:[Q([z]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Adjustment",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","14rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Tag",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(n,i){if(n&1){let o=j();a(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(_){return h(o),N(i.isDialogFilterVisible,_)||(i.isDialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(o),N(i.isInitDialogFilterVisible,_)||(i.isInitDialogFilterVisible=_),x(_)}),T("filterConfirmed",function(){return h(o),x(i.onFilterOKEvent())})("search",function(_){return h(o),x(i.onSearch(_))}),g(1,Ge,1,1,"ng-template",null,0,C)(3,Ke,10,5,"ng-template",null,1,C)(5,tt,20,19,"ng-template",null,2,C),r()}n&2&&(s("isSearchableInput",!0)("isFilterable",!0),K("isDialogFilterVisible",i.isDialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Te,ke,Ve,Je,De,ie,X,Y,Z,te,ee,he,ge,_e,fe,Ie,Ee,Fe,Ae,de,le,oe,re,ae,me,pe,ce,ue,Se,be,xe,Me],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Bt as AdjustmentJournalComponent};
package/chunk-Q4KG7LH6.js DELETED
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-5DRALZZF.js";import{A as n}from"./chunk-ZK43JB4A.js";import{ca as a,ia as i}from"./chunk-6QJHEOXN.js";var d=(()=>{class e{constructor(){this.httpService=i(o)}journalTagList({pageNumber:t,pageSize:r}={}){let u={params:new n().set("pageNumber",t).set("pageSize",r)};return this.httpService.get(void 0,"/api/journalTag/list",u)}journalTagCreate(t){return this.httpService.post(void 0,"/api/journalTag",t)}journalTagGet(t){return this.httpService.get(void 0,`/api/journalTag?ID=${t}`)}journalTagUpdate(t,r){return this.httpService.put(void 0,`/api/journalTag?ID=${r}`,t)}journalTagDelete(t){return this.httpService.delete(void 0,`/api/journaltag?ID=${t}`)}journalTagInfo(t){return this.httpService.get(void 0,`/api/journaltag?ID=${t}`)}journalTagMigrate(){return this.httpService.post(void 0,"/api/JournalTag/migrate",{})}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{d as a};