gestion date début et fin versements

FossilOrigin-Name: 323bbe3ae892ca099aac2f897e592b35b7224c22ce25bd813e9a11dca0cf9f19
This commit is contained in:
engel 2022-05-20 19:43:38 +00:00
parent 7b9b0fda13
commit 4eb8b7c61d
4 changed files with 73 additions and 24 deletions

View file

@ -30,7 +30,7 @@ class Personne
$this->adresse = $adresse;
$this->codePostal = $codePostal;
$this->ville = $ville;
$this->versements = array(); // clé = tarif, valeur = montant
$this->versements = array(); // clé = tarif, valeur = Versement
}
/**
@ -51,19 +51,24 @@ class Personne
* ajouter un versement
* @param $tauxReduction
* @param $montant
* @param $dateMin
* @param $dateMax
*/
public function ajouterVersement(
$tauxReduction,
$montant
$montant,
$dateMin,
$dateMax
)
{
if (array_key_exists($tauxReduction, $this->versements))
{
$this->versements[$tauxReduction] += $montant;
$this->versements[$tauxReduction]->ajouter($montant, $dateMin, $dateMax);
}
else
{
$this->versements[$tauxReduction] = $montant;
$this->versements[$tauxReduction] = new Versement($montant, $dateMin, $dateMax);
}
}
}