diff --git a/app/Http/Controllers/Sales/DemoTenantController.php b/app/Http/Controllers/Sales/DemoTenantController.php index 8d6f0c65..56226b65 100644 --- a/app/Http/Controllers/Sales/DemoTenantController.php +++ b/app/Http/Controllers/Sales/DemoTenantController.php @@ -150,7 +150,7 @@ public function store(Request $request) 'promo_dev_amount' => 'nullable|integer|min:0|max:5000000', 'promo_dev_waive' => 'nullable|in:0,1', 'promo_sub_percent' => 'nullable|integer|min:0|max:50', - 'promo_free_months' => 'nullable|integer|in:0,1,2,3,6', + 'promo_free_trial' => 'nullable|in:0,1', 'promo_note' => 'nullable|string|max:200', ]); @@ -173,7 +173,7 @@ public function store(Request $request) 'dev_discount_amount' => (int) $request->input('promo_dev_amount', 0), 'dev_waive' => $request->input('promo_dev_waive') === '1', 'sub_discount_percent' => (int) $request->input('promo_sub_percent', 0), - 'free_months' => (int) $request->input('promo_free_months', 0), + 'free_trial' => $request->input('promo_free_trial') === '1', 'note' => $request->input('promo_note', ''), 'applied_at' => now()->toDateTimeString(), 'applied_by_user_id' => auth()->id(), diff --git a/app/Http/Controllers/Sales/SalesContractController.php b/app/Http/Controllers/Sales/SalesContractController.php index 92115ba0..5892ee99 100644 --- a/app/Http/Controllers/Sales/SalesContractController.php +++ b/app/Http/Controllers/Sales/SalesContractController.php @@ -35,7 +35,7 @@ public function saveProducts(Request $request): JsonResponse 'promotion.dev_discount_amount' => 'nullable|numeric|min:0', 'promotion.dev_waive' => 'nullable|boolean', 'promotion.sub_discount_percent' => 'nullable|numeric|min:0|max:50', - 'promotion.free_months' => 'nullable|integer|in:0,1,2,3,6', + 'promotion.free_trial' => 'nullable|boolean', 'promotion.note' => 'nullable|string|max:200', ]); diff --git a/resources/views/sales/demo-tenants/partials/create-modal.blade.php b/resources/views/sales/demo-tenants/partials/create-modal.blade.php index e7bab12d..ebacdcd1 100644 --- a/resources/views/sales/demo-tenants/partials/create-modal.blade.php +++ b/resources/views/sales/demo-tenants/partials/create-modal.blade.php @@ -9,7 +9,7 @@ promoDevAmount: 0, promoDevWaive: false, promoSubPercent: 0, - promoFreeMonths: 0, + promoFreeTrial: false, promoNote: '', // 개발비 할인 최대값 @@ -35,7 +35,7 @@ parts.push('개발비 ' + Number(this.promoDevAmount).toLocaleString() + '원 할인'); } if (this.promoSubPercent > 0) parts.push('구독료 ' + this.promoSubPercent + '% 할인'); - if (this.promoFreeMonths > 0) parts.push('무료 ' + this.promoFreeMonths + '개월'); + if (this.promoFreeTrial) parts.push('무료 체험 1주일'); return parts.length ? parts.join(' / ') : '없음'; }, @@ -55,7 +55,7 @@ // 프로모션 적용 여부 get hasPromo() { - return this.promoDevWaive || this.promoDevPercent > 0 || this.promoDevAmount > 0 || this.promoSubPercent > 0 || this.promoFreeMonths > 0; + return this.promoDevWaive || this.promoDevPercent > 0 || this.promoDevAmount > 0 || this.promoSubPercent > 0 || this.promoFreeTrial; } }">
@@ -217,17 +217,20 @@ class="flex-1 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-e - +- 서비스 시작 후 처음 몇 개월간 구독료를 면제해 줄 수 있습니다. + 서비스 시작 후 첫 1주일(7일) 구독료를 면제해 줄 수 있습니다.
예: 3개월 무료 체험 설정 시
-→ 1~3월: 구독료 0원 / 4~12월: 구독료 정상 부과
-→ 1년차 총 비용 = 개발비 + 9개월 구독료
-선택 가능: 없음, 1개월, 2개월, 3개월, 6개월
+예: 무료 체험 적용 시
+→ 첫 7일: 구독료 0원 / 8일째부터: 구독료 정상 부과
+→ 1년차 총 비용 = 개발비 + 약 11.75개월 구독료
+선택 가능: 없음, 1주일(7일)
- 첫 개월 구독료가 면제됩니다 +
+ 첫 7일간 구독료가 면제됩니다
- 개발비 + 개월 구독료 (VAT 별도) - - | 개월 무료 적용 + 개발비 + 12개월 구독료 (VAT 별도) + + | 1주일 무료 체험 적용
{{-- 프로모션 미적용 대비 절감액 --}} @@ -1289,7 +1294,7 @@ function buildRequiredSelected(catId) { promoRegistrationAmount: 0, promoWaiveRegistration: false, promoSubscriptionPercent: 0, - promoFreeMonths: 0, + promoFreeTrial: false, promoNote: '', // --- 카테고리 선택 (상호 배타) --- @@ -1418,7 +1423,7 @@ function buildRequiredSelected(catId) { return this.promoWaiveRegistration || this.promoRegistrationAmount > 0 || this.promoSubscriptionPercent > 0 - || this.promoFreeMonths > 0; + || this.promoFreeTrial; }, promoDevDiscountMax() { @@ -1481,8 +1486,12 @@ function buildRequiredSelected(catId) { }, annualSubscriptionFee() { - const paidMonths = 12 - this.promoFreeMonths; - return this.finalSubscriptionFee() * paidMonths; + const annual = this.finalSubscriptionFee() * 12; + if (this.promoFreeTrial) { + // 1주일(7일) 무료: 월 구독료의 7/30 차감 + return Math.round(annual - this.finalSubscriptionFee() * 7 / 30); + } + return annual; }, totalFirstYearCost() { @@ -1521,7 +1530,7 @@ function buildRequiredSelected(catId) { this.promoRegistrationAmount = 0; this.promoWaiveRegistration = false; this.promoSubscriptionPercent = 0; - this.promoFreeMonths = 0; + this.promoFreeTrial = false; this.promoNote = ''; },