From b9aabb6d478d45d576a02e45101992f2caf249e8 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 28 Feb 2008 19:39:33 +0000 Subject: [PATCH] =?UTF-8?q?Facturas=20de=20cliente:=20informe=20y=20export?= =?UTF-8?q?aci=C3=B3n=20a=20Word=20funcionando.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@307 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- Source/Informes/InfFacturaCliente.fr3 | 46 +++-- .../Reports/uRptFacturasCliente_Server.dfm | 90 +++++++-- .../Reports/uRptFacturasCliente_Server.pas | 29 +-- .../Reports/uRptWordFacturaCliente.dfm | 35 +++- .../Reports/uRptWordFacturaCliente.pas | 28 +-- .../Servidor/srvFacturasCliente_Impl.dfm | 1 - .../Servidor/srvFacturasCliente_Impl.pas | 9 +- .../Views/uEditorElegirFacturasCliente.dfm | 8 +- .../Views/uEditorElegirFacturasCliente.pas | 4 +- .../Views/uEditorFacturaCliente.dfm | 175 ++++++++++-------- .../Views/uEditorFacturaCliente.pas | 7 - .../Views/uEditorFacturasCliente.pas | 8 +- .../Views/uEditorFacturasClienteReport.dfm | 9 + .../Views/uEditorFacturasClienteReport.pas | 1 + .../Views/uEditorPresupuestoCliente.dfm | 29 ++- 15 files changed, 286 insertions(+), 193 deletions(-) diff --git a/Source/Informes/InfFacturaCliente.fr3 b/Source/Informes/InfFacturaCliente.fr3 index ee66d20c..6297cac8 100644 --- a/Source/Informes/InfFacturaCliente.fr3 +++ b/Source/Informes/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -9,7 +9,7 @@ - + @@ -21,24 +21,42 @@ + - - - - - + + + + - - + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm index 0866a6ab..362e4f6c 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.dfm @@ -282,17 +282,20 @@ object RptFacturasCliente: TRptFacturasCliente item Name = 'ID_FACTURA' DataType = datInteger - Value = '13' + Value = '2' ParamType = daptInput end> Statements = < item Connection = 'IBX' SQL = - 'SELECT'#10' ID, ID_FACTURA, POSICION, TIPO_DETALLE, CONCEPTO, CAN' + - 'TIDAD,'#10' IMPORTE_UNIDAD, DESCUENTO, IMPORTE_TOTAL, VISIBLE'#10'FRO' + - 'M FACTURAS_CLIENTE_DETALLES'#10'WHERE ID_FACTURA = :ID_FACTURA AND V' + - 'ISIBLE = 1 AND {Where}'#10'ORDER BY ID_FACTURA, POSICION;'#10 + 'SELECT'#10' DET.ID, DET.ID_FACTURA, DET.POSICION, DET.TIPO_DETALL' + + 'E, ARTICULOS.REFERENCIA,'#10' DET.CONCEPTO, DET.CANTIDAD, DET.IMP' + + 'ORTE_UNIDAD, DET.DESCUENTO,'#10' DET.IMPORTE_TOTAL, DET.VISIBLE'#10'F' + + 'ROM FACTURAS_CLIENTE_DETALLES AS DET'#10'LEFT OUTER JOIN ARTICULOS O' + + 'N (ARTICULOS.ID = DET.ID_ARTICULO)'#10'WHERE DET.ID_FACTURA = :ID_FA' + + 'CTURA AND DET.VISIBLE = 1 AND {Where}'#10'ORDER BY DET.ID_FACTURA, D' + + 'ET.POSICION;'#10 StatementType = stSQL ColumnMappings = < item @@ -334,6 +337,10 @@ object RptFacturasCliente: TRptFacturasCliente item DatasetField = 'DESCUENTO' TableField = 'DESCUENTO' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' end> end> Name = 'InformeFacturasCliente_Detalles' @@ -360,6 +367,11 @@ object RptFacturasCliente: TRptFacturasCliente Size = 10 DictionaryEntry = 'FacturasCliente_Detalles_TIPO_DETALLE' end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end item Name = 'CONCEPTO' DataType = datString @@ -631,20 +643,19 @@ object RptFacturasCliente: TRptFacturasCliente object frxDBCabecera: TfrxDBDataset UserName = 'frxDBCabecera' CloseDataSource = True - DataSource = DataSource1 + DataSource = DADSCabecera Left = 264 Top = 16 end object frxDBDetalles: TfrxDBDataset UserName = 'frxDBDetalles' CloseDataSource = False - DataSource = DataSource2 + DataSource = DADSDetalles Left = 344 Top = 16 end object IBDatabase1: TIBDatabase - Connected = True - DatabaseName = 'C:\Codigo Tecsitel\Database\FACTUGES.FDB' + DatabaseName = 'C:\Codigo Tecsitel\Output\Debug\Database\FACTUGES.FDB' Params.Strings = ( 'user_name=sysdba' 'password=masterkey' @@ -655,7 +666,6 @@ object RptFacturasCliente: TRptFacturasCliente Top = 296 end object IBTransaction1: TIBTransaction - Active = True Left = 48 Top = 352 end @@ -672,7 +682,6 @@ object RptFacturasCliente: TRptFacturasCliente object cabecera: TIBQuery Database = IBDatabase1 Transaction = IBTransaction1 - Active = True SQL.Strings = ( 'select' ' v_facturas_cliente.id, v_facturas_cliente.id_empresa,' @@ -702,7 +711,7 @@ object RptFacturasCliente: TRptFacturasCliente ' left outer join formas_pago on (formas_pago.id = v_facturas_c' + 'liente.id_forma_pago)' - 'WHERE V_FACTURAS_CLIENTE.ID = 25') + 'WHERE V_FACTURAS_CLIENTE.ID = 2') Left = 136 Top = 296 object cabeceraID: TIntegerField @@ -850,11 +859,17 @@ object RptFacturasCliente: TRptFacturasCliente Transaction = IBTransaction1 SQL.Strings = ( 'SELECT' - ' ID, ID_FACTURA, POSICION, TIPO_DETALLE, CONCEPTO, CANTIDAD,' - ' IMPORTE_UNIDAD, DESCUENTO, IMPORTE_TOTAL, VISIBLE' - 'FROM FACTURAS_CLIENTE_DETALLES' - 'WHERE ID_FACTURA = 25 AND VISIBLE = 1' - 'ORDER BY ID_FACTURA, POSICION;') + + ' DET.ID, DET.ID_FACTURA, DET.POSICION, DET.TIPO_DETALLE, ARTI' + + 'CULOS.REFERENCIA,' + + ' DET.CONCEPTO, DET.CANTIDAD, DET.IMPORTE_UNIDAD, DET.DESCUENT' + + 'O,' + ' DET.IMPORTE_TOTAL, DET.VISIBLE' + 'FROM FACTURAS_CLIENTE_DETALLES DET' + 'LEFT OUTER JOIN ARTICULOS ON (ARTICULOS.ID = DET.ID_ARTICULO)' + 'WHERE DET.ID_FACTURA = 2 AND DET.VISIBLE = 1 ' + 'ORDER BY DET.ID_FACTURA, DET.POSICION;') Left = 136 Top = 352 object detallesID: TIntegerField @@ -906,6 +921,11 @@ object RptFacturasCliente: TRptFacturasCliente FieldName = 'VISIBLE' Origin = '"FACTURAS_CLIENTE_DETALLES"."VISIBLE"' end + object detallesREFERENCIA: TIBStringField + FieldName = 'REFERENCIA' + Origin = '"ARTICULOS"."REFERENCIA"' + Size = 255 + end end object DABINAdapter: TDABINAdapter Left = 48 @@ -948,6 +968,11 @@ object RptFacturasCliente: TRptFacturasCliente Size = 10 DictionaryEntry = 'FacturasCliente_Detalles_TIPO_DETALLE' end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end item Name = 'CONCEPTO' DataType = datString @@ -982,7 +1007,7 @@ object RptFacturasCliente: TRptFacturasCliente item Name = 'ID_FACTURA' DataType = datInteger - Value = '13' + Value = '2' ParamType = daptInput end> MasterParamsMappings.Strings = ( @@ -1195,7 +1220,7 @@ object RptFacturasCliente: TRptFacturasCliente PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 ReportOptions.CreateDate = 39065.872423495400000000 - ReportOptions.LastChange = 39460.995435648100000000 + ReportOptions.LastChange = 39506.841841898100000000 ScriptLanguage = 'PascalScript' ScriptText.Strings = ( '' @@ -1277,6 +1302,33 @@ object RptFacturasCliente: TRptFacturasCliente ' Memo4.Visible := False; ' 'end;' '' + 'procedure Memo22OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if ( = 0) then' + ' begin ' + ' Memo22.Text := '#39'Base imponible:'#39';' + '' + ' Memo10.Text := '#39'Importe total:'#39';' + ' Memo10.Font.Style := fsBold; ' + '' + + ' Memo9.Text := FormatFloat('#39'#,##0.00 '#8364#39', );' + ' Memo9.Font.Style := fsBold; ' + ' ' + ' Memo23.Text := '#39'[]% IVA:'#39';' + ' Memo25.Text := '#39'[frxDBCabecera."IMPORTE_IVA"]'#39';' + ' Memo12.Visible := False;' + ' Memo14.Visible := False;' + ' Memo16.Visible := False; ' + '' + ' Memo13.Visible := False;' + ' Memo15.Visible := False;' + ' Memo17.Visible := False;' + ' Memo11.Color := $00CCFFCC;' + ' end; ' + 'end;' + '' 'begin' '' 'end.') diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas index 1150ea96..fd92d9a4 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptFacturasCliente_Server.pas @@ -21,7 +21,6 @@ type DataSource2: TDataSource; cabecera: TIBQuery; detalles: TIBQuery; - schReport: TDASchema; DABINAdapter: TDABINAdapter; DADSCabecera: TDADataSource; DADSDetalles: TDADataSource; @@ -71,6 +70,8 @@ type detallesDESCUENTO: TFloatField; detallesIMPORTE_TOTAL: TIBBCDField; detallesVISIBLE: TSmallintField; + schReport: TDASchema; + detallesREFERENCIA: TIBStringField; procedure DataModuleCreate(Sender: TObject); private FConnection: IDAConnection; @@ -140,34 +141,14 @@ begin AStream := TMemoryStream.Create; try -{ dsMaster := schReport.NewDataset(FConnection, ds_InformeFacturasCliente, ['ID'], [ID]); - dsDetail := schReport.NewDataset(FConnection, ds_InformeFacturasCliente_Detalles, ['ID_FACTURA'], [ID], False); - dsVencimientos := schReport.NewDataset(FConnection, ds_InformeFacturasCliente_Vencimientos, ['ID_FACTURA'], [ID], False);} - -{ AStream.Clear; - DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); - DABINAdapter.ReadDataset(AStream, tbl_FacturaCliente, TRUE, '', TRUE, TRUE); - - AStream.Clear; - DABINAdapter.WriteDataset(AStream, dsDetail, [woRows, woSchema], -1); - DABINAdapter.ReadDataset(AStream, tbl_DetallesFacturaCliente, TRUE, '', TRUE, TRUE); - - AStream.Clear; - DABINAdapter.WriteDataset(AStream, dsVencimientos, [woRows, woSchema], -1); - DABINAdapter.ReadDataset(AStream, tbl_Vencimientos, TRUE, '', TRUE, TRUE);} - frxDBCabecera.DataSource := DADSCabecera; frxDBDetalles.DataSource := DADSDetalles; -// tbl_Cabecera.ParamByName('ID').AsInteger := AID; - //tbl_Capitulos.ParamByName('ID_FACTURA').AsInteger := AID; -// tbl_Detalles.ParamByName('ID_FACTURA').AsInteger := AID; - //tbl_Resumen.ParamByName('ID_FACTURA').AsInteger := AID; + tbl_Cabecera.ParamByName('ID').AsInteger := ID; + tbl_Detalles.ParamByName('ID_FACTURA').AsInteger := ID; -{ tbl_Cabecera.Active := True; - tbl_Capitulos.Active := True; + tbl_Cabecera.Active := True; tbl_Detalles.Active := True; - tbl_Resumen.Active := True;} frxReport.LoadFromFile(DarRutaInformes + rptFacturaCliente, True); frxReport.PrepareReport(False); diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm index ecf1851c..fa8946a1 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm @@ -1,8 +1,8 @@ object RptWordFacturaCliente: TRptWordFacturaCliente OldCreateOrder = False OnCreate = DataModuleCreate - Height = 245 - Width = 341 + Height = 366 + Width = 514 object schReport: TDASchema ConnectionManager = dmServer.ConnectionManager DataDictionary = DataDictionary @@ -265,7 +265,7 @@ object RptWordFacturaCliente: TRptWordFacturaCliente Params = < item Name = 'ID_FACTURA' - Value = '' + Value = '2' ParamType = daptInput end> Statements = < @@ -274,10 +274,13 @@ object RptWordFacturaCliente: TRptWordFacturaCliente ConnectionType = 'Interbase' Default = True SQL = - 'SELECT'#10' ID, ID_FACTURA, POSICION, TIPO_DETALLE, CONCEPTO, CAN' + - 'TIDAD,'#10' IMPORTE_UNIDAD, DESCUENTO, IMPORTE_TOTAL, VISIBLE'#10'FRO' + - 'M FACTURAS_CLIENTE_DETALLES'#10'WHERE ID_FACTURA = :ID_FACTURA AND V' + - 'ISIBLE = 1 AND {Where}'#10'ORDER BY ID_FACTURA, POSICION;'#10 + 'SELECT'#10' DET.ID, DET.ID_FACTURA, DET.POSICION, DET.TIPO_DETALL' + + 'E, ARTICULOS.REFERENCIA,'#10' F_RTFTOTEXT(CONCEPTO) as CONCEPTO, ' + + 'CONCEPTO as CONCEPTO_RTF, CANTIDAD,'#10' DET.IMPORTE_UNIDAD, DET.' + + 'DESCUENTO,'#10' DET.IMPORTE_TOTAL, DET.VISIBLE'#10'FROM FACTURAS_CLIE' + + 'NTE_DETALLES AS DET'#10'LEFT OUTER JOIN ARTICULOS ON (ARTICULOS.ID =' + + ' DET.ID_ARTICULO)'#10'WHERE DET.ID_FACTURA = :ID_FACTURA AND DET.VIS' + + 'IBLE = 1 AND {Where}'#10'ORDER BY DET.ID_FACTURA, DET.POSICION;'#10 StatementType = stSQL ColumnMappings = < item @@ -319,6 +322,14 @@ object RptWordFacturaCliente: TRptWordFacturaCliente item DatasetField = 'VISIBLE' TableField = 'VISIBLE' + end + item + DatasetField = 'REFERENCIA' + TableField = 'REFERENCIA' + end + item + DatasetField = 'CONCEPTO_RTF' + TableField = 'CONCEPTO_RTF' end> end> Name = 'Informe_Detalles' @@ -341,9 +352,19 @@ object RptWordFacturaCliente: TRptWordFacturaCliente DataType = datString Size = 10 end + item + Name = 'REFERENCIA' + DataType = datString + Size = 255 + end item Name = 'CONCEPTO' DataType = datString + Size = 254 + end + item + Name = 'CONCEPTO_RTF' + DataType = datString Size = 2000 end item diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas index 1d4865c7..c9b6a810 100644 --- a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas @@ -48,7 +48,7 @@ uses srvEmpresas_Impl, uROTypes, uROClasses; const - rptInforme = 'AlbaranCliente.rdx'; + rptInforme = 'FacturaCliente.rdx'; constructor TRptWordFacturaCliente.Create(AOwner: TComponent); begin @@ -174,7 +174,7 @@ var LinkToFile, SaveWithDocument, _Range : OleVariant; Imagen : InlineShape; _ShiftCells : OleVariant; - + ImporteAux : Double; begin //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA @@ -201,7 +201,10 @@ begin with FDocumento, tbl_Cabecera do begin - ReplaceBookmark('CodigoFacturaCab', FCodigoFactura); + //Activamos cabecera + FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; + + ReplaceBookmark('CodigoFacturaCab', FieldByName('REFERENCIA').AsString); ReplaceBookmark('FechaFacturaCab', FieldByName('FECHA_FACTURA').AsString); ReplaceBookmark('VencimientoCab', ''{FieldByName('FECHAVENCIMIENTO').AsString}); ReplaceBookmark('FormaPagoCab', FieldByName('FORMA_PAGO').AsString); @@ -216,7 +219,8 @@ begin FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString); ReplaceBookmark('BaseImponible', FormatFloat(DISPLAY_EUROS2, FieldByName('BASE_IMPONIBLE').AsFloat)); - // ???????? ReplaceBookmark('BaseImponible2', FormatFloat(DISPLAY_EUROS2, FieldByName('BASE_IMPONIBLE2').AsFloat); + ImporteAux := FieldByName('BASE_IMPONIBLE').AsFloat - FieldByName('IMPORTE_DESCUENTO').AsFloat; + ReplaceBookmark('BaseImponible2', FormatFloat(DISPLAY_EUROS2, ImporteAux)); if (FieldByName('DESCUENTO').AsInteger = 0) then begin @@ -343,14 +347,16 @@ begin FCodigoFactura := AID; - ACopiaPlantilla := DarFicheroTemporal; - CopiarFichero(FPlantilla, ACopiaPlantilla); - FPlantilla := ACopiaPlantilla; - try - if RecuperarEmpresa(tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger, tbl_Empresa) then + if RecuperarEmpresa(tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger, tbl_Empresa) then + begin + ACopiaPlantilla := DarFicheroTemporal; + CopiarFichero(FPlantilla, ACopiaPlantilla); + FPlantilla := ACopiaPlantilla; + try Generar; - finally - SysUtils.DeleteFile(ACopiaPlantilla); + finally + SysUtils.DeleteFile(ACopiaPlantilla); + end; end; end; diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm index f85f9f12..ba75d9d6 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm @@ -1,7 +1,6 @@ object srvFacturasCliente: TsrvFacturasCliente OldCreateOrder = True OnCreate = DARemoteServiceCreate - RequiresSession = True SessionManager = dmServer.SessionManager ConnectionName = 'IBX' ServiceSchema = schFacturasCliente diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index ff582306..180d8a39 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -47,7 +47,7 @@ uses uDataModuleServer, uDatabaseUtils, uUsersManager, schFacturasClienteClient_Intf, uRestriccionesUsuarioUtils, // uRptFacturasCliente_Server, - uBizFacturasClienteServer, uRptWordFacturaCliente; + uBizFacturasClienteServer, uRptWordFacturaCliente, uRptFacturasCliente_Server; procedure Create_srvFacturasCliente(out anInstance : IUnknown); begin @@ -84,16 +84,15 @@ begin end; function TsrvFacturasCliente.GenerateReport(const FacturaID: String): Binary; -//var -// AReportGenerator : TRptFacturasCliente; +var + AReportGenerator : TRptFacturasCliente; begin -{ AReportGenerator := TRptFacturasCliente.Create(nil); + AReportGenerator := TRptFacturasCliente.Create(nil); try Result := AReportGenerator.GenerarFactura(FacturaID); finally FreeAndNIL(AReportGenerator); end; - } end; function TsrvFacturasCliente.GenerateReportEnWord(const ID: Integer): Binary; diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm index 9abc0bd2..6eeb2d58 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.dfm @@ -3,7 +3,7 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente ClientWidth = 654 ExplicitWidth = 662 PixelsPerInch = 96 - TextHeight = 13 + TextHeight = 13 object JvgWizardHeader1: TJvgWizardHeader [0] Left = 0 Top = 0 @@ -192,14 +192,16 @@ inherited fEditorElegirFacturasCliente: TfEditorElegirFacturasCliente Width = 121 end inherited edtFechaFinFiltro: TcxDateEdit - ExplicitWidth = 343 - Width = 343 + ExplicitWidth = 416 + Width = 416 end end inherited TBXAlignmentPanel1: TTBXAlignmentPanel Width = 654 + ExplicitWidth = 654 inherited tbxBotones: TTBXToolbar Width = 644 + ExplicitWidth = 644 end end end diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas index 74268417..71cfe3b0 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorElegirFacturasCliente.pas @@ -1,4 +1,4 @@ -{ +{ =============================================================================== Copyright (©) 2007. Rodax Software. =============================================================================== @@ -37,7 +37,7 @@ uses uViewFacturasCliente, uEditorFacturasCliente, uBizFacturasCliente, uIEditorElegirFacturasCliente, Buttons, cxRadioGroup, cxMaskEdit, cxDropDownEdit, cxCalendar, cxControls, - cxContainer, cxEdit, cxTextEdit, TBXDkPanels, JSDialog; + cxContainer, cxEdit, cxTextEdit, TBXDkPanels, JSDialog, uDAInterfaces; type diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index 5ec8a382..6812a3c0 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -2,20 +2,20 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Left = 454 Top = 208 Caption = 'Nueva factura de cliente' - ClientHeight = 575 - ClientWidth = 788 + ClientHeight = 608 + ClientWidth = 829 Position = poScreenCenter OnClose = CustomEditorClose - ExplicitWidth = 796 - ExplicitHeight = 602 + ExplicitWidth = 837 + ExplicitHeight = 635 PixelsPerInch = 96 TextHeight = 13 inherited JvNavPanelHeader: TJvNavPanelHeader - Width = 788 + Width = 829 Caption = 'Nueva factura de cliente' ExplicitWidth = 788 inherited Image1: TImage - Left = 761 + Left = 802 Picture.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0000180806000000E0773DF80000000970485973000017120000171201679FD2 @@ -39,7 +39,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited TBXDock: TTBXDock - Width = 788 + Width = 829 ExplicitWidth = 788 inherited tbxMain: TTBXToolbar ExplicitWidth = 488 @@ -54,7 +54,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited tbxMenu: TTBXToolbar - ExplicitWidth = 788 + ExplicitWidth = 829 inherited TBXSubmenuItem4: TTBXSubmenuItem inherited TBXItem8: TTBXItem Visible = False @@ -69,8 +69,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited pgPaginas: TPageControl - Width = 782 - Height = 311 + Width = 823 + Height = 344 OnChanging = pgPaginasChanging ExplicitWidth = 782 ExplicitHeight = 311 @@ -82,8 +82,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente inline frViewFacturaCliente1: TfrViewFacturaCliente Left = 0 Top = 0 - Width = 774 - Height = 283 + Width = 815 + Height = 316 Align = alClient Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -96,13 +96,13 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitWidth = 774 ExplicitHeight = 283 inherited dxLayoutControl1: TdxLayoutControl - Width = 774 - Height = 283 + Width = 815 + Height = 316 ExplicitWidth = 774 ExplicitHeight = 283 DesignSize = ( - 774 - 283) + 815 + 316) inherited eReferencia: TcxDBTextEdit ExplicitWidth = 393 Width = 393 @@ -118,9 +118,9 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 473 end inherited frViewClienteFactura: TfrViewDatosYSeleccionCliente - Left = 471 + Left = 495 Width = 332 - ExplicitLeft = 471 + ExplicitLeft = 495 ExplicitWidth = 332 inherited dxLayoutControl1: TdxLayoutControl Width = 332 @@ -152,7 +152,13 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 327 end inherited edtCodigoPostal: TcxDBTextEdit + Left = 206 DataBinding.DataSource = frViewFacturaCliente1.DADataSource + ExplicitLeft = 206 + end + inherited Button3: TBitBtn + Left = 96 + ExplicitLeft = 96 end end end @@ -161,8 +167,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 255 end inherited bFormasPago: TButton - Left = 311 - ExplicitLeft = 311 + Left = 335 + ExplicitLeft = 335 end end end @@ -170,11 +176,13 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente object pagContenido: TTabSheet Caption = 'Contenido' ImageIndex = 1 + ExplicitWidth = 774 + ExplicitHeight = 283 inline frViewDetallesFacturaCliente1: TfrViewDetallesFacturaCliente Left = 0 Top = 0 - Width = 774 - Height = 283 + Width = 815 + Height = 316 Align = alClient BiDiMode = bdLeftToRight Font.Charset = DEFAULT_CHARSET @@ -189,14 +197,26 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitWidth = 774 ExplicitHeight = 283 inherited ToolBar1: TToolBar - Width = 774 + Width = 815 Height = 51 ExplicitWidth = 774 ExplicitHeight = 51 - inherited ToolButton14: TToolButton + inherited ToolButton3: TToolButton Wrap = False end - inherited FontName: TJvFontComboBox + inherited ToolButton4: TToolButton + Left = 278 + Top = 0 + ExplicitLeft = 278 + ExplicitTop = 0 + end + inherited ToolButton14: TToolButton [4] + Left = 334 + Top = 0 + ExplicitLeft = 334 + ExplicitTop = 0 + end + inherited FontName: TJvFontComboBox [5] Left = 399 Top = 0 ExplicitLeft = 399 @@ -210,13 +230,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitTop = 0 ExplicitWidth = 57 end - inherited UpDown1: TUpDown - Left = 601 - Top = 0 - ExplicitLeft = 601 - ExplicitTop = 0 - end - inherited ToolButton13: TToolButton + inherited ToolButton13: TToolButton [7] Left = 0 Top = 0 Wrap = True @@ -224,62 +238,67 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitTop = 0 ExplicitHeight = 27 end - inherited ToolButton6: TToolButton + inherited UpDown1: TUpDown [8] Left = 0 Top = 27 ExplicitLeft = 0 ExplicitTop = 27 end - inherited ToolButton7: TToolButton - Left = 66 + inherited ToolButton6: TToolButton [9] + Left = 17 Top = 27 - ExplicitLeft = 66 + ExplicitLeft = 17 ExplicitTop = 27 end - inherited ToolButton8: TToolButton - Left = 133 + inherited ToolButton7: TToolButton [10] + Left = 83 Top = 27 - ExplicitLeft = 133 + ExplicitLeft = 83 ExplicitTop = 27 end - inherited ToolButton12: TToolButton - Left = 216 + inherited ToolButton8: TToolButton [11] + Left = 150 Top = 27 - Wrap = False - ExplicitLeft = 216 + ExplicitLeft = 150 + ExplicitTop = 27 + end + inherited ToolButton12: TToolButton [12] + Left = 233 + Top = 27 + ExplicitLeft = 233 ExplicitTop = 27 ExplicitHeight = 22 end - inherited ToolButton9: TToolButton - Left = 224 + inherited ToolButton9: TToolButton [13] + Left = 241 Top = 27 - ExplicitLeft = 224 + ExplicitLeft = 241 ExplicitTop = 27 end - inherited ToolButton10: TToolButton - Left = 369 + inherited ToolButton10: TToolButton [14] + Left = 386 Top = 27 - ExplicitLeft = 369 + ExplicitLeft = 386 ExplicitTop = 27 end - inherited ToolButton11: TToolButton - Left = 494 + inherited ToolButton11: TToolButton [15] + Left = 511 Top = 27 - ExplicitLeft = 494 + ExplicitLeft = 511 ExplicitTop = 27 end end inherited cxGrid: TcxGrid Top = 77 - Width = 774 - Height = 206 + Width = 815 + Height = 239 ExplicitTop = 72 ExplicitWidth = 774 ExplicitHeight = 211 end inherited TBXDock1: TTBXDock Top = 51 - Width = 774 + Width = 815 ExplicitTop = 51 ExplicitWidth = 774 inherited TBXToolbar1: TTBXToolbar @@ -290,8 +309,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end end inherited StatusBar: TJvStatusBar - Top = 556 - Width = 788 + Top = 589 + Width = 829 Panels = < item Width = 200 @@ -301,8 +320,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end inline frViewTotales1: TfrViewTotales [4] Left = 0 - Top = 393 - Width = 788 + Top = 426 + Width = 829 Height = 163 Align = alBottom Font.Charset = DEFAULT_CHARSET @@ -317,7 +336,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitWidth = 788 ExplicitHeight = 163 inherited dxLayoutControl1: TdxLayoutControl - Width = 788 + Width = 829 LookAndFeel = frViewFacturaCliente1.dxLayoutOfficeLookAndFeel1 ExplicitWidth = 788 inherited Bevel1: TBevel @@ -327,18 +346,18 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitWidth = 73 end inherited Bevel3: TBevel - Left = 420 + Left = 441 Top = 30 Height = 122 - ExplicitLeft = 420 + ExplicitLeft = 441 ExplicitTop = 30 ExplicitHeight = 122 end inherited Bevel4: TBevel - Left = 532 + Left = 553 Top = 111 Width = 186 - ExplicitLeft = 532 + ExplicitLeft = 553 ExplicitTop = 111 ExplicitWidth = 186 end @@ -350,19 +369,19 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 93 end inherited ImporteIVA: TcxDBCurrencyEdit - Left = 603 + Left = 624 Top = 57 Style.IsFontAssigned = True - ExplicitLeft = 603 + ExplicitLeft = 624 ExplicitTop = 57 ExplicitWidth = 137 Width = 137 end inherited ImporteTotal: TcxDBCurrencyEdit - Left = 533 + Left = 554 Top = 131 Style.IsFontAssigned = True - ExplicitLeft = 533 + ExplicitLeft = 554 ExplicitTop = 131 ExplicitWidth = 137 Width = 137 @@ -374,34 +393,34 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitTop = 131 end inherited edtIVA: TcxDBSpinEdit - Left = 532 + Left = 553 Top = 57 Style.IsFontAssigned = True - ExplicitLeft = 532 + ExplicitLeft = 553 ExplicitTop = 57 end inherited ImporteBase: TcxDBCurrencyEdit - Left = 532 + Left = 553 Top = 30 Style.IsFontAssigned = True - ExplicitLeft = 532 + ExplicitLeft = 553 ExplicitTop = 30 ExplicitWidth = 92 Width = 92 end inherited edtRE: TcxDBSpinEdit - Left = 532 + Left = 553 Top = 84 Properties.AssignedValues.MinValue = True Style.IsFontAssigned = True - ExplicitLeft = 532 + ExplicitLeft = 553 ExplicitTop = 84 end inherited ImporteRE: TcxDBCurrencyEdit - Left = 603 + Left = 624 Top = 84 Style.IsFontAssigned = True - ExplicitLeft = 603 + ExplicitLeft = 624 ExplicitTop = 84 ExplicitWidth = 56 Width = 56 @@ -432,10 +451,10 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente Width = 134 end inherited bTiposIVA: TButton - Left = 272 + Left = 293 Top = 57 OnClick = frViewTotales1bTiposIVAClick - ExplicitLeft = 272 + ExplicitLeft = 293 ExplicitTop = 57 end inherited cbRecargoEquivalencia: TcxDBCheckBox diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas index e9f6da4a..3ff6456c 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas @@ -276,11 +276,8 @@ end; procedure TfEditorFacturaCliente.ImprimirInterno; begin -AppFactuGES.ShowCapado; -{ inherited; FController.Print(FFactura); -} end; procedure TfEditorFacturaCliente.OnClienteChanged(Sender: TObject); @@ -356,11 +353,8 @@ end; procedure TfEditorFacturaCliente.PrevisualizarInterno; begin -AppFactuGES.ShowCapado; -{ inherited; FController.Preview(FFactura); -} end; procedure TfEditorFacturaCliente.RecalcularPortePorUnidad; @@ -424,4 +418,3 @@ begin end; end. - \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas index 4b7e1c22..785f0e96 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasCliente.pas @@ -229,8 +229,7 @@ var AFacturas: IBizFacturaCliente; AllItems: Boolean; begin -AppFactuGES.ShowCapado; -{ + AFacturas := Nil; AllItems := False; @@ -264,7 +263,6 @@ AppFactuGES.ShowCapado; end; end; end; -} end; procedure TfEditorFacturasCliente.ModificarInterno; @@ -332,8 +330,6 @@ var AFacturas: IBizFacturaCliente; AllItems: Boolean; begin -AppFactuGES.ShowCapado; -{ AFacturas := Nil; AllItems := False; @@ -367,7 +363,6 @@ AppFactuGES.ShowCapado; end; end; end; -} end; procedure TfEditorFacturasCliente.SetController(const Value: IFacturasClienteController); @@ -384,4 +379,3 @@ begin end; end. - \ No newline at end of file diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.dfm index 80401039..6473d20c 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.dfm @@ -2,4 +2,13 @@ inherited fEditorFacturasClientePreview: TfEditorFacturasClientePreview Caption = 'Previsualizar la factura' PixelsPerInch = 96 TextHeight = 13 + inherited TBXDock: TTBXDock + inherited TBXToolbar1: TTBXToolbar + ExplicitWidth = 540 + object TBXItem58: TTBXItem [1] + Action = actExportarRTF + Images = SmallImages + end + end + end end diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.pas index 7c2f2149..5e52b371 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturasClienteReport.pas @@ -18,6 +18,7 @@ uses type TfEditorFacturasClientePreview = class(TfEditorPreview, IEditorFacturasClientePreview) + TBXItem58: TTBXItem; procedure actExportarRTFExecute(Sender: TObject); private { Private declarations } diff --git a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm index f6d57c38..84a9de91 100644 --- a/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm +++ b/Source/Modulos/Presupuestos de cliente/Views/uEditorPresupuestoCliente.dfm @@ -192,13 +192,14 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitLeft = 278 ExplicitTop = 0 end - inherited ToolButton14: TToolButton [4] + inherited ToolButton14: TToolButton Left = 334 Top = 0 + Wrap = False ExplicitLeft = 334 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox [5] + inherited FontName: TJvFontComboBox Left = 399 Top = 0 ExplicitLeft = 399 @@ -207,10 +208,10 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente inherited FontSize: TEdit Left = 544 Top = 0 - Width = 57 + Width = 72 ExplicitLeft = 544 ExplicitTop = 0 - ExplicitWidth = 57 + ExplicitWidth = 72 end inherited ToolButton13: TToolButton [7] Left = 0 @@ -226,45 +227,43 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente ExplicitLeft = 0 ExplicitTop = 27 end - inherited ToolButton6: TToolButton [9] + inherited ToolButton6: TToolButton Left = 17 Top = 27 ExplicitLeft = 17 ExplicitTop = 27 end - inherited ToolButton7: TToolButton [10] + inherited ToolButton7: TToolButton Left = 83 Top = 27 ExplicitLeft = 83 ExplicitTop = 27 end - inherited ToolButton8: TToolButton [11] + inherited ToolButton8: TToolButton Left = 150 Top = 27 ExplicitLeft = 150 ExplicitTop = 27 end - inherited ToolButton12: TToolButton [12] + inherited ToolButton12: TToolButton Left = 233 Top = 27 - Wrap = False ExplicitLeft = 233 ExplicitTop = 27 - ExplicitHeight = 22 end - inherited ToolButton9: TToolButton [13] + inherited ToolButton9: TToolButton Left = 241 Top = 27 ExplicitLeft = 241 ExplicitTop = 27 end - inherited ToolButton10: TToolButton [14] + inherited ToolButton10: TToolButton Left = 386 Top = 27 ExplicitLeft = 386 ExplicitTop = 27 end - inherited ToolButton11: TToolButton [15] + inherited ToolButton11: TToolButton Left = 511 Top = 27 ExplicitLeft = 511 @@ -275,9 +274,9 @@ inherited fEditorPresupuestoCliente: TfEditorPresupuestoCliente Top = 77 Width = 735 Height = 309 - ExplicitTop = 77 + ExplicitTop = 72 ExplicitWidth = 735 - ExplicitHeight = 309 + ExplicitHeight = 314 end inherited TBXDock1: TTBXDock Top = 51