fix: read GSBER/BUPLA from config instead of hardcoding - #4
Open
zb-sj wants to merge 1 commit into
Open
Conversation
전표 헤더의 사업장(GSBER)이 K200으로 하드코딩되어 있어, 다른 사업장에 속한 사용자는 전표 작성이 실패한다. 차변 라인(IT_DATA)에는 GSBER가 실리지 않고 KOSTL만 들어가므로 SAP이 원가센터에서 Business Area를 유도하는데, 그 값이 헤더의 K200과 다르면 ZUNIEFI_5000이 아래 오류로 거부한다. Please input only the same 'Business Area' ( SAP.ZFI1,213 ) 예로 원가센터 343020(Frontend Hogangnono)은 K300이라 자기관리비/가족회식비 전표를 작성할 수 없다. 과거에는 SAP이 헤더 값을 원가센터 기준으로 정규화해 통과시켰으나 현재는 불일치를 거부한다. UserProfile에 선택 필드 gsber/bupla를 추가해 config에서 읽도록 하고, DEFAULT_CONFIG에 기존 값(K200/K100)을 명시해 기존 사용자의 동작은 그대로 유지한다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
전표 헤더의 사업장(
GSBER)이K200으로 하드코딩되어 있어, 다른 사업장에 속한 사용자는 전표 작성 자체가 실패합니다.차변 라인(
IT_DATA)에는GSBER가 실리지 않고KOSTL만 들어가므로 SAP 이 원가센터에서 Business Area 를 유도하는데, 그 값이 헤더의K200과 다르면ZUNIEFI_5000이 아래 오류로 거부합니다.원가센터
343020(Frontend Hogangnono) 은 Business Area 가K300이라 자기관리비·가족회식비 전표를 만들 수 없었습니다. 참고로 과거에 승인된 전표들을ZUNIEFI_4207로 열어 보면 헤더가K200으로 전송되었음에도 저장된 값은K300입니다. 예전에는 SAP 이 원가센터 기준으로 정규화해 통과시켰으나, 현재는 불일치를 거부하는 것으로 보입니다.config.json에gsber/bupla를 적어 두어도 CLI 가 이 필드를 전혀 읽지 않아 우회할 방법이 없었습니다.변경
UserProfile에 선택 필드gsber/bupla추가ops.ts의 세 곳(computeDefaults,createTempDoc,createCorpCardVoucher)에서user.gsber ?? "K200"/user.bupla ?? "K100"으로 읽도록 변경DEFAULT_CONFIG에 기존 값(K200/K100)을 명시기본값을 그대로 두었으므로 기존 사용자의 동작은 바뀌지 않습니다. 다른 사업장 사용자는
~/.config/eac/config.json의user.gsber만 채우면 됩니다.{ "user": { "pernr": "ZB00743", "bukrs": "K001", "kostl": "343020", "gsber": "K300" } }검증
패치본으로 실제 전표를 작성하고 상신해 통과를 확인했습니다.
voucher create→BELNR 3200012194voucher request-approval→GRONO FI20260000027113(₩50,000, 장려지원금, 첨부 2건 정상)bunx tsc --noEmit기준 이번 변경으로 새로 생긴 타입 오류는 없습니다. (src/lib/update-check.ts:210오류는 이 PR 이전부터 있던 것입니다.)🤖 Generated with Claude Code