diff options
author | polo <ordipolo@gmx.fr> | 2024-06-03 00:04:42 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2024-06-03 00:04:42 +0200 |
commit | 14f68d7d93cd6e498a7d15cf5ce5b227ed0683a7 (patch) | |
tree | d42a9ec22ac186ccbd616c33eef0b9654f1cdc4e | |
parent | 546302cde914a2143f86e6a384cbc5085d55396a (diff) | |
download | AppliGestionPHP-14f68d7d93cd6e498a7d15cf5ce5b227ed0683a7.zip |
mode de paiement non hydraté quand facture à partir d'un devis
-rw-r--r-- | src/model/DevisFactures.php | 17 | ||||
-rw-r--r-- | src/model/Model.php | 8 | ||||
-rw-r--r-- | src/model/Prestations.php | 2 | ||||
-rw-r--r-- | src/sections/2_service.php | 1 | ||||
-rw-r--r-- | à faire.txt | 2 |
5 files changed, 9 insertions, 21 deletions
diff --git a/src/model/DevisFactures.php b/src/model/DevisFactures.php index c667fb2..967067f 100644 --- a/src/model/DevisFactures.php +++ b/src/model/DevisFactures.php | |||
@@ -212,21 +212,4 @@ class DevisFactures extends Model | |||
212 | 'total_HT' => $this->total_HT | 212 | 'total_HT' => $this->total_HT |
213 | ]); | 213 | ]); |
214 | } | 214 | } |
215 | |||
216 | //~ public function newRow(array $input) | ||
217 | //~ { | ||
218 | //~ if($this->table === 'devis') // comme la table 'factures' avec deux champs en plus | ||
219 | //~ { | ||
220 | //~ $this->hydrate(['ID' => $input[0], 'ID_presta' => $input[1], 'taches' => $input[2], 'machine' => $input[3], 'OS' => $input[4], 'donnees' => $input[5], 'cles_licences' => $input[6], 'total_main_d_oeuvre' => $input[7], 'pieces' => $input[8], 'total_pieces' => $input[9], 'deplacement' => $input[10], 'total_HT' => $input[11]], | ||
221 | //~ ['validite_devis' => $input[12], 'signature_devis' => $input[13]]); | ||
222 | //~ $this->hydrate(['validite_devis' => $quotations_input[0], 'signature_devis' => $quotations_input[1]]); | ||
223 | //~ } | ||
224 | //~ elseif($this->table === 'factures') | ||
225 | //~ { | ||
226 | //~ $this->hydrate(['ID' => $input[0], 'ID_presta' => $input[1], 'taches' => $input[2], 'machine' => $input[3], 'OS' => $input[4], 'donnees' => $input[5], 'cles_licences' => $input[6], 'total_main_d_oeuvre' => $input[7], 'pieces' => $input[8], 'total_pieces' => $input[9], 'deplacement' => $input[10], 'total_HT' => $input[11]]); | ||
227 | //~ } | ||
228 | //~ $this->hydrate(['ID' => $input[0], 'ID_presta' => $input[1], 'taches' => $input[2], 'machine' => $input[3], 'OS' => $input[4], 'donnees' => $input[5], 'cles_licences' => $input[6], 'total_main_d_oeuvre' => $input[7], 'pieces' => $input[8], 'total_pieces' => $input[9], 'deplacement' => $input[10], 'total_HT' => $input[11]]); | ||
229 | //~ $this->create(); | ||
230 | //~ $this->ID_devis_facture = $this->db->lastInsertId(); // méthode de PDO | ||
231 | //~ } | ||
232 | } | 215 | } |
diff --git a/src/model/Model.php b/src/model/Model.php index fad25b3..9ada9a4 100644 --- a/src/model/Model.php +++ b/src/model/Model.php | |||
@@ -96,9 +96,13 @@ abstract class Model extends DB | |||
96 | $check = $this->hydrate(['taches' => $data_array[0], 'machine' => $data_array[1], 'OS' => $data_array[2], 'donnees' => $data_array[3], 'cles_licences' => $data_array[4], 'total_main_d_oeuvre' => $data_array[5], 'pieces' => $data_array[6], 'total_pieces' => $data_array[7], 'deplacement' => $data_array[8], 'total_HT' => $data_array[9]]); | 96 | $check = $this->hydrate(['taches' => $data_array[0], 'machine' => $data_array[1], 'OS' => $data_array[2], 'donnees' => $data_array[3], 'cles_licences' => $data_array[4], 'total_main_d_oeuvre' => $data_array[5], 'pieces' => $data_array[6], 'total_pieces' => $data_array[7], 'deplacement' => $data_array[8], 'total_HT' => $data_array[9]]); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | elseif(count($data_array) === 5) | 99 | elseif(count($data_array) === 5) // facture à partir d'un devis |
100 | { | 100 | { |
101 | $check = $this->hydrate(['machine' => $data_array[1], 'OS' => $data_array[2], 'donnees' => $data_array[3], 'cles_licences' => $data_array[4]]); | 101 | $check = $this->hydrate(['machine' => $data_array[0], 'OS' => $data_array[1], 'donnees' => $data_array[2], 'cles_licences' => $data_array[3]]); |
102 | if($check) | ||
103 | { | ||
104 | $check = $Presta->hydrate(['mode_paiement' => $data_array[4]]); | ||
105 | } | ||
102 | } | 106 | } |
103 | else | 107 | else |
104 | { | 108 | { |
diff --git a/src/model/Prestations.php b/src/model/Prestations.php index 88eb4f0..1666018 100644 --- a/src/model/Prestations.php +++ b/src/model/Prestations.php | |||
@@ -135,7 +135,7 @@ class Prestations extends Model | |||
135 | } | 135 | } |
136 | public function setCommentaires(string $value) | 136 | public function setCommentaires(string $value) |
137 | { | 137 | { |
138 | $this->commentaires = $this->cleanSpecialChars($value); // possibilité que $this->commentaires devienne une chaine vide | 138 | $this->commentaires = $this->cleanSpecialChars($value); // nettoyage ici parce que pas possible ailleurs |
139 | return $this; | 139 | return $this; |
140 | } | 140 | } |
141 | public function setNumeroPresta($value) | 141 | public function setNumeroPresta($value) |
diff --git a/src/sections/2_service.php b/src/sections/2_service.php index 28fba3f..78e4dd4 100644 --- a/src/sections/2_service.php +++ b/src/sections/2_service.php | |||
@@ -78,7 +78,6 @@ function newService($Client): array // $Client est un Client ou null | |||
78 | $PrestaDetails = new DevisFactures('factures'); | 78 | $PrestaDetails = new DevisFactures('factures'); |
79 | $Presta->setTypePresta('facture'); | 79 | $Presta->setTypePresta('facture'); |
80 | $answers = exec($FormulaireFactureReduit->get()); | 80 | $answers = exec($FormulaireFactureReduit->get()); |
81 | //$answers = '' + answers[0], answers[1], answers[2], answers[3], '', '', '', '', '', answers[4]; | ||
82 | //var_dump($answers); | 81 | //var_dump($answers); |
83 | break; | 82 | break; |
84 | case ZenitySetup::$menu_enregistrement_entrees[3]: // "CESU" | 83 | case ZenitySetup::$menu_enregistrement_entrees[3]: // "CESU" |
diff --git a/à faire.txt b/à faire.txt index 7799ef4..1ef4271 100644 --- a/à faire.txt +++ b/à faire.txt | |||
@@ -1,5 +1,7 @@ | |||
1 | À FAIRE: | 1 | À FAIRE: |
2 | 2 | ||
3 | proposer un choix oui/non à la modification du champ devis signé | ||
4 | |||
3 | permettre de modifier le code_presta dans "Modifier une prestation" | 5 | permettre de modifier le code_presta dans "Modifier une prestation" |
4 | 6 | ||
5 | si aucun client n'est trouvé, montrer tous les clients | 7 | si aucun client n'est trouvé, montrer tous les clients |