gestion complète taux réduction

FossilOrigin-Name: 65f4c90bd70dda1733695d52ff242e58fe10220efee4077c813f49961d2686bc
This commit is contained in:
engel 2022-02-18 11:51:13 +00:00
parent 38a3556dbd
commit 3acbd2038e
10 changed files with 61 additions and 28 deletions

View file

@ -58,13 +58,15 @@ class Personne
public function ajouterVersement(
$idActivite,
$idTarif,
$montant
$montant,
$tauxReduction
) {
$this->versements[] =
new Versement(
$idActivite,
$idTarif,
$montant
$montant,
$tauxReduction
);
}
}

View file

@ -164,9 +164,9 @@ class RecusPDF extends tFPDF
"Le bénéficiaire reconnaît avoir reçu au titre des dons et versements ouvrant droit à réduction d'impôt :",
'LTR',
1);
foreach ($lesMontants as $montant)
foreach ($lesMontants as $taux => $montant)
{
$this->imprimer_montant(" - la somme de ", $montant, "aide aux personnes en difficulté");
$this->imprimer_montant(" - la somme de ", $montant, Utils::getLigneReduction($taux));
}
$this->Cell(0, 3, "", 'LR', 1);
$this->imprimer_description('Date des versements : ',

View file

@ -139,6 +139,23 @@ class Utils
return DB::getInstance()->get($sql, $annee);
}
public static function getLignesReduction($lesTaux)
{
foreach ($lesTaux as $elem)
{
$ligne = "taux " . $elem->taux . ", ligne " . $elem->ligne;
if ($elem->remarque != "") {
$ligne .= ", " . $elem->remarque;
}
$lignes[$elem->taux] = $ligne;
}
return $lignes;
}
public static function getLigneReduction($taux)
{
return $_SESSION['ligneReduction'][$taux];
}
// ------------------------------------------------------------
/**
@ -373,7 +390,7 @@ class Utils
* @param tableau des versements par personne
*/
static function genererRecus() {
}
/**

View file

@ -12,10 +12,13 @@ class Versement
public function __construct(
$idActivite,
$idTarif,
$montant
) {
$montant,
$tauxReduction
)
{
$this->idActivite = $idActivite;
$this->idTarif = $idTarif;
$this->montant = $montant;
$this->tauxReduction = $tauxReduction;
}
}