Presupuestos de cliente -> Certificados de trabajos: poner el texto de la portada en la descripción.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@512 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-08-08 12:08:18 +00:00
parent 4acbee69a4
commit aa52652d8e
2 changed files with 13 additions and 7 deletions

View File

@ -127,9 +127,10 @@ end;
function TRptWordCertificadoTrabajo.RellenarInforme: boolean; function TRptWordCertificadoTrabajo.RellenarInforme: boolean;
var var
NombreCapitulo : String; NombreCapitulo : string;
Estilo : OleVariant; ADescripcion : string;
ADescripcion : String; ANombreFichero : string;
AFicheroTemporal : string;
begin begin
with FDocumento, tbl_Cabecera do with FDocumento, tbl_Cabecera do
begin begin
@ -138,7 +139,7 @@ begin
FieldByName('CODIGO_POSTAL').AsString + ' ' + FieldByName('CODIGO_POSTAL').AsString + ' ' +
FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString); FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString);
ADescripcion := FieldByName('REFERENCIA').AsString; ReplaceBookmark('Referencia', FieldByName('REFERENCIA').AsString);
end; end;
FContadorCap := 0; FContadorCap := 0;
@ -146,7 +147,7 @@ begin
with FDocumento, tbl_Capitulos do with FDocumento, tbl_Capitulos do
begin begin
First; First;
ADescripcion := '';
while not Eof do while not Eof do
begin begin
if (FieldByName('TIPO_DETALLE').AsString = 'Titulo') or if (FieldByName('TIPO_DETALLE').AsString = 'Titulo') or
@ -176,9 +177,14 @@ begin
end; end;
end; end;
FNumCapitulos := FContadorCap; FNumCapitulos := FContadorCap;
ReplaceBookmark('Capitulos', ADescripcion);
ReplaceBookmark('Descripcion', ADescripcion);
end; end;
ANombreFichero := DarFicheroTemporal;
EscribirEnFichero(ANombreFichero, tbl_Cabecera.FieldByName('PORTADA').AsString);
FWordApp.InsertFile(ANombreFichero, 'Portada');
SysUtils.DeleteFile(ANombreFichero);
Result := True; Result := True;
end; end;