gestion complète taux réduction
FossilOrigin-Name: 65f4c90bd70dda1733695d52ff242e58fe10220efee4077c813f49961d2686bc
This commit is contained in:
parent
38a3556dbd
commit
3acbd2038e
10 changed files with 61 additions and 28 deletions
|
|
@ -58,13 +58,15 @@ class Personne
|
|||
public function ajouterVersement(
|
||||
$idActivite,
|
||||
$idTarif,
|
||||
$montant
|
||||
$montant,
|
||||
$tauxReduction
|
||||
) {
|
||||
$this->versements[] =
|
||||
new Versement(
|
||||
$idActivite,
|
||||
$idTarif,
|
||||
$montant
|
||||
$montant,
|
||||
$tauxReduction
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 : ',
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue