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 $ville;
|
|
|
|
public $codePostal;
|
|
|
|
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,
|
|
|
|
$ville,
|
|
|
|
$codePostal,
|
|
|
|
$courriel
|
|
|
|
) {
|
|
|
|
$this->id = $id;
|
|
|
|
$this->nomPrenom = $nomPrenom;
|
|
|
|
$this->adresse = $adresse;
|
|
|
|
$this->ville = $ville;
|
|
|
|
$this->codePostal = $codePostal;
|
|
|
|
$this->courriel = $courriel;
|
|
|
|
$this->versements = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2022-02-03 10:35:35 +01:00
|
|
|
* ajouter un versement pour une activité et un tarif donnés
|
2022-01-19 16:04:42 +01:00
|
|
|
*/
|
|
|
|
public function ajouterVersement(
|
|
|
|
$idActivite,
|
|
|
|
$idTarif,
|
|
|
|
$montant
|
|
|
|
) {
|
|
|
|
$this->versements[] =
|
|
|
|
new Versement(
|
|
|
|
$idActivite,
|
|
|
|
$idTarif,
|
|
|
|
$montant
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|