From f538f77267cb1a0cdd175b3d4f437462a7d0f215 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 13 Jan 2008 22:05:03 +0000 Subject: [PATCH] Presupuestos: repaso general. git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@216 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/Informes/InfPresupuestoCliente.fr3 | 24 ++--- .../uRptPresupuestosCliente_Server.dfm | 22 ++++- .../uRptPresupuestosCliente_Server.pas | 4 +- .../Views/uViewDetallesPresupuestoCliente.dfm | 92 ++++++++++--------- .../Views/uViewPresupuestosCliente.dfm | 8 -- .../Views/uViewPresupuestosCliente.pas | 27 ++---- 6 files changed, 88 insertions(+), 89 deletions(-) diff --git a/Source/Informes/InfPresupuestoCliente.fr3 b/Source/Informes/InfPresupuestoCliente.fr3 index 40ca9a43..af21ec0b 100644 --- a/Source/Informes/InfPresupuestoCliente.fr3 +++ b/Source/Informes/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -64,44 +64,44 @@ - - + + - + - + - + - + - - + + - + - + - + diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm index 64827cec..477f746d 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm @@ -606,7 +606,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 39065.872423495400000000 - ReportOptions.LastChange = 39428.443868634260000000 + ReportOptions.LastChange = 39460.834465046300000000 ScriptLanguage = 'PascalScript' ScriptText.Strings = ( '' @@ -704,6 +704,26 @@ object RptPresupuestosCliente: TRptPresupuestosCliente ' ' 'end;' '' + 'procedure Memo45OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if Engine.FinalPass then' + ' begin ' + ' Set('#39'Capitulo'#39', ( + 1));' + ' if ( = 1) then' + + ' MasterData1.Visible := False; ' + + ' ' + ' end' + ' else' + ' Set('#39'NumCapitulos'#39', ( + 1)); ' + 'end;' + '' + 'procedure Memo47OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if (Length() = 0) then' + ' Memo47.Visible := False; ' + 'end;' + '' 'begin' '' 'end.') diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas index de85a7c8..ad92df38 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas @@ -141,7 +141,7 @@ var dsCapitulos: IDADataset; I: Integer; begin - AStream := TMemoryStream.Create; + //AStream := TMemoryStream.Create; try { dsCabecera := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]); @@ -188,7 +188,7 @@ begin frxReport.LoadFromFile(DarRutaInformes + rptInforme, True); frxReport.PrepareReport(False); finally - AStream.Free; + //AStream.Free; dsCabecera := Nil; dsCapitulos := Nil; end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm index 09464d74..b9cf3e73 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewDetallesPresupuestoCliente.dfm @@ -1,51 +1,37 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente inherited ToolBar1: TToolBar - Height = 73 - ExplicitHeight = 73 - inherited ToolButton3: TToolButton - Wrap = False - end - inherited ToolButton4: TToolButton - Left = 278 - Top = 0 - ExplicitLeft = 278 - ExplicitTop = 0 - end - inherited ToolButton14: TToolButton - Left = 334 - Top = 0 - ExplicitLeft = 334 - ExplicitTop = 0 - end - inherited FontName: TJvFontComboBox + Height = 100 + ExplicitHeight = 100 + inherited FontName: TJvFontComboBox [4] + Left = 56 Top = 22 + ExplicitLeft = 56 ExplicitTop = 22 end + inherited ToolButton14: TToolButton [5] + Left = 201 + Wrap = False + ExplicitLeft = 201 + end inherited FontSize: TEdit + Left = 266 Top = 22 + ExplicitLeft = 266 ExplicitTop = 22 end inherited UpDown1: TUpDown + Left = 308 Top = 22 + ExplicitLeft = 308 ExplicitTop = 22 end - inherited ToolButton13: TToolButton + inherited ToolButton11: TToolButton [8] + Left = 325 Top = 22 + ExplicitLeft = 325 ExplicitTop = 22 end - inherited ToolButton6: TToolButton - Top = 22 - ExplicitTop = 22 - end - inherited ToolButton7: TToolButton - Top = 22 - ExplicitTop = 22 - end - inherited ToolButton8: TToolButton - Top = 22 - ExplicitTop = 22 - end - inherited ToolButton12: TToolButton + inherited ToolButton12: TToolButton [9] Left = 0 Top = 22 Wrap = True @@ -53,37 +39,53 @@ inherited frViewDetallesPresupuestoCliente: TfrViewDetallesPresupuestoCliente ExplicitTop = 22 ExplicitHeight = 30 end - inherited ToolButton9: TToolButton + inherited ToolButton9: TToolButton [10] Left = 0 Top = 52 ExplicitLeft = 0 ExplicitTop = 52 end - inherited ToolButton10: TToolButton + inherited ToolButton10: TToolButton [11] Left = 145 Top = 52 ExplicitLeft = 145 ExplicitTop = 52 end - inherited ToolButton11: TToolButton - Left = 270 + inherited ToolButton13: TToolButton [12] + Left = 0 Top = 52 - ExplicitLeft = 270 + Wrap = True + ExplicitLeft = 0 ExplicitTop = 52 + ExplicitHeight = 30 + end + inherited ToolButton6: TToolButton [13] + Left = 0 + Top = 82 + ExplicitLeft = 0 + ExplicitTop = 82 + end + inherited ToolButton7: TToolButton [14] + Left = 66 + Top = 82 + ExplicitLeft = 66 + ExplicitTop = 82 + end + inherited ToolButton8: TToolButton [15] + Left = 133 + Top = 82 + ExplicitLeft = 133 + ExplicitTop = 82 end end inherited cxGrid: TcxGrid - Top = 99 - Height = 205 + Top = 126 + Height = 178 ExplicitTop = 99 ExplicitHeight = 205 - inherited cxGridView: TcxGridDBTableView - OptionsView.ShowEditButtons = gsebNever - end end inherited TBXDock1: TTBXDock - Top = 73 - ExplicitTop = 73 - ExplicitWidth = 451 + Top = 100 + ExplicitTop = 68 end end diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm index 313dcfeb..429be060 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm @@ -163,14 +163,6 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente inherited dxLayoutControl1: TdxLayoutControl Width = 931 ExplicitWidth = 931 - inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 273 - Width = 273 - end - inherited edtFechaIniFiltro: TcxDateEdit - ExplicitWidth = 121 - Width = 121 - end inherited edtFechaFinFiltro: TcxDateEdit Left = 383 ExplicitLeft = 383 diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas index 5d4127c9..e6e19bab 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas @@ -51,9 +51,6 @@ type cxGridViewINCIDENCIAS: TcxGridDBColumn; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); - procedure cxGridViewCODIGOCustomDrawCell(Sender: TcxCustomGridTableView; - ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var - ADone: Boolean); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -178,9 +175,10 @@ begin AnadirFiltroFechas; //Finalmente activamos el filtro si tenemos algo - if cxGridView.DataController.Filter.IsEmpty - then cxGridView.DataController.Filter.Active := False - else cxGridView.DataController.Filter.Active := True; + if cxGridView.DataController.Filter.IsEmpty then + cxGridView.DataController.Filter.Active := False + else + cxGridView.DataController.Filter.Active := True; cxGrid.ActiveLevel.GridView := cxGridView; end; @@ -190,19 +188,6 @@ begin RefrescarFiltro; end; -procedure TfrViewPresupuestosCliente.cxGridViewCODIGOCustomDrawCell(Sender: - TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: - TcxGridTableDataCellViewInfo; var ADone: Boolean); -var - R: TRect; -begin - inherited; -{ R := AViewInfo.ContentBounds; - ACanvas.FillRect(R); - ACanvas.DrawImage(PngImageList, R.Left, R.Top, 2); - ADone := True;} -end; - procedure TfrViewPresupuestosCliente.cxGridViewIDCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); @@ -215,9 +200,9 @@ begin if (cxGridView.DataController.DisplayTexts[AViewInfo.GridRecord.RecordIndex, cxGridViewINCIDENCIASACTIVAS.Index] = 'Sin incidencias') then - ACanvas.DrawImage(PngImageList, R.Left, R.Top, 0) + ACanvas.DrawImage(PngImageList, R.Left + 2, R.Top + 2, 0) else - ACanvas.DrawImage(PngImageList, R.Left, R.Top, 1); + ACanvas.DrawImage(PngImageList, R.Left + 2, R.Top + 2, 1); ADone := True; end;