object grupostrabajadores: Tgrupostrabajadores
  Left = 0
  Top = 0
  Caption = 'Grupos de empleados'
  ClientHeight = 674
  ClientWidth = 539
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  Position = poOwnerFormCenter
  OnKeyDown = FormKeyDown
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Panel13: TPanel
    Left = 0
    Top = 40
    Width = 539
    Height = 634
    Align = alClient
    TabOrder = 0
    ExplicitWidth = 483
    object Panel17: TPanel
      Left = 1
      Top = 1
      Width = 537
      Height = 632
      Align = alClient
      TabOrder = 0
      ExplicitWidth = 481
      object DBGrid3: TDBGrid
        Left = 1
        Top = 1
        Width = 535
        Height = 200
        Align = alTop
        DataSource = dsqgrupostrabajadores
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'Tahoma'
        TitleFont.Style = []
        OnTitleClick = DBGrid3TitleClick
        Columns = <
          item
            Expanded = False
            FieldName = 'id'
            Title.Caption = 'Grupo'
            Width = 38
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'descripcion'
            Title.Caption = 'Denominaci'#243'n'
            Width = 190
            Visible = True
          end
          item
            Alignment = taCenter
            Expanded = False
            FieldName = 'descanso'
            Title.Caption = 'Descanso(min)'
            Width = 80
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'usuario'
            Title.Caption = 'Usuario'
            Width = 195
            Visible = True
          end>
      end
      object Panel5: TPanel
        Left = 1
        Top = 201
        Width = 535
        Height = 210
        Align = alTop
        TabOrder = 1
        ExplicitWidth = 479
        object Panel1: TPanel
          Left = 1
          Top = 1
          Width = 533
          Height = 32
          Align = alTop
          Caption = 'TRABAJOS A REALIZAR POR EL GRUPO'
          TabOrder = 0
          ExplicitWidth = 477
        end
        object Panel2: TPanel
          Left = 1
          Top = 33
          Width = 248
          Height = 176
          Align = alLeft
          TabOrder = 1
          object DBGrid1: TDBGrid
            Left = 1
            Top = 1
            Width = 246
            Height = 174
            Align = alClient
            DataSource = dsqtiposgrabajo
            TabOrder = 0
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -11
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            Columns = <
              item
                Expanded = False
                FieldName = 'nombre'
                Title.Caption = 'Trabajo'
                Width = 185
                Visible = True
              end>
          end
        end
        object Panel3: TPanel
          Left = 280
          Top = 33
          Width = 254
          Height = 176
          Align = alRight
          TabOrder = 2
          object DBGrid2: TDBGrid
            Left = 1
            Top = 1
            Width = 252
            Height = 174
            Align = alClient
            DataSource = dsqtrabajosgrupo
            TabOrder = 0
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -11
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            Columns = <
              item
                Expanded = False
                FieldName = 'descripcion'
                Title.Caption = 'Trabajo'
                Width = 185
                Visible = True
              end>
          end
        end
        object Panel4: TPanel
          Left = 249
          Top = 33
          Width = 31
          Height = 176
          Align = alClient
          TabOrder = 3
          ExplicitLeft = 226
          ExplicitWidth = 27
          object Button1: TButton
            Left = 1
            Top = 25
            Width = 29
            Height = 24
            Align = alTop
            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 = 0
            OnClick = Button1Click
            ExplicitWidth = 25
          end
          object Button2: TButton
            Left = 1
            Top = 1
            Width = 29
            Height = 24
            Align = alTop
            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 = 1
            OnClick = Button2Click
            ExplicitWidth = 25
          end
        end
      end
      object Panel6: TPanel
        Left = 1
        Top = 411
        Width = 535
        Height = 220
        Align = alClient
        TabOrder = 2
        ExplicitWidth = 479
        object Panel8: TPanel
          Left = 1
          Top = 1
          Width = 533
          Height = 32
          Align = alTop
          Caption = 'TIPOS DE HORA A APLICAR AL GRUPO'
          TabOrder = 0
          ExplicitWidth = 477
        end
        object Panel9: TPanel
          Left = 1
          Top = 33
          Width = 248
          Height = 186
          Align = alLeft
          TabOrder = 1
          object DBGrid4: TDBGrid
            Left = 1
            Top = 1
            Width = 246
            Height = 184
            Align = alClient
            DataSource = dsqtiposhora
            TabOrder = 0
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -11
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            Columns = <
              item
                Expanded = False
                FieldName = 'descrip'
                Title.Caption = 'Tipo hora'
                Width = 185
                Visible = True
              end>
          end
        end
        object Panel10: TPanel
          Left = 281
          Top = 33
          Width = 253
          Height = 186
          Align = alRight
          TabOrder = 2
          object DBGrid5: TDBGrid
            Left = 1
            Top = 1
            Width = 251
            Height = 184
            Align = alClient
            DataSource = dsqhorasgrupo
            TabOrder = 0
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -11
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            Columns = <
              item
                Expanded = False
                FieldName = 'descripcion'
                Title.Caption = 'Tipo hora'
                Width = 185
                Visible = True
              end>
          end
        end
        object Panel11: TPanel
          Left = 249
          Top = 33
          Width = 32
          Height = 186
          Align = alClient
          TabOrder = 3
          ExplicitLeft = 226
          ExplicitWidth = 27
          object Button3: TButton
            Left = 1
            Top = 25
            Width = 30
            Height = 24
            Align = alTop
            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 = 0
            OnClick = Button3Click
            ExplicitWidth = 25
          end
          object Button4: TButton
            Left = 1
            Top = 1
            Width = 30
            Height = 24
            Align = alTop
            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 = 1
            OnClick = Button4Click
            ExplicitWidth = 25
          end
        end
      end
    end
  end
  object Panel7: TPanel
    Left = 0
    Top = 0
    Width = 539
    Height = 40
    Align = alTop
    TabOrder = 1
    ExplicitWidth = 483
    object btAcancelar: 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 = btAcancelarClick
    end
    object btAmodificar: 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 = btAmodificarClick
    end
    object btAborrar: 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 = btAborrarClick
    end
    object btAnuevo: 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 = btAnuevoClick
    end
    object btAguardar: 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 = btAguardarClick
    end
  end
  object qgrupostrabajadores: TZQuery
    Connection = DM.DBagrigest
    BeforePost = qgrupostrabajadoresBeforePost
    SQL.Strings = (
      'select * from grupos_trabajadores order by descripcion')
    Params = <>
    Left = 80
    Top = 96
    object qgrupostrabajadoreside: TIntegerField
      FieldName = 'ide'
      Required = True
    end
    object qgrupostrabajadoresid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object qgrupostrabajadoresdescripcion: TWideStringField
      FieldName = 'descripcion'
      Required = True
      Size = 40
    end
    object qgrupostrabajadoresdescanso: TIntegerField
      FieldName = 'descanso'
    end
    object qgrupostrabajadoresid_usuario: TIntegerField
      FieldName = 'id_usuario'
    end
    object qgrupostrabajadoresusuario: TWideStringField
      FieldKind = fkLookup
      FieldName = 'usuario'
      LookupDataSet = qusuarios
      LookupKeyFields = 'id'
      LookupResultField = 'usuario'
      KeyFields = 'id_usuario'
      Size = 50
      Lookup = True
    end
  end
  object qusuarios: TZReadOnlyQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select id, usuario, nombre from usuarios where active=1 or activ' +
        'e is null order by usuario')
    Params = <>
    Left = 136
    Top = 96
    object qusuariosid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object qusuariosusuario: TWideStringField
      FieldName = 'usuario'
      Size = 50
    end
    object qusuariosnombre: TWideStringField
      FieldName = 'nombre'
      Size = 250
    end
  end
  object dsqgrupostrabajadores: TDataSource
    DataSet = qgrupostrabajadores
    OnStateChange = dsqgrupostrabajadoresStateChange
    OnDataChange = dsqgrupostrabajadoresDataChange
    Left = 88
    Top = 152
  end
  object qtrabajosgrupo: TZQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select * from trabajos_grupos where grupo=:GRUPO and empresa=:EM' +
        'PRESA order by descripcion')
    Params = <
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end>
    Left = 272
    Top = 104
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end>
    object qtrabajosgrupoempresa: TIntegerField
      FieldName = 'empresa'
      Required = True
    end
    object qtrabajosgrupocodigo: TWideStringField
      FieldName = 'codigo'
      Required = True
      Size = 90
    end
    object qtrabajosgrupogrupo: TIntegerField
      FieldName = 'grupo'
      Required = True
    end
    object qtrabajosgrupodescripcion: TWideStringField
      FieldName = 'descripcion'
      Size = 90
    end
  end
  object dsqtrabajosgrupo: TDataSource
    DataSet = qtrabajosgrupo
    Left = 280
    Top = 160
  end
  object qhorasgrupo: TZQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select * from horas_grupos where grupo=:GRUPO and empresa=:EMPRE' +
        'SA order by descripcion')
    Params = <
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end>
    Left = 368
    Top = 104
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end>
    object qhorasgrupoempresa: TIntegerField
      FieldName = 'empresa'
      Required = True
    end
    object qhorasgrupocodigo: TWideStringField
      FieldName = 'codigo'
      Required = True
      Size = 90
    end
    object qhorasgrupogrupo: TIntegerField
      FieldName = 'grupo'
      Required = True
    end
    object qhorasgrupodescripcion: TWideStringField
      FieldName = 'descripcion'
      Size = 90
    end
  end
  object dsqhorasgrupo: TDataSource
    DataSet = qhorasgrupo
    Left = 376
    Top = 160
  end
  object qtiposhora: TZReadOnlyQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select * from articulos where activo=1 and (codart,empresa) not ' +
        'in (select codigo,empresa from horas_grupos where empresa=:EMPRE' +
        'SA and grupo=:GRUPO)  and empresa=:EMPRESA order by descrip')
    Params = <
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end>
    Left = 216
    Top = 120
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end>
    object qtiposhoracodart: TWideStringField
      FieldName = 'codart'
      Required = True
      Size = 30
    end
    object qtiposhoradescrip: TWideStringField
      FieldName = 'descrip'
      Size = 100
    end
    object qtiposhoraprecio: TFloatField
      FieldName = 'precio'
    end
    object qtiposhoraequivalenciahoras: TFloatField
      FieldName = 'equivalenciahoras'
      Required = True
    end
    object qtiposhoraactivo: TIntegerField
      FieldName = 'activo'
      Required = True
    end
    object qtiposhoraempresa: TIntegerField
      FieldName = 'empresa'
      Required = True
    end
    object qtiposhorafacturar: TIntegerField
      FieldName = 'facturar'
      Required = True
    end
    object qtiposhoraseleccionado: TIntegerField
      FieldName = 'seleccionado'
      Required = True
    end
  end
  object dsqtiposhora: TDataSource
    DataSet = qtiposhora
    Left = 216
    Top = 72
  end
  object dsqtiposgrabajo: TDataSource
    DataSet = qtipostrabajo
    Left = 168
    Top = 64
  end
  object qtipostrabajo: TZReadOnlyQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select * from tipo_trabajo where activo=1 and  (id,empresa) not ' +
        'in (select codigo,empresa from trabajos_grupos where empresa=:EM' +
        'PRESA and grupo=:GRUPO)  and empresa=:EMPRESA order by nombre')
    Params = <
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end>
    Left = 168
    Top = 112
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'EMPRESA'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'GRUPO'
        ParamType = ptUnknown
      end>
    object qtipostrabajoid: TWideStringField
      FieldName = 'id'
      Required = True
      Size = 40
    end
    object qtipostrabajonombre: TWideStringField
      FieldName = 'nombre'
      Size = 100
    end
    object qtipostrabajoactivo: TIntegerField
      FieldName = 'activo'
      Required = True
    end
    object qtipostrabajoempresa: TIntegerField
      FieldName = 'empresa'
    end
    object qtipostrabajocoste_elavoracion_campo: TIntegerField
      FieldName = 'coste_elavoracion_campo'
      Required = True
    end
    object qtipostrabajocoste_elavoracion_almacen: TIntegerField
      FieldName = 'coste_elavoracion_almacen'
      Required = True
    end
    object qtipostrabajoelavoracion_produccion: TIntegerField
      FieldName = 'elavoracion_produccion'
      Required = True
    end
    object qtipostrabajoenvasado_produccion: TIntegerField
      FieldName = 'envasado_produccion'
      Required = True
    end
    object qtipostrabajologistica_produccion: TIntegerField
      FieldName = 'logistica_produccion'
      Required = True
    end
    object qtipostrabajoseleccionado: TIntegerField
      FieldName = 'seleccionado'
      Required = True
    end
    object qtipostrabajoalmacen_trabajo: TIntegerField
      FieldName = 'almacen_trabajo'
    end
  end
end
