fix:계정과목을 글로벌 데이터로 변경 (테넌트 무관)

This commit is contained in:
김보곤
2026-02-03 09:56:30 +09:00
parent f8ab155a80
commit 83a438a030
2 changed files with 35 additions and 36 deletions

View File

@@ -36,14 +36,31 @@ public function tenant(): BelongsTo
}
/**
* 테넌트별 활성 계정과목 조회
* 테넌트별 활성 계정과목 조회 (하위 호환용)
*/
public static function getActiveByTenant(int $tenantId)
{
return self::where('tenant_id', $tenantId)
->where('is_active', true)
return self::getActive();
}
/**
* 전체 활성 계정과목 조회 (글로벌)
*/
public static function getActive()
{
return self::where('is_active', true)
->orderBy('sort_order')
->orderBy('code')
->get();
}
/**
* 전체 계정과목 조회 (글로벌)
*/
public static function getAll()
{
return self::orderBy('sort_order')
->orderBy('code')
->get();
}
}