From f115865f81e204b5abf94e19fc98102dcc2bc173 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 25 Aug 2022 08:03:35 +0000 Subject: [PATCH] Version 3.6.1, se mete en albaranes de cliente trabajos de instalador git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@686 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/Base/Base.dproj | 105 +++--- Source/Cliente/FactuGES.dproj | 3 +- Source/Cliente/FactuGES.rc | 8 +- Source/Cliente/FactuGES.res | Bin 171984 -> 171984 bytes Source/GUIBase/GUIBase.dproj | 56 +-- Source/GUIBase/uEditorDBBase.dfm | 2 +- Source/GUIBase/uEditorDBItem.dfm | 3 - Source/GUIBase/uEditorGridBase.dfm | 15 +- Source/GUIBase/uEditorGridBase.pas | 26 +- Source/GUIBase/uViewFiltroBase.dfm | 75 +++- Source/GUIBase/uViewFiltroBase.pas | 21 ++ Source/GUIBase/uViewGrid.dfm | 62 +++- Source/GUIBase/uViewGridBase.pas | 108 +++++- .../Informes/1/InfFacturaCliente_proforma.fr3 | 82 +++++ Source/Informes/5/InfAlbaranCliente.fr3 | 88 +++-- Source/Informes/5/InfContratoCliente.fr3 | 119 ++++++ Source/Informes/5/InfFacturaCliente.fr3 | 8 +- .../Informes/5/InfFacturaCliente_proforma.fr3 | 82 +++++ Source/Informes/5/InfPedidoProveedor.fr3 | 43 +++ Source/Informes/5/InfPresupuestoCliente.fr3 | 89 +++++ .../InformeListadoFacturasRecibosCliente.fr3 | 65 ++++ Source/Informes/6/InfPresupuestoCliente.fr3 | 102 +++--- Source/Informes/InfContratoCliente.fr3 | 16 +- Source/Informes/InfPedidoProveedor.fr3 | 17 +- Source/Informes/InfPresupuestoCliente.fr3 | 8 +- .../InformeListadoFacturasRecibosCliente.fr3 | 65 ++++ .../AlbaranesCliente_Group.groupproj | 26 +- .../uAlbaranesClienteController.pas | 16 +- .../uAlbaranesClienteReportController.pas | 16 +- .../Data/uDataModuleAlbaranesCliente.dfm | 15 +- .../Data/uDataModuleAlbaranesCliente.pas | 12 +- .../uIDataModuleAlbaranesClienteReport.pas | 6 +- .../Model/schAlbaranesClienteClient_Intf.pas | 142 +++++--- .../Model/schAlbaranesClienteServer_Intf.pas | 142 +++++--- .../Reports/uRptAlbaranesCliente_Server.dfm | 39 +- .../Reports/uRptAlbaranesCliente_Server.pas | 18 +- .../Servidor/srvAlbaranesCliente_Impl.dfm | 66 ++-- .../Servidor/srvAlbaranesCliente_Impl.pas | 6 +- .../Views/AlbaranesCliente_view.dpk | 7 +- .../Views/AlbaranesCliente_view.dproj | 30 +- ...ialogOpcionesImpresionAlbaranesCliente.dfm | 94 +++++ ...ialogOpcionesImpresionAlbaranesCliente.pas | 59 +++ .../Views/uEditorAlbaranCliente.dfm | 131 +++---- .../Views/uEditorAlbaranCliente.pas | 28 +- .../Views/uEditorAlbaranesCliente.dfm | 6 +- .../Views/uEditorAlbaranesCliente.pas | 24 +- .../Contactos/Views/Contactos_view.dpk | 3 +- .../Contactos/Views/Contactos_view.dproj | 69 ++-- .../Contactos/Views/uEditorClientes.dfm | 342 +++++++++++++++++- .../Contactos/Views/uEditorClientes.pas | 69 +++- .../Contactos/Views/uEditorContactos.dfm | 9 +- .../ContratosCliente_Group.groupproj | 36 +- .../Views/uEditorContratosCliente.dfm | 30 +- .../Views/uEditorContratosCliente.pas | 18 + .../Views/uViewContratosCliente.dfm | 89 ++++- .../Views/uViewContratosCliente.pas | 2 + .../Reports/uRptFacturasCliente_Server.dfm | 178 ++++++++- .../Reports/uRptFacturasCliente_Server.pas | 102 +++++- .../Views/uEditorFacturasCliente.dfm | 50 ++- .../Views/uEditorFacturasCliente.pas | 21 ++ .../uFacturasProveedorController.pas | 3 +- .../Formas de pago/Views/uEditorFormaPago.dfm | 2 - .../Formas de pago/Views/uEditorFormaPago.pas | 3 + .../Controller/GestorInformes_controller.dpk | 5 +- .../GestorInformes_controller.dproj | 5 +- ...torInformeFacturasRecibosClienteReport.pas | 27 ++ .../Controller/View/uIViewFiltroClientes.pas | 18 + .../View/uIViewParametrosInforme.pas | 15 + .../Controller/uGestorInformesController.pas | 28 +- .../Data/uDataModuleGestorInformes.dfm | 4 +- .../Data/uDataModuleGestorInformes.pas | 11 + .../Model/Data/uIDataModuleGestorInformes.pas | 1 + .../Servidor/srvGestorInformes_Impl.pas | 16 + .../Views/GestorInformes_view.dpk | 37 +- .../Views/GestorInformes_view.dproj | 50 ++- .../Views/uEditorInformeBase.dfm | 16 +- ...torInformeFacturasRecibosClienteReport.dfm | 217 +++++++++++ ...torInformeFacturasRecibosClienteReport.pas | 150 ++++++++ .../Views/uGestorInformesViewRegister.pas | 3 +- .../Views/uViewFiltroClientes.pas | 31 +- .../Views/uEditorPresupuestoCliente.dfm | 47 ++- .../Views/uEditorPresupuestoCliente.pas | 5 +- .../Views/uEditorPresupuestosCliente.dfm | 13 +- .../Views/uViewPresupuestosCliente.dfm | 82 ++++- .../Views/uViewPresupuestosCliente.pas | 9 +- .../Views/uEditorRecibosCliente.dfm | 28 +- .../Views/uEditorRecibosCliente.pas | 21 ++ Source/Servicios/FactuGES.RODL | 20 + Source/Servicios/FactuGES_Intf.pas | 34 +- Source/Servicios/FactuGES_Invk.pas | 48 ++- Source/Servicios/RODLFile.res | Bin 45022 -> 45784 bytes Source/Servidor/FactuGES_Server.dpr | 8 +- Source/Servidor/FactuGES_Server.dproj | 2 +- Source/Servidor/FactuGES_Server.rc | 10 +- Source/Servidor/FactuGES_Server.res | Bin 23352 -> 23348 bytes 95 files changed, 3439 insertions(+), 699 deletions(-) create mode 100644 Source/Informes/1/InfFacturaCliente_proforma.fr3 create mode 100644 Source/Informes/5/InfContratoCliente.fr3 create mode 100644 Source/Informes/5/InfFacturaCliente_proforma.fr3 create mode 100644 Source/Informes/5/InfPedidoProveedor.fr3 create mode 100644 Source/Informes/5/InfPresupuestoCliente.fr3 create mode 100644 Source/Informes/5/InformeListadoFacturasRecibosCliente.fr3 create mode 100644 Source/Informes/InformeListadoFacturasRecibosCliente.fr3 create mode 100644 Source/Modulos/Albaranes de cliente/Views/uDialogOpcionesImpresionAlbaranesCliente.dfm create mode 100644 Source/Modulos/Albaranes de cliente/Views/uDialogOpcionesImpresionAlbaranesCliente.pas create mode 100644 Source/Modulos/Gestor de informes/Controller/View/uIEditorInformeFacturasRecibosClienteReport.pas create mode 100644 Source/Modulos/Gestor de informes/Controller/View/uIViewFiltroClientes.pas create mode 100644 Source/Modulos/Gestor de informes/Controller/View/uIViewParametrosInforme.pas create mode 100644 Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasRecibosClienteReport.dfm create mode 100644 Source/Modulos/Gestor de informes/Views/uEditorInformeFacturasRecibosClienteReport.pas diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index 66a9ccb7..b1d6eba6 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -44,6 +44,13 @@ Package FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0 + + + + + + + VCL for the Web Design Package for CodeGear RAD Studio CodeGear WebSnap Components CodeGear SOAP Components @@ -58,55 +65,55 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fConfigurarConexion
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj index a374c720..9de45575 100644 --- a/Source/Cliente/FactuGES.dproj +++ b/Source/Cliente/FactuGES.dproj @@ -52,7 +52,8 @@ Delphi.Personality VCLApplication -FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3400FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.4.0.0FactuGESFactuGES3.4.0.0 +FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3610FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.6.1.0FactuGESFactuGES3.6.1.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.rc b/Source/Cliente/FactuGES.rc index 5f210257..91b24e8c 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 3,4,0,0 -PRODUCTVERSION 3,4,0,0 +FILEVERSION 3,6,1,0 +PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,10 +13,10 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "3.4.0.0\0" + VALUE "FileVersion", "3.6.1.0\0" VALUE "InternalName", "FactuGES\0" VALUE "ProductName", "FactuGES\0" - VALUE "ProductVersion", "3.4.0.0\0" + VALUE "ProductVersion", "3.6.1.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 3ec93f5752c0f34d43cf73e8dc7fd44644db2ce3..8ba6714a70f258d532f7dc0d77e06fa1eee9e3f4 100644 GIT binary patch delta 56 zcmcbxpX MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/GUIBase/uEditorDBBase.dfm b/Source/GUIBase/uEditorDBBase.dfm index ac98e86e..f8a8aba0 100644 --- a/Source/GUIBase/uEditorDBBase.dfm +++ b/Source/GUIBase/uEditorDBBase.dfm @@ -5,7 +5,7 @@ inherited fEditorDBBase: TfEditorDBBase ClientHeight = 454 ClientWidth = 646 ExplicitWidth = 654 - ExplicitHeight = 488 + ExplicitHeight = 492 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader diff --git a/Source/GUIBase/uEditorDBItem.dfm b/Source/GUIBase/uEditorDBItem.dfm index 0467683b..15294aa7 100644 --- a/Source/GUIBase/uEditorDBItem.dfm +++ b/Source/GUIBase/uEditorDBItem.dfm @@ -83,8 +83,6 @@ inherited fEditorDBItem: TfEditorDBItem ActivePage = pagGeneral Align = alClient TabOrder = 2 - ExplicitTop = 118 - ExplicitHeight = 319 object pagGeneral: TTabSheet Caption = 'General' ExplicitLeft = 0 @@ -105,7 +103,6 @@ inherited fEditorDBItem: TfEditorDBItem ParentBackground = False TabOrder = 4 VerticalAlignment = taAlignTop - ExplicitTop = 85 object lbComentario: TLabel AlignWithMargins = True Left = 6 diff --git a/Source/GUIBase/uEditorGridBase.dfm b/Source/GUIBase/uEditorGridBase.dfm index a681b198..6dd00fa3 100644 --- a/Source/GUIBase/uEditorGridBase.dfm +++ b/Source/GUIBase/uEditorGridBase.dfm @@ -104,7 +104,7 @@ inherited fEditorGridBase: TfEditorGridBase Caption = 'Filtrar:' end object tbxEditFiltro: TTBXEditItem - EditWidth = 200 + EditWidth = 125 ImageIndex = 10 EditorFontSettings.Italic = tsTrue ExtendedAccept = True @@ -112,6 +112,17 @@ inherited fEditorGridBase: TfEditorGridBase ShowImage = True OnChange = tbxEditFiltroChange end + object tbxEditFiltro2: TTBXEditItem + EditWidth = 125 + Enabled = False + ImageIndex = 10 + Visible = False + EditorFontSettings.Italic = tsTrue + ExtendedAccept = True + Images = SmallImages + ShowImage = True + OnChange = tbxEditFiltro2Change + end object TBXItem34: TTBXItem Action = actQuitarFiltro end @@ -168,7 +179,7 @@ inherited fEditorGridBase: TfEditorGridBase end end object TBXTMain2: TTBXToolbar - Left = 337 + Left = 334 Top = 49 Caption = 'tbxMain' ChevronHint = 'M'#225's botones|' diff --git a/Source/GUIBase/uEditorGridBase.pas b/Source/GUIBase/uEditorGridBase.pas index 09daa41d..2f3de3fc 100644 --- a/Source/GUIBase/uEditorGridBase.pas +++ b/Source/GUIBase/uEditorGridBase.pas @@ -67,7 +67,9 @@ type lblAno: TTBXLabelItem; cbxListaAnos: TTBXComboBoxItem; sepAno: TTBXSeparatorItem; + tbxEditFiltro2: TTBXEditItem; procedure tbxEditFiltroChange(Sender: TObject; const Text: String); + procedure tbxEditFiltro2Change(Sender: TObject; const Text: string); procedure FormShow(Sender: TObject); procedure actQuitarFiltroExecute(Sender: TObject); procedure actDuplicarUpdate(Sender: TObject); @@ -81,6 +83,7 @@ type procedure CustomEditorDestroy(Sender: TObject); procedure actExportarExcelExecute(Sender: TObject); procedure actExportarExcelUpdate(Sender: TObject); + protected FListaAnos: TStringList; FViewGrid : IViewGridBase; @@ -224,6 +227,18 @@ begin end; end; +procedure TfEditorGridBase.tbxEditFiltro2Change(Sender: TObject; + const Text: string); +begin + if Assigned(ViewGrid) then + begin + if Length(Text) > 0 then + ViewGrid.Filter2 := Text + else + actQuitarFiltro.Execute; + end; +end; + procedure TfEditorGridBase.tbxEditFiltroChange(Sender: TObject; const Text: String); begin if Assigned(ViewGrid) then @@ -244,7 +259,7 @@ begin ViewGrid.RestoreFromIniFile; end; - cbxListaAnos.ItemIndex := 0; + cbxListaAnos.ItemIndex := 0; end; procedure TfEditorGridBase.actEliminarUpdate(Sender: TObject); @@ -281,6 +296,7 @@ begin if ViewGrid.ViewFiltros.VerFiltros then begin tbxEditFiltro.Visible := False; + tbxEditFiltro2.Visible := False; TBXItem7.Visible := False; end else @@ -288,6 +304,12 @@ begin tbxEditFiltro.Text := ''; tbxEditFiltro.Visible := True; TBXItem7.Visible := True; + + if (tbxEditFiltro2.Enabled) then + begin + tbxEditFiltro2.Text := ''; + tbxEditFiltro2.Visible := True; + end; end; end; @@ -326,6 +348,8 @@ begin begin tbxEditFiltro.Text := ''; ViewGrid.Filter := ''; + tbxEditFiltro2.Text := ''; + ViewGrid.Filter2 := ''; end; end; diff --git a/Source/GUIBase/uViewFiltroBase.dfm b/Source/GUIBase/uViewFiltroBase.dfm index cacab724..ac8b7139 100644 --- a/Source/GUIBase/uViewFiltroBase.dfm +++ b/Source/GUIBase/uViewFiltroBase.dfm @@ -1,9 +1,9 @@ inherited frViewFiltroBase: TfrViewFiltroBase - Width = 565 - Height = 102 + Width = 671 + Height = 105 Visible = False - ExplicitWidth = 565 - ExplicitHeight = 102 + ExplicitWidth = 671 + ExplicitHeight = 105 object TBXDockablePanel1: TTBXDockablePanel Left = 0 Top = 0 @@ -22,8 +22,8 @@ inherited frViewFiltroBase: TfrViewFiltroBase object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 565 - Height = 68 + Width = 671 + Height = 70 Align = alTop ParentBackground = True TabOrder = 0 @@ -49,7 +49,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' TabOrder = 0 - Width = 273 + Width = 250 end object edtFechaIniFiltro: TcxDateEdit Left = 87 @@ -72,11 +72,11 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' - TabOrder = 1 - Width = 121 + TabOrder = 2 + Width = 250 end object edtFechaFinFiltro: TcxDateEdit - Left = 350 + Left = 386 Top = 37 Properties.OnChange = OnCamposFiltroChange Style.BorderColor = clWindowFrame @@ -96,17 +96,54 @@ inherited frViewFiltroBase: TfrViewFiltroBase StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' - TabOrder = 2 - Width = 121 + TabOrder = 3 + Width = 250 + end + object txtFiltroTodo2: TcxTextEdit + Left = 386 + Top = 10 + Properties.OnChange = OnCamposFiltroChange + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.Kind = lfStandard + Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.Kind = lfStandard + StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.Kind = lfStandard + StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.Kind = lfStandard + StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 1 + Width = 250 end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True ShowBorder = False - object dxLayoutControl1Item1: TdxLayoutItem - Caption = 'Que contenga:' - Control = txtFiltroTodo - ControlOptions.ShowBorder = False + object dxLayoutControl1Group2: TdxLayoutGroup + ShowCaption = False + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item1: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Que contenga:' + Control = txtFiltroTodo + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item4: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'y' + Control = txtFiltroTodo2 + ControlOptions.ShowBorder = False + end end object dxLayoutControl1Group1: TdxLayoutGroup ShowCaption = False @@ -132,8 +169,8 @@ inherited frViewFiltroBase: TfrViewFiltroBase end object TBXAlignmentPanel1: TTBXAlignmentPanel Left = 0 - Top = 68 - Width = 565 + Top = 70 + Width = 671 Height = 30 Margins.Left = 10 Align = alTop @@ -141,7 +178,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase object tbxBotones: TTBXToolbar Left = 10 Top = 0 - Width = 555 + Width = 661 Height = 30 Align = alTop AutoResize = False diff --git a/Source/GUIBase/uViewFiltroBase.pas b/Source/GUIBase/uViewFiltroBase.pas index 62dfea6d..d3883d1a 100644 --- a/Source/GUIBase/uViewFiltroBase.pas +++ b/Source/GUIBase/uViewFiltroBase.pas @@ -24,6 +24,10 @@ type function GetTexto: String; procedure SetTexto(const Value: String); property Texto: String read GetTexto write SetTexto; + + function GetTexto2: String; + procedure SetTexto2(const Value: String); + property Texto2: String read GetTexto2 write SetTexto2; end; TfrViewFiltroBase = class(TfrViewBase, IViewFiltroBase) @@ -44,6 +48,9 @@ type tbxBotones: TTBXToolbar; TBXItem2: TTBXItem; TBXAlignmentPanel1: TTBXAlignmentPanel; + dxLayoutControl1Item4: TdxLayoutItem; + txtFiltroTodo2: TcxTextEdit; + dxLayoutControl1Group2: TdxLayoutGroup; procedure OnCamposFiltroChange(Sender: TObject); procedure actQuitarFiltroExecute(Sender: TObject); @@ -56,6 +63,8 @@ type procedure SetVerFiltros(const Value: Boolean); function GetTexto: String; procedure SetTexto(const Value: String); + function GetTexto2: String; + procedure SetTexto2(const Value: String); protected procedure LimpiarCampos; virtual; @@ -67,6 +76,7 @@ type property OnFiltrosChange: TNotifyEvent read GetFiltrosChange write SetFiltrosChange; property VerFiltros: Boolean read GetVerFiltros write SetVerFiltros; property Texto: String read GetTexto write SetTexto; + property Texto2: String read GetTexto2 write SetTexto2; end; implementation @@ -106,6 +116,7 @@ end; procedure TfrViewFiltroBase.LimpiarCampos; begin txtFiltroTodo.Clear; + txtFiltroTodo2.Clear; edtFechaIniFiltro.Clear; edtFechaFinFiltro.Clear; end; @@ -144,9 +155,19 @@ begin Result := txtFiltroTodo.Text; end; +function TfrViewFiltroBase.GetTexto2: String; +begin + Result := txtFiltroTodo2.Text; +end; + procedure TfrViewFiltroBase.SetTexto(const Value: String); begin txtFiltroTodo.Text := Value; end; +procedure TfrViewFiltroBase.SetTexto2(const Value: String); +begin + txtFiltroTodo2.Text := Value; +end; + end. diff --git a/Source/GUIBase/uViewGrid.dfm b/Source/GUIBase/uViewGrid.dfm index 86c5518a..2a1414c6 100644 --- a/Source/GUIBase/uViewGrid.dfm +++ b/Source/GUIBase/uViewGrid.dfm @@ -9,6 +9,12 @@ inherited frViewGrid: TfrViewGrid Width = 554 Height = 466 Align = alClient + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False TabOrder = 0 LookAndFeel.Kind = lfOffice11 LookAndFeel.NativeStyle = True @@ -35,6 +41,7 @@ inherited frViewGrid: TfrViewGrid OptionsView.NoDataToDisplayInfoText = '' OptionsView.CellAutoHeight = True OptionsView.ColumnAutoWidth = True + OptionsView.DataRowHeight = 22 OptionsView.Footer = True OptionsView.GridLineColor = cl3DLight OptionsView.GridLines = glHorizontal @@ -45,10 +52,11 @@ inherited frViewGrid: TfrViewGrid object cxGridViewICONO: TcxGridDBColumn Caption = 'Icono' OnCustomDrawCell = cxGridViewICONOCustomDrawCell - BestFitMaxWidth = 18 - MinWidth = 18 + BestFitMaxWidth = 22 + MinWidth = 22 + Options.HorzSizing = False Options.Sorting = False - Width = 18 + Width = 22 OnCustomDrawHeader = cxGridViewICONOCustomDrawHeader end end @@ -72,6 +80,7 @@ inherited frViewGrid: TfrViewGrid Visible = False ReadOnly = False ExplicitWidth = 554 + ExplicitHeight = 102 inherited TBXDockablePanel1: TTBXDockablePanel ExplicitWidth = 554 ExplicitHeight = 102 @@ -79,18 +88,47 @@ inherited frViewGrid: TfrViewGrid Width = 554 ExplicitWidth = 554 inherited txtFiltroTodo: TcxTextEdit - ExplicitWidth = 457 - Width = 457 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 250 + Width = 250 end inherited edtFechaIniFiltro: TcxDateEdit - ExplicitWidth = 240 - Width = 240 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 250 + Width = 250 end inherited edtFechaFinFiltro: TcxDateEdit - Left = 344 - ExplicitLeft = 344 - ExplicitWidth = 200 - Width = 200 + Left = 321 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 321 + ExplicitWidth = 250 + Width = 250 + end + inherited txtFiltroTodo2: TcxTextEdit + Left = 321 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 321 + ExplicitWidth = 250 + Width = 250 + end + inherited dxLayoutControl1Group_Root: TdxLayoutGroup + inherited dxLayoutControl1Group2: TdxLayoutGroup + inherited dxLayoutControl1Item4: TdxLayoutItem + Visible = False + end + end end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel @@ -162,7 +200,7 @@ inherited frViewGrid: TfrViewGrid PrinterPage.ScaleMode = smFit PrinterPage._dxMeasurementUnits_ = 0 PrinterPage._dxLastMU_ = 2 - ReportDocument.CreationDate = 42772.762583020830000000 + ReportDocument.CreationDate = 44649.770773101850000000 StyleManager = dmBase.dxPrintStyleManager1 OptionsCards.Shadow.Depth = 0 OptionsExpanding.ExpandGroupRows = True diff --git a/Source/GUIBase/uViewGridBase.pas b/Source/GUIBase/uViewGridBase.pas index 67231bc7..5d871ee2 100644 --- a/Source/GUIBase/uViewGridBase.pas +++ b/Source/GUIBase/uViewGridBase.pas @@ -65,6 +65,10 @@ type function GetFilter: string; property Filter: string read GetFilter write SetFilter; + procedure SetFilter2(const Value: string); + function GetFilter2: string; + property Filter2: string read GetFilter2 write SetFilter2; + function GetFiltered: Boolean; property Filtered : Boolean read GetFiltered; @@ -87,9 +91,11 @@ type private FViewFiltros: IViewFiltroBase; FFilter: string; + FFilter2: string; FOnFilterChanged : TNotifyEvent; FGridStatus : TcxGridStatus; procedure BestFitAllColumns; + protected FOnDblClick: TNotifyEvent; FPopupMenu: TPopupMenu; @@ -105,13 +111,16 @@ type function getNumSeleccionados: Integer; procedure SetFilter(const Value: string); virtual; + procedure SetFilter2(const Value: string); virtual; procedure RefrescarFiltro; function GetFilter: string; virtual; + function GetFilter2: string; virtual; function GetFiltered: Boolean; virtual; - procedure FiltrarGrid(TextoFiltro : String); virtual; function GetViewFiltros: IViewFiltroBase; procedure SetViewFiltros(const Value: IViewFiltroBase); virtual; procedure FilterChanged(Sender : TObject); virtual; + procedure FiltrarGrid(TextoFiltro1, TextoFiltro2: String); overload; virtual; + procedure FiltrarGrid(TextoFiltro : String); overload; virtual; public constructor Create(AOwner: TComponent); override; @@ -142,12 +151,14 @@ type procedure RestoreFromRegistry (const Path : String); virtual; procedure RestoreFromIniFile; + procedure ConfigView; virtual; procedure StoreToIniFile; {function Locate(const AItemIndex: Integer; const AValue: String; const APartialCompare: Boolean = False) : Boolean;} property Filter: string read GetFilter write SetFilter; + property Filter2: string read GetFilter2 write SetFilter2; property Filtered : Boolean read GetFiltered; procedure AnadirOtrosFiltros; virtual; @@ -187,7 +198,6 @@ begin _FocusedView.BeginUpdate; try - AsignarAnchosPrefijadosAColumnas(_FocusedView); for i := 0 to _FocusedView.VisibleColumnCount-1 do begin _FocusedView.VisibleColumns[i].ApplyBestFit; @@ -215,6 +225,11 @@ begin // end; +procedure TfrViewGridBase.ConfigView; +begin +// +end; + procedure TfrViewGridBase.ContraerTodo; begin if Assigned(_FocusedView) then @@ -225,6 +240,7 @@ constructor TfrViewGridBase.Create(AOwner: TComponent); begin inherited; FFilter := ''; + FFilter2 := ''; FOnFilterChanged := FilterChanged; FPopupMenu := nil; FOnDblClick := nil; @@ -261,6 +277,11 @@ begin Result := FFilter; end; +function TfrViewGridBase.GetFilter2: string; +begin + Result := FFilter2; +end; + function TfrViewGridBase.GetFiltered: Boolean; begin //Los niveles de los grid no se consideran filtros @@ -333,7 +354,10 @@ procedure TfrViewGridBase.RefrescarFiltro; begin //De esta forma obligaremos a que se creen nuevamente todos los filtros, cuando llamemos a este metodo if Assigned(ViewFiltros) then + begin Filter := ViewFiltros.Texto; + Filter2 := ViewFiltros.Texto2; + end; end; procedure TfrViewGridBase.RestoreFromIniFile; @@ -343,9 +367,8 @@ begin inherited; if Assigned(_FocusedView) then begin - // AjustarAncho; <- No activar porque pisa los anchos que ha puesto el usuario. - AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data + AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[All Users]\Application Data AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim; if not DirectoryExists(AIniFile) then @@ -353,14 +376,14 @@ begin _FocusedView.RestoreFromIniFile(AIniFile + 'grid.xml', True, False, []); end; + + ConfigView; end; procedure TfrViewGridBase.RestoreFromRegistry(const Path: String); begin if Assigned(_FocusedView) then - begin _FocusedView.RestoreFromRegistry(Path + '\\GridSettings\\' + Self.Name, False, False, [], Self.Name); - end; end; procedure TfrViewGridBase.RestoreGridStatus; @@ -391,7 +414,24 @@ begin if Assigned(ViewFiltros) then ViewFiltros.Texto := FFilter; - FiltrarGrid(FFilter); + FiltrarGrid(FFilter, FFilter2); + + //Obliga a generar todos los filtros de las vista hija + AnadirOtrosFiltros; + + if Assigned(FOnFilterChanged) then + FOnFilterChanged(Self); +end; + +procedure TfrViewGridBase.SetFilter2(const Value: string); +begin + FFilter2 := Value; + + //Así tendremos el mismo valor en el filtro simple que en el filtro en detalle + if Assigned(ViewFiltros) then + ViewFiltros.Texto2 := FFilter2; + + FiltrarGrid(FFilter, FFilter2); //Obliga a generar todos los filtros de las vista hija AnadirOtrosFiltros; @@ -445,13 +485,14 @@ begin if Assigned(_FocusedView) then begin - AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data + AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[All Users]\Application Data AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim; if not DirectoryExists(AIniFile) then ForceDirectories(AIniFile); _FocusedView.StoreToIniFile(AIniFile + 'grid.xml', False, []); +// _FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name); end; end; @@ -459,12 +500,57 @@ procedure TfrViewGridBase.StoreToRegistry(const Path: String); begin inherited; if Assigned(_FocusedView) then - begin _FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name); +end; + +procedure TfrViewGridBase.FiltrarGrid(TextoFiltro1, TextoFiltro2 : String); +var + Columna: TcxGridDBColumn; + i: Integer; + AItemList: TcxFilterCriteriaItemList; +begin + with _FocusedView.DataController.Filter do + begin + BeginUpdate; + try + Options := [fcoCaseInsensitive, fcoSoftCompare]; + Root.Clear; + if Length(TextoFiltro1) > 0 then + begin + AItemList := Root.AddItemList(fboAnd); + AItemList.BoolOperatorKind := fboOr; + for i:=0 to (_FocusedView as TcxGridDBTableView).ColumnCount - 1 do + begin + Columna := (_FocusedView as TcxGridDBTableView).Columns[i]; + if (Length(Columna.Caption) > 0) and (Columna.Caption <> 'RecID') then + AItemList.AddItem(Columna, foLike, '%'+TextoFiltro1+'%', IntToStr(i)); + end; + end; + + if Length(TextoFiltro2) > 0 then + begin + AItemList := Root.AddItemList(fboAnd); + AItemList.BoolOperatorKind := fboOr; + for i:=0 to (_FocusedView as TcxGridDBTableView).ColumnCount - 1 do + begin + Columna := (_FocusedView as TcxGridDBTableView).Columns[i]; + if (Length(Columna.Caption) > 0) and (Columna.Caption <> 'RecID') then + AItemList.AddItem(Columna, foLike, '%'+TextoFiltro2+'%', IntToStr(i)); + end; + end; + + if ((Length(TextoFiltro1) > 0) or (Length(TextoFiltro2) > 0)) then + Active := True + else + Active := False; + finally + EndUpdate; + end; end; end; -procedure TfrViewGridBase.FiltrarGrid(TextoFiltro : String); + +procedure TfrViewGridBase.FiltrarGrid(TextoFiltro: String); var Columna: TcxGridDBColumn; i: Integer; @@ -494,8 +580,8 @@ begin EndUpdate; end; end; -end; +end; procedure TfrViewGridBase.FilterChanged(Sender: TObject); begin diff --git a/Source/Informes/1/InfFacturaCliente_proforma.fr3 b/Source/Informes/1/InfFacturaCliente_proforma.fr3 new file mode 100644 index 00000000..072d0e30 --- /dev/null +++ b/Source/Informes/1/InfFacturaCliente_proforma.fr3 @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/5/InfAlbaranCliente.fr3 b/Source/Informes/5/InfAlbaranCliente.fr3 index 890fd73e..7ec2e402 100644 --- a/Source/Informes/5/InfAlbaranCliente.fr3 +++ b/Source/Informes/5/InfAlbaranCliente.fr3 @@ -1,51 +1,73 @@ - + - - - + + + - - - - - + + + + + - + - - - - - - + + + + + + - + - + - - + + - + - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/5/InfContratoCliente.fr3 b/Source/Informes/5/InfContratoCliente.fr3 new file mode 100644 index 00000000..d101994e --- /dev/null +++ b/Source/Informes/5/InfContratoCliente.fr3 @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/5/InfFacturaCliente.fr3 b/Source/Informes/5/InfFacturaCliente.fr3 index 2db99c67..d3654b00 100644 --- a/Source/Informes/5/InfFacturaCliente.fr3 +++ b/Source/Informes/5/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -32,10 +32,10 @@ - + - + @@ -74,7 +74,7 @@ - + diff --git a/Source/Informes/5/InfFacturaCliente_proforma.fr3 b/Source/Informes/5/InfFacturaCliente_proforma.fr3 new file mode 100644 index 00000000..072d0e30 --- /dev/null +++ b/Source/Informes/5/InfFacturaCliente_proforma.fr3 @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/5/InfPedidoProveedor.fr3 b/Source/Informes/5/InfPedidoProveedor.fr3 new file mode 100644 index 00000000..91ecbda3 --- /dev/null +++ b/Source/Informes/5/InfPedidoProveedor.fr3 @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/5/InfPresupuestoCliente.fr3 b/Source/Informes/5/InfPresupuestoCliente.fr3 new file mode 100644 index 00000000..74f577f6 --- /dev/null +++ b/Source/Informes/5/InfPresupuestoCliente.fr3 @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/5/InformeListadoFacturasRecibosCliente.fr3 b/Source/Informes/5/InformeListadoFacturasRecibosCliente.fr3 new file mode 100644 index 00000000..a38abd0b --- /dev/null +++ b/Source/Informes/5/InformeListadoFacturasRecibosCliente.fr3 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Informes/6/InfPresupuestoCliente.fr3 b/Source/Informes/6/InfPresupuestoCliente.fr3 index 9a35ab29..82a84864 100644 --- a/Source/Informes/6/InfPresupuestoCliente.fr3 +++ b/Source/Informes/6/InfPresupuestoCliente.fr3 @@ -1,69 +1,69 @@ - + - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - + - - - - + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - - + + + - - + + diff --git a/Source/Informes/InfContratoCliente.fr3 b/Source/Informes/InfContratoCliente.fr3 index 090eb329..9ed129a6 100644 --- a/Source/Informes/InfContratoCliente.fr3 +++ b/Source/Informes/InfContratoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -9,7 +9,7 @@ - + @@ -64,8 +64,8 @@ - - + + @@ -99,14 +99,14 @@ - - + + - + - + diff --git a/Source/Informes/InfPedidoProveedor.fr3 b/Source/Informes/InfPedidoProveedor.fr3 index c0bd3d0f..91ecbda3 100644 --- a/Source/Informes/InfPedidoProveedor.fr3 +++ b/Source/Informes/InfPedidoProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -8,11 +8,13 @@ - + + + @@ -20,16 +22,15 @@ - - - - + + + - - + + diff --git a/Source/Informes/InfPresupuestoCliente.fr3 b/Source/Informes/InfPresupuestoCliente.fr3 index e217cd24..74f577f6 100644 --- a/Source/Informes/InfPresupuestoCliente.fr3 +++ b/Source/Informes/InfPresupuestoCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + @@ -64,8 +64,8 @@ - - + + diff --git a/Source/Informes/InformeListadoFacturasRecibosCliente.fr3 b/Source/Informes/InformeListadoFacturasRecibosCliente.fr3 new file mode 100644 index 00000000..a38abd0b --- /dev/null +++ b/Source/Informes/InformeListadoFacturasRecibosCliente.fr3 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj b/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj index faccdbc9..6765932f 100644 --- a/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj +++ b/Source/Modulos/Albaranes de cliente/AlbaranesCliente_Group.groupproj @@ -11,8 +11,10 @@ + + @@ -171,14 +173,32 @@ + + + + + + + + + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas index db14b8ec..6e5adf06 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas +++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas @@ -42,8 +42,8 @@ type function ExtraerSeleccionados(AAlbaran: IBizAlbaranCliente) : IBizAlbaranCliente; function ElegirAlbaranes(AAlbaran: IBizAlbaranCliente; AMensaje: String; AMultiSelect: Boolean): IBizAlbaranCliente; - procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True); - procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True); + procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); + procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); @@ -136,8 +136,8 @@ type DoPost: Boolean = True) : Boolean; procedure EnviarAlbaranPorEMail(AAlbaran : IBizAlbaranCliente); - procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True); - procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True); + procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); + procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); @@ -1003,7 +1003,7 @@ begin end; end; -procedure TAlbaranesClienteController.Preview(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True); +procedure TAlbaranesClienteController.Preview(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); var AReportController : IAlbaranesClienteReportController; ID_Albaranes: TIntegerList; @@ -1031,7 +1031,7 @@ begin else ID_Albaranes.Add(AAlbaran.ID); - AReportController.Preview(ID_Albaranes, VerPrecios); + AReportController.Preview(ID_Albaranes, VerPrecios, VerTrabajos, VerIncidencias); finally AReportController := NIL; @@ -1039,7 +1039,7 @@ begin end; end; -procedure TAlbaranesClienteController.Print(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True); +procedure TAlbaranesClienteController.Print(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; const VerPrecios: Boolean = True; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); var AReportController : IAlbaranesClienteReportController; ID_Albaranes: TIntegerList; @@ -1065,7 +1065,7 @@ begin else ID_Albaranes.Add(AAlbaran.ID); - AReportController.Print(ID_Albaranes, VerPrecios); + AReportController.Print(ID_Albaranes, VerPrecios, VerTrabajos, VerIncidencias); finally AReportController := NIL; diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas index 5f963f8a..5a0d579e 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas +++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas @@ -10,8 +10,8 @@ uses type IAlbaranesClienteReportController = interface(IControllerBase) ['{4BCC7A93-3322-494C-A3FA-118F4B62CB15}'] - procedure Preview(const AListaID : TIntegerList; const VerPrecios: Boolean); - procedure Print(const AListaID : TIntegerList; const VerPrecios: Boolean); + procedure Preview(const AListaID : TIntegerList; const VerPrecios: Boolean; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); + procedure Print(const AListaID : TIntegerList; const VerPrecios: Boolean; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean); procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean); function ExportToPDF(const AID: Integer; const AFileName : String = ''; const VerPrecios: Boolean = True): Boolean; @@ -26,8 +26,8 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList; const VerPrecios: Boolean); - procedure Print(const AListaID : TIntegerList; const VerPrecios: Boolean); + procedure Preview(const AListaID : TIntegerList; const VerPrecios: Boolean; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); + procedure Print(const AListaID : TIntegerList; const VerPrecios: Boolean; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean); procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean); function ExportToPDF(const AID: Integer; const AFileName : String = ''; const VerPrecios: Boolean = True): Boolean; @@ -135,14 +135,14 @@ begin end; end; -procedure TAlbaranesClienteReportController.Preview(const AListaID : TIntegerList; const VerPrecios: Boolean); +procedure TAlbaranesClienteReportController.Preview(const AListaID : TIntegerList; const VerPrecios: Boolean; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); var AStream: Binary; AEditor : IEditorAlbaranesClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetRptAlbaranes(AListaID, VerPrecios); + AStream := FDataModule.GetRptAlbaranes(AListaID, VerPrecios, VerTrabajos, VerIncidencias); try CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); if Assigned(AEditor) then @@ -163,7 +163,7 @@ begin end; end; -procedure TAlbaranesClienteReportController.Print(const AListaID : TIntegerList; const VerPrecios: Boolean); +procedure TAlbaranesClienteReportController.Print(const AListaID : TIntegerList; const VerPrecios: Boolean; const VerTrabajos: Boolean = True; const VerIncidencias: Boolean = True); var AStream: Binary; AEditor : IEditorAlbaranesClientePreview; @@ -172,7 +172,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptAlbaranes(AListaID, VerPrecios); + AStream := FDataModule.GetRptAlbaranes(AListaID, VerPrecios, VerTrabajos, VerIncidencias); try CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); if Assigned(AEditor) then diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm index 13a88c23..8bc6f2e4 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.dfm @@ -26,11 +26,6 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente object tbl_AlbaranesCliente: TDAMemDataTable RemoteUpdatesOptions = [] Fields = < - item - Name = 'ID_CONTRATO' - DataType = datInteger - DictionaryEntry = 'AlbaranesCliente_ID_CONTRATO' - end item Name = 'ID' DataType = datAutoInc @@ -117,6 +112,11 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente DisplayLabel = 'Ref. pedido cliente' DictionaryEntry = 'AlbaranesCliente_REF_PEDIDO' end + item + Name = 'ID_CONTRATO' + DataType = datInteger + DictionaryEntry = 'AlbaranesCliente_ID_CONTRATO' + end item Name = 'REF_CONTRATO' DataType = datString @@ -334,8 +334,11 @@ inherited DataModuleAlbaranesCliente: TDataModuleAlbaranesCliente DataType = datString Size = 255 DisplayLabel = 'Otros nombres' - ServerAutoRefresh = True DictionaryEntry = 'AlbaranesCliente_LISTA_NOMBRES' + end + item + Name = 'TRABAJOS_INSTALADOR' + DataType = datMemo end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas index 38a137aa..555330f7 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas @@ -37,9 +37,9 @@ type function NewItem : IBizAlbaranCliente; // Report - function GetRptAlbaranes(const ListaID: TIntegerList; const VerPrecios: Boolean = False): Binary; + function GetRptAlbaranes(const ListaID: TIntegerList; const VerPrecios: Boolean = False; const VerTrabajos: Boolean = False; const VerIncidencias: Boolean = False): Binary; function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; - function GetRptPDFAlbaran(const AID: Integer; const VerPrecios: Boolean = False): Binary; + function GetRptPDFAlbaran(const AID: Integer; const VerPrecios: Boolean = False; const VerTrabajos: Boolean = False; const VerIncidencias: Boolean = False): Binary; end; implementation @@ -63,26 +63,26 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleAlbaranesCliente.GetRptAlbaranes(const ListaID: TIntegerList; const VerPrecios: Boolean = False): Binary; +function TDataModuleAlbaranesCliente.GetRptAlbaranes(const ListaID: TIntegerList; const VerPrecios: Boolean = False; const VerTrabajos: Boolean = False; const VerIncidencias: Boolean = False): Binary; var AParam : TIntegerArray; begin AParam := ListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam, VerPrecios); + Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam, VerPrecios, VerTrabajos, VerIncidencias); finally FreeAndNil(AParam); end; end; -function TDataModuleAlbaranesCliente.GetRptPDFAlbaran(const AID: Integer; const VerPrecios: Boolean = False): Binary; +function TDataModuleAlbaranesCliente.GetRptPDFAlbaran(const AID: Integer; const VerPrecios, VerTrabajos, VerIncidencias: Boolean): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam, VerPrecios); + Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam, VerPrecios, VerTrabajos, VerIncidencias); finally FreeAndNil(AParam); end; diff --git a/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas b/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas index de3b82bb..9daafbc9 100644 --- a/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas +++ b/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas @@ -7,10 +7,10 @@ uses type IDataModuleAlbaranesClienteReport = interface - ['{42C55204-5AB9-403E-8385-1A62B02D8234}'] - function GetRptAlbaranes(const ListaID: TIntegerList; const VerPrecios: Boolean = False): Binary; + ['{32A52EC9-90F6-4934-9001-015A2579746D}'] + function GetRptAlbaranes(const ListaID: TIntegerList; const VerPrecios: Boolean = False; const VerTrabajos: Boolean = False; const VerIncidencias: Boolean = False): Binary; function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; - function GetRptPDFAlbaran(const AID: Integer; const VerPrecios: Boolean = False): Binary; + function GetRptPDFAlbaran(const AID: Integer; const VerPrecios: Boolean = False; const VerTrabajos: Boolean = False; const VerIncidencias: Boolean = False): Binary; end; implementation diff --git a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas index 74d28779..70f908bc 100644 --- a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas +++ b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteClient_Intf.pas @@ -9,9 +9,9 @@ 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_ListaAnosAlbaranes = '{3BF46A2A-B09F-4966-80AC-36B91AB3F410}'; - RID_AlbaranesCliente = '{37A96813-FF20-4C48-8043-08624BDF1EEC}'; - RID_AlbaranesCliente_Detalles = '{7A054D7B-816E-40D3-8810-00601F96937D}'; + RID_ListaAnosAlbaranes = '{CA15E0DE-DB21-4659-83E8-7C52F61A8D18}'; + RID_AlbaranesCliente = '{55652CC2-5F41-4D4A-9D92-2D1EEB9F4B17}'; + RID_AlbaranesCliente_Detalles = '{9A85B300-2DDE-41DD-A4C9-2B6CE2B26FCB}'; { Data table names } nme_ListaAnosAlbaranes = 'ListaAnosAlbaranes'; @@ -25,7 +25,6 @@ const idx_ListaAnosAlbaranesANO = 0; { AlbaranesCliente fields } - fld_AlbaranesClienteID_CONTRATO = 'ID_CONTRATO'; fld_AlbaranesClienteID = 'ID'; fld_AlbaranesClienteID_EMPRESA = 'ID_EMPRESA'; fld_AlbaranesClienteID_CLIENTE = 'ID_CLIENTE'; @@ -39,6 +38,7 @@ const fld_AlbaranesClienteNOMBRE_ALMACEN = 'NOMBRE_ALMACEN'; fld_AlbaranesClienteID_PEDIDO = 'ID_PEDIDO'; fld_AlbaranesClienteREF_PEDIDO = 'REF_PEDIDO'; + fld_AlbaranesClienteID_CONTRATO = 'ID_CONTRATO'; fld_AlbaranesClienteREF_CONTRATO = 'REF_CONTRATO'; fld_AlbaranesClienteID_FACTURA = 'ID_FACTURA'; fld_AlbaranesClienteREF_FACTURA = 'REF_FACTURA'; @@ -72,22 +72,23 @@ const fld_AlbaranesClienteID_TIENDA = 'ID_TIENDA'; fld_AlbaranesClienteTIENDA = 'TIENDA'; fld_AlbaranesClienteLISTA_NOMBRES = 'LISTA_NOMBRES'; + fld_AlbaranesClienteTRABAJOS_INSTALADOR = 'TRABAJOS_INSTALADOR'; { AlbaranesCliente field indexes } - idx_AlbaranesClienteID_CONTRATO = 0; - idx_AlbaranesClienteID = 1; - idx_AlbaranesClienteID_EMPRESA = 2; - idx_AlbaranesClienteID_CLIENTE = 3; - idx_AlbaranesClienteNOMBRE = 4; - idx_AlbaranesClienteFECHA_ALBARAN = 5; - idx_AlbaranesClienteREFERENCIA = 6; - idx_AlbaranesClienteREFERENCIA_CLIENTE = 7; - idx_AlbaranesClienteTIPO = 8; - idx_AlbaranesClienteSITUACION = 9; - idx_AlbaranesClienteID_ALMACEN = 10; - idx_AlbaranesClienteNOMBRE_ALMACEN = 11; - idx_AlbaranesClienteID_PEDIDO = 12; - idx_AlbaranesClienteREF_PEDIDO = 13; + idx_AlbaranesClienteID = 0; + idx_AlbaranesClienteID_EMPRESA = 1; + idx_AlbaranesClienteID_CLIENTE = 2; + idx_AlbaranesClienteNOMBRE = 3; + idx_AlbaranesClienteFECHA_ALBARAN = 4; + idx_AlbaranesClienteREFERENCIA = 5; + idx_AlbaranesClienteREFERENCIA_CLIENTE = 6; + idx_AlbaranesClienteTIPO = 7; + idx_AlbaranesClienteSITUACION = 8; + idx_AlbaranesClienteID_ALMACEN = 9; + idx_AlbaranesClienteNOMBRE_ALMACEN = 10; + idx_AlbaranesClienteID_PEDIDO = 11; + idx_AlbaranesClienteREF_PEDIDO = 12; + idx_AlbaranesClienteID_CONTRATO = 13; idx_AlbaranesClienteREF_CONTRATO = 14; idx_AlbaranesClienteID_FACTURA = 15; idx_AlbaranesClienteREF_FACTURA = 16; @@ -121,6 +122,7 @@ const idx_AlbaranesClienteID_TIENDA = 44; idx_AlbaranesClienteTIENDA = 45; idx_AlbaranesClienteLISTA_NOMBRES = 46; + idx_AlbaranesClienteTRABAJOS_INSTALADOR = 47; { AlbaranesCliente_Detalles fields } fld_AlbaranesCliente_DetallesID = 'ID'; @@ -157,7 +159,7 @@ const type { IListaAnosAlbaranes } IListaAnosAlbaranes = interface(IDAStronglyTypedDataTable) - ['{0C7CD8C2-CB8B-4224-863B-760D2E239D64}'] + ['{E097AA9E-0150-4FA4-809F-DC5C880C8D0B}'] { Property getters and setters } function GetANOValue: String; procedure SetANOValue(const aValue: String); @@ -192,12 +194,8 @@ type { IAlbaranesCliente } IAlbaranesCliente = interface(IDAStronglyTypedDataTable) - ['{D3E1233E-BD17-40E1-B5B2-C8241F7BFF04}'] + ['{8921A06D-B147-4332-8F91-A9346F234DDA}'] { Property getters and setters } - function GetID_CONTRATOValue: Integer; - procedure SetID_CONTRATOValue(const aValue: Integer); - function GetID_CONTRATOIsNull: Boolean; - procedure SetID_CONTRATOIsNull(const aValue: Boolean); function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetIDIsNull: Boolean; @@ -250,6 +248,10 @@ type procedure SetREF_PEDIDOValue(const aValue: String); function GetREF_PEDIDOIsNull: Boolean; procedure SetREF_PEDIDOIsNull(const aValue: Boolean); + function GetID_CONTRATOValue: Integer; + procedure SetID_CONTRATOValue(const aValue: Integer); + function GetID_CONTRATOIsNull: Boolean; + procedure SetID_CONTRATOIsNull(const aValue: Boolean); function GetREF_CONTRATOValue: String; procedure SetREF_CONTRATOValue(const aValue: String); function GetREF_CONTRATOIsNull: Boolean; @@ -380,11 +382,12 @@ type procedure SetLISTA_NOMBRESValue(const aValue: String); function GetLISTA_NOMBRESIsNull: Boolean; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); + function GetTRABAJOS_INSTALADORValue: IROStrings; + function GetTRABAJOS_INSTALADORIsNull: Boolean; + procedure SetTRABAJOS_INSTALADORIsNull(const aValue: Boolean); { Properties } - property ID_CONTRATO: Integer read GetID_CONTRATOValue write SetID_CONTRATOValue; - property ID_CONTRATOIsNull: Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; @@ -411,6 +414,8 @@ type property ID_PEDIDOIsNull: Boolean read GetID_PEDIDOIsNull write SetID_PEDIDOIsNull; property REF_PEDIDO: String read GetREF_PEDIDOValue write SetREF_PEDIDOValue; property REF_PEDIDOIsNull: Boolean read GetREF_PEDIDOIsNull write SetREF_PEDIDOIsNull; + property ID_CONTRATO: Integer read GetID_CONTRATOValue write SetID_CONTRATOValue; + property ID_CONTRATOIsNull: Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; property REF_CONTRATO: String read GetREF_CONTRATOValue write SetREF_CONTRATOValue; property REF_CONTRATOIsNull: Boolean read GetREF_CONTRATOIsNull write SetREF_CONTRATOIsNull; property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; @@ -477,6 +482,8 @@ type property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull; property LISTA_NOMBRES: String read GetLISTA_NOMBRESValue write SetLISTA_NOMBRESValue; property LISTA_NOMBRESIsNull: Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; + property TRABAJOS_INSTALADOR: IROStrings read GetTRABAJOS_INSTALADORValue; + property TRABAJOS_INSTALADORIsNull: Boolean read GetTRABAJOS_INSTALADORIsNull write SetTRABAJOS_INSTALADORIsNull; end; { TAlbaranesClienteDataTableRules } @@ -484,14 +491,12 @@ type private f_OBSERVACIONES: IROStrings; f_INCIDENCIAS: IROStrings; + f_TRABAJOS_INSTALADOR: IROStrings; procedure OBSERVACIONES_OnChange(Sender: TObject); procedure INCIDENCIAS_OnChange(Sender: TObject); + procedure TRABAJOS_INSTALADOR_OnChange(Sender: TObject); protected { Property getters and setters } - function GetID_CONTRATOValue: Integer; virtual; - procedure SetID_CONTRATOValue(const aValue: Integer); virtual; - function GetID_CONTRATOIsNull: Boolean; virtual; - procedure SetID_CONTRATOIsNull(const aValue: Boolean); virtual; function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetIDIsNull: Boolean; virtual; @@ -544,6 +549,10 @@ type procedure SetREF_PEDIDOValue(const aValue: String); virtual; function GetREF_PEDIDOIsNull: Boolean; virtual; procedure SetREF_PEDIDOIsNull(const aValue: Boolean); virtual; + function GetID_CONTRATOValue: Integer; virtual; + procedure SetID_CONTRATOValue(const aValue: Integer); virtual; + function GetID_CONTRATOIsNull: Boolean; virtual; + procedure SetID_CONTRATOIsNull(const aValue: Boolean); virtual; function GetREF_CONTRATOValue: String; virtual; procedure SetREF_CONTRATOValue(const aValue: String); virtual; function GetREF_CONTRATOIsNull: Boolean; virtual; @@ -674,10 +683,11 @@ type procedure SetLISTA_NOMBRESValue(const aValue: String); virtual; function GetLISTA_NOMBRESIsNull: Boolean; virtual; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); virtual; + function GetTRABAJOS_INSTALADORValue: IROStrings; virtual; + function GetTRABAJOS_INSTALADORIsNull: Boolean; virtual; + procedure SetTRABAJOS_INSTALADORIsNull(const aValue: Boolean); virtual; { Properties } - property ID_CONTRATO: Integer read GetID_CONTRATOValue write SetID_CONTRATOValue; - property ID_CONTRATOIsNull: Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; @@ -704,6 +714,8 @@ type property ID_PEDIDOIsNull: Boolean read GetID_PEDIDOIsNull write SetID_PEDIDOIsNull; property REF_PEDIDO: String read GetREF_PEDIDOValue write SetREF_PEDIDOValue; property REF_PEDIDOIsNull: Boolean read GetREF_PEDIDOIsNull write SetREF_PEDIDOIsNull; + property ID_CONTRATO: Integer read GetID_CONTRATOValue write SetID_CONTRATOValue; + property ID_CONTRATOIsNull: Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; property REF_CONTRATO: String read GetREF_CONTRATOValue write SetREF_CONTRATOValue; property REF_CONTRATOIsNull: Boolean read GetREF_CONTRATOIsNull write SetREF_CONTRATOIsNull; property ID_FACTURA: Integer read GetID_FACTURAValue write SetID_FACTURAValue; @@ -770,6 +782,8 @@ type property TIENDAIsNull: Boolean read GetTIENDAIsNull write SetTIENDAIsNull; property LISTA_NOMBRES: String read GetLISTA_NOMBRESValue write SetLISTA_NOMBRESValue; property LISTA_NOMBRESIsNull: Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; + property TRABAJOS_INSTALADOR: IROStrings read GetTRABAJOS_INSTALADORValue; + property TRABAJOS_INSTALADORIsNull: Boolean read GetTRABAJOS_INSTALADORIsNull write SetTRABAJOS_INSTALADORIsNull; public constructor Create(aDataTable: TDADataTable); override; @@ -779,7 +793,7 @@ type { IAlbaranesCliente_Detalles } IAlbaranesCliente_Detalles = interface(IDAStronglyTypedDataTable) - ['{A6C61208-F037-4EFA-BBBF-1DBC79AF7C44}'] + ['{C938586B-A47D-4769-A2B5-BC2C6EDDD33E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); @@ -1019,6 +1033,10 @@ begin StrList := TStringList.Create; StrList.OnChange := INCIDENCIAS_OnChange; f_INCIDENCIAS := NewROStrings(StrList,True); + + StrList := TStringList.Create; + StrList.OnChange := TRABAJOS_INSTALADOR_OnChange; + f_TRABAJOS_INSTALADOR := NewROStrings(StrList,True); end; destructor TAlbaranesClienteDataTableRules.Destroy; @@ -1036,25 +1054,9 @@ begin if DataTable.Editing then DataTable.Fields[idx_AlbaranesClienteINCIDENCIAS].AsVariant := TStringList(Sender).Text; end; -function TAlbaranesClienteDataTableRules.GetID_CONTRATOValue: Integer; +procedure TAlbaranesClienteDataTableRules.TRABAJOS_INSTALADOR_OnChange(Sender: TObject); begin - result := DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].AsInteger; -end; - -procedure TAlbaranesClienteDataTableRules.SetID_CONTRATOValue(const aValue: Integer); -begin - DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].AsInteger := aValue; -end; - -function TAlbaranesClienteDataTableRules.GetID_CONTRATOIsNull: boolean; -begin - result := DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].IsNull; -end; - -procedure TAlbaranesClienteDataTableRules.SetID_CONTRATOIsNull(const aValue: Boolean); -begin - if aValue then - DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].AsVariant := Null; + if DataTable.Editing then DataTable.Fields[idx_AlbaranesClienteTRABAJOS_INSTALADOR].AsVariant := TStringList(Sender).Text; end; function TAlbaranesClienteDataTableRules.GetIDValue: Integer; @@ -1330,6 +1332,27 @@ begin DataTable.Fields[idx_AlbaranesClienteREF_PEDIDO].AsVariant := Null; end; +function TAlbaranesClienteDataTableRules.GetID_CONTRATOValue: Integer; +begin + result := DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].AsInteger; +end; + +procedure TAlbaranesClienteDataTableRules.SetID_CONTRATOValue(const aValue: Integer); +begin + DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].AsInteger := aValue; +end; + +function TAlbaranesClienteDataTableRules.GetID_CONTRATOIsNull: boolean; +begin + result := DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].IsNull; +end; + +procedure TAlbaranesClienteDataTableRules.SetID_CONTRATOIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_AlbaranesClienteID_CONTRATO].AsVariant := Null; +end; + function TAlbaranesClienteDataTableRules.GetREF_CONTRATOValue: String; begin result := DataTable.Fields[idx_AlbaranesClienteREF_CONTRATO].AsString; @@ -2015,6 +2038,23 @@ begin DataTable.Fields[idx_AlbaranesClienteLISTA_NOMBRES].AsVariant := Null; end; +function TAlbaranesClienteDataTableRules.GetTRABAJOS_INSTALADORValue: IROStrings; +begin + result := f_TRABAJOS_INSTALADOR; + result.Text := DataTable.Fields[idx_AlbaranesClienteTRABAJOS_INSTALADOR].AsString; +end; + +function TAlbaranesClienteDataTableRules.GetTRABAJOS_INSTALADORIsNull: boolean; +begin + result := DataTable.Fields[idx_AlbaranesClienteTRABAJOS_INSTALADOR].IsNull; +end; + +procedure TAlbaranesClienteDataTableRules.SetTRABAJOS_INSTALADORIsNull(const aValue: Boolean); +begin + if aValue then + DataTable.Fields[idx_AlbaranesClienteTRABAJOS_INSTALADOR].AsVariant := Null; +end; + { TAlbaranesCliente_DetallesDataTableRules } constructor TAlbaranesCliente_DetallesDataTableRules.Create(aDataTable: TDADataTable); diff --git a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas index b5c4de42..74f2e83e 100644 --- a/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas +++ b/Source/Modulos/Albaranes de cliente/Model/schAlbaranesClienteServer_Intf.pas @@ -9,14 +9,14 @@ 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_ListaAnosAlbaranesDelta = '{8B568226-36B4-4CDC-BE4C-BD51DA29AEAF}'; - RID_AlbaranesClienteDelta = '{2EAD0C36-219E-47BB-8D37-78BD32D11744}'; - RID_AlbaranesCliente_DetallesDelta = '{2ACFBDE5-B171-408C-A739-A72B52566077}'; + RID_ListaAnosAlbaranesDelta = '{DFB4AC32-D884-4D04-9605-AAC314909FCD}'; + RID_AlbaranesClienteDelta = '{46FAFC4B-C587-47EE-BF0E-3039F1F746DC}'; + RID_AlbaranesCliente_DetallesDelta = '{D4709917-AA42-498A-AB7B-304623533C8F}'; type { IListaAnosAlbaranesDelta } IListaAnosAlbaranesDelta = interface(IListaAnosAlbaranes) - ['{8B568226-36B4-4CDC-BE4C-BD51DA29AEAF}'] + ['{DFB4AC32-D884-4D04-9605-AAC314909FCD}'] { Property getters and setters } function GetOldANOValue : String; @@ -50,9 +50,8 @@ type { IAlbaranesClienteDelta } IAlbaranesClienteDelta = interface(IAlbaranesCliente) - ['{2EAD0C36-219E-47BB-8D37-78BD32D11744}'] + ['{46FAFC4B-C587-47EE-BF0E-3039F1F746DC}'] { Property getters and setters } - function GetOldID_CONTRATOValue : Integer; function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; function GetOldID_CLIENTEValue : Integer; @@ -66,6 +65,7 @@ type function GetOldNOMBRE_ALMACENValue : String; function GetOldID_PEDIDOValue : Integer; function GetOldREF_PEDIDOValue : String; + function GetOldID_CONTRATOValue : Integer; function GetOldREF_CONTRATOValue : String; function GetOldID_FACTURAValue : Integer; function GetOldREF_FACTURAValue : String; @@ -99,9 +99,9 @@ type function GetOldID_TIENDAValue : Integer; function GetOldTIENDAValue : String; function GetOldLISTA_NOMBRESValue : String; + function GetOldTRABAJOS_INSTALADORValue : IROStrings; { Properties } - property OldID_CONTRATO : Integer read GetOldID_CONTRATOValue; property OldID : Integer read GetOldIDValue; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property OldID_CLIENTE : Integer read GetOldID_CLIENTEValue; @@ -115,6 +115,7 @@ type property OldNOMBRE_ALMACEN : String read GetOldNOMBRE_ALMACENValue; property OldID_PEDIDO : Integer read GetOldID_PEDIDOValue; property OldREF_PEDIDO : String read GetOldREF_PEDIDOValue; + property OldID_CONTRATO : Integer read GetOldID_CONTRATOValue; property OldREF_CONTRATO : String read GetOldREF_CONTRATOValue; property OldID_FACTURA : Integer read GetOldID_FACTURAValue; property OldREF_FACTURA : String read GetOldREF_FACTURAValue; @@ -148,6 +149,7 @@ type property OldID_TIENDA : Integer read GetOldID_TIENDAValue; property OldTIENDA : String read GetOldTIENDAValue; property OldLISTA_NOMBRES : String read GetOldLISTA_NOMBRESValue; + property OldTRABAJOS_INSTALADOR : IROStrings read GetOldTRABAJOS_INSTALADORValue; end; { TAlbaranesClienteBusinessProcessorRules } @@ -155,16 +157,12 @@ type private f_OBSERVACIONES: IROStrings; f_INCIDENCIAS: IROStrings; + f_TRABAJOS_INSTALADOR: IROStrings; procedure OBSERVACIONES_OnChange(Sender: TObject); procedure INCIDENCIAS_OnChange(Sender: TObject); + procedure TRABAJOS_INSTALADOR_OnChange(Sender: TObject); protected { Property getters and setters } - function GetID_CONTRATOValue: Integer; virtual; - function GetID_CONTRATOIsNull: Boolean; virtual; - function GetOldID_CONTRATOValue: Integer; virtual; - function GetOldID_CONTRATOIsNull: Boolean; virtual; - procedure SetID_CONTRATOValue(const aValue: Integer); virtual; - procedure SetID_CONTRATOIsNull(const aValue: Boolean); virtual; function GetIDValue: Integer; virtual; function GetIDIsNull: Boolean; virtual; function GetOldIDValue: Integer; virtual; @@ -243,6 +241,12 @@ type function GetOldREF_PEDIDOIsNull: Boolean; virtual; procedure SetREF_PEDIDOValue(const aValue: String); virtual; procedure SetREF_PEDIDOIsNull(const aValue: Boolean); virtual; + function GetID_CONTRATOValue: Integer; virtual; + function GetID_CONTRATOIsNull: Boolean; virtual; + function GetOldID_CONTRATOValue: Integer; virtual; + function GetOldID_CONTRATOIsNull: Boolean; virtual; + procedure SetID_CONTRATOValue(const aValue: Integer); virtual; + procedure SetID_CONTRATOIsNull(const aValue: Boolean); virtual; function GetREF_CONTRATOValue: String; virtual; function GetREF_CONTRATOIsNull: Boolean; virtual; function GetOldREF_CONTRATOValue: String; virtual; @@ -439,12 +443,13 @@ type function GetOldLISTA_NOMBRESIsNull: Boolean; virtual; procedure SetLISTA_NOMBRESValue(const aValue: String); virtual; procedure SetLISTA_NOMBRESIsNull(const aValue: Boolean); virtual; + function GetTRABAJOS_INSTALADORValue: IROStrings; virtual; + function GetTRABAJOS_INSTALADORIsNull: Boolean; virtual; + function GetOldTRABAJOS_INSTALADORValue: IROStrings; virtual; + function GetOldTRABAJOS_INSTALADORIsNull: Boolean; virtual; + procedure SetTRABAJOS_INSTALADORIsNull(const aValue: Boolean); virtual; { Properties } - property ID_CONTRATO : Integer read GetID_CONTRATOValue write SetID_CONTRATOValue; - property ID_CONTRATOIsNull : Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; - property OldID_CONTRATO : Integer read GetOldID_CONTRATOValue; - property OldID_CONTRATOIsNull : Boolean read GetOldID_CONTRATOIsNull; property ID : Integer read GetIDValue write SetIDValue; property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull; property OldID : Integer read GetOldIDValue; @@ -497,6 +502,10 @@ type property REF_PEDIDOIsNull : Boolean read GetREF_PEDIDOIsNull write SetREF_PEDIDOIsNull; property OldREF_PEDIDO : String read GetOldREF_PEDIDOValue; property OldREF_PEDIDOIsNull : Boolean read GetOldREF_PEDIDOIsNull; + property ID_CONTRATO : Integer read GetID_CONTRATOValue write SetID_CONTRATOValue; + property ID_CONTRATOIsNull : Boolean read GetID_CONTRATOIsNull write SetID_CONTRATOIsNull; + property OldID_CONTRATO : Integer read GetOldID_CONTRATOValue; + property OldID_CONTRATOIsNull : Boolean read GetOldID_CONTRATOIsNull; property REF_CONTRATO : String read GetREF_CONTRATOValue write SetREF_CONTRATOValue; property REF_CONTRATOIsNull : Boolean read GetREF_CONTRATOIsNull write SetREF_CONTRATOIsNull; property OldREF_CONTRATO : String read GetOldREF_CONTRATOValue; @@ -629,6 +638,10 @@ type property LISTA_NOMBRESIsNull : Boolean read GetLISTA_NOMBRESIsNull write SetLISTA_NOMBRESIsNull; property OldLISTA_NOMBRES : String read GetOldLISTA_NOMBRESValue; property OldLISTA_NOMBRESIsNull : Boolean read GetOldLISTA_NOMBRESIsNull; + property TRABAJOS_INSTALADOR : IROStrings read GetTRABAJOS_INSTALADORValue; + property TRABAJOS_INSTALADORIsNull : Boolean read GetTRABAJOS_INSTALADORIsNull write SetTRABAJOS_INSTALADORIsNull; + property OldTRABAJOS_INSTALADOR : IROStrings read GetOldTRABAJOS_INSTALADORValue; + property OldTRABAJOS_INSTALADORIsNull : Boolean read GetOldTRABAJOS_INSTALADORIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; @@ -638,7 +651,7 @@ type { IAlbaranesCliente_DetallesDelta } IAlbaranesCliente_DetallesDelta = interface(IAlbaranesCliente_Detalles) - ['{2ACFBDE5-B171-408C-A739-A72B52566077}'] + ['{D4709917-AA42-498A-AB7B-304623533C8F}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_ALBARANValue : Integer; @@ -888,6 +901,10 @@ begin StrList := TStringList.Create; StrList.OnChange := INCIDENCIAS_OnChange; f_INCIDENCIAS := NewROStrings(StrList,True); + + StrList := TStringList.Create; + StrList.OnChange := TRABAJOS_INSTALADOR_OnChange; + f_TRABAJOS_INSTALADOR := NewROStrings(StrList,True); end; destructor TAlbaranesClienteBusinessProcessorRules.Destroy; @@ -905,35 +922,9 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteINCIDENCIAS] := TStringList(Sender).Text; end; -function TAlbaranesClienteBusinessProcessorRules.GetID_CONTRATOValue: Integer; +procedure TAlbaranesClienteBusinessProcessorRules.TRABAJOS_INSTALADOR_OnChange(Sender: TObject); begin - result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO]; -end; - -function TAlbaranesClienteBusinessProcessorRules.GetID_CONTRATOIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO]); -end; - -function TAlbaranesClienteBusinessProcessorRules.GetOldID_CONTRATOValue: Integer; -begin - result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_CONTRATO]; -end; - -function TAlbaranesClienteBusinessProcessorRules.GetOldID_CONTRATOIsNull: Boolean; -begin - result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_CONTRATO]); -end; - -procedure TAlbaranesClienteBusinessProcessorRules.SetID_CONTRATOValue(const aValue: Integer); -begin - BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO] := aValue; -end; - -procedure TAlbaranesClienteBusinessProcessorRules.SetID_CONTRATOIsNull(const aValue: Boolean); -begin - if aValue then - BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO] := Null; + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteTRABAJOS_INSTALADOR] := TStringList(Sender).Text; end; function TAlbaranesClienteBusinessProcessorRules.GetIDValue: Integer; @@ -1339,6 +1330,37 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteREF_PEDIDO] := Null; end; +function TAlbaranesClienteBusinessProcessorRules.GetID_CONTRATOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetID_CONTRATOIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO]); +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldID_CONTRATOValue: Integer; +begin + result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_CONTRATO]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldID_CONTRATOIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteID_CONTRATO]); +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetID_CONTRATOValue(const aValue: Integer); +begin + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO] := aValue; +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetID_CONTRATOIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteID_CONTRATO] := Null; +end; + function TAlbaranesClienteBusinessProcessorRules.GetREF_CONTRATOValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteREF_CONTRATO]; @@ -2356,6 +2378,34 @@ begin BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteLISTA_NOMBRES] := Null; end; +function TAlbaranesClienteBusinessProcessorRules.GetTRABAJOS_INSTALADORValue: IROStrings; +begin + result := f_TRABAJOS_INSTALADOR; + result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteTRABAJOS_INSTALADOR]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetTRABAJOS_INSTALADORIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteTRABAJOS_INSTALADOR]); +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldTRABAJOS_INSTALADORValue: IROStrings; +begin + result := NewROStrings(); + result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteTRABAJOS_INSTALADOR]; +end; + +function TAlbaranesClienteBusinessProcessorRules.GetOldTRABAJOS_INSTALADORIsNull: Boolean; +begin + result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlbaranesClienteTRABAJOS_INSTALADOR]); +end; + +procedure TAlbaranesClienteBusinessProcessorRules.SetTRABAJOS_INSTALADORIsNull(const aValue: Boolean); +begin + if aValue then + BusinessProcessor.CurrentChange.NewValueByName[fld_AlbaranesClienteTRABAJOS_INSTALADOR] := Null; +end; + { TAlbaranesCliente_DetallesBusinessProcessorRules } constructor TAlbaranesCliente_DetallesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm index ed5c59e1..a923b694 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm @@ -164,6 +164,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Name = 'PAGINA_WEB_EMPRESA' DataType = datString Size = 255 + end + item + Name = 'INCIDENCIAS' + DataType = datMemo + end + item + Name = 'TRABAJOS_INSTALADOR' + DataType = datMemo end> Params = < item @@ -319,12 +327,13 @@ object RptAlbaranesCliente: TRptAlbaranesCliente 'RESAS.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRESAS.TELEFONO_1 AS T' + 'ELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' EMPRESAS.MOV' + 'IL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_1_EMPRESA,'#10 + - ' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA'#10'FROM'#10' ALBARANES_CLI' + - 'ENTE'#10' INNER JOIN EMPRESAS ON (EMPRESAS.ID = ALBARANES_CLIENTE.I' + - 'D_EMPRESA)'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = ALBARANES_C' + - 'LIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS_DIRECCIONES ON (C' + - 'ONTACTOS_DIRECCIONES.ID = ALBARANES_CLIENTE.ID_DIRECCION)'#10'WHERE ' + - 'ALBARANES_CLIENTE.ID = :ID'#10 + ' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA,'#10' ALBARANES_CLIENTE' + + '.INCIDENCIAS,'#10' ALBARANES_CLIENTE.TRABAJOS_INSTALADOR'#10'FROM'#10' ALB' + + 'ARANES_CLIENTE'#10' INNER JOIN EMPRESAS ON (EMPRESAS.ID = ALBARANES' + + '_CLIENTE.ID_EMPRESA)'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = A' + + 'LBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS_DIRECCI' + + 'ONES ON (CONTACTOS_DIRECCIONES.ID = ALBARANES_CLIENTE.ID_DIRECCI' + + 'ON)'#10'WHERE ALBARANES_CLIENTE.ID = :ID'#10 StatementType = stSQL ColumnMappings = < item @@ -452,6 +461,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente DatasetField = 'MOVIL' TableField = '' SQLOrigin = 'MOVIL' + end + item + DatasetField = 'INCIDENCIAS' + TableField = 'INCIDENCIAS' + end + item + DatasetField = 'TRABAJOS_INSTALADOR' + TableField = 'TRABAJOS_INSTALADOR' end> end> Name = 'Informe_Cabecera' @@ -602,6 +619,14 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Name = 'PAGINA_WEB_EMPRESA' DataType = datString Size = 255 + end + item + Name = 'INCIDENCIAS' + DataType = datMemo + end + item + Name = 'TRABAJOS_INSTALADOR' + DataType = datMemo end> end item @@ -1075,7 +1100,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente PrintOptions.Printer = 'Default' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 37871.995398692100000000 - ReportOptions.LastChange = 42583.535851493060000000 + ReportOptions.LastChange = 44795.515802407400000000 ReportOptions.VersionBuild = '1' ReportOptions.VersionMajor = '12' ReportOptions.VersionMinor = '13' diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas index 393720cf..3c4ee351 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas @@ -37,11 +37,13 @@ type private FConnection: IDAConnection; FVerPrecios: Boolean; + FVerTrabajos: Boolean; + FVerIncidencias: Boolean; //Genera cada uno de los albaranes a imprimir procedure _GenerarAlbaran(const ID: Integer); public - function GenerarAlbaran(const ListaID : TIntegerArray; const VerPrecios: Boolean): Binary; - function GenerarAlbaranEnPDF(const ListaID : TIntegerArray; const VerPrecios: Boolean): Binary; + function GenerarAlbaran(const ListaID : TIntegerArray; const VerPrecios: Boolean; const VerTrabajos: Boolean; const VerIncidencias: Boolean): Binary; + function GenerarAlbaranEnPDF(const ListaID : TIntegerArray; const VerPrecios: Boolean; const VerTrabajos: Boolean; const VerIncidencias: Boolean): Binary; function GenerarEtiquetas(const AID : Integer; withRefCliente: Boolean): Binary; end; @@ -73,13 +75,15 @@ begin end; -function TRptAlbaranesCliente.GenerarAlbaran(const ListaID : TIntegerArray; const VerPrecios: Boolean): Binary; +function TRptAlbaranesCliente.GenerarAlbaran(const ListaID : TIntegerArray; const VerPrecios: Boolean; const VerTrabajos: Boolean; const VerIncidencias: Boolean): Binary; var i: Integer; begin Result := Binary.Create; //Inicializamos parametros FVerPrecios := VerPrecios; + FVerTrabajos := VerTrabajos; + FVerIncidencias := VerIncidencias; //Vamos generando todos y cada uno de los presupuestos recibidos for i := 0 to ListaID.Count - 1 do @@ -88,13 +92,15 @@ begin frxReport.PreviewPages.SaveToStream(Result); end; -function TRptAlbaranesCliente.GenerarAlbaranEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean): Binary; +function TRptAlbaranesCliente.GenerarAlbaranEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerTrabajos: Boolean; const VerIncidencias: Boolean): Binary; var i: Integer; begin Result := Binary.Create; //Inicializamos parametros FVerPrecios := VerPrecios; + FVerTrabajos := VerTrabajos; + FVerIncidencias := VerIncidencias; //Vamos generando todos y cada uno de los presupuestos recibidos for i := 0 to ListaID.Count - 1 do @@ -125,7 +131,9 @@ begin raise Exception.Create (('Error Servidor: _GenerarAlbaran, no encuentra informe' + rptInfAlbaran)); frxReport.LoadFromFile(AInforme, True); - frxReport.Variables.Variables['VerPrecios'] := FVerPrecios; + frxReport.Variables.Variables['VerPrecios'] := FVerPrecios; + frxReport.Variables.Variables['VerTrabajos'] := FVerTrabajos; + frxReport.Variables.Variables['VerIncidencias'] := FVerIncidencias; frxReport.ReportOptions.Name := 'Albarán de cliente ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; frxReport.PrepareReport(False); finally diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm index dfadf209..c8d02feb 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm @@ -235,15 +235,14 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente item DatasetField = 'LISTA_NOMBRES' TableField = 'LISTA_NOMBRES' + end + item + DatasetField = 'TRABAJOS_INSTALADOR' + TableField = 'TRABAJOS_INSTALADOR' end> end> Name = 'AlbaranesCliente' Fields = < - item - Name = 'ID_CONTRATO' - DataType = datInteger - DictionaryEntry = 'AlbaranesCliente_ID_CONTRATO' - end item Name = 'ID' DataType = datAutoInc @@ -321,6 +320,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Size = 255 DictionaryEntry = 'AlbaranesCliente_REF_PEDIDO' end + item + Name = 'ID_CONTRATO' + DataType = datInteger + DictionaryEntry = 'AlbaranesCliente_ID_CONTRATO' + end item Name = 'REF_CONTRATO' DataType = datString @@ -504,6 +508,10 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente DataType = datString Size = 255 DictionaryEntry = 'AlbaranesCliente_LISTA_NOMBRES' + end + item + Name = 'TRABAJOS_INSTALADOR' + DataType = datMemo end> end item @@ -718,12 +726,12 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Value = '' end item - Name = 'ID_CONTRATO' + Name = 'ID_FACTURA' DataType = datInteger Value = '' end item - Name = 'ID_FACTURA' + Name = 'ID_CONTRATO' DataType = datInteger Value = '' end @@ -859,6 +867,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente Name = 'ID_TIENDA' DataType = datInteger Value = '' + end + item + Name = 'TRABAJOS_INSTALADOR' + DataType = datMemo + Value = '' end> Statements = < item @@ -874,16 +887,17 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente 'E_DESCUENTO,'#10' BASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_TOTA' + 'L, OBSERVACIONES, '#10' INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_' + 'ALTA,'#10' USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO, FECHA_E' + - 'NVIO, '#10' FECHA_RECEPCION, ID_TIENDA)'#10' VALUES'#10' (:ID, :ID_E' + - 'MPRESA, :ID_CLIENTE, :FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' :R' + - 'EFERENCIA_CLIENTE, :ID_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :ID_CON' + - 'TRATO, :ID_DIRECCION,'#10' :CALLE, :CODIGO_POSTAL, :POBLACION, :' + - 'PROVINCIA, :PERSONA_CONTACTO,'#10' :TELEFONO, :MOVIL, :IMPORTE_N' + - 'ETO, :IMPORTE_PORTE, :DESCUENTO, :IMPORTE_DESCUENTO,'#10' :BASE_' + - 'IMPONIBLE, :IVA, :IMPORTE_IVA, :IMPORTE_TOTAL, :OBSERVACIONES,'#10' ' + - ' :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, CURRENT_TIMESTAMP,'#10' ' + - ':USUARIO, :ID_FORMA_PAGO, :FECHA_PREVISTA_ENVIO, :FECHA_ENVIO, :' + - 'FECHA_RECEPCION,'#10' :ID_TIENDA)'#10' '#10' '#10#10 + 'NVIO, '#10' FECHA_RECEPCION, ID_TIENDA, TRABAJOS_INSTALADOR)'#10' V' + + 'ALUES'#10' (:ID, :ID_EMPRESA, :ID_CLIENTE, :FECHA_ALBARAN, :TIPO,' + + ' :REFERENCIA,'#10' :REFERENCIA_CLIENTE, :ID_ALMACEN, :ID_PEDIDO,' + + ' :ID_FACTURA, :ID_CONTRATO, :ID_DIRECCION,'#10' :CALLE, :CODIGO_' + + 'POSTAL, :POBLACION, :PROVINCIA, :PERSONA_CONTACTO,'#10' :TELEFON' + + 'O, :MOVIL, :IMPORTE_NETO, :IMPORTE_PORTE, :DESCUENTO, :IMPORTE_D' + + 'ESCUENTO,'#10' :BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, :IMPORTE_TOT' + + 'AL, :OBSERVACIONES,'#10' :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, CUR' + + 'RENT_TIMESTAMP,'#10' :USUARIO, :ID_FORMA_PAGO, :FECHA_PREVISTA_E' + + 'NVIO, :FECHA_ENVIO, :FECHA_RECEPCION,'#10' :ID_TIENDA, :TRABAJOS' + + '_INSTALADOR)'#10' '#10' '#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -908,11 +922,6 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente end item Params = < - item - Name = 'ID_CONTRATO' - DataType = datInteger - Value = '' - end item Name = 'ID_EMPRESA' DataType = datInteger @@ -961,6 +970,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente DataType = datInteger Value = '' end + item + Name = 'ID_CONTRATO' + DataType = datInteger + Value = '' + end item Name = 'ID_DIRECCION' DataType = datInteger @@ -1094,6 +1108,11 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente DataType = datInteger Value = '' end + item + Name = 'TRABAJOS_INSTALADOR' + DataType = datMemo + Value = '' + end item Name = 'OLD_ID' Value = '' @@ -1123,7 +1142,8 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente 'SUARIO = :USUARIO, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' FEC' + 'HA_PREVISTA_ENVIO = :FECHA_PREVISTA_ENVIO, '#10' FECHA_ENVIO = :F' + 'ECHA_ENVIO, '#10' FECHA_RECEPCION = :FECHA_RECEPCION,'#10' ID_TIEN' + - 'DA = :ID_TIENDA'#10' WHERE'#10' (ID = :OLD_ID)'#10 + 'DA = :ID_TIENDA,'#10' TRABAJOS_INSTALADOR = :TRABAJOS_INSTALADOR'#10 + + ' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas index 3f68d4c6..448d5e7c 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas @@ -32,7 +32,7 @@ type procedure DARemoteServiceCreate(Sender: TObject); protected { IsrvAlbaranesCliente methods } - function GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerTrabajos: Boolean; const VerIncidencias: Boolean): Binary; function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; end; @@ -81,13 +81,13 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvAlbaranesCliente.GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean): Binary; +function TsrvAlbaranesCliente.GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerTrabajos: Boolean; const VerIncidencias: Boolean): Binary; var AReportGenerator : TRptAlbaranesCliente; begin AReportGenerator := TRptAlbaranesCliente.Create(nil); try - Result := AReportGenerator.GenerarAlbaran(ListaID, VerPrecios); + Result := AReportGenerator.GenerarAlbaran(ListaID, VerPrecios, VerTrabajos, VerIncidencias); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk index f4f071fb..205b36c4 100644 --- a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk +++ b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dpk @@ -34,7 +34,9 @@ requires Almacenes_controller, AlbCli_FacCli_relation, ContratosCliente_controller, - ConCli_AlbCli_relation; + ConCli_AlbCli_relation, + rtl, + vcl; contains uAlbaranesClienteViewRegister in 'uAlbaranesClienteViewRegister.pas', @@ -52,6 +54,7 @@ contains uViewAlbaranesDevCliente in 'uViewAlbaranesDevCliente.pas' {frViewAlbaranesDevCliente: TCustomView}, uEditorAlbaranDevCliente in 'uEditorAlbaranDevCliente.pas' {fEditorAlbaranDevCliente: TCustomEditor}, uViewAlbaranDevCliente in 'uViewAlbaranDevCliente.pas' {frViewAlbaranDevCliente: TCustomView}, - uViewDatosYSeleccionClienteAlbaran in 'uViewDatosYSeleccionClienteAlbaran.pas' {frViewDatosYSeleccionClienteAlbaran: TCustomView}; + uViewDatosYSeleccionClienteAlbaran in 'uViewDatosYSeleccionClienteAlbaran.pas' {frViewDatosYSeleccionClienteAlbaran: TCustomView}, + uDialogOpcionesImpresionAlbaranesCliente in 'uDialogOpcionesImpresionAlbaranesCliente.pas' {fDialogOpcionesImpresionAlbaranesCliente: TfDialogOpcionesImpresionAlbaranesCliente}; end. diff --git a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj index 3f152c59..0444137d 100644 --- a/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj +++ b/Source/Modulos/Albaranes de cliente/Views/AlbaranesCliente_view.dproj @@ -55,6 +55,10 @@ + + + + File c:\archivos de programa\borland\delphi10\Bin\dclIntraweb_80_100.bpl not found File c:\archivos de programa\borland\delphi10\Bin\dclnet100.bpl not found File c:\archivos de programa\borland\delphi10\Bin\dclsoap100.bpl not found @@ -66,17 +70,22 @@ MainSource - - - - - - - - - - + + + + + + + + + + + + +
fDialogOpcionesImpresionAlbaranesCliente
+ TfEditorElegirArticulosAlbaranCliente +
fEditorAlbaranCliente
TfEditorAlbaranCliente @@ -137,6 +146,7 @@
frViewElegirArticulosAlbaranesCliente
TFrame
+