@if (!empty($posOpeningStocks))
@foreach ($posOpeningStocks as $posOpeningStock)
| {{++$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
 
|
@endforeach
@endif