@extends('layouts.app') @section('title', 'View Bandwidth Log - ISP ERP System') @section('page-title', 'View Bandwidth Log') @section('content')

View Bandwidth Log

Bandwidth log details and information

Back to Logs @if($bandwidthLog->referenceEmployee) Bandwidth Assign By @endif @if($bandwidthLog->approval_status === 'pending') @endif Edit Log
Bandwidth Log Information
Log ID
{{ $bandwidthLog->id }}
Customer
@if($bandwidthLog->customer) {{ $bandwidthLog->customer->company_name ? $bandwidthLog->customer->company_name . ' - ' . $bandwidthLog->customer->name : $bandwidthLog->customer->name }} @if($bandwidthLog->customer->email)
{{ $bandwidthLog->customer->email }} @endif @else N/A @endif
Sales Invoice Item
{{ $bandwidthLog->salesInvoiceItem->item_name ?? 'N/A' }} @if($bandwidthLog->salesInvoiceItem && $bandwidthLog->salesInvoiceItem->salesInvoice)
Invoice: {{ $bandwidthLog->salesInvoiceItem->salesInvoice->invoice_number ?? 'N/A' }} @if($bandwidthLog->salesInvoiceItem->salesInvoice->customer)
Customer: {{ $bandwidthLog->salesInvoiceItem->salesInvoice->customer->name ?? 'N/A' }} @endif @endif
Download Speed
{{ $bandwidthLog->download_speed_mbps ? number_format($bandwidthLog->download_speed_mbps, 2) . ' Mbps' : 'N/A' }}
Log Date
{{ $bandwidthLog->log_date ? $bandwidthLog->log_date->format('M d, Y H:i:s') : 'N/A' }}
Status
{{ ucfirst($bandwidthLog->status) }}
Approval Status
{{ ucfirst($bandwidthLog->approval_status) }}
@if($bandwidthLog->approver)
Approved By
{{ $bandwidthLog->approver->name }} @if($bandwidthLog->approved_at)
{{ $bandwidthLog->approved_at->format('M d, Y H:i:s') }} @endif
@endif @if($bandwidthLog->approval_notes)
Approval Notes
{{ $bandwidthLog->approval_notes }}
@endif @if($bandwidthLog->notes)
Notes
{{ $bandwidthLog->notes }}
@endif @if($bandwidthLog->creator)
Created By
{{ $bandwidthLog->creator->name }}
{{ $bandwidthLog->created_at->format('M d, Y H:i:s') }}
@else
Created At
{{ $bandwidthLog->created_at->format('M d, Y H:i:s') }}
@endif
Updated At
{{ $bandwidthLog->updated_at->format('M d, Y H:i:s') }}
@if($bandwidthLog->customer)
Logs for this customer
@csrf
@php $customerLogs = \App\Models\BandwidthUpdownLog::with('salesInvoiceItem.salesInvoice') ->where('customer_id', $bandwidthLog->customer_id) ->orderByDesc('log_date') ->limit(100) ->get(); @endphp @foreach($customerLogs as $cl) @endforeach
ID Sales Invoice Item Previous Bandwidth Requested Bandwidth Log Date End Date Status Approval
@if($cl->approval_status === 'pending') @endif {{ $cl->id }}
{{ $cl->salesInvoiceItem->item_name ?? 'N/A' }} @if($cl->salesInvoiceItem && $cl->salesInvoiceItem->salesInvoice)
Invoice: {{ $cl->salesInvoiceItem->salesInvoice->invoice_number ?? 'N/A' }} @endif
@php $prevText = null; if ($cl->salesInvoiceItem) { $unit = strtolower($cl->salesInvoiceItem->unit ?? ''); $qty = $cl->salesInvoiceItem->quantity ?? null; if ($qty && ($unit === 'mbps' || str_contains($unit, 'mbps'))) { $prevText = number_format((float)$qty, 2) . ' Mbps'; } } @endphp {{ $prevText ?? 'N/A' }} @if($cl->download_speed_mbps) {{ number_format($cl->download_speed_mbps, 2) }} Mbps @else N/A @endif @if($cl->approval_status === 'pending')
@endif
{{ $cl->log_date ? $cl->log_date->format('M d, Y H:i') : '-' }} {{ $cl->end_date ? $cl->end_date->format('M d, Y H:i') : '-' }} {{ ucfirst($cl->status) }} {{ ucfirst($cl->approval_status) }}
@endif
@endsection @section('styles') @endsection