Popups in the reports as we've always promised.

This commit is contained in:
James Cole
2015-03-04 20:47:00 +01:00
parent a349aac8a4
commit 8ad1ede0c5
8 changed files with 207 additions and 46 deletions

View File

@@ -111,6 +111,10 @@
<div class="modal fade" id="relationModal">
</div>
<!-- default modal -->
<div class="modal fade" id="defaultModal">
</div>
<script type="text/javascript" src="js/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/metisMenu.min.js"></script>

View File

@@ -42,18 +42,16 @@
</tr>
@foreach($budgets as $id => $budget)
<tr>
<td>{{{$budget['name']}}}
@if($id == 0)
<i class="fa fa-fw fa-question-circle" data-toggle="tooltip" data-placement="top" title="The calculation used here is slightly different from the row below. The numbers should match."></i>
@endif
</td>
<td>{{{$budget['name']}}}</td>
<td>{!! Amount::format($budget['amount']) !!}</td>
<?php $spent = 0;?>
@foreach($accounts as $account)
@if(isset($account->budgetInformation[$id]))
<td>
@if($id == 0)
<a href="#">{!! Amount::format($account->budgetInformation[$id]['amount']) !!}</a>
<a href="{{route('reports.no-budget',[$account, $year, $month])}}" class="openModal">
{!! Amount::format($account->budgetInformation[$id]['amount']) !!}
</a>
@else
{!! Amount::format($account->budgetInformation[$id]['amount']) !!}
@endif
@@ -70,46 +68,15 @@
<td>{!! Amount::format($budget['amount'] + $spent) !!}</td>
</tr>
@endforeach
<tr>
<td colspan="2">Without budget
<i class="fa fa-fw fa-question-circle" data-toggle="tooltip" data-placement="top" title="The calculation used here is slightly different from the row above. The numbers should match."></i>
</td>
@foreach($accounts as $account)
@if(isset($account->budgetInformation[0]))
<td>
<a href="#">{!! Amount::format($account->budgetInformation[0]['amount']) !!}</a>
</td>
@else
<td>{!! Amount::format(0) !!}</td>
@endif
@endforeach
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">Balanced by transfers</td>
@foreach($accounts as $account)
<td>
<a href="#">{!! Amount::format($account->balancedAmount) !!}</a>
<a href="{{route('reports.balanced-transfers',[$account, $year, $month])}}" class="openModal">{!! Amount::format($account->balancedAmount) !!}</a>
</td>
@endforeach
<td colspan="2">&nbsp;</td>
</tr>
<!--
<tr>
<td colspan="2">Balancing transfers</td>
@foreach($accounts as $account)
<td>{!! Amount::format(0) !!}</td>
@endforeach
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">Income</td>
@foreach($accounts as $account)
<td>{!! Amount::format(0) !!}</td>
@endforeach
<td colspan="2">&nbsp;</td>
</tr>
--->
<tr>
<td colspan="2">Left unbalanced</td>
@foreach($accounts as $account)
@@ -118,7 +85,7 @@
?>
@if(isset($account->budgetInformation[0]))
<td>
<a href="#">{!! Amount::format($account->budgetInformation[0]['amount'] + $account->balancedAmount) !!}</a>
<a href="{{route('reports.left-unbalanced',[$account, $year, $month])}}" class="openModal">{!! Amount::format($account->budgetInformation[0]['amount'] + $account->balancedAmount) !!}</a>
</td>
@else
<td>{!! Amount::format(0) !!}</td>
@@ -152,5 +119,6 @@
@stop
@section('scripts')
<script type="text/javascript" src="js/reports.js"></script>
@stop

View File

@@ -0,0 +1,14 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">No budget bla bla.</h4>
</div>
<div class="modal-body">
@include('list.journals-full')
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>