|
|
@ -136,6 +136,11 @@ void basket_add(int tab_reference[], float unitPrice[], float *cagnotte, int ba
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i, ref_to_add, qte_to_add, trouve, index_ajout;
|
|
|
|
int i, ref_to_add, qte_to_add, trouve, index_ajout;
|
|
|
|
float total_weight[tmaxArticles], total_volume[tmaxArticles], total_price[tmaxArticles], total_cagnotte[tmaxArticles];
|
|
|
|
float total_weight[tmaxArticles], total_volume[tmaxArticles], total_price[tmaxArticles], total_cagnotte[tmaxArticles];
|
|
|
|
|
|
|
|
if (tlogItem+1>tmaxArticles)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("erreur, pas assez de place pour ajouter un autre article");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
printf("Quelle référence souhaitez-vous ajouter au panier?");
|
|
|
|
printf("Quelle référence souhaitez-vous ajouter au panier?");
|
|
|
|
scanf("%d", &ref_to_add);
|
|
|
|
scanf("%d", &ref_to_add);
|
|
|
|
index_ajout = searchTab(tab_reference, ref_to_add, tlogItem, &trouve);
|
|
|
|
index_ajout = searchTab(tab_reference, ref_to_add, tlogItem, &trouve);
|
|
|
|