Remove billedTo filtering to show all bills to landlord

The billedTo field indicates payment responsibility (tenant vs landlord),
not viewing permissions. Landlords should see and manage ALL bills.

Changes:
- LocationCard: Display all bills regardless of billedTo value
- LocationCard: Calculate monthlyExpense from all paid bills
- HomePage: Include all paid bills in monthlyExpense aggregation
- printActions: Print all bills with barcodes regardless of billedTo
- locationActions: Add billedTo property to fetchAllLocations result

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-11-17 19:32:54 +01:00
parent fa1d04480f
commit aee6dc0932
4 changed files with 13 additions and 11 deletions

View File

@@ -255,6 +255,7 @@ export const fetchAllLocations = withUser(async (user:AuthenticatedUser, year:nu
_id: "$$bill._id",
name: "$$bill.name",
paid: "$$bill.paid",
billedTo: "$$bill.billedTo",
payedAmount: "$$bill.payedAmount",
hasAttachment: { $ne: ["$$bill.attachment", null] },
},
@@ -273,6 +274,7 @@ export const fetchAllLocations = withUser(async (user:AuthenticatedUser, year:nu
_id: { $toString: "$$bill._id" },
name: "$$bill.name",
paid: "$$bill.paid",
billedTo: "$$bill.billedTo",
payedAmount: "$$bill.payedAmount",
hasAttachment: "$$bill.hasAttachment",
},