@extends('layouts.business.pdf.pdf_layout') @section('pdf_title')
@include('business::print.header')

{{ __('Stock Report List') }}

{{--

{{ __('Duration: 14-12-2025 to 24-12-2025') }}

--}}
@endsection @section('pdf_content') @foreach ($stock_reports as $stock_report) @php $total_stock = $stock_report->stocks->sum('productStock'); $firstStock = $stock_report->stocks->first(); $total_value = $stock_report->stocks->sum(function ($stock) { return $stock->productPurchasePrice * $stock->productStock; }); @endphp @endforeach @if ($stock_reports->count() > 0) @endif
{{ __('Product') }} {{ __('Cost') }} {{ __('Quantity') }} {{ __('Sale') }} {{ __('Stock Value') }}
{{ $stock_report->productName }} {{ currency_format(optional($firstStock)->productPurchasePrice, currency: business_currency()) }} {{ $total_stock }} {{ currency_format(optional($firstStock)->productSalePrice, currency: business_currency()) }} {{ currency_format($total_value, currency: business_currency()) }}
{{ __('Total') }} {{ currency_format( $stock_reports->sum(function ($stock_report) { return $stock_report->stocks->sum(function ($stock) { return $stock->productPurchasePrice * $stock->productStock; }); }), currency: business_currency() ) }}
@endsection