simplification cumul versements
FossilOrigin-Name: e4a942b3cc6913da11da2dfd480b2f71703c1781911e8d7c5e0a57c1b170bfd8
This commit is contained in:
parent
83cc830fb1
commit
b1645828fc
6 changed files with 44 additions and 84 deletions
|
|
@ -64,22 +64,11 @@ foreach ($totalPersonnes as $idPersonne => $personne)
|
|||
$signature
|
||||
);
|
||||
|
||||
// extraire les montants des versements
|
||||
$lesMontants = array();
|
||||
foreach ($personne->versements as $versement)
|
||||
{
|
||||
if (array_key_exists($versement->tauxReduction, $lesMontants)) {
|
||||
$lesMontants[$versement->tauxReduction] += $versement->montant;
|
||||
}
|
||||
else {
|
||||
$lesMontants[$versement->tauxReduction] = $versement->montant;
|
||||
}
|
||||
}
|
||||
$html->imprimer_recu(
|
||||
$_SESSION['annee_recu'],
|
||||
$personne->id,
|
||||
$personne->nomPrenom,
|
||||
$lesMontants,
|
||||
$personne->versements,
|
||||
$personne->adresse,
|
||||
$personne->codePostal,
|
||||
$personne->ville
|
||||
|
|
@ -120,10 +109,8 @@ function cumulerVersements($versements)
|
|||
if ($idPersonneCourant != -1)
|
||||
{
|
||||
$totalPersonnes[$idPersonneCourant]->ajouterVersement(
|
||||
0,
|
||||
0,
|
||||
$totalVersements/100,
|
||||
$_SESSION['taux_reduction']
|
||||
$_SESSION['taux_reduction'],
|
||||
$totalVersements/100
|
||||
);
|
||||
}
|
||||
$idPersonneCourant = $ligne->idUser;
|
||||
|
|
@ -140,10 +127,8 @@ function cumulerVersements($versements)
|
|||
}
|
||||
// et le dernier
|
||||
$totalPersonnes[$idPersonneCourant]->ajouterVersement(
|
||||
0,
|
||||
0,
|
||||
$totalVersements/100,
|
||||
$_SESSION['taux_reduction']
|
||||
$_SESSION['taux_reduction'],
|
||||
$totalVersements/100
|
||||
);
|
||||
return $totalPersonnes;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue