diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 804fd31..641697d 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj index a0c3f23..7dae4e8 100644 --- a/Source/Base/Base.dproj +++ b/Source/Base/Base.dproj @@ -65,55 +65,55 @@ MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fConfigurarConexion
TForm diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj index b044e14..e1875bd 100644 --- a/Source/GUIBase/GUIBase.dproj +++ b/Source/GUIBase/GUIBase.dproj @@ -58,34 +58,34 @@ MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fDialogBase
diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas index 579b97f..040991a 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); - procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false); + procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); + procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; VerLogotipo: 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); - procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false); + procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); + procedure Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); @@ -1002,7 +1002,7 @@ begin end; end; -procedure TAlbaranesClienteController.Preview(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false); +procedure TAlbaranesClienteController.Preview(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); var AReportController : IAlbaranesClienteReportController; ID_Albaranes: TIntegerList; @@ -1030,7 +1030,7 @@ begin else ID_Albaranes.Add(AAlbaran.ID); - AReportController.Preview(ID_Albaranes); + AReportController.Preview(ID_Albaranes, VerLogotipo); finally AReportController := NIL; @@ -1038,7 +1038,7 @@ begin end; end; -procedure TAlbaranesClienteController.Print(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false); +procedure TAlbaranesClienteController.Print(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); var AReportController : IAlbaranesClienteReportController; ID_Albaranes: TIntegerList; @@ -1064,7 +1064,7 @@ begin else ID_Albaranes.Add(AAlbaran.ID); - AReportController.Print(ID_Albaranes); + AReportController.Print(ID_Albaranes, VerLogotipo); finally AReportController := NIL; diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas index 794b809..fc2169e 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); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); + procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean); procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean); function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; @@ -26,8 +26,8 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); + procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); procedure EtiquetasPreview(const AID : integer; Const withRefCliente: Boolean); procedure EtiquetasPrint(const AID : integer; Const withRefCliente: Boolean); function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; @@ -113,8 +113,7 @@ begin end; end; -function TAlbaranesClienteReportController.ExportToPDF(const AID: Integer; - const AFileName: String): Boolean; +function TAlbaranesClienteReportController.ExportToPDF(const AID: Integer; const AFileName: String): Boolean; var AStream: Binary; begin @@ -124,7 +123,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptPDFAlbaran(AID); + AStream := FDataModule.GetRptPDFAlbaran(AID, True); try AStream.SaveToFile(AFileName); Result := True; @@ -136,14 +135,14 @@ begin end; end; -procedure TAlbaranesClienteReportController.Preview(const AListaID : TIntegerList); +procedure TAlbaranesClienteReportController.Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); var AStream: Binary; AEditor : IEditorAlbaranesClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetRptAlbaranes(AListaID); + AStream := FDataModule.GetRptAlbaranes(AListaID, VerLogotipo); try CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); if Assigned(AEditor) then @@ -164,7 +163,7 @@ begin end; end; -procedure TAlbaranesClienteReportController.Print(const AListaID : TIntegerList); +procedure TAlbaranesClienteReportController.Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); var AStream: Binary; AEditor : IEditorAlbaranesClientePreview; @@ -173,7 +172,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptAlbaranes(AListaID); + AStream := FDataModule.GetRptAlbaranes(AListaID, VerLogotipo); try CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); if Assigned(AEditor) then diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas index dac9c60..f0b1498 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): Binary; + function GetRptAlbaranes(const ListaID: TIntegerList; const VerLogotipo: Boolean): Binary; function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; - function GetRptPDFAlbaran(const AID: Integer): Binary; + function GetRptPDFAlbaran(const AID: Integer; const VerLogotipo: Boolean): Binary; end; implementation @@ -63,27 +63,26 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleAlbaranesCliente.GetRptAlbaranes(const ListaID: TIntegerList): Binary; +function TDataModuleAlbaranesCliente.GetRptAlbaranes(const ListaID: TIntegerList; const VerLogotipo: Boolean): Binary; var AParam : TIntegerArray; begin AParam := ListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam); + Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam, VerLogotipo); finally FreeAndNil(AParam); end; end; -function TDataModuleAlbaranesCliente.GetRptPDFAlbaran( - const AID: Integer): Binary; +function TDataModuleAlbaranesCliente.GetRptPDFAlbaran(const AID: Integer; const VerLogotipo: Boolean): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam); + Result := (RORemoteService as IsrvAlbaranesCliente).GenerarInforme(AParam, VerLogotipo); 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 1b2f871..b63c1aa 100644 --- a/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas +++ b/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas @@ -8,9 +8,9 @@ uses type IDataModuleAlbaranesClienteReport = interface ['{42C55204-5AB9-403E-8385-1A62B02D8234}'] - function GetRptAlbaranes(const ListaID: TIntegerList): Binary; + function GetRptAlbaranes(const ListaID: TIntegerList; const VerLogotipo: Boolean): Binary; function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; - function GetRptPDFAlbaran(const AID: Integer): Binary; + function GetRptPDFAlbaran(const AID: Integer; const VerLogotipo: Boolean): Binary; end; implementation diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas index d1a2c61..cd06a29 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas @@ -36,11 +36,12 @@ type procedure DataModuleCreate(Sender: TObject); private FConnection: IDAConnection; + FVerLogotipo: Boolean; //Genera cada uno de los albaranes a imprimir procedure _GenerarAlbaran(const ID: Integer); public - function GenerarAlbaran(const ListaID : TIntegerArray): Binary; - function GenerarAlbaranEnPDF(const ListaID : TIntegerArray): Binary; + function GenerarAlbaran(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary; + function GenerarAlbaranEnPDF(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary; function GenerarEtiquetas(const AID : Integer; withRefCliente: Boolean): Binary; end; @@ -71,11 +72,14 @@ begin frxReport.EngineOptions.NewSilentMode := simReThrow; end; -function TRptAlbaranesCliente.GenerarAlbaran(const ListaID : TIntegerArray): Binary; +function TRptAlbaranesCliente.GenerarAlbaran(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary; var i: Integer; begin Result := Binary.Create; + //Inicializamos parametros + FVerLogotipo := VerLogotipo; + //Vamos generando todos y cada uno de los presupuestos recibidos for i := 0 to ListaID.Count - 1 do _GenerarAlbaran(ListaID.Items[i]); @@ -83,13 +87,15 @@ begin frxReport.PreviewPages.SaveToStream(Result); end; -function TRptAlbaranesCliente.GenerarAlbaranEnPDF( - const ListaID: TIntegerArray): Binary; +function TRptAlbaranesCliente.GenerarAlbaranEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean = True): Binary; var i: Integer; begin Result := Binary.Create; + //Inicializamos parametros + FVerLogotipo := VerLogotipo; + //Vamos generando todos y cada uno de los presupuestos recibidos for i := 0 to ListaID.Count - 1 do _GenerarAlbaran(ListaID.Items[i]); @@ -119,7 +125,8 @@ begin raise Exception.Create (('Error Servidor: _GenerarAlbaran, no encuentra informe' + rptInfAlbaran)); frxReport.LoadFromFile(AInforme, True); - frxReport.ReportOptions.Name := 'Albarán de cliente ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; + frxReport.Variables.Variables['VerLogotipo'] := FVerLogotipo; + frxReport.ReportOptions.Name := 'Albarán de cliente ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; frxReport.PrepareReport(False); finally FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas index 28dfe9c..0ad6e40 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): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; end; @@ -81,14 +81,13 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvAlbaranesCliente.GenerarInforme( - const ListaID: TIntegerArray): Binary; +function TsrvAlbaranesCliente.GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; var AReportGenerator : TRptAlbaranesCliente; begin AReportGenerator := TRptAlbaranesCliente.Create(nil); try - Result := AReportGenerator.GenerarAlbaran(ListaID); + Result := AReportGenerator.GenerarAlbaran(ListaID, VerLogotipo); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm index 14d8c4d..5abfacf 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm @@ -360,6 +360,7 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente inherited eImporteNeto: TcxDBCurrencyEdit Left = 93 Top = 11 + Enabled = True Style.IsFontAssigned = True ExplicitLeft = 93 ExplicitTop = 11 @@ -406,6 +407,9 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente ShowCaption = False ShowBorder = False inherited dxLayoutControl1Group2: TdxLayoutGroup + inherited dxLayoutControl1Item8: TdxLayoutItem + Visible = False + end inherited dxLayoutControl1Group7: TdxLayoutGroup Visible = False end diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas index 06daa57..5bfbcac 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas @@ -223,9 +223,13 @@ begin end; procedure TfEditorAlbaranCliente.ImprimirInterno; +var + AVerLogotipo: Boolean; begin inherited; - FController.Print(FAlbaran); + AVerLogotipo := True; + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Print(FAlbaran, False, AVerLogotipo); end; procedure TfEditorAlbaranCliente.OnClienteChanged(Sender: TObject); @@ -306,9 +310,13 @@ begin end; procedure TfEditorAlbaranCliente.PrevisualizarInterno; +var + AVerLogotipo: Boolean; begin inherited; - FController.Preview(FAlbaran); + AVerLogotipo := True; + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Preview(FAlbaran, False, AVerLogotipo); end; procedure TfEditorAlbaranCliente.RecalcularPortePorUnidad; diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm index ebbb83c..53e0775 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm @@ -2,7 +2,6 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente Caption = 'Lista de albaranes de cliente' ClientWidth = 583 ExplicitWidth = 591 - ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas index fea01f7..8ce0f4d 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas @@ -387,10 +387,11 @@ var Respuesta : Integer; AAlbaranes: IBizAlbaranCliente; AllItems: Boolean; - + AVerLogotipo: Boolean; begin AAlbaranes := Nil; AllItems := False; + AVerLogotipo := True; if MultiSelect and Assigned(ViewGrid) then AllItems := (ViewGrid.NumSeleccionados > 1); @@ -417,7 +418,10 @@ begin AAlbaranes := Albaranes; if Assigned(AAlbaranes) then - FController.Print(AAlbaranes, AllItems); + begin + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Print(AAlbaranes, AllItems, AVerLogotipo); + end; end; end; end; @@ -485,9 +489,12 @@ var Respuesta : Integer; AAlbaranes: IBizAlbaranCliente; AllItems: Boolean; + AVerLogotipo: Boolean; + begin AAlbaranes := Nil; AllItems := False; + AVerLogotipo := True; if MultiSelect and Assigned(ViewGrid) then AllItems := (ViewGrid.NumSeleccionados > 1); @@ -514,7 +521,10 @@ begin AAlbaranes := Albaranes; if Assigned(AAlbaranes) then - FController.Preview(AAlbaranes, AllItems); + begin + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Preview(AAlbaranes, AllItems, AVerLogotipo); + end; end; end; end; diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm index 4bf64cd..71422af 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranCliente.dfm @@ -100,8 +100,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente inherited dxLayoutControl1: TdxLayoutControl Width = 442 Height = 221 - ExplicitWidth = 452 - ExplicitHeight = 226 + ExplicitWidth = 442 + ExplicitHeight = 221 inherited edtlNombre: TcxDBTextEdit ExplicitWidth = 224 Width = 224 @@ -458,6 +458,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'REFERENCIA_CLIENTE' DataBinding.DataSource = DADataSource + Enabled = False Properties.ReadOnly = False Properties.ValidateOnEnter = True Style.BorderColor = clWindowFrame @@ -507,6 +508,7 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente Top = 224 Width = 373 Height = 41 + Enabled = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 @@ -572,6 +574,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente end object dxLayoutControl1Item23: TdxLayoutItem Caption = 'Ref. cliente:' + Enabled = False + Visible = False Control = eRefCliente ControlOptions.ShowBorder = False end @@ -641,6 +645,8 @@ inherited frViewAlbaranCliente: TfrViewAlbaranCliente end object dxLayoutControl1Group17: TdxLayoutGroup Caption = 'El albar'#225'n pertenece a la tienda' + Enabled = False + Visible = False object dxLayoutControl1Item17: TdxLayoutItem Caption = 'New Item' ShowCaption = False diff --git a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm index 38774d1..9d851db 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uViewAlbaranesCliente.dfm @@ -63,6 +63,8 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente object cxGridViewTIENDA: TcxGridDBColumn Caption = 'Tienda' DataBinding.FieldName = 'TIENDA' + Visible = False + VisibleForCustomization = False end object cxGridViewREFERENCIA: TcxGridDBColumn DataBinding.FieldName = 'REFERENCIA' @@ -171,17 +173,21 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente end object cxGridLevelPendientes: TcxGridLevel Caption = 'Pendientes' + Visible = False end object cxGridLevelEnviados: TcxGridLevel Caption = 'Enviados' + Visible = False end object cxGridLevelServidos: TcxGridLevel Caption = 'Servidos' + Visible = False end object cxGridLevelProximosAEnviar: TcxGridLevel Caption = 'Pasados de fecha' Options.DetailFrameColor = clNone Options.DetailFrameWidth = 0 + Visible = False end end inherited frViewFiltroBase1: TfrViewFiltroBase @@ -193,15 +199,27 @@ inherited frViewAlbaranesCliente: TfrViewAlbaranesCliente Width = 596 ExplicitWidth = 596 inherited txtFiltroTodo: TcxTextEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 499 Width = 499 end inherited edtFechaIniFiltro: TcxDateEdit + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 147 Width = 147 end inherited edtFechaFinFiltro: TcxDateEdit Left = 251 + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 251 ExplicitWidth = 335 Width = 335 diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas index 8436ff6..1957c18 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteController.pas @@ -54,8 +54,8 @@ type function EsModificable(AContrato : IBizContratoCliente): Boolean; function EsEliminable(AContrato : IBizContratoCliente): Boolean; - procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false); - procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false); + procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); + procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure EnviarContratoPorEMail(AContrato : IBizContratoCliente); function CambiarSituacion(AContrato : IBizContratoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; @@ -126,8 +126,8 @@ type function EsModificable(AContrato : IBizContratoCliente): Boolean; function EsEliminable(AContrato : IBizContratoCliente): Boolean; - procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false); - procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false); + procedure Preview(AContrato : IBizContratoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); + procedure Print(AContrato : IBizContratoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure EnviarContratoPorEMail(AContrato : IBizContratoCliente); function CambiarSituacion(AContrato : IBizContratoCliente; Situacion: String; FechaDecision: TDateTime; AllItems: Boolean = false): Boolean; @@ -967,7 +967,7 @@ begin Result := AContrato; end; -procedure TContratosClienteController.Preview(AContrato: IBizContratoCliente; AllItems: Boolean = false); +procedure TContratosClienteController.Preview(AContrato: IBizContratoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); var AReportController : IContratosClienteReportController; ID_Contratos: TIntegerList; @@ -993,14 +993,14 @@ begin else ID_Contratos.Add(AContrato.ID); - AReportController.Preview(ID_Contratos); + AReportController.Preview(ID_Contratos, VerLogotipo); finally AReportController := NIL; FreeAndNil(ID_Contratos); end; end; -procedure TContratosClienteController.Print(AContrato: IBizContratoCliente; AllItems: Boolean = false); +procedure TContratosClienteController.Print(AContrato: IBizContratoCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); var AReportController : IContratosClienteReportController; ID_Contratos: TIntegerList; @@ -1025,7 +1025,7 @@ begin else ID_Contratos.Add(AContrato.ID); - AReportController.Print(ID_Contratos); + AReportController.Print(ID_Contratos, VerLogotipo); finally AReportController := NIL; diff --git a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas index 3cc6711..7a7f2bf 100644 --- a/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas +++ b/Source/Modulos/Contratos de cliente/Controller/uContratosClienteReportController.pas @@ -10,8 +10,8 @@ uses type IContratosClienteReportController = interface(IControllerBase) ['{FEF47B69-26A3-462A-AF6D-4B2073D4F9DC}'] - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); + procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; end; @@ -23,8 +23,8 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); + procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); function ExportToPDF(const AID: Integer; const AFileName : String = ''): Boolean; end; @@ -83,7 +83,7 @@ begin } end; -procedure TContratosClienteReportController.Preview(const AListaID : TIntegerList); +procedure TContratosClienteReportController.Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); var AStream: Binary; AEditor : IEditorContratosClientePreview; @@ -92,7 +92,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetRptContratos(AListaID); + AStream := FDataModule.GetRptContratos(AListaID, VerLogotipo); try CreateEditor('EditorContratosClientePreview', IEditorContratosClientePreview, AEditor); if Assigned(AEditor) then @@ -116,16 +116,16 @@ begin end; end; -procedure TContratosClienteReportController.Print(const AListaID : TIntegerList); -{var +procedure TContratosClienteReportController.Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); +var AStream: Binary; - AEditor : IEditorContratosClientePreview;} + AEditor : IEditorContratosClientePreview; begin -{ AEditor := NIL; + AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetRptPresupuestos(AListaID); + AStream := FDataModule.GetRptContratos(AListaID, VerLogotipo); try CreateEditor('EditorContratosClientePreview', IEditorContratosClientePreview, AEditor); if Assigned(AEditor) then @@ -133,7 +133,7 @@ begin try AEditor.Controller := Self; AEditor.ListaID := AListaID; - AEditor.Title := 'Presupuesto - ' + AppFactuGES.EmpresaActiva.NOMBRE; + AEditor.Title := 'Contrato - ' + AppFactuGES.EmpresaActiva.NOMBRE; AEditor.LoadFromStream(AStream); AEditor.Print; finally @@ -147,7 +147,6 @@ begin finally HideHourglassCursor; end; -} end; end. diff --git a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas index 4a37414..94b293f 100644 --- a/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Data/uDataModuleContratosCliente.pas @@ -49,8 +49,8 @@ type function NewItem : IBizContratoCliente; // Report - function GetRptContratos(const AListaID: TIntegerList): Binary; - function GetRptPDFContrato(const AID: Integer): Binary; + function GetRptContratos(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; + function GetRptPDFContrato(const AID: Integer; const VerLogotipo: Boolean): Binary; function GetAnosItems : TStringList; function GetContratosClienteBeneficios : IBizContratosClienteBeneficios; @@ -77,27 +77,26 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleContratosCliente.GetRptPDFContrato( - const AID: Integer): Binary; +function TDataModuleContratosCliente.GetRptPDFContrato(const AID: Integer; const VerLogotipo: Boolean): Binary; var AParam : TIntegerArray; begin AParam := TIntegerArray.Create; try AParam.Add(AID); - Result := (RORemoteService as IsrvContratosCliente).GenerarInformeEnPDF(AParam) + Result := (RORemoteService as IsrvContratosCliente).GenerarInformeEnPDF(AParam, VerLogotipo) finally FreeANDNIL(AParam) end; end; -function TDataModuleContratosCliente.GetRptContratos(const AListaID: TIntegerList): Binary; +function TDataModuleContratosCliente.GetRptContratos(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; var AParam : TIntegerArray; begin AParam := AListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvContratosCliente).GenerarInforme(AParam) + Result := (RORemoteService as IsrvContratosCliente).GenerarInforme(AParam, VerLogotipo) finally FreeANDNIL(AParam) end; diff --git a/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas b/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas index a883e0f..81cc31d 100644 --- a/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas +++ b/Source/Modulos/Contratos de cliente/Model/Data/uIDataModuleContratosClienteReport.pas @@ -8,8 +8,8 @@ uses type IDataModuleContratosClienteReport = interface ['{6AB7469B-842A-413E-AF33-9506477A9666}'] - function GetRptContratos(const AListaID: TIntegerList): Binary; - function GetRptPDFContrato(const AID: Integer): Binary; + function GetRptContratos(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; + function GetRptPDFContrato(const AID: Integer; const VerLogotipo: Boolean): Binary; end; implementation diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm index 746bca7..dbe85a1 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.dfm @@ -1010,7 +1010,6 @@ object RptContratosCliente: TRptContratosCliente Top = 128 end object IBDatabase1: TIBDatabase - Connected = True DatabaseName = 'C:\Codigo Acana\Output\Debug\Database\FACTUGES.FDB' Params.Strings = ( 'user_name=sysdba' @@ -1022,7 +1021,6 @@ object RptContratosCliente: TRptContratosCliente Top = 296 end object IBTransaction1: TIBTransaction - Active = True Left = 48 Top = 352 end diff --git a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas index 5eebb03..0eaca56 100644 --- a/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas +++ b/Source/Modulos/Contratos de cliente/Reports/uRptContratosCliente_Server.pas @@ -82,6 +82,7 @@ type FListaNombresClientes: TStringList; FImporteMinimo: Currency; FDesglosado : Boolean; + FVerLogotipo : Boolean; procedure _GenerarContrato(const AID : Integer); @@ -90,10 +91,10 @@ type function _GenerarInforme(const TipoInforme: String): Binary; procedure IniciarParametrosInforme; - procedure RecuperarNombresClientes; + procedure RecuperarNombresClientes; public - function GenerarContrato(const ListaID : TIntegerArray): Binary; - function GenerarContratoEnPDF(const ListaID : TIntegerArray): Binary; + function GenerarContrato(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary; + function GenerarContratoEnPDF(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary; function GenerarInformeListadoContratos(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; end; @@ -141,12 +142,15 @@ begin end; end; -function TRptContratosCliente.GenerarContratoEnPDF(const ListaID: TIntegerArray): Binary; +function TRptContratosCliente.GenerarContratoEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean = True): Binary; var i: Integer; begin Result := Binary.Create; try + //Inicializamos parametros + FVerLogotipo := VerLogotipo; + //Vamos generando todos y cada uno de los Contratos recibidos for i := 0 to ListaID.Count - 1 do _GenerarContrato(ListaID.Items[i]); @@ -478,12 +482,15 @@ begin end; end; -function TRptContratosCliente.GenerarContrato(const ListaID: TIntegerArray): Binary; +function TRptContratosCliente.GenerarContrato(const ListaID: TIntegerArray; const VerLogotipo: Boolean = True): Binary; var i: Integer; begin Result := Binary.Create; try + //Inicializamos parametros + FVerLogotipo := VerLogotipo; + //Vamos generando todos y cada uno de los Contratos recibidos for i := 0 to ListaID.Count - 1 do _GenerarContrato(ListaID.Items[i]); @@ -519,7 +526,7 @@ begin tbl_Cabecera.Active := False; tbl_Capitulos.Active := False; tbl_Detalles.Active := False; - tbl_Condiciones.Active := False; + tbl_Condiciones.Active := False; tbl_Cabecera.ParamByName('ID').AsInteger := AID; tbl_Capitulos.ParamByName('ID_PRE_CON').AsInteger := AID; @@ -531,13 +538,14 @@ begin tbl_Cabecera.Active := True; tbl_Capitulos.Active := True; tbl_Detalles.Active := True; - tbl_Condiciones.Active := True; + tbl_Condiciones.Active := True; AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString); if VarIsNull(AInforme) then raise Exception.Create (('Error Servidor: _GenerarContrato, no encuentra informe ' + rptInforme)); frxReport.LoadFromFile(AInforme, True); + frxReport.Variables.Variables['VerLogotipo'] := FVerLogotipo; frxReport.AddFunction('function PONERJUSTIFICACIONCOMPLETA(ARTFText : String): String', 'User Function',''); frxReport.ReportOptions.Name := 'Contrato ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; frxReport.PrepareReport(False); diff --git a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas index 4381145..13967ec 100644 --- a/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas +++ b/Source/Modulos/Contratos de cliente/Servidor/srvContratosCliente_Impl.pas @@ -33,8 +33,8 @@ type procedure DARemoteServiceCreate(Sender: TObject); protected { IsrvContratosCliente methods } - function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; end; implementation @@ -77,25 +77,25 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvContratosCliente.GenerarInforme(const ListaID: TIntegerArray): Binary; +function TsrvContratosCliente.GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; var AReportGenerator : TRptContratosCliente; begin AReportGenerator := TRptContratosCliente.Create(nil); try - Result := AReportGenerator.GenerarContrato(ListaID); + Result := AReportGenerator.GenerarContrato(ListaID, VerLogotipo); finally FreeAndNIL(AReportGenerator); end; end; -function TsrvContratosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; +function TsrvContratosCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; var AReportGenerator : TRptContratosCliente; begin AReportGenerator := TRptContratosCliente.Create(nil); try - Result := AReportGenerator.GenerarContratoEnPDF(ListaID); + Result := AReportGenerator.GenerarContratoEnPDF(ListaID, VerLogotipo); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm index f64d125..213b9df 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.dfm @@ -187,10 +187,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frViewDetallesContratoCliente1: TfrViewDetallesContratoCliente Left = 0 Top = 0 @@ -224,59 +220,82 @@ inherited fEditorContratoCliente: TfEditorContratoCliente end inherited FontName: TJvFontComboBox Left = 34 - ExplicitLeft = 34 + ExplicitLeft = 368 + ExplicitTop = 0 end inherited FontSize: TEdit - Left = 179 + Left = 513 + Top = 0 Width = 74 - ExplicitLeft = 179 + ExplicitLeft = 513 + ExplicitTop = 0 ExplicitWidth = 74 end inherited UpDown1: TUpDown - Left = 253 - ExplicitLeft = 253 + Left = 587 + Top = 0 + ExplicitLeft = 587 + ExplicitTop = 0 end inherited ToolButton13: TToolButton - Left = 270 - ExplicitLeft = 270 + Left = 604 + Top = 0 + ExplicitLeft = 604 + ExplicitTop = 0 end inherited ToolButton6: TToolButton - Left = 278 - ExplicitLeft = 278 + Left = 612 + Top = 0 + ExplicitLeft = 612 + ExplicitTop = 0 end inherited ToolButton7: TToolButton - Left = 312 - ExplicitLeft = 312 + Left = 646 + Top = 0 + ExplicitLeft = 646 + ExplicitTop = 0 end inherited ToolButton8: TToolButton - Left = 346 - ExplicitLeft = 346 + Left = 680 + Top = 0 + ExplicitLeft = 680 + ExplicitTop = 0 end inherited ToolButton12: TToolButton - Left = 380 - ExplicitLeft = 380 + Left = 714 + Top = 0 + ExplicitLeft = 714 + ExplicitTop = 0 end inherited ToolButton9: TToolButton - Left = 388 - ExplicitLeft = 388 + Left = 722 + Top = 0 + ExplicitLeft = 722 + ExplicitTop = 0 end inherited ToolButton10: TToolButton - Left = 422 - ExplicitLeft = 422 + Left = 756 + Top = 0 + ExplicitLeft = 756 + ExplicitTop = 0 end inherited ToolButton11: TToolButton - Left = 456 - ExplicitLeft = 456 + Left = 790 + Top = 0 + ExplicitLeft = 790 + ExplicitTop = 0 end end inherited cxGrid: TcxGrid + Top = 50 Width = 831 - Height = 170 + Height = 192 ExplicitTop = 50 ExplicitWidth = 834 ExplicitHeight = 273 end inherited TBXDock1: TTBXDock + Top = 24 Width = 831 ExplicitTop = 24 ExplicitWidth = 834 @@ -295,10 +314,6 @@ inherited fEditorContratoCliente: TfEditorContratoCliente object pagInicidencias: TTabSheet Caption = 'Incidencias' ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frViewIncidenciasCli: TfrViewIncidencias Left = 0 Top = 0 @@ -375,6 +390,10 @@ inherited fEditorContratoCliente: TfEditorContratoCliente inherited PnlComentario: TPanel Width = 845 ExplicitWidth = 845 + inherited lbComentario: TLabel + Width = 835 + Height = 25 + end end inline frViewTotales1: TfrViewTotales [5] Left = 0 diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas index 6ef92e8..d3eef8f 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratoCliente.pas @@ -284,10 +284,16 @@ begin end; procedure TfEditorContratoCliente.ImprimirInterno; +var + AVerLogotipo: Boolean; begin inherited; + AVerLogotipo := True; if not Modified then - FController.Print(FContrato); + begin + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Print(FContrato, False, AVerLogotipo); + end; end; procedure TfEditorContratoCliente.OnClienteChanged(Sender: TObject); @@ -345,10 +351,17 @@ begin end; procedure TfEditorContratoCliente.PrevisualizarInterno; +var + AVerLogotipo: Boolean; + begin inherited; + AVerLogotipo := True; if not Modified then - FController.Preview(FContrato); + begin + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Preview(FContrato, False, AVerLogotipo); + end; end; {procedure TfEditorContratoCliente.RecalcularPortePorUnidad; diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm index 95ce7a5..a6e8af1 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.dfm @@ -124,7 +124,7 @@ inherited fEditorContratosCliente: TfEditorContratosCliente Width = 805 ExplicitWidth = 805 inherited tbxMain: TTBXToolbar - ExplicitWidth = 775 + ExplicitWidth = 632 object TBXSubmenuItem3: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText diff --git a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas index b3b9fc6..1375898 100644 --- a/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas +++ b/Source/Modulos/Contratos de cliente/Views/uEditorContratosCliente.pas @@ -475,9 +475,12 @@ var Respuesta : Integer; AContratos: IBizContratoCliente; AllItems: Boolean; + AVerLogotipo: Boolean; + begin AContratos := Nil; AllItems := False; + AVerLogotipo := True; if MultiSelect and Assigned(ViewGrid) then AllItems := (ViewGrid.NumSeleccionados > 1); @@ -504,7 +507,10 @@ begin AContratos := Contratos; if Assigned(AContratos) then - FController.Print(AContratos, AllItems); + begin + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Print(AContratos, AllItems, AVerLogotipo); + end; end; end; end; @@ -548,9 +554,12 @@ var Respuesta : Integer; AContratos: IBizContratoCliente; AllItems: Boolean; + AVerLogotipo: Boolean; + begin AContratos := Nil; AllItems := False; + AVerLogotipo := True; if MultiSelect and Assigned(ViewGrid) then AllItems := (ViewGrid.NumSeleccionados > 1); @@ -577,7 +586,10 @@ begin AContratos := Contratos; if Assigned(AContratos) then - FController.Preview(AContratos, AllItems); + begin + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Preview(AContratos, AllItems, AVerLogotipo); + end; end; end; end; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index 62d2429..0781526 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -39,8 +39,8 @@ type function Duplicar(AFactura: IBizFacturaCliente): IBizFacturaCliente; function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; - procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); - procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure RecalcularImportes(AFactura: IBizFacturaCliente); @@ -102,8 +102,8 @@ type function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; procedure RecuperarCliente(AFactura : IBizFacturaCliente); - procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false); - procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false); + procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); + procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); procedure RecalcularImportes(AFactura: IBizFacturaCliente); function EsModificable(AFactura: IBizFacturaCliente; var AComentario: Variant): Boolean; @@ -1082,7 +1082,7 @@ begin Result := AFactura; end; -procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false); +procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1109,7 +1109,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Preview(ID_Facturas); + AReportController.Preview(ID_Facturas, VerLogotipo); finally AReportController := NIL; @@ -1117,7 +1117,7 @@ begin end; end; -procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false); +procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false; VerLogotipo: Boolean = true); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1144,7 +1144,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Print(ID_Facturas); + AReportController.Print(ID_Facturas, VerLogotipo); finally AReportController := NIL; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas index 54dd1b5..4dd0e3e 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas @@ -10,8 +10,8 @@ uses type IFacturasClienteReportController = interface(IControllerBase) ['{A0F41767-4FF6-4BAE-9FC9-894DD721D756}'] - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); + procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); end; TFacturasClienteReportController = class(TControllerBase, IFacturasClienteReportController) @@ -22,8 +22,8 @@ type constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList); - procedure Print(const AListaID : TIntegerList); + procedure Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); + procedure Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); end; @@ -54,14 +54,14 @@ begin inherited; end; -procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList); +procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList; const VerLogotipo: Boolean); var AStream: Binary; AEditor : IEditorFacturasClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetReport(AListaID); + AStream := FDataModule.GetReport(AListaID, VerLogotipo); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then @@ -79,7 +79,7 @@ begin end; end; -procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList); +procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList; const VerLogotipo: Boolean); var AStream: Binary; AEditor : IEditorFacturasClientePreview; @@ -87,7 +87,7 @@ begin AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetReport(AListaID); + AStream := FDataModule.GetReport(AListaID, VerLogotipo); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas index c843e62..4439078 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas @@ -33,7 +33,7 @@ type function NewItem : IBizFacturaCliente; // Report - function GetReport(const AListaID: TIntegerList): Binary; + function GetReport(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; end; implementation @@ -52,13 +52,13 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleFacturasCliente.GetReport(const AListaID: TIntegerList): Binary; +function TDataModuleFacturasCliente.GetReport(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; var AParam : TIntegerArray; begin AParam := AListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvFacturasCliente).GenerateReport(AParam); + Result := (RORemoteService as IsrvFacturasCliente).GenerateReport(AParam, VerLogotipo); finally FreeANDNIL(AParam); end; diff --git a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas index 22b4f5b..0edf393 100644 --- a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas +++ b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas @@ -8,7 +8,7 @@ uses type IDataModuleFacturasClienteReport = interface ['{F498AC70-AA38-4C06-B301-85A4AC0B210B}'] - function GetReport(const AListaID: TIntegerList): Binary; + function GetReport(const AListaID: TIntegerList; const VerLogotipo: Boolean): Binary; end; implementation diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index 27d29c2..92bf1d2 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -50,6 +50,7 @@ type FListaNombresClientes : TStringList; FImporteMinimo: Currency; FDesglosado : Boolean; + FVerLogotipo: Boolean; //Genera cada uno de los albaranes a imprimir procedure _GenerarFactura(const ID: integer); overload; @@ -61,7 +62,7 @@ type procedure RecuperarNombresClientes; public - function GenerarFactura(const ListaID : TIntegerArray): Binary; overload; + function GenerarFactura(const ListaID : TIntegerArray; const VerLogotipo: Boolean = True): Binary; overload; function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; @@ -104,12 +105,15 @@ begin FreeANDNIL(FListaNombresClientes); end; -function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray): Binary; +function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerLogotipo: Boolean = True): Binary; var i: Integer; begin Result := Binary.Create; try + //Inicializamos parametros + FVerLogotipo := VerLogotipo; + //Vamos generando todos y cada una de las facturas recibidas for i := 0 to ListaID.Count - 1 do _GenerarFactura(ListaID.Items[i]); @@ -616,7 +620,8 @@ begin raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente)); frxReport.LoadFromFile(AInforme, True); - frxReport.ReportOptions.Name := 'Factura ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; + frxReport.Variables.Variables['VerLogotipo'] := FVerLogotipo; + frxReport.ReportOptions.Name := 'Factura ' + tbl_Cabecera.FieldByName('REFERENCIA').AsString; frxReport.PrepareReport(False); finally FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index 5c4c622..baa273f 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -35,7 +35,7 @@ type private protected { IsrvFacturasCliente methods } - function GenerateReport(const FacturaID: TIntegerArray): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerLogotipo: Boolean): Binary; end; implementation @@ -77,13 +77,13 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray): Binary; +function TsrvFacturasCliente.GenerateReport(const FacturaID: TIntegerArray; const VerLogotipo: Boolean): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFactura(FacturaID); + Result := AReportGenerator.GenerarFactura(FacturaID, VerLogotipo); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index e25f808..6e0f625 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -245,6 +245,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitHeight = 228 inherited memObservaciones: TcxDBMemo DataBinding.DataSource = frViewFacturaCliente1.DADataSource + ExplicitWidth = 785 + ExplicitHeight = 20 Height = 228 Width = 521 end diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas index b6c15bc..26fed49 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas @@ -306,9 +306,13 @@ begin end; procedure TfEditorFacturaCliente.ImprimirInterno; +var + AVerLogotipo: Boolean; begin inherited; - FController.Print(FFactura); + AVerLogotipo:= True; + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Print(FFactura, False, aVerLogotipo); end; procedure TfEditorFacturaCliente.OnClienteChanged(Sender: TObject); @@ -410,9 +414,13 @@ begin end; procedure TfEditorFacturaCliente.PrevisualizarInterno; +var + AVerLogotipo: Boolean; begin inherited; - FController.Preview(FFactura); + AverLogotipo:= True; + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Preview(FFactura, False, AVerLogotipo); end; procedure TfEditorFacturaCliente.RecalcularPortePorUnidad; diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm index d979796..c038758 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.dfm @@ -38,7 +38,7 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente Width = 640 ExplicitWidth = 640 inherited tbxMain: TTBXToolbar - ExplicitWidth = 640 + ExplicitWidth = 632 object TBXSubmenuItem2: TTBXSubmenuItem [0] Caption = 'Nuevo' DisplayMode = nbdmImageAndText @@ -200,12 +200,16 @@ inherited fEditorFacturasCliente: TfEditorFacturasCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 144 + Width = 144 end inherited edtFechaFinFiltro: TcxDateEdit + Left = 301 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' + ExplicitLeft = 301 ExplicitWidth = 263 Width = 263 end diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index d4dfd51..f7e9b23 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -294,9 +294,11 @@ var Respuesta : Integer; AFacturas: IBizFacturaCliente; AllItems: Boolean; + AVerLogotipo: Boolean; begin AFacturas := Nil; AllItems := False; + AVerLogotipo:= True; if MultiSelect and Assigned(ViewGrid) then AllItems := (ViewGrid.NumSeleccionados > 1); @@ -323,7 +325,10 @@ begin AFacturas := Facturas; if Assigned(AFacturas) then - FController.Print(AFacturas, AllItems); + begin + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Print(AFacturas, AllItems, AVerLogotipo); + end; end; end; end; @@ -401,9 +406,11 @@ var Respuesta : Integer; AFacturas: IBizFacturaCliente; AllItems: Boolean; + AVerLogotipo: Boolean; begin AFacturas := Nil; AllItems := False; + AVerLogotipo:= True; if MultiSelect and Assigned(ViewGrid) then AllItems := (ViewGrid.NumSeleccionados > 1); @@ -430,7 +437,10 @@ begin AFacturas := Facturas; if Assigned(AFacturas) then - FController.Preview(AFacturas, AllItems); + begin + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); + FController.Preview(AFacturas, AllItems, AVerLogotipo); + end; end; end; end; diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas index 1fb7d17..1208da8 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestosCliente.pas @@ -516,7 +516,7 @@ begin if Assigned(APresupuestos) then begin - AVerLogotipo := (Application.MessageBox('¿Desea imprimir el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + AVerLogotipo := (Application.MessageBox('¿Desea imprimir el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); FController.Print(APresupuestos, AllItems, AVerLogotipo); end; end; @@ -594,7 +594,7 @@ begin if Assigned(APresupuestos) then begin - AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el documento con logotipo?', 'Atención', MB_YESNO) = IDYES); + AVerLogotipo := (Application.MessageBox('¿Desea previsualizar el/los documento/s con logotipo?', 'Atención', MB_YESNO) = IDYES); FController.Preview(APresupuestos, AllItems, AVerLogotipo); end; end; diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 0d12562..132ab49 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -276,6 +276,8 @@ + + @@ -352,6 +354,8 @@ + + @@ -875,6 +879,8 @@ + + @@ -883,6 +889,8 @@ + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index 42ad626..111c7d4 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -510,7 +510,7 @@ type { IsrvFacturasCliente } IsrvFacturasCliente = interface(IDataAbstractService) ['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}'] - function GenerateReport(const FacturaID: TIntegerArray): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerLogotipo: Boolean): Binary; end; { CosrvFacturasCliente } @@ -523,7 +523,7 @@ type protected function __GetInterfaceName:string; override; - function GenerateReport(const FacturaID: TIntegerArray): Binary; + function GenerateReport(const FacturaID: TIntegerArray; const VerLogotipo: Boolean): Binary; end; { IsrvFacturasProveedor } @@ -588,7 +588,7 @@ type { IsrvAlbaranesCliente } IsrvAlbaranesCliente = interface(IDataAbstractService) ['{6E910718-9AB0-47BB-9875-B0DE66A68D7A}'] - function GenerarInforme(const ListaID: TIntegerArray): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; end; @@ -602,7 +602,7 @@ type protected function __GetInterfaceName:string; override; - function GenerarInforme(const ListaID: TIntegerArray): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; end; @@ -849,8 +849,8 @@ type { IsrvContratosCliente } IsrvContratosCliente = interface(IDataAbstractService) ['{ADBF1627-F507-4A0F-818E-38BAE28579B6}'] - function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; end; { CosrvContratosCliente } @@ -863,8 +863,8 @@ type protected function __GetInterfaceName:string; override; - function GenerarInforme(const ListaID: TIntegerArray): Binary; - function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; + function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; end; implementation @@ -1755,12 +1755,13 @@ begin result := 'srvFacturasCliente'; end; -function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray): Binary; +function TsrvFacturasCliente_Proxy.GenerateReport(const FacturaID: TIntegerArray; const VerLogotipo: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport'); __Message.Write('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); + __Message.Write('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -1898,12 +1899,13 @@ begin result := 'srvAlbaranesCliente'; end; -function TsrvAlbaranesCliente_Proxy.GenerarInforme(const ListaID: TIntegerArray): Binary; +function TsrvAlbaranesCliente_Proxy.GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInforme'); __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Write('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -2681,12 +2683,13 @@ begin result := 'srvContratosCliente'; end; -function TsrvContratosCliente_Proxy.GenerarInforme(const ListaID: TIntegerArray): Binary; +function TsrvContratosCliente_Proxy.GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInforme'); __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Write('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); @@ -2698,12 +2701,13 @@ begin end end; -function TsrvContratosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; +function TsrvContratosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; begin try result := nil; __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF'); __Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Write('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index b07da32..4b07853 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -849,9 +849,10 @@ begin end; procedure TsrvFacturasCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerateReport(const FacturaID: TIntegerArray): Binary; } +{ function GenerateReport(const FacturaID: TIntegerArray; const VerLogotipo: Boolean): Binary; } var FacturaID: FactuGES_Intf.TIntegerArray; + VerLogotipo: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -859,8 +860,9 @@ begin lResult := nil; try __Message.Read('FacturaID', TypeInfo(FactuGES_Intf.TIntegerArray), FacturaID, []); + __Message.Read('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); - lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID); + lResult := (__Instance as IsrvFacturasCliente).GenerateReport(FacturaID, VerLogotipo); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerateReportResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -1031,9 +1033,10 @@ begin end; procedure TsrvAlbaranesCliente_Invoker.Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInforme(const ListaID: TIntegerArray): Binary; } +{ function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; + VerLogotipo: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -1041,8 +1044,9 @@ begin lResult := nil; try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Read('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); - lResult := (__Instance as IsrvAlbaranesCliente).GenerarInforme(ListaID); + lResult := (__Instance as IsrvAlbaranesCliente).GenerarInforme(ListaID, VerLogotipo); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvAlbaranesCliente', 'GenerarInformeResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -2142,9 +2146,10 @@ begin end; procedure TsrvContratosCliente_Invoker.Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInforme(const ListaID: TIntegerArray): Binary; } +{ function GenerarInforme(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; + VerLogotipo: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -2152,8 +2157,9 @@ begin lResult := nil; try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Read('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); - lResult := (__Instance as IsrvContratosCliente).GenerarInforme(ListaID); + lResult := (__Instance as IsrvContratosCliente).GenerarInforme(ListaID, VerLogotipo); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContratosCliente', 'GenerarInformeResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); @@ -2172,9 +2178,10 @@ begin end; procedure TsrvContratosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnPDF(const ListaID: TIntegerArray): Binary; } +{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerLogotipo: Boolean): Binary; } var ListaID: FactuGES_Intf.TIntegerArray; + VerLogotipo: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -2182,8 +2189,9 @@ begin lResult := nil; try __Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []); + __Message.Read('VerLogotipo', TypeInfo(Boolean), VerLogotipo, []); - lResult := (__Instance as IsrvContratosCliente).GenerarInformeEnPDF(ListaID); + lResult := (__Instance as IsrvContratosCliente).GenerarInformeEnPDF(ListaID, VerLogotipo); __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvContratosCliente', 'GenerarInformeEnPDFResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res index a68fab6..4626e4d 100644 Binary files a/Source/Servicios/RODLFile.res and b/Source/Servicios/RODLFile.res differ diff --git a/Source/Servidor/FactuGES_Server.res b/Source/Servidor/FactuGES_Server.res index eb63e52..992d7f9 100644 Binary files a/Source/Servidor/FactuGES_Server.res and b/Source/Servidor/FactuGES_Server.res differ