EACancelReservationOFSalesInitialDoc
This document was generated using Claude.ai
Overview
Cancels estate reservations for initial sales contracts by setting the reserveEstate flag to false. Uses a custom SQL query to identify which contracts should have their reservations cancelled, enabling bulk processing of expired or unwanted reservations.
When This Action Runs
Manual execution when estate reservations need to be cancelled in bulk. Typically used for expired reservations, cancelled contracts, or administrative cleanup when initial sales contracts no longer require estate reservation status.
How It Works
- Executes custom query - Runs the provided SQL query to find contract IDs
- Processes each contract - Iterates through found contract IDs
- Loads contract - Retrieves each REInitialSalesContract by ID
- Starts editing - Puts the contract in edit mode
- Cancels reservation - Sets reserveEstate flag to false
- Commits changes - Saves the updated contract
- Accumulates results - Collects success/failure status for each contract
Parameters
Parameter 1: SQL Query (Required) - Query to select contract IDs that should have reservations cancelled
Example Query
select id from REInitialSalesContract where toDate < GETDATE() and reserveEstate = 1
Database Tables Affected
- REInitialSalesContract - Updates the reserveEstate field to false for selected contracts
Module: realestate
Full Class Name: com.namasoft.modules.realestate.domain.entities.EACancelReservationOFSalesInitialDoc