PageSourceSearch

https://molbubi.hu/assets/InvoiceDetailsPage-eF4C409C.js

js molbubi.hu collected 2026-09-24 09:40:33 UTC 5,566 bytes, 1 lines download raw bytes

1import{j as e,B as o,T as a,f as V,g as z,r as I,h as d,i as r,k as G}from"./vendor-mui-SV2jZBhJ.js";import{u as L,q as O,b as W,I as Q,P as U,r as i,s as S,w as h,x as Y,y as u}from"./main-CxZpl-xO.js";import{a as $}from"./vendor-react-DsHBsgbR.js";import"./vendor-mapbox-D8F1hoiy.js";const X=()=>{var j,y,b,v,g;const{t:n,i18n:m}=L(),l=O(),{token:p}=$(),{data:x,loading:N,error:R}=W(Q,{variables:{token:p||""},skip:!p}),t=x==null?void 0:x.invoice;if(N)return e.jsx(U,{variant:"detail"});if(R||!t)return e.jsx(o,{sx:{p:3},children:e.jsx(a,{variant:"h4",gutterBottom:!0,children:n("modules.ErrorPage.PageNotFound.heading","The page could not be found")})});const E={[i.Void]:n("invoice.status.void","Void"),[i.Uncollectible]:n("invoice.status.uncollectible","Not collectible"),[i.Paid]:n("invoice.status.paid","Paid"),[i.Open]:n("invoice.status.open","Open"),[i.Draft]:n("invoice.status.draft","Draft"),[i.CollectionFailed]:n("invoice.status.collection_failed","Payment failed")},F=t.totalVat||0,M=t.vatRate||0;return e.jsxs(o,{children:[e.jsxs(o,{sx:{display:"flex",justifyContent:"space-between",mb:2},children:[e.jsxs(o,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[e.jsx(a,{variant:"h4",component:"h1",gutterBottom:!0,children:n("invoice","Invoice")}),e.jsx(a,{variant:"body2",color:"text.secondary",paragraph:!0,children:S(t.createdAt,l)})]}),e.jsxs(o,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",textAlign:"right"},children:[e.jsxs(a,{variant:"body2",sx:{mt:4,mb:1},children:[n("modules.Profile.YourData.table.label.status","Status"),":"," ",e.jsx(a,{component:"span",fontWeight:"bold",children:E[t.status]})]}),e.jsx(a,{variant:"body2",paragraph:!0,children:n("modules.Receipt.invoiceNumber","Invoice #{id}",{id:t.id})})]})]}),t.status===i.Draft&&t.totalLimit&&t.periodEnd&&e.jsx(a,{variant:"body2",color:"text.secondary",textAlign:"right",paragraph:!0,sx:{mb:4},children:n("modules.Profile.Invoices.dueDate","Due date: {0} ( or when exceeds {1})",{0:S(t.periodEnd,l),1:`${t.totalLimit} ${t.currency}`})}),e.jsx(o,{sx:{mb:2},children:e.jsxs(V,{size:"small",children:[e.jsxs(z,{children:[(j=t.items)==null?void 0:j.map(c=>{var f,T,D,P,_,k,A,C;if(c.__typename==="InvoiceItemTrip"){const s=c.trip,w=((T=(f=s.startDock)==null?void 0:f.dockGroup)==null?void 0:T.title)||((P=(D=s.startDock)==null?void 0:D.dockGroup)==null?void 0:P.name)||"—",B=((k=(_=s.endDock)==null?void 0:_.dockGroup)==null?void 0:k.title)||((C=(A=s.endDock)==null?void 0:A.dockGroup)==null?void 0:C.name)||"—";return e.jsxs(I.Fragment,{children:[e.jsx(d,{children:e.jsx(r,{colSpan:2,children:e.jsx(a,{variant:"body2",children:n("modules.Receipt.orderTypes.fromStation","From {station} ({date})",{station:w,date:h(s.startedAt,l)})})})}),e.jsx(d,{children:e.jsx(r,{colSpan:2,children:e.jsx(a,{variant:"body2",children:n("modules.Receipt.orderTypes.toStation","To {station} ({date})",{station:B,date:h(s.endedAt,l)})})})}),e.jsxs(d,{children:[typeof s.duration=="number"&&e.jsx(r,{children:e.jsx(a,{variant:"body2",children:n("modules.Receipt.orderTypes.totalTime","Total time: {totalTime}",{totalTime:Y({minutes:s.duration/60,t:n})})})}),e.jsx(r,{align:"right",children:e.jsx(a,{variant:"body2",children:u(c.amount,t.currency,m.language)})})]})]},c.id)}else if(c.__typename==="InvoiceItemAdjustment")return e.jsx(I.Fragment,{children:e.jsxs(d,{children:[e.jsx(r,{children:e.jsx(a,{variant:"body2",children:n("invoice.adjustment","Adjustment")})}),e.jsx(r,{align:"right",children:e.jsx(a,{variant:"body2",children:u(c.amount,t.currency,m.language)})})]})},c.id);return null}),t.status===i.Draft&&t.periodEnd&&e.jsx(d,{children:e.jsx(r,{colSpan:2,children:" "})}),e.jsxs(d,{children:[e.jsx(r,{children:e.jsx(a,{variant:"body2",fontWeight:"bold",children:n("total","Total")})}),e.jsx(r,{align:"right",children:e.jsx(a,{variant:"body2",fontWeight:"bold",children:u(t.total,t.currency,m.language)})})]})]}),e.jsx(G,{children:e.jsxs(d,{children:[e.jsx(r,{children:e.jsx(a,{variant:"body2",fontSize:"0.875rem",color:"text.secondary",children:n("modules.Receipt.orderTypes.vat","VAT")})}),e.jsxs(r,{align:"right",children:[e.jsx(a,{variant:"body2",fontSize:"0.875rem",color:"text.secondary",children:u(F,t.currency,m.language)}),e.jsxs(a,{variant:"body2",fontSize:"0.875rem",color:"text.secondary",children:[M.toFixed(2),"%"]})]})]})})]})}),e.jsx(o,{sx:{mb:4},children:e.jsxs(o,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:[!((y=t.completedPaymentTransaction)!=null&&y.transactionNumber)&&t.status===i.Paid&&e.jsx(o,{component:"li",sx:{mb:1},children:e.jsx(a,{variant:"body2",children:n("could_not_load_payment_transaction","Could not load payment transaction")})}),((b=t.completedPaymentTransaction)==null?void 0:b.transactionNumber)&&e.jsx(o,{component:"li",sx:{mb:1},children:e.jsx(a,{variant:"body2",children:n("transaction_number_str","Transaction number: {transactionNumber}",{transactionNumber:t.completedPaymentTransaction.transactionNumber})})}),t.paidAt&&e.jsx(o,{component:"li",sx:{mb:1},children:e.jsx(a,{variant:"body2",children:n("date_completed_at","Date: {completedAt}",{completedAt:h(t.paidAt,l)})})}),((g=(v=t.completedPaymentTransaction)==null?void 0:v.paymentMethod)==null?void 0:g.__typename)==="Card"&&t.completedPaymentTransaction.paymentMethod.last4&&e.jsx(o,{component:"li",sx:{mb:1}
1,children:e.jsx(a,{variant:"body2",children:n("card_creditCardMasked","Card: {creditCardMasked}",{creditCardMasked:t.completedPaymentTransaction.paymentMethod.last4})})})]})})]})};export{X as InvoiceDetailsPage};

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.