Skip to Content

CMTP Fix Task

The CMTPFixTask is a Cheval Collection-specific task which applies a workaround for CTMP cancelled bookings in Cheval Maison — The Palm Dubai.

Purpose

  • Correct specific bookings that have inconsistent status and dates due to CTMP cancellations.
  • Adjust booking dates and monetary values for a list of specific res_id_og entries for the affected property.

What it does

  1. For the target property Cheval_Maison__The_Palm_Dubai and a specific list of res_id_og:
    • Set status to checked_out.
    • Truncate check_out_date to 2025-03-25 for affected bookings overlapping that cutoff date.
  2. For the room-level table (daily room stay rows):
    • Remove room_stay_date rows that fall after the cutoff date for the affected property/res IDs.
    • Set room_check_out_date to 2025-03-25 where applicable.
    • Multiply room_stay_date_rate_net, room_stay_date_fnb_net, and room_stay_date_other_net by 4.6 to convert GBP → AED.
  3. Writes updated ProcessedReservationModel and ProcessedRoomModel back to the pipeline.

When to use it

  • Use CMTPFixTask when the legacy or current data contains known booking inconsistencies at Cheval Maison The Palm Dubai due to CTMP. Insert it into the ProcessingTask before report generation or as needed by the job configuration.

Example Usage

From jobs/chevalcollection_task.py:

processing_task.insert_subtask( subtask=CMTPFixTask(job_context=job_context, write_to_catalog=False), after=OperaLegacyMergeTask, )

Models Required

  • ProcessedReservationModel
  • ProcessedRoomModel

Models Provided

  • ProcessedReservationModel
  • ProcessedRoomModel

Important Notes

  • This task manipulates a fixed list of res_id_og values; changes should be reviewed with the owner before modification.
  • Currency conversion uses a hard-coded multiplier (4.6). If the conversion rate changes, update the task accordingly.
Last updated on