113 lines
3.3 KiB
PHP
113 lines
3.3 KiB
PHP
<?php
|
|
$people = [
|
|
'emprunteur' => $borrower,
|
|
];
|
|
|
|
if (is_object($coBorrower)) {
|
|
$people['coemprunteur'] = $coBorrower;
|
|
}
|
|
?>
|
|
<?php foreach ($people as $who => $person) : ?>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2">
|
|
<h3><?php echo $who === 'emprunteur' ? 'Emprunteur' : 'Co-emprunteur' ?></h3>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td>Nom:</td>
|
|
<td><?php echo $person->nom ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Prenom:</td>
|
|
<td><?php echo $person->prenom ?></td>
|
|
</tr>
|
|
|
|
<?php if ($who === 'emprunteur') : ?>
|
|
<tr>
|
|
<td>Telephone:</td>
|
|
<td><?php echo $person->telephone ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Email:</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>Etat civil:</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>Date de naissance:</td>
|
|
<td><?php echo $person->date_naissance ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Nationalite:</td>
|
|
<td><?php echo $person->nationalité ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Adresse:</td>
|
|
<td><?php echo $person->adresse ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Code Postal:</td>
|
|
<td><?php echo $person->code_postal ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Localite - Pays:</td>
|
|
<td><?php echo $person->localite ?> - <?php echo $person->pays ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<h3>Revenus et charges</h3>
|
|
</tr>
|
|
|
|
<?php $profession = array_key_exists($person->FK_profession, $works) ? $works[$person->FK_profession]->nom_profession : 'Profession inconnue' ?>
|
|
<tr>
|
|
<td>Profession:</td>
|
|
<td><?php echo $profession ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Type de contrat:</td>
|
|
<td>
|
|
<?php if (is_null($person->contract_type) || $person->contract_type === ''): ?>
|
|
Non specifie
|
|
<?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><?php echo $profession === 'Independant' ? 'Revenu imposable annuel' : 'Salaire net mensuel' ?>:</td>
|
|
<td><?php echo $person->salaire ?> €</td>
|
|
</tr>
|
|
|
|
<?php if ($who === 'emprunteur'): ?>
|
|
<tr>
|
|
<td>Avec un co-emprunteur:</td>
|
|
<td><?php echo array_key_exists('coemprunteur', $people) && is_object($people['coemprunteur']) ? 'oui' : 'non' ?></td>
|
|
</tr>
|
|
<?php endif ?>
|
|
</tbody>
|
|
<?php endforeach ?>
|