El programa se parará justo, exactamente en una línea, en una de las que indico, aunque tú no lo hayas dicho.
Código Delphi
[-]procedure TForm1.Button7Click(Sender: TObject);
var
a,b,c,tpro,des,cot,inc,tpom,t,tpgs:real;
begin
des:=strtofloat (descuento.text); inc:=strtofloat(incremento.Text); a:=strtofloat(encomienda.text); b:=strtofloat(viatico.text); c:=strtofloat(gastoadm.text); tpro:=strtofloat(total.text); t:= a+b+c+tpro;
if (descuento.Enabled=true) then
tpgs:= t-des;
if(incremento.enabled=true) then
begin
tpgs:= t+inc;
end;
tp.text:= floattostr(tpgs); cot:= strtofloat(cotiza.text); tpom:= tpgs/cot;
tpotra.text:=floattostr(tpom); end;