-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmPedirPrecio.frm
169 lines (164 loc) · 5.35 KB
/
frmPedirPrecio.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
VERSION 5.00
Begin VB.Form frmPedirPrecio
BackColor = &H00404040&
Caption = "Precio de Venta"
ClientHeight = 4680
ClientLeft = 120
ClientTop = 450
ClientWidth = 9315
LinkTopic = "Form1"
ScaleHeight = 4680
ScaleWidth = 9315
StartUpPosition = 2 'CenterScreen
Begin VB.TextBox txtDescripcion
Alignment = 2 'Center
BackColor = &H8000000F&
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2160
MaxLength = 50
TabIndex = 0
Top = 1200
Visible = 0 'False
Width = 6735
End
Begin VB.CommandButton cmdAceptar
Height = 975
Left = 4080
Picture = "frmPedirPrecio.frx":0000
Style = 1 'Graphical
TabIndex = 2
Top = 3360
Width = 1095
End
Begin VB.TextBox txtPrecio
Alignment = 2 'Center
BackColor = &H8000000F&
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3960
TabIndex = 1
Top = 2280
Width = 2055
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Descripción:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 495
Left = 240
TabIndex = 5
Top = 1320
Visible = 0 'False
Width = 1935
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Precio: $"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 495
Left = 2520
TabIndex = 4
Top = 2400
Width = 1455
End
Begin VB.Label lblDescripcion
Alignment = 2 'Center
BackColor = &H80000005&
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 855
Left = 240
TabIndex = 3
Top = 360
Width = 8655
End
End
Attribute VB_Name = "frmPedirPrecio"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub txtAceptar_Click()
End Sub
Private Sub cmdAceptar_Click()
If Val(frmPedirPrecio.txtPrecio) > 9999 Then
MsgBox ("El precio es incorrecto"): Exit Sub
End If
With frmFacturador
If txtDescripcion <> "" Then
.grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = txtDescripcion
End If
End With
Me.Hide
End Sub
Private Sub Form_Activate()
txtPrecio = ""
txtDescripcion = ""
With frmFacturador
If .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "VARIOS" Then
Label2.Visible = True
txtDescripcion.Visible = True
txtDescripcion.SetFocus
' ElseIf .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "FIAMBRERIA" Or .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "PANADERIA" Or .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "KIOSCO" Or .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "ESPECIAS" Or .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "PASTAS CASERAS" Or .grDetalle.TextMatrix(.grDetalle.Rows - 1, 1) = "PESCADERIA" Then
' Label2.Visible = False
' txtDescripcion.Visible = False
' Else
' Label2.Visible = False
' txtDescripcion.Visible = False
End If
End With
End Sub
Private Sub txtDescripcion_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then txtPrecio.SetFocus
End Sub
Private Sub txtPrecio_KeyPress(KeyAscii As Integer)
If InStr(1, "0123456789." & Chr(13) & Chr(8), Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
If KeyAscii = 13 Then cmdAceptar_Click
End Sub