diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index 3ae37222..d94a2a84 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -24,6 +24,7 @@ + diff --git a/Source/Informes/2/InfFacturaCliente.fr3 b/Source/Informes/2/InfFacturaCliente.fr3 index dc3d25dd..c9646761 100644 --- a/Source/Informes/2/InfFacturaCliente.fr3 +++ b/Source/Informes/2/InfFacturaCliente.fr3 @@ -1,8 +1,9 @@ - + + @@ -17,12 +18,12 @@ - + @@ -66,7 +67,7 @@ - + diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas index 5fa40bb7..4fa7c66a 100644 --- a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas +++ b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteController.pas @@ -43,9 +43,9 @@ type function GenerarAbono(AFactura: IBizFacturaCliente): IBizFacturaCliente; procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; - const VerSello: Boolean = True); + const VerSello: Boolean = True; const VerCopia: Boolean = True); procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; - const VerSello: Boolean = True); + const VerSello: Boolean = True; const VerCopia: Boolean = True); procedure RecalcularImportes(AFactura: IBizFacturaCliente); function EsModificable(AFactura: IBizFacturaCliente): Boolean; @@ -111,9 +111,9 @@ type procedure RecuperarCliente(AFactura : IBizFacturaCliente); procedure Preview(AFactura : IBizFacturaCliente; AllItems: Boolean = false; - const VerSello: Boolean = True); + const VerSello: Boolean = True; const VerCopia: Boolean = True); procedure Print(AFactura : IBizFacturaCliente; AllItems: Boolean = false; - const VerSello: Boolean = True); + const VerSello: Boolean = True; const VerCopia: Boolean = True); procedure RecalcularImportes(AFactura: IBizFacturaCliente); function EsModificable(AFactura: IBizFacturaCliente): Boolean; @@ -1044,7 +1044,7 @@ begin end; procedure TFacturasClienteController.Preview(AFactura: IBizFacturaCliente; AllItems: Boolean = false; -const VerSello: Boolean = True); +const VerSello: Boolean = True; const VerCopia: Boolean = True); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1071,7 +1071,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Preview(ID_Facturas, VerSello); + AReportController.Preview(ID_Facturas, VerSello, VerCopia); finally AReportController := NIL; @@ -1080,7 +1080,7 @@ begin end; procedure TFacturasClienteController.Print(AFactura: IBizFacturaCliente; AllItems: Boolean = false; -const VerSello: Boolean = True); +const VerSello: Boolean = True; const VerCopia: Boolean = True); var AReportController : IFacturasClienteReportController; ID_Facturas: TIntegerList; @@ -1107,7 +1107,7 @@ begin else ID_Facturas.Add(AFactura.ID); - AReportController.Print(ID_Facturas, VerSello); + AReportController.Print(ID_Facturas, VerSello, VerCopia); finally AReportController := NIL; diff --git a/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas b/Source/Modulos/Facturas de cliente/Controller/uFacturasClienteReportController.pas index 300982b6..409ad3ee 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; const VerSello: Boolean = True); - procedure Print(const AListaID : TIntegerList; const VerSello: Boolean = True); + procedure Preview(const AListaID : TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True); + procedure Print(const AListaID : TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True); function ExportToWord(const AID: Integer; const AFileName : String = ''; const VerSello: Boolean = True): Boolean; function ExportToPDF(const AID: Integer; const AFileName : String = ''; const VerSello: Boolean = True): Boolean; end; @@ -19,14 +19,13 @@ type TFacturasClienteReportController = class(TControllerBase, IFacturasClienteReportController) private FDataModule : IDataModuleFacturasClienteReport; - function CreateEditor(const AName: String; const IID: TGUID; - out Intf): Boolean; + function CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean; public constructor Create; override; destructor Destroy; override; - procedure Preview(const AListaID : TIntegerList; const VerSello: Boolean = True); - procedure Print(const AListaID : TIntegerList; const VerSello: Boolean = True); + procedure Preview(const AListaID : TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True); + procedure Print(const AListaID : TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True); function ExportToWord(const AID: Integer; const AFileName : String = ''; const VerSello: Boolean = True): Boolean; function ExportToPDF(const AID: Integer; const AFileName : String = ''; const VerSello: Boolean = True): Boolean; end; @@ -108,14 +107,14 @@ begin end; end; -procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList; const VerSello: Boolean = True); +procedure TFacturasClienteReportController.Preview(const AListaID : TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True); var AStream: Binary; AEditor : IEditorFacturasClientePreview; begin AEditor := NIL; - AStream := FDataModule.GetRptFacturas(AListaID, VerSello); + AStream := FDataModule.GetRptFacturas(AListaID, VerSello, VerCopia); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then @@ -133,7 +132,7 @@ begin end; end; -procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList; const VerSello: Boolean = True); +procedure TFacturasClienteReportController.Print(const AListaID : TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True); var AStream: Binary; AEditor : IEditorFacturasClientePreview; @@ -141,7 +140,7 @@ begin AEditor := NIL; ShowHourglassCursor; try - AStream := FDataModule.GetRptFacturas(AListaID, VerSello); + AStream := FDataModule.GetRptFacturas(AListaID, VerSello, VerCopia); try CreateEditor('EditorFacturasClientePreview', IEditorFacturasClientePreview, AEditor); if Assigned(AEditor) then diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm index 84bcb12b..8d81c393 100644 --- a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.dfm @@ -10,12 +10,12 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente Top = 24 end object rda_FacturasCliente: TDARemoteDataAdapter + DataStreamer = Bin2DataStreamer GetSchemaCall.RemoteService = RORemoteService GetDataCall.RemoteService = RORemoteService UpdateDataCall.RemoteService = RORemoteService GetScriptsCall.RemoteService = RORemoteService RemoteService = RORemoteService - DataStreamer = Bin2DataStreamer Left = 51 Top = 143 end @@ -274,8 +274,6 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente Params = <> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_FacturasCliente - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'FacturasCliente' IndexDefs = <> Left = 240 @@ -392,8 +390,6 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente MasterSource = ds_FacturasCliente MasterFields = 'ID' DetailFields = 'ID_FACTURA' - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'FacturasCliente_Detalles' IndexDefs = <> Left = 400 @@ -416,8 +412,6 @@ inherited DataModuleFacturasCliente: TDataModuleFacturasCliente Params = <> StreamingOptions = [soDisableEventsWhileStreaming] RemoteDataAdapter = rda_FacturasCliente - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'ListaAnosFacturas' IndexDefs = <> Left = 240 diff --git a/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Data/uDataModuleFacturasCliente.pas index 4b909918..cf147e41 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 GetRptFacturas(const AListaID: TIntegerList; const VerSello: Boolean = True): Binary; + function GetRptFacturas(const AListaID: TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; function GetRptWordFactura(const AID: Integer; const VerSello: Boolean = True): Binary; function GetRptPDFFactura(const AID: Integer; const VerSello: Boolean = True): Binary; end; @@ -54,13 +54,13 @@ begin RORemoteService.Message := dmConexion.Message; end; -function TDataModuleFacturasCliente.GetRptFacturas(const AListaID: TIntegerList; const VerSello: Boolean = True): Binary; +function TDataModuleFacturasCliente.GetRptFacturas(const AListaID: TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; var AParam : TIntegerArray; begin AParam := AListaID.ToIntegerArray; try - Result := (RORemoteService as IsrvFacturasCliente).GenerarInforme(AParam, VerSello); + Result := (RORemoteService as IsrvFacturasCliente).GenerarInforme(AParam, VerSello, VerCopia); finally FreeANDNIL(AParam); end; diff --git a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj index 3c2db4f2..6061b7ea 100644 --- a/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj +++ b/Source/Modulos/Facturas de cliente/FacturasCliente_Group.groupproj @@ -24,6 +24,7 @@ + @@ -301,14 +302,23 @@ + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas b/Source/Modulos/Facturas de cliente/Model/Data/uIDataModuleFacturasClienteReport.pas index 985ac945..ae163b93 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 ['{D241A912-78C6-4C65-AEBF-8DDEFE35F511}'] - function GetRptFacturas(const AListaID: TIntegerList; const VerSello: Boolean = True): Binary; + function GetRptFacturas(const AListaID: TIntegerList; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; function GetRptWordFactura(const AID: Integer; const VerSello: Boolean = True): Binary; function GetRptPDFFactura(const AID: Integer; const VerSello: Boolean = True): Binary; end; diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm index 1572be55..136323e8 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm @@ -1105,6 +1105,7 @@ object RptFacturasCliente: TRptFacturasCliente UserName = 'frxDBCabecera' CloseDataSource = False DataSource = DADSCabecera + BCDToCurrency = False Left = 264 Top = 16 end @@ -1112,6 +1113,7 @@ object RptFacturasCliente: TRptFacturasCliente UserName = 'frxDBDetalles' CloseDataSource = False DataSource = DADSDetalles + BCDToCurrency = False Left = 344 Top = 16 end @@ -1476,8 +1478,6 @@ object RptFacturasCliente: TRptFacturasCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = Bin2DataStreamer - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeFacturasCliente_Detalles' IndexDefs = <> Left = 344 @@ -1648,8 +1648,6 @@ object RptFacturasCliente: TRptFacturasCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = Bin2DataStreamer - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeFacturasCliente' IndexDefs = <> Left = 264 @@ -1684,7 +1682,7 @@ object RptFacturasCliente: TRptFacturasCliente Top = 392 end object frxReport: TfrxReport - Version = '4.3' + Version = '4.7.71' DotMatrixReport = False EngineOptions.DoublePass = True IniFile = '\Software\Fast Reports' @@ -1724,6 +1722,7 @@ object RptFacturasCliente: TRptFacturasCliente UserName = 'frxDBVencimientos' CloseDataSource = False DataSource = DADSVencimientos + BCDToCurrency = False Left = 440 Top = 16 end @@ -1761,8 +1760,6 @@ object RptFacturasCliente: TRptFacturasCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = Bin2DataStreamer - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeFacturasCliente_Vencimientos' IndexDefs = <> Left = 440 @@ -1804,13 +1801,21 @@ object RptFacturasCliente: TRptFacturasCliente ShowDialog = False UseFileCache = True ShowProgress = False + OverwritePrompt = False PrintOptimized = True Outline = False + Background = False + HTMLTags = True Author = 'FactuGES' Subject = 'FactuGES' - Background = False Creator = 'FactuGES' - HTMLTags = True + ProtectionFlags = [ePrint, eModify, eCopy, eAnnot] + HideToolbar = False + HideMenubar = False + HideWindowUI = False + FitWindow = False + CenterWindow = False + PrintScaling = False Left = 424 Top = 288 end @@ -1884,8 +1889,6 @@ object RptFacturasCliente: TRptFacturasCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = Bin2DataStreamer - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeListadoFacturas' IndexDefs = <> Left = 576 @@ -1901,6 +1904,7 @@ object RptFacturasCliente: TRptFacturasCliente UserName = 'frxDBInformeListadoFacturas' CloseDataSource = False DataSource = DADSInformeListadoFacturas + BCDToCurrency = False Left = 576 Top = 16 end @@ -1908,6 +1912,7 @@ object RptFacturasCliente: TRptFacturasCliente UserName = 'frxDBInformeListadoFacturasPendientes' CloseDataSource = False DataSource = DADSInformeListadoFacturasPendientes + BCDToCurrency = False Left = 792 Top = 16 end @@ -1987,8 +1992,6 @@ object RptFacturasCliente: TRptFacturasCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = Bin2DataStreamer - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeListadoFacturasPendientes' IndexDefs = <> Left = 792 @@ -1998,6 +2001,7 @@ object RptFacturasCliente: TRptFacturasCliente UserName = 'frxDBInformeListadoFacturasResumen' CloseDataSource = True DataSource = DADSInformeListadoFacturasResumen + BCDToCurrency = False Left = 576 Top = 216 end @@ -2015,8 +2019,6 @@ object RptFacturasCliente: TRptFacturasCliente LogChanges = False StreamingOptions = [soDisableEventsWhileStreaming] RemoteFetchEnabled = False - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] IndexDefs = <> Left = 576 Top = 328 diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index cf64cace..bf1bdf66 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -105,7 +105,7 @@ type FDesglosado : Boolean; //Genera cada una de las facturas a imprimir - procedure _GenerarFactura(const ID: Integer; const VerSello: Boolean = True); + procedure _GenerarFactura(const ID: Integer; const VerSello: Boolean = True; const VerCopia: Boolean = True); procedure PrepararTablaInforme(ATabla: TDAMemDataTable); procedure PrepararTablaResumenInforme(ATabla: IDADataset); @@ -113,7 +113,7 @@ type procedure IniciarParametrosInforme; procedure RecuperarNombresClientes; public - function GenerarFactura(const ListaID : TIntegerArray; const VerSello: Boolean = True): Binary; + function GenerarFactura(const ListaID : TIntegerArray; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerSello: Boolean = True): Binary; 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 FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary; @@ -171,7 +171,7 @@ begin FreeANDNIL(FListaNombresClientes); end; -function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary; +function TRptFacturasCliente.GenerarFactura(const ListaID: TIntegerArray; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; var i: Integer; begin @@ -179,7 +179,7 @@ begin try //Vamos generando todos y cada una de las facturas recibidas for i := 0 to ListaID.Count - 1 do - _GenerarFactura(ListaID.Items[i], VerSello); + _GenerarFactura(ListaID.Items[i], VerSello, VerCopia); frxReport.PreviewPages.SaveToStream(Result); finally @@ -651,7 +651,7 @@ begin end; end; -procedure TRptFacturasCliente._GenerarFactura(const ID: Integer; const VerSello: Boolean = True); +procedure TRptFacturasCliente._GenerarFactura(const ID: Integer; const VerSello: Boolean = True; const VerCopia: Boolean = True); var AInforme: Variant; @@ -679,7 +679,16 @@ begin frxReport.Variables.Variables['VerSello'] := 1 else frxReport.Variables.Variables['VerSello'] := 0; + + //La primera impresion siempre es sin la etiqueta copia + frxReport.Variables.Variables['VerCopia'] := 0; frxReport.PrepareReport(False); + if VerCopia then + begin + frxReport.Variables.Variables['VerCopia'] := 1; + frxReport.PrepareReport(False); + end; + finally FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" end; diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index d235698e..680db595 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -34,7 +34,7 @@ type private protected { IsrvFacturasCliente methods } - function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary; + function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean = True): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary; end; @@ -95,13 +95,13 @@ begin end; end; -function TsrvFacturasCliente.GenerarInforme(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary; +function TsrvFacturasCliente.GenerarInforme(const ListaID: TIntegerArray; const VerSello: Boolean = True; const VerCopia: Boolean = True): Binary; var AReportGenerator : TRptFacturasCliente; begin AReportGenerator := TRptFacturasCliente.Create(nil); try - Result := AReportGenerator.GenerarFactura(ListaID, VerSello); + Result := AReportGenerator.GenerarFactura(ListaID, VerSello, VerCopia); finally FreeAndNIL(AReportGenerator); end; diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk index 713ab979..8b15070f 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dpk @@ -34,7 +34,9 @@ requires Articulos_view, AlbCli_FacCli_relation, PreCli_FacCli_relation, - GestorInformes_controller; + GestorInformes_controller, + rtl, + vcl; contains uFacturasClienteViewRegister in 'uFacturasClienteViewRegister.pas', @@ -47,6 +49,7 @@ contains uEditorElegirArticulosFacturaCliente in 'uEditorElegirArticulosFacturaCliente.pas' {fEditorElegirArticulosFacturaCliente: TForm}, uViewElegirArticulosFacturasCliente in 'uViewElegirArticulosFacturasCliente.pas' {frViewElegirArticulosFacturasCliente: TFrame}, uEditorElegirFacturasCliente in 'uEditorElegirFacturasCliente.pas' {fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente}, - uViewDatosYSeleccionClienteFacturaCliente in 'uViewDatosYSeleccionClienteFacturaCliente.pas' {frViewDatosYSeleccionClienteFacturaCliente: TFrame}; + uViewDatosYSeleccionClienteFacturaCliente in 'uViewDatosYSeleccionClienteFacturaCliente.pas' {frViewDatosYSeleccionClienteFacturaCliente: TFrame}, + uDialogOpcionesImpresionFacturasCliente in 'uDialogOpcionesImpresionFacturasCliente.pas' {fDialogOpcionesImpresionFacturasCliente: TfEditorElegirFacturasCliente}; end. diff --git a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj index 41a25595..84e8d35d 100644 --- a/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj +++ b/Source/Modulos/Facturas de cliente/Views/FacturasCliente_view.dproj @@ -49,16 +49,21 @@ MainSource - - - - - - - - - - + + + + + + + + + + + + +
fDialogOpcionesImpresionFacturasCliente
+ TfEditorElegirFacturasCliente +
fEditorElegirArticulosFacturaCliente
TForm @@ -99,6 +104,7 @@
frViewFacturasCliente
TFrame
+