Ver Mensaje Individual
  #1  
Antiguo 14-09-2007
Avatar de fedelphi
fedelphi fedelphi is offline
Miembro
 
Registrado: abr 2006
Ubicación: Santa Fe
Posts: 122
Reputación: 19
fedelphi Va por buen camino
Propiedad o variable de un form se hace=0

Hola al foro, tengo unproblema que realmente me mato, no se si sera una pavada, en este caso disculpen, o algo mas serio. tengo el sig codigo
Código Delphi [-]
var
  incctacte:TFIngresoctacte;
  cierravta:TFCierreVenta;
  costo,precio:double;
  porcentage_pago_efectivo:double;//porcentage de pago efectivo y el costo que le corresponde
begin
  if modulodatos.IBTTictmp.RecordCount<>0 then
  begin
    cierravta:=TFCierreVenta.create(self);
    cierravta.ETotalvta.Text:=floattostrf(VPTotal_venta,ffNumber,10,2);
    cierravta.EEfectivo.Text:=floattostrf(VPTotal_venta,ffNumber,10,2);
    try
      if cierravta.showmodal=mrOK then
      begin
        if roundto(VPTotal_venta,-2)=roundto(cierravta.efectivo,-2) then
        begin
        //paga todo en efectivo
          Fprincipal.inserta_en_vtadiaria('ef');
        //  Close;
        end
        else
        begin
          if roundto(VPTotal_venta,-2)>roundto(cierravta.efectivo,-2) then
          begin
            acumula_total_venta(costo,precio);
            porcentage_pago_efectivo:=roundto(cierravta.efectivo/VPTotal_venta,-2);
            incctacte:=TFIngresoctacte.create(self);
            incctacte.ctacte:=cierravta.efectivo;
            try
              if incctacte.showmodal=mrOK then///en esta linea se hace=0
              begin
                inserta_en_vtadiaria_vtadividida(costo*porcentage_pago_efectivo,cierravta.efectivo,'ef');
                inserta_en_vtadiaria_vtadividida(costo-(costo*porcentage_pago_efectivo),VPTotal_venta-cierravta.efectivo,'cc');
              end;
            finally
              incctacte.Free;
              inicializa_ingreso;
              inicializa_venta;
            end;
todo esto esta dentro de la funcion para cerrar una venta. VPTotal_venta es un propiedad del form definida asi
Código Delphi [-]
 private
    Ftotal_venta:double;
.
.
public
 property VPTotal_venta:double read FTotal_venta write FTotal_venta;
Cuando hago el segundo showmodal vptotal_venta se hace=0, alguien podri decirme que es lo que estoy haciendo mal? muchas gracias
Fede
__________________
De lo que hay no falta nada!!!
Responder Con Cita