diff --git a/apps/ops/src/components/shared/ProjectWizard.vue b/apps/ops/src/components/shared/ProjectWizard.vue index 0d2d26a..ed9ebbd 100644 --- a/apps/ops/src/components/shared/ProjectWizard.vue +++ b/apps/ops/src/components/shared/ProjectWizard.vue @@ -488,6 +488,42 @@ {{ referralError }} + +
+ +
+
Installation
+
Financée sur {{ maxContractMonths }} mois, créditée chaque mois — 0 $ net pour le client tant qu'abonné
+
+
+ +
+
+
+
+ + + +
+
+ +
+
+
+ {{ Number(installRegular).toFixed(2) }}$ + {{ Number(installFee).toFixed(2) }}$ +
+
+{{ (Number(installFee) / (maxContractMonths || 24)).toFixed(2) }}$/mois · crédité → 0$
+
+
+ @@ -1697,6 +1733,7 @@ const { publish } = useWizardPublish({ acceptanceSentVia, publishedJobCount, sendTo, sendChannel, publishedContractName, + installFee, installRegular, cancel () { cancel() }, }, }) @@ -1900,6 +1937,17 @@ const referralApplied = ref(false) const referralChecking = ref(false) const referralError = ref('') +// Installation financée (CRTC-compliant) — alimente install_fee / install_regular du contrat. +const installRegular = ref(0) // prix de référence barré (marketing) +const installFee = ref(0) // montant réellement financé/dû (créance) +const INSTALL_PRESETS = [ + { key: 'standard', label: 'Standard', regular: 360, fee: 240 }, + { key: 'simple', label: 'Simple', regular: 180, fee: 120 }, + { key: 'none', label: 'Aucune', regular: 0, fee: 0 }, +] +function setInstallPreset (p) { installRegular.value = p.regular; installFee.value = p.fee } +function isInstallPreset (p) { return Number(installFee.value) === p.fee && Number(installRegular.value) === p.regular } + async function applyReferralCode () { const code = referralCode.value.trim().toUpperCase() if (!code) return diff --git a/apps/ops/src/composables/useWizardPublish.js b/apps/ops/src/composables/useWizardPublish.js index 3699b72..f0ac2b3 100644 --- a/apps/ops/src/composables/useWizardPublish.js +++ b/apps/ops/src/composables/useWizardPublish.js @@ -13,6 +13,7 @@ export function useWizardPublish ({ props, emit, state }) { acceptanceSentVia, publishedJobCount, sendTo, sendChannel, publishedContractName, + installFee, installRegular, } = state async function resolveAddress () { @@ -265,6 +266,8 @@ export function useWizardPublish ({ props, emit, state }) { duration_months: durationMonths, monthly_rate: monthlyRate, monthly_regular: monthlyRegular > monthlyRate ? monthlyRegular : 0, + install_fee: installFee?.value || 0, + install_regular: (installRegular?.value || 0) > (installFee?.value || 0) ? installRegular.value : 0, service_location: serviceLocation, quotation: orderDocName, start_date: today,