object srvPedidosProveedor: TsrvPedidosProveedor
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  RequiresSession = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schPedidosProveedor
  ServiceAdapter = DABINAdapter
  OnBeforeAcquireConnection = DARemoteServiceBeforeAcquireConnection
  OnBeforeGetDatasetData = DARemoteServiceBeforeGetDatasetData
  Height = 490
  Width = 473
  object schPedidosProveedor: 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 = 'PEDIDOS_PROVEEDOR'
            SQL = 
              'SELECT '#10'    ID, ID_EMPRESA, ID_PROVEEDOR, NOMBRE, REFERENCIA, SI' +
              'TUACION, '#10'    FECHA_ENVIO, FECHA_PEDIDO, FECHA_CONFIRMACION, FEC' +
              'HA_ENTREGA, '#10'    ID_ALMACEN, NOMBRE_ALMACEN, OBSERVACIONES, IMPO' +
              'RTE_TOTAL, '#10'    INCIDENCIAS, INCIDENCIAS_ACTIVAS, CALLE, POBLACI' +
              'ON, '#10'    PROVINCIA, CODIGO_POSTAL, PERSONA_CONTACTO, TELEFONO, '#10 +
              '    FECHA_ALTA, FECHA_MODIFICACION, USUARIO, ID_PEDIDO_CLIENTE, ' +
              #10'    REF_PED_CLIENTE, IMPORTE_NETO, IMPORTE_PORTE, DESCUENTO, '#10' ' +
              '   IMPORTE_DESCUENTO, BASE_IMPONIBLE, IVA, IMPORTE_IVA, '#10'    ID_' +
              'FORMA_PAGO, NUM_COPIAS'#10'  FROM'#10'    V_PEDIDOS_PROVEEDOR'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'FECHA_ENVIO'
                TableField = 'FECHA_ENVIO'
              end
              item
                DatasetField = 'FECHA_PEDIDO'
                TableField = 'FECHA_PEDIDO'
              end
              item
                DatasetField = 'FECHA_CONFIRMACION'
                TableField = 'FECHA_CONFIRMACION'
              end
              item
                DatasetField = 'FECHA_ENTREGA'
                TableField = 'FECHA_ENTREGA'
              end
              item
                DatasetField = 'ID_ALMACEN'
                TableField = 'ID_ALMACEN'
              end
              item
                DatasetField = 'NOMBRE_ALMACEN'
                TableField = 'NOMBRE_ALMACEN'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'INCIDENCIAS'
                TableField = 'INCIDENCIAS'
              end
              item
                DatasetField = 'INCIDENCIAS_ACTIVAS'
                TableField = 'INCIDENCIAS_ACTIVAS'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'TELEFONO'
                TableField = 'TELEFONO'
              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 = 'ID_PEDIDO_CLIENTE'
                TableField = 'ID_PEDIDO_CLIENTE'
              end
              item
                DatasetField = 'REF_PED_CLIENTE'
                TableField = 'REF_PED_CLIENTE'
              end
              item
                DatasetField = 'IMPORTE_NETO'
                TableField = 'IMPORTE_NETO'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IMPORTE_DESCUENTO'
                TableField = 'IMPORTE_DESCUENTO'
              end
              item
                DatasetField = 'BASE_IMPONIBLE'
                TableField = 'BASE_IMPONIBLE'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'IMPORTE_IVA'
                TableField = 'IMPORTE_IVA'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'NUM_COPIAS'
                TableField = 'NUM_COPIAS'
              end>
          end>
        Name = 'PedidosProveedor'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            ServerAutoRefresh = True
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_ENVIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_PEDIDO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_CONFIRMACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_CONFIRMACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ENTREGA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_ENTREGA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_ALMACEN'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_NOMBRE_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_INCIDENCIAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_INCIDENCIAS_ACTIVAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_CODIGO_POSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_PERSONA_CONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_TELEFONO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_PEDIDO_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REF_PED_CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_REF_PED_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_NETO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_BASE_IMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_FORMA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NUM_COPIAS'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'SELECT'#10'    PEDIDOS_PROVEEDOR_DETALLES.ID, PEDIDOS_PROVEEDOR_DETA' +
              'LLES.ID_PEDIDO,'#10'    PEDIDOS_PROVEEDOR_DETALLES.POSICION, PEDIDOS' +
              '_PROVEEDOR_DETALLES.TIPO_DETALLE,'#10'    PEDIDOS_PROVEEDOR_DETALLES' +
              '.CONCEPTO, PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD,'#10'    PEDIDOS_PROV' +
              'EEDOR_DETALLES.IMPORTE_UNIDAD, PEDIDOS_PROVEEDOR_DETALLES.IMPORT' +
              'E_TOTAL,'#10'    PEDIDOS_PROVEEDOR_DETALLES.VISIBLE,'#10#10'    PEDIDOS_PR' +
              'OVEEDOR_DETALLES.ID_ARTICULO, PEDIDOS_PROVEEDOR_DETALLES.DESCUEN' +
              'TO,'#10'    PEDIDOS_PROVEEDOR_DETALLES.IMPORTE_PORTE,'#10'    ARTICULOS.' +
              'REFERENCIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'F' +
              'ROM PEDIDOS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON PEDIDOS_PR' +
              'OVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE PEDIDOS_PROVEE' +
              'DOR_DETALLES.ID_PEDIDO = :ID_PEDIDO'#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 = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              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 = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end>
          end>
        Name = 'PedidosProveedor_Detalles'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = True
            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
            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 = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            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 = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            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 = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'SELECT'#10'    PEDIDOS_PROVEEDOR_DETALLES.ID, PEDIDOS_PROVEEDOR_DETA' +
              'LLES.ID_PEDIDO,'#10'    PEDIDOS_PROVEEDOR_DETALLES.POSICION, PEDIDOS' +
              '_PROVEEDOR_DETALLES.TIPO_DETALLE,'#10'    PEDIDOS_PROVEEDOR_DETALLES' +
              '.CONCEPTO, PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD,'#10'    PEDIDOS_PROV' +
              'EEDOR_DETALLES.IMPORTE_UNIDAD, PEDIDOS_PROVEEDOR_DETALLES.IMPORT' +
              'E_TOTAL,'#10'    PEDIDOS_PROVEEDOR_DETALLES.VISIBLE,'#10#10'    PEDIDOS_PR' +
              'OVEEDOR_DETALLES.ID_ARTICULO, PEDIDOS_PROVEEDOR_DETALLES.DESCUEN' +
              'TO,'#10'    PEDIDOS_PROVEEDOR_DETALLES.IMPORTE_PORTE,'#10'    ARTICULOS.' +
              'REFERENCIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'F' +
              'ROM PEDIDOS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON PEDIDOS_PR' +
              'OVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE PEDIDOS_PROVEE' +
              'DOR_DETALLES.ID_PEDIDO = :ID_PEDIDO'#10'AND PEDIDOS_PROVEEDOR_DETALL' +
              'ES.ID = :ID'#10'ORDER BY POSICION;'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = '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 = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              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 = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end>
          end>
        Name = 'PedidosProveedor_Detalles_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = True
            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
            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 = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            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 = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            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 = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR'
            SQL = 
              'SELECT '#10'    ID, ID_EMPRESA, ID_PROVEEDOR, NOMBRE, REFERENCIA, SI' +
              'TUACION, '#10'    FECHA_ENVIO, FECHA_PEDIDO, FECHA_CONFIRMACION, FEC' +
              'HA_ENTREGA, '#10'    ID_ALMACEN, NOMBRE_ALMACEN, OBSERVACIONES, IMPO' +
              'RTE_TOTAL, '#10'    INCIDENCIAS, INCIDENCIAS_ACTIVAS, CALLE, POBLACI' +
              'ON, '#10'    PROVINCIA, CODIGO_POSTAL, PERSONA_CONTACTO, TELEFONO, '#10 +
              '    FECHA_ALTA, FECHA_MODIFICACION, USUARIO, ID_PEDIDO_CLIENTE, ' +
              #10'    REF_PED_CLIENTE, IMPORTE_NETO, IMPORTE_PORTE, DESCUENTO, '#10' ' +
              '   IMPORTE_DESCUENTO, BASE_IMPONIBLE, IVA, IMPORTE_IVA, '#10'    ID_' +
              'FORMA_PAGO, NUM_COPIAS'#10'  FROM'#10'    V_PEDIDOS_PROVEEDOR'#10'WHERE V_PE' +
              'DIDOS_PROVEEDOR.ID = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'FECHA_ENVIO'
                TableField = 'FECHA_ENVIO'
              end
              item
                DatasetField = 'FECHA_PEDIDO'
                TableField = 'FECHA_PEDIDO'
              end
              item
                DatasetField = 'FECHA_CONFIRMACION'
                TableField = 'FECHA_CONFIRMACION'
              end
              item
                DatasetField = 'FECHA_ENTREGA'
                TableField = 'FECHA_ENTREGA'
              end
              item
                DatasetField = 'ID_ALMACEN'
                TableField = 'ID_ALMACEN'
              end
              item
                DatasetField = 'NOMBRE_ALMACEN'
                TableField = 'NOMBRE_ALMACEN'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'INCIDENCIAS'
                TableField = 'INCIDENCIAS'
              end
              item
                DatasetField = 'INCIDENCIAS_ACTIVAS'
                TableField = 'INCIDENCIAS_ACTIVAS'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'TELEFONO'
                TableField = 'TELEFONO'
              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 = 'ID_PEDIDO_CLIENTE'
                TableField = 'ID_PEDIDO_CLIENTE'
              end
              item
                DatasetField = 'REF_PED_CLIENTE'
                TableField = 'REF_PED_CLIENTE'
              end
              item
                DatasetField = 'IMPORTE_NETO'
                TableField = 'IMPORTE_NETO'
              end
              item
                DatasetField = 'IMPORTE_PORTE'
                TableField = 'IMPORTE_PORTE'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IMPORTE_DESCUENTO'
                TableField = 'IMPORTE_DESCUENTO'
              end
              item
                DatasetField = 'BASE_IMPONIBLE'
                TableField = 'BASE_IMPONIBLE'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'IMPORTE_IVA'
                TableField = 'IMPORTE_IVA'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'NUM_COPIAS'
                TableField = 'NUM_COPIAS'
              end>
          end>
        Name = 'PedidosProveedor_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            ServerAutoRefresh = True
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_ENVIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_PEDIDO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_CONFIRMACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_CONFIRMACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ENTREGA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_ENTREGA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_ALMACEN'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_NOMBRE_ALMACEN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_INCIDENCIAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_INCIDENCIAS_ACTIVAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_CODIGO_POSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_PERSONA_CONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_TELEFONO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PEDIDO_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_PEDIDO_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REF_PED_CLIENTE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_REF_PED_CLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_NETO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_PORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_DESCUENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASE_IMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_BASE_IMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_IVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_IMPORTE_IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_ID_FORMA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NUM_COPIAS'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_PED_PROV_ARTICULOS'
            SQL = 
              'select V_PED_PROV_ARTICULOS.ID_PEDIDO,'#10'       ARTICULOS.REFERENC' +
              'IA,'#10'       V_PED_PROV_ARTICULOS.ID_ARTICULO,'#10'       ARTICULOS.DE' +
              'SCRIPCION as CONCEPTO,'#10'       V_PED_PROV_ARTICULOS.CANTIDAD_PEND' +
              'IENTE as CANTIDAD,'#10'       ARTICULOS.REFERENCIA_PROV as REFERENCI' +
              'A_PROVEEDOR'#10#10'FROM V_PED_PROV_ARTICULOS'#10'LEFT JOIN ARTICULOS ON (A' +
              'RTICULOS.ID = V_PED_PROV_ARTICULOS.ID_ARTICULO)'#10'WHERE (V_PED_PRO' +
              'V_ARTICULOS.CANTIDAD_PENDIENTE <> 0)'#10'AND (V_PED_PROV_ARTICULOS.I' +
              'D_PEDIDO = :ID)'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'ID_ARTICULO'
                TableField = 'ID_ARTICULO'
              end
              item
                DatasetField = 'CONCEPTO'
                TableField = 'CONCEPTO'
              end
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end>
          end>
        Name = 'PedidosProveedor_Articulos_Pendientes'
        Fields = <
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_Detalles_ID_PEDIDO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_Detalles_ID_ARTICULO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_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 = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA_PROVEEDOR'
            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 = 'PEDIDOS_PROVEEDOR'
            SQL = 'DELETE '#10'  FROM'#10'    PEDIDOS_PROVEEDOR'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_PedidosProveedor'
      end
      item
        Params = <
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'INSERT'#10'  INTO PEDIDOS_PROVEEDOR_DETALLES'#10'    (CANTIDAD, POSICION' +
              ', ID, TIPO_DETALLE, CONCEPTO, IMPORTE_UNIDAD, '#10'     IMPORTE_TOTA' +
              'L, VISIBLE, ID_PEDIDO,'#10'     ID_ARTICULO, DESCUENTO, IMPORTE_PORT' +
              'E)'#10'  VALUES'#10'    (:CANTIDAD, :POSICION, :ID, :TIPO_DETALLE, :CONC' +
              'EPTO, '#10'     :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VISIBLE, :ID_PEDID' +
              'O, '#10'     :ID_ARTICULO, :DESCUENTO, :IMPORTE_PORTE)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_PedidosProveedor_Detalles'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'DELETE '#10'  FROM'#10'    PEDIDOS_PROVEEDOR_DETALLES'#10'  WHERE'#10'    (ID = ' +
              ':OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_PedidosProveedor_Detalles'
      end
      item
        Params = <
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'VISIBLE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ARTICULO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'UPDATE PEDIDOS_PROVEEDOR_DETALLES'#10'  SET '#10'    CANTIDAD = :CANTIDA' +
              'D, '#10'    POSICION = :POSICION, '#10'    ID = :ID, '#10'    TIPO_DETALLE =' +
              ' :TIPO_DETALLE, '#10'    CONCEPTO = :CONCEPTO, '#10'    IMPORTE_UNIDAD =' +
              ' :IMPORTE_UNIDAD, '#10'    IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10'    VISI' +
              'BLE = :VISIBLE, '#10'    ID_PEDIDO = :ID_PEDIDO, '#10'    ID_ARTICULO = ' +
              ':ID_ARTICULO,'#10'    DESCUENTO = :DESCUENTO,'#10'    IMPORTE_PORTE = :I' +
              'MPORTE_PORTE'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_PedidosProveedor_Detalles'
      end
      item
        Params = <
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          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 = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_PEDIDO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_CONFIRMACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ENTREGA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = '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 = 'ID_PEDIDO_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'BASE_IMPONIBLE'
            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 = 'ID_FORMA_PAGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR'
            SQL = 
              'INSERT'#10'  INTO PEDIDOS_PROVEEDOR'#10'    (USUARIO, OBSERVACIONES, REF' +
              'ERENCIA, ID, ID_EMPRESA,'#10'     FECHA_ALTA, FECHA_MODIFICACION, ID' +
              '_PROVEEDOR, FECHA_ENVIO,'#10'     FECHA_PEDIDO, FECHA_CONFIRMACION, ' +
              'FECHA_ENTREGA, INCIDENCIAS, '#10'     IMPORTE_TOTAL, INCIDENCIAS_ACT' +
              'IVAS, ID_ALMACEN, CALLE, '#10'     POBLACION, PROVINCIA, CODIGO_POST' +
              'AL, PERSONA_CONTACTO, '#10'     TELEFONO, ID_PEDIDO_CLIENTE, IMPORTE' +
              '_NETO, IMPORTE_PORTE, '#10'     DESCUENTO, IMPORTE_DESCUENTO, BASE_I' +
              'MPONIBLE, IVA, '#10'     IMPORTE_IVA, ID_FORMA_PAGO)'#10'  VALUES'#10'    (:' +
              'USUARIO, :OBSERVACIONES, :REFERENCIA, :ID,'#10'     :ID_EMPRESA, :FE' +
              'CHA_ALTA, :FECHA_MODIFICACION,'#10'     :ID_PROVEEDOR, :FECHA_ENVIO,' +
              ' :FECHA_PEDIDO, :FECHA_CONFIRMACION,'#10'     :FECHA_ENTREGA, :INCID' +
              'ENCIAS, :IMPORTE_TOTAL, :INCIDENCIAS_ACTIVAS, '#10'     :ID_ALMACEN,' +
              ' :CALLE, :POBLACION, :PROVINCIA, :CODIGO_POSTAL, '#10'     :PERSONA_' +
              'CONTACTO, :TELEFONO, :ID_PEDIDO_CLIENTE, :IMPORTE_NETO, '#10'     :I' +
              'MPORTE_PORTE, :DESCUENTO, :IMPORTE_DESCUENTO, :BASE_IMPONIBLE, '#10 +
              '     :IVA, :IMPORTE_IVA, :ID_FORMA_PAGO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_PedidosProveedor'
      end
      item
        Params = <
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_EMPRESA'
            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 = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_PEDIDO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_CONFIRMACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_ENTREGA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS'
            DataType = datMemo
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'INCIDENCIAS_ACTIVAS'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = '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 = 'ID_PEDIDO_CLIENTE'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_NETO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_PORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE_DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'BASE_IMPONIBLE'
            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 = 'ID_FORMA_PAGO'
            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 = 'PEDIDOS_PROVEEDOR'
            SQL = 
              'UPDATE PEDIDOS_PROVEEDOR'#10'  SET '#10'    USUARIO = :USUARIO, '#10'    OBS' +
              'ERVACIONES = :OBSERVACIONES, '#10'    REFERENCIA = :REFERENCIA,'#10'    ' +
              'ID_EMPRESA = :ID_EMPRESA,'#10'    FECHA_ALTA = :FECHA_ALTA,'#10'    FECH' +
              'A_MODIFICACION = :FECHA_MODIFICACION, '#10'    ID_PROVEEDOR = :ID_PR' +
              'OVEEDOR, '#10'    FECHA_ENVIO = :FECHA_ENVIO,'#10'    FECHA_PEDIDO = :FE' +
              'CHA_PEDIDO, '#10'    FECHA_CONFIRMACION = :FECHA_CONFIRMACION, '#10'    ' +
              'FECHA_ENTREGA = :FECHA_ENTREGA, '#10'    INCIDENCIAS = :INCIDENCIAS,' +
              ' '#10'    IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10'    INCIDENCIAS_ACTIVAS =' +
              ' :INCIDENCIAS_ACTIVAS, '#10'    ID_ALMACEN = :ID_ALMACEN, '#10'    CALLE' +
              ' = :CALLE, '#10'    POBLACION = :POBLACION, '#10'    PROVINCIA = :PROVIN' +
              'CIA, '#10'    CODIGO_POSTAL = :CODIGO_POSTAL, '#10'    PERSONA_CONTACTO ' +
              '= :PERSONA_CONTACTO, '#10'    TELEFONO = :TELEFONO, '#10'    ID_PEDIDO_C' +
              'LIENTE = :ID_PEDIDO_CLIENTE, '#10'    IMPORTE_NETO = :IMPORTE_NETO, ' +
              #10'    IMPORTE_PORTE = :IMPORTE_PORTE, '#10'    DESCUENTO = :DESCUENTO' +
              ', '#10'    IMPORTE_DESCUENTO = :IMPORTE_DESCUENTO, '#10'    BASE_IMPONIB' +
              'LE = :BASE_IMPONIBLE, '#10'    IVA = :IVA, '#10'    IMPORTE_IVA = :IMPOR' +
              'TE_IVA, '#10'    ID_FORMA_PAGO = :ID_FORMA_PAGO'#10'  WHERE'#10'    (ID = :O' +
              'LD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_PedidosProveedor'
      end>
    RelationShips = <>
    UpdateRules = <
      item
        Name = 'Insert PedidosProveedor'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'PedidosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert PedidosProveedor_Detalles'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'PedidosProveedor_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update PedidosProveedor'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'PedidosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update PedidosProveedor_Detalles'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'PedidosProveedor_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete PedidosProveedor_Detalles'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'PedidosProveedor_Detalles'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete PedidosProveedor'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'PedidosProveedor'
        FailureBehaviour = fbRaiseException
      end>
    Left = 88
    Top = 24
  end
  object DABINAdapter: TDABINAdapter
    Left = 88
    Top = 88
  end
  object bpPedidosProveedor: TDABusinessProcessor
    Schema = schPedidosProveedor
    InsertCommandName = 'Insert_PedidosProveedor'
    DeleteCommandName = 'Delete_PedidosProveedor'
    UpdateCommandName = 'Update_PedidosProveedor'
    RefreshDatasetName = 'PedidosProveedor_Refresh'
    ReferencedDataset = 'PedidosProveedor'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 240
    Top = 24
  end
  object bpPedidosProveedor_Detalles: TDABusinessProcessor
    Schema = schPedidosProveedor
    InsertCommandName = 'Insert_PedidosProveedor_Detalles'
    DeleteCommandName = 'Delete_PedidosProveedor_Detalles'
    UpdateCommandName = 'Update_PedidosProveedor_Detalles'
    RefreshDatasetName = 'PedidosProveedor_Detalles_Refresh'
    ReferencedDataset = 'PedidosProveedor_Detalles'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 240
    Top = 88
  end
  object DADataDictionary: TDADataDictionary
    Fields = <
      item
        Name = 'PedidosProveedor_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_ID_EMPRESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_EMPRESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_NOMBRE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Nombre del proveedor'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_FECHA_PEDIDO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Fecha pedido'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_CALLE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Calle'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_CODIGO_POSTAL'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'C'#243'd. postal'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_POBLACION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Poblaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_PROVINCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Provincia'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_PERSONA_CONTACTO'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Persona de contacto'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_TELEFONO'
        DataType = datString
        Size = 25
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Tel'#233'fono'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_OBSERVACIONES'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Observaciones'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_INCIDENCIAS'
        DataType = datMemo
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'INCIDENCIAS'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_INCIDENCIAS_ACTIVAS'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'INCIDENCIAS_ACTIVAS'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_USUARIO'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_IMPORTE_NETO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe neto'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_IMPORTE_PORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe del porte'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Descuento'
        DisplayFormat = ',0.00 %;-,0.00 %'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_IMPORTE_DESCUENTO'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe dto.'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_BASE_IMPONIBLE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Base imponible'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_IVA'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IVA'
        DisplayFormat = ',0.00 %;-,0.00 %'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_IMPORTE_IVA'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe IVA'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_ID_FORMA_PAGO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_FORMA_PAGO'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_ID'
        DataType = datAutoInc
        BlobType = dabtUnknown
        Required = True
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_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 = 'PedidosProveedor_Detalles_TIPO_DETALLE'
        DataType = datString
        Size = 10
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'TIPO_DETALLE'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_REFERENCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Referencia'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_ID_ARTICULO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_ARTICULO'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_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 = 'PedidosProveedor_Detalles_IMPORTE_UNIDAD'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe unidad'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe total'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_DESCUENTO'
        DataType = datFloat
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Descuento'
        DisplayFormat = ',0.00 %;-,0.00 %'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_IMPORTE_PORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Importe porte'
        Alignment = taRightJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_VISIBLE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'VISIBLE'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_Detalles_REFERENCIA_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Ref. proveedor'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_ID_PROVEEDOR'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_FECHA_CONFIRMACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = #191'Confirmado?'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_FECHA_ENTREGA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Entrega prevista'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_SITUACION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Situaci'#243'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_ID_ALMACEN'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_ID_PEDIDO_CLIENTE'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_REFERENCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'REFERENCIA'
        Alignment = taLeftJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'PedidosProveedor_FECHA_ENVIO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = #191'Enviado?'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_NOMBRE_ALMACEN'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Almac'#233'n'
        Alignment = taLeftJustify
      end
      item
        Name = 'PedidosProveedor_REF_PED_CLIENTE'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end>
    Left = 88
    Top = 152
  end
end
