Skip to content

fix: read Business Area (GSBER) / Business Place (BUPLA) from user config - #3

Closed
zb-sj wants to merge 1 commit into
zigbang:mainfrom
zb-sj:fix/business-area-from-user-config
Closed

fix: read Business Area (GSBER) / Business Place (BUPLA) from user config#3
zb-sj wants to merge 1 commit into
zigbang:mainfrom
zb-sj:fix/business-area-from-user-config

Conversation

@zb-sj

@zb-sj zb-sj commented Jul 25, 2026

Copy link
Copy Markdown

배경

기본 사용자(박영걸, Business Area K200)가 아닌 다른 사업영역 사용자(예: K300)가 eac voucher create를 실행하면 SAP 오류로 전표 생성이 실패합니다:

ZUNIEFI_5000 (400): Please input only the same 'Business Area'( SAP.ZFI1,213)

원인은 GSBER(사업영역)와 BUPLA(사업장)가 K200/K100으로 하드코딩되어 있고, UserProfile 타입에 해당 필드가 없어 config 값을 읽지 못하기 때문입니다. SAP은 비용센터(cost center)에서 라인의 Business Area를 유도하는데, 이것이 하드코딩된 헤더 K200과 충돌합니다.

실제로 비용센터 343020 / config gsber: "K300" 사용자가 가족회식비 전표(FI_21 장려지원금)를 올릴 때 재현했고, 이 패치 적용 후 정상 상신되었습니다.

변경

  • UserProfile에 optional gsber / bupla 필드 추가
  • computeDefaults, createTempDoc, 법인카드 create 흐름에서 user.gsber ?? "K200" / user.bupla ?? "K100" 로 읽도록 변경 (기존 사용자 무영향, fallback 동일)

검증

  • 패치된 소스(bun run src/index.ts)로 K300 사용자 가족회식비 전표 생성 → 상신 성공 (GRONO 발급, 첨부 2건 정상)

별도 후속 (이 PR 범위 밖)

loadConfig()DEFAULT_CONFIG와 병합하지 않아((await loadConfig()) ?? DEFAULT_CONFIG), 사용자 config에 부분 정의된 item(예: 가족회식비wfLine*만 있고 hkont/evikb 누락)은 빈 계정과목이 SAP에 전달되어 dynpro 흐름이 깨집니다(No batch input data found for dynpro SAPLF040 0700). 현재는 사용자가 config에 SAP 필드를 완비해야 회피됩니다. 가족회식비/원격근무지원비DEFAULT_CONFIG.items에 없는 점과 함께 별도 논의가 필요해 보입니다.

🤖 Generated with Claude Code

…nfig

GSBER and BUPLA were hardcoded to K200/K100, which only matches the default
shipped user (박영걸, Business Area K200). A user in another Business Area
(e.g. K300) hits "Please input only the same 'Business Area'" (SAP.ZFI1,213)
on `voucher create`, because SAP derives the line Business Area from the
cost center and it conflicts with the hardcoded K200 header value.

- Add optional gsber/bupla fields to UserProfile
- Read user.gsber / user.bupla (fallback K200/K100) in computeDefaults,
  createTempDoc, and the corpcard create flow

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@zb-sj

zb-sj commented Jul 25, 2026

Copy link
Copy Markdown
Author

PR #2 (feat: multi-browser cookie source + config-driven GSBER)와 GSBER 수정이 사실상 중복이라 닫습니다. #2가 GSBER를 user.gsber ?? "K200"로 동일하게 처리하며 EAC_BROWSER/v11 쿠키/README까지 더 포괄적으로 커버합니다. 본 PR의 유일한 추가분은 BUPLA도 config-driven화한 부분(오늘 케이스에서는 K100 일치로 미검증)이며, 필요 시 #2에 얹는 것이 정리상 낫습니다.

@zb-sj zb-sj closed this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant