@extends('report.pdf.layouts.app') @section('pdf_content')
Opening Stock Report
Branch: {{ $branch->branch_name }}
Address: {{ $branch->address }}
@php $netqty = 0; $netmrp = 0; $nettp = 0; @endphp @foreach ($items as $key => $item) @php $netqty += $item->opening_stock; $total_tp = $item->purchase_price * $item->opening_stock; $nettp += $total_tp; $total_mrp = $item->sale_price * $item->opening_stock; $netmrp += $total_mrp; @endphp @endforeach
Sl Code Product Quanity TP Total TP MRP Total MRP
{{ $key + 1 }} {{ $item->product_code }} {{ $item->name }} {{ DecimalFormat($item->opening_stock) }} {{ DecimalFormat($item->purchase_price) }} {{ DecimalFormat($total_tp) }} {{ DecimalFormat($item->sale_price) }} {{ DecimalFormat($total_mrp) }}
Total {{ DecimalFormat($netqty) }} {{ DecimalFormat($nettp) }} {{ DecimalFormat($netmrp) }}
@endsection