fix:부가세 예정 세액 계산 실패 시 방어 처리 (try-catch)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -268,8 +268,13 @@ public function index(Request $request): JsonResponse
|
||||
|
||||
// 확정(C) 기간이면 대응하는 예정(P)의 netVat를 계산
|
||||
if ($period && str_ends_with($period, 'C')) {
|
||||
$prelimPeriod = substr($period, 0, -1) . 'P';
|
||||
$stats['preliminaryVat'] = $this->calculatePeriodNetVat($tenantId, $prelimPeriod);
|
||||
try {
|
||||
$prelimPeriod = substr($period, 0, -1) . 'P';
|
||||
$stats['preliminaryVat'] = $this->calculatePeriodNetVat($tenantId, $prelimPeriod);
|
||||
} catch (\Throwable $e) {
|
||||
\Log::warning('예정 세액 계산 실패: ' . $e->getMessage());
|
||||
$stats['preliminaryVat'] = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 사용 중인 기간 목록
|
||||
|
||||
Reference in New Issue
Block a user