From 075b96ade57bd9b6e46108654dd74ce2f84db2d9 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 20 Oct 2008 10:27:58 +0000 Subject: [PATCH] =?UTF-8?q?M=C3=B3dulo=20de=20informes=20(sin=20terminar)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@704 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/Cliente/uPantallaPrincipal.dfm | 10 ++ Source/Cliente/uPantallaPrincipal.pas | 8 ++ Source/GUIBase/uEditorPreview.dfm | 2 +- Source/GUIBase/uEditorPreview.pas | 8 +- .../GestorInformes_Group.groupproj | 16 +++- .../Plugin/GestorInformes_plugin.dproj | 27 +----- .../Plugin/GestorInformes_plugin.res | Bin 384 -> 4748 bytes .../Views/GestorInformes_view.dpk | 7 +- .../Views/GestorInformes_view.dproj | 22 ++--- .../Views/GestorInformes_view.res | Bin 384 -> 4748 bytes .../Views/uEditorInformeBase.dfm | 11 ++- .../uEditorInformeFacturasClienteReport.dfm | 86 +++++++++++++----- .../uEditorInformeFacturasClienteReport.pas | 36 ++++---- .../Views/uViewFiltroClientes.dfm | 30 +++--- .../Views/uViewFiltroClientes.pas | 78 ++++++++++++---- .../Views/uViewFiltroImportes.dfm | 16 ++-- .../Views/uViewFiltroImportes.pas | 11 +-- 17 files changed, 232 insertions(+), 136 deletions(-) diff --git a/Source/Cliente/uPantallaPrincipal.dfm b/Source/Cliente/uPantallaPrincipal.dfm index e0e0fb46..da60c030 100644 --- a/Source/Cliente/uPantallaPrincipal.dfm +++ b/Source/Cliente/uPantallaPrincipal.dfm @@ -302,6 +302,12 @@ object fPantallaPrincipal: TfPantallaPrincipal Caption = 'Empresa' OnUpdate = actMenuComprasUpdate end + object actMenuInformes: TAction + Category = 'Menus' + Caption = 'Informes' + OnExecute = actMenuInformesExecute + OnUpdate = actMenuComprasUpdate + end end object ModulesSmallImageList: TPngImageList PngImages = < @@ -648,6 +654,10 @@ object fPantallaPrincipal: TfPantallaPrincipal Caption = '-' end end + object Informes1: TMenuItem + Tag = 6000 + Caption = 'Informes' + end end object JvXPMenuItemPainter1: TJvXPMenuItemPainter SelectionFrameBrush.Color = 13811126 diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index 926f6cd3..2f4b6672 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -89,6 +89,8 @@ type N9: TMenuItem; N10: TMenuItem; actMenuEmpresa: TAction; + Informes1: TMenuItem; + actMenuInformes: TAction; procedure FormCreate(Sender: TObject); procedure Salir1Click(Sender: TObject); procedure actSalirExecute(Sender: TObject); @@ -113,6 +115,7 @@ type procedure Perfiles1Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure actMenuInformesExecute(Sender: TObject); private FContenido : TCustomEditor; procedure ShowEmbedded(AEditor : ICustomEditor); @@ -362,6 +365,11 @@ begin (Sender as TAction).Enabled := Assigned(AppFactuGES.EmpresaActiva); end; +procedure TfPantallaPrincipal.actMenuInformesExecute(Sender: TObject); +begin + // +end; + procedure TfPantallaPrincipal.actMenuLogisticaExecute(Sender: TObject); begin // diff --git a/Source/GUIBase/uEditorPreview.dfm b/Source/GUIBase/uEditorPreview.dfm index 04f85244..e0f99664 100644 --- a/Source/GUIBase/uEditorPreview.dfm +++ b/Source/GUIBase/uEditorPreview.dfm @@ -6,7 +6,7 @@ inherited fEditorPreview: TfEditorPreview OnDestroy = FormDestroy OnResize = FormResize ExplicitWidth = 803 - ExplicitHeight = 485 + ExplicitHeight = 492 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader diff --git a/Source/GUIBase/uEditorPreview.pas b/Source/GUIBase/uEditorPreview.pas index 98f31618..61f4067b 100644 --- a/Source/GUIBase/uEditorPreview.pas +++ b/Source/GUIBase/uEditorPreview.pas @@ -382,14 +382,14 @@ end; procedure TfEditorPreview.actToolHandExecute(Sender: TObject); begin - if tbxMano.Checked then - FPreview.Preview.Tool := ptHand + actToolHand.Checked := True; + FPreview.Preview.Tool := ptHand end; procedure TfEditorPreview.actToolZoomExecute(Sender: TObject); begin - if tbxZoom.Checked then - FPreview.Preview.Tool := ptZoom; + actToolZoom.Checked := True; + FPreview.Preview.Tool := ptZoom; end; procedure TfEditorPreview.OnPageChanged(Sender: TfrxPreview; diff --git a/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj b/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj index b15cea29..3c2c84be 100644 --- a/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj +++ b/Source/Modulos/Gestor de informes/GestorInformes_Group.groupproj @@ -9,6 +9,7 @@ + @@ -48,6 +49,15 @@ + + + + + + + + + @@ -112,13 +122,13 @@ - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj index 5f294be4..354acee4 100644 --- a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj +++ b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.dproj @@ -38,28 +38,11 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - + + + + + diff --git a/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.res b/Source/Modulos/Gestor de informes/Plugin/GestorInformes_plugin.res index 8b251f312bcccec5485024f6fe8d80e1cdf25746..1641339fcc482e7e3492d1b45813a86619622c33 100644 GIT binary patch literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP delta 11 ScmeBCZD5|Duvteife`=|>;pCc diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk index f50a8760..957907b0 100644 --- a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk +++ b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dpk @@ -25,20 +25,21 @@ package GestorInformes_view; {$IMPLICITBUILD OFF} requires + rtl, + vcl, Base, GUIBase, ApplicationBase, Contactos_view, GestorInformes_controller, - rtl, - vcl; + Contactos_model, + Contactos_controller; contains uGestorInformesViewRegister in 'uGestorInformesViewRegister.pas', uEditorInformeIVAClientesReport in 'uEditorInformeIVAClientesReport.pas' {fEditorInformeIVAClientesReport: TfEditorElegirFacturasCliente}, uViewPeriodoFechas in 'uViewPeriodoFechas.pas' {frViewPeriodoFechas: TFrame}, uViewFiltroImportes in 'uViewFiltroImportes.pas' {frViewFiltroImportes: TFrame}, - uViewFiltroClientes_anterior in 'uViewFiltroClientes_anterior.pas' {frViewFiltroClientes_anterior: TFrame}, uEditorInformeFacturasClienteReport in 'uEditorInformeFacturasClienteReport.pas' {TfEditorInformeFacturasClienteReport: TForm}, uEditorInformeBase in 'uEditorInformeBase.pas' {fEditorInformeBase: TForm}, uViewFiltroClientes in 'uViewFiltroClientes.pas' {frViewFiltroClientes: TFrame}, diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj index d990f826..9b718f17 100644 --- a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj +++ b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.dproj @@ -38,16 +38,18 @@ MainSource - - - - - - - + + + + + + + + + - T
fEditorInformeBase
+ TForm
TfEditorInformeFacturasClienteReport
@@ -60,10 +62,6 @@
frViewFiltroClientes
- T -
- -
frViewFiltroClientes_anterior
TFrame
diff --git a/Source/Modulos/Gestor de informes/Views/GestorInformes_view.res b/Source/Modulos/Gestor de informes/Views/GestorInformes_view.res index 8b251f312bcccec5485024f6fe8d80e1cdf25746..1641339fcc482e7e3492d1b45813a86619622c33 100644 GIT binary patch literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP delta 11 ScmeBCZD5|Duvteife`=|>;pCc diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm index fe6d8da6..de408e28 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeBase.dfm @@ -44,6 +44,8 @@ inherited fEditorInformeBase: TfEditorInformeBase Left = 0 Top = 0 Caption = 'Par'#225'metros' + CloseButton = False + CloseButtonWhenDocked = False DefaultDock = TBXMultiDockDerecho DockableTo = [dpLeft, dpRight] DockedWidth = 150 @@ -55,20 +57,23 @@ inherited fEditorInformeBase: TfEditorInformeBase TabOrder = 0 object TBXDockablePanel1: TTBXDockablePanel Left = 0 - Top = 280 + Top = 279 + MaxClientHeight = 50 Align = alBottom Caption = 'TBXDockablePanel1' FloatingWidth = 128 FloatingHeight = 128 SupportedDocks = [dkStandardDock, dkMultiDock] TabOrder = 0 + ExplicitTop = 196 object TBXButton1: TTBXButton Left = 16 Top = 12 Width = 121 - Height = 21 + Height = 24 Action = actRefrescar - ImageIndex = 0 + ImageIndex = 9 + Images = SmallImages TabOrder = 0 end end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm index 0248a670..6b5bb0b6 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.dfm @@ -1,9 +1,9 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteReport Caption = 'fEditorInformeFacturasClienteReport' - ClientHeight = 514 + ClientHeight = 655 ClientWidth = 895 ExplicitWidth = 903 - ExplicitHeight = 548 + ExplicitHeight = 689 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader @@ -30,26 +30,26 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep end end inherited StatusBar: TJvStatusBar - Top = 495 + Top = 636 Width = 895 - ExplicitTop = 495 + ExplicitTop = 554 ExplicitWidth = 895 end inherited TBXMultiDockIzquierdo: TTBXMultiDock - Height = 393 - ExplicitHeight = 393 + Height = 534 + ExplicitHeight = 452 end inherited TBXMultiDockDerecho: TTBXMultiDock Left = 703 Width = 192 - Height = 393 + Height = 534 ExplicitLeft = 703 ExplicitWidth = 192 - ExplicitHeight = 393 + ExplicitHeight = 452 inherited pnlParametros: TTBXDockablePanel DockedWidth = 188 ExplicitWidth = 192 - ExplicitHeight = 377 + ExplicitHeight = 518 inline frViewPeriodoFechas1: TfrViewPeriodoFechas [0] Left = 0 Top = 0 @@ -64,23 +64,23 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitWidth = 223 + ExplicitWidth = 188 ExplicitHeight = 136 inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 182 - ExplicitWidth = 217 + ExplicitWidth = 182 inherited cbPeriodo: TcxComboBox Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 188 + ExplicitWidth = 153 Width = 153 end end inherited TBXAlignmentPanel2: TTBXAlignmentPanel Width = 182 - ExplicitWidth = 217 + ExplicitWidth = 182 inherited Label3: TLabel Width = 172 end @@ -89,7 +89,7 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 134 + ExplicitWidth = 99 Width = 99 end inherited edtFechaIni: TcxDateEdit @@ -97,21 +97,37 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 132 + ExplicitWidth = 97 Width = 97 end end inherited TBXLabel2: TTBXLabel Width = 188 - ExplicitWidth = 223 + ExplicitWidth = 188 end end inherited TBXDockablePanel1: TTBXDockablePanel - Top = 227 + Top = 448 TabOrder = 2 - ExplicitTop = 227 - ExplicitWidth = 223 - ExplicitHeight = 128 + ExplicitTop = 366 + ExplicitWidth = 188 + ExplicitHeight = 48 + inherited TBXButton1: TTBXButton + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 182 + Height = 37 + Margins.Left = 8 + Margins.Top = 8 + Margins.Right = 8 + Margins.Bottom = 8 + Align = alTop + ExplicitLeft = 3 + ExplicitTop = 3 + ExplicitWidth = 182 + ExplicitHeight = 37 + end end inline frViewFiltroImportes1: TfrViewFiltroImportes Left = 0 @@ -129,15 +145,15 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep TabOrder = 1 ReadOnly = False ExplicitTop = 136 - ExplicitWidth = 223 + ExplicitWidth = 188 ExplicitHeight = 77 inherited TBXLabel2: TTBXLabel Width = 188 - ExplicitWidth = 223 + ExplicitWidth = 188 end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 182 - ExplicitWidth = 217 + ExplicitWidth = 182 inherited eImporte: TcxSpinEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' @@ -146,6 +162,30 @@ inherited fEditorInformeFacturasClienteReport: TfEditorInformeFacturasClienteRep end end end + inline frViewFiltroClientes1: TfrViewFiltroClientes + Left = 0 + Top = 213 + Width = 188 + Height = 195 + Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 3 + ReadOnly = False + inherited TBXLabel2: TTBXLabel + Width = 188 + end + inherited edtCliente: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + end + end end end end diff --git a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas index 6583a17c..050539f4 100644 --- a/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas +++ b/Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasClienteReport.pas @@ -17,10 +17,11 @@ uses uIEditorInformeBase, uViewParametrosInforme, uIEditorInformeFacturasClienteReport; type - TfEditorInformeFacturasClienteReport = class(TfEditorInformeBase, IEditorInformeFacturasClienteReport) + TfEditorInformeFacturasClienteReport = class(TfEditorInformeBase, IEditorInformeFacturasClienteReport) TBXItem58: TTBXItem; frViewPeriodoFechas1: TfrViewPeriodoFechas; frViewFiltroImportes1: TfrViewFiltroImportes; + frViewFiltroClientes1: TfrViewFiltroClientes; procedure actRefrescarExecute(Sender: TObject); private FListaIDClientes: TIntegerArray; @@ -29,7 +30,6 @@ type function GetListaIDClientes: TIntegerArray; function GetImporteMinimo: Currency; function GetDesglosadoCliente: Boolean; - procedure OnClienteChanged(Sender: TObject); procedure RefrescarInforme; @@ -38,7 +38,7 @@ type property FechaFin: TDateTime read GetFechaFin; property ListaIDClientes: TIntegerArray read GetListaIDClientes; property DesglosadoCliente: Boolean read GetDesglosadoCliente; - property ImporteMinimo: Currency read getImporteMinimo; + property ImporteMinimo: Currency read GetImporteMinimo; constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -63,22 +63,20 @@ constructor TfEditorInformeFacturasClienteReport.Create(AOwner: TComponent); begin inherited; FListaIDClientes := TIntegerArray.Create; - //frViewFiltroClientes1.OnClienteChanged := OnClienteChanged; end; destructor TfEditorInformeFacturasClienteReport.Destroy; begin FListaIDClientes.Free; - //frViewFiltroClientes1.OnClienteChanged := Nil; inherited; end; function TfEditorInformeFacturasClienteReport.GetDesglosadoCliente: Boolean; begin -{ if frViewFiltroClientes1.cbxDesglosado.Enabled then - Result := frViewFiltroClientes1.cbxDesglosado.Checked + if frViewFiltroImportes1.cbxDesglosado.Enabled then + Result := frViewFiltroClientes1.cbxDesglosado.Checked else - Result := False;} + Result := False; end; function TfEditorInformeFacturasClienteReport.GetFechaFin: TDateTime; @@ -100,27 +98,33 @@ begin end; function TfEditorInformeFacturasClienteReport.GetListaIDClientes: TIntegerArray; -begin - Result := FListaIDClientes; -end; - -procedure TfEditorInformeFacturasClienteReport.OnClienteChanged(Sender: TObject); begin FListaIDClientes.Clear; -{ if Assigned(frViewFiltroClientes1.Cliente) then - FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID);} + if Assigned(frViewFiltroClientes1.Cliente) then + FListaIDClientes.Add(frViewFiltroClientes1.Cliente.ID); + + Result := FListaIDClientes; end; procedure TfEditorInformeFacturasClienteReport.RefrescarInforme; var AStream: Binary; begin + ShowHourglassCursor; try - AStream := (Controller as IGestorInformesController).DataModule.GetInformeIVAClientes(AppFactuGES.EmpresaActiva.ID, FechaInicio, FechaFin, ListaIDClientes, DesglosadoCliente, ImporteMinimo); + AStream := (Controller as IGestorInformesController).DataModule.GetInformeIVAClientes( + AppFactuGES.EmpresaActiva.ID, + FechaInicio, + FechaFin, + ListaIDClientes, + DesglosadoCliente, + ImporteMinimo); + LoadFromStream(AStream); Report.ShowPreparedReport; finally FreeAndNil(AStream); + HideHourglassCursor; end; end; diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm index e4879de6..1285c08f 100644 --- a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.dfm @@ -1,11 +1,13 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes - Width = 188 + Width = 184 Align = alTop - ExplicitWidth = 188 + OnCreate = CustomViewCreate + OnDestroy = CustomViewDestroy + ExplicitWidth = 451 object TBXLabel2: TTBXLabel Left = 0 Top = 0 - Width = 188 + Width = 184 Height = 29 Margins.Top = 5 Margins.Bottom = 10 @@ -21,7 +23,7 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes Underline = True ExplicitWidth = 451 end - object BitBtn1: TBitBtn + object bElegirCliente: TBitBtn AlignWithMargins = True Left = 61 Top = 123 @@ -31,8 +33,11 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes Margins.Top = 0 Margins.Right = 2 Margins.Bottom = 0 + Anchors = [akLeft, akTop, akRight] Caption = 'Elegir un cliente' + Enabled = False TabOrder = 1 + OnClick = bElegirClienteClick Glyph.Data = { 36040000424D3604000000000000360000002800000010000000100000000100 2000000000000004000000000000000000000000000000000000FF00FF00FF00 @@ -79,13 +84,12 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes State = cbChecked TabOrder = 2 end - object cxDBTextEdit1: TcxDBTextEdit - Left = 23 + object edtCliente: TcxTextEdit + Left = 28 Top = 99 + Anchors = [akLeft, akTop, akRight] AutoSize = False - DataBinding.DataField = 'NOMBRE' Enabled = False - ParentFont = False Properties.ReadOnly = True Properties.UseLeftAlignmentOnEditing = False Style.BorderColor = clWindowFrame @@ -102,9 +106,9 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes StyleHot.LookAndFeel.SkinName = '' TabOrder = 3 Height = 21 - Width = 153 + Width = 148 end - object rd1: TRadioButton + object rbTodosClientes: TRadioButton Left = 6 Top = 29 Width = 147 @@ -113,15 +117,15 @@ inherited frViewFiltroClientes: TfrViewFiltroClientes Checked = True TabOrder = 4 TabStop = True - OnClick = rd1Click + OnClick = rbTodosClientesClick end - object rd2: TRadioButton + object rbUnCliente: TRadioButton Left = 6 Top = 76 Width = 175 Height = 17 Caption = 'S'#243'lo listar el cliente siguiente:' TabOrder = 5 - OnClick = rd2Click + OnClick = rbUnClienteClick end end diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas index ae02cdf2..5359f4b6 100644 --- a/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroClientes.pas @@ -5,7 +5,8 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit, - StdCtrls, Buttons, TBXDkPanels, uViewParametrosInforme; + StdCtrls, Buttons, TBXDkPanels, uViewParametrosInforme, uBizContactos, + uClientesController; type IViewFiltroClientes = interface(IViewParametrosInforme) @@ -14,41 +15,78 @@ type TfrViewFiltroClientes = class(TfrViewParametrosInforme, IViewFiltroClientes) TBXLabel2: TTBXLabel; - rd1: TRadioButton; - rd2: TRadioButton; + rbTodosClientes: TRadioButton; + rbUnCliente: TRadioButton; cbxDesglosado: TCheckBox; - BitBtn1: TBitBtn; - cxDBTextEdit1: TcxDBTextEdit; - procedure rd1Click(Sender: TObject); - procedure rd2Click(Sender: TObject); + bElegirCliente: TBitBtn; + edtCliente: TcxTextEdit; + procedure rbTodosClientesClick(Sender: TObject); + procedure rbUnClienteClick(Sender: TObject); + procedure CustomViewCreate(Sender: TObject); + procedure bElegirClienteClick(Sender: TObject); + procedure CustomViewDestroy(Sender: TObject); private - { Private declarations } + FCliente : IBizCliente; + FClientesController : IClientesController; public - { Public declarations } + property Cliente : IBizCliente read FCliente; end; implementation {$R *.dfm} -procedure TfrViewFiltroClientes.rd1Click(Sender: TObject); +procedure TfrViewFiltroClientes.bElegirClienteClick(Sender: TObject); +var + AClientes : IBizCliente; begin - if rd1.Checked then - begin - cbxDesglosado.Enabled := True; -{ actElegirContacto.Enabled := False; - actVerContacto.Enabled := False; - Cliente := Nil;} + inherited; + AClientes := IBizCliente(FClientesController.BuscarTodos); + try + FCliente := IBizCliente(FClientesController.ElegirContacto(AClientes, '', False)); + if Assigned(FCliente) then + begin + FCliente.Open; + edtCliente.Text := FCliente.NOMBRE; + end; + finally + AClientes := NIL; end; end; -procedure TfrViewFiltroClientes.rd2Click(Sender: TObject); +procedure TfrViewFiltroClientes.CustomViewCreate(Sender: TObject); begin - if rd2.Checked then + inherited; + FCliente := NIL; + FClientesController := NIL; +end; + +procedure TfrViewFiltroClientes.CustomViewDestroy(Sender: TObject); +begin + inherited; + FCliente := NIL; + FClientesController := NIL; +end; + +procedure TfrViewFiltroClientes.rbTodosClientesClick(Sender: TObject); +begin + if rbTodosClientes.Checked then + begin + cbxDesglosado.Enabled := True; + FCliente := NIL; + bElegirCliente.Enabled := False; + end; +end; + +procedure TfrViewFiltroClientes.rbUnClienteClick(Sender: TObject); +begin + if rbUnCliente.Checked then begin cbxDesglosado.Enabled := False; -{ actElegirContacto.Enabled := True; - actVerContacto.Enabled := True;} + bElegirCliente.Enabled := True; + + if not Assigned(FClientesController) then + FClientesController := TClientesController.Create; end; end; diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm index 52d5d0af..0fc8dfb7 100644 --- a/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.dfm @@ -1,5 +1,5 @@ inherited frViewFiltroImportes: TfrViewFiltroImportes - Width = 181 + Width = 451 Height = 93 Align = alTop ExplicitWidth = 451 @@ -7,7 +7,7 @@ inherited frViewFiltroImportes: TfrViewFiltroImportes object TBXLabel2: TTBXLabel Left = 0 Top = 0 - Width = 181 + Width = 451 Height = 29 Margins.Top = 5 Margins.Bottom = 10 @@ -21,30 +21,28 @@ inherited frViewFiltroImportes: TfrViewFiltroImportes ParentColor = True ParentFont = False Underline = True - ExplicitWidth = 451 end object TBXAlignmentPanel1: TTBXAlignmentPanel AlignWithMargins = True Left = 3 Top = 32 - Width = 175 + Width = 445 Height = 42 Margins.Left = 5 Margins.Right = 5 Align = alTop AutoSize = True TabOrder = 1 - ExplicitWidth = 445 - object CheckBox1: TCheckBox + object cbxDesglosado: TCheckBox Left = 7 Top = 0 Width = 159 Height = 17 Caption = 'Solo facturas que superen:' - Checked = True - State = cbChecked + Color = clBtnFace + ParentColor = False TabOrder = 0 - OnClick = CheckBox1Click + OnClick = cbxDesglosadoClick end object eImporte: TcxSpinEdit Left = 24 diff --git a/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas index 23e340b0..bec8f367 100644 --- a/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas +++ b/Source/Modulos/Gestor de informes/Views/uViewFiltroImportes.pas @@ -13,23 +13,20 @@ type end; TfrViewFiltroImportes = class(TfrViewParametrosInforme, IViewFiltroImportes) - CheckBox1: TCheckBox; + cbxDesglosado: TCheckBox; eImporte: TcxSpinEdit; TBXLabel2: TTBXLabel; TBXAlignmentPanel1: TTBXAlignmentPanel; - procedure CheckBox1Click(Sender: TObject); + procedure cbxDesglosadoClick(Sender: TObject); end; implementation {$R *.dfm} -procedure TfrViewFiltroImportes.CheckBox1Click(Sender: TObject); +procedure TfrViewFiltroImportes.cbxDesglosadoClick(Sender: TObject); begin inherited; - if not CheckBox1.Checked then - eImporte.Enabled := True - else - eImporte.Enabled := False; + eImporte.Enabled := not eImporte.Enabled; end; end.