1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./B6foKjFB.js","./CFxGRstO.js","./entry.CCRtzfah.css","./QjJsDpFa.js"])))=>i.map(i=>d[i]); 2import{d as F,u as O,a as P,c as k,w as B,b as V,o as j,e as c,f as l,g as t,h as e,i as p,_ as E,t as o,j as _,k as D,l as R,m as S,r as m,n as z,p as M}from"./CFxGRstO.js";import{_ as L}from"./DRqkmzc8.js";import{_ as T}from"./6HuN2jx9.js";import{p as w}from"./CCcf-sl9.js";import{u as q}from"./0Zil6o2A.js";import{O as G}from"./CICNJ14-.js";import{_ as H}from"./DlAUqK2U.js";import"./B6H6uuii.js";import"./Cpj98o6Y.js";import"./BWBHGvIx.js";import"./CwOHyHLb.js";import"./owSR78tJ.js";import"./C5U6HIMD.js";import"./CbPSoDvq.js";const J={key:0,class:"receipt"},K={class:"heding tw-flex tw-gap-6 tw-items-center"},Q={class:"tw-py-4 company-address"},U={class:"tw-text-sm"},W={class:"invoice-body tw-px-6 tw-pb-12"},X={class:"title tw-text-h3 tw-mb-2"},Y={key:0,class:"subtext"},Z={key:1},tt={class:"subtitle tw-text-h5 tw-mb-2"},et={key:0},ot={key:1},nt={key:2},at={key:3},st={key:4},it={class:"pay-table"},ct={class:"tw-text-sm"},lt={scope:"col"},rt={scope:"col"},dt={class:"tw-p-1"},_t={key:1,class:"warning"},ut=F({__name:"Invoice",props:{profileRoute:{}},async setup(g){let r,v;const{t:n}=O(),h=S(()=>n("invoice.company_name")),$=n("invoice.address"),b=P();if(!b.params.id)throw k({statusCode:404,statusMessage:n("invoice.not_found")});const a=m(),s=m();try{const{order:i,invoiceDetails:u}=([r,v]=B(()=>V(`/api/account/invoice?order_id=${b.params.id}`)),r=await r,v(),r).value;a.value=i,s.value=u}catch{throw k({statusCode:404,statusMessage:n("invoice.not_found")})}const{formatDate:f}=q(),I=f(a.value.payments[0].end_date,"long"),A=f(a.value.creation_date,"long"),N=f(a.value.expire_date,"long"),x=m(null);return s.value.complete&&j(async()=>{async function i(){const{jsPDF:u}=await z(async()=>{const{jsPDF:d}=await import("./B6foKjFB.js");return{jsPDF:d}},__vite__mapDeps([0,1,2,3]),import.meta.url);await m(new u("p","pt","a4",!1)).value.html(x.value,{callback(d){d.save("invoice.pdf")}})}await i()}),(i,u)=>{const y=E,d=L,C=T;return c(),l("div",{id:"invoice",ref_key:"invoice",ref:x,class:"tw-mx-auto tw-h-1/4"},[t(a)&&t(s)&&t(s).complete?(c(),l("div",J,[e("header",K,[e("div",null,[p(y,{src:"/images/account/logo-small.png",alt:t(h),width:"50",height:"44",class:"logo tw-inline tw-max-w-none"},null,8,["alt"])]),e("div",Q,[e("p",U,o(t(h)),1),e("p",null,o(i.$t("invoice.postal_address_label"))+": "+o(t($)),1)]),e("div",null,[p(y,{src:"/images/account/stamp_paid.png",alt:t(h),width:"120",class:"paid tw-inline tw-max-w-none"},null,8,["alt"])])]),e("div",W,[e("h1",X,o(t(n)("invoice.receipt"))+" #DS-"+o(t(a).id),1),t(a).status===t(G).PAID?(c(),l("div",Y,[e("p",null,o(t(n)("invoice.date_paid"))+": "+o(t(I)),1),e("p",null,o(t(n)("invoice.payment_method"))+": "+o(t(a).payments[0].system_name),1)])):(c(),l("div",Z,[e("p",null,o(t(n)("invoice.date"))+": "+o(t(A)),1),e("p",null,o(t(n)("invoice.due_date"))+": "+o(t(N)),1)])),e("h2",tt,o(t(n)("invoice.billing_information")),1),e("div",null,[e("dl",null,[e("dt",null,o(t(n)("invoice.email"))+":",1),e("dd",null,o(t(s).email),1)]),t(s).first_name&&t(s).last_name?(c(),l("dl",et,[e("dt",null,o(t(n)("invoice.full_name"))+":",1),e("dd",null,o(`${t(s).first_name} ${t(s).last_name}`),1)])):_("",!0),t(s).address?(c(),l("dl",ot,[e("dt",null,o(t(n)("invoice.street"))+":",1),e("dd",null,o(t(s).address),1)])):_("",!0),t(s).city?(c(),l("dl",nt,[e("dt",null,o(t(n)("invoice.city"))+":",1),e("dd",null,o(t(s).city),1)])):_("",!0),t(s).zip?(c(),l("dl",at,[e("dt",null,o(t(n)("invoice.zip"))+":",1),e("dd",null,o(t(s).zip),1)])):_("",!0),t(s).country?(c(),l("dl",st,[e("dt",null,o(t(n)("invoice.country"))+":",1),e("dd",null,o(t(s).country),1)])):_("",!0)]),e("div",it,[e("table",ct,[e("thead",null,[e("tr",null,[e("th",lt,o(t(n)("invoice.item")),1),e("th",rt,o(t(n)("invoice.total")),1)])]),e("tbody",null,[e("tr",null,[e("td",null,o(t(n)("invoice.order"))+" #"+o(t(a).id),1),e("td",null,o(("priceFormat"in i?i.priceFormat:t(w))(t(a).total-t(a).tax,t(a).currency_abbr,t(a).currency_sign_before_value)),1)]),e("tr",null,[e("td",null,o(t(n)("invoice.vat"))+" ("+o(`${t(a).country_code} ${t(a).vat?`${t(a).vat*100}%`:t(a).vat_number||""}`)+")",1),e("td",null,o(("priceFormat"in i?i.priceFormat:t(w))(t(a).tax,t(a).currency_abbr,t(a).currency_sign_before_value)),1)])])]),e("div",dt,[e("strong",null,o(t(n)("invoice.total"))+": "+o(("priceFormat"in i?i.priceFormat:t(w))(t(a).total,t(a
2).currency_abbr,t(a).currency_sign_before_value)),1)])])])])):(c(),l("div",_t,[D(o(t(n)("invoice.warning")),1),p(d),p(C,{to:g.profileRoute},{default:R(()=>[D(o(t(n)("invoice.profile")),1)]),_:1},8,["to"])]))],512)}}}),pt=Object.assign(H(ut,[["__scopeId","data-v-76197260"]]),{__name:"AccountOrderInvoice"}),At=F({__name:"[id]",setup(g){return(r,v)=>{const n=pt;return c(),M(n,{"profile-route":"/account/profile"})}}});export{At as default};
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.