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

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

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


From,
{{ $return->customer->customer_name ?? 'Customer Name' }}

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

Request No

{{ $return->materialIssue->materialRequest->material_request_prefix }}/{{ $return->materialIssue->materialRequest->material_request_financial_year }}/{{ $return->materialIssue->materialRequest->material_request_number }}

Issue No

{{ $return->materialIssue->material_issue_prefix }}/{{ $return->materialIssue->material_issue_financial_year }}/{{ $return->materialIssue->material_issue_number }}

Return No

{{ $return->material_return_prefix }}/{{ $return->material_return_financial_year }}/{{ $return->material_return_number }}

Return Date

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

Return Person {{ $return->employee->employee_first_name ?? '' }} {{ $return->employee->employee_last_name ?? '' }}

MATERIAL RETURN


@php // Group items by their product category and include sort order $groupedItems = $return->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 Return 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_return_item_description ?? '' }} {{ $item->material_return_qty }} {{ $item->products->product_unit_measurement ?? '' }}
@endsection @section('scripts') @endsection