object srvFacturasCliente: TsrvFacturasCliente
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  RequiresSession = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schFacturasCliente
  ServiceAdapter = DABINAdapter
  OnBeforeAcquireConnection = DARemoteServiceBeforeAcquireConnection
  OnBeforeGetDatasetData = DARemoteServiceBeforeGetDatasetData
  Height = 180
  Width = 386
  object schFacturasCliente: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DataDictionary
    Diagrams = Diagrams
    Datasets = <
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 50
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'EMPRESA'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'REFERENCIAS'
            SQL = 
              'SELECT VALOR'#10'FROM REFERENCIAS'#10'WHERE CODIGO = :CODIGO'#10'AND ID_EMPR' +
              'ESA = :EMPRESA'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'VALOR'
                TableField = 'VALOR'
              end>
          end>
        Name = 'DarReferencia'
        Fields = <
          item
            Name = 'VALOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_FACTURAS_CLIENTE'
            SQL = 
              'SELECT '#10'    ID, ID_EMPRESA, REFERENCIA, TIPO, FECHA_FACTURA, SIT' +
              'UACION, BASE_IMPONIBLE,'#10'    DESCUENTO, IMPORTE_DESCUENTO, IVA, I' +
              'MPORTE_IVA, RE, IMPORTE_RE,'#10'    IMPORTE_TOTAL, OBSERVACIONES, ID' +
              '_CLIENTE, NIF_CIF, NOMBRE, CALLE,'#10'    POBLACION, PROVINCIA, CODI' +
              'GO_POSTAL, FECHA_ALTA, FECHA_MODIFICACION,'#10'    USUARIO, ID_FORMA' +
              '_PAGO, RECARGO_EQUIVALENCIA, ID_TIPO_IVA,'#10'    IMPORTE_NETO, IMPO' +
              'RTE_PORTE, ID_COMISION_LIQUIDADA, REFERENCIA_COMISION,'#10'    ID_AG' +
              'ENTE'#10'  FROM'#10'    V_FACTURAS_CLIENTE'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'FECHA_FACTURA'
                TableField = 'FECHA_FACTURA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'BASE_IMPONIBLE'
                TableField = 'BASE_IMPONIBLE'
              end
              item
                DatasetField = 'IMPORTE_DESCUENTO'
                TableField = 'IMPORTE_DESCUENTO'
              end
              item
                DatasetField = 'IMPORTE_IVA'
                TableField = 'IMPORTE_IVA'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'NIF_CIF'
                TableField = 'NIF_CIF'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'RE'
                TableField = 'RE'
              end
              item
                DatasetField = 'IMPORTE_RE'
                TableField = 'IMPORTE_RE'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'IMPORTE_NETO'
                TableField = 'IMPORTE_NETO'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end
              item
                DatasetField = 'ID_TIPO_IVA'
                TableField = 'ID_TIPO_IVA'
              end
              item
                DatasetField = 'RECARGO_EQUIVALENCIA'
                TableField = 'RECARGO_EQUIVALENCIA'
              end
              item
                DatasetField = 'ID_COMISION_LIQUIDADA'
                TableField = 'ID_COMISION_LIQUIDADA'
              end
              item
                DatasetField = 'REFERENCIA_COMISION'
                TableField = 'REFERENCIA_COMISION'
              end
              item
                DatasetField = 'ID_AGENTE'
                TableField = 'ID_AGENTE'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end>
          end>
        Name = 'FacturasCliente'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_TIPO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_BASE_IMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RE'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_RE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_RE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_RE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIF_CIF'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_NIF_CIF'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_CODIGO_POSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_FORMA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RECARGO_EQUIVALENCIA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_RECARGO_EQUIVALENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_TIPO_IVA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_TIPO_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_NETO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_COMISION_LIQUIDADA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_COMISION_LIQUIDADA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_COMISION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_REFERENCIA_COMISION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_AGENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_AGENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_VENCIMIENTO'
            InPrimaryKey = False
            Calculated = True
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE_DETALLES'
            SQL = 
              'SELECT'#10'    FACTURAS_CLIENTE_DETALLES.ID, FACTURAS_CLIENTE_DETALL' +
              'ES.ID_FACTURA,'#10'    FACTURAS_CLIENTE_DETALLES.POSICION, FACTURAS_' +
              'CLIENTE_DETALLES.TIPO_DETALLE,'#10'    FACTURAS_CLIENTE_DETALLES.CON' +
              'CEPTO, FACTURAS_CLIENTE_DETALLES.CANTIDAD,'#10'    FACTURAS_CLIENTE_' +
              'DETALLES.IMPORTE_UNIDAD, FACTURAS_CLIENTE_DETALLES.IMPORTE_TOTAL' +
              ','#10'    FACTURAS_CLIENTE_DETALLES.VISIBLE,'#10#10'    FACTURAS_CLIENTE_D' +
              'ETALLES.ID_ARTICULO, FACTURAS_CLIENTE_DETALLES.DESCUENTO,'#10'    FA' +
              'CTURAS_CLIENTE_DETALLES.IMPORTE_PORTE,'#10'    ARTICULOS.REFERENCIA,' +
              ' ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10'    '#10'FROM FAC' +
              'TURAS_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_CLIENTE_D' +
              'ETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE FACTURAS_CLIENTE_DETALL' +
              'ES.ID_FACTURA = :ID_FACTURA'#10'ORDER BY POSICION;'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'TIPO_DETALLE'
                TableField = 'TIPO_DETALLE'
              end
              item
                DatasetField = 'CONCEPTO'
                TableField = 'CONCEPTO'
              end
              item
                DatasetField = 'IMPORTE_UNIDAD'
                TableField = 'IMPORTE_UNIDAD'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'VISIBLE'
                TableField = 'VISIBLE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'ID_ARTICULO'
                TableField = 'ID_ARTICULO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end>
          end>
        Name = 'FacturasCliente_Detalles'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_ID_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_POSICION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_TIPO_DETALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_CONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_CANTIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_VISIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE_DETALLES'
            SQL = 
              'SELECT'#10'    FACTURAS_CLIENTE_DETALLES.ID, FACTURAS_CLIENTE_DETALL' +
              'ES.ID_FACTURA,'#10'    FACTURAS_CLIENTE_DETALLES.POSICION, FACTURAS_' +
              'CLIENTE_DETALLES.TIPO_DETALLE,'#10'    FACTURAS_CLIENTE_DETALLES.CON' +
              'CEPTO, FACTURAS_CLIENTE_DETALLES.CANTIDAD,'#10'    FACTURAS_CLIENTE_' +
              'DETALLES.IMPORTE_UNIDAD, FACTURAS_CLIENTE_DETALLES.IMPORTE_TOTAL' +
              ','#10'    FACTURAS_CLIENTE_DETALLES.VISIBLE,'#10#10'    FACTURAS_CLIENTE_D' +
              'ETALLES.ID_ARTICULO, FACTURAS_CLIENTE_DETALLES.DESCUENTO,'#10'    FA' +
              'CTURAS_CLIENTE_DETALLES.IMPORTE_PORTE,'#10'    ARTICULOS.REFERENCIA,' +
              ' ARTICULOS.REFERENCIA_PROV AS REFERENCIA_PROVEEDOR'#10'    '#10'FROM FAC' +
              'TURAS_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_CLIENTE_D' +
              'ETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE FACTURAS_CLIENTE_DETALL' +
              'ES.ID_FACTURA = :ID_FACTURA'#10'AND FACTURAS_CLIENTE_DETALLES.ID = :' +
              'ID'#10'ORDER BY POSICION;'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'TIPO_DETALLE'
                TableField = 'TIPO_DETALLE'
              end
              item
                DatasetField = 'CONCEPTO'
                TableField = 'CONCEPTO'
              end
              item
                DatasetField = 'IMPORTE_UNIDAD'
                TableField = 'IMPORTE_UNIDAD'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'VISIBLE'
                TableField = 'VISIBLE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'ID_ARTICULO'
                TableField = 'ID_ARTICULO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end>
          end>
        Name = 'FacturasCliente_Detalles_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_ID_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_POSICION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_TIPO_DETALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_CONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_CANTIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_Detalles_VISIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = '11'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_FACTURAS_CLIENTE'
            SQL = 
              'SELECT '#10'    ID, ID_EMPRESA, REFERENCIA, TIPO, FECHA_FACTURA, SIT' +
              'UACION, BASE_IMPONIBLE,'#10'    DESCUENTO, IMPORTE_DESCUENTO, IVA, I' +
              'MPORTE_IVA, RE, '#10'    IMPORTE_RE, IMPORTE_TOTAL, OBSERVACIONES, I' +
              'D_CLIENTE, '#10'    NIF_CIF, NOMBRE, CALLE, POBLACION, PROVINCIA, CO' +
              'DIGO_POSTAL, '#10'    FECHA_ALTA, FECHA_MODIFICACION, USUARIO, ID_FO' +
              'RMA_PAGO, '#10'    RECARGO_EQUIVALENCIA, ID_TIPO_IVA, IMPORTE_NETO, ' +
              'IMPORTE_PORTE, ID_COMISION_LIQUIDADA,'#10'    REFERENCIA_COMISION, I' +
              'D_AGENTE'#10'  FROM'#10'    V_FACTURAS_CLIENTE'#10'  WHERE ID = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'FECHA_FACTURA'
                TableField = 'FECHA_FACTURA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'BASE_IMPONIBLE'
                TableField = 'BASE_IMPONIBLE'
              end
              item
                DatasetField = 'IMPORTE_DESCUENTO'
                TableField = 'IMPORTE_DESCUENTO'
              end
              item
                DatasetField = 'IMPORTE_IVA'
                TableField = 'IMPORTE_IVA'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'NIF_CIF'
                TableField = 'NIF_CIF'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'RE'
                TableField = 'RE'
              end
              item
                DatasetField = 'IMPORTE_RE'
                TableField = 'IMPORTE_RE'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'IMPORTE_NETO'
                TableField = 'IMPORTE_NETO'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end
              item
                DatasetField = 'ID_TIPO_IVA'
                TableField = 'ID_TIPO_IVA'
              end
              item
                DatasetField = 'RECARGO_EQUIVALENCIA'
                TableField = 'RECARGO_EQUIVALENCIA'
              end
              item
                DatasetField = 'ID_COMISION_LIQUIDADA'
                TableField = 'ID_COMISION_LIQUIDADA'
              end
              item
                DatasetField = 'REFERENCIA_COMISION'
                TableField = 'REFERENCIA_COMISION'
              end
              item
                DatasetField = 'ID_AGENTE'
                TableField = 'ID_AGENTE'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end>
          end>
        Name = 'FacturasCliente_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_TIPO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_BASE_IMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RE'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_RE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_RE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_RE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIF_CIF'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_NIF_CIF'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_CODIGO_POSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_ID_FORMA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RECARGO_EQUIVALENCIA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_RECARGO_EQUIVALENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_TIPO_IVA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_NETO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_COMISION_LIQUIDADA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_COMISION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_AGENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FacturasCliente_FECHA_VENCIMIENTO'
            InPrimaryKey = False
            Calculated = True
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <
      item
        Params = <
          item
            Name = 'VALOR'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptUnknown
          end
          item
            Name = 'CODIGO'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptUnknown
          end
          item
            Name = 'ID_EMPRESA'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptUnknown
          end>
        Statements = <
          item
            Connection = 'IBX'
            SQL = 
              'UPDATE REFERENCIAS SET'#10'       VALOR = :VALOR'#10'WHERE CODIGO = :COD' +
              'IGO AND'#10'      ID_EMPRESA = :ID_EMPRESA'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'ModificarReferencia'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE'
            SQL = 'DELETE '#10'  FROM'#10'    FACTURAS_CLIENTE'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_FacturasCliente'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE_DETALLES'
            SQL = 
              'INSERT'#10'  INTO FACTURAS_CLIENTE_DETALLES'#10'    (ID, CANTIDAD, POSIC' +
              'ION, ID_FACTURA, TIPO_DETALLE, CONCEPTO,'#10'     IMPORTE_UNIDAD, IM' +
              'PORTE_TOTAL, VISIBLE,'#10'     ID_ARTICULO, DESCUENTO, IMPORTE_PORTE' +
              ')'#10'  VALUES'#10'    (:ID, :CANTIDAD, :POSICION, :ID_FACTURA, :TIPO_DE' +
              'TALLE, :CONCEPTO,'#10'     :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VISIBLE' +
              ','#10'     :ID_ARTICULO, :DESCUENTO, :IMPORTE_PORTE)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_FacturasCliente_Detalles'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE_DETALLES'
            SQL = 
              'DELETE '#10'  FROM'#10'    FACTURAS_CLIENTE_DETALLES'#10'  WHERE'#10'    (ID = :' +
              'OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_FacturasCliente_Detalles'
      end
      item
        Params = <
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE_DETALLES'
            SQL = 
              'UPDATE FACTURAS_CLIENTE_DETALLES'#10'  SET '#10'    CANTIDAD = :CANTIDAD' +
              ', '#10'    POSICION = :POSICION, '#10'    ID_FACTURA = :ID_FACTURA, '#10'   ' +
              ' TIPO_DETALLE = :TIPO_DETALLE, '#10'    CONCEPTO = :CONCEPTO, '#10'    I' +
              'MPORTE_UNIDAD = :IMPORTE_UNIDAD, '#10'    IMPORTE_TOTAL = :IMPORTE_T' +
              'OTAL,'#10'    VISIBLE = :VISIBLE,'#10'    ID_ARTICULO = :ID_ARTICULO,'#10'  ' +
              '  DESCUENTO = :DESCUENTO,'#10'    IMPORTE_PORTE = :IMPORTE_PORTE'#10'  W' +
              'HERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_FacturasCliente_Detalles'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'RE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_RE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'NIF_CIF'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'RECARGO_EQUIVALENCIA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_TIPO_IVA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE'
            SQL = 
              'INSERT INTO FACTURAS_CLIENTE ('#10'    ID,'#10'    ID_EMPRESA,'#10'    REFER' +
              'ENCIA,'#10'    FECHA_FACTURA,'#10'    BASE_IMPONIBLE,'#10'    DESCUENTO,'#10'   ' +
              ' IMPORTE_DESCUENTO,'#10'    IVA,'#10'    IMPORTE_IVA,'#10'    RE,'#10'    IMPORT' +
              'E_RE,'#10'    IMPORTE_TOTAL,'#10'    OBSERVACIONES,'#10'    ID_CLIENTE,'#10'    ' +
              'NIF_CIF,'#10'    NOMBRE,'#10'    CALLE,'#10'    POBLACION,'#10'    PROVINCIA,'#10'  ' +
              '  CODIGO_POSTAL,'#10'    FECHA_ALTA,'#10'    FECHA_MODIFICACION,'#10'    USU' +
              'ARIO,'#10'    ID_FORMA_PAGO,'#10'    RECARGO_EQUIVALENCIA,'#10'    ID_TIPO_I' +
              'VA,'#10'    IMPORTE_NETO,'#10'    IMPORTE_PORTE)'#10'  VALUES ('#10'    :ID,'#10'   ' +
              ' :ID_EMPRESA,'#10'    :REFERENCIA,'#10'    :FECHA_FACTURA,'#10'    :BASE_IMP' +
              'ONIBLE,'#10'    :DESCUENTO,'#10'    :IMPORTE_DESCUENTO,'#10'    :IVA,'#10'    :I' +
              'MPORTE_IVA,'#10'    :RE,'#10'    :IMPORTE_RE,'#10'    :IMPORTE_TOTAL,'#10'    :O' +
              'BSERVACIONES,'#10'    :ID_CLIENTE,'#10'    :NIF_CIF,'#10'    :NOMBRE,'#10'    :C' +
              'ALLE,'#10'    :POBLACION,'#10'    :PROVINCIA,'#10'    :CODIGO_POSTAL,'#10'    :F' +
              'ECHA_ALTA,'#10'    :FECHA_MODIFICACION,'#10'    :USUARIO,'#10'    :ID_FORMA_' +
              'PAGO,'#10'    :RECARGO_EQUIVALENCIA,'#10'    :ID_TIPO_IVA,'#10'    :IMPORTE_' +
              'NETO,'#10'    :IMPORTE_PORTE);'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_FacturasCliente'
      end
      item
        Params = <
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'RE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_RE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'NIF_CIF'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'RECARGO_EQUIVALENCIA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_TIPO_IVA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURAS_CLIENTE'
            SQL = 
              'UPDATE FACTURAS_CLIENTE'#10'  SET'#10'    ID_EMPRESA = :ID_EMPRESA,'#10'    ' +
              'REFERENCIA = :REFERENCIA,'#10'    FECHA_FACTURA = :FECHA_FACTURA,'#10'  ' +
              '  BASE_IMPONIBLE = :BASE_IMPONIBLE,'#10'    DESCUENTO = :DESCUENTO,'#10 +
              '    IMPORTE_DESCUENTO = :IMPORTE_DESCUENTO,'#10'    IVA = :IVA,'#10'    ' +
              'IMPORTE_IVA = :IMPORTE_IVA,'#10'    RE = :RE,'#10'    IMPORTE_RE = :IMPO' +
              'RTE_RE,'#10'    IMPORTE_TOTAL = :IMPORTE_TOTAL,'#10'    OBSERVACIONES = ' +
              ':OBSERVACIONES,'#10'    ID_CLIENTE = :ID_CLIENTE,'#10'    NIF_CIF = :NIF' +
              '_CIF,'#10'    NOMBRE = :NOMBRE,'#10'    CALLE = :CALLE,'#10'    POBLACION = ' +
              ':POBLACION,'#10'    PROVINCIA = :PROVINCIA,'#10'    CODIGO_POSTAL = :COD' +
              'IGO_POSTAL,'#10'    FECHA_ALTA = :FECHA_ALTA,'#10'    FECHA_MODIFICACION' +
              ' = :FECHA_MODIFICACION,'#10'    USUARIO = :USUARIO,'#10'    ID_FORMA_PAG' +
              'O = :ID_FORMA_PAGO,'#10'    RECARGO_EQUIVALENCIA = :RECARGO_EQUIVALE' +
              'NCIA,'#10'    ID_TIPO_IVA = :ID_TIPO_IVA,'#10'    IMPORTE_NETO = :IMPORT' +
              'E_NETO,'#10'    IMPORTE_PORTE = :IMPORTE_PORTE'#10'  WHERE'#10'  (ID = :OLD_' +
              'ID);'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_FacturasCliente'
      end>
    RelationShips = <>
    UpdateRules = <
      item
        Name = 'Insert FacturasCliente'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'FacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert DetallesFacturasCliente'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'FacturasCliente_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update FacturasCliente'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'FacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update DetallesFacturasCliente'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'FacturasCliente_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete DetallesFacturasCliente'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'FacturasCliente_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete FacturasCliente'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'FacturasCliente'
        FailureBehaviour = fbRaiseException
      end>
    Left = 48
    Top = 24
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 72
  end
  object Diagrams: TDADiagrams
    Left = 150
    Top = 74
    DiagramData = '<Diagrams>'#13#10'</Diagrams>'#13#10
  end
  object DataDictionary: TDADataDictionary
    Fields = <
      item
        Name = 'FacturasCliente_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_EMPRESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_EMPRESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_FACTURA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha de las factura'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_VENCIMIENTO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Vencimiento'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_SITUACION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Situaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_BASE_IMPONIBLE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Base imponible'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_DESCUENTO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe dto.'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_IVA'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe IVA'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_FORMA_PAGO'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Forma de pago'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_CLIENTE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_CLIENTE'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_NIF_CIF'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'NIF/CIF'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_CODIGO_POSTAL'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'C'#243'd. postal'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_OBSERVACIONES'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Observaciones'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_NOMBRE'
        DataType = datString
        Size = 100
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Cliente'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_CALLE'
        DataType = datString
        Size = 150
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Direcci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_PROVINCIA'
        DataType = datString
        Size = 30
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Provincia'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_POBLACION'
        DataType = datString
        Size = 150
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Poblaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_IVA'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IVA'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_USUARIO'
        DataType = datString
        Size = 100
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Dto.'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_Detalles_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_ID_FACTURA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_FACTURA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_TIPO_DETALLE'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Tipo detalle'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_CONCEPTO'
        DataType = datString
        Size = 2000
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Concepto'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe unidad'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_Detalles_VISIBLE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = #191'Visible?'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_POSICION'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Posici'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_Detalles_CANTIDAD'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Cantidad'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_PAGADO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha de pago'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_FECHA_VENCIMIENTO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha de vencimiento'
        Alignment = taLeftJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'FacturasCliente_RE'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'RE'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_RE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe RE'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_REFERENCIA'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Referencia'
        Alignment = taLeftJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'FacturasCliente_ID_FORMA_PAGO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_NETO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe neto'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_IMPORTE_PORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe del porte'
        Alignment = taRightJustify
      end
      item
        Name = 'FacturasCliente_RECARGO_EQUIVALENCIA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = #191'Con R.E.?'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_TIPO'
        DataType = datString
        Size = 1
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Tipo'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_TIPO_IVA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_TIPO_IVA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_COMISION_LIQUIDADA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_COMISION_LIQUIDADA'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_REFERENCIA_COMISION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'REFERENCIA_COMISION'
        Alignment = taLeftJustify
      end
      item
        Name = 'FacturasCliente_ID_AGENTE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_AGENTE'
        Alignment = taLeftJustify
      end>
    Left = 150
    Top = 22
  end
  object bpFacturasCliente: TDABusinessProcessor
    Schema = schFacturasCliente
    InsertCommandName = 'Insert_FacturasCliente'
    DeleteCommandName = 'Delete_FacturasCliente'
    UpdateCommandName = 'Update_FacturasCliente'
    RefreshDatasetName = 'FacturasCliente_Refresh'
    ReferencedDataset = 'FacturasCliente'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 280
    Top = 16
  end
  object bpFacturasCliente_Detalles: TDABusinessProcessor
    Schema = schFacturasCliente
    InsertCommandName = 'Insert_FacturasCliente_Detalles'
    DeleteCommandName = 'Delete_FacturasCliente_Detalles'
    UpdateCommandName = 'Update_FacturasCliente_Detalles'
    RefreshDatasetName = 'FacturasCliente_Detalles_Refresh'
    ReferencedDataset = 'FacturasCliente_Detalles'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 280
    Top = 72
  end
end
