diff --git a/app b/app index fd5f53a..8b5a5a4 100755 Binary files a/app and b/app differ diff --git a/donnee/client.txt b/donnee/client.txt index a941733..b1c8738 100644 --- a/donnee/client.txt +++ b/donnee/client.txt @@ -1,3 +1,3 @@ -32 0.00 1 -660 68.00 0 +32 3.20 1 +660 56.00 0 5079 75.50 0 diff --git a/src/app/interface/interface_client.c b/src/app/interface/interface_client.c index 41cad45..bb68e47 100644 --- a/src/app/interface/interface_client.c +++ b/src/app/interface/interface_client.c @@ -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]); } } }