340 lines
20 KiB
PHP
340 lines
20 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Demande de crédit</title>
|
|
<!--[if mso]>
|
|
<xml>
|
|
<o:OfficeDocumentSettings>
|
|
<o:AllowPNG/>
|
|
<o:PixelsPerInch>96</o:PixelsPerInch>
|
|
</o:OfficeDocumentSettings>
|
|
</xml>
|
|
<![endif]-->
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #001954;
|
|
font-family: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;
|
|
-webkit-text-size-adjust: 100%;
|
|
-ms-text-size-adjust: 100%;
|
|
}
|
|
.container {
|
|
max-width: 600px;
|
|
margin: 40px auto;
|
|
background: #fff;
|
|
border-radius: 12px;
|
|
box-shadow: 0 4px 16px 0 rgba(0,0,0,0.08);
|
|
padding: 0 0 24px 0;
|
|
}
|
|
.content-table {
|
|
width: 100%;
|
|
border-collapse: separate;
|
|
border-spacing: 10px;
|
|
color: #333;
|
|
}
|
|
.content-table td {
|
|
padding: 8px 0;
|
|
}
|
|
.header {
|
|
text-align: center;
|
|
background: #fff;
|
|
border-radius: 12px 12px 0 0;
|
|
}
|
|
.header img {
|
|
display: block;
|
|
margin: 0 auto;
|
|
width: 600px;
|
|
height: 120px;
|
|
border-radius: 12px 12px 0 0;
|
|
}
|
|
.section-title {
|
|
color: #001954;
|
|
font-size: 24px;
|
|
margin: 0;
|
|
padding-bottom: 12px;
|
|
}
|
|
.subsection-title {
|
|
color: #001954;
|
|
font-size: 20px;
|
|
margin: 0;
|
|
padding-top: 24px;
|
|
padding-bottom: 12px;
|
|
}
|
|
@media only screen and (max-width: 600px) {
|
|
.container {
|
|
width: 100% !important;
|
|
margin: 0 !important;
|
|
border-radius: 0 !important;
|
|
}
|
|
.header img {
|
|
width: 100% !important;
|
|
height: auto !important;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!--[if mso]>
|
|
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
|
|
<v:fill type="solid" color="#001954"/>
|
|
</v:background>
|
|
<![endif]-->
|
|
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px; margin: 40px auto;">
|
|
<tr>
|
|
<td>
|
|
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" class="container">
|
|
<tr>
|
|
<td class="header">
|
|
<!--[if mso]>
|
|
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" style="height:120px;v-text-anchor:middle;width:600px;" arcsize="2%" stroke="f" fillcolor="#ffffff">
|
|
<w:anchorlock/>
|
|
<center>
|
|
<![endif]-->
|
|
<img src="<?php echo $model->main->asset('img/cred_banniere.jpg'); ?>" alt="Crédit Direct" width="600" height="120" style="display:block; margin:0 auto;">
|
|
<!--[if mso]>
|
|
</center>
|
|
</v:roundrect>
|
|
<![endif]-->
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 32px 24px 0 24px;">
|
|
<p style="margin: 0 0 24px 0; color: #333; line-height: 1.5;">
|
|
Cher(e) <?php echo $borrower->prenom ?>,<br><br>
|
|
Nous avons bien reçu votre demande de crédit et nous vous en remercions. Votre dossier est actuellement en cours d'analyse par nos services.<br><br>
|
|
Voici un récapitulatif des informations que vous nous avez fournies :
|
|
</p>
|
|
<?php
|
|
$map_credit_type = [
|
|
"pat"=>"Prêt personnel / Tous motifs / Achats divers",
|
|
"frais_notaire"=>"Financement frais de notaire",
|
|
"but_immo"=>"Credit travaux / Renovation / Energie",
|
|
"fin_neuve"=>"Financement vehicule NEUF",
|
|
"fin_occ_m3a"=>"Financement vehicule d'occasion MOINS de 3 ans",
|
|
"fin_occ_p3a"=>"Financement vehicule d'occasion PLUS de 3 ans",
|
|
"am"=>"Credit hypothecaire classique (achat maison, construction, refinancement, regroupement, travaux, achat à l'etranger)"
|
|
];
|
|
|
|
$map_habitation_type = [
|
|
'tenant' => 'Locataire',
|
|
'owner' => 'Proprietaire',
|
|
'withoutrentalcharge' => 'Sans charge locative'
|
|
];
|
|
|
|
$map_credit_hypothecaire_en_cours = [
|
|
'withmortgageloan' => 'Avec credit hypothecaire',
|
|
'mortgagechargeiber' => 'Libre de charge hypothecaire'
|
|
];
|
|
|
|
$map_sans_charge_locative = [
|
|
'other' => 'Autre',
|
|
'withparents' => 'Chez les parents',
|
|
'cohabitant' => 'Cohabitant',
|
|
'family' => 'Famille'
|
|
]
|
|
?>
|
|
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" class="content-table" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2" style="text-align:left; padding-bottom:12px; mso-line-height-rule: exactly;">
|
|
<h2 style="color:#001954; font-size:24px; margin:0; mso-line-height-rule: exactly;">Demande de crédit</h2>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td style="max-width: 50%; padding: 8px 0; mso-line-height-rule: exactly;"><strong>Type de crédit:</strong></td>
|
|
<td style="max-width: 50%; padding: 8px 0; mso-line-height-rule: exactly;"><?php echo array_key_exists($currentCredit->type_credit, $map_credit_type) ? $map_credit_type[$currentCredit->type_credit] : 'Type de crédit inconnu' ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Capital:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->capital ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Durée:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->duree ?> <?php if ($currentCredit->type_credit === 'am'): ?>ans<?php else: ?>mois<?php endif ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Coût total:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->cout_total ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Mensualité:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->mensualite ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Taux nominal annuel:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->taux_nominal_annuel ?></td>
|
|
</tr>
|
|
</tbody>
|
|
<?php if (in_array($currentCredit->type_credit, $model->creditAutos)) : ?>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2" style="text-align:left; padding-top:24px; padding-bottom:12px; mso-line-height-rule: exactly;">
|
|
<h3 style="color:#001954; font-size:20px; margin:0; mso-line-height-rule: exactly;">Financement véhicule</h3>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Marque + Modèle:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->marque ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Date 1ère immatriculation:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->date_immatriculation ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Nom du vendeur:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->nom_vendeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Adresse du vendeur:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->adresse_vendeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Prix d'achat du véhicule:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->prix_vehicule ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Montant de l'acompte:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->montant_accompte ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Montant de la reprise:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->montant_reprise ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Montant à emprunter:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->montant_emprunt ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Durée:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $currentCredit->options_credit_auto->duree ?> mois</td>
|
|
</tr>
|
|
</tbody>
|
|
<?php endif ?>
|
|
<?php if (in_array($currentCredit->type_credit, $model->one_step_credit_types)) : ?>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2" style="text-align:left; padding-top:24px; padding-bottom:12px;">
|
|
<h3 style="color:#001954; font-size:20px; margin:0;">Crédit hypothécaire</h3>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Type de crédit:</strong></td>
|
|
<td><?php echo array_key_exists($currentCredit->options_credit_hypothecaire->type_credit, $mapHouseCreditTypes) ? $mapHouseCreditTypes[$currentCredit->options_credit_hypothecaire->type_credit] : 'Type de crédit inconnu' ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Prix d'achat:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->prix_achat ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Prix de la construction TVAC:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->prix_construction_tvac ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Valeur du bâtiment:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->valeur_batiment ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Fonds propres:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->fonds_propre ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Compromis de vente signé:</strong></td>
|
|
<td>
|
|
<?php
|
|
if ($currentCredit->options_credit_hypothecaire->compromis_signe == '0') {
|
|
echo 'non';
|
|
} elseif ($currentCredit->options_credit_hypothecaire->compromis_signe == '1') {
|
|
echo 'oui';
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Montant du revenu cadastral:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->montant_revenu_cadastral ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Montant à emprunter:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->montant_a_emprunter ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Durée:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_hypothecaire->duree ?> ans</td>
|
|
</tr>
|
|
</tbody>
|
|
<?php endif ?>
|
|
<?php
|
|
$people = [
|
|
'emprunteur' => $borrower,
|
|
];
|
|
if (is_object($coBorrower)) {
|
|
$people['coemprunteur'] = $coBorrower;
|
|
}
|
|
?>
|
|
<?php foreach ($people as $who => $person) : ?>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2" style="text-align:left; padding-top:16px; padding-bottom:8px; mso-line-height-rule: exactly;">
|
|
<h3 style="color:#001954; font-size:18px; margin:0; mso-line-height-rule: exactly;"><?php echo $who === 'emprunteur' ? 'Emprunteur' : 'Co-emprunteur' ?></h3>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Nom:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->nom ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Prénom:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->prenom ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Type de logement:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo array_key_exists($person->type_logement, $map_habitation_type) ? $map_habitation_type[$person->type_logement] : 'Type de logement inconnu' ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Adresse:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->adresse ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Code postal:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->code_postal ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Ville:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->ville ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Pays:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->pays ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Téléphone:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->telephone ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><strong>Email:</strong></td>
|
|
<td style="padding: 8px 0; mso-line-height-rule: exactly;"><?php echo $person->email ?></td>
|
|
</tr>
|
|
</tbody>
|
|
<?php endforeach ?>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|