@php use App\Enums\ReportOption; use App\Enums\TaxType; 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

@php $countPeriods = count($periods); $colsCount = $countPeriods > 1 ? ($countPeriods + 2) : $countPeriods; @endphp @if(!empty($data1)) @if(in_array($input['show_content'], [ReportOption::QUANTITY->value, ReportOption::ALL->value]))
{{-- quantity --}} @foreach($periods as $period) @endforeach @if($countPeriods > 1) @endif @foreach($totals['quantity'] as $key => $value) @endforeach @if($countPeriods > 1) @endif
{{ __('validation.attributes.sku') }} {{ __('validation.attributes.description') }} {{ __('validation.attributes.quantity') }}
{{ Carbon::make($period)->format('M-Y') }}{{ __('general.total') }} {{ __('general.avg') }}
{{ __('general.grand_total') }}{{ accounting_format($value) }}{{ accounting_format($totals['quantity']['total'] / $countPeriods) }}
@endif @if(in_array($input['show_content'], [ReportOption::AMOUNT->value, ReportOption::ALL->value]))
{{-- amount --}} @foreach($periods as $period) @endforeach @if($countPeriods > 1) @endif @foreach($totals['amount'] as $key => $value) @endforeach @if($countPeriods > 1) @endif
{{ __('validation.attributes.code') }} {{ __('general.customer') }} {{ __('validation.attributes.amount') }}
{{ Carbon::make($period)->format('M-Y') }}{{ __('general.total') }} {{ __('general.avg') }}
{{ __('general.grand_total') }}{{ accounting_format($value) }}{{ accounting_format($totals['amount']['total'] / $countPeriods) }}
@endif @else
{{ __('messages.report.not-found') }}
@endif
@endsection