@extends('layout.app') @section('title', 'Stock Item Report') @push('header_script') @endpush @section('content')
| Date | Particulars | Vch Type | Vch No. | Inwards | Outwards | Closing | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Quantity | Unit | Rate | Value | Quantity | Unit | Rate | Value | Quantity | Unit | Rate | Value | ||||
| {{ $row['date'] ? date('d-M-y', strtotime($row['date'])) : '' }} | @if($row['voucher_type'] == 'Purchase' && $row['voucher_id']) {{ $row['particulars'] }} @elseif($row['voucher_type'] == 'Sale' && $row['voucher_id']) {{ $row['particulars'] }} @else {{ $row['particulars'] }} @endif | {{ $row['voucher_type'] ?? '' }} | {{ $row['voucher_no'] ?? '' }} | {{-- Inwards --}}{{ $row['inward_qty'] ? number_format($row['inward_qty'], 2) : '' }} | {{ $row['inward_qty'] ? $product->units : '' }} | {{ $row['inward_rate'] ? number_format($row['inward_rate'], 2) : '' }} | {{ $row['inward_value'] ? number_format($row['inward_value'], 2) : '' }} | {{-- Outwards --}}{{ $row['outward_qty'] ? number_format($row['outward_qty'], 2) : '' }} | {{ $row['outward_qty'] ? $product->units : '' }} | {{ $row['outward_rate'] ? number_format($row['outward_rate'], 2) : '' }} | {{ $row['outward_value'] ? number_format($row['outward_value'], 2) : '' }} | {{-- Balance --}}{{ number_format($row['closing_qty'], 2) }} | {{ $product->units }} | @php $closingRate = $row['closing_qty'] > 0 ? $row['closing_value'] / $row['closing_qty'] : 0; @endphp{{ $closingRate > 0 ? number_format($closingRate, 2) : '' }} | {{ number_format($row['closing_value'], 2) }} |
| No transactions found for this period. | |||||||||||||||
| Totals: | {{ $totalInQty > 0 ? number_format($totalInQty, 2) : '' }} | {{ $totalInQty > 0 ? number_format($totalInValue / $totalInQty, 2) : '' }} | {{ $totalInValue > 0 ? number_format($totalInValue, 2) : '' }} | {{ $totalOutQty > 0 ? number_format($totalOutQty, 2) : '' }} | {{ $totalOutQty > 0 ? number_format($totalOutValue / $totalOutQty, 2) : '' }} | {{ $totalOutValue > 0 ? number_format($totalOutValue, 2) : '' }} | {{ $lastRow ? number_format($lastRow['closing_qty'], 2) : '' }} | @php $finalRate = ($lastRow && $lastRow['closing_qty'] != 0) ? $lastRow['closing_value'] / $lastRow['closing_qty'] : 0; @endphp | {{ $finalRate > 0 ? number_format($finalRate, 2) : '' }} | {{ $lastRow ? number_format($lastRow['closing_value'], 2) : '' }} | |||||
| Sr. No. | Item Name | Unit | Opening Qty | Opening Value | Inward Qty | Inward Value | Outward Qty | Outward Value | Closing Qty | Closing Value | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $row['product_name'] }} | {{ $row['units'] }} | {{ number_format($row['opening_qty'], 2) }} | {{ number_format($row['opening_value'], 2) }} | {{ number_format($row['inward_qty'], 2) }} | {{ number_format($row['inward_value'], 2) }} | {{ number_format($row['outward_qty'], 2) }} | {{ number_format($row['outward_value'], 2) }} | {{ number_format($row['closing_qty'], 2) }} | {{ number_format($row['closing_value'], 2) }} | Next |
| No items found. | |||||||||||
| Total: | {{ number_format($totalOpQty, 2) }} | {{ number_format($totalOpVal, 2) }} | {{ number_format($totalInQtySum, 2) }} | {{ number_format($totalInValSum, 2) }} | {{ number_format($totalOutQtySum, 2) }} | {{ number_format($totalOutValSum, 2) }} | {{ number_format($totalClQtySum, 2) }} | {{ number_format($totalClValSum, 2) }} | |||