object srvObras: TsrvObras
  OldCreateOrder = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schObras
  ServiceAdapter = DABINAdapter
  Left = 657
  Top = 335
  Height = 300
  Width = 300
  object schObras: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = dmServer.DataDictionary
    Diagrams = dmServer.DADiagrams
    Datasets = <
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRAS'
            SQL = 
              'SELECT'#10'    OBRAS.CODIGOEMPRESA, OBRAS.CODIGO, OBRAS.FECHAALTA, O' +
              'BRAS.USUARIO,'#10'    OBRAS.NOMBRE, OBRAS.FECHAINIOBR, OBRAS.FECHAFI' +
              'NOBR, OBRAS.CALLE,'#10'    OBRAS.CODIGOPOSTAL, OBRAS.POBLACION, OBRA' +
              'S.PROVINCIA, OBRAS.TIPO,'#10'    OBRAS.DIMENSIONES, OBRAS.HONORARIOS' +
              ', OBRAS.IMPORTEHONORARIOS,'#10'    OBRAS.APLICAHONORARIOS, OBRAS.TOT' +
              'ALPRESUPUESTOSINI, OBRAS.TOTALPRESUPUESTOSFIN,'#10'    OBRAS.CODIGOC' +
              'ONTACTO, CONTACTOS.NOMBRE as NOMBRECLIENTE'#10'  FROM OBRAS'#10'  LEFT J' +
              'OIN CONTACTOS ON (OBRAS.CODIGOCONTACTO = CONTACTOS.CODIGO)'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGOEMPRESA'
                TableField = 'CODIGOEMPRESA'
              end
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'FECHAALTA'
                TableField = 'FECHAALTA'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'FECHAINIOBR'
                TableField = 'FECHAINIOBR'
              end
              item
                DatasetField = 'FECHAFINOBR'
                TableField = 'FECHAFINOBR'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'CODIGOPOSTAL'
                TableField = 'CODIGOPOSTAL'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'NOMBRECLIENTE'
                TableField = 'NOMBRECLIENTE'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'DIMENSIONES'
                TableField = 'DIMENSIONES'
              end
              item
                DatasetField = 'HONORARIOS'
                TableField = 'HONORARIOS'
              end
              item
                DatasetField = 'IMPORTEHONORARIOS'
                TableField = 'IMPORTEHONORARIOS'
              end
              item
                DatasetField = 'APLICAHONORARIOS'
                TableField = 'APLICAHONORARIOS'
              end
              item
                DatasetField = 'TOTALPRESUPUESTOSINI'
                TableField = 'TOTALPRESUPUESTOSINI'
              end
              item
                DatasetField = 'TOTALPRESUPUESTOSFIN'
                TableField = 'TOTALPRESUPUESTOSFIN'
              end>
          end>
        Name = 'Obras'
        Fields = <
          item
            Name = 'CODIGOEMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'CODIGOSEMPRESAS'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOOBRA'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAINIOBR'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'FECHAINICIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAFINOBR'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'FECHAFIN'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOPOSTAL'
            DataType = datString
            Size = 5
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOPOSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 40
            BlobType = dabtUnknown
            DictionaryEntry = 'POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            DictionaryEntry = 'PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DIMENSIONES'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'HONORARIOS'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTEHONORARIOS'
            DataType = datCurrency
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'APLICAHONORARIOS'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TOTALPRESUPUESTOSINI'
            DataType = datCurrency
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TOTALPRESUPUESTOSFIN'
            DataType = datCurrency
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOCONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRECLIENTE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Nombre'
            Alignment = taLeftJustify
            ServerAutoRefresh = True
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRASCONTACTOS'
            SQL = 
              'SELECT OBRASCONTACTOS.CODIGOOBRA, OBRASCONTACTOS.CODIGOCONTACTO,' +
              ' CONTACTOS.NOMBRE,'#10'(select CADENA from getcategorias(OBRASCONTAC' +
              'TOS.CODIGOCONTACTO)) as CATEGORIAS'#10#10'FROM OBRASCONTACTOS'#10'LEFT JOI' +
              'N CONTACTOS ON (OBRASCONTACTOS.CODIGOCONTACTO = CONTACTOS.CODIGO' +
              ')'#10'WHERE OBRASCONTACTOS.CODIGOOBRA = :CODIGOOBRA'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'CATEGORIAS'
                TableField = 'CATEGORIAS'
              end>
          end>
        Name = 'ContactosObra'
        Fields = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOOBRA'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOCONTACTO'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Nombre'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CATEGORIAS'
            DataType = datString
            Size = 1000
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRASCONTACTOS'
            SQL = 
              'SELECT OBRASCONTACTOS.CODIGOOBRA, OBRASCONTACTOS.CODIGOCONTACTO,' +
              ' CONTACTOS.NOMBRE,'#10'(select CADENA from getcategorias(OBRASCONTAC' +
              'TOS.CODIGOCONTACTO)) as CATEGORIAS'#10#10'FROM OBRASCONTACTOS'#10'LEFT JOI' +
              'N CONTACTOS ON (OBRASCONTACTOS.CODIGOCONTACTO = CONTACTOS.CODIGO' +
              ')'#10'WHERE OBRASCONTACTOS.CODIGOOBRA = :CODIGOOBRA'#10'AND OBRASCONTACT' +
              'OS.CODIGOCONTACTO = :CODIGOCONTACTO'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'CATEGORIAS'
                TableField = 'CATEGORIAS'
              end>
          end>
        Name = 'RefrescoContactosObra'
        Fields = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOOBRA'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOCONTACTO'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CATEGORIAS'
            DataType = datString
            Size = 1000
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = '1'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRAS'
            SQL = 
              'SELECT '#10'    OBRAS.CODIGO, CONTACTOS.NOMBRE as NOMBRECLIENTE'#10'  FR' +
              'OM CONTACTOS RIGHT OUTER JOIN OBRAS ON (CONTACTOS.CODIGO = OBRAS' +
              '.CODIGOCONTACTO)'#10'  WHERE (OBRAS.CODIGO = :CODIGO)'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'NOMBRECLIENTE'
                TableField = 'NOMBRECLIENTE'
              end>
          end>
        Name = 'RefrescoObras'
        Fields = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOOBRA'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRECLIENTE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            LogChanges = False
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PRESUPUESTOSOBRAS'
            SQL = 
              'SELECT '#10'    PRESUPUESTOSOBRAS.CODIGO, PRESUPUESTOSOBRAS.CODIGOOB' +
              'RA, PRESUPUESTOSOBRAS.CODIGOCONTACTO,'#10'    PRESUPUESTOSOBRAS.FECH' +
              'AALTA, PRESUPUESTOSOBRAS.USUARIO, PRESUPUESTOSOBRAS.FECHA,'#10'    P' +
              'RESUPUESTOSOBRAS.CLASE, PRESUPUESTOSOBRAS.ACEPTADO, PRESUPUESTOS' +
              'OBRAS.TIPO,'#10'    PRESUPUESTOSOBRAS.DESCRIPCION, PRESUPUESTOSOBRAS' +
              '.PRESUPUESTOINICIAL,'#10'    PRESUPUESTOSOBRAS.PRESUPUESTOFINAL, PRE' +
              'SUPUESTOSOBRAS.APLICARETENCION,'#10'    PRESUPUESTOSOBRAS.RETENCION,' +
              ' PRESUPUESTOSOBRAS.TIEMPORETENCION,'#10'    PRESUPUESTOSOBRAS.IMPORT' +
              'ERETENCION, CONTACTOS.NOMBRE'#10'FROM PRESUPUESTOSOBRAS'#10'LEFT JOIN CO' +
              'NTACTOS ON (PRESUPUESTOSOBRAS.CODIGOCONTACTO = CONTACTOS.CODIGO)' +
              #10'WHERE PRESUPUESTOSOBRAS.CODIGOOBRA = :CODIGOOBRA'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'FECHAALTA'
                TableField = 'FECHAALTA'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'PRESUPUESTOINICIAL'
                TableField = 'PRESUPUESTOINICIAL'
              end
              item
                DatasetField = 'PRESUPUESTOFINAL'
                TableField = 'PRESUPUESTOFINAL'
              end
              item
                DatasetField = 'RETENCION'
                TableField = 'RETENCION'
              end
              item
                DatasetField = 'TIEMPORETENCION'
                TableField = 'TIEMPORETENCION'
              end
              item
                DatasetField = 'CLASE'
                TableField = 'CLASE'
              end
              item
                DatasetField = 'ACEPTADO'
                TableField = 'ACEPTADO'
              end
              item
                DatasetField = 'APLICARETENCION'
                TableField = 'APLICARETENCION'
              end
              item
                DatasetField = 'IMPORTERETENCION'
                TableField = 'IMPORTERETENCION'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end>
          end>
        Name = 'PresupuestosObra'
        Fields = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGO'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOOBRA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOCONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAPRESUPUESTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CLASE'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Clase'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ACEPTADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DefaultValue = '0'
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Aceptado'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 10
            Description = 'Cocina, ba'#241'o, etc'
            BlobType = dabtUnknown
            DictionaryEntry = 'TIPOPRESUPUESTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Descripci'#243'n'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRESUPUESTOINICIAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DefaultValue = '0'
            DisplayWidth = 0
            DisplayLabel = 'Presupuesto inicial'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRESUPUESTOFINAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DefaultValue = '0'
            DisplayWidth = 0
            DisplayLabel = 'Presupuesto final'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'APLICARETENCION'
            DataType = datInteger
            BlobType = dabtUnknown
            DefaultValue = '0'
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Aplica retenci'#243'n'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            DefaultValue = '0'
            DisplayWidth = 0
            DisplayLabel = 'Retenci'#243'n'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIEMPORETENCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DefaultValue = '0'
            DisplayWidth = 0
            DisplayLabel = 'Tiempo retenci'#243'n'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTERETENCION'
            DataType = datCurrency
            BlobType = dabtUnknown
            DefaultValue = '0'
            DisplayWidth = 0
            DisplayLabel = 'Importe a retener'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PRESUPUESTOSOBRAS'
            SQL = 
              'SELECT '#10'    PRESUPUESTOSOBRAS.CODIGO, PRESUPUESTOSOBRAS.CODIGOOB' +
              'RA, PRESUPUESTOSOBRAS.CODIGOCONTACTO,'#10'    PRESUPUESTOSOBRAS.FECH' +
              'AALTA, PRESUPUESTOSOBRAS.USUARIO, PRESUPUESTOSOBRAS.FECHA,'#10'    P' +
              'RESUPUESTOSOBRAS.CLASE, PRESUPUESTOSOBRAS.ACEPTADO, PRESUPUESTOS' +
              'OBRAS.TIPO,'#10'    PRESUPUESTOSOBRAS.DESCRIPCION, PRESUPUESTOSOBRAS' +
              '.PRESUPUESTOINICIAL,'#10'    PRESUPUESTOSOBRAS.PRESUPUESTOFINAL, PRE' +
              'SUPUESTOSOBRAS.APLICARETENCION,'#10'    PRESUPUESTOSOBRAS.RETENCION,' +
              ' PRESUPUESTOSOBRAS.TIEMPORETENCION,'#10'    PRESUPUESTOSOBRAS.IMPORT' +
              'ERETENCION, CONTACTOS.NOMBRE'#10'FROM PRESUPUESTOSOBRAS'#10'LEFT JOIN CO' +
              'NTACTOS ON (PRESUPUESTOSOBRAS.CODIGOCONTACTO = CONTACTOS.CODIGO)' +
              #10'WHERE PRESUPUESTOSOBRAS.CODIGOOBRA = :CODIGOOBRA'#10'AND PRESUPUEST' +
              'OSOBRAS.CODIGO = :CODIGO'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'FECHAALTA'
                TableField = 'FECHAALTA'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'FECHA'
                TableField = 'FECHA'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'PRESUPUESTOINICIAL'
                TableField = 'PRESUPUESTOINICIAL'
              end
              item
                DatasetField = 'PRESUPUESTOFINAL'
                TableField = 'PRESUPUESTOFINAL'
              end
              item
                DatasetField = 'RETENCION'
                TableField = 'RETENCION'
              end
              item
                DatasetField = 'TIEMPORETENCION'
                TableField = 'TIEMPORETENCION'
              end
              item
                DatasetField = 'CLASE'
                TableField = 'CLASE'
              end
              item
                DatasetField = 'ACEPTADO'
                TableField = 'ACEPTADO'
              end
              item
                DatasetField = 'APLICARETENCION'
                TableField = 'APLICARETENCION'
              end
              item
                DatasetField = 'IMPORTERETENCION'
                TableField = 'IMPORTERETENCION'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end>
          end>
        Name = 'RefrescoPresupuestosObra'
        Fields = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGO'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOOBRA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOCONTACTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAPRESUPUESTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CLASE'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Clase'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'ACEPTADO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Aceptado'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 10
            Description = 'Cocina, ba'#241'o, etc'
            BlobType = dabtUnknown
            DictionaryEntry = 'TIPOPRESUPUESTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'DESCRIPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRESUPUESTOINICIAL'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Presupuesto inicial'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PRESUPUESTOFINAL'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Presupuesto final'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'APLICARETENCION'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Aplica retenci'#243'n'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'RETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Retenci'#243'n'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIEMPORETENCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Tiempo retenci'#243'n'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTERETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Importe a retener'
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PROYECTOSOBRAS'
            SQL = 
              'SELECT '#10'    CODIGO, CODIGOOBRA, DESCRIPCION, TIPO, TERMINADO'#10'FRO' +
              'M PROYECTOSOBRAS'#10'WHERE CODIGOOBRA = :CODIGOOBRA'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'TERMINADO'
                TableField = 'TERMINADO'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end>
          end>
        Name = 'ProyectosObra'
        Fields = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGO'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'DESCRIPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Tipo proyecto'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TERMINADO'
            DataType = datInteger
            BlobType = dabtUnknown
            DefaultValue = '0'
            Required = True
            DisplayWidth = 0
            DisplayLabel = 'Estado'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <
      item
        Params = <
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRASCONTACTOS'
            SQL = 
              'INSERT'#10'  INTO OBRASCONTACTOS'#10'    (CODIGOOBRA, CODIGOCONTACTO)'#10'  ' +
              'VALUES'#10'    (:CODIGOOBRA, :CODIGOCONTACTO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_ContactosObra'
      end
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOEMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAINIOBR'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAFINOBR'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOPOSTAL'
            DataType = datString
            Size = 5
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 40
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'HONORARIOS'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'APLICAHONORARIOS'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTEHONORARIOS'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DIMENSIONES'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TOTALPRESUPUESTOSINI'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TOTALPRESUPUESTOSFIN'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRAS'
            SQL = 
              'INSERT INTO OBRAS ('#10'    CODIGO,'#10'    CODIGOEMPRESA,'#10'    FECHAALTA' +
              ','#10'    USUARIO,'#10'    TIPO,'#10'    NOMBRE,'#10'    FECHAINIOBR,'#10'    FECHAF' +
              'INOBR,'#10'    CALLE,'#10'    CODIGOPOSTAL,'#10'    POBLACION,'#10'    PROVINCIA' +
              ','#10'    HONORARIOS,'#10'    APLICAHONORARIOS,'#10'    IMPORTEHONORARIOS,'#10' ' +
              '   DIMENSIONES,'#10'    CODIGOCONTACTO,'#10'    TOTALPRESUPUESTOSINI,'#10'  ' +
              '  TOTALPRESUPUESTOSFIN)'#10'  VALUES ('#10'    :CODIGO,'#10'    :CODIGOEMPRE' +
              'SA,'#10'    :FECHAALTA,'#10'    :USUARIO,'#10'    :TIPO,'#10'    :NOMBRE,'#10'    :F' +
              'ECHAINIOBR,'#10'    :FECHAFINOBR,'#10'    :CALLE,'#10'    :CODIGOPOSTAL,'#10'   ' +
              ' :POBLACION,'#10'    :PROVINCIA,'#10'    :HONORARIOS,'#10'    :APLICAHONORAR' +
              'IOS,'#10'    :IMPORTEHONORARIOS,'#10'    :DIMENSIONES,'#10'    :CODIGOCONTAC' +
              'TO,'#10'    :TOTALPRESUPUESTOSINI,'#10'    :TOTALPRESUPUESTOSFIN)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_Obras'
      end
      item
        Params = <
          item
            Name = 'CODIGOEMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAINIOBR'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAFINOBR'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOPOSTAL'
            DataType = datString
            Size = 5
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 40
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'HONORARIOS'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'APLICAHONORARIOS'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTEHONORARIOS'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DIMENSIONES'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TOTALPRESUPUESTOSINI'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TOTALPRESUPUESTOSFIN'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'OBRAS'
            SQL = 
              'UPDATE OBRAS'#10'  SET CODIGOEMPRESA = :CODIGOEMPRESA,'#10'      FECHAAL' +
              'TA = :FECHAALTA,'#10'      USUARIO = :USUARIO,'#10'      TIPO = :TIPO,'#10' ' +
              '     NOMBRE = :NOMBRE,'#10'      FECHAINIOBR = :FECHAINIOBR,'#10'      F' +
              'ECHAFINOBR = :FECHAFINOBR,'#10'      CALLE = :CALLE,'#10'      CODIGOPOS' +
              'TAL = :CODIGOPOSTAL,'#10'      POBLACION = :POBLACION,'#10'      PROVINC' +
              'IA = :PROVINCIA,'#10'      HONORARIOS = :HONORARIOS,'#10'      APLICAHON' +
              'ORARIOS = :APLICAHONORARIOS,'#10'      IMPORTEHONORARIOS = :IMPORTEH' +
              'ONORARIOS,'#10'      DIMENSIONES = :DIMENSIONES,'#10'      CODIGOCONTACT' +
              'O = :CODIGOCONTACTO,'#10'      TOTALPRESUPUESTOSINI = :TOTALPRESUPUE' +
              'STOSINI,'#10'      TOTALPRESUPUESTOSFIN = :TOTALPRESUPUESTOSFIN'#10'  WH' +
              'ERE'#10'       (CODIGO = :OLD_CODIGO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_Obras'
      end
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRESUPUESTOINICIAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRESUPUESTOFINAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'RETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIEMPORETENCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CLASE'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ACEPTADO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'APLICARETENCION'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTERETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PRESUPUESTOSOBRAS'
            SQL = 
              'INSERT'#10'  INTO PRESUPUESTOSOBRAS'#10'    (CODIGO, CODIGOOBRA, CODIGOC' +
              'ONTACTO, FECHAALTA, USUARIO, '#10'     FECHA, TIPO, DESCRIPCION, PRE' +
              'SUPUESTOINICIAL, PRESUPUESTOFINAL, '#10'     RETENCION, TIEMPORETENC' +
              'ION, CLASE, ACEPTADO, APLICARETENCION, '#10'     IMPORTERETENCION)'#10' ' +
              ' VALUES'#10'    (:CODIGO, :CODIGOOBRA, :CODIGOCONTACTO, :FECHAALTA, ' +
              #10'     :USUARIO, :FECHA, :TIPO, :DESCRIPCION, :PRESUPUESTOINICIAL' +
              ', '#10'     :PRESUPUESTOFINAL, :RETENCION, :TIEMPORETENCION, :CLASE,' +
              ' '#10'     :ACEPTADO, :APLICARETENCION, :IMPORTERETENCION)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_PresupuestosObra'
      end
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'FECHA'
            DataType = datDateTime
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRESUPUESTOINICIAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PRESUPUESTOFINAL'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'RETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'TIEMPORETENCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'CLASE'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'ACEPTADO'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'APLICARETENCION'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'IMPORTERETENCION'
            DataType = datFloat
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'OLD_CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PRESUPUESTOSOBRAS'
            SQL = 
              'UPDATE PRESUPUESTOSOBRAS'#10'  SET '#10'    CODIGO = :CODIGO, '#10'    CODIG' +
              'OOBRA = :CODIGOOBRA, '#10'    CODIGOCONTACTO = :CODIGOCONTACTO, '#10'   ' +
              ' FECHAALTA = :FECHAALTA, '#10'    USUARIO = :USUARIO, '#10'    FECHA = :' +
              'FECHA, '#10'    TIPO = :TIPO, '#10'    DESCRIPCION = :DESCRIPCION, '#10'    ' +
              'PRESUPUESTOINICIAL = :PRESUPUESTOINICIAL, '#10'    PRESUPUESTOFINAL ' +
              '= :PRESUPUESTOFINAL, '#10'    RETENCION = :RETENCION, '#10'    TIEMPORET' +
              'ENCION = :TIEMPORETENCION, '#10'    CLASE = :CLASE, '#10'    ACEPTADO = ' +
              ':ACEPTADO, '#10'    APLICARETENCION = :APLICARETENCION, '#10'    IMPORTE' +
              'RETENCION = :IMPORTERETENCION'#10'  WHERE'#10'    (CODIGO = :OLD_CODIGO)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_PresupuestosObra'
      end>
    RelationShips = <
      item
        Name = 'FK_ContactosObra_Obras'
        MasterDatasetName = 'Obras'
        MasterFields = 'CODIGO'
        DetailDatasetName = 'ContactosObra'
        DetailFields = 'CODIGOOBRA'
      end
      item
        Name = 'FK_PresupuestosObra_Obras'
        MasterDatasetName = 'Obras'
        MasterFields = 'CODIGO'
        DetailDatasetName = 'PresupuestosObra'
        DetailFields = 'CODIGOOBRA'
      end>
    UpdateRules = <
      item
        Name = 'Insert Obras'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'Obras'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert ContactosObra'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'ContactosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert PresupuestosObra'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'PresupuestosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert ProyectosObra'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'ProyectosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update Obras'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'Obras'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update ContactosObra'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'ContactosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update PresupuestosObra'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'PresupuestosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update ProyectosObra'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'ProyectosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete Obras'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'Obras'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete ContactosObra'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'ContactosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete PresupuestosObra'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'PresupuestosObra'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete ProyectosObra'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'ProyectosObra'
        FailureBehaviour = fbRaiseException
      end>
    Left = 40
    Top = 24
  end
  object bpContactosObra: TDABusinessProcessor
    Schema = schObras
    InsertCommandName = 'Insert_ContactosObra'
    RefreshDatasetName = 'RefrescoContactosObra'
    ReferencedDataset = 'ContactosObra'
    ProcessorOptions = [poAutoGenerateUpdate, poAutoGenerateDelete, poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 160
    Top = 80
  end
  object bpObras: TDABusinessProcessor
    Schema = schObras
    InsertCommandName = 'Insert_Obras'
    UpdateCommandName = 'Update_Obras'
    RefreshDatasetName = 'RefrescoObras'
    ReferencedDataset = 'Obras'
    ProcessorOptions = [poAutoGenerateDelete, poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 160
    Top = 16
  end
  object bpPresupuestosObra: TDABusinessProcessor
    Schema = schObras
    InsertCommandName = 'Insert_PresupuestosObra'
    UpdateCommandName = 'Update_PresupuestosObra'
    RefreshDatasetName = 'RefrescoPresupuestosObra'
    ReferencedDataset = 'PresupuestosObra'
    ProcessorOptions = [poAutoGenerateDelete, poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 160
    Top = 144
  end
  object DABINAdapter: TDABINAdapter
    Left = 40
    Top = 80
  end
end
