mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 02:11:12 -06:00
Should fix query [skip ci]
This commit is contained in:
parent
a2327c50ec
commit
538018fed1
@ -207,18 +207,18 @@ class Report implements ReportInterface
|
|||||||
$set = $this->_queries->journalsByExpenseAccount($start, $end);
|
$set = $this->_queries->journalsByExpenseAccount($start, $end);
|
||||||
$expenses = $this->_helper->makeArray($set);
|
$expenses = $this->_helper->makeArray($set);
|
||||||
|
|
||||||
$alt = $this->_queries->sharedExpenses($start, $end);
|
// $alt = $this->_queries->sharedExpenses($start, $end);
|
||||||
$transfers = $this->_helper->makeArray($alt);
|
// $transfers = $this->_helper->makeArray($alt);
|
||||||
|
//
|
||||||
$expenses[-1] = [
|
// $expenses[-1] = [
|
||||||
'amount' => 0,
|
// 'amount' => 0,
|
||||||
'name' => 'Transfers to shared',
|
// 'name' => 'Transfers to shared',
|
||||||
'spent' => 0
|
// 'spent' => 0
|
||||||
];
|
// ];
|
||||||
|
//
|
||||||
foreach ($transfers as $transfer) {
|
// foreach ($transfers as $transfer) {
|
||||||
$expenses[-1]['amount'] += $transfer['amount'];
|
// $expenses[-1]['amount'] += $transfer['amount'];
|
||||||
}
|
// }
|
||||||
|
|
||||||
$expenses = $this->_helper->sortArray($expenses);
|
$expenses = $this->_helper->sortArray($expenses);
|
||||||
$limited = $this->_helper->limitArray($expenses, $limit);
|
$limited = $this->_helper->limitArray($expenses, $limit);
|
||||||
|
@ -123,12 +123,18 @@
|
|||||||
Expenses
|
Expenses
|
||||||
</div>
|
</div>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
<?php $sum = 0;?>
|
||||||
@foreach($groupedExpenses as $id => $expense)
|
@foreach($groupedExpenses as $id => $expense)
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{route('accounts.show',$id)}}">{{{$expense['name']}}}</a></td>
|
<td><a href="{{route('accounts.show',$id)}}">{{{$expense['name']}}}</a></td>
|
||||||
<td>{{Amount::format(floatval($expense['amount'])*-1)}}</td>
|
<td>{{Amount::format(floatval($expense['amount'])*-1)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php $sum += floatval($expense['amount'])*-1;?>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
<tr>
|
||||||
|
<td><em>Sum</em></td>
|
||||||
|
<td>{{Amount::format($sum)}}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user