a
This commit is contained in:
parent
82bc141f7d
commit
22a2fb41b0
|
|
@ -124,4 +124,63 @@ class ControleurAjaxexporterpaiementdecompte extends Controleurrequete {
|
||||||
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function payesdatecpt()
|
||||||
|
{
|
||||||
|
$debut = $this->requete->getParametreDate("debut");
|
||||||
|
$fin = $this->requete->getParametreDate("fin");
|
||||||
|
|
||||||
|
$reglements = $this->reglement->getpaiementdecomptescptexport($debut, $fin);
|
||||||
|
|
||||||
|
// Excel
|
||||||
|
$headerXLS = array
|
||||||
|
(
|
||||||
|
_('Prestataire'),
|
||||||
|
_('Exercice'),
|
||||||
|
_('Mois'),
|
||||||
|
_('Mod P'),
|
||||||
|
_('Réf P'),
|
||||||
|
_('No Règlement'),
|
||||||
|
_('Dde Règlt'),
|
||||||
|
_('User'),
|
||||||
|
_('Montant'),
|
||||||
|
_('dateComptable')
|
||||||
|
);
|
||||||
|
|
||||||
|
$dataXLS = array();
|
||||||
|
|
||||||
|
foreach ($reglements as $reglement)
|
||||||
|
{
|
||||||
|
$dataXLS[]=$reglement;
|
||||||
|
}
|
||||||
|
|
||||||
|
$classeur = new Spreadsheet();
|
||||||
|
$classeur->getProperties()->setCreator("INTER-SANTE");
|
||||||
|
$classeur->setActiveSheetIndex(0);
|
||||||
|
$feuille=$classeur->getActiveSheet();
|
||||||
|
$feuille->setTitle(_('DECOMTES DATE CPT'));
|
||||||
|
|
||||||
|
$feuille->setCellValue('A1', convertirc(_("DECOMTES PAYES SELON DATE COMPTABLE")));
|
||||||
|
$feuille->mergeCells('A1:E1');
|
||||||
|
|
||||||
|
$feuille->setCellValue('A2', convertirc(_("PERIODE COMPTABLE")." : " . dateLang($debut) . " <==> " . dateLang($fin)));
|
||||||
|
$feuille->mergeCells('A2:E2');
|
||||||
|
|
||||||
|
$feuille->fromArray($headerXLS, NULL, 'A4', true);
|
||||||
|
$feuille->fromArray($dataXLS, NULL, 'A5', true);
|
||||||
|
|
||||||
|
//Forcer le téléchargement vers le navigateur;
|
||||||
|
$fichier = 'Temp/DECPTE_PAYES_CPT'."_".uniqid().".xlsx";
|
||||||
|
|
||||||
|
$writer = new Xlsx($classeur);
|
||||||
|
$writer->save($fichier);
|
||||||
|
|
||||||
|
$t_html =' <div id ="div_export_a" class="alert alert-info"> ';
|
||||||
|
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > '._("TELECHARGER").' </a> ';
|
||||||
|
$t_html .=' </div ';
|
||||||
|
echo $t_html;
|
||||||
|
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -44596,3 +44596,27 @@ function imprimer_avenant(idAvenant, lienTexteAvenant)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function exporter_paiement_decompte_cpt()
|
||||||
|
{
|
||||||
|
alert("exporter_paiement_decompte_cpt");
|
||||||
|
return;
|
||||||
|
|
||||||
|
debut=$("#debut").val();
|
||||||
|
fin=$("#fin").val();
|
||||||
|
|
||||||
|
donnees = 'debut='+debut+'&fin='+fin;
|
||||||
|
|
||||||
|
$("#div_detail_paiement_decompte").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/> <span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: $("#racineWeb").val()+"Ajaxexporterpaiementdecompte/payesdatecpt/",
|
||||||
|
type : 'post',
|
||||||
|
data: donnees,
|
||||||
|
success: function(data) {
|
||||||
|
$("#div_detail_paiement_decompte").html(data);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -909,5 +909,15 @@ class Reglement extends Modele {
|
||||||
|
|
||||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getpaiementdecomptescptexport($debut, $fin)
|
||||||
|
{
|
||||||
|
$sql = 'call sp_r_get_paiementdecomptes_export(?, ?)';
|
||||||
|
|
||||||
|
$resultat = $this->executerRequete($sql, array($debut, $fin));
|
||||||
|
|
||||||
|
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -16,6 +16,9 @@
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:exporter_paiement_decompte();"><?= _("Décomptes payés...") ?></button> </td>
|
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:exporter_paiement_decompte();"><?= _("Décomptes payés...") ?></button> </td>
|
||||||
|
|
||||||
|
<td> </td>
|
||||||
|
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:exporter_paiement_decompte_cpt();"><?= _("Payés selon date comptable...") ?></button> </td>
|
||||||
|
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:exporter_decompte_non_payes();"><?= _("Décomptes impayés...") ?></button> </td>
|
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:exporter_decompte_non_payes();"><?= _("Décomptes impayés...") ?></button> </td>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ controlerPlafondBeneficiaire : <?= $_SESSION['controlerPlafondBeneficiaire'] ?>
|
||||||
<script src="Js/datepicker-fr.js"></script>
|
<script src="Js/datepicker-fr.js"></script>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<script src="Js/fonctions.js?ver=2026.03.04.01"></script>
|
<script src="Js/fonctions.js?ver=2026.03.04.02"></script>
|
||||||
|
|
||||||
<script src="<?= $_SESSION['dossierSociete'].'/Js/societe.js' ?>" > </script>
|
<script src="<?= $_SESSION['dossierSociete'].'/Js/societe.js' ?>" > </script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user