Arreglo de informes para que salga la fecha de vencimiento en el informe
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@349 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
65d62d313f
commit
00e85f5049
@ -63,9 +63,9 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
||||
#39' || extract (year from fecha_factura)'#10'when extract (month from ' +
|
||||
'fecha_factura) = 12 then '#39'DICIEMBRE - '#39' || extract (year from fe' +
|
||||
'cha_factura)'#10'end as TITULO,'#10'REFERENCIA, ID_PROVEEDOR, NOMBRE, S' +
|
||||
'ITUACION, NIF_CIF, FECHA_FACTURA, BASE_IMPONIBLE, IMPORTE_IVA, I' +
|
||||
'MPORTE_TOTAL'#10#10'from V_facturas_proveedor'#10'where {where}'#10'order by A' +
|
||||
'NO, MES, NOMBRE'#10#10
|
||||
'ITUACION, NIF_CIF, FECHA_FACTURA AS FECHA, FECHA_VENCIMIENTO AS ' +
|
||||
'FECHA_FACTURA, BASE_IMPONIBLE, IMPORTE_IVA, IMPORTE_TOTAL'#10#10'from ' +
|
||||
'V_facturas_proveedor'#10'where {where}'#10'order by ANO, MES, NOMBRE'#10#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -122,6 +122,11 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
||||
DatasetField = 'ANO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'ANO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'FECHA'
|
||||
end>
|
||||
end>
|
||||
Name = 'ListadoFacturasProveedor'
|
||||
@ -167,6 +172,10 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
||||
DataType = datString
|
||||
Size = 15
|
||||
end
|
||||
item
|
||||
Name = 'FECHA'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_FACTURA'
|
||||
DataType = datDateTime
|
||||
@ -393,139 +402,48 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
||||
EngineOptions.DoublePass = True
|
||||
IniFile = '\Software\Fast Reports'
|
||||
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
|
||||
PreviewOptions.OutlineWidth = 180
|
||||
PreviewOptions.Zoom = 1.000000000000000000
|
||||
PrintOptions.Printer = 'Default'
|
||||
PrintOptions.Printer = 'Por defecto'
|
||||
PrintOptions.PrintOnSheet = 0
|
||||
ReportOptions.CreateDate = 37871.995398692100000000
|
||||
ReportOptions.LastChange = 39293.765855208330000000
|
||||
ReportOptions.VersionBuild = '1'
|
||||
ReportOptions.VersionMajor = '12'
|
||||
ReportOptions.VersionMinor = '13'
|
||||
ReportOptions.VersionRelease = '1'
|
||||
ReportOptions.CreateDate = 37800.807714351900000000
|
||||
ReportOptions.LastChange = 39783.521545497690000000
|
||||
ScriptLanguage = 'PascalScript'
|
||||
ScriptText.Strings = (
|
||||
'procedure DatosClienteOnBeforePrint(Sender: TfrxComponent);'
|
||||
'procedure frxReportOnStartReport(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
' DatosCliente.Lines.Clear;'
|
||||
' DatosCliente.Lines.Add(<frxDBCabecera."CALLE">);'
|
||||
''
|
||||
' if (<frxDBCabecera."CODIGO_POSTAL"> <> '#39#39')'
|
||||
' or (<frxDBCabecera."POBLACION"> <> '#39#39') then'
|
||||
|
||||
' DatosCliente.Lines.Add(<frxDBCabecera."CODIGO_POSTAL"> + '#39' ' +
|
||||
#39' + <frxDBCabecera."POBLACION">);'
|
||||
' Set('#39'Pagina'#39', 0);'
|
||||
' Set('#39'TotalPaginas'#39', 0); '
|
||||
'end;'
|
||||
''
|
||||
'procedure BandaDetallesOnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
' BandaDetalles.StartNewPage := False;'
|
||||
' BandaDetalles.Visible := True;'
|
||||
' MemPrecio.Style := '#39'Concepto normal'#39';'
|
||||
' MemCantidad.Style := '#39'Concepto normal'#39';'
|
||||
' MemImpTotal.Style := '#39'Concepto normal'#39';'
|
||||
' RichConcepto.Visible := True;'
|
||||
''
|
||||
' case <frxDBDetalles."TIPO_DETALLE"> of'
|
||||
' '#39'Salto'#39': begin'
|
||||
' BandaDetalles.StartNewPage := True;'
|
||||
' RichConcepto.Visible := False;'
|
||||
' end;'
|
||||
' '#39'Titulo'#39': begin'
|
||||
' MemPrecio.Style := '#39'Concepto titulo'#39';'
|
||||
' MemCantidad.Style := '#39'Concepto titulo'#39';'
|
||||
' MemImpTotal.Style := '#39'Concepto titulo'#39';'
|
||||
' end;'
|
||||
' '#39'Concepto'#39': begin'
|
||||
' MemPrecio.Style := '#39'Concepto normal'#39';'
|
||||
' MemCantidad.Style := '#39'Concepto normal'#39';'
|
||||
' MemImpTotal.Style := '#39'Concepto normal'#39';'
|
||||
' end;'
|
||||
' '#39'Subtotal'#39': begin'
|
||||
' MemPrecio.Style := '#39'Concepto subtotal'#39';'
|
||||
' MemCantidad.Style := '#39'Concepto subtotal'#39';'
|
||||
' MemImpTotal.Style := '#39'Concepto subtotal'#39';'
|
||||
' end;'
|
||||
' '#39'Descuento'#39': begin'
|
||||
' BandaDetalles.Visible := False;'
|
||||
' RichConcepto.Color := clNone;'
|
||||
' end;'
|
||||
' end;'
|
||||
''
|
||||
' RichConcepto.Color := MemImpTotal.Color;'
|
||||
' RichConcepto.Frame := MemImpTotal.Frame;'
|
||||
'end;'
|
||||
''
|
||||
'procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
|
||||
' Engine.CurY := Engine.CurY + Engine.FreeSpace - ReportSummary1' +
|
||||
'.Height - 1;'
|
||||
'end;'
|
||||
''
|
||||
'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
|
||||
'var'
|
||||
' Cadena: String;'
|
||||
'begin'
|
||||
' DatosEmpresa.Lines.Clear;'
|
||||
' DatosEmpresa.Lines.Add(<frxDBCabecera."RAZON_SOCIAL">);'
|
||||
' DatosEmpresa.Lines.Add(<frxDBCabecera."CALLE_EMPRESA">);'
|
||||
''
|
||||
' Cadena := '#39#39';'
|
||||
' if (<frxDBCabecera."TELEFONO_1"> <> '#39#39') then'
|
||||
' Cadena := '#39'TLF: '#39' + <frxDBCabecera."TELEFONO_1">;'
|
||||
' if (<frxDBCabecera."FAX"> <> '#39#39') then'
|
||||
' Cadena := Cadena + '#39' FAX: '#39' + <frxDBCabecera."FAX">;'
|
||||
' DatosEmpresa.Lines.Add(Cadena);'
|
||||
''
|
||||
' Cadena := '#39#39';'
|
||||
' if (<frxDBCabecera."CODIGO_POSTAL_EMPRESA"> <> '#39#39') then'
|
||||
' Cadena := <frxDBCabecera."CODIGO_POSTAL_EMPRESA">;'
|
||||
' if (<frxDBCabecera."POBLACION_EMPRESA"> <> '#39#39') then'
|
||||
|
||||
' Cadena := Cadena + '#39' '#39' + <frxDBCabecera."POBLACION_EMPRES' +
|
||||
'A">;'
|
||||
' if (<frxDBCabecera."PROVINCIA_EMPRESA"> <> '#39#39') then'
|
||||
|
||||
' Cadena := Cadena + '#39' - '#39' + <frxDBCabecera."PROVINCIA_EMPR' +
|
||||
'ESA">;'
|
||||
' DatosEmpresa.Lines.Add(Cadena);'
|
||||
'end;'
|
||||
''
|
||||
'procedure Memo15OnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
' Memo15.Lines.Clear;'
|
||||
' if (StrToFloat(<frxDBCabecera."BASE_IMPONIBLE">) < 0) then'
|
||||
' Memo15.Lines.Add('#39'ABONO'#39')'
|
||||
' else'
|
||||
' Memo15.Lines.Add('#39'FACTURA'#39')'
|
||||
'end;'
|
||||
''
|
||||
'procedure Memo20OnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
' if (StrToFloat(<frxDBCabecera."RE">) = 0) then'
|
||||
' begin'
|
||||
' Memo20.Lines.Clear;'
|
||||
' Memo28.Lines.Clear;'
|
||||
' Memo21.Lines.Clear;'
|
||||
' Memo29.Lines.Clear;'
|
||||
' end;'
|
||||
''
|
||||
'end;'
|
||||
''
|
||||
'procedure Band2OnBeforePrint(Sender: TfrxComponent);'
|
||||
'procedure Band1OnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
' if not Engine.FinalPass then'
|
||||
' Set('#39'TotalPaginas'#39', (<TotalPaginas> + 1));'
|
||||
''
|
||||
' if Engine.FinalPass then'
|
||||
' Set('#39'Pagina'#39', (<Pagina> + 1));'
|
||||
' Set('#39'Pagina'#39', (<Pagina> + 1)); '
|
||||
'end;'
|
||||
''
|
||||
'procedure frxReportOnStartReport(Sender: TfrxComponent);'
|
||||
'procedure mContinuaOnBeforePrint(Sender: TfrxComponent);'
|
||||
'begin'
|
||||
' Set('#39'Pagina'#39', 0);'
|
||||
' Set('#39'TotalPaginas'#39', 0);'
|
||||
' if Engine.FinalPass then'
|
||||
' begin'
|
||||
|
||||
' //A la vez que salta este salta la asignacion de pagina por ' +
|
||||
'lo que no coincide nunca si no suponemos +1 ' +
|
||||
' ' +
|
||||
' ' +
|
||||
' ' +
|
||||
' '
|
||||
' if ((<Pagina> + 1) = <TotalPaginas>) then'
|
||||
' begin '
|
||||
' mContinua.Visible := True;'
|
||||
' end '
|
||||
' else'
|
||||
' begin '
|
||||
' mContinua.Visible := False;'
|
||||
' end '
|
||||
' end; '
|
||||
'end;'
|
||||
''
|
||||
'begin'
|
||||
@ -541,205 +459,67 @@ object RptFacturasProveedor: TRptFacturasProveedor
|
||||
RemoteUpdatesOptions = []
|
||||
Fields = <
|
||||
item
|
||||
Name = 'ID'
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ANO'
|
||||
DataType = datSmallInt
|
||||
end
|
||||
item
|
||||
Name = 'MES'
|
||||
DataType = datSmallInt
|
||||
end
|
||||
item
|
||||
Name = 'TITULO'
|
||||
DataType = datString
|
||||
Size = 19
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_FACTURA'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'TIENDA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_NETO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'BASE_IMPONIBLE'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'DESCUENTO'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_DESCUENTO'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IVA'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_IVA'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'RE'
|
||||
DataType = datFloat
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_RE'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'OBSERVACIONES'
|
||||
DataType = datMemo
|
||||
end
|
||||
item
|
||||
Name = 'FORMA_PAGO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'ID_PROVEEDOR'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'NIF_CIF'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CALLE'
|
||||
Name = 'SITUACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Size = 19
|
||||
end
|
||||
item
|
||||
Name = 'PROVINCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL'
|
||||
DataType = datString
|
||||
Size = 10
|
||||
end
|
||||
item
|
||||
Name = 'POBLACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'TITULAR'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'ENTIDAD'
|
||||
Name = 'NIF_CIF'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
end
|
||||
item
|
||||
Name = 'SUCURSAL'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
Name = 'FECHA'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'DC'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
Name = 'FECHA_FACTURA'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'CUENTA'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
Name = 'BASE_IMPONIBLE'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
Name = 'IMPORTE_IVA'
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'NIF_CIF_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
end
|
||||
item
|
||||
Name = 'RAZON_SOCIAL'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CALLE_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'POBLACION_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PROVINCIA_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL_EMPRESA'
|
||||
DataType = datString
|
||||
Size = 10
|
||||
end
|
||||
item
|
||||
Name = 'TELEFONO_1'
|
||||
DataType = datString
|
||||
Size = 25
|
||||
end
|
||||
item
|
||||
Name = 'FAX'
|
||||
DataType = datString
|
||||
Size = 25
|
||||
end
|
||||
item
|
||||
Name = 'MOVIL_1'
|
||||
DataType = datString
|
||||
Size = 25
|
||||
end
|
||||
item
|
||||
Name = 'EMAIL_1'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PAGINA_WEB'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'REGISTRO_MERCANTIL'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'LOGOTIPO'
|
||||
DataType = datBlob
|
||||
end>
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID'
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datCurrency
|
||||
end>
|
||||
Params = <>
|
||||
LogChanges = False
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteFetchEnabled = False
|
||||
|
||||
@ -210,7 +210,7 @@ begin
|
||||
|
||||
tbl_InformeListadoFacturas.Active := True;
|
||||
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, tbl_InformeListadoFacturas.FieldByName('ID_EMPRESA').AsString);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, IntTostr(IdEmpresa));
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe' + TipoInforme));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user