From 71a47ee400adda99c66cbac0bd25ce09cff2f1cd Mon Sep 17 00:00:00 2001 From: Werner Masik Date: Thu, 28 May 2026 16:21:04 +0200 Subject: [PATCH] fix for saving kollektivvertrag --- .../vertragsbestandteil/VertragsbestandteilFactory.php | 9 +++++++++ .../vertragsbestandteil/VertragsbestandteilLib.php | 1 + .../vertragsbestandteil/Vertragsbestandteil_model.php | 5 ++++- system/dbupdate_3.4/76781_kollektivvertrag.php | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php b/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php index 047aaaa46..16e6e892b 100644 --- a/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php +++ b/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php @@ -4,6 +4,7 @@ namespace vertragsbestandteil; use Exception; use vertragsbestandteil\VertragsbestandteilStunden; use vertragsbestandteil\VertragsbestandteilLohnguide; +use vertragsbestandteil\VertragsbestandteilKollektivvertrag; /** * Description of VertragsbestandteilFactory @@ -145,6 +146,14 @@ class VertragsbestandteilFactory 'VertragsbestandteilLohnguide_model'); $vertragsbestandteildbmodel = $CI->VertragsbestandteilLohnguide_model; break; + case self::VERTRAGSBESTANDTEIL_KOLLEKTIVVERTRAG: + $CI->load->model( + 'vertragsbestandteil/VertragsbestandteilKollektivvertrag_model', + 'VertragsbestandteilKollektivvertrag_model' + ); + + $vertragsbestandteildbmodel = $CI->VertragsbestandteilKollektivvertrag_model; + break; default: throw new Exception('Unknown vertragsbestandteil_kurzbz ' diff --git a/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php b/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php index 61208eda0..426216576 100644 --- a/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php +++ b/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php @@ -11,6 +11,7 @@ require_once __DIR__ . '/VertragsbestandteilUrlaubsanspruch.php'; require_once __DIR__ . '/VertragsbestandteilFreitext.php'; require_once __DIR__ . '/VertragsbestandteilKarenz.php'; require_once __DIR__ . '/VertragsbestandteilLohnguide.php'; +require_once __DIR__ . '/VertragsbestandteilKollektivvertrag.php'; require_once __DIR__ . '/VertragsbestandteilFactory.php'; require_once __DIR__ . '/OverlapChecker.php'; diff --git a/application/models/vertragsbestandteil/Vertragsbestandteil_model.php b/application/models/vertragsbestandteil/Vertragsbestandteil_model.php index 334a29dfd..771698c04 100644 --- a/application/models/vertragsbestandteil/Vertragsbestandteil_model.php +++ b/application/models/vertragsbestandteil/Vertragsbestandteil_model.php @@ -38,7 +38,8 @@ class Vertragsbestandteil_model extends DB_Model s.wochenstunden, s.teilzeittyp_kurzbz, u.tage, z.zeitaufzeichnung, z.azgrelevant, z.homeoffice, - lg.stellenbezeichnung, lg.vordienstzeit, lg.fachrichtung_kurzbz, lg.modellstelle_kurzbz, lg.kommentar_person, lg.kommentar_modellstelle + lg.stellenbezeichnung, lg.vordienstzeit, lg.fachrichtung_kurzbz, lg.modellstelle_kurzbz, lg.kommentar_person, lg.kommentar_modellstelle, + kv.verwendungsgruppe_kurzbz, kv.kv_jahre, kv.kommentar FROM hr.tbl_vertragsbestandteil v LEFT JOIN @@ -66,6 +67,8 @@ class Vertragsbestandteil_model extends DB_Model hr.tbl_vertragsbestandteil_zeitaufzeichnung z USING(vertragsbestandteil_id) LEFT JOIN hr.tbl_vertragsbestandteil_lohnguide lg USING(vertragsbestandteil_id) + LEFT JOIN + hr.tbl_vertragsbestandteil_kollektivvertrag kv USING(vertragsbestandteil_id) EOSQL; return $sql; } diff --git a/system/dbupdate_3.4/76781_kollektivvertrag.php b/system/dbupdate_3.4/76781_kollektivvertrag.php index 093e83163..224b28edd 100644 --- a/system/dbupdate_3.4/76781_kollektivvertrag.php +++ b/system/dbupdate_3.4/76781_kollektivvertrag.php @@ -158,6 +158,9 @@ COMMENT ON TABLE hr.tbl_vertragsbestandteil_kollektivvertrag IS E'Zuordnung zur GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_vertragsbestandteil_kollektivvertrag TO vilesci; +INSERT INTO hr.tbl_vertragsbestandteiltyp(vertragsbestandteiltyp_kurzbz, bezeichnung, ueberlappend) VALUES('kollektivvertrag', 'Kollektivvertrag', false); + + ";