object srvRecibosProveedor: TsrvRecibosProveedor
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  RequiresSession = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schRecibosProveedor
  ServiceAdapter = DABINAdapter
  OnBeforeAcquireConnection = DARemoteServiceBeforeAcquireConnection
  OnBeforeGetDatasetData = DARemoteServiceBeforeGetDatasetData
  Height = 247
  Width = 347
  object schRecibosProveedor: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DADataDictionary
    Datasets = <
      item
        Params = <
          item
            Name = 'ID'
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_RECIBOS_PROVEEDOR'
            SQL = 
              'SELECT ID,'#10'       ID_RECIBO_COMPENSADO,'#10'       REFERENCIA,'#10'     ' +
              '  SITUACION,'#10'       ID_FACTURA,'#10'       FECHA_EMISION,'#10'       FEC' +
              'HA_VENCIMIENTO,'#10'       IMPORTE,'#10'       OTROS_GASTOS,'#10'       IMPO' +
              'RTE_TOTAL,'#10'       FECHA_FACTURA,'#10'       IMPORTE_FACTURA,'#10'       ' +
              'ID_PROVEEDOR,'#10'       NOMBRE_PROVEEDOR,'#10'       NIF_CIF_PROVEEDOR,' +
              #10'       ID_EMPRESA'#10#10'FROM V_RECIBOS_PROVEEDOR'#10'WHERE ID_RECIBO_COM' +
              'PENSADO = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_RECIBO_COMPENSADO'
                TableField = 'ID_RECIBO_COMPENSADO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'FECHA_EMISION'
                TableField = 'FECHA_EMISION'
              end
              item
                DatasetField = 'FECHA_VENCIMIENTO'
                TableField = 'FECHA_VENCIMIENTO'
              end
              item
                DatasetField = 'IMPORTE'
                TableField = 'IMPORTE'
              end
              item
                DatasetField = 'OTROS_GASTOS'
                TableField = 'OTROS_GASTOS'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'FECHA_FACTURA'
                TableField = 'FECHA_FACTURA'
              end
              item
                DatasetField = 'IMPORTE_FACTURA'
                TableField = 'IMPORTE_FACTURA'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE_PROVEEDOR'
                TableField = 'NOMBRE_PROVEEDOR'
              end
              item
                DatasetField = 'NIF_CIF_PROVEEDOR'
                TableField = 'NIF_CIF_PROVEEDOR'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end>
          end>
        Name = 'RecibosCompensadosProv'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_RECIBO_COMPENSADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 9
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_EMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OTROS_GASTOS'
            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 = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_FACTURA'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIF_CIF_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_RECIBOS_PROVEEDOR'
            SQL = 
              'SELECT ID,'#10'       ID_RECIBO_COMPENSADO,'#10'       REFERENCIA_REC_CO' +
              'MPENSADO,'#10'       REFERENCIA,'#10'       REFERENCIA_PROVEEDOR,'#10'      ' +
              ' SITUACION,'#10'       ID_FACTURA,'#10'       ID_REMESA,'#10'       REFERENC' +
              'IA_REMESA,'#10'       FECHA_EMISION,'#10'       FECHA_VENCIMIENTO,'#10'     ' +
              '  DESCRIPCION,'#10'       OBSERVACIONES,'#10'       IMPORTE,'#10'       OTRO' +
              'S_GASTOS,'#10'       IMPORTE_TOTAL,'#10'       FECHA_FACTURA,'#10'       REF' +
              'ERENCIA_FACTURA_PROV,'#10'       FORMA_PAGO_FACTURA,'#10'       IMPORTE_' +
              'FACTURA,'#10'       ID_PROVEEDOR,'#10'       NOMBRE_PROVEEDOR,'#10'       NI' +
              'F_CIF_PROVEEDOR,'#10'       ENTIDAD_PROVEEDOR,'#10'       SUCURSAL_PROVE' +
              'EDOR,'#10'       DC_PROVEEDOR,'#10'       CUENTA_PROVEEDOR,'#10'       ID_EM' +
              'PRESA,'#10'       FECHA_ALTA,'#10'       FECHA_MODIFICACION,'#10'       USUA' +
              'RIO'#10#10'FROM V_RECIBOS_PROVEEDOR'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'FECHA_EMISION'
                TableField = 'FECHA_EMISION'
              end
              item
                DatasetField = 'FECHA_VENCIMIENTO'
                TableField = 'FECHA_VENCIMIENTO'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'IMPORTE'
                TableField = 'IMPORTE'
              end
              item
                DatasetField = 'OTROS_GASTOS'
                TableField = 'OTROS_GASTOS'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'FECHA_FACTURA'
                TableField = 'FECHA_FACTURA'
              end
              item
                DatasetField = 'FORMA_PAGO_FACTURA'
                TableField = 'FORMA_PAGO_FACTURA'
              end
              item
                DatasetField = 'IMPORTE_FACTURA'
                TableField = 'IMPORTE_FACTURA'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE_PROVEEDOR'
                TableField = 'NOMBRE_PROVEEDOR'
              end
              item
                DatasetField = 'NIF_CIF_PROVEEDOR'
                TableField = 'NIF_CIF_PROVEEDOR'
              end
              item
                DatasetField = 'ENTIDAD_PROVEEDOR'
                TableField = 'ENTIDAD_PROVEEDOR'
              end
              item
                DatasetField = 'SUCURSAL_PROVEEDOR'
                TableField = 'SUCURSAL_PROVEEDOR'
              end
              item
                DatasetField = 'DC_PROVEEDOR'
                TableField = 'DC_PROVEEDOR'
              end
              item
                DatasetField = 'CUENTA_PROVEEDOR'
                TableField = 'CUENTA_PROVEEDOR'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'ID_REMESA'
                TableField = 'ID_REMESA'
              end
              item
                DatasetField = 'REFERENCIA_REMESA'
                TableField = 'REFERENCIA_REMESA'
              end
              item
                DatasetField = 'REFERENCIA_FACTURA_PROV'
                TableField = 'REFERENCIA_FACTURA_PROV'
              end
              item
                DatasetField = 'ID_RECIBO_COMPENSADO'
                TableField = 'ID_RECIBO_COMPENSADO'
              end
              item
                DatasetField = 'REFERENCIA_REC_COMPENSADO'
                TableField = 'REFERENCIA_REC_COMPENSADO'
              end>
          end>
        Name = 'RecibosProveedor'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_RECIBO_COMPENSADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_RECIBO_COMPENSADO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_REC_COMPENSADO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA_REC_COMPENSADO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 9
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_REMESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_REMESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_REMESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA_REMESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_EMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_EMISION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_VENCIMIENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_DESCRIPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_IMPORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OTROS_GASTOS'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_OTROS_GASTOS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_FACTURA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA_FACTURA_PROV'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FORMA_PAGO_FACTURA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FORMA_PAGO_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_FACTURA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_IMPORTE_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_NOMBRE_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIF_CIF_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_NIF_CIF_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ENTIDAD_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ENTIDAD_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SUCURSAL_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_SUCURSAL_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DC_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_DC_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CUENTA_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_CUENTA_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosCliente_USUARIO'
            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 = 'V_RECIBOS_PROVEEDOR'
            SQL = 
              'SELECT ID,'#10'       ID_RECIBO_COMPENSADO,'#10'       REFERENCIA_REC_CO' +
              'MPENSADO,'#10'       REFERENCIA,'#10'       REFERENCIA_PROVEEDOR,'#10'      ' +
              ' SITUACION,'#10'       ID_FACTURA,'#10'       ID_REMESA,'#10'       REFERENC' +
              'IA_REMESA,'#10'       FECHA_EMISION,'#10'       FECHA_VENCIMIENTO,'#10'     ' +
              '  DESCRIPCION,'#10'       OBSERVACIONES,'#10'       IMPORTE,'#10'       OTRO' +
              'S_GASTOS,'#10'       IMPORTE_TOTAL,'#10'       FECHA_FACTURA,'#10'       REF' +
              'ERENCIA_FACTURA_PROV,'#10'       FORMA_PAGO_FACTURA,'#10'       IMPORTE_' +
              'FACTURA,'#10'       ID_PROVEEDOR,'#10'       NOMBRE_PROVEEDOR,'#10'       NI' +
              'F_CIF_PROVEEDOR,'#10'       ENTIDAD_PROVEEDOR,'#10'       SUCURSAL_PROVE' +
              'EDOR,'#10'       DC_PROVEEDOR,'#10'       CUENTA_PROVEEDOR,'#10'       ID_EM' +
              'PRESA,'#10'       FECHA_ALTA,'#10'       FECHA_MODIFICACION,'#10'       USUA' +
              'RIO'#10#10'FROM V_RECIBOS_PROVEEDOR'#10'WHERE'#10'     ID = :ID'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'SITUACION'
                TableField = 'SITUACION'
              end
              item
                DatasetField = 'ID_FACTURA'
                TableField = 'ID_FACTURA'
              end
              item
                DatasetField = 'FECHA_EMISION'
                TableField = 'FECHA_EMISION'
              end
              item
                DatasetField = 'FECHA_VENCIMIENTO'
                TableField = 'FECHA_VENCIMIENTO'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'IMPORTE'
                TableField = 'IMPORTE'
              end
              item
                DatasetField = 'OTROS_GASTOS'
                TableField = 'OTROS_GASTOS'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'FECHA_FACTURA'
                TableField = 'FECHA_FACTURA'
              end
              item
                DatasetField = 'FORMA_PAGO_FACTURA'
                TableField = 'FORMA_PAGO_FACTURA'
              end
              item
                DatasetField = 'IMPORTE_FACTURA'
                TableField = 'IMPORTE_FACTURA'
              end
              item
                DatasetField = 'ID_PROVEEDOR'
                TableField = 'ID_PROVEEDOR'
              end
              item
                DatasetField = 'NOMBRE_PROVEEDOR'
                TableField = 'NOMBRE_PROVEEDOR'
              end
              item
                DatasetField = 'NIF_CIF_PROVEEDOR'
                TableField = 'NIF_CIF_PROVEEDOR'
              end
              item
                DatasetField = 'ENTIDAD_PROVEEDOR'
                TableField = 'ENTIDAD_PROVEEDOR'
              end
              item
                DatasetField = 'SUCURSAL_PROVEEDOR'
                TableField = 'SUCURSAL_PROVEEDOR'
              end
              item
                DatasetField = 'DC_PROVEEDOR'
                TableField = 'DC_PROVEEDOR'
              end
              item
                DatasetField = 'CUENTA_PROVEEDOR'
                TableField = 'CUENTA_PROVEEDOR'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'ID_REMESA'
                TableField = 'ID_REMESA'
              end
              item
                DatasetField = 'REFERENCIA_REMESA'
                TableField = 'REFERENCIA_REMESA'
              end
              item
                DatasetField = 'REFERENCIA_FACTURA_PROV'
                TableField = 'REFERENCIA_FACTURA_PROV'
              end
              item
                DatasetField = 'ID_RECIBO_COMPENSADO'
                TableField = 'ID_RECIBO_COMPENSADO'
              end
              item
                DatasetField = 'REFERENCIA_REC_COMPENSADO'
                TableField = 'REFERENCIA_REC_COMPENSADO'
              end>
          end>
        Name = 'RecibosProveedor_Refresh'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_RECIBO_COMPENSADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_RECIBO_COMPENSADO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_REC_COMPENSADO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA_REC_COMPENSADO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA'
            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
          item
            Name = 'SITUACION'
            DataType = datString
            Size = 9
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_SITUACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_REMESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_REMESA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_EMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_FECHA_EMISION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_VENCIMIENTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_DESCRIPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_IMPORTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OTROS_GASTOS'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_OTROS_GASTOS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_IMPORTE_TOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_FACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA_FACTURA_PROV'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_REFERENCIA_FACTURA_PROV'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FORMA_PAGO_FACTURA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FORMA_PAGO_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTE_FACTURA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_IMPORTE_FACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_PROVEEDOR'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_ID_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_NOMBRE_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIF_CIF_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_NIF_CIF_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ENTIDAD_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_ENTIDAD_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SUCURSAL_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_SUCURSAL_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DC_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_DC_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CUENTA_PROVEEDOR'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_Refresh_CUENTA_PROVEEDOR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_ID_EMPRESA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'RecibosProveedor_USUARIO'
            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 = 'PAGOS_PROVEEDOR'
            SQL = 
              'SELECT '#10'    ID, ID_RECIBO, TIPO, FECHA_PAGO, TITULAR, ENTIDAD, '#10 +
              '    SUCURSAL, DC, CUENTA, FECHA_ALTA, FECHA_MODIFICACION, '#10'    U' +
              'SUARIO'#10'    '#10'FROM PAGOS_PROVEEDOR'#10'WHERE ID_RECIBO = :ID'#10'ORDER BY ' +
              'ID  /*Muy importante no quitar*/'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_RECIBO'
                TableField = 'ID_RECIBO'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'FECHA_PAGO'
                TableField = 'FECHA_PAGO'
              end
              item
                DatasetField = 'TITULAR'
                TableField = 'TITULAR'
              end
              item
                DatasetField = 'ENTIDAD'
                TableField = 'ENTIDAD'
              end
              item
                DatasetField = 'SUCURSAL'
                TableField = 'SUCURSAL'
              end
              item
                DatasetField = 'DC'
                TableField = 'DC'
              end
              item
                DatasetField = 'CUENTA'
                TableField = 'CUENTA'
              end
              item
                DatasetField = 'FECHA_ALTA'
                TableField = 'FECHA_ALTA'
              end
              item
                DatasetField = 'FECHA_MODIFICACION'
                TableField = 'FECHA_MODIFICACION'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end>
          end>
        Name = 'PagosProveedor'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_ID'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ID_RECIBO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_ID_RECIBO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_TIPO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_PAGO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_FECHA_PAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TITULAR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_TITULAR'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ENTIDAD'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_ENTIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'SUCURSAL'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_SUCURSAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DC'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_DC'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CUENTA'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_CUENTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_ALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_FECHA_ALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA_MODIFICACION'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_FECHA_MODIFICACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'PagosProveedor_USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_FACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_EMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OTROS_GASTOS'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'RECIBOS_PROVEEDOR'
            SQL = 
              'INSERT'#10'  INTO RECIBOS_PROVEEDOR'#10'    (ID, ID_FACTURA, REFERENCIA,' +
              ' REFERENCIA_PROVEEDOR, FECHA_EMISION, FECHA_VENCIMIENTO, DESCRIP' +
              'CION, OBSERVACIONES,'#10'    IMPORTE, OTROS_GASTOS, USUARIO)'#10'  VALUE' +
              'S'#10'    (:ID, :ID_FACTURA, :REFERENCIA, :REFERENCIA_PROVEEDOR, :FE' +
              'CHA_EMISION, :FECHA_VENCIMIENTO, :DESCRIPCION, :OBSERVACIONES,'#10' ' +
              '   :IMPORTE, :OTROS_GASTOS, :USUARIO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_RecibosProveedor'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'RECIBOS_PROVEEDOR'
            SQL = 'DELETE '#10'  FROM'#10'    RECIBOS_PROVEEDOR'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_RecibosProveedor'
      end
      item
        Params = <
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_EMISION'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_VENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_REMESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTE'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OTROS_GASTOS'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'RECIBOS_PROVEEDOR'
            SQL = 
              'UPDATE RECIBOS_PROVEEDOR'#10'  SET '#10'    REFERENCIA_PROVEEDOR = :REFE' +
              'RENCIA_PROVEEDOR,'#10'    FECHA_EMISION = :FECHA_EMISION,'#10'    FECHA_' +
              'VENCIMIENTO = :FECHA_VENCIMIENTO,'#10'    DESCRIPCION = :DESCRIPCION' +
              ','#10'    OBSERVACIONES = :OBSERVACIONES,'#10'    ID_REMESA = :ID_REMESA' +
              ','#10'    IMPORTE = :IMPORTE,'#10'    OTROS_GASTOS = :OTROS_GASTOS,'#10'    ' +
              'USUARIO = :USUARIO'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_RecibosProveedor'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_RECIBO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_PAGO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TITULAR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ENTIDAD'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'SUCURSAL'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DC'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CUENTA'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PAGOS_PROVEEDOR'
            SQL = 
              'INSERT'#10'  INTO PAGOS_PROVEEDOR'#10'    (ID, ID_RECIBO, TIPO, FECHA_PA' +
              'GO, TITULAR, ENTIDAD, '#10'     SUCURSAL, DC, CUENTA, USUARIO)'#10'  VAL' +
              'UES'#10'    (:ID, :ID_RECIBO, :TIPO, :FECHA_PAGO, :TITULAR, :ENTIDAD' +
              ', '#10'     :SUCURSAL, :DC, :CUENTA, :USUARIO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_PagosProveedor'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PAGOS_PROVEEDOR'
            SQL = 'DELETE '#10'  FROM'#10'    PAGOS_PROVEEDOR'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_PagosProveedor'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID_RECIBO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA_PAGO'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TITULAR'
            DataType = datString
            Size = 255
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ENTIDAD'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'SUCURSAL'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DC'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CUENTA'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PAGOS_PROVEEDOR'
            SQL = 
              'UPDATE PAGOS_PROVEEDOR'#10'  SET '#10'    ID = :ID, '#10'    ID_RECIBO = :ID' +
              '_RECIBO, '#10'    TIPO = :TIPO, '#10'    FECHA_PAGO = :FECHA_PAGO, '#10'    ' +
              'TITULAR = :TITULAR, '#10'    ENTIDAD = :ENTIDAD, '#10'    SUCURSAL = :SU' +
              'CURSAL, '#10'    DC = :DC, '#10'    CUENTA = :CUENTA'#10'  WHERE'#10'    (ID = :' +
              'OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_PagosProveedor'
      end
      item
        Params = <
          item
            Name = 'ID_RECIBO_COMPENSADO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'V_RECIBOS_PROVEEDOR'
            SQL = 
              'UPDATE RECIBOS_PROVEEDOR'#10'SET ID_RECIBO_COMPENSADO = :ID_RECIBO_C' +
              'OMPENSADO'#10'WHERE (ID = :ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_RecibosCompensadosProv'
      end
      item
        Params = <
          item
            Name = 'ID_RECIBO_COMPENSADO'
            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 = 'V_RECIBOS_PROVEEDOR'
            SQL = 
              'UPDATE RECIBOS_PROVEEDOR'#10'SET ID_RECIBO_COMPENSADO = :ID_RECIBO_C' +
              'OMPENSADO'#10'WHERE (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_RecibosCompensadosProv'
      end
      item
        Params = <
          item
            Name = 'ID_RECIBO_COMPENSADO'
            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 = 'V_RECIBOS_PROVEEDOR'
            SQL = 
              'UPDATE RECIBOS_PROVEEDOR'#10'SET ID_RECIBO_COMPENSADO = :ID_RECIBO_C' +
              'OMPENSADO'#10'WHERE (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_RecibosCompensadosProv'
      end>
    RelationShips = <>
    UpdateRules = <
      item
        Name = 'Insert RecibosProveedor'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'RecibosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert PagosProveedor'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'PagosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update RecibosProveedor'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'RecibosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update PagosProveedor'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'PagosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete PagosProveedor'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'PagosProveedor'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete RecibosProveedor'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'RecibosProveedor'
        FailureBehaviour = fbRaiseException
      end>
    Left = 48
    Top = 24
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 80
  end
  object bpRecibosProveedor: TDABusinessProcessor
    Schema = schRecibosProveedor
    InsertCommandName = 'Insert_RecibosProveedor'
    DeleteCommandName = 'Delete_RecibosProveedor'
    UpdateCommandName = 'Update_RecibosProveedor'
    RefreshDatasetName = 'RecibosProveedor_Refresh'
    ReferencedDataset = 'RecibosProveedor'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 24
  end
  object DADataDictionary: TDADataDictionary
    Fields = <
      item
        Name = 'RecibosProveedor_ID_PROVEEDOR'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_NOMBRE_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_NIF_CIF_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_ENTIDAD_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_SUCURSAL_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_DC_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_CUENTA_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_ID'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_ID_RECIBO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_ID_RECIBO'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_TIPO'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_TIPO'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_FECHA_PAGO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_FECHA_PAGO'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_TITULAR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_TITULAR'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_ENTIDAD'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_ENTIDAD'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_SUCURSAL'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_SUCURSAL'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_DC'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_DC'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_CUENTA'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_CUENTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'PagosProveedor_USUARIO'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'PagosCliente_USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_ID'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_REFERENCIA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'REFERENCIA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_SITUACION'
        DataType = datString
        Size = 9
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'SITUACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_ID_FACTURA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_FACTURA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_FECHA_EMISION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'RecibosCliente_FECHA_EMISION'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_FECHA_VENCIMIENTO'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_VENCIMIENTO'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_DESCRIPCION'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'DESCRIPCION'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_OBSERVACIONES'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'OBSERVACIONES'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_IMPORTE'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IMPORTE'
        Alignment = taRightJustify
      end
      item
        Name = 'RecibosProveedor_OTROS_GASTOS'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'RecibosCliente_OTROS_GASTOS'
        Alignment = taRightJustify
      end
      item
        Name = 'RecibosProveedor_IMPORTE_TOTAL'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IMPORTE_TOTAL'
        Alignment = taRightJustify
      end
      item
        Name = 'RecibosProveedor_FECHA_FACTURA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_FACTURA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_FORMA_PAGO_FACTURA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FORMA_PAGO_FACTURA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_IMPORTE_FACTURA'
        DataType = datCurrency
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'IMPORTE_FACTURA'
        Alignment = taRightJustify
      end
      item
        Name = 'RecibosProveedor_ID_EMPRESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_EMPRESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_FECHA_ALTA'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_ALTA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_FECHA_MODIFICACION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_MODIFICACION'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosCliente_USUARIO'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_FECHA_EMISION'
        DataType = datDateTime
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'FECHA_EMISION'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_ID_PROVEEDOR'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_NOMBRE_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_NIF_CIF_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_ENTIDAD_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_SUCURSAL_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_DC_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_Refresh_CUENTA_PROVEEDOR'
        DataType = datString
        Size = 15
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_USUARIO'
        DataType = datString
        Size = 20
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'USUARIO'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_REFERENCIA_PROVEEDOR'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'REFERENCIA_PROVEEDOR'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_ID_REMESA'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'ID_REMESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_REFERENCIA_REMESA'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'REFERENCIA_REMESA'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_REFERENCIA_FACTURA_PROV'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        DisplayLabel = 'Ref. factura prov.'
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_ID_RECIBO_COMPENSADO'
        DataType = datInteger
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end
      item
        Name = 'RecibosProveedor_REFERENCIA_REC_COMPENSADO'
        DataType = datString
        Size = 255
        BlobType = dabtUnknown
        DisplayWidth = 0
        Alignment = taLeftJustify
      end>
    Left = 48
    Top = 152
  end
  object bpPagosProveedor: TDABusinessProcessor
    Schema = schRecibosProveedor
    InsertCommandName = 'Insert_PagosProveedor'
    DeleteCommandName = 'Delete_PagosProveedor'
    UpdateCommandName = 'Update_PagosProveedor'
    ReferencedDataset = 'PagosProveedor'
    ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 88
  end
  object bpRecibosCompensados: TDABusinessProcessor
    Schema = schRecibosProveedor
    InsertCommandName = 'Insert_RecibosCompensadosProv'
    DeleteCommandName = 'Delete_RecibosCompensadosProv'
    UpdateCommandName = 'Update_RecibosCompensadosProv'
    ReferencedDataset = 'RecibosCompensadosProv'
    ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 152
  end
end
