@extends('layouts.document') @section('title', '견적서') @push('styles') @endpush @section('content') @php // 견적번호 $quotationNo = 'AQ-' . $quotation->created_at->format('Y') . '-' . str_pad($quotation->id, 3, '0', STR_PAD_LEFT); // 회사 분석 정보 $company = $quotation->analysis_result['company_analysis'] ?? []; // 구현 계획 $plan = $quotation->quotation_result['implementation_plan'] ?? []; $estimatedMonths = $plan['estimated_months'] ?? null; // 금액 계산 $devSubtotal = (int) $quotation->total_dev_cost; $monthlySubtotal = (int) $quotation->total_monthly_fee; $devVat = (int) round($devSubtotal * 0.1); $monthlyVat = (int) round($monthlySubtotal * 0.1); $devTotal = $devSubtotal + $devVat; $monthlyTotal = $monthlySubtotal + $monthlyVat; // 한글 금액 변환 function numberToKorean(int $number): string { if ($number === 0) return '영'; $units = ['', '만', '억', '조']; $digits = ['', '일', '이', '삼', '사', '오', '육', '칠', '팔', '구']; $subUnits = ['', '십', '백', '천']; $result = ''; $unitIndex = 0; while ($number > 0) { $chunk = $number % 10000; if ($chunk > 0) { $chunkStr = ''; $subIndex = 0; $temp = $chunk; while ($temp > 0) { $digit = $temp % 10; if ($digit > 0) { $prefix = ($digit === 1 && $subIndex > 0) ? '' : $digits[$digit]; $chunkStr = $prefix . $subUnits[$subIndex] . $chunkStr; } $temp = (int)($temp / 10); $subIndex++; } $result = $chunkStr . $units[$unitIndex] . $result; } $number = (int)($number / 10000); $unitIndex++; } return $result; } $devTotalKorean = numberToKorean($devSubtotal); // 필수 → 선택 순으로 정렬된 품목 $sortedItems = $quotation->items->sortByDesc('is_required')->values(); @endphp
견적번호: {{ $quotationNo }}
유효기간: 견적일로부터 30일
견적일자: {{ $quotation->created_at->format('Y년 m월 d일') }}
| 수 신 | 공 급 자 | ||
|---|---|---|---|
| 귀사명 | {{ $quotation->title }} | 상 호 | (주)코드브릿지엑스 |
| 업 종 | {{ $company['industry'] ?? '-' }} | 대 표 | 권형석 |
| 규 모 | {{ $company['scale'] ?? '-' }} | 주 소 | 인천 남동구 남동대로 215번길 30 |
| 현재시스템 | {{ !empty($company['current_systems']) ? implode(', ', $company['current_systems']) : '-' }} | 연락처 | 032-123-4567 |
아래와 같이 견적합니다.
합계금액: 금 {{ $devTotalKorean }}원정 (₩{{ number_format($devSubtotal) }})
※ 부가가치세 별도 / 월 구독료 {{ number_format($monthlySubtotal) }}원 별도
| No | 구분 | 품 목 | 설 명 | 개발비 (원) | 월 구독료 (원) |
|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $item->is_required ? '필수' : '선택' }} | {{ $item->module_name }} | {{ Str::limit($item->reason, 80) }} | {{ number_format((int) $item->dev_cost) }} | {{ number_format((int) $item->monthly_fee) }} |
| 소 계 | {{ number_format($devSubtotal) }} | {{ number_format($monthlySubtotal) }} | |||
| 부가세 (10%) | {{ number_format($devVat) }} | {{ number_format($monthlyVat) }} | |||
| 합 계 | {{ number_format($devTotal) }} | {{ number_format($monthlyTotal) }} | |||
| 비 고 |
|---|
|
(주)코드브릿지엑스
대표이사 권 형 석