From e0dc8291faf97f1c39b286962163006739b3afb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Wed, 21 Jan 2026 10:43:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20EntertainmentService=20Python=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=ED=8F=AC=EB=A7=B7=ED=8C=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - {:.0f}% → round() 함수 사용으로 변경 - PHP 문법에 맞는 문자열 보간 적용 --- app/Services/EntertainmentService.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Services/EntertainmentService.php b/app/Services/EntertainmentService.php index 651816c..921832b 100644 --- a/app/Services/EntertainmentService.php +++ b/app/Services/EntertainmentService.php @@ -206,22 +206,23 @@ private function generateCheckPoints( // 사용률에 따른 체크포인트 if ($usageRate <= 75) { // 정상 운영 - $remainingRate = 100 - $usageRate; + $remainingRate = round(100 - $usageRate); $checkPoints[] = [ 'id' => 'et_cp_normal', 'type' => 'success', - 'message' => "{{$periodLabel}} 접대비 사용 {$usedFormatted}만원 / 한도 {$limitFormatted}만원 ({$remainingRate:.0f}%). 여유 있게 운영 중입니다.", + 'message' => "{$periodLabel} 접대비 사용 {$usedFormatted}만원 / 한도 {$limitFormatted}만원 ({$remainingRate}%). 여유 있게 운영 중입니다.", 'highlights' => [ ['text' => "{$usedFormatted}만원", 'color' => 'green'], - ['text' => "{$limitFormatted}만원 ({$remainingRate:.0f}%)", 'color' => 'green'], + ['text' => "{$limitFormatted}만원 ({$remainingRate}%)", 'color' => 'green'], ], ]; } elseif ($usageRate <= 100) { // 주의 (85% 이상) + $usageRateRounded = round($usageRate); $checkPoints[] = [ 'id' => 'et_cp_warning', 'type' => 'warning', - 'message' => "접대비 한도 {$usageRate:.0f}% 도달. 잔여 한도 {$remainingFormatted}만원입니다. 사용 계획을 점검해 주세요.", + 'message' => "접대비 한도 {$usageRateRounded}% 도달. 잔여 한도 {$remainingFormatted}만원입니다. 사용 계획을 점검해 주세요.", 'highlights' => [ ['text' => "잔여 한도 {$remainingFormatted}만원", 'color' => 'orange'], ],