1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46343dd8-7ca0-440d-991d-a8fcf476aa1b",e._sentryDebugIdIdentifier="sentry-dbid-46343dd8-7ca0-440d-991d-a8fcf476aa1b")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[175],{5737:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/transactions",function(){return t(37721)}])},26839:(e,n,t)=>{"use strict";t.d(n,{i:()=>r});var i=t(14232);let r=e=>(0,i.useMemo)(()=>{if(!e)return{erroring:0,syncing:0};let n=Object.values(e),t=n.filter(e=>e.connectionId&&!(e.lastSyncMS&&e.hasHistoricalTransactions)&&!e.hasError),i=n.filter(e=>e.hasError);return{erroring:i.length,erroringAccounts:i,syncing:t.length,syncingAccounts:t}},[e])},37721:(e,n,t)=>{"use strict";t.r(n),t.d(n,{__N_SSP:()=>eT,default:()=>eR});var i=t(37876),r=t(28226),o=t(82077),s=t(4388),a=t(53137),l=t(22752),c=t(26055),d=t(15066),g=t(74859),u=t(2834),h=t(94211),p=t(90181),m=t(70024),x=t(46256),A=t(94425),f=t(55126),j=t(12541),w=t(27809),y=t(26839),v=t(3838),b=t(79686),C=t(90810),k=t(56264),S=t(31231),F=t(49535),I=t(66618),M=t(28842),P=t(70208),T=t(93554),R=t(13677);let _=e=>{let{title:n,subheader:t,cta:r,onClick:o,image:s}=e;return(0,i.jsxs)(T.A,{bgColor:d.Ay.brown[5],justify:"space-between",radius:"md",padding:0,flex:1,cursor:"pointer",showShadow:"hover",shadow:"extraLarge",webOnClick:o,children:[(0,i.jsxs)(R.A,{column:!0,gutter:"small",top:1,bottom:1,justify:"space-between",align:"flex-start",spacing:2,flex:1,children:[(0,i.jsxs)(h.A,{column:!0,spacing:.5,children:[(0,i.jsx)(F.A,{variant:"body",bold:!0,children:n}),(0,i.jsx)(F.A,{variant:"small",light:!0,balance:!0,children:t})]}),r]}),(0,i.jsx)(R.A,{align:"flex-end",top:[1,2,4],children:s})]})},E=e=>{let{connectedAccountMap:n}=e,t=(0,M.A)(),{syncing:r,erroring:o,syncingAccounts:s,erroringAccounts:a}=(0,y.i)(n),l=(0,P.DH)();return(0,i.jsx)(k.A,{heading:o?"Some accounts need attention":r?"Your accounts are syncing":"All your transactions and financial activity in one place",description:o?"Some of your accounts are not syncing properly and require attention.":r?"We're syncing transactions from your accounts. Come back later to start bookkeeping.":"Start bookkeeping by adding transactions and accounts with the following options.",cta:(0,i.jsxs)(h.A,{column:!0,spacing:1.5,nativeStyle:{width:"100%"},children:[(0,i.jsxs)(h.A,{column:!0,spacing:1,children:[null==a?void 0:a.map(e=>(0,i.jsx)(v.A,{message:(0,i.jsxs)(F.A,{variant:"small",children:["We were unable to sync ",e.name,", which might be an issue with your bank's system."," ",(0,i.jsx)(C.A,{onClick:()=>l(j.v.FAQS_CONNECTING_YOUR_BANK),children:"Learn more"})]}),color:"red",disableAreaClick:!0,stacked:!0,cta:"Try Again",href:"/app/settings/connections",secondaryCta:"Import Transactions",secondaryHref:{import:"t"}},e.id)),null==s?void 0:s.map(e=>e.createTimeMs&&(0,w.Ay)(e.createTimeMs).isBefore((0,w.Ay)().subtract(10,"minutes"))?(0,i.jsx)(v.A,{message:(0,i.jsxs)(F.A,{variant:"mini",children:["Syncing ",e.name," is taking longer than expected, which might be an issue with your bank's system."," ",(0,i.jsx)(C.A,{onClick:()=>l(j.v.FAQS_CONNECTING_YOUR_BANK),children:"Learn more"})]}),color:"green",disableAreaClick:!0,stacked:!0,cta:"Try Again",href:"/app/settings/connections",secondaryCta:"Import Transactions",secondaryHref:{import:"t"}},e.id):(0,i.jsx)(v.A,{message:"Syncing transactions for ".concat(e.name,". This usually takes a few minutes."),color:"green",disableAreaClick:!0,stacked:!0,cta:"View Connections",href:"/app/settings/connections",secondaryCta:"Learn More",secondaryOnClick:()=>l(j.v.FAQS_CONNECTING_YOUR_BANK)},e.id))]}),(0,i.jsxs)(h.A,{spacing:1.5,children:[(0,i.jsx)(_,{title:"Sync Transactions",subheader:"Log in to business banks and credit cards to pull from",cta:(0,i.jsx)(b.A,{size:"small",variant:"contained",color:"green",fullWidth:!1,href:{bankConnectionOmniPicker:"t"},children:"Connect Account"}),onClick:()=>t({bankConnectionOmniPicker:"t"}),image:(0,i.jsx)(S.A,{src:"/img/graphics/txn-onboarding-sync.png",alt:"Illustration of ledger page and related industrial activities",width:112,height:140,multiply:!0,priority:!0})}),(0,i.jsx)(I.A,{children:(0,i.jsx)(_,{title:"Import Transactions",subheader:"Import transactions from a bank statement in bulk",cta:(0,i.jsx)(b.A,{size:"small",variant:"contained",color:"green",light:!0,transparentColor:!0,fullWidth:!1,onClick:()=>t({import:"t"}),children:"Import"}),onClick:()=>t({import:"t"}),image:(0,i.jsx)(S.A,{src:"/img/graphics/txn-onboarding-import.png",alt:"Import Category Data",width:112,multiply:!0,priority:!0,height:140})})})]}),(0,i.jsxs)(h.A,{spacing:1.5,direction:["column","row"],children:[(0,i.jsx)(h.A,{spacing:1.5,children:(0,i.jsx)(_,{title:"Upload Receipts",subheader:"Upload receipts and bills you want to organize",cta:(0,i.jsx)(b.A,{size:"small",variant:"contained",color:"green",light:!0,transparentColor:!0,fullWidth:!1,href:"/app/receipts",children:"Upload"}),onClick:()=>t("/app/receipts"),image:(0,i.jsx)(S.A,{src:"/img/graphics/txn-onboarding-receipts.png",alt:"Import receipts",width:112,multiply:!0,priority:!0,height:140})})}),(0,i.jsx)(h.A,{spacing:1.5,children:(0,i.jsx)(_,{title:"Add Manually",subheader:"Record transactions from scratch, one-by-one",cta:(0,i.jsx)(b.A,{size:"small",variant:"contained",color:"green",light:!0,transparentColor:!0,fullWidth:!1,href:{recordTransactionSessionId:"new"},children:"New"}),onClick:()=>t({recordTransactionSessionId:"new"}),image:(0,i.jsx)(S.A,{src:"/img/graphics/txn-onboarding-manual.png",alt:"Add transaction manually",width:112,multiply:!0,priority:!0,height:140})})})]})]})})};var N=t(45495),O=t(78332),L=t(24973),D=t(65367),V=t(35748),B=t(32135),q=t(40699),z=t(23012),W=t(93311),H=t(42033),U=t(94405),G=t(89028),Y=t(77269),J=t(35752),K=t(10215),Z=t(15203),Q=t(55361),X=t(2350),$=t(6
17287),ee=t(71763),en=t(42289),et=t(9573),ei=t(1806),er=t(14232),eo=t(81455),es=t(19566),ea=t(1281),el=t(8528),ec=t(70951);let ed={stickyStackComponentId:"LedgerHeader",withShadow:!1},eg=e=>{let{filterVm:n,toReviewCount:t,hideFilters:r,bgColor:s}=e,a=(0,ei.lZ)($.A.dialogProps),l=(0,ee.A)(),c=(0,H.$p)(),[d,g]=(0,er.useState)(!1),{onPressDownload:u}=(0,q.S)(es.ZV.Receipts,{filters:JSON.stringify(n.committedFilters.asCashflowTransactionFilters),format:es.AV.Zip}),p=(0,V.D)({accountId:null,isLedger:!0}),m="number"==typeof t&&t>0?t>999?"999+":String(t):void 0;return(0,i.jsx)(Q.A,{stickyProps:ed,title:p.title,bgColor:s,showBack:"never",endActions:(0,i.jsxs)(h.A,{align:"center",spacing:1,children:[(0,i.jsx)(Z.A,{scope:o.dRN.Ledger}),eo.A.canReconcile(c,l).isAllowed&&(0,i.jsx)(X.A,{title:"Reconcile accounts",children:(0,i.jsx)(b.A,{variant:"ghosted",size:"medium",color:"green",href:"/app/reports/reconciliation",startIcon:(0,i.jsx)(G.A,{path:L.jPI}),showProgress:!0,children:"Reconcile"})}),(0,i.jsx)(en.f,{setLedgerInvoiceDialogProps:a}),(0,i.jsx)(ec.A,{})]}),bottom:(0,i.jsxs)(h.A,{column:!0,flex:1,spacing:1,children:[!r&&(0,i.jsx)(N.Ay,{id:n.filterBarID,refine:n.refineFilters,children:(0,i.jsxs)(h.A,{column:!0,flex:1,children:[(0,i.jsxs)(h.A,{spacing:[.75,.75,1],align:"center",children:[(0,i.jsx)(X.A,{title:n.reviewMode?"Exit review and reset filters":"Filter uncategorized, uncleared, and unrecorded transactions to review",enterDelay:0,placement:"bottom",children:(0,i.jsx)(U.A,{selected:n.reviewMode,onChange:n.toggleReviewMode,label:m?"Review \xb7 ".concat(m):"Review",icon:(0,i.jsx)(G.A,{path:L.JSW})})}),(0,i.jsx)(el.A,{vm:n}),(0,i.jsx)(et.A,{vm:n}),(0,i.jsxs)(K.Ay,{MenuIcon:L.Bxv,tooltip:"Export options",children:[(0,i.jsx)(J.A,{onClick:()=>g(!0),title:"Export transactions"}),(0,i.jsx)(J.A,{onClick:u,title:"Export receipts"})]})]}),(0,i.jsx)(Y.A,{maskGradient:!0,children:(0,i.jsx)(ea.A,{vm:n})})]})}),(0,i.jsx)(B.A,{}),(0,i.jsx)(W.A,{}),(0,i.jsx)(z.A,{preFiltered:!0,open:d,onClose:()=>g(!1),filterVm:n,type:"transactions"}),(0,i.jsx)(D.A,{open:p.accountSelectorDialogOpen,onClose:p.handleCloseAccountSelector,accounts:p.availableAccounts,loading:p.accountsLoading,currentAccountId:null})]})})};var eu=t(50869),eh=t(28304),ep=t(52244);let em=e=>{let{filterVm:n,toReviewCount:t,hideFilters:r,bgColor:s,onSortChange:a,preferredSort:l,disablePinning:c}=e,d=(0,ei.lZ)($.A.dialogProps),g=async()=>{await n.toggleReviewMode()},u=(0,V.D)({accountId:null,isLedger:!0}),p="number"==typeof t&&t>0?t>999?"999+":String(t):void 0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Q.A,{stickyStackComponentId:"LedgerHeaderMobile",testID:"LedgerHeader",title:u.title,showBack:"never",bgColor:s,disablePinning:c,endActions:(0,i.jsxs)(h.A,{align:"center",spacing:1,children:[(0,i.jsx)(Z.A,{scope:o.dRN.Ledger}),(0,i.jsx)(eu.A,{href:"/app/receipts",tooltip:"Receipts & Files",children:(0,i.jsx)(G.A,{path:L.sEc})}),(0,i.jsx)(en.f,{setLedgerInvoiceDialogProps:d}),(0,i.jsx)(ec.A,{onSortChange:a,preferredSort:l})]}),bottom:!r&&(0,i.jsxs)(h.A,{column:!0,flex:1,spacing:1,children:[(0,i.jsx)(h.A,{flex:0,children:(0,i.jsx)(N.Ay,{syncURL:ep.A.select({default:!0,native:!1}),id:n.filterBarID,refine:n.refineFilters,children:(0,i.jsxs)(h.A,{flex:1,column:!0,align:"stretch",children:[(0,i.jsxs)(eh.A,{gutter:"responsive",spacing:[.75,1],align:"center",children:[(0,i.jsx)(U.A,{selected:n.reviewMode,onChange:g,"aria-label":"Review",label:p,icon:(0,i.jsx)(G.A,{path:L.JSW})}),(0,i.jsx)(el.A,{vm:n}),(0,i.jsx)(et.A,{vm:n})]}),(0,i.jsx)(Y.A,{maskGradient:!0,children:(0,i.jsx)(eh.A,{gutter:"responsive",flex:1,children:(0,i.jsx)(ea.A,{vm:n})})})]})})}),(0,i.jsx)(B.A,{gutter:"responsive"}),(0,i.jsx)(W.A,{gutter:"responsive"})]}),bottomGutter:"none",bottomPadding:.75}),(0,i.jsx)(D.A,{open:u.accountSelectorDialogOpen,onClose:u.handleCloseAccountSelector,accounts:u.availableAccounts,loading:u.accountsLoading,currentAccountId:null})]})},ex=e=>{let n=(0,O.A)();return(0,i.jsx)(n?em:eg,{...e})};var eA=t(81064),ef=t(3603),ej=t(80299),ew=t(30915),ey=t.n(ew),ev=t(15297),eb=t(22171),eC=t(1284),ek=t(19128),eS=t(85803),eF=t(99686);let eI={showOnlyReconcilableLines:!1},eM=e=>{var n,t,j;let{initialFilters:w}=e,y=(0,f.A)(),v=(0,ee.A)(),[b]=(0,er.useState)(()=>(null==w?void 0:w.filterCacheKey)||(0,r.A)()),[C,k]=(0,ei.L4)(N.IY.filterCacheAtom(b)),S=(0,er.useMemo)(()=>Object.assign(null!=w?w:{},C.filters),[C.filters,w]),F=(0,eA.Ay)((0,er.useMemo)(()=>({initialFilters:S}),[S])),I=(0,er.useMemo)(()=>({...F.committedFilters,asCashflowTransactionFilters:{...F.committedFilters.asCashflowTransactionFilters,view:o.pEg.OperatorLedger}}),[F.committedFilters]),{data:M}=(0,ef.cO)({skip:!v,variables:{orgId:v,...F.committedFilters.asCashflowTransactionFilters,reviewMode:"true"}}),P=null!=(j=null==M||null==(t=M.organization)||null==(n=t.cashflowTransactionsV2)?void 0:n.totalEdges)?j:0,T=(0,ej.P)((0,er.useMemo)(()=>({committedFilters:I,reviewMode:F.reviewMode,toggleReviewMode:F.toggleReviewMode}),[I,F.reviewMode,F.toggleReviewMode])),R=(0,ei.vc)(N.IY.containerFilters(F.filterBarID)),_=(0,ei.vc)(eC.A.inSelectMode);(0,er.useEffect)(()=>
1{if(F.committedFilters.loading||"true"===y.query.aiSuggestions)return;let e=y.query,n=(0,eA.gL)(e,F.committedFilters.asCashflowTransactionFilters,R);if(delete n.filters,Object.values(n).flat().length>N.rF){k({createdAt:new Date().getTime(),filters:F.committedFilters.asCashflowTransactionFilters}),y.replace({pathname:y.pathname,query:{filters:b}},void 0,{shallow:!0});return}ey().stringify(e)!==ey().stringify(n)&&y.replace({pathname:y.pathname,query:n},void 0,{shallow:!0})},[F.committedFilters.loading,F.committedFilters.asCashflowTransactionFilters]),(0,er.useEffect)(()=>{if(y.isReady&&!F.committedFilters.loading&&"true"===y.query.aiSuggestions){F.updateFilter(eA.gW.Suggestions,eA.h$,!0);let{aiSuggestions:e,...n}=y.query;y.replace({pathname:y.pathname,query:n},void 0,{shallow:!0})}},[y.isReady,y.query.aiSuggestions,F.committedFilters.loading]),(0,m.SH)(x.nT);let O=(0,er.useMemo)(()=>[.5,0],[]),[L,D]=(0,ei.L4)(a.A.dialogProps),V=(0,er.useCallback)(()=>D(null),[D]),B=(0,l.A)(),q=(0,er.useMemo)(()=>"".concat(v,":").concat(JSON.stringify(F.committedFilters.asCashflowTransactionFilters)),[F.committedFilters.asCashflowTransactionFilters,v]),z=(0,i.jsx)(ex,{bgColor:T.showOnboardingPromo?d.Ay.brown[1]:void 0,filterVm:F,toReviewCount:P,hideFilters:T.showOnboardingPromo});return T.showOnboardingPromo?(0,i.jsx)(p.A,{active:"ledger",children:(0,i.jsxs)(h.A,{column:!0,flex:1,children:[z,(0,i.jsx)(E,{connectedAccountMap:T.connectedAccountMap})]})}):(0,i.jsxs)(p.A,{active:"ledger",children:[(0,i.jsx)(u.A,{size:"stretch",children:(0,i.jsxs)(eS.n,{column:!0,spacing:O,children:[(0,i.jsx)(ex,{bgColor:T.showOnboardingPromo?d.Ay.brown[1]:void 0,filterVm:F,toReviewCount:P,hideFilters:T.showOnboardingPromo,onSortChange:T.onSortChange,preferredSort:T.preferredSort}),(0,i.jsx)(g.A,{isApp:!0,bgColor:d.UE,children:(0,i.jsx)(ek.A,{accountingMode:T.accountingMode,transactions:T.transactions,hasNextPage:T.hasNextPage,hasPreviousPage:T.hasPreviousPage,onNextPage:T.onNextPage,onPreviousPage:T.onPreviousPage,onSortChange:T.onSortChange,preferredSort:T.preferredSort,loading:!T.called||T.loading,fetchingMore:T.fetchingMore,refetch:T.refetch,called:T.called,tagTypesEnabled:B,reviewMode:T.reviewMode,toggleReviewMode:T.toggleReviewMode,defaultRowExpanded:T.defaultRowExpanded,onDefaultRowExpandedChange:T.onDefaultRowExpandedChange,noFilters:T.n
1oFilters,filterVm:F,error:T.error,suggestionCount:T.suggestionCount,reconciliationConfig:eI},q)}),(0,i.jsx)(c.JB,{inSelectMode:_})]})}),(0,i.jsx)(ev.A,{}),(0,i.jsx)(eF.A,{}),(0,i.jsx)(A.A,{}),(0,i.jsx)(s.A,{open:!!L&&"exclude"===L.variant,onClose:V,variant:"exclude",transactionId:(null==L?void 0:L.transactionId)||""}),(0,i.jsx)(s.A,{open:!!L&&"undoexclude"===L.variant,onClose:V,variant:"undoexclude",transactionId:(null==L?void 0:L.transactionId)||""}),(0,i.jsx)(eb.A,{tagTypesEnabled:B})]})};var eP=t(62867),eT=!0;let eR=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eP.bV,{title:"Ledger",description:"View transactions in your Ambrook ledger",openGraph:{description:"View transactions in your Ambrook ledger"},noindex:!0}),(0,i.jsx)(eM,{...e})]})}},e=>{e.O(0,[8992,16,4337,6247,8798,4285,6371,8185,3600,815,3246,6109,9117,915,8681,9479,4212,1792,9973,551,4485,2260,2762,4241,404,4274,7588,9843,5519,2232,4507,2500,636,6593,8792],()=>e(e.s=5737)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.