Skip to content

Commit 8af51fe

Browse files
committed
Add description as title to cost types
1 parent b378da4 commit 8af51fe

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/Http/Controllers/StatementController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function index(Request $request)
3030
//get all expenses for the year
3131
$costsByCostType = Expense::join('cost_types', 'expenses.cost_type_id', '=', 'cost_types.id')
3232
->groupBy('cost_types.id')
33-
->select('cost_types.id', 'cost_types.elster_id', 'cost_types.full_name', DB::raw('SUM(expenses.net) * cost_types.ratio as total_net'), DB::raw('SUM(expenses.tax) * cost_types.ratio as total_tax'))
33+
->select('cost_types.id', 'cost_types.elster_id', 'cost_types.full_name', 'cost_types.description', DB::raw('SUM(expenses.net) * cost_types.ratio as total_net'), DB::raw('SUM(expenses.tax) * cost_types.ratio as total_tax'))
3434
->whereYear('payment_date', $year)
3535
->groupBy('cost_type_id')
3636
->get();

resources/views/components/expense-form.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class="hidden fixed top-0 left-0 w-screen h-screen bg-white dark:bg-gray-900 bg-
115115
<h2>Kostentypen:</h2>
116116
<table>
117117
@foreach ($cost_types as $cost_type)
118-
<tr>
118+
<tr title="{{$cost_type->description}}">
119119
<td style="background: #{{$cost_type->color_code}}; width: 20px"></td>
120120
<td>{{$cost_type->short_name}}</td>
121121
<td>{{$cost_type->full_name}}</td>

resources/views/statement.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</td>
4646
</tr>
4747
@foreach ($costs as $cost)
48-
<tr>
48+
<tr title="{{$cost->description}}">
4949
<td>{{$cost->elster_id}}</td>
5050
<td>{{$cost->full_name}}</td>
5151
<td>

0 commit comments

Comments
 (0)