diff --git a/src/display.c b/src/display.c index fb28a71..30df8e0 100644 --- a/src/display.c +++ b/src/display.c @@ -110,7 +110,7 @@ void displayClientList(int clientID[], float cagnotte[], int suspended[], int is * @param tlog_basket: taille logique du panier * @return Rien */ -void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], float volume[], float unitPrice[], float *cagnotte, int tlog, int tlog_basket) +void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], float volume[], float unitPrice[], int tlog, int tlog_basket) { float total_weight_line[tlog_basket], total_volume_line[tlog_basket], total_price_line[tlog_basket], cagnotte_line[tlog_basket], total_weight, total_volume, total_price; int i; @@ -133,7 +133,6 @@ void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], floa printf("%d\t%d\t%f\t%f\t%f\t%f\t%f\t%f\t%f\n", basket_tab_ref[i], basket_qte[i], weight[i], volume[i], unitPrice[i], total_weight_line[i], total_volume_line[i], total_price_line[i],cagnotte_line[i]); printf("\t\t\t\t\tPrix total à payer: %f\t euros\n", total_price); - printf("\t\t\t\t\tCagnotte totale: %f\t euros\n", *cagnotte); //constraintExceeded( weightConstraint, volumeConstraint, *priceConstraint, *cagnotte, tabWeight[], tabVolume[], tabPrice[], tabItemRef[], tabBasketRef[], tabBasketQuantity[], tlogItem, int tlogBasket) diff --git a/src/main.c b/src/main.c index 6b49f22..564fecd 100644 --- a/src/main.c +++ b/src/main.c @@ -52,11 +52,11 @@ void global(void) +var cagnotte: tableau des cagnottes des clients */ // Déclaration des variables - int tLogArticle, tLogClient, choice, status, currentUser; + int tLogArticle, tLogClient, choice, status, currentUser, clientPassword; int reference[tmaxArticles], clientID[tmaxClients], clientPassword[tmaxClients], suspended[tmaxClients], isAdmin[tmaxClients]; float weight[tmaxArticles], volume[tmaxArticles], unitPrice[tmaxArticles], cagnotte[tmaxClients]; // Chargement de toute les données - chargeDonnees(&tLogArticle, &tLogClient, reference, weight, volume, unitPrice, clientID, cagnotte, suspended, isAdmin); + chargeDonnees(&tLogArticle, &tLogClient, reference, weight, volume, unitPrice, clientID, clientPassword, cagnotte, suspended, isAdmin); // Affichage du menu choice = displayMenu(); diff --git a/src/main.h b/src/main.h index ddb70c3..8dcd7a1 100644 --- a/src/main.h +++ b/src/main.h @@ -49,7 +49,7 @@ int searchTab(int targetTab[], int valSearched, int tLog, int *found); void clientConstraint(float *weight, float *volume, float *price); int constraintExceeded(float weightConstraint, float volumeConstraint, float *priceConstraint, float *cagnotte, float tabWeight[], float tabVolume[], float tabPrice[], int tabItemRef[], int tabBasketRef[], int tabBasketQuantity[], int tlogItem, int tlogBasket); int basket_add (int tab_reference[], float weight[], float volume[], float unitPrice[], float *cagnotte, int basket_tab_ref[], int basket_tab_qte[],int tlog, int tlog_basket); -void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], float volume[], float unitPrice[], float *cagnotte, int tlog, int tlog_basket); +void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], float volume[], float unitPrice[], int tlog, int tlog_basket); int reinit_basket(int tlog_basket); int basket_del_article( int basket_tab_ref[], int basket_tab_qte[], int tlog_basket); diff --git a/src/panier.c b/src/panier.c index 3762247..a0b8cd1 100644 --- a/src/panier.c +++ b/src/panier.c @@ -156,7 +156,6 @@ int basket_add (int tab_reference[], float weight[], float volume[], float unitP *cagnotte = *cagnotte + *cagnotte*0.10; tlog_basket = tlog_basket+1; - display_basket( basket_tab_ref, basket_tab_qte, weight, volume, unitPrice, *cagnotte, tlog, tlog_basket); return tlog_basket; }