@extends('layouts.app') @section('title') {{'Sample Stock Summary'}} @endsection @section('content')
Sample Stock Summary Back
Search By Sub Category
Start Date
End Date

 

@if (Session::has('msg'))
{{ Session::get('msg') }}
@endif {{ $product_list->withPath('?'.$link) }}
@include('layouts.head')

Sample Stock Summary

{!! date('d-F-Y', strtotime($start_date)) !!} to {!! date('d-F-Y', strtotime($end_date)) !!}

@php $i=1; $TotalClosingOpeningTK = 0; $TotalClosingReceivedTK = 0; $TotalClosingSoutTK = 0; $TotalInwardDpTK =0; $TotalOutwardDpTK =0; $TotalClosingDpTK =0; $TotalClosingTpTK =0; @endphp @if(isset($product_list[0])) @foreach($product_list as $row) @php $product_received = $row->product_received; $product_out = $row->product_out; $Today_received = $row->today_received; $Today_out = $row->today_out; $Opening = $product_received - $product_out; $Closing = ($Opening + $Today_received ) - ($Today_out); $ClosingPcs = $Closing * $row->pack_size; $ClosingOpeningTK = $Opening * $row->dp_price; $ClosingReceivedTK = $Today_received * $row->dp_price; $ClosingSoutTK = $Today_out * $row->dp_price; $Inward= $Today_received ; $Outward= $Today_out ; $InwardDpTK = $Inward * $row->dp_price; $OutwardDpTK = $Outward * $row->dp_price; // $ClosingDpTK = $ClosingPcs * $row->dp_price; $ClosingDpTK = $row->total_taka; $ClosingTpTK = $ClosingPcs * $row->tp_price; if($ClosingPcs >0){ $avg_price = $ClosingDpTK / $ClosingPcs; }else{ $avg_price = 0; } //dd($avg_price); $TotalInwardDpTK += $InwardDpTK; $TotalOutwardDpTK += $OutwardDpTK; $TotalClosingOpeningTK += $ClosingOpeningTK; $TotalClosingReceivedTK += $ClosingReceivedTK; $TotalClosingSoutTK += $ClosingSoutTK; $TotalClosingDpTK += $ClosingDpTK; $TotalClosingTpTK += $ClosingTpTK; @endphp {{-- @if($Closing>0) --}} {{-- @endif --}} @endforeach @endif
S.N. ID Item Name Unit Opening Qty Inward Outward Quantity Avg. Price Total Value
{{$i++}} {{$row->id}} {{$row->product_name}} {{$row->pack_type}} {{ number_format($Opening,2)}} {{ number_format($Inward,2)}} {{ number_format($Outward,2)}} {{ number_format($Closing,2)}} {{ number_format($avg_price,2)}} {{ number_format($ClosingDpTK,2)}}
Total Taka = {{ number_format($TotalClosingOpeningTK,2) }} {{ number_format($TotalInwardDpTK,2) }} {{ number_format($TotalOutwardDpTK,2) }} {{ number_format($TotalClosingDpTK,2) }} {{ number_format($TotalClosingDpTK,2) }}
{{ $product_list->withPath('?'.$link) }}
@endsection