feat: add GeneratesUniqueSlug class for unique slug generation
feat: create PostCategoryFactory for generating post category data feat: create PostFactory for generating post data feat: add retry_requested_at column to services table feat: add vcenter provisioning fields to products table feat: add module_host_id to os table feat: create email_notification_templates table for email templates feat: add scenario and format fields to template table feat: add admin fields to transactions table fix: update ticket table columns and types feat: add uuid to ticket table and backfill existing records fix: make ticket_reply user_id nullable feat: create notifications table for user notifications fix: make ticket uuid nullable feat: create post_categories table for blog categories feat: create posts table for blog posts feat: add invoice email template for PDF generation
This commit is contained in:
@@ -1,156 +1,301 @@
|
||||
@php
|
||||
$companyLogo = $companyLogo ?? '';
|
||||
$companyName = $companyName ?? '';
|
||||
$companyAddress = $companyAddress ?? '';
|
||||
$companyPhone = $companyPhone ?? '';
|
||||
$companyEmail = $companyEmail ?? '';
|
||||
$companyTaxCode = $companyTaxCode ?? '';
|
||||
$brandColor = $brandColor ?? '#1a56db';
|
||||
$cfg = array_merge([
|
||||
'accent_color' => $brandColor,
|
||||
'show_logo' => true,
|
||||
'show_company_info' => true,
|
||||
'show_customer_info' => true,
|
||||
'show_order_info' => true,
|
||||
'show_items_table' => true,
|
||||
'show_summary' => true,
|
||||
'show_note' => true,
|
||||
'footer_text' => 'Cảm ơn quý khách đã sử dụng dịch vụ.',
|
||||
'footer_note' => 'Đây là hóa đơn điện tử được tạo tự động, không cần chữ ký số.',
|
||||
], $cfg ?? []);
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="vi">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Hóa đơn #{{ $invoice->invoice_number }}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: DejaVu Sans, Arial, sans-serif; color: #333; font-size: 13px; }
|
||||
.invoice-box { max-width: 800px; margin: 0 auto; padding: 30px; }
|
||||
.header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; border-bottom: 3px solid #1a56db; padding-bottom: 20px; }
|
||||
.company-info h2 { color: #1a56db; font-size: 20px; margin-bottom: 5px; }
|
||||
.company-info p { color: #666; font-size: 12px; margin: 2px 0; }
|
||||
.invoice-meta { text-align: right; }
|
||||
.invoice-meta h1 { color: #1a56db; font-size: 24px; margin-bottom: 5px; }
|
||||
.invoice-meta p { font-size: 12px; color: #555; }
|
||||
.billing-info { display: flex; justify-content: space-between; margin-bottom: 25px; }
|
||||
.billing-info .col { width: 48%; }
|
||||
.billing-info .col h3 { font-size: 13px; color: #1a56db; margin-bottom: 8px; text-transform: uppercase; }
|
||||
.billing-info .col p { font-size: 12px; margin: 3px 0; }
|
||||
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
|
||||
table thead th { background: #1a56db; color: #fff; padding: 10px 12px; text-align: left; font-size: 12px; }
|
||||
table tbody td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; font-size: 12px; }
|
||||
table tbody tr:nth-child(even) { background: #f9fafb; }
|
||||
.summary { display: flex; justify-content: flex-end; margin-bottom: 20px; }
|
||||
.summary-table { width: 300px; }
|
||||
.summary-table tr td { padding: 6px 10px; font-size: 13px; }
|
||||
.summary-table tr td:last-child { text-align: right; font-weight: 600; }
|
||||
.summary-table tr.total-row td { border-top: 2px solid #1a56db; font-size: 15px; color: #1a56db; padding-top: 10px; }
|
||||
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
|
||||
.status-paid { background: #d1fae5; color: #065f46; }
|
||||
.status-unpaid { background: #fee2e2; color: #991b1b; }
|
||||
.status-cancelled { background: #f3f4f6; color: #6b7280; }
|
||||
.footer { margin-top: 30px; padding-top: 15px; border-top: 1px solid #e5e7eb; text-align: center; font-size: 11px; color: #9ca3af; }
|
||||
.note { background: #fefce8; border-left: 3px solid #eab308; padding: 10px 14px; margin: 15px 0; font-size: 12px; }
|
||||
</style>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Hóa đơn #{{ $invoice->invoice_number }}</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
html, body {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "DejaVu Sans", "Times New Roman", serif;
|
||||
color: #000;
|
||||
font-size: 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
padding: 12mm 15mm;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.top-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
|
||||
.top-table td { vertical-align: top; }
|
||||
.logo-cell { width: 140px; }
|
||||
.logo-cell img { width: 130px; max-height: 55px; }
|
||||
.title-cell { text-align: center; padding: 0 8px; }
|
||||
.title-cell h1 { font-size: 18px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
|
||||
.title-cell h2 { font-size: 12px; font-style: italic; font-weight: normal; margin-bottom: 4px; }
|
||||
.title-cell .date-line { font-size: 12px; }
|
||||
.meta-cell { width: 180px; font-size: 11px; line-height: 1.7; vertical-align: top; padding-top: 2px; }
|
||||
.meta-cell strong { display: block; }
|
||||
|
||||
.divider { border: none; border-top: 1px solid #999; margin: 6px 0; }
|
||||
|
||||
/* Company */
|
||||
.company-table { width: 100%; border-collapse: collapse; }
|
||||
.company-main { vertical-align: top; }
|
||||
.company-main h3 { font-size: 14px; text-transform: uppercase; font-weight: bold; margin-bottom: 5px; }
|
||||
.company-qr { width: 100px; vertical-align: top; text-align: right; }
|
||||
.qr-box { width: 85px; height: 85px; border: 1px solid #ccc; background: #f9f9f9; }
|
||||
|
||||
.info-line { margin-bottom: 4px; font-size: 12px; line-height: 1.45; }
|
||||
.lbl { font-weight: bold; }
|
||||
|
||||
/* Buyer */
|
||||
.buyer-section { margin-top: 8px; }
|
||||
.payment-table { width: 100%; border-collapse: collapse; }
|
||||
.payment-table td { vertical-align: top; }
|
||||
|
||||
/* Items table */
|
||||
.items-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
|
||||
.items-table th, .items-table td { border: 1px solid #333; padding: 5px 6px; vertical-align: top; }
|
||||
.items-table thead th { font-weight: bold; text-align: center; }
|
||||
.items-table td.center { text-align: center; }
|
||||
.items-table td.right { text-align: right; }
|
||||
.items-table tr.sum td { font-weight: bold; }
|
||||
.items-table tr.total-row td { font-weight: bold; font-size: 13px; background: #fafafa; }
|
||||
|
||||
/* Amount words */
|
||||
.amount-words {
|
||||
border: 1px solid #333; border-top: none;
|
||||
padding: 6px 8px; font-size: 12px;
|
||||
}
|
||||
|
||||
/* Signature */
|
||||
.sign-table { width: 100%; border-collapse: collapse; margin-top: 20mm; text-align: center; }
|
||||
.sign-table td { vertical-align: top; padding: 0 8px; }
|
||||
.sign-table h4 { font-size: 12px; margin-bottom: 3px; }
|
||||
.sign-table p { font-size: 11px; font-style: italic; color: #555; }
|
||||
.sign-spacer { height: 40px; }
|
||||
|
||||
/* Note */
|
||||
.note-box { margin-top: 8px; border-left: 3px solid #e6a817; background: #fefce8; padding: 6px 10px; font-size: 11px; }
|
||||
|
||||
/* Footer */
|
||||
.footer { margin-top: 16px; text-align: center; font-size: 11px; line-height: 1.7; color: #444; border-top: 1px solid #ddd; padding-top: 8px; }
|
||||
|
||||
.status-paid { color: #065f46; font-weight: bold; }
|
||||
.status-unpaid { color: #991b1b; font-weight: bold; }
|
||||
.status-cancelled { color: #6b7280; font-weight: bold; }
|
||||
|
||||
.accent { color: {{ $cfg['accent_color'] ?? '#1a56db' }}; }
|
||||
.items-table thead th { background: {{ $cfg['accent_color'] ?? '#1a56db' }}; color: #fff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="invoice-box">
|
||||
<div class="header">
|
||||
<div class="company-info">
|
||||
<h2>{{ $companyName }}</h2>
|
||||
@if(isset($companyAddress))
|
||||
<p>{{ $companyAddress }}</p>
|
||||
@endif
|
||||
@if(isset($companyPhone))
|
||||
<p>Tel: {{ $companyPhone }}</p>
|
||||
@endif
|
||||
@if(isset($companyEmail))
|
||||
<p>Email: {{ $companyEmail }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="invoice-meta">
|
||||
<h1>HÓA ĐƠN</h1>
|
||||
<p><strong>Mã hóa đơn:</strong> #{{ $invoice->invoice_number }}</p>
|
||||
<p><strong>Ngày tạo:</strong> {{ $invoice->created_at ? $invoice->created_at->format('d/m/Y') : '—' }}</p>
|
||||
<p><strong>Hạn thanh toán:</strong> {{ $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y') : '—' }}</p>
|
||||
<p>
|
||||
<strong>Trạng thái:</strong>
|
||||
@if($invoice->status == 2)
|
||||
<span class="status-badge status-paid">Đã thanh toán</span>
|
||||
@elseif($invoice->status == 1)
|
||||
<span class="status-badge status-unpaid">Chưa thanh toán</span>
|
||||
@else
|
||||
<span class="status-badge status-cancelled">Đã hủy</span>
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
|
||||
<div class="billing-info">
|
||||
<div class="col">
|
||||
<h3>Thông tin khách hàng</h3>
|
||||
<p><strong>{{ $customer->fullname }}</strong></p>
|
||||
@if($customer->email)
|
||||
<p>Email: {{ $customer->email }}</p>
|
||||
@endif
|
||||
@if($customer->phone)
|
||||
<p>Điện thoại: {{ $customer->phone }}</p>
|
||||
@endif
|
||||
@if($customer->address)
|
||||
<p>Địa chỉ: {{ $customer->address }}</p>
|
||||
@endif
|
||||
{{-- ══ HEADER ══ --}}
|
||||
<table class="top-table">
|
||||
<tr>
|
||||
<td class="logo-cell">
|
||||
@if(($cfg['show_logo'] ?? true) && $companyLogo)
|
||||
<img src="{{ $companyLogo }}" alt="{{ $companyName }}"/>
|
||||
@endif
|
||||
</td>
|
||||
<td class="title-cell">
|
||||
<h1>HÓA ĐƠN ĐẶT HÀNG</h1>
|
||||
<h2>(INVOICE ORDER)</h2>
|
||||
<div class="date-line">
|
||||
Ngày <strong>{{ $invoice->created_at?->format('d') ?? '—' }}</strong>
|
||||
tháng <strong>{{ $invoice->created_at?->format('m') ?? '—' }}</strong>
|
||||
năm <strong>{{ $invoice->created_at?->format('Y') ?? '—' }}</strong>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Thông tin đơn hàng</h3>
|
||||
<p><strong>Mã đơn hàng:</strong> #{{ $order->order_num ?? '—' }}</p>
|
||||
@if(isset($order) && $order->created_at)
|
||||
<p><strong>Ngày đặt:</strong> {{ $order->created_at->format('d/m/Y') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="meta-cell">
|
||||
<strong>Mã hóa đơn:</strong> {{ $invoice->invoice_number }}
|
||||
@if($order)
|
||||
<strong style="margin-top:4px">Mã đơn hàng:</strong> {{ $order->order_num }}
|
||||
@endif
|
||||
<strong style="margin-top:4px">Hạn TT:</strong>
|
||||
{{ $invoice->due_date ? \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y') : '—' }}
|
||||
<strong style="margin-top:4px">Trạng thái:</strong>
|
||||
@if($invoice->status == 2)<span class="status-paid">Đã thanh toán</span>
|
||||
@elseif($invoice->status == 1)<span class="status-unpaid">Chưa thanh toán</span>
|
||||
@else<span class="status-cancelled">Đã hủy</span>@endif
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:5%">#</th>
|
||||
<th style="width:35%">Dịch vụ</th>
|
||||
<th style="width:15%">Chu kỳ</th>
|
||||
<th style="width:10%">Số lượng</th>
|
||||
<th style="width:15%">Đơn giá</th>
|
||||
<th style="width:20%">Thành tiền</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoiceItems as $i => $item)
|
||||
<tr>
|
||||
<td>{{ $i + 1 }}</td>
|
||||
<td>{{ $item->description ?? ($item->product?->name ?? 'Dịch vụ') }}</td>
|
||||
<td>{{ $item->billing_label }}</td>
|
||||
<td>{{ $item->quantity ?? 1 }}</td>
|
||||
<td>{{ number_format($item->unit_price, 0, ',', '.') }} đ</td>
|
||||
<td>{{ number_format($item->total_price, 0, ',', '.') }} đ</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="divider"/>
|
||||
|
||||
<div class="summary">
|
||||
<table class="summary-table">
|
||||
<tr>
|
||||
<td>Tạm tính</td>
|
||||
<td>{{ number_format($invoice->sub_total, 0, ',', '.') }} đ</td>
|
||||
</tr>
|
||||
@if($invoice->discount_amount > 0)
|
||||
<tr>
|
||||
<td>Giảm giá</td>
|
||||
<td>-{{ number_format($invoice->discount_amount, 0, ',', '.') }} đ</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($invoice->tax > 0)
|
||||
<tr>
|
||||
<td>Thuế</td>
|
||||
<td>{{ number_format($invoice->tax, 0, ',', '.') }} đ</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr class="total-row">
|
||||
<td>Tổng cộng</td>
|
||||
<td>{{ number_format($invoice->total, 0, ',', '.') }} đ</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{{-- ══ COMPANY ══ --}}
|
||||
@if($cfg['show_company_info'] ?? true)
|
||||
<table class="company-table">
|
||||
<tr>
|
||||
<td class="company-main">
|
||||
<h3>{{ $companyName }}</h3>
|
||||
@if($companyTaxCode)
|
||||
<div class="info-line"><span class="lbl">Mã số thuế (Tax code):</span> {{ $companyTaxCode }}</div>
|
||||
@endif
|
||||
@if($companyAddress)
|
||||
<div class="info-line"><span class="lbl">Địa chỉ (Address):</span> {{ $companyAddress }}</div>
|
||||
@endif
|
||||
@if($companyPhone)
|
||||
<div class="info-line"><span class="lbl">Điện thoại (Tel):</span> {{ $companyPhone }}</div>
|
||||
@endif
|
||||
@if($companyEmail)
|
||||
<div class="info-line"><span class="lbl">Email:</span> {{ $companyEmail }}</div>
|
||||
@endif
|
||||
</td>
|
||||
<td class="company-qr"><div class="qr-box"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr class="divider"/>
|
||||
@endif
|
||||
|
||||
@if($invoice->note)
|
||||
<div class="note">
|
||||
<strong>Ghi chú:</strong> {{ $invoice->note }}
|
||||
{{-- ══ BUYER ══ --}}
|
||||
@if($cfg['show_customer_info'] ?? true)
|
||||
<div class="buyer-section">
|
||||
<div class="info-line">
|
||||
<span class="lbl">Họ tên người mua hàng (Buyer):</span> {{ $customer?->fullname ?? '—' }}
|
||||
</div>
|
||||
@if($customer?->company)
|
||||
<div class="info-line"><span class="lbl">Tên đơn vị:</span> {{ $customer->company }}</div>
|
||||
@endif
|
||||
@if($customer?->identity_number)
|
||||
<div class="info-line"><span class="lbl">MST / CMND:</span> {{ $customer->identity_number }}</div>
|
||||
@endif
|
||||
@if($customer?->address)
|
||||
<div class="info-line"><span class="lbl">Địa chỉ (Address):</span> {{ $customer->address }}</div>
|
||||
@endif
|
||||
<table class="payment-table">
|
||||
<tr>
|
||||
<td style="width:55%">
|
||||
<div class="info-line">
|
||||
<span class="lbl">Hình thức thanh toán:</span>
|
||||
{{ $invoice->payment_method ? strtoupper($invoice->payment_method) : 'TM/CK' }}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="info-line"><span class="lbl">Email:</span> {{ $customer?->email ?? '—' }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- ══ ITEMS TABLE ══ --}}
|
||||
@if($cfg['show_items_table'] ?? true)
|
||||
<table class="items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:40px">STT</th>
|
||||
<th>Tên hàng hóa, dịch vụ</th>
|
||||
<th style="width:80px">Đơn vị tính</th>
|
||||
<th style="width:70px">Số lượng</th>
|
||||
<th style="width:120px">Đơn giá (đ)</th>
|
||||
<th style="width:130px">Thành tiền (đ)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoiceItems as $i => $item)
|
||||
<tr>
|
||||
<td class="center">{{ $i + 1 }}</td>
|
||||
<td>{{ $item->description ?? ($item->product?->name ?? 'Dịch vụ') }}</td>
|
||||
<td class="center">{{ ($item->months && $item->months > 0) ? 'Tháng' : 'Lần' }}</td>
|
||||
<td class="center">{{ number_format($item->quantity ?? 1, 2, ',', '.') }}</td>
|
||||
<td class="right">{{ number_format($item->unit_price, 0, ',', '.') }}</td>
|
||||
<td class="right">{{ number_format($item->total_price, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if($cfg['show_summary'] ?? true)
|
||||
{{-- Sub-total --}}
|
||||
<tr class="sum">
|
||||
<td colspan="5" class="right">Cộng tiền hàng (Total amount excl. VAT)</td>
|
||||
<td class="right">{{ number_format($invoice->sub_total, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
@if($invoice->discount_amount > 0)
|
||||
<tr class="sum">
|
||||
<td colspan="5" class="right">Giảm giá (Discount)</td>
|
||||
<td class="right">-{{ number_format($invoice->discount_amount, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@php $taxRate = ($invoice->total > 0 && $invoice->tax > 0) ? round($invoice->tax / ($invoice->total - $invoice->tax) * 100) : 0; @endphp
|
||||
<tr class="sum">
|
||||
<td colspan="3">Thuế suất GTGT (VAT rate): {{ $taxRate > 0 ? $taxRate.'%' : 'Không áp dụng' }}</td>
|
||||
<td colspan="2" class="right">Tiền thuế GTGT (VAT amount)</td>
|
||||
<td class="right">{{ number_format($invoice->tax, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
<tr class="sum total-row">
|
||||
<td colspan="5" class="right">Tổng tiền thanh toán (Total amount)</td>
|
||||
<td class="right">{{ number_format($invoice->total, 0, ',', '.') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="amount-words">
|
||||
<strong>Số tiền viết bằng chữ (Total amount in words):</strong>
|
||||
{{ \App\Helpers\NumberToWords::convert((int) $invoice->total) }}.
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- ══ NOTE ══ --}}
|
||||
@if(($cfg['show_note'] ?? true) && $invoice->note)
|
||||
<div class="note-box"><strong>Ghi chú:</strong> {{ $invoice->note }}</div>
|
||||
@endif
|
||||
|
||||
{{-- ══ SIGNATURE ══ --}}
|
||||
<table class="sign-table">
|
||||
<tr>
|
||||
<td>
|
||||
<h4>Người mua hàng<br/><em style="font-size:11px">(Buyer's signature)</em></h4>
|
||||
<p>Ký, ghi rõ họ tên</p>
|
||||
<div class="sign-spacer"></div>
|
||||
<p>{{ $customer?->fullname ?? '' }}</p>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<h4>Người bán hàng<br/><em style="font-size:11px">(Seller's signature)</em></h4>
|
||||
<p>Ký, đóng dấu, ghi rõ họ tên</p>
|
||||
<div class="sign-spacer"></div>
|
||||
<p>{{ $companyName }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{-- ══ FOOTER ══ --}}
|
||||
<div class="footer">
|
||||
@if($cfg['footer_text'] ?? ''){{ $cfg['footer_text'] }}<br/>@endif
|
||||
@if($cfg['footer_note'] ?? ''){{ $cfg['footer_note'] }}<br/>@endif
|
||||
Mã tra cứu: <strong>{{ $invoice->invoice_number }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>Cảm ơn quý khách đã sử dụng dịch vụ của {{ $companyName }}.</p>
|
||||
<p>Đây là hóa đơn điện tử được tạo tự động, không cần chữ ký số.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
<!doctype html>
|
||||
<html lang="vi">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>VAT Invoice</title>
|
||||
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background: #f5f5f5;
|
||||
font-family: "Times New Roman", serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.invoice {
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
background: #fff;
|
||||
border: 1px solid #333;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.top-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.invoice-title {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.invoice-title h1 {
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.invoice-title h2 {
|
||||
margin: 5px 0;
|
||||
font-size: 22px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.invoice-title p {
|
||||
margin: 6px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.invoice-meta {
|
||||
width: 220px;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: 1px solid #999;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
.company-section {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.company-section h3 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 28px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.info-line {
|
||||
margin-bottom: 8px;
|
||||
font-size: 17px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.qr {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.buyer-section {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.payment-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 15px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #333;
|
||||
padding: 8px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.summary-row td {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.amount-words {
|
||||
border: 1px solid #333;
|
||||
border-top: none;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.signature-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signature-box {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.signature-box h4 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.signature-box p {
|
||||
margin: 5px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.digital-sign {
|
||||
margin-top: 25px;
|
||||
border: 1px solid #90c790;
|
||||
background: #f1fff1;
|
||||
padding: 12px;
|
||||
color: #b30000;
|
||||
font-weight: bold;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
background: white;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.invoice {
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="invoice">
|
||||
<div class="top-header">
|
||||
<div class="logo">
|
||||
<img src="{setting.logo}" alt="logo" />
|
||||
</div>
|
||||
|
||||
<div class="invoice-title">
|
||||
<h1>HÓA ĐƠN ĐẶT HÀNG</h1>
|
||||
<h2>(INVOICE ORDER)</h2>
|
||||
|
||||
<p>Ngày (Date) 14 tháng (month) 04 năm (year) 2026</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="company-section">
|
||||
<div class="qr"></div>
|
||||
|
||||
<h3>CÔNG TY CỔ PHẦN GIẢI PHÁP CÔNG NGHỆ THẾ GIỚI SỐ</h3>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Mã số thuế (Tax code):</span>
|
||||
0318443116
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Địa chỉ (Address):</span>
|
||||
số 128/38 đường Tân Hương, Phường Phú Thọ Hòa, TP Hồ Chí
|
||||
Minh, Việt Nam.
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Số tài khoản (Bank account):</span>
|
||||
7379868 Ngân hàng TMCP Á Châu (ACB) Chi Nhánh TP. Hồ Chí
|
||||
Minh
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Số tài khoản (Bank account):</span>
|
||||
797379868 Ngân hàng TMCP Quân Đội (MB) Chi nhánh Phú Nhuận
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="buyer-section">
|
||||
<div class="info-line">
|
||||
<span class="label">Họ tên người mua hàng (Buyer):</span>
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Tên đơn vị (Company's name):</span>
|
||||
CÔNG TY TNHH SOPRO
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Mã số thuế (Tax code):</span>
|
||||
0317005737
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Địa chỉ (Address):</span>
|
||||
Lầu 3, 365 Lê Quang Định, Phường Bình Lợi Trung, Thành Phố
|
||||
Hồ Chí Minh, Việt Nam
|
||||
</div>
|
||||
|
||||
<div class="payment-row">
|
||||
<div class="info-line">
|
||||
<span class="label"
|
||||
>Hình thức thanh toán (Payment method):</span
|
||||
>
|
||||
TM/CK
|
||||
</div>
|
||||
|
||||
<div class="info-line">
|
||||
<span class="label">Số tài khoản (Bank account):</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60">STT</th>
|
||||
<th>Tên hàng hóa, dịch vụ</th>
|
||||
<th width="100">Đơn vị tính</th>
|
||||
<th width="100">Số lượng</th>
|
||||
<th width="150">Đơn giá</th>
|
||||
<th width="160">Thành tiền</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center">1</td>
|
||||
|
||||
<td>
|
||||
Cước phí dịch vụ thuê máy chủ từ 07/04/2026 đến
|
||||
06/10/2026
|
||||
</td>
|
||||
|
||||
<td class="text-center">Tháng</td>
|
||||
|
||||
<td class="text-center">6,00</td>
|
||||
|
||||
<td class="text-right">700.000,00</td>
|
||||
|
||||
<td class="text-right">4.200.000</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-center">2</td>
|
||||
|
||||
<td>
|
||||
Cước phí dịch vụ thuê máy chủ từ 07/04/2026 đến
|
||||
06/10/2026
|
||||
</td>
|
||||
|
||||
<td class="text-center">Tháng</td>
|
||||
|
||||
<td class="text-center">6,00</td>
|
||||
|
||||
<td class="text-right">560.000,00</td>
|
||||
|
||||
<td class="text-right">3.360.000</td>
|
||||
</tr>
|
||||
|
||||
<tr class="summary-row">
|
||||
<td colspan="5" class="text-right">
|
||||
Cộng tiền hàng (Total amount excl. VAT)
|
||||
</td>
|
||||
|
||||
<td class="text-right">7.560.000</td>
|
||||
</tr>
|
||||
|
||||
<tr class="summary-row">
|
||||
<td colspan="3">Thuế suất GTGT (VAT rate): 10%</td>
|
||||
|
||||
<td colspan="2" class="text-right">
|
||||
Tiền thuế GTGT (VAT amount)
|
||||
</td>
|
||||
|
||||
<td class="text-right">756.000</td>
|
||||
</tr>
|
||||
|
||||
<tr class="summary-row">
|
||||
<td colspan="5" class="text-right">
|
||||
Tổng tiền thanh toán (Total amount)
|
||||
</td>
|
||||
|
||||
<td class="text-right">8.316.000</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="amount-words">
|
||||
<strong>
|
||||
Số tiền viết bằng chữ (Total amount in words):
|
||||
</strong>
|
||||
|
||||
Tám triệu ba trăm mười sáu nghìn đồng chẵn.
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Tra cứu tại Website: https://portal.tgs.com.vn/tra-cuu - Mã tra
|
||||
cứu (Invoice code):
|
||||
<strong>{invoice_num}</strong>
|
||||
|
||||
<br /><br />
|
||||
|
||||
Phát hành bởi phần mềm Portal - Công ty Cổ phần Giải Pháp Công
|
||||
Nghệ Thế Giới Số (www.tgs.com.vn)
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user