diff --git a/app/Http/Controllers/Finance/PayableController.php b/app/Http/Controllers/Finance/PayableController.php index c1f5e417..a3734ce2 100644 --- a/app/Http/Controllers/Finance/PayableController.php +++ b/app/Http/Controllers/Finance/PayableController.php @@ -196,7 +196,7 @@ public function integrated(Request $request): JsonResponse $account = $request->input('account', 'all'); $vendor = $request->input('vendor', ''); - $accountCodes = $account === 'all' ? ['204', '205'] : [$account]; + $accountCodes = $account === 'all' ? ['20400', '20500'] : [$account]; // 0. 이월 잔액 계산 (startDate 이전의 누적 잔액) $priorBalanceMap = []; @@ -431,7 +431,7 @@ public function hometaxPayables(Request $request): JsonResponse $endDate = $request->input('endDate', date('Y-12-31')); $account = $request->input('account', 'all'); - $accountCodes = $account === 'all' ? ['204', '205'] : [$account]; + $accountCodes = $account === 'all' ? ['20400', '20500'] : [$account]; $items = HometaxInvoiceJournal::where('tenant_id', $tenantId) ->whereIn('account_code', $accountCodes) @@ -465,7 +465,7 @@ public function journalPayables(Request $request): JsonResponse $account = $request->input('account', 'all'); $dcType = $request->input('dcType', 'all'); - $accountCodes = $account === 'all' ? ['204', '205'] : [$account]; + $accountCodes = $account === 'all' ? ['20400', '20500'] : [$account]; $query = JournalEntryLine::where('journal_entry_lines.tenant_id', $tenantId) ->whereIn('journal_entry_lines.account_code', $accountCodes) diff --git a/app/Http/Controllers/Finance/ReceivableController.php b/app/Http/Controllers/Finance/ReceivableController.php index 369e392a..17428c10 100644 --- a/app/Http/Controllers/Finance/ReceivableController.php +++ b/app/Http/Controllers/Finance/ReceivableController.php @@ -210,7 +210,7 @@ public function ledger(Request $request): JsonResponse if ($startDate) { if ($source !== 'journal') { $priorHtQuery = HometaxInvoiceJournal::where('tenant_id', $tenantId) - ->where('account_code', '108') + ->where('account_code', '10800') ->where('invoice_type', 'sales') ->where('write_date', '<', $startDate); if ($partner) { @@ -230,7 +230,7 @@ public function ledger(Request $request): JsonResponse } if ($source !== 'hometax') { $priorJnlQuery = JournalEntryLine::where('journal_entry_lines.tenant_id', $tenantId) - ->where('journal_entry_lines.account_code', '108') + ->where('journal_entry_lines.account_code', '10800') ->join('journal_entries', 'journal_entries.id', '=', 'journal_entry_lines.journal_entry_id') ->whereNull('journal_entries.deleted_at') ->where('journal_entries.entry_date', '<', $startDate); @@ -248,7 +248,7 @@ public function ledger(Request $request): JsonResponse if ($source !== 'journal') { // 1-a) 분개 완료된 건: hometax_invoice_journals에서 계정코드 108 $hometaxQuery = HometaxInvoiceJournal::where('tenant_id', $tenantId) - ->where('account_code', '108') + ->where('account_code', '10800') ->where('invoice_type', 'sales'); if ($startDate) { @@ -306,7 +306,7 @@ public function ledger(Request $request): JsonResponse // 2) 일반전표에서 외상매출금(108) 조회 if ($source !== 'hometax') { $journalQuery = JournalEntryLine::where('journal_entry_lines.tenant_id', $tenantId) - ->where('journal_entry_lines.account_code', '108') + ->where('journal_entry_lines.account_code', '10800') ->join('journal_entries', 'journal_entries.id', '=', 'journal_entry_lines.journal_entry_id') ->whereNull('journal_entries.deleted_at') ->select('journal_entry_lines.*', 'journal_entries.entry_date', 'journal_entries.entry_no'); @@ -384,7 +384,7 @@ public function summary(Request $request): JsonResponse if ($startDate) { // 이월 - 홈택스 분개 완료건 (account 108, sales) HometaxInvoiceJournal::where('tenant_id', $tenantId) - ->where('account_code', '108') + ->where('account_code', '10800') ->where('invoice_type', 'sales') ->where('write_date', '<', $startDate) ->select( @@ -421,7 +421,7 @@ public function summary(Request $request): JsonResponse // 이월 - 일반전표 (account 108) JournalEntryLine::where('journal_entry_lines.tenant_id', $tenantId) - ->where('journal_entry_lines.account_code', '108') + ->where('journal_entry_lines.account_code', '10800') ->join('journal_entries', function ($join) { $join->on('journal_entries.id', '=', 'journal_entry_lines.journal_entry_id') ->whereNull('journal_entries.deleted_at'); @@ -449,7 +449,7 @@ public function summary(Request $request): JsonResponse // 1) 홈택스 매출세금계산서에서 외상매출금 // 1-a) 분개 완료된 건 $hometaxQuery = HometaxInvoiceJournal::where('tenant_id', $tenantId) - ->where('account_code', '108') + ->where('account_code', '10800') ->where('invoice_type', 'sales'); if ($startDate) { @@ -489,7 +489,7 @@ public function summary(Request $request): JsonResponse // 2) 일반전표에서 외상매출금(108) $journalQuery = JournalEntryLine::where('journal_entry_lines.tenant_id', $tenantId) - ->where('journal_entry_lines.account_code', '108') + ->where('journal_entry_lines.account_code', '10800') ->join('journal_entries', 'journal_entries.id', '=', 'journal_entry_lines.journal_entry_id') ->whereNull('journal_entries.deleted_at') ->select('journal_entry_lines.*', 'journal_entries.entry_date'); diff --git a/resources/views/finance/payables.blade.php b/resources/views/finance/payables.blade.php index 0e68bbed..1eeb222d 100644 --- a/resources/views/finance/payables.blade.php +++ b/resources/views/finance/payables.blade.php @@ -187,8 +187,8 @@ function IntegratedTab({ startDate, endDate, account, vendorSearch }) {

{v.vendorName || '(거래처 미지정)'}

- - {v.accountCode === '204' ? '미지급금' : '미지급비용'} + + {v.accountCode === '20400' ? '미지급금' : '미지급비용'} @@ -348,7 +348,7 @@ function HometaxTab({ startDate, endDate, account }) { {item.write_date?.substring(0, 10)} {item.trading_partner_name || '-'} - + {item.account_name} @@ -446,7 +446,7 @@ className={`px-4 py-2 rounded-lg text-sm font-medium ${dcFilter === type {item.entry_no} {item.trading_partner_name || '-'} - + {item.account_name} @@ -595,9 +595,9 @@ className={`flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 tra
{activeTab === 'integrated' && ( diff --git a/resources/views/finance/receivables.blade.php b/resources/views/finance/receivables.blade.php index b463cb00..e650e6ef 100644 --- a/resources/views/finance/receivables.blade.php +++ b/resources/views/finance/receivables.blade.php @@ -165,7 +165,7 @@ function LedgerTab({ startDate, endDate, source, partnerSearch }) { {loading ? : items.length === 0 ? ( 외상매출금 데이터가 없습니다. -

홈택스 매출세금계산서 분개 또는 일반전표에서 계정코드 108(외상매출금)이 사용된 데이터를 표시합니다.

+

홈택스 매출세금계산서 분개 또는 일반전표에서 계정코드 10800(외상매출금)이 사용된 데이터를 표시합니다.

) : items.map((item, idx) => (