@extends('layout.app') @section('title', __('batches')) @section('content')
{{ __('batches') }}
@foreach ($purchasebatches as $batch) @endforeach
{{ __('sl') }} {{ __('name') }} {{ __('product_name') }} {{ __('purchase_quantity') }} {{ __('selling_quantity') }} {{ __('purchase_date') }} {{ __('expired_date') }}
{{ $loop->iteration }} {{ $batch->name }} {{ $batch->product->name }} {{ $batch->qty }} {{ $batch->sale_qty }} {{ dateFormat($batch->purchase_date) }} @php $expire_date = dateFormat($batch->expire_date); $today_date = date('Y-m-d'); $date_diff = (strtotime($expire_date) - strtotime($today_date)) / (60 * 60 * 24); @endphp {{ $expire_date }} @if ($date_diff < 0) {{ __('expired') }} @elseif ($date_diff <= 7) {{ __('expire_soon') }} @endif
@endsection