I tried to choose "Canceled" (or "Booking Canceled") status for an order manually, but the system didn't released the dates that were scheduled on this order. Just when I deleted the order the dates became available again.

Please note that is unusual to delete an order. People want to have control over this situation, and most will want to have the historical transactions made succesfully or not in the website.

Comments

ronald_istos’s picture

Priority: Normal » Critical
ronald_istos’s picture

Title: Rooms should update the schedule for an order with "Cancelled" status » How should Rooms handle Commerce Orders?
Category: bug » task
Priority: Critical » Major

We have updated the way we handle orders. Here is the logic right now:

If you create a booking an order is automatically created to reflect that booking.

If you changed that booking (re-assign unit, change dates, etc) the order that was previously associated with the booking is set to cancelled and a new order is created.

If you delete an order associated with a Booking and that Booking is currently referring to that order that Booking is deleted.

TheoRichel’s picture

After some testing we want to clean up so we can start afresh. However:

1. deleting of orders often ends in:

    Notice: Trying to get property of non-object in UnitCalendar->__construct() (regel 20 van /storage/web/public/sites/www.slapeninyerseke.nl/sites/all/modules/rooms/modules/rooms_availability/includes/rooms_availability.unit_calendar.inc).
    PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'd4' cannot be null: UPDATE {rooms_availability} SET d4=:db_update_placeholder_0, d5=:db_update_placeholder_1 WHERE (unit_id = :db_condition_placeholder_0) AND (month = :db_condition_placeholder_1) AND (year = :db_condition_placeholder_2) ; Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => [:db_condition_placeholder_0] => 20 [:db_condition_placeholder_1] => 7 [:db_condition_placeholder_2] => 2013 ) in UnitCalendar->addMonthEvent() (regel 482 van /storage/web/public/sites/www.slapeninyerseke.nl/sites/all/modules/rooms/modules/rooms_availability/includes/rooms_availability.unit_calendar.inc).

2. When we open the Bookings page we get this message:

Notice: Trying to get property of non-object in rooms_booking_handler_unit_field->render() (regel 45 van /storage/web/public/sites/www.slapeninyerseke.nl/sites/all/modules/rooms/modules/rooms_booking/views/rooms_booking_handler_unit_field.inc). We get this message for each of the 6 bookings in the list.

3. When we try to delete the booking we get the message:

    Notice: Trying to get property of non-object in UnitCalendar->__construct() (regel 20 van /storage/web/public/sites/www.slapeninyerseke.nl/sites/all/modules/rooms/modules/rooms_availability/includes/rooms_availability.unit_calendar.inc).
    PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'd4' cannot be null: UPDATE {rooms_availability} SET d4=:db_update_placeholder_0, d5=:db_update_placeholder_1 WHERE (unit_id = :db_condition_placeholder_0) AND (month = :db_condition_placeholder_1) AND (year = :db_condition_placeholder_2) ; Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => [:db_condition_placeholder_0] => 20 [:db_condition_placeholder_1] => 7 [:db_condition_placeholder_2] => 2013 ) in UnitCalendar->addMonthEvent() (regel 482 van /storage/web/public/sites/www.slapeninyerseke.nl/sites/all/modules/rooms/modules/rooms_availability/includes/rooms_availability.unit_calendar.inc).

Can you please tell how we can clean this out?

Many thanks

Theo Richel

acrollet’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Hi there,

please re-open if this is still a concern and reproducible with the latest version of rooms.