Repository navigation
Give every hotel accurate rooms, night audit, and group holds - #407
Closed
telivity-otaip wants to merge 8 commits into
Closed
telivity-otaip wants to merge 8 commits into
telivity-otaip wants to merge 8 commits into
Conversation
Creating or retiring a room now recounts active rooms in the same transaction. A room that is occupied or tied to an in-house stay cannot be retired. Migration 0033 reconciles hotels that already drifted. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Occupancy, the financial summary, and the occupancy trend use the count of active rooms already loaded for the report. properties.total_rooms is only the fallback when a property has no active rooms yet. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Room charges and rooms sold only count stays that cover the business date. Overdue departures are recorded and the date still rolls. An unattended close extends one night only when the property opts in and the room can be held. POST /night-audit/run-due walks every active hotel in its IANA timezone after the local cutoff. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
POST /groups/blocks can carry allocations, and PUT /groups/blocks/:id/inventory/span sets the same hold on every night of a span. Sellable availability is checked for the whole span before any row is written, and rooms already picked up are kept. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
The dashboard returns overdueTasksCount for pending, assigned, and in-progress tasks whose service date is before the property's business date. Seed cleanup is unchanged and real tasks are not skipped. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Pending design and UX review. After a close, the night audit screen lists overdue_departure warnings and links to the front desk and reservations. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
Pending design and UX review. The inventory dialog can apply one room count to every night of the block, and the night audit screen has copy for overdue departures. Co-authored-by: telivity-otaip <telivity-otaip@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every property gets the same inventory count, night-audit close, and group-block behavior.
properties.total_rooms. An occupied room, or a room linked to an in-house stay, cannot be retired. Migration0033_sync_property_total_rooms.sqlreconciles existing rows.properties.total_roomsis only the fallback when a property has no active rooms.arrival <= date < departure). Overdue departures are recorded on the audit asoverdue_departurewarnings andoverdueDeparturesCount, and the business date still rolls. Unattended mode extends one night only whensettings.nightAudit.autoExtendOverdueStaysis true and the room can be held.POST /api/v1/night-audit/run-duecloses every active property in its own IANA timezone aftersettings.nightAudit.autoCloseHour(default 2). A missing or invalid timezone is an error for that property and does not stop the others. Auth isHAIP_SERVICE_TOKEN(503 if unset, 401 if wrong).scripts/cron/night-audit-due.shcalls it. It is off unless you schedule it.POST /groups/blocksacceptsallocations, andPUT /groups/blocks/:id/inventory/spanwrites every night of a span in one transaction after a full-span availability check.overdueTasksCountfor open tasks dated before the property business date.UI
apps/dashboard/src/pages/NightAudit.tsx: shows overdue departure warnings.apps/dashboard/src/pages/Groups.tsx(plus en/fr copy): allocate a block across its whole stay.Tests
pnpm lint,pnpm typecheck, andpnpm buildpass. 2701 tests across 321 files pass.