File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,12 +51,6 @@ public function index(Request $request)
5151 }
5252 }
5353
54- foreach ($ costsByCostType as $ cost ) {
55- if ($ cost ->elster_id == 31 ) {
56- $ cost ->total_net = $ afaSum ;
57- }
58- }
59-
6054 //substract afa expenses from net, as they need to be calculated extra
6155 $ expNetSum = $ costsByCostType ->sum ('total_net ' ) - $ afaThisYear ;
6256 $ expTaxSum = $ costsByCostType ->sum ('total_tax ' );
@@ -70,6 +64,7 @@ public function index(Request $request)
7064
7165 'costs ' => $ costsByCostType ,
7266 'travelAllowanceTotal ' => $ expTravel ,
67+ 'afaSum ' => $ afaSum ,
7368 'expTaxSum ' => $ expTaxSum ,
7469 'expNetSum ' => $ expNetSum ,
7570 'expTotal ' => $ expTotal ,
Original file line number Diff line number Diff line change @@ -48,7 +48,29 @@ class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight prin
4848 <h2 >Ausgaben</h2 >
4949 </td >
5050 </tr >
51+ <tr >
52+ <td >{{ $costs -> count () } } </td >
53+ </tr >
54+ @if ($costs -> count () == 0 )
55+ <tr >
56+ <td >31</td >
57+ <td >Absetzung für Abnutzung</td >
58+ <td >{{ Number:: currency ($afaSum , in : ' EUR' , locale : ' de' ) } } </td >
59+ </tr >
60+ @endif
5161 @foreach ($costs as $cost )
62+ @if ($cost -> elster_id == 31 )
63+ @continue
64+ @endif
65+ @if ($cost -> elster_id > 31 )
66+ @once
67+ <tr >
68+ <td >31</td >
69+ <td >Absetzung für Abnutzung</td >
70+ <td >{{ Number:: currency ($afaSum , in : ' EUR' , locale : ' de' ) } } </td >
71+ </tr >
72+ @endonce
73+ @endif
5274 <tr >
5375 <td >{{ $cost -> elster_id } } </td >
5476 <td >{{ $cost -> full_name } } </td >
You can’t perform that action at this time.
0 commit comments