56 lines
2.5 KiB
PHP
56 lines
2.5 KiB
PHP
{{-- Transaction Info Partial - Optimized with date helpers --}}
|
|
@php
|
|
$registrationDate = $invoice->date ? \Carbon\Carbon::parse($invoice->date)->format('d/m/Y') : 'N/A';
|
|
$dueDate = $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y') : 'N/A';
|
|
$totalAmount = number_format($invoice->total ?? 0, 0, ',', '.');
|
|
$isExpired = $invoice->status == 1;
|
|
@endphp
|
|
|
|
<div class="bg-white rounded-lg shadow-lg p-6">
|
|
<h2 class="text-lg font-semibold text-blue-600 mb-4 border-b border-blue-100 pb-2">
|
|
{{ __('Thông tin giao dịch') }}
|
|
</h2>
|
|
<div class="space-y-4">
|
|
{{-- Registration Date --}}
|
|
<div class="flex justify-between items-center">
|
|
<span class="text-gray-600 font-medium">{{ __('Ngày đăng ký') }}</span>
|
|
<span class="text-sm">{{ $registrationDate }}</span>
|
|
</div>
|
|
|
|
{{-- Initial Payment --}}
|
|
<div class="flex justify-between items-center">
|
|
<span class="text-gray-600 font-medium">{{ __('Thanh toán lần đầu') }}</span>
|
|
<span class="text-sm">{{ $totalAmount }} đ</span>
|
|
</div>
|
|
|
|
{{-- Recurring Payment Amount --}}
|
|
<div class="flex justify-between items-center">
|
|
<span class="text-gray-600 font-medium">{{ __('Số tiền thanh toán định kỳ') }}</span>
|
|
<span class="text-sm">{{ $totalAmount }} đ</span>
|
|
</div>
|
|
|
|
{{-- Service Status --}}
|
|
<div class="flex justify-between items-center">
|
|
<span class="text-gray-600 font-medium">{{ __('Hạn sử dụng') }}</span>
|
|
<span class="text-sm">
|
|
@if ($isExpired)
|
|
<span class="bg-red-100 text-red-800 px-2 py-1 rounded text-xs">{{ __('Hết hạn') }}</span>
|
|
@else
|
|
<span class="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">{{ __('Hoạt động') }}</span>
|
|
@endif
|
|
</span>
|
|
</div>
|
|
|
|
{{-- Expiry Date --}}
|
|
<div class="flex justify-between items-center">
|
|
<span class="text-gray-600 font-medium">{{ __('Ngày hết hạn') }}</span>
|
|
<span class="text-sm">{{ $dueDate }}</span>
|
|
</div>
|
|
|
|
{{-- Auto Renewal Status --}}
|
|
<div class="flex justify-between items-center">
|
|
<span class="text-gray-600 font-medium">{{ __('Trạng thái gia hạn tự động') }}</span>
|
|
<span class="bg-red-100 text-red-800 px-2 py-1 rounded text-xs">OFF</span>
|
|
</div>
|
|
</div>
|
|
</div>
|