83cc830fb1
FossilOrigin-Name: 782e9e0f8724a42731d25d263730cf203398d4d4e4add5131dcf581d09a06afb
73 lines
1.4 KiB
PHP
73 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Garradin\Plugin\RecusFiscaux;
|
|
|
|
/**
|
|
* rassembler les infos d'une personne
|
|
*/
|
|
class Personne
|
|
{
|
|
public $id;
|
|
public $nomPrenom;
|
|
public $adresse;
|
|
public $codePostal;
|
|
public $ville;
|
|
public $courriel;
|
|
public $versements; // tableau des versements totaux par activité/tarif
|
|
|
|
public function __construct(
|
|
$id,
|
|
$nomPrenom,
|
|
$adresse,
|
|
$codePostal,
|
|
$ville,
|
|
$courriel = ""
|
|
)
|
|
{
|
|
$this->id = $id;
|
|
$this->nomPrenom = $nomPrenom;
|
|
$this->adresse = $adresse;
|
|
$this->codePostal = $codePostal;
|
|
$this->ville = $ville;
|
|
$this->courriel = $courriel;
|
|
$this->versements = array();
|
|
}
|
|
|
|
/**
|
|
* return copie d'une personne
|
|
*/
|
|
public function clone()
|
|
{
|
|
return new Personne(
|
|
$this->id,
|
|
$this->nomPrenom,
|
|
$this->adresse,
|
|
$this->codePostal,
|
|
$this->ville,
|
|
$this->courriel);
|
|
}
|
|
|
|
/**
|
|
* ajouter un versement
|
|
* @param $idActivite
|
|
* @param $idTarif
|
|
* @param $montant
|
|
* @param $tauxReduction
|
|
*/
|
|
public function ajouterVersement(
|
|
$idActivite,
|
|
$idTarif,
|
|
$montant,
|
|
$tauxReduction
|
|
)
|
|
{
|
|
$this->versements[] =
|
|
new Versement(
|
|
$idActivite,
|
|
$idTarif,
|
|
$montant,
|
|
$tauxReduction
|
|
);
|
|
}
|
|
}
|