diff options
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 | { |