.. _label-uc-contract-add:

Add a Contract
***********************************************************************

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

A contract is added for some customer.

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

Officer, Customer


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

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


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

- A new contract was created with unique contract ID.

- Any optional supplementary contract can be booked for the new contract.


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

- Customer ID, service ID, respective contractual parameters (like:
  start of service, end of service, picked payment methods, etc.)

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

- Message about contract creation
- Log message


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

- Customer ID must exist and be valid for new contracts.
- Submitting user must be authorized to perform the operation.


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

- The contractual parameters were checked for validity.


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


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

- System receives customer ID, service ID and any optional parameters
  specifying the contract to create.
- Passed in service is requested to create a new contract with
  passed-in parameters (contractual details) set (inludes validating
  the passed in data).
- If passed-in parameters are invalid, user is offered a possibility
  to fix the invalid data.
- System creates the new contract connecting it to the given
  customer ID.


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



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


.. raw:: latex

      \
