object proveedores: Tproveedores
  Left = 0
  Top = 0
  Caption = 'Proveedores'
  ClientHeight = 561
  ClientWidth = 739
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  KeyPreview = True
  Position = poOwnerFormCenter
  WindowState = wsMaximized
  OnCreate = FormCreate
  OnKeyDown = FormKeyDown
  OnKeyPress = FormKeyPress
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 0
    Top = 0
    Width = 739
    Height = 561
    Align = alClient
    TabOrder = 0
    object Panel2: TPanel
      Left = 1
      Top = 1
      Width = 179
      Height = 559
      Align = alLeft
      TabOrder = 0
      object Panel5: TPanel
        Left = 1
        Top = 1
        Width = 177
        Height = 64
        Align = alTop
        TabOrder = 0
        object Label1: TLabel
          Left = 3
          Top = 18
          Width = 38
          Height = 16
          Caption = 'Filtrar'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
        end
        object todosproveedores: TCheckBox
          Left = 88
          Top = 6
          Width = 84
          Height = 17
          Alignment = taLeftJustify
          BiDiMode = bdRightToLeftNoAlign
          Caption = 'Ver Todos'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -13
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentBiDiMode = False
          ParentFont = False
          TabOrder = 0
        end
        object tbuscar: TEdit
          Left = 4
          Top = 37
          Width = 168
          Height = 21
          CharCase = ecUpperCase
          TabOrder = 1
          OnChange = tbuscarChange
        end
      end
      object DBGrid1: TDBGrid
        Left = 1
        Top = 65
        Width = 177
        Height = 493
        Align = alClient
        DataSource = dsqproveedores
        ReadOnly = True
        TabOrder = 1
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'Tahoma'
        TitleFont.Style = []
        Columns = <
          item
            Expanded = False
            FieldName = 'nombre'
            Title.Caption = 'Nombre'
            Width = 144
            Visible = True
          end>
      end
    end
    object Panel3: TPanel
      Left = 180
      Top = 1
      Width = 558
      Height = 559
      Align = alClient
      TabOrder = 1
      object Panel4: TPanel
        Left = 1
        Top = 1
        Width = 556
        Height = 248
        Align = alTop
        TabOrder = 0
        object DatosProveedores: TPageControl
          Left = 1
          Top = 1
          Width = 554
          Height = 246
          ActivePage = TDatosClientes
          Align = alClient
          TabOrder = 0
          object TDatosClientes: TTabSheet
            Caption = 'Datos Generales'
            object Panel14: TPanel
              Left = 0
              Top = 40
              Width = 546
              Height = 178
              Align = alClient
              Enabled = False
              TabOrder = 1
              object Label10: TLabel
                Left = 304
                Top = 85
                Width = 55
                Height = 13
                Caption = 'Provincia:'
                FocusControl = DBEdit9
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label11: TLabel
                Left = 3
                Top = 105
                Width = 52
                Height = 13
                Caption = 'Tel'#233'fono:'
                FocusControl = DBEdit10
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label12: TLabel
                Left = 321
                Top = 104
                Width = 39
                Height = 13
                Caption = 'e-mail:'
                FocusControl = DBEdit11
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label13: TLabel
                Left = 3
                Top = 126
                Width = 54
                Height = 13
                Caption = 'Contacto:'
                FocusControl = DBEdit12
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label14: TLabel
                Left = 3
                Top = 146
                Width = 53
                Height = 13
                Caption = 'Observa.:'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label15: TLabel
                Left = 296
                Top = 126
                Width = 63
                Height = 13
                Caption = 'C.Contable:'
                FocusControl = DBEdit13
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label2: TLabel
                Left = 3
                Top = 5
                Width = 41
                Height = 13
                Caption = 'C'#243'digo:'
                FocusControl = DBEdit1
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label4: TLabel
                Left = 3
                Top = 25
                Width = 37
                Height = 13
                Caption = 'Nif/Cif:'
                FocusControl = DBEdit3
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label5: TLabel
                Left = 3
                Top = 45
                Width = 44
                Height = 13
                Caption = 'Nombre'
                FocusControl = DBEdit4
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label6: TLabel
                Left = 275
                Top = 45
                Width = 65
                Height = 13
                Caption = 'Nom. Corto:'
                FocusControl = DBEdit5
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label7: TLabel
                Left = 3
                Top = 66
                Width = 55
                Height = 13
                Caption = 'Direcci'#243'n:'
                FocusControl = DBEdit6
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label8: TLabel
                Left = 3
                Top = 86
                Width = 57
                Height = 13
                Caption = 'Poblaci'#243'n:'
                FocusControl = DBEdit7
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label9: TLabel
                Left = 231
                Top = 85
                Width = 20
                Height = 13
                Caption = 'C.P.'
                FocusControl = DBEdit8
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label22: TLabel
                Left = 133
                Top = 104
                Width = 23
                Height = 13
                Caption = 'Fax:'
                FocusControl = DBEdit21
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object Label23: TLabel
                Left = 223
                Top = 104
                Width = 33
                Height = 13
                Caption = 'M'#243'vil:'
                FocusControl = DBEdit22
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
              end
              object DBCheckBox2: TDBCheckBox
                Left = 445
                Top = 6
                Width = 60
                Height = 17
                Alignment = taLeftJustify
                Caption = 'Activo'
                DataField = 'activo'
                DataSource = dsproveedores
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -11
                Font.Name = 'Tahoma'
                Font.Style = [fsBold]
                ParentFont = False
                TabOrder = 15
                ValueChecked = '1'
                ValueUnchecked = '0'
              end
              object DBEdit1: TDBEdit
                Left = 70
                Top = 2
                Width = 82
                Height = 21
                CharCase = ecUpperCase
                DataField = 'id'
                DataSource = dsproveedores
                TabOrder = 0
              end
              object DBEdit10: TDBEdit
                Left = 70
                Top = 102
                Width = 63
                Height = 21
                CharCase = ecUpperCase
                DataField = 'telefono'
                DataSource = dsproveedores
                TabOrder = 8
              end
              object DBEdit11: TDBEdit
                Left = 361
                Top = 102
                Width = 150
                Height = 21
                CharCase = ecLowerCase
                DataField = 'email'
                DataSource = dsproveedores
                TabOrder = 11
              end
              object DBEdit12: TDBEdit
                Left = 70
                Top = 122
                Width = 202
                Height = 21
                CharCase = ecUpperCase
                DataField = 'personacontacto'
                DataSource = dsproveedores
                TabOrder = 12
              end
              object DBEdit13: TDBEdit
                Left = 361
                Top = 122
                Width = 150
                Height = 21
                CharCase = ecUpperCase
                DataField = 'ccontable'
                DataSource = dsproveedores
                TabOrder = 13
              end
              object DBEdit3: TDBEdit
                Left = 70
                Top = 22
                Width = 82
                Height = 21
                CharCase = ecUpperCase
                DataField = 'nif'
                DataSource = dsproveedores
                TabOrder = 1
              end
              object DBEdit4: TDBEdit
                Left = 70
                Top = 42
                Width = 202
                Height = 21
                CharCase = ecUpperCase
                DataField = 'nombre'
                DataSource = dsproveedores
                TabOrder = 2
              end
              object DBEdit5: TDBEdit
                Left = 342
                Top = 42
                Width = 202
                Height = 21
                CharCase = ecUpperCase
                DataField = 'nombre_corto'
                DataSource = dsproveedores
                TabOrder = 3
              end
              object DBEdit6: TDBEdit
                Left = 70
                Top = 62
                Width = 202
                Height = 21
                CharCase = ecUpperCase
                DataField = 'direccion'
                DataSource = dsproveedores
                TabOrder = 4
              end
              object DBEdit7: TDBEdit
                Left = 70
                Top = 82
                Width = 150
                Height = 21
                CharCase = ecUpperCase
                DataField = 'poblacion'
                DataSource = dsproveedores
                TabOrder = 5
              end
              object DBEdit8: TDBEdit
                Left = 257
                Top = 82
                Width = 38
                Height = 21
                CharCase = ecUpperCase
                DataField = 'codpost'
                DataSource = dsproveedores
                TabOrder = 6
              end
              object DBEdit9: TDBEdit
                Left = 361
                Top = 82
                Width = 150
                Height = 21
                CharCase = ecUpperCase
                DataField = 'provincia'
                DataSource = dsproveedores
                TabOrder = 7
              end
              object DBMemo1: TDBMemo
                Left = 70
                Top = 142
                Width = 441
                Height = 35
                DataField = 'observaciones'
                DataSource = dsproveedores
                TabOrder = 14
              end
              object DBEdit21: TDBEdit
                Left = 157
                Top = 102
                Width = 63
                Height = 21
                CharCase = ecUpperCase
                DataField = 'telefono2'
                DataSource = dsproveedores
                TabOrder = 9
              end
              object DBEdit22: TDBEdit
                Left = 257
                Top = 102
                Width = 63
                Height = 21
                CharCase = ecUpperCase
                DataField = 'movil'
                DataSource = dsproveedores
                TabOrder = 10
              end
            end
            object Panel6: TPanel
              Left = 0
              Top = 0
              Width = 546
              Height = 40
              Align = alTop
              TabOrder = 0
              object Label37: TLabel
                Left = 276
                Top = 1
                Width = 227
                Height = 38
                Align = alClient
                Alignment = taCenter
                Caption = 'PROVEEDORES'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -27
                Font.Name = 'Arial Black'
                Font.Style = [fsBold, fsItalic]
                ParentFont = False
              end
              object BtPcancelar: 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 = 0
                OnClick = BtPcancelarClick
              end
              object btPmodificar: 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 = 1
                OnClick = btPmodificarClick
              end
              object BtPborrar: 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 = 2
                OnClick = BtPborrarClick
              end
              object BtPNuevo: 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 = 3
                OnClick = BtPNuevoClick
              end
              object BtPguardar: 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 = 4
                OnClick = BtPguardarClick
              end
            end
          end
          object TDatosArticulos: TTabSheet
            Caption = 'Articulos'
            ImageIndex = 2
            object Panel7: TPanel
              Left = 0
              Top = 0
              Width = 546
              Height = 40
              Align = alTop
              TabOrder = 0
              object Label35: TLabel
                Left = 276
                Top = 1
                Width = 176
                Height = 38
                Align = alClient
                Alignment = taCenter
                Caption = 'ARTICULOS'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -27
                Font.Name = 'Arial Black'
                Font.Style = [fsBold, fsItalic]
                ParentFont = False
              end
              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 Panel13: TPanel
              Left = 0
              Top = 40
              Width = 546
              Height = 178
              Align = alClient
              TabOrder = 1
              object Panel17: TPanel
                Left = 1
                Top = 1
                Width = 544
                Height = 176
                Align = alClient
                TabOrder = 0
                object DBGrid3: TDBGrid
                  Left = 1
                  Top = 1
                  Width = 542
                  Height = 174
                  Align = alClient
                  DataSource = dsartproveedor
                  TabOrder = 1
                  TitleFont.Charset = DEFAULT_CHARSET
                  TitleFont.Color = clWindowText
                  TitleFont.Height = -11
                  TitleFont.Name = 'Tahoma'
                  TitleFont.Style = []
                  OnColExit = DBGrid3ColExit
                  OnDrawColumnCell = DBGrid3DrawColumnCell
                  OnKeyPress = DBGrid3KeyPress
                  Columns = <
                    item
                      Expanded = False
                      FieldName = 'id'
                      Title.Caption = 'C'#243'digo Proveedor'
                      Width = 92
                      Visible = True
                    end
                    item
                      Expanded = False
                      FieldName = 'descripcion'
                      Title.Caption = 'Descripci'#243'n Proveedor'
                      Width = 157
                      Visible = True
                    end
                    item
                      Expanded = False
                      FieldName = 'id_propio'
                      Title.Caption = 'Art'#237'culo/componente'
                      Width = 159
                      Visible = True
                    end
                    item
                      Expanded = False
                      FieldName = 'ult_precio'
                      Title.Caption = 'Ultimo Precio'
                      Visible = True
                    end
                    item
                      Expanded = False
                      FieldName = 'activo'
                      Title.Caption = 'Activo'
                      Width = 33
                      Visible = True
                    end>
                end
                object DBLookupComboBox2: TDBLookupComboBox
                  Left = 220
                  Top = 55
                  Width = 180
                  Height = 19
                  DataField = 'id_propio'
                  DataSource = dsartproveedor
                  DropDownRows = 8
                  Font.Charset = DEFAULT_CHARSET
                  Font.Color = clWindowText
                  Font.Height = -9
                  Font.Name = 'Tahoma'
                  Font.Style = []
                  KeyField = 'codigo'
                  ListField = 'descripcion;codigo'
                  ListSource = dsq_articulospropios
                  ParentFont = False
                  TabOrder = 0
                end
              end
            end
          end
        end
      end
      object Detallesproveedores: TPageControl
        Left = 1
        Top = 249
        Width = 556
        Height = 309
        ActivePage = TAlbaranes
        Align = alClient
        TabOrder = 1
        object TAlbaranes: TTabSheet
          Caption = 'Documentos de compra'
          ImageIndex = 3
          object Panel10: TPanel
            Left = 0
            Top = 0
            Width = 548
            Height = 40
            Align = alTop
            TabOrder = 0
            object Label32: TLabel
              Left = 111
              Top = 1
              Width = 232
              Height = 38
              Align = alClient
              Alignment = taCenter
              Caption = 'DOC. COMPRAS'
              Font.Charset = DEFAULT_CHARSET
              Font.Color = clWindowText
              Font.Height = -27
              Font.Name = 'Arial Black'
              Font.Style = [fsBold, fsItalic]
              ParentFont = False
            end
            object btALmodificar: TButton
              Left = 56
              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 = 0
              OnClick = btALmodificarClick
            end
            object btALnuevo: 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 = 1
              OnClick = btALnuevoClick
            end
          end
          object DBGrid2: TDBGrid
            Left = 0
            Top = 40
            Width = 548
            Height = 241
            Align = alClient
            DataSource = dsqcompras
            ReadOnly = True
            TabOrder = 1
            TitleFont.Charset = DEFAULT_CHARSET
            TitleFont.Color = clWindowText
            TitleFont.Height = -11
            TitleFont.Name = 'Tahoma'
            TitleFont.Style = []
            OnTitleClick = DBGrid2TitleClick
            Columns = <
              item
                Expanded = False
                FieldName = 'nombre'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Proveedor'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 108
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'documento'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Doc.'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 72
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'fecha'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Fecha'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 50
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'codigo'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Cod.Prov'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 70
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'descripcion'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Desc. Proveedor'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 165
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'cantidad'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Cant.'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 28
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'stock'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Stock'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 28
                Visible = True
              end
              item
                Expanded = False
                FieldName = 'precio'
                Font.Charset = DEFAULT_CHARSET
                Font.Color = clWindowText
                Font.Height = -9
                Font.Name = 'Tahoma'
                Font.Style = []
                Title.Caption = 'Precio'
                Title.Font.Charset = DEFAULT_CHARSET
                Title.Font.Color = clWindowText
                Title.Font.Height = -9
                Title.Font.Name = 'Tahoma'
                Title.Font.Style = []
                Width = 41
                Visible = True
              end>
          end
        end
      end
    end
  end
  object qproveedores: TZReadOnlyQuery
    Connection = DM.DBagrigest
    BeforeOpen = qproveedoresBeforeOpen
    SQL.Strings = (
      
        'select idempresa,id,nombre_corto as nombre from proveedores orde' +
        'r by nombre_corto')
    Params = <>
    MasterFields = 'idempresa,id'
    LinkedFields = 'idempresa;id'
    Left = 136
    Top = 80
    object qproveedoresnombre: TWideStringField
      FieldName = 'nombre'
      Required = True
    end
    object qproveedoresidempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object qproveedoresid: TIntegerField
      FieldName = 'id'
      Required = True
    end
  end
  object artproveedor: TZQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      'select * from proveedores_articulos')
    Params = <>
    MasterFields = 'Idempresa;id'
    MasterSource = dsproveedores
    LinkedFields = 'idempresa;idproveedor'
    Left = 136
    Top = 240
    object artproveedoridempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object artproveedoridproveedor: TIntegerField
      FieldName = 'idproveedor'
      Required = True
    end
    object artproveedorid: TWideStringField
      FieldName = 'id'
      Required = True
      Size = 50
    end
    object artproveedorid_propio: TWideStringField
      FieldName = 'id_propio'
      Size = 40
    end
    object artproveedordescripcion: TWideStringField
      FieldName = 'descripcion'
      Size = 100
    end
    object artproveedorult_precio: TFloatField
      FieldName = 'ult_precio'
      Required = True
    end
    object artproveedoractivo: TIntegerField
      FieldName = 'activo'
    end
  end
  object proveedores: TZQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      'select * from proveedores order by id')
    Params = <>
    MasterFields = 'idempresa;id'
    MasterSource = dsqproveedores
    LinkedFields = 'Idempresa;id'
    Left = 136
    Top = 136
    object proveedoresid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object proveedoresIdempresa: TIntegerField
      FieldName = 'Idempresa'
      Required = True
    end
    object proveedoresnif: TWideStringField
      FieldName = 'nif'
      Required = True
      Size = 30
    end
    object proveedoresnombre: TWideStringField
      FieldName = 'nombre'
      Required = True
      Size = 80
    end
    object proveedoresnombre_corto: TWideStringField
      FieldName = 'nombre_corto'
      Required = True
    end
    object proveedoresdireccion: TWideStringField
      FieldName = 'direccion'
      Size = 80
    end
    object proveedorespoblacion: TWideStringField
      FieldName = 'poblacion'
      Size = 80
    end
    object proveedorescodpost: TWideStringField
      FieldName = 'codpost'
      Size = 10
    end
    object proveedoresprovincia: TWideStringField
      FieldName = 'provincia'
      Size = 60
    end
    object proveedorestelefono: TWideStringField
      FieldName = 'telefono'
      Size = 24
    end
    object proveedorestelefono2: TWideStringField
      FieldName = 'telefono2'
      Size = 30
    end
    object proveedoresmovil: TWideStringField
      FieldName = 'movil'
      Size = 30
    end
    object proveedorespersonacontacto: TWideStringField
      FieldName = 'personacontacto'
      Size = 80
    end
    object proveedorescodigomercado: TIntegerField
      FieldName = 'codigomercado'
    end
    object proveedoresemail: TWideStringField
      FieldName = 'email'
      Size = 80
    end
    object proveedoresactivo: TIntegerField
      FieldName = 'activo'
    end
    object proveedoresobservaciones: TWideStringField
      FieldName = 'observaciones'
      Size = 500
    end
    object proveedoresccontable: TIntegerField
      FieldName = 'ccontable'
    end
    object proveedoresdescuento: TFloatField
      FieldName = 'descuento'
      Required = True
    end
  end
  object dsqproveedores: TDataSource
    DataSet = qproveedores
    Left = 128
    Top = 72
  end
  object dsproveedores: TDataSource
    DataSet = proveedores
    OnStateChange = dsproveedoresStateChange
    Left = 88
    Top = 144
  end
  object dsq_articulospropios: TDataSource
    DataSet = qarticulos_propios
    Left = 72
    Top = 288
  end
  object dsartproveedor: TDataSource
    DataSet = artproveedor
    OnStateChange = dsartproveedorStateChange
    Left = 56
    Top = 224
  end
  object qarticulos_propios: TZReadOnlyQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'select idempresa,id,codigo,descripcion,ult_preciocompra from art' +
        'iculosf order by descripcion'
      '')
    Params = <>
    Left = 112
    Top = 384
    object qarticulos_propiosidempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object qarticulos_propiosid: TIntegerField
      FieldName = 'id'
      Required = True
    end
    object qarticulos_propioscodigo: TWideStringField
      DisplayWidth = 20
      FieldName = 'codigo'
      Required = True
      Size = 40
    end
    object qarticulos_propiosdescripcion: TWideStringField
      DisplayWidth = 50
      FieldName = 'descripcion'
      Required = True
      Size = 100
    end
    object qarticulos_propiosult_preciocompra: TFloatField
      FieldName = 'ult_preciocompra'
      Required = True
    end
  end
  object dsqcompras: TDataSource
    DataSet = qcompras
    Left = 32
    Top = 96
  end
  object qcompras: TZReadOnlyQuery
    Connection = DM.DBagrigest
    SQL.Strings = (
      
        'SELECT e.idempresa,e.idproveedor,p.nombre,e.documento,e.fecha,ed' +
        '.codigo,ed.descripcion,ed.id_propio,a.descripcion as desc_propia' +
        ',ed.cantidad,ed.stock,ed.precio FROM entradas e,entradas_detalle' +
        ' ed,proveedores p,articulosf a WHERE e.idempresa=ed.idempresa an' +
        'd e.idempresa=p.idempresa and e.idempresa=a.idempresa and e.id=e' +
        'd.identrada and ed.id_propio=a.codigo and e.idproveedor=p.id ord' +
        'er by e.fecha desc')
    Params = <>
    MasterFields = 'idempresa;id'
    MasterSource = dsproveedores
    LinkedFields = 'idempresa;idproveedor'
    Left = 72
    Top = 96
    object qcomprasidempresa: TIntegerField
      FieldName = 'idempresa'
      Required = True
    end
    object qcomprasidproveedor: TIntegerField
      FieldName = 'idproveedor'
      Required = True
    end
    object qcomprasnombre: TWideStringField
      FieldName = 'nombre'
      Required = True
      Size = 80
    end
    object qcomprasdocumento: TWideStringField
      FieldName = 'documento'
      Required = True
      Size = 30
    end
    object qcomprasfecha: TDateField
      FieldName = 'fecha'
      Required = True
    end
    object qcomprascodigo: TWideStringField
      FieldName = 'codigo'
      Required = True
      Size = 50
    end
    object qcomprasdescripcion: TWideStringField
      FieldName = 'descripcion'
      Required = True
      Size = 100
    end
    object qcomprasid_propio: TWideStringField
      FieldName = 'id_propio'
      Size = 40
    end
    object qcomprasdesc_propia: TWideStringField
      FieldName = 'desc_propia'
      Required = True
      Size = 100
    end
    object qcomprascantidad: TFloatField
      FieldName = 'cantidad'
      Required = True
    end
    object qcomprasstock: TFloatField
      FieldName = 'stock'
      Required = True
    end
    object qcomprasprecio: TFloatField
      FieldName = 'precio'
      Required = True
    end
  end
  object qaux: TZQuery
    Connection = DM.DBagrigest
    Params = <>
    Left = 200
    Top = 16
  end
end
