@extends('layouts.fixed') @section('title','Goods in ') @section('content')

Stock Summary

{{--create/edit start --}}

{{ Form::open(['route'=>'goodsin.store','method'=>'post', 'class'=>'form-horizontal']) }}
{{-- @include('inventory.goodsin.form-goodsin')
--}}
Stock Summary

@if(isset($groups)) @php $total = 0; @endphp @foreach($groups as $key => $group) @php $product = \App\Product::with('unit')->find($key); $qty = \App\GoodsinProduct::where(get_where())->where('product_id',$key)->sum('qty'); $rate = \App\GoodsinProduct::where(get_where())->where('product_id',$key)->sum('price'); @endphp @php $total += $qty * $rate; @endphp @endforeach @endif
Name Unit Quantity Rate Value
{{ $product->name }} {{ optional($product->unit)->name }} {{ $qty }} {{ number_format($rate,2) }} {{ number_format($qty * $rate,2) }}
Total {{ number_format($total,2) }}
{{ Form::close() }}
{{--create/edit start --}}
@stop @section('style') @stop @section('plugin') @stop @section('script') @stop