@extends('layouts.app') @section('title', __('rma.view_rma')) @section('content') @php $next_step = $rma->nextActionStep(); $furthest_step = (int) ($rma->furthest_step ?: $rma->current_step); @endphp

@lang('rma.view_rma') {{ $rma->rma_no }}

One place for case progress, item decisions, inventory movements, and team activity.

@lang('rma.rma_cases') @can('rma.update') @if($rma->status !== 'completed' || !empty($rma->review_required_from_step)) {{ !empty($rma->review_required_from_step) ? __('rma.review_step') : __('rma.continue_case') }} @endif @endcan @if(auth()->user()->can('rma.reopen') && auth()->user()->can('rma.update')) @if($rma->status !== 'cancelled' && $furthest_step >= 1) @endif @endif @can('rma.print') @lang('messages.print') @endcan
@if($errors->any())
Please review the information below.
@endif @component('components.widget', ['class' => 'box-primary', 'title' => __('rma.case_progress')]) @include('rma.partials.step_navigation', ['step' => $next_step]) @endcomponent @component('components.widget', ['class' => 'box-primary', 'title' => __('rma.case_summary')])
@lang('rma.sale_invoice')
{{ optional($rma->sale)->invoice_no ?: '—' }}
@lang('rma.customer')
{{ optional($rma->customer)->supplier_business_name ?: optional($rma->customer)->name ?: '—' }}
@lang('rma.status')
{{ \App\Rma::statuses()[$rma->status] ?? $rma->status }} @if(!empty($rma->review_required_from_step)) @lang('rma.needs_review') @endif
@lang('rma.items')
{{ $rma->items->count() }} item(s) · {{ @format_quantity($rma->items->sum('quantity')) }} total qty

@lang('purchase.business_location')
{{ optional($rma->location)->name ?: '—' }}
@lang('rma.after_sales_location')
{{ optional($rma->after_sales_location)->name ?: '—' }}
@lang('report.user')
{{ optional($rma->created_by_user)->user_full_name ?? optional($rma->created_by_user)->first_name ?? '—' }}
@lang('messages.date')
{{ @format_datetime($rma->created_at) }}
@if(!empty($rma->last_reopen_reason))
@lang('rma.last_reopen_reason'): {{ $rma->last_reopen_reason }}
{{ !empty($rma->reopened_at) ? @format_datetime($rma->reopened_at) : '' }} @if(!empty($rma->reopened_by_user)) · {{ optional($rma->reopened_by_user)->user_full_name ?? optional($rma->reopened_by_user)->first_name }} @endif
@endif @if(!empty($rma->final_note))

@lang('rma.final_note'): {{ $rma->final_note }}

@endif @endcomponent @component('components.widget', ['class' => 'box-primary', 'title' => __('rma.items')])

@lang('rma.items_guidance')

@include('rma.partials.item_summary_table') @endcomponent @component('components.widget', ['class' => 'box-primary', 'title' => __('rma.inventory_movements')]) @include('rma.partials.inventory_movements') @endcomponent @can('rma.audit.view') @component('components.widget', ['class' => 'box-primary', 'title' => __('rma.activity_timeline')]) @include('rma.partials.audit_trail') @endcomponent @endcan
@if(auth()->user()->can('rma.reopen') && auth()->user()->can('rma.update')) @endif @endsection @section('javascript') @endsection