diff --git a/wawi/bestellung.php b/wawi/bestellung.php
index 6caa8d180..dc693e635 100644
--- a/wawi/bestellung.php
+++ b/wawi/bestellung.php
@@ -40,7 +40,7 @@ require_once '../include/wawi_bestellstatus.class.php';
require_once '../include/tags.class.php';
$aktion ='';
-$test = 0;
+$test = 0; // Bestelldetail Anzahl
if(isset($_POST['getKonto']))
{
@@ -1448,11 +1448,8 @@ if($aktion == 'suche')
else
echo '
Mail verschickt!';
}
-
}
}
-
-
}
}
// kostenstelle gibt frei
@@ -1486,6 +1483,23 @@ if($aktion == 'suche')
{
echo "Fehler beim Setzen auf Status Freigabe.
";
echo " Zurück zur Bestellung ";
+
+ // wer ist freigabeberechtigt auf Organisationseinheit
+ $rechte = new benutzerberechtigung();
+ $uids = $rechte->getFreigabeBenutzer($bestellung_new->kostenstelle_id, null);
+ foreach($uids as $uid)
+ {
+ // E-Mail an Kostenstellenverantwortliche senden
+ $msg ="$bestellung_new->bestellung_id freigeben. bestellung_id> drücken ";
+ $mail = new mail($uid.'@'.DOMAIN, 'no-reply', 'Freigabe Bestellung', $msg);
+ $mail->setHTMLContent($msg);
+ if(!$mail->send())
+ echo 'Fehler beim Senden des Mails';
+ else
+ echo '
Mail verschickt!';
+ }
+
+
}
else
{