object srvArticulos: TsrvArticulos
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  RequiresSession = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schArticulos
  ServiceAdapter = DABINAdapter
  OnBeforeAcquireConnection = DARemoteServiceBeforeAcquireConnection
  OnAfterGetDatasetData = DARemoteServiceAfterGetDatasetData
  Height = 249
  Width = 343
  object Diagrams: TDADiagrams
    Left = 150
    Top = 74
    DiagramData = '<Diagrams>'#13#10'</Diagrams>'#13#10
  end
  object DataDictionary: TDADataDictionary
    Fields = <
      item
        Name = 'Articulos_REFERENCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Referencia'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_DESCRIPCION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Descripci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_FAMILIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Familia'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_IMAGEN'
        DataType = datBlob
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Foto'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_COMISIONABLE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Comisionable'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_USUARIO'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_REFERENCIA_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Ref. proveedor'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_PRECIO_COSTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_PRECIO_PORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Porte'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Descuento'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_ID'
        DataType = datInteger
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_ID_EMPRESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_EMPRESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_PRECIO_NETO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PRECIO_NETO'
        Alignment = taLeftJustify
      end
      item
        Name = 'Articulos_ID_PROVEEDOR'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_PROVEEDOR'
        Alignment = taLeftJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'Articulos_NOMBRE_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Nombre'
        Alignment = taLeftJustify
        ServerAutoRefresh = True
      end>
    Left = 150
    Top = 22
  end
  object schArticulos: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DataDictionary
    Diagrams = Diagrams
    Datasets = <
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_ARTICULOS'
            SQL = 
              'SELECT V_ARTICULOS.ID, V_ARTICULOS.ID_EMPRESA, V_ARTICULOS.REFER' +
              'ENCIA, V_ARTICULOS.DESCRIPCION,'#10'       V_ARTICULOS.FAMILIA, V_AR' +
              'TICULOS.COMISIONABLE, V_ARTICULOS.FECHA_ALTA,'#10'       V_ARTICULOS' +
              '.FECHA_MODIFICACION, V_ARTICULOS.USUARIO,'#10'       V_ARTICULOS.REF' +
              'ERENCIA_PROV,'#10'       V_ARTICULOS.PRECIO_COSTE,'#10'       V_ARTICULO' +
              'S.PRECIO_PORTE,'#10'       V_ARTICULOS.DESCUENTO,'#10'       V_ARTICULOS' +
              '.PRECIO_NETO,'#10'       V_ARTICULOS.INVENTARIABLE,'#10'       V_ARTICUL' +
              'OS.ID_PROVEEDOR,'#10'       V_ARTICULOS.NOMBRE_PROVEEDOR,'#10'       V_A' +
              'RTICULOS.ELIMINADO, V_ARTICULOS.TIENDA_WEB'#10'FROM V_ARTICULOS'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'FAMILIA'
                TableField = 'FAMILIA'
              end
              item
                DatasetField = 'COMISIONABLE'
                TableField = 'COMISIONABLE'
              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 = 'REFERENCIA_PROV'
                TableField = 'REFERENCIA_PROV'
              end
              item
                DatasetField = 'PRECIO_COSTE'
                TableField = 'PRECIO_COSTE'
              end
              item
                DatasetField = 'PRECIO_PORTE'
                TableField = 'PRECIO_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'PRECIO_NETO'
                TableField = 'PRECIO_NETO'
              end
              item
                DatasetField = 'INVENTARIABLE'
                TableField = 'INVENTARIABLE'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE_PROVEEDOR'
                TableField = 'NOMBRE_PROVEEDOR'
              end
              item
                DatasetField = 'ELIMINADO'
                TableField = 'ELIMINADO'
              end
              item
                DatasetField = 'TIENDA_WEB'
                TableField = 'TIENDA_WEB'
              end>
          end>
        Name = 'Articulos'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'COMISIONABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_COSTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INVENTARIABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ELIMINADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Eliminado'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIENDA_WEB'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = #191'En tienda web?'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = '1'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_ARTICULOS'
            SQL = 
              'SELECT V_ARTICULOS.ID, V_ARTICULOS.ID_EMPRESA, V_ARTICULOS.REFER' +
              'ENCIA, V_ARTICULOS.DESCRIPCION,'#10'       V_ARTICULOS.FAMILIA, V_AR' +
              'TICULOS.COMISIONABLE, V_ARTICULOS.FECHA_ALTA,'#10'       V_ARTICULOS' +
              '.FECHA_MODIFICACION, V_ARTICULOS.USUARIO,'#10'       V_ARTICULOS.REF' +
              'ERENCIA_PROV,'#10'       V_ARTICULOS.PRECIO_COSTE,'#10'       V_ARTICULO' +
              'S.PRECIO_PORTE,'#10'       V_ARTICULOS.DESCUENTO,'#10'       V_ARTICULOS' +
              '.PRECIO_NETO,'#10'       V_ARTICULOS.INVENTARIABLE,'#10'       V_ARTICUL' +
              'OS.ID_PROVEEDOR,'#10'       V_ARTICULOS.NOMBRE_PROVEEDOR,'#10'       V_A' +
              'RTICULOS.ELIMINADO, V_ARTICULOS.TIENDA_WEB'#10'FROM V_ARTICULOS'#10'WHER' +
              'E V_ARTICULOS.ID = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'PRECIO_COSTE'
                TableField = 'PRECIO_COSTE'
              end
              item
                DatasetField = 'PRECIO_PORTE'
                TableField = 'PRECIO_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE_PROVEEDOR'
                TableField = 'NOMBRE_PROVEEDOR'
              end
              item
                DatasetField = 'PRECIO_NETO'
                TableField = 'PRECIO_NETO'
              end
              item
                DatasetField = 'REFERENCIA_PROV'
                TableField = 'REFERENCIA_PROV'
              end
              item
                DatasetField = 'INVENTARIABLE'
                TableField = 'INVENTARIABLE'
              end
              item
                DatasetField = 'ELIMINADO'
                TableField = 'ELIMINADO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'FAMILIA'
                TableField = 'FAMILIA'
              end
              item
                DatasetField = 'COMISIONABLE'
                TableField = 'COMISIONABLE'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'TIENDA_WEB'
                TableField = 'TIENDA_WEB'
              end>
          end>
        Name = 'Articulos_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'COMISIONABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_COSTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INVENTARIABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ELIMINADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Eliminado'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIENDA_WEB'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = #191'En tienda web?'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_CLIENTE'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_ARTICULOS'
            SQL = 
              'SELECT V_ARTICULOS.ID, V_ARTICULOS.ID_EMPRESA, V_ARTICULOS.REFER' +
              'ENCIA, V_ARTICULOS.DESCRIPCION,'#10'       V_ARTICULOS.FAMILIA, V_AR' +
              'TICULOS.COMISIONABLE, V_ARTICULOS.FECHA_ALTA,'#10'       V_ARTICULOS' +
              '.FECHA_MODIFICACION, V_ARTICULOS.USUARIO,'#10'       V_ARTICULOS.REF' +
              'ERENCIA_PROV,'#10'       V_ARTICULOS.PRECIO_COSTE,'#10'       V_ARTICULO' +
              'S.PRECIO_PORTE,'#10'       CLIENTES_DTOS_PROVEEDORES.DESCUENTO,'#10'    ' +
              '   V_ARTICULOS.PRECIO_NETO,'#10'       V_ARTICULOS.INVENTARIABLE,'#10'  ' +
              '     V_ARTICULOS.ID_PROVEEDOR,'#10'       V_ARTICULOS.NOMBRE_PROVEED' +
              'OR,'#10'       V_ARTICULOS.ELIMINADO, V_ARTICULOS.TIENDA_WEB'#10'FROM V_' +
              'ARTICULOS'#10'LEFT OUTER JOIN CLIENTES_DTOS_PROVEEDORES'#10'ON ((CLIENTE' +
              'S_DTOS_PROVEEDORES.ID_PROVEEDOR = V_ARTICULOS.ID_PROVEEDOR)'#10'AND ' +
              '(CLIENTES_DTOS_PROVEEDORES.ID_CLIENTE = :ID_CLIENTE))'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'FAMILIA'
                TableField = 'FAMILIA'
              end
              item
                DatasetField = 'COMISIONABLE'
                TableField = 'COMISIONABLE'
              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 = 'REFERENCIA_PROV'
                TableField = 'REFERENCIA_PROV'
              end
              item
                DatasetField = 'PRECIO_COSTE'
                TableField = 'PRECIO_COSTE'
              end
              item
                DatasetField = 'PRECIO_PORTE'
                TableField = 'PRECIO_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'PRECIO_NETO'
                TableField = 'PRECIO_NETO'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE_PROVEEDOR'
                TableField = 'NOMBRE_PROVEEDOR'
              end
              item
                DatasetField = 'INVENTARIABLE'
                TableField = 'INVENTARIABLE'
              end
              item
                DatasetField = 'ELIMINADO'
                TableField = 'ELIMINADO'
              end
              item
                DatasetField = 'TIENDA_WEB'
                TableField = 'TIENDA_WEB'
              end>
          end>
        Name = 'ArticulosParaCliente'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'COMISIONABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_COSTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRECIO_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INVENTARIABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ELIMINADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Eliminado'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIENDA_WEB'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = #191'En tienda web?'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'COMISIONABLE'
            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 = 'PRECIO_COSTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRECIO_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRECIO_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INVENTARIABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ELIMINADO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIENDA_WEB'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ARTICULOS'
            SQL = 
              'INSERT'#10'  INTO ARTICULOS'#10'    (ID, ID_EMPRESA, REFERENCIA, DESCRIP' +
              'CION, FAMILIA,'#10'     COMISIONABLE, FECHA_ALTA, FECHA_MODIFICACION' +
              ', USUARIO, '#10'     PRECIO_COSTE, PRECIO_PORTE, DESCUENTO, ID_PROVE' +
              'EDOR, '#10'     PRECIO_NETO, REFERENCIA_PROV, INVENTARIABLE, ELIMINA' +
              'DO,'#10'     TIENDA_WEB)'#10'  VALUES'#10'    (:ID, :ID_EMPRESA, :REFERENCIA' +
              ', :DESCRIPCION, :FAMILIA, '#10'     :COMISIONABLE, :FECHA_ALTA, :FEC' +
              'HA_MODIFICACION,'#10'     :USUARIO, :PRECIO_COSTE, :PRECIO_PORTE, :D' +
              'ESCUENTO, '#10'     :ID_PROVEEDOR, :PRECIO_NETO, :REFERENCIA_PROV,'#10' ' +
              '    :INVENTARIABLE, :ELIMINADO, :TIENDA_WEB)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_Articulos'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ARTICULOS'
            SQL = 'UPDATE ARTICULOS'#10'SET ELIMINADO = 1'#10'WHERE (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_Articulos'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'COMISIONABLE'
            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 = 'PRECIO_COSTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRECIO_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRECIO_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INVENTARIABLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ELIMINADO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIENDA_WEB'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'ARTICULOS'
            SQL = 
              'UPDATE ARTICULOS'#10'  SET '#10'    ID = :ID, '#10'    ID_EMPRESA = :ID_EMPR' +
              'ESA, '#10'    REFERENCIA = :REFERENCIA, '#10'    DESCRIPCION = :DESCRIPC' +
              'ION, '#10'    FAMILIA = :FAMILIA, '#10'    COMISIONABLE = :COMISIONABLE,' +
              #10'    FECHA_ALTA = :FECHA_ALTA, '#10'    FECHA_MODIFICACION = :FECHA_' +
              'MODIFICACION, '#10'    USUARIO = :USUARIO, '#10'    PRECIO_COSTE = :PREC' +
              'IO_COSTE, '#10'    PRECIO_PORTE = :PRECIO_PORTE, '#10'    DESCUENTO = :D' +
              'ESCUENTO, '#10'    ID_PROVEEDOR = :ID_PROVEEDOR, '#10'    PRECIO_NETO = ' +
              ':PRECIO_NETO,'#10'    INVENTARIABLE = :INVENTARIABLE,'#10'    REFERENCIA' +
              '_PROV = :REFERENCIA_PROV,'#10'    ELIMINADO = :ELIMINADO,'#10'    TIENDA' +
              '_WEB = :TIENDA_WEB'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_Articulos'
      end>
    RelationShips = <>
    UpdateRules = <
      item
        Name = 'Insert Articulos'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'Articulos'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update Articulos'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'Articulos'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete Articulos'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'Articulos'
        FailureBehaviour = fbRaiseException
      end>
    Left = 48
    Top = 24
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 72
  end
  object bpArticulos: TDABusinessProcessor
    Schema = schArticulos
    InsertCommandName = 'Insert_Articulos'
    DeleteCommandName = 'Delete_Articulos'
    UpdateCommandName = 'Update_Articulos'
    RefreshDatasetName = 'Articulos_Refresh'
    ReferencedDataset = 'Articulos'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 264
    Top = 24
  end
end
