bug correction
This commit is contained in:
		@@ -2,7 +2,7 @@
 | 
			
		||||
require_once(__DIR__ . '/../Class/class.newFiche.php');
 | 
			
		||||
 | 
			
		||||
$typeUser = $_SESSION['uType']; //visiteur ou comptable
 | 
			
		||||
//$typeUser = 'comptable';//$_SESSION['uType']; //visiteur ou comptable
 | 
			
		||||
// $typeUser = 'comptable';//$_SESSION['uType']; //visiteur ou comptable
 | 
			
		||||
$userId = $_SESSION['uId']; //exemple: 'b34'
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -100,7 +100,8 @@ $(document).on('click', '.btnRefuseFraisHf', function () {
 | 
			
		||||
    console.log(etatLigne)
 | 
			
		||||
    //set on refus
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        url: "../controleurs/c_actionFiche.php?action=refusFraisHF&fiche=" + fiche + "&idFrais=" + idFrais + "&state=" + etatLigne,
 | 
			
		||||
        // url: "../controleurs/c_actionFiche.php?action=refusFraisHF&fiche=" + fiche + "&idFrais=" + idFrais + "&state=" + etatLigne,
 | 
			
		||||
        url: "controleurs/c_actionFiche.php?action=refusFraisHF&fiche=" + fiche + "&idFrais=" + idFrais + "&state=" + etatLigne,
 | 
			
		||||
        method: "POST",
 | 
			
		||||
    }).done(function () {
 | 
			
		||||
        location.reload();
 | 
			
		||||
@@ -115,7 +116,8 @@ $(document).on('click', '.btnSuprFraisHf', function () {
 | 
			
		||||
    idFrais = $(this).parent().parent().attr('data-id')
 | 
			
		||||
    //SUPPRIME DE LA BD
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        url: "../controleurs/c_actionFiche.php?action=suprFraisHF&fiche=" + fiche + "&idFrais=" + idFrais,
 | 
			
		||||
        url: "controleurs/c_actionFiche.php?action=suprFraisHF&fiche=" + fiche + "&idFrais=" + idFrais,
 | 
			
		||||
        // url: "../controleurs/c_actionFiche.php?action=suprFraisHF&fiche=" + fiche + "&idFrais=" + idFrais,
 | 
			
		||||
        method: "POST",
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
@@ -167,7 +169,8 @@ $(document).on('click', '#sendFileBtn', function () {
 | 
			
		||||
    fiche = $('#idFiche').attr('data-id')
 | 
			
		||||
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        url: "../controleurs/c_actionFiche.php?action=update&fiche=" + fiche,
 | 
			
		||||
        url: "controleurs/c_actionFiche.php?action=update&fiche=" + fiche,
 | 
			
		||||
        // url: "../controleurs/c_actionFiche.php?action=update&fiche=" + fiche,
 | 
			
		||||
        method: "POST",
 | 
			
		||||
        data: data,
 | 
			
		||||
    }).done(function () {
 | 
			
		||||
@@ -181,7 +184,7 @@ $(document).on('click', '#sendFileBtn', function () {
 | 
			
		||||
function calcPrixTotalFrsF() {
 | 
			
		||||
 | 
			
		||||
    var prixTotal = 0;
 | 
			
		||||
    $('td[id^="totalFrs-"]').each(function () {
 | 
			
		||||
    $('td.mttFrsTotal').each(function () {
 | 
			
		||||
        prixTotal += parseFloat($(this).html().replace('€', ''))
 | 
			
		||||
    })
 | 
			
		||||
    $('.prixTotalFrsF').html('<strong>TOTAL :</strong> ' + prixTotal.toFixed(2) + ' €')
 | 
			
		||||
 
 | 
			
		||||
@@ -110,7 +110,7 @@
 | 
			
		||||
                Formulaire d'ajout de frais HF
 | 
			
		||||
             -->
 | 
			
		||||
            <?php
 | 
			
		||||
            if ($disabled !== 'disabled'):
 | 
			
		||||
            if ($disabled !== 'disabled' && $typeUser !== 'comptable'):
 | 
			
		||||
                ?>
 | 
			
		||||
                <tr class="newFraisForm">
 | 
			
		||||
                    <td>
 | 
			
		||||
@@ -152,4 +152,5 @@ if ($status === 'CR'):
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
<?php endif ?>
 | 
			
		||||
<script src="../include/newFiche.js"></script>
 | 
			
		||||
<script src="include/newFiche.js"></script>
 | 
			
		||||
<!-- <script src="../include/newFiche.js"></script> -->
 | 
			
		||||
		Reference in New Issue
	
	Block a user