summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/latex_templates/location.php6
-rw-r--r--src/model/entities/Location.php26
-rw-r--r--à faire.txt2
3 files changed, 18 insertions, 16 deletions
diff --git a/src/latex_templates/location.php b/src/latex_templates/location.php
index 3c9eefc..5380826 100644
--- a/src/latex_templates/location.php
+++ b/src/latex_templates/location.php
@@ -48,7 +48,7 @@ ob_start();
48 % \string supprime l'espace devant les : 48 % \string supprime l'espace devant les :
49 49
50 \begin{center} 50 \begin{center}
51 \large\textbf{CONTRAT DE LOCATION} 51 \large\textbf{CONTRAT DE LOCATION À LA SEMAINE}
52 \end{center} 52 \end{center}
53 53
54 PROPRIÉTAIRE\\ 54 PROPRIÉTAIRE\\
@@ -73,8 +73,8 @@ ob_start();
73 73
74 CLAUSES\\ 74 CLAUSES\\
75 75
76 Durée du prêt : \textcolor{vert}{<?= $data['duree_location'] ?>}\\ 76 Durée du prêt en semaines : \textcolor{vert}{<?= $data['duree_location'] ?>}\\
77 Loyer mensuel : \textcolor{vert}{<?= $data['loyer_hebdo'] ?>}\\ 77 Loyer : \textcolor{vert}{<?= $data['loyer_hebdo'] ?>}\\
78 78
79 79
80 \textbf{Le bénéficiaire de cette location s’engage à prendre soin du bien désigné et à en faire un usage strictement personnel.}\\ 80 \textbf{Le bénéficiaire de cette location s’engage à prendre soin du bien désigné et à en faire un usage strictement personnel.}\\
diff --git a/src/model/entities/Location.php b/src/model/entities/Location.php
index 364b34c..11102f9 100644
--- a/src/model/entities/Location.php
+++ b/src/model/entities/Location.php
@@ -79,7 +79,7 @@ class Location
79 } 79 }
80 80
81 // setters 81 // setters
82 public function set(string $entry, string $input) 82 public function set(string $entry, string $input): void
83 { 83 {
84 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide 84 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide
85 switch($entry) 85 switch($entry)
@@ -113,61 +113,61 @@ class Location
113 break; 113 break;
114 } 114 }
115 } 115 }
116 private function setPresta(Prestation $input) // private? 116 private function setPresta(Prestation $input): void // private?
117 { 117 {
118 $this->presta = $input; 118 $this->presta = $input;
119 } 119 }
120 public function setDesignation(string $value) 120 public function setDesignation(string $value): Location
121 { 121 {
122 $this->designation = $value; 122 $this->designation = $value;
123 return($this); 123 return($this);
124 } 124 }
125 public function setModeleDescription(string $value) 125 public function setModeleDescription(string $value): Location
126 { 126 {
127 $this->modele_description = $value; 127 $this->modele_description = $value;
128 return($this); 128 return($this);
129 } 129 }
130 public function setValeur($value) 130 public function setValeur(string $value): Location
131 { 131 {
132 $value = str_replace(',', '.', $value); 132 $value = str_replace(',', '.', $value);
133 $this->valeur = (float) $value; 133 $this->valeur = (float) $value;
134 return($this); 134 return($this);
135 } 135 }
136 public function setEtatDesLieuxDebut(string $value) 136 public function setEtatDesLieuxDebut(string $value): Location
137 { 137 {
138 $this->etat_des_lieux_debut = $value; 138 $this->etat_des_lieux_debut = $value;
139 return($this); 139 return($this);
140 } 140 }
141 public function setEtatDesLieuxFin(string $value) 141 public function setEtatDesLieuxFin(string $value): Location
142 { 142 {
143 $this->etat_des_lieux_fin = $value; 143 $this->etat_des_lieux_fin = $value;
144 return($this); 144 return($this);
145 } 145 }
146 public function setDureeLocation(string $value) 146 public function setDureeLocation(string $value): Location
147 { 147 {
148 $this->duree_location = $value; 148 $this->duree_location = $value;
149 return($this); 149 return($this);
150 } 150 }
151 public function setLoyerMensuel($value) 151 public function setLoyerHebdo(string $value): Location
152 { 152 {
153 $value = str_replace(',', '.', $value); 153 $value = str_replace(',', '.', $value);
154 $this->loyer_mensuel = (float) $value; 154 $this->loyer_hebdo = (float) $value;
155 return($this); 155 return($this);
156 } 156 }
157 public function setLoyersPayes($value) 157 public function setLoyersPayes(string $value): Location
158 { 158 {
159 $value = str_replace(',', '.', $value); 159 $value = str_replace(',', '.', $value);
160 $this->loyers_payes = (float) $value; 160 $this->loyers_payes = (float) $value;
161 return($this); 161 return($this);
162 } 162 }
163 public function setCaution($value) 163 public function setCaution(string $value): Location
164 { 164 {
165 $value = str_replace(',', '.', $value); 165 $value = str_replace(',', '.', $value);
166 $this->caution = (float) $value; 166 $this->caution = (float) $value;
167 return($this); 167 return($this);
168 } 168 }
169 169
170 private function setAll(array $input) // private? 170 private function setAll(array $input): void // private?
171 { 171 {
172 $this->designation = $input[0]; 172 $this->designation = $input[0];
173 $this->modele_description = $input[1]; 173 $this->modele_description = $input[1];
diff --git a/à faire.txt b/à faire.txt
index d45f0ca..e61e426 100644
--- a/à faire.txt
+++ b/à faire.txt
@@ -1,5 +1,7 @@
1À FAIRE: 1À FAIRE:
2 2
3champ inutile dans Prestation::getAllWithWindowFields
4
3relire classe Dates 5relire classe Dates
4changer les dates des prestations avec timestamp vers des chaînes de caractères (pour ignorer les fuseaux horaires) 6changer les dates des prestations avec timestamp vers des chaînes de caractères (pour ignorer les fuseaux horaires)
5champ "date_bulletin_paie" dans la table cesu avec des chaînes également 7champ "date_bulletin_paie" dans la table cesu avec des chaînes également