Hi

I have a DBL room with a base price of 100$.

I change to "per person per night" price calculation - rooms continues using "per unit" price as "per person" price.

If I choose 1 DBL room for 2 persons, it shows a subtotal of 200$.

Than, as I place a booking, the price is doubled and the room costs 400$ (1 room / 2 guests) in the shopping cart and at checkout.

Comments

juves created an issue.

juves’s picture

If i go to the booking->edit booking, it says "4 Guests / The total number of people staying in this unit (including adults and children)."

Once again, the room has the capacity min 2 / max 2 and only 1 room is ordered.

juves’s picture

Found the bug for the second problem

rooms_booking_manager.module : 1926

$persons = (isset($form_state['values'][$type][$price_level]['fieldset'][$i]['persons'])) ?
            $form_state['values'][$type][$price_level]['fieldset'][$i]['persons'] + $unit['unit']->min_sleeps :
                        ((isset($booking_parameters[$i]['adults'])) ? 
                                    $booking_parameters[$i]['adults'] : $unit['unit']->min_sleeps);

I dont know php and dont really understand the code, but I think if $form_state[...]['persons'] is set, there is no need to add "$unit['unit']->min_sleeps" to it, in my case this doubles the group size and the price.