feat: implement VMware vCenter integration, enhance product pricing display, and update order processing logic.
This commit is contained in:
@@ -44,18 +44,7 @@ class OrderRepository extends BaseApiRepository implements OrderRepositoryInterf
|
||||
{
|
||||
// Update Order Status
|
||||
$order->update([
|
||||
'status' => \App\Enums\Order\OrderStatus::ACTIVE->value, // Or PROCESSING depending on flow, but user said 'thanh toán thực hiện order tiếp' usually implies Active/Paid.
|
||||
// Let's assume ACTIVE means Paid/Completed effectively for order flow permission
|
||||
'payment_method' => $method, // Column might not exist in standard migration, checking migration...
|
||||
// Migration 2024_01_31_155621_order.php does NOT have payment_method or paid_at.
|
||||
// It has 'status' (tinyInteger), 'date' (int), 'date_paid' (int) in invoice but not order.
|
||||
// Order table has: customer_id, date, user_id, discount_id, invoice_id, discount_value, amount, note, client_ip, status.
|
||||
// So we can only update status.
|
||||
// BUT order table has 'payment_id' in Model $fillable but migration didn't show it in up() method I saw earlier (2024_01_31_155621_order.php).
|
||||
// Let's check migration again if needed. But safe bet is update status.
|
||||
|
||||
// Wait, user request: "phải thanh toán order mới thực hiện được order tiếp theo"
|
||||
// So logic checks for PENDING. If we change to ACTIVE (1) or PROCESSING (3), it allows new order.
|
||||
'status' => \App\Enums\Order\OrderStatus::ACTIVE->value,
|
||||
]);
|
||||
|
||||
// Update Invoice Status
|
||||
|
||||
Reference in New Issue
Block a user