object srvAlbaranesCliente: TsrvAlbaranesCliente
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  RequiresSession = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schAlbaranesCliente
  ServiceAdapter = DABINAdapter
  OnBeforeAcquireConnection = DARemoteServiceBeforeAcquireConnection
  OnBeforeGetDatasetData = DARemoteServiceBeforeGetDatasetData
  Height = 306
  Width = 494
  object schAlbaranesCliente: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DADataDictionary
    Datasets = <
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 50
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'REFERENCIAS'
            SQL = 
              'SELECT'#10'      VALOR'#10'FROM'#10'    REFERENCIAS'#10'WHERE'#10'     CODIGO = :COD' +
              'IGO'#10'AND ID_EMPRESA = :ID_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 = 'ALBARANES_CLIENTE'
            SQL = 
              'SELECT '#10'    ID, ID_EMPRESA, ID_CLIENTE, NOMBRE, FECHA_ALBARAN, '#10 +
              '    REFERENCIA, REFERENCIA_CLIENTE, TIPO, SITUACION, ID_ALMACEN,' +
              ' NOMBRE_ALMACEN,'#10'    ID_PEDIDO, REF_PEDIDO, ID_FACTURA, REF_FACT' +
              'URA,'#10'    CALLE, CODIGO_POSTAL, POBLACION, PROVINCIA, PERSONA_CON' +
              'TACTO, '#10'    TELEFONO, IMPORTE_NETO, IMPORTE_PORTE, DESCUENTO, IM' +
              'PORTE_DESCUENTO, '#10'    BASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_' +
              'TOTAL, OBSERVACIONES, '#10'    INCIDENCIAS, INCIDENCIAS_ACTIVAS, FEC' +
              'HA_ALTA,'#10'    FECHA_MODIFICACION, USUARIO, ID_FORMA_PAGO, FECHA_P' +
              'REVISTA_ENVIO, FECHA_ENVIO,'#10'    FECHA_RECEPCION, ID_AGENTE, AGEN' +
              'TE'#10'  FROM'#10'    V_ALBARANES_CLIENTE'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'FECHA_ALBARAN'
                TableField = 'FECHA_ALBARAN'
              end
              item
                DatasetField = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'ID_ALMACEN'
                TableField = 'ID_ALMACEN'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'TELEFONO'
                TableField = 'TELEFONO'
              end
              item
                DatasetField = 'BASE_IMPONIBLE'
                TableField = 'BASE_IMPONIBLE'
              end
              item
                DatasetField = 'IMPORTE_NETO'
                TableField = 'IMPORTE_NETO'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IMPORTE_DESCUENTO'
                TableField = 'IMPORTE_DESCUENTO'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'IMPORTE_IVA'
                TableField = 'IMPORTE_IVA'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'INCIDENCIAS'
                TableField = 'INCIDENCIAS'
              end
              item
                DatasetField = 'INCIDENCIAS_ACTIVAS'
                TableField = 'INCIDENCIAS_ACTIVAS'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'FECHA_ENVIO'
                TableField = 'FECHA_ENVIO'
              end
              item
                DatasetField = 'FECHA_RECEPCION'
                TableField = 'FECHA_RECEPCION'
              end
              item
                DatasetField = 'REF_PEDIDO'
                TableField = 'REF_PEDIDO'
              end
              item
                DatasetField = 'REF_FACTURA'
                TableField = 'REF_FACTURA'
              end
              item
                DatasetField = 'NOMBRE_ALMACEN'
                TableField = 'NOMBRE_ALMACEN'
              end
              item
                DatasetField = 'FECHA_PREVISTA_ENVIO'
                TableField = 'FECHA_PREVISTA_ENVIO'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'REFERENCIA_CLIENTE'
                TableField = 'REFERENCIA_CLIENTE'
              end>
          end>
        Name = 'AlbaranesCliente'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALBARAN'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_ALBARAN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_REFERENCIA_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_TIPO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_ALMACEN'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_NOMBRE_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REF_PEDIDO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_REF_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REF_FACTURA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_REF_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_CODIGO_POSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_PERSONA_CONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_TELEFONO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_BASE_IMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_NETO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_INCIDENCIAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_INCIDENCIAS_ACTIVAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_FORMA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_PREVISTA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_PREVISTA_ENVIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_ENVIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_RECEPCION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_RECEPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_AGENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_AGENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'AGENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_AGENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE_DETALLES'
            SQL = 
              'SELECT'#10'    ALBARANES_CLIENTE_DETALLES.ID, ALBARANES_CLIENTE_DETA' +
              'LLES.ID_ALBARAN, ALBARANES_CLIENTE_DETALLES.ID_PEDIDO,'#10'    ALBAR' +
              'ANES_CLIENTE_DETALLES.POSICION, ALBARANES_CLIENTE_DETALLES.TIPO_' +
              'DETALLE,'#10'    ALBARANES_CLIENTE_DETALLES.CONCEPTO, ALBARANES_CLIE' +
              'NTE_DETALLES.CANTIDAD,'#10'    ALBARANES_CLIENTE_DETALLES.IMPORTE_UN' +
              'IDAD, ALBARANES_CLIENTE_DETALLES.IMPORTE_TOTAL,'#10'    ALBARANES_CL' +
              'IENTE_DETALLES.VISIBLE,'#10#10'    ALBARANES_CLIENTE_DETALLES.ID_ARTIC' +
              'ULO, ALBARANES_CLIENTE_DETALLES.DESCUENTO,'#10'    ALBARANES_CLIENTE' +
              '_DETALLES.IMPORTE_PORTE,'#10'    ARTICULOS.REFERENCIA, ARTICULOS.REF' +
              'ERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'FROM ALBARANES_CLIENTE_DET' +
              'ALLES'#10'LEFT JOIN ARTICULOS ON ALBARANES_CLIENTE_DETALLES.ID_ARTIC' +
              'ULO = ARTICULOS.ID'#10'WHERE ALBARANES_CLIENTE_DETALLES.ID_ALBARAN =' +
              ' :ID_ALBARAN'#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 = '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 = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID_ARTICULO'
                TableField = 'ID_ARTICULO'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'ID_ALBARAN'
                TableField = 'ID_ALBARAN'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end>
          end>
        Name = 'AlbaranesCliente_Detalles'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_ID_ALBARAN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'POSICIONCONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_TIPO_DETALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_ID_ARTICULO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_CONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CANTIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_UNIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_VISIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_REFERENCIA_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE_DETALLES'
            SQL = 
              'SELECT'#10'    ALBARANES_CLIENTE_DETALLES.ID, ALBARANES_CLIENTE_DETA' +
              'LLES.ID_ALBARAN, ALBARANES_CLIENTE_DETALLES.ID_PEDIDO,'#10'    ALBAR' +
              'ANES_CLIENTE_DETALLES.POSICION, ALBARANES_CLIENTE_DETALLES.TIPO_' +
              'DETALLE,'#10'    ALBARANES_CLIENTE_DETALLES.CONCEPTO, ALBARANES_CLIE' +
              'NTE_DETALLES.CANTIDAD,'#10'    ALBARANES_CLIENTE_DETALLES.IMPORTE_UN' +
              'IDAD, ALBARANES_CLIENTE_DETALLES.IMPORTE_TOTAL,'#10'    ALBARANES_CL' +
              'IENTE_DETALLES.VISIBLE,'#10#10'    ALBARANES_CLIENTE_DETALLES.ID_ARTIC' +
              'ULO, ALBARANES_CLIENTE_DETALLES.DESCUENTO,'#10'    ALBARANES_CLIENTE' +
              '_DETALLES.IMPORTE_PORTE,'#10'    ARTICULOS.REFERENCIA, ARTICULOS.REF' +
              'ERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'FROM ALBARANES_CLIENTE_DET' +
              'ALLES'#10'LEFT JOIN ARTICULOS ON ALBARANES_CLIENTE_DETALLES.ID_ARTIC' +
              'ULO = ARTICULOS.ID'#10'WHERE ALBARANES_CLIENTE_DETALLES.ID_ALBARAN =' +
              ' :ID_ALBARAN'#10'AND ALBARANES_CLIENTE_DETALLES.ID = :ID'#10'ORDER BY PO' +
              'SICION;'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              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 = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID_ARTICULO'
                TableField = 'ID_ARTICULO'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'ID_ALBARAN'
                TableField = 'ID_ALBARAN'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end>
          end>
        Name = 'AlbaranesCliente_Detalles_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_Refresh_ID_ALBARAN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'POSICIONCONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_TIPO_DETALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_ID_ARTICULO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_CONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CANTIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_UNIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_Refresh_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_Refresh_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_VISIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_Detalles_Refresh_REFERENCIA_PROVEEDOR'
            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 = '22'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE'
            SQL = 
              'SELECT '#10'    ID, ID_EMPRESA, ID_CLIENTE, NOMBRE, FECHA_ALBARAN, '#10 +
              '    REFERENCIA, REFERENCIA_CLIENTE, TIPO, SITUACION, ID_ALMACEN,' +
              ' NOMBRE_ALMACEN,'#10'    ID_PEDIDO, REF_PEDIDO, ID_FACTURA, REF_FACT' +
              'URA,'#10'    CALLE, CODIGO_POSTAL, POBLACION, PROVINCIA, PERSONA_CON' +
              'TACTO, '#10'    TELEFONO, IMPORTE_NETO, IMPORTE_PORTE, DESCUENTO, IM' +
              'PORTE_DESCUENTO, '#10'    BASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_' +
              'TOTAL, OBSERVACIONES, '#10'    INCIDENCIAS, INCIDENCIAS_ACTIVAS, FEC' +
              'HA_ALTA,'#10'    FECHA_MODIFICACION, USUARIO, ID_FORMA_PAGO, FECHA_P' +
              'REVISTA_ENVIO, FECHA_ENVIO,'#10'    FECHA_RECEPCION, ID_AGENTE, AGEN' +
              'TE'#10'  FROM'#10'    V_ALBARANES_CLIENTE'#10'  WHERE V_ALBARANES_CLIENTE.ID' +
              ' = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'ID_CLIENTE'
                TableField = 'ID_CLIENTE'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'FECHA_ALBARAN'
                TableField = 'FECHA_ALBARAN'
              end
              item
                DatasetField = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'ID_ALMACEN'
                TableField = 'ID_ALMACEN'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'TELEFONO'
                TableField = 'TELEFONO'
              end
              item
                DatasetField = 'BASE_IMPONIBLE'
                TableField = 'BASE_IMPONIBLE'
              end
              item
                DatasetField = 'IMPORTE_NETO'
                TableField = 'IMPORTE_NETO'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IMPORTE_DESCUENTO'
                TableField = 'IMPORTE_DESCUENTO'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'IMPORTE_IVA'
                TableField = 'IMPORTE_IVA'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'INCIDENCIAS'
                TableField = 'INCIDENCIAS'
              end
              item
                DatasetField = 'INCIDENCIAS_ACTIVAS'
                TableField = 'INCIDENCIAS_ACTIVAS'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'FECHA_ENVIO'
                TableField = 'FECHA_ENVIO'
              end
              item
                DatasetField = 'FECHA_RECEPCION'
                TableField = 'FECHA_RECEPCION'
              end
              item
                DatasetField = 'REF_PEDIDO'
                TableField = 'REF_PEDIDO'
              end
              item
                DatasetField = 'REF_FACTURA'
                TableField = 'REF_FACTURA'
              end
              item
                DatasetField = 'NOMBRE_ALMACEN'
                TableField = 'NOMBRE_ALMACEN'
              end
              item
                DatasetField = 'FECHA_PREVISTA_ENVIO'
                TableField = 'FECHA_PREVISTA_ENVIO'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'REFERENCIA_CLIENTE'
                TableField = 'REFERENCIA_CLIENTE'
              end>
          end>
        Name = 'AlbaranesCliente_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Referencia'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALBARAN'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_ALBARAN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_TIPO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_ALMACEN'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_NOMBRE_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REF_PEDIDO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_REF_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REF_FACTURA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_REF_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_CODIGO_POSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_PERSONA_CONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_TELEFONO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_BASE_IMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_NETO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_INCIDENCIAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_INCIDENCIAS_ACTIVAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_FORMA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_PREVISTA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_PREVISTA_ENVIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_ENVIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_RECEPCION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_FECHA_RECEPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_AGENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_ID_AGENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'AGENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'AlbaranesCliente_AGENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <
      item
        Params = <
          item
            Name = 'VALOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 50
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'REFERENCIAS'
            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 = 'ALBARANES_CLIENTE'
            SQL = 'DELETE '#10'  FROM'#10'    ALBARANES_CLIENTE'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_AlbaranesCliente'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            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 = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            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>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE_DETALLES'
            SQL = 
              'INSERT INTO ALBARANES_CLIENTE_DETALLES ('#10'    ID,'#10'    ID_ALBARAN,' +
              #10'    ID_PEDIDO,'#10'    POSICION,'#10'    TIPO_DETALLE,'#10'    ID_ARTICULO,' +
              #10'    CONCEPTO,'#10'    CANTIDAD,'#10'    IMPORTE_UNIDAD,'#10'    DESCUENTO,'#10 +
              '    IMPORTE_PORTE,'#10'    IMPORTE_TOTAL,'#10'    VISIBLE,'#10'    FECHA_ALT' +
              'A,'#10'    FECHA_MODIFICACION)'#10'  VALUES ('#10'    :ID,'#10'    :ID_ALBARAN,'#10 +
              '    :ID_PEDIDO,'#10'    :POSICION,'#10'    :TIPO_DETALLE,'#10'    :ID_ARTICU' +
              'LO,'#10'    :CONCEPTO,'#10'    :CANTIDAD,'#10'    :IMPORTE_UNIDAD,'#10'    :DESC' +
              'UENTO,'#10'    :IMPORTE_PORTE,'#10'    :IMPORTE_TOTAL,'#10'    :VISIBLE,'#10'   ' +
              ' :FECHA_ALTA,'#10'    :FECHA_MODIFICACION);'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_AlbaranesCliente_Detalles'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE_DETALLES'
            SQL = 
              'DELETE '#10'  FROM'#10'    ALBARANES_CLIENTE_DETALLES'#10'  WHERE'#10'    (ID = ' +
              ':OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_AlbaranesCliente_Detalles'
      end
      item
        Params = <
          item
            Name = 'ID_ALBARAN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            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 = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE_DETALLES'
            SQL = 
              'UPDATE ALBARANES_CLIENTE_DETALLES'#10'  SET'#10'    ID_ALBARAN = :ID_ALB' +
              'ARAN,'#10'    ID_PEDIDO = :ID_PEDIDO,'#10'    POSICION = :POSICION,'#10'    ' +
              'TIPO_DETALLE = :TIPO_DETALLE,'#10'    ID_ARTICULO = :ID_ARTICULO,'#10'  ' +
              '  CONCEPTO = :CONCEPTO,'#10'    CANTIDAD = :CANTIDAD,'#10'    IMPORTE_UN' +
              'IDAD = :IMPORTE_UNIDAD,'#10'    DESCUENTO = :DESCUENTO,'#10'    IMPORTE_' +
              'PORTE = :IMPORTE_PORTE,'#10'    IMPORTE_TOTAL = :IMPORTE_TOTAL,'#10'    ' +
              'VISIBLE = :VISIBLE,'#10'    FECHA_MODIFICACION = :FECHA_MODIFICACION' +
              #10'  WHERE'#10'  (ID = :OLD_ID);'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_AlbaranesCliente_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 = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA_CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ALBARAN'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            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 = '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 = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datFloat
            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 = '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 = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            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 = 'FECHA_PREVISTA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_RECEPCION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE'
            SQL = 
              'INSERT'#10'  INTO ALBARANES_CLIENTE'#10'    (ID, ID_EMPRESA, ID_CLIENTE,' +
              ' REFERENCIA, REFERENCIA_CLIENTE,'#10'     FECHA_ALBARAN, ID_PEDIDO, ' +
              'ID_ALMACEN, ID_FACTURA, CALLE,'#10'     CODIGO_POSTAL, POBLACION, PR' +
              'OVINCIA, PERSONA_CONTACTO, '#10'     TELEFONO, BASE_IMPONIBLE, IMPOR' +
              'TE_NETO, IMPORTE_PORTE, '#10'     DESCUENTO, IMPORTE_DESCUENTO, IVA,' +
              ' IMPORTE_IVA, IMPORTE_TOTAL, '#10'     OBSERVACIONES, INCIDENCIAS, I' +
              'NCIDENCIAS_ACTIVAS, FECHA_ALTA, '#10'     FECHA_MODIFICACION, USUARI' +
              'O, ID_FORMA_PAGO,'#10'     FECHA_PREVISTA_ENVIO, FECHA_ENVIO, FECHA_' +
              'RECEPCION, TIPO)'#10'  VALUES'#10'    (:ID, :ID_EMPRESA, :ID_CLIENTE, :R' +
              'EFERENCIA, :REFERENCIA_CLIENTE,'#10'     :FECHA_ALBARAN, :ID_PEDIDO,' +
              ' :ID_ALMACEN, :ID_FACTURA, :CALLE,'#10'     :CODIGO_POSTAL, :POBLACI' +
              'ON, :PROVINCIA, :PERSONA_CONTACTO, '#10'     :TELEFONO, :BASE_IMPONI' +
              'BLE, :IMPORTE_NETO, :IMPORTE_PORTE, '#10'     :DESCUENTO, :IMPORTE_D' +
              'ESCUENTO, :IVA, :IMPORTE_IVA, '#10'     :IMPORTE_TOTAL, :OBSERVACION' +
              'ES, :INCIDENCIAS, :INCIDENCIAS_ACTIVAS, '#10'     :FECHA_ALTA, :FECH' +
              'A_MODIFICACION, :USUARIO,'#10'     :ID_FORMA_PAGO, :FECHA_PREVISTA_E' +
              'NVIO, :FECHA_ENVIO, :FECHA_RECEPCION, :TIPO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_AlbaranesCliente'
      end
      item
        Params = <
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA_CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ALBARAN'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            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 = '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 = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datFloat
            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 = '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 = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            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 = 'FECHA_PREVISTA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_RECEPCION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ALBARANES_CLIENTE'
            SQL = 
              'UPDATE ALBARANES_CLIENTE'#10'  SET '#10'    ID_EMPRESA = :ID_EMPRESA, '#10' ' +
              '   ID_CLIENTE = :ID_CLIENTE, '#10'    REFERENCIA = :REFERENCIA, '#10'   ' +
              ' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE,'#10'    FECHA_ALBARAN = :' +
              'FECHA_ALBARAN, '#10'    ID_PEDIDO = :ID_PEDIDO, '#10'    ID_ALMACEN = :I' +
              'D_ALMACEN,'#10'    ID_FACTURA = :ID_FACTURA, '#10'    CALLE = :CALLE, '#10' ' +
              '   CODIGO_POSTAL = :CODIGO_POSTAL, '#10'    POBLACION = :POBLACION, ' +
              #10'    PROVINCIA = :PROVINCIA, '#10'    PERSONA_CONTACTO = :PERSONA_CO' +
              'NTACTO, '#10'    TELEFONO = :TELEFONO, '#10'    BASE_IMPONIBLE = :BASE_I' +
              'MPONIBLE, '#10'    IMPORTE_NETO = :IMPORTE_NETO, '#10'    IMPORTE_PORTE ' +
              '= :IMPORTE_PORTE, '#10'    DESCUENTO = :DESCUENTO, '#10'    IMPORTE_DESC' +
              'UENTO = :IMPORTE_DESCUENTO, '#10'    IVA = :IVA, '#10'    IMPORTE_IVA = ' +
              ':IMPORTE_IVA, '#10'    IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10'    OBSERVAC' +
              'IONES = :OBSERVACIONES, '#10'    INCIDENCIAS = :INCIDENCIAS, '#10'    IN' +
              'CIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVAS, '#10'    FECHA_ALTA = :FEC' +
              'HA_ALTA, '#10'    FECHA_MODIFICACION = :FECHA_MODIFICACION, '#10'    USU' +
              'ARIO = :USUARIO, '#10'    ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10'    FECHA_' +
              'PREVISTA_ENVIO = :FECHA_PREVISTA_ENVIO,'#10'    FECHA_ENVIO = :FECHA' +
              '_ENVIO, '#10'    FECHA_RECEPCION = :FECHA_RECEPCION,'#10'    TIPO = :TIP' +
              'O'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_AlbaranesCliente'
      end>
    RelationShips = <>
    UpdateRules = <
      item
        Name = 'Insert AlbaranesCliente'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'AlbaranesCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert AlbaranesCliente_Detalles'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'AlbaranesCliente_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update AlbaranesCliente'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'AlbaranesCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update AlbaranesCliente_Detalles'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'AlbaranesCliente_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete AlbaranesCliente_Detalles'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'AlbaranesCliente_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete AlbaranesCliente'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'AlbaranesCliente'
        FailureBehaviour = fbRaiseException
      end>
    Left = 48
    Top = 24
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 72
  end
  object bpAlbaranesCliente: TDABusinessProcessor
    Schema = schAlbaranesCliente
    InsertCommandName = 'Insert_AlbaranesCliente'
    DeleteCommandName = 'Delete_AlbaranesCliente'
    UpdateCommandName = 'Update_AlbaranesCliente'
    RefreshDatasetName = 'AlbaranesCliente_Refresh'
    ReferencedDataset = 'AlbaranesCliente'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 200
    Top = 24
  end
  object bpAlbaranesCliente_Detalles: TDABusinessProcessor
    Schema = schAlbaranesCliente
    InsertCommandName = 'Insert_AlbaranesCliente_Detalles'
    DeleteCommandName = 'Delete_AlbaranesCliente_Detalles'
    UpdateCommandName = 'Update_AlbaranesCliente_Detalles'
    RefreshDatasetName = 'AlbaranesCliente_Detalles_Refresh'
    ReferencedDataset = 'AlbaranesCliente_Detalles'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 200
    Top = 88
  end
  object DADataDictionary: TDADataDictionary
    Fields = <
      item
        Name = 'AlbaranesCliente_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_ID_EMPRESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_EMPRESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_ID_CLIENTE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_CLIENTE'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_NOMBRE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Nombre del cliente'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_SITUACION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Situaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_CALLE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Calle'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_CODIGO_POSTAL'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'C'#243'd. postal'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_POBLACION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Poblaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_PROVINCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Provincia'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_PERSONA_CONTACTO'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Persona de contacto'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_TELEFONO'
        DataType = datString
        Size = 25
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Tel'#233'fono'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_OBSERVACIONES'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Observaciones'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_INCIDENCIAS'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'INCIDENCIAS'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_INCIDENCIAS_ACTIVAS'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'INCIDENCIAS_ACTIVAS'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_USUARIO'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_IMPORTE_NETO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe neto'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_IMPORTE_PORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe del porte'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Descuento'
        DisplayFormat = ',0.00 %;-,0.00 %'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_IMPORTE_DESCUENTO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe dto.'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_BASE_IMPONIBLE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Base imponible'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_IVA'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IVA'
        DisplayFormat = ',0.00 %;-,0.00 %'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_IMPORTE_IVA'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe IVA'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_ID_FORMA_PAGO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_FORMA_PAGO'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_ID_PEDIDO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_PEDIDO'
        Alignment = taLeftJustify
      end
      item
        Name = 'POSICIONCONCEPTO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'POSICION'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_TIPO_DETALLE'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'TIPO_DETALLE'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_REFERENCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Referencia'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_ID_ARTICULO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_ARTICULO'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_CONCEPTO'
        DataType = datString
        Size = 2000
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'CONCEPTO'
        Alignment = taLeftJustify
      end
      item
        Name = 'CANTIDAD'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_IMPORTE_UNIDAD'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe unidad'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Descuento'
        DisplayFormat = ',0.00 %;-,0.00 %'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_IMPORTE_PORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe porte'
        Alignment = taRightJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_VISIBLE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'VISIBLE'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_REFERENCIA_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Ref. proveedor'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_FECHA_ALBARAN'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha albar'#225'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_ID_PEDIDO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_PEDIDO'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_ID_FACTURA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_FACTURA'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_ID_ALBARAN'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_ALBARAN'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_Refresh_ID_ALBARAN'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_ALBARAN'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_Refresh_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'DESCUENTO'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_Refresh_IMPORTE_PORTE'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IMPORTE_PORTE'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_Detalles_Refresh_REFERENCIA_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'REFERENCIA_PROVEEDOR'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_ID_ALMACEN'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_ALMACEN'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_FECHA_ENVIO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha de env'#237'o'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_FECHA_RECEPCION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha de recepci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_REF_PEDIDO'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Ref. pedido cliente'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_REF_FACTURA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Ref. factura cliente'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_REFERENCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Referencia'
        Alignment = taLeftJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'AlbaranesCliente_FECHA_PREVISTA_ENVIO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha prevista de envio'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_NOMBRE_ALMACEN'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Almac'#233'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_TIPO'
        DataType = datString
        Size = 1
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Tipo'
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_REFERENCIA_CLIENTE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_ID_AGENTE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'AlbaranesCliente_AGENTE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Agente'
        Alignment = taLeftJustify
      end>
    Left = 48
    Top = 152
  end
end
