@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.sales.monthly', __('report.this_month'), [], ['class' => 'btn btn-default btn-sm']) }} {{ link_to_route('reports.sales.yearly', __('report.view_yearly'), ['year' => $year], ['class' => 'btn btn-default btn-sm']) }} {{ Form::close() }}
| {{ __('time.date') }} | {{ __('transaction.transaction') }} | {{ __('report.omzet') }} | {{ __('app.action') }} | @php $chartData = []; @endphp @foreach(monthDateArray($year, $month) as $dateNumber) @php $any = isset($reports[$dateNumber]); $count = $any ? $reports[$dateNumber]->count : 0; $subtotal = $any ? $reports[$dateNumber]->amount : 0; @endphp @if ($any)
|---|---|---|---|
| {{ dateId($date = $year.'-'.$month.'-'.$dateNumber) }} | {{ $count }} | {{ formatRp($subtotal) }} | {{ link_to_route( 'reports.sales.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('amount')) }} |