diff --git a/application/config/anrechnung.php b/application/config/anrechnung.php index 2466d2bb1..6713ef37d 100644 --- a/application/config/anrechnung.php +++ b/application/config/anrechnung.php @@ -1,6 +1,6 @@ TRUE, + 'referenzbeispiele_ects' => TRUE, + 'voraussetzungen' => TRUE, + 'nachweisdokumente' => TRUE, + 'herkunft_kenntnisse' => TRUE +]; diff --git a/application/libraries/vertragsbestandteil/GehaltsbestandteilLib.php b/application/libraries/vertragsbestandteil/GehaltsbestandteilLib.php index 930f84a64..1aaafa471 100644 --- a/application/libraries/vertragsbestandteil/GehaltsbestandteilLib.php +++ b/application/libraries/vertragsbestandteil/GehaltsbestandteilLib.php @@ -28,6 +28,11 @@ class GehaltsbestandteilLib $this->GehaltsbestandteilModel = $this->CI->GehaltsbestandteilModel; } + public function fetchGehaltsbestandteileValorisiertForChart($dienstverhaeltnis_id, $stichtag=null, $includefuture=false) + { + return $this->GehaltsbestandteilModel->getGehaltsbestandteileValorisiertForChart($dienstverhaeltnis_id, $stichtag, $includefuture); + } + public function fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false, $withvalorisationhistory=true) { diff --git a/application/models/vertragsbestandteil/Gehaltsbestandteil_model.php b/application/models/vertragsbestandteil/Gehaltsbestandteil_model.php index c3d8cb174..c50627697 100644 --- a/application/models/vertragsbestandteil/Gehaltsbestandteil_model.php +++ b/application/models/vertragsbestandteil/Gehaltsbestandteil_model.php @@ -243,6 +243,85 @@ EOSQL; return $result; } + public function getGehaltsbestandteileValorisiertForChart($dienstverhaeltnis_id, $stichtag=null, $includefuture=false) + { + $stichtagclause = ''; + if( !is_null($stichtag) ) + { + $date = strftime('%Y-%m-%d', strtotime($stichtag)); + $stichtagclause = 'AND (' . $this->escape($date) + . ' BETWEEN COALESCE(von, \'1970-01-01\'::date)' + . ' AND COALESCE(bis, \'2170-01-01\'::date)'; + if( $includefuture ) + { + $stichtagclause .= ' OR COALESCE(von, \'1970-01-01\'::date) > ' + . $this->escape($date); + } + $stichtagclause .= ')'; + } + + // Note: replaced gb.betrag_valorisiert with vh.betrag_valorisiert! + $qry = " + SELECT + gb.gehaltsbestandteil_id,gb.dienstverhaeltnis_id,gb.vertragsbestandteil_id,gb.gehaltstyp_kurzbz, + gb.von,gb.bis,gb.anmerkung,gb.grundbetrag as grundbetrag,gb.valorisierungssperre,gb.insertamum, + gb.insertvon,gb.updateamum,gb.updatevon,gb.valorisierung,gb.auszahlungen, + vh.valorisierungsdatum, vh.betrag_valorisiert as betrag_valorisiert + FROM hr.tbl_gehaltsbestandteil gb LEFT JOIN hr.tbl_valorisierung_historie vh using (gehaltsbestandteil_id) + WHERE dienstverhaeltnis_id=? + $stichtagclause + ORDER BY gb.von,vh.valorisierungsdatum, gb.gehaltsbestandteil_id; + "; + + $query = $this->execQuery($qry, + array($dienstverhaeltnis_id), + $this->getEncryptedColumns()); + + $gehaltsbestandteile = array(); + if( null !== ($rows = getData($query)) ) + { + // store for preserving the last records of every gehaltsbestandteil_id + $lastRecords = array(); + + foreach( $rows as $row ) { + $tmpgb = new Gehaltsbestandteil(); + $tmpgb->hydrateByStdClass($row, true); + + // prevent duplication (caused by the join with historic values) + if (!isset($lastRecords[(string)$row->gehaltsbestandteil_id])) { + $gehaltsbestandteile[] = $tmpgb; + $lastRecords[(string)$row->gehaltsbestandteil_id] = $tmpgb; + } + + if ($row->betrag_valorisiert != null && $row->valorisierungsdatum != null + && $row->valorisierungsdatum != $row->von && $row->valorisierungsdatum != $row->bis) { + + // create additional row + $tmpgbv = new Gehaltsbestandteil(); + $tmpgbv->hydrateByStdClass($row, true); + $tmpgbv->setVon($row->valorisierungsdatum); + $tmpgbv->setBis($lastRecords[(string)$row->gehaltsbestandteil_id]->getBis()); + // overwrite Grundbetrag with the current valorized loan + // (otherwise the chart would show the wrong value) + $tmpgbv->setGrundbetrag($row->betrag_valorisiert); + $gehaltsbestandteile[] = $tmpgbv; + + // finish previous + $daybefore = new DateTimeImmutable($row->valorisierungsdatum); + $daybefore = $daybefore->sub(new \DateInterval('P1D')); + $lastRecords[(string)$row->gehaltsbestandteil_id]->setBis($daybefore->format('Y-m-d')); + + // preserve as last row, because there might be another valorization + $lastRecords[(string)$row->gehaltsbestandteil_id] = $tmpgbv; + + } + + } + } + + return $gehaltsbestandteile; + } + public function getGehaltsbestandteil($id) { $this->addSelect('*'); diff --git a/application/views/lehre/anrechnung/requestAnrechnungImportant.php b/application/views/lehre/anrechnung/requestAnrechnungImportant.php index 0ee13d422..6a3cc5a9a 100644 --- a/application/views/lehre/anrechnung/requestAnrechnungImportant.php +++ b/application/views/lehre/anrechnung/requestAnrechnungImportant.php @@ -1,71 +1,83 @@ +
+ + config->item('display_infobox')['fristen']) && $this->config->item('display_infobox')['fristen'] === true): ?> +
+

+
+
+   + p->t('anrechnung', 'requestAnrechnungInfoFristenTitle'); ?> -
- -
-

-
-
- -   - p->t('anrechnung', 'requestAnrechnungInfoFristenTitle'); ?> - +
+
+

+
+
+ p->t('anrechnung', 'requestAnrechnungInfoFristenBody'); ?> +
+
+ + + config->item('display_infobox')['referenzbeispiele_ects']) && $this->config->item('display_infobox')['referenzbeispiele_ects'] === true): ?> +
+

+ +

+
+
+ p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?> +
+
-

-
-
- p->t('anrechnung', 'requestAnrechnungInfoFristenBody'); ?> -
-
-
- -
-

-

-
-
- p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?> -
-
-
- -
-

-
- -
-

-
-
- p->t('anrechnung', 'requestAnrechnungInfoNachweisdokumenteBody'); ?> -
-
-
+ -
-

-

-
-
- p->t('anrechnung', 'requestAnrechnungInfoHerkunftKenntnisseBody'); ?> -
-
-
- +
\ No newline at end of file diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index 53f1ee34e..1e7bef81e 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -2,7 +2,6 @@ $this->load->config('anrechnung'); $includesArray = array( - array( 'title' => $this->p->t('anrechnung', 'anrechnungenPruefen'), 'jquery3' => true, 'jqueryui1' => true, @@ -50,7 +49,6 @@ $includesArray = array( 'public/js/bootstrapper.js', 'public/js/lehre/anrechnung/reviewAnrechnungDetail.js' ) - ) ); if (defined("CIS4")) { diff --git a/application/views/lehre/anrechnung/reviewAnrechnungInfo.php b/application/views/lehre/anrechnung/reviewAnrechnungInfo.php index c5d30987c..aebe80f1c 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungInfo.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungInfo.php @@ -1,86 +1,102 @@ -
- -
-

-
-
- -   - p->t('anrechnung', 'reviewAnrechnungInfoFristenTitle'); ?> - -
-
-

-
-
- p->t('anrechnung', 'reviewAnrechnungInfoFristenBody'); ?> -
-
-
- -
-

- -

-
-
- p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?> -
-
-
- -
-

-
- -
-

-
-
- p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenBody'); ?> -
-
-
- -
-

- -

-
-
- p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteBody'); ?> -
-
-
- -
-

- -

-
-
- p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseBody'); ?> -
-
-
+ + config->item('display_infobox')['fristen']) && $this->config->item('display_infobox')['fristen'] === true): ?> +
+

+
+
+   + p->t('anrechnung', 'reviewAnrechnungInfoFristenTitle'); ?> + +
+
+

+
+
+ p->t('anrechnung', 'reviewAnrechnungInfoFristenBody'); ?> +
+
+
+ + + config->item('display_infobox')['referenzbeispiele_ects']) && $this->config->item('display_infobox')['referenzbeispiele_ects'] === true): ?> +
+

+ +

+
+
+ p->t('anrechnung', 'requestAnrechnungInfoEctsBerechnungBody'); ?> +
+
+
+ + + config->item('display_infobox')['voraussetzungen']) && $this->config->item('display_infobox')['voraussetzungen'] === true): ?> +
+

+
+ +
+

+
+
+ p->t('anrechnung', 'reviewAnrechnungInfoAntragVoraussetungenBody'); ?> +
+
+
+ + + config->item('display_infobox')['nachweisdokumente']) && $this->config->item('display_infobox')['nachweisdokumente'] === true): ?> +
+

+ +

+
+
+ p->t('anrechnung', 'reviewAnrechnungInfoNachweisdokumenteBody'); ?> +
+
+
+ + + config->item('display_infobox')['herkunft_kenntnisse']) && $this->config->item('display_infobox')['herkunft_kenntnisse'] === true): ?> +
+

+ +

+
+
+ p->t('anrechnung', 'reviewAnrechnungInfoHerkunftKenntnisseBody'); ?> +
+
+
+
diff --git a/locale/de-AT/testtool.php b/locale/de-AT/testtool.php index 059cd33c5..67f2a04ea 100644 --- a/locale/de-AT/testtool.php +++ b/locale/de-AT/testtool.php @@ -25,7 +25,7 @@ $this->phrasen['testtool/klickenSieAufEinTeilgebiet']='Zum Starten klicken Sie b $this->phrasen['testtool/gebietStarten']='Gebiet starten'; $this->phrasen['testtool/startseite']='Startseite'; $this->phrasen['testtool/zurueckZurStartseite']='Zurück zur Startseite'; -$this->phrasen['testtool/begruessungstext']="Willkommen zum Reihungstest der Fachhochschule Technikum Wien!"; +$this->phrasen['testtool/begruessungstext']="Willkommen zum Reihungstest der Fachhochschule Technikum Wien"; $this->phrasen['testtool/anmeldedaten']= "Sie sind mit folgenden Daten angemeldet:"; $this->phrasen['testtool/keineAntwort']='Keine Antwort'; $this->phrasen['testtool/speichernUndWeiter']='Speichern und weiter'; diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 7365f4a99..f43240797 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -69,6 +69,7 @@ require_once('dbupdate_3.4/40717_lv_faktor.php'); require_once('dbupdate_3.4/48526_pep_tagging.php'); require_once('dbupdate_3.4/41950_perm_gehaelter.php'); require_once('dbupdate_3.4/53903_valorisierung.php'); +require_once('dbupdate_3.4/55968_index_anrechnung.php'); require_once('dbupdate_3.4/25999_locale_update.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen diff --git a/system/dbupdate_3.4/55968_index_anrechnung.php b/system/dbupdate_3.4/55968_index_anrechnung.php new file mode 100644 index 000000000..020c72b4b --- /dev/null +++ b/system/dbupdate_3.4/55968_index_anrechnung.php @@ -0,0 +1,30 @@ +db_query("SELECT * FROM pg_class WHERE relname='idx_anrechnungen_prestudent_id'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "CREATE INDEX idx_anrechnungen_prestudent_id ON lehre.tbl_anrechnung USING btree (prestudent_id)"; + + if (! $db->db_query($qry)) + echo 'Indizes: ' . $db->db_last_error() . '
'; + else + echo 'Index fuer lehre.tbl_anrechnung_prestudent_id hinzugefuegt'; + } +} + +// Add index to lehre.tbl_anrechnung.studiensemester_kurzbz +if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_anrechnungen_studiensemester_kurzbz'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "CREATE INDEX idx_anrechnungen_studiensemester_kurzbz ON lehre.tbl_anrechnung USING btree (studiensemester_kurzbz)"; + + if (! $db->db_query($qry)) + echo 'Indizes: ' . $db->db_last_error() . '
'; + else + echo 'Index fuer lehre.tbl_anrechnung_studiensemester_kurzbz hinzugefuegt'; + } +}