diff --git a/app/lib/actions/printActions.ts b/app/lib/actions/printActions.ts index 7c8c04f..300043e 100644 --- a/app/lib/actions/printActions.ts +++ b/app/lib/actions/printActions.ts @@ -45,7 +45,8 @@ export const fetchBarcodeDataForPrint = withUser(async (user: AuthenticatedUser, bills: 1, barcodeImage: 1, hub3aText: 1, - payedAmount: 1 + payedAmount: 1, + paid: 1 } }) .toArray(); @@ -55,11 +56,8 @@ export const fetchBarcodeDataForPrint = withUser(async (user: AuthenticatedUser, for (const location of locations) { for (const bill of location.bills) { - // Only include bills that have barcode images - if ( ( bill.hub3aText && bill.hub3aText.trim() !== "") || - // LEGACY SUPPORT ... untill all bills have been migrated - (bill.barcodeImage && bill.barcodeImage.trim() !== "") - ) { + // Only include bills that have barcode images and are NOT PAID + if ( ( bill.hub3aText && bill.hub3aText.trim() !== "" && !bill.paid) ) { printData.push({ locationName: location.name, billName: bill.name, diff --git a/app/ui/PrintPreview.tsx b/app/ui/PrintPreview.tsx index 27ca889..11c731f 100644 --- a/app/ui/PrintPreview.tsx +++ b/app/ui/PrintPreview.tsx @@ -24,6 +24,12 @@ export const PrintPreview: React.FC = ({ data, year, month, t return ( <> {/* Print-specific CSS styles */} +