refactor:계좌입출금내역 계정과목 기능 제거 (일반전표 분개와 이중 관리 해소)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -932,14 +932,6 @@ className="w-full px-3 py-2 border border-stone-200 rounded-lg text-sm text-righ
|
||||
placeholder="0"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs text-stone-500 mb-1">계정과목</label>
|
||||
<AccountCodeSelect
|
||||
value={split.accountCode}
|
||||
onChange={(code, name) => updateSplit(index, { accountCode: code, accountName: name })}
|
||||
accountCodes={accountCodes}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs text-stone-500 mb-1">내역</label>
|
||||
<input
|
||||
@@ -1028,7 +1020,7 @@ className="flex-1 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700
|
||||
};
|
||||
|
||||
// ManualEntryModal Component (수동입력 모달)
|
||||
const ManualEntryModal = ({ isOpen, onClose, onSave, editData, accountCodes, accounts, logs }) => {
|
||||
const ManualEntryModal = ({ isOpen, onClose, onSave, editData, accounts, logs }) => {
|
||||
const [form, setForm] = useState({});
|
||||
const [saving, setSaving] = useState(false);
|
||||
const [baseBalance, setBaseBalance] = useState(0);
|
||||
@@ -1083,8 +1075,6 @@ className="flex-1 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700
|
||||
cast: editData.cast || '',
|
||||
memo: editData.memo || '',
|
||||
trans_office: editData.transOffice || '',
|
||||
account_code: editData.accountCode || '',
|
||||
account_name: editData.accountName || '',
|
||||
});
|
||||
} else {
|
||||
const today = new Date();
|
||||
@@ -1106,8 +1096,6 @@ className="flex-1 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700
|
||||
cast: '',
|
||||
memo: '',
|
||||
trans_office: '',
|
||||
account_code: '',
|
||||
account_name: '',
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1132,8 +1120,6 @@ className="flex-1 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700
|
||||
cast: form.cast,
|
||||
memo: form.memo,
|
||||
trans_office: form.trans_office,
|
||||
account_code: form.account_code,
|
||||
account_name: form.account_name,
|
||||
};
|
||||
await onSave(submitData, editData?.dbId);
|
||||
setSaving(false);
|
||||
@@ -1387,15 +1373,6 @@ className="w-full px-3 py-2 border border-stone-200 rounded-lg text-sm focus:rin
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* 계정과목 */}
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-stone-700 mb-1">계정과목</label>
|
||||
<AccountCodeSelect
|
||||
value={form.account_code || ''}
|
||||
onChange={(code, name) => setForm(prev => ({ ...prev, account_code: code, account_name: name }))}
|
||||
accountCodes={accountCodes}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
@@ -1432,12 +1409,9 @@ className="px-4 py-2 bg-emerald-600 text-white rounded-lg hover:bg-emerald-700 t
|
||||
onMonthOffset,
|
||||
onSearch,
|
||||
totalCount,
|
||||
accountCodes,
|
||||
onAccountCodeChange,
|
||||
onCastChange,
|
||||
onSave,
|
||||
onExport,
|
||||
onOpenSettings,
|
||||
saving,
|
||||
hasChanges,
|
||||
onEditTransaction,
|
||||
@@ -1578,16 +1552,6 @@ className="flex items-center gap-2 px-4 py-2 bg-green-100 text-green-700 rounded
|
||||
</svg>
|
||||
수동입력
|
||||
</button>
|
||||
<button
|
||||
onClick={onOpenSettings}
|
||||
className="flex items-center gap-2 px-4 py-2 bg-stone-100 text-stone-700 rounded-lg text-sm font-medium hover:bg-stone-200 transition-colors"
|
||||
>
|
||||
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
</svg>
|
||||
계정과목 설정
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="overflow-x-auto" style={ {minHeight: '500px', overflowY: 'auto'} }>
|
||||
@@ -1603,14 +1567,13 @@ className="flex items-center gap-2 px-4 py-2 bg-stone-100 text-stone-700 rounded
|
||||
<th className="px-4 py-4 text-right bg-stone-50">잔액</th>
|
||||
<th className="px-4 py-4 bg-stone-50">취급점</th>
|
||||
<th className="px-4 py-4 bg-stone-50 min-w-[120px]">상대계좌예금주명</th>
|
||||
<th className="px-4 py-4 bg-stone-50 min-w-[150px]">계정과목</th>
|
||||
<th className="px-4 py-4 bg-stone-50 text-center w-[80px]">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-stone-100">
|
||||
{logs.length === 0 ? (
|
||||
<tr>
|
||||
<td colSpan="11" className="px-6 py-8 text-center text-stone-400">
|
||||
<td colSpan="10" className="px-6 py-8 text-center text-stone-400">
|
||||
해당 기간에 조회된 입출금 내역이 없습니다.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1692,27 +1655,6 @@ className="w-full px-2 py-1 text-sm border border-stone-200 rounded focus:ring-2
|
||||
placeholder="예금주명 입력"
|
||||
/>
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
{hasSplits ? (
|
||||
<button
|
||||
onClick={() => onOpenSplitModal(log, log.uniqueKey, logSplits)}
|
||||
className="text-sm text-emerald-600 hover:text-emerald-800 hover:underline font-medium"
|
||||
>
|
||||
분개 수정 ({logSplits.length}건)
|
||||
</button>
|
||||
) : (
|
||||
<>
|
||||
<AccountCodeSelect
|
||||
value={log.accountCode}
|
||||
onChange={(code, name) => onAccountCodeChange(index, code, name)}
|
||||
accountCodes={accountCodes}
|
||||
/>
|
||||
{log.accountName && (
|
||||
<div className="text-xs text-emerald-600 mt-1">{log.accountName}</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</td>
|
||||
<td className="px-3 py-3 text-center">
|
||||
{log.isManual && (
|
||||
<div className="flex items-center gap-1 justify-center">
|
||||
@@ -1760,11 +1702,6 @@ className="p-1 text-red-500 hover:bg-red-50 rounded transition-colors"
|
||||
<td className="px-4 py-2"></td>
|
||||
<td className="px-4 py-2"></td>
|
||||
<td className="px-4 py-2"></td>
|
||||
<td className="px-4 py-2 text-xs">
|
||||
{split.account_name && (
|
||||
<span className="text-emerald-600">{split.account_code} {split.account_name}</span>
|
||||
)}
|
||||
</td>
|
||||
<td className="px-3 py-2"></td>
|
||||
</tr>
|
||||
))}
|
||||
@@ -2173,7 +2110,7 @@ className="p-1 text-red-500 hover:bg-red-50 rounded transition-colors"
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-stone-900">계좌 입출금내역</h1>
|
||||
<p className="text-stone-500 mt-1">바로빌 API를 통한 계좌 입출금내역 조회 및 계정과목 관리</p>
|
||||
<p className="text-stone-500 mt-1">바로빌 API를 통한 계좌 입출금내역 조회</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
@if($isTestMode)
|
||||
@@ -2259,12 +2196,9 @@ className="p-1 text-red-500 hover:bg-red-50 rounded transition-colors"
|
||||
onMonthOffset={handleMonthOffset}
|
||||
onSearch={() => loadTransactions()}
|
||||
totalCount={summary.count || logs.length}
|
||||
accountCodes={accountCodes}
|
||||
onAccountCodeChange={handleAccountCodeChange}
|
||||
onCastChange={handleCastChange}
|
||||
onSave={handleSave}
|
||||
onExport={handleExport}
|
||||
onOpenSettings={() => setShowSettingsModal(true)}
|
||||
saving={saving}
|
||||
hasChanges={hasChanges}
|
||||
onEditTransaction={handleEditTransaction}
|
||||
@@ -2305,17 +2239,10 @@ className="p-1 text-red-500 hover:bg-red-50 rounded transition-colors"
|
||||
onClose={() => { setManualModalOpen(false); setManualEditData(null); }}
|
||||
onSave={handleManualSave}
|
||||
editData={manualEditData}
|
||||
accountCodes={accountCodes}
|
||||
accounts={accounts}
|
||||
logs={logs}
|
||||
/>
|
||||
|
||||
{/* Account Code Settings Modal */}
|
||||
<AccountCodeSettingsModal
|
||||
isOpen={showSettingsModal}
|
||||
onClose={() => setShowSettingsModal(false)}
|
||||
onUpdate={loadAccountCodes}
|
||||
/>
|
||||
|
||||
{/* Pagination */}
|
||||
{!error && pagination.maxPageNum > 1 && (
|
||||
|
||||
Reference in New Issue
Block a user