@if($isDownload && $isDownload == true) @endif
@php $colspan = 4; @endphp
{!! __('report.total_amount_this_month') !!}
{!! numberFormat($result['total_amount_current'], 1, true) !!}
{!! __('report.total_amount_last_month') !!}
{{ numberFormat($result['total_amount_last'], 1, true) }}
{!! __('report.total_pcs_this_month') !!}
{{ numberFormat($result['total_qty_current'], 1, false, false, 0) }}
{!! __('report.total_pcs_last_month') !!}
{{ numberFormat($result['total_qty_last'], 1, false, false, 0) }}
{!! __('report.most_sale_this_month') !!}
{!! $result['most_sale_current'] != '' ? $result['most_sale_current'] : '--' !!}
{!! __('report.most_sale_last_month') !!}
{!! $result['most_sale_last'] != '' ? $result['most_sale_last'] : '--' !!}
{!! __('report.worst_sale_this_month') !!}
{!! $result['w_sale_current'] != '' ? $result['w_sale_current'] : '--' !!}
{!! __('report.worst_sale_last_month') !!}
{!! $result['w_sale_last'] != '' ? $result['w_sale_last'] : '--' !!}
@if ($isDownload) @else @endif

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

{{ __('report.from') }}:  {{ dateFormat($inputs['from_date'], SHOW_DATE2) }}, {{ __('report.to') }}:  {{ dateFormat($inputs['to_date'], SHOW_DATE2) }}
{{ __('report.from') }}:  {{ __('report.week') . " ".dateFormat($inputs['from_date'], 'W') }}, {{ __('report.to') }}:  {{ __('report.week') ." ".dateFormat($inputs['to_date'], 'W') }}
@if (count($result['categories']) > 0) @foreach ($result['categories'] as $catId =>$catDetail) @if (count($categoryItems) > 0)
{{ $catDetail }}
@if (count($categoryItems) > 0) @foreach ($categoryItems as $catItems) @php $totalQty = $catItems['issued_quantity'] ?? 0; $currentMonthTotalPrice = isset($catItems['issued_quantity_price']) ? $catItems['issued_quantity_price'] : 0; @endphp @endforeach @endif
{!! __('report.name') !!} {!! __('report.pc_this_month') !!} {!! __('report.sale_this_month') !!}
{{ $catItems['name'] }} {{ $totalQty }} {{ numberFormat($currentMonthTotalPrice, 1, false) }}
@endif @endforeach @endif
@if ($index++ % 3 == 0 && $isDownload && $isDownload == true)
@endif