diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index ff2888aa01..809246bb5d 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -1291,10 +1291,12 @@ $products = str_getcsv($this->input['product_key'], ',', "'"); $this->end_date = 'All available data'; return $query; case 'last7': + case 'last_7_days': $this->start_date = now()->subDays(7)->format('Y-m-d'); $this->end_date = now()->format('Y-m-d'); return $query->whereBetween($this->date_key, [now()->subDays(7), now()])->orderBy($this->date_key, 'ASC'); case 'last30': + case 'last_30_days': $this->start_date = now()->subDays(30)->format('Y-m-d'); $this->end_date = now()->format('Y-m-d'); return $query->whereBetween($this->date_key, [now()->subDays(30), now()])->orderBy($this->date_key, 'ASC');