query('limit_type', 'quarterly'); $calculationType = $request->query('calculation_type', 'fixed'); $fixedAmountPerMonth = $request->query('fixed_amount_per_month') ? (int) $request->query('fixed_amount_per_month') : 200000; $ratio = $request->query('ratio') ? (float) $request->query('ratio') : 0.05; $year = $request->query('year') ? (int) $request->query('year') : null; $quarter = $request->query('quarter') ? (int) $request->query('quarter') : null; return ApiResponse::handle(function () use ($limitType, $calculationType, $fixedAmountPerMonth, $ratio, $year, $quarter) { return $this->welfareService->getSummary( $limitType, $calculationType, $fixedAmountPerMonth, $ratio, $year, $quarter ); }, __('message.fetched')); } /** * 복리후생비 상세 조회 (모달용) */ public function detail(Request $request): JsonResponse { $calculationType = $request->query('calculation_type', 'fixed'); $fixedAmountPerMonth = $request->query('fixed_amount_per_month') ? (int) $request->query('fixed_amount_per_month') : 200000; $ratio = $request->query('ratio') ? (float) $request->query('ratio') : 0.05; $year = $request->query('year') ? (int) $request->query('year') : null; $quarter = $request->query('quarter') ? (int) $request->query('quarter') : null; $startDate = $request->query('start_date'); $endDate = $request->query('end_date'); return ApiResponse::handle(function () use ($calculationType, $fixedAmountPerMonth, $ratio, $year, $quarter, $startDate, $endDate) { return $this->welfareService->getDetail( $calculationType, $fixedAmountPerMonth, $ratio, $year, $quarter, $startDate, $endDate ); }, __('message.fetched')); } }