object srvTraspasos: TsrvTraspasos
  OldCreateOrder = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ServiceSchema = schTraspasos
  ServiceAdapter = DABINAdapter
  OnAfterProcessTransactionAction = pptaNone
  ExportedDataTables = <>
  CacheElements = <>
  Options = [rsoProcessDeltasWithoutUpdateRules]
  Height = 300
  Width = 300
  object DABINAdapter: TDABINAdapter
    Left = 40
    Top = 96
  end
  object schTraspasos: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DADataDictionary1
    Datasets = <
      item
        Params = <>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_TRASPASOS'
            SQL = 
              'SELECT '#10'    TIPO, FECHA, CENTRO, FILIAL, CENTRO2, FILIAL2, APROB' +
              'ADO, '#10'    ESTADO_TRASPASO, OBSERVACIONES, CONTABILIZAR, FECHACAM' +
              'BIO, '#10'    CODIGO, PRODUCTO, COLOR, T38, T40, T42, T44, T46, T48,' +
              ' '#10'    TOTAL, TR38, TR40, TR42, TR44, TR46, TR48, TOTAL_RECT'#10'  FR' +
              'OM'#10'    RDX_V_CONTROL_TRASPASOS'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'CENTRO'
                TableField = 'CENTRO'
              end
              item
                DatasetField = 'FILIAL'
                TableField = 'FILIAL'
              end
              item
                DatasetField = 'CENTRO2'
                TableField = 'CENTRO2'
              end
              item
                DatasetField = 'FILIAL2'
                TableField = 'FILIAL2'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'PRODUCTO'
                TableField = 'PRODUCTO'
              end
              item
                DatasetField = 'COLOR'
                TableField = 'COLOR'
              end
              item
                DatasetField = 'T38'
                TableField = 'T38'
              end
              item
                DatasetField = 'T40'
                TableField = 'T40'
              end
              item
                DatasetField = 'T42'
                TableField = 'T42'
              end
              item
                DatasetField = 'T44'
                TableField = 'T44'
              end
              item
                DatasetField = 'T46'
                TableField = 'T46'
              end
              item
                DatasetField = 'T48'
                TableField = 'T48'
              end
              item
                DatasetField = 'TOTAL'
                TableField = 'TOTAL'
              end
              item
                DatasetField = 'TR38'
                TableField = 'TR38'
              end
              item
                DatasetField = 'TR40'
                TableField = 'TR40'
              end
              item
                DatasetField = 'TR42'
                TableField = 'TR42'
              end
              item
                DatasetField = 'TR44'
                TableField = 'TR44'
              end
              item
                DatasetField = 'TR46'
                TableField = 'TR46'
              end
              item
                DatasetField = 'TR48'
                TableField = 'TR48'
              end
              item
                DatasetField = 'TOTAL_RECT'
                TableField = 'TOTAL_RECT'
              end
              item
                DatasetField = 'APROBADO'
                TableField = 'APROBADO'
              end
              item
                DatasetField = 'ESTADO_TRASPASO'
                TableField = 'ESTADO_TRASPASO'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'CONTABILIZAR'
                TableField = 'CONTABILIZAR'
              end
              item
                DatasetField = 'FECHACAMBIO'
                TableField = 'FECHACAMBIO'
              end>
          end>
        Name = 'Traspasos'
        Fields = <
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_TIPO'
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            DictionaryEntry = 'Traspasos_FECHA'
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Traspasos_CENTRO'
          end
          item
            Name = 'FILIAL'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Traspasos_FILIAL'
          end
          item
            Name = 'CENTRO2'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Traspasos_CENTRO2'
          end
          item
            Name = 'FILIAL2'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Traspasos_FILIAL2'
          end
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_APROBADO'
          end
          item
            Name = 'ESTADO_TRASPASO'
            DataType = datString
            Size = 20
            DictionaryEntry = 'Traspasos_ESTADO_TRASPASO'
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            DictionaryEntry = 'Traspasos_OBSERVACIONES'
          end
          item
            Name = 'CONTABILIZAR'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_CONTABILIZAR'
          end
          item
            Name = 'FECHACAMBIO'
            DataType = datDateTime
            DictionaryEntry = 'Traspasos_FECHACAMBIO'
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            DictionaryEntry = 'Traspasos_CODIGO'
          end
          item
            Name = 'PRODUCTO'
            DataType = datString
            Size = 40
            DictionaryEntry = 'Traspasos_PRODUCTO'
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            DictionaryEntry = 'Traspasos_COLOR'
          end
          item
            Name = 'T38'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T38'
          end
          item
            Name = 'T40'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T40'
          end
          item
            Name = 'T42'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T42'
          end
          item
            Name = 'T44'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T44'
          end
          item
            Name = 'T46'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T46'
          end
          item
            Name = 'T48'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T48'
          end
          item
            Name = 'TOTAL'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TOTAL'
          end
          item
            Name = 'TR38'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR38'
          end
          item
            Name = 'TR40'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR40'
          end
          item
            Name = 'TR42'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR42'
          end
          item
            Name = 'TR44'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR44'
          end
          item
            Name = 'TR46'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR46'
          end
          item
            Name = 'TR48'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR48'
          end
          item
            Name = 'TOTAL_RECT'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TOTAL_RECT'
          end>
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_TRASPASOS'
            SQL = 
              'SELECT '#10'    TIPO, FECHA, CENTRO, FILIAL, CENTRO2, FILIAL2, APROB' +
              'ADO, '#10'    ESTADO_TRASPASO, OBSERVACIONES, CONTABILIZAR, FECHACAM' +
              'BIO, '#10'    CODIGO, PRODUCTO, COLOR, T38, T40, T42, T44, T46, T48,' +
              ' '#10'    TOTAL, TR38, TR40, TR42, TR44, TR46, TR48, TOTAL_RECT'#10'  FR' +
              'OM'#10'    RDX_V_CONTROL_TRASPASOS'#10'  WHERE APROBADO = '#39'N'#39
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'CENTRO'
                TableField = 'CENTRO'
              end
              item
                DatasetField = 'FILIAL'
                TableField = 'FILIAL'
              end
              item
                DatasetField = 'CENTRO2'
                TableField = 'CENTRO2'
              end
              item
                DatasetField = 'FILIAL2'
                TableField = 'FILIAL2'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'PRODUCTO'
                TableField = 'PRODUCTO'
              end
              item
                DatasetField = 'COLOR'
                TableField = 'COLOR'
              end
              item
                DatasetField = 'T38'
                TableField = 'T38'
              end
              item
                DatasetField = 'T40'
                TableField = 'T40'
              end
              item
                DatasetField = 'T42'
                TableField = 'T42'
              end
              item
                DatasetField = 'T44'
                TableField = 'T44'
              end
              item
                DatasetField = 'T46'
                TableField = 'T46'
              end
              item
                DatasetField = 'T48'
                TableField = 'T48'
              end
              item
                DatasetField = 'TOTAL'
                TableField = 'TOTAL'
              end
              item
                DatasetField = 'TR38'
                TableField = 'TR38'
              end
              item
                DatasetField = 'TR40'
                TableField = 'TR40'
              end
              item
                DatasetField = 'TR42'
                TableField = 'TR42'
              end
              item
                DatasetField = 'TR44'
                TableField = 'TR44'
              end
              item
                DatasetField = 'TR46'
                TableField = 'TR46'
              end
              item
                DatasetField = 'TR48'
                TableField = 'TR48'
              end
              item
                DatasetField = 'TOTAL_RECT'
                TableField = 'TOTAL_RECT'
              end
              item
                DatasetField = 'APROBADO'
                TableField = 'APROBADO'
              end
              item
                DatasetField = 'ESTADO_TRASPASO'
                TableField = 'ESTADO_TRASPASO'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'CONTABILIZAR'
                TableField = 'CONTABILIZAR'
              end
              item
                DatasetField = 'FECHACAMBIO'
                TableField = 'FECHACAMBIO'
              end>
          end>
        Name = 'TraspasosPendientes'
        Fields = <
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_TIPO'
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            DictionaryEntry = 'Traspasos_FECHA'
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Traspasos_CENTRO'
          end
          item
            Name = 'FILIAL'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Traspasos_FILIAL'
          end
          item
            Name = 'CENTRO2'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Traspasos_CENTRO2'
          end
          item
            Name = 'FILIAL2'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Traspasos_FILIAL2'
          end
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_APROBADO'
          end
          item
            Name = 'ESTADO_TRASPASO'
            DataType = datString
            Size = 20
            DictionaryEntry = 'Traspasos_ESTADO_TRASPASO'
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            DictionaryEntry = 'Traspasos_OBSERVACIONES'
          end
          item
            Name = 'CONTABILIZAR'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_CONTABILIZAR'
          end
          item
            Name = 'FECHACAMBIO'
            DataType = datDateTime
            DictionaryEntry = 'Traspasos_FECHACAMBIO'
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            DictionaryEntry = 'Traspasos_CODIGO'
          end
          item
            Name = 'PRODUCTO'
            DataType = datString
            Size = 40
            DictionaryEntry = 'Traspasos_PRODUCTO'
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            DictionaryEntry = 'Traspasos_COLOR'
          end
          item
            Name = 'T38'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T38'
          end
          item
            Name = 'T40'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T40'
          end
          item
            Name = 'T42'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T42'
          end
          item
            Name = 'T44'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T44'
          end
          item
            Name = 'T46'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T46'
          end
          item
            Name = 'T48'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T48'
          end
          item
            Name = 'TOTAL'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TOTAL'
          end
          item
            Name = 'TR38'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR38'
          end
          item
            Name = 'TR40'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR40'
          end
          item
            Name = 'TR42'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR42'
          end
          item
            Name = 'TR44'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR44'
          end
          item
            Name = 'TR46'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR46'
          end
          item
            Name = 'TR48'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR48'
          end
          item
            Name = 'TOTAL_RECT'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TOTAL_RECT'
          end>
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_TRASPASOS'
            SQL = 
              'SELECT '#10'    TIPO, FECHA, CENTRO, FILIAL, CENTRO2, FILIAL2, APROB' +
              'ADO, '#10'    ESTADO_TRASPASO, OBSERVACIONES, CONTABILIZAR, FECHACAM' +
              'BIO, '#10'    CODIGO, PRODUCTO, COLOR, T38, T40, T42, T44, T46, T48,' +
              ' '#10'    TOTAL, TR38, TR40, TR42, TR44, TR46, TR48, TOTAL_RECT'#10'  FR' +
              'OM'#10'    RDX_V_CONTROL_TRASPASOS'#10'  WHERE APROBADO = '#39'S'#39
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'CENTRO'
                TableField = 'CENTRO'
              end
              item
                DatasetField = 'FILIAL'
                TableField = 'FILIAL'
              end
              item
                DatasetField = 'CENTRO2'
                TableField = 'CENTRO2'
              end
              item
                DatasetField = 'FILIAL2'
                TableField = 'FILIAL2'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'PRODUCTO'
                TableField = 'PRODUCTO'
              end
              item
                DatasetField = 'COLOR'
                TableField = 'COLOR'
              end
              item
                DatasetField = 'T38'
                TableField = 'T38'
              end
              item
                DatasetField = 'T40'
                TableField = 'T40'
              end
              item
                DatasetField = 'T42'
                TableField = 'T42'
              end
              item
                DatasetField = 'T44'
                TableField = 'T44'
              end
              item
                DatasetField = 'T46'
                TableField = 'T46'
              end
              item
                DatasetField = 'T48'
                TableField = 'T48'
              end
              item
                DatasetField = 'TOTAL'
                TableField = 'TOTAL'
              end
              item
                DatasetField = 'TR38'
                TableField = 'TR38'
              end
              item
                DatasetField = 'TR40'
                TableField = 'TR40'
              end
              item
                DatasetField = 'TR42'
                TableField = 'TR42'
              end
              item
                DatasetField = 'TR44'
                TableField = 'TR44'
              end
              item
                DatasetField = 'TR46'
                TableField = 'TR46'
              end
              item
                DatasetField = 'TR48'
                TableField = 'TR48'
              end
              item
                DatasetField = 'TOTAL_RECT'
                TableField = 'TOTAL_RECT'
              end
              item
                DatasetField = 'APROBADO'
                TableField = 'APROBADO'
              end
              item
                DatasetField = 'ESTADO_TRASPASO'
                TableField = 'ESTADO_TRASPASO'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'CONTABILIZAR'
                TableField = 'CONTABILIZAR'
              end
              item
                DatasetField = 'FECHACAMBIO'
                TableField = 'FECHACAMBIO'
              end>
          end>
        Name = 'TraspasosAprobados'
        Fields = <
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_TIPO'
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            DictionaryEntry = 'Traspasos_FECHA'
          end
          item
            Name = 'CENTRO'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Traspasos_CENTRO'
          end
          item
            Name = 'FILIAL'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Traspasos_FILIAL'
          end
          item
            Name = 'CENTRO2'
            DataType = datString
            Size = 17
            DictionaryEntry = 'Traspasos_CENTRO2'
          end
          item
            Name = 'FILIAL2'
            DataType = datString
            Size = 25
            DictionaryEntry = 'Traspasos_FILIAL2'
          end
          item
            Name = 'APROBADO'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_APROBADO'
          end
          item
            Name = 'ESTADO_TRASPASO'
            DataType = datString
            Size = 20
            DictionaryEntry = 'Traspasos_ESTADO_TRASPASO'
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            DictionaryEntry = 'Traspasos_OBSERVACIONES'
          end
          item
            Name = 'CONTABILIZAR'
            DataType = datString
            Size = 1
            DictionaryEntry = 'Traspasos_CONTABILIZAR'
          end
          item
            Name = 'FECHACAMBIO'
            DataType = datDateTime
            DictionaryEntry = 'Traspasos_FECHACAMBIO'
          end
          item
            Name = 'CODIGO'
            DataType = datString
            Size = 12
            DictionaryEntry = 'Traspasos_CODIGO'
          end
          item
            Name = 'PRODUCTO'
            DataType = datString
            Size = 40
            DictionaryEntry = 'Traspasos_PRODUCTO'
          end
          item
            Name = 'COLOR'
            DataType = datString
            Size = 10
            DictionaryEntry = 'Traspasos_COLOR'
          end
          item
            Name = 'T38'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T38'
          end
          item
            Name = 'T40'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T40'
          end
          item
            Name = 'T42'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T42'
          end
          item
            Name = 'T44'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T44'
          end
          item
            Name = 'T46'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T46'
          end
          item
            Name = 'T48'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_T48'
          end
          item
            Name = 'TOTAL'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TOTAL'
          end
          item
            Name = 'TR38'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR38'
          end
          item
            Name = 'TR40'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR40'
          end
          item
            Name = 'TR42'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR42'
          end
          item
            Name = 'TR44'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR44'
          end
          item
            Name = 'TR46'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR46'
          end
          item
            Name = 'TR48'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TR48'
          end
          item
            Name = 'TOTAL_RECT'
            DataType = datFloat
            DictionaryEntry = 'Traspasos_TOTAL_RECT'
          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 = 'CENTRO2'
            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_TRASPASOS'
            SQL = 
              'SELECT '#10'    TOTAL_RECT'#10'  FROM'#10'    RDX_V_CONTROL_TRASPASOS'#10'  WHER' +
              'E'#10'       FECHA = :FECHA AND'#10'       CENTRO = :CENTRO AND'#10'       C' +
              'ENTRO2 = :CENTRO2 AND'#10'       CODIGO = :CODIGO AND'#10'       COLOR =' +
              ' :COLOR'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'TOTAL_RECT'
                TableField = 'TOTAL_RECT'
              end>
          end>
        Name = 'RefreshTraspasos'
        Fields = <
          item
            Name = 'TOTAL_RECT'
            DataType = datFloat
          end>
      end>
    JoinDataTables = <>
    UnionDataTables = <>
    Commands = <
      item
        Params = <
          item
            Name = 'ESTADO'
            Value = ''
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datString
            Size = 255
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CONTABILIZAR'
            DataType = datString
            Size = 1
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TR38'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TR40'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TR42'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TR44'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TR46'
            DataType = datFloat
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TR48'
            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 = 'CENTRO2'
            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
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'GFT_VARELA'
            TargetTable = 'RDX_V_CONTROL_TRASPASOS'
            SQL = 
              'begin'#10'    declare @rowcount_var int'#10'    declare @ESTADO varchar(' +
              '20)'#10'    declare @OBSERVACIONES varchar(255)'#10'    declare @CONTABI' +
              'LIZAR char(1)'#10#10'    declare @TR38 numeric(15,0)'#10'    declare @TR40' +
              ' numeric(15,0)'#10'    declare @TR42 numeric(15,0)'#10'    declare @TR44' +
              ' numeric(15,0)'#10'    declare @TR46 numeric(15,0)'#10'    declare @TR48' +
              ' numeric(15,0)'#10'    declare @TR_S numeric(15,0)'#10'    declare @TR_M' +
              ' numeric(15,0)'#10'    declare @TR_L numeric(15,0)'#10'    declare @TR_X' +
              'L numeric(15,0)'#10#10'    declare @APROBADO char(1)'#10'    declare @FECH' +
              'A datetime'#10'    declare @CENTRO varchar(17)'#10'    declare @CENTRO2 ' +
              'varchar(17)'#10'    declare @CODIGO varchar(12)'#10'    declare @COLOR v' +
              'archar(10)'#10'    declare @TIPOCANT varchar(3)'#10'    declare @TIPO_TA' +
              'LLAJE smallint'#10'    '#10'    set @ESTADO = :ESTADO'#10'    set @OBSERVACI' +
              'ONES = :OBSERVACIONES'#10'    set @CONTABILIZAR = :CONTABILIZAR'#10#10'   ' +
              ' set @TR38 = :TR38'#10'    set @TR40 = :TR40'#10'    set @TR42 = :TR42'#10' ' +
              '   set @TR44 = :TR44'#10'    set @TR46 = :TR46'#10'    set @TR48 = :TR48' +
              #10'    set @TR_S = :TR38'#10'    set @TR_M = :TR40'#10'    set @TR_L = :TR' +
              '42'#10'    set @TR_XL = :TR44'#10#10'    set @APROBADO = :APROBADO'#10'    set' +
              ' @FECHA = :FECHA'#10'    set @CENTRO = :CENTRO'#10'    set @CENTRO2 = :C' +
              'ENTRO2'#10'    set @CODIGO = :CODIGO'#10'    set @COLOR = :COLOR'#10'    set' +
              ' @TIPOCANT = :TIPO'#10#10'    /* ARREGLO PARA QUE SOPORTE LOS NUEVOS T' +
              'ALLAJES*** */'#10#10'    execute RDX_P_TIPO_TALLAJE @CODIGO, @TIPO_TAL' +
              'LAJE OUTPUT'#10#10'    if @TIPO_TALLAJE = 1'#10'    begin'#10'       set @TR_S' +
              ' = NULL'#10'       set @TR_M = NULL'#10'       set @TR_L = NULL'#10'       s' +
              'et @TR_XL = NULL'#10'    end'#10'    else'#10'    begin'#10'       set @TR38 = N' +
              'ULL'#10'       set @TR40 = NULL'#10'       set @TR42 = NULL'#10'       set @' +
              'TR44 = NULL'#10'       set @TR46 = NULL'#10'       set @TR48 = NULL'#10'    ' +
              'end'#10#10'    /* *********************************** */'#10#9'update RDX_T' +
              'RASPASOS_AJUSTES set'#10#9'           CANT38 = @TR38,'#10#9'           CAN' +
              'T40 = @TR40,'#10#9'           CANT42 = @TR42,'#10#9'           CANT44 = @T' +
              'R44,'#10#9'           CANT46 = @TR46,'#10#9'           CANT48 = @TR48,'#10#9'  ' +
              '         CANT_S = @TR_S,'#10#9'           CANT_M = @TR_M,'#10#9'          ' +
              ' CANT_L = @TR_L,'#10#9'           CANT_XL = @TR_XL,'#10'               AP' +
              'ROBADO = @APROBADO,'#10'               ESTADO = @ESTADO,'#10'           ' +
              '    TIPOCANT = @TIPOCANT,'#10'               OBSERVACIONES = @OBSERV' +
              'ACIONES,'#10'               CONTABILIZAR = @CONTABILIZAR,'#10'          ' +
              '     FECHACAMBIO = CURRENT_TIMESTAMP'#10#9'where'#10'             (RDX_TR' +
              'ASPASOS_AJUSTES.CENTRO = @CENTRO and'#10'              RDX_TRASPASOS' +
              '_AJUSTES.CENTRO2 = @CENTRO2 and'#10#9'      RDX_TRASPASOS_AJUSTES.COD' +
              'IGO = @CODIGO and'#10#9'      RDX_TRASPASOS_AJUSTES.COLOR = @COLOR an' +
              'd'#10#9'      RDX_TRASPASOS_AJUSTES.FECHA = @FECHA)'#10#10#9'select @ROWCOUN' +
              'T_VAR = @@ROWCOUNT'#10#10#9'if @ROWCOUNT_VAR = 0'#10'    begin'#10'         ins' +
              'ert into RDX_TRASPASOS_AJUSTES'#10'                (FECHA, CENTRO, C' +
              'ENTRO2, CODIGO, COLOR,'#10'                 APROBADO, FECHACAMBIO, T' +
              'IPOCANT,'#10'                 ESTADO, OBSERVACIONES, CONTABILIZAR,'#10' ' +
              '                CANT38, CANT40, CANT42,'#10'                 CANT44,' +
              ' CANT46, CANT48,'#10'                 CANT_S, CANT_M, CANT_L, CANT_X' +
              'L)'#10'         values ('#10'                 @FECHA, @CENTRO, @CENTRO2,' +
              ' @CODIGO,'#10'                 @COLOR, @APROBADO, CURRENT_TIMESTAMP,' +
              ' @TIPOCANT,'#10'                 @ESTADO, @OBSERVACIONES, @CONTABILI' +
              'ZAR,'#10'                 @TR38, @TR40, @TR42,'#10'                 @TR4' +
              '4, @TR46, @TR48,'#10'                 @TR_S, @TR_M, @TR_L, @TR_XL)'#10' ' +
              '   end'#10'end'#10
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_Estado_Traspasos'
      end>
    RelationShips = <>
    UpdateRules = <>
    Version = 0
    Left = 40
    Top = 24
  end
  object DADataDictionary1: TDADataDictionary
    Fields = <
      item
        Name = 'Traspasos_TIPO'
        DataType = datString
        Size = 1
        Required = True
        DisplayLabel = 'Tipo'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_FECHA'
        DataType = datDateTime
        DisplayLabel = 'Fecha'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_CENTRO'
        DataType = datString
        Size = 17
        DisplayLabel = 'Centro'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_FILIAL'
        DataType = datString
        Size = 25
        DisplayLabel = 'Filial'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_CENTRO2'
        DataType = datString
        Size = 17
        DisplayLabel = 'Centro2'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_FILIAL2'
        DataType = datString
        Size = 25
        DisplayLabel = 'Filial2'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_CODIGO'
        DataType = datString
        Size = 12
        DisplayLabel = 'C'#243'digo'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_PRODUCTO'
        DataType = datString
        Size = 40
        Required = True
        DisplayLabel = 'Producto'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_COLOR'
        DataType = datString
        Size = 10
        DisplayLabel = 'Color'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_T38'
        DataType = datFloat
        DisplayLabel = 'T38'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_T40'
        DataType = datFloat
        DisplayLabel = 'T40'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_T42'
        DataType = datFloat
        DisplayLabel = 'T42'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_T44'
        DataType = datFloat
        DisplayLabel = 'T44'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_T46'
        DataType = datFloat
        DisplayLabel = 'T46'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_T48'
        DataType = datFloat
        DisplayLabel = 'T48'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_TOTAL'
        DataType = datFloat
        DisplayLabel = 'Total'
        ReadOnly = True
      end
      item
        Name = 'Traspasos_TR38'
        DataType = datFloat
        DisplayLabel = 'TR38'
      end
      item
        Name = 'Traspasos_TR40'
        DataType = datFloat
        DisplayLabel = 'TR40'
      end
      item
        Name = 'Traspasos_TR42'
        DataType = datFloat
        DisplayLabel = 'TR42'
      end
      item
        Name = 'Traspasos_TR44'
        DataType = datFloat
        DisplayLabel = 'TR44'
      end
      item
        Name = 'Traspasos_TR46'
        DataType = datFloat
        DisplayLabel = 'TR46'
      end
      item
        Name = 'Traspasos_TR48'
        DataType = datFloat
        DisplayLabel = 'TR48'
      end
      item
        Name = 'Traspasos_TOTAL_RECT'
        DataType = datFloat
        DisplayLabel = 'Total'
      end
      item
        Name = 'Traspasos_APROBADO'
        DataType = datString
        Size = 1
        DisplayLabel = 'Aprobado'
      end
      item
        Name = 'Traspasos_ESTADO_TRASPASO'
        DataType = datString
        Size = 20
        DisplayLabel = 'Estado'
      end
      item
        Name = 'Traspasos_OBSERVACIONES'
        DataType = datString
        Size = 255
        DisplayLabel = 'Observaciones'
      end
      item
        Name = 'Traspasos_CONTABILIZAR'
        DataType = datString
        Size = 1
        DisplayLabel = 'Contabilizar'
      end
      item
        Name = 'Traspasos_FECHACAMBIO'
        DataType = datDateTime
        DisplayLabel = 'Fecha cambio'
        ReadOnly = True
      end>
    Left = 40
    Top = 168
  end
  object bpTraspasos: TDABusinessProcessor
    Schema = schTraspasos
    UpdateCommandName = 'Update_Estado_Traspasos'
    RefreshDatasetName = 'RefreshTraspasos'
    ReferencedDataset = 'Traspasos'
    ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateDelete, poPrepareCommands, poIgnoreRowsAffected]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 32
  end
  object bpTraspasosAprobadas: TDABusinessProcessor
    Schema = schTraspasos
    UpdateCommandName = 'Update_Estado_Traspasos'
    RefreshDatasetName = 'RefreshTraspasos'
    ReferencedDataset = 'TraspasosAprobados'
    ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateDelete, poPrepareCommands, poIgnoreRowsAffected]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 88
  end
  object bpTraspasosPendientes: TDABusinessProcessor
    Schema = schTraspasos
    UpdateCommandName = 'Update_Estado_Traspasos'
    RefreshDatasetName = 'RefreshTraspasos'
    ReferencedDataset = 'TraspasosPendientes'
    ProcessorOptions = [poAutoGenerateInsert, poAutoGenerateDelete, poPrepareCommands, poIgnoreRowsAffected]
    UpdateMode = updWhereKeyOnly
    Left = 192
    Top = 152
  end
end
