Ver Mensaje Individual
  #36  
Antiguo 12-08-2007
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
No tiene por que pasar.
Has tocado algo?
El programa lo tengo y funciona perfectamente, es muy raro.
Revisa el codigo del boton guardar, tiene que estar asi:
Código Delphi [-]
procedure TFFactura.Button1Click(Sender: TObject);
Var
  a,b,c,d,e,f,g,h : real;
begin
 a:= StrTofloat(ECantidad.Text);
 b:= StrTofloat(EMonto.Text);
 d:= StrTofloat(EDesc.Text);
 f:= StrTofloat(EImp.Text);
 c:= a * b;
 e:= c * d / 100;
 g:= (c - e) * f / 100;
 h:= c - e + g;
 ESTotal.Text:= floatToStr(c);
 EDescuento.Text:=floatToStr(e);
 EImpuesto.Text:=floatToStr(g);
 ETotal.Text:= floatToStr(Round(h));

 AdoQuery1.SQL.Text := 'Insert into Factura Values ('+QuotedStr(ECodFactura.Text)+', '+DateToStr(DateTimePicker1.DateTime)+', '+QuotedStr(ECodCliente.Text)+ ', '+QuotedStr(ECodArticulo.Text)+ ', '+QuotedStr(Label9.Caption)+ ', '+QuotedStr(ECantidad.Text)+ ', '+QuotedStr(ComboBox1.Text)+', '+QuotedStr(EOCompra.Text)+', '+
                        QuotedStr(EVendedor.Text)+', '+QuotedStr(EDesc.Text)+', '+QuotedStr(EImp.Text)+', '+QuotedStr(ESTotal.Text)+', '+QuotedStr(EDescuento.Text)+ ', '+QuotedStr(EImpuesto.Text)+ ', '+QuotedStr(ETotal.Text)+')';
 AdoQuery1.ExecSQL;

end;
Como veras el insert recorre los campos y el value revisa los datos.
Copia y pega este codigo, tiene que funcionar.
Saludos
Responder Con Cita