diff --git a/app/Http/Controllers/RdController.php b/app/Http/Controllers/RdController.php index 9ca2b89b..c19c33c0 100644 --- a/app/Http/Controllers/RdController.php +++ b/app/Http/Controllers/RdController.php @@ -54,6 +54,20 @@ public function createQuotation(Request $request): View|\Illuminate\Http\Respons return view('rd.ai-quotation.create'); } + /** + * AI 견적 문서 (인쇄용 견적서) + */ + public function documentQuotation(int $id): View + { + $quotation = $this->quotationService->getById($id); + + if (! $quotation || ! $quotation->isCompleted()) { + abort(404, '완료된 견적만 문서로 조회할 수 있습니다.'); + } + + return view('rd.ai-quotation.document', compact('quotation')); + } + /** * AI 견적 상세 */ diff --git a/resources/views/layouts/document.blade.php b/resources/views/layouts/document.blade.php new file mode 100644 index 00000000..950f6bb8 --- /dev/null +++ b/resources/views/layouts/document.blade.php @@ -0,0 +1,41 @@ + + +
+ + +견적번호: {{ $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) }} | +|||
| 비 고 | +
|---|
+
|
+
(주)코드브릿지엑스
+대표이사 권 형 석
+