object fgruposfamilias: Tfgruposfamilias
  Left = 0
  Top = 0
  Caption = 'Grupos/Familias'
  ClientHeight = 627
  ClientWidth = 847
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  KeyPreview = True
  Position = poOwnerFormCenter
  OnCreate = FormCreate
  OnKeyDown = FormKeyDown
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 0
    Top = 17
    Width = 847
    Height = 192
    Align = alTop
    Caption = 'Panel1'
    TabOrder = 0
    object Panel2: TPanel
      Left = 276
      Top = 1
      Width = 570
      Height = 190
      Align = alClient
      Caption = 'Panel2'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -9
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 0
      object Panel4: TPanel
        Left = 1
        Top = 41
        Width = 568
        Height = 148
        Align = alClient
        TabOrder = 0
        object Panel5: TPanel
          Left = 1
          Top = 1
          Width = 566
          Height = 146
          Align = alClient
          TabOrder = 0
          object DBGrid1: TDBGrid
            Left = 1
            Top = 1
            Width = 564
            Height = 144
            Align = alClient
            DataSource = dsfamilias
            TabOrder = 0
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -9
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            OnCellClick = DBGrid1CellClick
            OnDrawColumnCell = DBGrid1DrawColumnCell
            Columns = <
              item
                Expanded = False
                FieldName = 'id'
                Title.Caption = 'Id'
                Width = 29
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'descripcion'
                Title.Caption = 'Descripci'#243'n'
                Width = 126
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'COMUN'
                Title.Caption = 'Com'#250'n'
                Width = 42
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'ABONOS'
                Title.Caption = 'Abonos'
                Width = 42
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'FITOSANITARIOS'
                Title.Caption = 'Fitosanit.'
                Width = 42
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'SUMINISTROS'
                Title.Caption = 'Suminist.'
                Width = 42
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'GENERADORES'
                Title.Caption = 'Generad.'
                Width = 42
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'activo'
                Title.Caption = 'Activo'
                Width = 31
                Visible = True
              end>
          end
        end
      end
      object Panel6: TPanel
        Left = 1
        Top = 1
        Width = 568
        Height = 40
        Align = alTop
        TabOrder = 1
        object btfcancelar: TButton
          Left = 221
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Cancelar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 3
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 1
          OnClick = btfcancelarClick
        end
        object btFmodificar: TButton
          Left = 111
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Editar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 2
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 2
          OnClick = btFmodificarClick
        end
        object btFborrar: TButton
          Left = 56
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Borrar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 1
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 3
          OnClick = btFborrarClick
        end
        object btFnuevo: TButton
          Left = 1
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Nuevo'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 0
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 4
          OnClick = btFnuevoClick
        end
        object btFguardar: TButton
          Left = 166
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Guardar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 140
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 0
          OnClick = btFguardarClick
        end
      end
    end
    object Panel3: TPanel
      Left = 1
      Top = 1
      Width = 275
      Height = 190
      Align = alLeft
      Caption = 'Panel2'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -9
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 1
      object Panel13: TPanel
        Left = 1
        Top = 41
        Width = 273
        Height = 148
        Align = alClient
        TabOrder = 0
        object Panel17: TPanel
          Left = 1
          Top = 1
          Width = 271
          Height = 146
          Align = alClient
          TabOrder = 0
          object DBGrid3: TDBGrid
            Left = 1
            Top = 1
            Width = 269
            Height = 144
            Align = alClient
            DataSource = dsgrupos
            TabOrder = 0
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -9
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            OnCellClick = DBGrid3CellClick
            OnDrawColumnCell = DBGrid3DrawColumnCell
            Columns = <
              item
                Expanded = False
                FieldName = 'id'
                Title.Caption = 'Id'
                Width = 30
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'descripcion'
                Title.Caption = 'Descripci'#243'n'
                Width = 170
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'activo'
                Title.Caption = 'Activo'
                Width = 33
                Visible = True
              end>
          end
        end
      end
      object Panel7: TPanel
        Left = 1
        Top = 1
        Width = 273
        Height = 40
        Align = alTop
        TabOrder = 1
        object btGcancelar: TButton
          Left = 221
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Cancelar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 3
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 1
          OnClick = btGcancelarClick
        end
        object btGmodificar: TButton
          Left = 111
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Editar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 2
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 2
          OnClick = btGmodificarClick
        end
        object btGborrar: TButton
          Left = 56
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Borrar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 1
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 3
          OnClick = btGborrarClick
        end
        object btGnuevo: TButton
          Left = 1
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Nuevo'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 0
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 4
          OnClick = btGnuevoClick
        end
        object btGguardar: TButton
          Left = 166
          Top = 1
          Width = 55
          Height = 38
          Align = alLeft
          Caption = 'Guardar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ImageAlignment = iaBottom
          ImageIndex = 140
          Images = BASE.listaiconos
          ParentFont = False
          TabOrder = 0
          OnClick = btGguardarClick
        end
      end
    end
  end
  object Panel8: TPanel
    Left = 0
    Top = 0
    Width = 847
    Height = 17
    Align = alTop
    TabOrder = 1
    object Label1: TLabel
      Left = 1
      Top = 1
      Width = 344
      Height = 13
      Align = alClient
      Caption = 
        '    GRUPOS                                                      ' +
        '                       FAMILIAS'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
  end
  object Panel9: TPanel
    Left = 0
    Top = 209
    Width = 847
    Height = 30
    Align = alTop
    TabOrder = 2
    object Label2: TLabel
      AlignWithMargins = True
      Left = 4
      Top = 4
      Width = 96
      Height = 19
      Align = alClient
      Alignment = taCenter
      Caption = 'ARTICULOS'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object btJexcel: TButton
      Left = 771
      Top = 1
      Width = 75
      Height = 28
      Align = alRight
      Caption = 'A Excel'
      ImageIndex = 11
      Images = BASE.listaiconos
      TabOrder = 0
      OnClick = btJexcelClick
    end
    object btJimprimir: TButton
      Left = 709
      Top = 1
      Width = 62
      Height = 28
      Align = alRight
      Caption = 'Imprimir'
      ImageIndex = 149
      Images = BASE.listaiconos
      TabOrder = 1
      Visible = False
    end
  end
  object DBGrid2: TDBGrid
    Left = 0
    Top = 239
    Width = 847
    Height = 388
    Align = alClient
    DataSource = dsarticulos
    ReadOnly = True
    TabOrder = 3
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    OnDrawColumnCell = DBGrid2DrawColumnCell
    Columns = <
      item
        Expanded = False
        FieldName = 'id'
        Title.Caption = 'Id'
        Width = 38
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'codigo'
        Title.Caption = 'C'#243'digo'
        Width = 108
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'descripcion'
        Title.Caption = 'Descripci'#243'n'
        Width = 178
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'nombre_corto'
        Title.Caption = 'Proveed. habitual'
        Visible = True
      end
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'preciocoste'
        Title.Caption = 'Precio/Unid.'
        Visible = True
      end
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'stock'
        Title.Caption = 'Stock'
        Width = 48
        Visible = True
      end
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'ult_preciocompra'
        Title.Caption = 'Ult.Prec.Compra'
        Visible = True
      end
      item
        Alignment = taCenter
        Expanded = False
        FieldName = 'activo'
        Title.Caption = 'Activo'
        Width = 35
        Visible = True
      end>
  end
  object gcrpagado: TDBCheckBox
    Left = 742
    Top = 8
    Width = 97
    Height = 17
    Caption = 'gcrpagado'
    TabOrder = 4
    Visible = False
  end
  object dsgrupos: TDataSource
    DataSet = qgrupos
    OnStateChange = dsgruposStateChange
    Left = 32
    Top = 280
  end
  object qgrupos: TFDQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      'select * from grupos order by descripcion')
    Params = <>
    Left = 32
    Top = 328
    object qgruposidempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object qgruposid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object qgruposdescripcion: TWideStringField
      FieldName = 'descripcion'
      Size = 100
    end
    object qgruposactivo: TIntegerField
      FieldName = 'activo'
      Required = True
    end
  end
  object qfamilias: TFDQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      'select * from familias order by descripcion')
    Params = <>
    MasterFields = 'idempresa;id'
    MasterSource = dsgrupos
    IndexFieldNames = 'idempresa;grupo'
    Left = 96
    Top = 328
    object qfamiliasid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object qfamiliasdescripcion: TWideStringField
      FieldName = 'descripcion'
      Required = True
      Size = 50
    end
    object qfamiliasCOMUN: TIntegerField
      FieldName = 'COMUN'
      Required = True
    end
    object qfamiliasABONOS: TIntegerField
      FieldName = 'ABONOS'
      Required = True
    end
    object qfamiliasFITOSANITARIOS: TIntegerField
      FieldName = 'FITOSANITARIOS'
      Required = True
    end
    object qfamiliasSUMINISTROS: TIntegerField
      FieldName = 'SUMINISTROS'
      Required = True
    end
    object qfamiliasGENERADORES: TIntegerField
      FieldName = 'GENERADORES'
      Required = True
    end
    object qfamiliasactivo: TIntegerField
      FieldName = 'activo'
      Required = True
    end
    object qfamiliasidempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object qfamiliasgrupo: TIntegerField
      FieldName = 'grupo'
      Required = True
    end
  end
  object dsfamilias: TDataSource
    DataSet = qfamilias
    OnStateChange = dsfamiliasStateChange
    Left = 96
    Top = 280
  end
  object qarticulos: TFDQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select a.idempresa,a.familia, a.id,a.codigo,a.descripcion,a.prec' +
        'iocoste,a.ult_preciocompra,a.stock,a.activo,p.nombre_corto from ' +
        'articulosf a,proveedores p where a.provhab=p.id order by descrip' +
        'cion')
    Params = <>
    MasterFields = 'idempresa;id'
    MasterSource = dsfamilias
    IndexFieldNames = 'idempresa;familia'
    Left = 168
    Top = 336
    object qarticulosid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object qarticuloscodigo: TWideStringField
      FieldName = 'codigo'
      Required = True
      Size = 40
    end
    object qarticulosdescripcion: TWideStringField
      FieldName = 'descripcion'
      Required = True
      Size = 100
    end
    object qarticulospreciocoste: TFloatField
      FieldName = 'preciocoste'
      Required = True
    end
    object qarticulosstock: TFloatField
      FieldName = 'stock'
      Required = True
    end
    object qarticulosult_preciocompra: TFloatField
      FieldName = 'ult_preciocompra'
      Required = True
    end
    object qarticulosactivo: TIntegerField
      FieldName = 'activo'
      Required = True
    end
    object qarticulosnombre_corto: TWideStringField
      FieldName = 'nombre_corto'
      Required = True
    end
    object qarticulosidempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object qarticulosfamilia: TIntegerField
      FieldName = 'familia'
    end
  end
  object dsarticulos: TDataSource
    DataSet = qarticulos
    Left = 168
    Top = 280
  end
  object qaux: TFDQuery
    Connection = DM.DBagrigest
    Params = <>
    Left = 344
    Top = 304
  end
  object SaveDialog1: TSaveDialog
    Left = 616
    Top = 8
  end
end
