.. _label-uc-contract-remove:

Remove a Contract
***********************************************************************

Short Description
-----------------------------------------------------------------------

A contract is removed from system.

Actor(s)
-----------------------------------------------------------------------

Officer, Customer


Trigger(s)
-----------------------------------------------------------------------

- Imports (removing existing data)
- Web form(s) submitted by authorized user


Result(s)
-----------------------------------------------------------------------

- Contract data of the given contract and all connected data (contract
  add-ons, etc.) was removed from the system.
- All removed data is archived.


Incoming Data
-----------------------------------------------------------------------

- Contract ID

Outgoing Data
-----------------------------------------------------------------------

- Message about contract removal
- (optional) Regarding customer is informed by email or SMS.
- Log message
- Archive entry


Precondition(s)
-----------------------------------------------------------------------

- Contract ID must exist.
- Submitting user must be authorized to perform the operation.
- Customers can only remove the contract if it has not yet been
  concluded and no transactions have been made.
  If customers accidentally added a contract they can
  subesequently remove it to correct their mistake.


Postcondition(s)
-----------------------------------------------------------------------


Invariant(s)
-----------------------------------------------------------------------


Essential Steps
-----------------------------------------------------------------------

- System validates contract ID.
- Removed data is archived.
- System removes the given contract and connected items (transactions,
  supplementary contracts, etc.).
- (optional) System informs regarding customer (email and/or SMS).


Open Issues
-----------------------------------------------------------------------



Remarks
-----------------------------------------------------------------------

An ended contract is not the same as a removed contract.


.. raw:: latex

      \
