Files
portal-api/resources/views/emails/partials/order-items.blade.php
T
2026-08-14 08:45:52 +07:00

31 lines
2.0 KiB
PHP

@php
$cycleMap = [
'monthly' => 'Hàng tháng', 'quarterly' => 'Hàng quý',
'semi_annually' => '6 tháng', 'annually' => 'Hàng năm', 'biennially' => '2 năm',
];
@endphp
@if(($items ?? collect())->isNotEmpty())
<p style="color: #f16723;"><strong>CHI TIẾT SẢN PHẨM</strong></p>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; table-layout: fixed; border: 1px solid #e8e8e8; border-right: 0; border-bottom: 0;">
<thead>
<tr bgcolor="#FFF1E6">
<th style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; text-align: left; font-size: 12px; color: #6b7280;">Sản phẩm</th>
<th style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; text-align: left; font-size: 12px; color: #6b7280;">Server</th>
<th style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; text-align: left; font-size: 12px; color: #6b7280;">Chu kỳ</th>
<th style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; text-align: right; font-size: 12px; color: #6b7280;">Giá</th>
</tr>
</thead>
<tbody>
@foreach($items as $item)
<tr>
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;"><strong>{{ $item->product?->name ?? '—' }}</strong></td>
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;">{{ $item->server_name ?? '—' }}</td>
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;">{{ $cycleMap[$item->billing_cycle] ?? ($item->billing_cycle ?? '—') }}</td>
<td style="padding: 7px 11px; border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; text-align: right;"><strong>{{ number_format((float) $item->price) }} VNĐ</strong></td>
</tr>
@endforeach
</tbody>
</table>
@endif