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:
@@ -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",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user