fix: [finance] 계정과목 설정 모달 중복 코드 조회 수정
- AccountCode 모델에 BelongsToTenant trait 추가하여 테넌트별 필터링 적용 - accountCodeStore에서 하드코딩된 tenant_id를 세션 기반으로 변경
This commit is contained in:
@@ -831,7 +831,7 @@ public function accountCodeStore(Request $request): JsonResponse
|
||||
$maxSort = AccountCode::max('sort_order') ?? 0;
|
||||
|
||||
$accountCode = AccountCode::create([
|
||||
'tenant_id' => 1,
|
||||
'tenant_id' => session('selected_tenant_id', 1),
|
||||
'code' => $validated['code'],
|
||||
'name' => $validated['name'],
|
||||
'category' => $validated['category'] ?? null,
|
||||
|
||||
Reference in New Issue
Block a user