fix: improve print layout and exclude paid bills

- Force white background on print preview page regardless of color scheme
- Exclude paid bills from print view
- Add proper spacing for printed barcodes
- Remove legacy barcodeImage support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-22 15:14:13 +01:00
parent 6cf23a891e
commit ce2aa7a101
2 changed files with 11 additions and 7 deletions

View File

@@ -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,