diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 47c259f..615316c 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Build/Build.fbpInf b/Build/Build.fbpInf index e33f5ec..6ff019a 100644 --- a/Build/Build.fbpInf +++ b/Build/Build.fbpInf @@ -14,8 +14,8 @@ - 00:00:07 - 04/04/2022 10:55:43 - True + 00:00:00 + 06/02/2023 20:23:47 + False diff --git a/Build/Build.fbz6 b/Build/Build.fbz6 index 6fb1c19..6a96c8f 100644 Binary files a/Build/Build.fbz6 and b/Build/Build.fbz6 differ diff --git a/Resources/Iconos/Agenda/24x24/Thumbs.db b/Resources/Iconos/Agenda/24x24/Thumbs.db index afaa377..060ca8b 100644 Binary files a/Resources/Iconos/Agenda/24x24/Thumbs.db and b/Resources/Iconos/Agenda/24x24/Thumbs.db differ diff --git a/Resources/Iconos/Artículos/28x28/Thumbs.db b/Resources/Iconos/Artículos/28x28/Thumbs.db index b2c0f32..b552312 100644 Binary files a/Resources/Iconos/Artículos/28x28/Thumbs.db and b/Resources/Iconos/Artículos/28x28/Thumbs.db differ diff --git a/Resources/Iconos/Thumbs.db b/Resources/Iconos/Thumbs.db index 370dca8..ecac6ff 100644 Binary files a/Resources/Iconos/Thumbs.db and b/Resources/Iconos/Thumbs.db differ diff --git a/Source/ApplicationBase/ApplicationBase.dproj b/Source/ApplicationBase/ApplicationBase.dproj index 2743661..12ae417 100644 --- a/Source/ApplicationBase/ApplicationBase.dproj +++ b/Source/ApplicationBase/ApplicationBase.dproj @@ -46,21 +46,6 @@ Package FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 - - - - - - - - - - - - - - - RemObjects Data Abstract - SQLite Driver Microsoft Office 2000 Sample Automation Server Wrapper Components Microsoft Office XP Sample Automation Server Wrapper Components @@ -71,43 +56,43 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/ApplicationBase/Ejercicios/Plugin/uPluginEjercicios.pas b/Source/ApplicationBase/Ejercicios/Plugin/uPluginEjercicios.pas index 5e2d119..bd881a3 100644 --- a/Source/ApplicationBase/Ejercicios/Plugin/uPluginEjercicios.pas +++ b/Source/ApplicationBase/Ejercicios/Plugin/uPluginEjercicios.pas @@ -32,7 +32,7 @@ implementation {$R *.dfm} uses - Forms, Dialogs, SysUtils, + Forms, Dialogs, SysUtils, uFactuGES_App, uEjerciciosController, uBizEjercicios, uEjerciciosViewRegister; function GetModule : TModuleController; @@ -57,6 +57,18 @@ constructor TPluginEjercicios.Create(AOwner: TComponent); begin inherited; uEjerciciosViewRegister.RegisterViews; + + if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then + begin + actEjercicios.Enabled := True; + actEjercicios.Visible := True; + end + else + begin + actEjercicios.Enabled := False; + actEjercicios.Visible := False; + end; + end; destructor TPluginEjercicios.Destroy; diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas index 67c47b1..7072d44 100644 --- a/Source/ApplicationBase/uFactuGES_App.pas +++ b/Source/ApplicationBase/uFactuGES_App.pas @@ -9,9 +9,14 @@ uses const CTE_PERFIL_ADMINISTRADOR = 3; - CTE_PERFIL_VENDEDOR = 7; + CTE_PERFIL_VENDEDOR_GRADEN = 7; + CTE_PERFIL_VENDEDOR_MARBELLA = 9; CTE_PERFIL_COMPRAS = 8; - CTE_PERFIL_USUARIO = 5; + CTE_PERFIL_USUARIO = 5; + + CTE_EMPRESA_ABETO = 1; + CTE_EMPRESA_GRADEN = 2; + CTE_EMPRESA_GRADEN_MARBELLA = 6; type TAppFactuGES_Event = procedure; diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 3a2569e..5008327 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -58,54 +58,54 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index f809a9d..ad6bb94 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -52,7 +52,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4190FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.1.9.0FactuGESFactuGES4.1.9.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4320FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.3.2.0FactuGESFactuGES4.3.2.0 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES.dprFalse diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index cfe4c95..cab4175 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/Cliente/uBootStrap.pas b/Source/Cliente/uBootStrap.pas index 2025bff..26cefa0 100644 --- a/Source/Cliente/uBootStrap.pas +++ b/Source/Cliente/uBootStrap.pas @@ -22,7 +22,7 @@ begin with AppFactuGES.ModuleManager do begin LoadModule('Referencias_plugin.bpl'); -// LoadModule('TiposVenta_plugin.bpl'); + LoadModule('Delegaciones_plugin.bpl'); LoadModule('FormasPago_plugin.bpl'); LoadModule('TiposIVA_plugin.bpl'); LoadModule('TiposOperacionCompra_plugin.bpl'); diff --git a/Source/Cliente/uPantallaPrincipal.dfm b/Source/Cliente/uPantallaPrincipal.dfm index e7c9fb2..f217477 100644 --- a/Source/Cliente/uPantallaPrincipal.dfm +++ b/Source/Cliente/uPantallaPrincipal.dfm @@ -274,7 +274,6 @@ object fPantallaPrincipal: TfPantallaPrincipal Category = 'Menus' Caption = 'Log'#237'stica' OnExecute = actMenuLogisticaExecute - OnUpdate = actMenuLogisticaUpdate end object actMenuVentas: TAction Category = 'Menus' diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index c00cf38..a00050c 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -124,7 +124,6 @@ type procedure actMenuInformesExecute(Sender: TObject); procedure Listadeempresas1_OLDClick(Sender: TObject); procedure actInformacionEmpresaExecute(Sender: TObject); - procedure actMenuLogisticaUpdate(Sender: TObject); private FContenido : TCustomEditor; procedure ShowEmbedded(AEditor : ICustomEditor); @@ -196,7 +195,8 @@ end; procedure TfPantallaPrincipal.FormShow(Sender: TObject); begin //El usuario vendedor de graden solo podrá ver ventas (Graden-Vendedor(2)) - if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR) then + if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_GRADEN) + or (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_VENDEDOR_MARBELLA) then begin Informes1.Enabled := False; Informes1.Visible := False; @@ -247,8 +247,14 @@ begin ATitulo := AppFactuGES.GetAppFullName; if Assigned(AppFactuGES.EmpresaActiva) then + begin ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo; + actMenuLogistica.Enabled := AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO; + actMenuLogistica.Visible := AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO; + end; + + Application.Title := ATitulo; Caption := Application.Title; @@ -435,12 +441,6 @@ begin // end; -procedure TfPantallaPrincipal.actMenuLogisticaUpdate(Sender: TObject); -begin - (Sender as TAction).Enabled := AppFactuGES.EmpresaActiva.ID = 1; - (Sender as TAction).Visible := AppFactuGES.EmpresaActiva.ID = 1; -end; - procedure TfPantallaPrincipal.ExecuteActionMenu(Sender: TObject); var i : integer; diff --git a/Source/Informes/2/2/InfContratoCliente.fr3 b/Source/Informes/2/2/InfContratoCliente.fr3 index dfda935..a13bc36 100644 --- a/Source/Informes/2/2/InfContratoCliente.fr3 +++ b/Source/Informes/2/2/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -84,7 +84,7 @@ - + diff --git a/Source/Informes/2/2/InfPresupuestoCliente.fr3 b/Source/Informes/2/2/InfPresupuestoCliente.fr3 index 5585265..dbfb74c 100644 --- a/Source/Informes/2/2/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/2/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/Source/Informes/2/4/InfContratoCliente.fr3 b/Source/Informes/2/4/InfContratoCliente.fr3 index eeadb56..f34918e 100644 --- a/Source/Informes/2/4/InfContratoCliente.fr3 +++ b/Source/Informes/2/4/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -84,7 +84,7 @@ - + diff --git a/Source/Informes/2/4/InfPresupuestoCliente.fr3 b/Source/Informes/2/4/InfPresupuestoCliente.fr3 index 8befba0..2e31ba8 100644 --- a/Source/Informes/2/4/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/4/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/Source/Informes/2/InfPresupuestoCliente.fr3 b/Source/Informes/2/InfPresupuestoCliente.fr3 index 376687f..e00bea3 100644 --- a/Source/Informes/2/InfPresupuestoCliente.fr3 +++ b/Source/Informes/2/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ - + @@ -79,7 +79,7 @@ - + diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm index eda861a..d8a4881 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm @@ -256,8 +256,6 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 419 - ExplicitWidth = 250 - Width = 250 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas index 80cc66a..cbd9c72 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.pas @@ -203,12 +203,17 @@ end; procedure TfrViewAlbaranesCliente.ConfigView; begin inherited; - - if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then - cxGridViewTIENDA.Visible := True - else + //Solo para Graden + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then + begin cxGridViewTIENDA.Visible := False; - + cxGridViewTIENDA.VisibleForCustomization := False; + end + else + begin + cxGridViewTIENDA.Visible := True; + cxGridViewTIENDA.VisibleForCustomization := True; + end; end; procedure TfrViewAlbaranesCliente.cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); diff --git a/Source/Modulos/Comisiones/Plugin/uPluginComisiones.dfm b/Source/Modulos/Comisiones/Plugin/uPluginComisiones.dfm index fe77f62..a4a9ead 100644 --- a/Source/Modulos/Comisiones/Plugin/uPluginComisiones.dfm +++ b/Source/Modulos/Comisiones/Plugin/uPluginComisiones.dfm @@ -65,7 +65,9 @@ object PluginComisiones: TPluginComisiones object actComisiones: TAction Category = 'Comisiones' Caption = 'Liquidaciones de comisiones' + Enabled = False ImageIndex = 0 + Visible = False OnExecute = actComisionesExecute OnUpdate = actComisionesUpdate end diff --git a/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas b/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas index cb77cca..14f7cb9 100644 --- a/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas +++ b/Source/Modulos/Contabilidad/Plugin/uPluginContabilidad.pas @@ -185,6 +185,16 @@ constructor TPluginContabilidad.Create(AOwner: TComponent); begin inherited; uContabilidadViewRegister.RegisterViews; + if (AppFactuGES.UsuarioActivo.ID_PERFIL = CTE_PERFIL_ADMINISTRADOR) then + begin + actSubCuentas.Enabled := True; + actSubCuentas.Visible := True; + end + else + begin + actSubCuentas.Enabled := False; + actSubCuentas.Visible := False; + end; end; destructor TPluginContabilidad.Destroy; diff --git a/Source/Modulos/Contactos/Contactos_Group.groupproj b/Source/Modulos/Contactos/Contactos_Group.groupproj index 8fd504a..9b6ccac 100644 --- a/Source/Modulos/Contactos/Contactos_Group.groupproj +++ b/Source/Modulos/Contactos/Contactos_Group.groupproj @@ -14,6 +14,10 @@ + + + + @@ -191,14 +195,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Contactos/Controller/Contactos_controller.dpk b/Source/Modulos/Contactos/Controller/Contactos_controller.dpk index cb7e962..ab14128 100644 --- a/Source/Modulos/Contactos/Controller/Contactos_controller.dpk +++ b/Source/Modulos/Contactos/Controller/Contactos_controller.dpk @@ -37,7 +37,17 @@ requires rtl, vclactnband, vclx, - vcl; + vcl, + dbrtl, + DataAbstract_Core_D11, + vcldb, + dsnap, + adortl, + RemObjects_Core_D11, + cxLibraryD11, + dxThemeD11, + dxGDIPlusD11, + dxCoreD11; contains uContactosController in 'uContactosController.pas', @@ -47,7 +57,7 @@ contains uIEditorClientes in 'View\uIEditorClientes.pas', uClientesController in 'uClientesController.pas', uIEditorProveedores in 'View\uIEditorProveedores.pas', - uIEditorVendedores in 'View\uIEditorVendedores.pas', + uIEditorComerciales in 'View\uIEditorComerciales.pas', uIEditorVendedor in 'View\uIEditorVendedor.pas', uIEditorProveedor in 'View\uIEditorProveedor.pas', uProveedoresController in 'uProveedoresController.pas', @@ -69,6 +79,13 @@ contains uPersonalContactoController in 'uPersonalContactoController.pas', uIEditorElegirPersonaContacto in 'View\uIEditorElegirPersonaContacto.pas', uIEditorPersonalContacto in 'View\uIEditorPersonalContacto.pas', - uIEditorElegirDireccionEntrega in 'View\uIEditorElegirDireccionEntrega.pas'; + uIEditorElegirDireccionEntrega in 'View\uIEditorElegirDireccionEntrega.pas', + uIEditorInstaladores in 'View\uIEditorInstaladores.pas', + uIEditorInstalador in 'View\uIEditorInstalador.pas', + uIEditorComercial in 'View\uIEditorComercial.pas', + uComercialesController in 'uComercialesController.pas', + uInstaladoresController in 'uInstaladoresController.pas', + uIEditorElegirComerciales in 'View\uIEditorElegirComerciales.pas', + uIEditorElegirInstaladores in 'View\uIEditorElegirInstaladores.pas'; end. diff --git a/Source/Modulos/Contactos/Controller/Contactos_controller.dproj b/Source/Modulos/Contactos/Controller/Contactos_controller.dproj index 40d1f89..f7b43e0 100644 --- a/Source/Modulos/Contactos/Controller/Contactos_controller.dproj +++ b/Source/Modulos/Contactos/Controller/Contactos_controller.dproj @@ -49,6 +49,24 @@ + + + + + + + + + + + + + + + + + + @@ -62,49 +80,66 @@ MainSource - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + diff --git a/Source/Modulos/Delegaciones/Views/Delegaciones_view.res b/Source/Modulos/Delegaciones/Views/Delegaciones_view.res new file mode 100644 index 0000000..86c94e6 Binary files /dev/null and b/Source/Modulos/Delegaciones/Views/Delegaciones_view.res differ diff --git a/Source/Modulos/Delegaciones/Views/uDelegacionesViewRegister.pas b/Source/Modulos/Delegaciones/Views/uDelegacionesViewRegister.pas new file mode 100644 index 0000000..78df7d9 --- /dev/null +++ b/Source/Modulos/Delegaciones/Views/uDelegacionesViewRegister.pas @@ -0,0 +1,23 @@ +unit uDelegacionesViewRegister; + +interface + +procedure RegisterViews; +procedure UnregisterViews; + +implementation + +uses + uEditorRegistryUtils, uEditorDelegaciones; + +procedure RegisterViews; +begin + EditorRegistry.RegisterClass(TfEditorDelegaciones, 'EditorDelegaciones'); +end; + +procedure UnregisterViews; +begin + EditorRegistry.UnRegisterClass(TfEditorDelegaciones); +end; + +end. diff --git a/Source/Modulos/Delegaciones/Views/uEditorDelegaciones.dfm b/Source/Modulos/Delegaciones/Views/uEditorDelegaciones.dfm new file mode 100644 index 0000000..5fd1392 --- /dev/null +++ b/Source/Modulos/Delegaciones/Views/uEditorDelegaciones.dfm @@ -0,0 +1,144 @@ +object fEditorDelegaciones: TfEditorDelegaciones + Left = 453 + Top = 234 + ActiveControl = ListaDelegaciones + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = 'Administraci'#243'n de delegaciones' + ClientHeight = 494 + ClientWidth = 404 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnClose = CustomEditorClose + OnShow = FormShow + InstanceID = 0 + ReadOnly = False + PixelsPerInch = 96 + TextHeight = 13 + object bAceptar: TButton + Left = 235 + Top = 462 + Width = 75 + Height = 23 + Action = actAceptar + Default = True + TabOrder = 1 + end + object bCancelar: TButton + Left = 321 + Top = 462 + Width = 75 + Height = 23 + Action = actCancelar + Cancel = True + TabOrder = 2 + end + object PageControl1: TPageControl + Left = 8 + Top = 8 + Width = 390 + Height = 442 + ActivePage = TabSheet1 + TabOrder = 0 + object TabSheet1: TTabSheet + Caption = 'Delegaciones' + object Label1: TLabel + Left = 10 + Top = 12 + Width = 158 + Height = 13 + Caption = 'Lista de delegaciones disponibles' + end + object Label2: TLabel + Left = 10 + Top = 326 + Width = 139 + Height = 13 + Caption = 'A'#241'adir una nueva delegaci'#243'n' + end + object Bevel1: TBevel + Left = 187 + Top = 330 + Width = 189 + Height = 5 + Shape = bsBottomLine + end + object eCategoria: TLabel + Left = 18 + Top = 353 + Width = 40 + Height = 13 + Caption = 'Nombre:' + end + object ListaDelegaciones: TDBLookupListBox + Left = 8 + Top = 31 + Width = 262 + Height = 277 + KeyField = 'RecID' + ListField = 'DESCRIPCION' + ListSource = DADataSource + TabOrder = 0 + end + object bEliminar: TButton + Left = 281 + Top = 31 + Width = 95 + Height = 23 + Action = actEliminar + TabOrder = 1 + end + object editDelegacion: TEdit + Left = 64 + Top = 349 + Width = 312 + Height = 21 + TabOrder = 2 + end + object bAnadir: TButton + Left = 281 + Top = 382 + Width = 95 + Height = 23 + Action = actAnadir + TabOrder = 3 + end + end + end + object ActionList1: TActionList + Left = 144 + Top = 16 + object actAnadir: TAction + Caption = '&A'#241'adir' + OnExecute = actAnadirExecute + OnUpdate = actAnadirUpdate + end + object actEliminar: TAction + Caption = '&Eliminar' + OnExecute = actEliminarExecute + OnUpdate = actEliminarUpdate + end + object actAceptar: TAction + Caption = 'A&ceptar' + OnExecute = actAceptarExecute + end + object actCancelar: TAction + Caption = '&Cancelar' + OnExecute = actCancelarExecute + end + object actCerrar: TAction + Caption = 'actCerrar' + OnExecute = actCerrarExecute + end + end + object DADataSource: TDADataSource + Left = 168 + Top = 16 + end +end diff --git a/Source/Modulos/Delegaciones/Views/uEditorDelegaciones.pas b/Source/Modulos/Delegaciones/Views/uEditorDelegaciones.pas new file mode 100644 index 0000000..9041df7 --- /dev/null +++ b/Source/Modulos/Delegaciones/Views/uEditorDelegaciones.pas @@ -0,0 +1,181 @@ +{ +=============================================================================== + Copyright (©) 2006. Rodax Software. +=============================================================================== + Los contenidos de este fichero son propiedad de Rodax Software titular del + copyright. Este fichero sólo podrá ser copiado, distribuido y utilizado, + en su totalidad o en parte, con el permiso escrito de Rodax Software, o de + acuerdo con los términos y condiciones establecidas en el acuerdo/contrato + bajo el que se suministra. + ----------------------------------------------------------------------------- + Web: www.rodax-software.com +=============================================================================== + Fecha primera versión: 22-05-2006 + Versión actual: 1.0.0 + Fecha versión actual: 22-05-2006 +=============================================================================== + Modificaciones: + + Fecha Comentarios + --------------------------------------------------------------------------- +=============================================================================== +} + +unit uEditorDelegaciones; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, DB, StdCtrls, DBCtrls, uDADataTable, ActnList, + uIEditorDelegaciones, uCustomEditor, uGUIBase, ExtCtrls, + ComCtrls, uBizDelegaciones, uDelegacionesController, uDAInterfaces; + +type + TfEditorDelegaciones = class(TCustomEditor, IEditorDelegaciones) + ActionList1: TActionList; + DADataSource: TDADataSource; + ListaDelegaciones: TDBLookupListBox; + actAnadir: TAction; + actEliminar: TAction; + bEliminar: TButton; + actAceptar: TAction; + actCancelar: TAction; + bAceptar: TButton; + bCancelar: TButton; + actCerrar: TAction; + PageControl1: TPageControl; + TabSheet1: TTabSheet; + Label1: TLabel; + Label2: TLabel; + Bevel1: TBevel; + eCategoria: TLabel; + editDelegacion: TEdit; + bAnadir: TButton; + procedure FormShow(Sender: TObject); + procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction); + + procedure actAnadirExecute(Sender: TObject); + procedure actEliminarExecute(Sender: TObject); + procedure actAceptarExecute(Sender: TObject); + procedure actCancelarExecute(Sender: TObject); + procedure actCerrarExecute(Sender: TObject); + procedure actAnadirUpdate(Sender: TObject); + procedure actEliminarUpdate(Sender: TObject); + protected + FDelegaciones: IBizDelegacion; + FController: IDelegacionesController; + function GetDelegaciones: IBizDelegacion; + procedure SetDelegaciones(const Value: IBizDelegacion); + function GetController : IDelegacionesController; + procedure SetController (const Value : IDelegacionesController); + public + property Delegaciones: IBizDelegacion read GetDelegaciones write SetDelegaciones; + property Controller : IDelegacionesController read GetController write SetController; + end; + + +implementation +{$R *.dfm} + +{ TfEditorDelegaciones } + +uses + uDialogUtils; + +function TfEditorDelegaciones.GetController: IDelegacionesController; +begin + Result := FController; +end; + +function TfEditorDelegaciones.GetDelegaciones: IBizDelegacion; +begin + Result := FDelegaciones; +end; + +procedure TfEditorDelegaciones.SetController(const Value: IDelegacionesController); +begin + FController := Value; +end; + +procedure TfEditorDelegaciones.SetDelegaciones(const Value: IBizDelegacion); +begin + FDelegaciones := Value; + DADataSource.DataTable := (FDelegaciones as IBizDelegacion).DataTable; + DADataSource.DataTable.Open; +end; + +procedure TfEditorDelegaciones.actAnadirExecute(Sender: TObject); +begin + if not FController.Localizar(Delegaciones, editDelegacion.Text) then + begin + Delegaciones.Append; + Delegaciones.DESCRIPCION := editDelegacion.Text; + Delegaciones.Post; + editDelegacion.Clear; + ListaDelegaciones.SetFocus; + end + else + ShowErrorMessage('Ya existe la unidad ' + editDelegacion.Text, + 'Ya existe la unidad ''' + editDelegacion.Text + ''' en la lista.'); +end; + +procedure TfEditorDelegaciones.actEliminarExecute(Sender: TObject); +begin + Delegaciones.Delete; + ListaDelegaciones.SetFocus; +end; + +procedure TfEditorDelegaciones.actEliminarUpdate(Sender: TObject); +begin + (Sender as TAction).Enabled := (FDelegaciones.DataTable.RecordCount > 0) and + (Length(ListaDelegaciones.SelectedItem) > 0); + +end; + +procedure TfEditorDelegaciones.CustomEditorClose(Sender: TObject; var Action: TCloseAction); +begin + FDelegaciones := Nil; + FController := Nil; +end; + +procedure TfEditorDelegaciones.actAceptarExecute(Sender: TObject); +begin + try + Delegaciones.DataTable.ApplyUpdates; + except + on E : Exception do begin + Delegaciones.DataTable.CancelUpdates; + ShowErrorMessage('Error al guardar cambios', 'Se ha producido un error grave', E); + exit; + end; + end; + actCerrar.Execute; +end; + +procedure TfEditorDelegaciones.actCancelarExecute(Sender: TObject); +begin + Delegaciones.DataTable.CancelUpdates; + actCerrar.Execute; +end; + +procedure TfEditorDelegaciones.actCerrarExecute(Sender: TObject); +begin + Close; +end; + +procedure TfEditorDelegaciones.actAnadirUpdate(Sender: TObject); +begin + (Sender as TAction).Enabled := (Length(editDelegacion.Text) > 0) +end; + +procedure TfEditorDelegaciones.FormShow(Sender: TObject); +begin + if not FDelegaciones.DataTable.Active then + FDelegaciones.DataTable.Active := true; + + FDelegaciones.DataTable.Sort(['DESCRIPCION'], [sdAscending]); + EditDelegacion.SetFocus; +end; + +end. diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index ed14a12..a43d45a 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -7,7 +7,7 @@ interface uses Classes, SysUtils, Variants, uDADataTable, uControllerBase, uIDataModuleFacturasCliente, uClientesController, uDetallesFacturaClienteController, uBizAlbaranesCliente, - uBizFacturasCliente, uBizDireccionesContacto; + uBizFacturasCliente, uBizDireccionesContacto, uBizContactos; type IFacturasClienteController = interface(IControllerBase) @@ -56,6 +56,7 @@ type function darTiposFacturaCliente: IBizTiposFacturaCliente; function AsignarTipoOperacion(AFacturas: IBizFacturaCliente): Boolean; + function CambiarComercial(AFactura : IBizFacturaCliente; AComercial: IBizComercial): Boolean; end; TFacturasClienteController = class(TControllerBase, IFacturasClienteController) @@ -126,6 +127,7 @@ type function darTiposFacturaCliente: IBizTiposFacturaCliente; function AsignarTipoOperacion(AFacturas: IBizFacturaCliente): Boolean; + function CambiarComercial(AFactura : IBizFacturaCliente; AComercial: IBizComercial): Boolean; end; implementation @@ -133,7 +135,7 @@ implementation uses Windows, uDateUtils, uNumUtils, Controls, cxControls, DB, uEditorRegistryUtils, schFacturasClienteClient_Intf, - uBizContactos, uIEditorFacturasCliente, uIEditorFacturaCliente, uFactuGES_App, + uIEditorFacturasCliente, uIEditorFacturaCliente, uFactuGES_App, uDataModuleFacturasCliente, uBizDetallesFacturaCliente, uControllerDetallesBase, uDataModuleUsuarios, uDAInterfaces, uDataTableUtils, uAlbaranesClienteController, schAlbaranesClienteClient_Intf, uROTypes, uDetallesAlbaranClienteController, @@ -624,6 +626,34 @@ begin FiltrarEmpresa(Result); end; +function TFacturasClienteController.CambiarComercial( + AFactura: IBizFacturaCliente; AComercial: IBizComercial): Boolean; +var + bEnEdicion : Boolean; + +begin + if not Assigned(AFactura) then + raise Exception.Create ('AContrato no asignado'); + + ShowHourglassCursor; + try + bEnEdicion := (AFactura.DataTable.State in dsEditModes); + if not bEnEdicion then + AFactura.Edit; + + AFactura.DataTable.Edit; + AFactura.ID_AGENTE := AComercial.ID; + AFactura.NOMBRE_AGENTE := AComercial.NOMBRE; + AFactura.DELEGACION := AComercial.DELEGACION; + + if not bEnEdicion then + AFactura.Post; + + finally + HideHourglassCursor; + end; +end; + procedure TFacturasClienteController.CopiarDireccion( const ADireccionEnvio: IBizDireccionesContacto; AFactura: IBizFacturaCliente); var @@ -1015,6 +1045,13 @@ begin Result := False; AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser eliminada'; end; + + if not AFactura.FAC_PROV_GRADENIsNull then + begin + Result := False; + AComentario := 'La factura esta generada en Graden como factura de proveedor, elimine primero esa factura'; + end; + { else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then begin @@ -1060,6 +1097,13 @@ begin Result := False; AComentario := 'La factura esta parcial o totalmente pagada, por lo que no puede ser modificada'; end; + + if not AFactura.FAC_PROV_GRADENIsNull then + begin + Result := False; + AComentario := 'La factura esta generada en Graden como factura de proveedor, elimine primero esa factura'; + end; + { else if (AFactura.ESTADO_EJERCICIO = CTE_CERRADO) then begin diff --git a/Source/Modulos/Facturas de cliente/Data/FacturasCliente_data.dproj b/Source/Modulos/Facturas de cliente/Data/FacturasCliente_data.dproj index c7e5c12..41e1b3a 100644 --- a/Source/Modulos/Facturas de cliente/Data/FacturasCliente_data.dproj +++ b/Source/Modulos/Facturas de cliente/Data/FacturasCliente_data.dproj @@ -49,7 +49,7 @@ MainSource - +
DataModuleFacturasCliente
TDAClientDataModule diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm index 3e69f05..ac2ef59 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm @@ -264,11 +264,6 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente Alignment = taRightJustify DictionaryEntry = 'FacturasCliente_IMPORTE_PORTE' end - item - Name = 'ID_AGENTE' - DataType = datInteger - DictionaryEntry = 'FacturasCliente_ID_AGENTE' - end item Name = 'REFERENCIA_COMISION' DataType = datString @@ -373,6 +368,25 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente DataType = datString Size = 2000 ServerAutoRefresh = True + end + item + Name = 'ID_AGENTE' + DataType = datInteger + DictionaryEntry = 'FacturasCliente_ID_AGENTE' + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 + end + item + Name = 'FAC_PROV_GRADEN' + DataType = datSmallInt end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj index fa6217a..b3cd0f3 100644 --- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj +++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj @@ -17,6 +17,7 @@ + @@ -31,6 +32,7 @@ + @@ -206,15 +208,6 @@ - - - - - - - - - @@ -314,15 +307,6 @@ - - - - - - - - - @@ -332,6 +316,15 @@ + + + + + + + + + @@ -341,14 +334,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas index f8b9635..3ee91b5 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteClient_Intf.pas @@ -9,10 +9,10 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturas = '{700A8C26-CB78-4B2A-9180-1C8EBE14F1F5}'; - RID_TiposFacturaCliente = '{16878B47-BBFA-49B8-A8B6-0BEC17027198}'; - RID_FacturasCliente = '{F4246ABE-0846-4389-BD4C-6FE2438F1AEF}'; - RID_FacturasCliente_Detalles = '{8E519944-EB60-4DA6-86B3-6F834F0AD6F5}'; + RID_ListaAnosFacturas = '{F3F303D6-2BD6-488C-8EC6-59A7E2210135}'; + RID_TiposFacturaCliente = '{5475F954-9599-46FE-A594-639F265EF7A0}'; + RID_FacturasCliente = '{13DB33BB-F3FB-4E18-B10A-2803B88F4180}'; + RID_FacturasCliente_Detalles = '{859E9235-FF09-4949-8207-9D23DDC04353}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; @@ -72,7 +72,6 @@ const fld_FacturasClienteID_TIPO_IVA = 'ID_TIPO_IVA'; fld_FacturasClienteIMPORTE_NETO = 'IMPORTE_NETO'; fld_FacturasClienteIMPORTE_PORTE = 'IMPORTE_PORTE'; - fld_FacturasClienteID_AGENTE = 'ID_AGENTE'; fld_FacturasClienteREFERENCIA_COMISION = 'REFERENCIA_COMISION'; fld_FacturasClienteIGNORAR_CONTABILIDAD = 'IGNORAR_CONTABILIDAD'; fld_FacturasClienteID_TIENDA = 'ID_TIENDA'; @@ -91,6 +90,10 @@ const fld_FacturasClienteFECHA_RETENCION = 'FECHA_RETENCION'; fld_FacturasClienteID_TIPO_FACTURA = 'ID_TIPO_FACTURA'; fld_FacturasClienteTIPO_OPERACION = 'TIPO_OPERACION'; + fld_FacturasClienteID_AGENTE = 'ID_AGENTE'; + fld_FacturasClienteNOMBRE_AGENTE = 'NOMBRE_AGENTE'; + fld_FacturasClienteDELEGACION = 'DELEGACION'; + fld_FacturasClienteFAC_PROV_GRADEN = 'FAC_PROV_GRADEN'; { FacturasCliente field indexes } idx_FacturasClienteID = 0; @@ -130,25 +133,28 @@ const idx_FacturasClienteID_TIPO_IVA = 34; idx_FacturasClienteIMPORTE_NETO = 35; idx_FacturasClienteIMPORTE_PORTE = 36; - idx_FacturasClienteID_AGENTE = 37; - idx_FacturasClienteREFERENCIA_COMISION = 38; - idx_FacturasClienteIGNORAR_CONTABILIDAD = 39; - idx_FacturasClienteID_TIENDA = 40; - idx_FacturasClienteTIENDA = 41; - idx_FacturasClienteID_SUBCUENTA = 42; - idx_FacturasClienteSUBCUENTA = 43; - idx_FacturasClienteID_EJERCICIO = 44; - idx_FacturasClienteESTADO_EJERCICIO = 45; - idx_FacturasClienteASIENTO_PUNTEADO = 46; - idx_FacturasClienteID_CONTRATO = 47; - idx_FacturasClienteREF_CONTRATO = 48; - idx_FacturasClienteREF_CLI_CONTRATO = 49; - idx_FacturasClienteSIN_COMISION = 50; - idx_FacturasClienteRETENCION = 51; - idx_FacturasClienteIMPORTE_RETENCION = 52; - idx_FacturasClienteFECHA_RETENCION = 53; - idx_FacturasClienteID_TIPO_FACTURA = 54; - idx_FacturasClienteTIPO_OPERACION = 55; + idx_FacturasClienteREFERENCIA_COMISION = 37; + idx_FacturasClienteIGNORAR_CONTABILIDAD = 38; + idx_FacturasClienteID_TIENDA = 39; + idx_FacturasClienteTIENDA = 40; + idx_FacturasClienteID_SUBCUENTA = 41; + idx_FacturasClienteSUBCUENTA = 42; + idx_FacturasClienteID_EJERCICIO = 43; + idx_FacturasClienteESTADO_EJERCICIO = 44; + idx_FacturasClienteASIENTO_PUNTEADO = 45; + idx_FacturasClienteID_CONTRATO = 46; + idx_FacturasClienteREF_CONTRATO = 47; + idx_FacturasClienteREF_CLI_CONTRATO = 48; + idx_FacturasClienteSIN_COMISION = 49; + idx_FacturasClienteRETENCION = 50; + idx_FacturasClienteIMPORTE_RETENCION = 51; + idx_FacturasClienteFECHA_RETENCION = 52; + idx_FacturasClienteID_TIPO_FACTURA = 53; + idx_FacturasClienteTIPO_OPERACION = 54; + idx_FacturasClienteID_AGENTE = 55; + idx_FacturasClienteNOMBRE_AGENTE = 56; + idx_FacturasClienteDELEGACION = 57; + idx_FacturasClienteFAC_PROV_GRADEN = 58; { FacturasCliente_Detalles fields } fld_FacturasCliente_DetallesID = 'ID'; @@ -187,7 +193,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{97C76BDF-F243-45CF-83A8-3389872A1C88}'] + ['{6026D89F-F37C-4A1C-A0A8-9B63684B5465}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -222,7 +228,7 @@ type { ITiposFacturaCliente } ITiposFacturaCliente = interface(IDAStronglyTypedDataTable) - ['{9B6B81C1-044C-4B79-8686-B938DB928895}'] + ['{84DB4B7B-97D0-4F3C-856D-04955CA693D9}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -269,7 +275,7 @@ type { IFacturasCliente } IFacturasCliente = interface(IDAStronglyTypedDataTable) - ['{53DF775E-B4D1-4621-836B-EE16A1A631FC}'] + ['{79E22398-5A04-431C-BBDC-C5CE92FBA8E5}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -418,10 +424,6 @@ type procedure SetIMPORTE_PORTEValue(const aValue: Currency); function GetIMPORTE_PORTEIsNull: Boolean; procedure SetIMPORTE_PORTEIsNull(const aValue: Boolean); - function GetID_AGENTEValue: Integer; - procedure SetID_AGENTEValue(const aValue: Integer); - function GetID_AGENTEIsNull: Boolean; - procedure SetID_AGENTEIsNull(const aValue: Boolean); function GetREFERENCIA_COMISIONValue: String; procedure SetREFERENCIA_COMISIONValue(const aValue: String); function GetREFERENCIA_COMISIONIsNull: Boolean; @@ -494,6 +496,22 @@ type procedure SetTIPO_OPERACIONValue(const aValue: String); function GetTIPO_OPERACIONIsNull: Boolean; procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); + function GetID_AGENTEValue: Integer; + procedure SetID_AGENTEValue(const aValue: Integer); + function GetID_AGENTEIsNull: Boolean; + procedure SetID_AGENTEIsNull(const aValue: Boolean); + function GetNOMBRE_AGENTEValue: String; + procedure SetNOMBRE_AGENTEValue(const aValue: String); + function GetNOMBRE_AGENTEIsNull: Boolean; + procedure SetNOMBRE_AGENTEIsNull(const aValue: Boolean); + function GetDELEGACIONValue: String; + procedure SetDELEGACIONValue(const aValue: String); + function GetDELEGACIONIsNull: Boolean; + procedure SetDELEGACIONIsNull(const aValue: Boolean); + function GetFAC_PROV_GRADENValue: SmallInt; + procedure SetFAC_PROV_GRADENValue(const aValue: SmallInt); + function GetFAC_PROV_GRADENIsNull: Boolean; + procedure SetFAC_PROV_GRADENIsNull(const aValue: Boolean); { Properties } @@ -571,8 +589,6 @@ type property IMPORTE_NETOIsNull: Boolean read GetIMPORTE_NETOIsNull write SetIMPORTE_NETOIsNull; property IMPORTE_PORTE: Currency read GetIMPORTE_PORTEValue write SetIMPORTE_PORTEValue; property IMPORTE_PORTEIsNull: Boolean read GetIMPORTE_PORTEIsNull write SetIMPORTE_PORTEIsNull; - property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; - property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; property REFERENCIA_COMISION: String read GetREFERENCIA_COMISIONValue write SetREFERENCIA_COMISIONValue; property REFERENCIA_COMISIONIsNull: Boolean read GetREFERENCIA_COMISIONIsNull write SetREFERENCIA_COMISIONIsNull; property IGNORAR_CONTABILIDAD: SmallInt read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue; @@ -609,6 +625,14 @@ type property ID_TIPO_FACTURAIsNull: Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; property TIPO_OPERACION: String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; property TIPO_OPERACIONIsNull: Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; + property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; + property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; + property NOMBRE_AGENTE: String read GetNOMBRE_AGENTEValue write SetNOMBRE_AGENTEValue; + property NOMBRE_AGENTEIsNull: Boolean read GetNOMBRE_AGENTEIsNull write SetNOMBRE_AGENTEIsNull; + property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; + property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; + property FAC_PROV_GRADEN: SmallInt read GetFAC_PROV_GRADENValue write SetFAC_PROV_GRADENValue; + property FAC_PROV_GRADENIsNull: Boolean read GetFAC_PROV_GRADENIsNull write SetFAC_PROV_GRADENIsNull; end; { TFacturasClienteDataTableRules } @@ -765,10 +789,6 @@ type procedure SetIMPORTE_PORTEValue(const aValue: Currency); virtual; function GetIMPORTE_PORTEIsNull: Boolean; virtual; procedure SetIMPORTE_PORTEIsNull(const aValue: Boolean); virtual; - function GetID_AGENTEValue: Integer; virtual; - procedure SetID_AGENTEValue(const aValue: Integer); virtual; - function GetID_AGENTEIsNull: Boolean; virtual; - procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual; function GetREFERENCIA_COMISIONValue: String; virtual; procedure SetREFERENCIA_COMISIONValue(const aValue: String); virtual; function GetREFERENCIA_COMISIONIsNull: Boolean; virtual; @@ -841,6 +861,22 @@ type procedure SetTIPO_OPERACIONValue(const aValue: String); virtual; function GetTIPO_OPERACIONIsNull: Boolean; virtual; procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); virtual; + function GetID_AGENTEValue: Integer; virtual; + procedure SetID_AGENTEValue(const aValue: Integer); virtual; + function GetID_AGENTEIsNull: Boolean; virtual; + procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_AGENTEValue: String; virtual; + procedure SetNOMBRE_AGENTEValue(const aValue: String); virtual; + function GetNOMBRE_AGENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_AGENTEIsNull(const aValue: Boolean); virtual; + function GetDELEGACIONValue: String; virtual; + procedure SetDELEGACIONValue(const aValue: String); virtual; + function GetDELEGACIONIsNull: Boolean; virtual; + procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual; + function GetFAC_PROV_GRADENValue: SmallInt; virtual; + procedure SetFAC_PROV_GRADENValue(const aValue: SmallInt); virtual; + function GetFAC_PROV_GRADENIsNull: Boolean; virtual; + procedure SetFAC_PROV_GRADENIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -917,8 +953,6 @@ type property IMPORTE_NETOIsNull: Boolean read GetIMPORTE_NETOIsNull write SetIMPORTE_NETOIsNull; property IMPORTE_PORTE: Currency read GetIMPORTE_PORTEValue write SetIMPORTE_PORTEValue; property IMPORTE_PORTEIsNull: Boolean read GetIMPORTE_PORTEIsNull write SetIMPORTE_PORTEIsNull; - property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; - property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; property REFERENCIA_COMISION: String read GetREFERENCIA_COMISIONValue write SetREFERENCIA_COMISIONValue; property REFERENCIA_COMISIONIsNull: Boolean read GetREFERENCIA_COMISIONIsNull write SetREFERENCIA_COMISIONIsNull; property IGNORAR_CONTABILIDAD: SmallInt read GetIGNORAR_CONTABILIDADValue write SetIGNORAR_CONTABILIDADValue; @@ -955,6 +989,14 @@ type property ID_TIPO_FACTURAIsNull: Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; property TIPO_OPERACION: String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; property TIPO_OPERACIONIsNull: Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; + property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; + property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; + property NOMBRE_AGENTE: String read GetNOMBRE_AGENTEValue write SetNOMBRE_AGENTEValue; + property NOMBRE_AGENTEIsNull: Boolean read GetNOMBRE_AGENTEIsNull write SetNOMBRE_AGENTEIsNull; + property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; + property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; + property FAC_PROV_GRADEN: SmallInt read GetFAC_PROV_GRADENValue write SetFAC_PROV_GRADENValue; + property FAC_PROV_GRADENIsNull: Boolean read GetFAC_PROV_GRADENIsNull write SetFAC_PROV_GRADENIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -964,7 +1006,7 @@ type { IFacturasCliente_Detalles } IFacturasCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{57377F2A-FB8A-490D-8CC7-F484CC677EC3}'] + ['{0BEE4EB9-9297-4108-8DF8-B28B639FFF0F}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2051,27 +2093,6 @@ begin DataTable.Fields[idx_FacturasClienteIMPORTE_PORTE].AsVariant := Null; end; -function TFacturasClienteDataTableRules.GetID_AGENTEValue: Integer; -begin - result := DataTable.Fields[idx_FacturasClienteID_AGENTE].AsInteger; -end; - -procedure TFacturasClienteDataTableRules.SetID_AGENTEValue(const aValue: Integer); -begin - DataTable.Fields[idx_FacturasClienteID_AGENTE].AsInteger := aValue; -end; - -function TFacturasClienteDataTableRules.GetID_AGENTEIsNull: boolean; -begin - result := DataTable.Fields[idx_FacturasClienteID_AGENTE].IsNull; -end; - -procedure TFacturasClienteDataTableRules.SetID_AGENTEIsNull(const aValue: Boolean); -begin - if aValue then - DataTable.Fields[idx_FacturasClienteID_AGENTE].AsVariant := Null; -end; - function TFacturasClienteDataTableRules.GetREFERENCIA_COMISIONValue: String; begin result := DataTable.Fields[idx_FacturasClienteREFERENCIA_COMISION].AsString; @@ -2450,6 +2471,90 @@ begin DataTable.Fields[idx_FacturasClienteTIPO_OPERACION].AsVariant := Null; end; +function TFacturasClienteDataTableRules.GetID_AGENTEValue: Integer; +begin + result := DataTable.Fields[idx_FacturasClienteID_AGENTE].AsInteger; +end; + +procedure TFacturasClienteDataTableRules.SetID_AGENTEValue(const aValue: Integer); +begin + DataTable.Fields[idx_FacturasClienteID_AGENTE].AsInteger := aValue; +end; + +function TFacturasClienteDataTableRules.GetID_AGENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteID_AGENTE].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetID_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteID_AGENTE].AsVariant := Null; +end; + +function TFacturasClienteDataTableRules.GetNOMBRE_AGENTEValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteNOMBRE_AGENTE].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetNOMBRE_AGENTEValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteNOMBRE_AGENTE].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetNOMBRE_AGENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteNOMBRE_AGENTE].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetNOMBRE_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteNOMBRE_AGENTE].AsVariant := Null; +end; + +function TFacturasClienteDataTableRules.GetDELEGACIONValue: String; +begin + result := DataTable.Fields[idx_FacturasClienteDELEGACION].AsString; +end; + +procedure TFacturasClienteDataTableRules.SetDELEGACIONValue(const aValue: String); +begin + DataTable.Fields[idx_FacturasClienteDELEGACION].AsString := aValue; +end; + +function TFacturasClienteDataTableRules.GetDELEGACIONIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteDELEGACION].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetDELEGACIONIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteDELEGACION].AsVariant := Null; +end; + +function TFacturasClienteDataTableRules.GetFAC_PROV_GRADENValue: SmallInt; +begin + result := DataTable.Fields[idx_FacturasClienteFAC_PROV_GRADEN].AsSmallInt; +end; + +procedure TFacturasClienteDataTableRules.SetFAC_PROV_GRADENValue(const aValue: SmallInt); +begin + DataTable.Fields[idx_FacturasClienteFAC_PROV_GRADEN].AsSmallInt := aValue; +end; + +function TFacturasClienteDataTableRules.GetFAC_PROV_GRADENIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasClienteFAC_PROV_GRADEN].IsNull; +end; + +procedure TFacturasClienteDataTableRules.SetFAC_PROV_GRADENIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasClienteFAC_PROV_GRADEN].AsVariant := Null; +end; + { TFacturasCliente_DetallesDataTableRules } constructor TFacturasCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas index 49ea9d0..e7aa46a 100644 --- a/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas +++ b/Source/Modulos/Facturas de cliente/Model/schFacturasClienteServer_Intf.pas @@ -9,15 +9,15 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturasDelta = '{27262DAF-04C2-41BD-BE56-F1E3932C3958}'; - RID_TiposFacturaClienteDelta = '{23C627D7-E517-4F77-831E-FF7350A5F4B9}'; - RID_FacturasClienteDelta = '{6290AB0B-0540-4FC1-9614-D4AFFFA4D9F2}'; - RID_FacturasCliente_DetallesDelta = '{48B82498-4D2D-4D30-9B4E-7193BC6B0308}'; + RID_ListaAnosFacturasDelta = '{1FA4D476-5A02-469D-A765-5D9DDFA91D2E}'; + RID_TiposFacturaClienteDelta = '{F7131BC6-FD5C-427E-BD3C-7B099A7C13B6}'; + RID_FacturasClienteDelta = '{C8D08F2C-4160-4B84-AB48-5462A3FF4CA6}'; + RID_FacturasCliente_DetallesDelta = '{5C121557-D524-4057-B41D-39660862AEAB}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{27262DAF-04C2-41BD-BE56-F1E3932C3958}'] + ['{1FA4D476-5A02-469D-A765-5D9DDFA91D2E}'] { Property getters and setters } function GetOldANOValue : String; @@ -51,7 +51,7 @@ type { ITiposFacturaClienteDelta } ITiposFacturaClienteDelta = interface(ITiposFacturaCliente) - ['{23C627D7-E517-4F77-831E-FF7350A5F4B9}'] + ['{F7131BC6-FD5C-427E-BD3C-7B099A7C13B6}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -97,7 +97,7 @@ type { IFacturasClienteDelta } IFacturasClienteDelta = interface(IFacturasCliente) - ['{6290AB0B-0540-4FC1-9614-D4AFFFA4D9F2}'] + ['{C8D08F2C-4160-4B84-AB48-5462A3FF4CA6}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -136,7 +136,6 @@ type function GetOldID_TIPO_IVAValue : Integer; function GetOldIMPORTE_NETOValue : Currency; function GetOldIMPORTE_PORTEValue : Currency; - function GetOldID_AGENTEValue : Integer; function GetOldREFERENCIA_COMISIONValue : String; function GetOldIGNORAR_CONTABILIDADValue : SmallInt; function GetOldID_TIENDAValue : Integer; @@ -155,6 +154,10 @@ type function GetOldFECHA_RETENCIONValue : DateTime; function GetOldID_TIPO_FACTURAValue : Integer; function GetOldTIPO_OPERACIONValue : String; + function GetOldID_AGENTEValue : Integer; + function GetOldNOMBRE_AGENTEValue : String; + function GetOldDELEGACIONValue : String; + function GetOldFAC_PROV_GRADENValue : SmallInt; { Properties } property OldID : Integer read GetOldIDValue; @@ -194,7 +197,6 @@ type property OldID_TIPO_IVA : Integer read GetOldID_TIPO_IVAValue; property OldIMPORTE_NETO : Currency read GetOldIMPORTE_NETOValue; property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue; - property OldID_AGENTE : Integer read GetOldID_AGENTEValue; property OldREFERENCIA_COMISION : String read GetOldREFERENCIA_COMISIONValue; property OldIGNORAR_CONTABILIDAD : SmallInt read GetOldIGNORAR_CONTABILIDADValue; property OldID_TIENDA : Integer read GetOldID_TIENDAValue; @@ -213,6 +215,10 @@ type property OldFECHA_RETENCION : DateTime read GetOldFECHA_RETENCIONValue; property OldID_TIPO_FACTURA : Integer read GetOldID_TIPO_FACTURAValue; property OldTIPO_OPERACION : String read GetOldTIPO_OPERACIONValue; + property OldID_AGENTE : Integer read GetOldID_AGENTEValue; + property OldNOMBRE_AGENTE : String read GetOldNOMBRE_AGENTEValue; + property OldDELEGACION : String read GetOldDELEGACIONValue; + property OldFAC_PROV_GRADEN : SmallInt read GetOldFAC_PROV_GRADENValue; end; { TFacturasClienteBusinessProcessorRules } @@ -443,12 +449,6 @@ type function GetOldIMPORTE_PORTEIsNull: Boolean; virtual; procedure SetIMPORTE_PORTEValue(const aValue: Currency); virtual; procedure SetIMPORTE_PORTEIsNull(const aValue: Boolean); virtual; - function GetID_AGENTEValue: Integer; virtual; - function GetID_AGENTEIsNull: Boolean; virtual; - function GetOldID_AGENTEValue: Integer; virtual; - function GetOldID_AGENTEIsNull: Boolean; virtual; - procedure SetID_AGENTEValue(const aValue: Integer); virtual; - procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual; function GetREFERENCIA_COMISIONValue: String; virtual; function GetREFERENCIA_COMISIONIsNull: Boolean; virtual; function GetOldREFERENCIA_COMISIONValue: String; virtual; @@ -557,6 +557,30 @@ type function GetOldTIPO_OPERACIONIsNull: Boolean; virtual; procedure SetTIPO_OPERACIONValue(const aValue: String); virtual; procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); virtual; + function GetID_AGENTEValue: Integer; virtual; + function GetID_AGENTEIsNull: Boolean; virtual; + function GetOldID_AGENTEValue: Integer; virtual; + function GetOldID_AGENTEIsNull: Boolean; virtual; + procedure SetID_AGENTEValue(const aValue: Integer); virtual; + procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_AGENTEValue: String; virtual; + function GetNOMBRE_AGENTEIsNull: Boolean; virtual; + function GetOldNOMBRE_AGENTEValue: String; virtual; + function GetOldNOMBRE_AGENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_AGENTEValue(const aValue: String); virtual; + procedure SetNOMBRE_AGENTEIsNull(const aValue: Boolean); virtual; + function GetDELEGACIONValue: String; virtual; + function GetDELEGACIONIsNull: Boolean; virtual; + function GetOldDELEGACIONValue: String; virtual; + function GetOldDELEGACIONIsNull: Boolean; virtual; + procedure SetDELEGACIONValue(const aValue: String); virtual; + procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual; + function GetFAC_PROV_GRADENValue: SmallInt; virtual; + function GetFAC_PROV_GRADENIsNull: Boolean; virtual; + function GetOldFAC_PROV_GRADENValue: SmallInt; virtual; + function GetOldFAC_PROV_GRADENIsNull: Boolean; virtual; + procedure SetFAC_PROV_GRADENValue(const aValue: SmallInt); virtual; + procedure SetFAC_PROV_GRADENIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -707,10 +731,6 @@ type property IMPORTE_PORTEIsNull : Boolean read GetIMPORTE_PORTEIsNull write SetIMPORTE_PORTEIsNull; property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue; property OldIMPORTE_PORTEIsNull : Boolean read GetOldIMPORTE_PORTEIsNull; - property ID_AGENTE : Integer read GetID_AGENTEValue write SetID_AGENTEValue; - property ID_AGENTEIsNull : Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; - property OldID_AGENTE : Integer read GetOldID_AGENTEValue; - property OldID_AGENTEIsNull : Boolean read GetOldID_AGENTEIsNull; property REFERENCIA_COMISION : String read GetREFERENCIA_COMISIONValue write SetREFERENCIA_COMISIONValue; property REFERENCIA_COMISIONIsNull : Boolean read GetREFERENCIA_COMISIONIsNull write SetREFERENCIA_COMISIONIsNull; property OldREFERENCIA_COMISION : String read GetOldREFERENCIA_COMISIONValue; @@ -783,6 +803,22 @@ type property TIPO_OPERACIONIsNull : Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; property OldTIPO_OPERACION : String read GetOldTIPO_OPERACIONValue; property OldTIPO_OPERACIONIsNull : Boolean read GetOldTIPO_OPERACIONIsNull; + property ID_AGENTE : Integer read GetID_AGENTEValue write SetID_AGENTEValue; + property ID_AGENTEIsNull : Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; + property OldID_AGENTE : Integer read GetOldID_AGENTEValue; + property OldID_AGENTEIsNull : Boolean read GetOldID_AGENTEIsNull; + property NOMBRE_AGENTE : String read GetNOMBRE_AGENTEValue write SetNOMBRE_AGENTEValue; + property NOMBRE_AGENTEIsNull : Boolean read GetNOMBRE_AGENTEIsNull write SetNOMBRE_AGENTEIsNull; + property OldNOMBRE_AGENTE : String read GetOldNOMBRE_AGENTEValue; + property OldNOMBRE_AGENTEIsNull : Boolean read GetOldNOMBRE_AGENTEIsNull; + property DELEGACION : String read GetDELEGACIONValue write SetDELEGACIONValue; + property DELEGACIONIsNull : Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; + property OldDELEGACION : String read GetOldDELEGACIONValue; + property OldDELEGACIONIsNull : Boolean read GetOldDELEGACIONIsNull; + property FAC_PROV_GRADEN : SmallInt read GetFAC_PROV_GRADENValue write SetFAC_PROV_GRADENValue; + property FAC_PROV_GRADENIsNull : Boolean read GetFAC_PROV_GRADENIsNull write SetFAC_PROV_GRADENIsNull; + property OldFAC_PROV_GRADEN : SmallInt read GetOldFAC_PROV_GRADENValue; + property OldFAC_PROV_GRADENIsNull : Boolean read GetOldFAC_PROV_GRADENIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -792,7 +828,7 @@ type { IFacturasCliente_DetallesDelta } IFacturasCliente_DetallesDelta = interface(IFacturasCliente_Detalles) - ['{48B82498-4D2D-4D30-9B4E-7193BC6B0308}'] + ['{5C121557-D524-4057-B41D-39660862AEAB}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -2280,37 +2316,6 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteIMPORTE_PORTE] := Null; end; -function TFacturasClienteBusinessProcessorRules.GetID_AGENTEValue: Integer; -begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE]; -end; - -function TFacturasClienteBusinessProcessorRules.GetID_AGENTEIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE]); -end; - -function TFacturasClienteBusinessProcessorRules.GetOldID_AGENTEValue: Integer; -begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_AGENTE]; -end; - -function TFacturasClienteBusinessProcessorRules.GetOldID_AGENTEIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_AGENTE]); -end; - -procedure TFacturasClienteBusinessProcessorRules.SetID_AGENTEValue(const aValue: Integer); -begin - BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE] := aValue; -end; - -procedure TFacturasClienteBusinessProcessorRules.SetID_AGENTEIsNull(const aValue: Boolean); -begin - if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE] := Null; -end; - function TFacturasClienteBusinessProcessorRules.GetREFERENCIA_COMISIONValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteREFERENCIA_COMISION]; @@ -2869,6 +2874,130 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteTIPO_OPERACION] := Null; end; +function TFacturasClienteBusinessProcessorRules.GetID_AGENTEValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetID_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldID_AGENTEValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_AGENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldID_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteID_AGENTE]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetID_AGENTEValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetID_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteID_AGENTE] := Null; +end; + +function TFacturasClienteBusinessProcessorRules.GetNOMBRE_AGENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_AGENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetNOMBRE_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_AGENTE]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldNOMBRE_AGENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteNOMBRE_AGENTE]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldNOMBRE_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteNOMBRE_AGENTE]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetNOMBRE_AGENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_AGENTE] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetNOMBRE_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteNOMBRE_AGENTE] := Null; +end; + +function TFacturasClienteBusinessProcessorRules.GetDELEGACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteDELEGACION]; +end; + +function TFacturasClienteBusinessProcessorRules.GetDELEGACIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteDELEGACION]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldDELEGACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteDELEGACION]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldDELEGACIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteDELEGACION]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetDELEGACIONValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteDELEGACION] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetDELEGACIONIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteDELEGACION] := Null; +end; + +function TFacturasClienteBusinessProcessorRules.GetFAC_PROV_GRADENValue: SmallInt; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFAC_PROV_GRADEN]; +end; + +function TFacturasClienteBusinessProcessorRules.GetFAC_PROV_GRADENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFAC_PROV_GRADEN]); +end; + +function TFacturasClienteBusinessProcessorRules.GetOldFAC_PROV_GRADENValue: SmallInt; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteFAC_PROV_GRADEN]; +end; + +function TFacturasClienteBusinessProcessorRules.GetOldFAC_PROV_GRADENIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasClienteFAC_PROV_GRADEN]); +end; + +procedure TFacturasClienteBusinessProcessorRules.SetFAC_PROV_GRADENValue(const aValue: SmallInt); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFAC_PROV_GRADEN] := aValue; +end; + +procedure TFacturasClienteBusinessProcessorRules.SetFAC_PROV_GRADENIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasClienteFAC_PROV_GRADEN] := Null; +end; + { TFacturasCliente_DetallesBusinessProcessorRules } constructor TFacturasCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas index e4257c5..e1e34d7 100644 --- a/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Model/uBizFacturasCliente.pas @@ -358,6 +358,10 @@ begin FCliente.DataTable.Active := True; ID_CLIENTE := FCliente.ID; + ID_AGENTE := FCliente.ID_AGENTE; + NOMBRE_AGENTE := FCliente.AGENTE; + DELEGACION := FCliente.DELEGACION; + NOMBRE := FCliente.NOMBRE; NIF_CIF := FCliente.NIF_CIF; CALLE := FCliente.CALLE; diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index 4b433be..1ded009 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -306,6 +306,18 @@ object srvFacturasCliente: TsrvFacturasCliente item DatasetField = 'TIPO_OPERACION' TableField = 'TIPO_OPERACION' + end + item + DatasetField = 'NOMBRE_AGENTE' + TableField = 'NOMBRE_AGENTE' + end + item + DatasetField = 'DELEGACION' + TableField = 'DELEGACION' + end + item + DatasetField = 'FAC_PROV_GRADEN' + TableField = 'FAC_PROV_GRADEN' end> end> Name = 'FacturasCliente' @@ -512,11 +524,6 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datCurrency DictionaryEntry = 'FacturasCliente_IMPORTE_PORTE' end - item - Name = 'ID_AGENTE' - DataType = datInteger - DictionaryEntry = 'FacturasCliente_ID_AGENTE' - end item Name = 'REFERENCIA_COMISION' DataType = datString @@ -610,6 +617,25 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datString Size = 2000 ServerAutoRefresh = True + end + item + Name = 'ID_AGENTE' + DataType = datInteger + DictionaryEntry = 'FacturasCliente_ID_AGENTE' + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 + end + item + Name = 'FAC_PROV_GRADEN' + DataType = datSmallInt end> end item @@ -1232,6 +1258,28 @@ object srvFacturasCliente: TsrvFacturasCliente Name = 'ID_TIPO_FACTURA' DataType = datInteger Value = '' + end + item + Name = 'ID_AGENTE' + DataType = datInteger + Value = '' + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + Value = '' + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 + Value = '' + end + item + Name = 'FAC_PROV_GRADEN' + DataType = datSmallInt + Value = '' end> Statements = < item @@ -1249,17 +1297,20 @@ object srvFacturasCliente: TsrvFacturasCliente 'A,'#10' IMPORTE_NETO,'#10' IMPORTE_PORTE,'#10' IGNORAR_CONTABILIDAD' + ','#10' ID_TIENDA,'#10' ID_CONTRATO,'#10' SIN_COMISION,'#10' SITUACIO' + 'N,'#10' RETENCION,'#10' IMPORTE_RETENCION,'#10' FECHA_RETENCION,'#10' ' + - ' ID_TIPO_FACTURA)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :REF' + - 'ERENCIA,'#10' :FECHA_FACTURA,'#10' :FECHA_VENCIMIENTO,'#10' :BASE_I' + - 'MPONIBLE,'#10' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' ' + - ':IMPORTE_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' ' + - ':OBSERVACIONES,'#10' :ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' ' + - ':CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_POSTAL,'#10' ' + - 'CURRENT_TIMESTAMP,'#10' :USUARIO,'#10' :ID_FORMA_PAGO,'#10' :RECARG' + - 'O_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IMPORTE_NETO,'#10' :IMPORT' + - 'E_PORTE,'#10' :IGNORAR_CONTABILIDAD,'#10' :ID_TIENDA,'#10' :ID_CONT' + - 'RATO,'#10' :SIN_COMISION,'#10' :SITUACION,'#10' :RETENCION,'#10' :IM' + - 'PORTE_RETENCION,'#10' :FECHA_RETENCION,'#10' :ID_TIPO_FACTURA);'#10 + ' ID_TIPO_FACTURA,'#10' ID_AGENTE,'#10' NOMBRE_AGENTE,'#10' DELEGAC' + + 'ION,'#10' FAC_PROV_GRADEN)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' ' + + ' :REFERENCIA,'#10' :FECHA_FACTURA,'#10' :FECHA_VENCIMIENTO,'#10' ' + + ':BASE_IMPONIBLE,'#10' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IV' + + 'A,'#10' :IMPORTE_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' :IMPORTE_TOTA' + + 'L,'#10' :OBSERVACIONES,'#10' :ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBR' + + 'E,'#10' :CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_POSTA' + + 'L,'#10' CURRENT_TIMESTAMP,'#10' :USUARIO,'#10' :ID_FORMA_PAGO,'#10' ' + + ':RECARGO_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IMPORTE_NETO,'#10' ' + + ':IMPORTE_PORTE,'#10' :IGNORAR_CONTABILIDAD,'#10' :ID_TIENDA,'#10' :' + + 'ID_CONTRATO,'#10' :SIN_COMISION,'#10' :SITUACION,'#10' :RETENCION,'#10 + + ' :IMPORTE_RETENCION,'#10' :FECHA_RETENCION,'#10' :ID_TIPO_FACTU' + + 'RA,'#10' :ID_AGENTE,'#10' :NOMBRE_AGENTE,'#10' :DELEGACION,'#10' :FA' + + 'C_PROV_GRADEN);'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1451,6 +1502,28 @@ object srvFacturasCliente: TsrvFacturasCliente DataType = datInteger Value = '' end + item + Name = 'ID_AGENTE' + DataType = datInteger + Value = '' + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + Value = '' + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 + Value = '' + end + item + Name = 'FAC_PROV_GRADEN' + DataType = datSmallInt + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1478,8 +1551,10 @@ object srvFacturasCliente: TsrvFacturasCliente 'ENDA,'#10' ID_CONTRATO = :ID_CONTRATO,'#10' SIN_COMISION = :SIN_CO' + 'MISION,'#10' SITUACION = :SITUACION,'#10' RETENCION = :RETENCION,'#10 + ' IMPORTE_RETENCION = :IMPORTE_RETENCION,'#10' FECHA_RETENCION ' + - '= :FECHA_RETENCION,'#10' ID_TIPO_FACTURA = :ID_TIPO_FACTURA'#10' WHE' + - 'RE'#10' (ID = :OLD_ID);'#10 + '= :FECHA_RETENCION,'#10' ID_TIPO_FACTURA = :ID_TIPO_FACTURA,'#10' ' + + 'ID_AGENTE = :ID_AGENTE,'#10' NOMBRE_AGENTE = :NOMBRE_AGENTE,'#10' ' + + 'DELEGACION = :DELEGACION,'#10' FAC_PROV_GRADEN = :FAC_PROV_GRADEN' + + #10' WHERE'#10' (ID = :OLD_ID);'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk index 3d087ce..b9692de 100644 Binary files a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk and b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk differ diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index f3614ed..8f1b06e 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,48 +49,49 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fEditorElegirArticulosFacturaCliente
TForm diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index bbe8bfa..55f9bf3 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -82,7 +82,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente inherited pgPaginas: TPageControl Width = 854 Height = 308 - ActivePage = pagContenido OnChanging = pgPaginasChanging ExplicitTop = 112 ExplicitWidth = 854 @@ -114,34 +113,50 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitWidth = 846 ExplicitHeight = 280 inherited eReferencia: TcxDBTextEdit + Top = -90 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitTop = -90 ExplicitWidth = 159 Width = 159 end inherited edtFecha: TcxDBDateEdit + Top = -63 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitTop = -63 ExplicitWidth = 159 Width = 159 end inherited cbFormaPago: TcxDBLookupComboBox + Top = 42 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitTop = 42 ExplicitWidth = 78 Width = 78 end + inherited bFormasPago: TButton + Left = 280 + Top = 42 + ExplicitLeft = 280 + ExplicitTop = 42 + end inherited frViewTienda1: TfrViewTienda + Top = 176 Width = 351 + Visible = False + ExplicitTop = 176 ExplicitWidth = 351 inherited dxLayoutControl1: TdxLayoutControl Width = 351 + ExplicitWidth = 351 inherited cbTienda: TcxComboBox Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' @@ -153,10 +168,15 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited frViewClienteFactura1: TfrViewClienteFactura + Left = 440 + Top = -90 Width = 398 + ExplicitLeft = 440 + ExplicitTop = -90 ExplicitWidth = 398 inherited dxLayoutControl1: TdxLayoutControl Width = 398 + ExplicitWidth = 398 inherited Bevel1: TBevel Width = 266 ExplicitWidth = 266 @@ -207,17 +227,17 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 276 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 256 + Left = 273 DataBinding.DataSource = dsDataTable Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 256 + ExplicitLeft = 273 end inherited Button3: TBitBtn - Left = 146 - ExplicitLeft = 146 + Left = 163 + ExplicitLeft = 163 end inherited cxDBTextEdit1: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -230,37 +250,88 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited edtFechaVencimiento: TcxDBDateEdit + Top = 71 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitTop = 71 ExplicitWidth = 310 Width = 310 end inherited frViewObservaciones1: TfrViewObservaciones + Top = 470 Width = 521 Height = 228 + ExplicitTop = 470 ExplicitWidth = 521 ExplicitHeight = 228 inherited memObservaciones: TcxDBMemo DataBinding.DataSource = frViewFacturaCliente1.DADataSource - ExplicitWidth = 783 + ExplicitWidth = 521 + ExplicitHeight = 228 Height = 228 Width = 521 end end inherited cbRecargoEquivalencia: TcxDBCheckBox + Top = 419 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitTop = 419 ExplicitWidth = 158 Width = 158 end inherited edtSituacion: TcxDBComboBox + Top = -9 + ExplicitTop = -9 ExplicitWidth = 121 Width = 121 end + inherited edtRefContrato: TcxDBTextEdit + Top = 122 + ExplicitTop = 122 + ExplicitWidth = 294 + Width = 294 + end + inherited edtRefClienteContrato: TcxDBTextEdit + Top = 149 + ExplicitTop = 149 + ExplicitWidth = 294 + Width = 294 + end + inherited cbTipoFactura: TcxDBLookupComboBox + Top = -36 + ExplicitTop = -36 + ExplicitWidth = 158 + Width = 158 + end + inherited frViewDatosYSeleccionComercial1: TfrViewDatosYSeleccionComercial + Top = 254 + Width = 425 + ExplicitTop = 254 + ExplicitWidth = 425 + inherited dxLayoutControl1: TdxLayoutControl + Width = 425 + ExplicitWidth = 425 + inherited edtlNombreAgente: TcxDBTextEdit + DataBinding.DataSource = frViewFacturaCliente1.DADataSource + ExplicitWidth = 224 + Width = 224 + end + inherited edtDelegacion: TcxDBTextEdit + DataBinding.DataSource = frViewFacturaCliente1.DADataSource + ExplicitWidth = 562 + Width = 562 + end + inherited Button3: TBitBtn + Left = 188 + ExplicitLeft = 188 + end + end + end end end end diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index 801fa0f..39ec087 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -1,17 +1,17 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Caption = 'Lista de facturas de cliente' ClientHeight = 666 - ClientWidth = 640 - ExplicitWidth = 648 + ClientWidth = 919 + ExplicitWidth = 927 ExplicitHeight = 704 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader - Width = 640 + Width = 919 Caption = 'Lista de facturas de cliente' - ExplicitWidth = 640 + ExplicitWidth = 919 inherited Image1: TImage - Left = 613 + Left = 892 Picture.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0000180806000000E0773DF80000000970485973000017120000171201679FD2 @@ -35,10 +35,10 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente end end inherited TBXDock: TTBXDock - Width = 640 - ExplicitWidth = 640 + Width = 919 + ExplicitWidth = 919 inherited tbxMain: TTBXToolbar - ExplicitWidth = 640 + ExplicitWidth = 711 object TBXSubmenuItem2: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -70,20 +70,26 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente end end inherited tbxMenu: TTBXToolbar - ExplicitWidth = 640 + ExplicitWidth = 919 end inherited TBXTMain2: TTBXToolbar - Left = 382 + Left = 385 DockPos = 385 Visible = True - ExplicitLeft = 382 - ExplicitWidth = 258 + ExplicitLeft = 385 + ExplicitWidth = 506 object TBXItem41: TTBXItem Action = actAsignarTipoOperacion DisplayMode = nbdmImageAndText end object TBSeparatorItem1: TTBSeparatorItem end + object TBXItem42: TTBXItem + Action = ActGenerarFacturaGraden + DisplayMode = nbdmImageAndText + end + object TBXSeparatorItem17: TTBXSeparatorItem + end object TBXItem40: TTBXItem Action = actInformes DisplayMode = nbdmImageAndText @@ -92,14 +98,14 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente end inherited StatusBar: TJvStatusBar Top = 647 - Width = 640 + Width = 919 ExplicitTop = 647 - ExplicitWidth = 640 + ExplicitWidth = 919 end inline frViewFacturasCliente1: TfrViewFacturasCliente [3] Left = 0 Top = 106 - Width = 640 + Width = 919 Height = 541 Align = alClient Font.Charset = DEFAULT_CHARSET @@ -111,12 +117,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente TabOrder = 3 ReadOnly = False ExplicitTop = 106 - ExplicitWidth = 640 + ExplicitWidth = 919 ExplicitHeight = 541 inherited cxGrid: TcxGrid - Width = 640 + Width = 919 Height = 413 - ExplicitWidth = 640 + ExplicitWidth = 919 ExplicitHeight = 413 inherited cxGridView: TcxGridDBTableView DataController.Summary.DefaultGroupSummaryItems = < @@ -187,13 +193,13 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente end end inherited frViewFiltroBase1: TfrViewFiltroBase - Width = 640 - ExplicitWidth = 640 + Width = 919 + ExplicitWidth = 919 inherited TBXDockablePanel1: TTBXDockablePanel - ExplicitWidth = 640 + ExplicitWidth = 919 inherited dxLayoutControl1: TdxLayoutControl - Width = 640 - ExplicitWidth = 640 + Width = 919 + ExplicitWidth = 919 inherited txtFiltroTodo: TcxTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' @@ -207,36 +213,34 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 144 - Width = 144 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 301 + Left = 521 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 301 + ExplicitLeft = 521 ExplicitWidth = 263 Width = 263 end inherited txtFiltroTodo2: TcxTextEdit - Left = 473 + Left = 675 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 473 + ExplicitLeft = 675 ExplicitWidth = 223 Width = 223 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel - Width = 640 - ExplicitWidth = 640 + Width = 919 + ExplicitWidth = 919 inherited tbxBotones: TTBXToolbar - Width = 630 - ExplicitWidth = 630 + Width = 909 + ExplicitWidth = 909 end end end @@ -244,13 +248,13 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente inherited pnlAgrupaciones: TTBXDockablePanel Top = 515 ExplicitTop = 515 - ExplicitWidth = 640 + ExplicitWidth = 919 inherited TBXAlignmentPanel1: TTBXAlignmentPanel - Width = 640 - ExplicitWidth = 640 + Width = 919 + ExplicitWidth = 919 inherited TBXToolbar1: TTBXToolbar - Width = 630 - ExplicitWidth = 630 + Width = 909 + ExplicitWidth = 909 end end end @@ -308,6 +312,12 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente OnExecute = actAsignarTipoOperacionExecute OnUpdate = actAsignarTipoOperacionUpdate end + object ActGenerarFacturaGraden: TAction + Caption = 'Generar factura proveedor en Graden' + ImageIndex = 26 + OnExecute = ActGenerarFacturaGradenExecute + OnUpdate = ActGenerarFacturaGradenUpdate + end end inherited SmallImages: TPngImageList [5] PngImages = < diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index 38f7879..48ce8c4 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -38,6 +38,9 @@ type actAsignarTipoOperacion: TAction; TBXItem41: TTBXItem; TBSeparatorItem1: TTBSeparatorItem; + ActGenerarFacturaGraden: TAction; + TBXItem42: TTBXItem; + TBXSeparatorItem17: TTBXSeparatorItem; procedure FormShow(Sender: TObject); procedure actEliminarUpdate(Sender: TObject); procedure actNuevaFacturaExecute(Sender: TObject); @@ -46,6 +49,8 @@ type procedure OnListaAnosChange(Sender: TObject; const Text: string); procedure actAsignarTipoOperacionExecute(Sender: TObject); procedure actAsignarTipoOperacionUpdate(Sender: TObject); + procedure ActGenerarFacturaGradenExecute(Sender: TObject); + procedure ActGenerarFacturaGradenUpdate(Sender: TObject); private FFacturas: IBizFacturaCliente; @@ -78,9 +83,8 @@ implementation uses uDataModuleFacturasCliente, uDataModuleUsuarios, uAlbaranesClienteController, uFactuGES_App, - uBizejercicios, uGenerarFacturasCliAlbCliUtils, - uBizAlbaranesCliente, uGestorInformesController, - uEditorBase, uGridUtils, uDBSelectionListUtils; + uBizejercicios, uGenerarFacturasCliAlbCliUtils, uBizAlbaranesCliente, uGestorInformesController, + uEditorBase, uGridUtils, uDBSelectionListUtils, uBizContactos, uGenerarFacturasProvFacCliUtils; {$R *.dfm} @@ -125,6 +129,40 @@ begin (Sender as TAction).Enabled := (FFacturas.SITUACION = 'PENDIENTE'); end; +procedure TfEditorFacturasCliente.ActGenerarFacturaGradenExecute(Sender: TObject); +var + AFacturas: IBizFacturaCliente; + i: integer; + +begin + inherited; + + ViewGrid.SaveGridStatus; + try + SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Facturas as ISeleccionable).SelectedRecords); + AFacturas := (Controller as IFacturasClienteController).ExtraerSeleccionados(Facturas) as IBizFacturaCliente; + finally + ViewGrid.RestoreGridStatus; + end; + + if GenerarFacturaProvEnGraden(AFacturas) then + RefrescarInterno; +end; + +procedure TfEditorFacturasCliente.ActGenerarFacturaGradenUpdate( + Sender: TObject); +begin + inherited; + if HayDatos and Assigned(ViewGrid) then + begin + (Sender as TAction).Enabled := not (dsDataTable.DataTable.State in dsEditModes) + and ViewGrid.esSeleccionCeldaDatos + end + else + (Sender as TAction).Enabled := False; + +end; + procedure TfEditorFacturasCliente.actInformesExecute(Sender: TObject); var Respuesta : Integer; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index 242d6c1..b4e2667 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -1,6 +1,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente - Width = 1079 - Height = 553 + Width = 1078 + Height = 641 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 1079 - Height = 553 + Width = 1078 + Height = 641 Align = alClient ParentBackground = True TabOrder = 0 @@ -20,8 +20,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ExplicitWidth = 451 ExplicitHeight = 304 DesignSize = ( - 1079 - 553) + 1078 + 641) object eReferencia: TcxDBTextEdit Left = 135 Top = 30 @@ -126,7 +126,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente inherited dxLayoutControl1: TdxLayoutControl Width = 351 Height = 63 - ExplicitWidth = 351 + ExplicitWidth = 407 ExplicitHeight = 63 inherited cbTienda: TcxComboBox ExplicitWidth = 399 @@ -150,7 +150,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 11 + TabOrder = 12 ReadOnly = False ExplicitLeft = 569 ExplicitTop = 30 @@ -159,7 +159,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente inherited dxLayoutControl1: TdxLayoutControl Width = 398 Height = 265 - ExplicitWidth = 398 + ExplicitWidth = 101 ExplicitHeight = 265 inherited edtlNombre: TcxDBTextEdit ExplicitWidth = 276 @@ -182,12 +182,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 276 end inherited edtCodigoPostal: TcxDBTextEdit - Left = 396 - ExplicitLeft = 396 + Left = 395 + ExplicitLeft = 395 end inherited Button3: TBitBtn - Left = 286 - ExplicitLeft = 286 + Left = 285 + ExplicitLeft = 285 end inherited cxDBTextEdit1: TcxDBTextEdit ExplicitWidth = 283 @@ -222,7 +222,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end inline frViewObservaciones1: TfrViewObservaciones Left = 22 - Top = 425 + Top = 590 Width = 521 Height = 20 Font.Charset = DEFAULT_CHARSET @@ -231,21 +231,22 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 12 + TabOrder = 13 ReadOnly = False ExplicitLeft = 22 - ExplicitTop = 425 + ExplicitTop = 590 ExplicitHeight = 20 inherited memObservaciones: TcxDBMemo DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataSource = DADataSource + ExplicitWidth = 536 ExplicitHeight = 20 Height = 20 end end object cbRecargoEquivalencia: TcxDBCheckBox Left = 22 - Top = 374 + Top = 539 Caption = ' No acogida a comisiones' DataBinding.DataField = 'SIN_COMISION' DataBinding.DataSource = DADataSource @@ -271,7 +272,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' - TabOrder = 10 + TabOrder = 11 Width = 158 end object edtSituacion: TcxDBComboBox @@ -366,6 +367,39 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente TabOrder = 2 Width = 158 end + inline frViewDatosYSeleccionComercial1: TfrViewDatosYSeleccionComercial + Left = 22 + Top = 374 + Width = 425 + Height = 135 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 10 + ReadOnly = False + ExplicitLeft = 22 + ExplicitTop = 374 + inherited dxLayoutControl1: TdxLayoutControl + ExplicitWidth = 407 + inherited edtlNombreAgente: TcxDBTextEdit + DataBinding.DataSource = DADataSource + ExplicitWidth = 224 + Width = 224 + end + inherited edtDelegacion: TcxDBTextEdit + DataBinding.DataSource = DADataSource + ExplicitWidth = 562 + Width = 562 + end + inherited Button3: TBitBtn + Left = 317 + ExplicitLeft = 317 + end + end + end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -434,6 +468,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente end object dxLayoutControl1Group4: TdxLayoutGroup AutoAligns = [aaVertical] + AlignHorz = ahClient Caption = 'Contrato asociado' Enabled = False object dxLayoutControl1Item8: TdxLayoutItem @@ -454,6 +489,14 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ControlOptions.ShowBorder = False end end + object dxLayoutControl1Group10: TdxLayoutGroup + Caption = 'Datos comerciales' + object dxLayoutControl1Item12: TdxLayoutItem + Control = frViewDatosYSeleccionComercial1 + ControlOptions.AutoColor = True + ControlOptions.ShowBorder = False + end + end object dxLayoutControl1Group9: TdxLayoutGroup Caption = 'Comisiones' Enabled = False diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas index 97dcfad..00b0187 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas @@ -11,7 +11,7 @@ uses DBCtrls, cxGraphics, dxLayoutLookAndFeels, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uDAInterfaces, uBizFormasPago, uViewTienda, uFacturasClienteController, uViewClienteFactura, Menus, StdActns, - ActnList, uViewObservaciones, cxCheckBox; + ActnList, uViewObservaciones, cxCheckBox, uViewDatosYSeleccionComercial; type IViewFacturaCliente = interface(IViewBase) @@ -67,6 +67,9 @@ type dxLayoutControl1Item11: TdxLayoutItem; cbTipoFactura: TcxDBLookupComboBox; dsTiposFactura: TDADataSource; + dxLayoutControl1Item12: TdxLayoutItem; + frViewDatosYSeleccionComercial1: TfrViewDatosYSeleccionComercial; + dxLayoutControl1Group10: TdxLayoutGroup; procedure bFormasPagoClick(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure CustomViewCreate(Sender: TObject); @@ -82,6 +85,9 @@ type procedure SetFactura(const Value: IBizFacturaCliente); function GetController : IFacturasClienteController; procedure SetController (const Value : IFacturasClienteController); + + procedure OnComercialChanged(Sender : TObject); + public property Factura: IBizFacturaCliente read GetFactura write SetFactura; property Controller : IFacturasClienteController read GetController write SetController; @@ -91,7 +97,7 @@ type implementation uses - DateUtils, uDataModuleContactos, schFacturasClienteClient_Intf; + DateUtils, uDataModuleContactos, schFacturasClienteClient_Intf, uFactuGES_App; {$R *.dfm} @@ -112,10 +118,21 @@ begin FFormasPagoController := TFormasPagoController.Create; cbFormaPago.Properties.OnEditValueChanged := cbFormaPagoPropertiesEditValueChanged; edtFechaVencimiento.Properties.OnEditValueChanged := edtFechaVencimientoPropertiesEditValueChanged; + +//FILTRO DE EMPRESAS + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then + begin + dxLayoutControl1Group10.Visible := true; + end + else + begin + dxLayoutControl1Group10.Visible := false; + end; end; procedure TfrViewFacturaCliente.CustomViewDestroy(Sender: TObject); begin + frViewDatosYSeleccionComercial1.OnComercialChanged := Nil; FFormasPago := Nil; FTiposFacturaCliente := Nil; FFormasPagoController := NIL; @@ -187,6 +204,14 @@ begin Result := FFactura; end; +procedure TfrViewFacturaCliente.OnComercialChanged(Sender: TObject); +begin + if Assigned(FFactura) then + begin + FController.CambiarComercial(FFactura, frViewDatosYSeleccionComercial1.Comercial); + end; +end; + procedure TfrViewFacturaCliente.SetController(const Value: IFacturasClienteController); begin FController := Value; @@ -235,6 +260,8 @@ begin //Solo se deshabilita al insertar, luego la referencia será modificable //eReferencia.Enabled := (FFactura.DataTable.State = dsInsert); + frViewDatosYSeleccionComercial1.OnComercialChanged := OnComercialChanged; + if FFactura.TIPO = CTE_TIPO_ABONO then begin dxLayoutControl1Group1.Caption := 'Datos del abono:'; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm index 27084c5..31ded59 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.dfm @@ -34,6 +34,20 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente Value = 'A' end> end + object cxGridViewFAC_PRO_GRADEN: TcxGridDBColumn + Caption = '-' + DataBinding.FieldName = 'FAC_PROV_GRADEN' + PropertiesClassName = 'TcxImageComboBoxProperties' + Properties.Images = GridPNGImageList + Properties.Items = < + item + Description = 'Generada en Graden' + ImageIndex = 2 + Value = 1 + end + item + end> + end object cxGridViewTIENDA: TcxGridDBColumn Caption = 'Tienda' DataBinding.FieldName = 'TIENDA' @@ -180,6 +194,22 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente Caption = 'Tipo operaci'#243'n' DataBinding.FieldName = 'TIPO_OPERACION' end + object cxGridViewAGENTE: TcxGridDBColumn + Caption = 'Comercial' + DataBinding.FieldName = 'NOMBRE_AGENTE' + PropertiesClassName = 'TcxTextEditProperties' + Properties.Alignment.Horz = taRightJustify + FooterAlignmentHorz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewDELEGACION: TcxGridDBColumn + Caption = 'Delegaci'#243'n' + DataBinding.FieldName = 'DELEGACION' + PropertiesClassName = 'TcxTextEditProperties' + Properties.Alignment.Horz = taRightJustify + FooterAlignmentHorz = taRightJustify + HeaderAlignmentHorz = taRightJustify + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todas' @@ -187,6 +217,9 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente object cxGridPendientes: TcxGridLevel Caption = 'Pendientes' end + object cxGridParcialmentePagadas: TcxGridLevel + Caption = 'Parcialmente pagadas' + end object cxGridPagadas: TcxGridLevel Caption = 'Pagadas' end @@ -272,6 +305,21 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente object TBXItem4: TTBXItem Action = actProcedencia end + object TBXSeparatorItem4: TTBXSeparatorItem + end + object TBXItem5: TTBXItem + Action = actComercial + end + object TBXSeparatorItem5: TTBXSeparatorItem + end + object TBXItem6: TTBXItem + Action = actDelegacion + end + object TBXSeparatorItem6: TTBXSeparatorItem + end + object TBXItem7: TTBXItem + Action = actTienda + end end end end @@ -297,6 +345,21 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente OnExecute = actProcedenciaExecute OnUpdate = actProcedenciaUpdate end + object actComercial: TAction + Caption = 'Comercial' + OnExecute = actComercialExecute + OnUpdate = actComercialUpdate + end + object actDelegacion: TAction + Caption = 'Delegaci'#243'n' + OnExecute = actDelegacionExecute + OnUpdate = actDelegacionUpdate + end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited GridPNGImageList: TPngImageList PngImages = < @@ -411,6 +474,29 @@ inherited frViewFacturasCliente: TfrViewFacturasCliente 00004B6D80F047EC10D30000000049454E44AE426082} Name = 'PngImage1' Background = clWindow + end + item + PngImage.Data = { + 89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF + 61000000097048597300000AEB00000AEB01828B0D5A000001DA4944415478DA + 63FCFFFF3F032580912C5DF2F33964B539E3DF7DF8F1956403380CE7C85B5929 + CFFAF99ED7FCFCED9BE124192060B7D8D6CE5279E99B876C42674FFC0CFEF9C0 + 7A27D10628FBAF0FB030915F74E7EA6FE6F387FF87FD7A6AB195E83090F55915 + EEE7A23BE7FCD9CFAC170EFF4EFDF6C07A31D18128E1BE3CC8DB597BE1A3BBBF + B98EECFA91FBFDBEF574A0F07FA20C10B09B67EBE366B8E3CDF37F9C47F77CED + FC7CD3AE125D0DC400B3897C9CCCBCEADFD9182F331C4CFC010E6DCB39F29E0E + 3A07599939E477AE7FBFFBE3CF4BBE0C77F27F621820EAB848DFDC447931372B + 9FE68E5DF7577F3C73368E414588D9C6496BB3AA92B8CBDECD9FDEBC7CF9D3F2 + E71DE7BBD85CC928EAB438C4C7556F3A0B1B8BC8B1BD9FFFDE7B753F4C41994B + C3CA48B1E5F09ECFFFEF3F7D19F3FB5AD0725CDE047B41276243A09D85FAAAA7 + CFBFB11CDEFBEA8EA79F98E4C3FBBFB8CF9F7BBDE5EB453F3FE440C31E060CF5 + 4C4ED9F63B6565845D5EBEFEF29F11287AE9C4AF2FAFBF3D32FF753EFE3ABE80 + 86C7028FF5429B101F83FDCF5F7F66797697E1FFCDDB6FA7FFBAE69F4D289A91 + A2B19EC539C7E1C49BC7EC46F71EBDD9FFF9DFD338868B994F4930808181D76E + 413EF33F56D90F0F5ED4323C29FE4E4833080000904EC47A3EA3126900000000 + 49454E44AE426082} + Name = 'PngImage2' + Background = clWindow end> Bitmap = {} end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas index 0fd82a2..359e018 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturasCliente.pas @@ -44,7 +44,7 @@ type cxStylePagada: TcxStyle; cxGridPendientes: TcxGridLevel; cxStyleAbono: TcxStyle; - cxGridPagadas: TcxGridLevel; + cxGridParcialmentePagadas: TcxGridLevel; cxGridViewREFERENCIA_COMISION: TcxGridDBColumn; cxStylePendientes: TcxStyle; cxStyleParciales: TcxStyle; @@ -69,6 +69,19 @@ type TBXSeparatorItem3: TTBXSeparatorItem; TBXItem4: TTBXItem; cxGridViewTIPO_OPERACION: TcxGridDBColumn; + cxGridPagadas: TcxGridLevel; + cxGridViewAGENTE: TcxGridDBColumn; + cxGridViewDELEGACION: TcxGridDBColumn; + actComercial: TAction; + actDelegacion: TAction; + TBXSeparatorItem4: TTBXSeparatorItem; + TBXItem5: TTBXItem; + TBXSeparatorItem5: TTBXSeparatorItem; + TBXItem6: TTBXItem; + cxGridViewFAC_PRO_GRADEN: TcxGridDBColumn; + actTienda: TAction; + TBXSeparatorItem6: TTBXSeparatorItem; + TBXItem7: TTBXItem; procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out AStyle: TcxStyle); @@ -79,6 +92,12 @@ type procedure actClienteUpdate(Sender: TObject); procedure actProcedenciaExecute(Sender: TObject); procedure actProcedenciaUpdate(Sender: TObject); + procedure actComercialExecute(Sender: TObject); + procedure actComercialUpdate(Sender: TObject); + procedure actDelegacionExecute(Sender: TObject); + procedure actDelegacionUpdate(Sender: TObject); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -126,6 +145,46 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0); end; +procedure TfrViewFacturasCliente.actComercialExecute(Sender: TObject); +begin + if (cxGridViewAGENTE.GroupIndex < 0) then + begin + cxGridViewAGENTE.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewAGENTE.Visible := False; + end + else + begin + cxGridViewAGENTE.GroupIndex := -1; + cxGridViewAGENTE.Visible := True; + end; +end; + +procedure TfrViewFacturasCliente.actComercialUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewAGENTE.GroupIndex < 0); +end; + +procedure TfrViewFacturasCliente.actDelegacionExecute(Sender: TObject); +begin + if (cxGridViewDELEGACION.GroupIndex < 0) then + begin + cxGridViewDELEGACION.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewDELEGACION.Visible := False; + end + else + begin + cxGridViewDELEGACION.GroupIndex := -1; + cxGridViewDELEGACION.Visible := True; + end; +end; + +procedure TfrViewFacturasCliente.actDelegacionUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewDELEGACION.GroupIndex < 0); +end; + procedure TfrViewFacturasCliente.actProcedenciaExecute(Sender: TObject); begin if (cxGridViewPROCEDENCIA_CLIENTE.GroupIndex < 0) then @@ -166,6 +225,26 @@ begin (Sender as TAction).Checked := not (cxGridViewPROVINCIA.GroupIndex < 0); end; +procedure TfrViewFacturasCliente.actTiendaExecute(Sender: TObject); +begin + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewFacturasCliente.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewFacturasCliente.AnadirFiltroFechas; var Columna: TcxGridDBColumn; @@ -216,12 +295,43 @@ end; procedure TfrViewFacturasCliente.ConfigView; begin inherited; +//FILTRO DE EMPRESAS + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then + begin + cxGridViewFAC_PRO_GRADEN.Visible := True; + cxGridViewFAC_PRO_GRADEN.VisibleForCustomization := True; - if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then - cxGridViewTIENDA.Visible := True - else cxGridViewTIENDA.Visible := False; + cxGridViewTIENDA.VisibleForCustomization := False; + cxGridViewAGENTE.Visible := True; + cxGridViewAGENTE.VisibleForCustomization := True; + + cxGridViewDELEGACION.Visible := True; + cxGridViewDELEGACION.VisibleForCustomization := True; + + actComercial.Visible := True; + actDelegacion.Visible := True; + actTienda.Visible := False; + end + else + begin + cxGridViewFAC_PRO_GRADEN.Visible := False; + cxGridViewFAC_PRO_GRADEN.VisibleForCustomization := False; + + cxGridViewTIENDA.Visible := True; + cxGridViewTIENDA.VisibleForCustomization := True; + + cxGridViewAGENTE.Visible := False; + cxGridViewAGENTE.VisibleForCustomization := False; + + cxGridViewDELEGACION.Visible := False; + cxGridViewDELEGACION.VisibleForCustomization := False; + + actComercial.Visible := False; + actDelegacion.Visible := False; + actTienda.Visible := True; + end; end; procedure TfrViewFacturasCliente.cxGridActiveTabChanged(Sender: TcxCustomGrid; diff --git a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm index 0d134d3..cd1721c 100644 --- a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm @@ -307,6 +307,10 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor DataType = datString Size = 2000 ServerAutoRefresh = True + end + item + Name = 'ID_FAC_CLI_ABETO' + DataType = datInteger end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas index 398d910..69908c8 100644 --- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas +++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorClient_Intf.pas @@ -9,11 +9,11 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturas = '{86B2646C-3D08-4998-BE60-E074E0E14D49}'; - RID_FacturasProveedor_Contratos = '{35611620-800C-4384-9A19-DDA27BBA8712}'; - RID_TiposFacturaProveedor = '{C29C3085-62F1-4941-BE37-C5B149628A3D}'; - RID_FacturasProveedor = '{929CD1FD-F373-41DE-9E8C-E3ADAAACFDCA}'; - RID_FacturasProveedor_Detalles = '{2FF146A9-5522-4AE0-A3E0-84FCDDD001F0}'; + RID_ListaAnosFacturas = '{C795D4A1-0A52-4FA3-B56A-8A8A49447AF6}'; + RID_FacturasProveedor_Contratos = '{6CA037E3-259D-445F-8839-5C9CBE848D8A}'; + RID_TiposFacturaProveedor = '{7A2B3173-9F36-4803-8DDB-9CEC56652088}'; + RID_FacturasProveedor = '{85826572-C7D0-4814-82FF-44CFC6876F9C}'; + RID_FacturasProveedor_Detalles = '{3546075B-F1D3-42CF-8783-6EEB305E0EB4}'; { Data table names } nme_ListaAnosFacturas = 'ListaAnosFacturas'; @@ -102,6 +102,7 @@ const fld_FacturasProveedorASIENTO_PUNTEADO = 'ASIENTO_PUNTEADO'; fld_FacturasProveedorID_TIPO_FACTURA = 'ID_TIPO_FACTURA'; fld_FacturasProveedorTIPO_OPERACION = 'TIPO_OPERACION'; + fld_FacturasProveedorID_FAC_CLI_ABETO = 'ID_FAC_CLI_ABETO'; { FacturasProveedor field indexes } idx_FacturasProveedorID = 0; @@ -151,6 +152,7 @@ const idx_FacturasProveedorASIENTO_PUNTEADO = 44; idx_FacturasProveedorID_TIPO_FACTURA = 45; idx_FacturasProveedorTIPO_OPERACION = 46; + idx_FacturasProveedorID_FAC_CLI_ABETO = 47; { FacturasProveedor_Detalles fields } fld_FacturasProveedor_DetallesID = 'ID'; @@ -189,7 +191,7 @@ const type { IListaAnosFacturas } IListaAnosFacturas = interface(IDAStronglyTypedDataTable) - ['{26F14D33-760A-45A2-B723-80BC6DDB90F8}'] + ['{677DC78A-8BD5-4A06-9535-79323950FEBC}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -224,7 +226,7 @@ type { IFacturasProveedor_Contratos } IFacturasProveedor_Contratos = interface(IDAStronglyTypedDataTable) - ['{149CC99D-F584-4547-943C-72C850B293BF}'] + ['{7871ACC0-F5B9-4963-BCC2-7126A70F6F9F}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -331,7 +333,7 @@ type { ITiposFacturaProveedor } ITiposFacturaProveedor = interface(IDAStronglyTypedDataTable) - ['{AA5624ED-B5AC-4A8D-B6F5-45C128D996CA}'] + ['{23D10CD4-14DA-4C1C-A232-1BDB15A926F3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -378,7 +380,7 @@ type { IFacturasProveedor } IFacturasProveedor = interface(IDAStronglyTypedDataTable) - ['{581EE6A4-62EA-46B4-B71E-436B08372DC4}'] + ['{12529FCC-521D-4FE0-8295-3C1A9066413F}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -567,6 +569,10 @@ type procedure SetTIPO_OPERACIONValue(const aValue: String); function GetTIPO_OPERACIONIsNull: Boolean; procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); + function GetID_FAC_CLI_ABETOValue: Integer; + procedure SetID_FAC_CLI_ABETOValue(const aValue: Integer); + function GetID_FAC_CLI_ABETOIsNull: Boolean; + procedure SetID_FAC_CLI_ABETOIsNull(const aValue: Boolean); { Properties } @@ -664,6 +670,8 @@ type property ID_TIPO_FACTURAIsNull: Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; property TIPO_OPERACION: String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; property TIPO_OPERACIONIsNull: Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; + property ID_FAC_CLI_ABETO: Integer read GetID_FAC_CLI_ABETOValue write SetID_FAC_CLI_ABETOValue; + property ID_FAC_CLI_ABETOIsNull: Boolean read GetID_FAC_CLI_ABETOIsNull write SetID_FAC_CLI_ABETOIsNull; end; { TFacturasProveedorDataTableRules } @@ -860,6 +868,10 @@ type procedure SetTIPO_OPERACIONValue(const aValue: String); virtual; function GetTIPO_OPERACIONIsNull: Boolean; virtual; procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); virtual; + function GetID_FAC_CLI_ABETOValue: Integer; virtual; + procedure SetID_FAC_CLI_ABETOValue(const aValue: Integer); virtual; + function GetID_FAC_CLI_ABETOIsNull: Boolean; virtual; + procedure SetID_FAC_CLI_ABETOIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -956,6 +968,8 @@ type property ID_TIPO_FACTURAIsNull: Boolean read GetID_TIPO_FACTURAIsNull write SetID_TIPO_FACTURAIsNull; property TIPO_OPERACION: String read GetTIPO_OPERACIONValue write SetTIPO_OPERACIONValue; property TIPO_OPERACIONIsNull: Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; + property ID_FAC_CLI_ABETO: Integer read GetID_FAC_CLI_ABETOValue write SetID_FAC_CLI_ABETOValue; + property ID_FAC_CLI_ABETOIsNull: Boolean read GetID_FAC_CLI_ABETOIsNull write SetID_FAC_CLI_ABETOIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -965,7 +979,7 @@ type { IFacturasProveedor_Detalles } IFacturasProveedor_Detalles = interface(IDAStronglyTypedDataTable) - ['{26EEA163-23D5-4935-BF2A-200A5DA623FE}'] + ['{12BCF451-3108-4489-A00F-6C9B9F8C50A3}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2421,6 +2435,27 @@ begin DataTable.Fields[idx_FacturasProveedorTIPO_OPERACION].AsVariant := Null; end; +function TFacturasProveedorDataTableRules.GetID_FAC_CLI_ABETOValue: Integer; +begin + result := DataTable.Fields[idx_FacturasProveedorID_FAC_CLI_ABETO].AsInteger; +end; + +procedure TFacturasProveedorDataTableRules.SetID_FAC_CLI_ABETOValue(const aValue: Integer); +begin + DataTable.Fields[idx_FacturasProveedorID_FAC_CLI_ABETO].AsInteger := aValue; +end; + +function TFacturasProveedorDataTableRules.GetID_FAC_CLI_ABETOIsNull: boolean; +begin + result := DataTable.Fields[idx_FacturasProveedorID_FAC_CLI_ABETO].IsNull; +end; + +procedure TFacturasProveedorDataTableRules.SetID_FAC_CLI_ABETOIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_FacturasProveedorID_FAC_CLI_ABETO].AsVariant := Null; +end; + { TFacturasProveedor_DetallesDataTableRules } constructor TFacturasProveedor_DetallesDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas index dae2a28..3d27627 100644 --- a/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas +++ b/Source/Modulos/Facturas de proveedor/Model/schFacturasProveedorServer_Intf.pas @@ -9,16 +9,16 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ListaAnosFacturasDelta = '{7D2C6A78-D9EC-43F0-8348-7DB4D1844A9D}'; - RID_FacturasProveedor_ContratosDelta = '{9AAF8413-846C-41CF-A1BF-1B58ACB22C6D}'; - RID_TiposFacturaProveedorDelta = '{AF2221C9-11CA-43B0-B60A-52E15F74A52E}'; - RID_FacturasProveedorDelta = '{0E342571-E21F-464F-8639-C391CFDC0CFB}'; - RID_FacturasProveedor_DetallesDelta = '{ECA60AB2-29CF-4521-882B-9629AA3AD1B2}'; + RID_ListaAnosFacturasDelta = '{5B73EE35-573D-44D3-A750-56239AFE75A4}'; + RID_FacturasProveedor_ContratosDelta = '{25AAA83B-B9D6-4975-9333-393E5F2795B1}'; + RID_TiposFacturaProveedorDelta = '{468C61BB-0645-4D13-A693-46AED25530A7}'; + RID_FacturasProveedorDelta = '{1E6C88EB-230C-44A6-B931-E6F1E7917A89}'; + RID_FacturasProveedor_DetallesDelta = '{2B5BE721-B901-4AD3-A224-0B771CAE4490}'; type { IListaAnosFacturasDelta } IListaAnosFacturasDelta = interface(IListaAnosFacturas) - ['{7D2C6A78-D9EC-43F0-8348-7DB4D1844A9D}'] + ['{5B73EE35-573D-44D3-A750-56239AFE75A4}'] { Property getters and setters } function GetOldANOValue : String; @@ -52,7 +52,7 @@ type { IFacturasProveedor_ContratosDelta } IFacturasProveedor_ContratosDelta = interface(IFacturasProveedor_Contratos) - ['{9AAF8413-846C-41CF-A1BF-1B58ACB22C6D}'] + ['{25AAA83B-B9D6-4975-9333-393E5F2795B1}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -158,7 +158,7 @@ type { ITiposFacturaProveedorDelta } ITiposFacturaProveedorDelta = interface(ITiposFacturaProveedor) - ['{AF2221C9-11CA-43B0-B60A-52E15F74A52E}'] + ['{468C61BB-0645-4D13-A693-46AED25530A7}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -204,7 +204,7 @@ type { IFacturasProveedorDelta } IFacturasProveedorDelta = interface(IFacturasProveedor) - ['{0E342571-E21F-464F-8639-C391CFDC0CFB}'] + ['{1E6C88EB-230C-44A6-B931-E6F1E7917A89}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -253,6 +253,7 @@ type function GetOldASIENTO_PUNTEADOValue : SmallInt; function GetOldID_TIPO_FACTURAValue : Integer; function GetOldTIPO_OPERACIONValue : String; + function GetOldID_FAC_CLI_ABETOValue : Integer; { Properties } property OldID : Integer read GetOldIDValue; @@ -302,6 +303,7 @@ type property OldASIENTO_PUNTEADO : SmallInt read GetOldASIENTO_PUNTEADOValue; property OldID_TIPO_FACTURA : Integer read GetOldID_TIPO_FACTURAValue; property OldTIPO_OPERACION : String read GetOldTIPO_OPERACIONValue; + property OldID_FAC_CLI_ABETO : Integer read GetOldID_FAC_CLI_ABETOValue; end; { TFacturasProveedorBusinessProcessorRules } @@ -592,6 +594,12 @@ type function GetOldTIPO_OPERACIONIsNull: Boolean; virtual; procedure SetTIPO_OPERACIONValue(const aValue: String); virtual; procedure SetTIPO_OPERACIONIsNull(const aValue: Boolean); virtual; + function GetID_FAC_CLI_ABETOValue: Integer; virtual; + function GetID_FAC_CLI_ABETOIsNull: Boolean; virtual; + function GetOldID_FAC_CLI_ABETOValue: Integer; virtual; + function GetOldID_FAC_CLI_ABETOIsNull: Boolean; virtual; + procedure SetID_FAC_CLI_ABETOValue(const aValue: Integer); virtual; + procedure SetID_FAC_CLI_ABETOIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -782,6 +790,10 @@ type property TIPO_OPERACIONIsNull : Boolean read GetTIPO_OPERACIONIsNull write SetTIPO_OPERACIONIsNull; property OldTIPO_OPERACION : String read GetOldTIPO_OPERACIONValue; property OldTIPO_OPERACIONIsNull : Boolean read GetOldTIPO_OPERACIONIsNull; + property ID_FAC_CLI_ABETO : Integer read GetID_FAC_CLI_ABETOValue write SetID_FAC_CLI_ABETOValue; + property ID_FAC_CLI_ABETOIsNull : Boolean read GetID_FAC_CLI_ABETOIsNull write SetID_FAC_CLI_ABETOIsNull; + property OldID_FAC_CLI_ABETO : Integer read GetOldID_FAC_CLI_ABETOValue; + property OldID_FAC_CLI_ABETOIsNull : Boolean read GetOldID_FAC_CLI_ABETOIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -791,7 +803,7 @@ type { IFacturasProveedor_DetallesDelta } IFacturasProveedor_DetallesDelta = interface(IFacturasProveedor_Detalles) - ['{ECA60AB2-29CF-4521-882B-9629AA3AD1B2}'] + ['{2B5BE721-B901-4AD3-A224-0B771CAE4490}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_FACTURAValue : Integer; @@ -2818,6 +2830,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorTIPO_OPERACION] := Null; end; +function TFacturasProveedorBusinessProcessorRules.GetID_FAC_CLI_ABETOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO]; +end; + +function TFacturasProveedorBusinessProcessorRules.GetID_FAC_CLI_ABETOIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO]); +end; + +function TFacturasProveedorBusinessProcessorRules.GetOldID_FAC_CLI_ABETOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO]; +end; + +function TFacturasProveedorBusinessProcessorRules.GetOldID_FAC_CLI_ABETOIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO]); +end; + +procedure TFacturasProveedorBusinessProcessorRules.SetID_FAC_CLI_ABETOValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO] := aValue; +end; + +procedure TFacturasProveedorBusinessProcessorRules.SetID_FAC_CLI_ABETOIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO] := Null; +end; + { TFacturasProveedor_DetallesBusinessProcessorRules } constructor TFacturasProveedor_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas b/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas index 27bbc99..66f5a97 100644 --- a/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas +++ b/Source/Modulos/Facturas de proveedor/Model/uBizFacturasProveedorServer.pas @@ -142,6 +142,20 @@ begin finally ACommand := NIL; end; + + //Liberamos la factura de cliente de Abeto en el caso de ser una factura de proveedor automatica desde fabrica + if not VarIsNull(aChange.OldValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO]) then + ACommand := ASchema.NewCommand(ACurrentConn, 'LiberarFacturaClienteAbeto'); + try + with ACommand do + begin + ParamByName('ID_FAC_CLI_ABETO').Value := aChange.OldValueByName[fld_FacturasProveedorID_FAC_CLI_ABETO]; + Execute; + end; + finally + ACommand := NIL; + end; + end; function TBizFacturasProveedorServer.IncrementarReferencia: Boolean; diff --git a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm index 5e2037d..ccfe19d 100644 --- a/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm +++ b/Source/Modulos/Facturas de proveedor/Servidor/srvFacturasProveedor_Impl.dfm @@ -363,6 +363,10 @@ object srvFacturasProveedor: TsrvFacturasProveedor item DatasetField = 'TIPO_OPERACION' TableField = 'TIPO_OPERACION' + end + item + DatasetField = 'ID_FAC_CLI_ABETO' + TableField = 'ID_FAC_CLI_ABETO' end> end> Name = 'FacturasProveedor' @@ -612,6 +616,10 @@ object srvFacturasProveedor: TsrvFacturasProveedor DataType = datString Size = 2000 ServerAutoRefresh = True + end + item + Name = 'ID_FAC_CLI_ABETO' + DataType = datInteger end> end item @@ -1055,6 +1063,11 @@ object srvFacturasProveedor: TsrvFacturasProveedor DataType = datString Size = 255 Value = '' + end + item + Name = 'ID_FAC_CLI_ABETO' + DataType = datInteger + Value = '' end> Statements = < item @@ -1070,15 +1083,16 @@ object srvFacturasProveedor: TsrvFacturasProveedor ', PROVINCIA, CODIGO_POSTAL, '#10' FECHA_ALTA, USUARIO, ID_FORMA_' + 'PAGO,'#10' RECARGO_EQUIVALENCIA, ID_TIPO_IVA, IMPORTE_NETO, IMPO' + 'RTE_PORTE, IGNORAR_CONTABILIDAD,'#10' ID_TIENDA, ID_TIPO_FACTURA' + - ', SITUACION)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :REFERENCIA, :REFER' + - 'ENCIA_PROVEEDOR,'#10' :FECHA_FACTURA, :FECHA_VENCIMIENTO, :BASE_' + - 'IMPONIBLE, :DESCUENTO,'#10' :IMPORTE_DESCUENTO, :IVA, :IMPORTE_I' + - 'VA, :IRPF, :IMPORTE_IRPF,'#10' :RE, :IMPORTE_RE, :IMPORTE_TOTAL,' + - ' :OBSERVACIONES, :ID_PROVEEDOR, :NIF_CIF,'#10' :NOMBRE, :CALLE, ' + - ':POBLACION, :PROVINCIA, :CODIGO_POSTAL, '#10' CURRENT_TIMESTAMP,' + - ' :USUARIO, :ID_FORMA_PAGO,'#10' :RECARGO_EQUIVALENCIA, :ID_TIPO_' + - 'IVA, :IMPORTE_NETO, '#10' :IMPORTE_PORTE, :IGNORAR_CONTABILIDAD,' + - ' :ID_TIENDA, :ID_TIPO_FACTURA, :SITUACION)'#10' '#10' '#10#10 + ', SITUACION, ID_FAC_CLI_ABETO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :' + + 'REFERENCIA, :REFERENCIA_PROVEEDOR,'#10' :FECHA_FACTURA, :FECHA_V' + + 'ENCIMIENTO, :BASE_IMPONIBLE, :DESCUENTO,'#10' :IMPORTE_DESCUENTO' + + ', :IVA, :IMPORTE_IVA, :IRPF, :IMPORTE_IRPF,'#10' :RE, :IMPORTE_R' + + 'E, :IMPORTE_TOTAL, :OBSERVACIONES, :ID_PROVEEDOR, :NIF_CIF,'#10' ' + + ' :NOMBRE, :CALLE, :POBLACION, :PROVINCIA, :CODIGO_POSTAL, '#10' ' + + 'CURRENT_TIMESTAMP, :USUARIO, :ID_FORMA_PAGO,'#10' :RECARGO_EQUIV' + + 'ALENCIA, :ID_TIPO_IVA, :IMPORTE_NETO, '#10' :IMPORTE_PORTE, :IGN' + + 'ORAR_CONTABILIDAD, :ID_TIENDA, :ID_TIPO_FACTURA,'#10' :SITUACION' + + ', :ID_FAC_CLI_ABETO)'#10' '#10' '#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -1285,6 +1299,11 @@ object srvFacturasProveedor: TsrvFacturasProveedor Size = 255 Value = '' end + item + Name = 'ID_FAC_CLI_ABETO' + DataType = datInteger + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1313,7 +1332,8 @@ object srvFacturasProveedor: TsrvFacturasProveedor ' '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPORTE_PORTE = :IMPORT' + 'E_PORTE,'#10' IGNORAR_CONTABILIDAD = :IGNORAR_CONTABILIDAD,'#10' I' + 'D_TIENDA = :ID_TIENDA,'#10' ID_TIPO_FACTURA = :ID_TIPO_FACTURA,'#10' ' + - ' SITUACION = :SITUACION'#10' WHERE'#10' (ID = :OLD_ID)'#10 + ' SITUACION = :SITUACION,'#10' ID_FAC_CLI_ABETO = :ID_FAC_CLI_AB' + + 'ETO'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1609,6 +1629,26 @@ object srvFacturasProveedor: TsrvFacturasProveedor ColumnMappings = <> end> Name = 'Update_FacturasProveedor_Contratos' + end + item + Params = < + item + Name = 'ID_FAC_CLI_ABETO' + Value = '' + end> + Statements = < + item + Connection = 'IBX' + ConnectionType = 'Interbase' + Default = True + TargetTable = 'FACTURAS_CLIENTE' + SQL = + 'UPDATE FACTURAS_CLIENTE'#10'SET FAC_PROV_GRADEN = NULL'#10'WHERE ID = :I' + + 'D_FAC_CLI_ABETO'#10 + StatementType = stSQL + ColumnMappings = <> + end> + Name = 'LiberarFacturaClienteAbeto' end> RelationShips = < item diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm index 4fb6e99..f7cd8f1 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.dfm @@ -259,8 +259,6 @@ inherited frViewFacturasProveedor: TfrViewFacturasProveedor StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 361 - ExplicitWidth = 250 - Width = 250 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas index 744ad6a..d092052 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturasProveedor.pas @@ -151,7 +151,7 @@ begin cxGridView.DataController.Filter.Options := [fcoCaseInsensitive, fcoSoftCompare]; FFiltro := AddFilterGrid(fboAnd); - Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_VENCIMIENTO'); + Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName('FECHA_FACTURA'); FFiltro.AddItem(Columna, foBetween, varArrayOf([Fecha1, Fecha2]), VarToStr(Fecha1) + ' and ' + VarToStr(Fecha2)); end; end; diff --git a/Source/Modulos/Inventario/Views/uViewInventario.dfm b/Source/Modulos/Inventario/Views/uViewInventario.dfm index 8176b4e..75d4b87 100644 --- a/Source/Modulos/Inventario/Views/uViewInventario.dfm +++ b/Source/Modulos/Inventario/Views/uViewInventario.dfm @@ -134,12 +134,14 @@ inherited frViewInventario: TfrViewInventario Caption = 'Coste medio unidad' DataBinding.FieldName = 'IMPORTE_COMPRA_2ANOS' PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify HeaderAlignmentHorz = taRightJustify end object cxGridViewCOSTE_UNIDADES: TcxGridDBColumn Caption = 'Coste medio total' DataBinding.FieldName = 'COSTE_MEDIO_TOTAL' PropertiesClassName = 'TcxCurrencyEditProperties' + Properties.Alignment.Horz = taRightJustify FooterAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify end @@ -185,12 +187,14 @@ inherited frViewInventario: TfrViewInventario Width = 121 end inherited txtFiltroTodo2: TcxTextEdit - Left = 343 + Left = 329 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 343 + ExplicitLeft = 329 + ExplicitWidth = 250 + Width = 250 end end end diff --git a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas index 5a1da7c..fb38cda 100644 --- a/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas +++ b/Source/Modulos/Presupuestos de cliente/Controller/uPresupuestosClienteController.pas @@ -8,7 +8,7 @@ uses uControllerBase, uIDataModulePresupuestosCliente, uClientesController, uDetallesPresupuestoClienteController, uGestorDocumentosController, uBizPresupuestosCliente, uBizDireccionesContacto, uBizDetallesPresupuestoCliente, - uIntegerListUtils, uTypesConstConfiguration; + uIntegerListUtils, uTypesConstConfiguration, uBizContactos; type @@ -70,6 +70,7 @@ type const VerImprimirObservaciones: Boolean = False; const VerImprimirIncidencias: Boolean = False); procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente); function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; + function CambiarComercial(APresupuesto : IBizPresupuestoCliente; AComercial: IBizComercial): Boolean; function DarListaAnosPresupuestos: TStringList; procedure FiltrarAno(APresupuesto: IBizPresupuestoCliente; ADynWhereDataTable: WideString; const Ano: String); @@ -153,6 +154,7 @@ type const VerImprimirObservaciones: Boolean = False; const VerImprimirIncidencias: Boolean = False); procedure EnviarPresupuestoPorEMail(APresupuesto : IBizPresupuestoCliente); function CambiarSituacion(APresupuesto : IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; + function CambiarComercial(APresupuesto : IBizPresupuestoCliente; AComercial: IBizComercial): Boolean; function DarListaAnosPresupuestos: TStringList; procedure FiltrarAno(APresupuesto: IBizPresupuestoCliente; ADynWhereDataTable: WideString; const Ano: String); @@ -163,7 +165,7 @@ implementation uses Controls, cxControls, DB, uEditorRegistryUtils, uEditorPreview, DateUtils, uIEditorPresupuestosCliente, uDataModulePresupuestosCliente, Variants, - uBizContactos, uDataTableUtils, uDataModuleUsuarios, uFactuGES_App, + uDataTableUtils, uDataModuleUsuarios, uFactuGES_App, schPresupuestosClienteClient_Intf, uDAInterfaces, uDateUtils, uIEditorPresupuestoCliente, uIEditorElegirPresupuestosCliente, uIEditorDireccionEntregaPresupuestoCliente, schContactosClient_Intf, uPresupuestosClienteReportController, @@ -390,6 +392,34 @@ begin end; end; +function TPresupuestosClienteController.CambiarComercial( + APresupuesto: IBizPresupuestoCliente; AComercial: IBizComercial): Boolean; +var + bEnEdicion : Boolean; + +begin + if not Assigned(APresupuesto) then + raise Exception.Create ('APresupuesto no asignado'); + + ShowHourglassCursor; + try + bEnEdicion := (APresupuesto.DataTable.State in dsEditModes); + if not bEnEdicion then + APresupuesto.Edit; + + APresupuesto.DataTable.Edit; + APresupuesto.ID_AGENTE := AComercial.ID; + APresupuesto.NOMBRE_AGENTE := AComercial.NOMBRE; + APresupuesto.DELEGACION := AComercial.DELEGACION; + + if not bEnEdicion then + APresupuesto.Post; + + finally + HideHourglassCursor; + end; +end; + function TPresupuestosClienteController.CambiarSituacion(APresupuesto: IBizPresupuestoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean): Boolean; // En el caso de cambiar almenos un elemento del conjunto se devuelve true diff --git a/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj b/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj index 9a97a82..436b0cd 100644 --- a/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj +++ b/Source/Modulos/Presupuestos de cliente/Data/PresupuestosCliente_data.dproj @@ -49,7 +49,7 @@ MainSource - +
DataModulePresupuestosCliente
diff --git a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm index 75fbe0c..f342e49 100644 --- a/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Data/uDataModulePresupuestosCliente.dfm @@ -274,6 +274,20 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente item Name = 'PRECIO_PUNTO' DataType = datCurrency + end + item + Name = 'ID_AGENTE' + DataType = datInteger + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] @@ -490,17 +504,17 @@ inherited DataModulePresupuestosCliente: TDataModulePresupuestosCliente DisplayLabel = 'CapitulosPresupuesto_IMPORTE_PORTE' DictionaryEntry = 'CapitulosPresupuesto_IMPORTE_PORTE' end - item - Name = 'VISIBLE' - DataType = datInteger - DisplayLabel = 'CapitulosPresupuesto_VISIBLE' - DictionaryEntry = 'CapitulosPresupuesto_VISIBLE' - end item Name = 'VALORADO' DataType = datInteger DisplayLabel = 'CapitulosPresupuesto_VALORADO' DictionaryEntry = 'CapitulosPresupuesto_VALORADO' + end + item + Name = 'VISIBLE' + DataType = datInteger + DisplayLabel = 'CapitulosPresupuesto_VISIBLE' + DictionaryEntry = 'CapitulosPresupuesto_VISIBLE' end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas index e7b15a0..a032908 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteClient_Intf.pas @@ -9,12 +9,12 @@ const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_Valores = '{D2BC8F92-1534-463B-A278-02BCD8F332E6}'; - RID_Propiedades = '{BDFB5D6F-F046-4F99-BD1C-7240C01F4C2E}'; - RID_ListaAnosPresupuestos = '{D3C0F851-7294-47AA-8991-0334DF2922A1}'; - RID_PresupuestosCliente = '{1E7EF128-FCD6-491A-B8FB-8C8145E948F8}'; - RID_CapitulosPresupuesto = '{4EF61A66-B977-458B-B785-8ACC5D567CD0}'; - RID_PresupuestosCliente_Detalles = '{4521E51C-A6EC-4F61-8692-521BB27E2661}'; + RID_Valores = '{F21340CA-6C9C-4A4D-91DA-D5B12AF91E5D}'; + RID_Propiedades = '{C3417C92-5EEB-4DCC-BBD2-B5039F99CC2C}'; + RID_ListaAnosPresupuestos = '{DD755780-18E5-4C77-9EAE-3C82B9326E5B}'; + RID_PresupuestosCliente = '{FC211DC2-A3FB-448D-8156-C9BFBECB7E62}'; + RID_CapitulosPresupuesto = '{28460779-A5CC-44F4-8A52-47D74B2FF089}'; + RID_PresupuestosCliente_Detalles = '{A740DCAE-6985-47A3-9A4C-87EA45B55B92}'; { Data table names } nme_Valores = 'Valores'; @@ -100,6 +100,9 @@ const fld_PresupuestosClienteNO_VALORADO = 'NO_VALORADO'; fld_PresupuestosClienteTIPO_PRESUPUESTO = 'TIPO_PRESUPUESTO'; fld_PresupuestosClientePRECIO_PUNTO = 'PRECIO_PUNTO'; + fld_PresupuestosClienteID_AGENTE = 'ID_AGENTE'; + fld_PresupuestosClienteNOMBRE_AGENTE = 'NOMBRE_AGENTE'; + fld_PresupuestosClienteDELEGACION = 'DELEGACION'; { PresupuestosCliente field indexes } idx_PresupuestosClienteID = 0; @@ -147,6 +150,9 @@ const idx_PresupuestosClienteNO_VALORADO = 42; idx_PresupuestosClienteTIPO_PRESUPUESTO = 43; idx_PresupuestosClientePRECIO_PUNTO = 44; + idx_PresupuestosClienteID_AGENTE = 45; + idx_PresupuestosClienteNOMBRE_AGENTE = 46; + idx_PresupuestosClienteDELEGACION = 47; { CapitulosPresupuesto fields } fld_CapitulosPresupuestoID = 'ID'; @@ -221,7 +227,7 @@ const type { IValores } IValores = interface(IDAStronglyTypedDataTable) - ['{F8A4CE25-23CE-4F82-93B1-EAB162A45C8E}'] + ['{9BE44ED6-D63F-44AC-B81A-AA3276CD61E2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -316,7 +322,7 @@ type { IPropiedades } IPropiedades = interface(IDAStronglyTypedDataTable) - ['{92B31CA1-7724-490F-977E-9C2B36C5B6BB}'] + ['{BC1333B8-9A1B-47B4-8B32-B3B46203CED2}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -363,7 +369,7 @@ type { IListaAnosPresupuestos } IListaAnosPresupuestos = interface(IDAStronglyTypedDataTable) - ['{A6896D8D-D14D-41F3-906F-9606BCCA4334}'] + ['{2B4CCEA6-9E7F-4F33-B634-E069AFDCBD40}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -398,7 +404,7 @@ type { IPresupuestosCliente } IPresupuestosCliente = interface(IDAStronglyTypedDataTable) - ['{ED3125DA-E739-4753-9C21-5F8147E4E52C}'] + ['{CE5B949C-DDF3-4475-A080-99FC4E346648}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -576,6 +582,18 @@ type procedure SetPRECIO_PUNTOValue(const aValue: Currency); function GetPRECIO_PUNTOIsNull: Boolean; procedure SetPRECIO_PUNTOIsNull(const aValue: Boolean); + function GetID_AGENTEValue: Integer; + procedure SetID_AGENTEValue(const aValue: Integer); + function GetID_AGENTEIsNull: Boolean; + procedure SetID_AGENTEIsNull(const aValue: Boolean); + function GetNOMBRE_AGENTEValue: String; + procedure SetNOMBRE_AGENTEValue(const aValue: String); + function GetNOMBRE_AGENTEIsNull: Boolean; + procedure SetNOMBRE_AGENTEIsNull(const aValue: Boolean); + function GetDELEGACIONValue: String; + procedure SetDELEGACIONValue(const aValue: String); + function GetDELEGACIONIsNull: Boolean; + procedure SetDELEGACIONIsNull(const aValue: Boolean); { Properties } @@ -669,6 +687,12 @@ type property TIPO_PRESUPUESTOIsNull: Boolean read GetTIPO_PRESUPUESTOIsNull write SetTIPO_PRESUPUESTOIsNull; property PRECIO_PUNTO: Currency read GetPRECIO_PUNTOValue write SetPRECIO_PUNTOValue; property PRECIO_PUNTOIsNull: Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull; + property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; + property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; + property NOMBRE_AGENTE: String read GetNOMBRE_AGENTEValue write SetNOMBRE_AGENTEValue; + property NOMBRE_AGENTEIsNull: Boolean read GetNOMBRE_AGENTEIsNull write SetNOMBRE_AGENTEIsNull; + property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; + property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; end; { TPresupuestosClienteDataTableRules } @@ -860,6 +884,18 @@ type procedure SetPRECIO_PUNTOValue(const aValue: Currency); virtual; function GetPRECIO_PUNTOIsNull: Boolean; virtual; procedure SetPRECIO_PUNTOIsNull(const aValue: Boolean); virtual; + function GetID_AGENTEValue: Integer; virtual; + procedure SetID_AGENTEValue(const aValue: Integer); virtual; + function GetID_AGENTEIsNull: Boolean; virtual; + procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_AGENTEValue: String; virtual; + procedure SetNOMBRE_AGENTEValue(const aValue: String); virtual; + function GetNOMBRE_AGENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_AGENTEIsNull(const aValue: Boolean); virtual; + function GetDELEGACIONValue: String; virtual; + procedure SetDELEGACIONValue(const aValue: String); virtual; + function GetDELEGACIONIsNull: Boolean; virtual; + procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; @@ -952,6 +988,12 @@ type property TIPO_PRESUPUESTOIsNull: Boolean read GetTIPO_PRESUPUESTOIsNull write SetTIPO_PRESUPUESTOIsNull; property PRECIO_PUNTO: Currency read GetPRECIO_PUNTOValue write SetPRECIO_PUNTOValue; property PRECIO_PUNTOIsNull: Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull; + property ID_AGENTE: Integer read GetID_AGENTEValue write SetID_AGENTEValue; + property ID_AGENTEIsNull: Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; + property NOMBRE_AGENTE: String read GetNOMBRE_AGENTEValue write SetNOMBRE_AGENTEValue; + property NOMBRE_AGENTEIsNull: Boolean read GetNOMBRE_AGENTEIsNull write SetNOMBRE_AGENTEIsNull; + property DELEGACION: String read GetDELEGACIONValue write SetDELEGACIONValue; + property DELEGACIONIsNull: Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -961,7 +1003,7 @@ type { ICapitulosPresupuesto } ICapitulosPresupuesto = interface(IDAStronglyTypedDataTable) - ['{236B02C7-20B3-4D20-968D-D18135CD5BA8}'] + ['{1116BC10-96B9-4221-9223-529541C38E3B}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1128,7 +1170,7 @@ type { IPresupuestosCliente_Detalles } IPresupuestosCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{2A4D42A2-8FA3-4666-9D62-AD0C45B16A3D}'] + ['{9369673E-1859-4284-A01A-7DE1EF796C7E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -2584,6 +2626,69 @@ begin DataTable.Fields[idx_PresupuestosClientePRECIO_PUNTO].AsVariant := Null; end; +function TPresupuestosClienteDataTableRules.GetID_AGENTEValue: Integer; +begin + result := DataTable.Fields[idx_PresupuestosClienteID_AGENTE].AsInteger; +end; + +procedure TPresupuestosClienteDataTableRules.SetID_AGENTEValue(const aValue: Integer); +begin + DataTable.Fields[idx_PresupuestosClienteID_AGENTE].AsInteger := aValue; +end; + +function TPresupuestosClienteDataTableRules.GetID_AGENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_PresupuestosClienteID_AGENTE].IsNull; +end; + +procedure TPresupuestosClienteDataTableRules.SetID_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_PresupuestosClienteID_AGENTE].AsVariant := Null; +end; + +function TPresupuestosClienteDataTableRules.GetNOMBRE_AGENTEValue: String; +begin + result := DataTable.Fields[idx_PresupuestosClienteNOMBRE_AGENTE].AsString; +end; + +procedure TPresupuestosClienteDataTableRules.SetNOMBRE_AGENTEValue(const aValue: String); +begin + DataTable.Fields[idx_PresupuestosClienteNOMBRE_AGENTE].AsString := aValue; +end; + +function TPresupuestosClienteDataTableRules.GetNOMBRE_AGENTEIsNull: boolean; +begin + result := DataTable.Fields[idx_PresupuestosClienteNOMBRE_AGENTE].IsNull; +end; + +procedure TPresupuestosClienteDataTableRules.SetNOMBRE_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_PresupuestosClienteNOMBRE_AGENTE].AsVariant := Null; +end; + +function TPresupuestosClienteDataTableRules.GetDELEGACIONValue: String; +begin + result := DataTable.Fields[idx_PresupuestosClienteDELEGACION].AsString; +end; + +procedure TPresupuestosClienteDataTableRules.SetDELEGACIONValue(const aValue: String); +begin + DataTable.Fields[idx_PresupuestosClienteDELEGACION].AsString := aValue; +end; + +function TPresupuestosClienteDataTableRules.GetDELEGACIONIsNull: boolean; +begin + result := DataTable.Fields[idx_PresupuestosClienteDELEGACION].IsNull; +end; + +procedure TPresupuestosClienteDataTableRules.SetDELEGACIONIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_PresupuestosClienteDELEGACION].AsVariant := Null; +end; + { TCapitulosPresupuestoDataTableRules } constructor TCapitulosPresupuestoDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas index 829e658..54ae4d7 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/schPresupuestosClienteServer_Intf.pas @@ -9,17 +9,17 @@ const { Delta rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } - RID_ValoresDelta = '{624804FE-56D0-4C2A-93F3-8E569A389401}'; - RID_PropiedadesDelta = '{68D32FB9-40B3-49B5-8475-71726B5B0A74}'; - RID_ListaAnosPresupuestosDelta = '{303E8E85-FEEE-4B9A-8A28-F74B8940FFF9}'; - RID_PresupuestosClienteDelta = '{9492AF33-7D47-43E8-8B73-B0F95084DC30}'; - RID_CapitulosPresupuestoDelta = '{2BAEEC7E-428F-4E9A-A01F-97715ED7A675}'; - RID_PresupuestosCliente_DetallesDelta = '{E1C87CEF-E718-48C7-97F3-D2C54DDC878B}'; + RID_ValoresDelta = '{D4547A41-7189-42AE-8268-CD8E20528396}'; + RID_PropiedadesDelta = '{86B0CBA5-A305-46E9-A201-4E4CCCE24BB3}'; + RID_ListaAnosPresupuestosDelta = '{7449E470-6915-4268-A829-2E03C176AD73}'; + RID_PresupuestosClienteDelta = '{2940BA81-FDDB-4EAB-B42F-E3B5E6335102}'; + RID_CapitulosPresupuestoDelta = '{0D855C5B-0C28-4CBC-95A2-7680C3D6CB08}'; + RID_PresupuestosCliente_DetallesDelta = '{380EFB5D-34F3-46ED-9F63-E6E7AB8E6D14}'; type { IValoresDelta } IValoresDelta = interface(IValores) - ['{624804FE-56D0-4C2A-93F3-8E569A389401}'] + ['{D4547A41-7189-42AE-8268-CD8E20528396}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -113,7 +113,7 @@ type { IPropiedadesDelta } IPropiedadesDelta = interface(IPropiedades) - ['{68D32FB9-40B3-49B5-8475-71726B5B0A74}'] + ['{86B0CBA5-A305-46E9-A201-4E4CCCE24BB3}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; @@ -159,7 +159,7 @@ type { IListaAnosPresupuestosDelta } IListaAnosPresupuestosDelta = interface(IListaAnosPresupuestos) - ['{303E8E85-FEEE-4B9A-8A28-F74B8940FFF9}'] + ['{7449E470-6915-4268-A829-2E03C176AD73}'] { Property getters and setters } function GetOldANOValue : String; @@ -193,7 +193,7 @@ type { IPresupuestosClienteDelta } IPresupuestosClienteDelta = interface(IPresupuestosCliente) - ['{9492AF33-7D47-43E8-8B73-B0F95084DC30}'] + ['{2940BA81-FDDB-4EAB-B42F-E3B5E6335102}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; @@ -240,6 +240,9 @@ type function GetOldNO_VALORADOValue : SmallInt; function GetOldTIPO_PRESUPUESTOValue : String; function GetOldPRECIO_PUNTOValue : Currency; + function GetOldID_AGENTEValue : Integer; + function GetOldNOMBRE_AGENTEValue : String; + function GetOldDELEGACIONValue : String; { Properties } property OldID : Integer read GetOldIDValue; @@ -287,6 +290,9 @@ type property OldNO_VALORADO : SmallInt read GetOldNO_VALORADOValue; property OldTIPO_PRESUPUESTO : String read GetOldTIPO_PRESUPUESTOValue; property OldPRECIO_PUNTO : Currency read GetOldPRECIO_PUNTOValue; + property OldID_AGENTE : Integer read GetOldID_AGENTEValue; + property OldNOMBRE_AGENTE : String read GetOldNOMBRE_AGENTEValue; + property OldDELEGACION : String read GetOldDELEGACIONValue; end; { TPresupuestosClienteBusinessProcessorRules } @@ -568,6 +574,24 @@ type function GetOldPRECIO_PUNTOIsNull: Boolean; virtual; procedure SetPRECIO_PUNTOValue(const aValue: Currency); virtual; procedure SetPRECIO_PUNTOIsNull(const aValue: Boolean); virtual; + function GetID_AGENTEValue: Integer; virtual; + function GetID_AGENTEIsNull: Boolean; virtual; + function GetOldID_AGENTEValue: Integer; virtual; + function GetOldID_AGENTEIsNull: Boolean; virtual; + procedure SetID_AGENTEValue(const aValue: Integer); virtual; + procedure SetID_AGENTEIsNull(const aValue: Boolean); virtual; + function GetNOMBRE_AGENTEValue: String; virtual; + function GetNOMBRE_AGENTEIsNull: Boolean; virtual; + function GetOldNOMBRE_AGENTEValue: String; virtual; + function GetOldNOMBRE_AGENTEIsNull: Boolean; virtual; + procedure SetNOMBRE_AGENTEValue(const aValue: String); virtual; + procedure SetNOMBRE_AGENTEIsNull(const aValue: Boolean); virtual; + function GetDELEGACIONValue: String; virtual; + function GetDELEGACIONIsNull: Boolean; virtual; + function GetOldDELEGACIONValue: String; virtual; + function GetOldDELEGACIONIsNull: Boolean; virtual; + procedure SetDELEGACIONValue(const aValue: String); virtual; + procedure SetDELEGACIONIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; @@ -750,6 +774,18 @@ type property PRECIO_PUNTOIsNull : Boolean read GetPRECIO_PUNTOIsNull write SetPRECIO_PUNTOIsNull; property OldPRECIO_PUNTO : Currency read GetOldPRECIO_PUNTOValue; property OldPRECIO_PUNTOIsNull : Boolean read GetOldPRECIO_PUNTOIsNull; + property ID_AGENTE : Integer read GetID_AGENTEValue write SetID_AGENTEValue; + property ID_AGENTEIsNull : Boolean read GetID_AGENTEIsNull write SetID_AGENTEIsNull; + property OldID_AGENTE : Integer read GetOldID_AGENTEValue; + property OldID_AGENTEIsNull : Boolean read GetOldID_AGENTEIsNull; + property NOMBRE_AGENTE : String read GetNOMBRE_AGENTEValue write SetNOMBRE_AGENTEValue; + property NOMBRE_AGENTEIsNull : Boolean read GetNOMBRE_AGENTEIsNull write SetNOMBRE_AGENTEIsNull; + property OldNOMBRE_AGENTE : String read GetOldNOMBRE_AGENTEValue; + property OldNOMBRE_AGENTEIsNull : Boolean read GetOldNOMBRE_AGENTEIsNull; + property DELEGACION : String read GetDELEGACIONValue write SetDELEGACIONValue; + property DELEGACIONIsNull : Boolean read GetDELEGACIONIsNull write SetDELEGACIONIsNull; + property OldDELEGACION : String read GetOldDELEGACIONValue; + property OldDELEGACIONIsNull : Boolean read GetOldDELEGACIONIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -759,7 +795,7 @@ type { ICapitulosPresupuestoDelta } ICapitulosPresupuestoDelta = interface(ICapitulosPresupuesto) - ['{2BAEEC7E-428F-4E9A-A01F-97715ED7A675}'] + ['{0D855C5B-0C28-4CBC-95A2-7680C3D6CB08}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldPOSICIONValue : Integer; @@ -925,7 +961,7 @@ type { IPresupuestosCliente_DetallesDelta } IPresupuestosCliente_DetallesDelta = interface(IPresupuestosCliente_Detalles) - ['{E1C87CEF-E718-48C7-97F3-D2C54DDC878B}'] + ['{380EFB5D-34F3-46ED-9F63-E6E7AB8E6D14}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_PRESUPUESTOValue : Integer; @@ -2925,6 +2961,99 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClientePRECIO_PUNTO] := Null; end; +function TPresupuestosClienteBusinessProcessorRules.GetID_AGENTEValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_AGENTE]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetID_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_AGENTE]); +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldID_AGENTEValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteID_AGENTE]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldID_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteID_AGENTE]); +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetID_AGENTEValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_AGENTE] := aValue; +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetID_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteID_AGENTE] := Null; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetNOMBRE_AGENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNOMBRE_AGENTE]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetNOMBRE_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNOMBRE_AGENTE]); +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldNOMBRE_AGENTEValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteNOMBRE_AGENTE]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldNOMBRE_AGENTEIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteNOMBRE_AGENTE]); +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetNOMBRE_AGENTEValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNOMBRE_AGENTE] := aValue; +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetNOMBRE_AGENTEIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteNOMBRE_AGENTE] := Null; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetDELEGACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteDELEGACION]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetDELEGACIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteDELEGACION]); +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldDELEGACIONValue: String; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteDELEGACION]; +end; + +function TPresupuestosClienteBusinessProcessorRules.GetOldDELEGACIONIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PresupuestosClienteDELEGACION]); +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetDELEGACIONValue(const aValue: String); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteDELEGACION] := aValue; +end; + +procedure TPresupuestosClienteBusinessProcessorRules.SetDELEGACIONIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_PresupuestosClienteDELEGACION] := Null; +end; + { TCapitulosPresupuestoBusinessProcessorRules } constructor TCapitulosPresupuestoBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas index 5950a78..77131b4 100644 --- a/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Model/uBizPresupuestosCliente.pas @@ -335,7 +335,9 @@ begin DataTable.Edit; ID_CLIENTE := FCliente.ID; - + ID_AGENTE := FCliente.ID_AGENTE; + NOMBRE_AGENTE := FCliente.AGENTE; + DELEGACION := FCliente.DELEGACION; // La forma de pago se establece desde el tipo de documento y aunque cambie de cliente no se cambia la formade pago ya que desde la vista se pregunta y se cambia si el usuario lo desea // if FCliente.ID_FORMA_PAGO > 0 then // ID_FORMA_PAGO := FCliente.ID_FORMA_PAGO; diff --git a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj index 2e71c05..f7e546b 100644 --- a/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj +++ b/Source/Modulos/Presupuestos de cliente/PresupuestosCliente_Group.groupproj @@ -17,8 +17,10 @@ + + @@ -241,14 +243,32 @@ + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm index 4a1c282..da13dac 100644 --- a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm +++ b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm @@ -332,6 +332,18 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente item DatasetField = 'PRECIO_PUNTO' TableField = 'PRECIO_PUNTO' + end + item + DatasetField = 'ID_AGENTE' + TableField = 'ID_AGENTE' + end + item + DatasetField = 'NOMBRE_AGENTE' + TableField = 'NOMBRE_AGENTE' + end + item + DatasetField = 'DELEGACION' + TableField = 'DELEGACION' end> end> Name = 'PresupuestosCliente' @@ -558,6 +570,20 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente item Name = 'PRECIO_PUNTO' DataType = datCurrency + end + item + Name = 'ID_AGENTE' + DataType = datInteger + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 end> end item @@ -1084,6 +1110,23 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente Name = 'PRECIO_PUNTO' DataType = datCurrency Value = '' + end + item + Name = 'ID_AGENTE' + DataType = datInteger + Value = '' + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + Value = '' + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 + Value = '' end> Statements = < item @@ -1100,16 +1143,17 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente 'NIBLE, ID_TIPO_IVA, IVA, IMPORTE_IVA,'#10' RE, IMPORTE_RE, RECAR' + 'GO_EQUIVALENCIA, IMPORTE_TOTAL, ID_FORMA_PAGO, ID_TIENDA, ID_VEN' + 'DEDOR,'#10' ID_CONTRATO, NO_VALORADO, TIPO_PRESUPUESTO, PRECIO_P' + - 'UNTO)'#10' VALUES'#10' (:ID, :ID_EMPRESA,'#10' :FECHA_PRESUPUESTO, :' + - 'FECHA_VIGENCIA, :FECHA_DECISION, :REFERENCIA, :REFERENCIA_CLIENT' + - 'E,'#10' :SITUACION, :ID_CLIENTE, :ID_DIRECCION, :PERSONA_CONTACT' + - 'O,'#10' :FORMA_PAGO, :PLAZO_ENTREGA, :OBSERVACIONES, :INCIDENCIA' + - 'S,'#10' :INCIDENCIAS_ACTIVAS, CURRENT_TIMESTAMP, :USUARIO, :IMPO' + - 'RTE_NETO, :IMPORTE_PORTE,'#10' :DESCUENTO, :IMPORTE_DESCUENTO, :' + - 'BASE_IMPONIBLE, :ID_TIPO_IVA, :IVA, :IMPORTE_IVA,'#10' :RE, :IMP' + - 'ORTE_RE, :RECARGO_EQUIVALENCIA, :IMPORTE_TOTAL, :ID_FORMA_PAGO, ' + - ':ID_TIENDA, :ID_VENDEDOR,'#10' :ID_CONTRATO, :NO_VALORADO, :TIPO' + - '_PRESUPUESTO, :PRECIO_PUNTO)'#10' '#10#10#10#10#10 + 'UNTO, ID_AGENTE, NOMBRE_AGENTE, DELEGACION)'#10' VALUES'#10' (:ID, :' + + 'ID_EMPRESA,'#10' :FECHA_PRESUPUESTO, :FECHA_VIGENCIA, :FECHA_DEC' + + 'ISION, :REFERENCIA, :REFERENCIA_CLIENTE,'#10' :SITUACION, :ID_CL' + + 'IENTE, :ID_DIRECCION, :PERSONA_CONTACTO,'#10' :FORMA_PAGO, :PLAZ' + + 'O_ENTREGA, :OBSERVACIONES, :INCIDENCIAS,'#10' :INCIDENCIAS_ACTIV' + + 'AS, CURRENT_TIMESTAMP, :USUARIO, :IMPORTE_NETO, :IMPORTE_PORTE,'#10 + + ' :DESCUENTO, :IMPORTE_DESCUENTO, :BASE_IMPONIBLE, :ID_TIPO_I' + + 'VA, :IVA, :IMPORTE_IVA,'#10' :RE, :IMPORTE_RE, :RECARGO_EQUIVALE' + + 'NCIA, :IMPORTE_TOTAL, :ID_FORMA_PAGO, :ID_TIENDA, :ID_VENDEDOR,'#10 + + ' :ID_CONTRATO, :NO_VALORADO, :TIPO_PRESUPUESTO, :PRECIO_PUNT' + + 'O, :ID_AGENTE, :NOMBRE_AGENTE, :DELEGACION)'#10' '#10#10#10#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -1318,6 +1362,23 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente DataType = datCurrency Value = '' end + item + Name = 'ID_AGENTE' + DataType = datInteger + Value = '' + end + item + Name = 'NOMBRE_AGENTE' + DataType = datString + Size = 255 + Value = '' + end + item + Name = 'DELEGACION' + DataType = datString + Size = 255 + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1346,8 +1407,9 @@ object srvPresupuestosCliente: TsrvPresupuestosCliente 'E_TOTAL, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' ID_TIENDA = :I' + 'D_TIENDA,'#10' ID_VENDEDOR = :ID_VENDEDOR,'#10' ID_CONTRATO = :ID_' + 'CONTRATO,'#10' NO_VALORADO = :NO_VALORADO,'#10' TIPO_PRESUPUESTO =' + - ' :TIPO_PRESUPUESTO,'#10' PRECIO_PUNTO = :PRECIO_PUNTO'#10' WHERE'#10' ' + - ' (ID = :OLD_ID)'#10#10 + ' :TIPO_PRESUPUESTO,'#10' PRECIO_PUNTO = :PRECIO_PUNTO,'#10' ID_AGE' + + 'NTE = :ID_AGENTE,'#10' NOMBRE_AGENTE = :NOMBRE_AGENTE,'#10' DELEGA' + + 'CION = :DELEGACION'#10' WHERE'#10' (ID = :OLD_ID)'#10#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk index e2270ac..23a7ea4 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk +++ b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dpk @@ -67,7 +67,9 @@ requires cxExportD11, GUISDK_D11R, designide, - xmlrtl; + xmlrtl, + Delegaciones_model, + Contactos_view; contains uPresupuestosClienteViewRegister in 'uPresupuestosClienteViewRegister.pas', diff --git a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj index 59c426d..6c8050b 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj +++ b/Source/Modulos/Presupuestos de cliente/Views/PresupuestosCliente_view.dproj @@ -49,49 +49,51 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
frDialogOpcionesImpresionPresupuestosCliente
T diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm index e2831f1..d92cfe5 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm @@ -2,20 +2,20 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Left = 332 Top = 147 Caption = 'Nuevo presupuesto de cliente' - ClientHeight = 676 - ClientWidth = 1003 + ClientHeight = 950 + ClientWidth = 1036 OnClose = CustomEditorClose - ExplicitWidth = 1011 - ExplicitHeight = 714 + ExplicitWidth = 1044 + ExplicitHeight = 988 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader - Width = 1003 + Width = 1036 Caption = 'Nuevo presupuesto de cliente' ExplicitTop = 52 - ExplicitWidth = 1003 + ExplicitWidth = 1036 inherited Image1: TImage - Left = 976 + Left = 1009 Picture.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0000180806000000E0773DF80000000970485973000017120000171201679FD2 @@ -127,8 +127,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end end inherited TBXDock: TTBXDock - Width = 1003 - ExplicitWidth = 1003 + Width = 1036 + ExplicitWidth = 1036 inherited tbxMain: TTBXToolbar ExplicitWidth = 551 inherited TBXItem2: TTBXItem @@ -156,7 +156,7 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end end inherited tbxMenu: TTBXToolbar - ExplicitWidth = 1003 + ExplicitWidth = 1036 object TBXSubmenuItem2: TTBXSubmenuItem [4] Caption = 'A&cciones' object TBXItem34: TTBXItem @@ -166,34 +166,33 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end end inherited StatusBar: TJvStatusBar - Top = 657 - Width = 1003 + Top = 931 + Width = 1036 Panels = < item Width = 200 end> - ExplicitTop = 657 - ExplicitWidth = 1003 + ExplicitTop = 931 + ExplicitWidth = 1036 end inherited pgPaginas: TPageControl - Width = 997 - Height = 314 - ActivePage = pagContenido + Width = 1030 + Height = 588 TabOrder = 1 OnChanging = pgPaginasChanging ExplicitTop = 112 - ExplicitWidth = 997 - ExplicitHeight = 314 + ExplicitWidth = 1030 + ExplicitHeight = 588 inherited pagGeneral: TTabSheet ExplicitLeft = 4 ExplicitTop = 24 - ExplicitWidth = 989 - ExplicitHeight = 286 + ExplicitWidth = 1022 + ExplicitHeight = 560 inline frViewPresupuestoCliente1: TfrViewPresupuestoCliente Left = 0 Top = 0 - Width = 989 - Height = 286 + Width = 1022 + Height = 560 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -203,21 +202,23 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitWidth = 989 - ExplicitHeight = 286 + ExplicitWidth = 1022 + ExplicitHeight = 560 inherited dxLayoutControl1: TdxLayoutControl - Width = 989 - Height = 286 - ExplicitWidth = 989 - ExplicitHeight = 286 + Width = 1022 + Height = 560 + ExplicitWidth = 1022 + ExplicitHeight = 560 inherited edtFechaPresupuesto: TcxDBDateEdit ExplicitWidth = 187 Width = 187 end inherited memObservaciones: TcxDBMemo - Left = 478 - ExplicitLeft = 478 + Left = 496 + ExplicitLeft = 496 ExplicitWidth = 793 + ExplicitHeight = 245 + Height = 245 Width = 793 end inherited eReferencia: TcxDBTextEdit @@ -229,12 +230,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 122 end inherited bFormasPago: TButton - Left = 316 - ExplicitLeft = 316 + Left = 334 + ExplicitLeft = 334 end inherited edtFechaDecision: TcxDBDateEdit - Left = 327 - ExplicitLeft = 327 + Left = 331 + ExplicitLeft = 331 ExplicitWidth = 260 Width = 260 end @@ -247,9 +248,9 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 260 end inherited frViewDatosYSeleccionClientePresupuesto1: TfrViewDatosYSeleccionClientePresupuesto - Left = 478 + Left = 496 Width = 320 - ExplicitLeft = 478 + ExplicitLeft = 496 ExplicitWidth = 320 inherited dxLayoutControl1: TdxLayoutControl Width = 320 @@ -258,12 +259,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 202 end inherited edtNIFCIF: TcxDBTextEdit - Left = 357 - ExplicitLeft = 357 + Left = 391 + ExplicitLeft = 391 end inherited Button3: TBitBtn - Left = 268 - ExplicitLeft = 268 + Left = 302 + ExplicitLeft = 302 end inherited edtPersonaContacto: TcxDBTextEdit ExplicitWidth = 329 @@ -274,12 +275,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 121 end inherited Button4: TButton - Left = 437 - ExplicitLeft = 437 + Left = 471 + ExplicitLeft = 471 end inherited Button5: TButton - Left = 437 - ExplicitLeft = 437 + Left = 471 + ExplicitLeft = 471 end inherited edtTelefonos: TcxTextEdit ExplicitWidth = 193 @@ -289,13 +290,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end inherited memFormaPago: TcxDBMemo ExplicitWidth = 475 - ExplicitHeight = 44 - Height = 44 Width = 475 end inherited memPlazoEntrega: TcxDBMemo - Top = 344 - ExplicitTop = 344 + Top = 515 + ExplicitTop = 515 ExplicitWidth = 396 ExplicitHeight = 100 Height = 100 @@ -306,8 +305,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 27 end inherited cbTipoPresupuesto: TcxDBComboBox - Left = 324 - ExplicitLeft = 324 + Left = 327 + ExplicitLeft = 327 ExplicitWidth = 186 Width = 186 end @@ -316,13 +315,37 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 204 end inherited frViewTienda1: TfrViewTienda + Width = 390 + ExplicitWidth = 390 inherited dxLayoutControl1: TdxLayoutControl + Width = 390 inherited cbTienda: TcxComboBox ExplicitWidth = 390 Width = 390 end end end + inherited frViewDatosYSeleccionComercial1: TfrViewDatosYSeleccionComercial + Width = 317 + ExplicitWidth = 317 + inherited dxLayoutControl1: TdxLayoutControl + Width = 317 + inherited edtlNombreAgente: TcxDBTextEdit + DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource + ExplicitWidth = 224 + Width = 224 + end + inherited edtDelegacion: TcxDBTextEdit + DataBinding.DataSource = frViewPresupuestoCliente1.DADataSource + ExplicitWidth = 562 + Width = 562 + end + inherited Button3: TBitBtn + Left = 242 + ExplicitLeft = 242 + end + end + end end end end @@ -332,8 +355,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente inline frViewDetallesPresupuestoCliente1: TfrViewDetallesPresupuestoCliente Left = 0 Top = 0 - Width = 989 - Height = 286 + Width = 1022 + Height = 560 Align = alClient BiDiMode = bdLeftToRight Font.Charset = DEFAULT_CHARSET @@ -345,12 +368,12 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitWidth = 989 - ExplicitHeight = 286 + ExplicitWidth = 1022 + ExplicitHeight = 560 inherited ToolBar1: TToolBar - Width = 989 + Width = 1022 Height = 24 - ExplicitWidth = 989 + ExplicitWidth = 1022 ExplicitHeight = 24 inherited ToolButton4: TToolButton Wrap = False @@ -432,11 +455,11 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end inherited cxGrid: TcxGrid Top = 50 - Width = 989 - Height = 236 + Width = 1022 + Height = 510 ExplicitTop = 50 - ExplicitWidth = 989 - ExplicitHeight = 236 + ExplicitWidth = 1022 + ExplicitHeight = 510 inherited cxGridView: TcxGridDBTableView inherited cxGridViewPROPIEDAD: TcxGridDBColumn IsCaptionAssigned = True @@ -445,9 +468,9 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end inherited TBXDock1: TTBXDock Top = 24 - Width = 989 + Width = 1022 ExplicitTop = 24 - ExplicitWidth = 989 + ExplicitWidth = 1022 inherited TBXToolbar1: TTBXToolbar ExplicitWidth = 839 end @@ -476,8 +499,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente inline frViewIncidenciasCli: TfrViewIncidencias Left = 0 Top = 0 - Width = 989 - Height = 286 + Width = 1022 + Height = 560 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -487,25 +510,25 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitWidth = 989 - ExplicitHeight = 286 + ExplicitWidth = 1022 + ExplicitHeight = 560 inherited pnlSup: TPanel - Width = 989 + Width = 1022 ExplicitWidth = 989 inherited eIncidenciaActiva: TcxDBCheckBox ExplicitHeight = 21 end end inherited GroupBox1: TGroupBox - Width = 989 - Height = 258 - ExplicitWidth = 989 - ExplicitHeight = 258 + Width = 1022 + Height = 532 + ExplicitWidth = 1022 + ExplicitHeight = 532 inherited eIncidencias: TcxDBMemo - ExplicitWidth = 985 - ExplicitHeight = 241 - Height = 241 - Width = 985 + ExplicitWidth = 1018 + ExplicitHeight = 515 + Height = 515 + Width = 1018 end end end @@ -516,8 +539,8 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente inline frViewDocumentosPresupuestoCliente1: TfrViewDocumentosPresupuestoCliente Left = 0 Top = 0 - Width = 989 - Height = 286 + Width = 1022 + Height = 560 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -527,15 +550,15 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ParentFont = False TabOrder = 0 ReadOnly = False - ExplicitWidth = 989 - ExplicitHeight = 286 + ExplicitWidth = 1022 + ExplicitHeight = 560 inherited TBXDock: TTBXDock - Width = 989 - ExplicitWidth = 989 + Width = 1022 + ExplicitWidth = 1022 end inherited ListView1: TListView - Width = 989 - Height = 260 + Width = 1022 + Height = 534 ExplicitTop = 26 ExplicitWidth = 989 ExplicitHeight = 260 @@ -548,18 +571,18 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente end end inherited PnlComentario: TPanel - Width = 1003 + Width = 1036 ExplicitTop = 79 - ExplicitWidth = 1003 + ExplicitWidth = 1036 inherited lbComentario: TLabel - Width = 993 + Width = 1026 Height = 25 end end inline frViewTotales1: TfrViewTotalesPresupuesto [5] Left = 0 - Top = 429 - Width = 1003 + Top = 703 + Width = 1036 Height = 228 Align = alBottom Font.Charset = DEFAULT_CHARSET @@ -570,40 +593,38 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ParentFont = False TabOrder = 5 ReadOnly = False - ExplicitTop = 429 - ExplicitWidth = 1003 + ExplicitTop = 703 + ExplicitWidth = 1036 ExplicitHeight = 228 inherited dxLayoutControl1: TdxLayoutControl - Width = 1003 + Width = 1036 LookAndFeel = dxLayoutOfficeLookAndFeel1 - ExplicitWidth = 1003 + ExplicitWidth = 1036 inherited Bevel3: TBevel - Left = 469 + Left = 475 Top = 57 - Height = 122 - ExplicitLeft = 469 + ExplicitLeft = 475 ExplicitTop = 57 - ExplicitHeight = 122 end inherited Bevel4: TBevel - Left = 581 + Left = 587 Top = 88 Width = 342 - ExplicitLeft = 581 + ExplicitLeft = 587 ExplicitTop = 88 ExplicitWidth = 342 end inherited Bevel2: TBevel - Top = 216 + Top = 242 Width = 333 - ExplicitTop = 216 + ExplicitTop = 242 ExplicitWidth = 333 end inherited Bevel1: TBevel - Left = 488 + Left = 494 Top = 216 Width = 332 - ExplicitLeft = 488 + ExplicitLeft = 494 ExplicitTop = 216 ExplicitWidth = 332 end @@ -615,19 +636,19 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 93 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 652 + Left = 658 Top = 108 Style.IsFontAssigned = True - ExplicitLeft = 652 + ExplicitLeft = 658 ExplicitTop = 108 ExplicitWidth = 137 Width = 137 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 582 + Left = 588 Top = 189 Style.IsFontAssigned = True - ExplicitLeft = 582 + ExplicitLeft = 588 ExplicitTop = 189 ExplicitWidth = 137 Width = 137 @@ -638,49 +659,49 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitTop = 84 end inherited edtIVA: TcxDBSpinEdit - Left = 581 + Left = 587 Top = 108 Style.IsFontAssigned = True - ExplicitLeft = 581 + ExplicitLeft = 587 ExplicitTop = 108 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 581 + Left = 587 Top = 57 Style.IsFontAssigned = True - ExplicitLeft = 581 + ExplicitLeft = 587 ExplicitTop = 57 ExplicitWidth = 92 Width = 92 end inherited edtRE: TcxDBSpinEdit - Left = 581 + Left = 587 Top = 162 Style.IsFontAssigned = True - ExplicitLeft = 581 + ExplicitLeft = 587 ExplicitTop = 162 end inherited edtIRPF: TcxDBSpinEdit - Left = 581 + Left = 587 Top = 135 Style.IsFontAssigned = True - ExplicitLeft = 581 + ExplicitLeft = 587 ExplicitTop = 135 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 652 + Left = 658 Top = 162 Style.IsFontAssigned = True - ExplicitLeft = 652 + ExplicitLeft = 658 ExplicitTop = 162 ExplicitWidth = 56 Width = 56 end inherited ImporteIRPF: TcxDBCurrencyEdit - Left = 652 + Left = 658 Top = 135 Style.IsFontAssigned = True - ExplicitLeft = 652 + ExplicitLeft = 658 ExplicitTop = 135 ExplicitWidth = 56 Width = 56 @@ -715,10 +736,10 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 81 end inherited bTiposIVA: TButton - Left = 321 + Left = 327 Top = 138 OnClick = frViewTotales1bTiposIVAClick - ExplicitLeft = 321 + ExplicitLeft = 327 ExplicitTop = 138 end inherited cbRecargoEquivalencia: TcxDBCheckBox @@ -728,28 +749,28 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Width = 219 end inherited edtRetencion: TcxDBSpinEdit - Left = 581 + Left = 587 Top = 231 Style.IsFontAssigned = True - ExplicitLeft = 581 + ExplicitLeft = 587 ExplicitTop = 231 end inherited edtImporteRetencion: TcxDBCurrencyEdit - Left = 652 + Left = 658 Top = 231 Style.IsFontAssigned = True - ExplicitLeft = 652 + ExplicitLeft = 658 ExplicitTop = 231 ExplicitWidth = 342 Width = 342 end inherited edtFechaRetencion: TcxDBDateEdit - Top = 231 + Top = 257 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitTop = 231 + ExplicitTop = 257 ExplicitWidth = 333 Width = 333 end diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas index d9833e2..7f22e35 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.pas @@ -492,7 +492,7 @@ begin if Assigned(FController) then begin -// ViewPresupuesto.ViewClientePresupuesto.Controller := Controller.ClienteController; + frViewPresupuestoCliente1.Controller := Controller; frViewDetallesPresupuestoCliente1.Controller := Controller.DetallesController; //GESTION_DOCUMENTOS @@ -536,6 +536,7 @@ begin frViewDocumentosPresupuestoCliente1.Presupuesto := FPresupuesto; finally + ViewPresupuesto.ViewClientePresupuesto.OnClienteChanged := OnClienteChanged; end; end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm index ab47a2c..9b6ffe9 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.dfm @@ -1,15 +1,15 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 895 - Height = 555 + Height = 660 OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy ExplicitWidth = 895 - ExplicitHeight = 555 + ExplicitHeight = 660 object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 Width = 895 - Height = 555 + Height = 660 Align = alClient ParentBackground = True TabOrder = 0 @@ -17,9 +17,9 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente AutoContentSizes = [acsWidth, acsHeight] DesignSize = ( 895 - 555) + 660) object edtFechaPresupuesto: TcxDBDateEdit - Left = 136 + Left = 117 Top = 82 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_PRESUPUESTO' @@ -42,7 +42,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 187 end object memObservaciones: TcxDBMemo - Left = 442 + Left = 436 Top = 288 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'OBSERVACIONES' @@ -59,12 +59,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 14 + TabOrder = 15 Height = 245 Width = 793 end object eReferencia: TcxDBTextEdit - Left = 136 + Left = 117 Top = 28 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA' @@ -89,8 +89,8 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 122 end object cbFormaPago: TcxDBLookupComboBox - Left = 136 - Top = 261 + Left = 117 + Top = 432 DataBinding.DataField = 'ID_FORMA_PAGO' DataBinding.DataSource = DADataSource Properties.ImmediatePost = True @@ -117,20 +117,20 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 9 + TabOrder = 10 Width = 122 end object bFormasPago: TButton - Left = 280 - Top = 261 + Left = 274 + Top = 432 Width = 132 Height = 21 Caption = 'Ver las formas de pago...' - TabOrder = 10 + TabOrder = 11 OnClick = bFormasPagoClick end object edtFechaDecision: TcxDBDateEdit - Left = 308 + Left = 300 Top = 109 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_DECISION' @@ -152,7 +152,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 260 end object edtFechaVigencia: TcxDBDateEdit - Left = 136 + Left = 117 Top = 109 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'FECHA_VIGENCIA' @@ -178,7 +178,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 260 end object cbSituacion: TcxDBImageComboBox - Left = 136 + Left = 117 Top = 136 DataBinding.DataField = 'SITUACION' DataBinding.DataSource = DADataSource @@ -209,7 +209,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 260 end inline frViewDatosYSeleccionClientePresupuesto1: TfrViewDatosYSeleccionClientePresupuesto - Left = 442 + Left = 436 Top = 28 Width = 320 Height = 224 @@ -219,9 +219,9 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 13 + TabOrder = 14 ReadOnly = False - ExplicitLeft = 442 + ExplicitLeft = 436 ExplicitTop = 28 ExplicitWidth = 320 ExplicitHeight = 224 @@ -235,12 +235,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 224 end inherited edtNIFCIF: TcxDBTextEdit - Left = 318 - ExplicitLeft = 318 + Left = 324 + ExplicitLeft = 324 end inherited Button3: TBitBtn - Left = 229 - ExplicitLeft = 229 + Left = 235 + ExplicitLeft = 235 end inherited edtPersonaContacto: TcxDBTextEdit ExplicitWidth = 283 @@ -251,12 +251,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 121 end inherited Button4: TButton - Left = 398 - ExplicitLeft = 398 + Left = 404 + ExplicitLeft = 404 end inherited Button5: TButton - Left = 398 - ExplicitLeft = 398 + Left = 404 + ExplicitLeft = 404 end inherited edtTelefonos: TcxTextEdit ExplicitWidth = 363 @@ -266,7 +266,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente end object memFormaPago: TcxDBMemo Left = 22 - Top = 288 + Top = 459 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'FORMA_PAGO' DataBinding.DataSource = DADataSource @@ -282,13 +282,13 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 11 + TabOrder = 12 Height = 44 Width = 475 end object memPlazoEntrega: TcxDBMemo Left = 22 - Top = 396 + Top = 539 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'PLAZO_ENTREGA' DataBinding.DataSource = DADataSource @@ -304,12 +304,12 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente StyleFocused.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True - TabOrder = 12 + TabOrder = 13 Height = 100 Width = 396 end object cbVendedor: TcxDBLookupComboBox - Left = 136 + Left = 117 Top = 163 DataBinding.DataField = 'ID_VENDEDOR' DataBinding.DataSource = DADataSource @@ -339,7 +339,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 27 end object cbTipoPresupuesto: TcxDBComboBox - Left = 305 + Left = 296 Top = 82 DataBinding.DataField = 'TIPO_PRESUPUESTO' DataBinding.DataSource = DADataSource @@ -359,7 +359,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente Width = 186 end object edtlReferenciaCliente: TcxDBTextEdit - Left = 136 + Left = 117 Top = 55 Anchors = [akLeft, akTop, akRight] AutoSize = False @@ -401,6 +401,44 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente ExplicitWidth = 390 end end + inline frViewDatosYSeleccionComercial1: TfrViewDatosYSeleccionComercial + Left = 22 + Top = 261 + Width = 317 + Height = 135 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + TabOrder = 9 + ReadOnly = False + ExplicitLeft = 22 + ExplicitTop = 261 + ExplicitWidth = 317 + inherited dxLayoutControl1: TdxLayoutControl + Width = 317 + ExplicitWidth = 317 + DesignSize = ( + 317 + 135) + inherited edtlNombreAgente: TcxDBTextEdit + DataBinding.DataSource = DADataSource + ExplicitWidth = 224 + Width = 224 + end + inherited edtDelegacion: TcxDBTextEdit + DataBinding.DataSource = DADataSource + ExplicitWidth = 562 + Width = 562 + end + inherited Button3: TBitBtn + Left = 182 + ExplicitLeft = 182 + end + end + end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -475,7 +513,7 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente ControlOptions.ShowBorder = False end object dxLayoutControl1Item11: TdxLayoutItem - Caption = 'Vendedor \ Instalador:' + Caption = 'Usuario:' Control = cbVendedor ControlOptions.ShowBorder = False end @@ -485,6 +523,14 @@ inherited frViewPresupuestoCliente: TfrViewPresupuestoCliente ControlOptions.ShowBorder = False end end + object dxLayoutControl1Group5: TdxLayoutGroup + Caption = 'Datos comerciales' + object dxLayoutControl1Item16: TdxLayoutItem + Control = frViewDatosYSeleccionComercial1 + ControlOptions.AutoColor = True + ControlOptions.ShowBorder = False + end + end object dxLayoutControl1Group6: TdxLayoutGroup AutoAligns = [aaHorizontal] AlignVert = avClient diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas index ae0c892..0ba714f 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestoCliente.pas @@ -12,7 +12,7 @@ uses uViewDireccionEntregaPresupuestoCliente, Buttons, ActnList, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uDAInterfaces, uBizFormasPago, cxButtonEdit, uViewDatosYSeleccionClientePresupuesto, uBizContactos, - uVendedoresController, uViewTienda; + uVendedoresController, uViewTienda, uViewDatosYSeleccionComercial, uPresupuestosClienteController; type IViewPresupuestoCliente = interface(IViewBase) @@ -21,6 +21,9 @@ type procedure SetPresupuesto(const Value: IBizPresupuestoCliente); property Presupuesto: IBizPresupuestoCliente read GetPresupuesto write SetPresupuesto; + function GetController : IPresupuestosClienteController; + procedure SetController (const Value : IPresupuestosClienteController); + function GetViewClientePresupuesto: IViewDatosYSeleccionClientePresupuesto; property ViewClientePresupuesto: IViewDatosYSeleccionClientePresupuesto read GetViewClientePresupuesto; end; @@ -72,6 +75,9 @@ type edtlReferenciaCliente: TcxDBTextEdit; dxLayoutControl1Item14: TdxLayoutItem; frViewTienda1: TfrViewTienda; + dxLayoutControl1Item16: TdxLayoutItem; + frViewDatosYSeleccionComercial1: TfrViewDatosYSeleccionComercial; + dxLayoutControl1Group5: TdxLayoutGroup; procedure CustomViewCreate(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure bFormasPagoClick(Sender: TObject); @@ -79,19 +85,31 @@ type procedure frViewClientePresupuestoButton2Click(Sender: TObject); procedure cbFormaPagoPropertiesValidate(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean); + protected FPresupuesto : IBizPresupuestoCliente; + FController : IPresupuestosClienteController; + FFormasPago : IBizFormaPago; FVendedor : IBizVendedor; FFormasPagoController : IFormasPagoController; + FVendedoresController : IVendedoresController; FViewClientePresupuesto : IViewDatosYSeleccionClientePresupuesto; + function GetController : IPresupuestosClienteController; + procedure SetController (const Value : IPresupuestosClienteController); + function GetPresupuesto: IBizPresupuestoCliente; procedure SetPresupuesto(const Value: IBizPresupuestoCliente); virtual; + function GetViewClientePresupuesto: IViewDatosYSeleccionClientePresupuesto; + + procedure OnComercialChanged(Sender : TObject); + public property Presupuesto: IBizPresupuestoCliente read GetPresupuesto write SetPresupuesto; + property Controller : IPresupuestosClienteController read GetController write SetController; property ViewClientePresupuesto: IViewDatosYSeleccionClientePresupuesto read GetViewClientePresupuesto; end; @@ -102,7 +120,7 @@ implementation { TfrViewPresupuestoCliente } uses - schPresupuestosClienteClient_Intf, uClientesController, uBizDireccionesContacto, uPresupuestosClienteController, + schPresupuestosClienteClient_Intf, uClientesController, uBizDireccionesContacto, uTypesConstConfiguration, uFactuGES_App; @@ -137,27 +155,34 @@ begin cbTipoPresupuesto.Properties.Items.Add(CTE_ELECTRODOMESTICO); cbTipoPresupuesto.Properties.Items.Add(CTE_VARIOS); - //Solo para Graden - if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then +//FILTRO DE EMPRESAS + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then begin - frViewTienda1.Visible := true; - frViewTienda1.dxLayoutControl1.Visible :=true; + frViewTienda1.Visible := false; + frViewTienda1.dxLayoutControl1.Visible :=false; + + dxLayoutControl1Group5.Visible := true; end else begin - frViewTienda1.Visible := false; - frViewTienda1.dxLayoutControl1.Visible :=false; + frViewTienda1.Visible := true; + frViewTienda1.dxLayoutControl1.Visible :=true; + + dxLayoutControl1Group5.Visible := false; end; end; procedure TfrViewPresupuestoCliente.CustomViewDestroy(Sender: TObject); begin - inherited; + frViewDatosYSeleccionComercial1.OnComercialChanged := Nil; + FFormasPago := Nil; FFormasPagoController := NIL; FVendedor := Nil; FVendedoresController := NIL; FViewClientePresupuesto := NIL; + + inherited; end; procedure TfrViewPresupuestoCliente.frViewClientePresupuestoButton1Click(Sender: TObject); @@ -182,6 +207,11 @@ begin frViewDatosYSeleccionClientePresupuesto1.actAnadirContacto.Execute; end; +function TfrViewPresupuestoCliente.GetController: IPresupuestosClienteController; +begin + Result := FController; +end; + function TfrViewPresupuestoCliente.GetPresupuesto: IBizPresupuestoCliente; begin Result := FPresupuesto; @@ -192,6 +222,19 @@ begin Result := FViewClientePresupuesto; end; +procedure TfrViewPresupuestoCliente.OnComercialChanged(Sender: TObject); +begin + if Assigned(FPresupuesto) then + begin + FController.CambiarComercial(FPresupuesto, frViewDatosYSeleccionComercial1.Comercial); + end; +end; + +procedure TfrViewPresupuestoCliente.SetController(const Value: IPresupuestosClienteController); +begin + FController := Value; +end; + procedure TfrViewPresupuestoCliente.SetPresupuesto(const Value: IBizPresupuestoCliente); begin FPresupuesto := Value; @@ -209,6 +252,8 @@ begin dsVendedor.DataTable.Active := True; FViewClientePresupuesto.Presupuesto := FPresupuesto; + + frViewDatosYSeleccionComercial1.OnComercialChanged := OnComercialChanged; end else begin DADataSource.DataTable := NIL; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm index 3a42c73..762e04b 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.dfm @@ -152,6 +152,24 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente Caption = 'Nombre comercial' DataBinding.FieldName = 'NOMBRE_COMERCIAL_CLIENTE' end + object cxGridViewAGENTE: TcxGridDBColumn + Caption = 'Comercial' + DataBinding.FieldName = 'NOMBRE_AGENTE' + PropertiesClassName = 'TcxTextEditProperties' + Properties.Alignment.Horz = taRightJustify + FooterAlignmentHorz = taRightJustify + GroupSummaryAlignment = taRightJustify + HeaderAlignmentHorz = taRightJustify + end + object cxGridViewDELEGACION: TcxGridDBColumn + Caption = 'Delegaci'#243'n' + DataBinding.FieldName = 'DELEGACION' + PropertiesClassName = 'TcxTextEditProperties' + Properties.Alignment.Horz = taRightJustify + FooterAlignmentHorz = taRightJustify + GroupSummaryAlignment = taRightJustify + HeaderAlignmentHorz = taRightJustify + end end inherited cxGridLevel: TcxGridLevel Caption = 'Todos' @@ -179,12 +197,16 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 250 + Width = 250 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 250 + Width = 250 end inherited edtFechaFinFiltro: TcxDateEdit Left = 515 @@ -193,6 +215,8 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 515 + ExplicitWidth = 250 + Width = 250 end inherited txtFiltroTodo2: TcxTextEdit Left = 515 @@ -201,6 +225,8 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 515 + ExplicitWidth = 250 + Width = 250 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -241,6 +267,21 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente object TBXItem4: TTBXItem Action = actProcedencia end + object TBXSeparatorItem4: TTBXSeparatorItem + end + object TBXItem5: TTBXItem + Action = actComercial + end + object TBXSeparatorItem5: TTBXSeparatorItem + end + object TBXItem6: TTBXItem + Action = actDelegacion + end + object TBXSeparatorItem6: TTBXSeparatorItem + end + object TBXItem7: TTBXItem + Action = actTienda + end end end end @@ -276,6 +317,21 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente OnExecute = actProcedenciaExecute OnUpdate = actProcedenciaUpdate end + object actDelegacion: TAction + Caption = 'Delegaci'#243'n' + OnExecute = actDelegacionExecute + OnUpdate = actDelegacionUpdate + end + object actComercial: TAction + Caption = 'Comercial' + OnExecute = actComercialExecute + OnUpdate = actComercialUpdate + end + object actTienda: TAction + Caption = 'Tienda' + OnExecute = actTiendaExecute + OnUpdate = actTiendaUpdate + end end inherited GridPNGImageList: TPngImageList PngImages = < diff --git a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas index 1c32d0a..eca712b 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uViewPresupuestosCliente.pas @@ -56,6 +56,17 @@ type TBXItem4: TTBXItem; actProcedencia: TAction; cxGridViewTIENDA: TcxGridDBColumn; + cxGridViewAGENTE: TcxGridDBColumn; + cxGridViewDELEGACION: TcxGridDBColumn; + actDelegacion: TAction; + actComercial: TAction; + TBXSeparatorItem4: TTBXSeparatorItem; + TBXItem5: TTBXItem; + TBXSeparatorItem5: TTBXSeparatorItem; + TBXItem6: TTBXItem; + actTienda: TAction; + TBXSeparatorItem6: TTBXSeparatorItem; + TBXItem7: TTBXItem; procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel); procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView; @@ -83,6 +94,12 @@ type procedure frViewFiltroBase1actQuitarFiltroExecute(Sender: TObject); procedure actProcedenciaExecute(Sender: TObject); procedure actProcedenciaUpdate(Sender: TObject); + procedure actDelegacionExecute(Sender: TObject); + procedure actDelegacionUpdate(Sender: TObject); + procedure actComercialExecute(Sender: TObject); + procedure actComercialUpdate(Sender: TObject); + procedure actTiendaExecute(Sender: TObject); + procedure actTiendaUpdate(Sender: TObject); private //Filtros relativos a la vista @@ -132,6 +149,46 @@ begin (Sender as TAction).Checked := not (cxGridViewNOMBRE.GroupIndex < 0); end; +procedure TfrViewPresupuestosCliente.actComercialExecute(Sender: TObject); +begin + if (cxGridViewAGENTE.GroupIndex < 0) then + begin + cxGridViewAGENTE.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewAGENTE.Visible := False; + end + else + begin + cxGridViewAGENTE.GroupIndex := -1; + cxGridViewAGENTE.Visible := True; + end; +end; + +procedure TfrViewPresupuestosCliente.actComercialUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewAGENTE.GroupIndex < 0); +end; + +procedure TfrViewPresupuestosCliente.actDelegacionExecute(Sender: TObject); +begin + if (cxGridViewDELEGACION.GroupIndex < 0) then + begin + cxGridViewDELEGACION.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewDELEGACION.Visible := False; + end + else + begin + cxGridViewDELEGACION.GroupIndex := -1; + cxGridViewDELEGACION.Visible := True; + end; +end; + +procedure TfrViewPresupuestosCliente.actDelegacionUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewDELEGACION.GroupIndex < 0); +end; + procedure TfrViewPresupuestosCliente.actProcedenciaExecute(Sender: TObject); begin if (cxGridViewPROCEDENCIA_CLIENTE.GroupIndex < 0) then @@ -176,6 +233,26 @@ begin } end; +procedure TfrViewPresupuestosCliente.actTiendaExecute(Sender: TObject); +begin + if (cxGridViewTIENDA.GroupIndex < 0) then + begin + cxGridViewTIENDA.GroupIndex := cxGridView.GroupedColumnCount; + cxGridViewTIENDA.Visible := False; + end + else + begin + cxGridViewTIENDA.GroupIndex := -1; + cxGridViewTIENDA.Visible := True; + end; +end; + +procedure TfrViewPresupuestosCliente.actTiendaUpdate(Sender: TObject); +begin + inherited; + (Sender as TAction).Checked := not (cxGridViewTIENDA.GroupIndex < 0); +end; + procedure TfrViewPresupuestosCliente.AnadirFiltroFechas; var Columna: TcxGridDBColumn; @@ -372,11 +449,37 @@ end; procedure TfrViewPresupuestosCliente.ConfigView; begin inherited; -//Solo para Graden - if ((AppFactuGES.EmpresaActiva.ID = 2) or (AppFactuGES.EmpresaActiva.ID = 3)) then - cxGridViewTIENDA.Visible := True - else +//FILTRO DE EMPRESAS + if (AppFactuGES.EmpresaActiva.ID = CTE_EMPRESA_ABETO) then + begin cxGridViewTIENDA.Visible := False; + cxGridViewTIENDA.VisibleForCustomization := False; + + cxGridViewAGENTE.Visible := True; + cxGridViewAGENTE.VisibleForCustomization := True; + + cxGridViewDELEGACION.Visible := True; + cxGridViewDELEGACION.VisibleForCustomization := True; + + actComercial.Visible := True; + actDelegacion.Visible := True; + actTienda.Visible := False; + end + else + begin + cxGridViewTIENDA.Visible := True; + cxGridViewTIENDA.VisibleForCustomization := True; + + cxGridViewAGENTE.Visible := False; + cxGridViewAGENTE.VisibleForCustomization := False; + + cxGridViewDELEGACION.Visible := False; + cxGridViewDELEGACION.VisibleForCustomization := False; + + actComercial.Visible := False; + actDelegacion.Visible := False; + actTienda.Visible := True; + end; end; function TfrViewPresupuestosCliente.GetPresupuestos: IBizPresupuestoCliente; diff --git a/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm b/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm index 6c77d4e..36e466d 100644 --- a/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm +++ b/Source/Modulos/Recibos de cliente/Views/uEditorElegirRecibosCliente.dfm @@ -23,6 +23,9 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente ExplicitWidth = 949 ExplicitHeight = 53 inherited tbxMain: TTBXToolbar + Left = 121 + DockPos = 121 + ExplicitLeft = 121 ExplicitWidth = 142 ExplicitHeight = 27 inherited TBXItem2: TTBXItem @@ -42,15 +45,25 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end end inherited tbxFiltro: TTBXToolbar - Left = 142 + Left = 10 Top = 26 - DockPos = 104 + DockPos = 10 DockRow = 1 - Visible = False - ExplicitLeft = 142 + ExplicitLeft = 10 ExplicitTop = 26 + ExplicitWidth = 105 + inherited TBXLabelItem1: TTBXLabelItem + Visible = False + end + inherited tbxEditFiltro: TTBXEditItem + Visible = False + end inherited TBXItem34: TTBXItem Action = actQuitarFiltro2 + Visible = False + end + inherited TBXItem37: TTBXItem + Visible = False end end inherited tbxMenu: TTBXToolbar @@ -163,6 +176,8 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 548 + Width = 548 end inherited edtFechaIniFiltro: TcxDateEdit Style.LookAndFeel.SkinName = '' @@ -178,6 +193,16 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 494 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 678 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 678 + ExplicitWidth = 250 + Width = 250 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 949 @@ -404,7 +429,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente end inherited EditorActionList: TActionList [9] Left = 112 - Top = 192 + Top = 160 inherited actPrevisualizar: TAction Visible = False end @@ -415,14 +440,14 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente inherited JvAppRegistryStorage: TJvAppRegistryStorage [10] end inherited dsDataTable: TDADataSource [11] - Left = 8 - Top = 192 + Left = 0 + Top = 160 end inherited JvFormStorage: TJvFormStorage [13] end inherited GridPopupMenu: TPopupMenu [14] Left = 80 - Top = 192 + Top = 160 end inherited JsPrevisualizarDialog: TJSDialog [15] Left = 288 @@ -435,7 +460,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente object EditorSeleccionActionList: TActionList Images = SmallImages Left = 152 - Top = 192 + Top = 168 object actBuscar2: TAction Category = 'Buscar' Caption = 'Buscar' diff --git a/Source/Modulos/Recibos de proveedor/Views/uEditorElegirRecibosProveedor.dfm b/Source/Modulos/Recibos de proveedor/Views/uEditorElegirRecibosProveedor.dfm index 690a023..1597f39 100644 --- a/Source/Modulos/Recibos de proveedor/Views/uEditorElegirRecibosProveedor.dfm +++ b/Source/Modulos/Recibos de proveedor/Views/uEditorElegirRecibosProveedor.dfm @@ -1,29 +1,35 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor Caption = 'Seleccionar recibos de cliente' - ClientWidth = 654 - ExplicitWidth = 662 + ClientHeight = 665 + ClientWidth = 932 + ExplicitWidth = 940 + ExplicitHeight = 703 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader Top = 64 - Width = 654 + Width = 932 Visible = False - ExplicitLeft = -8 + ExplicitTop = 64 ExplicitWidth = 654 inherited Image1: TImage - Left = 627 + Left = 905 ExplicitLeft = 629 end end inherited TBXDock: TTBXDock Top = 175 - Width = 654 - Height = 72 - ExplicitTop = 111 - ExplicitWidth = 654 - ExplicitHeight = 72 + Width = 932 + Height = 53 + ExplicitTop = 175 + ExplicitWidth = 932 + ExplicitHeight = 53 inherited tbxMain: TTBXToolbar - ExplicitWidth = 223 + Left = 114 + DockPos = 114 + ExplicitLeft = 114 + ExplicitWidth = 142 + ExplicitHeight = 27 inherited TBXItem2: TTBXItem Visible = False end @@ -41,37 +47,50 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor end end inherited tbxFiltro: TTBXToolbar - Left = 223 - Top = 23 - DockPos = 104 + Left = 3 + Top = 26 + DockPos = 3 DockRow = 1 - Visible = False - ExplicitLeft = 223 - ExplicitTop = 23 + ExplicitLeft = 3 + ExplicitTop = 26 + ExplicitWidth = 105 + inherited TBXLabelItem1: TTBXLabelItem + Visible = False + end + inherited tbxEditFiltro: TTBXEditItem + Visible = False + end inherited TBXItem34: TTBXItem Action = actQuitarFiltro2 + Visible = False + end + inherited TBXItem37: TTBXItem + Visible = False end end inherited tbxMenu: TTBXToolbar - ExplicitWidth = 654 + ExplicitWidth = 932 end inherited TBXTMain2: TTBXToolbar - Left = 334 + Left = 262 + Top = 26 + DockPos = 262 + DockRow = 1 Visible = False - ExplicitLeft = 334 - ExplicitHeight = 23 + ExplicitLeft = 262 + ExplicitTop = 26 end end inherited StatusBar: TJvStatusBar - Top = 609 - Width = 654 + Top = 610 + Width = 932 ExplicitTop = 609 ExplicitWidth = 654 end inline frViewBarraSeleccion1: TfrViewBarraSeleccion [3] Left = 0 - Top = 628 - Width = 654 + Top = 629 + Width = 932 Height = 36 Align = alBottom Font.Charset = DEFAULT_CHARSET @@ -86,20 +105,20 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor ExplicitWidth = 654 ExplicitHeight = 36 inherited JvFooter1: TJvFooter - Width = 654 + Width = 932 Height = 36 ExplicitWidth = 654 ExplicitHeight = 36 inherited bSeleccionar: TJvFooterBtn - Left = 442 + Left = 720 Top = 3 ExplicitLeft = 444 ExplicitTop = 3 end inherited bCancelar: TJvFooterBtn - Left = 546 + Left = 824 Top = 4 - ExplicitLeft = 546 + ExplicitLeft = 824 ExplicitTop = 4 end end @@ -114,18 +133,18 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor end end inherited frViewRecibosProveedor1: TfrViewRecibosProveedor [4] - Top = 247 - Width = 654 - Height = 362 - ExplicitTop = 183 + Top = 228 + Width = 932 + Height = 382 + ExplicitTop = 254 ExplicitWidth = 654 - ExplicitHeight = 426 + ExplicitHeight = 355 inherited cxGrid: TcxGrid - Width = 654 - Height = 234 + Width = 932 + Height = 254 RootLevelOptions.DetailTabsPosition = dtpNone ExplicitWidth = 654 - ExplicitHeight = 298 + ExplicitHeight = 227 inherited cxGridView: TcxGridDBTableView DataController.Summary.DefaultGroupSummaryItems = < item @@ -147,47 +166,69 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor end end inherited frViewFiltroBase1: TfrViewFiltroBase - Width = 654 + Width = 932 ExplicitWidth = 654 inherited TBXDockablePanel1: TTBXDockablePanel ExplicitWidth = 654 inherited dxLayoutControl1: TdxLayoutControl - Width = 654 + Width = 932 ExplicitWidth = 654 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 273 Width = 273 end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 121 Width = 121 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 252 - ExplicitLeft = 252 + Left = 352 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 352 ExplicitWidth = 343 Width = 343 end + inherited txtFiltroTodo2: TcxTextEdit + Left = 546 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 546 + ExplicitWidth = 250 + Width = 250 + end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel - Width = 654 + Width = 932 ExplicitWidth = 654 inherited tbxBotones: TTBXToolbar - Width = 644 + Width = 922 ExplicitWidth = 644 end end end end inherited pnlAgrupaciones: TTBXDockablePanel - Top = 336 - ExplicitTop = 400 + Top = 356 + ExplicitTop = 329 ExplicitWidth = 654 inherited TBXAlignmentPanel1: TTBXAlignmentPanel - Width = 654 + Width = 932 ExplicitWidth = 654 inherited TBXToolbar1: TTBXToolbar - Width = 644 + Width = 922 ExplicitWidth = 644 end end @@ -221,7 +262,7 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor ShowCaptionWhenDocked = False SupportedDocks = [dkStandardDock, dkMultiDock] TabOrder = 5 - ExplicitTop = 0 + ExplicitWidth = 654 object Label1: TLabel Left = 329 Top = 50 @@ -348,7 +389,7 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor object pnlHeader: TPanel [6] Left = 0 Top = 0 - Width = 654 + Width = 932 Height = 64 Align = alTop BevelOuter = bvNone @@ -359,13 +400,12 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor Padding.Bottom = 8 ParentBackground = False TabOrder = 6 - ExplicitLeft = 8 - ExplicitTop = -29 + ExplicitWidth = 654 object lblTitle: TLabel AlignWithMargins = True Left = 25 Top = 8 - Width = 604 + Width = 882 Height = 13 Margins.Left = 0 Margins.Top = 0 @@ -385,7 +425,7 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor AlignWithMargins = True Left = 50 Top = 29 - Width = 579 + Width = 857 Height = 27 Margins.Left = 25 Margins.Top = 0 @@ -397,24 +437,24 @@ inherited fEditorElegirRecibosProveedor: TfEditorElegirRecibosProveedor end inherited EditorActionList: TActionList [9] Left = 112 - Top = 192 + Top = 160 end inherited JvAppRegistryStorage: TJvAppRegistryStorage [10] end inherited dsDataTable: TDADataSource [11] - Left = 8 - Top = 192 + Left = 0 + Top = 152 end inherited JvFormStorage: TJvFormStorage [13] end - inherited GridPopupMenu: TPopupMenu + inherited GridPopupMenu: TPopupMenu [14] Left = 80 - Top = 192 + Top = 160 end object EditorSeleccionActionList: TActionList Images = SmallImages - Left = 152 - Top = 192 + Left = 144 + Top = 160 object actBuscar2: TAction Category = 'Buscar' Caption = 'Buscar' diff --git a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas index ab4d5d6..6137966 100644 --- a/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas +++ b/Source/Modulos/Relaciones/Contratos de cliente - Facturas de cliente/uGenerarFacturasCliUtils.pas @@ -46,6 +46,11 @@ begin // La factura tiene que venir ya abierto y posicionado donde hay que copiar AFactura.ID_CLIENTE := AContrato.ID_CLIENTE; + + AFactura.ID_AGENTE := AContrato.ID_AGENTE; + AFactura.NOMBRE_AGENTE := AContrato.NOMBRE_AGENTE; + AFactura.DELEGACION := AContrato.DELEGACION; + // Lo dejamos listo para que se localize la subcuenta contable asociada al cliente AFacturasClienteController.RecuperarCliente(AFactura); AFactura.Cliente.Open; diff --git a/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.dpk b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.dpk new file mode 100644 index 0000000..e923ca4 Binary files /dev/null and b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.dpk differ diff --git a/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.dproj b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.dproj new file mode 100644 index 0000000..63210a4 --- /dev/null +++ b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.dproj @@ -0,0 +1,578 @@ + + + + {69494a8c-0a35-41ea-b8ec-ea790bfc0662} + FacCli_FacProv_relation.dpk + Debug + AnyCPU + DCC32 + ..\..\..\..\Output\Debug\Cliente\FacCli_FacProv_relation.bpl + + + 7.0 + False + False + 0 + .\ + .\ + .\ + ..\..\..\..\Output\Debug\Cliente + ..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + RELEASE + + + 7.0 + .\ + .\ + .\ + ..\..\..\..\Output\Debug\Cliente + ..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + ..\..\..\Lib;..\..\Lib + + + Delphi.Personality + Package + +FalseTrueFalseFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + Borland Sample Components + Delphi 1.0 Compatibility Components + Borland MyBase DataAccess Components + TeeChart Components + Borland SimpleDataset Component (DBX) + ExpressBars extended items by Developer Express Inc. + ExpressBars by Developer Express Inc. + ExpressScheduler 2 by Developer Express Inc. + ExpressVerticalGrid by Developer Express Inc. + ExpressBars DBNavigator by Developer Express Inc. + ExpressBars extended DB items by Developer Express Inc. + ExpressSideBar by Developer Express Inc. + JVCL Band Objects + JVCL Non-Visual Components + JVCL Encryption and Compression Components + JVCL Dialog Components + JVCL Docking Components + JVCL DotNet Controls + JVCL EDI Components Designtime Package + JVCL HMI Controls design time unit + JVCL Interpreter Components + JVCL Jans Components + JVCL Managed Threads + JVCL Multimedia and Image Components + JVCL Network Components + JVCL Page Style Components + JVCL Plugin Components + JVCL Print Preview Components + JVCL Runtime Design Components + JVCL Time Framework + JVCL Unified Interbase Components + JVCL Validators and Error Provider Components + SMImport suite: data importing into dataset. Scalabium/Mike Shkolnik, 2000-2005 + SMExport suite: data export from dataset. Written by Mike Shkolnik/Scalabium, 1998-2004. + Intraweb 8.0 Design Package for Borland Development Studio 2006 + Internet Explorer Components + FacCli_FacProv_relation.dpk + + + + + MainSource + + + + + + +
dmGenerarFacturasProv
+
+
+
+ diff --git a/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.rc b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.rc new file mode 100644 index 0000000..153736a --- /dev/null +++ b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3FL +FILEFLAGS 0x00L +FILEOS 0x40004L +FILETYPE 0x1L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0A04E4" + BEGIN + VALUE "FileVersion", "1.0.0.0\0" + VALUE "ProductVersion", "1.0.0.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0C0A, 1252 + END +END diff --git a/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.res b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.res new file mode 100644 index 0000000..8b251f3 Binary files /dev/null and b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/FacCli_FacProv_relation.res differ diff --git a/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/uGenerarFacturasProvFacCliUtils.dfm b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/uGenerarFacturasProvFacCliUtils.dfm new file mode 100644 index 0000000..4b7c0e2 --- /dev/null +++ b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/uGenerarFacturasProvFacCliUtils.dfm @@ -0,0 +1,306 @@ +object dmGenerarFacturasProv: TdmGenerarFacturasProv + OldCreateOrder = False + Height = 176 + Width = 254 + object JsListaFacturasGeneradas: TJSDialog + DialogOptions = [doCommandLinks, doModal] + Glyph.Data = { + 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 + 00001C0806000000720DDF940000000970485973000017120000171201679FD2 + 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14 + 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD + 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2 + 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD + B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010 + 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3 + 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045 + A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8 + 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281 + 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87 + A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F + 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B + EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F + 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8 + 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10 + 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8 + CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF + 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32 + F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF + 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165 + 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF + 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2 + ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312 + FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 + 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA + 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} + Instruction.Text = 'Se han generado las facturas...' + Instruction.Glyph.Data = { + 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001C00 + 00001C0806000000720DDF940000000970485973000017120000171201679FD2 + 520000000467414D410000B18E7CFB5193000003104944415478DAAD96FB4B14 + 5114C7CFE463DC1E606444BFF54424D3DC55CA52B1CCD7165A219905054182FD + 1452FD5810FD100406610A669A998FC4F5BDB6266265DAB60F5DD15E58FE03B2 + 3F99D29ABBA7B9779C71C61D9D6177CFCE70CFDCB97B3EF7DCF3BD33C38082FD + B502B2B300CC656020048688A24F036233A0671F40D43160BA87BF62AEEE1010 + 60D7AE293AD8B835815E9B625C80DC8F1E88D4A7C1E8C1FB8F9FD6C3C44035B3 + 21500A65F6D700FE2EA580A5EC551F4A50359316B31D76EFDC0EE5F72A645045 + A067AE0623074B8140891108F1057064CC0D556053DF173812B707E6DCF332A8 + 225080D201DB4AF99BF335B4D502F371415BCC364833C4C29F458F0C2A031281 + 081734AB0B3C88403C1E6E3E2E7960F6A8FFD27A7D3EF07A11DA2C76C84A8D87 + A57FCB32E8B8A54A4C8C21B59365C9015996EF2240B6634DF435B51460A46D1F + 70C093AA46BF09C980C12CA914E6F371ADD707EF1DB3B0B0B8006EB79B8EA96B + EA5106121851245129118FD8BFA2DC5C53C6BAF5EBBBBA97C2D64EC064195B1F + 286C76E956A0EA5C51AEB4764A9929F5750D5A9581D2274B9B651C0BA2F514A8 + 6F28E36B70AD9A4253EF97A9AA55B0CEBA87D03B645B3F43C1DE589C58186D10 + 81150FCAC57B11E161B04517099BB953C78643141B01BA28EEE4DAB0B04DE2B8 + CA460B9C399902E661BB3AB0F5AD038BF30CD4D7E7DD14815A61023027DD00EF + 469C1A80FD1C307F1578FD4A81E665945AD68924181A9D5007B6F4DBF1527E32 + F5C9D3632351F8F549AEE916B14EAA039BCD362C31A6040D23E7887D4A03B0CF + 86C5C6641A24BB7646D3F2D51A77F8C1BCDCFFC79CD3EAC0D7BD56AE86294165 + 4660CB5C6B737DD3062CCA31D00069E76E05241862CF1EDD05E7D40F756063CF + 673C7F5A4F679A59541EF03E4C8C3B0893DF67D481AFBAC7B0F05412CD30EBE2 + ED80F7617CEC0198FEF94B1BF06C6622AD4B4EC99D80F7A1666043D7281A3312 + FD84C20B8417C3AA789405239826E0CBCE4F98979E10344C33B0BE630473D312 + 82866906D6993E62F6F1C3F45D160A5305BE68FF8095CF5B4302134CFE1185EA + 1FB8A1B4FF4FE32FF6FADB8B5E0000000049454E44AE426082} + Instruction.Icon = tdiCustom + ButtonBar.Buttons = [cbOK] + ButtonBar.Cancel = cbOK + ButtonBar.UseCancel = False + MainIcon = tdiCustom + Title = 'FactuGES' + Position = dpMainFormCenter + Icon.Data = { + 0000010003002020100001000400E8020000360000002020000001000800A808 + 00001E0300002020000001002000A8100000C60B000028000000200000004000 + 0000010004000000000000020000000000000000000000000000000000000000 + 000000008000008000000080800080000000800080008080000080808000C0C0 + C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 + 0000000000000000000000000000000008777777777777777777777700000000 + 0877767777677776777767760000000008F88888888888888888888700000000 + 08F8FF8F8F888888888888860000000008FF8F8F88F8F8888888888C00000000 + 08F88888F8888888888888860000000008F8688878E8888E88E8788700000000 + 08F8688888F8F8FFFFFF88760000000008FF4888888F8FFFFFFF788700000000 + 08F8676767677677677658E50000000008FF8888888887878787888700000000 + 08FF8887887E8888888888860000000008FFE8E8E788C8E8FF8F8F8600000000 + 08FFF8F8F8F8FF8F88F8F8870000000008FFFFFF8FF8F8F8F88F888600000000 + 0FF8477878787878788788860000000008FF68888888F8FF8F8F788700000000 + 08B7588888FF8FFFFFFF78860000083008BB47887776777777776F86000000B7 + 8B9B73BB88788787E87878870000008BB8B9BB78888888EFF8F8FF8600000087 + B8BB8B888E8E8E88FFF8F886000000088BBB888FFFFFFFFFF8F877770000B9BB + B8FFBB9B9BFFFFFFF87466460000BBB9BB8FBBBBB8FFFFFFF88F888700000008 + B8BB88888FFFFFFFF88F8F7700000008BBBBBB8FFFFFFFFFFF8887700000007B + B7B98BB8FFFFFFFFF8887700000000B78B9B87B888F88F88F8877000000007B0 + 08BB883B78888788787700000000000000B9000000000000000000000000FFFF + FFFFF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000F9800000FC000000FC000000FC000000FE000000F0000 + 000F0000000FE000000FE000001FC000003FC000007F980000FFFCFFFFFF2800 + 0000200000004000000001000800000000000004000000000000000000000001 + 00000001000000000000694731007C5D49007E604C0081635000826451008567 + 540085685500886B5900896D5B008A6E5D008B705F008E715F008B7260008C72 + 61008E74640084766C00957A6900977D6D00887B72009A8171009D8272009C84 + 76009D8778009F897B00A28A7900A08B7D00A18C7E00E1B06E00E1B67D003E7A + 970073A0A5007AA2B70074AFBD007BB2BB003CAACE0028A5DB0020ADDF000D9A + E500209EE3000DA6E2001AA4EF0000A6FF000CABFE0009ACFE0010A4F10015AC + FA0000B5FB0000B0FD000CB6FC0000BFF90000BAFD0004BAFD0009BBFB0013B6 + F40015BFFA001CBDFB0026B7FD00589EC50040A4CD0040ABCC0050A2C7005DAE + C00060A3C20062A4C60060B7CB006AB0CD007BB6C80077BAC80061BADD0044AD + E50000C3F80007C6FB0000CAF80000CFFB0000D4F90026C8FA0026CDF8002BCC + F90039C4FB0039C2FC0039CAFA003FCFFB0024D6F80030D2F80039D5F80000F8 + F8001FF8F8002CF6F8003EF4F8005AC6DC0070CDDF0052C0E40054C9E3004DCE + FA005FC7FF004FD2FB004DD9F8005FD9FB006ED3E70063CDFE0060D1FB0060D8 + F90060DDF80046F8F90056F0F8005FFAFA0073E3F80073E4F90073EEF80060F1 + F800958A84009A918C0081999500A68F8200AD968500A3968C00AE988900AD9A + 8D00B19A8B00AF9C9000B09E9200B59F9200B7A29300B2A19600B5A19400B7A4 + 9700BDA79700B4A39800B1A59D00B4A79F00BAA69800BCA79900B4A89F00BCA8 + 9900BAA89C00BDAA9D00BEAC9E0083ADBD00B5A9A100BDABA000BEADA100BFAF + A500A0BABE00C0AB9E00C1AC9E00C6AE9F00E2B98100E4BA8300E4BB8400E5BC + 8500E1BD8E00E3BF9000C0ADA000C2B0A300C2B1A500C4B2A600C1B2A800C3B5 + AB00C8B4A800CCB9AD00CEBCB100D0BEB200D1BFB400E4C19300E5C29400E6C4 + 9600E8C69900D0C9A300CFC1B800D2C1B600D3C3B800D5C4B900D6C6BC00D8C6 + BC00D6C8BE00DAC9BF00ECD3B000EDD4B200EFD6B500E7D1B800E7D3BD00F0D8 + B6008CB7C40080BEC70097C3C70099C3C900ABD7CF00AFD9DD0086E3F90086E7 + F90086ECF8009EE5FB0090E8F900ACEDFC00BCEAFD00BCF1FB00BFF1FD00D7C9 + C000D9CAC100DCCBC200DACCC200DDCCC300DACCC400DDCEC400DED0C600DED1 + C900DED3CC00DFD4CD00E1D1C900E2D5CD00F0DCC200E3D8D200E5D9D200E2DA + D500E6DBD400E5DCD500E8DDD600E6DDD800E9DFD900E6E0DB00EAE0DA00EAE2 + DD00ECE3DE00EBE4DE00ECE4DE00F3E7D900C6E1EF00C9EFFD00D7F6FD00DFF3 + FF00DFFEFE00EBE7E300EDE6E100EFE7E400EEE8E400F0EAE600F2EDE900F2EE + EC00F4EFEC00F5F0EE00F9F4ED00E7FAFD00EBF8FF00F6F2F000F7F4F100F8F4 + F200F9F7F500FAF8F600FBF9F900FCFBFA00FCFCFB00FEFEFE00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000007D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D + 0D0D0000000000000000009C9C19191919191919191919191919191919191919 + 1903000000000000000000ABDECBCBC7C7AFABABABABAAA3A2A2A0A0A0A0A0A0 + 8607000000000000000000ABECEAE9DEDEDEDED7D5D2D2D2CBCBCBCBB0CBB0CB + 9007000000000000000000ABEDECEAE9DEDEDBD7D7D5D2D2D2CDCDCBB0B0B0B0 + 9007000000000000000000AFEDE9A9CFD2CFD2CDCBCBCBB0B0ABACA3A3A3A3B0 + 9007000000000000000000AFF0D5017783838386868686869099909999907BB0 + 9007000000000000000000B0F4D501A0B0CBD2D5DEECEDF7FAFAFAFAFAF77BAA + 9007000000000000000000CBF4DC01A0B0B0B0D2D5DBEAEDF7FAFAFAFAF47BB0 + 9007000000000000000000CBF8DC010404070604090909090D0D110D110D02A3 + 9007000000000000000000CBFAED9E9E9E9C999E8C8C8C868683837E7D7D7ACB + 9007000000000000000000CBFAF1A7A7A6A6A6A69898989898B5DBDBD5D5D2D2 + 9907000000000000000000CDFAF796969696961D961D931D1DB4DEDBD7D5D5D2 + 9C07000000000000000000CFFAFAFAFAF8F7F0F0EDEDEDECE9E9DEDEDED7D5D5 + 9907000000000000000000CDFAFAEAF0EDEDECEAEAE9DEDEDBDCD5D5D5D5D2D5 + 9C07000000000000000000D2FAEC01737D7D7B7D7D7B7D7B7D7B7B7B7D7B7DD2 + 9907000000000000000000CFFAEC019EABB0CBD2D5DCDEECEDF4F4F4F4EA7BD2 + 9C07000000000000000000B9524601A0B0B0CBB5D5DEEAEDF7FAFAFAFAF47DD5 + 9C070000000000213F0000B83226010C3F5C1F111214141616191B1B1B1807D2 + 9C07000000000000253D8A5B322D711E2860BA7E7E7A7E797A797979767676D5 + 9E0700000000000041375E662F2B65314EBBB6B6B6B6B4B4B1E2F4EDEDEDECEA + 9C070000000000008F5D66663232394EC1A81C1C1C1C1C1C1CD3F7F4EDDED7D5 + 9C0700000000000000B7BE6E5758BEBDE4E6E6F3FAFAFAFAFAFAF7F4D5928675 + 7304000000002A2A2A2A4A6AFAE7562F2A2A2A5FFAFAFAFAFAFAF8D577010101 + 0101000000004747472F4A59C5E7564A32474766FAFAFAFAFAFAFADCA0D2CFB0 + A20C00000000000000436C6958686D6BC2C5C5E7FAFAFAFAFAFAFADEAADEDBCB + 1470000000000000004551534A4A5250C0E7FAFAFAFAFAFAFAFAFADEAAD7B514 + 700000000000000042384C54472B613550C3FAFAFAFAFAFAFAFAFADEA1B0196F + 000000000000000024234463322EBC5A3664E3ECE9E9E9E9E9E9E9CF90731300 + 000000000000003A3C00002232298B8B3E3B207E8B7E8B7E827E817E74100000 + 0000000000000000000000003227000000000000000000000000000000000000 + 000000000000FFFFFFFFF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000FF800000FF800000FF800000FF800 + 000FF800000FF800000FF800000FF800000F9800000FC000000FC000000FC000 + 000FE000000F0000000F0000000FE000000FE000001FC000003FC000007F9800 + 00FFFCFFFFFF2800000020000000400000000100200000000000801000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000007067 + 5F70AA9382E570513CE3735540E3735540E3735540E3735540E3735540E37355 + 40E3735540E3735540E3735540E3735540E3735540E3735540E3735540E37355 + 40E3735540E3735540E3735540E3735540E3735540E3735540E372533EE5BAAB + A070000000000000000000000000000000000000000000000000000000005E54 + 4C7FCAB7ABFFC5B5AAFFA18877FFA28A78FFA28A79FFA28A79FFA28A79FFA28A + 79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A + 79FFA28A79FFA28A79FFA28A79FFA28A79FFA28A79FFA58D7CFF7A5B46FFB2A1 + 967F000000000000000000000000000000000000000000000000000000006055 + 4D7ED7C6BBFFEDE4E0FFD9CCC4FFD9CCC4FFD9CBC3FFD8CAC1FFD7C9BFFFD6C7 + BDFFD5C6BBFFD4C4BAFFD3C3B8FFD2C1B7FFD1C0B5FFD0BEB3FFCFBDB2FFCEBC + B0FFCEBBAFFFCEBBAFFFCEBBAFFFCEBBAFFFCEBCB0FFBEAA9CFF82644FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006056 + 4D7ED7C8BCFFF2EBE8FFEFE9E5FFEEE7E2FFECE5E0FFEBE2DEFFEAE0DBFFE9DE + D8FFE7DBD4FFE5D9D1FFE3D7CFFFE2D4CCFFE1D2C9FFDFD0C7FFDDCDC4FFDCCB + C2FFDBC9BFFFDBC9BFFFDBC9BFFFDBC9BFFFDCCAC1FFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006155 + 4E7ED8C9BDFFF3EDE9FFF1EAE6FFF0E9E6FFEEE6E1FFECE4DFFFEBE2DDFFEAE0 + DAFFE9DED7FFE7DBD4FFE5D9D1FFE3D7CFFFE2D4CCFFE1D2C9FFDFD0C7FFDDCD + C4FFDCCBC2FFDBC9BFFFDBC9BFFFDBC9BFFFDCCAC0FFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006157 + 4E7ED9C9BFFFF4EFEDFFEFE8E3FFD0C2B9FFDFD5CEFFE0D5CEFFE0D4CCFFDED3 + CBFFDDD1C8FFDCCFC6FFDACCC4FFD9CBC1FFD8C9BFFFD7C7BDFFD6C5BBFFD5C4 + B9FFD3C2B7FFD2C0B5FFD2BFB4FFD2BFB4FFDAC8BEFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDACCC0FFF5F2EFFFE5DDD9FF5C3821FFB0998AFFB8A394FFB8A394FFB9A3 + 94FFB8A495FFB9A597FFB9A698FFBAA698FFBBA799FFBBA89AFFBBA89BFFBCA8 + 9BFFBCA89BFFBCA89BFFBBA89AFFB49E8FFFD8C6BBFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDBCBC1FFF8F4F3FFE7E0DBFF5F3C24FFD0BDB2FFDCCBC1FFDDCCC3FFE2D2 + CBFFE7DBD4FFEDE2DEFFF0E8E6FFF5F0EDFFF9F7F4FFFDFDFDFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFAF8F7FFB39D8DFFD8C6BBFFC1AC9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006256 + 4F7EDCCEC3FFFAF6F5FFE9E2DDFF5F3C24FFD2BFB5FFDFCDC4FFDECCC3FFE0CE + C6FFE4D4CDFFE9DDD6FFEFE4E0FFF1EAE8FFF7F1EFFFFBF8F6FFFFFEFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFCFBFAFFB5A090FFD9C7BEFFC1AD9FFF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006257 + 4F7EDDCFC4FFFCF9F9FFE9E4E0FF5F3A23FF7C5D49FF7F5F4CFF7E5F4CFF7E60 + 4DFF7F614DFF816350FF826552FF836654FF846856FF856A57FF866B59FF876C + 5BFF876D5BFF876D5BFF866B59FF72523DFFD5C3B9FFC1AFA1FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006357 + 507EDECFC6FFFCFCFBFFF4F1F0FFC3B6AEFFC3B5ADFFC1B4ACFFC0B3AAFFBFB1 + A9FFBEB0A6FFBDAEA5FFBDACA3FFBCABA2FFBBAAA0FFBAA99FFFB8A69AFFB8A4 + 98FFB6A396FFB5A194FFB49F93FFB39D90FFDCCDC4FFC2AEA1FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006357 + 507EDFD2C7FFFEFEFDFFF9F5EFFFE8C696FFE9C799FFE8C697FFE7C596FFE7C4 + 95FFE6C394FFE5C293FFE4C091FFE4C090FFE3BF8FFFE2BD8CFFE9D5BFFFEBE1 + DCFFEADFD8FFE7DCD5FFE5DAD3FFE4D8D0FFE3D4CCFFC2AFA2FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006458 + 517EE0D3C8FFFFFFFFFFFAF5EFFFE3B77CFFE4B97FFFE2B87EFFE3B77DFFE2B7 + 7CFFE2B67BFFE1B57AFFE1B479FFE0B478FFE0B377FFDFB174FFE6D0B7FFEBE1 + DCFFE8DFD9FFE8DDD6FFE6D9D2FFE3D8D1FFE4D7CFFFC3AFA2FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006458 + 517EE1D2C9FFFFFFFFFFFEFEFDFFFEFFFFFFFCFDFEFFFBFBFBFFF9F7F8FFF8F5 + F6FFF7F3F2FFF5F1F0FFF4EFEEFFF1EDEBFFF0EBE9FFEEE9E6FFEDE6E2FFECE3 + DEFFEBE1DBFFE9DFD9FFE8DDD6FFE6DAD3FFE5D9D2FFC3B0A3FF81634FFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006459 + 517EE1D4CAFFFFFFFFFFFDFDFCFFEEEBE8FFF5F2F0FFF4F0EFFFF3EFECFFF2ED + EAFFF1EBE8FFEEE9E5FFEFE7E3FFECE5E1FFEAE4DEFFEAE1DCFFE8E0DAFFE7DE + D8FFE6DDD6FFE5DBD4FFE4D8D1FFE2D6CEFFE6DBD4FFC3B1A4FF81634EFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006559 + 527EE2D4CAFFFFFFFFFFF0ECEAFF5B361EFFAB9383FFB39D8EFFB39D8DFFB39D + 8DFFB29D8DFFB29C8DFFB29C8CFFB29C8CFFB29C8CFFB29C8CFFB29C8CFFB29C + 8CFFB29C8CFFB29C8CFFB29C8DFFB39D8EFFE3D8D0FFC4B1A4FF81634EFFB2A1 + 967E000000000000000000000000000000000000000000000000000000006559 + 527EE5D4CAFFFFFFFFFFF7F0EBFF5F3B24FFCCB8ADFFD7C5BAFFD9C7BDFFDCCC + C3FFE1D4CCFFE5DAD4FFE8E0DBFFEDE5E1FFF1EBE9FFF5F2EFFFF7F5F3FFF8F6 + F4FFF8F5F4FFF8F6F4FFF1EEEAFFB29C8DFFE6DAD3FFC4B2A5FF81634EFFB2A1 + 967E00000000000000000000000000000000000000000000000000000000685A + 527E9AC6C9FF35CFFEFF3DAEEBFF663E24FFD2BFB4FFE0CBBFFFE0C9BDFFE1CD + C4FFE4D5CDFFE9DED7FFEEE5E0FFF2EBE8FFF6F2F0FFFCF8F8FFFFFFFEFFFFFF + FFFFFFFFFFFFFFFFFFFFFCFAF9FFB49E8FFFE7DED7FFC5B3A6FF81634EFFB2A1 + 967E00000000000000000000000000000000007792910072A7A3001E33366957 + 4C7C86C1C8FF00BFFBFF079AEBFF6A3E23FF926D57FF5FA3C8FF4AC1E8FF6C9C + A2FF917260FF927767FF947A69FF957C6CFF977E6FFF998171FF9A8374FF9B85 + 76FF9C8678FF9C8678FF998274FF7D5E49FFE3D9D4FFC5B3A7FF81634EFFB2A1 + 967E00000000000000000000000000000000005A6F7000A9E5E40075AEAE5C90 + A5BD75D0E0FF00BFFAFF0CA3F4FF8A9A91FF3C7492FF03A4E4FF4AD5FFFF98C4 + CBFFB3A196FFB1A197FFB0A096FFB09F95FFAF9D92FFAF9C91FFAD9A8EFFAC99 + 8CFFAB988AFFAB9789FFAA9688FFA99386FFE8E0DAFFC5B4A7FF81634EFFB2A1 + 967E00000000000000000000000000000000000000002DA5BFC110C2FFFF4DD0 + FDFF64DBF9FF00B3FAFF09A8FEFF68D7FFFF04B5FFFF24CCFBFFAFD8CEFFF7DA + B8FFF3DBBBFFF3DBBAFFF2D9B9FFF1D8B7FFF0D7B4FFEED5B2FFF6EADDFFF9F6 + F4FFF7F3F1FFF5F1EEFFF5EFECFFF4EDEAFFF1EBE7FFC6B4A8FF81634EFFB2A1 + 967E00000000000000000000000000000000000000005F8A909142C7E4E960DE + F8FF64D7FAFF00B6FDFF00B8FDFF21B2FDFF1ECCF7FF93EBFCFFD2C69BFFE1AB + 63FFDFAC66FFDFAC66FFDFAC66FFDFAC66FFDFAC66FFDEA961FFEFDBC0FFF8F6 + F5FFF6F2F0FFF3EDEBFFECE2DCFFE9DFD9FFE5DBD6FFC2B1A4FF81634FFFB2A1 + 967E000000000000000000000000000E171A000E171A00040B145994A4A990EB + FCFF61F1F7FF13FAF7FF23F9F7FF93EDF7FF8CE5F8FFD5F2FDFFE9F8FFFFE7F8 + FFFFF0FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFDFEFFFFFAFAF9FFF9F7 + F5FFF7F2F0FFE8DFD8FFC7AE9FFFBEA998FFAF9888FFB09A8AFF7F604DFFB2A1 + 967E00000000000000000000000000AAFFFF00AAFFFF00AAFFFF00A4FFFF00CD + FAFF5DFCF9FFFFFFFFFFEEFEFEFF00FBF7FF00AAFEFF00A1FFFF00A1FFFF00A0 + FFFF56C3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCFDFBFFFCFBFAFFFBFA + F8FFE6DDD6FFAA9180FF5D3922FF603D26FF613E27FF613E28FF634029FFB4A3 + 987E00000000000000000000000000CAFFFF00CAFFFF00CBFFFF00B0FFFF00CD + FBFF38F5F7FFC3EFFAFFF0FFFEFF00FAF7FF00C8F7FF00C2F7FF00C2F7FF00C1 + F7FF57D7FAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFFDFDFCFFFCFC + FBFFE7DED8FFCCB9ACFFE6DBD5FFE2D7D0FFDCCFC5FFD7C5BBFF8E705DFFB4A2 + 9680000000000000000000000000002E383C002E383C00252F364C99B0B57DE8 + FBFF59F1F7FF25F7F7FF41FAF8FF7CEEF7FF77E4F7FFB5EFFCFFC6F2FDFFC3F2 + FDFFD9F6FCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFEFEFFFEFE + FEFFE9E1DAFFCEBCAFFFF1E9E3FFEADFD8FFE4D5CCFF9D816FFF3A291F868985 + 831C00000000000000000000000000000000000000004E7073774AB0DADC37C9 + FBFF22D5F7FF00D3F9FF02C3FBFF37D5F7FF34BEFCFFA2E6FAFFECFBFDFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFF + FFFFEAE2DCFFCDBBADFFEADFD8FFE3D5CBFF9F8271FF3E2D2386050100200000 + 000000000000000000000000000000000000000000003E9CC4C219C0FFFF23C9 + FCFF30D3F8FF00BEF8FF06A8FEFF4FDCF8FF00B8FCFF32C2FBFFC0EBFCFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFEAE3DEFFCDB9ABFFDDCEC4FFA58979FF3E2C1F8F0905041B000000000000 + 000000000000000000000000000000000000003451510099DDDB0091C0C35DAD + BCCF76D7E9FF00BEF9FF10A9FBFFBDDEDEFF5AC8DDFF0AB5F7FF62CEFFFFCBE4 + F1FFF1E7E0FFEFE7E1FFEEE6E1FFEEE6E1FFEEE6E0FFEDE6E0FFEDE5E0FFEEE6 + E1FFE1D4CCFFC5AE9FFFA68D7FF53E2718A10402000E00000000000000000000 + 0000000000000000000000000000000000000075B7AF0099C7C500323E425442 + 3B5C6BA8B1DA00C1FCFF0EA1F3F8A98E80C0AB9081C12698B1C10088C4C14C85 + A3C1A18D80C19E8D81C19E8B81C19D8C80C19B8C7FC19B8A7FC19C897FC19A89 + 7EC19B8B7EC1897769C2432B1BAC000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000045565A00C5FFFF0094E6E2000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000FFFFFFFFF0000007F0000007F0000007F000 + 0007F0000007F0000007F0000007F0000007F0000007F0000007F0000007F000 + 0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000 + 0007C0000007C000000700000007000000070000000700000007C000000FC000 + 001F8000003F800000FFF8FFFFFF} + Width = 450 + Left = 72 + Top = 16 + end +end diff --git a/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/uGenerarFacturasProvFacCliUtils.pas b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/uGenerarFacturasProvFacCliUtils.pas new file mode 100644 index 0000000..8802bf2 --- /dev/null +++ b/Source/Modulos/Relaciones/Facturas de cliente - Facturas de Proveedor/uGenerarFacturasProvFacCliUtils.pas @@ -0,0 +1,170 @@ +unit uGenerarFacturasProvFacCliUtils; + +interface + +uses + Windows, SysUtils, Classes, uBizFacturasCliente, pngimage, JSDialog, DB, + schFacturasProveedorClient_Intf, cxControls; + +type + TdmGenerarFacturasProv = class(TDataModule) + JsListaFacturasGeneradas: TJSDialog; + end; + + function GenerarFacturaProvEnGraden(const ID_FACTURA_CLI : Integer) : Boolean; overload; + function GenerarFacturaProvEnGraden(AFacturasCliente : IBizFacturaCliente) : Boolean; overload; + + +implementation + +{$R *.dfm} + +uses + uDialogUtils, uBizFacturasProveedor, uDataTableUtils, + uBizDetallesFacturaCliente, uBizContactos, uFactuGES_App, + uFacturasProveedorController, uDetallesFacturaClienteController, + uFacturasClienteController; + +var + dmGenerarFacturasProv: TdmGenerarFacturasProv; + AFacturasClienteController : IFacturasClienteController; + AFacturasProveedorController : IFacturasProveedorController; + ADetallesFacturasClienteController : IDetallesFacturaClienteController; + +procedure Inicializar; +begin + dmGenerarFacturasProv := TdmGenerarFacturasProv.Create(nil); + AFacturasClienteController := TFacturasClienteController.Create; + AFacturasProveedorController := TFacturasProveedorController.Create; + ADetallesFacturasClienteController := TDetallesFacturaClienteController.Create; +end; + +procedure Finalizar; +begin + FreeAndNIL(dmGenerarFacturasProv); + AFacturasClienteController := nil; + AFacturasProveedorController := nil; + ADetallesFacturasClienteController := nil; +end; + + +function GenerarFacturaProvEnGraden(const ID_FACTURA_CLI : Integer) : Boolean; overload; +var + AFacturaCliente : IBizFacturaCliente; +begin + Result := False; + + try + + if not Assigned(AFacturasClienteController) then + Inicializar; + + AFacturaCliente := AFacturasClienteController.Buscar(ID_FACTURA_CLI); + + if Assigned(AFacturaCliente) then + Result := GenerarFacturaProvEnGraden(AFacturaCliente); + + if Assigned(AFacturasClienteController) then + Finalizar; + + finally + AFacturaCliente := NIL; + end; +end; + + +function GenerarFacturaProvEnGraden(AFacturasCliente : IBizFacturaCliente) : Boolean; overload; +var + AFacturaNueva : IBizFacturaProveedor; + AProveedor : IBizProveedor; + +begin + Result := False; + + ShowHourglassCursor; + if not Assigned(AFacturasProveedorController) then + Inicializar; + + if not Assigned(AFacturasCliente) then + raise Exception.Create('Factura de cliente no asignado (GenerarFacturaProvEnGraden)'); + + if not AFacturasCliente.DataTable.Active then + AFacturasCliente.DataTable.Active := True; + + try + //Preparamos el proveedor + AProveedor := (AFacturasProveedorController.ProveedorController.BuscarSinFiltroEmpresa(CTE_PROVEEDOR_ABETO_PARA_GRADEN) as IBizProveedor); + if not AProveedor.DataTable.Active then + AProveedor.DataTable.Active := True; + + + with AFacturasCliente.DataTable do + begin + dmGenerarFacturasProv.JsListaFacturasGeneradas.Content.Clear; + First; + while not EOF do + begin + //Solo generaremos las facturas del cliente GRADEN + if (AFacturasCliente.ID_CLIENTE = CTE_CLIENTE_GRADEN_PARA_FABRICA) + and AFacturasCliente.FAC_PROV_GRADENIsNull then + begin + AFacturaNueva := AFacturasProveedorController.Nuevo; + AFacturaNueva.ID_EMPRESA := CTE_EMPRESA_GRADEN; + + AFacturaNueva.Proveedor := AProveedor; + + AFacturaNueva.ID_TIPO_FACTURA := CTE_TIPO_FACTURA_PROV_ABETO; + AFacturaNueva.ID_FAC_CLI_ABETO := AFacturasCliente.ID; + AFacturaNueva.REFERENCIA_PROVEEDOR := AFacturasCliente.REFERENCIA; + + AFacturaNueva.IMPORTE_NETO := AFacturasCliente.IMPORTE_NETO; + AFacturaNueva.IMPORTE_PORTE := AFacturasCliente.IMPORTE_PORTE; + AFacturaNueva.DESCUENTO := AFacturasCliente.DESCUENTO; + AFacturaNueva.IMPORTE_DESCUENTO := AFacturasCliente.IMPORTE_DESCUENTO; + AFacturaNueva.BASE_IMPONIBLE := AFacturasCliente.BASE_IMPONIBLE; + AFacturaNueva.IVA := AFacturasCliente.IVA; + AFacturaNueva.IMPORTE_IVA := AFacturasCliente.IMPORTE_IVA; + AFacturaNueva.IMPORTE_TOTAL := AFacturasCliente.IMPORTE_TOTAL; + AFacturaNueva.DataTable.FieldByName(fld_facturasProveedorOBSERVACIONES).AsVariant := AFacturasCliente.DataTable.FieldByName(fld_facturasProveedorOBSERVACIONES).AsVariant; + + DuplicarRegistros(AFacturasCliente.Detalles.DataTable, AFacturaNueva.Detalles.DataTable, mdrTodos); + + if AFacturasProveedorController.Guardar(AFacturaNueva) then + begin + if not (AFacturasCliente.State in dsEditModes) then + AFacturasCliente.Datatable.Edit; + + AFacturasCliente.FAC_PROV_GRADEN := 1; + AFacturasCliente.Datatable.Post; + + dmGenerarFacturasProv.JsListaFacturasGeneradas.Content.Add(AFacturasCliente.REFERENCIA + ': Se ha creado la factura de proveedor ' + AFacturaNueva.REFERENCIA + ' en la empresa Graden S.L.'); + end; + end + else + begin + if AFacturasCliente.FAC_PROV_GRADENIsNull then + dmGenerarFacturasProv.JsListaFacturasGeneradas.Content.Add(AFacturasCliente.REFERENCIA + ': No se aplica, factura no es de Graden') + else + dmGenerarFacturasProv.JsListaFacturasGeneradas.Content.Add(AFacturasCliente.REFERENCIA + ': No se aplica, ya tiene una factura generada en Graden'); + end; + + AFacturaNueva := NIL; + Next; + end; + + ApplyUpdates; + dmGenerarFacturasProv.JsListaFacturasGeneradas.Execute; + Result := True; + end; + + finally + AFacturaNueva := NIL; + if Assigned(AFacturasProveedorController) then + Finalizar; + HideHourglassCursor; + end; +end; + + + +end. diff --git a/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu b/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu index 302bada..f54f6ae 100644 Binary files a/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu and b/Source/Modulos/Tarifas/Controller/Tarifas_controller.dcu differ diff --git a/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.dfm b/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.dfm index 821d552..7e4d09d 100644 --- a/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.dfm +++ b/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.dfm @@ -39,7 +39,6 @@ object fEditorElegirTarifa: TfEditorElegirTarifa Height = 41 Align = alBottom TabOrder = 0 - ExplicitWidth = 500 DesignSize = ( 424 41) @@ -52,7 +51,6 @@ object fEditorElegirTarifa: TfEditorElegirTarifa Caption = 'Aceptar' ModalResult = 1 TabOrder = 0 - ExplicitLeft = 336 end object bCancelar: TButton Left = 341 @@ -63,7 +61,6 @@ object fEditorElegirTarifa: TfEditorElegirTarifa Caption = 'Cancelar' ModalResult = 2 TabOrder = 1 - ExplicitLeft = 417 end end object cbTarifa: TcxLookupComboBox diff --git a/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.pas b/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.pas index ee9d6a5..01423f0 100644 --- a/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.pas +++ b/Source/Modulos/Tarifas/Views/uEditorElegirTarifa.pas @@ -45,10 +45,6 @@ begin end; procedure TfEditorElegirTarifa.FormShow(Sender: TObject); -var - - i : integer; - begin FController := TTarifasController.Create; FListaTarifas := FController.BuscarTodos; diff --git a/Source/Modulos/Unidades de medida/Controller/uUnidadesMedidaController.pas b/Source/Modulos/Unidades de medida/Controller/uUnidadesMedidaController.pas index af9793a..1aa71f7 100644 --- a/Source/Modulos/Unidades de medida/Controller/uUnidadesMedidaController.pas +++ b/Source/Modulos/Unidades de medida/Controller/uUnidadesMedidaController.pas @@ -110,7 +110,7 @@ end; procedure TUnidadesMedidaController.DescartarCambios(AUnidadMedida: IBizUnidadMedida); begin if not Assigned(AUnidadMedida) then - raise Exception.Create ('Almacen no asignado'); + raise Exception.Create ('Unidad de medida no asignada'); ShowHourglassCursor; try @@ -170,7 +170,7 @@ begin Result := False; if not Assigned(AUnidadMedida) then - raise Exception.Create ('Almacen no asignada'); + raise Exception.Create ('Unidad de medida no asignada'); ShowHourglassCursor; try @@ -197,7 +197,7 @@ begin Result := False; if not Assigned(AUnidadMedida) then - raise Exception.Create ('Almacen no asignada'); + raise Exception.Create ('Unidad de medida no asignada'); ValidarObjetos; diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 440dbd4..580fa44 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -1071,6 +1071,15 @@ + + + + + + + + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index 97ab283..d04197c 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -58,6 +58,7 @@ const IsrvTarifas_IID : TGUID = '{BA51338D-4E54-48F9-9534-DCDDD771DE0D}'; IsrvTiposOperacionCompra_IID : TGUID = '{CCBF4D39-D55E-440B-A5D5-9847CD5F4F35}'; IsrvTiposOperacionVenta_IID : TGUID = '{FC1745A8-F8BF-4088-B030-CDCD642C68FF}'; + IsrvDelegaciones_IID : TGUID = '{D3256722-9351-4DB3-8561-A085C6967D1C}'; { Event ID's } @@ -98,6 +99,7 @@ type IsrvTarifas = interface; IsrvTiposOperacionCompra = interface; IsrvTiposOperacionVenta = interface; + IsrvDelegaciones = interface; TRdxEmpresasArray = class; TIntegerArray = class; @@ -977,6 +979,23 @@ type end; + { IsrvDelegaciones } + IsrvDelegaciones = interface(IDataAbstractService) + ['{D3256722-9351-4DB3-8561-A085C6967D1C}'] + end; + + { CosrvDelegaciones } + CosrvDelegaciones = class + class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvDelegaciones; + end; + + { TsrvDelegaciones_Proxy } + TsrvDelegaciones_Proxy = class(TDataAbstractService_Proxy, IsrvDelegaciones) + protected + function __GetInterfaceName:string; override; + + end; + implementation uses @@ -3067,6 +3086,18 @@ begin result := 'srvTiposOperacionVenta'; end; +{ CosrvDelegaciones } + +class function CosrvDelegaciones.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvDelegaciones; +begin + result := TsrvDelegaciones_Proxy.Create(aMessage, aTransportChannel); +end; + +function TsrvDelegaciones_Proxy.__GetInterfaceName:string; +begin + result := 'srvDelegaciones'; +end; + initialization RegisterROClass(TRdxLoginInfo); RegisterROClass(TRdxEmpresasArray); @@ -3106,6 +3137,7 @@ initialization RegisterProxyClass(IsrvTarifas_IID, TsrvTarifas_Proxy); RegisterProxyClass(IsrvTiposOperacionCompra_IID, TsrvTiposOperacionCompra_Proxy); RegisterProxyClass(IsrvTiposOperacionVenta_IID, TsrvTiposOperacionVenta_Proxy); + RegisterProxyClass(IsrvDelegaciones_IID, TsrvDelegaciones_Proxy); finalization @@ -3147,5 +3179,6 @@ finalization UnregisterProxyClass(IsrvTarifas_IID); UnregisterProxyClass(IsrvTiposOperacionCompra_IID); UnregisterProxyClass(IsrvTiposOperacionVenta_IID); + UnregisterProxyClass(IsrvDelegaciones_IID); end. diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index 1cabe69..095c05d 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -365,6 +365,14 @@ type published end; + TsrvDelegaciones_Invoker = class(TDataAbstractService_Invoker) + private + protected + public + constructor Create; override; + published + end; + implementation uses @@ -2587,5 +2595,13 @@ begin FAbstract := False; end; +{ TsrvDelegaciones_Invoker } + +constructor TsrvDelegaciones_Invoker.Create; +begin + inherited Create; + FAbstract := False; +end; + initialization end. diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res index b751898..2e52ece 100644 Binary files a/Source/Servicios/RODLFile.res and b/Source/Servicios/RODLFile.res differ diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index 34a3a59..1df41ca 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -134,20 +134,12 @@ uses uTypesConstConfiguration in '..\Base\Configuracion\uTypesConstConfiguration.pas', schFormasPagoClient_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoClient_Intf.pas', schFormasPagoServer_Intf in '..\Modulos\Formas de pago\Model\schFormasPagoServer_Intf.pas', - schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', - schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', srvTiposOperacionCompra_Impl in '..\Modulos\Tipos de operacion compra\Servidor\srvTiposOperacionCompra_Impl.pas' {srvTiposOperacionCompra: TDataAbstractService}, schTiposOperacionCompraClient_Intf in '..\Modulos\Tipos de operacion compra\Model\schTiposOperacionCompraClient_Intf.pas', schTiposOperacionCompraServer_Intf in '..\Modulos\Tipos de operacion compra\Model\schTiposOperacionCompraServer_Intf.pas', - schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', - schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas', - schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas', - schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas', srvTiposOperacionVenta_Impl in '..\Modulos\Tipos de operacion venta\Servidor\srvTiposOperacionVenta_Impl.pas' {srvTiposOperacionVenta: TDataAbstractService}, schTiposOperacionVentaClient_Intf in '..\Modulos\Tipos de operacion venta\Model\schTiposOperacionVentaClient_Intf.pas', schTiposOperacionVentaServer_Intf in '..\Modulos\Tipos de operacion venta\Model\schTiposOperacionVentaServer_Intf.pas', - schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', - schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas', schPedidosProveedorClient_Intf in '..\Modulos\Pedidos a proveedor\Model\schPedidosProveedorClient_Intf.pas', @@ -155,8 +147,21 @@ uses uRptInventario_Server in '..\Modulos\Inventario\Reports\uRptInventario_Server.pas' {RptInventario: TDataModule}, schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas', schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas', + srvDelegaciones_Impl in '..\Modulos\Delegaciones\Servidor\srvDelegaciones_Impl.pas' {srvDelegaciones: TDataAbstractService}, + schDelegacionesServer_Intf in '..\Modulos\Delegaciones\Model\schDelegacionesServer_Intf.pas', + schDelegacionesClient_Intf in '..\Modulos\Delegaciones\Model\schDelegacionesClient_Intf.pas', + uBizComercialesServer in '..\Modulos\Contactos\Model\uBizComercialesServer.pas', + uBizInstaladoresServer in '..\Modulos\Contactos\Model\uBizInstaladoresServer.pas', + schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', + schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', + schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas', + schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas', schContratosClienteClient_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteClient_Intf.pas', - schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas'; + schContratosClienteServer_Intf in '..\Modulos\Contratos de cliente\Model\schContratosClienteServer_Intf.pas', + schFacturasClienteClient_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteClient_Intf.pas', + schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', + schFacturasProveedorClient_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorClient_Intf.pas', + schFacturasProveedorServer_Intf in '..\Modulos\Facturas de proveedor\Model\schFacturasProveedorServer_Intf.pas'; {$R *.res} {$R ..\Servicios\RODLFile.res} diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 16d9de0..759a6b6 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -28,7 +28,7 @@ Delphi.Personality - FalseTrueFalseTrueFalse4190FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.1.9.0FactuGES (Servidor)4.1.9.0lunes, 12 de diciembre de 2022 20:04 + FalseTrueFalseTrueFalse4320FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.3.2.0FactuGES (Servidor)4.3.2.0martes, 07 de febrero de 2023 17:51 File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found FactuGES_Server.dpr @@ -111,7 +111,9 @@ + + @@ -132,6 +134,12 @@
srvContratosCliente
TDataAbstractService
+ + + +
srvDelegaciones
+ TDataAbstractService +
diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index ad9b6e5..5e517d7 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ