diff --git a/Source/Cliente/uPantallaPrincipal.dfm b/Source/Cliente/uPantallaPrincipal.dfm index 967df309..07efa836 100644 --- a/Source/Cliente/uPantallaPrincipal.dfm +++ b/Source/Cliente/uPantallaPrincipal.dfm @@ -85,7 +85,6 @@ object fPantallaPrincipal: TfPantallaPrincipal NavPanelHotTrackFont.Style = [] SmallImages = ModulesSmallImageList OnChange = JvNavigationPaneChange - ExplicitTop = 4 object pagInicio: TJvNavPanelPage Left = 0 Top = 0 @@ -265,23 +264,23 @@ object fPantallaPrincipal: TfPantallaPrincipal OnExecute = actAcercaExecute end object actMenuCompras: TAction - Category = 'Compras' + Category = 'Menus' Caption = 'Compras' OnExecute = actMenuComprasExecute OnUpdate = actMenuComprasUpdate end - object actLogisticaMenu: TAction - Category = 'Log'#237'stica' + object actMenuLogistica: TAction + Category = 'Menus' Caption = 'Log'#237'stica' Enabled = False Visible = False - OnExecute = actLogisticaMenuExecute + OnExecute = actMenuLogisticaExecute OnUpdate = actMenuComprasUpdate end - object actVentasMenu: TAction - Category = 'Ventas' + object actMenuVentas: TAction + Category = 'Menus' Caption = 'Ventas' - OnExecute = actVentasMenuExecute + OnExecute = actMenuVentasExecute OnUpdate = actMenuComprasUpdate end object actVerPanel: TAction @@ -301,6 +300,18 @@ object fPantallaPrincipal: TfPantallaPrincipal Caption = 'Configurar FactuGES...' OnExecute = actConfigurarExecute end + object actMenuContabilidad: TAction + Category = 'Menus' + Caption = 'Contabilidad' + OnExecute = actMenuContabilidadExecute + OnUpdate = actMenuComprasUpdate + end + object actMenuEmpresa: TAction + Category = 'Menus' + Caption = 'Empresa' + OnExecute = actMenuEmpresaExecute + OnUpdate = actMenuComprasUpdate + end end object ModulesSmallImageList: TPngImageList PngImages = < @@ -625,7 +636,7 @@ object fPantallaPrincipal: TfPantallaPrincipal end object Empresa1_OLD: TMenuItem Tag = 1000 - Caption = 'Empresa' + Action = actMenuEmpresa object Listadeempresas1_OLD: TMenuItem Caption = 'Lista de empresas' Visible = False @@ -666,7 +677,7 @@ object fPantallaPrincipal: TfPantallaPrincipal end object Ventas1: TMenuItem Tag = 4000 - Action = actVentasMenu + Action = actMenuVentas object N3: TMenuItem Tag = 200 Caption = '-' @@ -678,7 +689,7 @@ object fPantallaPrincipal: TfPantallaPrincipal end object Logistica1: TMenuItem Tag = 5000 - Action = actLogisticaMenu + Action = actMenuLogistica object N7: TMenuItem Tag = 200 Caption = '-' @@ -690,7 +701,7 @@ object fPantallaPrincipal: TfPantallaPrincipal end object Contabilidad1: TMenuItem Tag = 6000 - Caption = 'Contabilidad' + Action = actMenuContabilidad end end object JvXPMenuItemPainter1: TJvXPMenuItemPainter diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index 53ca0c28..f3691dec 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -63,8 +63,8 @@ type Compras1: TMenuItem; Ventas1: TMenuItem; actMenuCompras: TAction; - actLogisticaMenu: TAction; - actVentasMenu: TAction; + actMenuLogistica: TAction; + actMenuVentas: TAction; Logistica1: TMenuItem; pagInicio: TJvNavPanelPage; Panel1: TPanel; @@ -91,6 +91,8 @@ type Contabilidad1: TMenuItem; actConfigurar: TAction; ConfigurarFactuGES1: TMenuItem; + actMenuContabilidad: TAction; + actMenuEmpresa: TAction; procedure FormCreate(Sender: TObject); procedure Salir1Click(Sender: TObject); procedure actSalirExecute(Sender: TObject); @@ -102,8 +104,8 @@ type procedure ApplicationEventsException(Sender: TObject; E: Exception); procedure actMenuComprasExecute(Sender: TObject); procedure actMenuComprasUpdate(Sender: TObject); - procedure actLogisticaMenuExecute(Sender: TObject); - procedure actVentasMenuExecute(Sender: TObject); + procedure actMenuLogisticaExecute(Sender: TObject); + procedure actMenuVentasExecute(Sender: TObject); procedure actActualizacionesExecute(Sender: TObject); procedure actVerPanelUpdate(Sender: TObject); procedure actVerPanelExecute(Sender: TObject); @@ -116,6 +118,8 @@ type procedure FormShow(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure actConfigurarExecute(Sender: TObject); + procedure actMenuContabilidadExecute(Sender: TObject); + procedure actMenuEmpresaExecute(Sender: TObject); private FContenido : TCustomEditor; procedure ShowEmbedded(AEditor : ICustomEditor); @@ -129,6 +133,7 @@ type protected function GetWorkPanel : TWinControl; public + procedure CreateParams(var Params: TCreateParams); function IsShortcut(var Message: TWMKey): Boolean; override; procedure OnWorkPanelChanged(AEditor : ICustomEditor); constructor Create(AOwner: TComponent); override; @@ -238,7 +243,7 @@ begin Close; end; -procedure TfPantallaPrincipal.actVentasMenuExecute(Sender: TObject); +procedure TfPantallaPrincipal.actMenuVentasExecute(Sender: TObject); begin // end; @@ -363,7 +368,17 @@ begin (Sender as TAction).Enabled := Assigned(AppFactuGES.EmpresaActiva); end; -procedure TfPantallaPrincipal.actLogisticaMenuExecute(Sender: TObject); +procedure TfPantallaPrincipal.actMenuContabilidadExecute(Sender: TObject); +begin + // +end; + +procedure TfPantallaPrincipal.actMenuEmpresaExecute(Sender: TObject); +begin + // +end; + +procedure TfPantallaPrincipal.actMenuLogisticaExecute(Sender: TObject); begin // end; @@ -494,6 +509,13 @@ begin end; end; +procedure TfPantallaPrincipal.CreateParams(var Params: TCreateParams); +begin + { ¡¡¡No quitar este procedimiento aunque no haga nada!!!!! + Si se quita, esta pantalla principal se queda en el fondo + después de desaparecer la pantalla de login. } + inherited CreateParams(Params); +end; procedure TfPantallaPrincipal.actActualizacionesExecute(Sender: TObject); begin { fActualizacion := TfActualizacion.Create(Self); diff --git a/Source/Modulos/Contactos/Plugin/uPluginContactos.dfm b/Source/Modulos/Contactos/Plugin/uPluginContactos.dfm index d05640e6..7cefbc97 100644 --- a/Source/Modulos/Contactos/Plugin/uPluginContactos.dfm +++ b/Source/Modulos/Contactos/Plugin/uPluginContactos.dfm @@ -323,11 +323,6 @@ object PluginContactos: TPluginContactos Tag = 102 Action = actGruposCliente end - object Categoriasdeempleado1: TMenuItem - Tag = 103 - Caption = 'Categorias de empleado' - ImageIndex = 4 - end object Procedenciasdecliente1: TMenuItem Tag = 104 Action = actProcedenciasCliente diff --git a/Source/Modulos/Contactos/Views/uViewVendedor.dfm b/Source/Modulos/Contactos/Views/uViewVendedor.dfm index dc3bacd5..f3c59d70 100644 --- a/Source/Modulos/Contactos/Views/uViewVendedor.dfm +++ b/Source/Modulos/Contactos/Views/uViewVendedor.dfm @@ -25,6 +25,10 @@ inherited frViewVendedor: TfrViewVendedor inherited eCalle: TcxDBTextEdit Left = 121 Top = 193 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 6 ExplicitLeft = 121 ExplicitTop = 193 @@ -32,23 +36,47 @@ inherited frViewVendedor: TfrViewVendedor Width = 152 end inherited cbProvincia: TcxDBComboBox + Left = 121 + Top = 220 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 7 + ExplicitLeft = 121 + ExplicitTop = 220 ExplicitWidth = 144 Width = 144 end inherited cbPoblacion: TcxDBComboBox + Left = 121 + Top = 247 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 9 + ExplicitLeft = 121 + ExplicitTop = 247 ExplicitWidth = 236 Width = 236 end inherited eCodigoPostal: TcxDBTextEdit - Left = 301 + Left = 282 Top = 220 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 8 - ExplicitLeft = 301 + ExplicitLeft = 282 ExplicitTop = 220 end inherited eObservaciones: TcxDBMemo + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 18 ExplicitWidth = 596 ExplicitHeight = 151 @@ -56,69 +84,70 @@ inherited frViewVendedor: TfrViewVendedor Width = 596 end inherited eTlfParticular: TcxDBTextEdit - Left = 482 + Left = 463 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 11 - ExplicitLeft = 482 + ExplicitLeft = 463 ExplicitWidth = 91 Width = 91 end inherited eTlfTrabajo: TcxDBTextEdit - Left = 482 + Left = 463 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 10 - ExplicitLeft = 482 + ExplicitLeft = 463 ExplicitWidth = 127 Width = 127 end inherited eTlfMovil: TcxDBTextEdit - Left = 482 + Left = 463 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 12 - ExplicitLeft = 482 + ExplicitLeft = 463 ExplicitWidth = 155 Width = 155 end inherited eFax: TcxDBTextEdit - Left = 482 + Left = 463 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 13 - ExplicitLeft = 482 + ExplicitLeft = 463 ExplicitWidth = 121 Width = 121 end inherited eNombre: TcxDBTextEdit Left = 121 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 121 ExplicitWidth = 263 Width = 263 end inherited eNIFCIF: TcxDBTextEdit - Left = 226 - ExplicitLeft = 226 + Left = 216 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 216 ExplicitWidth = 100 Width = 100 end - inherited eMailTrabajo: TcxDBHyperLinkEdit - Left = 482 - Properties.Prefix = 'mailto:' - TabOrder = 14 - ExplicitLeft = 482 - ExplicitWidth = 129 - Width = 129 - end - inherited eMailParticular: TcxDBHyperLinkEdit - Left = 482 - Properties.Prefix = 'mailto:' - TabOrder = 15 - ExplicitLeft = 482 - ExplicitWidth = 165 - Width = 165 - end - inherited ePaginaWeb: TcxDBHyperLinkEdit - Left = 482 - TabOrder = 16 - ExplicitLeft = 482 - ExplicitWidth = 165 - Width = 165 - end - object cbUsuario: TcxComboBox [17] + object cbUsuario: TcxComboBox [14] Left = 121 Top = 82 Anchors = [akLeft, akTop, akRight] @@ -130,18 +159,22 @@ inherited frViewVendedor: TfrViewVendedor Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 3 Width = 201 end - object edtComision: TcxDBSpinEdit [18] + object edtComision: TcxDBSpinEdit [15] Left = 121 Top = 109 AutoSize = False @@ -161,18 +194,61 @@ inherited frViewVendedor: TfrViewVendedor Style.Font.Style = [] Style.HotTrack = False Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.TextColor = clWindowText Style.ButtonStyle = bts3D Style.IsFontAssigned = True StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 4 Height = 21 Width = 65 end + inherited eMailTrabajo: TcxDBHyperLinkEdit + Left = 463 + Properties.Prefix = 'mailto:' + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 14 + ExplicitLeft = 463 + ExplicitWidth = 129 + Width = 129 + end + inherited eMailParticular: TcxDBHyperLinkEdit + Left = 463 + Properties.Prefix = 'mailto:' + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 15 + ExplicitLeft = 463 + ExplicitWidth = 165 + Width = 165 + end + inherited ePaginaWeb: TcxDBHyperLinkEdit + Left = 463 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 16 + ExplicitLeft = 463 + ExplicitWidth = 165 + Width = 165 + end inherited eReferencia: TcxDBTextEdit Left = 121 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 121 ExplicitWidth = 38 Width = 38 @@ -180,6 +256,10 @@ inherited frViewVendedor: TfrViewVendedor inherited ePersonaContacto: TcxDBTextEdit Left = 121 Top = 166 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 5 ExplicitLeft = 121 ExplicitTop = 166 @@ -187,15 +267,19 @@ inherited frViewVendedor: TfrViewVendedor Width = 152 end inherited frViewTienda1: TfrViewTienda - Left = 387 + Left = 368 Width = 264 TabOrder = 17 - ExplicitLeft = 387 + ExplicitLeft = 368 ExplicitWidth = 264 inherited dxLayoutControl1: TdxLayoutControl Width = 264 ExplicitWidth = 264 inherited cbTienda: TcxComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 376 Width = 376 end @@ -244,7 +328,7 @@ inherited frViewVendedor: TfrViewVendedor end inherited dxLayoutControlContactoGroup100: TdxLayoutGroup AlignVert = avClient - Caption = 'El empleado pertenece a la tienda' + Caption = 'El vendedor pertenece a la tienda' end end end diff --git a/Source/Modulos/Referencias/Controller/Referencias_controller.dproj b/Source/Modulos/Referencias/Controller/Referencias_controller.dproj index 00bd3c72..5cf87e59 100644 --- a/Source/Modulos/Referencias/Controller/Referencias_controller.dproj +++ b/Source/Modulos/Referencias/Controller/Referencias_controller.dproj @@ -40,36 +40,17 @@ Delphi.Personality Package -FalseTrueFalseTrueFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0Referencias_controller.dpk +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0Referencias_controller.dpk MainSource - - - - - - - - - - - - - - - - - - - - - - - + + + + diff --git a/Source/Modulos/Referencias/Controller/Referencias_controller.res b/Source/Modulos/Referencias/Controller/Referencias_controller.res index 8b251f31..1641339f 100644 Binary files a/Source/Modulos/Referencias/Controller/Referencias_controller.res and b/Source/Modulos/Referencias/Controller/Referencias_controller.res differ diff --git a/Source/Modulos/Referencias/Controller/uReferenciasController.pas b/Source/Modulos/Referencias/Controller/uReferenciasController.pas index 739b5dc4..4ffb3e66 100644 --- a/Source/Modulos/Referencias/Controller/uReferenciasController.pas +++ b/Source/Modulos/Referencias/Controller/uReferenciasController.pas @@ -22,7 +22,7 @@ type // procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override; function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean; - + procedure FiltrarEmpresa(AReferencias: IBizReferencia); function ValidarReferencia(AReferencia: IBizReferencia): Boolean; procedure AsignarDataModule; @@ -40,7 +40,7 @@ implementation uses cxControls, DB, uEditorRegistryUtils, schReferenciasClient_Intf, - uIEditorReferencias, uDataModuleReferencias, + uIEditorReferencias, uDataModuleReferencias, uFactuGES_App, uDAInterfaces, uDataTableUtils, uDialogUtils, uDateUtils, uROTypes, DateUtils, Controls, Windows; @@ -54,6 +54,28 @@ end; function TReferenciasController.BuscarTodos: IBizReferencia; begin Result := FDataModule.GetItems; + FiltrarEmpresa(Result); +end; + +procedure TReferenciasController.FiltrarEmpresa(AReferencias: IBizReferencia); +var + Condicion: TDAWhereExpression; +begin + if AReferencias.DataTable.Active then + AReferencias.DataTable.Active := False; + + // Filtrar las facturas actuales por empresa + with AReferencias.DataTable.DynamicWhere do + begin + // (ID_EMPRESA >= ID) + Condicion := NewBinaryExpression(NewField('', fld_ReferenciasID_EMPRESA), + NewConstant(AppFactuGES.EmpresaActiva.ID, datInteger), dboEqual); + + if IsEmpty then + Expression := Condicion + else + Expression := NewBinaryExpression(Expression, Condicion, dboAnd); + end; end; constructor TReferenciasController.Create; diff --git a/Source/Modulos/Referencias/Views/uEditorReferencias.dfm b/Source/Modulos/Referencias/Views/uEditorReferencias.dfm index 2e77bff5..9008b7af 100644 --- a/Source/Modulos/Referencias/Views/uEditorReferencias.dfm +++ b/Source/Modulos/Referencias/Views/uEditorReferencias.dfm @@ -67,7 +67,6 @@ object fEditorReferencias: TfEditorReferencias DataController.Summary.DefaultGroupSummaryItems = <> DataController.Summary.FooterSummaryItems = <> DataController.Summary.SummaryGroups = <> - OptionsBehavior.AlwaysShowEditor = True OptionsBehavior.CellHints = True OptionsBehavior.FocusCellOnTab = True OptionsBehavior.GoToNextCellOnEnter = True diff --git a/Source/Modulos/Referencias/Views/uEditorReferencias.pas b/Source/Modulos/Referencias/Views/uEditorReferencias.pas index 25871add..b8619b89 100644 --- a/Source/Modulos/Referencias/Views/uEditorReferencias.pas +++ b/Source/Modulos/Referencias/Views/uEditorReferencias.pas @@ -164,11 +164,7 @@ begin FReferencias.DataTable.Active := true; ListaReferencias.SetFocus; -{ - EnableScrollBar(ListaReferencias.Handle,SB_HORZ,ESB_DISABLE_BOTH); - ShowScrollBar(ListaReferencias.Handle,SB_HORZ,false); - EnableScrollBar(ListaReferencias.Handle,SB_VERT,ESB_DISABLE_BOTH); -} + ListaReferenciasView.DataController.GotoFirst; end; end.