2022-01-19 16:04:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Garradin\Plugin\RecusFiscaux;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* rassembler les infos d'une personne
|
|
|
|
*/
|
|
|
|
class Personne
|
|
|
|
{
|
|
|
|
public $id;
|
|
|
|
public $nomPrenom;
|
|
|
|
public $adresse;
|
|
|
|
public $codePostal;
|
2022-02-10 17:05:24 +01:00
|
|
|
public $ville;
|
2022-01-19 16:04:42 +01:00
|
|
|
public $courriel;
|
2022-02-03 10:35:35 +01:00
|
|
|
public $versements; // tableau des versements totaux par activité/tarif
|
2022-01-19 16:04:42 +01:00
|
|
|
|
|
|
|
public function __construct(
|
|
|
|
$id,
|
|
|
|
$nomPrenom,
|
|
|
|
$adresse,
|
|
|
|
$codePostal,
|
2022-02-10 17:05:24 +01:00
|
|
|
$ville,
|
|
|
|
$courriel = ""
|
2022-02-19 14:31:04 +01:00
|
|
|
)
|
|
|
|
{
|
2022-01-19 16:04:42 +01:00
|
|
|
$this->id = $id;
|
|
|
|
$this->nomPrenom = $nomPrenom;
|
|
|
|
$this->adresse = $adresse;
|
|
|
|
$this->codePostal = $codePostal;
|
2022-02-10 17:05:24 +01:00
|
|
|
$this->ville = $ville;
|
2022-01-19 16:04:42 +01:00
|
|
|
$this->courriel = $courriel;
|
|
|
|
$this->versements = array();
|
|
|
|
}
|
|
|
|
|
2022-02-18 10:37:39 +01:00
|
|
|
/**
|
|
|
|
* return copie d'une personne
|
|
|
|
*/
|
2022-02-19 14:31:04 +01:00
|
|
|
public function clone()
|
2022-02-10 17:05:24 +01:00
|
|
|
{
|
|
|
|
return new Personne(
|
2022-02-19 14:31:04 +01:00
|
|
|
$this->id,
|
|
|
|
$this->nomPrenom,
|
|
|
|
$this->adresse,
|
|
|
|
$this->codePostal,
|
|
|
|
$this->ville,
|
|
|
|
$this->courriel);
|
2022-02-10 17:05:24 +01:00
|
|
|
}
|
|
|
|
|
2022-02-18 10:37:39 +01:00
|
|
|
/**
|
|
|
|
* ajouter un versement
|
|
|
|
* @param $idActivite
|
|
|
|
* @param $idTarif
|
|
|
|
* @param $montant
|
|
|
|
* @param $tauxReduction
|
2022-01-19 16:04:42 +01:00
|
|
|
*/
|
|
|
|
public function ajouterVersement(
|
|
|
|
$idActivite,
|
|
|
|
$idTarif,
|
2022-02-18 12:51:13 +01:00
|
|
|
$montant,
|
|
|
|
$tauxReduction
|
2022-02-19 14:31:04 +01:00
|
|
|
)
|
|
|
|
{
|
2022-01-19 16:04:42 +01:00
|
|
|
$this->versements[] =
|
|
|
|
new Versement(
|
|
|
|
$idActivite,
|
|
|
|
$idTarif,
|
2022-02-18 12:51:13 +01:00
|
|
|
$montant,
|
|
|
|
$tauxReduction
|
2022-01-19 16:04:42 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|