@extends('admin.main') @section('styles') @endsection @section('content') @if (auth()->guard('admins')->user()->can('edit invoice'))
| Client Name | {{ $invoice->customer->firstname . ' ' . $invoice->customer->lastname }} |
| Invoice Date | {{ \Carbon\Carbon::parse($invoice->date)->format('d/m/Y H:i:s') }} |
| Due Date | {{ \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y H:i:s') }} |
| Total Due | {{ number_format($invoice->total, 0, ',', ',') }}đ |
| VM ID | {{ $invoice->vm_id }} |
Payment Method: {{ $invoice->payment->name ?? 'Free' }}
| Item | Product | Description | Addons | Amount | Tax |
|---|---|---|---|---|---|
| @if ($item->type) {{ $item->type->name }} @endif |
@php
$product = null;
if ($item->product_type == 3 && $item->hosting) {
$product = $item->hosting;
} elseif ($item->product_type == 4 && $item->vps) {
$product = $item->vps;
}
@endphp
@if ($product)
{{ $product->name }}
@if ($item->product_type == 4)
@else
No product info
@endif
CPU: {{ $product->cpu }} vCore |
RAM: {{ $product->ram }} GB |
Disk: {{ $product->disk }} GB
@if ($product->gpu)
| GPU: {{ $product->gpu }}
@endif
@elseif ($item->product_type == 3)
Disk: {{ $product->disk }} GB |
RAM: {{ $product->ram }} GB |
Bandwidth: {{ $product->bandwidth }} GB
@if ($product->cpu)
| CPU: {{ $product->cpu }}
@endif
@endif
@if ($item->os)
{{ $item->os->name }}
@endif
|
{{ $item->description }} |
@if ($item->addons->count() > 0)
@foreach ($item->addons as $addon)
@else
No addons
@endif
{{ $addon->addonItems->name ?? 'Unknown Addon' }}
@if ($addon->qty > 1)
(x{{ $addon->qty }})
@endif
{{ number_format($addon->price, 0, ',', '.') }} đ
@endforeach
|
{{ number_format($item->amount, 0, ',', '.') }} đ |