diff --git a/Database/FACTUGES.FDB b/Database/FACTUGES.FDB index dabd5b32..5b94368a 100644 Binary files a/Database/FACTUGES.FDB and b/Database/FACTUGES.FDB differ diff --git a/Source/Base/Base.res b/Source/Base/Base.res index 1641339f..8b251f31 100644 Binary files a/Source/Base/Base.res and b/Source/Base/Base.res differ diff --git a/Source/Cliente/FactuGES.bdsproj b/Source/Cliente/FactuGES.bdsproj index 90a4168d..571855dc 100644 --- a/Source/Cliente/FactuGES.bdsproj +++ b/Source/Cliente/FactuGES.bdsproj @@ -148,7 +148,7 @@ True False 3 - 2 + 3 0 0 False @@ -162,13 +162,13 @@ Rodax Software S.L. - 3.2.0.0 + 3.3.0.0 FactuGES - 3.1.0.0 + 3.3.0.0 Muststang Peak EasyListview Runtime Package diff --git a/Source/Cliente/FactuGES.rc b/Source/Cliente/FactuGES.rc index c51188f0..f9017746 100644 --- a/Source/Cliente/FactuGES.rc +++ b/Source/Cliente/FactuGES.rc @@ -1,7 +1,7 @@ MAINICON ICON "c:\Codigo Luis Leon\Source\Iconos\Factuges.ico" 1 VERSIONINFO -FILEVERSION 3,2,0,0 -PRODUCTVERSION 3,2,0,0 +FILEVERSION 3,3,0,0 +PRODUCTVERSION 3,3,0,0 FILEFLAGSMASK 0x3FL FILEFLAGS 0x00L FILEOS 0x40004L @@ -13,9 +13,9 @@ BEGIN BLOCK "0C0A04E4" BEGIN VALUE "CompanyName", "Rodax Software S.L.\0" - VALUE "FileVersion", "3.2.0.0\0" + VALUE "FileVersion", "3.3.0.0\0" VALUE "InternalName", "FactuGES\0" - VALUE "ProductVersion", "3.1.0.0\0" + VALUE "ProductVersion", "3.3.0.0\0" END END BLOCK "VarFileInfo" diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res index 2f549a7f..080d6f6f 100644 Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ diff --git a/Source/Informes/InfAlbaranCliente.fr3 b/Source/Informes/InfAlbaranCliente.fr3 index e364b469..266c99b5 100644 --- a/Source/Informes/InfAlbaranCliente.fr3 +++ b/Source/Informes/InfAlbaranCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -7,8 +7,10 @@ - - + + + + @@ -27,10 +29,10 @@ - - - - + + + + diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas index 76d7bbeb..d4272b2c 100644 --- a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas +++ b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteController.pas @@ -44,8 +44,8 @@ type function ExtraerSeleccionados(AAlbaran: IBizAlbaranCliente; Const ViewGrid: IViewGridBase = Nil) : IBizAlbaranCliente; function ElegirAlbaranes(AAlbaran: IBizAlbaranCliente; AMensaje: String; AMultiSelect: Boolean): IBizAlbaranCliente; - procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false); - function Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false): Boolean; + procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; ConObservacionesIncidencias: Boolean = false); + function Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; ConObservacionesIncidencias: Boolean = false): Boolean; procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); @@ -147,8 +147,8 @@ type AFechaRecibido : TDateTime = 0; DoPost: Boolean = True) : Boolean; - procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false); - function Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false): Boolean; + procedure Preview(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; ConObservacionesIncidencias: Boolean = false); + function Print(AAlbaran : IBizAlbaranCliente; AllItems: Boolean = false; ConObservacionesIncidencias: Boolean = false): Boolean; procedure EtiquetasPreview(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); procedure EtiquetasPrint(AAlbaran : IBizAlbaranCliente; Const withRefCliente: Boolean); @@ -1092,7 +1092,7 @@ begin end; end; -procedure TAlbaranesClienteController.Preview(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false); +procedure TAlbaranesClienteController.Preview(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; ConObservacionesIncidencias: Boolean = false); var AReportController : IAlbaranesClienteReportController; ID_Albaranes: TStringList; @@ -1119,7 +1119,7 @@ begin else ID_Albaranes.Add(IntToStr(AAlbaran.ID)); - AReportController.Preview(ID_Albaranes.CommaText); + AReportController.Preview(ID_Albaranes.CommaText, ConObservacionesIncidencias); finally AReportController := NIL; @@ -1127,7 +1127,7 @@ begin end; end; -function TAlbaranesClienteController.Print(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false): Boolean; +function TAlbaranesClienteController.Print(AAlbaran: IBizAlbaranCliente; AllItems: Boolean = false; ConObservacionesIncidencias: Boolean = false): Boolean; var AReportController : IAlbaranesClienteReportController; ID_Albaranes: TStringList; @@ -1155,7 +1155,7 @@ begin else ID_Albaranes.Add(IntToStr(AAlbaran.ID)); - Result := AReportController.Print(ID_Albaranes.CommaText); + Result := AReportController.Print(ID_Albaranes.CommaText, ConObservacionesIncidencias); finally AReportController := NIL; diff --git a/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas b/Source/Modulos/Albaranes de cliente/Controller/uAlbaranesClienteReportController.pas index f9376766..baf45eb5 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 ['{4BCC7A93-3322-494C-A3FA-118F4B62CB15}'] - procedure Preview(const AID : String); - function Print(const AID : String): Boolean; + procedure Preview(const AID : String; ConObservacionesIncidencias: Boolean = false); + function Print(const AID : String; ConObservacionesIncidencias: Boolean = false): 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; destructor Destroy; override; - procedure Preview(const AID : String); - function Print(const AID : String): Boolean; + procedure Preview(const AID : String; ConObservacionesIncidencias: Boolean = false); + function Print(const AID : String; ConObservacionesIncidencias: Boolean = false): 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; @@ -131,7 +131,7 @@ begin end; end; -procedure TAlbaranesClienteReportController.Preview(const AID : String); +procedure TAlbaranesClienteReportController.Preview(const AID : String; ConObservacionesIncidencias: Boolean = false); var AStream: Binary; AEditor : IEditorAlbaranesClientePreview; @@ -140,7 +140,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetReport(AID); //Lista de seleccionados (Array de integers) + AStream := FDataModule.GetReport(AID, ConObservacionesIncidencias); //Lista de seleccionados (Array de integers) try CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); AEditor.LoadFromStream(AStream); @@ -155,7 +155,7 @@ begin AEditor.Preview; end; -function TAlbaranesClienteReportController.Print(const AID : String): Boolean; +function TAlbaranesClienteReportController.Print(const AID : String; ConObservacionesIncidencias: Boolean = false): Boolean; var AStream: Binary; AEditor : IEditorAlbaranesClientePreview; @@ -165,7 +165,7 @@ begin ShowHourglassCursor; try - AStream := FDataModule.GetReport(AID); + AStream := FDataModule.GetReport(AID, ConObservacionesIncidencias); try CreateEditor('EditorAlbaranesClientePreview', IEditorAlbaranesClientePreview, AEditor); AEditor.LoadFromStream(AStream); diff --git a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas index ce1d3d38..f6154466 100644 --- a/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Data/uDataModuleAlbaranesCliente.pas @@ -38,9 +38,9 @@ type function NewItem : IBizAlbaranCliente; // Report - function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary; + function GetReport(const AID: String; const ConObservacionesIncidencias: Boolean = False; const ShowLogotipo: Boolean = False): Binary; function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; - function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary; + function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary; end; implementation @@ -77,9 +77,9 @@ begin Result := (RORemoteService as IsrvAlbaranesCliente).GetNextAutoInc(aGeneratorName) end; -function TDataModuleAlbaranesCliente.GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary; +function TDataModuleAlbaranesCliente.GetReport(const AID: String; const ConObservacionesIncidencias: Boolean = False; const ShowLogotipo: Boolean = False): Binary; begin - Result := (RORemoteService as IsrvAlbaranesCliente).GenerateReport(AID, ShowLogotipo) + Result := (RORemoteService as IsrvAlbaranesCliente).GenerateReport(AID, ShowLogotipo, ConObservacionesIncidencias) end; function TDataModuleAlbaranesCliente.GetRptPDF(const AID: Integer; diff --git a/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas b/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas index d0822d64..883c8827 100644 --- a/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas +++ b/Source/Modulos/Albaranes de cliente/Model/Data/uIDataModuleAlbaranesClienteReport.pas @@ -8,7 +8,7 @@ uses type IDataModuleAlbaranesClienteReport = interface ['{42C55204-5AB9-403E-8385-1A62B02D8234}'] - function GetReport(const AID: String; const ShowLogotipo: Boolean = False): Binary; + function GetReport(const AID: String; const ConObservacionesIncidencias: Boolean = False; const ShowLogotipo: Boolean = False): Binary; function GetEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary; function GetRptPDF(const AID: Integer; const ShowLogotipo: Boolean = False): Binary; end; diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm index bd3f54ec..6fba016a 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.dfm @@ -110,19 +110,20 @@ object RptAlbaranesCliente: TRptAlbaranesCliente 'LBARANES_CLIENTE.POBLACION,'#10' V_ALBARANES_CLIENTE.PROVINCIA,'#10' V' + '_ALBARANES_CLIENTE.PERSONA_CONTACTO,'#10' V_ALBARANES_CLIENTE.TELEF' + 'ONO,'#10' V_ALBARANES_CLIENTE.CALLE,'#10' V_ALBARANES_CLIENTE.OBSERVAC' + - 'IONES,'#10' V_ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' V_ALBARANES_CLIENT' + - 'E.FECHA_PREVISTA_ENVIO,'#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' ' + - ' EMPRESAS.NOMBRE AS NOMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS R' + - 'AZON_SOCIAL_EMPRESA,'#10' EMPRESAS.CALLE AS CALLE_EMPRESA,'#10' EMPRES' + - 'AS.CODIGO_POSTAL AS CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.POBLACION ' + - 'AS POBLACION_EMPRESA,'#10' EMPRESAS.PROVINCIA AS PROVINCIA_EMPRESA,' + - #10' EMPRESAS.TELEFONO_1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS ' + - 'FAX_EMPRESA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.E' + - 'MAIL_1 AS EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_E' + - 'MPRESA'#10'FROM'#10' V_ALBARANES_CLIENTE'#10' LEFT OUTER JOIN V_CLIENTES' + - ' ON (V_CLIENTES.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT OUTE' + - 'R JOIN EMPRESAS ON (EMPRESAS.ID = V_ALBARANES_CLIENTE.ID_EMPRESA' + - ')'#10'WHERE V_ALBARANES_CLIENTE.ID = :ID' + 'IONES,'#10' V_ALBARANES_CLIENTE.INCIDENCIAS,'#10' V_ALBARANES_CLIENTE.' + + 'IMPORTE_TOTAL,'#10' V_ALBARANES_CLIENTE.FECHA_PREVISTA_ENVIO,'#10' EMP' + + 'RESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NOMBRE AS NOMBRE_EM' + + 'PRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPRESA,'#10' EMPRES' + + 'AS.CALLE AS CALLE_EMPRESA,'#10' EMPRESAS.CODIGO_POSTAL AS CODIGO_PO' + + 'STAL_EMPRESA,'#10' EMPRESAS.POBLACION AS POBLACION_EMPRESA,'#10' EMPRE' + + 'SAS.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRESAS.TELEFONO_1 AS TEL' + + 'EFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' EMPRESAS.MOVIL' + + '_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_1_EMPRESA,'#10' ' + + 'EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA'#10'FROM'#10' V_ALBARANES_C' + + 'LIENTE'#10' LEFT OUTER JOIN V_CLIENTES ON (V_CLIENTES.ID = V_ALBARA' + + 'NES_CLIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN EMPRESAS ON (EMPRESAS.' + + 'ID = V_ALBARANES_CLIENTE.ID_EMPRESA)'#10'WHERE V_ALBARANES_CLIENTE.I' + + 'D = :ID' StatementType = stSQL ColumnMappings = < item @@ -248,6 +249,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente item DatasetField = 'PROVINCIA_EMPRESA' TableField = 'PROVINCIA_EMPRESA' + end + item + DatasetField = 'INCIDENCIAS' + TableField = 'INCIDENCIAS' end> end> Name = 'Informe_Cabecera' @@ -450,6 +455,17 @@ object RptAlbaranesCliente: TRptAlbaranesCliente Lookup = False LookupCache = False end + item + Name = 'INCIDENCIAS' + DataType = datMemo + BlobType = dabtUnknown + DisplayWidth = 0 + Alignment = taLeftJustify + InPrimaryKey = False + Calculated = False + Lookup = False + LookupCache = False + end item Name = 'IMPORTE_TOTAL' DataType = datFloat @@ -1330,9 +1346,26 @@ object RptAlbaranesCliente: TRptAlbaranesCliente PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 39065.872423495400000000 - ReportOptions.LastChange = 39286.749813368060000000 + ReportOptions.LastChange = 39752.715049039350000000 ScriptLanguage = 'PascalScript' ScriptText.Strings = ( + 'var' + ' Pagina: Variant;' + '' + '' + 'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);' + 'var' + ' Cadena: String;' + 'begin' + ' DatosEmpresa.Lines.Clear;' + ' if ( <> '#39#39') then' + ' Cadena := '#39'TLF: '#39' + ;' + ' if ( <> '#39#39') then' + + ' Cadena := Cadena + '#39' FAX: '#39' + ;' + ' DatosEmpresa.Lines.Add(Cadena);' + 'end;' '' 'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);' 'begin' @@ -1340,46 +1373,99 @@ object RptAlbaranesCliente: TRptAlbaranesCliente ' NombreEmpresa.Lines.Add();' 'end;' '' - 'procedure TelefonosEmpresaOnBeforePrint(Sender: TfrxComponent);' + 'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);' 'var' - ' Cadena: String;' + ' ACadena : String;' 'begin' - ' TelefonosEmpresa.Lines.Clear;' + ' ACadena := '#39#39';' + ' DireccionEnvio.Lines.Clear;' '' - ' if ( <> '#39#39') then' - ' Cadena := '#39'tlf: '#39' + ;' - ' if ( <> '#39#39') then' - - ' Cadena := Cadena + '#39' / fax: '#39' + ;' - ' TelefonosEmpresa.Lines.Add(Cadena);' + ' ACadena := '#39#39';' + '' + ' DireccionEnvio.Lines.Add();' + ' if ( <> '#39#39') then' + ' ACadena := + '#39' '#39';' + ' if ( <> '#39#39') then' + ' ACadena := ACadena + ;' + '' + ' if (ACadena <> '#39#39') then' + ' DireccionEnvio.Lines.Add(ACadena);' + '' + ' if ( <> '#39#39') then' + ' DireccionEnvio.Lines.Add();' 'end;' '' - 'procedure DireccionEmpresaOnBeforePrint(Sender: TfrxComponent);' - 'var' - ' Cadena: String;' + 'procedure Memo2OnBeforePrint(Sender: TfrxComponent);' 'begin' - ' DireccionEmpresa.Lines.Clear;' - '' - ' if ( <> '#39#39') then' - - ' DireccionEmpresa.Lines.Add()' + - ';' - '' - ' if ( <> '#39#39') then' - ' Cadena := ;' - ' if ( <> '#39#39') then' - - ' Cadena := Cadena + '#39', '#39' + ;' - ' DireccionEmpresa.Lines.Add(Cadena);' - '' - ' if ( <> '#39#39') then' - - ' DireccionEmpresa.Lines.Add();' + ' Memo2.Lines.Clear;' + ' if (StrToFloat() < 0) then' + ' Memo2.Lines.Add('#39'ORDEN DE DEVOLUCI'#211'N'#39')' + ' else' + ' Memo2.Lines.Add('#39'ALBAR'#193'N DE CLIENTE'#39')' 'end;' '' + 'procedure Memo5OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if (StrToFloat() < 0) then' + ' begin' + ' Memo5.Lines.Clear;' + ' Memo5.Lines.Add('#39'N'#186' orden:'#39');' + ' end;' + 'end;' + '' + 'procedure Memo9OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if (StrToFloat() < 0) then' + ' begin' + ' Memo9.Lines.Clear;' + ' Memo9.Lines.Add('#39'Fecha orden:'#39');' + ' end;' + 'end;' + '' + 'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if not Engine.FinalPass then' + ' Set('#39'TotalPaginas'#39', ( + 1));' + '' + ' if Engine.FinalPass then' + ' Set('#39'Pagina'#39', ( + 1));' + 'end;' + '' + 'procedure frxReportOnStartReport(Sender: TfrxComponent);' + 'begin' + ' Set('#39'Pagina'#39', 0);' + ' Set('#39'TotalPaginas'#39', 0);' + 'end;' + '' + 'procedure Picture1OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if then' + ' begin ' + ' Picture1.Visible := True; ' + ' Picture2.Visible := True; ' + ' Picture3.Visible := True; ' + ' Picture4.Visible := True; ' + ' Picture5.Visible := True; ' + ' Picture6.Visible := True; ' + ' Memo25.Visible := True;' + ' NombreEmpresa.Visible := False;' + + ' DatosEmpresa.Visible := False; ' + + ' ' + ' end' + ' else' + ' begin ' + ' Picture1.Visible := False;' + ' Picture2.Visible := False;' + ' Picture3.Visible := False;' + ' Picture4.Visible := False;' + ' Picture5.Visible := False;' + ' Picture6.Visible := False;' + ' Memo25.Visible := False;' + ' NombreEmpresa.Visible := True;' + ' DatosEmpresa.Visible := True; ' + ' end' + 'end;' '' 'begin' '' @@ -1387,6 +1473,7 @@ object RptAlbaranesCliente: TRptAlbaranesCliente ShowProgress = False StoreInDFM = False OnGetValue = frxReportGetValue + OnStartReport = 'frxReportOnStartReport' Left = 169 Top = 16 end diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas index 7282f983..c034c814 100644 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas +++ b/Source/Modulos/Albaranes de cliente/Reports/uRptAlbaranesCliente_Server.pas @@ -25,21 +25,22 @@ type frxChartObject1: TfrxChartObject; frxDBCabecera: TfrxDBDataset; frxDBDetalles: TfrxDBDataset; - schReport: TDASchema; - DataDictionary: TDADataDictionary; frxReport: TfrxReport; frxPDFExport1: TfrxPDFExport; + schReport: TDASchema; + DataDictionary: TDADataDictionary; procedure DataModuleCreate(Sender: TObject); procedure frxReportGetValue(const VarName: string; var Value: Variant); private FConnection: IDAConnection; FShowLogotipo: Boolean; + FConObservacionesIncidencias: Boolean; //Genera cada uno de los albaranes a imprimir procedure _GenerarAlbaran(const ID: integer); overload; public - function GenerarAlbaran(const AID : String; const AConLogotipo: Boolean = False): Binary; overload; + function GenerarAlbaran(const AID : String; const AConLogotipo: Boolean; const ConObservacionesIncidencias: Boolean): Binary; overload; function GenerarEtiquetas(const AID : Integer; withRefCliente: Boolean): Binary; - function GenerarReportEnPDF(const ListaID : TIntegerArray; const AConLogotipo: Boolean = False): Binary; + function GenerarReportEnPDF(const ListaID : TIntegerArray; const AConLogotipo: Boolean): Binary; end; implementation @@ -66,11 +67,12 @@ procedure TRptAlbaranesCliente.DataModuleCreate(Sender: TObject); begin schReport.ConnectionManager := dmServer.ConnectionManager; FConnection := dmServer.DarNuevaConexion; - FShowLogotipo := False; + FShowLogotipo := False; + FConObservacionesIncidencias := False; frxReport.EngineOptions.NewSilentMode := simReThrow; end; -function TRptAlbaranesCliente.GenerarAlbaran(const AID: String; const AConLogotipo: Boolean = False): Binary; +function TRptAlbaranesCliente.GenerarAlbaran(const AID: String; const AConLogotipo: Boolean; const ConObservacionesIncidencias: Boolean): Binary; var ID_Albaranes: TStringList; i: Integer; @@ -78,6 +80,7 @@ begin Result := Binary.Create; try FShowLogotipo := AConLogotipo; + FConObservacionesIncidencias := ConObservacionesIncidencias; ID_Albaranes := TStringList.Create; ID_Albaranes.CommaText := AID; @@ -94,6 +97,9 @@ procedure TRptAlbaranesCliente.frxReportGetValue(const VarName: string; var Valu begin if VarName = 'ShowLogotipo' then Value := FShowLogotipo; + + if VarName = 'ConObservacionesIncidencias' then + Value := FConObservacionesIncidencias; end; procedure TRptAlbaranesCliente._GenerarAlbaran(const ID: integer); diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas index c26c8ad3..f4fa0598 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas @@ -38,9 +38,9 @@ type protected { IsrvAlbaranesCliente methods } function GetNextAutoInc(const GeneratorName: String): Integer; - function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary; + function GenerateReport(const ID: String; const ShowLogotipo: Boolean = False; const ConObservacionesIncidencias: Boolean = False): Binary; function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; - function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary; + function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean = False): Binary; end; implementation @@ -83,8 +83,7 @@ begin bpAlbaranesCliente.BusinessRulesID := BIZ_SERVER_ALBARAN_CLIENTE; end; -function TsrvAlbaranesCliente.GenerarReportPDF(const ListaID: TIntegerArray; - const ShowLogotipo: Boolean): Binary; +function TsrvAlbaranesCliente.GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean = False): Binary; var AReportGenerator : TRptAlbaranesCliente; begin @@ -108,13 +107,13 @@ begin end; end; -function TsrvAlbaranesCliente.GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary; +function TsrvAlbaranesCliente.GenerateReport(const ID: String; const ShowLogotipo: Boolean = False; const ConObservacionesIncidencias: Boolean = False): Binary; var AReportGenerator : TRptAlbaranesCliente; begin AReportGenerator := TRptAlbaranesCliente.Create(nil); try - Result := AReportGenerator.GenerarAlbaran(ID, ShowLogotipo); + Result := AReportGenerator.GenerarAlbaran(ID, ShowLogotipo, ConObservacionesIncidencias); 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 cf5c4550..db46321e 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.dfm @@ -200,10 +200,6 @@ inherited fEditorAlbaranCliente: TfEditorAlbaranCliente object pagInicidencias: TTabSheet Caption = 'Incidencias' ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frViewIncidenciasCli: TfrViewIncidencias Left = 0 Top = 0 diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas index e72f888a..313c1ee4 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranCliente.pas @@ -230,7 +230,10 @@ end; procedure TfEditorAlbaranCliente.ImprimirInterno; begin inherited; - FController.Print(FAlbaran); + if (ShowConfirmMessage('¿Desea imprimir las observaciones e incidencias del albarán?', '') = IDYES) then + FController.Print(FAlbaran, False, True) + else + FController.Print(FAlbaran); end; procedure TfEditorAlbaranCliente.OnClienteChanged(Sender: TObject); @@ -324,7 +327,10 @@ end; procedure TfEditorAlbaranCliente.PrevisualizarInterno; begin inherited; - FController.Preview(FAlbaran); + if (ShowConfirmMessage('¿Desea previsualizar las observaciones e incidencias del albarán?', '') = IDYES) then + FController.Preview(FAlbaran, False, True) + else + FController.Preview(FAlbaran); 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 2e0e31b3..31b3e619 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.dfm @@ -2070,6 +2070,12 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente Value = 100 Default = True end + item + Caption = + 'Imprimir el albaran/es seleccionado/s (Con observaciones e incid' + + 'encias)' + Value = 101 + end item Caption = 'Imprimir la lista de albaranes actual' Value = 200 @@ -2307,7 +2313,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente 0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000 0007C0000007C000000700000007000000070000000700000007C000000FC000 001F8000003F800000FFF8FFFFFF} - Width = 500 + Width = 650 Left = 264 Top = 112 end @@ -2381,6 +2387,12 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente Value = 100 Default = True end + item + Caption = + 'Previsualizar el albaran/es seleccionado/s (Con observaciones e ' + + 'incidencias)' + Value = 101 + end item Caption = 'Previsualizar la lista de albaranes actual' Value = 200 @@ -2618,7 +2630,7 @@ inherited fEditorAlbaranesCliente: TfEditorAlbaranesCliente 0007F0000007F0000007F0000007F0000007F0000007F0000007800000078000 0007C0000007C000000700000007000000070000000700000007C000000FC000 001F8000003F800000FFF8FFFFFF} - Width = 500 + Width = 650 Left = 232 Top = 112 end diff --git a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas index b3b956a9..fdc235bc 100644 --- a/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas +++ b/Source/Modulos/Albaranes de cliente/Views/uEditorAlbaranesCliente.pas @@ -430,7 +430,7 @@ begin 200 : begin // Lista de elementos visibles inherited; end; - 100 : begin // Elemento Seleccionado + 100, 101 : begin // Elemento Seleccionado if AllItems then begin SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Albaranes as ISeleccionable).SelectedRecords); @@ -440,8 +440,14 @@ begin AAlbaranes := Albaranes; if Assigned(AAlbaranes) then - if FController.Print(AAlbaranes, AllItems) then - RefrescarInterno; + begin + //Con observaciones e incidencias + if JsImprimirDialog.CustomButtonResult = 101 then + FController.Print(AAlbaranes, AllItems, True) + else + FController.Print(AAlbaranes, AllItems); + RefrescarInterno; + end; end; end; end; @@ -515,7 +521,7 @@ begin 200 : begin // Lista de elementos visibles inherited; end; - 100 : begin // Elemento Seleccionado + 100, 101 : begin // Elemento Seleccionado if AllItems then begin SeleccionarFilasDesdeGrid(ViewGrid._FocusedView, (Albaranes as ISeleccionable).SelectedRecords); @@ -525,7 +531,11 @@ begin AAlbaranes := Albaranes; if Assigned(AAlbaranes) then - FController.Preview(AAlbaranes, AllItems); + //Con observaciones e incidencias + if JsPrevisualizarDialog.CustomButtonResult = 101 then + FController.Preview(AAlbaranes, AllItems, True) + else + FController.Preview(AAlbaranes, AllItems); end; end; end; diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index cbcac8ae..d4fc075f 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -312,6 +312,8 @@ + + diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index dafe8b57..dbcf3ccc 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -426,7 +426,7 @@ type IsrvAlbaranesCliente = interface(IDARemoteService) ['{6E910718-9AB0-47BB-9875-B0DE66A68D7A}'] function GetNextAutoInc(const GeneratorName: String): Integer; - function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary; + function GenerateReport(const ID: String; const ShowLogotipo: Boolean; const ConObservacionesIncidencias: Boolean): Binary; function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary; end; @@ -442,7 +442,7 @@ type function __GetInterfaceName:string; override; function GetNextAutoInc(const GeneratorName: String): Integer; - function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary; + function GenerateReport(const ID: String; const ShowLogotipo: Boolean; const ConObservacionesIncidencias: Boolean): Binary; function GenerateEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; function GenerarReportPDF(const ListaID: TIntegerArray; const ShowLogotipo: Boolean): Binary; end; @@ -1770,7 +1770,7 @@ begin end end; -function TsrvAlbaranesCliente_Proxy.GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary; +function TsrvAlbaranesCliente_Proxy.GenerateReport(const ID: String; const ShowLogotipo: Boolean; const ConObservacionesIncidencias: Boolean): Binary; var __request, __response : TMemoryStream; begin @@ -1782,6 +1782,7 @@ begin __Message.Initialize(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateReport'); __Message.Write('ID', TypeInfo(String), ID, []); __Message.Write('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []); + __Message.Write('ConObservacionesIncidencias', TypeInfo(Boolean), ConObservacionesIncidencias, []); __Message.Finalize; __Message.WriteToStream(__request); diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index 9ff57e3b..538b5bef 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -812,10 +812,11 @@ begin end; procedure TsrvAlbaranesCliente_Invoker.Invoke_GenerateReport(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerateReport(const ID: String; const ShowLogotipo: Boolean): Binary; } +{ function GenerateReport(const ID: String; const ShowLogotipo: Boolean; const ConObservacionesIncidencias: Boolean): Binary; } var ID: String; ShowLogotipo: Boolean; + ConObservacionesIncidencias: Boolean; lResult: Binary; __lObjectDisposer: TROObjectDisposer; begin @@ -823,8 +824,9 @@ begin try __Message.Read('ID', TypeInfo(String), ID, []); __Message.Read('ShowLogotipo', TypeInfo(Boolean), ShowLogotipo, []); + __Message.Read('ConObservacionesIncidencias', TypeInfo(Boolean), ConObservacionesIncidencias, []); - lResult := (__Instance as IsrvAlbaranesCliente).GenerateReport(ID, ShowLogotipo); + lResult := (__Instance as IsrvAlbaranesCliente).GenerateReport(ID, ShowLogotipo, ConObservacionesIncidencias); __Message.Initialize(__Transport, 'FactuGES', 'srvAlbaranesCliente', 'GenerateReportResponse'); __Message.Write('Result', TypeInfo(Binary), lResult, []); diff --git a/Source/Servicios/RODLFILE.res b/Source/Servicios/RODLFILE.res index 7337adf8..717c4394 100644 Binary files a/Source/Servicios/RODLFILE.res and b/Source/Servicios/RODLFILE.res differ diff --git a/Source/Servidor/FactuGES_Server.bdsproj b/Source/Servidor/FactuGES_Server.bdsproj index 3eeae4c2..3b2982ce 100644 --- a/Source/Servidor/FactuGES_Server.bdsproj +++ b/Source/Servidor/FactuGES_Server.bdsproj @@ -1,4 +1,4 @@ - +