Probe lo que dijo movorack y efectivamente era eso, con eso postea los datos pero sigue sin hacer los calculos
Código Delphi [-]begin
fmodulo.tVentadetalle.Active := true;
fmodulo.tProductos.Active := true;
fmodulo.tVentadetalle.Insert;
if (strtoint(Ecantidad.Text)<=0)
then
begin
Application.MessageBox('El valor ingresado debe ser mayor a O', 'Drugstore',mb_yesno+mb_iconquestion);
end
else
if String(Ecantidad.Text).Trim.Length > 0
then
begin
a := (StrToInt(Ecantidad.text));
a := fmodulo.tVentadetalle.Fields.FieldByName('cantidad').AsInteger;
d := fmodulo.qnumventa.Fields.FieldByName('id_venta').AsInteger;
e := (d + 1);
fmodulo.tVentadetalle ['id_ventas'] := IntToStr(e);
fmodulo.tVentadetalle ['id_producto'] := fmodulo.tProductos ['id_producto'];
f := fmodulo.tProductos.Fields.FieldByName('precio_vent').AsInteger;
g := (a * f);
fmodulo.tVentadetalle ['Precio_v'] := IntToStr(g);
fmodulo.tVentadetalle ['cantidad'] := IntToStr(a);
fmodulo.tVentadetalle.Post;
fmodulo.tVentadetalle.Refresh;
end;
self.Close;
end;
end.
__________________
We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world.
|