fix:계좌거래내역 구분에서 이체 제거 (입금/출금만 유지)
This commit is contained in:
@@ -52,7 +52,7 @@ function AccountTransactions() {
|
||||
{ id: 5, date: '2026-01-19', accountName: '기업은행 운영계좌', accountNo: '123-456789-01', type: 'deposit', category: '매출입금', description: '글로벌솔루션 계약금', amount: 8500000, balance: 115000000, memo: '' },
|
||||
{ id: 6, date: '2026-01-19', accountName: '신한은행 급여계좌', accountNo: '110-123-456789', type: 'withdrawal', category: '세금납부', description: '원천세 납부', amount: 3200000, balance: 100000000, memo: '12월분' },
|
||||
{ id: 7, date: '2026-01-18', accountName: '기업은행 운영계좌', accountNo: '123-456789-01', type: 'withdrawal', category: '거래처지급', description: 'IT솔루션즈 외주비', amount: 12000000, balance: 106500000, memo: '' },
|
||||
{ id: 8, date: '2026-01-18', accountName: '국민은행 예비계좌', accountNo: '999-12-345678', type: 'transfer', category: '계좌이체', description: '운영자금 이체', amount: 20000000, balance: 80000000, memo: '기업은행으로' },
|
||||
{ id: 8, date: '2026-01-18', accountName: '국민은행 예비계좌', accountNo: '999-12-345678', type: 'withdrawal', category: '계좌이체', description: '운영자금 이체', amount: 20000000, balance: 80000000, memo: '기업은행으로' },
|
||||
{ id: 9, date: '2026-01-17', accountName: '기업은행 운영계좌', accountNo: '123-456789-01', type: 'deposit', category: '매출입금', description: '스마트시스템 유지보수', amount: 3500000, balance: 118500000, memo: '' },
|
||||
{ id: 10, date: '2026-01-17', accountName: '신한은행 급여계좌', accountNo: '110-123-456789', type: 'deposit', category: '계좌이체', description: '운영계좌에서 이체', amount: 50000000, balance: 103200000, memo: '' },
|
||||
]);
|
||||
@@ -81,7 +81,6 @@ function AccountTransactions() {
|
||||
|
||||
const totalDeposit = filteredTransactions.filter(t => t.type === 'deposit').reduce((sum, t) => sum + t.amount, 0);
|
||||
const totalWithdrawal = filteredTransactions.filter(t => t.type === 'withdrawal').reduce((sum, t) => sum + t.amount, 0);
|
||||
const totalTransfer = filteredTransactions.filter(t => t.type === 'transfer').reduce((sum, t) => sum + t.amount, 0);
|
||||
|
||||
const handleDownload = () => {
|
||||
const rows = [['계좌거래내역'], [], ['날짜', '계좌', '구분', '분류', '내용', '금액', '잔액', '메모'],
|
||||
@@ -92,23 +91,21 @@ function AccountTransactions() {
|
||||
};
|
||||
|
||||
const getTypeLabel = (type) => {
|
||||
const labels = { 'deposit': '입금', 'withdrawal': '출금', 'transfer': '이체' };
|
||||
const labels = { 'deposit': '입금', 'withdrawal': '출금' };
|
||||
return labels[type] || type;
|
||||
};
|
||||
|
||||
const getTypeStyle = (type) => {
|
||||
const styles = {
|
||||
'deposit': 'text-blue-600',
|
||||
'withdrawal': 'text-red-600',
|
||||
'transfer': 'text-gray-600'
|
||||
'withdrawal': 'text-red-600'
|
||||
};
|
||||
return styles[type] || 'text-gray-600';
|
||||
};
|
||||
|
||||
const getTypeIcon = (type) => {
|
||||
if (type === 'deposit') return <ArrowDownCircle className="w-4 h-4 text-blue-500" />;
|
||||
if (type === 'withdrawal') return <ArrowUpCircle className="w-4 h-4 text-red-500" />;
|
||||
return <ArrowUpDown className="w-4 h-4 text-gray-500" />;
|
||||
return <ArrowUpCircle className="w-4 h-4 text-red-500" />;
|
||||
};
|
||||
|
||||
const resetFilters = () => {
|
||||
@@ -134,7 +131,7 @@ function AccountTransactions() {
|
||||
</header>
|
||||
|
||||
{/* 요약 카드 */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
||||
<div className="bg-white rounded-xl border border-gray-200 p-6">
|
||||
<div className="flex items-center justify-between mb-2"><span className="text-sm text-gray-500">조회 건수</span><Filter className="w-5 h-5 text-gray-400" /></div>
|
||||
<p className="text-2xl font-bold text-gray-900">{filteredTransactions.length}건</p>
|
||||
@@ -147,10 +144,6 @@ function AccountTransactions() {
|
||||
<div className="flex items-center justify-between mb-2"><span className="text-sm text-red-700">출금 합계</span><ArrowUpCircle className="w-5 h-5 text-red-500" /></div>
|
||||
<p className="text-2xl font-bold text-red-600">{formatCurrency(totalWithdrawal)}원</p>
|
||||
</div>
|
||||
<div className="bg-white rounded-xl border border-gray-200 p-6">
|
||||
<div className="flex items-center justify-between mb-2"><span className="text-sm text-gray-500">이체 합계</span><ArrowUpDown className="w-5 h-5 text-gray-400" /></div>
|
||||
<p className="text-2xl font-bold text-gray-900">{formatCurrency(totalTransfer)}원</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 필터 영역 */}
|
||||
@@ -167,8 +160,8 @@ function AccountTransactions() {
|
||||
{categories.map(cat => <option key={cat} value={cat}>{cat}</option>)}
|
||||
</select>
|
||||
<div className="flex gap-1">
|
||||
{['all', 'deposit', 'withdrawal', 'transfer'].map(type => (
|
||||
<button key={type} onClick={() => setFilterType(type)} className={`flex-1 px-2 py-2 rounded-lg text-xs font-medium ${filterType === type ? (type === 'deposit' ? 'bg-blue-600 text-white' : type === 'withdrawal' ? 'bg-red-600 text-white' : type === 'transfer' ? 'bg-gray-600 text-white' : 'bg-gray-800 text-white') : 'bg-gray-100 text-gray-700'}`}>
|
||||
{['all', 'deposit', 'withdrawal'].map(type => (
|
||||
<button key={type} onClick={() => setFilterType(type)} className={`flex-1 px-2 py-2 rounded-lg text-xs font-medium ${filterType === type ? (type === 'deposit' ? 'bg-blue-600 text-white' : type === 'withdrawal' ? 'bg-red-600 text-white' : 'bg-gray-800 text-white') : 'bg-gray-100 text-gray-700'}`}>
|
||||
{type === 'all' ? '전체' : getTypeLabel(type)}
|
||||
</button>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user