@extends('layouts.main') @push('styles') @endpush @section('content')

{{ __('drugs.expired_drugs') }}

@include('flash::message')
{{ Form::open(['route' => 'sundries.expiring_sundries']) }}
{{ Form::label('time_period', __('drugs.expiring_with_in')) }} {{ Form::select('time_period', ['1' => __('drugs.1_week'), '2' => __('drugs.2_weeks'), '4' => __('drugs.1_month'), '0' => __('drugs.expired_drugs')], null, ['class' => 'form-control']) }}
{{ Form::button(__('drugs.submit'),['type'=>'submit','class'=>'btn btn-success btn-rounded waves-effect waves-light m-r-10']) }} {{ Form::close() }}
@foreach($sundries as $sundry) @endforeach
{{ __('drugs.drug_name') }} {{ __('drugs.store_stock') }} {{ __('drugs.batch_details') }} Expiry Date
{{ __('drugs.drug_name') }} {{ __('drugs.store_stock') }} {{ __('drugs.batch_details') }} Expiry Date
{{ get_drug_name($sundry->id) }} {{ $sundry->store_stock}} @php $quotation_records = get_all_batches_for_this_drug_with_balances($sundry->id, $item_type = 2); $details_of_batch_in_use = details_of_batch_currently_in_use_sundries($sundry->id); @endphp @if(count($quotation_records) > 0) @foreach($quotation_records as $record)
batch_number == $details_of_batch_in_use['batch_number']) && ($record->id == $details_of_batch_in_use['quotation_id'])) style="background-color: #e1e1ef; border-radius: 5px 5px; padding: 5px 0px;" @endif>
{{ __('drugs.quantity') }} {{ $record->batch_balance }}
{{ __('drugs.batch') }} {{ $record->batch_number }}
{{ __('drugs.expiry_date') }} {{ streamline_date($record->expiry_date) }}

@endforeach @endif
{{ streamline_date($sundry->expiry_date) }}
@endsection @push('scripts') @endpush