diff --git a/app/Http/Controllers/RdController.php b/app/Http/Controllers/RdController.php index c19c33c0..be9c34a0 100644 --- a/app/Http/Controllers/RdController.php +++ b/app/Http/Controllers/RdController.php @@ -57,7 +57,7 @@ public function createQuotation(Request $request): View|\Illuminate\Http\Respons /** * AI 견적 문서 (인쇄용 견적서) */ - public function documentQuotation(int $id): View + public function documentQuotation(Request $request, int $id): View { $quotation = $this->quotationService->getById($id); @@ -65,7 +65,13 @@ public function documentQuotation(int $id): View abort(404, '완료된 견적만 문서로 조회할 수 있습니다.'); } - return view('rd.ai-quotation.document', compact('quotation')); + $template = $request->query('template', 'classic'); + $allowed = ['classic', 'modern', 'blue', 'dark', 'colorful']; + if (! in_array($template, $allowed)) { + $template = 'classic'; + } + + return view('rd.ai-quotation.document', compact('quotation', 'template')); } /** diff --git a/resources/views/rd/ai-quotation/document-templates/blue.blade.php b/resources/views/rd/ai-quotation/document-templates/blue.blade.php new file mode 100644 index 00000000..49bbf858 --- /dev/null +++ b/resources/views/rd/ai-quotation/document-templates/blue.blade.php @@ -0,0 +1,156 @@ +{{-- 블루 프로페셔널 견적서 템플릿 --}} + + +
유효기간: 견적일로부터 30일
+| 수 신 | +공 급 자 | +||
|---|---|---|---|
| 귀사명 | {{ $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) }} | +|||
| 비 고 |
|---|
+
|
+
(주)코드브릿지엑스
+대표이사 이 의 찬
+견적번호: {{ $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) }} | +|||
| 비 고 |
|---|
+
|
+
(주)코드브릿지엑스
+대표이사 이 의 찬
+QUOTATION
+{{ $quotationNo }}
+{{ $quotation->created_at->format('Y. m. d') }}
+수 신
+{{ $quotation->title }}
+{{ $company['industry'] ?? '-' }} · {{ $company['scale'] ?? '-' }}
+ @if(!empty($company['current_systems'])) +현재: {{ implode(', ', $company['current_systems']) }}
+ @endif +공 급 자
+(주)코드브릿지엑스
+대표 이의찬
+인천 남동구 남동대로 215번길 30 · 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) }} | +|||
비 고
+(주)코드브릿지엑스
+대표이사 이 의 찬
+PREMIUM QUOTATION
+No. {{ $quotationNo }}
+{{ $quotation->created_at->format('Y. m. d') }}
+유효기간: 견적일로부터 30일
+| 수 신 | +공 급 자 | +||
|---|---|---|---|
| 귀사명 | {{ $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) }} | +|||
비 고
+(주)코드브릿지엑스
+대표이사 이 의 찬
+QUOTATION
+No. {{ $quotationNo }}
+{{ $quotation->created_at->format('Y. m. d') }}
+수신
+{{ $quotation->title }}
+{{ $company['industry'] ?? '-' }} · {{ $company['scale'] ?? '-' }}
+ @if(!empty($company['current_systems'])) +현재: {{ implode(', ', $company['current_systems']) }}
+ @endif +공급자
+(주)코드브릿지엑스
+대표 이의찬
+인천 남동구 남동대로 215번길 30 · 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) }} | +|||
| VAT (10%) | +{{ number_format($devVat) }} | +{{ number_format($monthlyVat) }} | +|||
| 합계 | +{{ number_format($devTotal) }} | +{{ number_format($monthlyTotal) }} | +|||
비고
+(주)코드브릿지엑스
+대표이사 이의찬
+견적번호: {{ $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) }} | -|||
| 비 고 | -
|---|
-
|
-
(주)코드브릿지엑스
-대표이사 이 의 찬
-