feat: [finance] 계정과목 및 일반전표 API 추가

- AccountCode 모델/서비스/컨트롤러 구현
- JournalEntry, JournalEntryLine 모델 구현
- GeneralJournalEntry 서비스/컨트롤러 구현
- FormRequest 검증 클래스 추가
- finance 라우트 등록
- i18n 메시지 키 추가 (message.php, error.php)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-03-06 13:10:45 +09:00
parent be9c1baa34
commit 12d172e4c3
13 changed files with 1137 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Models\Tenants;
use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class JournalEntryLine extends Model
{
use BelongsToTenant;
protected $fillable = [
'tenant_id',
'journal_entry_id',
'line_no',
'dc_type',
'account_code',
'account_name',
'trading_partner_id',
'trading_partner_name',
'debit_amount',
'credit_amount',
'description',
];
protected $casts = [
'line_no' => 'integer',
'debit_amount' => 'integer',
'credit_amount' => 'integer',
'trading_partner_id' => 'integer',
];
// DC Type
public const DC_DEBIT = 'debit';
public const DC_CREDIT = 'credit';
/**
* 전표 관계
*/
public function journalEntry(): BelongsTo
{
return $this->belongsTo(JournalEntry::class);
}
}