diff --git a/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php b/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php index 2a7955a45..50504099a 100644 --- a/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php +++ b/application/libraries/vertragsbestandteil/VertragsbestandteilFactory.php @@ -3,6 +3,7 @@ namespace vertragsbestandteil; use Exception; use vertragsbestandteil\VertragsbestandteilStunden; +use vertragsbestandteil\VertragsbestandteilLohnguide; /** * Description of VertragsbestandteilFactory diff --git a/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php b/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php index 1ecb9ac60..61208eda0 100644 --- a/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php +++ b/application/libraries/vertragsbestandteil/VertragsbestandteilLib.php @@ -10,6 +10,7 @@ require_once __DIR__ . '/VertragsbestandteilKuendigungsfrist.php'; require_once __DIR__ . '/VertragsbestandteilUrlaubsanspruch.php'; require_once __DIR__ . '/VertragsbestandteilFreitext.php'; require_once __DIR__ . '/VertragsbestandteilKarenz.php'; +require_once __DIR__ . '/VertragsbestandteilLohnguide.php'; require_once __DIR__ . '/VertragsbestandteilFactory.php'; require_once __DIR__ . '/OverlapChecker.php'; diff --git a/application/libraries/vertragsbestandteil/VertragsbestandteilLohnguide.php b/application/libraries/vertragsbestandteil/VertragsbestandteilLohnguide.php index ef87e35e9..5a61cc5db 100644 --- a/application/libraries/vertragsbestandteil/VertragsbestandteilLohnguide.php +++ b/application/libraries/vertragsbestandteil/VertragsbestandteilLohnguide.php @@ -12,6 +12,14 @@ class VertragsbestandteilLohnguide extends Vertragsbestandteil protected $kommentar_person; protected $kommentar_modellstelle; + + public function __construct() + { + parent::__construct(); + $this->setVertragsbestandteiltyp_kurzbz( + VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_LOHNGUIDE); + } + public function getStellenbezeichnung() { return $this->stellenbezeichnung; @@ -73,12 +81,7 @@ class VertragsbestandteilLohnguide extends Vertragsbestandteil } - public function __construct() - { - parent::__construct(); - $this->setVertragsbestandteiltyp_kurzbz( - VertragsbestandteilFactory::VERTRAGSBESTANDTEIL_LOHNGUIDE); - } + public function hydrateByStdClass($data, $fromdb=false) { @@ -97,8 +100,8 @@ class VertragsbestandteilLohnguide extends Vertragsbestandteil $tmp = array( 'vertragsbestandteil_id' => $this->getVertragsbestandteil_id(), 'stellenbezeichnung' => $this->getStellenbezeichnung(), - 'fachrichtung' => $this->getFachrichtung_kurzbz(), - 'modellstelle' => $this->getModellstelle_kurzbz(), + 'fachrichtung_kurzbz' => $this->getFachrichtung_kurzbz(), + 'modellstelle_kurzbz' => $this->getModellstelle_kurzbz(), 'kommentar_person' => $this->getKommentar_person(), 'kommentar_modellstelle' => $this->getKommentar_modellstelle(), ); diff --git a/system/dbupdate_3.4/70376_lohnguide.php b/system/dbupdate_3.4/70376_lohnguide.php index f99d6acd8..33052023a 100644 --- a/system/dbupdate_3.4/70376_lohnguide.php +++ b/system/dbupdate_3.4/70376_lohnguide.php @@ -334,4 +334,17 @@ GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_vertragsbestandteil_lohnguide echo 'hr.tbl_vertragsbestandteil_lohnguide wurde neu erstellt
'; } } + +if($result = $db->db_query("SELECT 1 FROM hr.tbl_vertragsbestandteiltyp WHERE vertragsbestandteiltyp_kurzbz = 'lohnguide'")) +{ + if($db->db_num_rows($result) === 0) + { + $qry = "insert into hr.tbl_vertragsbestandteiltyp (vertragsbestandteiltyp_kurzbz,bezeichnung,ueberlappend) values('lohnguide','Lohnguide',false)"; + + if(!$db->db_query($qry)) + echo 'Public Tabelle person: '.$db->db_last_error().'
'; + else + echo "
Vertragsbestandteiltyp 'lohnguide' hinzugefuegt"; + } +} \ No newline at end of file