diff --git a/app/Domains/Real/Commands/Sync/AddedOrderSync.php b/app/Domains/Real/Commands/Sync/AddedOrderSync.php index 8bbf42d2..741060d4 100644 --- a/app/Domains/Real/Commands/Sync/AddedOrderSync.php +++ b/app/Domains/Real/Commands/Sync/AddedOrderSync.php @@ -88,8 +88,8 @@ class AddedOrderSync extends Command $endtime = $this->datetime->copy()->endOfMonth()->endOfDay(); $orders = DB::table($virtualTable)->selectRaw('sim,MAX(order_id)') - ->where('created_at', '>=', $starttime) - ->where('created_at', '<=', $endtime) + ->where('created_at', '>=', $starttime->format('Y-m-d H:i:s')) + ->where('created_at', '<=', $endtime->format('Y-m-d H:i:s')) ->whereIn('sim', array_pluck($data, 'sim')) ->groupBy('sim')->get()->pluck('order_id', 'sim');