fix(performance): 계산식 입력 직후 차감 매출 숫자가 안 보이던 문제
칸 저장 뒤 총매출만 바꾸고 수수료·차감 매출(기본 보기)은 새로고침 때까지 예전 값(–)으로 흐리게 남겼다. 저장 응답에 그날 수수료·차감 매출을 함께 돌려주고 화면이 세 숫자를 바로 바꾼다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2123,6 +2123,9 @@ def test_manual_sale_api_rules():
|
||||
def api_amount(self, code, day):
|
||||
return 50000
|
||||
|
||||
def rate_table(self):
|
||||
return {"coupang": [(date(2026, 1, 1), Decimal("10"))]}
|
||||
|
||||
def update_marketplace(self, code, **kw):
|
||||
if self.missing and kw.get("manual_input") is not None:
|
||||
raise ManualMigrationNeeded()
|
||||
@@ -2156,6 +2159,7 @@ def test_manual_sale_api_rules():
|
||||
assert st.formula is None
|
||||
body = __import__("json").loads(router.api_manual_sale(None, "coupang", "2026-10-12", {"amount": "1,000+2000*2"}).body)
|
||||
assert st.saved[-1][2] == 5000 and st.formula == "1000+2000*2" and body["formula"] == "1000+2000*2"
|
||||
assert body["commission"] == 500 and body["net"] == 4500 # 화면이 새로고침 전에도 차감 매출을 바로 보이게
|
||||
assert status_of(lambda: router.api_manual_sale(None, "coupang", "2026-10-12", {"amount": "1/0"}))[0] == 400
|
||||
code, msg = status_of(lambda: router.api_manual_sale(None, "naver", "2026-10-12", {"amount": 1}))
|
||||
assert code == 400 and "수동 입력" in msg # 꺼진 쇼핑몰
|
||||
|
||||
Reference in New Issue
Block a user