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'#10'from' +
              ' v_facturas_cliente'#10'   left outer join formas_pago on (formas_pa' +
              'go.id = v_facturas_cliente.id_forma_pago)'#10'WHERE V_FACTURAS_CLIEN' +
              'TE.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>
          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>
        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 = 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_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>
    Params = <
      item
        Name = 'ID'
        Value = '2'
        ParamType = daptInput
      end>
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    LocalSchema = schReport
    LocalDataStreamer = DABin2DataStreamer
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    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 = 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_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
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    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
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    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
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    LogicalName = 'Informe_Vencimientos'
    IndexDefs = <>
    Left = 352
    Top = 16
  end
end
