diff options
| author | polo <contact@ordipolo.fr> | 2023-09-02 11:03:16 +0200 |
|---|---|---|
| committer | polo <contact@ordipolo.fr> | 2023-09-02 11:03:16 +0200 |
| commit | 45262760a7d575a9d612cc2056e66bf105e43df8 (patch) | |
| tree | 4d22f2e19f67f4a6dcdd2a4236fa6f6a0dd7f22a /src/model | |
| parent | 45f1b99a1060ee43deb6055faef1f8b16b5d80a2 (diff) | |
| download | AppliGestionPHP-45262760a7d575a9d612cc2056e66bf105e43df8.tar.gz AppliGestionPHP-45262760a7d575a9d612cc2056e66bf105e43df8.tar.bz2 AppliGestionPHP-45262760a7d575a9d612cc2056e66bf105e43df8.zip | |
section 3 ok (manque les prestas non-vendues)
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/CESU.php | 16 | ||||
| -rw-r--r-- | src/model/DevisFactures.php | 16 | ||||
| -rw-r--r-- | src/model/Locations.php | 40 |
3 files changed, 59 insertions, 13 deletions
diff --git a/src/model/CESU.php b/src/model/CESU.php index a8aa1e8..f6c6630 100644 --- a/src/model/CESU.php +++ b/src/model/CESU.php | |||
| @@ -20,11 +20,25 @@ class CESU extends Model | |||
| 20 | public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) | 20 | public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) |
| 21 | { | 21 | { |
| 22 | return [ | 22 | return [ |
| 23 | "Numéro CESU:" => $this->ID, | ||
| 24 | "Tâche effectuée:" => $this->taches, | 23 | "Tâche effectuée:" => $this->taches, |
| 25 | "Durée du travail:" => $this->duree_travail, | 24 | "Durée du travail:" => $this->duree_travail, |
| 26 | "Salaire:" => $this->salaire]; | 25 | "Salaire:" => $this->salaire]; |
| 27 | } | 26 | } |
| 27 | public function set(string $entry, string $input) | ||
| 28 | { | ||
| 29 | switch($entry) | ||
| 30 | { | ||
| 31 | case "Tâche effectuée:": | ||
| 32 | $this->setTaches($input); | ||
| 33 | break; | ||
| 34 | case "Durée du travail:": | ||
| 35 | $this->setDureeTravail($input); | ||
| 36 | break; | ||
| 37 | case "Salaire:": | ||
| 38 | $this->setSalaire($input); | ||
| 39 | break; | ||
| 40 | } | ||
| 41 | } | ||
| 28 | 42 | ||
| 29 | // setters | 43 | // setters |
| 30 | public function setIDPresta(int $value) | 44 | public function setIDPresta(int $value) |
diff --git a/src/model/DevisFactures.php b/src/model/DevisFactures.php index 2a5bf8d..259690b 100644 --- a/src/model/DevisFactures.php +++ b/src/model/DevisFactures.php | |||
| @@ -31,10 +31,10 @@ class DevisFactures extends Model | |||
| 31 | $taches = ["Tâches:" => $this->taches]; | 31 | $taches = ["Tâches:" => $this->taches]; |
| 32 | $champs_communs = [ | 32 | $champs_communs = [ |
| 33 | "Total Main d'oeuvre:" => $this->total_main_d_oeuvre, | 33 | "Total Main d'oeuvre:" => $this->total_main_d_oeuvre, |
| 34 | "Pièces" => $this->pieces, | 34 | "Pièces:" => $this->pieces, |
| 35 | "Total des pièces" => $this->total_pieces, | 35 | "Total des pièces:" => $this->total_pieces, |
| 36 | "Déplacement" => $this->deplacement, | 36 | "Déplacement:" => $this->deplacement, |
| 37 | "Total HT" => $this->total_HT]; | 37 | "Total HT:" => $this->total_HT]; |
| 38 | 38 | ||
| 39 | if($this->table === 'factures') | 39 | if($this->table === 'factures') |
| 40 | { | 40 | { |
| @@ -49,9 +49,9 @@ class DevisFactures extends Model | |||
| 49 | elseif($this->table === 'devis') | 49 | elseif($this->table === 'devis') |
| 50 | { | 50 | { |
| 51 | $champs_devis = [ | 51 | $champs_devis = [ |
| 52 | "Delai de livraison" => $this->delai_livraison, | 52 | "Delai de livraison:" => $this->delai_livraison, |
| 53 | "Durée de validité" => $this->validite_devis, | 53 | "Durée de validité:" => $this->validite_devis, |
| 54 | "Devis signé?" => $this->signature_devis]; | 54 | "Devis signé:" => $this->signature_devis]; |
| 55 | 55 | ||
| 56 | return $champs_communs + $champs_devis; | 56 | return $champs_communs + $champs_devis; |
| 57 | } | 57 | } |
| @@ -100,7 +100,7 @@ class DevisFactures extends Model | |||
| 100 | case "Durée de validité:": | 100 | case "Durée de validité:": |
| 101 | $this->setValiditedevis($input); | 101 | $this->setValiditedevis($input); |
| 102 | break; | 102 | break; |
| 103 | case "Devis signé?:": | 103 | case "Devis signé:": |
| 104 | $this->setSignatureDevis($input); | 104 | $this->setSignatureDevis($input); |
| 105 | break; | 105 | break; |
| 106 | } | 106 | } |
diff --git a/src/model/Locations.php b/src/model/Locations.php index e3c9507..ead2727 100644 --- a/src/model/Locations.php +++ b/src/model/Locations.php | |||
| @@ -24,16 +24,48 @@ class Locations extends Model | |||
| 24 | public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) | 24 | public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) |
| 25 | { | 25 | { |
| 26 | return [ | 26 | return [ |
| 27 | "Numéro location:" => $this->ID, | ||
| 28 | "Désignation:" => $this->designation, | 27 | "Désignation:" => $this->designation, |
| 29 | "Description du modèle:" => $this->modele_description, | 28 | "Description du modèle:" => $this->modele_description, |
| 30 | "Valeur:" => $this->valeur, | 29 | "Valeur:" => $this->valeur, |
| 31 | "État des lieux de début:" => $this->etat_des_lieux_debut, | 30 | "État des lieux de début:" => $this->etat_des_lieux_debut, |
| 32 | "État des lieux de fin:" => $this->etat_des_lieux_fin, | 31 | "État des lieux de fin:" => $this->etat_des_lieux_fin, |
| 33 | "Durée de la location:" => $this->duree_location, | 32 | "Durée de la location:" => $this->duree_location, |
| 34 | "Loyer Mensuel" => $this->loyer_mensuel, | 33 | "Loyer Mensuel:" => $this->loyer_mensuel, |
| 35 | "Loyers Payés" => $this->loyers_payes, | 34 | "Loyers Payés:" => $this->loyers_payes, |
| 36 | "Caution" => $this->caution]; | 35 | "Caution:" => $this->caution]; |
| 36 | } | ||
| 37 | public function set(string $entry, string $input) | ||
| 38 | { | ||
| 39 | switch($entry) | ||
| 40 | { | ||
| 41 | case "Désignation:": | ||
| 42 | $this->setDesignation($input); | ||
| 43 | break; | ||
| 44 | case "Description du modèle:": | ||
| 45 | $this->setModeleDescription($input); | ||
| 46 | break; | ||
| 47 | case "Valeur:": | ||
| 48 | $this->setValeur($input); | ||
| 49 | break; | ||
| 50 | case "État des lieux de début:": | ||
| 51 | $this->setEtatDesLieuxDebut($input); | ||
| 52 | break; | ||
| 53 | case "État des lieux de fin:": | ||
| 54 | $this->setEtatDesLieuxFin($input); | ||
| 55 | break; | ||
| 56 | case "Durée de la location:": | ||
| 57 | $this->setDureeLocation($input); | ||
| 58 | break; | ||
| 59 | case "Loyer Mensuel:": | ||
| 60 | $this->setLoyerMensuel($input); | ||
| 61 | break; | ||
| 62 | case "Loyers Payés:": | ||
| 63 | $this->setLoyersPayes($input); | ||
| 64 | break; | ||
| 65 | case "Caution:": | ||
| 66 | $this->setCaution($input); | ||
| 67 | break; | ||
| 68 | } | ||
| 37 | } | 69 | } |
| 38 | 70 | ||
| 39 | // setters | 71 | // setters |
