From 907a7414b4332d7f580e99f60239ff712872a9e1 Mon Sep 17 00:00:00 2001 From: SJCoetz Date: Mon, 3 Aug 2026 16:23:12 +0200 Subject: [PATCH] fix(pdf): repeat table headers on every page in list reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the thead out of the table and onto the page itself with the @react-pdf/renderer 'fixed' prop, so reports that span multiple A4 pages still label their columns. Without this, page 2+ of a long stock-orders report or stocktake would show data without column headers — making the right-hand 'Actual' column on the stocktake and the value columns on the orders list unreadable. Co-authored-by: Orca --- src/lib/pdf/stock-item-stocktake-document.tsx | 19 +++++++++-------- src/lib/pdf/stock-purchase-list-document.tsx | 21 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/lib/pdf/stock-item-stocktake-document.tsx b/src/lib/pdf/stock-item-stocktake-document.tsx index 04e476e..2fb67ac 100644 --- a/src/lib/pdf/stock-item-stocktake-document.tsx +++ b/src/lib/pdf/stock-item-stocktake-document.tsx @@ -65,21 +65,22 @@ export function StockItemStocktakeDocument({ + + Name + SKU + Location + Unit + Current qty + Actual + Supplier + + {items.length === 0 ? ( No active stock items. ) : ( - - Name - SKU - Location - Unit - Current qty - Actual - Supplier - {items.map((item) => ( {item.name} diff --git a/src/lib/pdf/stock-purchase-list-document.tsx b/src/lib/pdf/stock-purchase-list-document.tsx index 6154d47..1dd622c 100644 --- a/src/lib/pdf/stock-purchase-list-document.tsx +++ b/src/lib/pdf/stock-purchase-list-document.tsx @@ -74,20 +74,21 @@ export function StockPurchaseListDocument({ + + Number + Supplier + Status + Ordered (R) + Received (R) + Items + Created + + + {rows.length === 0 ? ( No stock orders. ) : ( - - Number - Supplier - Status - Ordered (R) - Received (R) - Items - Created - - {rows.map((row) => ( {row.purchase_number}