Install: prix barré 360$ → 240$ (ancre de valeur) + 'financement crédité chaque mois 24 mois' dans contrat + portail signup
Champ install_regular (Service Contract) = valeur affichée barrée; install_fee reste le montant financé/dû réel. Conforme CRTC: 360 = référence marketing seulement. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7267a27cda
commit
4b2e6fb698
|
|
@ -187,6 +187,7 @@ async function handle (req, res, method, path) {
|
|||
duration_months: duration,
|
||||
monthly_rate: body.monthly_rate || 0,
|
||||
install_fee: body.install_fee || 0,
|
||||
install_regular: body.install_regular || 0,
|
||||
service_location: body.service_location || '',
|
||||
quotation: body.quotation || '',
|
||||
subscription: body.subscription || '',
|
||||
|
|
@ -939,6 +940,7 @@ function renderAcceptancePage (contract, token) {
|
|||
|
||||
const isCommercial = contract.contract_type === 'Commercial'
|
||||
const installFee = contract.install_fee || 0
|
||||
const installRegular = contract.install_regular || 0
|
||||
const installMonthly = installFee ? round2(installFee / duration) : 0
|
||||
|
||||
return `<!DOCTYPE html><html lang="fr"><head>
|
||||
|
|
@ -1006,12 +1008,12 @@ tfoot td{font-weight:700;color:#00733a;background:#f4fff6;border-top:1px solid #
|
|||
<table>
|
||||
<tbody>
|
||||
<tr><td>Forfait</td><td class="r">${contract.monthly_rate || 0} $</td></tr>
|
||||
<tr><td>Financement de l'installation (${duration} mois)</td><td class="r">+${installMonthly} $</td></tr>
|
||||
<tr><td>Rabais nouveau client (${duration} mois)</td><td class="r" style="color:#019547">−${installMonthly} $</td></tr>
|
||||
<tr><td>Installation ${installRegular > installFee ? `(<s style="color:#9ca3af">${installRegular} $</s> ${installFee} $)` : `(${installFee} $)`} — financement ${duration} mois</td><td class="r">+${installMonthly} $</td></tr>
|
||||
<tr><td>Crédit installation nouveau client (${duration} mois)</td><td class="r" style="color:#019547">−${installMonthly} $</td></tr>
|
||||
</tbody>
|
||||
<tfoot><tr><td>Total mensuel</td><td class="r">${contract.monthly_rate || 0} $</td></tr></tfoot>
|
||||
</table>
|
||||
<div style="font-size:12px;color:#6b7280;margin:-2px 0 4px">Votre <strong>installation (${installFee} $) est offerte</strong> tant que vous demeurez client : le rabais nouveau client annule le financement. En cas de départ avant ${duration} mois, seul le <strong>solde restant de l'installation</strong> demeure dû — un service déjà réalisé, sans pénalité.</div>` : ''}
|
||||
<div style="font-size:12px;color:#6b7280;margin:-2px 0 4px">Votre <strong>installation${installRegular > installFee ? ` (valeur ${installRegular} $ → ${installFee} $)` : ''}</strong> est <strong>financée et créditée chaque mois pendant ${duration} mois</strong> — 0 $ pour vous tant que vous demeurez client. En cas de départ avant ${duration} mois, seul le <strong>solde restant de l'installation</strong> (service déjà réalisé) demeure dû, sans pénalité.</div>` : ''}
|
||||
|
||||
${benefitRows ? `
|
||||
<h3>Promotions appliquées</h3>
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ function render(){
|
|||
const p=CAT[sel];
|
||||
app().innerHTML='<h1><span class=br>Récapitulatif</span></h1><div class=sub>Tout est clair — confirmez votre demande.</div>'+
|
||||
'<div class=recap><div class=l><span>'+p.name+'</span><span class=v>'+p.rate+' $/mois</span></div>'+
|
||||
'<div class=l><span>Installation</span><span class=v style=color:#019547>Incluse</span></div>'+
|
||||
'<div class=l><span>Installation</span><span class=v><s style=color:#9ca3af>360 $</s> <span style=color:#019547>offerte</span></span></div>'+
|
||||
'<div class=l><span>Client</span><span class=v>'+form.first_name+' '+form.last_name+'</span></div>'+
|
||||
'<div class=l><span>Adresse</span><span class=v>'+(form.address||'—')+'</span></div></div>'+
|
||||
'<div class=incl>✓ <b>Installation offerte</b> tant que vous demeurez client. Aucune pénalité de résiliation — détails dans votre entente.</div>'+
|
||||
'<div class=incl>✓ <b>Installation (valeur 360 $) offerte</b> — financement crédité chaque mois pendant 24 mois, 0 $ pour vous tant que vous demeurez client. Aucune pénalité de résiliation.</div>'+
|
||||
'<button class=btn id=go>Confirmer ma demande</button><button class="btn ghost" id=back>Retour</button>';
|
||||
document.getElementById('back').onclick=()=>setStep(2);
|
||||
document.getElementById('go').onclick=submit;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user