@extends('layouts/pos_layout') @section('title', '| Opening Stock List') @section('content') @php use App\Service\PosService; @endphp @include('successMsg')

Opening Stock List

@if (!empty($posOpeningStocks)) @foreach ($posOpeningStocks as $posOpeningStock) @endforeach @endif
SL# Branch Name Opening Date Total Quantity Total Amount Action
{{++$no}} {{$posOpeningStock->name}} {{Carbon::parse($posOpeningStock->opening_date)->format('d-m-Y')}} {{$posOpeningStock->total_quantity}} {{number_format($posOpeningStock->total_amount,2)}} @php $service = new PosService; $branchActiveDate = $service->branchActiveDate($posOpeningStock->branch_id); $saleAfterOpeningDate = App\Models\pos\Transaction\PosSale::where('branch_id',$posOpeningStock->branch_id)->where('sales_date','>',$posOpeningStock->opening_date)->count(); $transferAfterOpeningDate = App\Models\pos\Transaction\Pos_transfer::where('brancheId',$posOpeningStock->branch_id)->where('transferDate','>',$posOpeningStock->opening_date)->count(); //dd($branchActiveDate); @endphp @if(date('Y-m-d',strtotime($branchActiveDate)) == date('Y-m-d',strtotime($posOpeningStock->opening_date)) && $saleAfterOpeningDate == 0 && $transferAfterOpeningDate == 0 )   @endif  
@include('dataTableScript') @endsection