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

{{ __('pharmacy.print_requisition') }}

@include('flash::message')

PDF {{ __('stores.print') }}

{{ __('pharmacy.date') }} : {{ streamline_date($requisition_model->created_at) }}
{{ $hospital_details->name }}
{{ $hospital_details->address }}
{{ get_name($hospital_details->district, "id", "name", "districts") }}
{{ $hospital_details->email }}
{{ $hospital_details->phone_number }}
{{get_quotation_type_name($requisition_model->quotation_type_id)}} {{ __('pharmacy.request_from_requisition') }} {{ get_requisition_origin($requisition_model->requisition_origin) }}:
@if($requisition_model->quotation_type_id ==1 || $requisition_model->quotation_type_id ==5) @endif @php $counter = 1; $grand_total = 0; $requisiton_details = $requisition_model; $requisition_type_id = $requisition_model->quotation_type_id; $item_array = explode(",", $requisiton_details->drug_id); $quantity_array = explode(",", $requisiton_details->quantity_requested); @endphp @for($i = 0; $i < count($quantity_array) ; $i++) @if(isset($quantity_array[$i]) && $quantity_array[$i] != "" && isset($item_array[$i])) @if($requisition_type_id == 1) @php $cost_price = get_name($item_array[$i], 'id', 'cost_price', 'drugs'); $drug_form = get_name($item_array[$i], 'id', 'form_id', 'drugs'); $drug_form_name = get_name($drug_form,'id','name','drug_forms'); if ($drug_form_name == 'N/A') $drug_form_name =null; @endphp @elseif($requisition_type_id == 2) @php $cost_price = get_name($item_array[$i], 'id', 'cost_price', 'sundries'); $drug_form = get_name($item_array[$i], 'id', 'package_unit_id', 'sundries'); @endphp @elseif($requisition_type_id == 3) @php $cost_price = get_name($item_array[$i], 'id', 'cost_price', 'dentals'); $drug_form = null; @endphp @elseif($requisition_type_id == 4) @php $cost_price = get_name($item_array[$i], 'id', 'cost_price', 'radiologies'); $drug_form = get_name($item_array[$i], 'id', 'form_id', 'radiologies'); @endphp @elseif($requisition_type_id == 5) @php $cost_price = get_name($item_array[$i], 'id', 'cost_price', 'labs'); $drug_form = get_name($item_array[$i], 'id', 'form_id', 'labs'); $drug_form_name=get_name($drug_form, 'id','name','lab_forms'); if ($drug_form_name == 'N/A') $drug_form_name =null; @endphp @elseif($requisition_type_id == 6) @php $cost_price = get_name($item_array[$i], 'id', 'cost_price', 'general_items'); $drug_form = null; @endphp @elseif($requisition_type_id == 7) @php $cost_price = get_name($item_array[$i], 'id', 'buying_price', 'eye_glasses'); $drug_form = null; @endphp @endif @if($requisition_type_id ==1 || $requisition_type_id ==5 )@endif @php $counter++; @endphp @endif @endfor @if($requisition_type_id ==1 || $requisition_model->quotation_type_id ==5) @endif
{{ __('pharmacy.number') }} {{ __('pharmacy.item_name') }} {{ __('pharmacy.quantity') }}{{ __('pharmacy.units') }}{{ __('pharmacy.cost_value') }}
{{ $counter }}. {{ get_name($item_array[$i], 'id', 'name', 'drugs') }}{{ get_name($item_array[$i], 'id', 'name','sundries') }}{{ get_name($item_array[$i], 'id', 'name','dentals') }}{{ get_name($item_array[$i], 'id', 'name','radiologies') }}{{ get_name($item_array[$i], 'id', 'name','labs') }}{{ get_name($item_array[$i], 'id', 'name','general_items') }}{{ get_name($item_array[$i], 'id', 'name','eye_glasses') }}{{ $quantity_array[$i] }}{{ $drug_form_name }} @php if (track_items_using_batches()){ $item_sub_total =get_unit_cost_from_store_batch($item_array[$i],$requisition_type_id,$quantity_array[$i],'store_stock'); }else{ $quantity = (isset($quantity_array[$i]) && is_numeric($quantity_array[$i])) ? $quantity_array[$i] : 0; $item_cost = is_numeric($cost_price) ? $cost_price : 0; $item_sub_total = $quantity * $item_cost; } $grand_total += $item_sub_total; @endphp {{ ugandan_shillings($item_sub_total) }}
{{ __('pharmacy.total') }} {{ ugandan_shillings($grand_total) }}
{{ __('pharmacy.requisitioned_by') }}:

{{ get_full_name($requisition_model->created_by, "id", "first_name", "last_name", "users") }}

{{ streamline_date_time_short($requisition_model->created_at) }}

.......................................
{{ __('pharmacy.received_by') }}:

.......................................

{{ get_full_name(auth()->user()->id, "id", "first_name", "last_name", "users") .' '.streamline_date_time(date('Y-m-d')) }}
@endsection @push('scripts') @endpush