fix: [finance] 미수금/미지급금 계정코드 5자리로 수정
- 외상매출금 108 → 10800 - 미지급금 204 → 20400 - 미지급비용 205 → 20500
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user