fix: [hometax] 자동동기화 dateType을 전송일자(3)로 변경하여 신규 전송건 누락 방지

- autoSync dateType: 1(작성일자) → 3(전송일자, 바로빌 권장)
- autoSync 증분 범위: -1일 → -3일로 확대 (안전 마진)
- 수집 요청 후 자동 동기화 추가 (스크래핑만 요청 → 동기화까지 수행)
This commit is contained in:
김보곤
2026-02-23 21:49:02 +09:00
parent 0d567e8b88
commit 3c17e44262
2 changed files with 30 additions and 4 deletions

View File

@@ -1390,9 +1390,10 @@ public function autoSync(Request $request, HometaxSyncService $syncService): Jso
]);
}
// 증분 범위 계산: 마지막 동기화일 -1일 ~ 오늘
// 증분 범위 계산: 마지막 동기화일 -3일 ~ 오늘
// 전송일자(dateType=3) 기준으로 조회하여 작성일자가 오래된 신규 전송건도 포착
$startDate = $lastFetch
? $lastFetch->copy()->subDay()->format('Ymd')
? $lastFetch->copy()->subDays(3)->format('Ymd')
: date('Ymd', strtotime('-1 month'));
$endDate = date('Ymd');
@@ -1401,7 +1402,7 @@ public function autoSync(Request $request, HometaxSyncService $syncService): Jso
$apiRequest = new Request([
'startDate' => $startDate,
'endDate' => $endDate,
'dateType' => 1, // 작성일자 기준
'dateType' => 3, // 전송일자 기준 (바로빌 권장, 신규 전송건 누락 방지)
'limit' => 500,
]);