VERSION 5.00
Begin VB.Form frmInh 
   Caption         =   "Inhibits"
   ClientHeight    =   1395
   ClientLeft      =   11190
   ClientTop       =   4065
   ClientWidth     =   5085
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   1395
   ScaleWidth      =   5085
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox ComInh 
      Height          =   390
      Index           =   0
      ItemData        =   "frmInh.frx":0000
      Left            =   1140
      List            =   "frmInh.frx":000D
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   150
      Width           =   3795
   End
   Begin VB.CommandButton cmdAceptar 
      Caption         =   "OK"
      Height          =   360
      Left            =   1777
      TabIndex        =   0
      Top             =   810
      Width           =   1530
   End
   Begin VB.Label lblDenom 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Denom"
      Height          =   270
      Index           =   0
      Left            =   150
      TabIndex        =   1
      Top             =   210
      Width           =   765
   End
End
Attribute VB_Name = "frmInh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public Sub ShowInh()
    Dim i As Integer
    Dim cnt As Integer
    
    cnt = 0
    ComInh(0).Clear
    'ComInh(0).AddItem "Se acepta/paga"
    'ComInh(0).AddItem "Se acepta/no se paga"
    'ComInh(0).AddItem "No se acepta"
    ComInh(0).AddItem "Accepted / Paid"
    ComInh(0).AddItem "Accepted / Not Paid"
    ComInh(0).AddItem "Rejected"
    If CurCC = MainCC Then
        For i = LBCCC To UBCCC
            If cnt > 0 Then
                Load lblDenom(cnt)
                lblDenom(cnt).top = lblDenom(0).top + (510 * cnt)
                lblDenom(cnt).Visible = True
                Load ComInh(cnt)
                ComInh(cnt).top = ComInh(0).top + (510 * cnt)
                ComInh(cnt).Visible = True
                ComInh(cnt).Clear
                'ComInh(cnt).AddItem "Se acepta/paga"
                'ComInh(cnt).AddItem "Se acepta/no se paga"
                'ComInh(cnt).AddItem "No se acepta"
                ComInh(cnt).AddItem "Accepted / Paid"
                ComInh(cnt).AddItem "Accepted / Not Paid"
                ComInh(cnt).AddItem "Rejected"
            End If
            lblDenom(cnt).Caption = Format$(CCur(CCC(i).Valor) / 100, "standard")
            ComInh(cnt).ListIndex = CCC(i).Inhibit
            cnt = cnt + 1
        Next i
    End If
    For i = LBCCN To UBCCN
        If cnt > 0 Then
            Load lblDenom(cnt)
            lblDenom(cnt).top = lblDenom(0).top + (510 * cnt)
            lblDenom(cnt).Visible = True
            Load ComInh(cnt)
            ComInh(cnt).top = ComInh(0).top + (510 * cnt)
            ComInh(cnt).Visible = True
            ComInh(cnt).Clear
            'ComInh(cnt).AddItem "Se acepta/paga"
            'ComInh(cnt).AddItem "Se acepta/no se paga"
            'ComInh(cnt).AddItem "No se acepta"
            ComInh(cnt).AddItem "Accepted / Paid"
            ComInh(cnt).AddItem "Accepted / Not Paid"
            ComInh(cnt).AddItem "Rejected"
        End If
        lblDenom(cnt).Caption = Format$(CCur(CCN(i).Valor) / 100, "standard")
        ComInh(cnt).ListIndex = CCN(i).Inhibit
        cnt = cnt + 1
    Next i
    cmdAceptar.top = lblDenom(0).top + (510 * cnt)
    cmdAceptar.TabIndex = 50
    Me.Height = 1050 + cmdAceptar.top
    CentraForm Me
End Sub

Private Sub cmdAceptar_Click()
    Dim i As Integer
    Dim cnt As Integer
    Dim denoms As String
    Dim values As String
    
    cnt = 0
    If CurCC = MainCC Then
        For i = LBCCC To UBCCC
            If Len(denoms) > 0 Then
                denoms = denoms & ","
                values = values & ","
            End If
            denoms = denoms & CCC(i).Valor
            values = values & ComInh(cnt).ListIndex
            CCC(i).Inhibit = ComInh(cnt).ListIndex
            cnt = cnt + 1
        Next i
    End If
    For i = LBCCN To UBCCN
        If Len(denoms) > 0 Then
            denoms = denoms & ","
            values = values & ","
        End If
        denoms = denoms & CCN(i).Valor
        values = values & ComInh(cnt).ListIndex
        CCN(i).Inhibit = ComInh(cnt).ListIndex
        cnt = cnt + 1
    Next i
    If Not CK.SetInhibitState(CurCC, denoms, values) Then
        MsgBox "error SetInhibitState"
        LoadInhibits
    End If
    Unload Me
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn And ((Shift And 6) = 0) Then
        MySendKeys "{TAB}"
    ElseIf KeyCode = vbKeyEscape And (Shift = 0) Then
        Unload Me
    End If
End Sub

