changes for aenderung and korrektur

This commit is contained in:
Harald Bamberger
2023-05-30 19:13:27 +02:00
parent a47a746940
commit ec000fbf83
5 changed files with 80 additions and 20 deletions
@@ -80,7 +80,7 @@ class Gehaltsbestandteil_model extends DB_Model implements IEncryption
. ' AND COALESCE(bis, \'2170-01-01\'::date)';
if( $includefuture )
{
$stichtagclause .= ' OR COALESCE(v.von, \'1970-01-01\'::date) > '
$stichtagclause .= ' OR COALESCE(von, \'1970-01-01\'::date) > '
. $this->escape($date);
}
$stichtagclause .= ')';
@@ -113,6 +113,7 @@ EOSQL;
public function getGehaltsbestandteil($id)
{
$this->addSelect('*');
$query = $this->load($id, $this->getEncryptedColumns());
$gehaltsbestandteil = null;
@@ -120,19 +120,23 @@ EOSQL;
;
EOSQL;
// echo $sql . "\n\n";
$query = $this->db->query($sql);
$vertragsbestandteil = array();
try
$query = $this->execReadOnlyQuery($sql);
$vertragsbestandteil = null;
if( hasData($query) )
{
$vertragsbestandteile = VertragsbestandteilFactory::getVertragsbestandteil($row); // TODO add decryption
$data = getData($query)[0];
try
{
$vertragsbestandteil = VertragsbestandteilFactory::getVertragsbestandteil($data); // TODO add decryption
}
catch (Exception $ex)
{
echo $ex->getMessage() . "\n";
}
}
catch (Exception $ex)
{
echo $ex->getMessage() . "\n";
}
return $vertragsbestandteil;
}