{{-- Title Row --}} {{-- Main Headers --}} @if($generalSettings->track_expiries) @endif {{-- This empty row is needed for the rowspan structure --}} @foreach($summaries as $index => $summary) @php $symbol = $summary->reconcilation->type == 2 ? $summary->consumableitem?->unit?->symbol ?? '' : $summary->product?->unit?->symbol ?? ''; $variance = $summary->to - $summary->from; $varianceAmount = abs($variance * $summary->buying_price); @endphp {{-- Serial Number --}} {{-- Product Name --}} {{-- From Quantity --}} {{-- To Quantity --}} {{-- Variance --}} {{-- Price --}} {{-- Variance Amount --}} {{-- Date --}} {{-- Batch Number --}} @if($generalSettings->track_expiries) @endif {{-- Category --}} @endforeach {{-- Summary Row --}}
RECONCILIATION SUMMARY REPORT ({{ \Carbon\Carbon::parse($dateFrom)->format('M d, Y') }} - {{ \Carbon\Carbon::parse($dateTo)->format('M d, Y') }})
S/N PRODUCT FROM QUANTITY TO QUANTITY VARIANCE PRICE VARIANCE AMOUNT DATE BATCH NUMBER CATEGORY
{{ $index + 1 }} {{ $summary->reconcilation->type == 2 ? $summary->consumableitem->name : $summary->product->product_name }} {{ $summary->from }} {{ $symbol }} {{ $summary->to }} {{ $symbol }} {{ $variance }} {{ $symbol }} {{ number_format($summary->buying_price) }} {{ number_format($varianceAmount) }} {{ auth()->user()->business->country_id == 235 ? \Carbon\Carbon::parse($summary->created_at)->format("Y-m-d H:i:s a") : app(\App\Http\Controllers\FunctionController::class)->formatDateTime($summary->created_at) }} {{ $summary->batch?->batch_number ?? '-' }} {{ match ($summary->reconcilation->type){ 0 => 'Shop', 1 => 'Store', default => 'Consumables'} }}
Total Records: {{ count($summaries) }} Total Variance Amount: {{ number_format((float)$totalVarianceAmount) }}