inherited dmInformeEstadoAlmacen: TdmInformeEstadoAlmacen
  OldCreateOrder = True
  Left = 582
  Top = 299
  Height = 417
  Width = 554
  inherited FReport: TfrReport
    Dataset = frdsTablaEstado
    ReportForm = {19000000}
  end
  object TablaEstado: TIBQuery
    BufferChunks = 1000
    CachedUpdates = False
    SQL.Strings = (
      'select distinct E.CODIGOARTICULO, A.DESCRIPCION, E.EXISTENCIAS,'
      'E.STOCKMIN, E.STOCKMAX, sum(PENDIENTES) as PENDIENTE'
      'from ARTICULOS A, ESTADOALMACEN E'
      'left outer join PEDIDOSPROVEEDOR P'
      
        'on (P.CODIGOALMACEN = E.CODIGOALMACEN and P.CODIGOEMPRESA = E.CO' +
        'DIGOEMPRESA)'
      'left outer join DETALLESPEDIDOSPROVEEDOR D'
      
        'on ((D.CODIGOPEDIDO = P.CODIGO) and (D.CODIGOARTICULO = E.CODIGO' +
        'ARTICULO) and'
      '(D.CODIGOEMPRESA = P.CODIGOEMPRESA))'
      'where E.CODIGOEMPRESA = :CODIGOEMPRESA'
      'and E.CODIGOALMACEN = :CODIGOALMACEN'
      'and A.CODIGO = E.CODIGOARTICULO'
      'group by E.CODIGOARTICULO, A.DESCRIPCION, E.EXISTENCIAS,'
      'E.STOCKMIN, E.STOCKMAX'
      'order by E.CODIGOARTICULO')
    Left = 168
    Top = 168
    ParamData = <
      item
        DataType = ftSmallint
        Name = 'CODIGOEMPRESA'
        ParamType = ptInputOutput
        Value = 0
      end
      item
        DataType = ftSmallint
        Name = 'CODIGOALMACEN'
        ParamType = ptInputOutput
        Value = 2
      end>
  end
  object frdsTablaEstado: TfrDBDataSet
    CloseDataSource = True
    DataSet = TablaEstado
    Left = 248
    Top = 168
  end
end
