object RptPedidosProveedor: TRptPedidosProveedor
  OldCreateOrder = True
  OnCreate = DataModuleCreate
  Height = 610
  Width = 670
  object DADataCabecera: TDADataSource
    DataSet = tbl_Cabecera.Dataset
    DataTable = tbl_Cabecera
    Left = 264
    Top = 72
  end
  object DADataDetalles: TDADataSource
    DataSet = tbl_Detalles.Dataset
    DataTable = tbl_Detalles
    Left = 344
    Top = 72
  end
  object tbl_Cabecera: TDACDSDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <>
    MasterMappingMode = mmDataRequest
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    IndexDefs = <>
    Left = 264
    Top = 128
  end
  object tbl_Detalles: TDACDSDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <>
    MasterMappingMode = mmDataRequest
    LogChanges = False
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    IndexDefs = <>
    Left = 344
    Top = 128
  end
  object DABINAdapter: TDABINAdapter
    Left = 48
    Top = 80
  end
  object frxRichObject1: TfrxRichObject
    Left = 48
    Top = 296
  end
  object frxBarCodeObject1: TfrxBarCodeObject
    Left = 144
    Top = 296
  end
  object frxOLEObject1: TfrxOLEObject
    Left = 48
    Top = 344
  end
  object frxCrossObject1: TfrxCrossObject
    Left = 144
    Top = 344
  end
  object frxCheckBoxObject1: TfrxCheckBoxObject
    Left = 256
    Top = 296
  end
  object frxGradientObject1: TfrxGradientObject
    Left = 360
    Top = 296
  end
  object frxChartObject1: TfrxChartObject
    Left = 256
    Top = 344
  end
  object schReport: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = DataDictionary
    Datasets = <
      item
        Params = <
          item
            Name = 'ID'
            DataType = datInteger
            Value = '28'
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR'
            SQL = 
              'SELECT'#10'  PEDIDOS_PROVEEDOR.ID,'#10'  PEDIDOS_PROVEEDOR.ID_EMPRESA,'#10' ' +
              ' PEDIDOS_PROVEEDOR.REFERENCIA,'#10'  PEDIDOS_PROVEEDOR.FECHA_PEDIDO,' +
              #10'  PEDIDOS_PROVEEDOR.FECHA_ENTREGA,'#10'  PEDIDOS_PROVEEDOR.FECHA_EN' +
              'VIO,'#10'  PEDIDOS_PROVEEDOR.DESCRIPCION_GENERAL,'#10'  PEDIDOS_PROVEEDO' +
              'R.OBSERVACIONES,'#10'  VENDEDORES.NOMBRE as VENDEDOR,'#10'  VENDEDORES.R' +
              'EFERENCIA as REF_VENDEDOR,'#10'  COALESCE(VENDEDORES.MOVIL_1,'#39#39') || ' +
              #39' / '#39' || COALESCE(VENDEDORES.TELEFONO_1,'#39#39') as TELEFONOS_VENDEDO' +
              'R,'#10'  PROVEEDOR.NOMBRE,'#10'  PROVEEDOR.FAX,'#10#10'  CONTRATOS_CLIENTE.ref' +
              'erencia as referencia_contrato,'#10'  CONTRATOS_CLIENTE.referencia_C' +
              'LIENTE,'#10'  CLIENTES.NOMBRE AS NOMBRE_CLIENTE,'#10'  '#10'  PEDIDOS_PROVEE' +
              'DOR.ID_ALMACEN,'#10'  '#10'  PEDIDOS_PROVEEDOR.CALLE,'#10'  PEDIDOS_PROVEEDO' +
              'R.POBLACION,'#10'  PEDIDOS_PROVEEDOR.PROVINCIA,'#10'  PEDIDOS_PROVEEDOR.' +
              'CODIGO_POSTAL,'#10'  PEDIDOS_PROVEEDOR.PERSONA_CONTACTO,'#10'  PEDIDOS_P' +
              'ROVEEDOR.TELEFONO'#10#10'FROM'#10'  PEDIDOS_PROVEEDOR'#10'  LEFT OUTER JOIN CO' +
              'NTACTOS PROVEEDOR ON (PROVEEDOR .ID = PEDIDOS_PROVEEDOR.ID_PROVE' +
              'EDOR)'#10'  LEFT OUTER JOIN CONTACTOS VENDEDORES ON (VENDEDORES.ID =' +
              ' PEDIDOS_PROVEEDOR.ID_VENDEDOR)'#10'  LEFT OUTER JOIN CONTRATOS_CLIE' +
              'NTE ON (CONTRATOS_CLIENTE.ID = PEDIDOS_PROVEEDOR.ID_CONTRATO_CLI' +
              'ENTE)'#10'  LEFT OUTER JOIN CONTACTOS CLIENTES ON (CLIENTES.ID = CON' +
              'TRATOS_CLIENTE.ID_CLIENTE)'#10'  LEFT OUTER JOIN ALMACENES ON (ALMAC' +
              'ENES.ID = PEDIDOS_PROVEEDOR.ID_ALMACEN)'#10'WHERE PEDIDOS_PROVEEDOR.' +
              'ID = :ID'#10
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'FECHA_PEDIDO'
                TableField = 'FECHA_PEDIDO'
              end
              item
                DatasetField = 'FECHA_ENTREGA'
                TableField = 'FECHA_ENTREGA'
              end
              item
                DatasetField = 'FECHA_ENVIO'
                TableField = 'FECHA_ENVIO'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'VENDEDOR'
                TableField = '<unknown>'
                SQLOrigin = 'VENDEDOR'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = '<unknown>'
                SQLOrigin = 'NOMBRE'
              end
              item
                DatasetField = 'FAX'
                TableField = '<unknown>'
                SQLOrigin = 'FAX'
              end
              item
                DatasetField = 'REFERENCIA_CONTRATO'
                TableField = '<unknown>'
                SQLOrigin = 'REFERENCIA_CONTRATO'
              end
              item
                DatasetField = 'REFERENCIA_CLIENTE'
                TableField = '<unknown>'
                SQLOrigin = 'REFERENCIA_CLIENTE'
              end
              item
                DatasetField = 'NOMBRE_CLIENTE'
                TableField = '<unknown>'
                SQLOrigin = 'NOMBRE_CLIENTE'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'CODIGO_POSTAL'
                TableField = 'CODIGO_POSTAL'
              end
              item
                DatasetField = 'PERSONA_CONTACTO'
                TableField = 'PERSONA_CONTACTO'
              end
              item
                DatasetField = 'TELEFONO'
                TableField = 'TELEFONO'
              end
              item
                DatasetField = 'ID_ALMACEN'
                TableField = 'ID_ALMACEN'
              end
              item
                DatasetField = 'DESCRIPCION_GENERAL'
                TableField = 'DESCRIPCION_GENERAL'
              end
              item
                DatasetField = 'TELEFONOS_VENDEDOR'
                TableField = '<unknown>'
                SQLOrigin = 'TELEFONOS_VENDEDOR'
              end
              item
                DatasetField = 'REF_VENDEDOR'
                TableField = '<unknown>'
                SQLOrigin = 'REF_VENDEDOR'
              end>
          end>
        Name = 'Informe_Cabecera'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
          end
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'FECHA_PEDIDO'
            DataType = datDateTime
          end
          item
            Name = 'FECHA_ENTREGA'
            DataType = datDateTime
          end
          item
            Name = 'FECHA_ENVIO'
            DataType = datDateTime
          end
          item
            Name = 'DESCRIPCION_GENERAL'
            DataType = datString
            Size = 255
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
          end
          item
            Name = 'VENDEDOR'
            DataType = datString
            Size = 255
          end
          item
            Name = 'REF_VENDEDOR'
            DataType = datString
            Size = 255
          end
          item
            Name = 'TELEFONOS_VENDEDOR'
            DataType = datString
            Size = 53
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'FAX'
            DataType = datString
            Size = 25
          end
          item
            Name = 'REFERENCIA_CONTRATO'
            DataType = datString
            Size = 255
          end
          item
            Name = 'REFERENCIA_CLIENTE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'NOMBRE_CLIENTE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'ID_ALMACEN'
            DataType = datInteger
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 255
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 255
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'CODIGO_POSTAL'
            DataType = datString
            Size = 10
          end
          item
            Name = 'PERSONA_CONTACTO'
            DataType = datString
            Size = 255
          end
          item
            Name = 'TELEFONO'
            DataType = datString
            Size = 25
          end>
      end
      item
        Params = <
          item
            Name = 'ID_PEDIDO'
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
            SQL = 
              'SELECT PEDIDOS_PROVEEDOR_DETALLES.ID, PEDIDOS_PROVEEDOR_DETALLES' +
              '.ID_PEDIDO,'#10'       PEDIDOS_PROVEEDOR_DETALLES.POSICION, PEDIDOS_' +
              'PROVEEDOR_DETALLES.TIPO_DETALLE,'#10'       PEDIDOS_PROVEEDOR_DETALL' +
              'ES.CONCEPTO as CONCEPTO_RTF, F_RTFTOTEXT(CONCEPTO) AS CONCEPTO, ' +
              'PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD,'#10'       PEDIDOS_PROVEEDOR_DE' +
              'TALLES.IMPORTE_UNIDAD, PEDIDOS_PROVEEDOR_DETALLES.IMPORTE_TOTAL,' +
              #10'       ARTICULOS.REFERENCIA, ARTICULOS.FAMILIA, ARTICULOS.REFER' +
              'ENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'FROM PEDIDOS_PROVEEDOR_DETAL' +
              'LES'#10'LEFT JOIN ARTICULOS ON (PEDIDOS_PROVEEDOR_DETALLES.ID_ARTICU' +
              'LO = ARTICULOS.ID)'#10'WHERE ID_PEDIDO = :ID_PEDIDO'#10'ORDER BY POSICIO' +
              'N'#10
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end
              item
                DatasetField = 'TIPO_DETALLE'
                TableField = 'TIPO_DETALLE'
              end
              item
                DatasetField = 'CONCEPTO'
                TableField = 'CONCEPTO'
              end
              item
                DatasetField = 'IMPORTE_UNIDAD'
                TableField = 'IMPORTE_UNIDAD'
              end
              item
                DatasetField = 'IMPORTE_TOTAL'
                TableField = 'IMPORTE_TOTAL'
              end
              item
                DatasetField = 'ID_PEDIDO'
                TableField = 'ID_PEDIDO'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'FAMILIA'
                TableField = 'FAMILIA'
              end
              item
                DatasetField = 'REFERENCIA_PROVEEDOR'
                TableField = 'REFERENCIA_PROVEEDOR'
              end
              item
                DatasetField = 'CONCEPTO_RTF'
                TableField = '<unknown>'
                SQLOrigin = 'CONCEPTO_RTF'
              end>
          end>
        Name = 'Informe_Detalles'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
          end
          item
            Name = 'ID_PEDIDO'
            DataType = datInteger
          end
          item
            Name = 'POSICION'
            DataType = datInteger
          end
          item
            Name = 'TIPO_DETALLE'
            DataType = datString
            Size = 10
          end
          item
            Name = 'CONCEPTO_RTF'
            DataType = datString
            Size = 2000
          end
          item
            Name = 'CONCEPTO'
            DataType = datString
            Size = 32765
          end
          item
            Name = 'CANTIDAD'
            DataType = datCurrency
          end
          item
            Name = 'IMPORTE_UNIDAD'
            DataType = datCurrency
          end
          item
            Name = 'IMPORTE_TOTAL'
            DataType = datCurrency
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'FAMILIA'
            DataType = datString
            Size = 255
          end
          item
            Name = 'REFERENCIA_PROVEEDOR'
            DataType = datString
            Size = 255
          end>
      end>
    JoinDataTables = <>
    UnionDataTables = <>
    Commands = <>
    RelationShips = <>
    UpdateRules = <>
    Version = 0
    Left = 48
    Top = 16
  end
  object DataDictionary: TDADataDictionary
    Fields = <>
    Left = 46
    Top = 158
  end
  object frxReport: TfrxReport
    Version = '4.8.11'
    DotMatrixReport = False
    EngineOptions.DoublePass = True
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = 'Por defecto'
    PrintOptions.PrintOnSheet = 0
    ReportOptions.CreateDate = 39065.872423495400000000
    ReportOptions.LastChange = 43591.572818969910000000
    ScriptLanguage = 'PascalScript'
    ShowProgress = False
    StoreInDFM = False
    OnGetValue = frxReportGetValue
    OnStartReport = 'frxReportOnStartReport'
    Left = 169
    Top = 16
  end
  object frxDBCabecera: TfrxDBDataset
    UserName = 'frxDBCabecera'
    CloseDataSource = False
    DataSource = DADataCabecera
    BCDToCurrency = False
    Left = 264
    Top = 16
  end
  object frxDBDetalles: TfrxDBDataset
    UserName = 'frxDBDetalles'
    CloseDataSource = False
    DataSource = DADataDetalles
    BCDToCurrency = False
    Left = 344
    Top = 16
  end
  object frxPDFExport1: TfrxPDFExport
    ShowDialog = False
    UseFileCache = True
    ShowProgress = False
    OverwritePrompt = False
    PrintOptimized = True
    Outline = False
    Background = False
    HTMLTags = True
    Author = 'FactuGES'
    Subject = 'FactuGES'
    Creator = 'FactuGES'
    ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
    HideToolbar = False
    HideMenubar = False
    HideWindowUI = False
    FitWindow = False
    CenterWindow = False
    PrintScaling = False
    Left = 360
    Top = 352
  end
end
