From e7bf12ca16fcfe2950f2fba02ebe19627ad883d4 Mon Sep 17 00:00:00 2001 From: Tim Repke <repketim@informatik.hu-berlin.de> Date: Fri, 26 Sep 2014 18:42:21 +0100 Subject: [PATCH] export of bank account list is finished --- registration-system/admin/pages_export.php | 33 ++++++++++++++++++-- registration-system/view/print_template.html | 24 ++++++++++++++ 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/registration-system/admin/pages_export.php b/registration-system/admin/pages_export.php index 6443885..18f7e93 100644 --- a/registration-system/admin/pages_export.php +++ b/registration-system/admin/pages_export.php @@ -71,7 +71,31 @@ function genTreff(){ } function genKonto(){ + global $header, $footer, $admin_db, $config_current_fahrt_id; + $people = $admin_db->select('bachelor',["forname", "sirname"], ["fahrt_id"=>$config_current_fahrt_id]); + $tabdata = []; + foreach($people as $p){ + array_push($tabdata, [$p['forname']." ".$p['sirname']," "," "," "," "]); + } + // leerfelder (just in case) + for($run = 0; $run < 8; $run++){ + array_push($tabdata, [" "," "," "," "," "]); + } + + $tabconf = ["colwidth" => ["25%", "30%", "25%", "15%", "5%"], + "cellheight" => "35pt", + "class" => [3=>"graycell", 4=>"graycell"]]; + + printTable(["Name", "Kontonummer/IBAN", "Bankleitzahl/BIC", "Betrag*", "Erl*"], $tabdata, $tabconf); + + $data = getFahrtInfo(); + + $header = " +<h1>Kontodaten für Rücküberweisung</h1> +Diese Liste verbleibt bei dem/der Fahrtverantwortlichen <u>".$data['leiter']."</u> und wird benötigt um die Förderung und den Differenzbetrag nach der Fahrt zurück zu überweisen.<br /> +<b>Graue/mit Sternchen gekennzeichnete Fehler freilassen</b> (Trolle bekommen kein Geld!!)"; + $footer = "Kontodaten (Rücküberweisung) - ".$data['titel']; } function genUnter(){ @@ -90,7 +114,7 @@ function printTable($headers, $data, $tabconf = []){ $text.=" </tr> </thead> - <tbody>";for($i=0; $i<10; $i++){ // FIXME entfernen! nur zu Testzwecken... + <tbody>"; foreach($data as $dr){ $text .= "<tr>"; $cell = 0; @@ -99,7 +123,7 @@ function printTable($headers, $data, $tabconf = []){ $cell++; } $text .= "</tr>"; - }} + } $text .=" </tbody> </table>"; @@ -107,13 +131,16 @@ function printTable($headers, $data, $tabconf = []){ function cellStyle($tabconf, $cell){ $ret = ""; - if(isset($tabconf['cellheight']) || isset($tabconf['colwidth'])){ + if(isset($tabconf['cellheight']) || isset($tabconf['colwidth']) || isset($tabconf['class'])){ $ret .= " style='"; if(isset($tabconf['cellheight'])) $ret .= "height:".$tabconf['cellheight'].";"; if(isset($tabconf['colwidth']) && isset($tabconf['colwidth'][$cell])) $ret .= "width:".$tabconf['colwidth'][$cell].";"; $ret .= "'"; + + if(isset($tabconf['class']) && isset($tabconf['class'][$cell])) + $ret .= " class='".$tabconf['class'][$cell]."'"; } return $ret; } diff --git a/registration-system/view/print_template.html b/registration-system/view/print_template.html index 78a716b..646f77f 100644 --- a/registration-system/view/print_template.html +++ b/registration-system/view/print_template.html @@ -49,6 +49,7 @@ table { border-collapse: collapse; + border-spacing: 0; } .dattable table, .dattable th, .dattable td { @@ -56,6 +57,29 @@ vertical-align: top; } + .graycell{ + background-color: transparent; + overflow: hidden; + z-index: 1; + border-right: 0; + border-bottom: 0; + } + .graycell:before{ + content: ""; + padding: 0; + height: 1px; + line-height: 1px; + width: 1px; + margin: -4px -994px -996px -6px; + display: block; + border: 0; + z-index: -1; + position:relative; + top: -500px; + border-top: 999px solid #d3d3d3; + border-left: 999px solid #d3d3d3;; + } + } @page { -- GitLab