@extends('layouts/contentLayoutMaster') @section('title', 'Purchase Details') @section('vendor-style') {{-- vendor css files --}} @endsection @section('content')

@if ($purchase->type == 'purchase_at_mcc') MCC Purchase Details @elseif ($purchase->type == 'mmt_purchase') MMT Purchase Details @elseif ($purchase->type == 'purchase_at_ao') Area Office Purchase Details @elseif ($purchase->type == 'purchase_at_plant') Plant Purchase Details @endif

@if ($purchase->type == 'purchase_at_plant') {{-- --}} @foreach ($purchase->tests as $test) @if ($test['qa_test_name'] == 'Fat') @break @endif @endforeach @foreach ($purchase->tests as $test) @if ($test['qa_test_name'] == 'SNF') @break @endif @endforeach @foreach ($purchase->tests as $test) @if ($test['qa_test_name'] == 'LR') @break @endif @endforeach @if (isset($purchase->opening_balance_compartment_1)) @endif @if (isset($purchase->compartment_status_1)) @endif @if (isset($purchase->opening_balance_compartment_2)) @endif @if (isset($purchase->compartment_status_2)) @endif @if (isset($purchase->opening_balance_compartment_3)) @endif @if (isset($purchase->compartment_status_3)) @endif @if (isset($purchase->gateinfo->delivery_challan) && $purchase->gateinfo->delivery_challan != null) @else @endif @else @foreach ($purchase->tests as $test) @if ($test['qa_test_name'] == 'Fat' || $test['qa_test_name'] == 'LR') @endif @endforeach @foreach ($purchase->tests as $test) @if ($test['qa_test_name'] == 'SNF') @endif @endforeach @endif
Serial Number MPR-{{ $purchase->serial_number ?? 'N/A' }}
User {{ $purchase->user->name ?? 'N/A' }} Total Vehicle Weight @if (isset($purchase->total_vehicle_weight)) {{ $purchase->total_vehicle_weight ?? 'N/A' }} @endif
Opening Balance {{ $purchase->opening_balance ?? '0' }} Type @if ($purchase->type == 'purchase_at_mcc') MCC Purchase @elseif ($purchase->type == 'mmt_purchase') MMT Purchase @elseif ($purchase->type == 'purchase_at_ao') Area Office Purchase @elseif ($purchase->type == 'purchase_at_plant') Plant Purchase @endif
Time {{ $purchase->date }} Plant {{ $purchase->plant->name ?? 'N/A' }}
Gate Pass Info
Gate Token {{ $purchase->gateinfo?->_id ?? 'N/A' }} Type {{ $purchase->gateinfo?->type ?? 'N/A' }}
Gross Volume {{ $purchase->gateinfo->gross_volume ?? 'N/A' }} Ts Volume {{ $purchase->gateinfo->volume_ts ?? 'N/A' }}
Gate Time In {{ $purchase->gateinfo?->date_time_in ? date('d-M-Y H:i:s', strtotime($purchase->gateinfo->date_time_in)) : 'N/A' }} Gate Time Out N/A
Plant Purchase
Gross Volume(Kgs) {{ App\Helpers\Helper::set_value_in_thousand_decimal($purchase->total_vehicle_weight - $purchase->total_empty_vehicle_weight) }} Gross Volume(Ltrs) {{ $purchase->gross_volume ? App\Helpers\Helper::set_value_in_thousand_decimal($purchase->gross_volume) : 0 }}
TS Volume {{ $purchase->ts_volume ? App\Helpers\Helper::set_value_in_thousand_decimal($purchase->ts_volume) : '0' }}{{ $test['qa_test_name'] }} {{ App\Helpers\Helper::set_value_in_thousand_decimal($test['value']) }}
{{ $test['qa_test_name'] }} {{ App\Helpers\Helper::set_value_in_thousand_decimal($test['value']) }}{{ $test['qa_test_name'] }} {{ App\Helpers\Helper::set_value_in_thousand_decimal($test['value']) }}
Compartments ({{ $purchase->compartments }})
Compartment Status @if ($purchase->compartment_status_0 == 1) Accepted @else Rejected @endif
Compartment 1 Balance {{ $purchase->opening_balance_compartment_1 }} Compartment 1 Status @if ($purchase->compartment_status_1 == 1) Accepted @else Rejected @endif
Compartment 2 Balance {{ $purchase->opening_balance_compartment_2 }} Compartment 2 Status @if ($purchase->compartment_status_2 == 1) Accepted @else Rejected @endif
Compartment 3 Balance {{ $purchase->opening_balance_compartment_3 }} Compartment 3 Status @if ($purchase->compartment_status_3 == 1) Accepted @else Rejected @endif
Vehicle Information
Vehicle Number (Delivery Challan) {{ $purchase->gateinfo->delivery_challan ?? 'N/A' }}
Vehicle Number {{ $purchase->gateinfo->vehicle->vehicle_number ?? 'N/A' }} Vehicle Type {{ $purchase->gateinfo->vehicle->vehicle_type ?? 'N/A' }}
Vehicle Capacity {{ $purchase->gateinfo->vehicle->capacity ?? 'N/A' }} Vehicle Portion {{ $purchase->gateinfo->vehicle->portion ?? 'N/A' }}
Vehicle Make {{ $purchase->gateinfo->vehicle->make ?? 'N/A' }} Vehicle Model {{ $purchase->gateinfo->vehicle->model ?? 'N/A' }}
Vehicle Tag No {{ $purchase->gateinfo->vehicle->tag_no ?? 'N/A' }} Vehicle Tanker Capacity {{ $purchase->gateinfo->vehicle->tanker_capacity ?? 'N/A' }}
Serial Number MPR-{{ $purchase->serial_number ?? 'N/A' }} Type @if ($purchase->type == 'purchase_at_mcc') MCC Purchase @elseif ($purchase->type == 'mmt_purchase') MMT Purchase @elseif ($purchase->type == 'purchase_at_ao') Area Office Purchase @elseif ($purchase->type == 'purchase_at_plant') Plant Purchase @endif
Area Office @if ($purchase->type == 'purchase_at_mcc') {{ $purchase->mcc ? $purchase->mcc->area_office->ao_name : 'N/A' }} @elseif ($purchase->type == 'mmt_purchase') {{ $purchase->cp ? ($purchase->cp->area_office ? $purchase->cp->area_office->ao_name : 'N/A') : 'N/A' }} @elseif ($purchase->type == 'purchase_at_ao') {{ $purchase->area_office_id ? $purchase->ao->ao_name : 'N/A' }} @else N/A @endif Collection Point @if ($purchase->type == 'purchase_at_mcc') {{ $purchase->mcc ? $purchase->mcc->name : 'N/A' }} @elseif ($purchase->type == 'mmt_purchase') {{ $purchase->cp ? $purchase->cp->name : 'N/A' }} @else N/A @endif
Supplier {{ $purchase->supplier ? $purchase->supplier->name : 'N/A' }} Supplier Type {{ $purchase->supplier ? $purchase->supplier_type->name : 'N/A' }}
Gross Volume {{ App\Helpers\Helper::set_value_in_thousand_decimal($purchase->gross_volume) }} TS Volume {{ App\Helpers\Helper::set_value_in_thousand_decimal($purchase->ts_volume) }}
Opening Balance {{ App\Helpers\Helper::set_value_in_thousand_decimal($purchase->opening_balance) }} Time {{ $purchase->time }}
{{ $test['qa_test_name'] }} {{ App\Helpers\Helper::set_value_in_thousand_decimal($test['value']) }}
{{ $test['qa_test_name'] }} {{ App\Helpers\Helper::set_value_in_thousand_decimal($test['value']) }}

Tests

QA Test Name Test Data Type Test Type Unit of Measure Result
@endsection @section('vendor-script') {{-- vendor files table data --}} @endsection @section('page-script') @endsection