From af970ff72c8f1280755a1525b6b4e682535ba2c9 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 20 May 2013 15:15:34 +0000 Subject: [PATCH] =?UTF-8?q?-=20Tarea=201207=20->=20REvisar=20en=20todos=20?= =?UTF-8?q?los=20informes=20que=20la=20mascara=20de=20la=20cantidad=20sea?= =?UTF-8?q?=20decimal=20para=20que=20salgan=20decimales=20-=20Limpieza=20d?= =?UTF-8?q?e=20ficheros=20-=20Quitar=20referencia=20a=20exportaci=C3=B3n?= =?UTF-8?q?=20de=20informes=20a=20Word?= 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.LuisLeon_FactuGES2/trunk@186 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2 --- Source/Informes/1/InfAlbaranCliente.fr3 | 4 +- Source/Informes/1/InfAlbaranProveedor.fr3 | 4 +- Source/Informes/1/InfFacturaCliente.fr3 | 6 +- Source/Informes/1/InfFacturaProveedor.fr3 | 6 +- Source/Informes/1/InfPedidoCliente.fr3 | 4 +- Source/Informes/1/InfPedidoProveedor.fr3 | 4 +- Source/Informes/2/InfAlbaranCliente.fr3 | 4 +- Source/Informes/2/InfAlbaranProveedor.fr3 | 4 +- Source/Informes/2/InfFacturaCliente.fr3 | 6 +- Source/Informes/2/InfFacturaProveedor.fr3 | 6 +- Source/Informes/2/InfPedidoCliente.fr3 | 4 +- Source/Informes/2/InfPedidoProveedor.fr3 | 4 +- Source/Informes/4/InfAlbaranCliente.fr3 | 4 +- Source/Informes/4/InfAlbaranProveedor.fr3 | 4 +- Source/Informes/4/InfPedidoCliente.fr3 | 4 +- Source/Informes/4/InfPedidoProveedor.fr3 | 4 +- Source/Informes/5/InfAlbaranCliente.fr3 | 4 +- Source/Informes/5/InfAlbaranProveedor.fr3 | 4 +- Source/Informes/5/InfFacturaCliente.fr3 | 6 +- Source/Informes/5/InfFacturaProveedor.fr3 | 6 +- Source/Informes/5/InfPedidoCliente.fr3 | 4 +- Source/Informes/5/InfPedidoProveedor.fr3 | 4 +- Source/Informes/6/InfAlbaranCliente.fr3 | 4 +- Source/Informes/6/InfAlbaranProveedor.fr3 | 4 +- Source/Informes/6/InfFacturaCliente.fr3 | 4 +- Source/Informes/6/InfFacturaProveedor.fr3 | 6 +- Source/Informes/6/InfPedidoCliente.fr3 | 4 +- Source/Informes/6/InfPedidoProveedor.fr3 | 4 +- .../Reports/uRptWordAlbaranCliente.dfm | 508 ----------- .../Reports/uRptWordAlbaranCliente.pas | 272 ------ .../Servidor/srvAlbaranesCliente_Impl.pas | 24 +- .../Reports/uRptWordAlbaranProveedor.dfm | 541 ------------ .../Reports/uRptWordAlbaranProveedor.pas | 295 ------- .../Servidor/srvAlbaranesProveedor_Impl.pas | 27 +- .../Contactos/Views/Contactos_view.res | Bin 4748 -> 384 bytes .../Reports/uRptWordFacturaCliente.dfm | 781 ----------------- .../Reports/uRptWordFacturaCliente.pas | 445 ---------- .../Servidor/srvFacturasCliente_Impl.pas | 23 +- .../Data/InfMargenArticulo_data.drc | 2 +- .../Model/InfMargenArticulo_model.drc | 2 +- .../Views/InfMargenArticulo_view.drc | 2 +- .../Data/InfVentasArticulo_data.drc | 2 +- .../Model/InfVentasArticulo_model.drc | 2 +- .../Views/InfVentasArticulo_view.drc | 2 +- .../Controller/InformesBase_controller.drc | 2 +- .../Informes base/Data/Informes_data.drc | 2 +- .../Informes base/Model/Informes_model.drc | 2 +- .../Informes base/Views/Informes_view.drc | 2 +- .../Reports/uRptWordPedidoProveedor.dfm | 550 ------------ .../Reports/uRptWordPedidoProveedor.pas | 289 ------- .../Servidor/srvPedidosProveedor_Impl.pas | 27 +- .../Controller/PedidosCliente_controller.drc | 2 +- .../Data/PedidosCliente_data.drc | 2 +- .../Model/PedidosCliente_model.drc | 2 +- .../Plugin/PedidosCliente_plugin.drc | 2 +- .../Views/PedidosCliente_view.drc | 2 +- .../uRptWordCertificadoTrabajo_Server.dfm | 563 ------------ .../uRptWordCertificadoTrabajo_Server.pas | 217 ----- .../Reports/uRptWordPresupuestoCliente.dfm | 700 --------------- .../Reports/uRptWordPresupuestoCliente.pas | 568 ------------- .../Servidor/srvPresupuestosCliente_Impl.pas | 49 +- .../Tienda web/Data/TiendaWeb_data.drc | 2 +- Source/Servicios/FactuGES.RODL | 60 -- Source/Servicios/FactuGES_Intf.pas | 120 --- Source/Servicios/FactuGES_Invk.pas | 186 ---- Source/Servicios/RODLFile.res | Bin 56958 -> 54858 bytes Source/Servidor/FactuGES_Server.RES | Bin 23492 -> 23196 bytes Source/Servidor/FactuGES_Server.dpr | 6 - Source/Servidor/FactuGES_Server.dproj | 804 +++++++++--------- Source/Servidor/FactuGES_Server.rc | 2 +- 70 files changed, 486 insertions(+), 6729 deletions(-) delete mode 100644 Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm delete mode 100644 Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.pas delete mode 100644 Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.dfm delete mode 100644 Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.pas delete mode 100644 Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm delete mode 100644 Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas delete mode 100644 Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.dfm delete mode 100644 Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.pas delete mode 100644 Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.dfm delete mode 100644 Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.pas delete mode 100644 Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.dfm delete mode 100644 Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas diff --git a/Source/Informes/1/InfAlbaranCliente.fr3 b/Source/Informes/1/InfAlbaranCliente.fr3 index 8d72520..520ea63 100644 --- a/Source/Informes/1/InfAlbaranCliente.fr3 +++ b/Source/Informes/1/InfAlbaranCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/1/InfAlbaranProveedor.fr3 b/Source/Informes/1/InfAlbaranProveedor.fr3 index 9a11f67..caff51d 100644 --- a/Source/Informes/1/InfAlbaranProveedor.fr3 +++ b/Source/Informes/1/InfAlbaranProveedor.fr3 @@ -1,11 +1,11 @@ - + - + diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3 index 1f28e7a..78c69f1 100644 --- a/Source/Informes/1/InfFacturaCliente.fr3 +++ b/Source/Informes/1/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ - + @@ -65,7 +65,7 @@ - + diff --git a/Source/Informes/1/InfFacturaProveedor.fr3 b/Source/Informes/1/InfFacturaProveedor.fr3 index ab520ce..44c9612 100644 --- a/Source/Informes/1/InfFacturaProveedor.fr3 +++ b/Source/Informes/1/InfFacturaProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/Source/Informes/1/InfPedidoCliente.fr3 b/Source/Informes/1/InfPedidoCliente.fr3 index c752ca3..6372203 100644 --- a/Source/Informes/1/InfPedidoCliente.fr3 +++ b/Source/Informes/1/InfPedidoCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3 index 97ded03..03ec46e 100644 --- a/Source/Informes/1/InfPedidoProveedor.fr3 +++ b/Source/Informes/1/InfPedidoProveedor.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/2/InfAlbaranCliente.fr3 b/Source/Informes/2/InfAlbaranCliente.fr3 index 9f0741a..2e033ea 100644 --- a/Source/Informes/2/InfAlbaranCliente.fr3 +++ b/Source/Informes/2/InfAlbaranCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/2/InfAlbaranProveedor.fr3 b/Source/Informes/2/InfAlbaranProveedor.fr3 index 84af24c..30a342d 100644 --- a/Source/Informes/2/InfAlbaranProveedor.fr3 +++ b/Source/Informes/2/InfAlbaranProveedor.fr3 @@ -1,11 +1,11 @@ - + - + diff --git a/Source/Informes/2/InfFacturaCliente.fr3 b/Source/Informes/2/InfFacturaCliente.fr3 index 3fff9cc..8d412a9 100644 --- a/Source/Informes/2/InfFacturaCliente.fr3 +++ b/Source/Informes/2/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -46,7 +46,7 @@ - + @@ -65,7 +65,7 @@ - + diff --git a/Source/Informes/2/InfFacturaProveedor.fr3 b/Source/Informes/2/InfFacturaProveedor.fr3 index 41c1a7c..7f302d5 100644 --- a/Source/Informes/2/InfFacturaProveedor.fr3 +++ b/Source/Informes/2/InfFacturaProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/Source/Informes/2/InfPedidoCliente.fr3 b/Source/Informes/2/InfPedidoCliente.fr3 index 56aba55..c02053d 100644 --- a/Source/Informes/2/InfPedidoCliente.fr3 +++ b/Source/Informes/2/InfPedidoCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/2/InfPedidoProveedor.fr3 b/Source/Informes/2/InfPedidoProveedor.fr3 index a9655ce..d5d03e0 100644 --- a/Source/Informes/2/InfPedidoProveedor.fr3 +++ b/Source/Informes/2/InfPedidoProveedor.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/4/InfAlbaranCliente.fr3 b/Source/Informes/4/InfAlbaranCliente.fr3 index 92861a1..781d8ab 100644 --- a/Source/Informes/4/InfAlbaranCliente.fr3 +++ b/Source/Informes/4/InfAlbaranCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/4/InfAlbaranProveedor.fr3 b/Source/Informes/4/InfAlbaranProveedor.fr3 index ec8e2c3..1ee403d 100644 --- a/Source/Informes/4/InfAlbaranProveedor.fr3 +++ b/Source/Informes/4/InfAlbaranProveedor.fr3 @@ -1,11 +1,11 @@ - + - + diff --git a/Source/Informes/4/InfPedidoCliente.fr3 b/Source/Informes/4/InfPedidoCliente.fr3 index acc05e7..4934fd0 100644 --- a/Source/Informes/4/InfPedidoCliente.fr3 +++ b/Source/Informes/4/InfPedidoCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/4/InfPedidoProveedor.fr3 b/Source/Informes/4/InfPedidoProveedor.fr3 index ab6a21c..df0970b 100644 --- a/Source/Informes/4/InfPedidoProveedor.fr3 +++ b/Source/Informes/4/InfPedidoProveedor.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/5/InfAlbaranCliente.fr3 b/Source/Informes/5/InfAlbaranCliente.fr3 index 6b3dd66..8b39068 100644 --- a/Source/Informes/5/InfAlbaranCliente.fr3 +++ b/Source/Informes/5/InfAlbaranCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/5/InfAlbaranProveedor.fr3 b/Source/Informes/5/InfAlbaranProveedor.fr3 index 90ad618..fcc2417 100644 --- a/Source/Informes/5/InfAlbaranProveedor.fr3 +++ b/Source/Informes/5/InfAlbaranProveedor.fr3 @@ -1,11 +1,11 @@ - + - + diff --git a/Source/Informes/5/InfFacturaCliente.fr3 b/Source/Informes/5/InfFacturaCliente.fr3 index ed37ee1..051b6f6 100644 --- a/Source/Informes/5/InfFacturaCliente.fr3 +++ b/Source/Informes/5/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ - + @@ -64,7 +64,7 @@ - + diff --git a/Source/Informes/5/InfFacturaProveedor.fr3 b/Source/Informes/5/InfFacturaProveedor.fr3 index cdad5d4..109b4b7 100644 --- a/Source/Informes/5/InfFacturaProveedor.fr3 +++ b/Source/Informes/5/InfFacturaProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/Source/Informes/5/InfPedidoCliente.fr3 b/Source/Informes/5/InfPedidoCliente.fr3 index 9385a51..22eac59 100644 --- a/Source/Informes/5/InfPedidoCliente.fr3 +++ b/Source/Informes/5/InfPedidoCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/5/InfPedidoProveedor.fr3 b/Source/Informes/5/InfPedidoProveedor.fr3 index a9655ce..32b4afe 100644 --- a/Source/Informes/5/InfPedidoProveedor.fr3 +++ b/Source/Informes/5/InfPedidoProveedor.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/6/InfAlbaranCliente.fr3 b/Source/Informes/6/InfAlbaranCliente.fr3 index 6257f8c..eddfb35 100644 --- a/Source/Informes/6/InfAlbaranCliente.fr3 +++ b/Source/Informes/6/InfAlbaranCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/6/InfAlbaranProveedor.fr3 b/Source/Informes/6/InfAlbaranProveedor.fr3 index 90ad618..8209824 100644 --- a/Source/Informes/6/InfAlbaranProveedor.fr3 +++ b/Source/Informes/6/InfAlbaranProveedor.fr3 @@ -1,11 +1,11 @@ - + - + diff --git a/Source/Informes/6/InfFacturaCliente.fr3 b/Source/Informes/6/InfFacturaCliente.fr3 index 64c5c45..2c07ed5 100644 --- a/Source/Informes/6/InfFacturaCliente.fr3 +++ b/Source/Informes/6/InfFacturaCliente.fr3 @@ -1,5 +1,5 @@ - + @@ -44,7 +44,7 @@ - + diff --git a/Source/Informes/6/InfFacturaProveedor.fr3 b/Source/Informes/6/InfFacturaProveedor.fr3 index cdad5d4..7dcf8fa 100644 --- a/Source/Informes/6/InfFacturaProveedor.fr3 +++ b/Source/Informes/6/InfFacturaProveedor.fr3 @@ -1,5 +1,5 @@ - + @@ -45,7 +45,7 @@ - + @@ -67,7 +67,7 @@ - + diff --git a/Source/Informes/6/InfPedidoCliente.fr3 b/Source/Informes/6/InfPedidoCliente.fr3 index db890ca..6acff20 100644 --- a/Source/Informes/6/InfPedidoCliente.fr3 +++ b/Source/Informes/6/InfPedidoCliente.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Informes/6/InfPedidoProveedor.fr3 b/Source/Informes/6/InfPedidoProveedor.fr3 index a9655ce..285100d 100644 --- a/Source/Informes/6/InfPedidoProveedor.fr3 +++ b/Source/Informes/6/InfPedidoProveedor.fr3 @@ -1,10 +1,10 @@ - + - + diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm b/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm deleted file mode 100644 index 50684db..0000000 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.dfm +++ /dev/null @@ -1,508 +0,0 @@ -object RptWordAlbaranCliente: TRptWordAlbaranCliente - OldCreateOrder = False - OnCreate = DataModuleCreate - Height = 262 - Width = 374 - object schReport: TDASchema - ConnectionManager = dmServer.ConnectionManager - DataDictionary = DataDictionary - Datasets = < - item - Params = < - item - Name = 'ID' - Value = '14' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'SELECT'#10' V_ALBARANES_CLIENTE.ID, V_ALBARANES_CLIENTE.ID_EMPRESA,' + - #10' V_ALBARANES_CLIENTE.ID_CLIENTE,'#10' V_ALBARANES_CLIENTE.FECHA_A' + - 'LBARAN,'#10' V_ALBARANES_CLIENTE.REFERENCIA,'#10' V_ALBARANES_CLIENTE.' + - 'REFERENCIA_CLIENTE,'#10' V_ALBARANES_CLIENTE.ID_PEDIDO,'#10' V_ALBARAN' + - 'ES_CLIENTE.REF_PEDIDO,'#10' V_ALBARANES_CLIENTE.OBSERVACIONES,'#10' V_' + - 'ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' CONTACTOS.NIF_CIF, CONTACTOS.' + - 'NOMBRE,'#10' V_ALBARANES_CLIENTE.PERSONA_CONTACTO,'#10' COALESCE(CONTA' + - 'CTOS_DIRECCIONES.CALLE, CONTACTOS.CALLE) AS CALLE,'#10' COALESCE(CO' + - 'NTACTOS_DIRECCIONES.POBLACION, CONTACTOS.POBLACION) AS POBLACION' + - ','#10' COALESCE(CONTACTOS_DIRECCIONES.PROVINCIA, CONTACTOS.PROVINCI' + - 'A) AS PROVINCIA,'#10' COALESCE(CONTACTOS_DIRECCIONES.CODIGO_POSTAL,' + - ' CONTACTOS.CODIGO_POSTAL) AS CODIGO_POSTAL'#10'FROM'#10' V_ALBARANES_CL' + - 'IENTE'#10' INNER JOIN CONTACTOS ON (CONTACTOS.ID = V_ALBARANES_CLIE' + - 'NTE.ID_CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS_DIRECCIONES ON (CONT' + - 'ACTOS_DIRECCIONES.ID = V_ALBARANES_CLIENTE.ID_DIRECCION)'#10'WHERE V' + - '_ALBARANES_CLIENTE.ID = :ID'#10#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_EMPRESA' - TableField = 'ID_EMPRESA' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'OBSERVACIONES' - TableField = 'OBSERVACIONES' - end - item - DatasetField = 'ID_CLIENTE' - TableField = 'ID_CLIENTE' - end - item - DatasetField = 'REFERENCIA_CLIENTE' - TableField = 'REFERENCIA_CLIENTE' - end - item - DatasetField = 'NIF_CIF' - TableField = 'NIF_CIF' - end - item - DatasetField = 'NOMBRE' - TableField = 'NOMBRE' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'PERSONA_CONTACTO' - TableField = 'PERSONA_CONTACTO' - end - item - DatasetField = 'FECHA_ALBARAN' - TableField = 'FECHA_ALBARAN' - end - item - DatasetField = 'ID_PEDIDO' - TableField = 'ID_PEDIDO' - end - item - DatasetField = 'REF_PEDIDO' - TableField = 'REF_PEDIDO' - end - item - DatasetField = 'CALLE' - TableField = 'CALLE' - end - item - DatasetField = 'POBLACION' - TableField = 'POBLACION' - end - item - DatasetField = 'PROVINCIA' - TableField = 'PROVINCIA' - end - item - DatasetField = 'CODIGO_POSTAL' - TableField = 'CODIGO_POSTAL' - end> - end> - Name = 'Informe_Cabecera' - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'FECHA_ALBARAN' - DataType = datDateTime - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'REFERENCIA_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'ID_PEDIDO' - DataType = datInteger - end - item - Name = 'REF_PEDIDO' - DataType = datString - Size = 255 - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end> - ReadOnly = True - end - item - Params = < - item - Name = 'ID_ALBARAN' - Value = '2' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - SQL = - 'SELECT ALBARANES_CLIENTE_DETALLES.ID, ALBARANES_CLIENTE_DETALLES' + - '.ID_ALBARAN,'#10' ALBARANES_CLIENTE_DETALLES.POSICION, ALBARAN' + - 'ES_CLIENTE_DETALLES.TIPO_DETALLE,'#10' F_RTFTOTEXT(ALBARANES_C' + - 'LIENTE_DETALLES.CONCEPTO) as CONCEPTO, ALBARANES_CLIENTE_DETALLE' + - 'S.CANTIDAD,'#10' ALBARANES_CLIENTE_DETALLES.UNIDAD_MEDIDA,'#10' ' + - ' ALBARANES_CLIENTE_DETALLES.IMPORTE_UNIDAD, ALBARANES_CLIENTE' + - '_DETALLES.IMPORTE_TOTAL,'#10' ARTICULOS.REFERENCIA'#10'FROM ALBARA' + - 'NES_CLIENTE_DETALLES'#10' LEFT JOIN ARTICULOS ON (ALBARANES_CLIE' + - 'NTE_DETALLES.ID_ARTICULO = ARTICULOS.ID)'#10' WHERE {Where}'#10' AND' + - ' (VISIBLE) <> 0'#10' AND (ID_ALBARAN = :ID_ALBARAN)'#10' ORDER BY ID' + - '_ALBARAN, POSICION'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_ALBARAN' - TableField = 'ID_ALBARAN' - end - item - DatasetField = 'POSICION' - TableField = 'POSICION' - end - item - DatasetField = 'TIPO_DETALLE' - TableField = 'TIPO_DETALLE' - end - item - DatasetField = 'CONCEPTO' - TableField = 'CONCEPTO' - end - item - DatasetField = 'CANTIDAD' - TableField = 'CANTIDAD' - end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end - item - DatasetField = 'IMPORTE_UNIDAD' - TableField = 'IMPORTE_UNIDAD' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end> - end> - Name = 'Informe_Detalles' - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_ALBARAN' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 254 - end - item - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end> - ReadOnly = True - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 48 - Top = 16 - end - object DataDictionary: TDADataDictionary - Fields = <> - Left = 46 - Top = 142 - end - object DABin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 80 - end - object tbl_Cabecera: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'FECHA_ALBARAN' - DataType = datDateTime - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'REFERENCIA_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'ID_PEDIDO' - DataType = datInteger - end - item - Name = 'REF_PEDIDO' - DataType = datString - Size = 255 - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end> - Params = < - item - Name = 'ID' - Value = '2' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Cabecera' - IndexDefs = <> - Left = 168 - Top = 16 - end - object tbl_Detalles: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_ALBARAN' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 254 - end - item - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end> - Params = < - item - Name = 'ID_ALBARAN' - Value = '2' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Detalles' - IndexDefs = <> - Left = 264 - Top = 16 - end - object tbl_Empresa: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = <> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LogicalName = 'Empresa' - IndexDefs = <> - Left = 168 - Top = 80 - end -end diff --git a/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.pas b/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.pas deleted file mode 100644 index 106cf3d..0000000 --- a/Source/Modulos/Albaranes de cliente/Reports/uRptWordAlbaranCliente.pas +++ /dev/null @@ -1,272 +0,0 @@ -unit uRptWordAlbaranCliente; - -interface - -uses - SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase, - Word2000, - uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses, - uDAScriptingProvider, uDADataTable, uDAMemDataTable; - -type - TRptWordAlbaranCliente = class(TDataModule) - DABin2DataStreamer: TDABin2DataStreamer; - tbl_Cabecera: TDAMemDataTable; - tbl_Detalles: TDAMemDataTable; - tbl_Empresa: TDAMemDataTable; - schReport: TDASchema; - DataDictionary: TDADataDictionary; - procedure DataModuleCreate(Sender: TObject); - private - FConnection: IDAConnection; - FWordApp : TWordApp; - FDocumento : TWordDoc; - FPlantilla : string; - FCodigoAlbaran : string; - FNombreFichero : string; - function RellenarInforme : Boolean; - procedure RellenarDatosAlbaran; - procedure RellenarDatosDetalle; - function Generar: Boolean; - procedure _GenerarAlbaran(const AID: String); - public - function Exportar(Codigo, Fichero : String): Boolean; - constructor Create (AOwner : TComponent); override; - destructor Destroy; override; - end; - -implementation - -{ TRptWordAlbaranCliente } - -{$R *.dfm} - -uses - Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc, - srvEmpresas_Impl, uROTypes, uROClasses; - -const - rptInforme = 'AlbaranCliente.rdx'; - -constructor TRptWordAlbaranCliente.Create(AOwner: TComponent); -begin - inherited; - FDocumento := NIL; -end; - -procedure TRptWordAlbaranCliente.DataModuleCreate(Sender: TObject); -begin - schReport.ConnectionManager := dmServer.ConnectionManager; - FConnection := dmServer.DarNuevaConexion; -end; - -destructor TRptWordAlbaranCliente.Destroy; -begin - if FDocumento <> NIL then - FDocumento.Free; - FDocumento := NIL; - - inherited; -end; - -function TRptWordAlbaranCliente.Generar: Boolean; -begin - FWordApp := TWordApp.Create (False, False); - with FWordApp do - begin - Visible := False; - ScreenUpdating := False; - end; - - FDocumento := TWordDoc.CreateOpenDoc (FWordApp, FPlantilla); - FWordApp.SaveActiveDocAs(FNombreFichero); - try - if not RellenarInforme then - RaiseError('Se producido un error al generar el informe en MS Word.'); - - FWordApp.CloseApp(wdSaveChanges); - Result := True; - finally - FDocumento := NIL; - FWordApp := NIL; - end; -end; - -function TRptWordAlbaranCliente.RellenarInforme: Boolean; -begin - RellenarDatosAlbaran; - RellenarDatosDetalle; - Result := True; -end; - -procedure TRptWordAlbaranCliente.RellenarDatosAlbaran; -//var -// FicheroTemporal : String; -// LinkToFile, SaveWithDocument, _Range : OleVariant; -// Imagen : InlineShape; - -begin - - //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA - {--------------------------- PENDIENTE - if (EmpresaActiva.Logotipo <> Nil) then - begin - //Activamos cabecera - FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; - LinkToFile := False; - SaveWithDocument := True; - _Range := EmptyParam; - FicheroTemporal := DarFicheroTemporal; - EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal); - Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(ficherotemporal, LinkToFile, SaveWithDocument, _Range); - - //Formateamos imagen - if ((Imagen.Get_Width > ANCHO_LOGO_INF)) then - begin - Imagen.Set_Height(((ANCHO_LOGO_INF * Imagen.Get_Height) /Imagen.Get_Width)); - Imagen.Set_Width(ANCHO_LOGO_INF); - end; - end; - ---------------------------- } - - with FDocumento, tbl_Cabecera do - begin - ReplaceBookmark('CodigoAlbaranCab', FieldByName('REFERENCIA').AsString); - ReplaceBookmark('FechaAlbaranCab', FieldByName('FECHA_ALBARAN').AsString); - - ReplaceBookmark('NombreClienteCab', FieldByName('NOMBRE').AsString); - ReplaceBookmark('DireccionClienteCab', FieldByName('CALLE').AsString); - ReplaceBookmark('PoblacionClienteCab', - FieldByName('CODIGO_POSTAL').AsString + ' ' + - FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString); - ReplaceBookmark('ContactoClienteCab', FieldByName('PERSONA_CONTACTO').AsString); - -{P571 - ReplaceBookmark('BaseImponible', FieldByName('BASEIMPONIBLE').DisplayText); - if esCadenaVacia(FieldByName('Descuento').DisplayText) - then ReplaceBookmark('Descuento', '0') - else ReplaceBookmark('Descuento', FieldByName('DESCUENTO').DisplayText); - ReplaceBookmark('ImporteDescuento', FieldByName('IMPORTEDESCUENTO').DisplayText); - if esCadenaVacia(FieldByName('IVA').DisplayText) - then ReplaceBookmark('IVA', '0') - else ReplaceBookmark('IVA', FieldByName('IVA').DisplayText); - ReplaceBookmark('ImporteIVA', FieldByName('IMPORTEIVA').DisplayText); - ReplaceBookmark('ImporteTotal', FieldByName('IMPORTETOTAL').DisplayText); -} - - ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString); - ReplaceBookmark('DireccionEmpresa', - Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString, - tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString])); - ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString); - ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString); - ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString); - end; -end; - -procedure TRptWordAlbaranCliente.RellenarDatosDetalle; -var - numRows, numCols, mergesplit : OleVariant; - MaxCols, iRowCount : Integer; - ACantidad: String; - AIndice: Integer; - AText : String; -begin - iRowCount := 2; - numrows := 2; - numcols := 1; - mergeSplit := False; - MaxCols := 24; - - with FDocumento.Document.Tables.Item(1), tbl_Detalles do - begin - First; - while not EOF do - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - Cell(iRowCount, 1).Range.Text := FieldByName('REFERENCIA').AsString; - Cell(iRowCount, 2).Range.Text := FieldByName('CONCEPTO').AsString; - - ACantidad := FloatToStr(FieldByName('CANTIDAD').AsFloat); - if ACantidad = '0' then - AText := '' - else begin - AIndice := Pos(',', ACantidad); - if AIndice > 0 then - AText := FormatFloat('#,0.00', FieldByName('CANTIDAD').AsFloat) - else - AText := FormatFloat('#,0.##', FieldByName('CANTIDAD').AsFloat); - end; - - Cell(iRowCount, 3).Range.Text := AText + ' ' + FieldByName('UNIDAD_MEDIDA').AsString; - - - if (FieldByName('IMPORTE_UNIDAD').AsFloat = 0) then - Cell(iRowCount, 4).Range.Text := '' - else - Cell(iRowCount, 4).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat); - - if (FieldByName('IMPORTE_TOTAL').AsFloat = 0) then - Cell(iRowCount, 5).Range.Text := '' - else - Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat); - Next; - Inc (iRowCount); - end; - Rows.Item(iRowCount).Delete; - {while iRowCount <= MaxCols do - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - inc (iRowCount); - end;} - end; -end; - - -function TRptWordAlbaranCliente.Exportar(Codigo, - Fichero: String): Boolean; -begin - if EsCadenaVacia(Fichero) then - begin - Result := False; - raise Exception.Create('Falta indicar el fichero donde se exportará el listado.'); - end; - - FNombreFichero := Fichero; - FCodigoAlbaran := Codigo; - _GenerarAlbaran(Codigo); - Result := True; -end; - -procedure TRptWordAlbaranCliente._GenerarAlbaran(const AID: String); -var - ACopiaPlantilla : String; -begin - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - try - tbl_Cabecera.ParamByName('ID').AsString := AID; - tbl_Detalles.ParamByName('ID_ALBARAN').AsString := AID; - - tbl_Cabecera.Active := True; - tbl_Detalles.Active := True; - - FPlantilla := DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme; - FCodigoAlbaran := AID; - - ACopiaPlantilla := DarFicheroTemporal; - CopiarFichero(FPlantilla, ACopiaPlantilla); - FPlantilla := ACopiaPlantilla; - try - if RecuperarEmpresa(tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger, tbl_Empresa) then - Generar; - finally - SysUtils.DeleteFile(ACopiaPlantilla); - end; - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; -end; - - -end. diff --git a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas index 8968f51..ec547f3 100644 --- a/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas +++ b/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.pas @@ -33,7 +33,6 @@ type protected { IsrvAlbaranesCliente methods } function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer): Binary; function GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; @@ -50,8 +49,7 @@ implementation uses {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, schAlbaranesClienteClient_Intf, uRestriccionesUsuarioUtils, - uRptAlbaranesCliente_Server, uBizAlbaranClienteServer, uRptWordAlbaranCliente, - uSistemaFunc; + uRptAlbaranesCliente_Server, uBizAlbaranClienteServer, uSistemaFunc; procedure Create_srvAlbaranesCliente(out anInstance : IUnknown); begin @@ -142,26 +140,6 @@ begin end; end; -function TsrvAlbaranesCliente.GenerarInformeEnWord(const ID: Integer): Binary; -var - AReportGenerator : TRptWordAlbaranCliente; - AFicheroTMP : TFileName; -begin - Result := NIL; - AFicheroTMP := DarFicheroTemporal; - AReportGenerator := TRptWordAlbaranCliente.Create(nil); - try - if AReportGenerator.Exportar(IntToStr(ID), AFicheroTMP) then - begin - Result := Binary.Create; - Result.LoadFromFile(AFicheroTMP); - SysUtils.DeleteFile(AFicheroTMP) - end; - finally - FreeAndNIL(AReportGenerator); - end; -end; - initialization TROClassFactory.Create('srvAlbaranesCliente', Create_srvAlbaranesCliente, TsrvAlbaranesCliente_Invoker); diff --git a/Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.dfm b/Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.dfm deleted file mode 100644 index 943dca0..0000000 --- a/Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.dfm +++ /dev/null @@ -1,541 +0,0 @@ -object RptWordAlbaranProveedor: TRptWordAlbaranProveedor - OldCreateOrder = False - OnCreate = DataModuleCreate - Height = 223 - Width = 337 - object schReport: TDASchema - ConnectionManager = dmServer.ConnectionManager - DataDictionary = DataDictionary - Datasets = < - item - IsPublic = False - Params = < - item - Name = 'ID' - Value = '3' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'SELECT'#10' ALBARANES_PROVEEDOR.ID,'#10' ALBARANES_PROVEEDOR.ID_EMPRES' + - 'A,'#10' ALBARANES_PROVEEDOR.TIPO,'#10' ALBARANES_PROVEEDOR.REFERENCIA,' + - #10' ALBARANES_PROVEEDOR.FECHA_ALBARAN,'#10' ALBARANES_PROVEEDOR.OBSE' + - 'RVACIONES,'#10' CONTACTOS.NOMBRE,'#10' COALESCE(CONTACTOS_DIRECCIONES.' + - 'FAX, CONTACTOS.FAX) AS FAX,'#10' ALBARANES_PROVEEDOR.PERSONA_CONTAC' + - 'TO_PROV AS PERSONA_CONTACTO,'#10' PROVEEDORES_DATOS.CODIGO_ASIGNADO' + - ' AS CODIGO_CLIENTE,'#10' ALBARANES_PROVEEDOR.ID_ALMACEN,'#10' COALESCE' + - '(ALMACENES.CALLE, ALBARANES_PROVEEDOR.CALLE) AS CALLE,'#10' COALESC' + - 'E(ALMACENES.POBLACION, ALBARANES_PROVEEDOR.POBLACION) AS POBLACI' + - 'ON,'#10' COALESCE(ALMACENES.PROVINCIA, ALBARANES_PROVEEDOR.PROVINCI' + - 'A) AS PROVINCIA,'#10' COALESCE(ALMACENES.CODIGO_POSTAL, ALBARANES_P' + - 'ROVEEDOR.CODIGO_POSTAL) AS CODIGO_POSTAL,'#10' ALBARANES_PROVEEDOR.' + - 'PERSONA_CONTACTO AS ENTREGAR_A,'#10' ALBARANES_PROVEEDOR.IMPORTE_TO' + - 'TAL'#10'FROM'#10' ALBARANES_PROVEEDOR'#10' INNER JOIN CONTACTOS ON (CONTAC' + - 'TOS.ID = ALBARANES_PROVEEDOR.ID_PROVEEDOR)'#10' LEFT OUTER JOIN PRO' + - 'VEEDORES_DATOS ON (PROVEEDORES_DATOS.ID_PROVEEDOR = ALBARANES_PR' + - 'OVEEDOR.ID_PROVEEDOR)'#10' LEFT OUTER JOIN CONTACTOS_DIRECCIONES ON' + - ' (CONTACTOS_DIRECCIONES.ID = ALBARANES_PROVEEDOR.ID_DIRECCION)'#10' ' + - ' LEFT OUTER JOIN ALMACENES ON (ALMACENES.ID = ALBARANES_PROVEEDO' + - 'R.ID_ALMACEN)'#10'WHERE ALBARANES_PROVEEDOR.ID = :ID'#10#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_EMPRESA' - TableField = 'ID_EMPRESA' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'OBSERVACIONES' - TableField = 'OBSERVACIONES' - end - item - DatasetField = 'NOMBRE' - TableField = 'NOMBRE' - end - item - DatasetField = 'FAX' - TableField = 'FAX' - end - item - DatasetField = 'PERSONA_CONTACTO' - TableField = 'PERSONA_CONTACTO' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'ID_ALMACEN' - TableField = 'ID_ALMACEN' - end - item - DatasetField = 'CODIGO_CLIENTE' - TableField = 'CODIGO_CLIENTE' - end - item - DatasetField = 'TIPO' - TableField = 'TIPO' - end - item - DatasetField = 'FECHA_ALBARAN' - TableField = 'FECHA_ALBARAN' - end - item - DatasetField = 'CALLE' - TableField = 'CALLE' - end - item - DatasetField = 'POBLACION' - TableField = 'POBLACION' - end - item - DatasetField = 'PROVINCIA' - TableField = 'PROVINCIA' - end - item - DatasetField = 'CODIGO_POSTAL' - TableField = 'CODIGO_POSTAL' - end - item - DatasetField = 'ENTREGAR_A' - TableField = 'ENTREGAR_A' - end> - end> - Name = 'Informe_Cabecera' - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'TIPO' - DataType = datString - Size = 1 - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'FECHA_ALBARAN' - DataType = datDateTime - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'FAX' - DataType = datString - Size = 25 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'ID_ALMACEN' - DataType = datInteger - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'ENTREGAR_A' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end> - ReadOnly = True - end - item - IsPublic = False - Params = < - item - Name = 'ID_ALBARAN' - Value = '' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - SQL = - 'SELECT DET.ID, DET.ID_ALBARAN,'#10' DET.POSICION, DET.TIPO_DET' + - 'ALLE,'#10' ARTICULOS.REFERENCIA, F_RTFTOTEXT(CONCEPTO) as CONC' + - 'EPTO, DET.CANTIDAD,'#10' DET.UNIDAD_MEDIDA, DET.IMPORTE_UNIDAD' + - ' - (DET.IMPORTE_UNIDAD * (COALESCE(DET.DESCUENTO,0) / 100)) as I' + - 'MPORTE_UNIDAD, DET.IMPORTE_TOTAL,'#10' ARTICULOS_PROVEEDORES.R' + - 'EFERENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' ARTICULOS.REFEREN' + - 'CIA_FABR as REFERENCIA_FABRICANTE'#10'FROM ALBARANES_PROVEEDOR_DETAL' + - 'LES DET'#10'LEFT OUTER JOIN ARTICULOS ON (DET.ID_ARTICULO = ARTICULO' + - 'S.ID)'#10'LEFT JOIN ALBARANES_PROVEEDOR ON (ALBARANES_PROVEEDOR.ID =' + - ' DET.ID_ALBARAN)'#10'LEFT JOIN ARTICULOS_PROVEEDORES ON ((ARTICULOS_' + - 'PROVEEDORES.ID_ARTICULO = ARTICULOS.ID) AND (ARTICULOS_PROVEEDOR' + - 'ES.ID_PROVEEDOR = ALBARANES_PROVEEDOR.ID_PROVEEDOR))'#10'WHERE DET.I' + - 'D_ALBARAN = :ID_ALBARAN AND DET.VISIBLE = 1 AND {Where}'#10'ORDER BY' + - ' DET.ID_ALBARAN, DET.POSICION;'#10#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_ALBARAN' - TableField = 'ID_ALBARAN' - end - item - DatasetField = 'POSICION' - TableField = 'POSICION' - end - item - DatasetField = 'TIPO_DETALLE' - TableField = 'TIPO_DETALLE' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'CONCEPTO' - TableField = 'CONCEPTO' - end - item - DatasetField = 'CANTIDAD' - TableField = 'CANTIDAD' - end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end - item - DatasetField = 'IMPORTE_UNIDAD' - TableField = 'IMPORTE_UNIDAD' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'REFERENCIA_PROVEEDOR' - TableField = 'REFERENCIA_PROVEEDOR' - end - item - DatasetField = 'REFERENCIA_FABRICANTE' - TableField = 'REFERENCIA_FABRICANTE' - end> - end> - Name = 'Informe_Detalles' - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_ALBARAN' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 2000 - end - item - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datFloat - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'REFERENCIA_PROVEEDOR' - DataType = datString - Size = 255 - end - item - Name = 'REFERENCIA_FABRICANTE' - DataType = datString - Size = 255 - end> - ReadOnly = True - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 48 - Top = 16 - end - object DataDictionary: TDADataDictionary - Fields = <> - Left = 46 - Top = 142 - end - object DABin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 80 - end - object tbl_Cabecera: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'TIPO' - DataType = datString - Size = 1 - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'FECHA_ALBARAN' - DataType = datDateTime - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'FAX' - DataType = datString - Size = 25 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'ID_ALMACEN' - DataType = datInteger - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'ENTREGAR_A' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end> - Params = < - item - Name = 'ID' - Value = '3' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Cabecera' - IndexDefs = <> - Left = 168 - Top = 16 - end - object tbl_Detalles: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_ALBARAN' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 2000 - end - item - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datFloat - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'REFERENCIA_PROVEEDOR' - DataType = datString - Size = 255 - end - item - Name = 'REFERENCIA_FABRICANTE' - DataType = datString - Size = 255 - end> - Params = < - item - Name = 'ID_ALBARAN' - Value = '' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Detalles' - IndexDefs = <> - Left = 264 - Top = 16 - end - object tbl_Empresa: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = <> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LogicalName = 'Empresa' - IndexDefs = <> - Left = 168 - Top = 80 - end -end diff --git a/Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.pas b/Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.pas deleted file mode 100644 index c87fa38..0000000 --- a/Source/Modulos/Albaranes de proveedor/Reports/uRptWordAlbaranProveedor.pas +++ /dev/null @@ -1,295 +0,0 @@ -unit uRptWordAlbaranProveedor; - -interface - -uses - SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase, - Word2000, uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses, - uDAScriptingProvider, uDADataTable, uDAMemDataTable; - -type - TRptWordAlbaranProveedor = class(TDataModule) - DABin2DataStreamer: TDABin2DataStreamer; - tbl_Cabecera: TDAMemDataTable; - tbl_Detalles: TDAMemDataTable; - tbl_Empresa: TDAMemDataTable; - schReport: TDASchema; - DataDictionary: TDADataDictionary; - procedure DataModuleCreate(Sender: TObject); - private - FConnection: IDAConnection; - FPlantilla : string; - FWordApp : TWordApp; - FDocumento : TWordDoc; - FCodigoAlbaran : string; - FNombreFichero : String; - - function Generar : Boolean; - function RellenarDatosAlbaran : Boolean; - function RellenarDatosDetalle : Boolean; - procedure _GenerarAlbaran(const AID: String); - public - ImprimirPrecio : Boolean; - ImprimirRefProveedor : Boolean; - function Exportar(Codigo, Fichero : String): Boolean; - constructor Create (AOwner : TComponent); override; - destructor Destroy; override; - end; - -implementation - -{ TRptWordAlbaranProveedor } - -{$R *.dfm} - -uses - Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc, - srvEmpresas_Impl, uROTypes, uROClasses; - -const - rptInforme = 'AlbaranProveedor.rdx'; - -constructor TRptWordAlbaranProveedor.Create(AOwner: TComponent); -begin - inherited; - ImprimirPrecio := False; - ImprimirRefProveedor := False; - FDocumento := NIL; -end; - -destructor TRptWordAlbaranProveedor.Destroy; -begin - if FDocumento <> NIL then - FDocumento.Free; - FDocumento := NIL; - inherited; -end; - -function TRptWordAlbaranProveedor.Exportar(Codigo, Fichero: String): Boolean; -begin - if EsCadenaVacia(Fichero) then - begin - Result := False; - raise Exception.Create('Falta indicar el fichero donde se exportará el listado.'); - end; - - FNombreFichero := Fichero; - FCodigoAlbaran := Codigo; - _GenerarAlbaran(Codigo); - Result := True; -end; - -procedure TRptWordAlbaranProveedor.DataModuleCreate(Sender: TObject); -begin - schReport.ConnectionManager := dmServer.ConnectionManager; - FConnection := dmServer.DarNuevaConexion; -end; - -function TRptWordAlbaranProveedor.Generar : Boolean; -begin - FWordApp := TWordApp.Create (False, False); - with FWordApp do - begin - Visible := False; - ScreenUpdating := False; - end; - - FDocumento := TWordDoc.CreateNewDoc(FWordApp, FPlantilla); - FWordApp.SaveActiveDocAs(FNombreFichero); - try - if not RellenarDatosAlbaran then - RaiseError('Se producido un error al generar la cabecera en MS Word.'); - - if not RellenarDatosDetalle then - RaiseError('Se producido un error al generar el informe en MS Word.'); - - FWordApp.CloseApp(wdSaveChanges); - Result := True; - finally - FDocumento := NIL; - FWordApp := NIL; - end; -end; - - -function TRptWordAlbaranProveedor.RellenarDatosDetalle : Boolean; -var - numRows, numCols, mergesplit : OleVariant; - MaxCols, iRowCount : Integer; - ACantidad: String; - AIndice: Integer; - AText : String; -begin - iRowCount := 2; - numrows := 2; - numcols := 1; - mergeSplit := False; - MaxCols := 12; - - with FDocumento.Document.Tables.Item(1), tbl_Detalles do - begin - tbl_Detalles.First; - while not tbl_Detalles.EOF do - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - - if ImprimirRefProveedor then - Cell(iRowCount, 1).Range.Text := FieldByName('REFERENCIA_PROVEEDOR').AsString; - - Cell(iRowCount, 2).Range.Text := FieldByName('REFERENCIA_FABRICANTE').AsString; - Cell(iRowCount, 3).Range.Text := FieldByName('CONCEPTO').AsString; - - ACantidad := FloatToStr(FieldByName('CANTIDAD').AsFloat); - AIndice := Pos(',', ACantidad); - if AIndice > 0 then - AText := FormatFloat('#,0.00', FieldByName('CANTIDAD').AsFloat) - else - AText := FormatFloat('#,0.##', FieldByName('CANTIDAD').AsFloat); - - Cell(iRowCount, 4).Range.Text := AText + ' ' + FieldByName('UNIDAD_MEDIDA').AsString; - - if ImprimirPrecio - and (FieldByName('IMPORTE_UNIDAD').AsFloat <> 0) then - Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat) - else - Cell(iRowCount, 5).Range.Text := ''; - - if ImprimirPrecio - and (FieldByName('IMPORTE_TOTAL').AsFloat <> 0) then - Cell(iRowCount, 6).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat) - else - Cell(iRowCount, 6).Range.Text := ''; - - Next; - Inc (iRowCount); - end; - - Rows.Item(iRowCount).Delete; - - {while iRowCount <= MaxCols do - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - inc (iRowCount); - end;} - end; - Result := True; -end; - -function TRptWordAlbaranProveedor.RellenarDatosAlbaran : Boolean; -var - DireccionEntrega : String; -// LinkToFile, SaveWithDocument, _Range : OleVariant; -// Imagen : InlineShape; - -begin - - //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA - {if (EmpresaActiva.Logotipo <> Nil) then - begin - //Activamos cabecera - FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; - LinkToFile := False; - SaveWithDocument := True; - _Range := EmptyParam; - FicheroTemporal := DarFicheroTemporal; - EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal); - Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(ficherotemporal, LinkToFile, SaveWithDocument, _Range); - - //Formateamos imagen - if ((Imagen.Get_Width > ANCHO_LOGO_INF)) then - begin - Imagen.Set_Height(((ANCHO_LOGO_INF * Imagen.Get_Height) /Imagen.Get_Width)); - Imagen.Set_Width(ANCHO_LOGO_INF); - end; - end;} - - with FDocumento, tbl_Cabecera do - begin - if FieldByName('TIPO').AsString = 'D' then - ReplaceBookmark('TituloDocumento', 'ORDEN DE DEVOLUCIÓN'); - - - ReplaceBookmark('CodigoAlbaran', FieldByName('REFERENCIA').AsString); - ReplaceBookmark('FechaAlbaran', FieldByName('FECHA_ALBARAN').AsString); - - // En la dirección mostrar aquellos campos que estén rellenos. - DireccionEntrega := ''; - if not EsCadenaVacia(FieldByName('CALLE').AsString) then - DireccionEntrega := DireccionEntrega + FieldByName('CALLE').AsString; - if not EsCadenaVacia(FieldByName('CODIGO_POSTAL').AsString) then - DireccionEntrega := DireccionEntrega + ', ' + FieldByName('CODIGO_POSTAL').AsString; - if not EsCadenaVacia(FieldByName('POBLACION').AsString) then - DireccionEntrega := DireccionEntrega + ', ' + FieldByName('POBLACION').AsString; - if not EsCadenaVacia(FieldByName('PROVINCIA').AsString) then - DireccionEntrega := DireccionEntrega + ', ' + FieldByName('PROVINCIA').AsString; - ReplaceBookmark('LugarEntrega', DireccionEntrega); - - { ReplaceBookmark('LugarEntrega', FieldByName('CALLEALMACEN').AsString + ' ' + - FieldByName('NUMEROALMACEN').AsString + ', ' + FieldByName('PISOALMACEN').AsString + ', ' + - FieldByName('CODIGOPOSTALALMACEN').AsString + ' ' + FieldByName('POBLACIONALMACEN').AsString + ', ' + FieldByName('PROVINCIAALMACEN').AsString);} - -// ReplaceBookmark('PersonaEntrega', FieldByName('ENTREGAR_A').AsString); - -{ if FieldByName('FECHA_ENTREGA').IsNull then - ReplaceBookmark('FechaEntrega', '') - else - ReplaceBookmark('FechaEntrega', 'FECHA DE ENTREGA PREVISTA: ' + FieldByName('FECHA_ENTREGA').AsString);} - - ReplaceBookmark('NombreProveedor', FieldByName('NOMBRE').AsString); - ReplaceBookmark('FaxProveedor', FieldByName('FAX').AsString); - ReplaceBookmark('PersonaContactoProveedor', FieldByName('PERSONA_CONTACTO').AsString); - ReplaceBookmark('CodigoClienteProveedor', FieldByName('CODIGO_CLIENTE').AsString); - - if ImprimirPrecio then - ReplaceBookmark('ImporteTotal', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat)) - else - ReplaceBookmark('ImporteTotal', ''); - - ReplaceBookmark('NotasAlbaran', FieldByName('OBSERVACIONES').AsString); - - ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('NombreEmpresa2', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString); - ReplaceBookmark('DireccionEmpresa', - Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString, - tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString])); - ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString); - ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString); - ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString); - end; - Result := True; -end; - -procedure TRptWordAlbaranProveedor._GenerarAlbaran(const AID: String); -var - ACopiaPlantilla : String; -begin - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - try - tbl_Cabecera.ParamByName('ID').AsString := AID; - tbl_Detalles.ParamByName('ID_ALBARAN').AsString := AID; - - tbl_Cabecera.Active := True; - tbl_Detalles.Active := True; - - FPlantilla := DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme; - FCodigoAlbaran := AID; - - 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); - end; - end; - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; -end; - - -end. diff --git a/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas b/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas index cc059ea..7261427 100644 --- a/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas +++ b/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas @@ -34,8 +34,6 @@ type protected function GenerarInforme(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; - const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; end; @@ -50,7 +48,7 @@ uses {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, schAlbaranesProveedorClient_Intf, uRestriccionesUsuarioUtils, uBizAlbaranProveedorServer, uRptAlbaranesProveedor_Server, - uRptWordAlbaranProveedor, uSistemaFunc; + uSistemaFunc; procedure Create_srvAlbaranesProveedor(out anInstance : IUnknown); begin @@ -112,29 +110,6 @@ begin end; end; -function TsrvAlbaranesProveedor.GenerarInformeEnWord(const ID: Integer; - const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; -var - AReportGenerator : TRptWordAlbaranProveedor; - AFicheroTMP : TFileName; -begin - Result := NIL; - AFicheroTMP := DarFicheroTemporal; - AReportGenerator := TRptWordAlbaranProveedor.Create(nil); - try - AReportGenerator.ImprimirPrecio := ImprimirPrecio; - AReportGenerator.ImprimirRefProveedor := ImprimirRefProveedor; - if AReportGenerator.Exportar(IntToStr(ID), AFicheroTMP) then - begin - Result := Binary.Create; - Result.LoadFromFile(AFicheroTMP); - SysUtils.DeleteFile(AFicheroTMP) - end; - finally - FreeAndNIL(AReportGenerator); - end; -end; - initialization TROClassFactory.Create('srvAlbaranesProveedor', Create_srvAlbaranesProveedor, TsrvAlbaranesProveedor_Invoker); diff --git a/Source/Modulos/Contactos/Views/Contactos_view.res b/Source/Modulos/Contactos/Views/Contactos_view.res index 1641339fcc482e7e3492d1b45813a86619622c33..8b251f312bcccec5485024f6fe8d80e1cdf25746 100644 GIT binary patch delta 11 ScmeBCZD5|Duvteife`=|>;pCc literal 4748 zcmbW5&ub)A5XUPdpe&2#;C*uNAUVhgd+&(4um@dnom`vXF9g}ZuHJ;se=<3UNdFJg zbCw+UD9j$byGIXV`~6hC>h4S?F|k9X-j90q{Z_qtZ<;nUJCO8!h?p${kR>3GhM`oH*q zk=UsjOCIgA_4!`B+Gb&`I84R)bT4dy-BQV<-SyFz?R8ILEQ(+JB$u{sEXE@j@B*7W zT;iZH#|OJ<&DO$RCkM6VbK3(B(k{nbdv1lpc;E$xz9as|v3uE1V{hw2w~g3eD0an7 z{BT%G%irdMe*|oDJmgvJaA2`9B<6Xi*?M~Q;)@Sbfwf3uf zVaWkbUjU=;sL{BlYemIZXv%qZ{SZw{-TCU+;!nH6KDDIJumU+9{E0zXW4>7T)y|>$DQlv zRJe?TjSp{c!DqeayAnSMTtZZT;>LN7J0Rls+5m@q)MbyB*eL%Eu@(+$Cw}Pd@q7N| z%Q0*AHpCP^b9v`@jx-l_FD>khpW2W8(OU2&V5TrnoAY-m_hlcV?zq3;7{2gF{J#Hc z6R+o~mVenX?>@W0@_DVzyOFs(5464CY{!q9ChoF#_*eXi@4gFuV8?vhl=_w5$iKL0 zEV0nMBcN08xtRmsgJrqjh@s#|{?*ssnsG)mH*wa6{efF0JFWHok@kA5%b661{B38= zCcgJ|*ZFTpV$8<-&+AWpa)Q8*`wL&hMeNQ^v6I7$HSdLZhZ^&+6<@Uw_Zsml9^v3W zVvPDBKHh;i=RU4J_ta3E;)Mn>Y+L zKLZ0UQ+*km9FO-b?U4gmn-62iwzH6&*duKGo~aUV)bYDla8wWZ9+^7p-F<8lP@i!m z@vhbD_${F}h>^T;C(?(b*OJDk?{dEXB?nuehoON3HAb!7Mr7-ls!84-5V-jJugbu<_$}mU=Yd9!?TOX;|B-#B)+0x#9q*yqJiqS!`49d=7ztk$O+9=1i;?K_|J<8T z?0b7=-`Z3A#vV$4XJ5(lQ~TOZHUFdA%oWvK5zg&_IKXIbughQBA8XAsd#=@|TFLXC zy(^m((;DnQmDQKatmw!@c`| G?EMQ&4NnpP diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm deleted file mode 100644 index 1a6065c..0000000 --- a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.dfm +++ /dev/null @@ -1,781 +0,0 @@ -object RptWordFacturaCliente: TRptWordFacturaCliente - OldCreateOrder = False - OnCreate = DataModuleCreate - Height = 366 - Width = 514 - object schReport: TDASchema - ConnectionManager = dmServer.ConnectionManager - DataDictionary = DataDictionary - Datasets = < - item - Params = < - item - Name = 'ID' - Value = '2' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'select'#10' v_facturas_cliente.id, v_facturas_cliente.id_empresa,'#10 + - ' v_facturas_cliente.referencia, v_facturas_cliente.tipo,'#10' v_' + - 'facturas_cliente.fecha_factura, v_facturas_cliente.base_imponibl' + - 'e,'#10' v_facturas_cliente.situacion, v_facturas_cliente.descuento' + - ','#10' v_facturas_cliente.importe_descuento, v_facturas_cliente.iv' + - 'a,'#10' v_facturas_cliente.importe_iva, v_facturas_cliente.re,'#10' ' + - 'v_facturas_cliente.importe_re, v_facturas_cliente.importe_total,' + - #10' v_facturas_cliente.observaciones, v_facturas_cliente.nif_cif' + - ','#10' v_facturas_cliente.id_cliente, v_facturas_cliente.nombre,'#10' ' + - ' v_facturas_cliente.calle, v_facturas_cliente.provincia,'#10' v_f' + - 'acturas_cliente.poblacion, v_facturas_cliente.codigo_postal,'#10' ' + - 'v_facturas_cliente.recargo_equivalencia, v_facturas_cliente.impo' + - 'rte_neto,'#10' v_facturas_cliente.importe_porte, formas_pago.descr' + - 'ipcion as FORMA_PAGO,'#10' v_facturas_cliente.datos_bancarios, v_f' + - 'acturas_cliente.fecha_vencimiento,'#10' v_facturas_cliente.retenci' + - 'on, v_facturas_cliente.importe_retencion'#10'from v_facturas_cliente' + - #10' left outer join formas_pago on (formas_pago.id = v_facturas_' + - 'cliente.id_forma_pago)'#10'WHERE V_FACTURAS_CLIENTE.ID = :ID'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_EMPRESA' - TableField = 'ID_EMPRESA' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'OBSERVACIONES' - TableField = 'OBSERVACIONES' - end - item - DatasetField = 'ID_CLIENTE' - TableField = 'ID_CLIENTE' - end - item - DatasetField = 'NIF_CIF' - TableField = 'NIF_CIF' - end - item - DatasetField = 'NOMBRE' - TableField = 'NOMBRE' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'CALLE' - TableField = 'CALLE' - end - item - DatasetField = 'POBLACION' - TableField = 'POBLACION' - end - item - DatasetField = 'PROVINCIA' - TableField = 'PROVINCIA' - end - item - DatasetField = 'CODIGO_POSTAL' - TableField = 'CODIGO_POSTAL' - end - item - DatasetField = 'TIPO' - TableField = 'TIPO' - end - item - DatasetField = 'FECHA_FACTURA' - TableField = 'FECHA_FACTURA' - end - item - DatasetField = 'BASE_IMPONIBLE' - TableField = 'BASE_IMPONIBLE' - end - item - DatasetField = 'SITUACION' - TableField = 'SITUACION' - end - item - DatasetField = 'DESCUENTO' - TableField = 'DESCUENTO' - end - item - DatasetField = 'IMPORTE_DESCUENTO' - TableField = 'IMPORTE_DESCUENTO' - end - item - DatasetField = 'IVA' - TableField = 'IVA' - end - item - DatasetField = 'IMPORTE_IVA' - TableField = 'IMPORTE_IVA' - end - item - DatasetField = 'RE' - TableField = 'RE' - end - item - DatasetField = 'IMPORTE_RE' - TableField = 'IMPORTE_RE' - end - item - DatasetField = 'RECARGO_EQUIVALENCIA' - TableField = 'RECARGO_EQUIVALENCIA' - end - item - DatasetField = 'IMPORTE_NETO' - TableField = 'IMPORTE_NETO' - end - item - DatasetField = 'IMPORTE_PORTE' - TableField = 'IMPORTE_PORTE' - end - item - DatasetField = 'FORMA_PAGO' - TableField = 'FORMA_PAGO' - end - item - DatasetField = 'DATOS_BANCARIOS' - TableField = 'DATOS_BANCARIOS' - end - item - DatasetField = 'FECHA_VENCIMIENTO' - TableField = 'FECHA_VENCIMIENTO' - end - item - DatasetField = 'RETENCION' - TableField = 'RETENCION' - end - item - DatasetField = 'IMPORTE_RETENCION' - TableField = 'IMPORTE_RETENCION' - end> - end> - Name = 'Informe_Cabecera' - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'TIPO' - DataType = datString - Size = 1 - end - item - Name = 'FECHA_FACTURA' - DataType = datDateTime - end - item - Name = 'BASE_IMPONIBLE' - DataType = datCurrency - end - item - Name = 'SITUACION' - DataType = datString - Size = 19 - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_DESCUENTO' - DataType = datCurrency - end - item - Name = 'IVA' - DataType = datFloat - end - item - Name = 'IMPORTE_IVA' - DataType = datCurrency - end - item - Name = 'RE' - DataType = datFloat - end - item - Name = 'IMPORTE_RE' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'RECARGO_EQUIVALENCIA' - DataType = datSmallInt - end - item - Name = 'IMPORTE_NETO' - DataType = datCurrency - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'FORMA_PAGO' - DataType = datString - Size = 255 - end - item - Name = 'DATOS_BANCARIOS' - DataType = datString - Size = 255 - end - item - Name = 'FECHA_VENCIMIENTO' - DataType = datDateTime - end - item - Name = 'RETENCION' - DataType = datFloat - end - item - Name = 'IMPORTE_RETENCION' - DataType = datCurrency - end> - ReadOnly = True - end - item - Params = < - item - Name = 'ID_FACTURA' - Value = '2' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - SQL = - '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.UNIDAD_MEDIDA,'#10' D' + - 'ET.IMPORTE_UNIDAD, DET.DESCUENTO,'#10' DET.IMPORTE_TOTAL, DET.VIS' + - 'IBLE'#10'FROM FACTURAS_CLIENTE_DETALLES AS DET'#10'LEFT OUTER JOIN ARTIC' + - 'ULOS ON (ARTICULOS.ID = DET.ID_ARTICULO)'#10'WHERE DET.ID_FACTURA = ' + - ':ID_FACTURA AND DET.VISIBLE = 1 AND {Where}'#10'ORDER BY DET.ID_FACT' + - 'URA, DET.POSICION;'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'POSICION' - TableField = 'POSICION' - end - item - DatasetField = 'TIPO_DETALLE' - TableField = 'TIPO_DETALLE' - end - item - DatasetField = 'CONCEPTO' - TableField = 'CONCEPTO' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'CANTIDAD' - TableField = 'CANTIDAD' - end - item - DatasetField = 'IMPORTE_UNIDAD' - TableField = 'IMPORTE_UNIDAD' - end - item - DatasetField = 'ID_FACTURA' - TableField = 'ID_FACTURA' - end - item - DatasetField = 'DESCUENTO' - TableField = 'DESCUENTO' - end - item - DatasetField = 'VISIBLE' - TableField = 'VISIBLE' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'CONCEPTO_RTF' - TableField = 'CONCEPTO_RTF' - end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end> - end> - Name = 'Informe_Detalles' - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_FACTURA' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - 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 - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'VISIBLE' - DataType = datSmallInt - end> - ReadOnly = True - end - item - Params = < - item - Name = 'ID_FACTURA' - Value = '2' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'SELECT'#10' V_RECIBOS_CLIENTE.ID_FACTURA, V_RECIBOS_CLIENTE.FECHA' + - '_VENCIMIENTO, V_RECIBOS_CLIENTE.IMPORTE_TOTAL'#10'FROM V_RECIBOS_CLI' + - 'ENTE'#10'WHERE V_RECIBOS_CLIENTE.ID_FACTURA = :ID_FACTURA'#10'ORDER BY V' + - '_RECIBOS_CLIENTE.FECHA_VENCIMIENTO'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID_FACTURA' - TableField = 'ID_FACTURA' - end - item - DatasetField = 'FECHA_VENCIMIENTO' - TableField = 'FECHA_VENCIMIENTO' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end> - end> - Name = 'Informe_Vencimientos' - Fields = < - item - Name = 'ID_FACTURA' - DataType = datInteger - end - item - Name = 'FECHA_VENCIMIENTO' - DataType = datDateTime - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end> - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 48 - Top = 16 - end - object DataDictionary: TDADataDictionary - Fields = <> - Left = 46 - Top = 142 - end - object DABin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 80 - end - object tbl_Cabecera: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'TIPO' - DataType = datString - Size = 1 - end - item - Name = 'FECHA_FACTURA' - DataType = datDateTime - end - item - Name = 'BASE_IMPONIBLE' - DataType = datCurrency - end - item - Name = 'SITUACION' - DataType = datString - Size = 19 - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_DESCUENTO' - DataType = datCurrency - end - item - Name = 'IVA' - DataType = datFloat - end - item - Name = 'IMPORTE_IVA' - DataType = datCurrency - end - item - Name = 'RE' - DataType = datFloat - end - item - Name = 'IMPORTE_RE' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'RECARGO_EQUIVALENCIA' - DataType = datSmallInt - end - item - Name = 'IMPORTE_NETO' - DataType = datCurrency - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'FORMA_PAGO' - DataType = datString - Size = 255 - end - item - Name = 'DATOS_BANCARIOS' - DataType = datString - Size = 255 - end - item - Name = 'FECHA_VENCIMIENTO' - DataType = datDateTime - end - item - Name = 'RETENCION' - DataType = datFloat - end - item - Name = 'IMPORTE_RETENCION' - DataType = datCurrency - end> - Params = < - item - Name = 'ID' - Value = '2' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Cabecera' - IndexDefs = <> - Left = 168 - Top = 16 - end - object tbl_Detalles: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_FACTURA' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - 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 - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'VISIBLE' - DataType = datSmallInt - end> - Params = < - item - Name = 'ID_FACTURA' - Value = '2' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Detalles' - IndexDefs = <> - Left = 264 - Top = 16 - end - object tbl_Empresa: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = <> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LogicalName = 'Empresa' - IndexDefs = <> - Left = 168 - Top = 80 - end - object tbl_Vencimientos: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID_FACTURA' - DataType = datInteger - end - item - Name = 'FECHA_VENCIMIENTO' - DataType = datDateTime - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end> - Params = < - item - Name = 'ID_FACTURA' - Value = '2' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Vencimientos' - IndexDefs = <> - Left = 352 - Top = 16 - end -end diff --git a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas deleted file mode 100644 index 13abae7..0000000 --- a/Source/Modulos/Facturas de cliente/Reports/uRptWordFacturaCliente.pas +++ /dev/null @@ -1,445 +0,0 @@ -unit uRptWordFacturaCliente; - -interface - -uses - SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase, - Word2000, - uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses, - uDAScriptingProvider, uDADataTable, uDAMemDataTable; - -type - TRptWordFacturaCliente = class(TDataModule) - DABin2DataStreamer: TDABin2DataStreamer; - tbl_Cabecera: TDAMemDataTable; - tbl_Detalles: TDAMemDataTable; - tbl_Empresa: TDAMemDataTable; - tbl_Vencimientos: TDAMemDataTable; - schReport: TDASchema; - DataDictionary: TDADataDictionary; - procedure DataModuleCreate(Sender: TObject); - private - FConnection: IDAConnection; - FPlantilla : string; - FWordApp : TWordApp; - FDocumento : TWordDoc; -// FNumCapitulos : Integer; - FCodigoFactura : string; - FNombreFichero : String; - FVerSello : Boolean; -// function DarNumCapitulos : Integer; -// procedure InsertarConceptos(Tabla : Table); - function Generar : Boolean; - function RellenarCabecera : boolean; virtual; - function RellenarInforme : boolean; virtual; - procedure _GenerarFactura(const AID: String); - public - function Exportar(Codigo, Fichero : String; const VerSello: Boolean = True): Boolean; - constructor Create (AOwner : TComponent); override; - destructor Destroy; override; - end; - -implementation - -{ TRptWordFacturaCliente } - -{$R *.dfm} - -uses - Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc, - srvEmpresas_Impl, uROTypes, uROClasses; - -const - rptInforme = 'FacturaCliente.rdx'; - -constructor TRptWordFacturaCliente.Create(AOwner: TComponent); -begin - inherited; - FDocumento := NIL; -end; - -{function TRptWordFacturaCliente.DarNumCapitulos: Integer; -var - AuxNumCapitulos : integer; -begin - AuxNumCapitulos := 0; - tbl_Cabecera.First; - while not tbl_Cabecera.Eof do - begin - if tbl_Cabecera.FieldByName('TIPO_DETALLE').AsString = 'Titulo' then - AuxNumCapitulos := AuxNumCapitulos + 1; - tbl_Cabecera.Next; - end; - tbl_Cabecera.First; - Result := AuxNumCapitulos; -end;} - -destructor TRptWordFacturaCliente.Destroy; -begin - if FDocumento <> NIL then - FDocumento.Free; - FDocumento := NIL; - inherited; -end; - -function TRptWordFacturaCliente.Exportar(Codigo, Fichero: String; const VerSello: Boolean = True): Boolean; -begin - if EsCadenaVacia(Fichero) then - begin - Result := False; - raise Exception.Create('Falta indicar el fichero donde se exportará el listado.'); - end; - - FNombreFichero := Fichero; - FCodigoFactura := Codigo; - FVerSello := VerSello; - _GenerarFactura(Codigo); - Result := True; -end; - -procedure TRptWordFacturaCliente.DataModuleCreate(Sender: TObject); -begin - schReport.ConnectionManager := dmServer.ConnectionManager; - FConnection := dmServer.DarNuevaConexion; -end; - -function TRptWordFacturaCliente.Generar : Boolean; -begin - FWordApp := TWordApp.Create (False, False); - with FWordApp do - begin - Visible := False; - ScreenUpdating := False; - end; - - FDocumento := TWordDoc.CreateNewDoc(FWordApp, FPlantilla); - FWordApp.SaveActiveDocAs(FNombreFichero); - try - if not RellenarCabecera then - RaiseError('Se producido un error al generar la cabecera en MS Word.'); - - if not RellenarInforme then - RaiseError('Se producido un error al generar el informe en MS Word.'); - - FWordApp.CloseApp(wdSaveChanges); - Result := True; - finally - FDocumento := NIL; - FWordApp := NIL; - end; -end; - -{procedure TRptWordFacturaCliente.InsertarConceptos(Tabla : Table); -var - numRows, numCols, mergeSplit, shiftCells : OleVariant; - iContador : Integer; - TotalConceptos : Double; - ACantidad: String; - AIndice: Integer; - AText : String; -begin - TotalConceptos := 0; - numRows := 2; - numCols := 1; - mergeSplit := False; - shiftCells := False; - iContador := 2; // Empezar en la 2ª fila de celdas. La primera es la - // cabecera de la tabla. - - with Tabla, tbl_Detalles do - begin - while not EOF do - begin - if FieldByName('TIPO_DETALLE').AsString <> 'Concepto' then - Break; - // Partir la celda actual en 2 filas de 1 columna. - Rows.Item(iContador).Cells.Split (numRows, numCols, mergesplit); - Cell(iContador, 1).Range.Text := FieldByName('CONCEPTO').AsString; - - ACantidad := FloatToStr(FieldByName('CANTIDAD').AsFloat); - AIndice := Pos(',', ACantidad); - if AIndice > 0 then - AText := FormatFloat('#,0.00', FieldByName('CANTIDAD').AsFloat) - else - AText := FormatFloat('#,0.##', FieldByName('CANTIDAD').AsFloat); - - Cell(iContador, 2).Range.Text := AText; - - - if (FieldByName('IMPORTE_UNIDAD').AsFloat = 0) then - Cell(iContador, 3).Range.Text := '' - else - Cell(iContador, 3).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat); - - if (FieldByName('IMPORTE_TOTAL').AsFloat = 0) then - Cell(iContador, 4).Range.Text := '' - else - Cell(iContador, 4).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat); - - TotalConceptos := TotalConceptos + FieldByName('IMPORTE_TOTAL').AsFloat; - Next; - Inc (iContador); - end; - // Borrar la fila vacía que sobra - Rows.Item(iContador).Cells.Delete(shiftCells); - Cell(iContador, 1).Range.Text := 'Total: ' + FormatFloat(DISPLAY_EUROS2, TotalConceptos); - AutoFitBehavior(wdAutoFitWindow); - end; -end;} - -function TRptWordFacturaCliente.RellenarCabecera: boolean; -var - NombreFichero, - Texto, -// FicheroTemporal : String; -// LinkToFile, SaveWithDocument, _Range : OleVariant; -// Imagen : InlineShape; - _ShiftCells : OleVariant; - ImporteAux : Double; - Cadena : String; -begin - - //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA - {--------------------------- PENDIENTE - if (EmpresaActiva.Logotipo <> Nil) then - begin - //Activamos cabecera - FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; - LinkToFile := False; - SaveWithDocument := True; - _Range := EmptyParam; - FicheroTemporal := DarFicheroTemporal; - EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal); - Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(ficherotemporal, LinkToFile, SaveWithDocument, _Range); - - //Formateamos imagen - if ((Imagen.Get_Width > ANCHO_LOGO_INF)) then - begin - Imagen.Set_Height(((ANCHO_LOGO_INF * Imagen.Get_Height) /Imagen.Get_Width)); - Imagen.Set_Width(ANCHO_LOGO_INF); - end; - end; - ---------------------------- } - - with FDocumento, tbl_Cabecera do - begin - //Activamos cabecera - FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; - - if (FieldByName('TIPO').AsString = 'F') then - ReplaceBookmark('CodigoFacturaCab', FieldByName('REFERENCIA').AsString) - else - ReplaceBookmark('CodigoFacturaCab', FieldByName('REFERENCIA').AsString); - ReplaceBookmark('FechaFacturaCab', FieldByName('FECHA_FACTURA').AsString); - - //Se cambia se omiten los vencimientos de los recibos solo tendremos en cuenta el de la factura - Cadena := FieldByName('FECHA_VENCIMIENTO').AsString; -{ tbl_Vencimientos.First; - Cadena := ''; - while not tbl_Vencimientos.eof do - begin - Cadena := Cadena + tbl_Vencimientos.FieldByName('FECHA_VENCIMIENTO').AsString + ' '; - tbl_Vencimientos.Next; - end; -} - - ReplaceBookmark('VencimientoCab', Cadena); - ReplaceBookmark('FormaPagoCab', FieldByName('FORMA_PAGO').AsString); - ReplaceBookmark('BancoCab', FieldByName('DATOS_BANCARIOS').AsString); - - ReplaceBookmark('NombreClienteCab', FieldByName('NOMBRE').AsString); - ReplaceBookmark('CIFClienteCab', FieldByName('NIF_CIF').AsString); - - ReplaceBookmark('DireccionClienteCab', FieldByName('CALLE').AsString); - ReplaceBookmark('PoblacionClienteCab', - FieldByName('CODIGO_POSTAL').AsString + ' ' + - FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString); - - ReplaceBookmark('BaseImponible', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_NETO').AsFloat)); - ImporteAux := FieldByName('BASE_IMPONIBLE').AsFloat; // - FieldByName('IMPORTE_DESCUENTO').AsFloat; - ReplaceBookmark('BaseImponible2', FormatFloat(DISPLAY_EUROS2, ImporteAux)); - - if (FieldByName('DESCUENTO').AsInteger = 0) then - begin - ReplaceBookmark('BaseImponibleTexto', 'Base imponible'); - FWordApp.GotoBookmark('CeldasDescuento'); - _ShiftCells := wdDeleteCellsShiftLeft; - FWordApp.Application.Selection.Cells.Delete(_ShiftCells); - end - else begin - ReplaceBookmark('Descuento', FieldByName('DESCUENTO').AsString); - ReplaceBookmark('ImporteDto', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_DESCUENTO').AsFloat)); - end; - if EsCadenaVacia(FieldByName('IVA').AsString) then - ReplaceBookmark('IVA', '0') - else - ReplaceBookmark('IVA', FieldByName('IVA').AsString); - ReplaceBookmark('ImporteIVA', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_IVA').AsFloat)); - ReplaceBookmark('ImporteTotal', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat)); - - if (FieldByName('RETENCION').AsInteger = 0) then - begin - FWordApp.GotoBookmark('CeldasRetencion'); - _ShiftCells := wdDeleteCellsShiftLeft; - FWordApp.Application.Selection.Cells.Delete(_ShiftCells); - end - else begin - ReplaceBookmark('TituloImporteTotal', 'Total certificacion'); - ReplaceBookmark('Retencion', FieldByName('RETENCION').AsString); - ReplaceBookmark('ImporteRetencion', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_RETENCION').AsFloat)); - ReplaceBookmark('ImporteTotalRet', FormatFloat(DISPLAY_EUROS2, (FieldByName('IMPORTE_TOTAL').AsFloat - FieldByName('IMPORTE_RETENCION').AsFloat))); - end; - - Texto := FieldByName('OBSERVACIONES').AsString; - if not EsCadenaVacia(Texto) then - begin - NombreFichero := DarFicheroTemporal; - EscribirEnFichero(NombreFichero, Texto); - FWordApp.InsertFile(NombreFichero, 'Descripcion'); - SysUtils.DeleteFile(NombreFichero); - end; - - ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString); - ReplaceBookmark('DireccionEmpresa', - Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString, - tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString])); - ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString); - ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString); - ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString); - - ReplaceBookmark('DatosRegistroMercantil', tbl_Empresa.FieldByName('REGISTRO_MERCANTIL').AsString); - - if not FVerSello then - ReplaceBookmark('Sello', ''); - - Close; - end; - Result := True; -end; - -function TRptWordFacturaCliente.RellenarInforme : boolean; -var - numRows, numCols, mergesplit : OleVariant; - iRowCount : Integer; - TipoConAnterior : String; - Seleccion : TWordRange; - TotalCapitulo : Double; - EsCapitulo : Boolean; - ACantidad: String; - AIndice: Integer; - AText : String; -begin - Result := False; - iRowCount := 2; - numrows := 2; - numcols := 1; - mergeSplit := False; - TipoConAnterior := ''; - TotalCapitulo := 0; - EsCapitulo := False; - - with FDocumento.Document.Tables.Item(1), tbl_detalles do - begin - First; - while not tbl_detalles.EOF do - begin - if (TipoConAnterior = 'Concepto') and (FieldByName('TIPO_DETALLE').AsString = 'Titulo') then - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - if EsCapitulo then - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - Cell(iRowCount, 2).Range.Text := 'TOTAL DEL CAPÍTULO'; - Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, TotalCapitulo); - TotalCapitulo := 0; - Inc (iRowCount); - end; - Inc (iRowCount); - end; - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - if FieldByName('TIPO_DETALLE').AsString = 'Titulo' then - begin - Cell(iRowCount, 2).Range.Text := FieldByName('CONCEPTO').AsString; - Rows.Item(iRowCount).Select; - Seleccion := FDocumento.AddRangeFromSelection; - Seleccion.Bold := True; - TotalCapitulo := 0; - EsCapitulo := True; - end - else begin - Cell(iRowCount, 1).Range.Text := FieldByName('REFERENCIA').AsString; - Cell(iRowCount, 2).Range.Text := FieldByName('CONCEPTO').AsString; - - ACantidad := FloatToStr(FieldByName('CANTIDAD').AsFloat); - if ACantidad = '0' then - AText := '' - else begin - AIndice := Pos(',', ACantidad); - if AIndice > 0 then - AText := FormatFloat('#,0.00', FieldByName('CANTIDAD').AsFloat) - else - AText := FormatFloat('#,0.##', FieldByName('CANTIDAD').AsFloat); - end; - - Cell(iRowCount, 3).Range.Text := AText + ' ' + FieldByName('UNIDAD_MEDIDA').AsString; - if FieldByName('IMPORTE_UNIDAD').AsFloat <> 0 then - Cell(iRowCount, 4).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat); - - if FieldByName('IMPORTE_TOTAL').AsFloat <> 0 then - Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat); - - TotalCapitulo := TotalCapitulo + FieldByName('IMPORTE_TOTAL').AsFloat; - end; - TipoConAnterior := FieldByName('TIPO_DETALLE').AsString; - Next; - Inc (iRowCount); - end; - if EsCapitulo then - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - Cell(iRowCount, 2).Range.Text := 'TOTAL DEL CAPÍTULO'; - Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, TotalCapitulo); - TotalCapitulo := 0; - end; - Close; - end; - Result := True; -end; - -procedure TRptWordFacturaCliente._GenerarFactura(const AID: String); -var - ACopiaPlantilla : String; -begin - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - try - tbl_Cabecera.ParamByName('ID').AsString := AID; - tbl_Detalles.ParamByName('ID_FACTURA').AsString := AID; - tbl_Vencimientos.ParamByName('ID_FACTURA').AsString := AID; - - tbl_Cabecera.Active := True; - tbl_Detalles.Active := True; - tbl_Vencimientos.Active := True; - - FPlantilla := DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme; - - FCodigoFactura := AID; - - 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); - end; - end; - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; -end; - - -end. diff --git a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas index c2e164f..37152ae 100644 --- a/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas +++ b/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.pas @@ -35,7 +35,6 @@ type protected { IsrvFacturasCliente methods } 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; public @@ -51,7 +50,7 @@ uses uDataModuleServer, uDatabaseUtils, uUsersManager, schFacturasClienteClient_Intf, uRestriccionesUsuarioUtils, // uRptFacturasCliente_Server, - uBizFacturasClienteServer, uRptWordFacturaCliente, uRptFacturasCliente_Server; + uBizFacturasClienteServer, uRptFacturasCliente_Server; procedure Create_srvFacturasCliente(out anInstance : IUnknown); begin @@ -129,26 +128,6 @@ begin end; end; -function TsrvFacturasCliente.GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean = True): Binary; -var - AReportGenerator : TRptWordFacturaCliente; - AFicheroTMP : TFileName; -begin - Result := NIL; - AFicheroTMP := DarFicheroTemporal; - AReportGenerator := TRptWordFacturaCliente.Create(nil); - try - if AReportGenerator.Exportar(IntToStr(ID), AFicheroTMP, VerSello) then - begin - Result := Binary.Create; - Result.LoadFromFile(AFicheroTMP); - SysUtils.DeleteFile(AFicheroTMP) - end; - finally - FreeAndNIL(AReportGenerator); - end; -end; - initialization TROClassFactory.Create('srvFacturasCliente', Create_srvFacturasCliente, TsrvFacturasCliente_Invoker); diff --git a/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc b/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc index d3be177..d4884fc 100644 --- a/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc +++ b/Source/Modulos/Informe margen por articulo/Data/InfMargenArticulo_data.drc @@ -14,4 +14,4 @@ END /* C:\Codigo\Source\Modulos\Informe margen por articulo\Data\uDataModuleInfMargenArticulo.dfm */ /* C:\Codigo\Source\Modulos\Informe margen por articulo\Data\InfMargenArticulo_data.res */ -/* c:\temp\dtf31B.tmp */ +/* c:\temp\dtf98.tmp */ diff --git a/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc b/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc index b56710c..7cd8140 100644 --- a/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc +++ b/Source/Modulos/Informe margen por articulo/Model/InfMargenArticulo_model.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo\Source\Modulos\Informe margen por articulo\Model\InfMargenArticulo_model.res */ -/* c:\temp\dtf319.tmp */ +/* c:\temp\dtf96.tmp */ diff --git a/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc b/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc index 8379a2c..2a1fd0e 100644 --- a/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc +++ b/Source/Modulos/Informe margen por articulo/Views/InfMargenArticulo_view.drc @@ -16,4 +16,4 @@ END /* C:\Codigo\Source\Modulos\Informe margen por articulo\Views\uViewInfMargenArticulo.dfm */ /* C:\Codigo\Source\Modulos\Informe margen por articulo\Views\uEditorInfMargenArticulo.dfm */ /* C:\Codigo\Source\Modulos\Informe margen por articulo\Views\InfMargenArticulo_view.res */ -/* c:\temp\dtf31F.tmp */ +/* c:\temp\dtf9C.tmp */ diff --git a/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc b/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc index 0c6ff9b..5611266 100644 --- a/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc +++ b/Source/Modulos/Informe ventas por articulo/Data/InfVentasArticulo_data.drc @@ -14,4 +14,4 @@ END /* C:\Codigo\Source\Modulos\Informe ventas por articulo\Data\uDataModuleInfVentasArticulo.dfm */ /* C:\Codigo\Source\Modulos\Informe ventas por articulo\Data\InfVentasArticulo_data.res */ -/* c:\temp\dtf311.tmp */ +/* c:\temp\dtf8E.tmp */ diff --git a/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc b/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc index 16b693c..b01c9d4 100644 --- a/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc +++ b/Source/Modulos/Informe ventas por articulo/Model/InfVentasArticulo_model.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo\Source\Modulos\Informe ventas por articulo\Model\InfVentasArticulo_model.res */ -/* c:\temp\dtf30F.tmp */ +/* c:\temp\dtf8C.tmp */ diff --git a/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc b/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc index e2611a3..72e432b 100644 --- a/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc +++ b/Source/Modulos/Informe ventas por articulo/Views/InfVentasArticulo_view.drc @@ -19,4 +19,4 @@ END /* C:\Codigo\Source\Modulos\Informe ventas por articulo\Views\uViewInfVentasAlbArticulo.dfm */ /* C:\Codigo\Source\Modulos\Informe ventas por articulo\Views\uEditorInfVentasAlbArticulo.dfm */ /* C:\Codigo\Source\Modulos\Informe ventas por articulo\Views\InfVentasArticulo_view.res */ -/* c:\temp\dtf315.tmp */ +/* c:\temp\dtf92.tmp */ diff --git a/Source/Modulos/Informes base/Controller/InformesBase_controller.drc b/Source/Modulos/Informes base/Controller/InformesBase_controller.drc index af8ffd8..b413b3c 100644 --- a/Source/Modulos/Informes base/Controller/InformesBase_controller.drc +++ b/Source/Modulos/Informes base/Controller/InformesBase_controller.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo\Source\Modulos\Informes base\Controller\InformesBase_controller.res */ -/* c:\temp\dtf305.tmp */ +/* c:\temp\dtf82.tmp */ diff --git a/Source/Modulos/Informes base/Data/Informes_data.drc b/Source/Modulos/Informes base/Data/Informes_data.drc index 24e211d..8c710d5 100644 --- a/Source/Modulos/Informes base/Data/Informes_data.drc +++ b/Source/Modulos/Informes base/Data/Informes_data.drc @@ -14,4 +14,4 @@ END /* C:\Codigo\Source\Modulos\Informes base\Data\uDataModuleInformes.dfm */ /* C:\Codigo\Source\Modulos\Informes base\Data\Informes_data.res */ -/* c:\temp\dtf301.tmp */ +/* c:\temp\dtf7E.tmp */ diff --git a/Source/Modulos/Informes base/Model/Informes_model.drc b/Source/Modulos/Informes base/Model/Informes_model.drc index abb4a6b..221c9b2 100644 --- a/Source/Modulos/Informes base/Model/Informes_model.drc +++ b/Source/Modulos/Informes base/Model/Informes_model.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo\Source\Modulos\Informes base\Model\Informes_model.res */ -/* c:\temp\dtf2FF.tmp */ +/* c:\temp\dtf7C.tmp */ diff --git a/Source/Modulos/Informes base/Views/Informes_view.drc b/Source/Modulos/Informes base/Views/Informes_view.drc index 3e63543..d8fa450 100644 --- a/Source/Modulos/Informes base/Views/Informes_view.drc +++ b/Source/Modulos/Informes base/Views/Informes_view.drc @@ -15,4 +15,4 @@ END /* C:\Codigo\Source\Modulos\Informes base\Views\uViewInformes.dfm */ /* C:\Codigo\Source\Modulos\Informes base\Views\uEditorInformes.dfm */ /* C:\Codigo\Source\Modulos\Informes base\Views\Informes_view.res */ -/* c:\temp\dtf309.tmp */ +/* c:\temp\dtf86.tmp */ diff --git a/Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.dfm b/Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.dfm deleted file mode 100644 index 9df9787..0000000 --- a/Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.dfm +++ /dev/null @@ -1,550 +0,0 @@ -object RptWordPedidoProveedor: TRptWordPedidoProveedor - OldCreateOrder = False - OnCreate = DataModuleCreate - Height = 223 - Width = 337 - object schReport: TDASchema - ConnectionManager = dmServer.ConnectionManager - DataDictionary = DataDictionary - Datasets = < - item - IsPublic = False - Params = < - item - Name = 'ID' - Value = '3' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'SELECT'#10' PEDIDOS_PROVEEDOR.ID,'#10' PEDIDOS_PROVEEDOR.ID_EMPRESA,'#10' ' + - ' PEDIDOS_PROVEEDOR.REFERENCIA,'#10' PEDIDOS_PROVEEDOR.FECHA_PEDIDO,' + - #10' PEDIDOS_PROVEEDOR.FECHA_ENTREGA,'#10' PEDIDOS_PROVEEDOR.OBSERVAC' + - 'IONES,'#10' CONTACTOS.NOMBRE,'#10' COALESCE(CONTACTOS_DIRECCIONES.FAX,' + - ' CONTACTOS.FAX) AS FAX,'#10' PEDIDOS_PROVEEDOR.PERSONA_CONTACTO_PRO' + - 'V AS PERSONA_CONTACTO,'#10' PROVEEDORES_DATOS.CODIGO_ASIGNADO AS CO' + - 'DIGO_CLIENTE,'#10' PEDIDOS_PROVEEDOR.ID_ALMACEN,'#10' COALESCE(ALMACEN' + - 'ES.CALLE, PEDIDOS_PROVEEDOR.CALLE) AS CALLE_ALMACEN,'#10' COALESCE(' + - 'ALMACENES.POBLACION, PEDIDOS_PROVEEDOR.POBLACION) AS POBLACION_A' + - 'LMACEN,'#10' COALESCE(ALMACENES.PROVINCIA, PEDIDOS_PROVEEDOR.PROVIN' + - 'CIA) AS PROVINCIA_ALMACEN,'#10' COALESCE(ALMACENES.CODIGO_POSTAL, P' + - 'EDIDOS_PROVEEDOR.CODIGO_POSTAL) AS CODIGO_POSTAL_ALMACEN,'#10' PEDI' + - 'DOS_PROVEEDOR.PERSONA_CONTACTO AS PERSONA_CONTACTO_ALMACEN,'#10' PE' + - 'DIDOS_PROVEEDOR.IMPORTE_TOTAL'#10'FROM'#10' PEDIDOS_PROVEEDOR'#10' INNER J' + - 'OIN CONTACTOS ON (CONTACTOS.ID = PEDIDOS_PROVEEDOR.ID_PROVEEDOR)' + - #10' LEFT OUTER JOIN PROVEEDORES_DATOS ON (PROVEEDORES_DATOS.ID_PR' + - 'OVEEDOR = PEDIDOS_PROVEEDOR.ID_PROVEEDOR)'#10' LEFT OUTER JOIN ALMA' + - 'CENES ON (ALMACENES.ID = PEDIDOS_PROVEEDOR.ID_ALMACEN)'#10' LEFT OU' + - 'TER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_DIRECCIONES.ID = PE' + - 'DIDOS_PROVEEDOR.ID_DIRECCION)'#10'WHERE PEDIDOS_PROVEEDOR.ID = :ID'#10#10 + - #10#10#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_EMPRESA' - TableField = 'ID_EMPRESA' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'FECHA_PEDIDO' - TableField = 'FECHA_PEDIDO' - end - item - DatasetField = 'OBSERVACIONES' - TableField = 'OBSERVACIONES' - end - item - DatasetField = 'NOMBRE' - TableField = 'NOMBRE' - end - item - DatasetField = 'FAX' - TableField = 'FAX' - end - item - DatasetField = 'CALLE_ALMACEN' - TableField = 'CALLE_ALMACEN' - end - item - DatasetField = 'POBLACION_ALMACEN' - TableField = 'POBLACION_ALMACEN' - end - item - DatasetField = 'PROVINCIA_ALMACEN' - TableField = 'PROVINCIA_ALMACEN' - end - item - DatasetField = 'CODIGO_POSTAL_ALMACEN' - TableField = 'CODIGO_POSTAL_ALMACEN' - end - item - DatasetField = 'PERSONA_CONTACTO_ALMACEN' - TableField = 'PERSONA_CONTACTO_ALMACEN' - end - item - DatasetField = 'PERSONA_CONTACTO' - TableField = 'PERSONA_CONTACTO' - end - item - DatasetField = 'FECHA_ENTREGA' - TableField = 'FECHA_ENTREGA' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'ID_ALMACEN' - TableField = 'ID_ALMACEN' - end - item - DatasetField = 'CODIGO_CLIENTE' - TableField = 'CODIGO_CLIENTE' - end> - end> - Name = 'Informe_Cabecera' - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'FECHA_PEDIDO' - DataType = datDateTime - end - item - Name = 'FECHA_ENTREGA' - DataType = datDateTime - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'FAX' - DataType = datString - Size = 25 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'ID_ALMACEN' - DataType = datInteger - end - item - Name = 'CALLE_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL_ALMACEN' - DataType = datString - Size = 10 - end - item - Name = 'PERSONA_CONTACTO_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end> - ReadOnly = True - end - item - IsPublic = False - Params = < - item - Name = 'ID_PEDIDO' - Value = '2' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - SQL = - 'SELECT DET.ID, DET.ID_PEDIDO,'#10' DET.POSICION, DET.TIPO_DETA' + - 'LLE,'#10' ARTICULOS.REFERENCIA, F_RTFTOTEXT(DET.CONCEPTO) as C' + - 'ONCEPTO, DET.CONCEPTO as CONCEPTO_RTF,'#10' DET.CANTIDAD,'#10' ' + - ' DET.UNIDAD_MEDIDA, DET.IMPORTE_UNIDAD - (DET.IMPORTE_UNIDAD *' + - ' (DET.DESCUENTO / 100)) as IMPORTE_UNIDAD, DET.IMPORTE_TOTAL,'#10' ' + - ' ARTICULOS_PROVEEDORES.REFERENCIA_PROV as REFERENCIA_PROVEED' + - 'OR,'#10' ARTICULOS.REFERENCIA_FABR as REFERENCIA_FABRICANTE'#10'FR' + - 'OM PEDIDOS_PROVEEDOR_DETALLES DET'#10'LEFT OUTER JOIN ARTICULOS ON (' + - 'DET.ID_ARTICULO = ARTICULOS.ID)'#10'LEFT JOIN PEDIDOS_PROVEEDOR ON (' + - 'PEDIDOS_PROVEEDOR.ID = DET.ID_PEDIDO)'#10'LEFT JOIN ARTICULOS_PROVEE' + - 'DORES ON ((ARTICULOS_PROVEEDORES.ID_ARTICULO = ARTICULOS.ID) AND' + - ' (ARTICULOS_PROVEEDORES.ID_PROVEEDOR = PEDIDOS_PROVEEDOR.ID_PROV' + - 'EEDOR))'#10#10'WHERE DET.ID_PEDIDO = :ID_PEDIDO AND DET.VISIBLE = 1 AN' + - 'D {Where}'#10'ORDER BY DET.ID_PEDIDO, DET.POSICION;'#10#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_PEDIDO' - TableField = 'ID_PEDIDO' - end - item - DatasetField = 'POSICION' - TableField = 'POSICION' - end - item - DatasetField = 'TIPO_DETALLE' - TableField = 'TIPO_DETALLE' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'CONCEPTO' - TableField = 'CONCEPTO' - end - item - DatasetField = 'CANTIDAD' - TableField = 'CANTIDAD' - end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end - item - DatasetField = 'IMPORTE_UNIDAD' - TableField = 'IMPORTE_UNIDAD' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'REFERENCIA_PROVEEDOR' - TableField = 'REFERENCIA_PROVEEDOR' - end - item - DatasetField = 'REFERENCIA_FABRICANTE' - TableField = 'REFERENCIA_FABRICANTE' - end - item - DatasetField = 'CONCEPTO_RTF' - TableField = 'CONCEPTO_RTF' - end> - end> - Name = 'Informe_Detalles' - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_PEDIDO' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 32765 - end - item - Name = 'CONCEPTO_RTF' - DataType = datString - Size = 2000 - end - item - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datFloat - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'REFERENCIA_PROVEEDOR' - DataType = datString - Size = 255 - end - item - Name = 'REFERENCIA_FABRICANTE' - DataType = datString - Size = 255 - end> - ReadOnly = True - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 48 - Top = 16 - end - object DataDictionary: TDADataDictionary - Fields = <> - Left = 46 - Top = 142 - end - object DABin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 80 - end - object tbl_Cabecera: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'FECHA_PEDIDO' - DataType = datDateTime - end - item - Name = 'FECHA_ENTREGA' - DataType = datDateTime - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'FAX' - DataType = datString - Size = 25 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'CALLE_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL_ALMACEN' - DataType = datString - Size = 10 - end - item - Name = 'PERSONA_CONTACTO_ALMACEN' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end> - Params = < - item - Name = 'ID' - Value = '3' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Cabecera' - IndexDefs = <> - Left = 168 - Top = 16 - end - object tbl_Detalles: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - end - item - Name = 'ID_PEDIDO' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 32765 - end - item - Name = 'CONCEPTO_RTF' - DataType = datString - Size = 2000 - end - item - Name = 'CANTIDAD' - DataType = datFloat - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datFloat - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'REFERENCIA_PROVEEDOR' - DataType = datString - Size = 255 - end - item - Name = 'REFERENCIA_FABRICANTE' - DataType = datString - Size = 255 - end> - Params = < - item - Name = 'ID_PEDIDO' - Value = '2' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Detalles' - IndexDefs = <> - Left = 264 - Top = 16 - end - object tbl_Empresa: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = <> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LogicalName = 'Empresa' - IndexDefs = <> - Left = 168 - Top = 80 - end -end diff --git a/Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.pas b/Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.pas deleted file mode 100644 index c71ea82..0000000 --- a/Source/Modulos/Pedidos a proveedor/Reports/uRptWordPedidoProveedor.pas +++ /dev/null @@ -1,289 +0,0 @@ -unit uRptWordPedidoProveedor; - -interface - -uses - SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase, - Word2000, uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses, - uDAScriptingProvider, uDADataTable, uDAMemDataTable; - -type - TRptWordPedidoProveedor = class(TDataModule) - DABin2DataStreamer: TDABin2DataStreamer; - tbl_Cabecera: TDAMemDataTable; - tbl_Detalles: TDAMemDataTable; - tbl_Empresa: TDAMemDataTable; - schReport: TDASchema; - DataDictionary: TDADataDictionary; - procedure DataModuleCreate(Sender: TObject); - private - FConnection: IDAConnection; - FPlantilla : string; - FWordApp : TWordApp; - FDocumento : TWordDoc; - FCodigoPedido : string; - FNombreFichero : String; - - function Generar : Boolean; - function RellenarDatosPedido : Boolean; - function RellenarDatosDetalle : Boolean; - procedure _GenerarPedido(const AID: String); - public - ImprimirPrecio : Boolean; - ImprimirRefProveedor : Boolean; - function Exportar(Codigo, Fichero : String): Boolean; - constructor Create (AOwner : TComponent); override; - destructor Destroy; override; - end; - -implementation - -{ TRptWordPedidoProveedor } - -{$R *.dfm} - -uses - Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc, - srvEmpresas_Impl, uROTypes, uROClasses; - -const - rptInforme = 'PedidoProveedor.rdx'; - -constructor TRptWordPedidoProveedor.Create(AOwner: TComponent); -begin - inherited; - ImprimirPrecio := False; - ImprimirRefProveedor := False; - FDocumento := NIL; -end; - -destructor TRptWordPedidoProveedor.Destroy; -begin - if FDocumento <> NIL then - FDocumento.Free; - FDocumento := NIL; - inherited; -end; - -function TRptWordPedidoProveedor.Exportar(Codigo, Fichero: String): Boolean; -begin - if EsCadenaVacia(Fichero) then - begin - Result := False; - raise Exception.Create('Falta indicar el fichero donde se exportará el listado.'); - end; - - FNombreFichero := Fichero; - FCodigoPedido := Codigo; - _GenerarPedido(Codigo); - Result := True; -end; - -procedure TRptWordPedidoProveedor.DataModuleCreate(Sender: TObject); -begin - schReport.ConnectionManager := dmServer.ConnectionManager; - FConnection := dmServer.DarNuevaConexion; -end; - -function TRptWordPedidoProveedor.Generar : Boolean; -begin - FWordApp := TWordApp.Create (False, False); - with FWordApp do - begin - Visible := False; - ScreenUpdating := False; - end; - - FDocumento := TWordDoc.CreateNewDoc(FWordApp, FPlantilla); - FWordApp.SaveActiveDocAs(FNombreFichero); - try - if not RellenarDatosPedido then - RaiseError('Se producido un error al generar la cabecera en MS Word.'); - - if not RellenarDatosDetalle then - RaiseError('Se producido un error al generar el informe en MS Word.'); - - FWordApp.CloseApp(wdSaveChanges); - Result := True; - finally - FDocumento := NIL; - FWordApp := NIL; - end; -end; - - -function TRptWordPedidoProveedor.RellenarDatosDetalle : Boolean; -var - numRows, numCols, mergesplit : OleVariant; - MaxCols, iRowCount : Integer; - ACantidad: String; - AIndice: Integer; - AText : String; -begin - iRowCount := 2; - numrows := 2; - numcols := 1; - mergeSplit := False; - MaxCols := 12; - - with FDocumento.Document.Tables.Item(1), tbl_Detalles do - begin - tbl_Detalles.First; - while not tbl_Detalles.EOF do - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - if ImprimirRefProveedor then - Cell(iRowCount, 1).Range.Text := FieldByName('REFERENCIA_PROVEEDOR').AsString; - - Cell(iRowCount, 2).Range.Text := FieldByName('REFERENCIA_FABRICANTE').AsString; - Cell(iRowCount, 3).Range.Text := FieldByName('CONCEPTO').AsString; - - ACantidad := FloatToStr(FieldByName('CANTIDAD').AsFloat); - AIndice := Pos(',', ACantidad); - if AIndice > 0 then - AText := FormatFloat('#,0.00', FieldByName('CANTIDAD').AsFloat) - else - AText := FormatFloat('#,0.##', FieldByName('CANTIDAD').AsFloat); - - Cell(iRowCount, 4).Range.Text := AText + ' ' + FieldByName('UNIDAD_MEDIDA').AsString; - - if ImprimirPrecio - and (FieldByName('IMPORTE_UNIDAD').AsFloat <> 0) then - Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat) - else - Cell(iRowCount, 5).Range.Text := ''; - - if ImprimirPrecio - and (FieldByName('IMPORTE_TOTAL').AsFloat <> 0) then - Cell(iRowCount, 6).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat) - else - Cell(iRowCount, 6).Range.Text := ''; - - Next; - Inc (iRowCount); - end; - - Rows.Item(iRowCount).Delete; - - {while iRowCount <= MaxCols do - begin - Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit); - inc (iRowCount); - end;} - end; - Result := True; -end; - -function TRptWordPedidoProveedor.RellenarDatosPedido : Boolean; -var - DireccionEntrega : String; -// LinkToFile, SaveWithDocument, _Range : OleVariant; -// Imagen : InlineShape; - -begin - - //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA - {if (EmpresaActiva.Logotipo <> Nil) then - begin - //Activamos cabecera - FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; - LinkToFile := False; - SaveWithDocument := True; - _Range := EmptyParam; - FicheroTemporal := DarFicheroTemporal; - EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal); - Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(ficherotemporal, LinkToFile, SaveWithDocument, _Range); - - //Formateamos imagen - if ((Imagen.Get_Width > ANCHO_LOGO_INF)) then - begin - Imagen.Set_Height(((ANCHO_LOGO_INF * Imagen.Get_Height) /Imagen.Get_Width)); - Imagen.Set_Width(ANCHO_LOGO_INF); - end; - end;} - - with FDocumento, tbl_Cabecera do - begin - ReplaceBookmark('CodigoPedido', FieldByName('REFERENCIA').AsString); - ReplaceBookmark('FechaPedido', FieldByName('FECHA_PEDIDO').AsString); - - // En la dirección mostrar aquellos campos que estén rellenos. - DireccionEntrega := ''; - if not EsCadenaVacia(FieldByName('CALLE_ALMACEN').AsString) then - DireccionEntrega := DireccionEntrega + FieldByName('CALLE_ALMACEN').AsString; - if not EsCadenaVacia(FieldByName('CODIGO_POSTAL_ALMACEN').AsString) then - DireccionEntrega := DireccionEntrega + ', ' + FieldByName('CODIGO_POSTAL_ALMACEN').AsString; - if not EsCadenaVacia(FieldByName('POBLACION_ALMACEN').AsString) then - DireccionEntrega := DireccionEntrega + ', ' + FieldByName('POBLACION_ALMACEN').AsString; - if not EsCadenaVacia(FieldByName('PROVINCIA_ALMACEN').AsString) then - DireccionEntrega := DireccionEntrega + ', ' + FieldByName('PROVINCIA_ALMACEN').AsString; - ReplaceBookmark('LugarEntrega', DireccionEntrega); - - { ReplaceBookmark('LugarEntrega', FieldByName('CALLEALMACEN').AsString + ' ' + - FieldByName('NUMEROALMACEN').AsString + ', ' + FieldByName('PISOALMACEN').AsString + ', ' + - FieldByName('CODIGOPOSTALALMACEN').AsString + ' ' + FieldByName('POBLACIONALMACEN').AsString + ', ' + FieldByName('PROVINCIAALMACEN').AsString);} - - ReplaceBookmark('PersonaEntrega', FieldByName('PERSONA_CONTACTO_ALMACEN').AsString); - if FieldByName('FECHA_ENTREGA').IsNull then - ReplaceBookmark('FechaEntrega', '') - else - ReplaceBookmark('FechaEntrega', 'FECHA DE ENTREGA PREVISTA: ' + FieldByName('FECHA_ENTREGA').AsString); - - ReplaceBookmark('NombreProveedor', FieldByName('NOMBRE').AsString); - ReplaceBookmark('FaxProveedor', FieldByName('FAX').AsString); - ReplaceBookmark('PersonaContactoProveedor', FieldByName('PERSONA_CONTACTO').AsString); - ReplaceBookmark('CodigoClienteProveedor', FieldByName('CODIGO_CLIENTE').AsString); - - if ImprimirPrecio then - ReplaceBookmark('ImporteTotal', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat)) - else - ReplaceBookmark('ImporteTotal', ''); - - ReplaceBookmark('NotasPedido', FieldByName('OBSERVACIONES').AsString); - - ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('NombreEmpresa2', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString); - ReplaceBookmark('DireccionEmpresa', - Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString, - tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString])); - ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString); - ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString); - ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString); - end; - Result := True; -end; - -procedure TRptWordPedidoProveedor._GenerarPedido(const AID: String); -var - ACopiaPlantilla : String; -begin - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - try - tbl_Cabecera.ParamByName('ID').AsString := AID; - tbl_Detalles.ParamByName('ID_PEDIDO').AsString := AID; - - tbl_Cabecera.Active := True; - tbl_Detalles.Active := True; - - FPlantilla := DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme; - FCodigoPedido := AID; - - 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); - end; - end; - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; -end; - - -end. diff --git a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas index 45a4fef..418ae91 100644 --- a/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas +++ b/Source/Modulos/Pedidos a proveedor/Servidor/srvPedidosProveedor_Impl.pas @@ -35,8 +35,6 @@ type { IsrvPedidosProveedor methods } function GenerarInforme(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; - const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; end; @@ -48,8 +46,7 @@ uses Dialogs, uSistemaFunc, {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, schPedidosProveedorClient_Intf, uRestriccionesUsuarioUtils, - uBizPedidosProveedorServer, uRptPedidosProveedor_Server, - uRptWordPedidoProveedor; + uBizPedidosProveedorServer, uRptPedidosProveedor_Server; { uRORemoteDataModule, fServerForm, Variants, IB, schPedidosProveedorClient_Intf; @@ -115,28 +112,6 @@ begin end; end; -function TsrvPedidosProveedor.GenerarInformeEnWord(const ID: Integer; - const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; -var - AReportGenerator : TRptWordPedidoProveedor; - AFicheroTMP : TFileName; -begin - Result := NIL; - AFicheroTMP := DarFicheroTemporal; - AReportGenerator := TRptWordPedidoProveedor.Create(nil); - try - AReportGenerator.ImprimirPrecio := ImprimirPrecio; - AReportGenerator.ImprimirRefProveedor := ImprimirRefProveedor; - if AReportGenerator.Exportar(IntToStr(ID), AFicheroTMP) then - begin - Result := Binary.Create; - Result.LoadFromFile(AFicheroTMP); - end; - finally - FreeAndNIL(AReportGenerator); - end; -end; - initialization TROClassFactory.Create('srvPedidosProveedor', Create_srvPedidosProveedor, TsrvPedidosProveedor_Invoker); diff --git a/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc b/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc index dd62d55..e797665 100644 --- a/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc +++ b/Source/Modulos/Pedidos de cliente/Controller/PedidosCliente_controller.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo\Source\Modulos\Pedidos de cliente\Controller\PedidosCliente_controller.RES */ -/* c:\temp\dtf33F.tmp */ +/* c:\temp\dtfBC.tmp */ diff --git a/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc b/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc index 6e703f3..0976694 100644 --- a/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc +++ b/Source/Modulos/Pedidos de cliente/Data/PedidosCliente_data.drc @@ -14,4 +14,4 @@ END /* C:\Codigo\Source\Modulos\Pedidos de cliente\Data\uDataModulePedidosCliente.dfm */ /* C:\Codigo\Source\Modulos\Pedidos de cliente\Data\PedidosCliente_data.RES */ -/* c:\temp\dtf33D.tmp */ +/* c:\temp\dtfBA.tmp */ diff --git a/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc b/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc index 3ac57d7..586c364 100644 --- a/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc +++ b/Source/Modulos/Pedidos de cliente/Model/PedidosCliente_model.drc @@ -13,4 +13,4 @@ BEGIN END /* C:\Codigo\Source\Modulos\Pedidos de cliente\Model\PedidosCliente_model.RES */ -/* c:\temp\dtf33B.tmp */ +/* c:\temp\dtfB8.tmp */ diff --git a/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc b/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc index d81e511..f6f6002 100644 --- a/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc +++ b/Source/Modulos/Pedidos de cliente/Plugin/PedidosCliente_plugin.drc @@ -14,4 +14,4 @@ END /* C:\Codigo\Source\Modulos\Pedidos de cliente\Plugin\uPluginPedidosCliente.dfm */ /* C:\Codigo\Source\Modulos\Pedidos de cliente\Plugin\PedidosCliente_plugin.RES */ -/* c:\temp\dtf3A7.tmp */ +/* c:\temp\dtf124.tmp */ diff --git a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc index 73896a1..b8cfd49 100644 --- a/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc +++ b/Source/Modulos/Pedidos de cliente/Views/PedidosCliente_view.drc @@ -26,4 +26,4 @@ END /* C:\Codigo\Source\Modulos\Pedidos de cliente\Views\uEditorElegirArticulosPedidoCliente.dfm */ /* C:\Codigo\Source\Modulos\Pedidos de cliente\Views\uEditorDireccionEntregaPedidoCliente.dfm */ /* C:\Codigo\Source\Modulos\Pedidos de cliente\Views\PedidosCliente_view.RES */ -/* c:\temp\dtf3A5.tmp */ +/* c:\temp\dtf122.tmp */ diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.dfm deleted file mode 100644 index 39a2434..0000000 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.dfm +++ /dev/null @@ -1,563 +0,0 @@ -object RptWordCertificadoTrabajo: TRptWordCertificadoTrabajo - OldCreateOrder = False - OnCreate = DataModuleCreate - Height = 218 - Width = 374 - object schReport: TDASchema - ConnectionManager = dmServer.ConnectionManager - DataDictionary = DataDictionary - Datasets = < - item - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'SELECT'#10' V_PRESUPUESTOS_CLIENTE.ID, V_PRESUPUESTOS_CLIENTE.ID_' + - 'EMPRESA,'#10' V_PRESUPUESTOS_CLIENTE.FECHA_PRESUPUESTO,'#10' V_PRE' + - 'SUPUESTOS_CLIENTE.REFERENCIA,'#10' V_PRESUPUESTOS_CLIENTE.PORTADA' + - ','#10' V_PRESUPUESTOS_CLIENTE.MEMORIA, V_PRESUPUESTOS_CLIENTE.OBS' + - 'ERVACIONES,'#10' V_PRESUPUESTOS_CLIENTE.IMPORTE_NETO, V_PRESUPUES' + - 'TOS_CLIENTE.IMPORTE_PORTE,'#10' V_PRESUPUESTOS_CLIENTE.DESCUENTO,' + - ' V_PRESUPUESTOS_CLIENTE.IMPORTE_DESCUENTO,'#10' V_PRESUPUESTOS_CL' + - 'IENTE.BASE_IMPONIBLE, V_PRESUPUESTOS_CLIENTE.IVA,'#10' V_PRESUPUE' + - 'STOS_CLIENTE.ID_CLIENTE,'#10' V_PRESUPUESTOS_CLIENTE.REFERENCIA_C' + - 'LIENTE,'#10' V_PRESUPUESTOS_CLIENTE.CLIENTE_FINAL,'#10' CONTACTOS.' + - 'NIF_CIF, CONTACTOS.NOMBRE,'#10' V_PRESUPUESTOS_CLIENTE.IMPORTE_IV' + - 'A, V_PRESUPUESTOS_CLIENTE.IMPORTE_TOTAL,'#10' COALESCE(CONTACTOS_' + - 'DIRECCIONES.CALLE, CONTACTOS.CALLE) AS CALLE,'#10' COALESCE(CONTA' + - 'CTOS_DIRECCIONES.POBLACION, CONTACTOS.POBLACION) AS POBLACION,'#10' ' + - ' COALESCE(CONTACTOS_DIRECCIONES.PROVINCIA, CONTACTOS.PROVINCIA' + - ') AS PROVINCIA,'#10' COALESCE(CONTACTOS_DIRECCIONES.CODIGO_POSTAL' + - ', CONTACTOS.CODIGO_POSTAL) AS CODIGO_POSTAL,'#10' V_PRESUPUESTOS_' + - 'CLIENTE.PERSONA_CONTACTO'#10'FROM'#10' V_PRESUPUESTOS_CLIENTE'#10' INN' + - 'ER JOIN CONTACTOS ON (CONTACTOS.ID = V_PRESUPUESTOS_CLIENTE.ID_C' + - 'LIENTE)'#10' LEFT OUTER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_' + - 'DIRECCIONES.ID = V_PRESUPUESTOS_CLIENTE.ID_DIRECCION)'#10'WHERE'#10' ' + - 'V_PRESUPUESTOS_CLIENTE.ID = :ID'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_EMPRESA' - TableField = 'ID_EMPRESA' - end - item - DatasetField = 'FECHA_PRESUPUESTO' - TableField = 'FECHA_PRESUPUESTO' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'PORTADA' - TableField = 'PORTADA' - end - item - DatasetField = 'MEMORIA' - TableField = 'MEMORIA' - end - item - DatasetField = 'OBSERVACIONES' - TableField = 'OBSERVACIONES' - end - item - DatasetField = 'IMPORTE_NETO' - TableField = 'IMPORTE_NETO' - end - item - DatasetField = 'IMPORTE_PORTE' - TableField = 'IMPORTE_PORTE' - end - item - DatasetField = 'DESCUENTO' - TableField = 'DESCUENTO' - end - item - DatasetField = 'IMPORTE_DESCUENTO' - TableField = 'IMPORTE_DESCUENTO' - end - item - DatasetField = 'BASE_IMPONIBLE' - TableField = 'BASE_IMPONIBLE' - end - item - DatasetField = 'IVA' - TableField = 'IVA' - end - item - DatasetField = 'ID_CLIENTE' - TableField = 'ID_CLIENTE' - end - item - DatasetField = 'REFERENCIA_CLIENTE' - TableField = 'REFERENCIA_CLIENTE' - end - item - DatasetField = 'CLIENTE_FINAL' - TableField = 'CLIENTE_FINAL' - end - item - DatasetField = 'NIF_CIF' - TableField = 'NIF_CIF' - end - item - DatasetField = 'NOMBRE' - TableField = 'NOMBRE' - end - item - DatasetField = 'IMPORTE_IVA' - TableField = 'IMPORTE_IVA' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'PERSONA_CONTACTO' - TableField = 'PERSONA_CONTACTO' - end - item - DatasetField = 'CALLE' - TableField = 'CALLE' - end - item - DatasetField = 'POBLACION' - TableField = 'POBLACION' - end - item - DatasetField = 'PROVINCIA' - TableField = 'PROVINCIA' - end - item - DatasetField = 'CODIGO_POSTAL' - TableField = 'CODIGO_POSTAL' - end> - end> - Name = 'Informe_Cabecera' - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'FECHA_PRESUPUESTO' - DataType = datDateTime - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'PORTADA' - DataType = datMemo - end - item - Name = 'MEMORIA' - DataType = datMemo - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'IMPORTE_NETO' - DataType = datCurrency - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_DESCUENTO' - DataType = datCurrency - end - item - Name = 'BASE_IMPONIBLE' - DataType = datCurrency - end - item - Name = 'IVA' - DataType = datFloat - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'REFERENCIA_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'CLIENTE_FINAL' - DataType = datString - Size = 255 - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_IVA' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end> - ReadOnly = True - end - item - Params = < - item - Name = 'ID_PRESUPUESTO' - DataType = datInteger - Value = '12' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - SQL = - 'SELECT * FROM PRO_PRES_CAPITULOS(:ID_PRESUPUESTO)'#10'WHERE (VISIBLE' + - ' <> 0) AND {where}'#10'ORDER BY ID_PRESUPUESTO, POSICION'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_PRESUPUESTO' - TableField = 'ID_PRESUPUESTO' - end - item - DatasetField = 'POSICION' - TableField = 'POSICION' - end - item - DatasetField = 'TIPO_DETALLE' - TableField = 'TIPO_DETALLE' - end - item - DatasetField = 'CONCEPTO' - TableField = 'CONCEPTO' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'VISIBLE' - TableField = 'VISIBLE' - end> - end> - Name = 'Informe_Capitulos' - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_PRESUPUESTO' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 2000 - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'VISIBLE' - DataType = datSmallInt - end> - ReadOnly = True - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 48 - Top = 16 - end - object DataDictionary: TDADataDictionary - Fields = <> - Left = 46 - Top = 142 - end - object DABin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 80 - end - object tbl_Cabecera: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'FECHA_PRESUPUESTO' - DataType = datDateTime - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'PORTADA' - DataType = datMemo - end - item - Name = 'MEMORIA' - DataType = datMemo - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'IMPORTE_NETO' - DataType = datCurrency - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_DESCUENTO' - DataType = datCurrency - end - item - Name = 'BASE_IMPONIBLE' - DataType = datCurrency - end - item - Name = 'IVA' - DataType = datFloat - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'REFERENCIA_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'CLIENTE_FINAL' - DataType = datString - Size = 255 - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_IVA' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Cabecera' - IndexDefs = <> - Left = 168 - Top = 16 - end - object tbl_Capitulos: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_PRESUPUESTO' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 2000 - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'VISIBLE' - DataType = datSmallInt - end> - Params = < - item - Name = 'ID_PRESUPUESTO' - DataType = datInteger - Value = '12' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Capitulos' - IndexDefs = <> - Left = 264 - Top = 16 - end - object tbl_Empresa: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = <> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LogicalName = 'Empresa' - IndexDefs = <> - Left = 168 - Top = 80 - end -end diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.pas deleted file mode 100644 index 0141b52..0000000 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordCertificadoTrabajo_Server.pas +++ /dev/null @@ -1,217 +0,0 @@ -unit uRptWordCertificadoTrabajo_Server; - -interface - -uses - SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase, - Word2000, - uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses, - uDAScriptingProvider, uDADataTable, uDAMemDataTable; - -type - TCapitulo = record - Tipo : string; - Nombre : string; - Total : double; - end; - - TRptWordCertificadoTrabajo = class(TDataModule) - DABin2DataStreamer: TDABin2DataStreamer; - tbl_Cabecera: TDAMemDataTable; - tbl_Capitulos: TDAMemDataTable; - tbl_Empresa: TDAMemDataTable; - schReport: TDASchema; - DataDictionary: TDADataDictionary; - procedure DataModuleCreate(Sender: TObject); - private - FConnection: IDAConnection; - FImportes : Boolean; -// FDesBonificacion : Variant; -// FImpBonificacion : Double; - FPlantilla : string; - FWordApp : TWordApp; - FDocumento : TWordDoc; - FNumCapitulos : Integer; - FNumCapOpc : Integer; - FContadorCap : Integer; - FCodigoPresupuesto : Integer; - FNombreFichero : String; - ListaCapitulos : array[1..1000] of TCapitulo; - function Generar : Boolean; - function RellenarInforme : boolean; virtual; - procedure _GenerarCertificado(const AID : Integer); - public - constructor Create (AOwner : TComponent); override; - destructor Destroy; override; - function Exportar(const AIDPresupuesto: Integer; const AFichero : String): Boolean; - end; - - -implementation - -{$R *.dfm} - -uses - Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc, - srvEmpresas_Impl, uROTypes, uROClasses; - -const - rptInforme = 'CertificadoTrabajos.rdx'; - - -constructor TRptWordCertificadoTrabajo.Create(AOwner: TComponent); -begin - inherited; - FDocumento := NIL; - FImportes := True; - FNumCapitulos := 0; - - FPlantilla := DarRutaInformes + rptInforme; -end; - -procedure TRptWordCertificadoTrabajo.DataModuleCreate(Sender: TObject); -begin - schReport.ConnectionManager := dmServer.ConnectionManager; - FConnection := dmServer.DarNuevaConexion; -end; - -destructor TRptWordCertificadoTrabajo.Destroy; -begin - if FDocumento <> NIL then - FDocumento.Free; - FDocumento := NIL; - - inherited; -end; - -function TRptWordCertificadoTrabajo.Exportar(const AIDPresupuesto: Integer; - const AFichero : String): Boolean; -begin - if EsCadenaVacia(AFichero) then - RaiseError('Falta indicar el fichero donde se exportará el listado.'); - - FNombreFichero := AFichero; - FCodigoPresupuesto := AIDPresupuesto; - _GenerarCertificado(AIDPresupuesto); - Result := True; -end; - -function TRptWordCertificadoTrabajo.Generar : Boolean; -begin - FWordApp := TWordApp.Create (False, False); - with FWordApp do - begin - Visible := False; - ScreenUpdating := False; - end; - - FDocumento := TWordDoc.CreateNewDoc(FWordApp, FPlantilla); - FWordApp.SaveActiveDocAs(FNombreFichero); - try - if not RellenarInforme then - RaiseError('Se producido un error al generar el informe en MS Word.'); - - FWordApp.CloseApp(wdSaveChanges); - Result := True; - finally - FDocumento := NIL; - FWordApp := NIL; - end; -end; - - -function TRptWordCertificadoTrabajo.RellenarInforme: boolean; -var - NombreCapitulo : string; - ADescripcion : string; - ANombreFichero : string; -begin - with FDocumento, tbl_Cabecera do - begin - ReplaceBookmark('Cliente', FieldByName('NOMBRE').AsString); - ReplaceBookmark('Direccion', FieldByName('CALLE').AsString + ' ' + - FieldByName('CODIGO_POSTAL').AsString + ' ' + - FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString); - - ReplaceBookmark('Referencia', FieldByName('REFERENCIA').AsString); - end; - - FContadorCap := 0; - FNumCapOpc := 0; - with FDocumento, tbl_Capitulos do - begin - First; - ADescripcion := ''; - while not Eof do - begin - if (FieldByName('TIPO_DETALLE').AsString = 'Titulo') or - (FieldByName('TIPO_DETALLE').AsString = 'Opcional') then - begin - NombreCapitulo := ''; - if (FieldByName('TIPO_DETALLE').AsString = 'Titulo') then - NombreCapitulo := 'Capítulo ' + IntToStr(FContadorCap + 1) + '. ' + FieldByName('CONCEPTO').AsString - else begin - NombreCapitulo := 'Capítulo opcional. ' + FieldByName('CONCEPTO').AsString; - Inc(FNumCapOpc); - end; - ADescripcion := ADescripcion + #13#10 + NombreCapitulo; - - Inc(FContadorCap); - ListaCapitulos[FContadorCap].Tipo := FieldByName('TIPO_DETALLE').AsString; - ListaCapitulos[FContadorCap].Nombre := NombreCapitulo; - Next; - end - else begin - if FContadorCap = 0 then - begin - Inc(FContadorCap); // Se considera el conjunto de conceptos sueltos como un capítulo. - { Pegar una tabla para rellenarla } - end; - Next; - end; - end; - FNumCapitulos := FContadorCap; - ReplaceBookmark('Capitulos', ADescripcion); - end; - - ANombreFichero := DarFicheroTemporal; - EscribirEnFichero(ANombreFichero, tbl_Cabecera.FieldByName('PORTADA').AsString); - FWordApp.InsertFile(ANombreFichero, 'Portada'); - SysUtils.DeleteFile(ANombreFichero); - - Result := True; -end; - - -procedure TRptWordCertificadoTrabajo._GenerarCertificado(const AID: Integer); -var - ACopiaPlantilla: string; -begin - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - try - tbl_Cabecera.ParamByName('ID').AsInteger := AID; - tbl_Capitulos.ParamByName('ID_PRESUPUESTO').AsInteger := AID; - - tbl_Cabecera.Active := True; - tbl_Capitulos.Active := True; - - FCodigoPresupuesto := AID; - - 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); - end; - end; - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; -end; - -end. - diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.dfm deleted file mode 100644 index 06633a3..0000000 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.dfm +++ /dev/null @@ -1,700 +0,0 @@ -object RptWordPresupuestoCliente: TRptWordPresupuestoCliente - OldCreateOrder = False - OnCreate = DataModuleCreate - Height = 262 - Width = 344 - object schReport: TDASchema - ConnectionManager = dmServer.ConnectionManager - DataDictionary = DataDictionary - Datasets = < - item - Params = < - item - Name = 'ID' - Value = '71' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - SQL = - 'SELECT'#10' V_PRESUPUESTOS_CLIENTE.ID, V_PRESUPUESTOS_CLIENTE.ID_' + - 'EMPRESA,'#10' V_PRESUPUESTOS_CLIENTE.FECHA_PRESUPUESTO,'#10' V_PRE' + - 'SUPUESTOS_CLIENTE.REFERENCIA || '#39' '#39' || COALESCE(V_PRESUPUESTOS_C' + - 'LIENTE.REFERENCIA_AUX, '#39#39') AS REFERENCIA,'#10' V_PRESUPUESTOS_CLI' + - 'ENTE.PORTADA,'#10' V_PRESUPUESTOS_CLIENTE.MEMORIA, V_PRESUPUESTOS' + - '_CLIENTE.OBSERVACIONES,'#10' V_PRESUPUESTOS_CLIENTE.IMPORTE_NETO,' + - ' V_PRESUPUESTOS_CLIENTE.IMPORTE_PORTE,'#10' V_PRESUPUESTOS_CLIENT' + - 'E.DESCUENTO, V_PRESUPUESTOS_CLIENTE.IMPORTE_DESCUENTO,'#10' V_PRE' + - 'SUPUESTOS_CLIENTE.BASE_IMPONIBLE, V_PRESUPUESTOS_CLIENTE.IVA,'#10' ' + - ' V_PRESUPUESTOS_CLIENTE.ID_CLIENTE,'#10' V_PRESUPUESTOS_CLIENTE.' + - 'REFERENCIA_CLIENTE,'#10' V_PRESUPUESTOS_CLIENTE.CLIENTE_FINAL,'#10' ' + - ' CONTACTOS.NIF_CIF, CONTACTOS.NOMBRE,'#10' V_PRESUPUESTOS_CLIENT' + - 'E.IMPORTE_IVA, V_PRESUPUESTOS_CLIENTE.IMPORTE_TOTAL,'#10' COALESC' + - 'E(CONTACTOS_DIRECCIONES.CALLE, CONTACTOS.CALLE) AS CALLE,'#10' CO' + - 'ALESCE(CONTACTOS_DIRECCIONES.POBLACION, CONTACTOS.POBLACION) AS ' + - 'POBLACION,'#10' COALESCE(CONTACTOS_DIRECCIONES.PROVINCIA, CONTACT' + - 'OS.PROVINCIA) AS PROVINCIA,'#10' COALESCE(CONTACTOS_DIRECCIONES.C' + - 'ODIGO_POSTAL, CONTACTOS.CODIGO_POSTAL) AS CODIGO_POSTAL,'#10' V_P' + - 'RESUPUESTOS_CLIENTE.PERSONA_CONTACTO,'#10' V_PRESUPUESTOS_CLIENTE' + - '.DESCRIPCION_BONIFICACION,'#10' V_PRESUPUESTOS_CLIENTE.IMPORTE_BO' + - 'NIFICACION'#10'FROM'#10' V_PRESUPUESTOS_CLIENTE'#10' INNER JOIN CONTAC' + - 'TOS ON (CONTACTOS.ID = V_PRESUPUESTOS_CLIENTE.ID_CLIENTE)'#10' LE' + - 'FT OUTER JOIN CONTACTOS_DIRECCIONES ON (CONTACTOS_DIRECCIONES.ID' + - ' = V_PRESUPUESTOS_CLIENTE.ID_DIRECCION)'#10'WHERE'#10' V_PRESUPUESTOS' + - '_CLIENTE.ID = :ID'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_EMPRESA' - TableField = 'ID_EMPRESA' - end - item - DatasetField = 'FECHA_PRESUPUESTO' - TableField = 'FECHA_PRESUPUESTO' - end - item - DatasetField = 'REFERENCIA' - TableField = 'REFERENCIA' - end - item - DatasetField = 'PORTADA' - TableField = 'PORTADA' - end - item - DatasetField = 'MEMORIA' - TableField = 'MEMORIA' - end - item - DatasetField = 'OBSERVACIONES' - TableField = 'OBSERVACIONES' - end - item - DatasetField = 'IMPORTE_NETO' - TableField = 'IMPORTE_NETO' - end - item - DatasetField = 'IMPORTE_PORTE' - TableField = 'IMPORTE_PORTE' - end - item - DatasetField = 'DESCUENTO' - TableField = 'DESCUENTO' - end - item - DatasetField = 'IMPORTE_DESCUENTO' - TableField = 'IMPORTE_DESCUENTO' - end - item - DatasetField = 'BASE_IMPONIBLE' - TableField = 'BASE_IMPONIBLE' - end - item - DatasetField = 'IVA' - TableField = 'IVA' - end - item - DatasetField = 'ID_CLIENTE' - TableField = 'ID_CLIENTE' - end - item - DatasetField = 'REFERENCIA_CLIENTE' - TableField = 'REFERENCIA_CLIENTE' - end - item - DatasetField = 'CLIENTE_FINAL' - TableField = 'CLIENTE_FINAL' - end - item - DatasetField = 'NIF_CIF' - TableField = 'NIF_CIF' - end - item - DatasetField = 'NOMBRE' - TableField = 'NOMBRE' - end - item - DatasetField = 'IMPORTE_IVA' - TableField = 'IMPORTE_IVA' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'PERSONA_CONTACTO' - TableField = 'PERSONA_CONTACTO' - end - item - DatasetField = 'CALLE' - TableField = 'CALLE' - end - item - DatasetField = 'POBLACION' - TableField = 'POBLACION' - end - item - DatasetField = 'PROVINCIA' - TableField = 'PROVINCIA' - end - item - DatasetField = 'CODIGO_POSTAL' - TableField = 'CODIGO_POSTAL' - end - item - DatasetField = 'DESCRIPCION_BONIFICACION' - TableField = 'DESCRIPCION_BONIFICACION' - end - item - DatasetField = 'IMPORTE_BONIFICACION' - TableField = 'IMPORTE_BONIFICACION' - end> - end> - Name = 'Informe_Cabecera' - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'FECHA_PRESUPUESTO' - DataType = datDateTime - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'PORTADA' - DataType = datMemo - end - item - Name = 'MEMORIA' - DataType = datMemo - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'IMPORTE_NETO' - DataType = datCurrency - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_DESCUENTO' - DataType = datCurrency - end - item - Name = 'BASE_IMPONIBLE' - DataType = datCurrency - end - item - Name = 'IVA' - DataType = datFloat - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'REFERENCIA_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'CLIENTE_FINAL' - DataType = datString - Size = 255 - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_IVA' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end - item - Name = 'DESCRIPCION_BONIFICACION' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_BONIFICACION' - DataType = datCurrency - end> - ReadOnly = True - end - item - Params = < - item - Name = 'ID_PRESUPUESTO' - Value = '2' - ParamType = daptInput - end> - Statements = < - item - Connection = 'IBX' - ConnectionType = 'Interbase' - Default = True - SQL = - 'SELECT '#10' ID, ID_PRESUPUESTO, POSICION, TIPO_DETALLE, ID_ARTIC' + - 'ULO, '#10' F_RTFTOTEXT(F_RTFTOTEXT(CONCEPTO)) as CONCEPTO, CONCEP' + - 'TO as CONCEPTO_RTF, CANTIDAD,'#10' UNIDAD_MEDIDA,'#10' CASE WHEN C' + - 'ANTIDAD = 0 THEN 0'#10' ELSE (IMPORTE_TOTAL / CANTIDAD) END AS IM' + - 'PORTE_UNIDAD,'#10' DESCUENTO, IMPORTE_PORTE,'#10' IMPORTE_TOTAL, V' + - 'ISIBLE, FECHA_ALTA, FECHA_MODIFICACION'#10' FROM'#10' PRESUPUESTOS_C' + - 'LIENTE_DETALLES'#10' WHERE {Where}'#10' AND (VISIBLE <> 0)'#10' AND (' + - 'ID_PRESUPUESTO = :ID_PRESUPUESTO)'#10' ORDER BY ID_PRESUPUESTO, POS' + - 'ICION'#10 - StatementType = stSQL - ColumnMappings = < - item - DatasetField = 'ID' - TableField = 'ID' - end - item - DatasetField = 'ID_PRESUPUESTO' - TableField = 'ID_PRESUPUESTO' - end - item - DatasetField = 'POSICION' - TableField = 'POSICION' - end - item - DatasetField = 'TIPO_DETALLE' - TableField = 'TIPO_DETALLE' - end - item - DatasetField = 'ID_ARTICULO' - TableField = 'ID_ARTICULO' - end - item - DatasetField = 'CONCEPTO' - TableField = 'CONCEPTO' - end - item - DatasetField = 'CONCEPTO_RTF' - TableField = 'CONCEPTO_RTF' - end - item - DatasetField = 'CANTIDAD' - TableField = 'CANTIDAD' - end - item - DatasetField = 'UNIDAD_MEDIDA' - TableField = 'UNIDAD_MEDIDA' - end - item - DatasetField = 'IMPORTE_UNIDAD' - TableField = 'IMPORTE_UNIDAD' - end - item - DatasetField = 'DESCUENTO' - TableField = 'DESCUENTO' - end - item - DatasetField = 'IMPORTE_PORTE' - TableField = 'IMPORTE_PORTE' - end - item - DatasetField = 'IMPORTE_TOTAL' - TableField = 'IMPORTE_TOTAL' - end - item - DatasetField = 'VISIBLE' - TableField = 'VISIBLE' - end - item - DatasetField = 'FECHA_ALTA' - TableField = 'FECHA_ALTA' - end - item - DatasetField = 'FECHA_MODIFICACION' - TableField = 'FECHA_MODIFICACION' - end> - end> - Name = 'Informe_Detalles' - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_PRESUPUESTO' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'ID_ARTICULO' - DataType = datInteger - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 32765 - end - item - Name = 'CONCEPTO_RTF' - DataType = datString - Size = 2000 - end - item - Name = 'CANTIDAD' - DataType = datCurrency - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'VISIBLE' - DataType = datSmallInt - end - item - Name = 'FECHA_ALTA' - DataType = datDateTime - end - item - Name = 'FECHA_MODIFICACION' - DataType = datDateTime - end> - ReadOnly = True - end> - JoinDataTables = <> - UnionDataTables = <> - Commands = <> - RelationShips = <> - UpdateRules = <> - Version = 0 - Left = 48 - Top = 16 - end - object DataDictionary: TDADataDictionary - Fields = <> - Left = 46 - Top = 142 - end - object DABin2DataStreamer: TDABin2DataStreamer - Left = 48 - Top = 80 - end - object tbl_Cabecera: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - Required = True - InPrimaryKey = True - end - item - Name = 'ID_EMPRESA' - DataType = datInteger - end - item - Name = 'FECHA_PRESUPUESTO' - DataType = datDateTime - end - item - Name = 'REFERENCIA' - DataType = datString - Size = 255 - end - item - Name = 'PORTADA' - DataType = datMemo - end - item - Name = 'MEMORIA' - DataType = datMemo - end - item - Name = 'OBSERVACIONES' - DataType = datMemo - end - item - Name = 'IMPORTE_NETO' - DataType = datCurrency - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_DESCUENTO' - DataType = datCurrency - end - item - Name = 'BASE_IMPONIBLE' - DataType = datCurrency - end - item - Name = 'IVA' - DataType = datFloat - end - item - Name = 'ID_CLIENTE' - DataType = datInteger - end - item - Name = 'REFERENCIA_CLIENTE' - DataType = datString - Size = 255 - end - item - Name = 'CLIENTE_FINAL' - DataType = datString - Size = 255 - end - item - Name = 'NIF_CIF' - DataType = datString - Size = 15 - end - item - Name = 'NOMBRE' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_IVA' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'CALLE' - DataType = datString - Size = 255 - end - item - Name = 'POBLACION' - DataType = datString - Size = 255 - end - item - Name = 'PROVINCIA' - DataType = datString - Size = 255 - end - item - Name = 'CODIGO_POSTAL' - DataType = datString - Size = 10 - end - item - Name = 'PERSONA_CONTACTO' - DataType = datString - Size = 255 - end> - Params = < - item - Name = 'ID' - Value = '71' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Cabecera' - IndexDefs = <> - Left = 168 - Top = 16 - end - object tbl_Detalles: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = < - item - Name = 'ID' - DataType = datInteger - InPrimaryKey = True - end - item - Name = 'ID_PRESUPUESTO' - DataType = datInteger - end - item - Name = 'POSICION' - DataType = datInteger - end - item - Name = 'TIPO_DETALLE' - DataType = datString - Size = 25 - end - item - Name = 'ID_ARTICULO' - DataType = datInteger - end - item - Name = 'CONCEPTO' - DataType = datString - Size = 32765 - end - item - Name = 'CONCEPTO_RTF' - DataType = datString - Size = 2000 - end - item - Name = 'CANTIDAD' - DataType = datInteger - end - item - Name = 'UNIDAD_MEDIDA' - DataType = datString - Size = 255 - end - item - Name = 'IMPORTE_UNIDAD' - DataType = datCurrency - end - item - Name = 'DESCUENTO' - DataType = datFloat - end - item - Name = 'IMPORTE_PORTE' - DataType = datCurrency - end - item - Name = 'IMPORTE_TOTAL' - DataType = datCurrency - end - item - Name = 'VISIBLE' - DataType = datSmallInt - end - item - Name = 'FECHA_ALTA' - DataType = datDateTime - end - item - Name = 'FECHA_MODIFICACION' - DataType = datDateTime - end> - Params = < - item - Name = 'ID_PRESUPUESTO' - Value = '2' - ParamType = daptInput - end> - MasterParamsMappings.Strings = ( - 'ID_PRESUPUESTO=ID_PRESUPUESTO') - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LocalSchema = schReport - LocalDataStreamer = DABin2DataStreamer - LogicalName = 'Informe_Detalles' - IndexDefs = <> - Left = 264 - Top = 16 - end - object tbl_Empresa: TDAMemDataTable - RemoteUpdatesOptions = [] - Fields = <> - Params = < - item - Name = 'ID' - Value = '31' - ParamType = daptInput - end> - LogChanges = False - StreamingOptions = [soDisableEventsWhileStreaming] - RemoteFetchEnabled = False - LogicalName = 'Empresa' - IndexDefs = <> - Left = 168 - Top = 80 - end -end diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas deleted file mode 100644 index 914caf7..0000000 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptWordPresupuestoCliente.pas +++ /dev/null @@ -1,568 +0,0 @@ -unit uRptWordPresupuestoCliente; - -interface - -uses - SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase, - Word2000, - uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses, - uDAScriptingProvider, uDADataTable, uDAMemDataTable; - -type - TCapitulo = record - Tipo : string; - Nombre : string; - Total : double; - end; - - TRptWordPresupuestoCliente = class(TDataModule) - DABin2DataStreamer: TDABin2DataStreamer; - tbl_Cabecera: TDAMemDataTable; - tbl_Detalles: TDAMemDataTable; - tbl_Empresa: TDAMemDataTable; - schReport: TDASchema; - DataDictionary: TDADataDictionary; - procedure DataModuleCreate(Sender: TObject); - private - FConnection: IDAConnection; - FImportes : Boolean; - FDesBonificacion : Variant; - FImpBonificacion : Double; - FPlantilla : string; - FWordApp : TWordApp; - FDocumento : TWordDoc; - FNumCapitulos : Integer; - FNumCapOpc : Integer; - FContadorCap : Integer; - FCodigoPresupuesto : string; - FNombreFichero : String; - ListaCapitulos : array[1..1000] of TCapitulo; - FVerSello: Integer; - procedure InsertarConceptos(Tabla : Table); - function Generar : Boolean; - function RellenarPortada : boolean; virtual; - function RellenarCabecera : boolean; virtual; - function RellenarInforme : boolean; virtual; - function RellenarResumen : boolean; virtual; - procedure _GenerarPresupuesto(const AID : String); - public - constructor Create (AOwner : TComponent); override; - destructor Destroy; override; - function Exportar(Codigo, Fichero : String; const VerSello: Integer): Boolean; - end; - - -implementation - -{$R *.dfm} - -uses - Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc, - srvEmpresas_Impl, uROTypes, uROClasses; - -const - rptInforme = 'Presupuesto.rdx'; - - -constructor TRptWordPresupuestoCliente.Create(AOwner: TComponent); -begin - inherited; - FDocumento := NIL; - FImportes := True; - FNumCapitulos := 0; - FVerSello:= 1; -end; - -procedure TRptWordPresupuestoCliente.DataModuleCreate(Sender: TObject); -begin - schReport.ConnectionManager := dmServer.ConnectionManager; - FConnection := dmServer.DarNuevaConexion; -end; - -destructor TRptWordPresupuestoCliente.Destroy; -begin - if FDocumento <> NIL then - FDocumento.Free; - FDocumento := NIL; - - inherited; -end; - -function TRptWordPresupuestoCliente.Exportar(Codigo, Fichero: String; const VerSello: Integer): Boolean; -begin - if EsCadenaVacia(Fichero) then - RaiseError('Falta indicar el fichero donde se exportará el listado.'); - - FNombreFichero := Fichero; - FCodigoPresupuesto := Codigo; - FVerSello := VerSello; - _GenerarPresupuesto(Codigo); - Result := True; -end; - -function TRptWordPresupuestoCliente.Generar : Boolean; -begin - FWordApp := TWordApp.Create (False, False); - with FWordApp do - begin - Visible := False; - ScreenUpdating := False; - end; - - FDocumento := TWordDoc.CreateNewDoc(FWordApp, FPlantilla); - FWordApp.SaveActiveDocAs(FNombreFichero); - - try - if not RellenarPortada then - RaiseError('Se producido un error al generar la portada del informe en MS Word.'); - - if not RellenarCabecera then - RaiseError('Se producido un error al generar la cabecera del informe en MS Word.'); - - if not RellenarInforme then - RaiseError('Se producido un error al generar el informe en MS Word.'); - - if (FNumCapitulos <> 0) and (FNumCapOpc < FNumCapitulos) then - begin - if not RellenarResumen then - RaiseError('Se producido un error al generar el resumen en MS Word.'); - end - else begin - FDocumento.Document.Tables.Item(FDocumento.Document.Tables.Count-1).Delete; - end; - - FWordApp.CloseApp(wdSaveChanges); - Result := True; - finally - FDocumento := NIL; - FWordApp := NIL; - end; -end; - - -procedure TRptWordPresupuestoCliente.InsertarConceptos(Tabla : Table); -var - numRows, numCols, mergeSplit, shiftCells : OleVariant; - iContador : Integer; - TotalConceptos : Double; - ACantidad: String; - AIndice: Integer; - AText : String; -begin - TotalConceptos := 0; - numRows := 2; - numCols := 1; - mergeSplit := False; - shiftCells := False; - iContador := 2; // Empezar en la 2ª fila de celdas. La primera es la - // cabecera de la tabla. - - with Tabla, tbl_Detalles do - begin - while not EOF do - begin - if FieldByName('TIPO_DETALLE').AsString <> 'Concepto' then - Break; - // Partir la celda actual en 2 filas de 1 columna. - Rows.Item(iContador).Cells.Split (numRows, numCols, mergesplit); - Cell(iContador, 1).Range.Text := FieldByName('CONCEPTO').AsString; - - ACantidad := FloatToStr(FieldByName('CANTIDAD').AsFloat); - if ACantidad = '0' then - AText := '' - else begin - AIndice := Pos(',', ACantidad); - if AIndice > 0 then - AText := FormatFloat('#,0.00', FieldByName('CANTIDAD').AsFloat) - else - AText := FormatFloat('#,0.##', FieldByName('CANTIDAD').AsFloat); - end; - - Cell(iContador, 2).Range.Text := AText + ' ' + FieldByName('UNIDAD_MEDIDA').AsString; - - if FImportes and - (FieldByName('IMPORTE_UNIDAD').AsFloat <> 0) then - Cell(iContador, 3).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat) - else - Cell(iContador, 3).Range.Text := ''; - - if FImportes and - (FieldByName('IMPORTE_TOTAL').AsFloat <> 0) then - Cell(iContador, 4).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat) - else - Cell(iContador, 4).Range.Text := ''; - - TotalConceptos := TotalConceptos + FieldByName('IMPORTE_TOTAL').AsFloat; - Next; - Inc (iContador); - end; - ListaCapitulos[FContadorCap].Total := TotalConceptos; - - // Borrar la fila vacía que sobra - Rows.Item(iContador).Cells.Delete(shiftCells); - if FImportes then - Cell(iContador, 1).Range.Text := 'Total: ' + FormatFloat(DISPLAY_EUROS2, TotalConceptos) - else - Cell(iContador, 1).Range.Text := ''; - AutoFitBehavior(wdAutoFitWindow); - end; - -end; - -function TRptWordPresupuestoCliente.RellenarCabecera: boolean; -var - NombreFichero, - Texto : String; -{ FicheroTemporal : String; - LinkToFile, SaveWithDocument, _Range : OleVariant; - Imagen : InlineShape; - ovRange : OleVariant; - Which, Name : OleVariant;} - What, Count : OleVariant; - ovBookMarkName : OleVariant; - TempRange : Word2000.Range; -begin - - //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA - { --------------------- PENDIENTE - if (EmpresaActiva.Logotipo <> Nil) then - begin - //Activamos cabecera segunda - What:=wdGoToSection; - Which:=wdGoToFirst; - Count:=2; - Name:=''; - FWordApp.Application.ActiveWindow.ActivePane.Selection.GoTo_ (What, Which, Count, Name); - FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader; - LinkToFile := False; - SaveWithDocument := True; - _Range := EmptyParam; - FicheroTemporal := DarFicheroTemporal; - EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal); - Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(FicheroTemporal, LinkToFile, SaveWithDocument, _Range); - - //Formateamos imagen - if ((Imagen.Get_Width > ANCHO_LOGO_INF)) then - begin - Imagen.Set_Height(((ANCHO_LOGO_INF * Imagen.Get_Height) /Imagen.Get_Width)); - Imagen.Set_Width(ANCHO_LOGO_INF); - end; - end; - -------------------------------------- } - - with FDocumento, tbl_Cabecera do - begin - if FieldByName('IMPORTE_BONIFICACION').AsFloat > 0 then - FDesBonificacion := FieldByName('DESCRIPCION_BONIFICACION').AsString - else - FDesBonificacion := Null; - FImpBonificacion := FieldByName('IMPORTE_BONIFICACION').AsFloat; - - ReplaceBookmark('CodigoPresupuestoCab', FieldByName('REFERENCIA').AsString); - ReplaceBookmark('FechaPresupuestoCab', FieldByName('FECHA_PRESUPUESTO').AsString); - ReplaceBookmark('NombreClienteCab', FieldByName('NOMBRE').AsString); - ReplaceBookmark('DireccionClienteCab', FieldByName('CALLE').AsString); - ReplaceBookmark('PoblacionClienteCab', - FieldByName('CODIGO_POSTAL').AsString + ' ' + - FieldByName('POBLACION').AsString + ' ' + FieldByName('PROVINCIA').AsString); - ReplaceBookmark('ContactoClienteCab', FieldByName('PERSONA_CONTACTO').AsString); - ReplaceBookmark('NombreClienteFirma', FieldByName('NOMBRE').AsString); - - //Solo para la empresa de tecsitel se debe elegir uno u otra firma - //esto es un poco parche pero bueno - if (tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger = 1) then - begin - if (FVerSello = 1) then - ReplaceBookmark('Firma2', '') - else - ReplaceBookmark('Firma1', ''); - end; - - if not EsCadenaVacia(FieldByName('MEMORIA').AsString) then - begin - Texto := FieldByName('MEMORIA').AsString; - NombreFichero := DarFicheroTemporal; - EscribirEnFichero(NombreFichero, Texto); - FWordApp.InsertFile(NombreFichero, 'TextoPresupuesto'); - SysUtils.DeleteFile(NombreFichero); - end - else begin - ovBookMarkName := 'TextoPresupuesto'; - TempRange := FWordApp.Application.ActiveDocument.Bookmarks.Item (ovBookMarkName).Range; - What := wdCharacter; - Count := 3; - TempRange.Delete(What, Count); - end; - - Texto := FieldByName('OBSERVACIONES').AsString; - NombreFichero := DarFicheroTemporal; - EscribirEnFichero(NombreFichero, Texto); - FWordApp.InsertFile(NombreFichero, 'Notas'); - SysUtils.DeleteFile(NombreFichero); - - ReplaceBookmark('NombreEmpresaPortada', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('DireccionEmpresaPortada', - Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString, - tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString])); - ReplaceBookmark('TelefonoEmpresaPortada', tbl_Empresa.FieldByName('TELEFONO_1').AsString); - ReplaceBookmark('FaxEmpresaPortada', tbl_Empresa.FieldByName('FAX').AsString); - ReplaceBookmark('CorreoEmpresaPortada', tbl_Empresa.FieldByName('EMAIL_1').AsString); - - ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString); - ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString); - ReplaceBookmark('DireccionEmpresa', - Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString, - tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString])); - ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString); - ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString); - ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString); - - ReplaceBookmark('NombreEmpresaFirma', tbl_Empresa.FieldByName('NOMBRE').AsString); - - end; - Result := True; -end; - -function TRptWordPresupuestoCliente.RellenarInforme: boolean; -var - NombreCapitulo : String; - Estilo : OleVariant; -begin - FNumCapitulos := 0; - FContadorCap := 0; - FNumCapOpc := 0; - with FDocumento, tbl_Detalles do - begin - First; - - FieldByName('IMPORTE_UNIDAD').DisplayFormat := DISPLAY_EUROS2; - FieldByName('IMPORTE_TOTAL').DisplayFormat := DISPLAY_EUROS2; - - GoToSection(3); - - { Copiar la tabla de conceptos al portapapeles } - Document.Tables.Item(2).Select; - FWordApp.Application.Selection.Cut; - - while not Eof do - begin - if (FieldByName('TIPO_DETALLE').AsString = 'Subtotal') then - begin - Next; - Continue; - end; - - if (FieldByName('TIPO_DETALLE').AsString = 'Titulo') or - (FieldByName('TIPO_DETALLE').AsString = 'Titulo opcional') then - begin - NombreCapitulo := ''; - Estilo := 'TituloCapitulo'; - FWordApp.Application.Selection.Set_Style(Estilo); - - if (FieldByName('TIPO_DETALLE').AsString = 'Titulo') then - begin - NombreCapitulo := 'Capítulo ' + IntToStr(FContadorCap + 1) + '. ' + FieldByName('CONCEPTO').AsString; - Inc(FContadorCap); - Inc(FNumCapitulos); - end - else begin - NombreCapitulo := 'Capítulo opcional. ' + FieldByName('CONCEPTO').AsString; - Inc(FContadorCap); - Inc(FNumCapOpc); - Inc(FNumCapitulos); - end; - FWordApp.InsertText(NombreCapitulo); - FWordApp.InsertText(#13); - - ListaCapitulos[FNumCapitulos].Tipo := FieldByName('TIPO_DETALLE').AsString; - ListaCapitulos[FNumCapitulos].Nombre := NombreCapitulo; - { Pegar una tabla para rellenarla } - FWordApp.Application.Selection.Paste; - Next; - end - else begin - if FContadorCap = 0 then - begin - Inc(FContadorCap); // Se considera el conjunto de conceptos sueltos como un capítulo. - Inc(FNumCapitulos); - { Pegar una tabla para rellenarla } - FWordApp.Application.Selection.Paste; - InsertarConceptos(Document.Tables.Item(Document.Tables.Count - 2)); - end - else - InsertarConceptos(Document.Tables.Item(Document.Tables.Count - 2)); - end; - end; - end; - Result := True; -end; - -function TRptWordPresupuestoCliente.RellenarPortada: boolean; -var - NombreFichero, - Texto : String; - {FicheroTemporal : string; - LinkToFile, SaveWithDocument, _Range : OleVariant; - Imagen : InlineShape;} -begin - - //PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA - {--------------------------- PENDIENTE - if (EmpresaActiva.Logotipo <> Nil) then - begin - FWordApp.GotoBookmark ('LogotipoEmpresa'); - LinkToFile := False; - SaveWithDocument := True; - _Range := EmptyParam; - FicheroTemporal := DarFicheroTemporal; - EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal); - Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(FicheroTemporal, LinkToFile, SaveWithDocument, _Range); - - //Formateamos imagen - if ((Imagen.Get_Width > ANCHO_LOGO_INF_PRE)) then - begin - Imagen.Set_Height(((ANCHO_LOGO_INF_PRE * Imagen.Get_Height) /Imagen.Get_Width)); - Imagen.Set_Width(ANCHO_LOGO_INF_PRE); - end; - end; - ---------------------------- } - - with FDocumento, tbl_Cabecera do - begin - ReplaceBookmark('CodigoPresupuestoPortada', FieldByName('REFERENCIA').AsString); - ReplaceBookmark('FechaPresupuestoPortada', FieldByName('FECHA_PRESUPUESTO').AsString); - ReplaceBookmark('NombreClientePortada', FieldByName('NOMBRE').AsString); - if not EsCadenaVacia(FieldByName('PERSONA_CONTACTO').AsString) then - ReplaceBookmark('PersonaContactoClientePortada', 'A la atención de: ' + FieldByName('PERSONA_CONTACTO').AsString); - - Texto := FieldByName('PORTADA').AsString; - NombreFichero := DarFicheroTemporal; - EscribirEnFichero(NombreFichero, Texto); - FWordApp.InsertFile(NombreFichero, 'TextoPortada'); - SysUtils.DeleteFile(NombreFichero); - end; - Result := True; -end; - -function TRptWordPresupuestoCliente.RellenarResumen : boolean; -var - numRows, numCols, mergeSplit, shiftCells : OleVariant; - iAux : Integer; - iContador : Integer; - TotalConceptos : Double; - Tabla : Table; - Estilo : OleVariant; -begin - TotalConceptos := 0; - numRows := 2; - numCols := 1; - mergeSplit := False; - shiftCells := False; - iContador := 2; // Empezar en la 2ª fila de celdas. La primera es la - // cabecera de la tabla. - - Estilo := 'TituloCapitulo'; - FWordApp.Application.Selection.Set_Style(Estilo); - FWordApp.InsertText('RESUMEN'); - - Tabla := FDocumento.Document.Tables.Item(FDocumento.Document.Tables.Count-1); - with Tabla do - begin - for iAux := 1 to FNumCapitulos do - begin - if (ListaCapitulos[iAux].Tipo = 'Titulo opcional') then - continue; // No sumamos los capítulos opcionales. - - // Partir la celda actual en en 2 filas de 1 columna. - Rows.Item(iContador).Cells.Split (numRows, numCols, mergesplit); - - if EsCadenaVacia(ListaCapitulos[iAux].Nombre) then - Cell(iContador, 1).Range.Text := 'General' - else - Cell(iContador, 1).Range.Text := ListaCapitulos[iAux].Nombre; - if FImportes then - Cell(iContador, 2).Range.Text := FormatFloat(DISPLAY_EUROS2, ListaCapitulos[iAux].Total) - else - Cell(iContador, 2).Range.Text := ''; - TotalConceptos := TotalConceptos + ListaCapitulos[iAux].Total; - Inc (iContador); - end; - - // Borrar la fila vacía que sobra - Rows.Item(iContador).Cells.Delete(shiftCells); - if FImportes then - begin - //Comprobamos si el presupuesto tiene bonificación - if VarIsNull(FDesBonificacion) then - begin - Cell(iContador, 1).Range.Text := 'Total: ' + FormatFloat(DISPLAY_EUROS2, TotalConceptos); - // Borrar filas de bonificación - inc(iContador); - Rows.Item(iContador).Cells.Delete(shiftCells); - Rows.Item(iContador).Cells.Delete(shiftCells); - Rows.Item(iContador).Cells.Delete(shiftCells); - end - else - begin - //Elimino la ultima fila para enlazar la tabla las tres filas de bonificación - Rows.Item(iContador).Cells.Delete(shiftCells); - with FDocumento do - begin - ReplaceBookmark('DescripcionImpTotal', 'Total'); - ReplaceBookmark('ImporteTotal', FormatFloat(DISPLAY_EUROS2, TotalConceptos)); - ReplaceBookmark('DescripcionBonificacion', FDesBonificacion); - ReplaceBookmark('ImporteBonificacion', FormatFloat(DISPLAY_EUROS2, ((-1)*FImpBonificacion))); - ReplaceBookmark('DescripcionImpFinal', 'Importe final'); - ReplaceBookmark('ImpFinal', FormatFloat(DISPLAY_EUROS2, TotalConceptos - FImpBonificacion)); - end; - end; - end - else - begin - Cell(iContador, 1).Range.Text := ''; - // Borrar filas de bonificación - inc(iContador); - Rows.Item(iContador).Cells.Delete(shiftCells); - Rows.Item(iContador).Cells.Delete(shiftCells); - Rows.Item(iContador).Cells.Delete(shiftCells); - end; - - AutoFitBehavior(wdAutoFitWindow); - end; - Result := True; -end; - -procedure TRptWordPresupuestoCliente._GenerarPresupuesto(const AID: String); -var - ACopiaPlantilla: string; -begin - FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - try - tbl_Cabecera.ParamByName('ID').AsString := AID; - tbl_Detalles.ParamByName('ID_PRESUPUESTO').AsString := AID; - - tbl_Cabecera.Active := True; - tbl_Detalles.Active := True; - - FPlantilla := DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme; - - FCodigoPresupuesto := AID; - - 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); - end; - end; - finally - FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO" - end; -end; - -end. - diff --git a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.pas b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.pas index 052162e..b4fa693 100644 --- a/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.pas +++ b/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.pas @@ -34,9 +34,7 @@ type protected { IsrvPresupuestosCliente methods } function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Integer): Binary; - function GenerarInformeEnWord(const ID: Integer; const VerSello: Integer): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Integer): Binary; - function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary; end; implementation @@ -47,8 +45,7 @@ uses {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, schPresupuestosClienteClient_Intf, uRestriccionesUsuarioUtils, uRptPresupuestosCliente_Server, - uBizPresupuestosClienteServer, uRptWordPresupuestoCliente, - uRptWordCertificadoTrabajo_Server; + uBizPresupuestosClienteServer; procedure Create_srvPresupuestosCliente(out anInstance : IUnknown); begin @@ -81,26 +78,6 @@ begin ConnectionName := dmServer.ConnectionName; end; -function TsrvPresupuestosCliente.GenerarCertificadoTrabajosEnWord( - const ID: Integer): Binary; -var - AReportGenerator : TRptWordCertificadoTrabajo; - AFicheroTMP : TFileName; -begin - Result := NIL; - AFicheroTMP := DarFicheroTemporal; - AReportGenerator := TRptWordCertificadoTrabajo.Create(nil); - try - if AReportGenerator.Exportar(ID, AFicheroTMP) then - begin - Result := Binary.Create; - Result.LoadFromFile(AFicheroTMP); - end; - finally - FreeAndNIL(AReportGenerator); - end; -end; - function TsrvPresupuestosCliente.GenerarInforme(const ListaID: TIntegerArray; const VerSello: Integer): Binary; var AReportGenerator : TRptPresupuestosCliente; @@ -125,30 +102,6 @@ begin end; end; -function TsrvPresupuestosCliente.GenerarInformeEnWord(const ID: Integer; const VerSello: Integer): Binary; -var - AReportGenerator : TRptWordPresupuestoCliente; - AFicheroTMP : TFileName; -begin - Result := NIL; - AFicheroTMP := DarFicheroTemporal; - AReportGenerator := TRptWordPresupuestoCliente.Create(nil); - try - try - if AReportGenerator.Exportar(IntToStr(ID), AFicheroTMP, VerSello) then - begin - Result := Binary.Create; - Result.LoadFromFile(AFicheroTMP); - end; - except - on E: Exception do - RaiseError(E.Message); - end; - finally - FreeAndNIL(AReportGenerator); - end; -end; - initialization TROClassFactory.Create('srvPresupuestosCliente', Create_srvPresupuestosCliente, TsrvPresupuestosCliente_Invoker); diff --git a/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc b/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc index cf2dc4b..4c7b731 100644 --- a/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc +++ b/Source/Modulos/Tienda web/Data/TiendaWeb_data.drc @@ -14,4 +14,4 @@ END /* C:\Codigo\Source\Modulos\Tienda web\Data\uDataModuleTiendaWeb.dfm */ /* C:\Codigo\Source\Modulos\Tienda web\Data\TiendaWeb_data.res */ -/* c:\temp\dtf355.tmp */ +/* c:\temp\dtfD2.tmp */ diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL index 63019bf..585ea87 100644 --- a/Source/Servicios/FactuGES.RODL +++ b/Source/Servicios/FactuGES.RODL @@ -292,16 +292,6 @@ - - - - - - - - - - @@ -366,24 +356,6 @@ - - - - - - - - - - - - - - - - - - @@ -414,18 +386,6 @@ - - - - - - - - - - - - @@ -472,14 +432,6 @@ - - - - - - - - @@ -522,18 +474,6 @@ - - - - - - - - - - - - diff --git a/Source/Servicios/FactuGES_Intf.pas b/Source/Servicios/FactuGES_Intf.pas index da4c752..650c47c 100644 --- a/Source/Servicios/FactuGES_Intf.pas +++ b/Source/Servicios/FactuGES_Intf.pas @@ -527,7 +527,6 @@ type IsrvFacturasCliente = interface(IDataAbstractService) ['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}'] function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Boolean; const VerCopia: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary; function DarListaAnos: StringArray; end; @@ -543,7 +542,6 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Boolean; const VerCopia: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary; function DarListaAnos: StringArray; end; @@ -575,8 +573,6 @@ type IsrvPresupuestosCliente = interface(IDataAbstractService) ['{8A06D5A7-8461-4F6E-8A8B-EC49C84C45D1}'] function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Integer): Binary; - function GenerarInformeEnWord(const ID: Integer; const VerSello: Integer): Binary; - function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Integer): Binary; end; @@ -591,8 +587,6 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray; const VerSello: Integer): Binary; - function GenerarInformeEnWord(const ID: Integer; const VerSello: Integer): Binary; - function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Integer): Binary; end; @@ -600,7 +594,6 @@ type IsrvPedidosProveedor = interface(IDataAbstractService) ['{3DCC03E4-E9CE-4798-99D4-7170C9CF815B}'] function GenerarInforme(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; end; @@ -615,7 +608,6 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; end; @@ -625,7 +617,6 @@ type function GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; function DarListaAnos: StringArray; @@ -644,7 +635,6 @@ type function GenerarInforme(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; function GenerarInformeEtiquetas(const ID: Integer; const withRefCliente: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; function DarListaAnos: StringArray; @@ -654,7 +644,6 @@ type IsrvAlbaranesProveedor = interface(IDataAbstractService) ['{66B71884-5CE4-4574-B825-60CDA956B628}'] function GenerarInforme(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; end; @@ -669,7 +658,6 @@ type function __GetInterfaceName:string; override; function GenerarInforme(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; - function GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; end; @@ -1991,24 +1979,6 @@ begin end end; -function TsrvFacturasCliente_Proxy.GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Write('VerSello', TypeInfo(Boolean), VerSello, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary; begin try @@ -2139,41 +2109,6 @@ begin end end; -function TsrvPresupuestosCliente_Proxy.GenerarInformeEnWord(const ID: Integer; const VerSello: Integer): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Write('VerSello', TypeInfo(Integer), VerSello, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - -function TsrvPresupuestosCliente_Proxy.GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarCertificadoTrabajosEnWord'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - function TsrvPresupuestosCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Integer): Binary; begin try @@ -2225,25 +2160,6 @@ begin end end; -function TsrvPedidosProveedor_Proxy.GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Write('ImprimirPrecio', TypeInfo(Boolean), ImprimirPrecio, []); - __Message.Write('ImprimirRefProveedor', TypeInfo(Boolean), ImprimirRefProveedor, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - function TsrvPedidosProveedor_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; begin try @@ -2317,23 +2233,6 @@ begin end end; -function TsrvAlbaranesCliente_Proxy.GenerarInformeEnWord(const ID: Integer): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - function TsrvAlbaranesCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; begin @@ -2405,25 +2304,6 @@ begin end end; -function TsrvAlbaranesProveedor_Proxy.GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; -begin - try - result := nil; - __Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord'); - __Message.Write('ID', TypeInfo(Integer), ID, []); - __Message.Write('ImprimirPrecio', TypeInfo(Boolean), ImprimirPrecio, []); - __Message.Write('ImprimirRefProveedor', TypeInfo(Boolean), ImprimirRefProveedor, []); - __Message.Finalize; - - __TransportChannel.Dispatch(__Message); - - __Message.Read('Result', TypeInfo(Binary), result, []); - finally - __Message.UnsetAttributes(__TransportChannel); - __Message.FreeStream; - end -end; - function TsrvAlbaranesProveedor_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; begin try diff --git a/Source/Servicios/FactuGES_Invk.pas b/Source/Servicios/FactuGES_Invk.pas index 01d7b7c..1a091dd 100644 --- a/Source/Servicios/FactuGES_Invk.pas +++ b/Source/Servicios/FactuGES_Invk.pas @@ -173,7 +173,6 @@ type constructor Create; override; published procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_DarListaAnos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; @@ -196,8 +195,6 @@ type constructor Create; override; published procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarCertificadoTrabajosEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; @@ -208,7 +205,6 @@ type constructor Create; override; published procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; @@ -220,7 +216,6 @@ type published procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GenerarInformeEtiquetas(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_DarListaAnos(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; @@ -232,7 +227,6 @@ type constructor Create; override; published procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); - procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); end; @@ -1032,36 +1026,6 @@ begin end; end; -procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary; } -var - ID: Integer; - VerSello: Boolean; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - __Message.Read('VerSello', TypeInfo(Boolean), VerSello, []); - - lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnWord(ID, VerSello); - - __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnWordResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); { function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary; } var @@ -1252,64 +1216,6 @@ begin end; end; -procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnWord(const ID: Integer; const VerSello: Integer): Binary; } -var - ID: Integer; - VerSello: Integer; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - __Message.Read('VerSello', TypeInfo(Integer), VerSello, []); - - lResult := (__Instance as IsrvPresupuestosCliente).GenerarInformeEnWord(ID, VerSello); - - __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarInformeEnWordResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - -procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarCertificadoTrabajosEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarCertificadoTrabajosEnWord(const ID: Integer): Binary; } -var - ID: Integer; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - - lResult := (__Instance as IsrvPresupuestosCliente).GenerarCertificadoTrabajosEnWord(ID); - - __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPresupuestosCliente', 'GenerarCertificadoTrabajosEnWordResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - procedure TsrvPresupuestosCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); { function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Integer): Binary; } var @@ -1384,38 +1290,6 @@ begin end; end; -procedure TsrvPedidosProveedor_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; } -var - ID: Integer; - ImprimirPrecio: Boolean; - ImprimirRefProveedor: Boolean; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - __Message.Read('ImprimirPrecio', TypeInfo(Boolean), ImprimirPrecio, []); - __Message.Read('ImprimirRefProveedor', TypeInfo(Boolean), ImprimirRefProveedor, []); - - lResult := (__Instance as IsrvPedidosProveedor).GenerarInformeEnWord(ID, ImprimirPrecio, ImprimirRefProveedor); - - __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvPedidosProveedor', 'GenerarInformeEnWordResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - procedure TsrvPedidosProveedor_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); { function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; } var @@ -1527,34 +1401,6 @@ begin end; end; -procedure TsrvAlbaranesCliente_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnWord(const ID: Integer): Binary; } -var - ID: Integer; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - - lResult := (__Instance as IsrvAlbaranesCliente).GenerarInformeEnWord(ID); - - __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvAlbaranesCliente', 'GenerarInformeEnWordResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - procedure TsrvAlbaranesCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); { function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerPrecios: Boolean; const VerRefProveedor: Boolean; const VerObservaciones: Boolean; const VerIncidencias: Boolean): Binary; } @@ -1661,38 +1507,6 @@ begin end; end; -procedure TsrvAlbaranesProveedor_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); -{ function GenerarInformeEnWord(const ID: Integer; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; } -var - ID: Integer; - ImprimirPrecio: Boolean; - ImprimirRefProveedor: Boolean; - lResult: Binary; - __lObjectDisposer: TROObjectDisposer; -begin - lResult := nil; - try - __Message.Read('ID', TypeInfo(Integer), ID, []); - __Message.Read('ImprimirPrecio', TypeInfo(Boolean), ImprimirPrecio, []); - __Message.Read('ImprimirRefProveedor', TypeInfo(Boolean), ImprimirRefProveedor, []); - - lResult := (__Instance as IsrvAlbaranesProveedor).GenerarInformeEnWord(ID, ImprimirPrecio, ImprimirRefProveedor); - - __Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvAlbaranesProveedor', 'GenerarInformeEnWordResponse'); - __Message.Write('Result', TypeInfo(Binary), lResult, []); - __Message.Finalize; - __Message.UnsetAttributes(__Transport); - - finally - __lObjectDisposer := TROObjectDisposer.Create(__Instance); - try - __lObjectDisposer.Add(lResult); - finally - __lObjectDisposer.Free(); - end; - end; -end; - procedure TsrvAlbaranesProveedor_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions); { function GenerarInformeEnPDF(const ListaID: TIntegerArray; const ImprimirPrecio: Boolean; const ImprimirRefProveedor: Boolean): Binary; } var diff --git a/Source/Servicios/RODLFile.res b/Source/Servicios/RODLFile.res index 89d70ec1c97572604d369a095111fe17a57dec61..40218f1a9a40fa17dc4a5adf57e0bf039d80c3f6 100644 GIT binary patch delta 56 zcmeyjhxybR<_QW+zpidn`tG_p-+cHg~D`~KI*$)A_WUU{PW^;G$$rOi%uP$_TJ(&frElgMKv z4F;V8sin`CL|`&axZx%?6k65Y(94=(hfKJruMQUcO@WO?04>a|A)!GON&fX8y^1a8YkhjmO1~2_;gnainuEXCV<00SPXICWD*>EG~wXt=q8H zD1`p=`{1*2Ix`mMy~W&s1M@nEcUO1>%vB38EJwytQ@c*L1kg+)zdAm9BmP6^DkH diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index f306db12de3bf262351359d18f2317325b7eb2e6..126ba916633e3a8b5d91e3c32566b09ae84d8c85 100644 GIT binary patch delta 247 zcmX@IopH`q#tkJASq1`JJPdHa$iT)RAi%)D$RNRx!3v_`JQfB9CI$rsh};Se1_ovX z52%BM!N342$H&0Hir}d-0L^4zSim^>UW6PIkop(lA;JPQ84WN_j*3)by2CKJE>djr zlSqTfccM(}6BrbLDxDef8FCp47%~}h7*ZKr7!nyufHVl?FqAUn0olb2IzW|13ENQ@AaC^pI=YCn z;NVxd`wfD4US67#3%Qqj?>Xn5mzOu=^WAt&-CNUKTtX2B7GRoyfjWYks=BifQ~?3Y z(z|ILsN|i6DH&DRcD`E%YI(=q2B-;q3Hj}=3zk3ka77`@(G;@hHG~lI(Oc~{xHqte z2q9wl7~ugYtRb!o+E#|?V2FE8_xX*{N5Vcv${dlEg?#qfPg?Pavy{k$)hDm4*~}D= zxgTU(bwB21r8z)ArVf31jyos9#}#=YYl1sEnT5ulc5;znet2eE*_b~{n>-^nqTGbf zNy`@HhqqH1VN?EkYu%8xeu(W8t$x86+py3=n^~E$aKn5_gnDpPOdZ%css#tT>>NN| H^bY<3$D&UN diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr index f4d1305..4c9e1dc 100644 --- a/Source/Servidor/FactuGES_Server.dpr +++ b/Source/Servidor/FactuGES_Server.dpr @@ -71,21 +71,17 @@ uses uStringsUtils in '..\Base\Utiles\uStringsUtils.pas', FactuGES_Intf in '..\Servicios\FactuGES_Intf.pas', FactuGES_Invk in '..\Servicios\FactuGES_Invk.pas', - uRptWordCertificadoTrabajo_Server in '..\Modulos\Presupuestos de cliente\Reports\uRptWordCertificadoTrabajo_Server.pas' {RptWordCertificadoTrabajo: TDataModule}, AHWord97 in 'Utiles\AHWord97.pas', uSistemaFunc in '..\Base\Utiles\uSistemaFunc.pas', - uRptWordAlbaranCliente in '..\Modulos\Albaranes de cliente\Reports\uRptWordAlbaranCliente.pas' {RptWordAlbaranCliente: TDataModule}, srvReferencias_Impl in '..\Modulos\Referencias\Servidor\srvReferencias_Impl.pas' {srvReferencias: TDataAbstractService}, schReferenciasServer_Intf in '..\Modulos\Referencias\Model\schReferenciasServer_Intf.pas', schReferenciasClient_Intf in '..\Modulos\Referencias\Model\schReferenciasClient_Intf.pas', uRptFichasEmpleado_Server in '..\Modulos\Contactos\Reports\uRptFichasEmpleado_Server.pas' {RptFichasEmpleado: TDataModule}, uRptEtiquetasContacto_Server in '..\Modulos\Contactos\Reports\uRptEtiquetasContacto_Server.pas' {RptEtiquetasContacto: TDataModule}, - uRptWordFacturaCliente in '..\Modulos\Facturas de cliente\Reports\uRptWordFacturaCliente.pas' {RptWordFacturaCliente: TDataModule}, srvFabricantes_Impl in '..\Modulos\Fabricantes\Servidor\srvFabricantes_Impl.pas' {srvFabricantes: TDataAbstractService}, schFabricantesClient_Intf in '..\Modulos\Fabricantes\Model\schFabricantesClient_Intf.pas', schFabricantesServer_Intf in '..\Modulos\Fabricantes\Model\schFabricantesServer_Intf.pas', uRptPedidosProveedor_Server in '..\Modulos\Pedidos a proveedor\Reports\uRptPedidosProveedor_Server.pas' {RptPedidosProveedor: TDataModule}, - uRptWordPedidoProveedor in '..\Modulos\Pedidos a proveedor\Reports\uRptWordPedidoProveedor.pas' {RptWordPedidoProveedor: TDataModule}, srvObras_Impl in '..\Modulos\Obras\Servidor\srvObras_Impl.pas' {srvObras: TDataAbstractService}, uBizObrasServer in '..\Modulos\Obras\Model\uBizObrasServer.pas', uRptRecibosCliente_Server in '..\Modulos\Recibos de cliente\Reports\uRptRecibosCliente_Server.pas' {RptRecibosCliente: TDataModule}, @@ -95,7 +91,6 @@ uses schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas', schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas', uRptPresupuestosCliente_Server in '..\Modulos\Presupuestos de cliente\Reports\uRptPresupuestosCliente_Server.pas' {RptPresupuestosCliente: TDataModule}, - uRptWordPresupuestoCliente in '..\Modulos\Presupuestos de cliente\Reports\uRptWordPresupuestoCliente.pas' {RptWordPresupuestoCliente: TDataModule}, srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService}, schHistoricoMovimientosClient_Intf in '..\Modulos\Historico de movimientos\Model\schHistoricoMovimientosClient_Intf.pas', schHistoricoMovimientosServer_Intf in '..\Modulos\Historico de movimientos\Model\schHistoricoMovimientosServer_Intf.pas', @@ -109,7 +104,6 @@ uses schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas', uRptAlbaranesProveedor_Server in '..\Modulos\Albaranes de proveedor\Reports\uRptAlbaranesProveedor_Server.pas' {RptAlbaranesProveedor: TDataModule}, - uRptWordAlbaranProveedor in '..\Modulos\Albaranes de proveedor\Reports\uRptWordAlbaranProveedor.pas' {RptWordAlbaranProveedor: TDataModule}, MidasSpeedFix in 'Utiles\MidasSpeedFix.pas', schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas', schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas', diff --git a/Source/Servidor/FactuGES_Server.dproj b/Source/Servidor/FactuGES_Server.dproj index 87e85ca..b2cf1e6 100644 --- a/Source/Servidor/FactuGES_Server.dproj +++ b/Source/Servidor/FactuGES_Server.dproj @@ -1,407 +1,405 @@ - + - - {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} - FactuGES_Server.dpr - Debug - AnyCPU - DCC32 - ..\..\Output\Debug\Servidor\FactuGES_Server.exe - vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;VclSmp;vclie;webdsnap;xmlrtl;inet;inetdbbde;inetdbxpress;RemObjects_BPDX_D11;RemObjects_RODX_D11;RemObjects_Indy_D11;RemObjects_Synapse_D11;RemObjects_WebBroker_D11;DataAbstract_Core_D11;DataAbstract_DBXDriver_D11;DataAbstract_IDE_D11;DataAbstract_Scripting_D11;DataAbstract_SDACDriver_D11;sdac105;dac105;DataAbstract_SQLiteDriver_D11;cxEditorsD10;cxLibraryD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxGridD10;cxPageControlD10;cxSchedulerD10;cxTreeListD10;cxVerticalGridD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxLayoutControlD10;dxNavBarD10;dxPSCoreD10;dxsbD10;dxPScxCommonD10;dxPSLnksD10;vclshlctrls;dxPScxExtCommonD10;dxPScxGridLnkD10;dxPScxPCProdD10;dxPScxScheduler2LnkD10;dxPScxTLLnkD10;dxPSdxLCLnkD10;dxPsPrVwAdvD10;pckMD5;pckUCDataConnector;pckUserControl_RT;PluginSDK_D10R;PNG_D10;PngComponentsD10;tb2k_d10;tbx_d10;JclVcl;Jcl;JvXPCtrlsD11R;JvCoreD11R;JvSystemD11R;JvStdCtrlsD11R;JvAppFrmD11R;JvBandsD11R;JvDBD11R;JvDlgsD11R;JvBDED11R;JvCmpD11R;JvCryptD11R;JvCtrlsD11R;JvCustomD11R;JvDockingD11R;JvDotNetCtrlsD11R;JvEDID11R;JvGlobusD11R;JvHMID11R;JvInterpreterD11R;JvJansD11R;JvManagedThreadsD11R;JvMMD11R;JvNetD11R;JvPageCompsD11R;JvPluginD11R;JvPrintPreviewD11R;JvRuntimeDesignD11R;JvTimeFrameworkD11R;JvUIBD11R;JvValidatorsD11R;JvWizardD11R;pckUCADOConn;pckUCBDEConn;pckUCIBXConn;pckUCMidasConn;cxIntlPrintSys3D10;cxExportD10;cxIntl5D10;GUISDK_D11R;ccpackD11;JSDialog100;fsTee11;fs11;frx11;frxADO11;frxBDE11;frxDB11;frxDBX11;frxe11;frxIBX11;frxTee11;fsADO11;fsBDE11;fsDB11;fsIBX11;websnap;soaprtl;IntrawebDB_90_100;Intraweb_90_100 - - - 7.0 - False - False - 0 - 3 - ..\..\Output\Release\Servidor - RELEASE - - - 7.0 - 3 - ..\..\Output\Debug\Servidor - DEBUG; - True - True - True - C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 - - - Delphi.Personality - - - FalseTrueFalse/standaloneTrueFalse4290FalseFalseFalseFalseFalse308212524.2.9.04.2.9.0miércoles, 13 de febrero de 2013 12:02 - ExpressPrinting System by Developer Express Inc. - FactuGES_Server.dprFalse - - - - - MainSource - - - - - -
srvEmpresas
- TDARemoteService -
- -
srvProvinciasPoblaciones_Impl
- TDataModule -
- - - -
srvUsuarios
- TDataAbstractService -
- - - - - - - -
RptAlbaranesCliente
- TDataModule -
- -
RptWordAlbaranCliente
- TDataModule -
- -
srvAlbaranesCliente
- TDataAbstractService -
- - - - -
RptAlbaranesProveedor
- TDataModule -
- -
RptWordAlbaranProveedor
- TDataModule -
- -
srvAlbaranesProveedor
- TDataAbstractService -
- - - -
srvAlmacenes
- TDARemoteService -
- - - - -
srvArticulos
- TDARemoteService -
- - - - -
RptComisiones
- TDataModule -
- -
srvComisiones
- TDataAbstractService -
- - - - - - - - -
RptEtiquetasContacto
- TDataModule -
- -
RptFichasEmpleado
- TDataModule -
- -
srvContactos
- TDARemoteService -
- - - -
srvFabricantes
- TDataAbstractService -
- - - - -
RptFacturasCliente
- TDataModule -
- -
RptWordFacturaCliente
- TDataModule -
- -
srvFacturasCliente
- TDataAbstractService -
- - - - -
RptFacturasProveedor
- TDataModule -
- -
srvFacturasProveedor
- TDataAbstractService -
- - - -
srvFamilias
- TDataAbstractService -
- - - -
srvFormasPago
- TDataAbstractService -
- -
srvGestorDocumentos
- TDataAbstractService -
- -
srvGestorInformes
- TDataAbstractService -
- - - -
srvHistoricoMovimientos
- TDataAbstractService -
- - - -
srvImpresiones
- TDARemoteService -
- -
srvInfMargenArticulo
- TDARemoteService -
- - - -
srvInfVentasArticulo
- TDataAbstractService -
- - - -
srvInformes
- TDataAbstractService -
- - - -
srvInventario
- TDataAbstractService -
- - - - -
srvObras
- TDataAbstractService -
- - - - -
RptPedidosProveedor
- TDataModule -
- -
RptWordPedidoProveedor
- TDataModule -
- -
srvPedidosProveedor
- TDataAbstractService -
- - - - -
RptPedidosCliente
- TDataModule -
- -
srvPedidosCliente
- TDataAbstractService -
- - - - -
RptPresupuestosCliente
- TDataModule -
- -
RptWordCertificadoTrabajo
- TDataModule -
- -
RptWordPresupuestoCliente
- TDataModule -
- -
srvPresupuestosCliente
- TDataAbstractService -
- - - -
RptRecibosCliente
- TDataModule -
- -
srvRecibosCliente
- TDataAbstractService -
- - - -
RptRecibosProveedor
- TDataModule -
- -
srvRecibosProveedor
- TDataAbstractService -
- - - -
srvReferencias
- TDataAbstractService -
- -
srvRegistroCorreos
- TDataAbstractService -
- - - - -
RptRemesasCliente
- TDataModule -
- -
srvRemesasCliente
- TDataAbstractService -
- - - - -
RptRemesasProveedor
- TDataModule -
- -
srvRemesasProveedor
- TDataAbstractService -
- - - - - - - - - -
srvTiendaWeb
- TDataAbstractService -
- - - -
srvTiposIVA
- TDataAbstractService -
- - - -
srvUnidadesMedida
- TDataAbstractService -
- - - -
srvConfiguracion
- TDataAbstractService -
- -
frConexionBD
- TFrame -
- -
frConexionOSC
- TFrame -
- -
frConfGeneral
- TFrame -
- -
fConfiguracion
- TForm -
- -
FrameConfiguracion
- TFrame -
- -
srvLogin
- TDARemoteService -
- -
fAcercaDe
-
- -
dmServer
- TDataModule -
- -
fServerForm
-
- - - - - - - - - - -
+ + {ebdcd25d-40d7-4146-91ec-a0ea4aa1dcd1} + FactuGES_Server.dpr + Debug + AnyCPU + DCC32 + ..\..\Output\Debug\Servidor\FactuGES_Server.exe + vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;VclSmp;vclie;webdsnap;xmlrtl;inet;inetdbbde;inetdbxpress;RemObjects_BPDX_D11;RemObjects_RODX_D11;RemObjects_Indy_D11;RemObjects_Synapse_D11;RemObjects_WebBroker_D11;DataAbstract_Core_D11;DataAbstract_DBXDriver_D11;DataAbstract_IDE_D11;DataAbstract_Scripting_D11;DataAbstract_SDACDriver_D11;sdac105;dac105;DataAbstract_SQLiteDriver_D11;cxEditorsD10;cxLibraryD10;dxThemeD10;cxDataD10;cxExtEditorsD10;cxGridD10;cxPageControlD10;cxSchedulerD10;cxTreeListD10;cxVerticalGridD10;dxBarD10;dxComnD10;dxBarDBNavD10;dxBarExtDBItemsD10;dxBarExtItemsD10;dxDockingD10;dxLayoutControlD10;dxNavBarD10;dxPSCoreD10;dxsbD10;dxPScxCommonD10;dxPSLnksD10;vclshlctrls;dxPScxExtCommonD10;dxPScxGridLnkD10;dxPScxPCProdD10;dxPScxScheduler2LnkD10;dxPScxTLLnkD10;dxPSdxLCLnkD10;dxPsPrVwAdvD10;pckMD5;pckUCDataConnector;pckUserControl_RT;PluginSDK_D10R;PNG_D10;PngComponentsD10;tb2k_d10;tbx_d10;JclVcl;Jcl;JvXPCtrlsD11R;JvCoreD11R;JvSystemD11R;JvStdCtrlsD11R;JvAppFrmD11R;JvBandsD11R;JvDBD11R;JvDlgsD11R;JvBDED11R;JvCmpD11R;JvCryptD11R;JvCtrlsD11R;JvCustomD11R;JvDockingD11R;JvDotNetCtrlsD11R;JvEDID11R;JvGlobusD11R;JvHMID11R;JvInterpreterD11R;JvJansD11R;JvManagedThreadsD11R;JvMMD11R;JvNetD11R;JvPageCompsD11R;JvPluginD11R;JvPrintPreviewD11R;JvRuntimeDesignD11R;JvTimeFrameworkD11R;JvUIBD11R;JvValidatorsD11R;JvWizardD11R;pckUCADOConn;pckUCBDEConn;pckUCIBXConn;pckUCMidasConn;cxIntlPrintSys3D10;cxExportD10;cxIntl5D10;GUISDK_D11R;ccpackD11;JSDialog100;fsTee11;fs11;frx11;frxADO11;frxBDE11;frxDB11;frxDBX11;frxe11;frxIBX11;frxTee11;fsADO11;fsBDE11;fsDB11;fsIBX11;websnap;soaprtl;IntrawebDB_90_100;Intraweb_90_100 + + + 7.0 + False + False + 0 + 3 + ..\..\Output\Release\Servidor + RELEASE + + + 7.0 + 3 + ..\..\Output\Debug\Servidor + DEBUG; + True + True + True + C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + C:\jcl\lib\d11\debug;C:\JCL\lib\d11\debug;$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10 + + + Delphi.Personality + + +FalseTrueFalse/standaloneTrueFalse4290FalseFalseFalseFalseFalse308212524.2.9.04.2.9.0miércoles, 13 de febrero de 2013 12:02 + + + + + + + + + + + + + + + + + + + + + + + ExpressPrinting System by Developer Express Inc. + FactuGES_Server.dprFalse + + + + + MainSource + + + + + +
srvEmpresas
+ TDARemoteService +
+ +
srvProvinciasPoblaciones_Impl
+ TDataModule +
+ + + +
srvUsuarios
+ TDataAbstractService +
+ + + + + + + +
RptAlbaranesCliente
+ TDataModule +
+ +
srvAlbaranesCliente
+ TDataAbstractService +
+ + + + +
RptAlbaranesProveedor
+ TDataModule +
+ +
srvAlbaranesProveedor
+ TDataAbstractService +
+ + + +
srvAlmacenes
+ TDARemoteService +
+ + + + +
srvArticulos
+ TDARemoteService +
+ + + + +
RptComisiones
+ TDataModule +
+ +
srvComisiones
+ TDataAbstractService +
+ + + + + + + + +
RptEtiquetasContacto
+ TDataModule +
+ +
RptFichasEmpleado
+ TDataModule +
+ +
srvContactos
+ TDARemoteService +
+ + + +
srvFabricantes
+ TDataAbstractService +
+ + + + +
RptFacturasCliente
+ TDataModule +
+ +
srvFacturasCliente
+ TDataAbstractService +
+ + + + +
RptFacturasProveedor
+ TDataModule +
+ +
srvFacturasProveedor
+ TDataAbstractService +
+ + + +
srvFamilias
+ TDataAbstractService +
+ + + +
srvFormasPago
+ TDataAbstractService +
+ +
srvGestorDocumentos
+ TDataAbstractService +
+ +
srvGestorInformes
+ TDataAbstractService +
+ + + +
srvHistoricoMovimientos
+ TDataAbstractService +
+ + + +
srvImpresiones
+ TDARemoteService +
+ +
srvInfMargenArticulo
+ TDARemoteService +
+ + + +
srvInfVentasArticulo
+ TDataAbstractService +
+ + + +
srvInformes
+ TDataAbstractService +
+ + + +
srvInventario
+ TDataAbstractService +
+ + + + +
srvObras
+ TDataAbstractService +
+ + + + +
RptPedidosProveedor
+ TDataModule +
+ +
srvPedidosProveedor
+ TDataAbstractService +
+ + + + +
RptPedidosCliente
+ TDataModule +
+ +
srvPedidosCliente
+ TDataAbstractService +
+ + + + +
RptPresupuestosCliente
+ TDataModule +
+ +
srvPresupuestosCliente
+ TDataAbstractService +
+ + + +
RptRecibosCliente
+ TDataModule +
+ +
srvRecibosCliente
+ TDataAbstractService +
+ + + +
RptRecibosProveedor
+ TDataModule +
+ +
srvRecibosProveedor
+ TDataAbstractService +
+ + + +
srvReferencias
+ TDataAbstractService +
+ +
srvRegistroCorreos
+ TDataAbstractService +
+ + + + +
RptRemesasCliente
+ TDataModule +
+ +
srvRemesasCliente
+ TDataAbstractService +
+ + + + +
RptRemesasProveedor
+ TDataModule +
+ +
srvRemesasProveedor
+ TDataAbstractService +
+ + + + + + + + + +
srvTiendaWeb
+ TDataAbstractService +
+ + + +
srvTiposIVA
+ TDataAbstractService +
+ + + +
srvUnidadesMedida
+ TDataAbstractService +
+ + + +
srvConfiguracion
+ TDataAbstractService +
+ +
frConexionBD
+ TFrame +
+ +
frConexionOSC
+ TFrame +
+ +
frConfGeneral
+ TFrame +
+ +
fConfiguracion
+ TForm +
+ +
FrameConfiguracion
+ TFrame +
+ +
srvLogin
+ TDARemoteService +
+ +
fAcercaDe
+
+ +
dmServer
+ TDataModule +
+ +
fServerForm
+
+ + + + + + + + + + +