import{j as e,H as x,L as c}from"./app-BQEFzdw6.js";import{A as i}from"./AppLayout-kozc03ce.js";import{P as l}from"./PageHeader-Bj1OQnqr.js";import{f as n,a as o}from"./formatters-ClI693-F.js";import"./useThemeColor-qPCpc713.js";import"./dayjs.min-BDUBcDj6.js";function f({payment:s}){var r,d,a,t;return e.jsxs(i,{children:[e.jsx(x,{title:`Payment ${s.code}`}),e.jsx(l,{title:`Vendor Payment: ${s.code}`,back:route("accounts.vendor-payments.index")}),e.jsx("div",{className:"p-4 sm:p-6 max-w-2xl mx-auto",children:e.jsx("div",{className:"card p-6",children:e.jsxs("dl",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-4",children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Payment Code"}),e.jsx("dd",{className:"font-mono font-medium text-primary-600",children:s.code})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Vendor"}),e.jsx("dd",{children:e.jsx(c,{href:route("procurement.vendors.show",(r=s.vendor)==null?void 0:r.id),className:"text-primary-600 hover:underline",children:(d=s.vendor)==null?void 0:d.name})})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Purchase Order"}),e.jsx("dd",{children:s.purchase_order?e.jsx(c,{href:route("procurement.purchase-orders.show",s.purchase_order.id),className:"text-primary-600 hover:underline",children:s.purchase_order.code}):e.jsx("span",{className:"text-gray-400",children:"—"})})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Amount"}),e.jsx("dd",{className:"font-semibold text-red-600 text-lg",children:n(s.amount)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Payment Date"}),e.jsx("dd",{children:o(s.payment_date)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Method"}),e.jsx("dd",{className:"capitalize",children:(a=s.payment_method)==null?void 0:a.replace(/_/g," ")})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Account"}),e.jsx("dd",{children:((t=s.account_head)==null?void 0:t.name)??"—"})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Reference"}),e.jsx("dd",{children:s.reference??"—"})]}),s.notes&&e.jsxs("div",{className:"col-span-2",children:[e.jsx("dt",{className:"text-xs text-gray-500 uppercase",children:"Notes"}),e.jsx("dd",{className:"text-sm",children:s.notes})]})]})})})]})}export{f as default};
