Updates Vertrag and, if resets vertragsstatus as follows:
- if vertragsstatus 'erteilt': delete status 'erteilt' and
update date of status 'bestellt'
- if vertragsstatus 'bestellt': update date of status 'bestellt'
Before the organisational unit was set, but it should be a combination
of typ + kurzbz of the stg. This is changed now in
. all Lehraufträge
. Vertragsmodel
. filtersupdate
Extended check: if new status is 'akzeptiert', the latest status has
to be 'erteilt'.
Adapted code as check for having certain status was outsourced to method
hasStatus.
. save method inserts a new Vertrag, sets Vertragsstatus to 'bestellt'
and assigns vertrags_id to either corresponding Lehreinheitmitarbeiter
or corresponding Projektbetreuuer
. setStatus inserts a new Status to a given Vertrag