Ver Mensaje Individual
  #2  
Antiguo 07-03-2007
Avatar de Monchi
Monchi Monchi is offline
Miembro
 
Registrado: jun 2006
Ubicación: Cordoba, Argentina
Posts: 18
Reputación: 0
Monchi Va por buen camino
Yo lo hago asi:
Uso un vector que cargo antes de llenar el StringGrid, y cuando lleno el StringGrid calculo el total de la venta que voy a mostrar
Código Delphi [-]
   for i:=0 to g_cantidadarticulos-1 do
   begin
   stgarticulos.RowCount:=stgarticulos.RowCount+1;
   stgarticulos.Cells[0,stgarticulos.RowCount-2]:=inttostr(articulo.codigo);
   stgarticulos.Cells[1,stgarticulos.RowCount-2]:=articulo.descripcion;
   stgarticulos.Cells[2,stgarticulos.RowCount-2]:=rubro.descripcion;
   stgarticulos.Cells[3,stgarticulos.RowCount-2]:=floattostr(g_detalleVenta[i].cantidad);
   stgarticulos.Cells[4,stgarticulos.RowCount-2]:=formatfloat('0.00',g_detalleventa[i].precio);
   stgarticulos.Cells[5,stgarticulos.RowCount-2]:=formatfloat('0.00',(g_detalleventa[i].precio)*g_detalleVenta[i].cantidad);
   total_gravado:=total_gravado+((g_detalleventa[i].precio)*g_detalleVenta[i].cantidad)*(1-(strtofloat(txtdescuento.text)/100));
   end;
Responder Con Cita