update email template

This commit is contained in:
baodev0
2026-09-09 16:56:22 +07:00
parent d3d9f76ba0
commit 2365ef72e9
210 changed files with 6335 additions and 4688 deletions
+7 -2
View File
@@ -139,14 +139,16 @@ class OrderService
[$productItems, $relIdData, $total] = $this->buildProductItems($data);
$orderTotal = (int) ($total + ($total * (10 / 100)));
// Giá niêm yết đã bao gồm thuế (khớp với client-facing OrderService::create()) —
// không cộng thêm thuế lên trên ở đây.
$orderTotal = (int) $total;
$invoiceData = [
'invoice_number' => Helper::generateUniqueCode(),
'due_date' => Carbon::today()->addDays(7)->toDateString(),
'paid_at' => $effectiveInvoiceStatus === InvoiceStatus::PAID->value ? Carbon::now() : null,
'sub_total' => $total,
'tax' => $total * (10 / 100),
'tax' => 0,
'total' => $orderTotal,
'payment_method' => $paymentRecord?->id,
'customer_id' => $data['customer_id'],
@@ -163,6 +165,9 @@ class OrderService
'payment_proof' => $data['payment_proof'] ?? null,
'user_id' => Auth::guard('admin')->id(),
'status' => $effectiveOrderStatus,
// Order.paid_at mirrors invoice.paid_at — set together, same rule as
// InvoicePaymentService::activateOrder()/activateRenewal().
'paid_at' => $invoiceData['paid_at'],
'client_ip' => request()->getClientIp(),
];