summaryrefslogtreecommitdiff
path: root/src/sections
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-07-16 05:04:13 +0200
committerpolo <ordipolo@gmx.fr>2024-07-16 05:04:13 +0200
commit9c9cda0ac823863c6760d77984ea2ecaf87c52ab (patch)
treefc00fd9fbd71bf2b62bca5fe5627f2a9e816870d /src/sections
parentc4a3f80a6dccdff9b2abff6f159ef8fdd4382787 (diff)
downloadAppliGestionPHP-9c9cda0ac823863c6760d77984ea2ecaf87c52ab.zip
renommage complet des ID en id: variables, méthodes, BDD
Diffstat (limited to 'src/sections')
-rw-r--r--src/sections/2_service.php12
-rw-r--r--src/sections/3_modify_data.php2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/sections/2_service.php b/src/sections/2_service.php
index 78e4dd4..3dd620d 100644
--- a/src/sections/2_service.php
+++ b/src/sections/2_service.php
@@ -48,7 +48,7 @@ function newService($Client): array // $Client est un Client ou null
48 return [0, null]; // menu principal 48 return [0, null]; // menu principal
49 } 49 }
50 50
51 $Presta = new Prestations($Client->getID()); 51 $Presta = new Prestations($Client->getId());
52 $Presta->setDate($Date->getTimestamp()); // un entier pour la BDD 52 $Presta->setDate($Date->getTimestamp()); // un entier pour la BDD
53 53
54 // formulaire - étape 2/3 54 // formulaire - étape 2/3
@@ -67,7 +67,7 @@ function newService($Client): array // $Client est un Client ou null
67 break; 67 break;
68 case ZenitySetup::$menu_enregistrement_entrees[2]: // "Facture à partir d'un devis" 68 case ZenitySetup::$menu_enregistrement_entrees[2]: // "Facture à partir d'un devis"
69 // recherche du devis 69 // recherche du devis
70 $Quotation = getServices($Client, 'devis'); // rechercher un devis, type 'devis' spécifié pour $Presta->getIDsByIdClient() 70 $Quotation = getServices($Client, 'devis'); // rechercher un devis, type 'devis' spécifié pour $Presta->getIdsByIdClient()
71 if(!is_object($Quotation) || get_class($Quotation) != 'Prestations' || $Quotation->getTypePresta() != 'devis') 71 if(!is_object($Quotation) || get_class($Quotation) != 'Prestations' || $Quotation->getTypePresta() != 'devis')
72 { 72 {
73 echo "debug: annulation sélection client\n"; 73 echo "debug: annulation sélection client\n";
@@ -124,7 +124,7 @@ function newService($Client): array // $Client est un Client ou null
124 if($choix_niv2 === ZenitySetup::$menu_enregistrement_entrees[2]) // cas: facture à partir d'un devis 124 if($choix_niv2 === ZenitySetup::$menu_enregistrement_entrees[2]) // cas: facture à partir d'un devis
125 { 125 {
126 // devis retrouvé ($Quotation est déjà hydraté) 126 // devis retrouvé ($Quotation est déjà hydraté)
127 $QuotationDetails->setIDPresta($Quotation->getID()); 127 $QuotationDetails->setIdPresta($Quotation->getId());
128 $QuotationDetails->hydrate($QuotationDetails->getDetailsByIdPresta()); 128 $QuotationDetails->hydrate($QuotationDetails->getDetailsByIdPresta());
129 129
130 // facture avec le devis 130 // facture avec le devis
@@ -148,13 +148,13 @@ function newService($Client): array // $Client est un Client ou null
148 148
149 // mise à jour base de données 149 // mise à jour base de données
150 $Presta->create(); 150 $Presta->create();
151 $Presta->setID(); // sans paramètre, exécute un $this->db->lastInsertId() 151 $Presta->setId(); // sans paramètre, exécute un $this->db->lastInsertId()
152 152
153 if(isset($PrestaDetails)) // presta vendue 153 if(isset($PrestaDetails)) // presta vendue
154 { 154 {
155 $PrestaDetails->setIDPresta($Presta->getID()); // d'un objet à l'autre 155 $PrestaDetails->setIdPresta($Presta->getId()); // d'un objet à l'autre
156 $PrestaDetails->create(); 156 $PrestaDetails->create();
157 $PrestaDetails->setID(); // sans paramètre, exécute un $this->db->lastInsertId() 157 $PrestaDetails->setId(); // sans paramètre, exécute un $this->db->lastInsertId()
158 } 158 }
159 159
160 // si encore de type prospect, devient un type client 160 // si encore de type prospect, devient un type client
diff --git a/src/sections/3_modify_data.php b/src/sections/3_modify_data.php
index 279310b..c2f683a 100644
--- a/src/sections/3_modify_data.php
+++ b/src/sections/3_modify_data.php
@@ -114,7 +114,7 @@ function modifyData($Client): array
114 } 114 }
115 if($type != 'non_vendue') 115 if($type != 'non_vendue')
116 { 116 {
117 $PrestaDetails->setIDPresta($Presta->getID()); 117 $PrestaDetails->setIdPresta($Presta->getId());
118 $PrestaDetails->hydrate($PrestaDetails->getDetailsByIdPresta()); 118 $PrestaDetails->hydrate($PrestaDetails->getDetailsByIdPresta());
119 } 119 }
120 120