En el informe, quitar observaciones y poner ahí la lista de fechas de vencimiento de la factura/abono.
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@44 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
62ba18599d
commit
d1434e7d4d
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -16,6 +16,7 @@ inherited fEditorPreview: TfEditorPreview
|
||||
ExplicitWidth = 650
|
||||
inherited Image1: TImage
|
||||
Left = 623
|
||||
ExplicitLeft = 623
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
@ -169,7 +170,7 @@ inherited fEditorPreview: TfEditorPreview
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Panels = <
|
||||
item
|
||||
Width = 50
|
||||
Width = 150
|
||||
end
|
||||
item
|
||||
Width = 50
|
||||
|
||||
@ -894,6 +894,45 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
end>
|
||||
BusinessRulesClient.ScriptLanguage = rslPascalScript
|
||||
BusinessRulesServer.ScriptLanguage = rslPascalScript
|
||||
end
|
||||
item
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID_FACTURA'
|
||||
BlobType = dabtUnknown
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end>
|
||||
Statements = <
|
||||
item
|
||||
Connection = 'IBX'
|
||||
TargetTable = 'FACTURAS_CLIENTE'
|
||||
SQL =
|
||||
'SELECT'#10' V_RECIBOS_CLIENTE.FECHA_VENCIMIENTO'#10'FROM V_RECIBOS_CL' +
|
||||
'IENTE'#10'WHERE V_RECIBOS_CLIENTE.ID_FACTURA = :ID_FACTURA'#10'ORDER BY ' +
|
||||
'V_RECIBOS_CLIENTE.FECHA_VENCIMIENTO'
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
DatasetField = 'FECHA_VENCIMIENTO'
|
||||
TableField = 'FECHA_VENCIMIENTO'
|
||||
end>
|
||||
end>
|
||||
Name = 'InformeFacturasCliente_Vencimientos'
|
||||
Fields = <
|
||||
item
|
||||
Name = 'FECHA_VENCIMIENTO'
|
||||
DataType = datDateTime
|
||||
BlobType = dabtUnknown
|
||||
DisplayWidth = 0
|
||||
Alignment = taLeftJustify
|
||||
InPrimaryKey = False
|
||||
Calculated = False
|
||||
Lookup = False
|
||||
LookupCache = False
|
||||
end>
|
||||
BusinessRulesClient.ScriptLanguage = rslPascalScript
|
||||
BusinessRulesServer.ScriptLanguage = rslPascalScript
|
||||
end>
|
||||
Commands = <>
|
||||
RelationShips = <>
|
||||
@ -1201,7 +1240,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
PreviewOptions.Zoom = 1.000000000000000000
|
||||
PrintOptions.Printer = 'Default'
|
||||
ReportOptions.CreateDate = 37871.995398692100000000
|
||||
ReportOptions.LastChange = 39164.767996053240000000
|
||||
ReportOptions.LastChange = 39248.500509259260000000
|
||||
ReportOptions.VersionBuild = '1'
|
||||
ReportOptions.VersionMajor = '12'
|
||||
ReportOptions.VersionMinor = '13'
|
||||
@ -1240,7 +1279,9 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
' 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';'
|
||||
@ -1314,6 +1355,19 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
''
|
||||
'end;'
|
||||
''
|
||||
'procedure Memo11OnBeforePrint(Sender: TfrxComponent);'
|
||||
'var'
|
||||
' Cadena : String;'
|
||||
'begin'
|
||||
' if (<frxDBCabecera."TITULAR"> <> '#39#39') then'
|
||||
' begin'
|
||||
' Cadena := Memo11.Lines.Text;'
|
||||
' Memo11.Lines.Clear;'
|
||||
' Memo11.Lines.Add(<frxDBCabecera."TITULAR">);'
|
||||
' Memo11.Lines.Add(Cadena);'
|
||||
' end'
|
||||
'end;'
|
||||
''
|
||||
'begin'
|
||||
''
|
||||
'end.')
|
||||
@ -1329,6 +1383,10 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
item
|
||||
DataSet = frxDBDetalles
|
||||
DataSetName = 'frxDBDetalles'
|
||||
end
|
||||
item
|
||||
DataSet = frxDBDataset1
|
||||
DataSetName = 'frxDBVencimientos'
|
||||
end>
|
||||
Variables = <>
|
||||
Style = <
|
||||
@ -1372,7 +1430,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
end
|
||||
object frxDBCabecera: TfrxDBDataset
|
||||
UserName = 'frxDBCabecera'
|
||||
CloseDataSource = False
|
||||
CloseDataSource = True
|
||||
DataSource = DADataCabecera
|
||||
Left = 264
|
||||
Top = 16
|
||||
@ -1384,4 +1442,35 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
Left = 344
|
||||
Top = 16
|
||||
end
|
||||
object DADataVencimientos: TDADataSource
|
||||
DataTable = tbl_Vencimientos
|
||||
Left = 264
|
||||
Top = 184
|
||||
end
|
||||
object tbl_Vencimientos: TDACDSDataTable
|
||||
RemoteUpdatesOptions = []
|
||||
Fields = <>
|
||||
Params = <>
|
||||
MasterMappingMode = mmDataRequest
|
||||
LogChanges = False
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteFetchEnabled = False
|
||||
SchemaCall.Params = <>
|
||||
DataRequestCall.Params = <>
|
||||
DataUpdateCall.Params = <>
|
||||
ScriptCall.Params = <>
|
||||
ReadOnly = False
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
IndexDefs = <>
|
||||
Left = 264
|
||||
Top = 240
|
||||
end
|
||||
object frxDBDataset1: TfrxDBDataset
|
||||
UserName = 'frxDBVencimientos'
|
||||
CloseDataSource = True
|
||||
DataSource = DADataVencimientos
|
||||
Left = 344
|
||||
Top = 184
|
||||
end
|
||||
end
|
||||
|
||||
@ -25,9 +25,12 @@ type
|
||||
frxChartObject1: TfrxChartObject;
|
||||
frxDBCabecera: TfrxDBDataset;
|
||||
frxDBDetalles: TfrxDBDataset;
|
||||
DADataVencimientos: TDADataSource;
|
||||
tbl_Vencimientos: TDACDSDataTable;
|
||||
schReport: TDASchema;
|
||||
DataDictionary: TDADataDictionary;
|
||||
frxReport: TfrxReport;
|
||||
frxDBDataset1: TfrxDBDataset;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
@ -48,6 +51,7 @@ const
|
||||
{ Dataset names for schReport }
|
||||
ds_InformeFacturasCliente = 'InformeFacturasCliente';
|
||||
ds_InformeFacturasCliente_Detalles = 'InformeFacturasCliente_Detalles';
|
||||
ds_InformeFacturasCliente_Vencimientos = 'InformeFacturasCliente_Vencimientos';
|
||||
|
||||
|
||||
{ TRptFacturasCliente }
|
||||
@ -64,6 +68,7 @@ function TRptFacturasCliente.GenerarFactura(const AFacturaID: Integer): Binary;
|
||||
var
|
||||
dsMaster: IDADataset;
|
||||
dsDetail: IDADataset;
|
||||
dsVencimientos : IDADataset;
|
||||
AStream: TMemoryStream;
|
||||
begin
|
||||
AStream := TMemoryStream.Create;
|
||||
@ -72,7 +77,8 @@ begin
|
||||
try
|
||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasCliente, ['ID'], [AFacturaID]);
|
||||
dsDetail := schReport.NewDataset(FConnection, ds_InformeFacturasCliente_Detalles, ['ID_FACTURA'], [AFacturaID], False);
|
||||
|
||||
dsVencimientos := schReport.NewDataset(FConnection, ds_InformeFacturasCliente_Vencimientos, ['ID_FACTURA'], [AFacturaID], False);
|
||||
|
||||
AStream.Clear;
|
||||
DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
|
||||
DABINAdapter.ReadDataset(AStream, tbl_FacturaCliente, TRUE, '', TRUE, TRUE);
|
||||
@ -81,6 +87,10 @@ begin
|
||||
DABINAdapter.WriteDataset(AStream, dsDetail, [woRows, woSchema], -1);
|
||||
DABINAdapter.ReadDataset(AStream, tbl_DetallesFacturaCliente, TRUE, '', TRUE, TRUE);
|
||||
|
||||
AStream.Clear;
|
||||
DABINAdapter.WriteDataset(AStream, dsVencimientos, [woRows, woSchema], -1);
|
||||
DABINAdapter.ReadDataset(AStream, tbl_Vencimientos, TRUE, '', TRUE, TRUE);
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptFacturaCliente, True);
|
||||
frxReport.PrepareReport;
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
|
||||
Reference in New Issue
Block a user