From 0bd470a6f8c3675d42a4367b79d7f78b1dc5bc9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Mon, 9 Feb 2026 17:02:54 +0900 Subject: [PATCH] =?UTF-8?q?feat:=ED=99=88=ED=83=9D=EC=8A=A4=20=EC=84=B8?= =?UTF-8?q?=EA=B8=88=EA=B3=84=EC=82=B0=EC=84=9C=20=EB=B6=84=EA=B0=9C=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=EB=A7=88=EC=9D=B4=EA=B7=B8?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- ..._create_hometax_invoice_journals_table.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 database/migrations/2026_02_09_100000_create_hometax_invoice_journals_table.php diff --git a/database/migrations/2026_02_09_100000_create_hometax_invoice_journals_table.php b/database/migrations/2026_02_09_100000_create_hometax_invoice_journals_table.php new file mode 100644 index 0000000..7309be6 --- /dev/null +++ b/database/migrations/2026_02_09_100000_create_hometax_invoice_journals_table.php @@ -0,0 +1,43 @@ +id(); + $table->unsignedBigInteger('tenant_id')->comment('테넌트 ID'); + $table->unsignedBigInteger('hometax_invoice_id')->comment('홈택스 세금계산서 ID'); + $table->string('nts_confirm_num', 50)->comment('국세청승인번호'); + + $table->enum('dc_type', ['debit', 'credit'])->comment('차변/대변'); + $table->string('account_code', 20)->comment('계정과목 코드'); + $table->string('account_name', 100)->comment('계정과목명'); + $table->bigInteger('debit_amount')->default(0)->comment('차변금액'); + $table->bigInteger('credit_amount')->default(0)->comment('대변금액'); + $table->string('description', 500)->nullable()->comment('적요'); + $table->integer('sort_order')->default(0)->comment('정렬순서'); + + $table->string('invoice_type', 20)->comment('매출/매입 (sales/purchase)'); + $table->date('write_date')->nullable()->comment('작성일자'); + $table->bigInteger('supply_amount')->default(0)->comment('공급가액'); + $table->bigInteger('tax_amount')->default(0)->comment('세액'); + $table->bigInteger('total_amount')->default(0)->comment('합계금액'); + $table->string('trading_partner_name', 200)->nullable()->comment('거래처명'); + + $table->timestamps(); + + $table->index(['tenant_id', 'hometax_invoice_id'], 'idx_hij_tenant_invoice'); + $table->index(['tenant_id', 'write_date'], 'idx_hij_tenant_write_date'); + }); + } + + public function down(): void + { + Schema::dropIfExists('hometax_invoice_journals'); + } +};