mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 14:32:18 +00:00
Merge branch 'master' into feature-5534/Gehaltsgraph_Valorisierung
This commit is contained in:
@@ -32,3 +32,18 @@ $config['validate'] = false; // If true then the email address will be validated
|
||||
|
||||
// If enabled will be logged info about emails in Codeigniter error logs
|
||||
$config['enable_debug'] = false;
|
||||
|
||||
// default sender
|
||||
$config['sancho_mail_default_sender'] = defined('SANCHO_MAIL_DEFAULT_SENDER') ? SANCHO_MAIL_DEFAULT_SENDER : '';
|
||||
|
||||
// If to use images for custom mails
|
||||
$config['sancho_mail_use_images'] = defined('SANCHO_MAIL_USE_IMAGES') ? SANCHO_MAIL_USE_IMAGES : false;
|
||||
|
||||
// image path for sancho mail, relativ to document root
|
||||
$config['sancho_mail_img_path'] = defined('SANCHO_MAIL_IMG_PATH') ? SANCHO_MAIL_IMG_PATH : '';
|
||||
|
||||
// header image for custom mails
|
||||
$config['sancho_mail_header_img'] = defined('SANCHO_MAIL_HEADER_IMG') ? SANCHO_MAIL_HEADER_IMG : '';
|
||||
|
||||
// footer image for custom mails
|
||||
$config['sancho_mail_footer_img'] = defined('SANCHO_MAIL_FOOTER_IMG') ? SANCHO_MAIL_FOOTER_IMG : '';
|
||||
|
||||
@@ -195,10 +195,10 @@ class AnrechnungJob extends JOB_Controller
|
||||
$studiengang_bezeichnung = $this->StudiengangModel->load($studiengang_kz)->retval[0]->stg_bezeichnung;
|
||||
|
||||
// Get STGL mail address
|
||||
$stglMailReceiver_arr = self::_getSTGLMailAddress($studiengang_kz);
|
||||
$stglMailReceiver_arr = $this->_getSTGLMailAddress($studiengang_kz);
|
||||
|
||||
// Get HTML table with new Anrechnungen of that STG plus amount of them
|
||||
list ($anrechnungen_amount, $anrechnungen_table) = self::_getSTGLMailDataTable($studiengang_kz, $anrechnungen);
|
||||
list ($anrechnungen_amount, $anrechnungen_table) = $this->_getSTGLMailDataTable($studiengang_kz, $anrechnungen);
|
||||
|
||||
// Link to Antrag genehmigen dashboard
|
||||
$url =
|
||||
@@ -514,8 +514,6 @@ html;
|
||||
'vorname' => $stgl->vorname
|
||||
);
|
||||
}
|
||||
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
// If not available, get assistance mail address
|
||||
else
|
||||
@@ -524,12 +522,13 @@ html;
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
return array(
|
||||
$result->retval[0]->email,
|
||||
''
|
||||
$stglMailAdress_arr[]= array(
|
||||
'to' => $result->retval[0]->email,
|
||||
'vorname' => ''
|
||||
);
|
||||
}
|
||||
}
|
||||
return $stglMailAdress_arr;
|
||||
}
|
||||
|
||||
// Build HTML table with yesterdays new Anrechnungen of the given STG
|
||||
|
||||
@@ -183,8 +183,8 @@ class AntragJob extends JOB_Controller
|
||||
$data,
|
||||
$to,
|
||||
'Anträge - Aktion(en) erforderlich',
|
||||
DEFAULT_SANCHO_HEADER_IMG,
|
||||
DEFAULT_SANCHO_FOOTER_IMG,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
$cc
|
||||
))
|
||||
|
||||
@@ -431,8 +431,8 @@ class ReihungstestJob extends JOB_Controller
|
||||
$mailcontent_data_arr,
|
||||
$applicant->email,
|
||||
'Ihre Anmeldung zum Reihungstest - Reminder / Your registration for the placement test - Reminder',
|
||||
DEFAULT_SANCHO_HEADER_IMG,
|
||||
DEFAULT_SANCHO_FOOTER_IMG,
|
||||
'',
|
||||
'',
|
||||
$from,
|
||||
'',
|
||||
$bcc);
|
||||
|
||||
@@ -991,14 +991,17 @@ class DB_Model extends CI_Model
|
||||
|
||||
// Find and replace all the occurrences of the provided encrypted columns
|
||||
// with the postgresql decryption function
|
||||
$query = preg_replace(
|
||||
'/\b' . $encryptedColumn . '\b/',
|
||||
sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$encryptedColumn,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
),
|
||||
$query = preg_replace_callback(
|
||||
'/(?<! (as|AS) )\b(\w+\.)?(' . $encryptedColumn . ')\b/',
|
||||
function($matches) use (&$decryptionPassword, &$definition) {
|
||||
$aliased_column = $matches[2] . $matches[3];
|
||||
return sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$aliased_column,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
);
|
||||
},
|
||||
$query
|
||||
);
|
||||
}
|
||||
@@ -1106,14 +1109,17 @@ class DB_Model extends CI_Model
|
||||
{
|
||||
// Find and replace all the occurrences of the provided encrypted columns
|
||||
// with the postgresql decryption function
|
||||
$where = preg_replace(
|
||||
'/\b' . $encryptedColumn . '\b/',
|
||||
sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$encryptedColumn,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
),
|
||||
$where = preg_replace_callback(
|
||||
'/(?<! (as|AS) )\b(\w+\.)?(' . $encryptedColumn . ')\b/',
|
||||
function($matches) use (&$decryptionPassword, &$definition) {
|
||||
$aliased_column = $matches[2] . $matches[3];
|
||||
return sprintf(
|
||||
self::CRYPT_WHERE_TEMPLATE,
|
||||
$aliased_column,
|
||||
$decryptionPassword,
|
||||
$definition[self::CRYPT_CAST]
|
||||
);
|
||||
},
|
||||
$where
|
||||
);
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
// Functions needed in the view FHC-Header
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
const DEFAULT_SANCHO_HEADER_IMG = 'sancho_header_DEFAULT.jpg';
|
||||
const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
|
||||
/**
|
||||
* Send single Mail with Sancho Design and Layout.
|
||||
* @param string $vorlage_kurzbz Name of the template for specific mail content.
|
||||
@@ -38,27 +35,88 @@ const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
* @param string $bcc Sets BCC of mail.
|
||||
* @return void
|
||||
*/
|
||||
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $from = null, $cc = null, $bcc = null)
|
||||
function sendSanchoMail(
|
||||
$vorlage_kurzbz,
|
||||
$vorlage_data,
|
||||
$to,
|
||||
$subject,
|
||||
$headerImg = '',
|
||||
$footerImg = '',
|
||||
$from = null,
|
||||
$cc = null,
|
||||
$bcc = null
|
||||
)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('email');
|
||||
$ci->load->library('MailLib');
|
||||
|
||||
$sanchoHeader_img = 'skin/images/sancho/'. $headerImg;
|
||||
$sanchoFooter_img = 'skin/images/sancho/'. $footerImg;
|
||||
$sancho_mail_config = $ci->config->item('mail');
|
||||
|
||||
|
||||
if ($from == '')
|
||||
{
|
||||
$from = 'sancho@'.DOMAIN;
|
||||
$from = ((isset($sancho_mail_config['sancho_mail_default_sender'])
|
||||
&& $sancho_mail_config['sancho_mail_default_sender'])
|
||||
? $sancho_mail_config['sancho_mail_default_sender']
|
||||
: 'noreply')
|
||||
. '@' . DOMAIN;
|
||||
}
|
||||
|
||||
// Embed sancho header and footer image
|
||||
// reset important to ensure embedding of images when called in a loop
|
||||
$ci->email->clear(true); // clear vars and attachments
|
||||
$ci->email->attach($sanchoHeader_img);
|
||||
$ci->email->attach($sanchoFooter_img);
|
||||
$cid_header = $ci->email->attachment_cid($sanchoHeader_img); // sets unique content id for embedding
|
||||
$cid_footer = $ci->email->attachment_cid($sanchoFooter_img); // sets unique content id for embedding
|
||||
|
||||
$cid_header = '';
|
||||
$cid_footer = '';
|
||||
|
||||
if (isset($sancho_mail_config['sancho_mail_use_images']) && $sancho_mail_config['sancho_mail_use_images'])
|
||||
{
|
||||
$sanchoHeader_img = '';
|
||||
$sanchoFooter_img = '';
|
||||
|
||||
if (isset($headerImg) && $headerImg != '')
|
||||
{
|
||||
// use provided header image
|
||||
$sanchoHeader_img = $headerImg;
|
||||
}
|
||||
elseif (isset($sancho_mail_config['sancho_mail_header_img']) && $sancho_mail_config['sancho_mail_header_img'])
|
||||
{
|
||||
// use default header image
|
||||
$sanchoHeader_img = $sancho_mail_config['sancho_mail_header_img'];
|
||||
}
|
||||
|
||||
if (isset($footerImg) && $footerImg != '')
|
||||
{
|
||||
// use provided footer image
|
||||
$sanchoFooter_img = $footerImg;
|
||||
}
|
||||
elseif (isset($sancho_mail_config['sancho_mail_footer_img']) && $sancho_mail_config['sancho_mail_footer_img'])
|
||||
{
|
||||
// use default footer image
|
||||
$sanchoFooter_img = $sancho_mail_config['sancho_mail_footer_img'];
|
||||
}
|
||||
|
||||
// add image file paths
|
||||
if (isset($sancho_mail_config['sancho_mail_img_path']))
|
||||
{
|
||||
if ($sanchoHeader_img != '')
|
||||
{
|
||||
$sanchoHeader_img = $sancho_mail_config['sancho_mail_img_path'].$sanchoHeader_img;
|
||||
}
|
||||
|
||||
if ($sanchoFooter_img != '')
|
||||
{
|
||||
$sanchoFooter_img = $sancho_mail_config['sancho_mail_img_path'].$sanchoFooter_img;
|
||||
}
|
||||
}
|
||||
|
||||
// attach header and footer
|
||||
$ci->email->attach($sanchoHeader_img, 'inline');
|
||||
$ci->email->attach($sanchoFooter_img, 'inline');
|
||||
$cid_header = $ci->email->attachment_cid($sanchoHeader_img); // sets unique content id for embedding
|
||||
$cid_footer = $ci->email->attachment_cid($sanchoFooter_img); // sets unique content id for embedding
|
||||
}
|
||||
|
||||
// Set specific mail content into specific content template
|
||||
$content = _parseMailContent($vorlage_kurzbz, $vorlage_data);
|
||||
@@ -74,7 +132,18 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
|
||||
$body = _parseMailContent('Sancho_Mail_Template', $layout);
|
||||
|
||||
// Send mail
|
||||
return $ci->maillib->send($from, $to, $subject, $body, $alias = '', $cc, $bcc, $altMessage = '', $bulk = true, $autogenerated = true);
|
||||
return $ci->maillib->send(
|
||||
$from,
|
||||
$to,
|
||||
$subject,
|
||||
$body,
|
||||
'', // alias
|
||||
$cc,
|
||||
$bcc,
|
||||
'', // altMessage
|
||||
true, // bulk
|
||||
true // autogenerated
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,9 +33,12 @@ class GehaltsbestandteilLib
|
||||
return $this->GehaltsbestandteilModel->getGehaltsbestandteileValorisiert($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
}
|
||||
|
||||
public function fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
public function fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null,
|
||||
$includefuture=false, $withvalorisationhistory=true)
|
||||
{
|
||||
return $this->GehaltsbestandteilModel->getGehaltsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
return $this->GehaltsbestandteilModel->getGehaltsbestandteile(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture, $withvalorisationhistory
|
||||
);
|
||||
}
|
||||
|
||||
public function fetchGehaltsbestandteil($gehaltsbestandteil_id)
|
||||
|
||||
@@ -26,6 +26,8 @@ class VertragsbestandteilLib
|
||||
{
|
||||
const INCLUDE_FUTURE = true;
|
||||
const DO_NOT_INCLUDE_FUTURE = false;
|
||||
const WITH_VALORISATION_HISTORY = true;
|
||||
const NOT_WITH_VALORISATION_HISTORY = false;
|
||||
|
||||
protected $CI;
|
||||
/** @var Dienstverhaeltnis_model */
|
||||
@@ -90,10 +92,15 @@ class VertragsbestandteilLib
|
||||
return $dv;
|
||||
}
|
||||
|
||||
public function fetchVertragsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
public function fetchVertragsbestandteile($dienstverhaeltnis_id, $stichtag=null,
|
||||
$includefuture=false, $withvalorisationhistory=true)
|
||||
{
|
||||
$vbs = $this->VertragsbestandteilModel->getVertragsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
$gbs = $this->GehaltsbestandteilLib->fetchGehaltsbestandteile($dienstverhaeltnis_id, $stichtag, $includefuture);
|
||||
$vbs = $this->VertragsbestandteilModel->getVertragsbestandteile(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture
|
||||
);
|
||||
$gbs = $this->GehaltsbestandteilLib->fetchGehaltsbestandteile(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture, $withvalorisationhistory
|
||||
);
|
||||
|
||||
$gbsByVBid = array();
|
||||
foreach( $gbs as $gb )
|
||||
|
||||
@@ -33,41 +33,84 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
|
||||
$datestring = $date->format("Y-m-d");
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
gehaltsbestandteil_id,
|
||||
gbt.von,
|
||||
gbt.bis,
|
||||
gbt.anmerkung,
|
||||
gbt.dienstverhaeltnis_id,
|
||||
gehaltstyp_kurzbz,
|
||||
valorisierungssperre,
|
||||
gbt.valorisierung,
|
||||
grundbetrag as grund_betrag_decrypted,
|
||||
betrag_valorisiert as betrag_val_decrypted,
|
||||
gt.bezeichnung as gehaltstyp_bezeichnung,
|
||||
vb.vertragsbestandteiltyp_kurzbz,
|
||||
bf.funktion_kurzbz,
|
||||
bf.oe_kurzbz,
|
||||
fkt.beschreibung as fkt_beschreibung,
|
||||
fb.bezeichnung as fb_bezeichnung,
|
||||
org.bezeichnung as org_bezeichnung,
|
||||
freitext.freitexttyp_kurzbz,
|
||||
freitext.titel as freitext_titel
|
||||
FROM hr.tbl_gehaltsbestandteil gbt LEFT JOIN hr.tbl_gehaltstyp gt using(gehaltstyp_kurzbz)
|
||||
LEFT JOIN hr.tbl_vertragsbestandteil vb using(vertragsbestandteil_id)
|
||||
LEFT JOIN hr.tbl_vertragsbestandteil_funktion vbf using(vertragsbestandteil_id)
|
||||
LEFT JOIN public.tbl_benutzerfunktion bf using(benutzerfunktion_id)
|
||||
LEFT JOIN public.tbl_funktion fkt using(funktion_kurzbz)
|
||||
LEFT JOIN public.tbl_fachbereich fb using(fachbereich_kurzbz)
|
||||
LEFT JOIN public.tbl_organisationseinheit org on (bf.oe_kurzbz=org.oe_kurzbz)
|
||||
LEFT JOIN hr.tbl_vertragsbestandteil_freitext freitext on(vb.vertragsbestandteil_id=freitext.vertragsbestandteil_id)
|
||||
WHERE gbt.dienstverhaeltnis_id=? AND
|
||||
(gbt.von<=? and (gbt.bis is null OR gbt.bis>=?))
|
||||
ORDER BY gt.sort
|
||||
with gbt as (
|
||||
select
|
||||
gb.gehaltsbestandteil_id,
|
||||
gb.von,
|
||||
gb.bis,
|
||||
gb.anmerkung,
|
||||
gb.dienstverhaeltnis_id,
|
||||
gb.gehaltstyp_kurzbz,
|
||||
gb.valorisierungssperre,
|
||||
gb.valorisierung,
|
||||
gb.grundbetrag as grund_betrag_decrypted,
|
||||
coalesce(vh.betrag_valorisiert, gb.grundbetrag) as betrag_val_decrypted,
|
||||
gb.vertragsbestandteil_id
|
||||
from
|
||||
hr.tbl_gehaltsbestandteil gb
|
||||
LEFT JOIN
|
||||
hr.tbl_valorisierung_historie vh ON vh.gehaltsbestandteil_id = gb.gehaltsbestandteil_id AND vh.valorisierungsdatum = (
|
||||
SELECT
|
||||
vi.valorisierungsdatum
|
||||
FROM
|
||||
hr.tbl_valorisierung_instanz vi
|
||||
JOIN
|
||||
hr.tbl_dienstverhaeltnis d ON d.dienstverhaeltnis_id = ?
|
||||
AND d.oe_kurzbz = vi.oe_kurzbz
|
||||
WHERE
|
||||
? >= valorisierungsdatum
|
||||
ORDER BY
|
||||
valorisierungsdatum DESC
|
||||
LIMIT 1
|
||||
)
|
||||
where
|
||||
dienstverhaeltnis_id = ?
|
||||
and (
|
||||
? BETWEEN COALESCE(von, '1970-01-01'::date) AND COALESCE(bis, '2170-01-01'::date)
|
||||
)
|
||||
)
|
||||
select
|
||||
gbt.gehaltsbestandteil_id,
|
||||
gbt.von,
|
||||
gbt.bis,
|
||||
gbt.anmerkung,
|
||||
gbt.dienstverhaeltnis_id,
|
||||
gbt.gehaltstyp_kurzbz,
|
||||
gbt.valorisierungssperre,
|
||||
gbt.valorisierung,
|
||||
gbt.grund_betrag_decrypted,
|
||||
gbt.betrag_val_decrypted,
|
||||
gt.bezeichnung as gehaltstyp_bezeichnung,
|
||||
vb.vertragsbestandteiltyp_kurzbz,
|
||||
bf.funktion_kurzbz,
|
||||
bf.oe_kurzbz,
|
||||
fkt.beschreibung as fkt_beschreibung,
|
||||
fb.bezeichnung as fb_bezeichnung,
|
||||
org.bezeichnung as org_bezeichnung,
|
||||
freitext.freitexttyp_kurzbz,
|
||||
freitext.titel as freitext_titel
|
||||
from
|
||||
gbt
|
||||
LEFT JOIN
|
||||
hr.tbl_gehaltstyp gt using(gehaltstyp_kurzbz)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil vb using(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_funktion vbf using(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
public.tbl_benutzerfunktion bf using(benutzerfunktion_id)
|
||||
LEFT JOIN
|
||||
public.tbl_funktion fkt using(funktion_kurzbz)
|
||||
LEFT JOIN
|
||||
public.tbl_fachbereich fb using(fachbereich_kurzbz)
|
||||
LEFT JOIN
|
||||
public.tbl_organisationseinheit org on (bf.oe_kurzbz=org.oe_kurzbz)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_freitext freitext on(vb.vertragsbestandteil_id=freitext.vertragsbestandteil_id)
|
||||
";
|
||||
|
||||
return $this->execQuery($qry,
|
||||
array($dienstverhaeltnis_id, $datestring, $datestring),
|
||||
array($dienstverhaeltnis_id, $datestring, $dienstverhaeltnis_id, $datestring),
|
||||
$this->getEncryptedColumns());
|
||||
}
|
||||
|
||||
@@ -86,9 +129,38 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
|
||||
array($dienstverhaeltnis_id),
|
||||
$this->getEncryptedColumns());
|
||||
}
|
||||
|
||||
|
||||
public function getGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
public function getGehaltsbestandteile($dienstverhaeltnis_id, $stichtag=null,
|
||||
$includefuture=false, $withvalorisationhistory=true)
|
||||
{
|
||||
if( !is_null($stichtag) && (time() > strtotime($stichtag))
|
||||
&& $withvalorisationhistory !== false )
|
||||
{
|
||||
$query = $this->getGehaltsbestandteileMitValorisierungsHistorie(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = $this->getGehaltsbestandteileOhneValorisierungsHistorie(
|
||||
$dienstverhaeltnis_id, $stichtag, $includefuture
|
||||
);
|
||||
}
|
||||
|
||||
$gehaltsbestandteile = array();
|
||||
if( null !== ($rows = getData($query)) )
|
||||
{
|
||||
foreach( $rows as $row ) {
|
||||
$tmpgb = new Gehaltsbestandteil();
|
||||
$tmpgb->hydrateByStdClass($row, true);
|
||||
$gehaltsbestandteile[] = $tmpgb;
|
||||
}
|
||||
}
|
||||
|
||||
return $gehaltsbestandteile;
|
||||
}
|
||||
|
||||
protected function getGehaltsbestandteileOhneValorisierungsHistorie($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
{
|
||||
$stichtagclause = '';
|
||||
if( !is_null($stichtag) )
|
||||
@@ -111,22 +183,64 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
|
||||
{$stichtagclause}
|
||||
EOSQL;
|
||||
|
||||
$query = $this->loadWhere(
|
||||
$result = $this->loadWhere(
|
||||
$where,
|
||||
$this->getEncryptedColumns()
|
||||
);
|
||||
|
||||
$gehaltsbestandteile = array();
|
||||
if( null !== ($rows = getData($query)) )
|
||||
{
|
||||
foreach( $rows as $row ) {
|
||||
$tmpgb = new Gehaltsbestandteil();
|
||||
$tmpgb->hydrateByStdClass($row, true);
|
||||
$gehaltsbestandteile[] = $tmpgb;
|
||||
}
|
||||
}
|
||||
|
||||
return $gehaltsbestandteile;
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function getGehaltsbestandteileMitValorisierungsHistorie($dienstverhaeltnis_id, $stichtag, $includefuture=false)
|
||||
{
|
||||
$date = strftime('%Y-%m-%d', strtotime($stichtag));
|
||||
$includefuture_clause = ($includefuture)
|
||||
? ' OR COALESCE(von, \'1970-01-01\'::date) > ' . $this->escape($date)
|
||||
: '';
|
||||
$sql = <<<EOSQL
|
||||
SELECT
|
||||
g.gehaltsbestandteil_id,
|
||||
g.dienstverhaeltnis_id,
|
||||
g.vertragsbestandteil_id,
|
||||
g.gehaltstyp_kurzbz,
|
||||
g.von,
|
||||
g.bis,
|
||||
g.anmerkung,
|
||||
g.grundbetrag AS grundbetrag,
|
||||
COALESCE(vh.betrag_valorisiert, g.grundbetrag) AS betrag_valorisiert,
|
||||
g.valorisierungssperre,
|
||||
g.insertamum,
|
||||
g.insertvon,
|
||||
g.updateamum,
|
||||
g.updatevon,
|
||||
g.valorisierung,
|
||||
g.auszahlungen
|
||||
FROM
|
||||
hr.tbl_gehaltsbestandteil g
|
||||
LEFT JOIN
|
||||
hr.tbl_valorisierung_historie vh ON vh.gehaltsbestandteil_id = g.gehaltsbestandteil_id AND vh.valorisierungsdatum = (
|
||||
SELECT
|
||||
vi.valorisierungsdatum
|
||||
FROM
|
||||
hr.tbl_valorisierung_instanz vi
|
||||
JOIN
|
||||
hr.tbl_dienstverhaeltnis d ON d.dienstverhaeltnis_id = {$this->escape($dienstverhaeltnis_id)}
|
||||
AND d.oe_kurzbz = vi.oe_kurzbz
|
||||
WHERE
|
||||
{$this->escape($date)} >= valorisierungsdatum
|
||||
ORDER BY
|
||||
valorisierungsdatum DESC
|
||||
LIMIT 1
|
||||
)
|
||||
WHERE
|
||||
g.dienstverhaeltnis_id = {$this->escape($dienstverhaeltnis_id)}
|
||||
AND (
|
||||
{$this->escape($date)} BETWEEN COALESCE(von, '1970-01-01'::date) AND COALESCE(bis, '2170-01-01'::date)
|
||||
{$includefuture_clause}
|
||||
)
|
||||
EOSQL;
|
||||
|
||||
$result = $this->execReadOnlyQuery($sql, array(), $this->getEncryptedColumns());
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getGehaltsbestandteileValorisiert($dienstverhaeltnis_id, $stichtag=null, $includefuture=false)
|
||||
@@ -159,20 +273,9 @@ EOSQL;
|
||||
ORDER BY gb.von,vh.valorisierungsdatum, gb.gehaltsbestandteil_id;
|
||||
";
|
||||
|
||||
$encryptedColumns = array(
|
||||
'gb.grundbetrag' => array(
|
||||
DB_Model::CRYPT_CAST => 'numeric',
|
||||
DB_Model::CRYPT_PASSWORD_NAME => 'ENCRYPTIONKEYGEHALT'
|
||||
),
|
||||
'vh.betrag_valorisiert' => array(
|
||||
DB_Model::CRYPT_CAST => 'numeric',
|
||||
DB_Model::CRYPT_PASSWORD_NAME => 'ENCRYPTIONKEYGEHALT'
|
||||
)
|
||||
);
|
||||
|
||||
$query = $this->execQuery($qry,
|
||||
array($dienstverhaeltnis_id),
|
||||
$encryptedColumns);
|
||||
$this->getEncryptedColumns());
|
||||
|
||||
$gehaltsbestandteile = array();
|
||||
if( null !== ($rows = getData($query)) )
|
||||
@@ -219,7 +322,6 @@ EOSQL;
|
||||
return $gehaltsbestandteile;
|
||||
}
|
||||
|
||||
|
||||
public function getGehaltsbestandteil($id)
|
||||
{
|
||||
$this->addSelect('*');
|
||||
|
||||
@@ -19,12 +19,17 @@ class Vertragsbestandteil_model extends DB_Model
|
||||
|
||||
protected function getVertragsbestandteilSQL()
|
||||
{
|
||||
$sapInstalled = $this->_checkIfSAPSyncTableExists();
|
||||
|
||||
$oe_kurzbz_sap = $sapInstalled ? 'sap.oe_kurzbz_sap' : 'NULL AS oe_kurzbz_sap';
|
||||
$sap_join = $sapInstalled ? 'LEFT JOIN sync.tbl_sap_organisationsstruktur sap USING(oe_kurzbz)' : '';
|
||||
|
||||
$sql = <<<EOSQL
|
||||
SELECT
|
||||
v.*,
|
||||
bf.funktion_kurzbz, bf.uid AS mitarbeiter_uid,
|
||||
funktion.beschreibung AS funktion_bezeichnung,
|
||||
oe.oe_kurzbz, oe.bezeichnung AS oe_bezeichnung, sap.oe_kurzbz_sap,
|
||||
bf.funktion_kurzbz, bf.uid AS mitarbeiter_uid,
|
||||
funktion.beschreibung AS funktion_bezeichnung,
|
||||
oe.oe_kurzbz, oe.bezeichnung AS oe_bezeichnung, {$oe_kurzbz_sap},
|
||||
oet.organisationseinheittyp_kurzbz AS oe_typ_kurzbz, oet.bezeichnung AS oe_typ_bezeichnung,
|
||||
ft.freitexttyp_kurzbz, ft.titel, ft.anmerkung,
|
||||
f.benutzerfunktion_id,
|
||||
@@ -39,7 +44,7 @@ class Vertragsbestandteil_model extends DB_Model
|
||||
hr.tbl_vertragsbestandteil_freitext ft USING(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_funktion f USING(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
LEFT JOIN
|
||||
public.tbl_benutzerfunktion bf USING(benutzerfunktion_id)
|
||||
LEFT JOIN
|
||||
public.tbl_funktion funktion USING(funktion_kurzbz)
|
||||
@@ -47,8 +52,7 @@ class Vertragsbestandteil_model extends DB_Model
|
||||
public.tbl_organisationseinheit oe USING(oe_kurzbz)
|
||||
LEFT JOIN
|
||||
public.tbl_organisationseinheittyp oet USING(organisationseinheittyp_kurzbz)
|
||||
LEFT JOIN
|
||||
sync.tbl_sap_organisationsstruktur sap USING(oe_kurzbz)
|
||||
{$sap_join}
|
||||
LEFT JOIN
|
||||
hr.tbl_vertragsbestandteil_karenz k USING(vertragsbestandteil_id)
|
||||
LEFT JOIN
|
||||
@@ -178,4 +182,30 @@ EOSQL;
|
||||
|
||||
return $vbcount[0]->overlappingvbs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if sap sync table exists.
|
||||
* @return bool
|
||||
*/
|
||||
private function _checkIfSAPSyncTableExists()
|
||||
{
|
||||
$params = array(
|
||||
DB_NAME,
|
||||
'sync',
|
||||
'tbl_sap_organisationsstruktur'
|
||||
);
|
||||
|
||||
$sql = "SELECT
|
||||
1 AS exists
|
||||
FROM
|
||||
information_schema.tables
|
||||
WHERE
|
||||
table_catalog = ? AND
|
||||
table_schema = ? AND
|
||||
table_name = ?";
|
||||
|
||||
$res = $this->execReadOnlyQuery($sql, $params);
|
||||
|
||||
return hasData($res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,4 +338,19 @@ define('DIENSTVERHAELTNIS_SUPPORT', false);
|
||||
|
||||
// Falls Studstatus (Abmeldung, AbmeldungStg, Unterbrechung, Wiederholung) verwendet wird zeige Hinweistext bei Eingabe einer kommissionellen oder zusaetzlichen kommissionellen Pruefung
|
||||
define('FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT', false);
|
||||
|
||||
// default absender (@DOMAIN wird hinzugefuegt daher ohne angeben)
|
||||
define('SANCHO_MAIL_DEFAULT_SENDER', 'noreply');
|
||||
|
||||
// header und footer Bilder für eigene Mails verwenden
|
||||
define('SANCHO_MAIL_USE_IMAGES', true);
|
||||
|
||||
// Pfad für Bilder für eigene Mails, relativ zu document root
|
||||
define('SANCHO_MAIL_IMG_PATH', 'skin/images/sancho/');
|
||||
|
||||
// header Bild für eigene Mails
|
||||
define('SANCHO_MAIL_HEADER_IMG', 'sancho_header_DEFAULT.jpg');
|
||||
|
||||
// footer image for eigene Mails
|
||||
define('SANCHO_MAIL_FOOTER_IMG', 'sancho_footer_DEFAULT.jpg');
|
||||
?>
|
||||
|
||||
@@ -127,6 +127,8 @@ $worksheet->write($zeile, ++$i, "STAATSBÜRGERSCHAFT", $format_bold);
|
||||
$maxlength[$i] = 16;
|
||||
$worksheet->write($zeile, ++$i, "SVNR", $format_bold);
|
||||
$maxlength[$i] = 4;
|
||||
$worksheet->write($zeile, ++$i, "PERSON_ID", $format_bold);
|
||||
$maxlength[$i] = 6;
|
||||
$worksheet->write($zeile, ++$i, "ERSATZKENNZEICHEN", $format_bold);
|
||||
$maxlength[$i] = 17;
|
||||
$worksheet->write($zeile, ++$i, "GESCHLECHT", $format_bold);
|
||||
@@ -399,6 +401,12 @@ function draw_content($row)
|
||||
$maxlength[$i] = mb_strlen($row->svnr);
|
||||
$worksheet->write($zeile, $i, $row->svnr);
|
||||
$i++;
|
||||
|
||||
//Person_id
|
||||
if (mb_strlen($row->person_id) > $maxlength[$i])
|
||||
$maxlength[$i] = mb_strlen($row->person_id);
|
||||
$worksheet->write($zeile, $i, $row->person_id);
|
||||
$i++;
|
||||
|
||||
//Ersatzkennzeichen
|
||||
if (mb_strlen($row->ersatzkennzeichen) > $maxlength[$i])
|
||||
|
||||
+65
-20
@@ -18,12 +18,13 @@
|
||||
*
|
||||
* Authors: Cristina Hainberger <hainberg@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../config/global.config.inc.php');
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/mail.class.php');
|
||||
require_once(dirname(__FILE__).'/vorlage.class.php');
|
||||
|
||||
const DEFAULT_SANCHO_HEADER_IMG = 'sancho_header_DEFAULT.jpg';
|
||||
const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
const FALLBACK_SENDER = 'noreply';
|
||||
|
||||
/**
|
||||
* Send single Mail with Sancho Design and Layout.
|
||||
@@ -32,22 +33,66 @@ const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
|
||||
* to be replaced in the content template.
|
||||
* @param string $to Email-adress.
|
||||
* @param string $subject Subject of mail.
|
||||
* @param string $headerImg Filename of the specific Sancho header image.
|
||||
* @param string $footerImg
|
||||
* @param string $headerImg Filename of the specific Sancho header image, false if no header image
|
||||
* @param string $footerImg - false if no footer image
|
||||
* @param string $replyTo default Email-adress for reply.
|
||||
* @param string | array $cc
|
||||
* @return boolean True, if succeeded.
|
||||
*/
|
||||
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $replyTo = '', $cc = '')
|
||||
{
|
||||
$from = 'sancho@'. DOMAIN;
|
||||
$sanchoHeader_img = dirname(__FILE__). '/../skin/images/sancho/'. $headerImg;
|
||||
$sanchoFooter_img = dirname(__FILE__). '/../skin/images/sancho/'. $footerImg;
|
||||
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = '', $footerImg = '', $replyTo = '', $cc = '')
|
||||
{
|
||||
$from = ((defined('SANCHO_MAIL_DEFAULT_SENDER') && SANCHO_MAIL_DEFAULT_SENDER != '')
|
||||
? SANCHO_MAIL_DEFAULT_SENDER
|
||||
: FALLBACK_SENDER)
|
||||
. '@' . DOMAIN;
|
||||
|
||||
$image_path_prefix = dirname(__DIR__).'/'.(defined('SANCHO_MAIL_IMG_PATH') ? SANCHO_MAIL_IMG_PATH : '');
|
||||
$sanchoHeader_img = '';
|
||||
$sanchoFooter_img = '';
|
||||
$cid_header = '';
|
||||
$cid_footer = '';
|
||||
|
||||
if (!defined('SANCHO_MAIL_USE_IMAGES') || SANCHO_MAIL_USE_IMAGES)
|
||||
{
|
||||
if (isset($headerImg) && $headerImg != '')
|
||||
{
|
||||
// use provided header image
|
||||
$sanchoHeader_img = $headerImg;
|
||||
}
|
||||
elseif (defined('SANCHO_MAIL_HEADER_IMG') && SANCHO_MAIL_HEADER_IMG != '')
|
||||
{
|
||||
// use default header image
|
||||
$sanchoHeader_img = SANCHO_MAIL_HEADER_IMG;
|
||||
}
|
||||
|
||||
if ($sanchoHeader_img != '')
|
||||
{
|
||||
// set full image path
|
||||
$sanchoHeader_img = $image_path_prefix.$sanchoHeader_img;
|
||||
}
|
||||
|
||||
if (isset($footerImg) && $footerImg != '')
|
||||
{
|
||||
// use provided footer image
|
||||
$sanchoFooter_img = $footerImg;
|
||||
}
|
||||
elseif (defined('SANCHO_MAIL_FOOTER_IMG') && SANCHO_MAIL_FOOTER_IMG != '')
|
||||
{
|
||||
// use default footer image
|
||||
$sanchoFooter_img = SANCHO_MAIL_FOOTER_IMG;
|
||||
}
|
||||
|
||||
if ($sanchoFooter_img !== '')
|
||||
{
|
||||
// set full image path
|
||||
$sanchoFooter_img = $image_path_prefix.$sanchoFooter_img;
|
||||
}
|
||||
|
||||
// Set unique content id for embedding header and footer image
|
||||
$cid_header = uniqid();
|
||||
$cid_footer = uniqid();
|
||||
}
|
||||
|
||||
// Set unique content id for embedding header and footer image
|
||||
$cid_header = uniqid();
|
||||
$cid_footer = uniqid();
|
||||
|
||||
// Set specific mail content into specific content template
|
||||
$content = parseMailContent($vorlage_kurzbz, $vorlage_data);
|
||||
|
||||
@@ -63,22 +108,22 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
|
||||
|
||||
// Send mail
|
||||
$mail = new Mail($to, $from, $subject, $body);
|
||||
|
||||
// * embed the images
|
||||
$mail->addEmbeddedImage($sanchoHeader_img, 'image/jpg', '', $cid_header);
|
||||
$mail->addEmbeddedImage($sanchoFooter_img, 'image/jpg', '', $cid_footer);
|
||||
|
||||
// * embed the images if needed
|
||||
if ($sanchoHeader_img != '') $mail->addEmbeddedImage($sanchoHeader_img, 'image/jpg', '', $cid_header);
|
||||
if ($sanchoFooter_img != '') $mail->addEmbeddedImage($sanchoFooter_img, 'image/jpg', '', $cid_footer);
|
||||
|
||||
// * Set reply-to
|
||||
if (isset($replyTo) && $replyTo != '')
|
||||
$mail->setReplyTo($replyTo);
|
||||
|
||||
|
||||
// * Set cc
|
||||
if (isset($cc) && $cc != '')
|
||||
$mail->setCCRecievers($cc);
|
||||
|
||||
// * embed the html content
|
||||
$mail->setHTMLContent($body);
|
||||
|
||||
|
||||
return $mail->send();
|
||||
}
|
||||
|
||||
@@ -95,7 +140,7 @@ function parseMailContent($vorlage_kurzbz, $vorlage_data)
|
||||
{
|
||||
$vorlage = new Vorlage();
|
||||
$vorlage->getAktuelleVorlage('etw', $vorlage_kurzbz);
|
||||
|
||||
|
||||
// If the text and the subject of the template are not empty
|
||||
if (!empty($vorlage->text))
|
||||
{
|
||||
|
||||
@@ -67,7 +67,8 @@ require_once('dbupdate_3.4/25999_C4_permission.php');
|
||||
require_once('dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php');
|
||||
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');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -206,11 +207,15 @@ $tabellen=array(
|
||||
"hr.tbl_karenztyp" => array("karenztyp_kurzbz","bezeichnung"),
|
||||
"hr.tbl_teilzeittyp" => array("teilzeittyp_kurzbz","bezeichnung","aktiv"),
|
||||
"hr.tbl_gehaltsbestandteil" => array("gehaltsbestandteil_id","dienstverhaeltnis_id","vertragsbestandteil_id","gehaltstyp_kurzbz","von","bis","anmerkung","grundbetrag","betrag_valorisiert","valorisierungssperre","insertamum", "insertvon","updateamum","updatevon","valorisierung","auszahlungen"),
|
||||
"hr.tbl_gehaltshistorie" => array("gehaltshistorie_id", "datum","betrag","gehaltsbestandteil_id","mitarbeiter_uid"),
|
||||
"hr.tbl_gehaltshistorie" => array("gehaltshistorie_id", "datum","betrag","gehaltsbestandteil_id","mitarbeiter_uid","gehaltsbestandteil_von","gehaltsbestandteil_bis"),
|
||||
"hr.tbl_gehaltstyp" => array("gehaltstyp_kurzbz","bezeichnung","valorisierung","sort","aktiv"),
|
||||
"hr.tbl_frist" => array("frist_id","mitarbeiter_uid","ereignis_kurzbz","bezeichnung","datum","status_kurzbz","parameter","insertvon","insertamum","updatevon","updateamum"),
|
||||
"hr.tbl_frist_ereignis" => array("ereignis_kurzbz","bezeichnung","manuell"),
|
||||
"hr.tbl_frist_status" => array("status_kurzbz", "bezeichnung"),
|
||||
"hr.tbl_frist_ereignis" => array("ereignis_kurzbz","bezeichnung","manuell","sort"),
|
||||
"hr.tbl_frist_status" => array("status_kurzbz", "bezeichnung","sort"),
|
||||
"hr.tbl_valorisierung_historie" => array("valorisierung_historie_id", "gehaltsbestandteil_id", "valorisierungsdatum", "betrag_valorisiert", "insertvon", "insertamum"),
|
||||
"hr.tbl_valorisierung_instanz" => array("updateamum", "oe_kurzbz", "valorisierungsdatum", "valorisierung_kurzbz", "beschreibung", "ausgewaehlt", "updatevon", "valorisierung_instanz_id"),
|
||||
"hr.tbl_valorisierung_instanz_methode" => array("valorisierung_instanz_id", "valorisierung_methode_kurzbz", "beschreibung", "valorisierung_methode_parameter"),
|
||||
"hr.tbl_valorisierung_methode" => array("beschreibung", "valorisierung_methode_kurzbz"),
|
||||
"lehre.tbl_abschlussbeurteilung" => array("abschlussbeurteilung_kurzbz","bezeichnung","bezeichnung_english","sort"),
|
||||
"lehre.tbl_abschlusspruefung" => array("abschlusspruefung_id","student_uid","vorsitz","pruefer1","pruefer2","pruefer3","abschlussbeurteilung_kurzbz","akadgrad_id","pruefungstyp_kurzbz","datum","uhrzeit","sponsion","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","note","protokoll","endezeit","pruefungsantritt_kurzbz","freigabedatum"),
|
||||
"lehre.tbl_abschlusspruefung_antritt" => array("pruefungsantritt_kurzbz","bezeichnung","bezeichnung_english","sort"),
|
||||
|
||||
@@ -63,3 +63,18 @@ if (!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_lehrveranstaltung_faktor
|
||||
else
|
||||
echo 'Tabelle: lehre.tbl_lehrveranstaltung_faktor befüllt!';
|
||||
}
|
||||
|
||||
// Add index to lehre.tbl_lehrveranstaltung_faktor
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_lehrveranstaltung_faktor_lvid'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_lehrveranstaltung_faktor_lvid ON lehre.tbl_lehrveranstaltung_faktor USING btree (lehrveranstaltung_id);";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Indizes: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Index fuer lehre.tbl_lehrveranstaltung_faktor.lehrveranstaltung_id hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Harald Bamberger <harald.bamberger@technikum-wien.at>,
|
||||
*
|
||||
* Beschreibung:
|
||||
* Permissions f. Gehaelter
|
||||
*/
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add permission: basis/gehaelter
|
||||
if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/gehaelter';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('basis/gehaelter', 'Zugriff auf Gehaelter');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>system.tbl_berechtigung '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'system.tbl_berechtigung: Added permission "basis/gehaelter"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_valorisierung_methode' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_valorisierung_methode (
|
||||
valorisierung_methode_kurzbz character varying(32) NOT NULL,
|
||||
beschreibung character varying NOT NULL,
|
||||
CONSTRAINT tbl_valorisierung_methode_pkey PRIMARY KEY (valorisierung_methode_kurzbz)
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_valorisierung_methode TO vilesci;
|
||||
|
||||
INSERT INTO hr.tbl_valorisierung_methode (valorisierung_methode_kurzbz, beschreibung) VALUES
|
||||
('ValorisierungProzent', 'Valorisierung um einen Prozentsatz'),
|
||||
('ValorisierungFixBetrag', 'Valorisierung um einen fixen Betrag'),
|
||||
('ValorisierungGestaffelt', 'mehrere Stufen mit unterschiedlichen Prozentwerten')
|
||||
ON CONFLICT(valorisierung_methode_kurzbz) DO NOTHING;
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Valorisierung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_valorisierung_methode wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_valorisierung_instanz' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_valorisierung_instanz (
|
||||
valorisierung_instanz_id serial NOT NULL,
|
||||
oe_kurzbz character varying(32),
|
||||
valorisierungsdatum date NOT NULL,
|
||||
valorisierung_kurzbz character varying(128) NOT NULL,
|
||||
beschreibung text,
|
||||
ausgewaehlt boolean DEFAULT false NOT NULL,
|
||||
updatevon character varying(32),
|
||||
updateamum timestamp without time zone,
|
||||
CONSTRAINT tbl_valorisierung_instanz_pkey PRIMARY KEY (valorisierung_instanz_id),
|
||||
CONSTRAINT tbl_valorisierung_instanz_fk1 FOREIGN KEY (oe_kurzbz) REFERENCES public.tbl_organisationseinheit(oe_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
UNIQUE(valorisierung_kurzbz)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS tbl_valorisierung_instanz_unique_idx ON hr.tbl_valorisierung_instanz (ausgewaehlt, valorisierungsdatum, oe_kurzbz) WHERE (ausgewaehlt = TRUE);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_valorisierung_instanz TO vilesci;
|
||||
GRANT SELECT,UPDATE ON SEQUENCE hr.tbl_valorisierung_instanz_valorisierung_instanz_id_seq TO vilesci;
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Valorisierung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_valorisierung_instanz wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_valorisierung_instanz_methode' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_valorisierung_instanz_methode (
|
||||
valorisierung_instanz_id integer NOT NULL,
|
||||
valorisierung_methode_kurzbz character varying(32) NOT NULL,
|
||||
beschreibung text,
|
||||
valorisierung_methode_parameter jsonb NOT NULL,
|
||||
CONSTRAINT tbl_valorisierung_instanz_methode_pkey PRIMARY KEY (valorisierung_instanz_id, valorisierung_methode_kurzbz),
|
||||
CONSTRAINT tbl_valorisierung_instanz_methode_fk1 FOREIGN KEY (valorisierung_instanz_id) REFERENCES hr.tbl_valorisierung_instanz(valorisierung_instanz_id) ON UPDATE CASCADE ON DELETE RESTRICT,
|
||||
CONSTRAINT tbl_valorisierung_instanz_methode_fk2 FOREIGN KEY (valorisierung_methode_kurzbz) REFERENCES hr.tbl_valorisierung_methode(valorisierung_methode_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_valorisierung_instanz_methode TO vilesci;
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Valorisierung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_valorisierung_instanz_methode wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_valorisierung_historie' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_valorisierung_historie (
|
||||
valorisierung_historie_id serial NOT NULL,
|
||||
gehaltsbestandteil_id integer NOT NULL,
|
||||
valorisierungsdatum date NOT NULL,
|
||||
betrag_valorisiert bytea NOT NULL,
|
||||
insertvon character varying(32),
|
||||
insertamum timestamp without time zone DEFAULT now(),
|
||||
CONSTRAINT tbl_valorisierung_historie_pkey PRIMARY KEY (valorisierung_historie_id)
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_valorisierung_historie TO vilesci;
|
||||
GRANT SELECT,UPDATE ON SEQUENCE hr.tbl_valorisierung_historie_valorisierung_historie_id_seq TO vilesci;
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Valorisierung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_valorisierung_historie wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
+44
-24
@@ -18268,6 +18268,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'international',
|
||||
'category' => 'international',
|
||||
'phrase' => 'internationalCredits',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'International Credits',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'International Credits',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'international',
|
||||
'category' => 'international',
|
||||
@@ -18397,11 +18417,11 @@ array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Ab dem Studienjahr 2022/23 ist der Erwerb von internationalen und interkulturellen Kompetenzen Teil des Curriculums. <br />
|
||||
Auf der Grundlage der vorliegenden Maßnahmen absolvieren Sie im Laufe ihres Studiums Internationalisierungsaktivitäten, die mit unterschiedlichen ECTS-Punkten hinterlegt sind. <br />
|
||||
In Summe müssen 5 ECTS erworben werden, die im 6. Semester wirksam werden. <br/>
|
||||
Auf der Grundlage der vorliegenden Maßnahmen absolvieren Sie im Laufe ihres Studiums Internationalisierungsaktivitäten, die mit unterschiedlichen International Credits hinterlegt sind. <br />
|
||||
In Summe müssen 5 International Credits erworben werden, die im 6. Semester wirksam werden. <br/>
|
||||
Das Modul „International skills“ wird mit der Beurteilung „Mit Erfolg teilgenommen“ abgeschlossen. <br />
|
||||
Bitte wählen Sie die für Sie in Frage kommenden Maßnahmen aus und planen Sie das entsprechende Semester. <br />
|
||||
Sobald die 5 ECTS erreicht wurden, überprüft der Studiengang die von Ihnen hochgeladenen Dokumente. <br /><br />
|
||||
Sobald die 5 International Credits erreicht wurden, überprüft der Studiengang die von Ihnen hochgeladenen Dokumente. <br /><br />
|
||||
Fragen zum Status Ihrer Maßnahme u.ä. richten Sie bitte an den Studiengang. <br />
|
||||
Bei allen weiteren Fragen zum Thema Organisation und Finanzierung des Auslandsaufenthalts und/oder Sprachkurs gibt Ihnen das International Office der FH Technikum Wien unter <a href="mailto:international.office@technikum-wien.at">international.office@technikum-wien.at</a> gerne Auskunft.',
|
||||
'description' => '',
|
||||
@@ -18410,11 +18430,11 @@ array(
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Starting with the study year 2022/23, the acquisition of international and intercultural competencies is part of the curriculum.<br />
|
||||
On the basis of the measures at-hand, you will complete internationalization activities during the course of your studies, which are assigned different ECTS credits.<br />
|
||||
In total, 5 ECTS must be acquired, which become effective in the 6th semester.<br />
|
||||
On the basis of the measures at-hand, you will complete internationalization activities during the course of your studies, which are assigned different International Credits.<br />
|
||||
In total, 5 International Credits must be acquired, which become effective in the 6th semester.<br />
|
||||
The module “International skills” is completed with the assessment "Successfully participated". <br />
|
||||
Please select the measures that apply to you and schedule the appropriate semester. <br />
|
||||
Once the 5 ECTS have been achieved, the degree program will review the documents you have uploaded. <br /><br />
|
||||
Once the 5 International Credits have been achieved, the degree program will review the documents you have uploaded. <br /><br />
|
||||
Please direct questions regarding the status of your measure and the like should be directed to the study program. <br />
|
||||
For all further questions regarding the organization and financing of your stay abroad and/or language course, please contact the International Office of the UAS Technikum Wien at <a href="mailto:international.office@technikum-wien.at">international.office@technikum-wien.at</a>.
|
||||
',
|
||||
@@ -18771,13 +18791,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'ECTS bestätigt',
|
||||
'text' => 'International Credits bestätigt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'ECTS confirmed',
|
||||
'text' => 'International Credits confirmed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -18791,13 +18811,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'ECTS - Maßnahme',
|
||||
'text' => 'International Credits - Maßnahme',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'ECTS - Measures',
|
||||
'text' => 'International Credits - Measures',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19071,13 +19091,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Nur bestätigte Maßnahmen vorhanden, aber weniger als 5 ECTs.',
|
||||
'text' => 'Nur bestätigte Maßnahmen vorhanden, aber weniger als 5 International Credits.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Only confirmed measures, but fewer than 5 ECTs.',
|
||||
'text' => 'Only confirmed measures, but fewer than 5 International Credits.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19091,13 +19111,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Es wurden 5 ECTs erreicht.',
|
||||
'text' => 'Es wurden 5 International Credits erreicht.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '5 ECTs points have been achieved.',
|
||||
'text' => '5 International Credits have been achieved.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19251,13 +19271,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'ECTS - bestätigt',
|
||||
'text' => 'International Credits - bestätigt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'ECTS - confirmed',
|
||||
'text' => 'International Credits - confirmed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19391,13 +19411,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => '>=5 ECTS verplant',
|
||||
'text' => '>=5 International Credits verplant',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '>=5 ECTS planned',
|
||||
'text' => '>=5 international credits planned',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19411,13 +19431,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => '<5 ECTS verplant',
|
||||
'text' => '<5 International Credits verplant',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '<5 ECTS planned',
|
||||
'text' => '<5 International Credits planned',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19431,13 +19451,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => '>=5 ECTS bestätigt',
|
||||
'text' => '>=5 International Credits bestätigt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '>=5 ECTS confirmed',
|
||||
'text' => '>=5 International Credits confirmed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -19451,13 +19471,13 @@ array(
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => '<5 ECTS bestätigt',
|
||||
'text' => '<5 International Credits bestätigt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '<5 ECTS confirmed',
|
||||
'text' => '<5 International Credits confirmed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user