diff --git a/services/NormalBot.php b/services/NormalBot.php index 9d2ca4c..fd0f821 100644 --- a/services/NormalBot.php +++ b/services/NormalBot.php @@ -783,6 +783,9 @@ class NormalBot } elseif ($dateMode === 'current_month') { $extraQuery['fecha_desde'] = date('Y-m-01'); $extraQuery['fecha_hasta'] = date('Y-m-d'); + } elseif ($dateMode === 'last_month') { + $extraQuery['fecha_desde'] = date('Y-m-01', strtotime('first day of last month')); + $extraQuery['fecha_hasta'] = date('Y-m-t', strtotime('last day of last month')); } $extraQuery['telefono'] = $context['from']; $extraQuery['nombre'] = $context['name'] ?? '';