Skip to content

[16.0][FIX] pms: tourist tax count with partially registered guests - #432

Open
DarioLodeiros wants to merge 1 commit into
OCA:16.0from
DarioLodeiros:16.0-fix-tourist-tax-partial-checkin
Open

[16.0][FIX] pms: tourist tax count with partially registered guests#432
DarioLodeiros wants to merge 1 commit into
OCA:16.0from
DarioLodeiros:16.0-fix-tourist-tax-partial-checkin

Conversation

@DarioLodeiros

Copy link
Copy Markdown
Member

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).

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants