fix(860-3): 불러온 일위대가에 붙인 줄 비고 = 「손 단가(붙인 값)」

- 판 있는 문서(불러온 SC)에 붙여넣은 줄이 판 글(「우리 단가 없음 — 엑셀 값」)로 보이던 것 → 붙인 값 글 먼저
- 차례 = 이은 단가 책 › 엑셀 단가산출 줄 › 붙인 값 › 판 › 넣을 때 값 · 시험 test_860_3_fixed_note 한 줄 더함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 13:28:58 +09:00
co-authored by Claude Opus 5.5
parent 8c5b5b8949
commit 577154ec90
2 changed files with 5 additions and 2 deletions
@@ -42,7 +42,7 @@ const layerWord = (layer: string): string =>
/** 일위대가번 — 번호꼴(SU-000011 · SU01010101)은 사람 글이 아니라 뺌 */
const humanNo = (no?: string): string => (no && !/^S[A-Z]\d?-?\d{6,8}$/.test(no) ? no : "");
/** 고정 줄 비고(860-3) — 값을 낳은 곳: 이은 단가 책 값 › 엑셀 단가산출 줄 › 판(엑셀 · 우리) › 붙인 값 · 넣을 때 값 */
/** 고정 줄 비고(860-3) — 값을 낳은 곳: 이은 단가 책 값 › 엑셀 단가산출 줄 › 붙인 값 › 판(엑셀 · 우리) › 넣을 때 값 */
function fixedNote(fx: LaborFixed, line: CalcLine | undefined, basis: unknown): string {
if (fx.비율) {
const base = Array.isArray(fx.비율.기준) ? tc("Grid_RateRows") : fx.비율.기준;
@@ -51,9 +51,10 @@ function fixedNote(fx: LaborFixed, line: CalcLine | undefined, basis: unknown):
const names = line?.이은이름 ?? [];
if (names.length) return tc("Grid_Ours").replace("{name}", names.join(" · "));
if (fx.출처?.단산 != null) return tc("Grid_ExcelSk");
if (String(fx.출처?.파일 ?? "").startsWith("붙여넣기")) return tc("Grid_Hand"); // 불러온 문서에 붙인 줄도
if (basis === "엑셀") return tc("Grid_Excel");
if (basis === "우리") return [tc("Grid_NoOurs"), line?.우리없음].filter(Boolean).join(" · "); // 기계 못 셈 까닭(860-3b)
return String(fx.출처?.파일 ?? "").startsWith("붙여넣기") ? tc("Grid_Hand") : tc("Grid_Kept");
return tc("Grid_Kept");
}
/** 문서 + calc 답 → 호표 하나 — calc 없으면(계산 중) 금액 빈 칸 · 빈 줄 0 */
@@ -78,6 +78,8 @@ def test_판_없음_붙인_값_넣을_때_값_율():
None, [pasted, pasted_linked, hand, rate], [{}, {"이은이름": ["보통인부"]}, {}, {}]
)
assert got == ["손 단가(붙인 값)", "우리 단가 — 보통인부", "넣을 때 값", "율 — 노무비 기준"]
# 불러온 문서(판 있음)에 붙인 줄 = 붙인 값(판 글 아님)
assert _notes("우리", [pasted], [{}]) == ["손 단가(붙인 값)"]
def test_서버_고정_줄_이은이름():