@extends('template.layout') @section('style') @endsection @section('content')
@if (session('success')) @endif
{{ $branch->name }} Stock Preview
Back @php $total_qty = 0; $total_cost = 0; $total_worth = 0; @endphp @foreach ($stocks as $stock) @php $total_qty += $stock->qty; $total_worth += $stock->price_sell * $stock->qty; $total_cost += $stock->price_buy * $stock->qty; @endphp @endforeach
# Code Name Price Buy Price Sell Qty Total Cost Total Worth
{{ $loop->iteration }} {{ $stock->item->code }} {{ $stock->item->name }} {{ number_format($stock->price_buy, 2) }} {{ $stock->price_sell }} {{ $stock->qty }} {{ number_format($stock->price_buy * $stock->qty,2) }} {{ number_format($stock->price_sell * $stock->qty,2) }}
@endsection @section('script') @endsection