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;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
Fprincipal.inserta_en_vtadiaria('ef');
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 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