dealposbooks 1.9.5 → 1.9.6-p
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +35 -35
- package/assets/scss/layouts/_sidebar.scss +2 -2
- package/assets/scss/style.scss +1 -1
- package/assets/scss/variables/_variables.scss +1 -1
- package/chunk-27SWEVDU.js +1 -0
- package/chunk-2DV653RD.js +1 -0
- package/chunk-2OECREUZ.js +1 -0
- package/{chunk-ANMMOPX7.js → chunk-32BR7AQL.js} +1 -1
- package/chunk-34XRAZFC.js +1 -0
- package/{chunk-2JCKXI2B.js → chunk-35CWG2OK.js} +1 -1
- package/{chunk-HAZ5H5ZV.js → chunk-35KDUCM3.js} +1 -1
- package/chunk-3G3QSUWH.js +1 -0
- package/{chunk-4LFQJHJZ.js → chunk-3HW557B7.js} +1 -1
- package/{chunk-HJPAXVNY.js → chunk-3L7IWFXM.js} +1 -1
- package/{chunk-7GHU4UQ7.js → chunk-3WB76KQC.js} +1 -1
- package/{chunk-JGSRMMYX.js → chunk-43WCLYRX.js} +1 -1
- package/{chunk-6NDJPEK4.js → chunk-46TNY5N4.js} +1 -1
- package/chunk-4KXSM3HP.js +1 -0
- package/chunk-4QKRWFW4.js +1 -0
- package/{chunk-4WYSO23S.js → chunk-54OPMMIM.js} +1 -1
- package/chunk-6HQX2SM2.js +1 -0
- package/{chunk-7UBLUR5O.js → chunk-6TA77CRR.js} +1 -1
- package/{chunk-4GL5YTWS.js → chunk-6ZZARVQO.js} +1 -1
- package/{chunk-RZRT24L6.js → chunk-AKMHO3LC.js} +1 -1
- package/{chunk-VG23QNZF.js → chunk-AOSPVPK7.js} +1 -1
- package/chunk-BNI5KUDE.js +193 -0
- package/chunk-BX3CRF44.js +1 -0
- package/{chunk-XLUCH64S.js → chunk-C4LZX33Q.js} +2 -2
- package/{chunk-HI7JDHS3.js → chunk-C5GEP4MM.js} +1 -1
- package/chunk-C7UZ6ZYF.js +1 -0
- package/{chunk-CVMP55UZ.js → chunk-CSMMP7XG.js} +1 -1
- package/chunk-CTCQB63H.js +1 -0
- package/chunk-DNK2GUDB.js +1 -0
- package/{chunk-5ROVFZR4.js → chunk-DOM7WYRM.js} +1 -1
- package/{chunk-IPUUBC74.js → chunk-ELWFWCNU.js} +2 -2
- package/{chunk-YLHU3GDJ.js → chunk-EXVUABTO.js} +1 -1
- package/{chunk-Q7ITPAXT.js → chunk-G6FJQBZZ.js} +1 -1
- package/chunk-GJXWL5XV.js +1 -0
- package/chunk-GNP7WGSH.js +1 -0
- package/chunk-GTGRV7IH.js +1 -0
- package/{chunk-RVTAI3J3.js → chunk-HFFH2WIX.js} +1 -1
- package/chunk-HRPP75N7.js +1 -0
- package/{chunk-PSDZXCOR.js → chunk-HRQJ5DXP.js} +1 -1
- package/chunk-J77A3DFB.js +1 -0
- package/chunk-JDW35ZB5.js +47 -0
- package/{chunk-AZM2EGTF.js → chunk-JMLETF7Y.js} +1 -1
- package/chunk-JYNZPVLW.js +1 -0
- package/chunk-K6753MGR.js +7 -0
- package/chunk-LD4G6ND6.js +130 -0
- package/{chunk-JHCHHBCW.js → chunk-LKZL77YR.js} +1 -1
- package/{chunk-P5ZPLAYA.js → chunk-LR2DJRRL.js} +1 -1
- package/{chunk-P36L53XK.js → chunk-LTZA6IIO.js} +1 -1
- package/chunk-M7MFX6BW.js +1 -0
- package/chunk-MCDQ2TIS.js +1 -0
- package/chunk-MJVSTWYY.js +1 -0
- package/{chunk-FBUI4SQJ.js → chunk-N2RYBZK7.js} +1 -1
- package/{chunk-O2G255P4.js → chunk-N6JCA3CN.js} +2 -2
- package/{chunk-LYDUVWPM.js → chunk-NF3TF3LT.js} +1 -1
- package/chunk-OEJBOFI5.js +1 -0
- package/{chunk-IPKPBYSN.js → chunk-OEOAUJY5.js} +6 -6
- package/{chunk-I7YFUZI7.js → chunk-OVCTOPAO.js} +1 -1
- package/{chunk-MP7S52YU.js → chunk-OZACNHDP.js} +1 -1
- package/{chunk-CVMIZKGH.js → chunk-P6CJ2ONT.js} +1 -1
- package/{chunk-ONPJXDDI.js → chunk-QPKNYNLC.js} +2 -2
- package/{chunk-6JZPAN4G.js → chunk-RBDJZRHY.js} +1 -1
- package/{chunk-4B5RFKWI.js → chunk-RT5PUZ5F.js} +1 -1
- package/{chunk-JQZRKOKE.js → chunk-TC43COAE.js} +1 -1
- package/{chunk-OSFKXKXD.js → chunk-TFV5QZKR.js} +1 -1
- package/{chunk-DAV2SMOY.js → chunk-TK3G2BVM.js} +1 -1
- package/{chunk-VUPF5YJY.js → chunk-TQZNJ5WF.js} +1 -1
- package/chunk-UEOO2LYA.js +82 -0
- package/chunk-WEWEITR7.js +1 -0
- package/{chunk-FFODCTQC.js → chunk-WGZN6AN2.js} +1 -1
- package/chunk-WZO2ZLBL.js +1 -0
- package/chunk-X34Y3TVX.js +1 -0
- package/chunk-XFSZDZPJ.js +1 -0
- package/{chunk-OVIHA23Z.js → chunk-XKEV5AED.js} +1 -1
- package/chunk-XZGFG6E3.js +1 -0
- package/{chunk-TCF45ELT.js → chunk-YOEPO6LK.js} +1 -1
- package/index.html +2 -2
- package/{main-EJEYMG7N.js → main-U5PC2W2C.js} +1 -1
- package/package.json +1 -1
- package/styles-GTUKYMN7.css +1 -0
- package/chunk-3HN62WAN.js +0 -1
- package/chunk-5RUWTN5X.js +0 -1
- package/chunk-6OAGE44Z.js +0 -7
- package/chunk-7XDZM4MJ.js +0 -1
- package/chunk-AF77PUJO.js +0 -1
- package/chunk-ALX7UOMP.js +0 -193
- package/chunk-ANG5YF2J.js +0 -47
- package/chunk-ARESU6CY.js +0 -1
- package/chunk-CZMTQ4XK.js +0 -1
- package/chunk-DC5OTEZ6.js +0 -1
- package/chunk-F2FW6UDP.js +0 -1
- package/chunk-FIQFBEQK.js +0 -1
- package/chunk-FYQCFDW7.js +0 -1
- package/chunk-G2APSUOI.js +0 -1
- package/chunk-IL7RZKFX.js +0 -1
- package/chunk-IZ2XPL4O.js +0 -1
- package/chunk-MFMEPXFQ.js +0 -1
- package/chunk-NXCQN45H.js +0 -1
- package/chunk-PQTUFQME.js +0 -129
- package/chunk-RIOZSND3.js +0 -1
- package/chunk-SJ5TWHWM.js +0 -1
- package/chunk-TYHNOILY.js +0 -1
- package/chunk-VEUXDYYI.js +0 -1
- package/chunk-VXSF6SQF.js +0 -1
- package/chunk-WSVAXPZZ.js +0 -82
- package/chunk-X3PB5IV5.js +0 -1
- package/chunk-YDBJGTTB.js +0 -1
- package/styles-AU7PIISM.css +0 -1
package/chunk-TYHNOILY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Je}from"./chunk-G4XX7EU2.js";import{a as qe,b as Qe,c as Xe,d as Ze,e as et,f as tt}from"./chunk-5ROVFZR4.js";import{a as Z,b as re}from"./chunk-JHCHHBCW.js";import{a as ze,b as Ye}from"./chunk-JP3F2QND.js";import{d as ee,e as Ke,i as ve,j as ye,k as te}from"./chunk-OSFKXKXD.js";import"./chunk-7GHU4UQ7.js";import"./chunk-P36L53XK.js";import{a as Ie}from"./chunk-B7JILYJO.js";import"./chunk-RVTAI3J3.js";import{a as Y,b as K}from"./chunk-DAV2SMOY.js";import"./chunk-P5ZPLAYA.js";import"./chunk-CVMP55UZ.js";import"./chunk-7UBLUR5O.js";import"./chunk-AZM2EGTF.js";import"./chunk-HI7JDHS3.js";import"./chunk-JQZRKOKE.js";import{c as H,d as W}from"./chunk-ANG5YF2J.js";import{a as Se,b as z}from"./chunk-4GL5YTWS.js";import{h as R}from"./chunk-2JCKXI2B.js";import"./chunk-YLHU3GDJ.js";import{a as ce,b as Ve,c as $e,d as We,e as Ue,f as je,g as He}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{o as Be,w as B,x as V}from"./chunk-TCF45ELT.js";import"./chunk-ZWHB7NI7.js";import{e as j,f as de,j as ae,k as fe,m as _e,n as ge,o as Ne,p as xe,w as he,y as X,z as Ce}from"./chunk-ALX7UOMP.js";import{a as ue}from"./chunk-HAZ5H5ZV.js";import"./chunk-4LFQJHJZ.js";import"./chunk-F2X3VGZZ.js";import{C as ie,E as Ge,F as N,M as A,f as k,j as Le,m as D}from"./chunk-BYD3JK4R.js";import{Cb as f,Ga as O,Ic as ke,Jc as Ae,Kb as s,Lc as u,Nb as T,Pb as De,Qb as v,Sb as y,Tb as b,Ub as i,Vb as o,Wb as $,X as Q,Xc as me,Z as E,_b as M,ba as se,bb as we,c as Me,dc as w,ec as c,gb as p,ha as h,pa as C,pc as l,qa as S,qc as d,rc as P,s as q,wb as F,xc as Re,yc as I,zc as oe}from"./chunk-YVEUYFCE.js";import{a as g,b as x}from"./chunk-YQFG5XE2.js";var L=(()=>{class t{constructor(){this.httpService=h(ue)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration")}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(){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration")}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=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var G=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}(G||{});var nt={[G.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"}],[G.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"}],[G.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[G.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[G.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:27,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[G.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[G.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[G.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[G.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function ft(t,r){if(t&1){let e=M();i(0,"div",5)(1,"p-button",6),w("onClick",function(){C(e);let a=c();return S(a.onSubmit())}),o()()}}function _t(t,r){if(t&1&&(i(0,"p-tab",10),l(1),o()),t&2){let e=r.$implicit;s("value",e.value),p(),d(e.label)}}function gt(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function xt(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function ht(t,r){if(t&1&&(i(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),l(4),o(),i(5,"span",17),l(6),o()(),i(7,"p-select",18),f(8,gt,7,2,"ng-template",null,2,u)(10,xt,7,2,"ng-template",null,3,u),o()()()),t&2){let e=r.$implicit,n=c(4);s("formGroupName",e.index),p(4),d(e.entry.value.label),p(2),d(e.entry.value.side),p(),s("options",n.posIntegration().options.accounts)}}function Ct(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function St(t,r){if(t&1&&(i(0,"div",19)(1,"div")(2,"span"),l(3),o()(),i(4,"div")(5,"span"),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function vt(t,r){if(t&1&&(i(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),l(4),o(),i(5,"span",20),l(6),o()(),i(7,"p-select",18),f(8,Ct,7,2,"ng-template",null,2,u)(10,St,7,2,"ng-template",null,3,u),o()()()),t&2){let e=r.$implicit,n=c(4);s("formGroupName",e.index),p(4),d(e.entry.value.label),p(2),d(e.entry.value.side),p(),s("options",n.posIntegration().options.accounts)}}function yt(t,r){if(t&1&&(i(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),y(4,ht,12,4,"div",14,v),o()(),i(6,"div",12)(7,"div",13),y(8,vt,12,4,"div",14,v),o()()()()),t&2){let e=r.$implicit,n=c(3);s("value",e.value),p(),s("formGroupName",e.value),p(3),b(n.getDebitEntries(e.value)),p(4),b(n.getCreditEntries(e.value))}}function bt(t,r){if(t&1){let e=M();i(0,"form",8),w("ngSubmit",function(){C(e);let a=c(2);return S(a.onSubmit())}),i(1,"p-tabs",9)(2,"p-tablist"),y(3,_t,2,2,"p-tab",10,v),o(),i(5,"p-tabpanels"),y(6,yt,10,2,"p-tabpanel",10,v),o()()()}if(t&2){let e=c(2);s("formGroup",e.accountForm),p(),s("value",e.tab())("lazy",!0),p(2),b(e.tabs()),p(3),b(e.tabs())}}function Pt(t,r){if(t&1&&f(0,bt,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration()&&e.accountForm)}}var ot=(()=>{class t{constructor(){this.posConfigService=h(L),this.fb=h(he),this.tab=O(G.POSGLOBAL_SELL),this.tabs=O(Object.values(G).map(e=>({label:e,value:e}))),this.posIntegration=O(null),this.form=O([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=G}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(E(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 a=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,a),e[n.value]=this.fb.array(a.map(m=>this.createEntryFormGroup(m)))}),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(a=>{this.syncAccountIDs(e.typeID,a,n)}),n}getAccountIDByTypeID(e){return this.form().find(a=>a.typeID===e)?.accountID||""}getEntriesForTab(e){return nt[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],a=new Set;for(let m of Object.values(e))for(let{typeID:_,accountID:U}of m){let Te=`${_}_${U}`;a.has(Te)||(a.add(Te),n.push({typeID:_,accountID:U||Je}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:m=>console.error("Save failed",m)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,a)=>({entry:n,index:a})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,a)=>({entry:n,index:a})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,a){Object.values(this.accountForm.controls).forEach(m=>{m.controls.forEach(_=>{_!==a&&_.get("typeID")?.value===e&&_.get("accountID")?.value!==n&&_.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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,a){n&1&&(i(0,"app-main-panel",4),f(1,ft,2,0,"ng-template",null,0,u)(3,Pt,1,1,"ng-template",null,1,u),o())},dependencies:[R,tt,et,Ze,Xe,qe,Qe,Be,K,Y,X,fe,j,de,D,k,A,V,B,Ce,_e,xe,ge],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ot=t=>[t];function It(t,r){if(t&1&&(i(0,"th",8),l(1),o()),t&2){let e=r.$implicit;p(),d(e.name.slice(0,10))}}function Et(t,r){if(t&1&&(i(0,"tr")(1,"th",6),l(2,"Method"),o(),i(3,"th",7),l(4,"Outlet"),o()(),i(5,"tr"),y(6,It,2,1,"th",8,v),o()),t&2){let e=c(3);p(3),s("colSpan",e.paymentConfiguration().outlets.length),p(3),b(e.paymentConfiguration().outlets)}}function Ft(t,r){if(t&1&&(i(0,"td"),l(1),o()),t&2){let e=r.$implicit;p(),d(e.accountName)}}function Tt(t,r){if(t&1&&(i(0,"tr")(1,"td",9)(2,"a",10),l(3),o()(),y(4,Ft,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,Ot,e.id)),p(),d(e.name),p(),b(e.accounts)}}function Mt(t,r){if(t&1&&(i(0,"p-table",5),f(1,Et,8,1,"ng-template",null,1,u)(3,Tt,6,4,"ng-template",null,2,u),o()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function wt(t,r){t&1&&(i(0,"app-main-panel",4),f(1,Mt,5,3,"ng-template",null,0,u),o())}var it=(()=>{class t{constructor(){this.POSSetupService=h(L),this.paymentConfiguration=O(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration().pipe(E(e=>{this.paymentConfiguration.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",4,"ngIf"],["pageTitle","Payment Method Accounting"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[3,"colSpan"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,a){n&1&&f(0,wt,3,0,"app-main-panel",3),n&2&&s("ngIf",a.paymentConfiguration())},dependencies:[R,te,ee,Ke,D,k,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Dt=()=>({height:"calc(100vh - 70px)"}),Rt=t=>[t];function kt(t,r){if(t&1&&(i(0,"th"),l(1),o()),t&2){let e=r.$implicit;p(),d(e.value)}}function At(t,r){if(t&1&&(i(0,"tr")(1,"th"),l(2,"Name"),o(),y(3,kt,2,1,"th",null,v),o()),t&2){let e=c(3);p(3),b(e.outletList().listCOAType)}}function Lt(t,r){if(t&1&&(i(0,"td"),l(1),o()),t&2){let e=r.$implicit;p(),d(e)}}function Gt(t,r){if(t&1&&(i(0,"tr")(1,"td")(2,"a",6),l(3),o()(),y(4,Lt,2,1,"td",null,v),o()),t&2){let e=r.$implicit;p(2),s("routerLink",oe(2,Rt,e.OutletID)),p(),P(" ",e.OutletName,""),p(),b(e.Accounts)}}function Nt(t,r){if(t&1&&(i(0,"p-panel")(1,"p-table",5),f(2,At,5,0,"ng-template",null,1,u)(4,Gt,6,4,"ng-template",null,2,u),o()()),t&2){let e=c(2);T(I(5,Dt)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.outletList().listOutletAccount)}}function Bt(t,r){if(t&1&&f(0,Nt,6,6,"p-panel",4),t&2){let e=c();s("ngIf",e.outletList())}}var at=(()=>{class t{constructor(){this.POSSetupService=h(L),this.outletList=O(null)}ngOnInit(){this.POSSetupService.fetchPOSOutletConfiguration().pipe(E(e=>{this.outletList.set(e)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-outlet"]],decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["pageTitle","Outlet Account"],[3,"style",4,"ngIf"],[3,"scrollable","scrollHeight","value"],[1,"link","link-primary",3,"routerLink"]],template:function(n,a){n&1&&(i(0,"app-main-panel",3),f(1,Bt,1,1,"ng-template",null,0,u),o())},dependencies:[R,D,k,z,te,ee,A,N,W,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Vt=()=>({height:"calc(100vh - 100px)"}),$t=()=>({height:"calc(100vh - 150px)"});function Wt(t,r){if(t&1){let e=M();i(0,"a",5),l(1,"Cancel"),o(),i(2,"p-button",6),w("onClick",function(){C(e);let a=c();return S(a.updatePOsOutletConfiguration())}),o()}}function Ut(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",17)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function jt(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",18)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function Ht(t,r){if(t&1&&(i(0,"div",12)(1,"span",14),l(2),o(),i(3,"p-select",15),f(4,Ut,7,2,"ng-template",null,2,u)(6,jt,7,2,"ng-template",null,3,u),o()()),t&2){let e,n=r.$implicit,a=r.$index,m=c(3);s("formGroupName",a),p(2),d((e=n.get("TypeName"))==null?null:e.value),p(),s("options",m.options.accounts)}}function zt(t,r){t&1&&$(0,"hr")}function Yt(t,r){if(t&1&&(i(0,"div",9)(1,"h3",10),l(2),ke(3,"titlecase"),o(),i(4,"div",11),y(5,Ht,8,3,"div",12,v),o()(),f(7,zt,1,0,"hr",13)),t&2){let e,n=r.$implicit,a=r.$index,m=r.$index,_=r.$count,U=c(2);s("formGroupName",a),p(2),P(" ",Ae(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),b(U.getAccountsFormArray(m).controls),p(2),s("ngIf",m!==_-1)}}function Kt(t,r){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),y(4,Yt,8,5,null,null,v),o()()()()),t&2){let e=c();T(I(5,Vt)),p(),T(I(6,$t)),p(),s("formGroup",e.accountsForm),p(2),b(e.accountGroupsArray.controls)}}var rt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(L),this.outletForm=O(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2],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(he)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),E(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(a=>{a.accounts=this.allAccounts.filter(m=>a.typeIds.includes(m.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(a=>{n.push(this.createAccountGroupControl(a))})})).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(a=>a.accounts.map(m=>({AccountID:m.AccountID,TypeID:m.TypeID,TypeName:m.TypeName,OutletID:m.OutletID,OutletName:m.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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,a){n&1&&(i(0,"app-main-panel",4),f(1,Wt,3,0,"ng-template",null,0,u)(3,Kt,6,7,"ng-template",null,1,u),o()),n&2&&s("pageTitle","Edit "+a.outletName)("hasMainWrapperPadding",!0)},dependencies:[R,D,k,Le,z,Ce,fe,j,de,_e,xe,ge,Ne,K,Y,W,H,Z,V,B,A,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var qt=()=>({height:"calc(100vh - 100px)"}),Qt=()=>({width:"100%",height:"calc(100vh - 150px)"}),Xt=()=>({width:"100%"});function Zt(t,r){if(t&1){let e=M();i(0,"a",6),l(1,"Cancel"),o(),i(2,"p-button",7),w("onClick",function(){C(e);let a=c(3);return S(a.updatePOSOutletConfiguration())}),o()}}function en(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",17)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function tn(t,r){if(t&1&&(i(0,"div",16)(1,"div",17)(2,"span"),l(3),o()(),i(4,"div",18)(5,"span",17),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function nn(t,r){if(t&1){let e=M();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),l(4),o()(),$(5,"div",13),i(6,"div",14)(7,"p-select",15),w("ngModelChange",function(a){let m=C(e).$index,_=c(4);return S(_.updateAccountById(a,m))}),f(8,en,7,2,"ng-template",null,2,u)(10,tn,7,2,"ng-template",null,3,u),o()()()()}if(t&2){let e=r.$implicit,n=r.$index,a=c(4);p(4),d(e.outletName.slice(0,15)),p(3),T(I(7,Xt)),s("ngModel",a.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",a.paymentForm().options.chartOfAccount)}}function on(t,r){if(t&1&&(i(0,"p-card")(1,"p-scrollpanel")(2,"div",8),y(3,nn,12,8,"div",9,v),o()()()),t&2){let e=c(3);T(I(4,qt)),p(),T(I(5,Qt)),p(2),b(e.paymentForm().form.accounts)}}function an(t,r){if(t&1&&(i(0,"app-main-panel",4),f(1,Zt,3,0,"ng-template",null,0,u)(3,on,5,6,"ng-template",null,1,u),o()),t&2){let e=c(2);s("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function rn(t,r){if(t&1&&f(0,an,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var lt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(L),this.paymentForm=O(null),this.router=h(Ge)}ngOnInit(){this.route.paramMap.pipe(q(e=>+e.get("id")),Q(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),E(e=>{this.paymentForm.set(e)}),Ie("response")).subscribe()}updateAccountById(e,n){let a=this.paymentForm().form.accounts,m=x(g({},this.paymentForm()),{form:x(g({},this.paymentForm().form),{accounts:a.map((_,U)=>U===n?x(g({},_),{accountID:e}):_)})});this.paymentForm.set(m)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ie("response"),E(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({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,a){n&1&&f(0,rn,1,1,"app-main-panel",4),n&2&&De(a.paymentForm()?0:-1)},dependencies:[z,Se,R,D,k,re,Z,K,Y,X,j,ae,A,N,V,B,W],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var pn=()=>({height:"calc(100vh - 70px)"}),ln=()=>({width:"100%",height:"calc(100vh - 100px)"});function mn(t,r){if(t&1){let e=M();i(0,"div",5)(1,"a",6),l(2,"Cancel"),o(),i(3,"p-button",7),w("onClick",function(){C(e);let a=c();return S(a.updatePOSTaxConfiguration())}),o()()}}function cn(t,r){if(t&1&&(i(0,"div",5)(1,"div",15)(2,"span"),l(3),o()(),i(4,"div",15)(5,"span",15),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function sn(t,r){if(t&1&&(i(0,"div",5)(1,"div",15)(2,"span"),l(3),o()(),i(4,"div",16)(5,"span",15),l(6),o()()()),t&2){let e=r.$implicit;p(3),P("(",e.code,")"),p(3),d(e.name)}}function un(t,r){if(t&1){let e=M();i(0,"div",11)(1,"div",12)(2,"label",13),l(3),o(),i(4,"p-select",14),w("ngModelChange",function(a){let m=C(e).$index,_=c(2);return S(_.updateAccountID(a,m))}),f(5,cn,7,2,"ng-template",null,2,u)(7,sn,7,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=r.$index,a=c(2);p(3),d(e.name),p(),s("options",a.taxForm().options.chartOfAccount)("ngModel",a.taxForm().form[n].accountID)}}function dn(t,r){if(t&1&&(i(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),y(5,un,9,3,"div",11,v),o()()()()()),t&2){let e=c();T(I(4,pn)),p(),T(I(5,ln)),p(4),b(e.taxForm().form)}}var mt=(()=>{class t{constructor(){this.POSSetupService=h(L),this.taxForm=O(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(E(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let a=this.taxForm().form,m=x(g({},this.taxForm()),{form:a.map((_,U)=>U===n?x(g({},_),{accountID:e}):_)});this.taxForm.set(m)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(E(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-tax"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup"],[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,a){n&1&&(i(0,"app-main-panel",4),f(1,mn,4,0,"ng-template",null,0,u)(3,dn,7,6,"ng-template",null,1,u),o())},dependencies:[R,z,D,K,Y,re,Z,X,j,ae,A,N,V,B,W,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var fn=()=>({height:"calc(100vh - 70px)"}),_n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,r){t&1&&$(0,"p-button",6)}function hn(t,r){if(t&1&&f(0,xn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Cn(t,r){t&1&&(i(0,"tr")(1,"th",8),$(2,"p-tableHeaderCheckbox"),o(),i(3,"th"),l(4,"Name"),o(),i(5,"th"),l(6,"Description"),o()())}function Sn(t,r){if(t&1&&(i(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),o(),i(3,"td")(4,"a",10),l(5),o()(),i(6,"td"),l(7),o()()),t&2){let e,n=r.$implicit;p(2),s("value",n),p(2),s("routerLink",oe(4,gn,n.id)),p(),d(n.name),p(2),d((e=n.description)!==null&&e!==void 0?e:"N/A")}}function vn(t,r){if(t&1){let e=M();i(0,"p-panel")(1,"p-table",7),w("onRowSelect",function(a){C(e);let m=c();return S(m.onRowSelect(a))})("onRowUnselect",function(a){C(e);let m=c();return S(m.onRowSelect(a))})("onHeaderCheckboxToggle",function(a){C(e);let m=c();return S(m.onSelectAll(a))}),f(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(4,fn)),p(),s("value",e.writeoffList().data)("tableStyle",I(5,_n))}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(L),this.writeoffList=O(null),this.hasCheckedItems=me(()=>{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(q(e=>x(g({},e),{data:e.data.map(n=>x(g({},n),{checked:!1}))})),E(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let a=n.data.findIndex(m=>m.id===e.data.id);if(a!==-1){let m=[...n.data];m[a]=x(g({},m[a]),{checked:!m[a].checked}),this.writeoffList.set(x(g({},n),{data:m}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let a=n.data.map(m=>x(g({},m),{checked:e.checked}));this.writeoffList.set(x(g({},n),{data:a}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off"],["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","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,a){n&1&&(i(0,"app-main-panel",4),f(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,6,"ng-template",null,1,u),o())},dependencies:[R,D,k,te,ee,ve,ye,A,N,V,B,W,H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function bn(t,r){if(t&1){let e=M();i(0,"div",6)(1,"a",7),l(2,"Cancel"),o(),i(3,"p-button",8),w("onClick",function(){C(e);let a=c(2);return S(a.updateWriteOffConfiguration())}),o()()}}function Pn(t,r){if(t&1&&(i(0,"div",6)(1,"span",16),l(2),o(),i(3,"span",16),l(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),d(e.name)}}function On(t,r){if(t&1&&(i(0,"div",6)(1,"span",16),l(2),o(),i(3,"span",16),l(4),o()()),t&2){let e=r.$implicit;p(2),P("(",e.code,")"),p(2),d(e.name)}}function In(t,r){if(t&1){let e=M();i(0,"div",12)(1,"div",13)(2,"label",14),l(3),o(),i(4,"p-select",15),w("ngModelChange",function(a){let m=C(e).$index,_=c(3);return S(_.updateAccountById(a,m))}),f(5,Pn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),o()()()}if(t&2){let e=r.$implicit,n=c(3);p(3),d(e.name),p(),s("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,r){if(t&1&&(i(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),y(5,In,9,5,"div",12,v),o()()()()()),t&2){let e=c(2);p(),T(I(2,yn)),p(4),b(e.writeOffForm().form)}}function Fn(t,r){if(t&1&&(i(0,"app-main-panel",5),f(1,bn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),o()),t&2){let e=c();s("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var st=(()=>{class t{constructor(){this.POSSetupService=h(L),this.route=h(ie),this.writeOffForm=O(null)}ngOnInit(){this.route.paramMap.pipe(q(e=>e.get("id")),Q(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),E(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let a=this.writeOffForm().form,m=x(g({},this.writeOffForm()),{form:a.map((_,U)=>U===n?x(g({},_),{accountID:e}):_)});this.writeOffForm.set(m)}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=F({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,a){n&1&&f(0,Fn,5,2,"app-main-panel",4),n&2&&s("ngIf",a.writeOffForm())},dependencies:[R,D,k,z,Se,re,Z,K,Y,X,j,ae,A,N,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ut=(()=>{class t{constructor(){this.httpService=h(ue)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Tn={data:{expenseOptions:[]}},Fe=Ve(je(Tn),He("POSExpenseOptionStore"),$e(t=>({hasCheckedRows:me(()=>t.data().expenseOptions.some(r=>r.checked)),checkedInvoice:me(()=>t.data().expenseOptions.filter(r=>r.checked).map(r=>r.id))})),Ue(t=>{let r=h(ut);return{onRowSelect(n){ce(t,a=>{let m=a.data.expenseOptions.map(_=>_.id===n.id?x(g({},_),{checked:!0}):_);return x(g({},a),{data:x(g({},a.data),{expenseOptions:m})})})},onRowUnselect(n){ce(t,a=>{let m=a.data.expenseOptions.map(_=>_.id===n.id?x(g({},_),{checked:!1}):_);return x(g({},a),{data:x(g({},a.data),{expenseOptions:m})})})},onHeaderCheckboxToggle(n){ce(t,a=>{let m=a.data.expenseOptions.map(_=>x(g({},_),{checked:n}));return x(g({},a),{data:x(g({},a.data),{expenseOptions:m})})})},getExpenseOptions:ze(Me(Q(()=>r.getExpenseOptions().pipe(Ye({next:n=>{ce(t,a=>x(g({},a),{data:x(g({},a.data),{expenseOptions:n.expenseOptions.map(m=>x(g({},m),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),We({onInit:t=>{t.getExpenseOptions()}}));var Mn=()=>({height:"calc(100vh - 70px)"});function wn(t,r){t&1&&$(0,"p-button",6)}function Dn(t,r){if(t&1&&f(0,wn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function Rn(t,r){t&1&&(i(0,"tr")(1,"th",8),$(2,"p-tableHeaderCheckbox"),o(),i(3,"th"),l(4,"Name"),o(),i(5,"th"),l(6,"Account"),o(),i(7,"th"),l(8,"Description"),o()())}function kn(t,r){if(t&1&&(i(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),o(),i(3,"td"),l(4),o(),i(5,"td"),l(6),o(),i(7,"td"),$(8,"p",10),o()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),d(e.name),p(2),d(e.accountName),p(2),s("innerHTML",e.description,we)}}function An(t,r){if(t&1){let e=M();i(0,"p-panel")(1,"p-table",7),w("onRowSelect",function(a){C(e);let m=c();return S(m.onRowSelect(a))})("onRowUnselect",function(a){C(e);let m=c();return S(m.onRowUnselect(a))})("onHeaderCheckboxToggle",function(a){C(e);let m=c();return S(m.onHeaderCheckboxToggle(a))}),f(2,Rn,9,0,"ng-template",null,2,u)(4,kn,9,4,"ng-template",null,3,u),o()()}if(t&2){let e=c();T(I(3,Mn)),p(),s("value",e.store.data().expenseOptions)}}var dt=(()=>{class t{constructor(){this.store=h(Fe)}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)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=F({type:t,selectors:[["app-pos-expense-option"]],features:[Re([Fe])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Expense Option"],["label","Delete","severity","danger","icon","fa-solid fa-trash",4,"ngIf"],["label","Delete","severity","danger","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value"],[2,"width","4rem"],[3,"value"],[3,"innerHTML"]],template:function(n,a){n&1&&(i(0,"app-main-panel",4),f(1,Dn,1,1,"ng-template",null,0,u)(3,An,6,4,"ng-template",null,1,u),o())},dependencies:[R,te,ee,ve,ye,W,H,V,B,D,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ma=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:ot},{path:"outlets",component:at},{path:"outlets/:id",component:rt},{path:"payments",component:it},{path:"payments/:id",component:lt},{path:"taxs",component:mt},{path:"writeoff",component:ct},{path:"writeoff/:id",component:st},{path:"expense-option",component:dt}]}];export{Ma as POS_SETUP_ROUTES};
|
package/chunk-VEUXDYYI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as xt}from"./chunk-DCKLQNGL.js";import{a as gt,b as ft}from"./chunk-RZRT24L6.js";import{a as Tt,b as ut}from"./chunk-IZ2XPL4O.js";import{a as dt}from"./chunk-PSDZXCOR.js";import{a as oe}from"./chunk-G4XX7EU2.js";import{a as Xe}from"./chunk-CVMIZKGH.js";import{a as ct,b as mt}from"./chunk-ANMMOPX7.js";import"./chunk-VUPF5YJY.js";import"./chunk-MP7S52YU.js";import{a as Ie,b as we}from"./chunk-JHCHHBCW.js";import{a as ie,b as re}from"./chunk-JP3F2QND.js";import{a as at,b as lt,d as Ve,i as pt,j as st,k as Ne}from"./chunk-OSFKXKXD.js";import{a as rt,b as ot}from"./chunk-7GHU4UQ7.js";import"./chunk-P36L53XK.js";import{a as Ae}from"./chunk-B7JILYJO.js";import"./chunk-RVTAI3J3.js";import{a as Me,b as ke}from"./chunk-DAV2SMOY.js";import"./chunk-P5ZPLAYA.js";import"./chunk-CVMP55UZ.js";import"./chunk-7UBLUR5O.js";import"./chunk-AZM2EGTF.js";import"./chunk-HI7JDHS3.js";import"./chunk-JQZRKOKE.js";import{c as N,d as A}from"./chunk-ANG5YF2J.js";import{b as Z}from"./chunk-4GL5YTWS.js";import{f as it,h as L}from"./chunk-2JCKXI2B.js";import"./chunk-YLHU3GDJ.js";import{a as T,b as Te,c as nt,d as Fe,e as De,f as Pe}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{n as ye,o as Re,w as J,x as Q}from"./chunk-TCF45ELT.js";import"./chunk-ZWHB7NI7.js";import{b as he,c as X,e as Y,f as Ee,i as Ye,j as Je,k as ve,l as Qe,m as Ce,p as be,w as Ze,x as et,y as tt,z as Se}from"./chunk-ALX7UOMP.js";import{a as _e}from"./chunk-HAZ5H5ZV.js";import"./chunk-4LFQJHJZ.js";import"./chunk-F2X3VGZZ.js";import{C as fe,E as xe,F as k,M as V,c as Ke,f as P,k as ge,l as K,m as M}from"./chunk-BYD3JK4R.js";import{Ab as $e,Cb as E,Ga as q,Ic as b,J as Ue,Jc as F,Kb as m,Kc as G,Lc as x,Nb as se,Pb as We,Qb as $,Sb as W,Tb as z,Ub as i,Vb as n,Wb as u,X as O,Xc as ne,Z as y,_b as R,ba as pe,c as te,dc as I,ec as g,gb as l,ha as d,pa as v,pc as a,qa as C,qc as _,rc as w,s as H,ta as Ge,tc as ze,uc as ce,vc as me,wa as He,wb as D,wc as ue,xc as de,yc as U,zc as S}from"./chunk-YVEUYFCE.js";import{a as f,b as h,e as wt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=d(_e);#t=d(Xe);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ft={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},filter:{text:null,Frequency:0,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4}},Le=Te(Pe(Ft),nt(t=>({first:ne(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:ne(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:ne(()=>t.data().data.some(c=>c.checked)),checkedInvoice:ne(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),De(t=>{let c=d(B);return{updateFilter(o){T(t,r=>h(f({},r),{filter:f(f({},r.filter),o)}))},onRowSelect(o){T(t,r=>{let s=r.data.data.map(p=>p.id===o.id?h(f({},p),{checked:!0}):p);return h(f({},r),{data:h(f({},r.data),{data:s})})})},onRowUnselect(o){T(t,r=>{let s=r.data.data.map(p=>p.id===o.id?h(f({},p),{checked:!1}):p);return h(f({},r),{data:h(f({},r.data),{data:s})})})},onHeaderCheckboxToggle(o){T(t,r=>{let s=r.data.data.map(p=>h(f({},p),{checked:o}));return h(f({},r),{data:h(f({},r.data),{data:s})})})},getRecurringExpenseLoader:ie(te(O(()=>c.getRecurringExpenseLoader().pipe(re({next:o=>{T(t,r=>h(f({},r),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ie(te(H(o=>Object.entries(o).reduce((r,[s,p])=>(p!=null&&(r[s]=p),r),{})),O(o=>c.getRecurringExpenses(o).pipe(re({next:r=>{T(t,s=>h(f({},s),{data:r}))},error:r=>{console.error("Error fetching Recurring Expenses:",r)}})))))}}),Fe(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var Mt=["class","page"],kt=()=>({height:"calc(100vh - 70px)"}),Vt=t=>["details/",t];function Nt(t,c){if(t&1){let e=R();i(0,"p-button",12),I("onClick",function(){v(e);let r=g(2);return C(r.onDeleteSelected())}),n()}}function At(t,c){if(t&1&&(i(0,"div",8),E(1,Nt,1,0,"p-button",9),i(2,"a",10),u(3,"i",11),i(4,"span"),a(5,"Add"),n()()()),t&2){let e=g();l(),m("ngIf",e.store.hasCheckedRows())}}function Lt(t,c){t&1&&(i(0,"tr")(1,"th"),u(2,"p-tableHeaderCheckbox"),n(),i(3,"th"),a(4,"Outlet"),n(),i(5,"th"),a(6,"Name"),n(),i(7,"th"),a(8,"Expense Account"),n(),i(9,"th"),a(10,"Start Date"),n(),i(11,"th"),a(12,"End Date"),n(),i(13,"th"),a(14,"Last Expense"),n(),i(15,"th"),a(16,"Amount"),n(),i(17,"th"),a(18,"Frequency"),n()())}function Bt(t,c){if(t&1&&(i(0,"tr")(1,"td"),u(2,"p-tableCheckbox",14),n(),i(3,"td"),a(4),n(),i(5,"td")(6,"a",15),a(7),n()(),i(8,"td"),a(9),n(),i(10,"td"),a(11),b(12,"date"),n(),i(13,"td"),a(14),b(15,"date"),n(),i(16,"td"),a(17),b(18,"date"),n(),i(19,"td"),a(20),b(21,"number"),n(),i(22,"td"),a(23),n()()),t&2){let e=c.$implicit;l(2),m("value",e),l(2),_(e.outletName),l(2),m("routerLink",S(21,Vt,e.id)),l(),_(e.name),l(2),_(e.expenseName),l(2),_(G(12,10,e.startDate,"d MMM y")),l(3),_(G(15,13,e.endDate,"d MMM y")),l(3),_(G(18,16,e.lastExpenseDate,"d MMM y")),l(3),_(F(21,19,e.amount)),l(3),_(e.repeatTypeLabel)}}function jt(t,c){if(t&1&&(i(0,"div"),a(1),n()),t&2){let e=g(2);l(),ze(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function Ot(t,c){t&1&&(i(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function qt(t,c){if(t&1){let e=R();i(0,"p-panel")(1,"p-table",13),I("onPage",function(r){v(e);let s=g();return C(s.onPageChange(r))})("onHeaderCheckboxToggle",function(r){v(e);let s=g();return C(s.onHeaderCheckboxToggle(r))})("onRowSelect",function(r){v(e);let s=g();return C(s.onRowSelect(r))})("onRowUnselect",function(r){v(e);let s=g();return C(s.onRowUnselect(r))}),E(2,Lt,19,0,"ng-template",null,3,x)(4,Bt,24,23,"ng-template",null,4,x)(6,jt,2,3,"ng-template",null,5,x)(8,Ot,4,0,"ng-template",null,6,x),n()()}if(t&2){let e=g();se(U(9,kt)),l(),m("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function Ut(t,c){if(t&1&&(i(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),u(4,"p-select",20),n()()),t&2){let e=g();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var Et=(()=>{class t extends xt{constructor(){super(...arguments),this.store=d(Le),this.recurringExpenseService=d(B),this.fb=d(Ze),this.isDialogFilterVisible=q(!1)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(h(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(y(()=>{this.store.updateFilter(h(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(h(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[r,s])=>(s!=null&&(o[r]=s),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:r,rowCount:s,pageSize:p,export:j,exportPageNumber:Rt,exportRowCount:It}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(r),rowCount:this.fb.control(s),pageSize:this.fb.control(p),export:this.fb.control(j),exportPageNumber:this.fb.control(Rt),exportRowCount:this.fb.control(It)})}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Ge(t)))(r||t)}})()}static{this.\u0275cmp=D({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[de([Le]),$e],attrs:Mt,decls:7,vars:3,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","scrollable","scrollHeight","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,r){if(o&1){let s=R();i(0,"app-main-panel",7),I("search",function(j){return v(s),C(r.onSearchEvent(j))}),ue("isDialogFilterVisibleChange",function(j){return v(s),me(r.isDialogFilterVisible,j)||(r.isDialogFilterVisible=j),C(j)}),I("filterConfirmed",function(){return v(s),C(r.onFilterEvent())}),E(1,At,6,1,"ng-template",null,0,x)(3,qt,10,10,"ng-template",null,1,x)(5,Ut,5,2,"ng-template",null,2,x),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),ce("isDialogFilterVisible",r.isDialogFilterVisible))},dependencies:[L,k,Z,Ne,Ve,pt,st,M,P,K,ge,V,it,ke,Me,Q,J,Se,ve,Y,Ee,Ce,be,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var ee=wt(Tt());var $t=["class","page"],Wt=()=>["/pages/recurring/recurring-expense"],le=t=>({"ng-dirty ng-invalid":t}),zt=()=>({});function Kt(t,c){if(t&1){let e=R();i(0,"div",5)(1,"a",6),a(2," Cancel "),n(),i(3,"p-button",7),I("click",function(){v(e);let r=g();return C(r.onSubmit())}),n()()}t&2&&(l(),m("routerLink",U(1,Wt)))}function Xt(t,c){if(t&1&&(i(0,"div",38)(1,"div",39),a(2),n()()),t&2){let e=c.$implicit;l(2),w(" ",e.name," ")}}function Yt(t,c){if(t&1&&(i(0,"small",21),a(1),n()),t&2){let e=c.$implicit;l(),_(e)}}function Jt(t,c){if(t&1&&(i(0,"small",21),a(1),n()),t&2){let e=c.$implicit;l(),_(e)}}function Qt(t,c){if(t&1&&(i(0,"small",21),a(1),n()),t&2){let e=c.$implicit;l(),_(e)}}function Zt(t,c){if(t&1&&(i(0,"div",5)(1,"div")(2,"span"),a(3),n()(),i(4,"div",39),a(5),n()()),t&2){let e=c.$implicit;l(3),w("(",e.code,")"),l(2),w(" ",e.value," ")}}function en(t,c){if(t&1&&(i(0,"small",21),a(1),n()),t&2){let e=c.$implicit;l(),_(e)}}function tn(t,c){if(t&1&&(i(0,"div",5)(1,"div")(2,"span"),a(3),n()(),i(4,"div",39),a(5),n()()),t&2){let e=c.$implicit;l(3),w("(",e.code,")"),l(2),w(" ",e.value," ")}}function nn(t,c){if(t&1&&(i(0,"small",21),a(1),n()),t&2){let e=c.$implicit;l(),_(e)}}function rn(t,c){if(t&1){let e=R();i(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",16,2)(10,"div",17)(11,"label",18),a(12,"Outlet"),n(),i(13,"p-select",19),E(14,Xt,3,1,"ng-template",null,3,x),n()()(),i(16,"div",16)(17,"div",17)(18,"label",18),a(19,"Name"),n(),u(20,"input",20),i(21,"div"),W(22,Yt,2,1,"small",21,$),n()()(),i(24,"div",16)(25,"div",17)(26,"label",18),a(27,"From"),n(),u(28,"p-datepicker",22),n()(),i(29,"div",16)(30,"div",17)(31,"label",18),a(32,"To"),n(),u(33,"p-datepicker",23),n()(),i(34,"div",16)(35,"div",17)(36,"label",18),a(37,"Contact Type"),n(),i(38,"div",24)(39,"div",25),u(40,"p-radiobutton",26),i(41,"label",27),a(42,"Customer"),n()(),i(43,"div",25),u(44,"p-radiobutton",28),i(45,"label",29),a(46,"Supplier"),n()()(),u(47,"br"),i(48,"div")(49,"label",18),a(50),n(),i(51,"p-autocomplete",30),I("completeMethod",function(r){v(e);let s=g(2);return C(s.searchContact(r))}),n()(),i(52,"div"),W(53,Jt,2,1,"small",21,$),n()()(),u(55,"div",31),n(),i(56,"div",15)(57,"div",16)(58,"div",17)(59,"label",18),a(60,"Amount"),n(),u(61,"input",32),i(62,"div"),W(63,Qt,2,1,"small",21,$),n()()(),i(65,"div",16)(66,"div",17)(67,"label",18),a(68,"Frequency"),n(),u(69,"p-select",33),n()(),i(70,"div",16)(71,"div",17)(72,"label",18),a(73,"Expense (Debit)"),n(),i(74,"p-select",34),E(75,Zt,6,2,"ng-template",null,3,x),n()(),i(77,"div"),W(78,en,2,1,"small",21,$),n()(),i(80,"div",16)(81,"div",17)(82,"label",18),a(83,"Payment (Credit)"),n(),i(84,"p-select",35),E(85,tn,6,2,"ng-template",null,3,x),n()(),i(87,"div"),W(88,nn,2,1,"small",21,$),n()(),i(90,"div",36)(91,"div",17)(92,"label",18),a(93,"Description"),n(),u(94,"textarea",37),n()()()()()()()()()()}if(t&2){let e,o,r,s,p=g(2);l(6),m("formGroup",p.recurringExpenseForm),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(7),m("ngClass",S(22,le,p.isInvalid("name"))),l(2),z(p.getErrors("name")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(7),m("value",0)("formControl",p.contactType),l(4),m("value",1)("formControl",p.contactType),l(6),_(p.contactType.value===0?"Customer":"Supplier"),l(),m("showClear",!0)("ngClass",S(24,le,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),z(p.getErrors("contact")),l(8),m("ngClass",S(26,le,p.isInvalid("amount")))("autoNumeric",U(28,zt)),l(2),z(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(r=p.recurringExpenseData())==null||r.options==null?null:r.options.expenses)("ngClass",S(29,le,p.isInvalid("expenseAccountID"))),l(4),z(p.getErrors("expenseAccountID")),l(6),m("ngClass",S(31,le,p.isInvalid("paymentAccountID")))("options",(s=p.recurringExpenseData())==null||s.options==null?null:s.options.assets),l(4),z(p.getErrors("paymentAccountID"))}}function on(t,c){if(t&1&&E(0,rn,95,33,"div",8),t&2){let e=g();m("ngIf",e.recurringExpenseData())}}var Oe=(()=>{class t{constructor(){this.recurringExpenseService=d(B),this.fb=d(et),this.destroyRef=d(He),this.route=d(fe),this.recurringExpenseData=q(null),this.customerSupplierSuggestions=q([]),this.router=d(xe),this.contactType=new Ye(0),this.dayjsService=d(ut)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[X.required]),repeatTypeID:this.fb.control(1,[X.required]),startDate:this.fb.control((0,ee.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[X.required]),paymentAccountID:this.fb.control(null,[X.required]),expenseAccountID:this.fb.control(null,[X.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(H(e=>e.get("id")),O(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),y(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((r,[s,p])=>{switch(s){case"startDate":r[s]=(0,ee.default)(p).isSame((0,ee.default)("0001-01-01T00:00:00"))?(0,ee.default)().toDate():(0,ee.default)(p).toDate();break;case"repeatTypeID":r[s]=1;break;case"contactID":r.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":r[s]=p===oe?null:p;break;case"expenseAccountID":r[s]=p===oe?null:p;break;default:r[s]=p}return r},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.contactType.value===0?this.recurringExpenseService.fetchCustomerSuggestion(e.query).pipe(y(this.customerSupplierSuggestions.set)).subscribe():this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(y(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((r,[s,p])=>{switch(s){case"amount":r[s]=+p;break;case"startDate":r[s]=p?this.dayjsService.from(p).format():null;break;case"endDate":r[s]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?r.contactID=p:typeof p=="object"&&p!==null?r.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:r.contactID=oe;break;default:r[s]=p;break}return r},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(y(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let r=[];for(let[s,p]of Object.entries(o.errors))switch(s){case"required":r.push("This field is required.");break;case"minlength":r.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":r.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":r.push("Please enter a valid email address.");break;case"pattern":r.push("The format is invalid.");break;case"min":r.push(`Minimum value is ${p.min}.`);break;case"max":r.push(`Maximum value is ${p.max}.`);break;default:r.push("Invalid value.")}return r}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:$t,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-4",3,"formGroup"],[1,"row","row-gap-4"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"d-flex","gap-3"],[1,"d-flex","align-items-center","gap-2"],["name","contactType","inputId","customer",3,"value","formControl"],["for","customer",1,"m-0"],["name","contactType","inputId","supplier",3,"value","formControl"],["for","supplier",1,"m-0"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],[1,"col"],["formControlName","amount","type","text","pInputText","",3,"ngClass","autoNumeric"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,r){o&1&&(i(0,"app-main-panel",4),E(1,Kt,4,2,"ng-template",null,0,x)(3,on,1,1,"ng-template",null,1,x),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Z,Re,ye,ke,Me,ot,rt,ft,gt,mt,ct,we,Ie,M,Ke,P,Se,ve,he,Y,Ee,Qe,Ce,be,V,k,Q,J,dt,A,N,lt,at],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var an=["class","page"],ln=t=>["/pages/recurring/recurring-expense/edit",t];function pn(t,c){if(t&1){let e=R();i(0,"div",4)(1,"a",5),u(2,"i",6),i(3,"span"),a(4,"Edit"),n()(),i(5,"p-button",7),I("onClick",function(){v(e);let r=g(3);return C(r.onDeleteRecurringExpense(r.currentRecurringExpense().id))}),n()()}if(t&2){let e=g(3);l(),m("routerLink",S(1,ln,e.currentRecurringExpense().id))}}function sn(t,c){if(t&1&&E(0,pn,6,3,"div",3),t&2){let e=g(2);m("ngIf",e.currentRecurringExpense())}}function cn(t,c){if(t&1){let e=R();i(0,"p-panel",11)(1,"p-scroll-panel")(2,"div",8)(3,"div",12)(4,"div",13)(5,"div",12)(6,"div",14)(7,"div",15)(8,"div",16)(9,"label",17),a(10,"Outlet"),n(),i(11,"input",18),ue("ngModelChange",function(r){v(e);let s=g(3);return me(s.currentRecurringExpense().outletName,r)||(s.currentRecurringExpense().outletName=r),C(r)}),n()()(),u(12,"div",15),i(13,"div",15)(14,"div",16)(15,"label",17),a(16,"From"),n(),u(17,"input",19),b(18,"date"),n()(),i(19,"div",15)(20,"div",16)(21,"label",17),a(22,"To"),n(),u(23,"input",19),b(24,"date"),n()(),i(25,"div",15)(26,"div",16)(27,"label",17),a(28,"Contact"),n(),u(29,"input",20),n()()(),u(30,"hr"),i(31,"div",14)(32,"div",15)(33,"div",16)(34,"label",17),a(35,"Amount"),n(),u(36,"input",19),b(37,"number"),n()(),i(38,"div",15)(39,"div",16)(40,"label",17),a(41,"Frequency"),n(),u(42,"input",19),n()(),i(43,"div",15)(44,"div",16)(45,"label",17),a(46,"Expense (Debit)"),n(),u(47,"input",19),n()(),i(48,"div",15)(49,"div",16)(50,"label",17),a(51,"Payment (Credit)"),n(),u(52,"input",19),n()(),i(53,"div",21)(54,"div",16)(55,"label",17),a(56,"Description"),n(),u(57,"textarea",22),n()()()()()()()()()}if(t&2){let e=g(3);l(11),ce("ngModel",e.currentRecurringExpense().outletName),l(6),m("value",G(18,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",G(24,12,e.currentRecurringExpense().endDate,"d MMM y")),l(6),m("value",e.currentRecurringExpense().contactName),l(7),m("value",F(37,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function mn(t,c){if(t&1&&(i(0,"div",8)(1,"div",9),E(2,cn,58,17,"p-panel",10),n()()),t&2){let e=g(2);l(2),m("ngIf",e.currentRecurringExpense())}}function un(t,c){if(t&1&&(i(0,"app-main-panel",2),E(1,sn,1,1,"ng-template",null,0,x)(3,mn,3,1,"ng-template",null,1,x),n()),t&2){let e=g();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Ct=(()=>{class t{constructor(){this.recurringExpenseService=d(B),this.route=d(fe),this.router=d(xe),this.currentRecurringExpense=q(null)}ngOnInit(){this.route.paramMap.pipe(H(e=>e.get("id")),Ae("params"),Ue(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),y(e=>this.currentRecurringExpense.set(e)),Ae("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(y(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:an,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-4"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["readonly","","type","text","pInputText","",3,"value"],["type","text","readonly","","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,r){o&1&&E(0,un,5,3,"app-main-panel",2),o&2&&We(r.currentRecurringExpense()?0:-1)},dependencies:[L,Z,M,P,K,ge,Re,ye,tt,he,Y,Je,Q,J,V,k,A,N,we,Ie],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var bt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:Et},{path:"create",component:Oe},{path:"details/:id",component:Ct},{path:"edit/:id",component:Oe}]}];var St=(()=>{class t{constructor(){this.httpService=d(_e)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=pe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var dn={filter:{Text:"",Frequency:0,PageNumber:1,RowCount:10},data:null},qe=Te(Pe(dn),De(t=>{let c=d(St);return{getAssetValue:ie(te(O(o=>c.getAssetValue(o).pipe(re({next:r=>{T(t,s=>h(f({},s),{data:r}))},error:r=>{console.error("Error fetching asset value:",r)}}))))),updateFilter:o=>{T(t,r=>h(f({},r),{filter:o}))}}}),Fe({onInit:t=>{t.getAssetValue(t.filter())}}));var gn=()=>({height:"calc(100vh - 70px)"}),fn=t=>["/pages/recurring/recurring-expense/details/",t];function xn(t,c){t&1&&u(0,"div",5)}function _n(t,c){t&1&&(i(0,"tr")(1,"th"),a(2,"Outlet"),n(),i(3,"th"),a(4,"Name"),n(),i(5,"th"),a(6,"Account Code"),n(),i(7,"th",8),a(8,"Price on Purchase"),n(),i(9,"th",8),a(10,"Accomulated Depreciation"),n(),i(11,"th",8),a(12,"Book Value"),n(),i(13,"th",8),a(14,"Frequency"),n()())}function hn(t,c){if(t&1&&(i(0,"tr")(1,"td"),a(2),n(),i(3,"td")(4,"a",9),a(5),n()(),i(6,"td"),a(7),n(),i(8,"td",8),a(9),b(10,"number"),n(),i(11,"td",8),a(12),b(13,"number"),n(),i(14,"td",8),a(15),b(16,"number"),n(),i(17,"td",8),a(18),b(19,"number"),n()()),t&2){let e=c.$implicit;l(2),_(e.entityName),l(2),m("routerLink",S(16,fn,e.id)),l(),_(e.name),l(2),_(e.accountCode),l(2),_(F(10,8,e.priceOnPurchase)),l(3),w(" ",F(13,10,e.accumulatedDepreciation)," "),l(3),w(" ",F(16,12,e.bookValue)," "),l(3),w(" ",F(19,14,e.depreciationPerYear)," ")}}function En(t,c){if(t&1&&(i(0,"p-panel")(1,"p-table",7),E(2,_n,15,0,"ng-template",null,2,x)(4,hn,20,18,"ng-template",null,3,x),n()()),t&2){let e=g(2);se(U(7,gn)),l(),m("value",e.store.data().data)("rows",e.store.filter().RowCount)("totalRecords",e.store.data().count)("scrollable",!0)("scrollHeight","calc(100vh - 200px)")}}function vn(t,c){if(t&1&&E(0,En,6,8,"p-panel",6),t&2){let e=g();m("ngIf",e.store.data())}}var yt=(()=>{class t{constructor(){this.store=d(qe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-asset-value"]],features:[de([qe])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput"],[1,"d-flex","gap-2"],[3,"style",4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords","scrollable","scrollHeight"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,r){o&1&&(i(0,"app-main-panel",4),E(1,xn,1,0,"ng-template",null,0,x)(3,vn,1,1,"ng-template",null,1,x),n()),o&2&&m("isSearchableInput",!0)},dependencies:[L,M,P,K,A,N,Ne,Ve,V,k],encapsulation:2})}}return t})();var fr=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:bt},{path:"asset-value",component:yt},{path:"post-to-journal",loadComponent:()=>import("./chunk-WSVAXPZZ.js").then(t=>t.PostRecurringExpenseComponent)}];export{fr as RECURRING_ROUTES};
|
package/chunk-VXSF6SQF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-4WYSO23S.js";import{a as Ue}from"./chunk-DCKLQNGL.js";import{a as He,b as Oe}from"./chunk-RZRT24L6.js";import{b as V}from"./chunk-IZ2XPL4O.js";import{a as ze}from"./chunk-PSDZXCOR.js";import{a as Be}from"./chunk-G4XX7EU2.js";import{a as ae}from"./chunk-CVMIZKGH.js";import"./chunk-VUPF5YJY.js";import"./chunk-MP7S52YU.js";import{a as z,b as H}from"./chunk-JP3F2QND.js";import{d as ke,i as Me,j as Pe,k as je}from"./chunk-OSFKXKXD.js";import{a as Ae,b as De}from"./chunk-7GHU4UQ7.js";import"./chunk-P36L53XK.js";import"./chunk-RVTAI3J3.js";import{a as Je,b as Ne}from"./chunk-DAV2SMOY.js";import"./chunk-P5ZPLAYA.js";import"./chunk-CVMP55UZ.js";import"./chunk-7UBLUR5O.js";import"./chunk-AZM2EGTF.js";import"./chunk-HI7JDHS3.js";import"./chunk-JQZRKOKE.js";import{c as be,d as Se}from"./chunk-ANG5YF2J.js";import{g as Fe,h as Ve}from"./chunk-2JCKXI2B.js";import{b as Ee,c as Te}from"./chunk-YLHU3GDJ.js";import{a as v,b as we,c as ve,d as ye,e as Re,f as Ie}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{n as ge,o as he,w as xe,x as Ce}from"./chunk-TCF45ELT.js";import"./chunk-ZWHB7NI7.js";import{b as le,c as me,e as pe,f as se,k as ce,m as de,p as ue,w as fe,z as _e}from"./chunk-ALX7UOMP.js";import"./chunk-HAZ5H5ZV.js";import"./chunk-4LFQJHJZ.js";import"./chunk-F2X3VGZZ.js";import{c as ee,e as te,f as ie,i as ne,k as oe,m as re}from"./chunk-BYD3JK4R.js";import{Ab as W,Cb as g,Ga as k,Ic as I,Jc as Z,Kb as c,Kc as F,Lc as w,Nb as $,Ub as r,Vb as o,Wb as b,X as N,Xc as E,Z as U,_b as y,bb as L,c as D,cb as G,dc as R,ec as _,gb as m,ha as C,pa as h,pc as p,qa as x,qc as S,rc as M,s as J,tc as q,uc as Q,vc as P,wb as K,wc as X,xc as Y,yc as j,zc as T}from"./chunk-YVEUYFCE.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var Qe={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,rowCount:20,pageSize:20,export:!1,exportPageNumber:1,exportRowCount:1e4,paymentState:0}},O=we(Ie(Qe),ve(t=>({first:E(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:E(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:E(()=>t.data().data.some(a=>a.checked)),checkedARCollection:E(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),Re(t=>{let a=C(A),e=C(V);return{updateFilter(n){v(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){v(t,i=>{let u=i.data.data.map(s=>s.id===n.id?f(d({},s),{checked:!0}):s);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){v(t,i=>{let u=i.data.data.map(s=>s.id===n.id?f(d({},s),{checked:!1}):s);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){v(t,i=>{let u=i.data.data.map(s=>f(d({},s),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(D(N(()=>a.getARJournalLoader().pipe(H({next:n=>{v(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(D(J(n=>Object.entries(n).reduce((i,[u,s])=>(s!=null&&(i[u]=s),i),{})),N(n=>a.getARJournal(n).pipe(J(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),H({next:i=>{v(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var Xe=()=>({height:"calc(100vh - 70px)"}),B=t=>({"ng-invalid ng-dirty":t}),Ye=()=>({});function Ze(t,a){if(t&1){let e=y();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function et(t,a){if(t&1&&g(0,Ze,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function tt(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),p(4,"Outlet"),o(),r(5,"th",14),p(6,"Number"),o(),r(7,"th",15),p(8,"Customer"),o(),r(9,"th",16),p(10,"Date"),o(),r(11,"th",16),p(12,"Due"),o(),r(13,"th",15),p(14,"Note"),o(),r(15,"th",17),p(16,"Payment"),o(),b(17,"th",12),o())}function it(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",18),o(),r(3,"td"),p(4),o(),r(5,"td")(6,"a",19),p(7),o()(),r(8,"td"),p(9),o(),r(10,"td"),p(11),I(12,"date"),o(),r(13,"td"),p(14),I(15,"date"),o(),r(16,"td"),b(17,"div",20),o(),r(18,"td"),p(19),o(),r(20,"td"),b(21,"p-button",21),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,G),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(F(12,12,e.date,"d MMM y")),m(3),S(e.due?F(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,L),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function nt(t,a){if(t&1&&p(0),t&2){let e=_(2);q(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function ot(t,a){t&1&&(r(0,"tr")(1,"td",22)(2,"span"),p(3,"No records found."),o()()())}function rt(t,a){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,tt,18,0,"ng-template",null,3,w)(4,it,22,18,"ng-template",null,4,w)(6,nt,1,3,"ng-template",null,5,w)(8,ot,4,0,"ng-template",null,6,w),o()()}if(t&2){let e=_();$(j(9,Xe)),m(),c("value",e.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function at(t,a){if(t&1&&(r(0,"span",32),p(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",F(2,2,e.name,30)," ")}}function lt(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function mt(t,a){if(t&1&&(r(0,"div"),g(1,lt,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function pt(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function st(t,a){if(t&1&&(r(0,"div"),g(1,pt,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function ct(t,a){if(t&1&&(r(0,"div")(1,"span",34),p(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function dt(t,a){if(t&1&&(r(0,"div"),g(1,ct,3,1,"div",33),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function ut(t,a){if(t&1){let e=y();r(0,"form",23)(1,"div",24)(2,"label",25),p(3,"Outlet"),o(),r(4,"p-select",26),g(5,at,3,5,"ng-template",null,7,w),o()(),r(7,"div",24)(8,"label",25),p(9,"From"),o(),b(10,"p-datepicker",27),g(11,mt,2,1,"div",28),o(),r(12,"div",24)(13,"label",25),p(14,"To"),o(),b(15,"p-datepicker",29),g(16,st,2,1,"div",28),o(),r(17,"div",24)(18,"label",25),p(19,"Customer"),o(),r(20,"p-autocomplete",30),I(21,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(22,"div",24)(23,"label",25),p(24,"Page Size"),o(),b(25,"input",31),g(26,dt,2,1,"div",28),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(6),c("iconDisplay","input")("showIcon",!0)("ngClass",T(17,B,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(4),c("iconDisplay","input")("showIcon",!0)("ngClass",T(19,B,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",Z(21,15,e.customerSuggestions$)),m(5),c("autoNumeric",j(21,Ye))("ngClass",T(22,B,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var ni=(()=>{class t extends Ue{constructor(){super(),this.store=C(O),this.generateJournalService=C(A),this.authService=C(ae),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(fe),this.dayjsService=C(V)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,rowCount:u,pageSize:s,export:Le,exportPageNumber:Ge,exportRowCount:Ke,outletName:We,customerID:$e,paymentState:qe}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),rowCount:this.fb.control(u),pageSize:this.fb.control(s,[me.required]),export:this.fb.control(Le),exportPageNumber:this.fb.control(Ge),exportRowCount:this.fb.control(Ke),outletName:this.fb.control(We),customerID:this.fb.control($e),paymentState:this.fb.control(qe)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=Be);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.from(i).format():null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.from(i).format():null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(U(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=K({type:t,selectors:[["app-ar-journal"]],features:[Y([O]),W],decls:8,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AR Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[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 Outlet",3,"virtualScrollItemSize","options"],["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"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=y();r(0,"app-main-panel",8),X("isDialogFilterVisibleChange",function(s){return h(i),P(n.isDialogFilterVisible,s)||(n.isDialogFilterVisible=s),x(s)})("isInitDialogFilterVisibleChange",function(s){return h(i),P(n.isInitDialogFilterVisible,s)||(n.isInitDialogFilterVisible=s),x(s)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(s){return h(i),x(n.onSearch(s))}),g(1,et,1,1,"ng-template",null,0,w)(3,rt,10,10,"ng-template",null,1,w),p(5," <"),g(6,ut,27,24,"ng-template",null,2,w),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),Q("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible))},dependencies:[Ve,re,ee,te,ie,ne,oe,je,ke,Me,Pe,Ce,xe,Se,be,_e,ce,le,pe,se,de,ue,Ne,Je,De,Ae,Oe,He,he,ge,Fe,Te,Ee,ze],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ni as ARJournalComponent};
|
package/chunk-WSVAXPZZ.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import{a as ze}from"./chunk-DCKLQNGL.js";import{b as Fe}from"./chunk-IZ2XPL4O.js";import{a as je,b as Te}from"./chunk-VG23QNZF.js";import"./chunk-VUPF5YJY.js";import"./chunk-MP7S52YU.js";import{a as B,b as N}from"./chunk-JP3F2QND.js";import{d as De,i as ke,j as Me,k as Ie}from"./chunk-OSFKXKXD.js";import{a as we,b as Pe}from"./chunk-7GHU4UQ7.js";import"./chunk-P36L53XK.js";import{a as H}from"./chunk-B7JILYJO.js";import"./chunk-RVTAI3J3.js";import"./chunk-DAV2SMOY.js";import"./chunk-P5ZPLAYA.js";import"./chunk-CVMP55UZ.js";import"./chunk-7UBLUR5O.js";import"./chunk-AZM2EGTF.js";import"./chunk-HI7JDHS3.js";import"./chunk-JQZRKOKE.js";import{c as be,d as ye}from"./chunk-ANG5YF2J.js";import{h as Se}from"./chunk-2JCKXI2B.js";import"./chunk-YLHU3GDJ.js";import{a as g,b as xe,c as _e,d as Ee,e as Ce,f as Re}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{a as ge,w as he,x as ve}from"./chunk-TCF45ELT.js";import"./chunk-ZWHB7NI7.js";import{Oa as ue,Wa as fe,e as le,f as de,m as se,p as ce,w as pe,z as me}from"./chunk-ALX7UOMP.js";import{a as ae}from"./chunk-HAZ5H5ZV.js";import"./chunk-4LFQJHJZ.js";import"./chunk-F2X3VGZZ.js";import{f as ne,k as re,l as oe,m as D}from"./chunk-BYD3JK4R.js";import{Ab as S,Cb as w,Ic as z,Jb as K,Jc as te,Kb as v,Kc as ie,L as G,Lb as q,Lc as x,Mb as Q,Nb as W,O as L,Ob as X,Ub as a,Vb as o,Wb as b,X as I,Xc as V,Z as U,_b as T,ba as C,c as M,ca as O,dc as F,ec as f,fc as Y,gb as u,gc as Z,ha as m,pa as _,pc as c,qa as E,qc as y,s as h,ta as j,wb as R,xb as J,xc as P,yc as ee}from"./chunk-YVEUYFCE.js";import{a as l,b as d}from"./chunk-YQFG5XE2.js";var k=(()=>{class e{constructor(){this.httpService=m(ae)}getPostRecurringExpenseLoader(){return this.httpService.get(void 0,"api/RecurringExpenseLoader/RecurringExpensesGenerate")}previewPostRecurringExpense(i){return this.httpService.post(void 0,"api/RecurringExpense/RecurringExpensesGeneratePreview",i)}submitPostRecurringExpense(i){return this.httpService.post(void 0,"api/RecurringExpense/RecurringExpensesGenerate",i)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ne={data:{data:[]},meta:{options:{expenses:[]},form:{date:"",number:"",listIDs:[]}},filter:{date:"",number:"",listIDs:[]}},A=xe(Re(Ne),_e(e=>({hasCheckedRows:V(()=>e.data().data.some(p=>p.checked)),checkedPRE:V(()=>e.data().data.filter(p=>p.checked))})),Ce(e=>{let p=m(k);return{updateFilter:n=>{g(e,t=>d(l({},t),{filter:l(l({},t.filter),n)}))},onRowSelect(n){g(e,t=>{let r=t.data.data.map(s=>s.id===n.id?d(l({},s),{checked:!0}):s);return d(l({},t),{data:d(l({},t.data),{data:r})})})},onRowUnselect(n){g(e,t=>{let r=t.data.data.map(s=>s.id===n.id?d(l({},s),{checked:!1}):s);return d(l({},t),{data:d(l({},t.data),{data:r})})})},onHeaderCheckboxToggle(n){g(e,t=>{let r=t.data.data.map(s=>d(l({},s),{checked:n}));return d(l({},t),{data:d(l({},t.data),{data:r})})})},getPRELoader:B(M(I(()=>p.getPostRecurringExpenseLoader().pipe(N({next:n=>{g(e,t=>d(l({},t),{meta:n}))},error:n=>{console.error("Error fetching PRE Loader:",n)}}))))),getPREPreview:B(M(h(n=>Object.entries(n).reduce((t,[r,s])=>(s!=null&&s!==""&&(t[r]=s),t),{})),h(n=>({Date:n.date,Number:n.number,ListIDs:n.listIDs})),I(n=>p.previewPostRecurringExpense(n).pipe(h(t=>d(l({},t),{data:t.data.map(r=>d(l({},r),{checked:!1}))})),N({next:t=>{g(e,r=>d(l({},r),{data:t}))},error:t=>{console.error("Error fetching PRE Preview:",t)}})))))}}),Ee(e=>({onInit:()=>{e.getPRELoader(),e.getPREPreview(e.filter)}})));var Ae=["*"],$e=({dt:e})=>`
|
|
2
|
-
.p-divider-horizontal {
|
|
3
|
-
display: flex;
|
|
4
|
-
width: 100%;
|
|
5
|
-
position: relative;
|
|
6
|
-
align-items: center;
|
|
7
|
-
margin: ${e("divider.horizontal.margin")};
|
|
8
|
-
padding: ${e("divider.horizontal.padding")};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.p-divider-horizontal:before {
|
|
12
|
-
position: absolute;
|
|
13
|
-
display: block;
|
|
14
|
-
inset-block-start: 50%;
|
|
15
|
-
inset-inline-start: 0;
|
|
16
|
-
width: 100%;
|
|
17
|
-
content: "";
|
|
18
|
-
border-block-start: 1px solid ${e("divider.border.color")};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.p-divider-horizontal .p-divider-content {
|
|
22
|
-
padding: ${e("divider.horizontal.content.padding")};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.p-divider-vertical {
|
|
26
|
-
min-height: 100%;
|
|
27
|
-
display: flex;
|
|
28
|
-
position: relative;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
margin: ${e("divider.vertical.margin")};
|
|
31
|
-
padding: ${e("divider.vertical.padding")};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.p-divider-vertical:before {
|
|
35
|
-
position: absolute;
|
|
36
|
-
display: block;
|
|
37
|
-
inset-block-start: 0;
|
|
38
|
-
inset-inline-start: 50%;
|
|
39
|
-
height: 100%;
|
|
40
|
-
content: "";
|
|
41
|
-
border-inline-start: 1px solid ${e("divider.border.color")};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.p-divider.p-divider-vertical .p-divider-content {
|
|
45
|
-
padding: ${e("divider.vertical.content.padding")};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.p-divider-content {
|
|
49
|
-
z-index: 1;
|
|
50
|
-
background: ${e("divider.content.background")};
|
|
51
|
-
color: ${e("divider.content.color")};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.p-divider-solid.p-divider-horizontal:before {
|
|
55
|
-
border-block-start-style: solid;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.p-divider-solid.p-divider-vertical:before {
|
|
59
|
-
border-inline-start-style: solid;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.p-divider-dashed.p-divider-horizontal:before {
|
|
63
|
-
border-block-start-style: dashed;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.p-divider-dashed.p-divider-vertical:before {
|
|
67
|
-
border-inline-start-style: dashed;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.p-divider-dotted.p-divider-horizontal:before {
|
|
71
|
-
border-block-start-style: dotted;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.p-divider-dotted.p-divider-vertical:before {
|
|
75
|
-
border-inline-start-style: dotted;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.p-divider-left:dir(rtl),
|
|
79
|
-
.p-divider-right:dir(rtl) {
|
|
80
|
-
flex-direction: row-reverse;
|
|
81
|
-
}
|
|
82
|
-
`,Ge={root:({props:e})=>({justifyContent:e.layout==="horizontal"?e.align==="center"||e.align===null?"center":e.align==="left"?"flex-start":e.align==="right"?"flex-end":null:null,alignItems:e.layout==="vertical"?e.align==="center"||e.align===null?"center":e.align==="top"?"flex-start":e.align==="bottom"?"flex-end":null:null})},Le={root:({props:e})=>["p-divider p-component","p-divider-"+e.layout,"p-divider-"+e.type,{"p-divider-left":e.layout==="horizontal"&&(!e.align||e.align==="left")},{"p-divider-center":e.layout==="horizontal"&&e.align==="center"},{"p-divider-right":e.layout==="horizontal"&&e.align==="right"},{"p-divider-top":e.layout==="vertical"&&e.align==="top"},{"p-divider-center":e.layout==="vertical"&&(!e.align||e.align==="center")},{"p-divider-bottom":e.layout==="vertical"&&e.align==="bottom"}],content:"p-divider-content"},He=(()=>{class e extends fe{name="divider";theme=$e;classes=Le;inlineStyles=Ge;static \u0275fac=(()=>{let i;return function(t){return(i||(i=j(e)))(t||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var $=(()=>{class e extends ge{style;styleClass;layout="horizontal";type="solid";align;_componentStyle=m(He);get hostClass(){return this.styleClass}static \u0275fac=(()=>{let i;return function(t){return(i||(i=j(e)))(t||e)}})();static \u0275cmp=R({type:e,selectors:[["p-divider"]],hostVars:33,hostBindings:function(n,t){n&2&&(K("aria-orientation",t.layout)("data-pc-name","divider")("role","separator"),X(t.hostClass),q("justify-content",t.layout==="horizontal"?t.align==="center"||t.align===void 0?"center":t.align==="left"?"flex-start":t.align==="right"?"flex-end":null:null)("align-items",t.layout==="vertical"?t.align==="center"||t.align===void 0?"center":t.align==="top"?"flex-start":t.align==="bottom"?"flex-end":null:null),Q("p-divider",!0)("p-component",!0)("p-divider-horizontal",t.layout==="horizontal")("p-divider-vertical",t.layout==="vertical")("p-divider-solid",t.type==="solid")("p-divider-dashed",t.type==="dashed")("p-divider-dotted",t.type==="dotted")("p-divider-left",t.layout==="horizontal"&&(!t.align||t.align==="left"))("p-divider-center",t.layout==="horizontal"&&t.align==="center"||t.layout==="vertical"&&(!t.align||t.align==="center"))("p-divider-right",t.layout==="horizontal"&&t.align==="right")("p-divider-top",t.layout==="vertical"&&t.align==="top")("p-divider-bottom",t.layout==="vertical"&&t.align==="bottom"))},inputs:{style:"style",styleClass:"styleClass",layout:"layout",type:"type",align:"align"},features:[P([He]),S],ngContentSelectors:Ae,decls:2,vars:0,consts:[[1,"p-divider-content"]],template:function(n,t){n&1&&(Y(),a(0,"div",0),Z(1),o())},dependencies:[D,ue],encapsulation:2,changeDetection:0})}return e})(),Be=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=J({type:e});static \u0275inj=O({imports:[$]})}return e})();var Oe=()=>({height:"calc(100vh - 70px)"});function Je(e,p){if(e&1){let i=T();a(0,"p-button",7),F("onClick",function(){_(i);let t=f(2);return E(t.onSubmitPRE())}),o()}}function Ke(e,p){if(e&1&&w(0,Je,1,0,"p-button",6),e&2){let i=f();v("ngIf",i.store.hasCheckedRows())}}function qe(e,p){e&1&&(a(0,"tr")(1,"th",17),b(2,"p-tableHeaderCheckbox"),o(),a(3,"th"),c(4,"Name"),o(),a(5,"th"),c(6,"Date"),o(),a(7,"th"),c(8,"Asset Account"),o(),a(9,"th"),c(10,"Expense Account"),o(),a(11,"th",18),c(12,"Amount"),o()())}function Qe(e,p){if(e&1&&(a(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),o(),a(3,"td"),c(4),o(),a(5,"td"),c(6),z(7,"date"),o(),a(8,"td"),c(9),o(),a(10,"td"),c(11),o(),a(12,"td",18),c(13),z(14,"number"),o()()),e&2){let i=p.$implicit;u(2),v("value",i),u(2),y(i.name),u(2),y(ie(7,6,i.nextExpenseDate,"d MMM y")),u(3),y(i.paymentName),u(2),y(i.expenseName),u(2),y(te(14,9,i.amount))}}function We(e,p){e&1&&(a(0,"tr")(1,"td",20)(2,"span"),c(3,"No records found."),o()()())}function Xe(e,p){if(e&1){let i=T();a(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12)(6,"label",13),c(7,"Date"),o(),b(8,"p-datepicker",14),o()(),a(9,"div",11)(10,"div",12)(11,"label",13),c(12,"Date"),o(),b(13,"p-multiselect",15),o()()()()(),b(14,"p-divider"),a(15,"p-table",16),F("onRowSelect",function(t){_(i);let r=f();return E(r.onRowSelect(t))})("onRowUnselect",function(t){_(i);let r=f();return E(r.onRowUnselect(t))})("onHeaderCheckboxToggle",function(t){_(i);let r=f();return E(r.onHeaderCheckboxToggle(t))}),w(16,qe,13,0,"ng-template",null,2,x)(18,Qe,15,11,"ng-template",null,3,x)(20,We,4,0,"ng-template",null,4,x),o()()}if(e&2){let i=f();W(ee(7,Oe)),u(),v("formGroup",i.form),u(12),v("options",i.store.meta().options.expenses),u(2),v("value",i.store.data().data)("scrollable",!0)("scrollHeight","calc(100vh - 200px)")}}var Kt=(()=>{class e extends ze{constructor(){super(),this.store=m(A),this.fb=m(pe),this.dayjsService=m(Fe),this.PREService=m(k)}ngOnInit(){this.initForm(),this.form.valueChanges.pipe(G(300),L(),H("Form Value Changes"),h(i=>Object.entries(i).reduce((n,[t,r])=>{switch(t){case"date":typeof r=="object"&&r!==null&&!Array.isArray(r)?n[t]=this.dayjsService.from(r)?this.dayjsService.from(r).format():null:(typeof r=="string"||typeof r=="number"||r instanceof Date)&&!Array.isArray(r)?n[t]=r!=null?String(r):null:n[t]=null;break;default:n[t]=r===null?"":r;break}return n},{})),U(i=>{this.store.updateFilter(i)})).subscribe()}initForm(){let{date:i,listIDs:n,number:t}=this.store.filter();this.form=this.fb.group({date:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():this.dayjsService.now.toDate()),number:this.fb.control(t||""),listIDs:this.fb.control(n||[])})}onRowSelect(i){this.store.onRowSelect(i.data)}onRowUnselect(i){if(Array.isArray(i.data)){i.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(i.data)}onHeaderCheckboxToggle(i){this.store.onHeaderCheckboxToggle(i.checked)}onSubmitPRE(){let i=d(l({},this.store.filter()),{ExpenseList:this.store.checkedPRE()});this.PREService.submitPostRecurringExpense(i).pipe(H("Submit Post Recurring Expense")).subscribe()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-post-recurring-expense"]],features:[P([A]),S],decls:5,vars:0,consts:[["actioinButton",""],["content",""],["header",""],["body",""],["emptymessage",""],["pageTitle","Asset Value"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"row"],[1,"col"],[1,"d-flex","flex-column"],["for",""],["fluid","","formControlName","date"],["display","chip","formControlName","listIDs","optionLabel","name","optionValue","id","placeholder","Select Cities","fluid","",3,"options"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","scrollable","scrollHeight"],[2,"width","4rem"],[1,"text-end"],[3,"value"],["colspan","6"]],template:function(n,t){n&1&&(a(0,"app-main-panel",5),w(1,Ke,1,1,"ng-template",null,0,x)(3,Xe,22,8,"ng-template",null,1,x),o())},dependencies:[Se,D,ne,oe,re,ye,be,Be,$,Pe,we,Te,je,me,le,de,se,ce,Ie,De,ke,Me,ve,he],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{Kt as PostRecurringExpenseComponent};
|
package/chunk-X3PB5IV5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,b as A}from"./chunk-JP3F2QND.js";import{d as V,k as W}from"./chunk-OSFKXKXD.js";import"./chunk-7GHU4UQ7.js";import"./chunk-P36L53XK.js";import"./chunk-RVTAI3J3.js";import"./chunk-DAV2SMOY.js";import"./chunk-P5ZPLAYA.js";import"./chunk-CVMP55UZ.js";import"./chunk-7UBLUR5O.js";import"./chunk-AZM2EGTF.js";import"./chunk-HI7JDHS3.js";import"./chunk-JQZRKOKE.js";import{c as j,d as G}from"./chunk-ANG5YF2J.js";import{b as Q}from"./chunk-4GL5YTWS.js";import{h as J}from"./chunk-2JCKXI2B.js";import"./chunk-YLHU3GDJ.js";import{a as S,b as H,c as K,d as U,e as q,f as $,g as z}from"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import"./chunk-TCF45ELT.js";import"./chunk-ZWHB7NI7.js";import{y as N}from"./chunk-ALX7UOMP.js";import{a as O}from"./chunk-HAZ5H5ZV.js";import"./chunk-4LFQJHJZ.js";import"./chunk-F2X3VGZZ.js";import{F as R,M as F,l as I,m as L}from"./chunk-BYD3JK4R.js";import{Cb as C,Ic as k,Jc as B,Kb as m,Lc as c,Nb as b,Ub as n,Vb as a,Wb as M,X as u,Xc as D,ba as y,c as h,ec as g,gb as l,ha as p,pc as i,qc as s,rc as T,wb as P,xc as w,yc as _,zc as x}from"./chunk-YVEUYFCE.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var X=(()=>{class t{constructor(){this.httpService=p(O)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var et={data:[],filter:[],options:{hasGeneralLedger:!1}},E=H(z("cash-bank-store"),$(et),K(t=>({totalBalance:D(()=>t.data().reduce((o,e)=>o+e.balance,0))})),q(t=>{let o=p(X);return{loadCashAndBankLoader:v(h(u(()=>o.fetchCashAndBankLoader().pipe(A({next:e=>{console.log("response",e),S(t,r=>f(d({},r),{options:e.options}))},error:e=>{console.log("error",e)}}))))),loadCashAndBankData:v(h(u(()=>o.fetchCashAndBankData().pipe(A({next:e=>{console.log("response",e),S(t,r=>f(d({},r),{data:e}))},error:e=>{console.log("error",e)}})))))}}),U({onInit(t){t.loadCashAndBankLoader(),t.loadCashAndBankData()}}));var nt=["class","page"],at=()=>({height:"calc(100vh - 70px)"}),ot=t=>[t],it=()=>["/pages/report/general-ledger"],rt=t=>({id:t});function lt(t,o){t&1&&(n(0,"tr")(1,"th"),i(2,"Code"),a(),n(3,"th"),i(4,"Name"),a(),n(5,"th",7),i(6,"Balance"),a()())}function pt(t,o){if(t&1&&(n(0,"tr")(1,"td"),i(2),a(),n(3,"td")(4,"a",8),i(5),a()(),n(6,"td",7)(7,"a",9),i(8),k(9,"number"),a()()()),t&2){let e=o.$implicit;l(2),s(e.code),l(2),m("routerLink",x(8,ot,"/pages/chart-of-account/account/"+e.accountID)),l(),s(e.name),l(2),m("routerLink",_(10,it))("queryParams",x(11,rt,e.accountID)),l(),s(B(9,6,e.balance))}}function ct(t,o){if(t&1&&(n(0,"tr"),M(1,"td"),n(2,"td",10),i(3,"Total"),a(),n(4,"td",11),i(5),k(6,"number"),a()()),t&2){let e=g(2);l(5),T(" ",B(6,1,e.store.totalBalance())," ")}}function mt(t,o){t&1&&(n(0,"tr")(1,"td",12)(2,"span"),i(3,"No records found."),a()()())}function st(t,o){if(t&1&&(n(0,"p-panel")(1,"p-table",6),C(2,lt,7,0,"ng-template",null,1,c)(4,pt,10,13,"ng-template",null,2,c)(6,ct,7,3,"ng-template",null,3,c)(8,mt,4,0,"ng-template",null,4,c),a()()),t&2){let e=g();b(_(3,at)),l(),m("value",e.store.data())}}var Y=(()=>{class t{constructor(){this.store=p(E),this.routeInfo=Z}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-cash-bank",8,"page"]],features:[w([E])],attrs:nt,decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["footer",""],["emptymessage",""],["pageTitle","Cash and Bank"],[3,"value"],[1,"text-end"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"text-end","fw-bold"],["colspan","3"]],template:function(r,dt){r&1&&(n(0,"app-main-panel",5),C(1,st,10,4,"ng-template",null,0,c),a())},dependencies:[L,I,J,N,W,V,Q,F,R,G,j],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return t})();var qt=[{path:"",component:Y,children:[]}],Z={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{qt as CASH_BANK_ROUTES,Z as CASH_BANK_ROUTE_PAGE};
|
package/chunk-YDBJGTTB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,b as L}from"./chunk-Q7ITPAXT.js";import"./chunk-IZ2XPL4O.js";import{a as I,b as E}from"./chunk-JHCHHBCW.js";import{c as R,d as D}from"./chunk-ANG5YF2J.js";import"./chunk-4GL5YTWS.js";import{h as H}from"./chunk-2JCKXI2B.js";import{b as N,c as G}from"./chunk-YLHU3GDJ.js";import"./chunk-4S33ZRKF.js";import"./chunk-4FGQ5T64.js";import{w as V,x as j}from"./chunk-TCF45ELT.js";import"./chunk-ZWHB7NI7.js";import"./chunk-ALX7UOMP.js";import"./chunk-HAZ5H5ZV.js";import{a as F}from"./chunk-4LFQJHJZ.js";import"./chunk-F2X3VGZZ.js";import{i as w,m as $}from"./chunk-BYD3JK4R.js";import{Cb as B,Ic as c,Jc as s,Kb as p,Lc as x,Nb as h,Ub as n,V as T,Vb as o,Wb as m,X as M,Z as S,_b as O,dc as _,ec as l,gb as a,h as y,ha as f,pa as g,qa as d,ra as b,s as u,sa as k,wb as A,xc as P,yc as C}from"./chunk-YVEUYFCE.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let t=O();n(0,"div",3)(1,"p-button",4),_("onClick",function(){g(t);let r=l();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),_("onClick",function(){g(t);let r=l();return d(r.onMigrateOutletAccount())}),o()()}if(i&2){let t=l();a(2),p("disabled",s(3,2,t.countInBooks$)!==0)("pTooltip",s(4,4,t.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),m(3,"app-migration-cards",7),c(4,"async"),b(),n(5,"svg",8),m(6,"path",9),o(),k(),m(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let t=l();h(C(12,q)),a(),h(C(13,q)),a(2),p("migrationCount",s(4,8,t.countInPOS$))("migrationTitle",t.pageTitle),a(4),p("migrationCount",s(8,10,t.countInBooks$))("migrationTitle",t.pageTitle)}}var ut=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f(F),this.refresh$=new y(void 0),this.pageTitle="Outlet Account"}ngOnInit(){let t=this.refresh$.pipe(M(()=>this.migrateService.getOutletAccountCount()),S(e=>console.log("API response:",e)),T(1));this.countInPOS$=t.pipe(u(e=>Number(e.pos))),this.countInBooks$=t.pipe(u(e=>Number(e.books)))}onMigrateOutletAccount(){this.migrateService.migrateOutletAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatOutletAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275cmp=A({type:i,selectors:[["app-outlet-account"]],features:[P([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(e,r){e&1&&(n(0,"app-main-panel",2),B(1,J,5,6,"ng-template",null,0,x)(3,K,9,14,"ng-template",null,1,x),o()),e&2&&p("pageTitle",r.pageTitle)},dependencies:[H,$,w,j,V,E,I,D,R,G,N,L],encapsulation:2})}}return i})();export{ut as OutletAccountComponent};
|