PageSourceSearch

https://www.hajurbuwa.com/_next/static/chunks/pages/account/finance/invoice/[id]-05f32d7ee8e0589c.js

js hajurbuwa.com collected 2026-10-02 01:31:54 UTC 4,832 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5555],{6072:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/finance/invoice/[id]",function(){return t(8788)}])},8788:function(e,a,t){"use strict";t.r(a);var s=t(5893),l=t(7294),n=t(1664),c=t.n(n),r=t(1163),i=t(3636),o=t(9558),d=t(416),u=t(5773),x=t(4357);let m="rounded-xl border border-backgroundColor bg-white p-4";function v(e){let{label:a,value:t,strong:l=!1}=e;return(0,s.jsxs)("div",{className:"flex gap-2 ".concat(l?"text-sm font-bold text-black":"text-xs"),children:[(0,s.jsx)("span",{className:"flex-1 ".concat(l?"":"text-grey"),children:a}),(0,s.jsx)("span",{className:"tabular-nums text-black",children:t})]})}a.default=(0,o.Z)(function(e){var a,t;let{access:n,initialiseBase:o}=e,h=(0,r.useRouter)(),b=Array.isArray(h.query.id)?h.query.id[0]:h.query.id,[p,j]=(0,l.useState)(null),[_,f]=(0,l.useState)(!0);(0,l.useEffect)(()=>{h.isReady&&b&&(o(),f(!0),(0,x.d5)(b).then(j).catch(()=>j(null)).finally(()=>f(!1)))},[h.isReady,b]);let y=null;if(_||p){if(p){let{product:e,delivery:a,seller:t,all:l,showSplit:n}=(0,u.nS)(p),r=(0,u.j8)(p.strict_order_discount_pct);y=(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h1",{className:"flex-1 text-xl font-bold text-black",children:p.invoice_number}),(0,s.jsx)("button",{type:"button",onClick:()=>window.print(),className:"rounded-full border border-gray-300 px-4 py-1.5 text-sm font-semibold hover:text-primary print:hidden",children:"Print / PDF"})]}),(0,s.jsxs)("div",{className:"".concat(m," space-y-1.5"),children:[(0,s.jsx)(v,{label:"Invoice date",value:(0,u.v0)(p.invoice_date)}),(0,s.jsx)(v,{label:"Due",value:(0,u.v0)(p.due_date)}),(0,s.jsx)(v,{label:"Status",value:(0,u.Cf)(p.status)})]}),(0,s.jsxs)("div",{className:"".concat(m," space-y-1.5"),children:[(0,s.jsx)(v,{label:"Subtotal",value:(0,u.rs)(p.subtotal)}),l>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v,{label:"Discount",value:"− ".concat((0,u.rs)(l))}),n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v,{label:"\xb7 Product discount",value:"− ".concat((0,u.rs)(e))}),(0,s.jsx)(v,{label:"\xb7 Delivery discount",value:"− ".concat((0,u.rs)(a))})]}),t>0&&(0,s.jsx)(v,{label:"\xb7 Seller discount".concat(r?" (".concat(r,")"):""),value:"− ".concat((0,u.rs)(t))})]}),p.delivery_charge?(0,s.jsx)(v,{label:"Delivery",value:(0,u.rs)(p.delivery_charge)}):null,p.tax_total?(0,s.jsx)(v,{label:"Tax",value:(0,u.rs)(p.tax_total)}):null,(0,s.jsx)(v,{label:"Total",value:(0,u.rs)(p.total_amount),strong:!0}),(0,s.jsx)(v,{label:"Paid",value:(0,u.rs)(p.amount_paid)}),(0,s.jsx)(v,{label:"Balance due",value:(0,u.rs)(p.balance_due),strong:!0})]}),(0,s.jsx)("h2",{className:"pt-2 text-sm font-bold uppercase tracking-wide text-grey",children:"Orders on this invoice"}),p.orders.map(e=>{var a;return(0,s.jsxs)(c(),{href:"/order?order_id=".concat(e.order_id),className:"".concat(m," block hover:bg-backgroundLightColor"),children:[(0,s.jsxs)("div",{className:"flex gap-2 text-sm",children:[(0,s.jsxs)("span",{className:"flex-1 font-bold text-black",children:["#",null!==(a=e.order_code)&&void 0!==a?a:e.order_id]}),(0,s.jsx)("span",{className:"tabular-nums text-black",children:(0,u.rs)(e.amount)})]}),(0,s.jsxs)("div",{className:"mt-1 text-xs text-grey",children:[(0,u.v0)(e.order_placed)," \xb7 ",e.total_items," item",1===e.total_items?"":"s",e.product_name?" \xb7 ".concat(e.product_name):""]})]},e.order_id)}),p.payments.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:"pt-2 text-sm font-bold uppercase tracking-wide text-grey",children:"Payments"}),p.payments.map((e,a)=>(0,s.jsxs)("div",{className:m,children:[(0,s.jsxs)("div",{className:"flex gap-2 text-sm",children:[(0,s.jsx)("span",{className:"flex-1 text-black",children:e.payment_number}),(0,s.jsx)("span",{className:"tabular-nums text-success-primary",children:(0,u.rs)(e.amount)})]}),(0,s.jsxs)("div",{className:"mt-1 text-xs text-grey",children:[(0,u.v0)(e.payment_date),e.method?" \xb7 ".concat((0,u.Y)(e.method)):""]})]},"".concat(e.payment_number,"-").concat(a)))]})]})}}else y=(0,s.jsx)("p",{className:"py-12 text-center text-grey",children:n.accessGranted?"This invoice could not be found.":"Sign in to see this invoice."});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Z,{type:"page",name:null!==(a=null==p?void 0:p.invoice_number)&&void 0!==a?a:"Invoice",path:"/account/finance/invoice/".concat(null!=b?b:""),noindex:!0}),(0,s.jsx)(i.Z,{backTitle:null!==(t=null==p?void 0:p.invoice_number)&&void 0!==t?t:"Invoice",wholePageLoader:_,accessGranted:n.accessGranted,children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl py-4",children:y})})]})})}},function(e){e.O(0,[4838,3365,6660,5675,999,8738,3636,2474,2888,9774,179],function(){return e(e.s=6072)}),_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.