@extends('layouts.app') @section('title', __('report.monthly', ['year_month' => $months[$month].' '.$year])) @section('content') {{ Form::open(['method' => 'get', 'class' => 'form-inline well well-sm']) }} {{ Form::label('month', __('report.view_monthly_label'), ['class' => 'control-label']) }} {{ Form::select('month', $months, $month, ['class' => 'form-control']) }} {{ Form::select('year', $years, $year, ['class' => 'form-control']) }} {{ Form::submit(__('report.view_report'), ['class' => 'btn btn-info btn-sm']) }} {{ link_to_route('reports.payments.monthly', __('report.this_month'), [], ['class' => 'btn btn-default btn-sm']) }} {{ link_to_route('reports.payments.yearly', __('report.view_yearly'), ['year' => $year], ['class' => 'btn btn-default btn-sm']) }} {{ Form::close() }}

{{ __('report.sales_graph') }} {{ $months[$month] }} {{ $year }}

{{ Option::get('money_sign', 'Rp') }}
{{ __('time.date') }}

{{ __('report.detail') }}

@php $chartData = []; @endphp @foreach(monthDateArray($year, $month) as $dateNumber) @php $any = isset($reports[$dateNumber]); $count = $any ? $reports[$dateNumber]->count : 0; $profit = $any ? $reports[$dateNumber]->profit : 0; @endphp @if ($any) @endif @php $chartData[] = ['date' => $dateNumber, 'value' => ($profit) ]; @endphp @endforeach
{{ __('time.date') }} {{ __('payment.payment') }} {{ __('payment.cash_in') }} {{ __('payment.cash_out') }} {{ __('report.profit') }} {{ __('app.action') }}
{{ dateId($date = $year.'-'.$month.'-'.$dateNumber) }} {{ $count }} {{ formatRp($any ? $reports[$dateNumber]->cashin : 0) }} {{ formatRp($any ? $reports[$dateNumber]->cashout : 0) }} {{ formatRp($profit) }} {{ link_to_route( 'reports.payments.daily', __('report.view_daily'), ['date' => $date], [ 'class' => 'btn btn-info btn-xs', 'title' => __('report.daily', ['date' => dateId($date)]), ] ) }}
{{ __('app.total') }} {{ $reports->sum('count') }} {{ formatRp($reports->sum('cashin')) }} {{ formatRp($reports->sum('cashout')) }} {{ formatRp($reports->sum('profit')) }}  
@endsection @section('ext_css') {{ Html::style(url('assets/css/plugins/morris.css')) }} @endsection @section('ext_js') {{ Html::script(url('assets/js/plugins/morris/raphael.min.js')) }} {{ Html::script(url('assets/js/plugins/morris/morris.min.js')) }} @endsection @section('script') @endsection