object fMainEdit: TfMainEdit
  Left = 356
  Top = 148
  Caption = #1056#1077#1084#1086#1085#1090': '#1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1085#1080#1077
  ClientHeight = 562
  ClientWidth = 784
  Color = clBtnFace
  Constraints.MinHeight = 600
  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 = 512
    Width = 784
    Height = 50
    Align = alBottom
    BevelOuter = bvNone
    TabOrder = 0
    DesignSize = (
      784
      50)
    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
    object GroupBox5: TGroupBox
      Left = 144
      Top = -1
      Width = 455
      Height = 42
      Caption = #1048#1090#1086#1075#1086':'
      TabOrder = 2
      object DBText1: TDBText
        Left = 65
        Top = 14
        Width = 81
        Height = 17
        DataField = 'sumWork'
        DataSource = dsSumma
      end
      object DBText2: TDBText
        Left = 220
        Top = 14
        Width = 81
        Height = 17
        DataField = 'sumStock'
        DataSource = dsSumma
      end
      object Label1: TLabel
        Left = 19
        Top = 14
        Width = 40
        Height = 13
        Caption = #1056#1072#1073#1086#1090#1072':'
      end
      object Label2: TLabel
        Left = 152
        Top = 14
        Width = 62
        Height = 13
        Caption = #1052#1072#1090#1077#1088#1080#1072#1083#1099':'
      end
      object Label3: TLabel
        Left = 307
        Top = 14
        Width = 38
        Height = 13
        Caption = #1048#1090#1086#1075#1086':'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object DBText3: TDBText
        Left = 351
        Top = 14
        Width = 81
        Height = 17
        DataField = 'sumAll'
        DataSource = dsSumma
      end
    end
    object DBEditEh2: TDBEditEh
      Left = 12
      Top = 18
      Width = 99
      Height = 21
      ControlLabel.Width = 76
      ControlLabel.Height = 13
      ControlLabel.Caption = #1043#1072#1088#1072#1085#1090#1080#1103' ('#1084#1077#1089')'
      ControlLabel.Visible = True
      DataField = 'warranty'
      DataSource = dsMainEdit
      DynProps = <>
      EditButtons = <>
      TabOrder = 3
      Visible = True
    end
  end
  object Panel2: TPanel
    Left = 0
    Top = 0
    Width = 784
    Height = 512
    Align = alClient
    BevelOuter = bvNone
    Padding.Left = 5
    Padding.Top = 5
    Padding.Right = 5
    Padding.Bottom = 5
    TabOrder = 1
    object GroupBox2: TGroupBox
      Left = 5
      Top = 231
      Width = 774
      Height = 276
      Align = alClient
      Caption = ' '#1056#1072#1073#1086#1090#1099' '#1080' '#1084#1077#1090#1077#1088#1080#1072#1083#1099' '
      Padding.Top = 3
      TabOrder = 0
      object PageControl1: TPageControl
        Left = 2
        Top = 18
        Width = 770
        Height = 256
        ActivePage = TabSheet1
        Align = alClient
        TabOrder = 0
        object TabSheet1: TTabSheet
          Caption = #1056#1072#1073#1086#1090#1099
          object ToolBar1: TToolBar
            Left = 0
            Top = 0
            Width = 762
            Height = 22
            Caption = 'tbMain'
            Images = fMain.ilMain
            TabOrder = 0
            object tbAddWork: TToolButton
              Left = 0
              Top = 0
              Hint = #1044#1086#1073#1072#1074#1080#1090#1100
              Caption = 'tbAdd'
              ImageIndex = 0
              ParentShowHint = False
              ShowHint = True
              OnClick = tbAddWorkClick
            end
            object tbEditWork: 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 = tbEditWorkClick
            end
            object tbDelWork: TToolButton
              Left = 46
              Top = 0
              Hint = #1059#1076#1072#1083#1080#1090#1100
              Caption = 'tbDelete'
              ImageIndex = 2
              ParentShowHint = False
              ShowHint = True
              OnClick = tbDelWorkClick
            end
          end
          object DBGridEh2: TDBGridEh
            Left = 0
            Top = 22
            Width = 762
            Height = 206
            Align = alClient
            DataSource = dsWorks
            DynProps = <>
            IndicatorOptions = [gioShowRowIndicatorEh]
            Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
            TabOrder = 1
            OnDblClick = tbEditWorkClick
            Columns = <
              item
                DynProps = <>
                EditButtons = <>
                FieldName = 'fixprice'
                Footers = <>
                Title.Caption = #1056#1072#1073#1086#1090#1072
                Width = 400
              end
              item
                DynProps = <>
                EditButtons = <>
                FieldName = 'price'
                Footers = <>
                Title.Caption = #1062#1077#1085#1072
                Width = 80
              end
              item
                DynProps = <>
                EditButtons = <>
                FieldName = 'quantity'
                Footers = <>
                Title.Caption = #1050#1086#1083'-'#1074#1086
                Width = 80
              end
              item
                DynProps = <>
                EditButtons = <>
                FieldName = 'summa'
                Footers = <>
                Title.Caption = #1057#1091#1084#1084#1072
                Width = 80
              end>
            object RowDetailData: TRowDetailPanelControlEh
            end
          end
        end
        object TabSheet2: TTabSheet
          Caption = #1052#1072#1090#1077#1088#1080#1072#1083#1099
          ImageIndex = 1
          object ToolBar2: TToolBar
            Left = 0
            Top = 0
            Width = 762
            Height = 22
            Caption = 'tbMain'
            Images = fMain.ilMain
            TabOrder = 0
            object tbAddValue: TToolButton
              Left = 0
              Top = 0
              Hint = #1044#1086#1073#1072#1074#1080#1090#1100
              Caption = 'tbAdd'
              ImageIndex = 0
              ParentShowHint = False
              ShowHint = True
              OnClick = tbAddValueClick
            end
            object tbEditValue: TToolButton
              Left = 23
              Top = 0
              Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100
              Caption = 'tbDelete'
              ImageIndex = 1
              ParentShowHint = False
              ShowHint = True
              OnClick = tbEditValueClick
            end
            object tbDelValue: TToolButton
              Left = 46
              Top = 0
              Hint = #1059#1076#1072#1083#1080#1090#1100
              Caption = 'tbEdit'
              ImageIndex = 2
              ParentShowHint = False
              ShowHint = True
              OnClick = tbDelValueClick
            end
          end
          object DBGridEh1: TDBGridEh
            Left = 0
            Top = 22
            Width = 762
            Height = 206
            Align = alClient
            DataSource = dsStockMove
            DynProps = <>
            IndicatorOptions = [gioShowRowIndicatorEh]
            Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
            TabOrder = 1
            OnDblClick = tbEditValueClick
            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 = 'price'
                Footers = <>
                Title.Caption = #1062#1077#1085#1072
                Width = 90
              end
              item
                DynProps = <>
                EditButtons = <>
                FieldName = 'summa'
                Footers = <>
                Title.Caption = #1057#1091#1084#1084#1072
                Width = 90
              end>
            object RowDetailData: TRowDetailPanelControlEh
            end
          end
        end
        object TabSheet3: TTabSheet
          Caption = #1060#1086#1090#1086#1075#1088#1072#1092#1080#1080
          ImageIndex = 2
          object Image1: TImage
            Left = 472
            Top = 22
            Width = 290
            Height = 206
            ParentCustomHint = False
            Align = alRight
            Center = True
            ParentShowHint = False
            Proportional = True
            ShowHint = False
          end
          object Splitter2: TSplitter
            Left = 469
            Top = 22
            Height = 206
            Align = alRight
            Color = clBlue
            ParentColor = False
            ExplicitLeft = 429
            ExplicitTop = 28
          end
          object ToolBar3: TToolBar
            Left = 0
            Top = 0
            Width = 762
            Height = 22
            Caption = 'tbMain'
            Images = fMain.ilMain
            TabOrder = 0
            object tbAddPhoto: TToolButton
              Left = 0
              Top = 0
              Hint = #1044#1086#1073#1072#1074#1080#1090#1100
              Caption = 'tbAdd'
              ImageIndex = 0
              ParentShowHint = False
              ShowHint = True
              OnClick = tbAddPhotoClick
            end
            object tbEditPhoto: TToolButton
              Left = 23
              Top = 0
              Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100
              Caption = 'tbDelete'
              ImageIndex = 1
              ParentShowHint = False
              ShowHint = True
              OnClick = tbEditPhotoClick
            end
            object tbDelPhoto: TToolButton
              Left = 46
              Top = 0
              Hint = #1059#1076#1072#1083#1080#1090#1100
              Caption = 'tbEdit'
              ImageIndex = 2
              ParentShowHint = False
              ShowHint = True
              OnClick = tbDelPhotoClick
            end
          end
          object DBGridEh3: TDBGridEh
            Left = 0
            Top = 22
            Width = 469
            Height = 206
            Align = alClient
            DataSource = dsPhoto
            DynProps = <>
            IndicatorOptions = [gioShowRowIndicatorEh]
            Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
            TabOrder = 1
            OnDblClick = tbEditPhotoClick
            Columns = <
              item
                DynProps = <>
                EditButtons = <>
                FieldName = 'name'
                Footers = <>
                Title.Caption = #1048#1084#1103' '#1092#1072#1081#1083#1072
                Width = 400
              end>
            object RowDetailData: TRowDetailPanelControlEh
            end
          end
        end
        object TabSheet4: TTabSheet
          Caption = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
          ImageIndex = 3
          object DBMemoEh3: TDBMemoEh
            Left = 0
            Top = 0
            Width = 762
            Height = 228
            Align = alClient
            AutoSize = False
            DataField = 'comment'
            DataSource = dsMainEdit
            DynProps = <>
            EditButtons = <>
            TabOrder = 0
            Visible = True
          end
        end
      end
    end
    object Panel3: TPanel
      Left = 5
      Top = 5
      Width = 774
      Height = 226
      Align = alTop
      BevelOuter = bvNone
      TabOrder = 1
      object Splitter1: TSplitter
        Left = 478
        Top = 0
        Height = 226
        Color = clBlue
        ParentColor = False
        ExplicitLeft = 192
        ExplicitTop = 64
        ExplicitHeight = 100
      end
      object Panel4: TPanel
        Left = 0
        Top = 0
        Width = 478
        Height = 226
        Align = alLeft
        BevelOuter = bvNone
        Constraints.MinWidth = 478
        TabOrder = 0
        object Panel5: TPanel
          Left = 0
          Top = 0
          Width = 478
          Height = 145
          Align = alTop
          BevelOuter = bvNone
          TabOrder = 0
          object GroupBox1: TGroupBox
            Left = 0
            Top = 0
            Width = 169
            Height = 145
            Align = alLeft
            Caption = ' '#1056#1077#1082#1074#1080#1079#1080#1090#1099' '
            TabOrder = 0
            object DBDateTimeEditEh1: TDBDateTimeEditEh
              Left = 10
              Top = 74
              Width = 150
              Height = 21
              ControlLabel.Width = 113
              ControlLabel.Height = 13
              ControlLabel.Caption = #1044#1072#1090#1072' '#1080' '#1074#1088#1077#1084#1103' '#1087#1088#1080#1077#1084#1082#1080
              ControlLabel.Visible = True
              DataField = 'date'
              DataSource = dsMainEdit
              DynProps = <>
              EditButtons = <>
              TabOrder = 0
              Visible = True
              EditFormat = 'DD/MM/YYYY HH:NN:SS'
            end
            object DBEditEh1: TDBEditEh
              Left = 10
              Top = 34
              Width = 150
              Height = 21
              ControlLabel.Width = 31
              ControlLabel.Height = 13
              ControlLabel.Caption = #1053#1086#1084#1077#1088
              ControlLabel.Visible = True
              DataField = 'id'
              DataSource = dsMainEdit
              DynProps = <>
              EditButtons = <>
              Enabled = False
              TabOrder = 1
              Visible = True
            end
            object DBComboBoxEh1: TDBComboBoxEh
              Left = 10
              Top = 114
              Width = 150
              Height = 21
              ControlLabel.Width = 40
              ControlLabel.Height = 13
              ControlLabel.Caption = #1057#1090#1072#1090#1091#1089':'
              ControlLabel.Visible = True
              DataField = 'status'
              DataSource = dsMainEdit
              DynProps = <>
              EditButtons = <
                item
                  Glyph.Data = {
                    A6020000424DA602000000000000420000002800000011000000110000000100
                    10000300000064020000C30E0000C30E00000000000000000000007C0000E003
                    00001F000000F75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75E
                    F75EF75EF75EF75E0000F75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75E
                    F75EF75EF75EF75EF75EF75E0000F75EF75EF75EF75EF75EF75EF75EF75EF75E
                    F75EF75EF75EF75EF75EF75EF75EF75E0000F75EF75EF75EF75EF75EF75EF75E
                    F75EF75EF75EF75EF75EF75EF75EF75EF75EF75E0000F75EF75E00000000F75E
                    F75E0000F75EF75EF75E0000F75EF75E00000000F75EF75E0000F75E0000F75E
                    F75E0000F75E0000F75EF75EF75E0000F75E0000F75EF75E0000F75E0000F75E
                    F75EF75EF75E0000F75E0000F75EF75EF75E0000F75EF75EF75EF75E0000F75E
                    0000F75EF75EF75EF75E0000F75E0000F75EF75EF75E0000F75EF75EF75EF75E
                    0000F75E0000F75EF75E00000000F75EF75E0000F75E0000F75E0000F75EF75E
                    00000000F75EF75E0000F75E0000F75EF75EF75EF75E0000F75E0000F75E0000
                    F75E0000F75EF75EF75EF75E0000F75E0000F75EF75EF75EF75E00000000F75E
                    00000000F75E0000F75EF75EF75EF75E0000F75E0000F75EF75E0000F75E0000
                    0000F75E00000000F75E0000F75EF75E0000F75E0000F75EF75E00000000F75E
                    F75E0000F75EF75EF75E0000F75EF75E00000000F75EF75E0000F75EF75EF75E
                    F75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75E0000F75E
                    F75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75E
                    0000F75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75E
                    F75EF75E0000F75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75EF75E
                    F75EF75EF75EF75E0000}
                  Hint = #1054#1090#1087#1088#1072#1074#1080#1090#1100' SMS '#1086' '#1089#1090#1072#1090#1091#1089#1077
                  ShortCut = 0
                  Style = ebsGlyphEh
                  Width = 25
                  OnClick = DBComboBoxEh1EditButtons0Click
                end>
              Items.Strings = (
                ''
                #1055#1088#1080#1085#1103#1090
                #1042' '#1088#1077#1084#1086#1085#1090#1077
                #1053#1072' '#1089#1086#1075#1083#1072#1089#1086#1074#1072#1085#1080#1080
                #1046#1076#1077#1084' '#1079#1072#1087#1095#1072#1089#1090#1080
                #1041#1077#1079' '#1088#1077#1084#1086#1085#1090#1072
                #1043#1086#1090#1086#1074#1086
                #1042#1099#1076#1072#1085)
              TabOrder = 2
              Visible = True
              OnChange = DBComboBoxEh1Change
            end
          end
          object Panel7: TPanel
            Left = 169
            Top = 0
            Width = 309
            Height = 145
            Align = alClient
            BevelOuter = bvNone
            Padding.Left = 5
            TabOrder = 1
            object GroupBox4: TGroupBox
              Left = 5
              Top = 0
              Width = 304
              Height = 145
              Align = alClient
              Caption = ' '#1050#1083#1080#1077#1085#1090' '
              TabOrder = 0
              object DBEditEh3: TDBEditEh
                Left = 64
                Top = 74
                Width = 229
                Height = 21
                ControlLabel.Width = 35
                ControlLabel.Height = 13
                ControlLabel.Caption = #1040#1076#1088#1077#1089':'
                ControlLabel.Visible = True
                ControlLabelLocation.Position = lpLeftTextBaselineEh
                DataField = 'address'
                DataSource = dsClient
                DynProps = <>
                EditButtons = <>
                Enabled = False
                TabOrder = 0
                Visible = True
              end
              object DBEditEh4: TDBEditEh
                Left = 64
                Top = 114
                Width = 229
                Height = 21
                ControlLabel.Width = 48
                ControlLabel.Height = 13
                ControlLabel.Caption = #1058#1077#1083#1077#1092#1086#1085':'
                ControlLabel.Visible = True
                ControlLabelLocation.Position = lpLeftTextBaselineEh
                DataField = 'phone'
                DataSource = dsClient
                DynProps = <>
                EditButtons = <>
                Enabled = False
                TabOrder = 1
                Visible = True
              end
              object DBLookupComboboxEh3: TDBLookupComboboxEh
                Left = 64
                Top = 34
                Width = 229
                Height = 21
                ControlLabel.Width = 27
                ControlLabel.Height = 13
                ControlLabel.Caption = #1060#1048#1054':'
                ControlLabel.Visible = True
                ControlLabelLocation.Position = lpLeftTextBaselineEh
                DynProps = <>
                DataField = 'client_id'
                DataSource = dsMainEdit
                EditButtons = <
                  item
                    Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1085#1086#1074#1086#1075#1086' '#1082#1083#1080#1077#1085#1090#1072
                    ShortCut = 0
                    Style = ebsPlusEh
                    OnClick = DBLookupComboboxEh3EditButtons0Click
                  end>
                KeyField = 'id'
                ListField = 'name'
                ListSource = dsClient
                ParentShowHint = False
                ShowHint = True
                TabOrder = 2
                Visible = True
              end
            end
          end
        end
        object GroupBox6: TGroupBox
          Left = 0
          Top = 145
          Width = 478
          Height = 81
          Align = alClient
          Caption = ' '#1059#1089#1090#1088#1086#1081#1089#1090#1074#1086' '
          TabOrder = 1
          object DBLookupComboboxEh1: TDBLookupComboboxEh
            Left = 52
            Top = 19
            Width = 175
            Height = 21
            ControlLabel.Width = 22
            ControlLabel.Height = 13
            ControlLabel.Caption = #1058#1080#1087':'
            ControlLabel.Visible = True
            ControlLabelLocation.Position = lpLeftTextBaselineEh
            DynProps = <>
            DataField = 'devtype_id'
            DataSource = dsMainEdit
            EditButtons = <>
            KeyField = 'id'
            ListField = 'name'
            ListSource = dsDevType
            TabOrder = 0
            Visible = True
          end
          object DBLookupComboboxEh2: TDBLookupComboboxEh
            Left = 52
            Top = 46
            Width = 175
            Height = 21
            ControlLabel.Width = 35
            ControlLabel.Height = 13
            ControlLabel.Caption = #1041#1088#1077#1085#1076':'
            ControlLabel.Visible = True
            ControlLabelLocation.Position = lpLeftTextBaselineEh
            DynProps = <>
            DataField = 'brand_id'
            DataSource = dsMainEdit
            EditButtons = <>
            KeyField = 'id'
            ListField = 'name'
            ListSource = dsBrand
            TabOrder = 1
            Visible = True
          end
          object DBEditEh5: TDBEditEh
            Left = 302
            Top = 19
            Width = 165
            Height = 21
            ControlLabel.Width = 43
            ControlLabel.Height = 13
            ControlLabel.Caption = #1052#1086#1076#1077#1083#1100':'
            ControlLabel.Visible = True
            ControlLabelLocation.Position = lpLeftTextBaselineEh
            DataField = 'model'
            DataSource = dsMainEdit
            DynProps = <>
            EditButtons = <>
            TabOrder = 2
            Visible = True
          end
          object DBEditEh6: TDBEditEh
            Left = 302
            Top = 51
            Width = 165
            Height = 21
            ControlLabel.Width = 53
            ControlLabel.Height = 13
            ControlLabel.Caption = #1057#1077#1088#1080#1081#1085#1080#1082':'
            ControlLabel.Visible = True
            ControlLabelLocation.Position = lpLeftTextBaselineEh
            DataField = 'serial'
            DataSource = dsMainEdit
            DynProps = <>
            EditButtons = <>
            TabOrder = 3
            Visible = True
          end
        end
      end
      object Panel6: TPanel
        Left = 481
        Top = 0
        Width = 293
        Height = 226
        Align = alClient
        BevelOuter = bvNone
        Padding.Left = 5
        TabOrder = 1
        object GroupBox3: TGroupBox
          Left = 5
          Top = 0
          Width = 288
          Height = 226
          Align = alClient
          Caption = ' '#1053#1077#1080#1089#1087#1088#1072#1074#1085#1086#1089#1090#1100' '
          Padding.Left = 3
          Padding.Top = 5
          Padding.Right = 3
          Padding.Bottom = 3
          TabOrder = 0
          object DBMemoEh1: TDBMemoEh
            Left = 5
            Top = 20
            Width = 278
            Height = 201
            Align = alClient
            AutoSize = False
            DataField = 'defect'
            DataSource = dsMainEdit
            DynProps = <>
            EditButtons = <>
            TabOrder = 0
            Visible = True
          end
        end
      end
    end
  end
  object dsClient: TDataSource
    DataSet = DM.tClient
    Left = 440
    Top = 72
  end
  object dsDevType: TDataSource
    DataSet = qDevType
    Left = 200
    Top = 168
  end
  object dsBrand: TDataSource
    DataSet = DM.tBrand
    Left = 200
    Top = 200
  end
  object dsWorks: TDataSource
    DataSet = qWorks
    Left = 40
    Top = 384
  end
  object dsStockMove: TDataSource
    DataSet = qStockMove
    Left = 96
    Top = 384
  end
  object qStockMove: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    AfterPost = qStockMoveAfterPost
    Parameters = <
      item
        Name = 'mid'
        DataType = ftWideString
        Size = 1
        Value = '0'
      end>
    SQL.Strings = (
      'SELECT'
      '  sm.*,'
      '  (sm.quantity*sm.price) AS summa,'
      '  v.name,'
      '  v.vendor,'
      '  s.main_id'
      'FROM'
      '  stockmove AS sm'
      'LEFT JOIN'
      '  value AS v ON sm.value_id=v.id'
      'LEFT JOIN'
      '  stock AS s ON sm.stock_id=s.id'
      'WHERE'
      '  s.main_id = :mid')
    Left = 96
    Top = 336
    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'
      currency = True
    end
    object qStockMoveprice: TFloatField
      Alignment = taLeftJustify
      FieldName = 'price'
      currency = True
    end
    object qStockMovename: TWideStringField
      FieldName = 'name'
      Size = 250
    end
    object qStockMovevendor: TWideStringField
      FieldName = 'vendor'
      Size = 50
    end
    object qStockMovemain_id: TIntegerField
      FieldName = 'main_id'
    end
    object qStockMovesumma: TFloatField
      Alignment = taLeftJustify
      FieldName = 'summa'
      ReadOnly = True
      currency = True
    end
  end
  object qSumma: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'mid'
        DataType = ftWideString
        Size = 1
        Value = '0'
      end>
    SQL.Strings = (
      'SELECT'
      'm.id,'
      'IF(w.sumWork IS NULL,0,w.sumWork) AS sumWork,'
      'IF(sm.sumStock IS NULL,0,sm.sumStock) AS sumStock,'
      
        '(IF(w.sumWork IS NULL,0,w.sumWork)+IF(sm.sumStock IS NULL,0,sm.s' +
        'umStock)) AS sumAll'
      'FROM main AS m'
      'LEFT JOIN'
      '('
      'SELECT'
      'SUM(w.price*w.quantity) AS sumWork,'
      'w.main_id'
      'FROM works w'
      'GROUP BY w.main_id'
      ') w ON w.main_id=m.id'
      'LEFT JOIN'
      '('
      'SELECT'
      'SUM(sm.price*sm.quantity) AS sumStock,'
      's.main_id AS main_id'
      'FROM stockmove sm'
      'LEFT JOIN stock s ON s.id=sm.stock_id'
      'GROUP BY s.main_id'
      ') sm ON sm.main_id=m.id'
      'WHERE'
      '  m.id=:mid')
    Left = 40
    Top = 440
    object qSummaid: TAutoIncField
      FieldName = 'id'
      ReadOnly = True
    end
    object qSummasumWork: TFloatField
      FieldName = 'sumWork'
      ReadOnly = True
      currency = True
    end
    object qSummasumStock: TFloatField
      FieldName = 'sumStock'
      ReadOnly = True
      currency = True
    end
    object qSummasumAll: TFloatField
      FieldName = 'sumAll'
      ReadOnly = True
      currency = True
    end
  end
  object dsSumma: TDataSource
    DataSet = qSumma
    Left = 96
    Top = 440
  end
  object qWorks: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    AfterPost = qWorksAfterPost
    Parameters = <
      item
        Name = 'mid'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 16
        Precision = 255
        Size = 255
        Value = '0'
      end>
    SQL.Strings = (
      'SELECT'
      '  w.id,'
      '  w.main_id,'
      '  w.fixprice_id,'
      '  w.price,'
      '  w.quantity,'
      '  fp.name AS fixprice,'
      '  (w.price*w.quantity) AS summa'
      'FROM works w'
      'LEFT JOIN fixprice fp ON w.fixprice_id=fp.id'
      'WHERE w.main_id = :mid')
    Left = 40
    Top = 336
    object qWorksid: TAutoIncField
      FieldName = 'id'
      ReadOnly = True
    end
    object qWorksmain_id: TIntegerField
      FieldName = 'main_id'
    end
    object qWorksfixprice_id: TIntegerField
      FieldName = 'fixprice_id'
    end
    object qWorksprice: TFloatField
      Alignment = taLeftJustify
      FieldName = 'price'
      currency = True
    end
    object qWorksquantity: TSmallintField
      Alignment = taLeftJustify
      FieldName = 'quantity'
    end
    object qWorkssumma: TFloatField
      Alignment = taLeftJustify
      FieldName = 'summa'
      ReadOnly = True
      currency = True
    end
    object qWorksfixprice: TWideStringField
      FieldName = 'fixprice'
      Size = 250
    end
  end
  object qPhoto: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    AfterOpen = qPhotoAfterOpen
    AfterScroll = qPhotoAfterScroll
    Parameters = <
      item
        Name = 'mid'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 184
        Precision = 255
        Size = 255
        Value = '0'
      end>
    SQL.Strings = (
      'SELECT * FROM photo WHERE main_id = :mid')
    Left = 304
    Top = 336
    object qPhotoid: TAutoIncField
      FieldName = 'id'
      ReadOnly = True
    end
    object qPhotoname: TWideStringField
      FieldName = 'name'
      Size = 250
    end
    object qPhotomain_id: TIntegerField
      FieldName = 'main_id'
    end
  end
  object dsPhoto: TDataSource
    DataSet = qPhoto
    Left = 304
    Top = 384
  end
  object qDevType: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM devtype WHERE parent_id=0')
    Left = 240
    Top = 168
    object qDevTypeid: TAutoIncField
      FieldName = 'id'
      ReadOnly = True
    end
    object qDevTypename: TWideStringField
      FieldName = 'name'
      Size = 250
    end
    object qDevTypeparent_id: TIntegerField
      FieldName = 'parent_id'
    end
  end
  object qMainEdit: TADOQuery
    Connection = DM.Conn
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'mid'
        DataType = ftWideString
        Size = 1
        Value = '0'
      end>
    SQL.Strings = (
      'SELECT * FROM main WHERE id=:mid')
    Left = 192
    Top = 40
    object qMainEditid: TAutoIncField
      FieldName = 'id'
      ReadOnly = True
    end
    object qMainEditdate: TDateTimeField
      FieldName = 'date'
    end
    object qMainEditbrand_id: TIntegerField
      FieldName = 'brand_id'
    end
    object qMainEditdevtype_id: TIntegerField
      FieldName = 'devtype_id'
    end
    object qMainEditstatus: TWideStringField
      FieldName = 'status'
      Size = 50
    end
    object qMainEditclient_id: TIntegerField
      FieldName = 'client_id'
    end
    object qMainEditmodel: TWideStringField
      FieldName = 'model'
      Size = 150
    end
    object qMainEditserial: TWideStringField
      FieldName = 'serial'
      Size = 150
    end
    object qMainEdituser_id: TIntegerField
      FieldName = 'user_id'
    end
    object qMainEditdate_end: TDateTimeField
      FieldName = 'date_end'
    end
    object qMainEditdefect: TWideMemoField
      FieldName = 'defect'
      BlobType = ftWideMemo
    end
    object qMainEditcomment: TWideMemoField
      FieldName = 'comment'
      BlobType = ftWideMemo
    end
    object qMainEditwarranty: TIntegerField
      FieldName = 'warranty'
    end
  end
  object dsMainEdit: TDataSource
    DataSet = qMainEdit
    Left = 192
    Top = 88
  end
  object IdHTTP: TIdHTTP
    IOHandler = SSL
    AllowCookies = True
    HandleRedirects = True
    ProxyParams.BasicAuthentication = False
    ProxyParams.ProxyPort = 0
    Request.ContentLength = -1
    Request.ContentRangeEnd = -1
    Request.ContentRangeStart = -1
    Request.ContentRangeInstanceLength = -1
    Request.Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
    Request.BasicAuthentication = False
    Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)'
    Request.Ranges.Units = 'bytes'
    Request.Ranges = <>
    HTTPOptions = [hoForceEncodeParams]
    Left = 672
    Top = 240
  end
  object SSL: TIdSSLIOHandlerSocketOpenSSL
    MaxLineAction = maException
    Port = 0
    DefaultPort = 0
    SSLOptions.Mode = sslmUnassigned
    SSLOptions.VerifyMode = []
    SSLOptions.VerifyDepth = 0
    Left = 672
    Top = 184
  end
end
