modifications on client

Signed-off-by: Mathéo Hersan <matheohersan@MacBook-Pro-de-Matheo.local>
pull/12/head
Mathéo Hersan 1 year ago
parent 6d114d9137
commit 2068cd7baf
No known key found for this signature in database
GPG Key ID: 4EF19C64D78EC91B

BIN
app

Binary file not shown.

@ -1,3 +1,3 @@
32 0.00 1
660 68.00 0
32 3.20 1
660 56.00 0
5079 75.50 0

@ -304,10 +304,6 @@ void configurer_session_client(int numeros[], int suspendus[], int nombreClients
indexClient = trouver_index_client(*numeroClient, numeros, nombreClients);
}
if (suspendus[indexClient] == 1) {
printf("Le client est suspendu et ne peut pas utiliser l'application.\n");
exit(1); // Quitter l'application si le client est suspendu.
}
printf("Voulez-vous définir un budget à ne pas dépasser ? (1 pour Oui, 0 pour Non) : ");
while (scanf("%d", &choixBudget) != 1 || (choixBudget != 0 && choixBudget != 1)) {
@ -497,6 +493,11 @@ void quitter_application(int panier[], int taillePanier, int references[], float
clientIndex = trouver_index_client(numeroClient, numeros, nombreClients);
if (suspendus[clientIndex] == 1) {
printf("Vous ne pourrez pas utiliser votre cagnotte car votre carte est suspendu.\n");
}
printf("Prix total à payer: %.2f euros\n", montantTotal);
if (budget > 0) {
printf("Budget : %.2f euros\n", budget);
@ -539,6 +540,7 @@ void quitter_application(int panier[], int taillePanier, int references[], float
deduire_cagnotte(numeroClient, montantDeduction, numeros, cagnottes, nombreClients, suspendus);
printf("Le montant a été déduit de votre cagnotte.\n");
printf("Il vous reste %.2f euros dans votre cagnotte.\n", cagnottes[clientIndex]);
}
}
}

Loading…
Cancel
Save