All documents submitted to LHDN (valid or invalid).
| No | Customer | Invoice | Car Plate | Location | Status | LHDN | Receipt | Actions | |
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->index + 1 }} |
{{ $item->email ?? '-' }}
{{ $item->phone ?? '' }}
|
{{ $item->invoice_no }}
{{ optional($item->txn_date)->format('d/m/Y H:i') ?? '-' }}
|
{{ $item->car_plate ?? '-' }} | {{ $item->site->name ?? '-' }} | {{ $displayStatusLabel }} |
@php
$submitErrors = collect($item->lhdn_submit_response['rejectedDocuments'][0]['error']['details'] ?? [])
->pluck('message')
->filter()
->unique()
->implode(' | ');
$detailErrors = collect($item->lhdn_error_details ?? [])
->map(function ($detail) {
$step = $detail['step'] ?? null;
$code = $detail['code'] ?? null;
$message = $detail['message'] ?? null;
$parts = array_filter([$step, $code, $message]);
return implode(' - ', $parts);
})
->filter()
->unique()
->implode(' | ');
$errorText = $item->lhdn_error ?: ($detailErrors ?: $submitErrors);
@endphp
Submission UID:
{{ $item->lhdn_submission_uid ?? '-' }}
@if($item->lhdn_uuid)
UUID: {{ $item->lhdn_uuid }}
@endif
@if($errorText)
{{ Str::limit($errorText, 120) }}
@else
-
@endif
|
@php $receiptUrl = $item->receipt_path ? Storage::url($item->receipt_path) : ''; if ($receiptUrl) { $host = parse_url($receiptUrl, PHP_URL_HOST); $path = parse_url($receiptUrl, PHP_URL_PATH) ?: $receiptUrl; if (!$host || $host === 'localhost') { $receiptUrl = request()->getSchemeAndHttpHost() . $path; } } @endphp @if($receiptUrl) View @else - @endif | @php $canShowActions = in_array($displayStatus, ['approved','waiting_validation','validated','failed','einvoice_sent_to_customer','cancelled'], true); @endphp @if($canManageSubmissionActions && $displayStatus === 'failed') @elseif($canManageSubmissionActions && $displayStatus === 'cancelled') @elseif(in_array($displayStatus, ['validated','einvoice_sent_to_customer'], true)) Preview @if($canManageSubmissionActions) @endif @endif | |
| No records. | |||||||||