diff --git a/src/views/account/AccountView.vue b/src/views/account/AccountView.vue
index f08a9fe..3289710 100644
--- a/src/views/account/AccountView.vue
+++ b/src/views/account/AccountView.vue
@@ -387,6 +387,8 @@ function openEdit(e) {
walletId: e.walletId || '',
toWalletKind: walletKindOf(e.toWalletId),
toWalletId: e.toWalletId || '',
+ principal: null,
+ interest: null,
installmentMonths: e.installmentMonths || '',
})
// 태그 이름 → id 매핑 (현재 태그 목록 기준)
@@ -422,6 +424,8 @@ async function submit() {
}
submitting.value = true
try {
+ // 상환은 원금=이체 / 이자=지출 2건으로 저장된다. 수정 시에는 기존 1건을
+ // 상환 2건으로 다시 만든다(상환 생성 성공 후 원본 삭제 — 중간 실패 시 원본 보존).
await accountApi.repayment({
entryDate: form.entryDate,
fromWalletId: form.walletId,
@@ -430,6 +434,9 @@ async function submit() {
interest,
memo: form.memo || null,
})
+ if (editId.value) {
+ await accountApi.remove(editId.value)
+ }
formOpen.value = false
await load()
} catch (e) {
@@ -655,7 +662,7 @@ onMounted(async () => {
-
+