Merge branch 'feature-15103/Bismeldung_erweitern_Ectsrundung_Emailbe'

This commit is contained in:
Andreas Österreicher
2021-10-27 16:45:48 +02:00
2 changed files with 61 additions and 21 deletions
+26 -16
View File
@@ -242,29 +242,37 @@ if($result = $db->db_query($qry))
$zustell_strasse = $rowzustelladr->strasse;
$zustell_nation = $rowzustelladr->nation;
}
// eMail-Adresse
$qry_mail = "
// FH eMail-Adresse FH aus UID@Domain
$email = '';
if ($row->student_uid != '')
{
$email = $row->student_uid. '@'. DOMAIN;
}
// private eMail-Adresse
$email_privat = '';
$qry_privmail = "
SELECT kontakt
FROM public.tbl_kontakt
WHERE kontakttyp = 'email'
AND zustellung = TRUE
AND person_id = ". $db->db_add_param($row->pers_id). "
ORDER BY insertamum DESC LIMIT 1;
WHERE zustellung = TRUE
AND kontakttyp = 'email'
AND person_id=". $db->db_add_param($row->pers_id). "
ORDER BY insertamum DESC
LIMIT 1;
";
$email = '';
if ($result_email = $db->db_query($qry_mail))
if ($privmail_result = $db->db_query($qry_privmail))
{
if($db->db_num_rows($result_email) == 1)
if($db->db_num_rows($privmail_result) == 1)
{
if($row_mail = $db->db_fetch_object($result_email))
if ($row_privmail = $db->db_fetch_object($privmail_result))
{
$email = $row_mail->kontakt;
$email_privat = $row_privmail->kontakt;
}
}
}
if($row->gebdatum<'1920-01-01' OR $row->gebdatum==null OR $row->gebdatum=='')
{
$error_log.=(!empty($error_log)?', ':'')."Geburtsdatum ('".$row->gebdatum."')";
@@ -620,7 +628,8 @@ if($result = $db->db_query($qry))
$datei.="
<SVNR>".$row->svnr."</SVNR>";
}
if($row->ersatzkennzeichen!='')
// Ersatzkennzeichen nur inkludieren wenn svnr nicht gesetzt
if($row->ersatzkennzeichen!='' && $row->svnr == null)
{
$datei.="
<ErsKz>".$row->ersatzkennzeichen."</ErsKz>";
@@ -648,7 +657,8 @@ if($result = $db->db_query($qry))
}
$datei.="
<eMailAdresse>". $email. "</eMailAdresse>
<eMailAdresse>". $email_privat. "</eMailAdresse>
<eMailAdresseBE>". $email. "</eMailAdresseBE>
<ZugangCode>".$row->zgv_code."</ZugangCode>
<ZugangDatum>".date("dmY", $datumobj->mktime_fromdate($row->zgvdatum))."</ZugangDatum>";
+35 -5
View File
@@ -758,6 +758,29 @@ function GenerateXMLStudentBlock($row)
$email = $row->student_uid. '@'. DOMAIN;
}
// private eMail-Adresse
$email_privat = '';
$qry_privmail = "
SELECT kontakt
FROM public.tbl_kontakt
WHERE zustellung = TRUE
AND kontakttyp = 'email'
AND person_id=". $db->db_add_param($row->pers_id). "
ORDER BY insertamum DESC
LIMIT 1;
";
if ($privmail_result = $db->db_query($qry_privmail))
{
if($db->db_num_rows($privmail_result) == 1)
{
if ($row_privmail = $db->db_fetch_object($privmail_result))
{
$email_privat = $row_privmail->kontakt;
}
}
}
if($row->gebdatum<'1920-01-01' OR $row->gebdatum==null OR $row->gebdatum=='')
{
$error_log.=(!empty($error_log)?', ':'')."Geburtsdatum ('".$row->gebdatum."')";
@@ -1263,7 +1286,9 @@ function GenerateXMLStudentBlock($row)
$datei .= "
<SVNR>" . $row->svnr . "</SVNR>";
}
if ($row->ersatzkennzeichen != '')
// Ersatzkennzeichen nur inkludieren wenn svnr nicht gesetzt
if ($row->ersatzkennzeichen != '' && $row->svnr == null)
{
$datei .= "
<ErsKz>" . $row->ersatzkennzeichen . "</ErsKz>";
@@ -1296,11 +1321,16 @@ function GenerateXMLStudentBlock($row)
";
}
if ($email_privat != '')
{
$datei .= "
<eMailAdresse>" . $email_privat . "</eMailAdresse>";
}
if ($email != '')
{
$datei .= "
<eMailAdresse>" . $email . "</eMailAdresse>
";
<eMailAdresseBE>" . $email . "</eMailAdresseBE>";
}
if(!$ausserordentlich)
@@ -1531,12 +1561,12 @@ function GenerateXMLStudentBlock($row)
if ($aktstatus != 'Incoming' && $rowio->ects_erworben != '')
{
$datei.="
<ECTSerworben>".$rowio->ects_erworben."</ECTSerworben>";
<ECTSerworben>".round($rowio->ects_erworben)."</ECTSerworben>";
}
if ($aktstatus != 'Incoming' && $rowio->ects_angerechnet != '')
{
$datei.="
<ECTSangerechnet>".$rowio->ects_angerechnet."</ECTSangerechnet>";
<ECTSangerechnet>".round($rowio->ects_angerechnet)."</ECTSangerechnet>";
}
foreach ($aufenthaltfoerderung_code_arr as $aufenthaltfoerderung_code)
{