mise à jour de la bdd pour les fiches de frais et suppression des hors forfait

This commit is contained in:
Pierr0
2024-01-05 22:36:58 +01:00
parent f08b18fab5
commit df7599ab9b
7 changed files with 290 additions and 55 deletions

View File

@@ -4,6 +4,9 @@
<p>Mois de
<?= $dateHeader ?>
</p>
<p class="color-grey" id='idFiche' data-id="<?= $userId . '-' . $date ?>">
ID: <?= $userId . '-' . $date ?>
</p>
</center>
<br>
<!--
@@ -24,18 +27,18 @@
<?php
foreach ($listeFraisForfaitaire as $key => $value):
?>
<tr>
<tr data-id="<?= $value['fId'] ?>" class="fraisForfaitaire">
<th scope="row">
<?= $value['fLibelle'] ?>
</th>
<td>
<input type="text" name="fraisForfait-<?= $value['fId'] ?>" class="form-control frsFrt"
<input type="text" name="fraisForfait" class="form-control frsFrt"
id="<?= $key ?>" value="<?= $value['lfQuantite'] ?>" <?= $disabled ?>>
</td>
<td id="mttFrs-<?= $key ?>" data-price="<?= $value['fMontant'] ?>">
<?= $value['fMontant'] ?> €
</td>
<td id="totalFrs-<?= $key ?>">
<td class="mttFrsTotal" id="totalFrs-<?= $key ?>">
<?= $value['fTotal'] ?>€
</td>
</tr>
@@ -70,7 +73,8 @@
<?php
foreach ($listeFraisHf as $key => $value):
?>
<tr id="fraisHf-<?= $key ?>" class="fraisHF <?= $value['lhRefus'] == 1 ? 'table-danger' : '' ?>">
<tr id="fraisHf-<?= $key ?>" data-id="<?= $value['lhId'] ?>" class="fraisHF <?= $value['lhRefus'] == 1 ? 'table-danger' : '' ?>"
data-id="<?= $value['lhId'] ?>">
<th scope="row" id="dateFrsHF">
<?= $value['lhDate'] ?>
</th>
@@ -86,11 +90,13 @@
<td>
<?php
if ($typeUser === 'comptable') { ?>
<button type="button" class="btn btn-outline-primary btnRefuseFraisHf" id="frsSup-<?= $key ?>" <?= $disabled ?>>
<button type="button" class="btn btn-outline-primary btnRefuseFraisHf" id="frsSup-<?= $key ?>"
<?= $disabled ?>>
Refuser
</button>
<?php } elseif ($typeUser === 'visiteur') { ?>
<button type="button" class="btn btn-outline-primary btnSuprFraisHf" id="frsSup-<?= $key ?>" <?= $disabled ?>>
<button type="button" class="btn btn-outline-primary btnSuprFraisHf" id="frsSup-<?= $key ?>"
<?= $disabled ?>>
Supprimer
</button>
<?php } ?>
@@ -104,20 +110,20 @@
-->
<?php
if ($disabled !== 'disabled'):
?>
<tr class="newFraisForm">
<td>
<!-- Date form -->
<input name="dateHf" class="form-control" id="dateHf" type="date" min="<?= $dateFormHFMin ?>"
max="<?= $dateFormHFMax ?>">
</td>
<td><input type="text" name="libelleHf" id="libelleHf" class="form-control"
placeholder="saisir un titre"></td>
<td><input type="text" name="mttHf" id="mttHf" class="form-control" placeholder="Saisir un Montant">
</td>
<td><input type="file" class="form-control"></td>
<td><button type="button" class="btn btn-outline-primary validFraisHF">Valider</button></td>
</tr>
?>
<tr class="newFraisForm">
<td>
<!-- Date form -->
<input name="dateHf" class="form-control" id="dateHf" type="date" min="<?= $dateFormHFMin ?>"
max="<?= $dateFormHFMax ?>">
</td>
<td><input type="text" name="libelleHf" id="libelleHf" class="form-control"
placeholder="saisir un titre"></td>
<td><input type="text" name="mttHf" id="mttHf" class="form-control" placeholder="Saisir un Montant">
</td>
<td><input type="file" class="form-control"></td>
<td><button type="button" class="btn btn-outline-primary validFraisHF">Valider</button></td>
</tr>
<?php endif ?>
<tr>
<td colspan="2" class="border-0"></td>
@@ -148,7 +154,7 @@
if ($status === 'CR'):
?>
<div class="col-3 d-flex mx-auto my-5 justify-content-center">
<button type="button" class="btn btn-outline-primary btn-lg" data-uType="<?= $typeUser ?>">Envoyer la Fiche
<button type="button" class="btn btn-outline-primary btn-lg" id="sendFileBtn" data-uType="<?= $typeUser ?>">Envoyer la Fiche
</button>
</div>
<?php endif ?>