feat: nạp tiền thủ công mã 30 phút, gia hạn trừ số dư, đồng bộ domain từ Plesk

- Nạp tiền: mã thanh toán sống 30 phút (ManualDepositDraft), khôi phục/huỷ mã, lệnh dọn mã hết hạn; total_pending chỉ tính giao dịch đã nộp chứng từ, admin duyệt/từ chối/xoá giao dịch
- Gia hạn dịch vụ: phát hành invoice gia hạn trên order gốc và trừ số dư ngay
- Đồng bộ domain từ Plesk theo server, ServiceOrderRecorder tạo order/invoice cho dịch vụ admin dựng
- Danh sách dịch vụ trả field theo loại (service_plan, dns_records_count), đếm dịch vụ theo loại

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-11 23:07:51 +07:00
co-authored by Claude Opus 5.5
parent 10af41c5cf
commit c5115b52dd
53 changed files with 1887 additions and 613 deletions
@@ -84,8 +84,12 @@ class ProductCategoryController extends Controller
'name' => 'required|string|max:255',
'parent_id' => 'nullable|integer|exists:product_categories,id',
'is_active' => 'boolean',
'sort_order' => 'nullable|integer',
'sort_order' => 'required|integer|min:0',
'type' => 'nullable|string',
], [
'sort_order.required' => 'Vui lòng nhập thứ tự hiển thị (sort_order).',
'sort_order.integer' => 'Thứ tự hiển thị phải là số nguyên.',
'sort_order.min' => 'Thứ tự hiển thị không được âm.',
]);
$validated['slug'] = Str::slug($validated['name']);
@@ -119,8 +123,12 @@ class ProductCategoryController extends Controller
'name' => 'sometimes|required|string|max:255',
'parent_id' => 'nullable|integer|exists:product_categories,id',
'is_active' => 'boolean',
'sort_order' => 'nullable|integer',
'sort_order' => 'sometimes|required|integer|min:0',
'type' => 'nullable|string',
], [
'sort_order.required' => 'Vui lòng nhập thứ tự hiển thị (sort_order).',
'sort_order.integer' => 'Thứ tự hiển thị phải là số nguyên.',
'sort_order.min' => 'Thứ tự hiển thị không được âm.',
]);
if (isset($validated['name']) && $validated['name'] !== $category->name) {