Informes word nuevos azacan
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1070 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
407224517e
commit
7f1b0e9c19
BIN
Source/Informes/3/AlbaranCliente.rdx
Normal file
BIN
Source/Informes/3/AlbaranCliente.rdx
Normal file
Binary file not shown.
Binary file not shown.
@ -155,14 +155,17 @@ begin
|
|||||||
ReplaceBookmark('ImporteTotal', FieldByName('IMPORTETOTAL').DisplayText);
|
ReplaceBookmark('ImporteTotal', FieldByName('IMPORTETOTAL').DisplayText);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString);
|
if (tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger <> 3) then
|
||||||
ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString);
|
begin
|
||||||
ReplaceBookmark('DireccionEmpresa',
|
ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString);
|
||||||
Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString,
|
ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString);
|
||||||
tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString]));
|
ReplaceBookmark('DireccionEmpresa',
|
||||||
ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
|
Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString,
|
||||||
ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString);
|
tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString]));
|
||||||
ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString);
|
ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
|
||||||
|
ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString);
|
||||||
|
ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -116,9 +116,8 @@ begin
|
|||||||
FWordApp.SaveActiveDocAs(FNombreFichero);
|
FWordApp.SaveActiveDocAs(FNombreFichero);
|
||||||
|
|
||||||
try
|
try
|
||||||
if (tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger <> 3) then
|
if not RellenarPortada then
|
||||||
if not RellenarPortada then
|
RaiseError('Se producido un error al generar la portada del informe en MS Word.');
|
||||||
RaiseError('Se producido un error al generar la portada del informe en MS Word.');
|
|
||||||
|
|
||||||
if not RellenarCabecera then
|
if not RellenarCabecera then
|
||||||
RaiseError('Se producido un error al generar la cabecera del informe en MS Word.');
|
RaiseError('Se producido un error al generar la cabecera del informe en MS Word.');
|
||||||
@ -319,17 +318,14 @@ begin
|
|||||||
ReplaceBookmark('TelefonoEmpresaPortada', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
|
ReplaceBookmark('TelefonoEmpresaPortada', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
|
||||||
ReplaceBookmark('FaxEmpresaPortada', tbl_Empresa.FieldByName('FAX').AsString);
|
ReplaceBookmark('FaxEmpresaPortada', tbl_Empresa.FieldByName('FAX').AsString);
|
||||||
ReplaceBookmark('CorreoEmpresaPortada', tbl_Empresa.FieldByName('EMAIL_1').AsString);
|
ReplaceBookmark('CorreoEmpresaPortada', tbl_Empresa.FieldByName('EMAIL_1').AsString);
|
||||||
end;
|
|
||||||
|
|
||||||
ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString);
|
|
||||||
ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString);
|
|
||||||
ReplaceBookmark('DireccionEmpresa',
|
|
||||||
Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString,
|
|
||||||
tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString]));
|
|
||||||
ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
|
|
||||||
|
|
||||||
if (tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger <> 3) then
|
ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString);
|
||||||
begin
|
ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString);
|
||||||
|
ReplaceBookmark('DireccionEmpresa',
|
||||||
|
Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString,
|
||||||
|
tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString]));
|
||||||
|
ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
|
||||||
|
|
||||||
ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString);
|
ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString);
|
||||||
ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString);
|
ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString);
|
||||||
ReplaceBookmark('NombreEmpresaFirma', tbl_Empresa.FieldByName('NOMBRE').AsString);
|
ReplaceBookmark('NombreEmpresaFirma', tbl_Empresa.FieldByName('NOMBRE').AsString);
|
||||||
@ -445,17 +441,22 @@ begin
|
|||||||
|
|
||||||
with FDocumento, tbl_Cabecera do
|
with FDocumento, tbl_Cabecera do
|
||||||
begin
|
begin
|
||||||
ReplaceBookmark('CodigoPresupuestoPortada', FieldByName('REFERENCIA').AsString);
|
|
||||||
ReplaceBookmark('FechaPresupuestoPortada', FieldByName('FECHA_PRESUPUESTO').AsString);
|
if (tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger <> 3) then
|
||||||
ReplaceBookmark('NombreClientePortada', FieldByName('NOMBRE').AsString);
|
begin
|
||||||
if not EsCadenaVacia(FieldByName('PERSONA_CONTACTO').AsString) then
|
ReplaceBookmark('CodigoPresupuestoPortada', FieldByName('REFERENCIA').AsString);
|
||||||
ReplaceBookmark('PersonaContactoClientePortada', 'A la atención de: ' + FieldByName('PERSONA_CONTACTO').AsString);
|
ReplaceBookmark('FechaPresupuestoPortada', FieldByName('FECHA_PRESUPUESTO').AsString);
|
||||||
|
ReplaceBookmark('NombreClientePortada', FieldByName('NOMBRE').AsString);
|
||||||
|
if not EsCadenaVacia(FieldByName('PERSONA_CONTACTO').AsString) then
|
||||||
|
ReplaceBookmark('PersonaContactoClientePortada', 'A la atención de: ' + FieldByName('PERSONA_CONTACTO').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
Texto := FieldByName('PORTADA').AsString;
|
Texto := FieldByName('PORTADA').AsString;
|
||||||
NombreFichero := DarFicheroTemporal;
|
NombreFichero := DarFicheroTemporal;
|
||||||
EscribirEnFichero(NombreFichero, Texto);
|
EscribirEnFichero(NombreFichero, Texto);
|
||||||
FWordApp.InsertFile(NombreFichero, 'TextoPortada');
|
FWordApp.InsertFile(NombreFichero, 'TextoPortada');
|
||||||
SysUtils.DeleteFile(NombreFichero);
|
SysUtils.DeleteFile(NombreFichero);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user