object srvDevoluciones: TsrvDevoluciones
  OldCreateOrder = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ServiceSchema = schDevoluciones
  ServiceAdapter = DABINAdapter
  OnAfterProcessTransactionAction = pptaNone
  ExportedDataTables = <>
  CacheElements = <>
  Options = [rsoProcessDeltasWithoutUpdateRules]
  Height = 300
  Width = 300
  object schDevoluciones: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DADataDictionary1
    Diagrams = dmServer.DADiagrams
    Datasets = <
      item
        Params = <>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_DEVOLUCIONES'
            SQL = 'SELECT '#10'    *'#10'  FROM'#10'    RDX_V_CONTROL_DEVOLUCIONES'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CENTRO'
                TableField = 'CENTRO'
              end
              item
                DatasetField = 'FILIAL'
                TableField = 'FILIAL'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'PRODUCTO'
                TableField = 'PRODUCTO'
              end
              item
                DatasetField = 'COLOR'
                TableField = 'COLOR'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'E38'
                TableField = 'E38'
              end
              item
                DatasetField = 'E40'
                TableField = 'E40'
              end
              item
                DatasetField = 'E42'
                TableField = 'E42'
              end
              item
                DatasetField = 'E44'
                TableField = 'E44'
              end
              item
                DatasetField = 'E46'
                TableField = 'E46'
              end
              item
                DatasetField = 'E48'
                TableField = 'E48'
              end
              item
                DatasetField = 'ENVIADO'
                TableField = 'ENVIADO'
              end
              item
                DatasetField = 'DIFERENCIA'
                TableField = 'DIFERENCIA'
              end
              item
                DatasetField = 'APROBADO'
                TableField = 'APROBADO'
              end
              item
                DatasetField = 'FECHACAMBIO'
                TableField = 'FECHACAMBIO'
              end
              item
                DatasetField = 'NUMHOJA'
                TableField = 'NUMHOJA'
              end
              item
                DatasetField = 'ESTADO_HOJA'
                TableField = 'ESTADO_HOJA'
              end
              item
                DatasetField = 'OBSERVACIONES_HOJA'
                TableField = 'OBSERVACIONES_HOJA'
              end
              item
                DatasetField = 'CONTABILIZAR_HOJA'
                TableField = 'CONTABILIZAR_HOJA'
              end
              item
                DatasetField = 'S38'
                TableField = 'S38'
              end
              item
                DatasetField = 'S40'
                TableField = 'S40'
              end
              item
                DatasetField = 'S42'
                TableField = 'S42'
              end
              item
                DatasetField = 'S44'
                TableField = 'S44'
              end
              item
                DatasetField = 'S46'
                TableField = 'S46'
              end
              item
                DatasetField = 'S48'
                TableField = 'S48'
              end
              item
                DatasetField = 'SOLICITADO'
                TableField = 'SOLICITADO'
              end
              item
                DatasetField = 'ER38'
                TableField = 'ER38'
              end
              item
                DatasetField = 'ER40'
                TableField = 'ER40'
              end
              item
                DatasetField = 'ER42'
                TableField = 'ER42'
              end
              item
                DatasetField = 'ER44'
                TableField = 'ER44'
              end
              item
                DatasetField = 'ER46'
                TableField = 'ER46'
              end
              item
                DatasetField = 'ER48'
                TableField = 'ER48'
              end
              item
                DatasetField = 'ENVIADO_RECT'
                TableField = 'ENVIADO_RECT'
              end>
          end>
        Name = 'Devoluciones'
        Fields = <
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Devoluciones_APROBADO'
          end
          item
            Name = 'FECHACAMBIO'
            DataType = datDateTime
            DictionaryEntry = 'Devoluciones_FECHACAMBIO'
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Devoluciones_CENTRO'
            InPrimaryKey = True
          end
          item
            Name = 'FILIAL'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Devoluciones_FILIAL'
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            DictionaryEntry = 'Devoluciones_CODIGO'
            InPrimaryKey = True
          end
          item
            Name = 'PRODUCTO'
            DataType = datString
            Size = 40
            DictionaryEntry = 'Devoluciones_PRODUCTO'
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            DictionaryEntry = 'Devoluciones_COLOR'
            InPrimaryKey = True
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            DictionaryEntry = 'Devoluciones_FECHA'
            InPrimaryKey = True
          end
          item
            Name = 'NUMHOJA'
            DataType = datString
            Size = 8
            DictionaryEntry = 'Devoluciones_NUMHOJA'
          end
          item
            Name = 'ESTADO_HOJA'
            DataType = datString
            Size = 20
            DictionaryEntry = 'Devoluciones_ESTADO_HOJA'
          end
          item
            Name = 'OBSERVACIONES_HOJA'
            DataType = datString
            Size = 255
            DictionaryEntry = 'Devoluciones_OBSERVACIONES_HOJA'
          end
          item
            Name = 'CONTABILIZAR_HOJA'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Devoluciones_CONTABILIZAR_HOJA'
          end
          item
            Name = 'S38'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S38'
          end
          item
            Name = 'S40'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S40'
          end
          item
            Name = 'S42'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S42'
          end
          item
            Name = 'S44'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S44'
          end
          item
            Name = 'S46'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S46'
          end
          item
            Name = 'S48'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S48'
          end
          item
            Name = 'SOLICITADO'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_SOLICITADO'
          end
          item
            Name = 'E38'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E38'
          end
          item
            Name = 'E40'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E40'
          end
          item
            Name = 'E42'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E42'
          end
          item
            Name = 'E44'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E44'
          end
          item
            Name = 'E46'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E46'
          end
          item
            Name = 'E48'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E48'
          end
          item
            Name = 'ENVIADO'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ENVIADO'
          end
          item
            Name = 'ER38'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER38'
          end
          item
            Name = 'ER40'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER40'
          end
          item
            Name = 'ER42'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER42'
          end
          item
            Name = 'ER44'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER44'
          end
          item
            Name = 'ER46'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER46'
          end
          item
            Name = 'ER48'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER48'
          end
          item
            Name = 'ENVIADO_RECT'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ENVIADO_RECT'
          end
          item
            Name = 'DIFERENCIA'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_DIFERENCIA'
          end>
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_DEVOLUCIONES'
            SQL = 
              'SELECT '#10'       *'#10'FROM RDX_V_CONTROL_DEVOLUCIONES'#10'WHERE (APROBADO' +
              ' = '#39'N'#39')'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'APROBADO'
                TableField = 'APROBADO'
              end
              item
                DatasetField = 'CENTRO'
                TableField = 'CENTRO'
              end
              item
                DatasetField = 'FILIAL'
                TableField = 'FILIAL'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'PRODUCTO'
                TableField = 'PRODUCTO'
              end
              item
                DatasetField = 'COLOR'
                TableField = 'COLOR'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'E38'
                TableField = 'E38'
              end
              item
                DatasetField = 'E40'
                TableField = 'E40'
              end
              item
                DatasetField = 'E42'
                TableField = 'E42'
              end
              item
                DatasetField = 'E44'
                TableField = 'E44'
              end
              item
                DatasetField = 'E46'
                TableField = 'E46'
              end
              item
                DatasetField = 'E48'
                TableField = 'E48'
              end
              item
                DatasetField = 'ENVIADO'
                TableField = 'ENVIADO'
              end
              item
                DatasetField = 'DIFERENCIA'
                TableField = 'DIFERENCIA'
              end
              item
                DatasetField = 'FECHACAMBIO'
                TableField = 'FECHACAMBIO'
              end
              item
                DatasetField = 'NUMHOJA'
                TableField = 'NUMHOJA'
              end
              item
                DatasetField = 'ESTADO_HOJA'
                TableField = 'ESTADO_HOJA'
              end
              item
                DatasetField = 'OBSERVACIONES_HOJA'
                TableField = 'OBSERVACIONES_HOJA'
              end
              item
                DatasetField = 'CONTABILIZAR_HOJA'
                TableField = 'CONTABILIZAR_HOJA'
              end
              item
                DatasetField = 'S38'
                TableField = 'S38'
              end
              item
                DatasetField = 'S40'
                TableField = 'S40'
              end
              item
                DatasetField = 'S42'
                TableField = 'S42'
              end
              item
                DatasetField = 'S44'
                TableField = 'S44'
              end
              item
                DatasetField = 'S46'
                TableField = 'S46'
              end
              item
                DatasetField = 'S48'
                TableField = 'S48'
              end
              item
                DatasetField = 'SOLICITADO'
                TableField = 'SOLICITADO'
              end
              item
                DatasetField = 'ER38'
                TableField = 'ER38'
              end
              item
                DatasetField = 'ER40'
                TableField = 'ER40'
              end
              item
                DatasetField = 'ER42'
                TableField = 'ER42'
              end
              item
                DatasetField = 'ER44'
                TableField = 'ER44'
              end
              item
                DatasetField = 'ER46'
                TableField = 'ER46'
              end
              item
                DatasetField = 'ER48'
                TableField = 'ER48'
              end
              item
                DatasetField = 'ENVIADO_RECT'
                TableField = 'ENVIADO_RECT'
              end>
          end>
        Name = 'DevolucionesPendientes'
        Fields = <
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Devoluciones_APROBADO'
          end
          item
            Name = 'FECHACAMBIO'
            DataType = datDateTime
            DictionaryEntry = 'Devoluciones_FECHACAMBIO'
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Devoluciones_CENTRO'
            InPrimaryKey = True
          end
          item
            Name = 'FILIAL'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Devoluciones_FILIAL'
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            DictionaryEntry = 'Devoluciones_CODIGO'
            InPrimaryKey = True
          end
          item
            Name = 'PRODUCTO'
            DataType = datString
            Size = 40
            DictionaryEntry = 'Devoluciones_PRODUCTO'
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            DictionaryEntry = 'Devoluciones_COLOR'
            InPrimaryKey = True
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            DictionaryEntry = 'Devoluciones_FECHA'
            InPrimaryKey = True
          end
          item
            Name = 'NUMHOJA'
            DataType = datString
            Size = 8
            DictionaryEntry = 'Devoluciones_NUMHOJA'
          end
          item
            Name = 'ESTADO_HOJA'
            DataType = datString
            Size = 20
            DictionaryEntry = 'Devoluciones_ESTADO_HOJA'
          end
          item
            Name = 'OBSERVACIONES_HOJA'
            DataType = datString
            Size = 255
            DictionaryEntry = 'Devoluciones_OBSERVACIONES_HOJA'
          end
          item
            Name = 'CONTABILIZAR_HOJA'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Devoluciones_CONTABILIZAR_HOJA'
          end
          item
            Name = 'S38'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S38'
          end
          item
            Name = 'S40'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S40'
          end
          item
            Name = 'S42'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S42'
          end
          item
            Name = 'S44'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S44'
          end
          item
            Name = 'S46'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S46'
          end
          item
            Name = 'S48'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S48'
          end
          item
            Name = 'SOLICITADO'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_SOLICITADO'
          end
          item
            Name = 'E38'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E38'
          end
          item
            Name = 'E40'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E40'
          end
          item
            Name = 'E42'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E42'
          end
          item
            Name = 'E44'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E44'
          end
          item
            Name = 'E46'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E46'
          end
          item
            Name = 'E48'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E48'
          end
          item
            Name = 'ENVIADO'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ENVIADO'
          end
          item
            Name = 'ER38'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER38'
          end
          item
            Name = 'ER40'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER40'
          end
          item
            Name = 'ER42'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER42'
          end
          item
            Name = 'ER44'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER44'
          end
          item
            Name = 'ER46'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER46'
          end
          item
            Name = 'ER48'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER48'
          end
          item
            Name = 'ENVIADO_RECT'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ENVIADO_RECT'
          end
          item
            Name = 'DIFERENCIA'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_DIFERENCIA'
          end>
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_DEVOLUCIONES'
            SQL = 
              'SELECT '#10'    *'#10'  FROM'#10'    RDX_V_CONTROL_DEVOLUCIONES'#10'WHERE (APROB' +
              'ADO = '#39'S'#39')'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CENTRO'
                TableField = 'CENTRO'
              end
              item
                DatasetField = 'FILIAL'
                TableField = 'FILIAL'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'PRODUCTO'
                TableField = 'PRODUCTO'
              end
              item
                DatasetField = 'COLOR'
                TableField = 'COLOR'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'E38'
                TableField = 'E38'
              end
              item
                DatasetField = 'E40'
                TableField = 'E40'
              end
              item
                DatasetField = 'E42'
                TableField = 'E42'
              end
              item
                DatasetField = 'E44'
                TableField = 'E44'
              end
              item
                DatasetField = 'E46'
                TableField = 'E46'
              end
              item
                DatasetField = 'E48'
                TableField = 'E48'
              end
              item
                DatasetField = 'ENVIADO'
                TableField = 'ENVIADO'
              end
              item
                DatasetField = 'DIFERENCIA'
                TableField = 'DIFERENCIA'
              end
              item
                DatasetField = 'FECHACAMBIO'
                TableField = 'FECHACAMBIO'
              end
              item
                DatasetField = 'APROBADO'
                TableField = 'APROBADO'
              end
              item
                DatasetField = 'NUMHOJA'
                TableField = 'NUMHOJA'
              end
              item
                DatasetField = 'ESTADO_HOJA'
                TableField = 'ESTADO_HOJA'
              end
              item
                DatasetField = 'OBSERVACIONES_HOJA'
                TableField = 'OBSERVACIONES_HOJA'
              end
              item
                DatasetField = 'CONTABILIZAR_HOJA'
                TableField = 'CONTABILIZAR_HOJA'
              end
              item
                DatasetField = 'S38'
                TableField = 'S38'
              end
              item
                DatasetField = 'S40'
                TableField = 'S40'
              end
              item
                DatasetField = 'S42'
                TableField = 'S42'
              end
              item
                DatasetField = 'S44'
                TableField = 'S44'
              end
              item
                DatasetField = 'S46'
                TableField = 'S46'
              end
              item
                DatasetField = 'S48'
                TableField = 'S48'
              end
              item
                DatasetField = 'SOLICITADO'
                TableField = 'SOLICITADO'
              end
              item
                DatasetField = 'ER38'
                TableField = 'ER38'
              end
              item
                DatasetField = 'ER40'
                TableField = 'ER40'
              end
              item
                DatasetField = 'ER42'
                TableField = 'ER42'
              end
              item
                DatasetField = 'ER44'
                TableField = 'ER44'
              end
              item
                DatasetField = 'ER46'
                TableField = 'ER46'
              end
              item
                DatasetField = 'ER48'
                TableField = 'ER48'
              end
              item
                DatasetField = 'ENVIADO_RECT'
                TableField = 'ENVIADO_RECT'
              end>
          end>
        Name = 'DevolucionesAprobadas'
        Fields = <
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Devoluciones_APROBADO'
          end
          item
            Name = 'FECHACAMBIO'
            DataType = datDateTime
            DictionaryEntry = 'Devoluciones_FECHACAMBIO'
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Devoluciones_CENTRO'
            InPrimaryKey = True
          end
          item
            Name = 'FILIAL'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Devoluciones_FILIAL'
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            DictionaryEntry = 'Devoluciones_CODIGO'
            InPrimaryKey = True
          end
          item
            Name = 'PRODUCTO'
            DataType = datString
            Size = 40
            DictionaryEntry = 'Devoluciones_PRODUCTO'
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            DictionaryEntry = 'Devoluciones_COLOR'
            InPrimaryKey = True
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            DictionaryEntry = 'Devoluciones_FECHA'
            InPrimaryKey = True
          end
          item
            Name = 'NUMHOJA'
            DataType = datString
            Size = 8
            DictionaryEntry = 'Devoluciones_NUMHOJA'
          end
          item
            Name = 'ESTADO_HOJA'
            DataType = datString
            Size = 20
            DictionaryEntry = 'Devoluciones_ESTADO_HOJA'
          end
          item
            Name = 'OBSERVACIONES_HOJA'
            DataType = datString
            Size = 255
            DictionaryEntry = 'Devoluciones_OBSERVACIONES_HOJA'
          end
          item
            Name = 'CONTABILIZAR_HOJA'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Devoluciones_CONTABILIZAR_HOJA'
          end
          item
            Name = 'S38'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S38'
          end
          item
            Name = 'S40'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S40'
          end
          item
            Name = 'S42'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S42'
          end
          item
            Name = 'S44'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S44'
          end
          item
            Name = 'S46'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S46'
          end
          item
            Name = 'S48'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_S48'
          end
          item
            Name = 'SOLICITADO'
            DataType = datInteger
            DictionaryEntry = 'Devoluciones_SOLICITADO'
          end
          item
            Name = 'E38'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E38'
          end
          item
            Name = 'E40'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E40'
          end
          item
            Name = 'E42'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E42'
          end
          item
            Name = 'E44'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E44'
          end
          item
            Name = 'E46'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E46'
          end
          item
            Name = 'E48'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_E48'
          end
          item
            Name = 'ENVIADO'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ENVIADO'
          end
          item
            Name = 'ER38'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER38'
          end
          item
            Name = 'ER40'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER40'
          end
          item
            Name = 'ER42'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER42'
          end
          item
            Name = 'ER44'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER44'
          end
          item
            Name = 'ER46'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER46'
          end
          item
            Name = 'ER48'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ER48'
          end
          item
            Name = 'ENVIADO_RECT'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_ENVIADO_RECT'
          end
          item
            Name = 'DIFERENCIA'
            DataType = datFloat
            DictionaryEntry = 'Devoluciones_DIFERENCIA'
          end>
      end
      item
        Params = <
          item
            Name = 'FECHA'
            DataType = datDateTime
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_DEVOLUCIONES'
            SQL = 
              'SELECT '#10'       ENVIADO_RECT, DIFERENCIA'#10'  FROM'#10'    RDX_V_CONTROL' +
              '_DEVOLUCIONES'#10'  WHERE'#10'       FECHA = :FECHA AND'#10'       CENTRO = ' +
              ':CENTRO AND'#10'       CODIGO = :CODIGO AND'#10'       COLOR = :COLOR'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'DIFERENCIA'
                TableField = 'DIFERENCIA'
              end
              item
                DatasetField = 'ENVIADO_RECT'
                TableField = 'ENVIADO_RECT'
              end>
          end>
        Name = 'RefreshDevoluciones'
        Fields = <
          item
            Name = 'ENVIADO_RECT'
            DataType = datFloat
          end
          item
            Name = 'DIFERENCIA'
            DataType = datFloat
          end>
      end>
    JoinDataTables = <>
    UnionDataTables = <>
    Commands = <
      item
        Params = <
          item
            Name = 'NUMHOJA'
            DataType = datString
            Size = 8
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ESTADO_HOJA'
            DataType = datString
            Size = 20
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OBSERVACIONES_HOJA'
            DataType = datString
            Size = 255
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONTABILIZAR_HOJA'
            DataType = datString
            Size = 1
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ER38'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ER40'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ER42'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ER44'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ER46'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ER48'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_DEVOLUCIONES'
            SQL = 
              'begin'#10#9'declare @rowcount_var int'#10#10'    declare @NUMHOJA char(8)'#10' ' +
              '   declare @ESTADO_HOJA varchar(20)'#10'    declare @OBSERVACIONES_H' +
              'OJA varchar(255)'#10'    declare @CONTABILIZAR_HOJA char(1)'#10#10'    dec' +
              'lare @ER38 numeric(15,0)'#10'    declare @ER40 numeric(15,0)'#10'    dec' +
              'lare @ER42 numeric(15,0)'#10'    declare @ER44 numeric(15,0)'#10'    dec' +
              'lare @ER46 numeric(15,0)'#10'    declare @ER48 numeric(15,0)'#10'    dec' +
              'lare @ER_S numeric(15,0)'#10'    declare @ER_M numeric(15,0)'#10'    dec' +
              'lare @ER_L numeric(15,0)'#10'    declare @ER_XL numeric(15,0)'#10#10#10'    ' +
              'declare @APROBADO char(1)'#10'    declare @FECHA datetime'#10'    declar' +
              'e @CENTRO varchar(17)'#10'    declare @CODIGO varchar(12)'#10'    declar' +
              'e @COLOR varchar(10)'#10#10'    declare @TIPO_TALLAJE smallint'#10#10'    se' +
              't @NUMHOJA = :NUMHOJA'#10'    set @ESTADO_HOJA = :ESTADO_HOJA'#10'    se' +
              't @OBSERVACIONES_HOJA = :OBSERVACIONES_HOJA'#10'    set @CONTABILIZA' +
              'R_HOJA = :CONTABILIZAR_HOJA'#10#10'    set @ER38 = :ER38'#10'    set @ER40' +
              ' = :ER40'#10'    set @ER42 = :ER42'#10'    set @ER44 = :ER44'#10'    set @ER' +
              '46 = :ER46'#10'    set @ER48 = :ER48'#10'    set @ER_S = :ER38'#10'    set @' +
              'ER_M = :ER40'#10'    set @ER_L = :ER42'#10'    set @ER_XL = :ER44'#10#10'    s' +
              'et @APROBADO = :APROBADO'#10'    set @FECHA = :FECHA'#10'    set @CENTRO' +
              ' = :CENTRO'#10'    set @CODIGO = :CODIGO'#10'    set @COLOR = :COLOR'#10#10'  ' +
              '  /* *********************************** */'#10'    if @NUMHOJA <> '#39 +
              #39#10'    begin'#10#9'     update RDX_AJUSTES_HOJA_DEVOLUCIONES set'#10#9'    ' +
              '       ESTADO = @ESTADO_HOJA,'#10#9#9'       OBSERVACIONES = @OBSERVAC' +
              'IONES_HOJA,'#10#9#9'       CONTABILIZAR = @CONTABILIZAR_HOJA'#10#9'     whe' +
              're RDX_AJUSTES_HOJA_DEVOLUCIONES.NUMHOJA = @NUMHOJA'#10#10#9#9' select @' +
              'ROWCOUNT_VAR = @@ROWCOUNT'#10#10#9'     if @ROWCOUNT_VAR = 0'#10#9#9' begin'#10#9 +
              '          insert into RDX_AJUSTES_HOJA_DEVOLUCIONES'#10#9'           ' +
              '      (NUMHOJA, ESTADO, OBSERVACIONES, CONTABILIZAR)'#10#9#9'      val' +
              'ues (@NUMHOJA, @ESTADO_HOJA,'#10#9'                  @OBSERVACIONES_H' +
              'OJA, @CONTABILIZAR_HOJA)'#10#9'     end'#10'    end'#10#10'    /* ARREGLO PARA ' +
              'QUE SOPORTE LOS NUEVOS TALLAJES*** */'#10#10'    execute RDX_P_TIPO_TA' +
              'LLAJE @CODIGO, @TIPO_TALLAJE OUTPUT'#10#10'    if @TIPO_TALLAJE = 1'#10'  ' +
              '  begin'#10'       set @ER_S = NULL'#10'       set @ER_M = NULL'#10'       s' +
              'et @ER_L = NULL'#10'       set @ER_XL = NULL'#10'    end'#10'    '#10'    if @TI' +
              'PO_TALLAJE = 2'#10'    begin'#10'       set @ER38 = NULL'#10'       set @ER4' +
              '0 = NULL'#10'       set @ER42 = NULL'#10'       set @ER44 = NULL'#10'       ' +
              'set @ER46 = NULL'#10'       set @ER48 = NULL'#10'    end'#10#10'    /* *******' +
              '**************************** */'#10#9'update RDX_DEVOLUCION_AJUSTES s' +
              'et'#10#9'           CANT38 = @ER38,'#10#9'           CANT40 = @ER40,'#10#9'    ' +
              '       CANT42 = @ER42,'#10#9'           CANT44 = @ER44,'#10#9'           C' +
              'ANT46 = @ER46,'#10#9'           CANT48 = @ER48,'#10#9'           CANT_S = ' +
              '@ER_S,'#10#9'           CANT_M = @ER_M,'#10#9'           CANT_L = @ER_L,'#10#9 +
              '           CANT_XL = @ER_XL,'#10'               APROBADO = @APROBADO' +
              ','#10'               FECHACAMBIO = CURRENT_TIMESTAMP'#10#9'where'#10'        ' +
              '     (RDX_DEVOLUCION_AJUSTES.CENTRO = @CENTRO and'#10#9'      RDX_DEV' +
              'OLUCION_AJUSTES.CODIGO = @CODIGO and'#10#9'      RDX_DEVOLUCION_AJUST' +
              'ES.COLOR = @COLOR and'#10#9'      RDX_DEVOLUCION_AJUSTES.FECHA = @FEC' +
              'HA)'#10#10#9'select @ROWCOUNT_VAR = @@ROWCOUNT'#10#10#9'if @ROWCOUNT_VAR = 0'#10' ' +
              '   begin'#10'         insert into RDX_DEVOLUCION_AJUSTES'#10'           ' +
              '     (FECHA, CENTRO, CODIGO, COLOR,'#10'                 APROBADO, F' +
              'ECHACAMBIO,'#10'                 CANT38, CANT40, CANT42,'#10'           ' +
              '      CANT44, CANT46, CANT48,'#10'                 CANT_S, CANT_M, C' +
              'ANT_L, CANT_XL)'#10'         values ('#10'                 @FECHA, @CENT' +
              'RO, @CODIGO,'#10'                 @COLOR, @APROBADO, CURRENT_TIMESTA' +
              'MP,'#10'                 @ER38, @ER40, @ER42,'#10'                 @ER44' +
              ', @ER46, @ER48,'#10'                 @ER_S, @ER_M, @ER_L, @ER_XL)'#10'  ' +
              '  end'#10'end'#10
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_Estado_Devoluciones'
      end>
    RelationShips = <>
    UpdateRules = <>
    Version = 0
    Left = 48
    Top = 32
  end
  object bpDevoluciones: TDABusinessProcessor
    Schema = schDevoluciones
    UpdateCommandName = 'Update_Estado_Devoluciones'
    RefreshDatasetName = 'RefreshDevoluciones'
    ReferencedDataset = 'Devoluciones'
    ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateDelete, poPrepareCommands, poIgnoreRowsAffected]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 32
  end
  object bpDevolucionesAprobadas: TDABusinessProcessor
    Schema = schDevoluciones
    UpdateCommandName = 'Update_Estado_Devoluciones'
    RefreshDatasetName = 'RefreshDevoluciones'
    ReferencedDataset = 'DevolucionesAprobadas'
    ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateDelete, poPrepareCommands, poIgnoreRowsAffected]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 88
  end
  object bpDevolucionesPendientes: TDABusinessProcessor
    Schema = schDevoluciones
    UpdateCommandName = 'Update_Estado_Devoluciones'
    RefreshDatasetName = 'RefreshDevoluciones'
    ReferencedDataset = 'DevolucionesPendientes'
    ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateDelete, poPrepareCommands, poIgnoreRowsAffected]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 152
  end
  object DADataDictionary1: TDADataDictionary
    Fields = <
      item
        Name = 'Devoluciones_APROBADO'
        DataType = datString
        Size = 1
        DisplayLabel = 'APROBADO'
      end
      item
        Name = 'Devoluciones_FECHACAMBIO'
        DataType = datDateTime
        DisplayLabel = 'FECHACAMBIO'
      end
      item
        Name = 'Devoluciones_CENTRO'
        DataType = datString
        Size = 17
        DisplayLabel = 'CENTRO'
        ReadOnly = True
      end
      item
        Name = 'Devoluciones_FILIAL'
        DataType = datString
        Size = 25
        DisplayLabel = 'FILIAL'
        ReadOnly = True
      end
      item
        Name = 'Devoluciones_CODIGO'
        DataType = datString
        Size = 12
        DisplayLabel = 'CODIGO'
        ReadOnly = True
      end
      item
        Name = 'Devoluciones_PRODUCTO'
        DataType = datString
        Size = 40
        DisplayLabel = 'PRODUCTO'
        ReadOnly = True
      end
      item
        Name = 'Devoluciones_COLOR'
        DataType = datString
        Size = 10
        DisplayLabel = 'COLOR'
        ReadOnly = True
      end
      item
        Name = 'Devoluciones_FECHA'
        DataType = datDateTime
        DisplayLabel = 'FECHA'
        ReadOnly = True
      end
      item
        Name = 'Devoluciones_NUMHOJA'
        DataType = datString
        Size = 8
        DisplayLabel = 'NUMHOJA'
      end
      item
        Name = 'Devoluciones_ESTADO_HOJA'
        DataType = datString
        Size = 20
        DisplayLabel = 'ESTADO_HOJA'
      end
      item
        Name = 'Devoluciones_OBSERVACIONES_HOJA'
        DataType = datString
        Size = 255
        DisplayLabel = 'OBSERVACIONES_HOJA'
      end
      item
        Name = 'Devoluciones_CONTABILIZAR_HOJA'
        DataType = datString
        Size = 1
        DisplayLabel = 'CONTABILIZAR_HOJA'
      end
      item
        Name = 'Devoluciones_S38'
        DataType = datInteger
        DisplayLabel = 'S38'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_S40'
        DataType = datInteger
        DisplayLabel = 'S40'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_S42'
        DataType = datInteger
        DisplayLabel = 'S42'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_S44'
        DataType = datInteger
        DisplayLabel = 'S44'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_S46'
        DataType = datInteger
        DisplayLabel = 'S46'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_S48'
        DataType = datInteger
        DisplayLabel = 'S48'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_SOLICITADO'
        DataType = datInteger
        DisplayLabel = 'SOLICITADO'
        ReadOnly = True
        Alignment = taRightJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'Devoluciones_E38'
        DataType = datFloat
        DisplayLabel = 'E38'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_E40'
        DataType = datFloat
        DisplayLabel = 'E40'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_E42'
        DataType = datFloat
        DisplayLabel = 'E42'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_E44'
        DataType = datFloat
        DisplayLabel = 'E44'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_E46'
        DataType = datFloat
        DisplayLabel = 'E46'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_E48'
        DataType = datFloat
        DisplayLabel = 'E48'
        ReadOnly = True
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ENVIADO'
        DataType = datFloat
        DisplayLabel = 'ENVIADO'
        ReadOnly = True
        Alignment = taRightJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'Devoluciones_ER38'
        DataType = datFloat
        DisplayLabel = 'ER38'
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ER40'
        DataType = datFloat
        DisplayLabel = 'ER40'
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ER42'
        DataType = datFloat
        DisplayLabel = 'ER42'
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ER44'
        DataType = datFloat
        DisplayLabel = 'ER44'
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ER46'
        DataType = datFloat
        DisplayLabel = 'ER46'
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ER48'
        DataType = datFloat
        DisplayLabel = 'ER48'
        Alignment = taRightJustify
      end
      item
        Name = 'Devoluciones_ENVIADO_RECT'
        DataType = datFloat
        DisplayLabel = 'ENVIADO_RECT'
        Alignment = taRightJustify
        ServerAutoRefresh = True
      end
      item
        Name = 'Devoluciones_DIFERENCIA'
        DataType = datFloat
        DisplayLabel = 'DIFERENCIA'
        Alignment = taRightJustify
        ServerAutoRefresh = True
      end>
    Left = 48
    Top = 120
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 184
  end
end
