@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() }}| {{ __('time.date') }} | {{ __('payment.payment') }} | {{ __('payment.cash_in') }} | {{ __('payment.cash_out') }} | {{ __('report.profit') }} | {{ __('app.action') }} | @php $chartData = []; @endphp @foreach(month_date_array($year, $month) as $dateNumber) @php $any = isset($reports[$dateNumber]); $count = $any ? $reports[$dateNumber]->count : 0; $profit = $any ? $reports[$dateNumber]->profit : 0; @endphp @if ($any)
|---|---|---|---|---|---|
| {{ date_id($date = $year.'-'.$month.'-'.$dateNumber) }} | {{ $count }} | {{ format_money($any ? $reports[$dateNumber]->cashin : 0) }} | {{ format_money($any ? $reports[$dateNumber]->cashout : 0) }} | {{ format_money($profit) }} | {{ link_to_route( 'reports.payments.daily', __('report.view_daily'), ['date' => $date], [ 'class' => 'btn btn-info btn-xs', 'title' => __('report.daily', ['date' => date_id($date)]), ] ) }} |
| {{ __('app.total') }} | {{ $reports->sum('count') }} | {{ format_money($reports->sum('cashin')) }} | {{ format_money($reports->sum('cashout')) }} | {{ format_money($reports->sum('profit')) }} |