1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/views/reports/report_builder.blade.php

98 lines
2.8 KiB
PHP
Raw Normal View History

2014-05-08 21:19:33 +02:00
@extends('accounts.nav')
2013-12-16 22:27:32 +01:00
@section('head')
@parent
2014-05-05 00:00:33 +02:00
<script src="{{ asset('js/Chart.js') }}" type="text/javascript"></script>
2013-12-16 22:27:32 +01:00
@stop
@section('content')
2014-05-08 21:19:33 +02:00
@parent
@include('accounts.nav_advanced')
2013-12-16 22:27:32 +01:00
<div class="row">
<div class="col-lg-4">
2013-12-16 22:27:32 +01:00
2014-05-08 21:19:33 +02:00
{{ Former::open()->addClass('warn-on-exit') }}
2013-12-16 22:27:32 +01:00
{{ Former::populateField('start_date', $startDate) }}
{{ Former::populateField('end_date', $endDate) }}
{{ Former::select('chart_type')->options($chartTypes, $chartType) }}
{{ Former::select('group_by')->options($dateTypes, $groupBy) }}
2014-05-13 23:04:42 +02:00
{{ Former::text('start_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))
->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'start_date\')"></i>') }}
{{ Former::text('end_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))
->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'end_date\')"></i>') }}
2014-05-08 21:19:33 +02:00
@if (Auth::user()->isPro())
{{ Former::actions( Button::primary_submit('Generate') ) }}
@else
<script>
$(function() {
$('form.warn-on-exit').find('input, select').prop('disabled', true);
});
</script>
@endif
2013-12-16 22:27:32 +01:00
{{ Former::close() }}
2013-12-31 00:19:17 +01:00
<p>&nbsp;</p>
<div style="padding-bottom:8px">
<div style="float:left; height:22px; width:60px; background-color:rgba(78,205,196,.5); border: 1px solid rgba(78,205,196,1)"></div>
<div style="vertical-align: middle">&nbsp;Invoices</div>
</div>
<div style="padding-bottom:8px; clear:both">
<div style="float:left; height:22px; width:60px; background-color:rgba(255,107,107,.5); border: 1px solid rgba(255,107,107,1)"></div>
<div style="vertical-align: middle">&nbsp;Payments</div>
</div>
<div style="clear:both">
<div style="float:left; height:22px; width:60px; background-color:rgba(199,244,100,.5); border: 1px solid rgba(199,244,100,1)"></div>
<div style="vertical-align: middle">&nbsp;Credits</div>
</div>
2013-12-16 22:27:32 +01:00
</div>
<div class="col-lg-8">
2014-05-08 21:19:33 +02:00
<canvas id="monthly-reports" width="772" height="400"></canvas>
2013-12-16 22:27:32 +01:00
</div>
</div>
<script type="text/javascript">
var ctx = document.getElementById('monthly-reports').getContext('2d');
var chart = {
labels: {{ json_encode($labels) }},
datasets: [
@foreach ($datasets as $dataset)
{
data: {{ json_encode($dataset['totals']) }},
fillColor : "rgba({{ $dataset['colors'] }},0.5)",
strokeColor : "rgba({{ $dataset['colors'] }},1)",
},
@endforeach
]
}
var options = {
scaleOverride: true,
scaleSteps: 10,
scaleStepWidth: {{ $scaleStepWidth }},
scaleStartValue: 0,
scaleLabel : "<%=formatMoney(value)%>",
};
new Chart(ctx).{{ $chartType }}(chart, options);
</script>
@stop
@section('onReady')
$('#start_date, #end_date').datepicker({
autoclose: true,
2014-01-01 00:50:13 +01:00
todayHighlight: true,
keyboardNavigation: false
2013-12-16 22:27:32 +01:00
});
@stop