diff --git a/app/modules/performance/CLAUDE.md b/app/modules/performance/CLAUDE.md index 2da498c..6ca204c 100644 --- a/app/modules/performance/CLAUDE.md +++ b/app/modules/performance/CLAUDE.md @@ -37,6 +37,7 @@ ## 수동 입력 - 설정의 쇼핑몰별 **수동 입력** 토글(마이그레이션 002 `manual_input`·`perf_manual_sales`) — 켜면 일자별 표 날짜 칸에 총매출 직접 입력, 넣은 날은 API 값 대신(`daily_amounts` 한 곳). + 수동 입력 켠 쇼핑몰은 **API 가 설정돼 있어도 매출 업데이트(수동·자동·과거 매출 가져오기)에서 빠진다**(2026-10-21, `sync.sync_all` 대상 고르기 한 곳) — 예전에 받은 API 값은 그대로 남음. - 일자별 표 [엑셀 업로드] 팝업(`manual_upload.py`, `POST /performance/api/manual-sales/upload`) — 1열 날짜·2열부터 쇼핑몰 이름 머리글, 수동 입력 켜진 쇼핑몰 열의 값 있는 칸만 반영(덮어씀, 빈 칸 그대로), 잘못된 칸이 하나라도 있으면 전부 저장 안 함, 샘플 = 모듈 폴더 `upload_sample.xlsx`. - 열 순서 카페24·네이버·쿠팡(윙)·쿠팡(로켓)·오늘의집·G마켓·카카오·GS샵·11번가·롯데ON·토스·애터미아자몰(마이그레이션 003). - 쿠팡(로켓)·애터미아자몰은 **수동 입력 전용**(`adapters/manual.py`, `manual_only` — 매출 업데이트에서 빠지고 인증 설정·연결 테스트 없음, 수동 입력 늘 켜짐). diff --git a/app/modules/performance/sync.py b/app/modules/performance/sync.py index 91780d9..a9fc7d8 100644 --- a/app/modules/performance/sync.py +++ b/app/modules/performance/sync.py @@ -164,7 +164,8 @@ class SyncService: """job: jobs.SyncJob — 주면 쇼핑몰마다 진행 상황(ShopProgress)을 채운다(매출 업데이트 창).""" end = end or today_kst() start = start or (end - timedelta(days=sync_days() - 1)) - enabled = {m["code"] for m in self._store.list_marketplaces() if m["enabled"]} + # 설정에서 수동 입력을 켠 쇼핑몰은 API 가 설정돼 있어도 매출 업데이트(수동·자동·과거 매출 가져오기)에서 뺀다 + enabled = {m["code"] for m in self._store.list_marketplaces() if m["enabled"] and not m.get("manual_input")} # 수동 입력 전용 쇼핑몰(manual_only)은 가져올 API 가 없어 매출 업데이트에서 뺀다 targets = [a for a in all_adapters() if a.code in enabled and not a.manual_only and (not codes or a.code in codes)] diff --git a/app/modules/performance/templates/performance/settings.html b/app/modules/performance/templates/performance/settings.html index f78d2dc..0659123 100644 --- a/app/modules/performance/templates/performance/settings.html +++ b/app/modules/performance/templates/performance/settings.html @@ -21,7 +21,7 @@