353d93ad560695a97d057b028e38905fb8eb1e13
Clinics' accountants want a paper / PDF for every payment they record.
Rather than pull in a PDF lib (jspdf / react-pdf etc.) and ship another
~150KB to every user, did this with print-CSS: a server-rendered receipt
page that prints cleanly.
- /finance/payments/[paymentId]/receipt: server component, loads the
Payment row, refuses 404/notFound unless the viewer is one of the
two parties on it. Resolves lab vs clinic by direction (inflow ⇒
tenant is lab) and pulls each side's tenant_settings (companyName,
taxId, address) for the header.
- Layout: card with header (lab name + VKN + address), two-column
block (tahsil edilen / ödeme tarihi), bold amount, method + status
row, optional note. Footer shows the receipt id + creation date.
- ReceiptControls (client island): back-to-finance button and a
'Yazdır / PDF' button calling window.print(). Both hidden in print
via 'print:hidden'.
- my-pending-payments-card gets a 'Makbuz' link per row alongside
'Geri al', so a clinic can grab a printable copy of any payment
they've submitted — pending or confirmed.
Description
No description provided
Languages
TypeScript
99.2%
CSS
0.7%