diff --git a/includes/Admin/Admin.php b/includes/Admin/Admin.php index c8d06d8..baf87fd 100644 --- a/includes/Admin/Admin.php +++ b/includes/Admin/Admin.php @@ -781,7 +781,26 @@ class Admin { $meters_free = count( $this->meters->search( array( 'assignment' => 'free' ) ) ); $meters_used = count( $this->meters->search( array( 'assignment' => 'assigned' ) ) ); $tenants_total = count( $this->tenants->search() ); - $members_total = count( $this->assignments->get_member_users() ); + $all_members = $this->assignments->get_member_users(); + $members_total = count( $all_members ); + + // Arbeitsstunden laufendes Jahr + $work_year = (int) current_time( 'Y' ); + $work_config = $this->work->get_year_config( $work_year ); + $work_summary = $this->work->get_member_summary( $work_year, $all_members ); + $members_ok = 0; + $members_open = 0; + $total_missing_h = 0.0; + $total_surcharge = 0.0; + foreach ( $work_summary as $ws ) { + if ( $ws->missing_hours > 0 ) { + $members_open++; + $total_missing_h += $ws->missing_hours; + $total_surcharge += $ws->surcharge; + } else { + $members_ok++; + } + } ?>

@@ -814,6 +833,42 @@ class Admin {
+ +
+

+ +

+ $work_year ) ) ); ?>'> +

+ +
+
+

+

+
+
+

+

+
+
+

Std.

+

+
+
+

format_currency( $total_surcharge ) ); ?>

+

+
+
+ 0 ) : ?> +

+ $work_year, 'tab' => 'summary' ) ) ); ?>' class='button button-secondary'> + + +

+ + +
+