Commit Graph

11 Commits

Author SHA1 Message Date
Cris 92cfa521f7 Fixed DB-error when vertragsbetrag IS NULL
Now if betrag is null will be converted to 0.
2019-10-24 13:28:18 +02:00
Cris 0d5906e7bc Added method updateVertrag() to Vertrag_model
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'
2019-10-11 13:42:39 +02:00
Cris 6ff2f19c56 Changed the STG-Kürzel to 'typ + kurzbz' in Lehraufträge + Vertragsmodel
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
2019-09-30 15:09:45 +02:00
Cris 3340922a35 Extended/Adapted method setStatus()
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.
2019-09-24 10:21:05 +02:00
Cris 1a58c977fe Added method getLastStatus()
This method gets the latest Vertragsstatus for the given Vertrag and
Mitarbeiter.
2019-09-24 10:15:21 +02:00
Cris 812899e885 Added method hasStatus()
This method checks if Vertrag has the given Vertragsstatus.
2019-09-24 10:14:22 +02:00
Cris 73904dd007 Added contract description when saving new contract
Description was missing, now generated when inserting new contract.
2019-09-19 15:56:30 +02:00
Cris 8566039cc4 Fixed: Added check before DB insert
A check was missing if the contract already had that status. Error
was given. This is fixed now.
2019-09-19 13:23:12 +02:00
Cris e39a4252eb Added param mitarbeiter_uid to method save()
For performance reasons.
(Before the uid was retrieved by loading BenutzerModel each time when
saving lots of contracts)
2019-09-17 15:58:40 +02:00
hainberg 10b476c27e Added methods save() and setStatus()
. 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
2019-09-12 13:45:50 +02:00
Paminger 6836c3608d Models 2016-05-04 07:05:23 +02:00