@extends('print.layout') @section('title', 'Daily_Issuance_Report_' . ($dfrom ?? date('d-m-Y')) . '_to_' . ($dto ?? date('d-m-Y'))) @section('content')
Daily Issuance Report
{{-- Report Header Information --}}
Report Date: {{ date('d-m-Y') }}
Period From: {{ isset($dfrom) ? date('d-m-Y', strtotime($dfrom)) : 'N/A' }}
Period To: {{ isset($dto) ? date('d-m-Y', strtotime($dto)) : 'N/A' }}
{{-- Daily Issuance Items --}} @if(isset($issueItem) && $issueItem->count() > 0)

Issued Items

@php $index = 1; $product_id = ''; $size = ''; $issueItemUnique = $issueItem->unique(function ($item) { return $item->product_type_id . '|' . $item->ifname; }); @endphp @foreach($issueItemUnique as $item) @php $currentKey = $item->product_type_id . '|' . $item->ifname; $minAvg = isset($average[$currentKey]['min_avg']) ? $average[$currentKey]['min_avg'] : '0'; @endphp @if($minAvg > 0) @if($item->product_id == $product_id) @else @endif @if($item->sname == $size) @else @endif @endif @php $product_id = $item->product_id; $size = $item->sname; @endphp @endforeach
Sr. Article No Item / Product Size Stage Quantity
{{ $index++ }}{{ $item->article_no ?? 'N/A' }} {{ $item->pname ?? 'N/A' }}{{ $item->sname ?? 'N/A' }}{{ $item->ifname ?? 'N/A' }} {{ $minAvg }} {{ $item->puname ?? '' }}
@else

No issuance records found for the selected period.

@endif @endsection