This commit is contained in:
KANE LAZENI 2026-03-17 03:55:56 +00:00
parent 97946d880f
commit 3cee06089a
8 changed files with 197 additions and 91610 deletions

View File

@ -18,4 +18,15 @@ class ControleurAjaxajoutactesdec extends Controleur {
$this->genererVueAjax(array('familleacte' => $familleacte, 'prestations' => $prestations));
}
public function majvaleuracte()
{
$idPrestationactes = $this->requete->getParametreFormulaire("idPrestationactes");
$valeurActe = $this->requete->getParametreFormulaire("valeurActe");
$this->acte->majvaleuracte($idPrestationactes, $valeurActe);
$this->executerAction("index");
}
}

View File

@ -49,6 +49,9 @@ class ControleurDecompte extends Controleur {
$reclamationPrestataireObligatoire = $this->reglement->get_reclamation_prestataire_obligatoire();
$prixActeModifiable = $this->reglement->getPrixActeModifiable();
$_SESSION['prixActeModifiable'] = $prixActeModifiable;
$this->genererVue
(
array
@ -57,7 +60,8 @@ class ControleurDecompte extends Controleur {
'factures' => $factures,
'banque' => $banque,
'chemin' => $chemin,
'reclamationPrestataireObligatoire' => $reclamationPrestataireObligatoire
'reclamationPrestataireObligatoire' => $reclamationPrestataireObligatoire,
'prixActeModifiable' => $prixActeModifiable
)
);
}

View File

@ -91976,4 +91976,32 @@ function enregistrer_modif_parametres_med()
}
});
}
}
function modifier_prix_autres_actes(idPrestationactes, prixSaisi, controle) {
donnees = 'idPrestationactes='+idPrestationactes+'&prixSaisi='+prixSaisi;
if (prixSaisi <= "0"){
v_msg="Rien à faire!";
v_msgEng="Nothing to do!";
alert_ebene(v_msg, v_msgEng);
return;
}
let donnee_a_afficher = "";
$("#div_prestations").html('<div style="text-align:center; color: #4caf50 ; font-size:14px;"><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxactesmedicauxselect/majprixautresactes/",
type: 'POST',
data: donnees,
success: function(data) {
donnee_a_afficher = data;
},
complete: function() {
$("#div_prestations").html(donnee_a_afficher);
controle.focus();
}
});
}

File diff suppressed because it is too large Load Diff

View File

@ -132,10 +132,17 @@ class Actes_temp extends Modele {
$idSaisie = $_SESSION['idSaisie'];
$user = $_SESSION['login'];
//$sql = 'call sp_majvaleuracte_dec_newversion(?, ?, ?, ?)';
var_dump($idPrestationactes, $valeurActe, $idSaisie, $user);
var_dump
(
array(
"idPrestationactes" => $idPrestationactes,
"valeurActe" => $valeurActe,
"idSaisie" => $idSaisie,
"user" => $user
)
);
exit;
$this->executerRequete($sql, array($idPrestationactes, $valeurActe, $idSaisie, $user));
}

View File

@ -952,5 +952,17 @@ class Reglement extends Modele {
$ligne = $resultat->fetch(PDO::FETCH_ASSOC);
return $ligne['reclamationPrestataireObligatoire'];
}
public function getPrixActeModifiable()
{
$codeSociete = $_SESSION['codeSociete'];
$codePrestataire = $_SESSION['codePrestataire_C'];
$sql = 'SELECT fn_prix_acte_modifiable(?, ?) AS prixActeModifiable;';
$resultat = $this->executerRequete($sql, array($codeSociete, $codePrestataire))->fetch(PDO::FETCH_ASSOC);
return $resultat['prixActeModifiable'];
}
}

View File

@ -1,121 +1,134 @@
<div id="div_ajout_actes">
<input class = "form-control btn btn-info" type="button" value="<?= _("Récapituler ajouts actes") ?>" onClick="recap_ajout_acte_dec();" style='font-size:9pt;' > </td>
<?php
$prixActeModifiable = $_SESSION['prixActeModifiable'];
echo "prixActeModifiable => $prixActeModifiable";
?>
<table class="table table-responsive table-condensed" style='font-size:8pt;'>
<tbody>
<tr>
<td width="5%" > <?= _("Actes") ?> </td>
<td>
<div class="frmSearch">
<input id="searchInputActe" name="searchInputActe" AUTOCOMPLETE="OFF" style="font-size:10pt;" class="form-control" type="text" placeholder="Veuillez rechercher et sélectionner un acte ici..." autofocus
onkeyup="javascript:affichelisteactes(this.value, 'decompte');">
<INPUT class="sr-only" TYPE="text" id="codeActe" NAME="codeActe" value="">
<div id="div_selection_acte" style="width:89%">
</div>
</div>
</td>
</tr>
</tbody>
</table>
<input class = "form-control btn btn-info" type="button" value="<?= _("Récapituler ajouts actes") ?>" onClick="recap_ajout_acte_dec();" style='font-size:9pt;' > </td>
<div class="row" id="totam_donnees">
<div id="div_prestations" class="col-12">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="5%" style='text-align:center'> Suppr </th>
<th colspan="2" style="text-align:center"> <?= _("Actes ajoutés au décompte") ?> </th>
<th style="text-align:center"> <?= _("P U") ?> </th>
<th style="text-align:center"> <?= _("Qtité") ?> </th>
<th style="text-align:center"> <?= _("P T") ?> </th>
<th style="text-align:center"> <?= _("T M") ?> </th>
<th style="text-align:center"> <?= _("Mtt TM") ?> </th>
<th style="text-align:center"> <?= _("A Remb") ?> </th>
<th style="text-align:center"> <?= _("Dépass") ?> </th>
<th style="text-align:center"> <?= _("Motif") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($prestations as $prestation):
$idPrestationactes=$this->nettoyer($prestation['id']);
$idLivre=$this->nettoyer($prestation['id']);
$ententePrealable=$this->nettoyer($prestation['ententePrealable']);
$valeurActe = $this->nettoyer($prestation['valeurActe']);
$codeGarantie=$this->nettoyer($prestation['codeGarantie']);
if (est_anglophone())
{
$libelleActe = $this->nettoyer($prestation['libelleActeEng']);
}
else
{
$libelleActe = $this->nettoyer($prestation['libelleActe']);
}
$tm=$this->nettoyer($prestation['tm']);
$codeMotifDepassement = $this->nettoyer($prestation['codeMotifDepassement']);
$motif = $this->nettoyer($prestation['motif']);
$tarif = $this->nettoyer($prestation['tarif']);
?>
<?php if($ententePrealable=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td>
<button type="button" class="form-control btn btn-danger" onClick="javascript:retirer_un_acte_selection_dec(<?= $idPrestationactes ?>);">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</td>
<td align='center'> <?= $codeGarantie ?> </td>
<td align='center'> <?= $libelleActe ?> </td>
<td align='center' width="13%">
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué")?>" onClick='javascript:alert_ebene("<?= $tarif ?>, <?= $tarif ?>");'>
<?= format_N($valeurActe) ?>
</button>
</td>
<table class="table table-responsive table-condensed" style='font-size:8pt;'>
<tbody>
<tr>
<td width="5%" > <?= _("Actes") ?> </td>
<td>
<div class="frmSearch">
<input id="searchInputActe" name="searchInputActe" AUTOCOMPLETE="OFF" style="font-size:10pt;" class="form-control" type="text" placeholder="Veuillez rechercher et sélectionner un acte ici..." autofocus
onkeyup="javascript:affichelisteactes(this.value, 'decompte');">
<INPUT class="sr-only" TYPE="text" id="codeActe" NAME="codeActe" value="">
<div id="div_selection_acte" style="width:89%">
<td align='center' width="8%">
<?= $this->nettoyer($prestation['quantite']) ?>
</td>
<td align='center'> <?= format_N($this->nettoyer($prestation['fraisReel'])) ?></td>
<td align='center'> <?= $tm ?></td>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantArembourser'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['depassement'])) ?></td>
<?php if($codeMotifDepassement!=''): ?>
<td align='center'>
<button type="button" class="btn btn-info" title="<?= _("Voir le motif du dépassement...") ?>" onClick="javascript:alert_ebene('<?= $motif ?>', '<?= $motif ?>');">
<?= $codeMotifDepassement ?>
<div class="row" id="totam_donnees">
<div id="div_prestations" class="col-12">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="5%" style='text-align:center'> Suppr </th>
<th colspan="2" style="text-align:center"> <?= _("Actes ajoutés au décompte") ?> </th>
<th style="text-align:center"> <?= _("P U") ?> </th>
<th style="text-align:center"> <?= _("Qtité") ?> </th>
<th style="text-align:center"> <?= _("P T") ?> </th>
<th style="text-align:center"> <?= _("T M") ?> </th>
<th style="text-align:center"> <?= _("Mtt TM") ?> </th>
<th style="text-align:center"> <?= _("A Remb") ?> </th>
<th style="text-align:center"> <?= _("Dépass") ?> </th>
<th style="text-align:center"> <?= _("Motif") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($prestations as $prestation):
$idPrestationactes=$this->nettoyer($prestation['id']);
$idLivre=$this->nettoyer($prestation['id']);
$ententePrealable=$this->nettoyer($prestation['ententePrealable']);
$valeurActe = $this->nettoyer($prestation['valeurActe']);
$codeGarantie=$this->nettoyer($prestation['codeGarantie']);
if (est_anglophone())
{
$libelleActe = $this->nettoyer($prestation['libelleActeEng']);
}
else
{
$libelleActe = $this->nettoyer($prestation['libelleActe']);
}
$tm=$this->nettoyer($prestation['tm']);
$codeMotifDepassement = $this->nettoyer($prestation['codeMotifDepassement']);
$motif = $this->nettoyer($prestation['motif']);
$tarif = $this->nettoyer($prestation['tarif']);
?>
<?php if($ententePrealable=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td>
<button type="button" class="form-control btn btn-danger" onClick="javascript:retirer_un_acte_selection_dec(<?= $idPrestationactes ?>);">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</td>
<td align='center'> <?= $codeGarantie ?> </td>
<td align='center'> <?= $libelleActe ?> </td>
<td align='center' width="13%">
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué")?>" onClick='javascript:alert_ebene("<?= $tarif ?>, <?= $tarif ?>");'>
<?= format_N($valeurActe) ?>
</button>
<?php if($prixActeModifiable=="0") : ?>
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
<?= format_N($this->nettoyer($prestation['valeurActe'])) ?>
</button>
</td>
<?php else: ?>
<td > </td>
<?php else: ?>
<INPUT class="form-control" style='text-align:center; font-size:10pt;' TYPE="number" value="<?= $valeurActe ?>"
onChange="this.value=supprimer_espace_nombre(this.value);if(controle_numerique(this)){modifier_prix_autres_actes('<?=$idPrestationactes?>', this.value, this);}">
<?php endif; ?>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="11" height="8"></td>
</tr>
</tbody>
</table>
</div>
</td>
<td align='center' width="8%">
<?= $this->nettoyer($prestation['quantite']) ?>
</td>
<td align='center'> <?= format_N($this->nettoyer($prestation['fraisReel'])) ?></td>
<td align='center'> <?= $tm ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantArembourser'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['depassement'])) ?></td>
<?php if($codeMotifDepassement!=''): ?>
<td align='center'>
<button type="button" class="btn btn-info" title="<?= _("Voir le motif du dépassement...") ?>" onClick="javascript:alert_ebene('<?= $motif ?>', '<?= $motif ?>');">
<?= $codeMotifDepassement ?>
</button>
</td>
<?php else: ?>
<td > </td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="11" height="8"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -30,6 +30,9 @@
$libellePeriode = $this->nettoyer($reglement['periode']);
$etatdecompte = $this->nettoyer($reglement['etatdecompte']);
}
$prixActeModifiable = $_SESSION['prixActeModifiable'];
echo "prixActeModifiable => $prixActeModifiable";
?>