object srvFormasPago: TsrvFormasPago
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  SessionManager = dmServer.SessionManager
  ServiceSchema = schFormasPago
  ServiceDataStreamer = Bin2DataStreamer
  ExportedDataTables = <>
  BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
  Height = 208
  Width = 441
  object Diagrams: TDADiagrams
    Left = 150
    Top = 90
    DiagramData = 
      '<Diagrams>'#13#10'  <Diagram Name="New Diagram" Left="200" Top="200" W' +
      'idth="400" Height="300">'#13#10'    <Entity Name="FormasPagoPlazos" Le' +
      'ft="394,00" Top="98,00" />'#13#10'    <Entity Name="FormasPago" Left="' +
      '0,00" Top="0,00" />'#13#10'  </Diagram>'#13#10'</Diagrams>'#13#10
  end
  object DataDictionary: TDADataDictionary
    Fields = <
      item
        Name = 'FormasPago_REFERENCIA'
        DataType = datString
        Size = 255
        DisplayLabel = 'Referencia'
      end
      item
        Name = 'FormasPago_DESCRIPCION'
        DataType = datString
        Size = 255
        DisplayLabel = 'Descripci'#243'n'
      end
      item
        Name = 'FormasPago_TITULAR'
        DataType = datString
        Size = 255
        DisplayLabel = 'Titular'
      end
      item
        Name = 'FormasPago_ENTIDAD'
        DataType = datString
        Size = 15
        DisplayLabel = 'C'#243'd. Entidad'
      end
      item
        Name = 'FormasPago_SUCURSAL'
        DataType = datString
        Size = 15
        DisplayLabel = 'C'#243'd. Sucusal'
      end
      item
        Name = 'FormasPago_DC'
        DataType = datString
        Size = 15
        DisplayLabel = 'DC'
      end
      item
        Name = 'FormasPago_CUENTA'
        DataType = datString
        Size = 15
        DisplayLabel = 'C'#243'd. Cuenta'
      end
      item
        Name = 'FormasPagoPlazos_NUM_DIAS'
        DataType = datSmallInt
        DisplayLabel = 'Num. d'#237'as'
      end
      item
        Name = 'FormasPagoPlazos_PORCENTAJE'
        DataType = datFloat
        DisplayLabel = '% aplazado'
        Alignment = taRightJustify
      end
      item
        Name = 'FormasPagoPlazos_ID'
        DataType = datAutoInc
        GeneratorName = 'GEN_FORMAS_PAGO_PLAZOS_ID'
        Required = True
        ServerAutoRefresh = True
      end
      item
        Name = 'FormasPagoPlazos_ID_FORMA_PAGO'
        DataType = datInteger
        Required = True
      end
      item
        Name = 'FormasPago_ID'
        DataType = datAutoInc
        GeneratorName = 'GEN_FORMAS_PAGO_ID'
        Required = True
        DisplayLabel = 'ID'
        ServerAutoRefresh = True
      end>
    Left = 150
    Top = 24
  end
  object schFormasPago: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DataDictionary
    Diagrams = Diagrams
    Datasets = <
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FORMAS_PAGO'
            StatementType = stAutoSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'TITULAR'
                TableField = 'TITULAR'
              end
              item
                DatasetField = 'ENTIDAD'
                TableField = 'ENTIDAD'
              end
              item
                DatasetField = 'SUCURSAL'
                TableField = 'SUCURSAL'
              end
              item
                DatasetField = 'DC'
                TableField = 'DC'
              end
              item
                DatasetField = 'CUENTA'
                TableField = 'CUENTA'
              end>
          end>
        Name = 'FormasPago'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            GeneratorName = 'GEN_FORMAS_PAGO_ID'
            ServerAutoRefresh = True
            DictionaryEntry = 'FormasPago_ID'
            InPrimaryKey = True
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            DictionaryEntry = 'FormasPago_REFERENCIA'
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            DictionaryEntry = 'FormasPago_DESCRIPCION'
          end
          item
            Name = 'TITULAR'
            DataType = datString
            Size = 255
            DictionaryEntry = 'FormasPago_TITULAR'
          end
          item
            Name = 'ENTIDAD'
            DataType = datString
            Size = 15
            DictionaryEntry = 'FormasPago_ENTIDAD'
          end
          item
            Name = 'SUCURSAL'
            DataType = datString
            Size = 15
            DictionaryEntry = 'FormasPago_SUCURSAL'
          end
          item
            Name = 'DC'
            DataType = datString
            Size = 15
            DictionaryEntry = 'FormasPago_DC'
          end
          item
            Name = 'CUENTA'
            DataType = datString
            Size = 15
            DictionaryEntry = 'FormasPago_CUENTA'
          end>
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FORMAS_PAGO_PLAZOS'
            StatementType = stAutoSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_FORMA_PAGO'
                TableField = 'ID_FORMA_PAGO'
              end
              item
                DatasetField = 'NUM_DIAS'
                TableField = 'NUM_DIAS'
              end
              item
                DatasetField = 'PORCENTAJE'
                TableField = 'PORCENTAJE'
              end>
          end>
        Name = 'FormasPagoPlazos'
        Fields = <
          item
            Name = 'ID'
            DataType = datAutoInc
            GeneratorName = 'GEN_FORMAS_PAGO_PLAZOS_ID'
            ServerAutoRefresh = True
            DictionaryEntry = 'FormasPagoPlazos_ID'
            InPrimaryKey = True
          end
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            DictionaryEntry = 'FormasPagoPlazos_ID_FORMA_PAGO'
          end
          item
            Name = 'NUM_DIAS'
            DataType = datSmallInt
            DictionaryEntry = 'FormasPagoPlazos_NUM_DIAS'
          end
          item
            Name = 'PORCENTAJE'
            DataType = datFloat
            DictionaryEntry = 'FormasPagoPlazos_PORCENTAJE'
          end>
      end>
    JoinDataTables = <>
    UnionDataTables = <>
    Commands = <
      item
        Params = <
          item
            Name = 'ID'
            DataType = datAutoInc
            GeneratorName = 'GEN_FORMAS_PAGO_ID'
            Value = ''
          end
          item
            Name = 'REFERENCIA'
            Value = ''
          end
          item
            Name = 'DESCRIPCION'
            Value = ''
          end
          item
            Name = 'TITULAR'
            Value = ''
          end
          item
            Name = 'ENTIDAD'
            Value = ''
          end
          item
            Name = 'SUCURSAL'
            Value = ''
          end
          item
            Name = 'DC'
            Value = ''
          end
          item
            Name = 'CUENTA'
            Value = ''
          end>
        Statements = <
          item
            Connection = 'IBX'
            Default = True
            TargetTable = 'FORMAS_PAGO'
            SQL = 
              'INSERT'#10'  INTO FORMAS_PAGO'#10'    (ID, REFERENCIA, DESCRIPCION, TITU' +
              'LAR, ENTIDAD, SUCURSAL,'#10'     DC, CUENTA)'#10'  VALUES'#10'    (:ID, :REF' +
              'ERENCIA, :DESCRIPCION, :TITULAR, :ENTIDAD, :SUCURSAL,'#10'     :DC, ' +
              ':CUENTA)'#10
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_FormasPago'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datAutoInc
            Value = '0'
          end>
        Statements = <
          item
            Connection = 'IBX'
            Default = True
            TargetTable = 'FORMAS_PAGO'
            SQL = 'DELETE '#10'  FROM'#10'    FORMAS_PAGO'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_FormasPago'
      end
      item
        Params = <
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
            Value = ''
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 255
            Value = ''
          end
          item
            Name = 'TITULAR'
            DataType = datString
            Size = 255
            Value = ''
          end
          item
            Name = 'ENTIDAD'
            DataType = datString
            Size = 15
            Value = ''
          end
          item
            Name = 'SUCURSAL'
            DataType = datString
            Size = 15
            Value = ''
          end
          item
            Name = 'DC'
            DataType = datString
            Size = 15
            Value = ''
          end
          item
            Name = 'CUENTA'
            DataType = datString
            Size = 15
            Value = ''
          end
          item
            Name = 'OLD_ID'
            DataType = datAutoInc
            Value = '0'
          end>
        Statements = <
          item
            Connection = 'IBX'
            Default = True
            TargetTable = 'FORMAS_PAGO'
            SQL = 
              'UPDATE FORMAS_PAGO'#10'  SET '#10'    REFERENCIA = :REFERENCIA, '#10'    DES' +
              'CRIPCION = :DESCRIPCION, '#10'    TITULAR = :TITULAR, '#10'    ENTIDAD =' +
              ' :ENTIDAD, '#10'    SUCURSAL = :SUCURSAL, '#10'    DC = :DC, '#10'    CUENTA' +
              ' = :CUENTA'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_FormasPago'
      end
      item
        Params = <
          item
            Name = 'ID'
            DataType = datAutoInc
            GeneratorName = 'GEN_FORMAS_PAGO_PLAZOS_ID'
            Value = ''
          end
          item
            Name = 'ID_FORMA_PAGO'
            Value = ''
          end
          item
            Name = 'NUM_DIAS'
            Value = ''
          end
          item
            Name = 'PORCENTAJE'
            Value = ''
          end>
        Statements = <
          item
            Connection = 'IBX'
            Default = True
            TargetTable = 'FORMAS_PAGO_PLAZOS'
            SQL = 
              'INSERT'#10'  INTO FORMAS_PAGO_PLAZOS'#10'    (ID, ID_FORMA_PAGO, NUM_DIA' +
              'S, PORCENTAJE)'#10'  VALUES'#10'    (:ID, :ID_FORMA_PAGO, :NUM_DIAS, :PO' +
              'RCENTAJE)'#10
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Insert_FormasPagoPlazos'
      end
      item
        Params = <
          item
            Name = 'OLD_ID'
            DataType = datAutoInc
            Value = '0'
          end>
        Statements = <
          item
            Connection = 'IBX'
            Default = True
            TargetTable = 'FORMAS_PAGO_PLAZOS'
            SQL = 'DELETE '#10'  FROM'#10'    FORMAS_PAGO_PLAZOS'#10'  WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Delete_FormasPagoPlazos'
      end
      item
        Params = <
          item
            Name = 'ID_FORMA_PAGO'
            DataType = datInteger
            Value = '0'
          end
          item
            Name = 'NUM_DIAS'
            DataType = datSmallInt
            Value = '0'
          end
          item
            Name = 'PORCENTAJE'
            DataType = datFloat
            Value = '0'
          end
          item
            Name = 'OLD_ID'
            DataType = datAutoInc
            Value = '0'
          end>
        Statements = <
          item
            Connection = 'IBX'
            Default = True
            TargetTable = 'FORMAS_PAGO_PLAZOS'
            SQL = 
              'UPDATE FORMAS_PAGO_PLAZOS'#10'  SET '#10'    ID_FORMA_PAGO = :ID_FORMA_P' +
              'AGO, '#10'    NUM_DIAS = :NUM_DIAS, '#10'    PORCENTAJE = :PORCENTAJE'#10'  ' +
              'WHERE'#10'    (ID = :OLD_ID)'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'Update_FormasPagoPlazos'
      end>
    RelationShips = <
      item
        Name = 'FK_FormasPagoPlazos_FormasPago'
        MasterDatasetName = 'FormasPago'
        MasterFields = 'ID'
        DetailDatasetName = 'FormasPagoPlazos'
        DetailFields = 'ID_FORMA_PAGO'
        RelationshipType = rtMasterDetail
      end>
    UpdateRules = <
      item
        Name = 'Insert FormasPago'
        DoUpdate = False
        DoDelete = False
        DatasetName = 'FormasPago'
        FailureBehavior = fbRaiseException
      end
      item
        Name = 'Insert FormasPagoPlazos'
        DoUpdate = False
        DoDelete = False
        DatasetName = 'FormasPagoPlazos'
        FailureBehavior = fbRaiseException
      end
      item
        Name = 'Update FormasPago'
        DoInsert = False
        DoDelete = False
        DatasetName = 'FormasPago'
        FailureBehavior = fbRaiseException
      end
      item
        Name = 'Update FormasPagoPlazos'
        DoInsert = False
        DoDelete = False
        DatasetName = 'FormasPagoPlazos'
        FailureBehavior = fbRaiseException
      end
      item
        Name = 'Delete FormasPagoPlazos'
        DoUpdate = False
        DoInsert = False
        DatasetName = 'FormasPagoPlazos'
        FailureBehavior = fbRaiseException
      end
      item
        Name = 'Delete FormasPago'
        DoUpdate = False
        DoInsert = False
        DatasetName = 'FormasPago'
        FailureBehavior = fbRaiseException
      end>
    Version = 0
    Left = 48
    Top = 24
  end
  object Bin2DataStreamer: TDABin2DataStreamer
    Left = 48
    Top = 88
  end
  object bpFormasPago: TDABusinessProcessor
    Schema = schFormasPago
    InsertCommandName = 'Insert_FormasPago'
    DeleteCommandName = 'Delete_FormasPago'
    UpdateCommandName = 'Update_FormasPago'
    ReferencedDataset = 'FormasPago'
    ProcessorOptions = [poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 280
    Top = 24
  end
  object bpFormasPagoPlazos: TDABusinessProcessor
    Schema = schFormasPago
    InsertCommandName = 'Insert_FormasPagoPlazos'
    DeleteCommandName = 'Delete_FormasPagoPlazos'
    UpdateCommandName = 'Update_FormasPagoPlazos'
    ReferencedDataset = 'FormasPagoPlazos'
    ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
    UpdateMode = updWhereKeyOnly
    Left = 280
    Top = 77
  end
end
