[16.0][FIX] pms: tourist tax count with partially registered guests - #432
Open
DarioLodeiros wants to merge 1 commit into
Open
[16.0][FIX] pms: tourist tax count with partially registered guests#432DarioLodeiros wants to merge 1 commit into
DarioLodeiros wants to merge 1 commit into
Conversation
The per-person tourist tax quantity was computed only from the checkin partners whose birthdate passes the product age filter. As soon as one guest registered with a birthdate, the count dropped to those registered guests, ignoring the rest of the declared occupancy. Registered guests without a birthdate were excluded as well. Count guests with a known birthdate by age and fill in the rest from the declared occupancy (adults are assumed to meet the minimum age, declared children to stay below it), so a partial check-in never lowers the tax below what the reservation declares.
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.
The per-person tourist tax quantity was computed only from the checkin partners whose birthdate passes the product age filter. As soon as one guest registered with a birthdate, the quantity dropped to those registered guests, ignoring the rest of the declared occupancy. Registered guests without a birthdate were excluded as well.
Example (tax with
tourist_tax_min_age = 16): a reservation for 3 adults is created and the tax is charged for 3 guests (fallback to declared adults). One guest completes the check-in with an adult birthdate and the tax silently drops to 1 guest per night.Fix: guests with a known birthdate are classified by age; the rest of the declared occupancy fills in the count (adults are assumed to meet the minimum age, declared children to stay below it). A partial check-in can no longer lower the tax below what the reservation declares, while real birthdates still grant age exemptions.
Includes regression tests for the partial check-in scenarios (all-adult, adults with declared children, and registered guest without birthdate).