with query1.SQL do begin Add('SELECT SUM(Prix_Achat_Pro) as totalHT '); Add('FROM Produit '); query1.open end; edit1.text:= CurrToStr(Query1.FieldByName('totalHT').Value);
Add('SELECT SUM(Prix_Achat_Pro) as totalHT ');
edit1.text:= CurrToStr(Query1.FieldByName('totalHT').Value);
var resultat,taux:currency; begin table_pro.First; resultat:=0; while not table_pro.eof do begin table_pro.Open; resultat:=resultat+table_promontant.value; table_pro.next; end; edit2.text:=currtostr(resultat); taux:=strtocurr(edit2.text)*2.5/100; edit3.text:=currtostr(taux);