Nama ERP DocsNama ERP Docs
Home
Namasoft.com
Data Model
GitHub
Home
Namasoft.com
Data Model
GitHub
  • Home

    • Search
    • Guides

      • List Views
      • Entity Flows
      • الفواتير والضرائب والخصومات
      • Supply Chain
      • Manufacturing
      • e-commerce integration (Magento)
      • .
    • Examples
    • Reprocessing Transactions
    • Frequently Asked Questions
    • AI Generated Entity Flows Documentation

      • Core
      • Accounting Module
      • AI Module
      • Contracting Module
      • CRM Module
      • EGTax Reader Module
      • Freight Management System Module
      • Hospital Management System Module
      • HR Module
      • e-commerce Integration Module
      • Manufacturing Module
      • POS Module
      • Real Estate Module

        • EAAutoExtendExpiredRentContracts
        • EAAutoGenerateREFineDoc
        • EACancelReservationOFSalesInitialDoc
        • EAFixNextAndPreviousFromQuery
        • .
      • Service Center Module
      • Supply Chain Module
      • .
    • Release Notes

      • 2016
      • 2017
      • 2018
      • 2019
      • 2020
      • 2021
      • 2022
      • 2025
      • .
    • Video Tutorials

      • Supply Chain Videos
      • Report Wizard Videos
      • Human Resources Videos
      • .

EAFixNextAndPreviousFromQuery

This document was generated using Claude.ai

Overview

Repairs and updates the chain linkages between consecutive rent contracts by fixing previous/next contract references. Processes committed rent contracts to ensure proper contract sequencing and renter history tracking through automated reference updates.

When This Action Runs

Manual execution for data repair and maintenance. Typically used after contract imports, data migrations, or when contract chain linkages become corrupted due to system issues or manual data modifications.

How It Works

  1. Executes query - Runs SQL query to identify contracts that need chain fixing
  2. Processes each contract - Iterates through found contracts in separate transactions
  3. Fills previous contract - Updates references to the immediately preceding contract
  4. Updates previous renter - Links to previous contract for the same renter
  5. Updates next contract - Sets references to the immediately following contract
  6. Updates next renter - Links to next contract for the same renter
  7. Commits changes - All updates happen automatically without explicit saving

Parameters

Parameter 1: Manual Query (Optional) - Custom SQL query to specify which contracts to fix

Default Query

select entityType,id from RERentContract where commitedBefore = 1 
union all
select entityType,id from REOpeningRentContract where commitedBefore = 1

Database Tables Affected

  • RERentContract - Updates previous/next contract references
  • REOpeningRentContract - Updates previous/next contract references for opening contracts
  • Contract Chain Tables - Updates linkage information between related contracts

Module: realestate

Full Class Name: com.namasoft.modules.realstate.domain.utils.plugnplay.EAFixNextAndPreviousFromQuery

Edit On github
Last Updated:: 3/18/26, 11:30 PM
Prev
EACancelReservationOFSalesInitialDoc
Next
.