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

 

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

Current Stock Value

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

@if (isset($_GET['department_id']) && $_GET['department_id'] != "") @php $selected_sub_group = null; foreach ($departments_list as $val) { if ($val->id == $_GET['department_id']) { $selected_sub_group = $val; break; } } @endphp @if ($selected_sub_group)
Group Name: {{ $selected_sub_group->group_name }}
Sub Group Name: {{ $selected_sub_group->department_name }}

@endif @else
Group Name : All
Sub Group Name : All

@endif @php $i=1; $TotalClosingOpeningTK = 0; $TotalClosingReceivedTK = 0; $TotalClosingPurReutrnTK = 0; $TotalClosingSalesTK = 0; $TotalClosingSinTK = 0; $TotalClosingSoutTK = 0; $TotalClosingReturnTK = 0; $TotalClosingDpTK =0; $TotalClosingTpTK =0; @endphp @if(isset($product_list[0])) @foreach($product_list as $row) @php $product_received = $row->product_received; $purchase_return = $row->purchase_return; $quantity = $row->product_sales; $product_in = $row->product_in; $product_out = $row->product_out; $product_return = $row->product_return; $Today_received = $row->today_received; $Today_pur_return = $row->today_pur_return; $Today_sales = $row->today_sales; $Today_in = $row->today_in; $Today_out = $row->today_out; $Today_return = $row->today_return; $Opening = ($product_received + $product_in + $product_return) - ($purchase_return + $quantity + $product_out); $Closing = ($Opening + $Today_received + $Today_in + $Today_return) - ($Today_pur_return + $Today_sales + $Today_out); $ClosingPcs = $Closing * $row->pack_size; $ClosingOpeningTK = $Opening * $row->dp_price; $ClosingReceivedTK = $Today_received * $row->dp_price; $ClosingPurReutrnTK = $Today_pur_return * $row->dp_price; $ClosingSalesTK = $Today_sales * $row->tp_price; $ClosingSinTK = $Today_in * $row->dp_price; $ClosingSoutTK = $Today_out * $row->dp_price; $ClosingReturnTK = $Today_return * $row->dp_price; $Purchase_Qty = $row->Purchase_Qty; $Sales_Qty = $row->Sales_Qty; if($Closing >0 && $Purchase_Qty>0){ $AvgPurchasePrice = $row->Purchase_Taka/$Purchase_Qty; }else{ $AvgPurchasePrice = $row->dp_price; } if($Closing >0 && $Sales_Qty>0){ $AvgSalesPrice = $row->Sales_Taka/$Sales_Qty; }else{ $AvgSalesPrice = $row->tp_price; } $ClosingDpTK = $Closing * $AvgPurchasePrice; $ClosingTpTK = $Closing * $AvgSalesPrice; //dd($avg_price); $TotalClosingOpeningTK += $ClosingOpeningTK; $TotalClosingReceivedTK += $ClosingReceivedTK; $TotalClosingPurReutrnTK += $ClosingPurReutrnTK; $TotalClosingSalesTK += $ClosingSalesTK; $TotalClosingSinTK += $ClosingSinTK; $TotalClosingSoutTK += $ClosingSoutTK; $TotalClosingReturnTK += $ClosingReturnTK; $TotalClosingDpTK += $ClosingDpTK; $TotalClosingTpTK += $ClosingTpTK; @endphp @if($Closing>0) @endif @endforeach @endif
S.N. ID Item Name Unit Current Stock Qty Avg. Rate Stock Value
{{$i++}} {{$row->id}} {{$row->product_name}} {{$row->pack_type}} {{ number_format($Closing,2)}} {{ number_format($AvgPurchasePrice,2)}} {{ number_format($ClosingDpTK,2)}}
Total Taka = {{ number_format($TotalClosingDpTK,2) }}
{{ $product_list->withPath('?'.$link) }}
@endsection