@extends('layouts.master') @section('title') Material Issue Detail @endsection @section('page-title') Material Issue Detail @endsection @section('body') @endsection @section('content')
materialRequest->material_request_id) }}" class="btn btn-success me-1"> Add Material Issue material_issue_id) }}" class="btn btn-info me-1"> Add Material Return material_issue_id) }}" target="_blank" class="btn btn-success me-1"> Print
logo
{{ $issue->company->company_name ?? '' }}

{{ $issue->company->company_address ?? '' }}, {{ $issue->company->area->area_name ?? '' }}, {{ $issue->company->city->city_name ?? '' }}, {{ $issue->company->state->state_name ?? '' }}, {{ $issue->company->country->country_name ?? '' }}, {{ $issue->company->company_pincode ?? '' }}

GST No: {{ $issue->company->company_gstin ?? '' }}, Email: {{ $issue->company->company_email ?? '' }}, Phone No: {{ $issue->company->company_phone_no_1 ?? '' }}


To,
{{ $issue->customer->customer_name ?? 'Customer Name' }}

{{ $issue->customer_address->customer_address ?? '' }}, {{ $issue->customer_address->area->area_name ?? '' }}, {{ $issue->customer_address->city->city_name ?? '' }}, {{ $issue->customer_address->state->state_name ?? '' }}, {{ $issue->customer_address->cusomer_pincode ?? '' }}, {{ $issue->customer_address->country->country_name ?? '' }}
@if ($issue->customer->customer_phone_no_1) Phone No: {{ $issue->customer_address->customer_address_phone_no ?? $issue->customer->customer_phone_no_1 }}
@endif @if ($issue->customer->customer_gstin) GST No: {{ $issue->customer->customer_gstin ?? '' }} @endif

Request No

{{ $issue->materialRequest->material_request_prefix}}/ {{ $issue->materialRequest->material_request_financial_year}}/ {{ $issue->materialRequest->material_request_number}}

Issue No

{{ $issue->material_issue_prefix }}/{{ $issue->material_issue_financial_year }}/{{ $issue->material_issue_number }}

Issue Date

{{ \Carbon\Carbon::parse($issue->material_issue_date)->format('d/m/Y') ?? '' }}

Technician {{ $issue->employee->employee_first_name ?? '' }} {{ $issue->employee->employee_last_name ?? '' }}
Vehicle No {{ $issue->material_issue_vehicle_no ?? ''}}

MATERIAL ISSUE


@php // Group items by their product category and include sort order $groupedItems = $issue->items->groupBy(function($item) { return $item->products->product_categories->product_category_name ?? 'Uncategorized'; }); // Prepare a sortable array with category names and sort orders $categoriesWithSortOrder = $groupedItems->map(function ($items, $categoryName) { $sortOrder = $items->first()->products->product_categories->product_category_sort_order ?? 0; return [ 'category_name' => $categoryName, 'sort_order' => $sortOrder, 'items' => $items ]; })->sortBy('sort_order'); @endphp @foreach ($categoriesWithSortOrder as $category) @foreach ($category['items'] as $index => $item) @endforeach @endforeach
Sr No Item Brand Model No Size Description Issued Qty UOM
{{ $category['category_name'] }}
{{ $loop->parent->index + 1 }}.{{ $index + 1 }} {{ $item->products->product_name ?? '' }} {{ $item->products->product_brands->product_brand_name ?? '' }} {{ $item->products->product_model_no ?? '' }} {{ $item->products->product_size ?? '' }} {{ $item->material_issue_item_description ?? '' }} {{ $item->material_issue_qty }} {{ $item->products->product_unit_measurement ?? '' }}
@endsection @section('scripts') @endsection