@extends('layouts/pos_layout') @section('title', '| Edit Opeining') @section('content')
Edit Opening Stock
{!! Form::open(array('url' => '' , 'enctype' => 'multipart/form-data', 'role' => 'form', 'class'=>'form-horizontal form-groups')) !!}
{!! Form::hidden('branch_id', $posOpeningStocksDetails->branch_id, ['class' => 'form-control input-sm', 'id' => 'branch_id']) !!}
{!! Form::label('branch_id_for_view', 'Branch*', ['class' => 'col-sm-3 control-label']) !!}

{!! Form::label('Opening Date', 'Opening Date:', ['class' => 'col-sm-5 control-label']) !!}
{!! Form::text('opening_date', date('d-m-Y',strtotime($posOpeningStocksDetails->opening_date)), ['class'=>'form-control', 'id' => 'opening_date_id','readonly']) !!}

@if (!empty($hasCategorys)) @php $serial = 0; @endphp @foreach ($hasCategorys as $key => $hasCategory) @php $posProducts = App\Models\pos\ProductConfig\PosProduct::where('category_id', '=' , $key)->get(); @endphp @if (!empty($posProducts)) @foreach ($posProducts as $posProduct) @php $productInfoForDetails = App\Models\pos\Tools\PosOpeningStock::select(DB::raw("sum(quantity) as t_quantity"),DB::raw("sum(opening_amount) as t_cost_price"),DB::raw("sum(total_amount) as t_total_price")) ->where('product_id',$posProduct->id)->where('branch_id',$posOpeningStocksDetails->branch_id)->groupBy('branch_id')->first(); $t_quantity = ($productInfoForDetails) ? $productInfoForDetails->t_quantity : '0'; $t_cost_price = ($productInfoForDetails) ? $productInfoForDetails->t_cost_price : $posProduct->cost_price; $t_total_price = ($productInfoForDetails) ? $productInfoForDetails->t_total_price : '0'; //dd($posProduct->id); @endphp @endforeach @endif @endforeach @endif
Sl. Barcode Brand Product Name Model Sale Price Total Quantity Cost Price Total Price
{{$hasCategorys[$key]}}
{{ ++$serial }} {{ $posProduct->barcode }} {{ ($posProduct->brand) ? $posProduct->brand->name : '' }} {{ $posProduct->name }} {{ ($posProduct->model) ? $posProduct->model->name : '' }} {{ $posProduct->sales_price }} /home/shikkhaplus/public_html/morning_bird_bk/resources/views/pos/tools/openingStock/editOpeningStock.blade.php on line 110
" name="quantity[]" placeholder="Total Quantity" value="{{ $t_quantity}}" class="custom-quantity" data-qid='
Warning: Undefined variable $posProduct in /home/shikkhaplus/public_html/morning_bird_bk/resources/views/pos/tools/openingStock/editOpeningStock.blade.php on line 110

Warning: Attempt to read property "id" on null in /home/shikkhaplus/public_html/morning_bird_bk/resources/views/pos/tools/openingStock/editOpeningStock.blade.php on line 110
' />
/home/shikkhaplus/public_html/morning_bird_bk/resources/views/pos/tools/openingStock/editOpeningStock.blade.php on line 111
" name="opening_amount[]" value="{{ round($t_cost_price,2)}}" class="custom-costprice" readonly />
/home/shikkhaplus/public_html/morning_bird_bk/resources/views/pos/tools/openingStock/editOpeningStock.blade.php on line 112
" name="total_amount[]" value="{{ round($t_total_price,2)}}" class="custom-total" readonly />
Total
{!! Form::label('submit', ' ', ['class' => 'col-sm-2 control-label']) !!}
{!! Form::submit('Update', ['id' => 'add', 'class' => 'btn btn-info']); !!} Close
{!! Form::close() !!}
@endsection