diff --git a/app/Http/Controllers/StatementController.php b/app/Http/Controllers/StatementController.php index 84e7eb2..e2aabf7 100644 --- a/app/Http/Controllers/StatementController.php +++ b/app/Http/Controllers/StatementController.php @@ -51,12 +51,6 @@ public function index(Request $request) } } - foreach ($costsByCostType as $cost) { - if ($cost->elster_id == 31) { - $cost->total_net = $afaSum; - } - } - //substract afa expenses from net, as they need to be calculated extra $expNetSum = $costsByCostType->sum('total_net') - $afaThisYear; $expTaxSum = $costsByCostType->sum('total_tax'); @@ -70,6 +64,7 @@ public function index(Request $request) 'costs' => $costsByCostType, 'travelAllowanceTotal' => $expTravel, + 'afaSum' => $afaSum, 'expTaxSum' => $expTaxSum, 'expNetSum' => $expNetSum, 'expTotal' => $expTotal, diff --git a/resources/views/statement.blade.php b/resources/views/statement.blade.php index e7dce82..a61ee64 100644 --- a/resources/views/statement.blade.php +++ b/resources/views/statement.blade.php @@ -48,7 +48,29 @@ class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight prin