{{ $title }}

Generated on: {{ date('F d, Y H:i:s') }}

@php $totalSold = 0; $totalAmount = 0; $totalProfit = 0; $totalClosed = 0; @endphp @foreach($stocktakingData as $index => $item) @php $totalSold += $item['sold_quantity']; $totalAmount += floatval(str_replace(',', '', $item['amount_obtained'])); $totalProfit += floatval(str_replace(',', '', $item['profit'])); $totalClosed += $item['closed_stock']; @endphp @endforeach
# Product Name Date Opening Additional Buying Price Selling Price Sold Amount Profit Closed
{{ $index + 1 }} {{ $item['product_name'] }} {{ $item['date'] }} {{ $item['opening_stock'] }} {{ $item['additional_stock'] }} Tsh {{ $item['buying_price'] }} Tsh {{ $item['selling_price'] }} {{ $item['sold_quantity'] }} Tsh {{ $item['amount_obtained'] }} Tsh {{ $item['profit'] }} {{ $item['closed_stock'] }}
TOTALS: {{ $totalSold }} Tsh {{ number_format($totalAmount, 2) }} Tsh {{ number_format($totalProfit, 2) }} {{ $totalClosed }}