object fStockEdit: TfStockEdit
  Left = 420
  Top = 166
  Caption = #1044#1086#1082#1091#1084#1077#1085#1090
  ClientHeight = 462
  ClientWidth = 784
  Color = clBtnFace
  Constraints.MinHeight = 500
  Constraints.MinWidth = 800
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  Position = poMainFormCenter
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 0
    Top = 421
    Width = 784
    Height = 41
    Align = alBottom
    BevelOuter = bvNone
    TabOrder = 0
    DesignSize = (
      784
      41)
    object bbOk: TBitBtn
      Left = 605
      Top = 8
      Width = 83
      Height = 25
      Anchors = [akTop, akRight]
      Caption = 'Ok'
      Glyph.Data = {
        A6010000424DA601000000000000520000002800000011000000110000000100
        08000000000054010000C30E0000C30E0000070000000700000000000000FFFF
        FF008000000000FF000000800000C0C0C000FFFFFF0005050505050505050505
        0505050505050500000005050505020205050505050505050505050000000505
        0502040402050505050505050505050000000505020404040402050505050505
        0505050000000502040404040404020505050505050505000000020404040304
        0404040205050505050505000000040404030503040404040205050505050500
        0000030403050505030404040402050505050500000005030505050505030404
        0404020505050500000005050505050505050304040404020505050000000505
        0505050505050503040404040205050000000505050505050505050503040404
        0402050000000505050505050505050505030404040402000000050505050505
        0505050505050304040402000000050505050505050505050505050304040400
        0000050505050505050505050505050503030500000005050505050505050505
        05050505050505060606}
      ModalResult = 1
      TabOrder = 0
    end
    object bbCancel: TBitBtn
      Left = 694
      Top = 8
      Width = 83
      Height = 25
      Anchors = [akTop, akRight]
      Caption = #1054#1090#1084#1077#1085#1072
      Glyph.Data = {
        A6010000424DA601000000000000520000002800000011000000110000000100
        08000000000054010000C30E0000C30E0000070000000700000000000000FFFF
        FF000000FF0000008000C0C0C00080808000FFFFFF0004040404040404040404
        0404040404040400000004040405050404040404040404040404040000000404
        0203030504040404040205040404040000000404020303030504040402030305
        0404040000000404020303030305040203030303050404000000040404020303
        0303050303030303050404000000040404040203030303030303030504040400
        0000040404040402030303030303050404040400000004040404040403030303
        0305040404040400000004040404040402030303030504040404040000000404
        0404040203030303030504040404040000000404040402030303050303030504
        0404040000000404040203030305040203030305040404000000040404020303
        0504040402030303050404000000040404040203040404040402030303040400
        0000040404040404040404040404020302040400000004040404040404040404
        04040404040404060606}
      ModalResult = 2
      TabOrder = 1
    end
  end
  object GroupBox1: TGroupBox
    Left = 0
    Top = 0
    Width = 784
    Height = 153
    Align = alTop
    Caption = #1044#1086#1082#1091#1084#1077#1085#1090
    TabOrder = 1
    DesignSize = (
      784
      153)
    object DBDateTimeEditEh1: TDBDateTimeEditEh
      Left = 80
      Top = 24
      Width = 121
      Height = 21
      ControlLabel.Width = 30
      ControlLabel.Height = 13
      ControlLabel.Caption = #1044#1072#1090#1072':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      DataField = 'date'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      Kind = dtkDateEh
      TabOrder = 0
      Visible = True
    end
    object DBEditEh1: TDBEditEh
      Left = 280
      Top = 24
      Width = 121
      Height = 21
      ControlLabel.Width = 35
      ControlLabel.Height = 13
      ControlLabel.Caption = #1053#1086#1084#1077#1088':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      DataField = 'id'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      Enabled = False
      TabOrder = 1
      Visible = True
    end
    object DBEditEh2: TDBEditEh
      Left = 80
      Top = 51
      Width = 118
      Height = 21
      ControlLabel.Width = 54
      ControlLabel.Height = 13
      ControlLabel.Caption = #1054#1087#1077#1088#1072#1094#1080#1103':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      DataField = 'move_in'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      Enabled = False
      TabOrder = 3
      Visible = True
    end
    object DBEditEh3: TDBEditEh
      Left = 496
      Top = 51
      Width = 281
      Height = 21
      ControlLabel.Width = 59
      ControlLabel.Height = 13
      ControlLabel.Caption = #1054#1089#1085#1086#1074#1072#1085#1080#1077':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      Anchors = [akLeft, akTop, akRight]
      DataField = 'base'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      TabOrder = 5
      Visible = True
    end
    object DBMemoEh1: TDBMemoEh
      Left = 80
      Top = 78
      Width = 697
      Height = 67
      ControlLabel.Width = 65
      ControlLabel.Height = 13
      ControlLabel.Caption = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      Anchors = [akLeft, akTop, akRight]
      AutoSize = False
      DataField = 'comment'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      TabOrder = 6
      Visible = True
    end
    object DBEditEh4: TDBEditEh
      Left = 496
      Top = 24
      Width = 281
      Height = 21
      ControlLabel.Width = 76
      ControlLabel.Height = 13
      ControlLabel.Caption = #1055#1086#1083#1100#1079#1086#1074#1072#1090#1077#1083#1100':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      DataField = 'user'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      Enabled = False
      TabOrder = 2
      Visible = True
    end
    object DBEditEh5: TDBEditEh
      Left = 280
      Top = 51
      Width = 121
      Height = 21
      ControlLabel.Width = 40
      ControlLabel.Height = 13
      ControlLabel.Caption = #1057#1074#1103#1079#1072#1085':'
      ControlLabel.Visible = True
      ControlLabelLocation.Position = lpLeftTextBaselineEh
      DataField = 'main_id'
      DataSource = fMain.dsStock
      DynProps = <>
      EditButtons = <>
      Enabled = False
      TabOrder = 4
      Visible = True
    end
  end
  object GroupBox2: TGroupBox
    Left = 0
    Top = 153
    Width = 784
    Height = 268
    Align = alClient
    Caption = #1058#1052#1062
    TabOrder = 2
    object pTop: TPanel
      Left = 2
      Top = 15
      Width = 780
      Height = 28
      Align = alTop
      BevelOuter = bvNone
      Padding.Left = 3
      Padding.Top = 3
      Padding.Right = 3
      Padding.Bottom = 3
      TabOrder = 0
      object tbMain: TToolBar
        Left = 3
        Top = 3
        Width = 774
        Height = 22
        Caption = 'tbMain'
        Images = fMain.ilMain
        TabOrder = 0
        object tbAdd: TToolButton
          Left = 0
          Top = 0
          Hint = #1044#1086#1073#1072#1074#1080#1090#1100
          Caption = 'tbAdd'
          ImageIndex = 0
          ParentShowHint = False
          ShowHint = True
          OnClick = tbAddClick
        end
        object tbEdit: TToolButton
          Left = 23
          Top = 0
          Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100
          Caption = 'tbEdit'
          ImageIndex = 1
          ParentShowHint = False
          ShowHint = True
          OnClick = tbEditClick
        end
        object tbDelete: TToolButton
          Left = 46
          Top = 0
          Hint = #1059#1076#1072#1083#1080#1090#1100
          Caption = 'tbDelete'
          ImageIndex = 2
          ParentShowHint = False
          ShowHint = True
          OnClick = tbDeleteClick
        end
      end
    end
    object DBGridEh1: TDBGridEh
      Left = 2
      Top = 43
      Width = 780
      Height = 223
      Align = alClient
      DataSource = dsStockMove
      DynProps = <>
      IndicatorOptions = [gioShowRowIndicatorEh]
      Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
      TabOrder = 1
      OnDblClick = tbEditClick
      Columns = <
        item
          DynProps = <>
          EditButtons = <>
          FieldName = 'vendor'
          Footers = <>
          Title.Caption = #1040#1088#1090#1080#1082#1091#1083
          Width = 150
        end
        item
          DynProps = <>
          EditButtons = <>
          FieldName = 'name'
          Footers = <>
          Title.Caption = #1053#1072#1080#1084#1077#1085#1086#1074#1072#1085#1080#1077
          Width = 268
        end
        item
          DynProps = <>
          EditButtons = <>
          FieldName = 'quantity'
          Footers = <>
          Title.Caption = #1050#1086#1083'-'#1074#1086
        end
        item
          DynProps = <>
          EditButtons = <>
          FieldName = 'buyPrice'
          Footers = <>
          Title.Caption = #1062#1077#1085#1072' ('#1079#1072#1082#1091#1087'.)'
          Width = 90
        end
        item
          DynProps = <>
          EditButtons = <>
          FieldName = 'price'
          Footers = <>
          Title.Caption = #1062#1077#1085#1072' ('#1088#1086#1079#1085'.)'
          Width = 90
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
  end
  object dsStockMove: TDataSource
    DataSet = qStockMove
    Left = 40
    Top = 232
  end
  object qStockMove: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'sid'
        DataType = ftWideString
        Size = 1
        Value = '1'
      end>
    SQL.Strings = (
      'SELECT'
      '  sm.*, v.name, v.vendor'
      'FROM'
      '  stockmove AS sm'
      'LEFT JOIN'
      '  value AS v ON sm.value_id=v.id'
      'WHERE'
      '  stock_id = :sid')
    Left = 40
    Top = 280
    object qStockMoveid: TAutoIncField
      FieldName = 'id'
      ReadOnly = True
    end
    object qStockMovestock_id: TIntegerField
      FieldName = 'stock_id'
    end
    object qStockMovevalue_id: TIntegerField
      FieldName = 'value_id'
    end
    object qStockMovequantity: TIntegerField
      Alignment = taLeftJustify
      FieldName = 'quantity'
    end
    object qStockMovebuyPrice: TFloatField
      Alignment = taLeftJustify
      FieldName = 'buyPrice'
    end
    object qStockMoveprice: TFloatField
      Alignment = taLeftJustify
      FieldName = 'price'
    end
    object qStockMovename: TWideStringField
      FieldName = 'name'
      Size = 250
    end
    object qStockMovevendor: TWideStringField
      FieldName = 'vendor'
      Size = 50
    end
  end
end
