From 367d6dcd820c0ced4af875123244d2ee0a64f066 Mon Sep 17 00:00:00 2001 From: roberto Date: Wed, 30 Nov 2011 13:21:59 +0000 Subject: [PATCH] =?UTF-8?q?Limpieza=20de=20c=C3=B3digo?= 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.FarmaciaPH_Etiquetas/trunk@16 7b0b1a58-4aa1-b946-8089-8453ede31e50 --- Source/ApplicationBase/uPlugins_Intf.pas | 51 ---- .../Controller/uContactosController.pas | 2 +- .../Reports/uRptFichasPaciente_Server.pas | 2 +- .../Controller/uMedicacionesController.pas | 28 +- .../Views/uEditorElegirAlbaranesCliente.dfm | 239 ------------------ .../Views/uEditorElegirAlbaranesCliente.pas | 118 --------- .../uEditorElegirArticulosAlbaranCliente.dfm | 5 - .../uEditorElegirArticulosAlbaranCliente.pas | 35 --- .../Medicaciones/Views/uEditorMedicacion.dfm | 136 +++++----- .../Medicaciones/Views/uEditorMedicacion.pas | 2 +- .../Views/uEditorMedicaciones.dfm | 4 +- .../Views/uEditorMedicaciones.pas | 82 ------ .../Medicaciones/Views/uViewMedicaciones.dfm | 13 +- .../Medicaciones/Views/uViewMedicaciones.pas | 14 +- 14 files changed, 98 insertions(+), 633 deletions(-) delete mode 100644 Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.dfm delete mode 100644 Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.pas delete mode 100644 Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.dfm delete mode 100644 Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.pas diff --git a/Source/ApplicationBase/uPlugins_Intf.pas b/Source/ApplicationBase/uPlugins_Intf.pas index a901f8c..025b372 100644 --- a/Source/ApplicationBase/uPlugins_Intf.pas +++ b/Source/ApplicationBase/uPlugins_Intf.pas @@ -2,57 +2,6 @@ unit uPlugins_Intf; interface -type - IMCPresupuestosCliente = interface(IInterface) - ['{D09E6FFF-50C7-48E2-8380-4CB57B74BB93}'] - procedure VerPresupuestos(const ID_Cliente: Integer; - const ANombreCliente : String = ''); - end; - - IMCAlbaranesCliente = interface(IInterface) - ['{0B9DD25A-3E76-446A-9EA6-D43131634A1E}'] - procedure VerAlbaranes(const ID_Cliente: Integer; - const ANombreCliente : String = ''); - end; - - IMCFacturasCliente = interface(IInterface) - ['{DA2FEEA4-4B37-4510-9CE8-6223F9894DEE}'] - procedure VerFacturas(const ID_Cliente: Integer; - const ANombreCliente : String = ''); - end; - - IMCRecibosCliente = interface(IInterface) - ['{6535395A-1450-4E19-8031-F9CD3D062F6D}'] - procedure VerRecibos(const ID_Cliente: Integer; - const ANombreCliente : String = ''); - end; - - IMCPedidosProveedor = interface(IInterface) - ['{D34DF6B6-6D9E-489B-B301-AEBB4DB37629}'] - procedure VerPedidos(const ID_Proveedor: Integer; - const ANombreProveedor : String = ''); - end; - - IMCAlbaranesProveedor = interface(IInterface) - ['{B567526E-A1F8-4311-BA19-04EE508B8374}'] - procedure VerAlbaranes(const ID_Proveedor: Integer; - const ANombreProveedor : String = ''); - procedure VerDevoluciones(const ID_Proveedor: Integer; - const ANombreProveedor : String = ''); - end; - - IMCFacturasProveedor = interface(IInterface) - ['{8A48058F-490E-4BF4-9BBB-09654B66CEED}'] - procedure VerFacturas(const ID_Proveedor: Integer; - const ANombreProveedor : String = ''); - end; - - IMCRecibosProveedor = interface(IInterface) - ['{24A23E95-D148-404C-9987-B1ED4A19D3CA}'] - procedure VerRecibos(const ID_Proveedor: Integer; - const ANombreProveedor : String = ''); - end; - implementation end. diff --git a/Source/Modulos/Contactos/Controller/uContactosController.pas b/Source/Modulos/Contactos/Controller/uContactosController.pas index 79e61b8..cc2ccb1 100644 --- a/Source/Modulos/Contactos/Controller/uContactosController.pas +++ b/Source/Modulos/Contactos/Controller/uContactosController.pas @@ -175,7 +175,7 @@ begin AContacto.DataTable.CancelUpdates; HideHourglassCursor; if (Pos('FOREIGN KEY', E.Message) > 0) then - MessageBox(0, 'No se puede borrar este contacto porque tiene documentos dados de alta (como presupuestos, albaranes, facturas, etc)', 'Atención', MB_ICONWARNING or MB_OK); + MessageBox(0, 'No se puede borrar este contacto porque tiene documentos dados de alta.', 'Atención', MB_ICONWARNING or MB_OK); end; end; end; diff --git a/Source/Modulos/Contactos/Reports/uRptFichasPaciente_Server.pas b/Source/Modulos/Contactos/Reports/uRptFichasPaciente_Server.pas index 3c14fb1..efdf085 100644 --- a/Source/Modulos/Contactos/Reports/uRptFichasPaciente_Server.pas +++ b/Source/Modulos/Contactos/Reports/uRptFichasPaciente_Server.pas @@ -30,7 +30,7 @@ type procedure DataModuleDestroy(Sender: TObject); private FConnection: IDAConnection; - //Genera cada uno de los albaranes a imprimir + //Genera cada uno de las fichas a imprimir procedure _GenerarFicha(const ID: Integer); public function GenerarFicha(const ListaID: TIntegerArray): Binary; diff --git a/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas b/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas index eb53a56..1f023ee 100644 --- a/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas +++ b/Source/Modulos/Medicaciones/Controller/uMedicacionesController.pas @@ -107,8 +107,6 @@ type procedure EtiquetasPreview(AMedicacion : IBizMedicacion; Const withRefPaciente: Boolean); procedure EtiquetasPrint(AMedicacion : IBizMedicacion; Const withRefPaciente: Boolean); - {function DarListaAnosAlbaranes: TStringList; - procedure FiltrarAno(AMedicacion: IBizMedicacion; ADynWhereDataTable: WideString; const Ano: String);} end; implementation @@ -132,7 +130,7 @@ uses function TMedicacionesController.Anadir(AMedicacion: IBizMedicacion): Boolean; begin if not Assigned(AMedicacion) then - raise Exception.Create ('Albarán no asignado (Anadir)'); + raise Exception.Create ('Medicación no asignada (Anadir)'); if not AMedicacion.DataTable.Active then AMedicacion.DataTable.Active := True; @@ -567,11 +565,11 @@ end; procedure TMedicacionesController.Preview(AMedicacion: IBizMedicacion; AllItems: Boolean = false); var AReportController : IMedicacionReportController; - ID_Albaranes: TIntegerList; + ID_Medicaciones: TIntegerList; begin AReportController := TMedicacionReportController.Create; - ID_Albaranes := TIntegerList.Create; + ID_Medicaciones := TIntegerList.Create; try @@ -583,31 +581,31 @@ begin First; while not EOF do begin - ID_Albaranes.Add(AMedicacion.ID); + ID_Medicaciones.Add(AMedicacion.ID); Next; end; end; end //Solo previsualizamos el item seleccionado else - ID_Albaranes.Add(AMedicacion.ID); + ID_Medicaciones.Add(AMedicacion.ID); - AReportController.Preview(ID_Albaranes); + AReportController.Preview(ID_Medicaciones); finally AReportController := NIL; - FreeANDNIL(ID_Albaranes); + FreeANDNIL(ID_Medicaciones); end; end; procedure TMedicacionesController.Print(AMedicacion: IBizMedicacion; AllItems: Boolean = false); var AReportController : IMedicacionReportController; - ID_Albaranes: TIntegerList; + ID_Medicaciones: TIntegerList; begin AReportController := TMedicacionReportController.Create; - ID_Albaranes := TIntegerList.Create; + ID_Medicaciones := TIntegerList.Create; try //Si deseamos previsualizar todos los items del objeto albaran if AllItems then @@ -617,20 +615,20 @@ begin First; while not EOF do begin - ID_Albaranes.Add(AMedicacion.ID); + ID_Medicaciones.Add(AMedicacion.ID); Next; end; end; end //Solo previsualizamos el item seleccionado else - ID_Albaranes.Add(AMedicacion.ID); + ID_Medicaciones.Add(AMedicacion.ID); - AReportController.Print(ID_Albaranes); + AReportController.Print(ID_Medicaciones); finally AReportController := NIL; - FreeANDNIL(ID_Albaranes); + FreeANDNIL(ID_Medicaciones); end; end; diff --git a/Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.dfm b/Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.dfm deleted file mode 100644 index aa60e0c..0000000 --- a/Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.dfm +++ /dev/null @@ -1,239 +0,0 @@ -inherited fEditorElegirAlbaranesCliente: TfEditorElegirAlbaranesCliente - Caption = 'Seleccionar albar'#195#161'n de cliente' - ClientWidth = 790 - ExplicitWidth = 798 - ExplicitHeight = 538 - PixelsPerInch = 96 - TextHeight = 13 - inherited JvNavPanelHeader: TJvNavPanelHeader - Top = 139 - Width = 790 - Visible = False - ExplicitLeft = -8 - ExplicitTop = 280 - ExplicitWidth = 790 - inherited Image1: TImage - Left = 763 - ExplicitLeft = 629 - end - end - inherited TBXDock: TTBXDock - Top = 64 - Width = 790 - ExplicitTop = 91 - ExplicitWidth = 790 - inherited tbxMain: TTBXToolbar - Left = 359 - ExplicitLeft = 359 - ExplicitWidth = 263 - inherited TBXItem2: TTBXItem - Visible = False - end - inherited TBXSeparatorItem1: TTBXSeparatorItem - Visible = False - end - inherited TBXItem5: TTBXItem - Visible = False - end - inherited TBXItem4: TTBXItem - Visible = False - end - inherited TBXSeparatorItem6: TTBXSeparatorItem - Visible = False - end - inherited TBXItem7: TTBXItem - Visible = False - end - inherited TBXSeparatorItem3: TTBXSeparatorItem - Visible = False - end - inherited TBXItem23: TTBXItem - Visible = False - end - inherited TBXSeparatorItem17: TTBXSeparatorItem - Visible = False - end - inherited TBXItem3: TTBXItem - Visible = False - end - inherited TBXSeparatorItem10: TTBXSeparatorItem - Visible = False - end - inherited TBXSeparatorItem2: TTBXSeparatorItem - Visible = False - end - inherited TBXItem6: TTBXItem - Visible = False - end - inherited TBXItem36: TTBXItem - Action = actAnchoAuto2 - end - end - inherited tbxFiltro: TTBXToolbar - Top = 23 - DockPos = -185 - DockRow = 1 - ExplicitTop = 23 - ExplicitWidth = 359 - inherited TBXItem34: TTBXItem - Action = actQuitarFiltro2 - end - inherited TBXItem37: TTBXItem - Visible = False - end - end - inherited tbxMenu: TTBXToolbar - ExplicitWidth = 790 - end - inherited TBXTMain2: TTBXToolbar - Left = 318 - Visible = False - ExplicitLeft = 318 - end - end - inherited StatusBar: TJvStatusBar - Width = 790 - ExplicitWidth = 790 - end - object pnlHeader: TPanel [3] - Left = 0 - Top = 0 - Width = 790 - Height = 64 - Align = alTop - BevelOuter = bvNone - Color = clWhite - Padding.Left = 25 - Padding.Top = 8 - Padding.Right = 25 - Padding.Bottom = 8 - ParentBackground = False - TabOrder = 4 - ExplicitTop = 27 - object lblTitle: TLabel - AlignWithMargins = True - Left = 25 - Top = 8 - Width = 740 - Height = 13 - Margins.Left = 0 - Margins.Top = 0 - Margins.Right = 0 - Margins.Bottom = 8 - Align = alTop - Caption = 'Seleccione el albar'#225'n de cliente' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - ExplicitWidth = 177 - end - object lblComments: TLabel - AlignWithMargins = True - Left = 50 - Top = 29 - Width = 715 - Height = 24 - Margins.Left = 25 - Margins.Top = 0 - Margins.Right = 0 - Align = alClient - ExplicitWidth = 3 - ExplicitHeight = 13 - end - end - inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4] - Left = 0 - Top = 449 - Width = 790 - Height = 36 - Align = alBottom - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - TabOrder = 3 - ReadOnly = False - ExplicitTop = 449 - ExplicitWidth = 790 - ExplicitHeight = 36 - inherited JvFooter1: TJvFooter - Width = 790 - Height = 36 - ExplicitWidth = 790 - ExplicitHeight = 36 - inherited bSeleccionar: TJvFooterBtn - Left = 578 - Top = 3 - ExplicitLeft = 444 - ExplicitTop = 3 - end - inherited bCancelar: TJvFooterBtn - Left = 682 - Top = 4 - ExplicitLeft = 682 - ExplicitTop = 4 - end - end - inherited BarraSeleccionActionList: TActionList - inherited actSeleccionar: TAction - OnExecute = frViewBarraSeleccion1actSeleccionarExecute - OnUpdate = frViewBarraSeleccion1actSeleccionarUpdate - end - inherited actCancelar: TAction - OnExecute = frViewBarraSeleccion1actCancelarExecute - end - end - end - inherited EditorActionList: TActionList [5] - end - inherited SmallImages: TPngImageList [6] - end - inherited LargeImages: TPngImageList [7] - end - inherited JvFormStorage: TJvFormStorage [8] - end - inherited JvAppRegistryStorage: TJvAppRegistryStorage [9] - end - inherited dsDataTable: TDADataSource [10] - Left = 16 - Top = 168 - end - inherited StatusBarImages: TPngImageList [11] - end - inherited GridPopupMenu: TPopupMenu [12] - Left = 56 - Top = 192 - end - inherited JsNuevoAlbaranDialog: TJSDialog [13] - end - inherited JsImprimirDialog: TJSDialog [15] - end - object EditorSeleccionActionList: TActionList - Images = SmallImages - Left = 152 - Top = 192 - object actBuscar2: TAction - Category = 'Buscar' - Caption = 'Buscar' - ImageIndex = 10 - ShortCut = 114 - end - object actQuitarFiltro2: TAction - Category = 'Buscar' - Caption = 'Quitar filtro y ver todo' - ImageIndex = 19 - OnExecute = actQuitarFiltro2Execute - end - object actAnchoAuto2: TAction - Category = 'Ver' - Caption = 'Ancho autom'#225'tico' - ImageIndex = 21 - OnExecute = actAnchoAuto2Execute - end - end -end diff --git a/Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.pas b/Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.pas deleted file mode 100644 index 14b6df7..0000000 --- a/Source/Modulos/Medicaciones/Views/uEditorElegirAlbaranesCliente.pas +++ /dev/null @@ -1,118 +0,0 @@ -unit uEditorElegirAlbaranesCliente; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, DB, uDADataTable, Menus, JvAppStorage, JvAppRegistryStorage, - JvComponentBase, JvFormPlacement, ImgList, PngImageList, StdActns, - ActnList, uCustomView, uViewBase, uViewGridBase, uViewGrid, - uViewAlbaranesCliente, ComCtrls, TB2ExtItems, TBXExtItems, TBX, - TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, - JvNavigationPane, uViewBarraSeleccion, StdCtrls, - uEditorAlbaranesCliente, uBizAlbaranesCliente, uIEditorElegirAlbaranesCliente, - JvExComCtrls, JvStatusBar, JSDialog, uDAInterfaces; - -type - TfEditorElegirAlbaranesCliente = class(TfEditorAlbaranesCliente, IEditorElegirAlbaranesCliente) - frViewBarraSeleccion1: TfrViewBarraSeleccion; - lblTitle: TLabel; - lblComments: TLabel; - EditorSeleccionActionList: TActionList; - actBuscar2: TAction; - actQuitarFiltro2: TAction; - actAnchoAuto2: TAction; - pnlHeader: TPanel; - procedure frViewBarraSeleccion1actSeleccionarUpdate(Sender: TObject); - procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject); - procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject); - procedure FormShow(Sender: TObject); - procedure actAnchoAuto2Execute(Sender: TObject); - procedure actQuitarFiltro2Execute(Sender: TObject); - - protected - function GetAlbaranesClienteSeleccionados: IBizAlbaranCliente; - procedure SetViewGrid(const Value: IViewGridBase); override; - procedure SetMensaje (const AValue: String); - function GetMensaje: String; - - public - property Mensaje : String read GetMensaje write SetMensaje; - property AlbaranesClienteSeleccionados: IBizAlbaranCliente read GetAlbaranesClienteSeleccionados; - end; - -implementation - -uses - uEditorGridBase, cxGridCustomTableView, uIntegerListUtils, uDBSelectionListUtils, - uGridStatusUtils, uEditorBase, uAlbaranesClienteController, cxGridLevel; - -{$R *.dfm} - -{ TfEditorElegirAlbaranesCliente } - -procedure TfEditorElegirAlbaranesCliente.actAnchoAuto2Execute(Sender: TObject); -begin - inherited; - actAnchoAuto.Execute; -end; - -procedure TfEditorElegirAlbaranesCliente.actQuitarFiltro2Execute(Sender: TObject); -begin - inherited; - actQuitarFiltro.Execute; -end; - -procedure TfEditorElegirAlbaranesCliente.FormShow(Sender: TObject); -begin - inherited; - EditorActionList.State := asSuspended; -end; - -procedure TfEditorElegirAlbaranesCliente.frViewBarraSeleccion1actCancelarExecute( - Sender: TObject); -begin - inherited; - Close; -end; - -procedure TfEditorElegirAlbaranesCliente.frViewBarraSeleccion1actSeleccionarExecute( - Sender: TObject); -begin - inherited; - ModalResult := mrOk; -end; - -procedure TfEditorElegirAlbaranesCliente.frViewBarraSeleccion1actSeleccionarUpdate( - Sender: TObject); -begin - inherited; - (Sender as TAction).Enabled := (ViewGrid._FocusedView.Controller.SelectedRowCount > 0) -end; - -function TfEditorElegirAlbaranesCliente.GetAlbaranesClienteSeleccionados: IBizAlbaranCliente; -begin - SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Albaranes as ISeleccionable).SelectedRecords); - // En SelectedRecords tengo los ID de las filas seleccionadas del grid - Result := (Controller as IAlbaranesClienteController).ExtraerSeleccionados(Albaranes) as IBizAlbaranCliente; -end; - -function TfEditorElegirAlbaranesCliente.GetMensaje: String; -begin - Result := lblComments.Caption; -end; - -procedure TfEditorElegirAlbaranesCliente.SetMensaje(const AValue: String); -begin - lblComments.Caption := AValue; -end; - -procedure TfEditorElegirAlbaranesCliente.SetViewGrid(const Value: IViewGridBase); -begin - inherited; - //Para que no salgan las pestañas de filtrado - ViewGrid._Grid.RootLevelOptions.DetailTabsPosition := dtpNone; - ViewGrid.OnDblClick := frViewBarraSeleccion1.actSeleccionar.OnExecute; -end; - -end. diff --git a/Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.dfm b/Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.dfm deleted file mode 100644 index b42d731..0000000 --- a/Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.dfm +++ /dev/null @@ -1,5 +0,0 @@ -inherited fEditorElegirArticulosAlbaranCliente: TfEditorElegirArticulosAlbaranCliente - Caption = 'fEditorElegirArticulosAlbaranCliente' - PixelsPerInch = 96 - TextHeight = 13 -end diff --git a/Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.pas b/Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.pas deleted file mode 100644 index cec09f7..0000000 --- a/Source/Modulos/Medicaciones/Views/uEditorElegirArticulosAlbaranCliente.pas +++ /dev/null @@ -1,35 +0,0 @@ -unit uEditorElegirArticulosAlbaranCliente; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, uEditorElegirArticulos, Menus, DB, uDADataTable, JvAppStorage, - JvAppRegistryStorage, JvComponentBase, JvFormPlacement, ImgList, PngImageList, - StdActns, ActnList, uCustomView, uViewBase, uViewBarraSeleccion, ComCtrls, - JvExComCtrls, JvStatusBar, TBX, TB2ExtItems, TBXExtItems, TB2Item, TB2Dock, - TB2Toolbar, pngimage, ExtCtrls, JvExControls, JvComponent, JvNavigationPane, - uIEditorElegirArticulosAlbaranesCliente, uDAInterfaces, - uViewGridBase, uViewGrid, uViewArticulos, StdCtrls; - -type - TfEditorElegirArticulosAlbaranCliente = class(TfEditorElegirArticulos, IEditorElegirArticulosAlbaranesCliente) - public - constructor Create(AOwner: TComponent); override; - end; - - -implementation -{$R *.dfm} - -uses uViewElegirArticulosAlbaranesCliente; - -{ TfEditorElegirArticulosAlbaranCliente } - -constructor TfEditorElegirArticulosAlbaranCliente.Create(AOwner: TComponent); -begin - inherited; - ViewGrid := CreateView(TfrViewElegirArticulosAlbaranesCliente) as IViewElegirArticulosAlbaranesCliente; -end; - -end. diff --git a/Source/Modulos/Medicaciones/Views/uEditorMedicacion.dfm b/Source/Modulos/Medicaciones/Views/uEditorMedicacion.dfm index 1e0f989..631ecbf 100644 --- a/Source/Modulos/Medicaciones/Views/uEditorMedicacion.dfm +++ b/Source/Modulos/Medicaciones/Views/uEditorMedicacion.dfm @@ -174,7 +174,7 @@ inherited fEditorMedicacion: TfEditorMedicacion ExplicitLeft = 4 ExplicitTop = 24 ExplicitWidth = 751 - ExplicitHeight = 126 + ExplicitHeight = 158 inline frViewMedicacion1: TfrViewMedicacion Left = 0 Top = 0 @@ -190,7 +190,6 @@ inherited fEditorMedicacion: TfEditorMedicacion ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitTop = -158 ExplicitWidth = 751 inherited dxLayoutControl1: TdxLayoutControl Width = 751 @@ -228,7 +227,7 @@ inherited fEditorMedicacion: TfEditorMedicacion ExplicitWidth = 533 inherited dxLayoutControl1: TdxLayoutControl Width = 533 - ExplicitWidth = 347 + ExplicitWidth = 533 inherited edtlNombre: TcxDBTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' @@ -281,98 +280,99 @@ inherited fEditorMedicacion: TfEditorMedicacion ParentFont = False TabOrder = 4 ReadOnly = False - ExplicitTop = 164 - ExplicitWidth = 751 - ExplicitHeight = 334 + ExplicitTop = 268 + ExplicitWidth = 765 + ExplicitHeight = 340 inherited ToolBar1: TToolBar Width = 765 Height = 51 ExplicitWidth = 765 ExplicitHeight = 51 - inherited ToolButton4: TToolButton [2] - Left = 129 + inherited ToolButton3: TToolButton Wrap = False - ExplicitLeft = 129 end - inherited ToolButton14: TToolButton [3] - Left = 185 - ExplicitLeft = 185 - ExplicitTop = 0 - end - inherited FontName: TJvFontComboBox [4] - Left = 250 + inherited ToolButton4: TToolButton + Left = 184 Top = 0 - ExplicitLeft = 250 + ExplicitLeft = 184 ExplicitTop = 0 end - inherited ToolButton13: TToolButton [5] - Left = 395 + inherited ToolButton14: TToolButton + Left = 240 Top = 0 Wrap = False - ExplicitLeft = 395 + ExplicitLeft = 240 ExplicitTop = 0 - ExplicitHeight = 22 end - inherited ToolButton6: TToolButton [6] - Left = 403 + inherited FontName: TJvFontComboBox + Left = 305 Top = 0 - ExplicitLeft = 403 + ExplicitLeft = 305 ExplicitTop = 0 end - inherited ToolButton7: TToolButton [7] - Left = 469 + inherited FontSize: TEdit + Left = 450 Top = 0 - Enabled = True - ExplicitLeft = 469 + Width = 186 + ExplicitLeft = 450 ExplicitTop = 0 + ExplicitWidth = 186 end - inherited ToolButton8: TToolButton [8] - Left = 536 - Top = 0 - ExplicitLeft = 536 - ExplicitTop = 0 - end - inherited ToolButton12: TToolButton [9] - Top = 0 - ExplicitTop = 0 - end - inherited ToolButton3: TToolButton [10] + inherited ToolButton13: TToolButton [7] Left = 0 - Top = 27 + Top = 0 + Wrap = True ExplicitLeft = 0 - ExplicitTop = 27 + ExplicitTop = 0 + ExplicitHeight = 30 end - inherited FontSize: TEdit [11] - Left = 55 - Top = 27 - Width = 170 - ExplicitLeft = 55 - ExplicitTop = 27 - ExplicitWidth = 170 + inherited UpDown1: TUpDown [8] + Left = 0 + Top = 30 + ExplicitLeft = 0 + ExplicitTop = 30 end - inherited UpDown1: TUpDown [12] + inherited ToolButton6: TToolButton + Left = 17 + Top = 30 + ExplicitLeft = 17 + ExplicitTop = 30 + end + inherited ToolButton7: TToolButton + Left = 83 + Top = 30 + ExplicitLeft = 83 + ExplicitTop = 30 + end + inherited ToolButton8: TToolButton + Left = 150 + Top = 30 + ExplicitLeft = 150 + ExplicitTop = 30 + end + inherited ToolButton12: TToolButton + Left = 233 + Top = 30 + ExplicitLeft = 233 + ExplicitTop = 30 + end + inherited ToolButton9: TToolButton Left = 241 - Top = 27 + Top = 30 ExplicitLeft = 241 - ExplicitTop = 27 - end - inherited ToolButton9: TToolButton [13] - Left = 258 - Top = 27 - ExplicitLeft = 258 - ExplicitTop = 27 + ExplicitTop = 30 end inherited ToolButton10: TToolButton - Left = 403 - Top = 27 - ExplicitLeft = 403 - ExplicitTop = 27 + Left = 386 + Top = 30 + ExplicitLeft = 386 + ExplicitTop = 30 end inherited ToolButton11: TToolButton - Left = 528 - Top = 27 - ExplicitLeft = 528 - ExplicitTop = 27 + Left = 511 + Top = 30 + ExplicitLeft = 511 + ExplicitTop = 30 end end inherited cxGrid: TcxGrid @@ -380,14 +380,14 @@ inherited fEditorMedicacion: TfEditorMedicacion Width = 765 Height = 263 ExplicitTop = 77 - ExplicitWidth = 751 - ExplicitHeight = 257 + ExplicitWidth = 765 + ExplicitHeight = 263 end inherited TBXDock1: TTBXDock Top = 51 Width = 765 ExplicitTop = 51 - ExplicitWidth = 751 + ExplicitWidth = 765 inherited TBXToolbar1: TTBXToolbar ExplicitWidth = 472 end diff --git a/Source/Modulos/Medicaciones/Views/uEditorMedicacion.pas b/Source/Modulos/Medicaciones/Views/uEditorMedicacion.pas index 25a91a1..9e3dd30 100644 --- a/Source/Modulos/Medicaciones/Views/uEditorMedicacion.pas +++ b/Source/Modulos/Medicaciones/Views/uEditorMedicacion.pas @@ -120,7 +120,7 @@ end; procedure TfEditorMedicacion.EliminarInterno; begin - if (ShowConfirmMessage('¿Desea borrar este albarán de cliente?', '') = IDYES) then + if (ShowConfirmMessage('¿Desea borrar esta medicación de paciente?', '') = IDYES) then begin FController.Eliminar(FMedicacion); inherited diff --git a/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.dfm b/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.dfm index 8941c85..61ae872 100644 --- a/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.dfm +++ b/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.dfm @@ -1677,7 +1677,7 @@ inherited fEditorMedicaciones: TfEditorMedicaciones Instruction.Icon = tdiCustom CustomButtons = < item - Caption = 'Imprimir las etiquetas de la medicación/es seleccionada/s' + Caption = 'Imprimir las etiquetas de la medicaci'#195#179'n/es seleccionada/s' Value = 100 Default = True end @@ -1988,7 +1988,7 @@ inherited fEditorMedicaciones: TfEditorMedicaciones Instruction.Icon = tdiCustom CustomButtons = < item - Caption = 'Previsualizar las etiquetas de la medicación/es seleccionada/s' + Caption = 'Previsualizar las etiquetas de la medicaci'#195#179'n/es seleccionada/s' Value = 100 Default = True end diff --git a/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.pas b/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.pas index 3707624..b7d4a5c 100644 --- a/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.pas +++ b/Source/Modulos/Medicaciones/Views/uEditorMedicaciones.pas @@ -24,9 +24,7 @@ type JsListaMedicacionesNoEliminados: TJSDialog; TBXSubmenuItem2: TTBXSubmenuItem; procedure FormShow(Sender: TObject); - procedure actEnviarExecute(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); - procedure actCancelarEnvioExecute(Sender: TObject); procedure actGenerarEtiquetasExecute(Sender: TObject); procedure actGenerarEtiquetasUpdate(Sender: TObject); @@ -72,24 +70,6 @@ uses { *************************** TfEditorMedicaciones *************************** } -procedure TfEditorMedicaciones.actCancelarEnvioExecute(Sender: TObject); -begin -{ - inherited; - - if (ShowConfirmMessage('Envío de albarán de cliente', '¿Desea cancelar el envío de este albarán de cliente?') = IDYES) then - begin - try - FController.CambiarSituacion(FMedicaciones, SITUACION_ALBARAN_PENDIENTE); - except - on E : Exception do - ShowErrorMessage('Error al cambiar la situación del albarán', E.Message, E); - end; - end; - actRefrescar.Execute; -} -end; - procedure TfEditorMedicaciones.actEliminarUpdate(Sender: TObject); begin inherited; @@ -121,68 +101,6 @@ begin and ViewGrid.esSeleccionCeldaDatos; end; -procedure TfEditorMedicaciones.actEnviarExecute(Sender: TObject); -//var -// AInventarioController : IInventarioController; -// bCambiarEstado : Boolean; -// AFactura : IBizFacturaCliente; -// AFacturasController : IFacturasClienteController; -// AMedicacion : IBizMedicacion; -begin -{ - inherited; - bCambiarEstado := False; - - // ¿Hay almacén asociado al albarán? - if FMedicaciones.ID_ALMACEN = 0 then - begin - if (ShowConfirmMessage('Envío de albarán de cliente', 'Este albarán no tiene un almacén asociado por lo que no se realizará ningún cambio en el stock de los almacenes.' - + #10#13 + #10#13 + '¿Desea realizar el envío de este albarán de cliente?') = IDYES) then - bCambiarEstado := True // No hay almacén. Cambiamos el estado y ya está. - end - else begin - AInventarioController := TInventarioController.Create; - try - bCambiarEstado := AInventarioController.SalidaMedicacion(NIL, FMedicaciones.ID_ALMACEN, FMedicaciones.Detalles); - finally - AInventarioController := NIL; - end; - end; - - if bCambiarEstado then - begin - try - FController.CambiarSituacion(FMedicaciones, SITUACION_ALBARAN_ENVIADO, Now); -{ - if (ShowConfirmMessage('', 'Se ha realizado correctamente la salida del albarán de cliente. ¿Desea generar la factura de cliente correspondiente?') = IDYES) then - begin - AMedicacion := FController.Buscar(FMedicaciones.ID); - AMedicacion.DataTable.Active := True; - - AFacturasController := TFacturasClienteController.Create; - AFactura := AFacturasController.Nuevo; - try - if AFacturasController.Anadir(AFactura, AMedicacion) then - AFacturasController.Ver(AFactura) - finally - AFacturasController := NIL; - AMedicacion := NIL; - AFactura := NIL; - end; - end; -} - - -{ - except - on E : Exception do - ShowErrorMessage('Error al cambiar la situación del albarán', E.Message, E); - end; - end; - actRefrescar.Execute; -} -end; - procedure TfEditorMedicaciones.AsignarVista; begin ViewGrid := CreateView(TfrViewMedicaciones) as IViewMedicaciones; diff --git a/Source/Modulos/Medicaciones/Views/uViewMedicaciones.dfm b/Source/Modulos/Medicaciones/Views/uViewMedicaciones.dfm index a66dd94..b85d09e 100644 --- a/Source/Modulos/Medicaciones/Views/uViewMedicaciones.dfm +++ b/Source/Modulos/Medicaciones/Views/uViewMedicaciones.dfm @@ -82,24 +82,22 @@ inherited frViewMedicaciones: TfrViewMedicaciones Width = 228 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 257 + Left = 275 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 257 + ExplicitLeft = 275 ExplicitWidth = 460 Width = 460 end inherited eLista: TcxComboBox - Left = 638 + Left = 684 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 638 - ExplicitWidth = 215 - Width = 215 + ExplicitLeft = 684 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -136,8 +134,7 @@ inherited frViewMedicaciones: TfrViewMedicaciones end end inherited dsDataSource: TDADataSource - Left = 32 - Top = 24 + Left = 56 end inherited dxComponentPrinter: TdxComponentPrinter inherited dxComponentPrinterLink: TdxGridReportLink diff --git a/Source/Modulos/Medicaciones/Views/uViewMedicaciones.pas b/Source/Modulos/Medicaciones/Views/uViewMedicaciones.pas index 2480d68..7067e90 100644 --- a/Source/Modulos/Medicaciones/Views/uViewMedicaciones.pas +++ b/Source/Modulos/Medicaciones/Views/uViewMedicaciones.pas @@ -98,18 +98,18 @@ begin Fecha1 := frViewFiltroBase1.edtFechaIniFiltro.EditValue; Fecha2 := frViewFiltroBase1.edtFechaFinFiltro.EditValue; - if not VarIsNull(Fecha1) - and not VarIsNull(Fecha2) then + if not VarIsNull(Fecha1) and not VarIsNull(Fecha2) then begin cxGridView.DataController.Filter.Options := [fcoCaseInsensitive, fcoSoftCompare]; FFiltro := AddFilterGrid(fboAnd); - Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_PREVISTA_ENVIO'); - FFiltro.AddItem(Columna, foBetween, varArrayOf([Fecha1, Fecha2]), VarToStr(Fecha1) + ' and ' + VarToStr(Fecha2)); + Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_DESDE'); + FFiltro.AddItem(Columna, foGreaterEqual, Fecha1, VarToStr(Fecha1)); -// FFiltro.BoolOperatorKind := fboOr; -// Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_ALBARAN'); -// FFiltro.AddItem(Columna, foBetween, varArrayOf([Fecha1, Fecha2]), VarToStr(Fecha1) + ' and ' + VarToStr(Fecha2)); + FFiltro.BoolOperatorKind := fboAnd; + + Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_HASTA'); + FFiltro.AddItem(Columna, foLessEqual, Fecha2, VarToStr(Fecha2)); end; end;