diff options
| author | polo <ordipolo@gmx.fr> | 2025-07-08 16:30:10 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-07-08 16:30:10 +0200 |
| commit | 4accca2c57b5f12169afe6a75c74efadd86d835d (patch) | |
| tree | b0b7b821956144e5edc75471302b7624eabde3df /src/model/entities/Facture.php | |
| parent | 08145a5055c3f3f1d003ece3e0515da0be9a7279 (diff) | |
| download | AppliGestionPHP-4accca2c57b5f12169afe6a75c74efadd86d835d.tar.gz AppliGestionPHP-4accca2c57b5f12169afe6a75c74efadd86d835d.tar.bz2 AppliGestionPHP-4accca2c57b5f12169afe6a75c74efadd86d835d.zip | |
accès instances depuis Prestation
Diffstat (limited to 'src/model/entities/Facture.php')
| -rw-r--r-- | src/model/entities/Facture.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/model/entities/Facture.php b/src/model/entities/Facture.php index 3a8a551..75d1a6e 100644 --- a/src/model/entities/Facture.php +++ b/src/model/entities/Facture.php | |||
| @@ -13,9 +13,12 @@ class Facture | |||
| 13 | #[ORM\GeneratedValue] | 13 | #[ORM\GeneratedValue] |
| 14 | private int|null $id = null; | 14 | private int|null $id = null; |
| 15 | 15 | ||
| 16 | #[ORM\ManyToOne(targetEntity: Prestation::class, cascade: ['persist'])] | 16 | //~ #[ORM\ManyToOne(targetEntity: Prestation::class, cascade: ['persist'])] |
| 17 | //~ #[ORM\JoinColumn(name: 'id_presta', referencedColumnName: 'id')] | ||
| 18 | //~ private Prestation|null $presta = null; | ||
| 19 | #[ORM\OneToOne(targetEntity: Prestation::class, inversedBy: 'facture', cascade: ['persist'])] | ||
| 17 | #[ORM\JoinColumn(name: 'id_presta', referencedColumnName: 'id')] | 20 | #[ORM\JoinColumn(name: 'id_presta', referencedColumnName: 'id')] |
| 18 | private Prestation|null $presta = null; | 21 | private ?Prestation $presta = null; |
| 19 | 22 | ||
| 20 | #[ORM\Column] | 23 | #[ORM\Column] |
| 21 | private string $taches; | 24 | private string $taches; |
| @@ -58,6 +61,10 @@ class Facture | |||
| 58 | // n'utiliser get_object_vars() qu'avec une entité parce qu'on maîtrise le nombre de propriétés | 61 | // n'utiliser get_object_vars() qu'avec une entité parce qu'on maîtrise le nombre de propriétés |
| 59 | return get_object_vars($this); | 62 | return get_object_vars($this); |
| 60 | } | 63 | } |
| 64 | public function getTotalMainDOeuvre(): float | ||
| 65 | { | ||
| 66 | return $this->total_main_d_oeuvre; | ||
| 67 | } | ||
| 61 | 68 | ||
| 62 | public function getAllWithWindowFields(): array | 69 | public function getAllWithWindowFields(): array |
| 63 | { | 70 | { |
