522 lines
28 KiB
PHP
522 lines
28 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;
|
|
}
|
|
.footer {
|
|
padding: 24px 24px 0 24px;
|
|
text-align: center;
|
|
color: #888;
|
|
font-size: 13px;
|
|
}
|
|
.footer hr {
|
|
border: none;
|
|
border-top: 1px solid #eee;
|
|
margin: 24px 0 16px 0;
|
|
}
|
|
@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">
|
|
<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;">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="padding: 32px 24px 0 24px;">
|
|
<?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",
|
|
"reno_energie"=>"Rénovation énergétique",
|
|
"regrouping"=>"Regroupement de crédit / Rachat de crédit"
|
|
];
|
|
|
|
$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">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2" style="text-align:left; padding-bottom:12px;">
|
|
<h2 style="color:#001954; font-size:24px; margin:0;">Demande de crédit</h2>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td style="max-width: 50%"><strong>Type de crédit:</strong></td>
|
|
<td style="max-width: 50%"><?php echo $creditOptionsLabels ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Capital:</strong></td>
|
|
<td><?php echo $currentCredit->capital ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Durée:</strong></td>
|
|
<td><?php echo $currentCredit->duree ?> <?php if ($currentCredit->type_credit === 'am'): ?>ans<?php else: ?>mois<?php endif ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Coût total:</strong></td>
|
|
<td><?php echo $currentCredit->cout_total ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Mensualité:</strong></td>
|
|
<td><?php echo $currentCredit->mensualite ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Taux nominal annuel:</strong></td>
|
|
<td><?php echo $currentCredit->taux_nominal_annuel ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>TAEG:</strong></td>
|
|
<td><?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;">
|
|
<h3 style="color:#001954; font-size:20px; margin:0;">Financement véhicule</h3>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Marque + Modèle:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->marque ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Date 1ère immatriculation:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->date_immatriculation ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Nom du vendeur:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->nom_vendeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Adresse du vendeur:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->adresse_vendeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Prix d'achat du véhicule:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->prix_vehicule ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Montant de l'acompte:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->montant_accompte ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Montant de la reprise:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->montant_reprise ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Montant à emprunter:</strong></td>
|
|
<td><?php echo $currentCredit->options_credit_auto->montant_emprunt ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Durée:</strong></td>
|
|
<td><?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;">
|
|
<h3 style="color:#001954; font-size:18px; margin:0;"><?php echo $who === 'emprunteur' ? 'Emprunteur' : 'Co-emprunteur' ?></h3>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>Nom:</strong></td>
|
|
<td><?php echo $person->nom ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Prénom:</strong></td>
|
|
<td><?php echo $person->prenom ?></td>
|
|
</tr>
|
|
<?php if ($who === 'emprunteur') : ?>
|
|
<tr>
|
|
<td><strong>Téléphone:</strong></td>
|
|
<td><?php echo $person->telephone ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Email:</strong></td>
|
|
<td><?php echo $person->email ?></td>
|
|
</tr>
|
|
<!-- <tr>
|
|
<td>Agence:</td>
|
|
<td><?php echo array_key_exists($person->FK_agence, $agencies) ? $agencies[$person->FK_agence]->Nom_agence : 'Agence inconnue' ?></td>
|
|
</tr> -->
|
|
<?php endif ?>
|
|
<tr>
|
|
<td><strong>Etat civil:</strong></td>
|
|
<td><?php echo array_key_exists($person->FK_etat_civil, $civilStatus) ? $civilStatus[$person->FK_etat_civil]->nom_etat_civil : 'etat civil inconnu' ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Date de naissance:</strong></td>
|
|
<td><?php echo date('d/m/Y', strtotime($person->date_naissance)) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Lieu de naissance:</strong></td>
|
|
<td><?php echo $person->lieu_naissance ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Nationalité:</strong></td>
|
|
<td><?php echo $person->nationalité ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Numéro de carte d'identité:</strong></td>
|
|
<td><?php echo $person->num_carte_identite ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Date de validité:</strong></td>
|
|
<td><?php echo date('d/m/Y', strtotime($person->carte_identite_validite)) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Numéro de registre national:</strong></td>
|
|
<td><?php echo $person->num_registre_national ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Numéro de compte bancaire:</strong></td>
|
|
<td><?php echo $person->num_compte_bancaire ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Adresse:</strong></td>
|
|
<td><?php echo $person->adresse ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Code Postal:</strong></td>
|
|
<td><?php echo $person->code_postal ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Localité - Pays:</strong></td>
|
|
<td><?php echo $person->localite ?> - <?php echo $person->pays ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Type de logement:</strong></td>
|
|
<td><?php echo array_key_exists($person->habitation_type, $model->type_habitat) ? $model->type_habitat[$person->habitation_type] : 'Type de logement inconnu' ?></td>
|
|
</tr>
|
|
<?php if ($person->habitation_type === 'locataire') : ?>
|
|
<tr>
|
|
<td><strong>Montant du loyer :</strong></td>
|
|
<td><?php echo $person->habitation_loyer ?> €</td>
|
|
</tr>
|
|
<?php endif ?>
|
|
<tr>
|
|
<td><strong>Date d'emmenagement:</strong></td>
|
|
<td><?php echo date('d/m/Y', strtotime($person->date_emmenagement)) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Nombre d'enfant(s) à charge:</strong></td>
|
|
<td><?php echo $person->enfant_charge ?></td>
|
|
</tr>
|
|
<?php $profession = array_key_exists($person->FK_profession, $works) ? $works[$person->FK_profession]->nom_profession : 'Profession inconnue' ?>
|
|
<tr>
|
|
<td><strong>Profession:</strong></td>
|
|
<td><?php echo $profession ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Type de contrat:</strong></td>
|
|
<td>
|
|
<?php if (is_null($person->contract_type) || $person->contract_type === ''): ?>
|
|
Non spécifié
|
|
<?php elseif (array_key_exists($person->contract_type, $contractTypes)): ?>
|
|
<?php echo $contractTypes[$person->contract_type] ?>
|
|
<?php else: ?>
|
|
Type de contrat de travail inconnu
|
|
<?php endif ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Nom <?php echo $profession === 'Independant' ? 'de l\'entreprise' : 'de l\'employeur/organisme de paiement' ?>:</strong></td>
|
|
<td><?php echo $person->nom_employeur ?></td>
|
|
</tr>
|
|
<?php if ($profession === 'Independant'): ?>
|
|
<tr>
|
|
<td><strong>Numéro d'entreprise:</strong></td>
|
|
<td><?php echo $person->numero_entreprise ?></td>
|
|
</tr>
|
|
<?php endif ?>
|
|
<tr>
|
|
<td><strong>Adresse <?php echo $profession === 'Independant' ? 'de l\'entreprise' : 'de l\'employeur/organisme de paiement' ?>:</strong></td>
|
|
<td><?php echo $person->adresse_employeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Code postal <?php echo $profession === 'Independant' ? 'de l\'entreprise' : 'de l\'employeur/organisme de paiement' ?>:</strong></td>
|
|
<td><?php echo $person->code_postal_employeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Localité <?php echo $profession === 'Independant' ? 'de l\'entreprise' : 'de l\'employeur/organisme de paiement' ?>:</strong></td>
|
|
<td><?php echo $person->localite_employeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Pays <?php echo $profession === 'Independant' ? 'de l\'entreprise' : 'de l\'employeur/organisme de paiement' ?>:</strong></td>
|
|
<td><?php echo $person->pays_employeur ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Date <?php echo $profession === 'Independant' ? 'de debut d\'activite' : 'd\'engagement' ?>:</strong></td>
|
|
<td><?php echo date('d/m/Y', strtotime($person->date_engagement)) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong><?php echo $profession === 'Independant' ? 'Revenu imposable annuel' : 'Salaire net mensuel' ?>:</strong></td>
|
|
<td><?php echo $person->salaire ?> €</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Chèques repas:</strong></td>
|
|
<td>
|
|
<?php if (!is_null($person->cheque_repas) && $person->cheque_repas !== '') : ?>
|
|
<?php echo $person->cheque_repas ?> €
|
|
<?php else : ?>
|
|
non
|
|
<?php endif ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Revenus locatifs:</strong></td>
|
|
<td>
|
|
<?php if (!is_null($person->revenus_locatifs) && $person->revenus_locatifs !== '') : ?>
|
|
<?php echo $person->revenus_locatifs ?> €
|
|
<?php else : ?>
|
|
non
|
|
<?php endif ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Chômage:</strong></td>
|
|
<td>
|
|
<?php if (!is_null($person->chomage) && $person->chomage !== '') : ?>
|
|
<?php echo $person->chomage ?> €
|
|
<?php else : ?>
|
|
non
|
|
<?php endif ?>
|
|
</td>
|
|
</tr>
|
|
<?php if (!empty($person->other_credits)) : ?>
|
|
<tr>
|
|
<td><strong>Autres crédits en cours:</strong></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<?php
|
|
$otherCreditsList = [];
|
|
foreach ($person->other_credits as $credit) {
|
|
?>
|
|
<ul style="list-style-type: none; padding-left: 0; margin-bottom: 12px;">
|
|
<li>
|
|
Type de créance: <?php echo $credit->type_creance; ?>
|
|
</li>
|
|
<li>
|
|
Banque: <?php echo $credit->banque; ?>
|
|
</li>
|
|
<li>
|
|
<?php echo $credit->montant; ?> €
|
|
</li>
|
|
<li>
|
|
<?php echo $credit->duree_credit; ?> mois/ans
|
|
</li>
|
|
<li>
|
|
Mensualité: <?php echo $credit->mensualite; ?> €
|
|
</li>
|
|
<li>
|
|
Date 1ère echeance: <?php echo $credit->date_premiere_echeance; ?>
|
|
</li>
|
|
<li>
|
|
Solde restant dû: <?php echo $credit->solde_restant_du; ?> €
|
|
</li>
|
|
<li>
|
|
Cloturé: <?php echo $credit->cloture; ?> <?php echo $credit->cloture == 0 ? 'non' : 'oui'; ?>
|
|
</li>
|
|
</ul>
|
|
<?php
|
|
}
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<?php endif ?>
|
|
</tbody>
|
|
<?php endforeach ?>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="footer">
|
|
<hr>
|
|
Cet email a été envoyé automatiquement, merci de ne pas y répondre.<br>
|
|
© <?php echo date('Y'); ?> Crédit Direct. Tous droits réservés.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|