@php use App\Enums\ReportOption; use Carbon\Carbon; @endphp @extends('layouts.print') @push('styles') @if(isset($output) && $output === 'screen') @vite(['resources/scss/main.scss', 'resources/scss/print.scss']) @else @endif @endpush @section('content') @php $routeName = request()->route()->getName(); @endphp

{{-- === TABEL QUANTITY === --}} @if(in_array($input['show_content'], [ReportOption::QUANTITY->value, ReportOption::ALL->value]))
@if($output === 'screen') @endif @foreach($periods as $period) @endforeach @foreach($data as $category) {{-- Nama kategori --}} @if($output === 'screen') @endif {{-- Produk di dalam kategori --}} @foreach($category['details'] as $product) @foreach($product['periods']['quantity'] as $period => $value) @endforeach @if($output === 'screen') @endif @endforeach {{-- Subtotal kategori --}} @foreach($category['periods']['quantity'] as $period => $value) @endforeach @if($output === 'screen') @endif @endforeach {{-- Grand Total --}} @foreach($totals['quantity'] as $period => $value) @endforeach @if($output === 'screen') @endif
{{ __('validation.attributes.description') }} {{ __('validation.attributes.quantity') }} {{ __('general.graph') }}
{{ Carbon::make($period)->format('M-Y') }}
{{ $category['name'] }}
{{ $product['sku'] }} - {{ $product['name'] }}{{ accounting_format($value) }}
{{ __('validation.attributes.subtotal') }}{{ accounting_format($value) }}
{{ __('general.grand_total') }}{{ accounting_format($value) }}
@endif {{-- === TABEL AMOUNT === --}} {{-- === TABEL AMOUNT === --}} @if(in_array($input['show_content'], [ReportOption::AMOUNT->value, ReportOption::ALL->value]))
@if($output === 'screen') @endif @foreach($periods as $period) @endforeach @foreach($data as $category) {{-- Nama kategori --}} @if($output === 'screen') @endif {{-- Produk di dalam kategori --}} @foreach($category['details'] as $product) @foreach($product['periods']['amount'] as $period => $value) @endforeach @if($output === 'screen') @endif @endforeach {{-- Subtotal kategori --}} @foreach($category['periods']['amount'] as $period => $value) @endforeach @if($output === 'screen') @endif @endforeach {{-- Grand Total --}} @foreach($totals['amount'] as $period => $value) @endforeach @if($output === 'screen') @endif
{{ __('validation.attributes.description') }} {{ __('validation.attributes.amount') }} {{ __('general.graph') }}
{{ \Carbon\Carbon::make($period)->format('M-Y') }}
{{ $category['name'] }}
{{ $product['sku'] }} - {{ $product['name'] }}{{ accounting_format($value) }}
{{ __('validation.attributes.subtotal') }}{{ accounting_format($value) }}
{{ __('general.grand_total') }}{{ accounting_format($value) }}
@endif {{-- Jika tidak ada data --}} @if(empty($data))
{{ __('messages.report.not-found') }}
@endif
@endsection