Se arregla consumo de recursos por parte del log (el componente jvlog 3.32 no está bien deberia actualizarse al 3.36), tambien se arreglan informes de contratos a peticion de angelica

git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@99 93f398dd-4eb6-7a46-baf6-13f46f578da2
This commit is contained in:
roberto 2014-05-26 17:23:07 +00:00
parent 1d408b47ea
commit e207419f71
7 changed files with 79 additions and 66 deletions

View File

@ -5455,34 +5455,35 @@ begin
begin begin
if (visible <> 0) then if (visible <> 0) then
begin begin
/*Escribimos capitulo anterior*/ /*Escribimos capitulo anterior*/
if ((Importe_total > 0) if ((Importe_total > 0)
and ((ultimo_tipo_detalle = 'Descuento') or (ultimo_tipo_detalle = 'Subtotal'))) then and ((ultimo_tipo_detalle = 'Descuento') or (ultimo_tipo_detalle = 'Subtotal'))) then
begin begin
Importe_aux = Importe_total; Importe_aux = Importe_total;
id = id_aux; id = id_aux;
posicion = posicion_aux; posicion = posicion_aux;
tipo_detalle = tipo_detalle_aux; tipo_detalle = tipo_detalle_aux;
tipo_articulo = tipo_articulo_aux; tipo_articulo = tipo_articulo_aux;
concepto = concepto_aux; concepto = concepto_aux;
importe_total = total_acumulado; importe_total = total_acumulado;
importe_descuento = importe_descuento_aux; importe_descuento = importe_descuento_aux;
descuento = descuento_aux; descuento = descuento_aux;
visible = 1; visible = 1;
valorado = 1; valorado = 1;
suspend; suspend;
total_acumulado = 0.0; total_acumulado = 0.0;
importe_descuento_aux = 0.0; importe_descuento_aux = 0.0;
descuento_aux = 0.0; descuento_aux = 0.0;
/*Inicializamos*/ /*Inicializamos*/
ID_AUX = -1; ID_AUX = -1;
posicion_aux = -1; posicion_aux = -1;
concepto_aux = 'General'; concepto_aux = 'General';
tipo_detalle_aux = 'Titulo'; tipo_detalle_aux = 'Titulo';
tipo_articulo_aux = 'NA'; tipo_articulo_aux = 'NA';
importe_total = Importe_aux; importe_total = Importe_aux;
end end
end end
if (valorado <> 0) then if (valorado <> 0) then
total_acumulado = total_acumulado + importe_total; total_acumulado = total_acumulado + importe_total;
ultimo_tipo_detalle = tipo_detalle; ultimo_tipo_detalle = tipo_detalle;
@ -5554,6 +5555,7 @@ begin
end end
end end
end end
else if (TIPO = 'Contrato') then else if (TIPO = 'Contrato') then
begin begin
for select id, id_contrato, posicion, tipo_detalle, tipo_articulo, F_RTFTOTEXT(concepto) as concepto, for select id, id_contrato, posicion, tipo_detalle, tipo_articulo, F_RTFTOTEXT(concepto) as concepto,
@ -5568,39 +5570,42 @@ begin
contador = contador + 1; contador = contador + 1;
/*CONCEPTO*/ /*CONCEPTO*/
if ((visible <> 0) and (tipo_detalle = 'Concepto')) then if (tipo_detalle = 'Concepto') then
begin begin
/*Escribimos capitulo anterior*/ if (visible <> 0) then
if ((Importe_total > 0) begin
and ((ultimo_tipo_detalle = 'Descuento') or (ultimo_tipo_detalle = 'Subtotal'))) then /*Escribimos capitulo anterior*/
begin if ((Importe_total > 0)
Importe_aux = Importe_total; and ((ultimo_tipo_detalle = 'Descuento') or (ultimo_tipo_detalle = 'Subtotal'))) then
id = id_aux; begin
posicion = posicion_aux; Importe_aux = Importe_total;
tipo_detalle = tipo_detalle_aux; id = id_aux;
tipo_articulo = tipo_articulo_aux; posicion = posicion_aux;
concepto = concepto_aux; tipo_detalle = tipo_detalle_aux;
importe_total = total_acumulado; tipo_articulo = tipo_articulo_aux;
importe_descuento = importe_descuento_aux; concepto = concepto_aux;
descuento = descuento_aux; importe_total = total_acumulado;
visible = 1; importe_descuento = importe_descuento_aux;
valorado = 1; descuento = descuento_aux;
suspend; visible = 1;
total_acumulado = 0.0; valorado = 1;
importe_descuento_aux = 0.0; suspend;
descuento_aux = 0.0; total_acumulado = 0.0;
/*Inicializamos*/ importe_descuento_aux = 0.0;
ID_AUX = -1; descuento_aux = 0.0;
posicion_aux = -1; /*Inicializamos*/
concepto_aux = 'General'; ID_AUX = -1;
tipo_detalle_aux = 'Titulo'; posicion_aux = -1;
tipo_articulo_aux = 'NA'; concepto_aux = 'General';
importe_total = Importe_aux; tipo_detalle_aux = 'Titulo';
end tipo_articulo_aux = 'NA';
importe_total = Importe_aux;
end
end
if (valorado <> 0) then if (valorado <> 0) then
total_acumulado = total_acumulado + importe_total; total_acumulado = total_acumulado + importe_total;
ultimo_tipo_detalle = tipo_detalle; ultimo_tipo_detalle = tipo_detalle;
end end
/*TITULO*/ /*TITULO*/

View File

@ -71,11 +71,13 @@ begin
if SysUtils.ForceDirectories(ALogFileName) then if SysUtils.ForceDirectories(ALogFileName) then
begin begin
{SE COMENTA PORQUE TUESTA LA PARTE CLIENTE SI SE DESEA ARREGLAR ACTUALIZAR LAS JV de tecsitel
JvLogFile.Active := False; JvLogFile.Active := False;
JvLogFile.FileName := ALogFileName + 'ClientLog.txt'; JvLogFile.FileName := ALogFileName + 'ClientLog.txt';
JvLogFile.AutoSave := True; JvLogFile.AutoSave := True;
JvLogFile.Active := True; JvLogFile.Active := True;
JvLogFile.Clear; JvLogFile.Clear;
}
end end
else else
raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError)); raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError));
@ -137,12 +139,14 @@ end;
procedure TdmBase.EscribirLog(const AMensaje: String); procedure TdmBase.EscribirLog(const AMensaje: String);
begin begin
{
FEscribirLog.Acquire; FEscribirLog.Acquire;
try try
JvLogFile.Add(AMensaje); JvLogFile.Add(AMensaje);
finally finally
FEscribirLog.Release; FEscribirLog.Release;
end; end;
}
end; end;
end. end.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -174,11 +174,13 @@ procedure TdmServer.IniciarLog;
begin begin
FEscribirLog := TCriticalSection.Create; FEscribirLog := TCriticalSection.Create;
{SE COMENTA PORQUE TUESTA LA PARTE SERVIDORA SI SE DESEA ARREGLAR ACTUALIZAR LAS JV de tecsitel
JvLogFile1.Active := False; JvLogFile1.Active := False;
JvLogFile1.FileName := ExtractFilePath(Application.ExeName) + 'ServerLog.txt'; JvLogFile1.FileName := ExtractFilePath(Application.ExeName) + 'ServerLog.txt';
JvLogFile1.AutoSave := True; JvLogFile1.AutoSave := True;
JvLogFile1.Active := True; JvLogFile1.Active := True;
JvLogFile1.Clear; JvLogFile1.Clear;
}
end; end;
procedure TdmServer.DataModuleCreate(Sender: TObject); procedure TdmServer.DataModuleCreate(Sender: TObject);
@ -278,12 +280,14 @@ end;
procedure TdmServer.EscribirLog(const AMensaje: String); procedure TdmServer.EscribirLog(const AMensaje: String);
begin begin
{
FEscribirLog.Acquire; FEscribirLog.Acquire;
try try
JvLogFile1.Add(AMensaje); JvLogFile1.Add(AMensaje);
finally finally
FEscribirLog.Release; FEscribirLog.Release;
end; end;
}
end; end;
procedure TdmServer.RefrescarConexion; procedure TdmServer.RefrescarConexion;