|
|
|
@ -18,7 +18,7 @@ void global(void)
|
|
|
|
|
{
|
|
|
|
|
int n=0,rep,codeC;
|
|
|
|
|
int Tref[100]={0};
|
|
|
|
|
float Tpoid[100]={0},Tvolume[100]={0},Tprix[100]={0},volV,chargeV;;
|
|
|
|
|
float Tpoid[100]={0},Tvolume[100]={0},Tprix[100]={0},volV,chargeV,cagnotteC;
|
|
|
|
|
n = TableArticle(Tref,Tpoid,Tvolume,Tprix);
|
|
|
|
|
printf("Responsable / Client ? (R[0]/C[1])");
|
|
|
|
|
scanf("%d",&rep);
|
|
|
|
@ -97,10 +97,10 @@ void global(void)
|
|
|
|
|
if (rep == 1)
|
|
|
|
|
{
|
|
|
|
|
printf("Bienvenue Mr. le client :)\n");
|
|
|
|
|
printf("Voici la liste des articles disponibles : ");
|
|
|
|
|
printf("Voici la liste des articles disponibles : \n");
|
|
|
|
|
AffichTable(Tref,Tpoid,Tvolume,Tprix,n);
|
|
|
|
|
printf("\n");
|
|
|
|
|
volV = initClient(&chargeV,&codeC);
|
|
|
|
|
volV = initClient(&chargeV,&codeC,&cagnotteC);
|
|
|
|
|
printf("Que voulez vous faire ? (Ajout[0]/ModifierArticle[1]/SupprimerArticle[2]/AfficherPanier[3]/ResetPanier[4]/quitter[9]) ");
|
|
|
|
|
scanf("%d",&rep);
|
|
|
|
|
int TrefC[200]={0},TquanC[200]={0},nArticle=0;
|
|
|
|
@ -114,24 +114,24 @@ void global(void)
|
|
|
|
|
if (rep == 0)
|
|
|
|
|
{
|
|
|
|
|
nArticle = ajoutPanier(TrefC,TquanC,nArticle,Tref,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n,cagnotteC);
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
if (rep == 1)
|
|
|
|
|
{
|
|
|
|
|
ModifArticlePanier(TrefC,TquanC,nArticle,Tref,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n,cagnotteC);
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
if (rep == 2)
|
|
|
|
|
{
|
|
|
|
|
nArticle = SupprArticlePanier(TrefC,TquanC,nArticle,Tref,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n,cagnotteC);
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
if (rep == 3)
|
|
|
|
|
{
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n);
|
|
|
|
|
affichPanier(TrefC,TquanC,nArticle,Tref,Tpoid,Tvolume,Tprix,chargeV,volV,n,cagnotteC);
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
if (rep == 4)
|
|
|
|
|