feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema.

This commit is contained in:
pbao9
2026-03-12 09:30:29 +07:00
parent 7f6264c87f
commit 1e09ccf17b
87 changed files with 2348 additions and 2612 deletions
@@ -171,7 +171,7 @@ class OrderController extends Controller
'invoice_id' => 0,
'discount_id' => $request->discount_id ?? 0,
'amount' => $total + ($total * (10 / 100)),
'payment_id' => $request->payment_id,
'payment_method' => $request->payment_method,
'user_id' => auth()->guard('admin')->user()->id,
'status' => $request->status,
'client_ip' => $request->getClientIp()
@@ -184,7 +184,7 @@ class OrderController extends Controller
'sub_total' => $total,
'tax' => $total * (10 / 100),
'total' => $total + ($total * (10 / 100)),
'payment_id' => $request->payment_id,
'payment_method' => $request->payment_method,
'customer_id' => $request->create_invoice ? $request->customer_id : 0,
'status' => $request->status
];