summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-06-03 00:04:42 +0200
committerpolo <ordipolo@gmx.fr>2024-06-03 00:04:42 +0200
commit14f68d7d93cd6e498a7d15cf5ce5b227ed0683a7 (patch)
treed42a9ec22ac186ccbd616c33eef0b9654f1cdc4e /src/model
parent546302cde914a2143f86e6a384cbc5085d55396a (diff)
downloadAppliGestionPHP-14f68d7d93cd6e498a7d15cf5ce5b227ed0683a7.zip
mode de paiement non hydraté quand facture à partir d'un devis
Diffstat (limited to 'src/model')
-rw-r--r--src/model/DevisFactures.php17
-rw-r--r--src/model/Model.php8
-rw-r--r--src/model/Prestations.php2
3 files changed, 7 insertions, 20 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)