correctif pagination, disabled et maj remboursement

This commit is contained in:
2024-01-29 14:11:01 +01:00
parent e4574d7ff4
commit 5fccd17767
5 changed files with 14 additions and 4 deletions

View File

@@ -11,8 +11,10 @@ $pdoNewFiche = new Class_newFiche($pdo, $id[0], $id[1]);
switch ($_GET['action']) {
case 'update':
$mttValid = 0;
//FRAIS FORFAITAIRES
foreach ($_REQUEST['fraisF'] as $value) {
$mttValid = $mttValid + $value['montant'];
$pdoNewFiche->updateFraisF(
$value['quantité'],
intval($value['montant']),
@@ -20,8 +22,12 @@ switch ($_GET['action']) {
);
}
//FRAIS HORS FORFAIT
$nbJustif = 0;
foreach ($_REQUEST['fraisHF'] as $value) {
//SI le fraisHf ne possède pas d'id de la bdd
if ($value['id'] == NULL) {
$mttValid = $mttValid + $value['montant'];
$nbJustif = $nbJustif + 1;
$pdoNewFiche->addFraisHF(
$value['libelle'],
$value['date'],
@@ -29,9 +35,13 @@ switch ($_GET['action']) {
);
}
}
//mise a jour de la fiche remboursement
$pdoNewFiche->updateRemboursement($nbJustif, $mttValid);
break;
case 'suprFraisHF':
$pdoNewFiche->suprLigneHF($_GET['idFrais']);
$pdoNewFiche->updateRemboursement($_GET['$nbJustif'], $_GET['mttValid']);
break;
case 'refusFraisHF':
$pdoNewFiche->accceptFrais(