From b8ca8427f66d11e64fd140ffb0d82fd3b3e6568b Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Mon, 6 Dec 2010 16:06:16 +0000 Subject: [PATCH] --- wawi/bestellung.php | 92 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 85 insertions(+), 7 deletions(-) diff --git a/wawi/bestellung.php b/wawi/bestellung.php index 59eb8eba7..cb3db07d9 100644 --- a/wawi/bestellung.php +++ b/wawi/bestellung.php @@ -29,6 +29,7 @@ require_once '../include/datum.class.php'; require_once '../include/benutzerberechtigung.class.php'; require_once '../include/standort.class.php'; require_once '../include/adresse.class.php'; +require_once '../include/studiengang.class.php'; require_once '../include/wawi_konto.class.php'; require_once '../include/wawi_bestellung.class.php'; require_once '../include/wawi_kostenstelle.class.php'; @@ -272,7 +273,7 @@ if(isset($_POST['deleteBtnStorno']) && isset($_POST['id'])) sortList: [[1,0]], widgets: ['zebra'] }); - + $('#aufteilung').toggle(); $('#aufteilung_link').click(function() { $('#aufteilung').toggle(); return false; @@ -602,6 +603,7 @@ if($aktion == 'suche') if(!$rechte->isberechtigt('wawi/bestellung',null, 'suid')) die('Sie haben keine Berechtigung zum Löschen von Bestellungen'); + // Bestellung löschen $id = (isset($_GET['id'])?$_GET['id']:null); $bestellung = new wawi_bestellung(); if($bestellung->delete($id)) @@ -643,6 +645,8 @@ if($aktion == 'suche') $allStandorte->getStandorteWithTyp('Intern'); $status= new wawi_bestellstatus(); $bestell_tag = new wawi_tags(); + $studiengang = new studiengang(); + $studiengang->getAll('typ, kurzbz', null); $summe= 0; $konto_vorhanden = false; @@ -942,6 +946,10 @@ if($aktion == 'suche') '; + $disabled =''; + if($status->isStatiVorhanden($bestellung->bestellung_id, 'Storno') ) + $disabled ='disabled'; + echo "\n"; echo "

"; @@ -949,19 +957,89 @@ if($aktion == 'suche') echo "Aufteilung\n"; echo "
"; echo "
\n"; - echo ""; + echo "
"; echo "\n"; - foreach($aufteilung->result as $auf) + $help = 0; + $anteil = 0; + $summe = 0; + // alle studiengänge, auch inaktive + foreach($studiengang->result as $stud) { - echo ""; + $vorhanden = false; + if($stud->studiengang_kz < 10000) + { + if($help%6 == 0) + { + echo""; + } + + foreach($aufteilung->result as $auf) + { + // wenn in aufteilung vorhanden + if(mb_strtoupper($auf->oe_kurzbz) == mb_strtoupper($stud->oe_kurzbz)) + { + $anteil = $auf->anteil; + $vorhanden = true; + } + } + + if($stud->aktiv || $vorhanden) + { + $summe += $anteil; + echo "\n"; + $help++; + $anteil = 0; + } + } } echo ""; + echo "\n"; + echo ' + + + + + + + + + + + '; + echo ""; + echo ""; echo "
".$auf->oe_kurzbz.$auf->anteil."
".mb_strtoupper($stud->oe_kurzbz).": %
Summe:%
"; echo "
"; echo "

"; - $disabled =''; - if($status->isStatiVorhanden($bestellung->bestellung_id, 'Storno') ) - $disabled ='disabled'; + + echo ' + '; } else {