Rules of the My contracts view and the termination request gate

Who sees a contract in the data room, how the system classifies active and ended contracts, what is and is not shown, and the check order and notifications of the termination request.

The "My contracts" view (document/document.mycontracts, signed in with accepted terms) reads through the catalog-side contract/brokerage adapter; it does not write contract tables except the termination request, which is recorded by the owner model.

Who sees what

  • Content rule: the user is a person flagged dataroom of the contract's agent party (the person's user_id is the signed-in user), and the contract is not deleted (status 0 or 1).
  • Classification by one rule (classify): active if status 1 and the end date has not passed (a future termination is a separate marker); otherwise terminated (a recorded termination exists), expired (the term has ended) or ended (inactive for another reason).
  • For an ended contract the card and documents can be opened, the offering folders cannot.
  • Read-only on the card: parties, term, notice period, auto-renewal, properties with state and commission per case, registrations with per-row decisions, offers, deals (without the buyer's or tenant's money), completion certificates (base, fee, gross, final or not, number and status of the received invoice — not its content), amendments and terminations with reasons, status of termination requests.
  • Documents grouped: contract (contract, annex, signature evidence) → amendment → termination → completion certificate → settlement → invoice; opened in the shared watermarked viewer, checked against the contract chain. Internal documents with role attachment are not shown.
  • Contact panel: the principals of the user's active contracts, one card per company; the person marked as contact comes first.

Termination request

Endpoint: document/document.terminaterequest (POST + CSRF). Gate in order:

  1. signed in → token → terms accepted;
  2. terminate function granted (the broker receives it automatically from the contract; it can also be granted or removed manually);
  3. the contract belongs to the user, is active and has no pending request;
  4. fields: kind ordinary or immediate (one party cannot request mutual termination), requested end date (not in the past), for immediate at least one of the contract's reasons, note at most 2000 characters.

After recording: admins receive a system message (those who see the client company, except the requester, with a link to the prefilled termination form); the principal's contacts receive an e-mail (termination_request, in their own language, on behalf of the client); timeline: termination_request. Viewing adds contracts_view to the timeline.