diff --git a/internal/repository/orders/order.go b/internal/repository/orders/order.go index b3d93fd..cd6f8ec 100644 --- a/internal/repository/orders/order.go +++ b/internal/repository/orders/order.go @@ -171,7 +171,7 @@ func (b *OrderRepository) GetAllHystoryOrders(ctx context.Context, req entity.Or } else { currentTime := time.Now() startOfMonth := time.Date(currentTime.Year(), currentTime.Month(), 1, 0, 0, 0, 0, time.Local) - endOfMonth := startOfMonth.AddDate(0, 1, -1) + endOfMonth := startOfMonth.AddDate(0, 1, 0).Add(-time.Second) query = query.Where("orders.created_at BETWEEN ? AND ?", startOfMonth, endOfMonth) }