3acbd2038e
FossilOrigin-Name: 65f4c90bd70dda1733695d52ff242e58fe10220efee4077c813f49961d2686bc
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
|
|
* @param $p
|
|
*/
|
|
public static function copier($p)
|
|
{
|
|
return new Personne(
|
|
$p->id,
|
|
$p->nomPrenom,
|
|
$p->adresse,
|
|
$p->codePostal,
|
|
$p->ville,
|
|
$p->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
|
|
);
|
|
}
|
|
}
|