Compare commits
5 Commits
epic-anmel
...
b9307c2f5a
Author | SHA1 | Date | |
---|---|---|---|
b9307c2f5a | |||
c7b3072e59 | |||
b0c576bad3 | |||
30375476cc | |||
943e8dc273 |
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
if (!isset($argv[1])) {
|
||||
die('No version set, please use ' . PHP_EOL .'make setup version=' . PHP_EOL);
|
||||
die('No version set, please use ' . PHP_EOL .'make deploy version=' . PHP_EOL);
|
||||
}
|
||||
$file = file_get_contents(dirname(__FILE__) . '/info.json.tpl');
|
||||
$file = str_replace('%version%', $argv[1], $file);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Plugin Name: BdP Kompass
|
||||
* Description: Wordpress-Plugin zur Unterstützung von Stämmen im Bund der Pfadfinderinnen und Pfadfinder e.V. zur optimalen Verwaltung eurer Webseite
|
||||
* Version: 4.6.1
|
||||
* Version: 4.6.2
|
||||
* Tags: bdp, utility, helper
|
||||
* Requires at least: 6.0
|
||||
* Requires PHP: 8.2
|
||||
|
11
changelog
11
changelog
@ -1,3 +1,14 @@
|
||||
<h4>Version 4.6.2</h4>
|
||||
<ul>
|
||||
<li>Bugfixes</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h4>Version 4.6.1</h4>
|
||||
<ul>
|
||||
<li>Veranstaltungsanmeldungen</li>
|
||||
</ul>
|
||||
|
||||
<h4>Version 4.3.9</h4>
|
||||
<ul>
|
||||
<li>Fehlerbehebung</li>
|
||||
|
@ -4,7 +4,7 @@ SET time_zone = "+00:00";
|
||||
|
||||
CREATE TABLE `%tablename%` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`EVENTiD` int NOT NULL,
|
||||
`eventID` int NOT NULL,
|
||||
`teilnahme` ENUM('participant','volunteer','other','') NOT NULL,
|
||||
`vorname` varchar(128) NOT NULL,
|
||||
`nachname` varchar(128) NOT NULL,
|
||||
|
@ -38,6 +38,10 @@ class AjaxRouterController {
|
||||
new PrintParticipantListPhotoPdfController();
|
||||
break;
|
||||
|
||||
case 'print_invoice_data':
|
||||
new PrintParticipantListInvoicePdfController();
|
||||
die();
|
||||
|
||||
default:
|
||||
echo 'No "method" specified.';
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Bdp\Modules\EventParticipants\Controllers;
|
||||
|
||||
use Bdp\Modules\EventParticipants\Models\Event;
|
||||
use Bdp\Modules\EventParticipants\Reqeust\AnwesenheitRequest;
|
||||
|
||||
class PrintParticipantListInvoicePdfController {
|
||||
|
||||
private function get_table_header(string $event_name) : string {
|
||||
return '<h1>Teili-Liste für ' . $event_name . '</h1><br /><br /><br /><br /><table style="border-spacing: 0; width: 100%;page-break-after: always">' .
|
||||
'<tr>' .
|
||||
'<td>Vorname</td>' .
|
||||
'<td>Nachname</td>' .
|
||||
'<td>Teili-Gruppe</td>' .
|
||||
'<td>Stamm</td>' .
|
||||
'<td>Geburtsdatum</td>' .
|
||||
'<td>Beitrag</td>' .
|
||||
'<td>Tage</td>' .
|
||||
'<td>Notizen</td>';
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
global $_POST, $_REQUEST, $dbHandler;
|
||||
|
||||
$group_name = ['participant' => 'Teili', 'volunteer' => 'Teami', 'other' => 'Sonstige'];
|
||||
|
||||
$event = Event::loadById( $_REQUEST['event-id'] );
|
||||
$output = '';
|
||||
|
||||
$i = 0;
|
||||
foreach ( $event->tribes as $tribe => $participants ) {
|
||||
if ( count( $participants ) == 0 ) {
|
||||
continue;
|
||||
}
|
||||
foreach ( $participants as $participant ) {
|
||||
if ($participant->beitrag == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $i == 0 ) {
|
||||
$output .= $this->get_table_header( $event->event_name );
|
||||
}
|
||||
$i ++;
|
||||
|
||||
$output .= '<tr style="min-height: 80px; height: 80px; border-style: solid; border-width: 1px;">' .
|
||||
'<td style="min-height: 40px; height: 40px; width: 150px; border-style: solid; border-width: 1px;">' . $participant->vorname .
|
||||
('' != $participant->pfadiname ? '<br /> (' . $participant->pfadiname . ')' : '') . '</td>' .
|
||||
'<td style="width: 150px; border-style: solid; border-width: 1px;">' . $participant->nachname . '</td>' .
|
||||
'<td style="padding-right: 100px; border-style: solid; border-width: 1px;">' . $group_name[$participant->teilnahme] . '</td>' .
|
||||
'<td style="padding-right: 100px; border-style: solid; border-width: 1px;">' . $tribe . '</td>' .
|
||||
'<td style="padding-right: 50px; border-style: solid; border-width: 1px;">' . \DateTime::createFromFormat( 'Y-m-d', $participant->geburtsdatum )->format( 'd.m.Y' ) . '</td>' .
|
||||
'<td style="padding-right: 50px; border-style: solid; border-width: 1px;">' . str_replace('.', ',', $participant->beitrag) . ' Euro</td>' .
|
||||
'<td style="border-style: solid; border-width: 1px;">' . AnwesenheitRequest::send($participant) . '</td>' .
|
||||
'<td style="padding-right: 150px; border-style: solid; border-width: 1px;"></td></tr>';
|
||||
if ( $i == 12 ) {
|
||||
$output .= '</table>';
|
||||
$i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
$output .= '</table></body></html>';
|
||||
kompass_create_pdf($output,$event->event_name . ' Beitragsliste.pdf', 'landscape');
|
||||
}
|
||||
}
|
@ -72,6 +72,7 @@
|
||||
<a href="#" onclick="kompass_load_ajax_nw('EventParticipants', 'print_kitchen_data', 'event-id=<?= $event->id; ?>');" class="button">Küchenliste</a>
|
||||
<a href="#" onclick="kompass_load_ajax_nw('EventParticipants', 'print_kitchen_allergies_data', 'event-id=<?= $event->id; ?>');" class="button">Küchenliste (Allergien)</a>
|
||||
<a href="#" onclick="kompass_load_ajax_nw('EventParticipants', 'print_medical_data', 'event-id=<?= $event->id; ?>');" class="button">Sani-Liste</a>
|
||||
<a href="#" onclick="kompass_load_ajax_nw('EventParticipants', 'print_invoice_data', 'event-id=<?= $event->id; ?>');" class="button">Beitrags-Liste</a>
|
||||
<a href="<?= $admin_link . 'send-mail-to-all&event-id=' . $event->id ?>" class="button">Rundmail an alle</a>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user