feat(est-test): 원가계산서 산출근거 약어로 표시

- 원본 popupSNameShow: 산출근거 식의 기호를 비목 약어로, 숫자를 요율 글자로 바꿔 화면·인쇄에 표시하고 편집 잠금, 저장 값은 그대로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 12:51:14 +09:00
co-authored by Claude Opus 5.5
parent 7222577442
commit cc1a6bcbde
7 changed files with 88 additions and 3 deletions
+18
View File
@@ -148,3 +148,21 @@ def test_position_sets_row_digits_like_original():
assert result["input"]["Cost"] == 1234600 and result["input"]["TC"] == 1234567
assert result["input"]["Diget"] == 2 and result["input"]["DigetIndex"] == 1
assert result["last"] == 2
def test_abbreviate_formula_like_original_sname_show():
result = run_js(
r"""(() => {
const rows = source.tables.Wonga, a = EstWongaTools.abbreviate(rows, source.options);
const by = (g) => a[rows.findIndex((r) => r.Gubun === g)];
const nf = EstWongaTools.abbreviate([{ Index: 1, NumStr: '1', Name: '직 접 노 무 비' },
{ NumStr: '2', VSusic: '1 × 0.05', Youl: '5%' }], { VerFormat: false });
return { five: by('5'), c: by('C'), e: by('E'), empty: a[0], nf: nf[1], same: rows.every((r, i) => r.VSusic === source.tables.Wonga[i].VSusic) };
})()"""
)
assert result["five"] == "직.노 × 16.5%"
assert result["c"] == "( 산출경비 ~ 18 )"
assert result["e"] == "순.공 × 8%"
assert result["empty"] == ""
assert result["nf"] == "직접노무비 × 5%"
assert result["same"] is True