B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=11.5
@EndOfDesignText@
Sub Class_Globals
	Private Root As B4XView 'ignore
	Private xui As XUI 'ignore
	'--***---- BOLETA DE LIQUIDACION
	Private P_BOLETA As Panel
	'------ BILLETES
	Private LBL_TMIL As Label
	Private LBL_TQUIN As Label
	Private LBL_TDOS As Label
	Private LBL_TCIEN As Label
	Private LBL_TCIN As Label
	Private LBL_TVEIN As Label
	Private LBL_MIL As Label
	Private LBL_QUIN As Label
	Private LBL_DOSC As Label
	Private LBL_CIEN As Label
	Private LBL_CINCUEN As Label
	Private LBL_VEINTE As Label
	Private EDT_CANVEIN As EditText
	Private EDT_CANCIN As EditText
	Private EDT_CANCIEN As EditText
	Private EDT_CANDOS As EditText
	Private EDT_CANQUIN As EditText
	Private EDT_CANMIL As EditText
	Private Btn_TOTALBILLETE As Button
	Private Pnl_Billete As Panel
	Private Pnl_Moneda As Panel
	Private L_CALCULA_BILLE As Label
	'------ BOTONES MAS Y MENOS
	Private B_MENMIL As Button
	Private B_SUMIL As Button
	Private B_MENQUI As Button
	Private B_SUQUI As Button
	Private B_MENDOS As Button
	Private B_SUDOS As Button
	Private B_MENCIE As Button
	Private B_SUCIEN As Button
	Private B_MENCIN As Button
	Private B_SUCIN As Button
	Private B_MENVEI As Button
	Private B_SUVEI As Button
	'------ MONEDAS
	Private L_DIEZ As Label
	Private L_CINCO As Label
	Private L_DOS As Label
	Private L_UNO As Label
	Private L_CENTAVO As Label
	Private LBL_TDIEZ As Label
	Private LBL_TCI As Label
	Private LBL_TDO As Label
	Private LBL_TUN As Label
	Private LBL_TCEN As Label
	Private EDT_CANCEN As EditText
	Private EDT_CANUN As EditText
	Private EDT_CANDO As EditText
	Private EDT_CANCI As EditText
	Private EDT_CANDIEZ As EditText
	Private L_CALCULA_MONEDA As Label
	Private B_TOTALMONEDA As Button
	'------ BOTONES MAS Y MENOS
	Private B_MENCENT As Button
	Private B_MENUN As Button
	Private B_MENDO As Button
	Private B_MENCI As Button
	Private B_MENDIEZ As Button
	Private B_SUMDIEZ As Button
	Private B_SUMCIN As Button
	Private B_SUMDO As Button
	Private B_SUMUN As Button
	Private B_SUMCENT As Button
	'------ SUMA TOTALES
	Private B_AGREGAMONE As Button
	Private B_AGREGABILL As Button
	Private TOTALES As Label
	Private B_SUM_TOTAL As Button
	Private TOTALBILLETES As Button
	Private TOTALMONEDA As Button
	Private PNL_TOTALES As Panel
	Private LBL_RETURN As Label
	Private IMG_IMPRESORA As Label
	Private LBL_REGRESA As Label
	'--***---- FIN BOLETA
'	Private P_INF_GENERAL As Panel
	Private B_Regresar As Button
'	Private ABORDO As String
	Private a_inicial As String
	Private a_total As String
	Private a_venta As String
	Private a_final As String
	Private a_VENTA_F As String
	Private a_inicial_5 As String
	Private L_INVA As ListView
	Private B_IMP_INV As Button
	Private B_CERRAR_I As Button
	Private Panel_INV_A As Panel
	Private LBL_TVEINTE As Label
	Private B_SUMVEINTE As Button
	Private EDT_CANVEINTE As EditText
	Private B_MENVEINTE As Button
	Private L_VEINTE As Label
	Dim RutaBoleta As String
	Dim Id_Almacen As String
	Dim cursorBoleta As Cursor
	Private Bt_GuardarBoleta As Button
	Private CUANTOS1 As String
	Private Panel9 As Panel
	Private t_tenc As Label
	Private E_RES_E As EditText
	Private B_E_NEXT As Button
	Private Label26 As Label
	Private l_chk_e As Label
	Private Chk_1 As CheckBox
	Private chk_2 As CheckBox
	Private chk_3 As CheckBox
	Private b_chk_e As Button
	Private Panel10 As Panel
	Private chk_1_valor As String
	Private chk_2_valor As String
	Private chk_3_valor As String
	Private p_encuesta As Panel
	Private b_encuesta_1 As Button
	Private b_encuesta_2 As Button
	Private b_encuesta_3 As Button
	Private l_titEncuesta As Label
	Private l_txtEncuesta As Label
	Private encuestaRes As String
	Private botonPresionado As Int
	Private B_IMP2 As Button
	Dim impresoraConectada As Boolean = False
	Private l_categoria2 As Label
	Private l_exhibidor2 As Label
	Private p_exhibidores As Panel
	Private Button1 As Button
	Private b_exhibidor As Button
	Private l_exhibidores3 As Label
	Private l_segmento2 As Label
	Private et_encuesta As EditText
	Private b_encuesta_continuar As Button
	Dim muestraBoleta As Boolean = False
	Private Panel4 As Panel
	
	Private Edt_FH As EditText
End Sub

'You can add more parameters here.
Public Sub Initialize As Object
	Return Me
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
	Root = Root1
	'load the layout to Root
	Root.LoadLayout("calculadora")
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.

Sub LLAMA_BOLETA
	'' FECHA DE TELEFONO
	DateTime.DateFormat="dd/MM/yyyy"
	Edt_FH.Text=DateTime.Date(DateTime.Now)
	Subs.panelAnchoAlto(PNL_TOTALES, Root.Width, Root.Height)
	PNL_TOTALES.Visible=True
	Pnl_Billete.Visible=True
	Pnl_Moneda.visible=True
	LBL_RETURN.Visible=False
	LBL_REGRESA.Visible=False
	P_BOLETA.Visible=True
'	P_INF_GENERAL.Visible=False
	LBL_REGRESA.Visible=True
	Private c As Cursor = Starter.skmt.ExecQuery("select * from TMP_CAT_BILLETE join TMP_CAT_MONEDAS")
	If c.RowCount > 0 Then
		c.Position = 0
		Log("==================== CALCULADORA "&c.ColumnCount)
'		Traemos billetes
		EDT_CANMIL.Text = "0"
		If IsNumber(c.GetString("TMP_BILLE_MIL")) Then EDT_CANMIL.Text = c.GetString("TMP_BILLE_MIL")
		EDT_CANQUIN.Text = "0"
		If c.GetString("TMP_BILLE_QUINIENTOS")<> Null Then EDT_CANQUIN.Text = c.GetString("TMP_BILLE_QUINIENTOS")
		EDT_CANDOS.Text = "0"
		If c.GetString("TMP_BILLE_DOSCIENTOS") <>Null Then EDT_CANDOS.Text = c.GetString("TMP_BILLE_DOSCIENTOS")
		EDT_CANCIEN.Text = "0"
		If c.GetString("TMP_BILLE_CIEN")<> Null Then EDT_CANCIEN.Text = c.GetString("TMP_BILLE_CIEN")
		EDT_CANCIN.Text = "0"
		If c.GetString("TMP_BILLE_CINCUENTA")<> Null Then EDT_CANCIN.Text = c.GetString("TMP_BILLE_CINCUENTA")
		EDT_CANVEIN.Text = "0"
		If c.GetString("TMP_BILLE_VEINTE")<> Null Then EDT_CANVEIN.Text = c.GetString("TMP_BILLE_VEINTE")
'		Traemos monedas
		EDT_CANVEINTE.Text = "0"
		If c.GetString("TMP_MON_VEINTE")<> Null Then EDT_CANVEINTE.Text = c.GetString("TMP_MON_VEINTE")
		EDT_CANDIEZ.Text = "0"
		If c.GetString("TMP_MON_DIEZ")<> Null Then EDT_CANDIEZ.Text = c.GetString("TMP_MON_DIEZ")
		EDT_CANCI.Text = "0"
		If c.GetString("TMP_MON_CINCO")<> Null Then EDT_CANCI.Text = c.GetString("TMP_MON_CINCO")
		EDT_CANDO.Text = "0"
		If c.GetString("TMP_MON_DOS")<> Null Then EDT_CANDO.Text = c.GetString("TMP_MON_DOS")
		EDT_CANUN.Text = "0"
		If c.GetString("TMP_MON_UN")<> Null Then EDT_CANUN.Text = c.GetString("TMP_MON_UN")
		EDT_CANCEN.Text = "0"
		If c.GetString("TMP_MON_CENTAVOS")<> Null Then EDT_CANCEN.Text = c.GetString("TMP_MON_CENTAVOS")
		L_CALCULA_BILLE_CLICK
		L_CALCULA_MONEDA_Click
		B_SUM_TOTAL.Text = TOTALBILLETES.Text + TOTALMONEDA.text
	End If
	Starter.boleta = 0
	muestraBoleta = False
	c.Close
End Sub

'''BILLETES
Sub L_CALCULA_BILLE_CLICK
	If EDT_CANMIL.Text="" Or  EDT_CANQUIN.Text="" Or EDT_CANDOS.Text="" Or EDT_CANCIEN.Text="" Or EDT_CANCIN.Text="" Or EDT_CANVEIN.Text="" Then
		Pnl_Billete.RequestFocus
		Msgbox("Por favor llena todas las cantidades","") 'ignore
	Else
		LBL_TMIL.Text= LBL_MIL.Tag * EDT_CANMIL.Text
		LBL_TQUIN.Text=LBL_QUIN.Tag * EDT_CANQUIN.Text
		LBL_TDOS.Text=LBL_DOSC.Tag * EDT_CANDOS.Text
		LBL_TCIEN.Text=LBL_CIEN.Tag * EDT_CANCIEN.Text
		LBL_TCIN.Text=LBL_CINCUEN.Tag * EDT_CANCIN.Text
		LBL_TVEIN.Text=LBL_VEINTE.Tag * EDT_CANVEIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

'20
Private Sub EDT_CANVEIN_FocusChanged (HasFocus As Boolean)
	If EDT_CANVEIN.Text = "" Then EDT_CANVEIN.Text = "0"
	EDT_CANVEIN.Text = Round (EDT_CANVEIN.Text)
	LBL_TVEIN.Text=LBL_VEINTE.Tag * EDT_CANVEIN.Text
	Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
	TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
End Sub

Sub B_SUVEI_Click
	If EDT_CANVEIN.Text = "" Then
		EDT_CANVEIN.Text=0
		LBL_TVEIN.Text=LBL_VEINTE.Tag * EDT_CANVEIN.Text
	Else
		EDT_CANVEIN.Text = Round (EDT_CANVEIN.Text + 1)
		LBL_TVEIN.Text=LBL_VEINTE.Tag * EDT_CANVEIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

Sub B_MENVEI_Click
	If EDT_CANVEIN.Text = "" Then
		EDT_CANVEIN.Text=0
		LBL_TVEIN.Text=LBL_VEINTE.Tag * EDT_CANVEIN.Text
	Else IF EDT_CANVEIN.Text > 0 Then
		EDT_CANVEIN.Text = Round(EDT_CANVEIN.Text -1)
		LBL_TVEIN.Text=LBL_VEINTE.Tag * EDT_CANVEIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub
'50
Private Sub EDT_CANCIN_FocusChanged (HasFocus As Boolean)
	If EDT_CANCIN.Text = "" Then EDT_CANCIN.Text = "0"
	EDT_CANCIN.Text = Round (EDT_CANCIN.Text)
	LBL_TCIN.Text=LBL_CINCUEN.Tag * EDT_CANCIN.Text
	Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
	TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
End Sub

Sub B_SUCIN_Click
	If EDT_CANCIN.Text = "" Then
		EDT_CANCIN.Text =0
		LBL_TCIN.Text=LBL_CINCUEN.Tag * EDT_CANCIN.Text
	Else
		EDT_CANCIN.Text = Round (EDT_CANCIN.Text + 1)
		LBL_TCIN.Text=LBL_CINCUEN.Tag * EDT_CANCIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

Sub B_MENCIN_Click
	If EDT_CANCIN.Text = "" Then
		EDT_CANCIN.Text =0
		LBL_TCIN.Text=LBL_CINCUEN.Tag * EDT_CANCIN.Text
	Else IF EDT_CANCIN.Text > 0 Then
		EDT_CANCIN.Text = Round(EDT_CANCIN.Text -1)
		LBL_TCIN.Text=LBL_CINCUEN.Tag * EDT_CANCIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

'100
Private Sub EDT_CANCIEN_FocusChanged (HasFocus As Boolean)
	If EDT_CANCIEN.Text = "" Then EDT_CANCIEN.Text = "0"
	EDT_CANCIEN.Text = Round (EDT_CANCIEN.Text)
	LBL_TCIEN.Text=LBL_CIEN.Tag * EDT_CANCIEN.Text
	Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
	TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
End Sub

Sub B_SUCIEN_Click
	If EDT_CANCIEN.Text = "" Then
		EDT_CANCIEN.Text = 0
		LBL_TCIEN.Text=LBL_CIEN.Tag * EDT_CANCIEN.Text
	Else
		EDT_CANCIEN.Text = Round (EDT_CANCIEN.Text + 1)
		LBL_TCIEN.Text=LBL_CIEN.Tag * EDT_CANCIEN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

Sub B_MENCIE_Click
	If EDT_CANCIEN.Text = "" Then
		EDT_CANCIEN.Text = 0
		LBL_TCIEN.Text=LBL_CIEN.Tag * EDT_CANCIEN.Text
	Else IF EDT_CANCIEN.Text > 0 Then
		EDT_CANCIEN.Text = Round(EDT_CANCIEN.Text -1)
		LBL_TCIEN.Text=LBL_CIEN.Tag * EDT_CANCIEN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

'200
Private Sub EDT_CANDOS_FocusChanged (HasFocus As Boolean)
	If EDT_CANDOS.Text = "" Then EDT_CANDOS.Text = "0"
	EDT_CANDOS.Text = Round (EDT_CANDOS.Text)
	LBL_TDOS.Text=LBL_DOSC.Tag * EDT_CANDOS.Text
	Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
	TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
End Sub

Sub B_SUDOS_Click
	If EDT_CANDOS.Text = "" Then
		EDT_CANDOS.Text = 0
		LBL_TDOS.Text=LBL_DOSC.Tag * EDT_CANDOS.Text
	Else
		EDT_CANDOS.Text = Round (EDT_CANDOS.Text + 1)
		LBL_TDOS.Text=LBL_DOSC.Tag * EDT_CANDOS.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

Sub B_MENDOS_Click
	If EDT_CANDOS.Text = "" Then
		EDT_CANDOS.Text = 0
		LBL_TDOS.Text=LBL_DOSC.Tag * EDT_CANDOS.Text
	Else IF EDT_CANDOS.Text > 0 Then
		EDT_CANDOS.Text = Round(EDT_CANDOS.Text -1)
		LBL_TDOS.Text=LBL_DOSC.Tag * EDT_CANDOS.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

'500
Private Sub EDT_CANQUIN_FocusChanged (HasFocus As Boolean)
	If EDT_CANQUIN.Text = "" Then EDT_CANQUIN.Text = "0"
	EDT_CANQUIN.Text = Round (EDT_CANQUIN.Text)
	LBL_TQUIN.Text=LBL_QUIN.Tag * EDT_CANQUIN.Text
	Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
	TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
End Sub

Sub B_SUQUI_Click
	If EDT_CANQUIN.Text = "" Then
		EDT_CANQUIN.Text =0
		LBL_TQUIN.Text=LBL_QUIN.Tag * EDT_CANQUIN.Text
	Else
		EDT_CANQUIN.Text = Round (EDT_CANQUIN.Text + 1)
		LBL_TQUIN.Text=LBL_QUIN.Tag * EDT_CANQUIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

Sub B_MENQUI_Click
	If EDT_CANQUIN.Text = "" Then
		EDT_CANQUIN.Text =0
		LBL_TQUIN.Text=LBL_QUIN.Tag * EDT_CANQUIN.Text
	Else IF EDT_CANQUIN.Text > 0 Then
		EDT_CANQUIN.Text = Round(EDT_CANQUIN.Text -1)
		LBL_TQUIN.Text=LBL_QUIN.Tag * EDT_CANQUIN.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub
'1000
Private Sub EDT_CANMIL_FocusChanged (HasFocus As Boolean)
	If EDT_CANMIL.Text = "" Then EDT_CANMIL.Text = "0"
	EDT_CANMIL.Text = Round (EDT_CANMIL.Text )
	LBL_TMIL.Text= LBL_MIL.Tag * EDT_CANMIL.Text
	Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
	TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
End Sub

Sub B_SUMIL_Click
	If EDT_CANMIL.Text = "" Then
		EDT_CANMIL.Text = 0
		LBL_TMIL.Text= LBL_MIL.Tag * EDT_CANMIL.Text
	Else
		EDT_CANMIL.Text = Round (EDT_CANMIL.Text + 1)
		LBL_TMIL.Text= LBL_MIL.Tag * EDT_CANMIL.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

Sub B_MENMIL_Click
	If EDT_CANMIL.Text = "" Then
		EDT_CANMIL.Text = 1
		LBL_TMIL.Text= LBL_MIL.Tag * EDT_CANMIL.Text
	Else IF EDT_CANMIL.Text > 0 Then
		EDT_CANMIL.Text = Round(EDT_CANMIL.Text -1)
		LBL_TMIL.Text= LBL_MIL.Tag * EDT_CANMIL.Text
		Btn_TOTALBILLETE.Text= ( LBL_TMIL.Text + LBL_TQUIN.Text + LBL_TDOS.Text + LBL_TCIEN.Text + LBL_TCIN.Text + LBL_TVEIN.Text)
		TOTALBILLETES.Text=Btn_TOTALBILLETE.Text
	End If
End Sub

'''' MONEDAS
Sub L_CALCULA_MONEDA_Click
	If EDT_CANDIEZ.Text="" Or  EDT_CANCI.Text="" Or EDT_CANDO.Text="" Or EDT_CANUN.Text="" Or EDT_CANCEN.Text=""   Or EDT_CANVEINTE.Text="" Then
		Msgbox("Por favor llena todas las cantidades","") 'ignore
		Pnl_Billete.RequestFocus
	Else
		LBL_TDIEZ.Text= L_DIEZ.Tag * EDT_CANDIEZ.Text
		LBL_TCI.Text= L_CINCO.Tag * EDT_CANCI.Text
		LBL_TDO.Text=L_DOS.Tag * EDT_CANDO.Text
		LBL_TUN.Text=L_UNO.Tag * EDT_CANUN.Text
		LBL_TCEN.Text=L_CENTAVO.Tag * EDT_CANCEN.Text
		LBL_TVEINTE.Text=L_VEINTE.Tag * EDT_CANVEINTE.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

'0.50
Private Sub EDT_CANCEN_FocusChanged (HasFocus As Boolean)
	If EDT_CANCEN.Text = "" Then EDT_CANCEN.Text = "0"
	EDT_CANCEN.Text = Round (EDT_CANCEN.Text)
	LBL_TCEN.Text=L_CENTAVO.Tag * EDT_CANCEN.Text
	B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
	TOTALMONEDA.Text=B_TOTALMONEDA.Text
End Sub

Sub B_SUMCENT_Click
	If EDT_CANCEN.Text = "" Then
		EDT_CANCEN.Text = 0
		LBL_TCEN.Text=L_CENTAVO.Tag * EDT_CANCEN.Text
	Else
		EDT_CANCEN.Text = Round (EDT_CANCEN.Text + 1)
		LBL_TCEN.Text=L_CENTAVO.Tag * EDT_CANCEN.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

Sub B_MENCENT_Click
	If EDT_CANCEN.Text = "" Then
		EDT_CANCEN.Text =0
		LBL_TCEN.Text=L_CENTAVO.Tag * EDT_CANCEN.Text
	Else IF EDT_CANCEN.Text > 0 Then
		EDT_CANCEN.Text = Round(EDT_CANCEN.Text -1)
		LBL_TCEN.Text=L_CENTAVO.Tag * EDT_CANCEN.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

'1
Private Sub EDT_CANUN_FocusChanged (HasFocus As Boolean)
	If EDT_CANUN.Text = "" Then EDT_CANUN.Text = "0"
	EDT_CANUN.Text = Round (EDT_CANUN.Text)
	LBL_TUN.Text=L_UNO.Tag * EDT_CANUN.Text
	B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
	TOTALMONEDA.Text=B_TOTALMONEDA.Text
End Sub

Sub B_SUMUN_Click
	If EDT_CANUN.Text = "" Then
		
		LBL_TUN.Text=L_UNO.Tag * EDT_CANUN.Text
	Else
		EDT_CANUN.Text = Round (EDT_CANUN.Text + 1)
		LBL_TUN.Text=L_UNO.Tag * EDT_CANUN.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

Sub B_MENUN_Click
	If EDT_CANUN.Text = "" Then
		EDT_CANUN.Text = 0
		LBL_TUN.Text=L_UNO.Tag * EDT_CANUN.Text
	Else IF EDT_CANUN.Text > 0 Then
		EDT_CANUN.Text = Round(EDT_CANUN.Text -1)
		LBL_TUN.Text=L_UNO.Tag * EDT_CANUN.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

'2
Private Sub EDT_CANDO_FocusChanged (HasFocus As Boolean)
	If EDT_CANDO.Text = "" Then EDT_CANDO.Text = "0"
	EDT_CANDO.Text = Round (EDT_CANDO.Text)
	LBL_TDO.Text=L_DOS.Tag * EDT_CANDO.Text
	B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
	TOTALMONEDA.Text=B_TOTALMONEDA.Text
End Sub

Sub B_SUMDO_Click
	If EDT_CANDO.Text = "" Then
		EDT_CANDO.Text =0
		LBL_TDO.Text=L_DOS.Tag * EDT_CANDO.Text
	Else
		EDT_CANDO.Text = Round (EDT_CANDO.Text + 1)
		LBL_TDO.Text=L_DOS.Tag * EDT_CANDO.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

Sub B_MENDO_Click
	If EDT_CANDO.Text = "" Then
		EDT_CANDO.Text=0
		LBL_TDO.Text=L_DOS.Tag * EDT_CANDO.Text
	Else IF EDT_CANDO.Text > 0 Then
		EDT_CANDO.Text = Round(EDT_CANDO.Text -1)
		LBL_TDO.Text=L_DOS.Tag * EDT_CANDO.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

'5
Private Sub EDT_CANCI_FocusChanged (HasFocus As Boolean)
	If EDT_CANCI.Text = "" Then EDT_CANCI.Text = "0"
	EDT_CANCI.Text = Round (EDT_CANCI.Text)
	LBL_TCI.Text= L_CINCO.Tag * EDT_CANCI.Text
	B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text )
	TOTALMONEDA.Text=B_TOTALMONEDA.Text
End Sub

Sub B_SUMCIN_Click
	If EDT_CANCI.Text = "" Then
		EDT_CANCI.Text =0
		LBL_TCI.Text= L_CINCO.Tag * EDT_CANCI.Text
	Else
		EDT_CANCI.Text = Round (EDT_CANCI.Text + 1)
		LBL_TCI.Text= L_CINCO.Tag * EDT_CANCI.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text )
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

Sub B_MENCI_Click
	If EDT_CANCI.Text = "" Then
		EDT_CANCI.Text =0
		LBL_TCI.Text= L_CINCO.Tag * EDT_CANCI.Text
	Else IF EDT_CANCI.Text > 0 Then
		EDT_CANCI.Text = Round(EDT_CANCI.Text -1)
		LBL_TCI.Text= L_CINCO.Tag * EDT_CANCI.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub
'10
Private Sub EDT_CANDIEZ_FocusChanged (HasFocus As Boolean)
	If EDT_CANDIEZ.Text = "" Then EDT_CANDIEZ.Text = "0"
	EDT_CANDIEZ.Text = Round (EDT_CANDIEZ.Text)
	LBL_TDIEZ.Text= L_DIEZ.Tag * EDT_CANDIEZ.Text
	B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
	TOTALMONEDA.Text=B_TOTALMONEDA.Text
End Sub

Sub B_SUMDIEZ_Click
	If EDT_CANDIEZ.Text = "" Then
		EDT_CANDIEZ.Text =0
		LBL_TDIEZ.Text= L_DIEZ.Tag * EDT_CANDIEZ.Text
	Else
		EDT_CANDIEZ.Text = Round (EDT_CANDIEZ.Text + 1)
		LBL_TDIEZ.Text= L_DIEZ.Tag * EDT_CANDIEZ.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

Sub B_MENDIEZ_Click
	If EDT_CANDIEZ.Text = "" Then
		EDT_CANDIEZ.Text = 0
		LBL_TDIEZ.Text= L_DIEZ.Tag * EDT_CANDIEZ.Text
	Else IF EDT_CANDIEZ.Text > 0 Then
		EDT_CANDIEZ.Text = Round(EDT_CANDIEZ.Text -1)
		LBL_TDIEZ.Text= L_DIEZ.Tag * EDT_CANDIEZ.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

'20
Private Sub EDT_CANVEINTE_FocusChanged (HasFocus As Boolean)
	If EDT_CANVEINTE.Text = "" Then EDT_CANVEINTE.Text = "0"
	EDT_CANVEINTE.Text = Round(EDT_CANVEINTE.Text)
	LBL_TVEINTE.Text= L_VEINTE.Tag * EDT_CANVEINTE.Text
	B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text +  LBL_TVEINTE.Text )
	TOTALMONEDA.Text=B_TOTALMONEDA.Text
End Sub

Sub B_MENVEINTE_Click
	If EDT_CANVEINTE.Text = "" Then
		EDT_CANVEINTE.Text = 0
		LBL_TVEINTE.Text= L_VEINTE.Tag * EDT_CANVEINTE.Text
	Else IF EDT_CANVEINTE.Text > 0 Then
		EDT_CANVEINTE.Text = Round(EDT_CANVEINTE.Text -1)
		LBL_TVEINTE.Text= L_VEINTE.Tag * EDT_CANVEINTE.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text +  LBL_TVEINTE.Text )
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

Sub B_SUMVEINTE_Click
	If EDT_CANVEINTE.Text = "" Then
		EDT_CANVEINTE.Text =0
		LBL_TVEINTE.Text= L_VEINTE.Tag * EDT_CANVEINTE.Text
	Else
		EDT_CANVEINTE.Text = Round (EDT_CANVEINTE.Text + 1)
		LBL_TVEINTE.Text= L_VEINTE.Tag * EDT_CANVEINTE.Text
		B_TOTALMONEDA.Text=( LBL_TDIEZ.Text + LBL_TCI.Text + LBL_TDO.Text + LBL_TUN.Text + LBL_TCEN.Text + LBL_TVEINTE.Text)
		TOTALMONEDA.Text=B_TOTALMONEDA.Text
	End If
End Sub

''''''TOTALES
Sub TOTALES_Click
	If TOTALMONEDA.Text="" Or  TOTALBILLETES.Text=""  Then
		TOTALMONEDA.Text=0
		TOTALBILLETES.Text=0
		B_SUM_TOTAL.Text="$"& (TOTALMONEDA.Text + TOTALBILLETES.Text)
	Else
		B_SUM_TOTAL.Text= "$"&(TOTALMONEDA.Text + TOTALBILLETES.Text)
	End If
End Sub

Sub B_AGREGABILL_Click
	Pnl_Billete.Visible=True
	Pnl_Moneda.Visible=False
	PNL_TOTALES.Visible=False
	LBL_RETURN.Visible=True
	LBL_REGRESA.Visible=True
End Sub

Sub B_AGREGAMONE_Click
	Pnl_Billete.Visible=False
	Pnl_Moneda.Visible=True
	PNL_TOTALES.Visible=False
	LBL_RETURN.Visible=True
	LBL_REGRESA.Visible=True
End Sub

Sub LBL_RETURN_Click
	Pnl_Billete.Visible=False
	Pnl_Moneda.Visible=False
	PNL_TOTALES.Visible=True
	LBL_RETURN.Visible=False
	LBL_REGRESA.Visible=False
	''' CALCULO FINAL
	If TOTALMONEDA.Text="" Or  TOTALBILLETES.Text=""  Then
		TOTALMONEDA.Text=0
		TOTALBILLETES.Text=0
		B_SUM_TOTAL.Text="$"& (TOTALMONEDA.Text + TOTALBILLETES.Text)
	Else
		B_SUM_TOTAL.Text="$"& (TOTALMONEDA.Text + TOTALBILLETES.Text)
	End If
End Sub

Sub LBL_REGRESA_Click
	Pnl_Billete.Visible=False
	Pnl_Moneda.Visible=False
	LBL_RETURN.Visible=False
	LBL_REGRESA.Visible=False
	PNL_TOTALES.Visible=True
	LBL_REGRESA.Visible=True
End Sub

Sub B_Regresar_Click
'	StartActivity("SELECCION")
	Subs.iniciaActividad("principal")
'	B4XPages.ShowPage("Principal")
'	Activity.Finish
	PNL_TOTALES.Visible=False
	Pnl_Billete.Visible=False
	Pnl_Moneda.visible=False
	PNL_TOTALES.Visible=False
	LBL_RETURN.Visible=False
	LBL_REGRESA.Visible=False
	P_BOLETA.Visible=False
'	P_INF_GENERAL.Visible=True
	LBL_REGRESA.Visible=False
End Sub