valider fiche pour un comptable

This commit is contained in:
pierre renaudot
2024-02-01 09:22:43 +01:00
parent 1acc68b01b
commit 1a7e420d20
6 changed files with 93 additions and 15 deletions

View File

@@ -174,10 +174,48 @@ $(document).on('click', '#sendFileBtn', function () {
method: "POST",
data: data,
}).done(function () {
//location.reload();
location.reload();
})
})
/**
* Partie Validation fiche par le comptable
*/
$(document).on('click', '#validSheetBtn', function () {
//FRAIS FORFAITAIRES
var listeFraisF = []
$('tr.fraisForfaitaire').each(function () {
quantite = parseInt($(this).find('.frsFrt').val())
montant = parseFloat($(this).find('.mttFrsTotal').html())
id = $(this).attr('data-id')
tabData = {
'quantité': quantite,
'montant': montant,
'id': id
}
listeFraisF.push(tabData);
})
nbFraisHf = $('tr.fraisHF').length
data = {
fraisF: listeFraisF,
nbJustif: nbFraisHf
}
fiche = $('#idFiche').attr('data-id')
$.ajax({
url: "controleurs/c_actionFiche.php?action=valid&fiche=" + fiche,
// url: "../controleurs/c_actionFiche.php?action=update&fiche=" + fiche,
method: "POST",
data: data,
}).done(function () {
location.reload();
})
});
/**
* Calcul prix total frais forfaitaires
*/