fix: 기간별 판매현황 기본 조회기간을 '오늘로부터 일주일 전 ~ 오늘'로 수정

기존 'monday this week'는 월요일 접속 시 시작=종료=오늘이 되는 문제 →
시작일 = 오늘-7일, 종료일 = 오늘 으로 변경

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
taekyoungc
2026-06-29 12:26:53 +09:00
parent 8330790741
commit bf9fbd57a4

View File

@@ -1103,8 +1103,8 @@ class SalesReport extends BaseController
return redirect()->to(work_area_home_url())->with('error', '지자체를 선택해 주세요.'); return redirect()->to(work_area_home_url())->with('error', '지자체를 선택해 주세요.');
} }
// 기본 조회 기간: 이번주(월요일 ~ 오늘) // 기본 조회 기간: 오늘로부터 일주일 전 ~ 오늘
$startDate = (string) ($this->request->getGet('start_date') ?? date('Y-m-d', strtotime('monday this week'))); $startDate = (string) ($this->request->getGet('start_date') ?? date('Y-m-d', strtotime('-7 days')));
$endDate = (string) ($this->request->getGet('end_date') ?? date('Y-m-d')); $endDate = (string) ($this->request->getGet('end_date') ?? date('Y-m-d'));
if ($startDate > $endDate) { if ($startDate > $endDate) {
[$startDate, $endDate] = [$endDate, $startDate]; [$startDate, $endDate] = [$endDate, $startDate];