Skip to content

Multi-tenant revenue: caching, rounding, timezone - #136

Open
harry3098 wants to merge 1 commit into
Base360-AI:mainfrom
harry3098:main
Open

Multi-tenant revenue: caching, rounding, timezone#136
harry3098 wants to merge 1 commit into
Base360-AI:mainfrom
harry3098:main

Conversation

@harry3098

Copy link
Copy Markdown

Backend: include tenant_id in cache keys (cache.py) to avoid cross-tenant collisions; return total_revenue as a rounded Decimal string in dashboard API (dashboard.py) using ROUND_HALF_UP for consistent monetary formatting. Reservations service (reservations.py) updated signature to accept tenant_id and sketched timezone-aware start/end datetimes (uses ZoneInfo) to ensure month boundaries respect property timezone. Frontend: make Dashboard tenant-aware (AuthContext) and filter properties by tenant; RevenueSummary improved formatting, typing and uses simulatedTenant when calling SecureAPI. These changes improve multi-tenancy correctness, monetary precision, and timezone handling.

Backend: include tenant_id in cache keys (cache.py) to avoid cross-tenant collisions; return total_revenue as a rounded Decimal string in dashboard API (dashboard.py) using ROUND_HALF_UP for consistent monetary formatting. Reservations service (reservations.py) updated signature to accept tenant_id and sketched timezone-aware start/end datetimes (uses ZoneInfo) to ensure month boundaries respect property timezone. Frontend: make Dashboard tenant-aware (AuthContext) and filter properties by tenant; RevenueSummary improved formatting, typing and uses simulatedTenant when calling SecureAPI. These changes improve multi-tenancy correctness, monetary precision, and timezone handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant