diff --git a/src/display.c b/src/display.c index 38c678b..8a155df 100644 --- a/src/display.c +++ b/src/display.c @@ -108,33 +108,42 @@ void displayClientList(int clientID[], float cagnotte[], int suspended[], int is * @param weight: tableau des poids des articles * @param volume: tableau du volume des articles * @param unitPrice: tableau du prix unitaire des articles - * @param cagnotte: pointeur indiquant la valeur de la cagnotte + * @param cagnotte: valeur de la cagnotte * @param tlog: taille logique du tableau `tab_reference` * @param tlog_basket: taille logique du panier * @return void */ -void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], float volume[], float cagnotte[], float unitPrice[], int tlog, int tlog_basket) +void display_basket(int basket_tab_ref[], int tabItemRef[], int basket_qte[], float tabWeight[], float tabVolume[], float cagnotte, float tabUnitPrice[], int tlogItem, int tlog_basket) { float total_weight_line[tlog_basket], total_volume_line[tlog_basket], total_price_line[tlog_basket]; - float totalWeight = 0, totalVol = 0, total_price = 0; - int i; + float totalWeight = 0, totalVol = 0, total_price = 0, weight[tmaxArticles], volume[tmaxArticles], unitPrice[tmaxArticles]; + int i, found, index, j = 0; + + + printf("Récapitulatif de votre panier:\n"); + printf("Référence\tQuantité\tPoids\tVolume\tPrix unitaire\tPoids Total\tVol Total\tPrix Total\n"); + for (i=0; i