fix: [journal] 계좌 출처 전표 일반전표에서 수정 허용

- 카드/세금계산서 출처 → 잠금 유지 (원본에서 수정)
- 계좌(bank_transaction) 출처 → 일반전표에서 수정 허용
- 프론트엔드 UI + 백엔드 update 메서드 동시 수정
This commit is contained in:
김보곤
2026-03-04 12:42:35 +09:00
parent fc63ea80ff
commit d77b9615b3
2 changed files with 15 additions and 7 deletions

View File

@@ -1330,10 +1330,15 @@ className={`px-2.5 py-1 text-xs rounded-full font-medium transition-colors ${vie
className="px-2.5 py-1 text-xs font-medium bg-amber-100 text-amber-700 rounded-full hover:bg-amber-200 transition-colors">
분개
</button>
) : (row.type === 'bank' || row.type === 'card') && row.hasJournal ? (
<span className="p-1 text-stone-300" title="카드/은행 출처 전표는 원본에서 수정하세요">
) : row.type === 'card' && row.hasJournal ? (
<span className="p-1 text-stone-300" title="카드 출처 전표는 카드사용내역에서 수정하세요">
<Lock className="w-4 h-4" />
</span>
) : row.type === 'bank' && row.hasJournal ? (
<button onClick={() => onEdit(row.journalId)}
className="p-1 text-stone-300 group-hover:text-emerald-500 hover:bg-emerald-50 rounded transition-colors" title="수정">
<Edit3 className="w-4 h-4" />
</button>
) : row.type === 'manual' && row.hasJournal ? (
<button onClick={() => onEdit(row.journalId)}
className="p-1 text-stone-300 group-hover:text-emerald-500 hover:bg-emerald-50 rounded transition-colors" title="수정">
@@ -2618,8 +2623,9 @@ function App() {
try {
const res = await fetch(`/finance/journal-entries/${entryId}`);
const data = await res.json();
if (data.success && data.data.source_type && data.data.source_type !== 'manual') {
notify('카드/은행/홈택스 출처 전표는 원본에서 수정해주세요.', 'warning');
if (data.success && data.data.source_type && !['manual', 'bank_transaction'].includes(data.data.source_type)) {
const sourceLabel = data.data.source_type === 'ecard_transaction' ? '카드사용내역' : '홈택스 매출/매입';
notify(`이 전표는 ${sourceLabel}에서 수정해주세요.`, 'warning');
return;
}
} catch (e) {