package keymon.lat.medicomed;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class c_cliente extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "keymon.lat.medicomed.c_cliente");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", keymon.lat.medicomed.c_cliente.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_cliente = null;
public keymon.lat.medicomed.dbrequestmanager _reqmanager = null;
public keymon.lat.medicomed.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.IME _ime = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _ruta = "";
public anywheresoftware.b4a.sql.SQL _skmt = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public String _total_cliente = "";
public String _m_lat = "";
public String _m_lon = "";
public anywheresoftware.b4a.objects.Serial.BluetoothAdmin _btadmin = null;
public anywheresoftware.b4a.objects.Serial _cmp20 = null;
public anywheresoftware.b4a.objects.streams.File.TextWriterWrapper _printer = null;
public anywheresoftware.b4a.objects.collections.Map _paireddevices = null;
public anywheresoftware.b4a.objects.collections.List _l = null;
public int _tamano = 0;
public int _espacio = 0;
public String _blanco = "";
public String _cuenta = "";
public String _tipo_venta = "";
public String _mac_impresora = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _dd = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_cuenta = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_nombre = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_calle = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_numero = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_nint = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_edo = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_pob = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_col = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_cp = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_zona = null;
public anywheresoftware.b4a.objects.ButtonWrapper _gest = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldotot = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_saldooper = null;
public anywheresoftware.b4a.objects.ButtonWrapper _tels = null;
public anywheresoftware.b4a.objects.LabelWrapper _label10 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label11 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _tar = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_comm = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_actdte = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_usuario = null;
public anywheresoftware.b4a.objects.LabelWrapper _la_resultado = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_entre1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_entre2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _datos = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guardar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _nuevo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s2 = null;
public String _res = "";
public anywheresoftware.b4a.objects.ButtonWrapper _hist = null;
public String _monto_compra = "";
public String _meta = "";
public String _meta2 = "";
public String _verifica = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_qr = null;
public anywheresoftware.b4a.objects.ButtonWrapper _bt_qr = null;
public String _codigo = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_mapa = null;
public String _cuantos = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_imp = null;
public com.rootsoft.togglelibrary.ToggleLibrary _toggla = null;
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _i_compra = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_guarda_c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_venta = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.LabelWrapper _la_gps = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_e_next = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_res_e = null;
public anywheresoftware.b4a.objects.LabelWrapper _t_tenc = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel2 = null;
public String _contador_e = "";
public String _hr_res1 = "";
public String _hr_res2 = "";
public String _hr_res3 = "";
public String _existe = "";
public String _telefono = "";
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb1 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb2 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb3 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb4 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _rb5 = null;
public String _stay_hh = "";
public String _stay_mi = "";
public String _stay_ss = "";
public anywheresoftware.b4a.objects.LabelWrapper _la_geo = null;
public int _result = 0;
public String _cercavalor = "";
public String _la_ruta = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_like = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_gps = null;
public ice.zxing.b4aZXingLib _sc = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper _cb_factura = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_cbfactura = null;
public boolean _venimosdeticketsdia = false;
public anywheresoftware.b4a.objects.PanelWrapper _p_abono = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_abono = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_abono = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancelar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_abono1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label20 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_calle1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ubicacion2 = null;
public boolean _dentrodegeocerca = false;
public anywheresoftware.b4a.objects.ButtonWrapper _b_iniciofinventa = null;
public int _precision = 0;
public String _motivonoventa = "";
public String _motivonovisita = "";
public String _id_almacen = "";
public String _ruta_tienda = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_clintesinventa = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_clienteventa = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_monto_venta = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_monto_venta = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_can_monto_venta = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_gu_monto_venta = null;
public b4a.example.dateutils _dateutils = null;
public keymon.lat.medicomed.main _main = null;
public keymon.lat.medicomed.starter _starter = null;
public keymon.lat.medicomed.subs _subs = null;
public keymon.lat.medicomed.appupdater _appupdater = null;
public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null;
public keymon.lat.medicomed.tracker _tracker = null;
public keymon.lat.medicomed.newinst2 _newinst2 = null;
public keymon.lat.medicomed.b4xpages _b4xpages = null;
public keymon.lat.medicomed.b4xcollections _b4xcollections = null;
public keymon.lat.medicomed.httputils2service _httputils2service = null;
public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(keymon.lat.medicomed.c_cliente __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=5308416;
 //BA.debugLineNum = 5308416;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=5308417;
 //BA.debugLineNum = 5308417;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=5308418;
 //BA.debugLineNum = 5308418;BA.debugLine="End Sub";
return null;
}
public void  _b_abono_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_abono_click", false))
	 {Debug.delegate(ba, "b_abono_click", null); return;}
ResumableSub_b_abono_Click rsub = new ResumableSub_b_abono_Click(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_b_abono_Click extends BA.ResumableSub {
public ResumableSub_b_abono_Click(keymon.lat.medicomed.c_cliente parent,keymon.lat.medicomed.c_cliente __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.c_cliente __ref;
keymon.lat.medicomed.c_cliente parent;
int _resultado = 0;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_cliente";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=7667713;
 //BA.debugLineNum = 7667713;BA.debugLine="p_abono.Visible = False";
__ref._p_abono /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=7667714;
 //BA.debugLineNum = 7667714;BA.debugLine="If et_abono.Text <> \"\" Then";
if (true) break;

case 1:
//if
this.state = 8;
if ((__ref._et_abono /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("") == false) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=7667715;
 //BA.debugLineNum = 7667715;BA.debugLine="Msgbox2Async($\"¿Seguro que quieres realizar un a";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence(("¿Seguro que quieres realizar un abono de $"+parent.__c.SmartStringFormatter("",(Object)(__ref._et_abono /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))+" para este cliente?")),BA.ObjectToCharSequence("Guardar Abono"),"Guardar","Cancelar","",(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(parent.__c.Null)),ba,parent.__c.True);
RDebugUtils.currentLine=7667716;
 //BA.debugLineNum = 7667716;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_cliente", "b_abono_click"), null);
this.state = 9;
return;
case 9:
//C
this.state = 4;
_resultado = (Integer) result[1];
;
RDebugUtils.currentLine=7667717;
 //BA.debugLineNum = 7667717;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 4:
//if
this.state = 7;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
RDebugUtils.currentLine=7667718;
 //BA.debugLineNum = 7667718;BA.debugLine="skmt.ExecNonQuery($\"INSERT INTO ABONOS(a_usuari";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha) VALUES ('"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeusuariodebd /*String*/ (ba)))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeruta /*String*/ (ba)))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traecliente /*String*/ (ba)))+"' ,'"+parent.__c.SmartStringFormatter("",(Object)(__ref._et_abono /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._fechakmt /*String*/ (ba,BA.NumberToString(parent.__c.DateTime.getNow()))))+"')"));
RDebugUtils.currentLine=7667719;
 //BA.debugLineNum = 7667719;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
 if (true) break;

case 7:
//C
this.state = 8;
;
 if (true) break;

case 8:
//C
this.state = -1;
;
RDebugUtils.currentLine=7667722;
 //BA.debugLineNum = 7667722;BA.debugLine="et_abono.Text = \"\"";
__ref._et_abono /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=7667723;
 //BA.debugLineNum = 7667723;BA.debugLine="ime.HideKeyboard";
__ref._ime /*anywheresoftware.b4a.objects.IME*/ .HideKeyboard(ba);
RDebugUtils.currentLine=7667724;
 //BA.debugLineNum = 7667724;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_abono1_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_abono1_click", false))
	 {return ((String) Debug.delegate(ba, "b_abono1_click", null));}
RDebugUtils.currentLine=7798784;
 //BA.debugLineNum = 7798784;BA.debugLine="Private Sub b_abono1_Click";
RDebugUtils.currentLine=7798785;
 //BA.debugLineNum = 7798785;BA.debugLine="p_abono.Visible = True";
__ref._p_abono /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=7798786;
 //BA.debugLineNum = 7798786;BA.debugLine="End Sub";
return "";
}
public String  _b_can_monto_venta_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_can_monto_venta_click", false))
	 {return ((String) Debug.delegate(ba, "b_can_monto_venta_click", null));}
RDebugUtils.currentLine=8126464;
 //BA.debugLineNum = 8126464;BA.debugLine="Private Sub b_can_monto_venta_Click";
RDebugUtils.currentLine=8126465;
 //BA.debugLineNum = 8126465;BA.debugLine="p_monto_venta.Visible = False";
__ref._p_monto_venta /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=8126466;
 //BA.debugLineNum = 8126466;BA.debugLine="End Sub";
return "";
}
public String  _b_cancelar_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_cancelar_click", false))
	 {return ((String) Debug.delegate(ba, "b_cancelar_click", null));}
RDebugUtils.currentLine=7733248;
 //BA.debugLineNum = 7733248;BA.debugLine="Private Sub b_cancelar_Click";
RDebugUtils.currentLine=7733249;
 //BA.debugLineNum = 7733249;BA.debugLine="et_abono.Text = \"\"";
__ref._et_abono /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=7733250;
 //BA.debugLineNum = 7733250;BA.debugLine="p_abono.Visible = False";
__ref._p_abono /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=7733251;
 //BA.debugLineNum = 7733251;BA.debugLine="ime.HideKeyboard";
__ref._ime /*anywheresoftware.b4a.objects.IME*/ .HideKeyboard(ba);
RDebugUtils.currentLine=7733252;
 //BA.debugLineNum = 7733252;BA.debugLine="End Sub";
return "";
}
public String  _b_clienteventa_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_clienteventa_click", false))
	 {return ((String) Debug.delegate(ba, "b_clienteventa_click", null));}
RDebugUtils.currentLine=7929856;
 //BA.debugLineNum = 7929856;BA.debugLine="Private Sub b_clienteVenta_Click";
RDebugUtils.currentLine=7929858;
 //BA.debugLineNum = 7929858;BA.debugLine="et_monto_venta.Text = \"\"";
__ref._et_monto_venta /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=7929859;
 //BA.debugLineNum = 7929859;BA.debugLine="p_monto_venta.Visible = True";
__ref._p_monto_venta /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=7929861;
 //BA.debugLineNum = 7929861;BA.debugLine="End Sub";
return "";
}
public String  _b_clintesinventa_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_clintesinventa_click", false))
	 {return ((String) Debug.delegate(ba, "b_clintesinventa_click", null));}
RDebugUtils.currentLine=7995392;
 //BA.debugLineNum = 7995392;BA.debugLine="Private Sub b_clinteSinVenta_Click";
RDebugUtils.currentLine=7995394;
 //BA.debugLineNum = 7995394;BA.debugLine="Guardar_Click";
__ref._guardar_click /*String*/ (null);
RDebugUtils.currentLine=7995395;
 //BA.debugLineNum = 7995395;BA.debugLine="et_monto_venta.Text = \"0\"";
__ref._et_monto_venta /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("0"));
RDebugUtils.currentLine=7995396;
 //BA.debugLineNum = 7995396;BA.debugLine="Subs.ventaNoVenta(usuario, Id_Almacen, ruta_tiend";
_subs._ventanoventa /*String*/ (ba,__ref._usuario /*String*/ ,__ref._id_almacen /*String*/ ,__ref._ruta_tienda /*String*/ ,"SinVenta",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,__ref._et_monto_venta /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText());
RDebugUtils.currentLine=7995398;
 //BA.debugLineNum = 7995398;BA.debugLine="Try";
try {RDebugUtils.currentLine=7995399;
 //BA.debugLineNum = 7995399;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=7995400;
 //BA.debugLineNum = 7995400;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=7995401;
 //BA.debugLineNum = 7995401;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=7995402;
 //BA.debugLineNum = 7995402;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=7995404;
 //BA.debugLineNum = 7995404;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA where NV_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=7995405;
 //BA.debugLineNum = 7995405;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=7995407;
 //BA.debugLineNum = 7995407;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=7995409;
 //BA.debugLineNum = 7995409;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_OUT = ? where HSS_OUT = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__c.DateTime.Time(__c.DateTime.getNow()))}));
RDebugUtils.currentLine=7995410;
 //BA.debugLineNum = 7995410;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_FIN = ? ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__c.DateTime.Time(__c.DateTime.getNow()))}));
RDebugUtils.currentLine=7995412;
 //BA.debugLineNum = 7995412;BA.debugLine="ToastMessageShow(\"Cliente con venta eliminado co";
__c.ToastMessageShow(BA.ObjectToCharSequence("Cliente con venta eliminado correctamente."),__c.False);
 } 
       catch (Exception e16) {
			ba.setLastException(e16);RDebugUtils.currentLine=7995415;
 //BA.debugLineNum = 7995415;BA.debugLine="ToastMessageShow(\"Error eliminando cliente con v";
__c.ToastMessageShow(BA.ObjectToCharSequence("Error eliminando cliente con venta."),__c.True);
 };
RDebugUtils.currentLine=7995418;
 //BA.debugLineNum = 7995418;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "guardar_click", false))
	 {return ((String) Debug.delegate(ba, "guardar_click", null));}
RDebugUtils.currentLine=6029312;
 //BA.debugLineNum = 6029312;BA.debugLine="Sub Guardar_Click";
RDebugUtils.currentLine=6029313;
 //BA.debugLineNum = 6029313;BA.debugLine="b_inicioFinVenta.Text = \"FIN VENTA\"";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("FIN VENTA"));
RDebugUtils.currentLine=6029314;
 //BA.debugLineNum = 6029314;BA.debugLine="b_inicioFinVenta.Visible = True";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=6029315;
 //BA.debugLineNum = 6029315;BA.debugLine="End Sub";
return "";
}
public String  _b_e_next_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_e_next_click", false))
	 {return ((String) Debug.delegate(ba, "b_e_next_click", null));}
RDebugUtils.currentLine=7012352;
 //BA.debugLineNum = 7012352;BA.debugLine="Sub B_E_NEXT_Click";
RDebugUtils.currentLine=7012353;
 //BA.debugLineNum = 7012353;BA.debugLine="If E_RES_E.Text <> \"\" Then";
if ((__ref._e_res_e /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("") == false) { 
RDebugUtils.currentLine=7012354;
 //BA.debugLineNum = 7012354;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into HIST_ENCUESTA(HE_CLIE, HE_RES, HE_FECHA, HE_TIPO) VALUES (?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._e_res_e /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)("DONDE")}));
RDebugUtils.currentLine=7012355;
 //BA.debugLineNum = 7012355;BA.debugLine="Panel2.Visible = False";
__ref._panel2 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=7012356;
 //BA.debugLineNum = 7012356;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else {
RDebugUtils.currentLine=7012358;
 //BA.debugLineNum = 7012358;BA.debugLine="Msgbox(\"SIN RESPUESTA\",\"AVISO\") 'Ignore";
__c.Msgbox(BA.ObjectToCharSequence("SIN RESPUESTA"),BA.ObjectToCharSequence("AVISO"),ba);
 };
RDebugUtils.currentLine=7012360;
 //BA.debugLineNum = 7012360;BA.debugLine="End Sub";
return "";
}
public String  _b_gu_monto_venta_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_gu_monto_venta_click", false))
	 {return ((String) Debug.delegate(ba, "b_gu_monto_venta_click", null));}
RDebugUtils.currentLine=8060928;
 //BA.debugLineNum = 8060928;BA.debugLine="Private Sub b_gu_monto_venta_Click";
RDebugUtils.currentLine=8060930;
 //BA.debugLineNum = 8060930;BA.debugLine="If et_monto_venta.Text = \"\" Or et_monto_venta.Tex";
if ((__ref._et_monto_venta /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("") || (__ref._et_monto_venta /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("0")) { 
RDebugUtils.currentLine=8060931;
 //BA.debugLineNum = 8060931;BA.debugLine="ToastMessageShow(\"El monto de venta no puede ser";
__c.ToastMessageShow(BA.ObjectToCharSequence("El monto de venta no puede ser vacío o 0."),__c.True);
 }else {
RDebugUtils.currentLine=8060933;
 //BA.debugLineNum = 8060933;BA.debugLine="Guardar_Click";
__ref._guardar_click /*String*/ (null);
RDebugUtils.currentLine=8060934;
 //BA.debugLineNum = 8060934;BA.debugLine="Subs.ventaNoVenta(usuario, Id_Almacen, ruta_tien";
_subs._ventanoventa /*String*/ (ba,__ref._usuario /*String*/ ,__ref._id_almacen /*String*/ ,__ref._ruta_tienda /*String*/ ,"ConVenta",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,__ref._et_monto_venta /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText());
RDebugUtils.currentLine=8060936;
 //BA.debugLineNum = 8060936;BA.debugLine="Try";
try {RDebugUtils.currentLine=8060937;
 //BA.debugLineNum = 8060937;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select CU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=8060938;
 //BA.debugLineNum = 8060938;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=8060939;
 //BA.debugLineNum = 8060939;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=8060940;
 //BA.debugLineNum = 8060940;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=8060942;
 //BA.debugLineNum = 8060942;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from NOVENTA where NV_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=8060943;
 //BA.debugLineNum = 8060943;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=8060945;
 //BA.debugLineNum = 8060945;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2 where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=8060947;
 //BA.debugLineNum = 8060947;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HI";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_OUT = ? where HSS_OUT = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__c.DateTime.Time(__c.DateTime.getNow()))}));
RDebugUtils.currentLine=8060948;
 //BA.debugLineNum = 8060948;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HI";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_FIN = ? ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__c.DateTime.Time(__c.DateTime.getNow()))}));
RDebugUtils.currentLine=8060950;
 //BA.debugLineNum = 8060950;BA.debugLine="ToastMessageShow(\"Cliente con venta eliminado c";
__c.ToastMessageShow(BA.ObjectToCharSequence("Cliente con venta eliminado correctamente."),__c.False);
 } 
       catch (Exception e18) {
			ba.setLastException(e18);RDebugUtils.currentLine=8060953;
 //BA.debugLineNum = 8060953;BA.debugLine="ToastMessageShow(\"Error eliminando cliente con";
__c.ToastMessageShow(BA.ObjectToCharSequence("Error eliminando cliente con venta."),__c.True);
 };
RDebugUtils.currentLine=8060956;
 //BA.debugLineNum = 8060956;BA.debugLine="p_monto_venta.Visible = False";
__ref._p_monto_venta /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=8060958;
 //BA.debugLineNum = 8060958;BA.debugLine="End Sub";
return "";
}
public String  _b_guarda_c_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_guarda_c_click", false))
	 {return ((String) Debug.delegate(ba, "b_guarda_c_click", null));}
RDebugUtils.currentLine=6881280;
 //BA.debugLineNum = 6881280;BA.debugLine="Sub B_GUARDA_C_Click";
RDebugUtils.currentLine=6881281;
 //BA.debugLineNum = 6881281;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=6881282;
 //BA.debugLineNum = 6881282;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=6881283;
 //BA.debugLineNum = 6881283;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=6881284;
 //BA.debugLineNum = 6881284;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENTA";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=6881285;
 //BA.debugLineNum = 6881285;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=6881286;
 //BA.debugLineNum = 6881286;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=6881287;
 //BA.debugLineNum = 6881287;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=6881288;
 //BA.debugLineNum = 6881288;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUARI";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=6881289;
 //BA.debugLineNum = 6881289;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=6881290;
 //BA.debugLineNum = 6881290;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=6881291;
 //BA.debugLineNum = 6881291;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=6881292;
 //BA.debugLineNum = 6881292;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA) VALUES(?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("4"),(Object)(.01),(Object)(.01),(Object)(2),(Object)("KNORR RINDE MAS 70 GR"),(Object)("GUNA2"),(Object)(__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._la_ruta /*String*/ )}));
RDebugUtils.currentLine=6881293;
 //BA.debugLineNum = 6881293;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_FACE(HFCLIENTE, HFALIAS,HFRUTA,HFALMACEN) VALUES (?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._i_compra /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._la_ruta /*String*/ ),(Object)(__ref._almacen /*String*/ )}));
RDebugUtils.currentLine=6881294;
 //BA.debugLineNum = 6881294;BA.debugLine="Panel1.Visible = False";
__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=6881296;
 //BA.debugLineNum = 6881296;BA.debugLine="Tar.Visible = False";
__ref._tar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=6881297;
 //BA.debugLineNum = 6881297;BA.debugLine="Tels.Visible = False";
__ref._tels /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=6881298;
 //BA.debugLineNum = 6881298;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=6881300;
 //BA.debugLineNum = 6881300;BA.debugLine="Guardar.Visible = True";
__ref._guardar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=6881301;
 //BA.debugLineNum = 6881301;BA.debugLine="End Sub";
return "";
}
public String  _b_imp_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_imp_click", false))
	 {return ((String) Debug.delegate(ba, "b_imp_click", null));}
int _i = 0;
int _e = 0;
RDebugUtils.currentLine=6684672;
 //BA.debugLineNum = 6684672;BA.debugLine="Sub B_IMP_Click";
RDebugUtils.currentLine=6684673;
 //BA.debugLineNum = 6684673;BA.debugLine="TAMANO = 0";
__ref._tamano /*int*/  = (int) (0);
RDebugUtils.currentLine=6684674;
 //BA.debugLineNum = 6684674;BA.debugLine="ESPACIO = 21";
__ref._espacio /*int*/  = (int) (21);
RDebugUtils.currentLine=6684675;
 //BA.debugLineNum = 6684675;BA.debugLine="BLANCO = \" \"";
__ref._blanco /*String*/  = " ";
RDebugUtils.currentLine=6684676;
 //BA.debugLineNum = 6684676;BA.debugLine="printer.Initialize(cmp20.OutputStream)";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .Initialize(__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .getOutputStream());
RDebugUtils.currentLine=6684677;
 //BA.debugLineNum = 6684677;BA.debugLine="printer.WriteLine(\"DURAKELO S.A. de C.V.\")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("DURAKELO S.A. de C.V.");
RDebugUtils.currentLine=6684678;
 //BA.debugLineNum = 6684678;BA.debugLine="printer.WriteLine(\"RFC: DUR-011025-T12\")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("RFC: DUR-011025-T12");
RDebugUtils.currentLine=6684679;
 //BA.debugLineNum = 6684679;BA.debugLine="printer.WriteLine(\"Tel.: 618-826-0104\")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("Tel.: 618-826-0104");
RDebugUtils.currentLine=6684680;
 //BA.debugLineNum = 6684680;BA.debugLine="printer.WriteLine(\"Vendedor: KMTS \")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("Vendedor: KMTS ");
RDebugUtils.currentLine=6684681;
 //BA.debugLineNum = 6684681;BA.debugLine="printer.WriteLine(\"Tienda: \" & La_nombre.Text)";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("Tienda: "+__ref._la_nombre /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText());
RDebugUtils.currentLine=6684682;
 //BA.debugLineNum = 6684682;BA.debugLine="printer.WriteLine(\"-----------PREVENTA-----------";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("-----------PREVENTA-----------");
RDebugUtils.currentLine=6684683;
 //BA.debugLineNum = 6684683;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PRO";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PRONOMBRE, PE_CANT, length(pe_cant) as L_CANT, PE_COSTOU, length(PE_COSTOU) as L_COSTOU, PE_COSTO_TOT, length(PE_COSTO_TOT) as L_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=6684684;
 //BA.debugLineNum = 6684684;BA.debugLine="If S.RowCount>0 Then";
if (__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=6684685;
 //BA.debugLineNum = 6684685;BA.debugLine="For i=0 To S.RowCount -1";
{
final int step13 = 1;
final int limit13 = (int) (__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit13 ;_i = _i + step13 ) {
RDebugUtils.currentLine=6684686;
 //BA.debugLineNum = 6684686;BA.debugLine="S.Position=i";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=6684687;
 //BA.debugLineNum = 6684687;BA.debugLine="printer.WriteLine(s.GetString(\"PE_CANT\") & \" \"";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine(__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")+" "+__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PRONOMBRE"));
RDebugUtils.currentLine=6684688;
 //BA.debugLineNum = 6684688;BA.debugLine="TAMANO = s.GetLong(\"L_CANT\") + TAMANO";
__ref._tamano /*int*/  = (int) (__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetLong("L_CANT")+__ref._tamano /*int*/ );
RDebugUtils.currentLine=6684689;
 //BA.debugLineNum = 6684689;BA.debugLine="TAMANO = s.GetLong(\"L_COSTOU\") + TAMANO";
__ref._tamano /*int*/  = (int) (__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetLong("L_COSTOU")+__ref._tamano /*int*/ );
RDebugUtils.currentLine=6684690;
 //BA.debugLineNum = 6684690;BA.debugLine="TAMANO = s.GetLong(\"L_COSTO_TOT\") + TAMANO";
__ref._tamano /*int*/  = (int) (__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetLong("L_COSTO_TOT")+__ref._tamano /*int*/ );
RDebugUtils.currentLine=6684691;
 //BA.debugLineNum = 6684691;BA.debugLine="ESPACIO = ESPACIO - TAMANO";
__ref._espacio /*int*/  = (int) (__ref._espacio /*int*/ -__ref._tamano /*int*/ );
RDebugUtils.currentLine=6684692;
 //BA.debugLineNum = 6684692;BA.debugLine="For E=0 To ESPACIO -1";
{
final int step20 = 1;
final int limit20 = (int) (__ref._espacio /*int*/ -1);
_e = (int) (0) ;
for (;_e <= limit20 ;_e = _e + step20 ) {
RDebugUtils.currentLine=6684693;
 //BA.debugLineNum = 6684693;BA.debugLine="BLANCO = \" \" & BLANCO";
__ref._blanco /*String*/  = " "+__ref._blanco /*String*/ ;
 }
};
RDebugUtils.currentLine=6684695;
 //BA.debugLineNum = 6684695;BA.debugLine="printer.WriteLine(BLANCO & s.GETSTRING(\"PE_CANT";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine(__ref._blanco /*String*/ +__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")+" X $"+__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_COSTOU")+"   $"+__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_COSTO_TOT"));
RDebugUtils.currentLine=6684696;
 //BA.debugLineNum = 6684696;BA.debugLine="TAMANO = 0";
__ref._tamano /*int*/  = (int) (0);
RDebugUtils.currentLine=6684697;
 //BA.debugLineNum = 6684697;BA.debugLine="ESPACIO = 21";
__ref._espacio /*int*/  = (int) (21);
RDebugUtils.currentLine=6684698;
 //BA.debugLineNum = 6684698;BA.debugLine="BLANCO = \" \"";
__ref._blanco /*String*/  = " ";
 }
};
 };
RDebugUtils.currentLine=6684701;
 //BA.debugLineNum = 6684701;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=6684702;
 //BA.debugLineNum = 6684702;BA.debugLine="printer.WriteLine(\"Total Preventa:   $\" & total_c";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("Total Preventa:   $"+__ref._total_cliente /*String*/ );
RDebugUtils.currentLine=6684703;
 //BA.debugLineNum = 6684703;BA.debugLine="printer.WriteLine(\"------------VENTA-------------";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("------------VENTA-------------");
RDebugUtils.currentLine=6684704;
 //BA.debugLineNum = 6684704;BA.debugLine="printer.WriteLine(\" \")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine(" ");
RDebugUtils.currentLine=6684705;
 //BA.debugLineNum = 6684705;BA.debugLine="printer.WriteLine(\"TOTAL:   $\" & total_cliente)";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("TOTAL:   $"+__ref._total_cliente /*String*/ );
RDebugUtils.currentLine=6684706;
 //BA.debugLineNum = 6684706;BA.debugLine="printer.WriteLine(\" \")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine(" ");
RDebugUtils.currentLine=6684707;
 //BA.debugLineNum = 6684707;BA.debugLine="printer.WriteLine(\"----ESTE TICKET NO ES UN -----";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("----ESTE TICKET NO ES UN -----");
RDebugUtils.currentLine=6684708;
 //BA.debugLineNum = 6684708;BA.debugLine="printer.WriteLine(\"--COMPROBANTE FISCAL, SOLO ES-";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("--COMPROBANTE FISCAL, SOLO ES-");
RDebugUtils.currentLine=6684709;
 //BA.debugLineNum = 6684709;BA.debugLine="printer.WriteLine(\"--------INFORMATIVO-----------";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("--------INFORMATIVO-----------");
RDebugUtils.currentLine=6684710;
 //BA.debugLineNum = 6684710;BA.debugLine="printer.WriteLine(\"------------------------------";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine("------------------------------");
RDebugUtils.currentLine=6684711;
 //BA.debugLineNum = 6684711;BA.debugLine="printer.WriteLine(\" \")";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .WriteLine(" ");
RDebugUtils.currentLine=6684712;
 //BA.debugLineNum = 6684712;BA.debugLine="printer.Flush";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .Flush();
RDebugUtils.currentLine=6684714;
 //BA.debugLineNum = 6684714;BA.debugLine="End Sub";
return "";
}
public String  _b_iniciofinventa_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_iniciofinventa_click", false))
	 {return ((String) Debug.delegate(ba, "b_iniciofinventa_click", null));}
RDebugUtils.currentLine=7864320;
 //BA.debugLineNum = 7864320;BA.debugLine="Private Sub b_inicioFinVenta_Click";
RDebugUtils.currentLine=7864321;
 //BA.debugLineNum = 7864321;BA.debugLine="usuario = Subs.traeUsuarioDeBD";
__ref._usuario /*String*/  = _subs._traeusuariodebd /*String*/ (ba);
RDebugUtils.currentLine=7864322;
 //BA.debugLineNum = 7864322;BA.debugLine="Id_Almacen = Subs.traeAlmacen";
__ref._id_almacen /*String*/  = _subs._traealmacen /*String*/ (ba);
RDebugUtils.currentLine=7864324;
 //BA.debugLineNum = 7864324;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=7864325;
 //BA.debugLineNum = 7864325;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=7864326;
 //BA.debugLineNum = 7864326;BA.debugLine="ruta_tienda = c.GetString(\"CAT_CL_RUTA\")";
__ref._ruta_tienda /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=7864328;
 //BA.debugLineNum = 7864328;BA.debugLine="If dentroDeGeocerca Then precision = 1";
if (__ref._dentrodegeocerca /*boolean*/ ) { 
__ref._precision /*int*/  = (int) (1);};
RDebugUtils.currentLine=7864329;
 //BA.debugLineNum = 7864329;BA.debugLine="motivoNoVenta = \"\"";
__ref._motivonoventa /*String*/  = "";
RDebugUtils.currentLine=7864330;
 //BA.debugLineNum = 7864330;BA.debugLine="motivoNoVisita = \"\"";
__ref._motivonovisita /*String*/  = "";
RDebugUtils.currentLine=7864332;
 //BA.debugLineNum = 7864332;BA.debugLine="If Starter.enVenta Then";
if (_starter._enventa /*boolean*/ ) { 
RDebugUtils.currentLine=7864333;
 //BA.debugLineNum = 7864333;BA.debugLine="b_inicioFinVenta.Visible = True";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=7864334;
 //BA.debugLineNum = 7864334;BA.debugLine="Subs.bitacora(Subs.fechanormal(DateTime.Now), us";
_subs._bitacora /*String*/ (ba,_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),__ref._usuario /*String*/ ,__ref._id_almacen /*String*/ ,__ref._ruta_tienda /*String*/ ,"Termina Venta",_subs._traecliente /*String*/ (ba),"",_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,BA.NumberToString(__ref._precision /*int*/ ),__ref._motivonoventa /*String*/ ,__ref._motivonovisita /*String*/ );
RDebugUtils.currentLine=7864335;
 //BA.debugLineNum = 7864335;BA.debugLine="Starter.enVenta = False";
_starter._enventa /*boolean*/  = __c.False;
RDebugUtils.currentLine=7864336;
 //BA.debugLineNum = 7864336;BA.debugLine="LogColor($\">>>>>> TERMINA VENTA: ${Starter.enVen";
__c.LogImpl("37864336",(">>>>>> TERMINA VENTA: "+__c.SmartStringFormatter("",(Object)(_starter._enventa /*boolean*/ ))+" - "+__c.SmartStringFormatter("",(Object)(_subs._traecliente /*String*/ (ba)))+""),__c.Colors.Red);
RDebugUtils.currentLine=7864337;
 //BA.debugLineNum = 7864337;BA.debugLine="Subs.iniciaActividad(\"principal\")";
_subs._iniciaactividad /*String*/ (ba,"principal");
RDebugUtils.currentLine=7864338;
 //BA.debugLineNum = 7864338;BA.debugLine="B4XPages.ShowPageAndRemovePreviousPages(\"Princip";
_b4xpages._showpageandremovepreviouspages /*String*/ (ba,"Principal");
RDebugUtils.currentLine=7864339;
 //BA.debugLineNum = 7864339;BA.debugLine="Guardar2_Click";
__ref._guardar2_click /*String*/ (null);
 }else {
RDebugUtils.currentLine=7864343;
 //BA.debugLineNum = 7864343;BA.debugLine="b_inicioFinVenta.Width = Root.Width";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setWidth(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=7864344;
 //BA.debugLineNum = 7864344;BA.debugLine="Subs.bitacora(Subs.fechanormal(DateTime.Now), us";
_subs._bitacora /*String*/ (ba,_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),__ref._usuario /*String*/ ,__ref._id_almacen /*String*/ ,__ref._ruta_tienda /*String*/ ,"Inicia Venta",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),"",_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ,BA.NumberToString(__ref._precision /*int*/ ),__ref._motivonoventa /*String*/ ,"");
RDebugUtils.currentLine=7864345;
 //BA.debugLineNum = 7864345;BA.debugLine="Starter.enVenta = True";
_starter._enventa /*boolean*/  = __c.True;
RDebugUtils.currentLine=7864346;
 //BA.debugLineNum = 7864346;BA.debugLine="LogColor($\">>>>>> INICIA VENTA: ${Starter.enVent";
__c.LogImpl("37864346",(">>>>>> INICIA VENTA: "+__c.SmartStringFormatter("",(Object)(_starter._enventa /*boolean*/ ))+" - "+__c.SmartStringFormatter("",(Object)(_subs._traecliente /*String*/ (ba)))+""),__c.Colors.Red);
RDebugUtils.currentLine=7864347;
 //BA.debugLineNum = 7864347;BA.debugLine="b_inicioFinVenta.Visible = False";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=7864351;
 //BA.debugLineNum = 7864351;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=7864353;
 //BA.debugLineNum = 7864353;BA.debugLine="End Sub";
return "";
}
public String  _guardar2_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "guardar2_click", false))
	 {return ((String) Debug.delegate(ba, "guardar2_click", null));}
RDebugUtils.currentLine=6094848;
 //BA.debugLineNum = 6094848;BA.debugLine="Sub Guardar2_Click";
RDebugUtils.currentLine=6094920;
 //BA.debugLineNum = 6094920;BA.debugLine="End Sub";
return "";
}
public String  _b_mapa_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_mapa_click", false))
	 {return ((String) Debug.delegate(ba, "b_mapa_click", null));}
RDebugUtils.currentLine=6619136;
 //BA.debugLineNum = 6619136;BA.debugLine="Sub b_mapa_Click";
RDebugUtils.currentLine=6619137;
 //BA.debugLineNum = 6619137;BA.debugLine="B4XPages.ShowPage(\"mapas\")";
_b4xpages._showpage /*String*/ (ba,"mapas");
RDebugUtils.currentLine=6619138;
 //BA.debugLineNum = 6619138;BA.debugLine="End Sub";
return "";
}
public String  _b_venta_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_venta_click", false))
	 {return ((String) Debug.delegate(ba, "b_venta_click", null));}
RDebugUtils.currentLine=6946816;
 //BA.debugLineNum = 6946816;BA.debugLine="Sub b_venta_Click";
RDebugUtils.currentLine=6946817;
 //BA.debugLineNum = 6946817;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=6946818;
 //BA.debugLineNum = 6946818;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=6946819;
 //BA.debugLineNum = 6946819;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=6946847;
 //BA.debugLineNum = 6946847;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
String _factura = "";
RDebugUtils.currentLine=5439488;
 //BA.debugLineNum = 5439488;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=5439490;
 //BA.debugLineNum = 5439490;BA.debugLine="b_clinteSinVenta.Enabled = False";
__ref._b_clintesinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);
RDebugUtils.currentLine=5439491;
 //BA.debugLineNum = 5439491;BA.debugLine="b_clienteVenta.Enabled = False";
__ref._b_clienteventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);
RDebugUtils.currentLine=5439497;
 //BA.debugLineNum = 5439497;BA.debugLine="b_inicioFinVenta.Width = Root.Width";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setWidth(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=5439498;
 //BA.debugLineNum = 5439498;BA.debugLine="LA_GPS.TextColor = Colors.Red";
__ref._la_gps /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Red);
RDebugUtils.currentLine=5439499;
 //BA.debugLineNum = 5439499;BA.debugLine="LA_GPS.Text = \"SIN UBICACION GPS\"";
__ref._la_gps /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("SIN UBICACION GPS"));
RDebugUtils.currentLine=5439500;
 //BA.debugLineNum = 5439500;BA.debugLine="cercavalor = 0";
__ref._cercavalor /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=5439501;
 //BA.debugLineNum = 5439501;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=5439502;
 //BA.debugLineNum = 5439502;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=5439503;
 //BA.debugLineNum = 5439503;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=5439505;
 //BA.debugLineNum = 5439505;BA.debugLine="cb_factura.Checked = False";
__ref._cb_factura /*anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=5439506;
 //BA.debugLineNum = 5439506;BA.debugLine="p_abono.Visible = False";
__ref._p_abono /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5439507;
 //BA.debugLineNum = 5439507;BA.debugLine="Subs.centraPanel(p_abono, Root.Width)";
_subs._centrapanel /*String*/ (ba,__ref._p_abono /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=5439508;
 //BA.debugLineNum = 5439508;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(__ref._ruta /*String*/ ,"kmt.db",__c.True);
RDebugUtils.currentLine=5439509;
 //BA.debugLineNum = 5439509;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_CL";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA,CAT_CL_NUM_SERIEFISICO  from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=5439510;
 //BA.debugLineNum = 5439510;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"Select SUM(PE";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select SUM(PE_COSTO_TOT)  As TOTAL_CLIE, SUM(PE_CANT)  As CANT_CLIE, PC_FACTURA FROM PEDIDO_CLIENTE INNER JOIN PEDIDO ON PEDIDO_CLIENTE.PC_CLIENTE = PEDIDO.PE_CLIENTE WHERE (PE_CLIENTE IN (Select cuenta from cuentaa))")));
RDebugUtils.currentLine=5439511;
 //BA.debugLineNum = 5439511;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439512;
 //BA.debugLineNum = 5439512;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=5439513;
 //BA.debugLineNum = 5439513;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439514;
 //BA.debugLineNum = 5439514;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CODIGO")));
RDebugUtils.currentLine=5439515;
 //BA.debugLineNum = 5439515;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
__ref._la_nombre /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOMBRE")));
RDebugUtils.currentLine=5439516;
 //BA.debugLineNum = 5439516;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\")";
__ref._la_calle /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE")));
RDebugUtils.currentLine=5439517;
 //BA.debugLineNum = 5439517;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
__ref._la_col /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_COLONIA")));
RDebugUtils.currentLine=5439518;
 //BA.debugLineNum = 5439518;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
__ref._la_edo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_EDO")));
RDebugUtils.currentLine=5439519;
 //BA.debugLineNum = 5439519;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_NOEXT\")";
__ref._l_entre1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOEXT")));
RDebugUtils.currentLine=5439520;
 //BA.debugLineNum = 5439520;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_NOINT\")";
__ref._l_entre2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOINT")));
RDebugUtils.currentLine=5439521;
 //BA.debugLineNum = 5439521;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
__ref._l_atiende /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENDE1")));
RDebugUtils.currentLine=5439522;
 //BA.debugLineNum = 5439522;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
__ref._l_atiende2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")));
RDebugUtils.currentLine=5439523;
 //BA.debugLineNum = 5439523;BA.debugLine="Label20.Text = c.GetString(\"CAT_CL_CP\")";
__ref._label20 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CP")));
RDebugUtils.currentLine=5439524;
 //BA.debugLineNum = 5439524;BA.debugLine="l_calle1.Text = c.GetString(\"CAT_CL_CALLE1\")";
__ref._l_calle1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE1")));
RDebugUtils.currentLine=5439525;
 //BA.debugLineNum = 5439525;BA.debugLine="TELEFONO  = c.GetString(\"CAT_CL_TELEFONO\")";
__ref._telefono /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_TELEFONO");
RDebugUtils.currentLine=5439526;
 //BA.debugLineNum = 5439526;BA.debugLine="l_total.Text = s.GetString(\"TOTAL_CLIE\")";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")));
RDebugUtils.currentLine=5439527;
 //BA.debugLineNum = 5439527;BA.debugLine="total_cliente = s.GetString(\"TOTAL_CLIE\")";
__ref._total_cliente /*String*/  = __ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE");
RDebugUtils.currentLine=5439528;
 //BA.debugLineNum = 5439528;BA.debugLine="Private factura As String = 0";
_factura = BA.NumberToString(0);
RDebugUtils.currentLine=5439529;
 //BA.debugLineNum = 5439529;BA.debugLine="If s.GetString(\"PC_FACTURA\") <> Null And IsNumbe";
if (__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_FACTURA")!= null && __c.IsNumber(__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_FACTURA"))) { 
_factura = __ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_FACTURA");};
RDebugUtils.currentLine=5439530;
 //BA.debugLineNum = 5439530;BA.debugLine="If factura = \"1\" Then cb_factura.Checked = True";
if ((_factura).equals("1")) { 
__ref._cb_factura /*anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper*/ .setChecked(__c.True);};
RDebugUtils.currentLine=5439531;
 //BA.debugLineNum = 5439531;BA.debugLine="m_lat = \"0\"";
__ref._m_lat /*String*/  = "0";
RDebugUtils.currentLine=5439532;
 //BA.debugLineNum = 5439532;BA.debugLine="If c.GetString(\"CAT_CL_LAT\") <> \"\" Then m_lat =c";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_LAT")).equals("") == false) { 
__ref._m_lat /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_LAT");};
RDebugUtils.currentLine=5439533;
 //BA.debugLineNum = 5439533;BA.debugLine="If m_lat.Length < 5 Then m_lat = \"0\"";
if (__ref._m_lat /*String*/ .length()<5) { 
__ref._m_lat /*String*/  = "0";};
RDebugUtils.currentLine=5439534;
 //BA.debugLineNum = 5439534;BA.debugLine="m_lon = \"0\"";
__ref._m_lon /*String*/  = "0";
RDebugUtils.currentLine=5439535;
 //BA.debugLineNum = 5439535;BA.debugLine="If c.GetString(\"CAT_CL_LONG\") <> \"\" Then m_lon =";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_LONG")).equals("") == false) { 
__ref._m_lon /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_LONG");};
RDebugUtils.currentLine=5439536;
 //BA.debugLineNum = 5439536;BA.debugLine="If m_lon.Length < 5 Then m_lon = \"0\"";
if (__ref._m_lon /*String*/ .length()<5) { 
__ref._m_lon /*String*/  = "0";};
RDebugUtils.currentLine=5439537;
 //BA.debugLineNum = 5439537;BA.debugLine="LA_RUTA = c.GetString(\"CAT_CL_RUTA\")";
__ref._la_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=5439539;
 //BA.debugLineNum = 5439539;BA.debugLine="If c.GetString(\"CAT_CL_NUM_SERIEFISICO\") = \"0\"";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NUM_SERIEFISICO")).equals("0")) { 
RDebugUtils.currentLine=5439540;
 //BA.debugLineNum = 5439540;BA.debugLine="L_QR.TEXT = \"SIN CODIGO\"";
__ref._l_qr /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("SIN CODIGO"));
RDebugUtils.currentLine=5439541;
 //BA.debugLineNum = 5439541;BA.debugLine="L_QR.TextColor = Colors.Red";
__ref._l_qr /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Red);
RDebugUtils.currentLine=5439542;
 //BA.debugLineNum = 5439542;BA.debugLine="gest.VISIBLE = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5439543;
 //BA.debugLineNum = 5439543;BA.debugLine="BT_QR.Visible = True";
__ref._bt_qr /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
 }else {
RDebugUtils.currentLine=5439545;
 //BA.debugLineNum = 5439545;BA.debugLine="L_QR.TEXT = c.GetString(\"CAT_CL_NUM_SERIEFISICO";
__ref._l_qr /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NUM_SERIEFISICO")));
RDebugUtils.currentLine=5439546;
 //BA.debugLineNum = 5439546;BA.debugLine="L_QR.TextColor = Colors.Blue";
__ref._l_qr /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=5439547;
 //BA.debugLineNum = 5439547;BA.debugLine="BT_QR.Visible = False";
__ref._bt_qr /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
 };
RDebugUtils.currentLine=5439550;
 //BA.debugLineNum = 5439550;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5439551;
 //BA.debugLineNum = 5439551;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5439552;
 //BA.debugLineNum = 5439552;BA.debugLine="S2=B4XPages.MainPage.skmt.ExecQuery(\"select count";
__ref._s2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) AS CUANTOS from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=5439553;
 //BA.debugLineNum = 5439553;BA.debugLine="S2.Position =0";
__ref._s2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439554;
 //BA.debugLineNum = 5439554;BA.debugLine="CUANTOS = S2.GetString(\"CUANTOS\")";
__ref._cuantos /*String*/  = __ref._s2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS");
RDebugUtils.currentLine=5439555;
 //BA.debugLineNum = 5439555;BA.debugLine="S2.Close";
__ref._s2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5439556;
 //BA.debugLineNum = 5439556;BA.debugLine="If CUANTOS > 0 Then";
if ((double)(Double.parseDouble(__ref._cuantos /*String*/ ))>0) { 
RDebugUtils.currentLine=5439557;
 //BA.debugLineNum = 5439557;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(HVD_COSTO_TOT) AS TOTAL from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=5439558;
 //BA.debugLineNum = 5439558;BA.debugLine="c2.Position =0";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439559;
 //BA.debugLineNum = 5439559;BA.debugLine="MONTO_COMPRA = c2.GetString(\"TOTAL\")";
__ref._monto_compra /*String*/  = __ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL");
RDebugUtils.currentLine=5439560;
 //BA.debugLineNum = 5439560;BA.debugLine="c2.Close";
__ref._c2 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=5439562;
 //BA.debugLineNum = 5439562;BA.debugLine="MONTO_COMPRA = \"0\"";
__ref._monto_compra /*String*/  = "0";
 };
RDebugUtils.currentLine=5439565;
 //BA.debugLineNum = 5439565;BA.debugLine="la_saldotot.Text = MONTO_COMPRA";
__ref._la_saldotot /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._monto_compra /*String*/ ));
RDebugUtils.currentLine=5439566;
 //BA.debugLineNum = 5439566;BA.debugLine="If MONTO_COMPRA <> \"0\" Then";
if ((__ref._monto_compra /*String*/ ).equals("0") == false) { 
RDebugUtils.currentLine=5439567;
 //BA.debugLineNum = 5439567;BA.debugLine="META2 = 1200 -  MONTO_COMPRA";
__ref._meta2 /*String*/  = BA.NumberToString(1200-(double)(Double.parseDouble(__ref._monto_compra /*String*/ )));
 }else {
RDebugUtils.currentLine=5439569;
 //BA.debugLineNum = 5439569;BA.debugLine="META2 = 1200";
__ref._meta2 /*String*/  = BA.NumberToString(1200);
 };
RDebugUtils.currentLine=5439571;
 //BA.debugLineNum = 5439571;BA.debugLine="If META2 < 1 Then";
if ((double)(Double.parseDouble(__ref._meta2 /*String*/ ))<1) { 
RDebugUtils.currentLine=5439572;
 //BA.debugLineNum = 5439572;BA.debugLine="META2 = \"CUBIERTO\"";
__ref._meta2 /*String*/  = "CUBIERTO";
 };
RDebugUtils.currentLine=5439574;
 //BA.debugLineNum = 5439574;BA.debugLine="la_saldooper.Text = META2";
__ref._la_saldooper /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._meta2 /*String*/ ));
RDebugUtils.currentLine=5439575;
 //BA.debugLineNum = 5439575;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select ID_ALM";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select ID_ALMACEN from CAT_ALMACEN")));
RDebugUtils.currentLine=5439576;
 //BA.debugLineNum = 5439576;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=5439577;
 //BA.debugLineNum = 5439577;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439578;
 //BA.debugLineNum = 5439578;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
__ref._almacen /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("ID_ALMACEN");
 };
RDebugUtils.currentLine=5439580;
 //BA.debugLineNum = 5439580;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5439581;
 //BA.debugLineNum = 5439581;BA.debugLine="If ALMACEN = \"1\" Then";
if ((__ref._almacen /*String*/ ).equals("1")) { 
RDebugUtils.currentLine=5439582;
 //BA.debugLineNum = 5439582;BA.debugLine="Tels.Visible = False";
__ref._tels /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5439583;
 //BA.debugLineNum = 5439583;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=5439586;
 //BA.debugLineNum = 5439586;BA.debugLine="If ALMACEN = \"4\"  Then";
if ((__ref._almacen /*String*/ ).equals("4")) { 
RDebugUtils.currentLine=5439588;
 //BA.debugLineNum = 5439588;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COU";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select cuenta from cuentaa) AND HVD_PRONOMBRE =?",new String[]{"KNORR RINDE MAS 70 GR"})));
RDebugUtils.currentLine=5439589;
 //BA.debugLineNum = 5439589;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439590;
 //BA.debugLineNum = 5439590;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=5439591;
 //BA.debugLineNum = 5439591;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM PEDIDO  WHERE PE_CLIENTE  IN (Select cuenta from cuentaa) AND PE_PRONOMBRE =?",new String[]{"KNORR RINDE MAS 70 GR"})));
RDebugUtils.currentLine=5439592;
 //BA.debugLineNum = 5439592;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5439598;
 //BA.debugLineNum = 5439598;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
 };
RDebugUtils.currentLine=5439602;
 //BA.debugLineNum = 5439602;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
 };
RDebugUtils.currentLine=5439606;
 //BA.debugLineNum = 5439606;BA.debugLine="If ALMACEN = \"16\" Or ALMACEN = \"13\" Then";
if ((__ref._almacen /*String*/ ).equals("16") || (__ref._almacen /*String*/ ).equals("13")) { 
RDebugUtils.currentLine=5439607;
 //BA.debugLineNum = 5439607;BA.debugLine="Tels.Visible = False";
__ref._tels /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5439608;
 //BA.debugLineNum = 5439608;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=5439610;
 //BA.debugLineNum = 5439610;BA.debugLine="CallSubDelayed(Tracker, \"Track\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"Track");
RDebugUtils.currentLine=5439612;
 //BA.debugLineNum = 5439612;BA.debugLine="If Not(Starter.GPS.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=5439613;
 //BA.debugLineNum = 5439613;BA.debugLine="ToastMessageShow(\"Debe Activar el GPS del Equipo";
__c.ToastMessageShow(BA.ObjectToCharSequence("Debe Activar el GPS del Equipo."),__c.True);
RDebugUtils.currentLine=5439614;
 //BA.debugLineNum = 5439614;BA.debugLine="StartActivity(Starter.GPS.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 }else {
RDebugUtils.currentLine=5439616;
 //BA.debugLineNum = 5439616;BA.debugLine="Starter.GPS.Start(0, 0)";
_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .Start(ba,(long) (0),(float) (0));
 };
RDebugUtils.currentLine=5439619;
 //BA.debugLineNum = 5439619;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLPSmall");
RDebugUtils.currentLine=5439620;
 //BA.debugLineNum = 5439620;BA.debugLine="If Tracker.FLP.IsInitialized And Tracker.FLP.GetL";
if (_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .IsInitialized() && _tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().IsInitialized()) { 
RDebugUtils.currentLine=5439621;
 //BA.debugLineNum = 5439621;BA.debugLine="B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude());
RDebugUtils.currentLine=5439622;
 //BA.debugLineNum = 5439622;BA.debugLine="B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLongitude());
RDebugUtils.currentLine=5439624;
 //BA.debugLineNum = 5439624;BA.debugLine="GPS_LocationChanged(Tracker.FLP.GetLastKnownLoca";
__ref._gps_locationchanged /*String*/ (null,_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation());
 };
RDebugUtils.currentLine=5439626;
 //BA.debugLineNum = 5439626;BA.debugLine="Tels.Visible = False";
__ref._tels /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5439627;
 //BA.debugLineNum = 5439627;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5439629;
 //BA.debugLineNum = 5439629;BA.debugLine="If la_cuenta.text.SubString2(0,1) = \"N\" Then gest";
if ((__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText().substring((int) (0),(int) (1))).equals("N")) { 
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);};
RDebugUtils.currentLine=5439631;
 //BA.debugLineNum = 5439631;BA.debugLine="b_inicioFinVenta.Text = \"INICIAR VENTA\"";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("INICIAR VENTA"));
RDebugUtils.currentLine=5439632;
 //BA.debugLineNum = 5439632;BA.debugLine="b_inicioFinVenta.BringToFront";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .BringToFront();
RDebugUtils.currentLine=5439634;
 //BA.debugLineNum = 5439634;BA.debugLine="If Not(Starter.enVenta) And la_cuenta.Text <> \"0\"";
if (__c.Not(_starter._enventa /*boolean*/ ) && (__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("0") == false) { 
RDebugUtils.currentLine=5439635;
 //BA.debugLineNum = 5439635;BA.debugLine="b_inicioFinVenta.Visible = True";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
 }else {
RDebugUtils.currentLine=5439639;
 //BA.debugLineNum = 5439639;BA.debugLine="b_inicioFinVenta.Visible = False";
__ref._b_iniciofinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=5439643;
 //BA.debugLineNum = 5439643;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(keymon.lat.medicomed.c_cliente __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
anywheresoftware.b4a.gps.LocationWrapper _l1 = null;
anywheresoftware.b4a.gps.LocationWrapper _l2 = null;
long _distance = 0L;
RDebugUtils.currentLine=5505024;
 //BA.debugLineNum = 5505024;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=5505026;
 //BA.debugLineNum = 5505026;BA.debugLine="If Tracker.FLP.GetLastKnownLocation.IsInitialized";
if (_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().IsInitialized() && _tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude()!=0) { 
RDebugUtils.currentLine=5505027;
 //BA.debugLineNum = 5505027;BA.debugLine="B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude());
RDebugUtils.currentLine=5505028;
 //BA.debugLineNum = 5505028;BA.debugLine="B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLongitude());
 };
RDebugUtils.currentLine=5505032;
 //BA.debugLineNum = 5505032;BA.debugLine="Dim l1, l2 As Location";
_l1 = new anywheresoftware.b4a.gps.LocationWrapper();
_l2 = new anywheresoftware.b4a.gps.LocationWrapper();
RDebugUtils.currentLine=5505033;
 //BA.debugLineNum = 5505033;BA.debugLine="l1.Initialize2(B4XPages.MainPage.lat_gps, B4XPage";
_l1.Initialize2(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ );
RDebugUtils.currentLine=5505035;
 //BA.debugLineNum = 5505035;BA.debugLine="l2.Initialize2(m_lat, m_lon)";
_l2.Initialize2(__ref._m_lat /*String*/ ,__ref._m_lon /*String*/ );
RDebugUtils.currentLine=5505037;
 //BA.debugLineNum = 5505037;BA.debugLine="BT_QR.Enabled = True";
__ref._bt_qr /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);
RDebugUtils.currentLine=5505038;
 //BA.debugLineNum = 5505038;BA.debugLine="LA_GPS.TextColor = Colors.Blue";
__ref._la_gps /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=5505039;
 //BA.debugLineNum = 5505039;BA.debugLine="LA_GPS.Text = \"CON UBICACION GPS\"";
__ref._la_gps /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("CON UBICACION GPS"));
RDebugUtils.currentLine=5505040;
 //BA.debugLineNum = 5505040;BA.debugLine="b_clinteSinVenta.Enabled = True";
__ref._b_clintesinventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);
RDebugUtils.currentLine=5505041;
 //BA.debugLineNum = 5505041;BA.debugLine="b_clienteVenta.Enabled = True";
__ref._b_clienteventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);
RDebugUtils.currentLine=5505044;
 //BA.debugLineNum = 5505044;BA.debugLine="Dim distance As Long";
_distance = 0L;
RDebugUtils.currentLine=5505045;
 //BA.debugLineNum = 5505045;BA.debugLine="distance =    l1.DistanceTo(l2)  'the result is i";
_distance = (long) (_l1.DistanceTo((android.location.Location)(_l2.getObject())));
RDebugUtils.currentLine=5505046;
 //BA.debugLineNum = 5505046;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5505048;
 //BA.debugLineNum = 5505048;BA.debugLine="LA_GEO.TextColor = Colors.Blue";
__ref._la_geo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=5505049;
 //BA.debugLineNum = 5505049;BA.debugLine="Tels.Visible = False";
__ref._tels /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5505050;
 //BA.debugLineNum = 5505050;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=5505054;
 //BA.debugLineNum = 5505054;BA.debugLine="LA_GEO.Text= $\"$1.2{distance/1000} kms\"$";
__ref._la_geo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence((""+__c.SmartStringFormatter("1.2",(Object)(_distance/(double)1000))+" kms")));
RDebugUtils.currentLine=5505055;
 //BA.debugLineNum = 5505055;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
RDebugUtils.currentLine=5505056;
 //BA.debugLineNum = 5505056;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  HIST_GPS (HGDATE, HGLAT, HGLON) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
RDebugUtils.currentLine=5505058;
 //BA.debugLineNum = 5505058;BA.debugLine="l_ubicacion2.TextSize = 13";
__ref._l_ubicacion2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextSize((float) (13));
RDebugUtils.currentLine=5505059;
 //BA.debugLineNum = 5505059;BA.debugLine="l_ubicacion2.Text = $\"Precisión GPS $1.0{Location";
__ref._l_ubicacion2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(("Precisión GPS "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
RDebugUtils.currentLine=5505060;
 //BA.debugLineNum = 5505060;BA.debugLine="If Location1.Accuracy > 200 Then";
if (_location1.getAccuracy()>200) { 
RDebugUtils.currentLine=5505061;
 //BA.debugLineNum = 5505061;BA.debugLine="l_ubicacion2.TextColor = Colors.Red";
__ref._l_ubicacion2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(__c.Colors.Red);
RDebugUtils.currentLine=5505062;
 //BA.debugLineNum = 5505062;BA.debugLine="l_ubicacion2.TextSize = 16";
__ref._l_ubicacion2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextSize((float) (16));
RDebugUtils.currentLine=5505063;
 //BA.debugLineNum = 5505063;BA.debugLine="l_ubicacion2.Text = $\"Mala señal $1.0{Location1.";
__ref._l_ubicacion2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(("Mala señal "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
 };
RDebugUtils.currentLine=5505066;
 //BA.debugLineNum = 5505066;BA.debugLine="CallSubDelayed(Tracker, \"CreateLocationRequest\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"CreateLocationRequest");
RDebugUtils.currentLine=5505067;
 //BA.debugLineNum = 5505067;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(keymon.lat.medicomed.c_cliente __ref) throws Exception{
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(keymon.lat.medicomed.c_cliente parent,keymon.lat.medicomed.c_cliente __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.c_cliente __ref;
keymon.lat.medicomed.c_cliente parent;
int _resultado1 = 0;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_cliente";

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
RDebugUtils.currentLine=5767172;
 //BA.debugLineNum = 5767172;BA.debugLine="If IsNumber(l_total.text) And l_total.text <> \"0\"";
if (true) break;

case 1:
//if
this.state = 10;
if (parent.__c.IsNumber(__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()) && (__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("0") == false && parent.__c.Not(parent._subs._pedidoguardado /*boolean*/ (ba))) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=5767173;
 //BA.debugLineNum = 5767173;BA.debugLine="LogColor(\"Hay Venta\", Colors.Red)";
parent.__c.LogImpl("35767173","Hay Venta",parent.__c.Colors.Red);
RDebugUtils.currentLine=5767174;
 //BA.debugLineNum = 5767174;BA.debugLine="Private resultado1 As Int = Msgbox2($\"Va salir s";
_resultado1 = parent.__c.Msgbox2(BA.ObjectToCharSequence(("Va salir sin haber guardado la venta, si continua, la venta se BORRARA."+parent.__c.SmartStringFormatter("",(Object)(parent.__c.CRLF))+""+parent.__c.SmartStringFormatter("",(Object)(parent.__c.CRLF))+"¿Esta seguro que desea continuar?")),BA.ObjectToCharSequence("SE VA A BORRAR LA VENTA"),"Borrar Venta","Guardar Venta","",(android.graphics.Bitmap)(parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png").getObject()),ba);
RDebugUtils.currentLine=5767175;
 //BA.debugLineNum = 5767175;BA.debugLine="If resultado1 = DialogResponse.POSITIVE Then";
if (true) break;

case 4:
//if
this.state = 9;
if (_resultado1==parent.__c.DialogResponse.POSITIVE) { 
this.state = 6;
}else 
{RDebugUtils.currentLine=5767181;
 //BA.debugLineNum = 5767181;BA.debugLine="else if resultado1=DialogResponse.CANCEL Then";
if (_resultado1==parent.__c.DialogResponse.CANCEL) { 
this.state = 8;
}}
if (true) break;

case 6:
//C
this.state = 9;
RDebugUtils.currentLine=5767176;
 //BA.debugLineNum = 5767176;BA.debugLine="Log(\"Borrra venta\")";
parent.__c.LogImpl("35767176","Borrra venta",0);
RDebugUtils.currentLine=5767177;
 //BA.debugLineNum = 5767177;BA.debugLine="Subs.borraPedidoClienteActual";
parent._subs._borrapedidoclienteactual /*String*/ (ba);
RDebugUtils.currentLine=5767178;
 //BA.debugLineNum = 5767178;BA.debugLine="ToastMessageShow(\"Venta Borrada\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Venta Borrada"),parent.__c.False);
RDebugUtils.currentLine=5767180;
 //BA.debugLineNum = 5767180;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
 if (true) break;

case 8:
//C
this.state = 9;
RDebugUtils.currentLine=5767182;
 //BA.debugLineNum = 5767182;BA.debugLine="Log(\"Pedido guardado\")";
parent.__c.LogImpl("35767182","Pedido guardado",0);
RDebugUtils.currentLine=5767183;
 //BA.debugLineNum = 5767183;BA.debugLine="Guardar_Click";
__ref._guardar_click /*String*/ (null);
RDebugUtils.currentLine=5767184;
 //BA.debugLineNum = 5767184;BA.debugLine="ToastMessageShow(\"Venta Guardada\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Venta Guardada"),parent.__c.False);
 if (true) break;

case 9:
//C
this.state = 10;
;
 if (true) break;

case 10:
//C
this.state = -1;
;
RDebugUtils.currentLine=5767187;
 //BA.debugLineNum = 5767187;BA.debugLine="ToastMessageShow(\"Por favor presione GUARDAR para";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Por favor presione GUARDAR para continuar"),parent.__c.True);
RDebugUtils.currentLine=5767191;
 //BA.debugLineNum = 5767191;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=5767192;
 //BA.debugLineNum = 5767192;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(keymon.lat.medicomed.c_cliente __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=5373952;
 //BA.debugLineNum = 5373952;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=5373953;
 //BA.debugLineNum = 5373953;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=5373956;
 //BA.debugLineNum = 5373956;BA.debugLine="Root.LoadLayout(\"cliente\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("cliente",ba);
RDebugUtils.currentLine=5373957;
 //BA.debugLineNum = 5373957;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=5373958;
 //BA.debugLineNum = 5373958;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=5373959;
 //BA.debugLineNum = 5373959;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__ref._ruta /*String*/ ,"kmt.db");
 };
RDebugUtils.currentLine=5373961;
 //BA.debugLineNum = 5373961;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(__ref._ruta /*String*/ ,"kmt.db",__c.True);
RDebugUtils.currentLine=5373962;
 //BA.debugLineNum = 5373962;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_CL";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA  from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=5373963;
 //BA.debugLineNum = 5373963;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"select sum(pe";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=5373964;
 //BA.debugLineNum = 5373964;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5373965;
 //BA.debugLineNum = 5373965;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=5373966;
 //BA.debugLineNum = 5373966;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5373967;
 //BA.debugLineNum = 5373967;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CODIGO")));
RDebugUtils.currentLine=5373968;
 //BA.debugLineNum = 5373968;BA.debugLine="cuenta = c.GetString(\"CAT_CL_CODIGO\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CODIGO");
RDebugUtils.currentLine=5373969;
 //BA.debugLineNum = 5373969;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
__ref._la_nombre /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOMBRE")));
RDebugUtils.currentLine=5373970;
 //BA.debugLineNum = 5373970;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.";
__ref._la_calle /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE")+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOEXT")));
RDebugUtils.currentLine=5373971;
 //BA.debugLineNum = 5373971;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
__ref._la_col /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_COLONIA")));
RDebugUtils.currentLine=5373972;
 //BA.debugLineNum = 5373972;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
__ref._la_edo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_EDO")));
RDebugUtils.currentLine=5373974;
 //BA.debugLineNum = 5373974;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_NOEXT\")";
__ref._l_entre1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOEXT")));
RDebugUtils.currentLine=5373975;
 //BA.debugLineNum = 5373975;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_NOINT\")";
__ref._l_entre2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOINT")));
RDebugUtils.currentLine=5373976;
 //BA.debugLineNum = 5373976;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
__ref._l_atiende /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENDE1")));
RDebugUtils.currentLine=5373977;
 //BA.debugLineNum = 5373977;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
__ref._l_atiende2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")));
RDebugUtils.currentLine=5373978;
 //BA.debugLineNum = 5373978;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\"";
__ref._la_saldotot /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_TELEFONO")));
RDebugUtils.currentLine=5373979;
 //BA.debugLineNum = 5373979;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
__ref._la_saldooper /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_EMAIL")));
RDebugUtils.currentLine=5373980;
 //BA.debugLineNum = 5373980;BA.debugLine="l_total.Text = s.GetString(\"TOTAL_CLIE\")";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")));
RDebugUtils.currentLine=5373981;
 //BA.debugLineNum = 5373981;BA.debugLine="total_cliente = s.GetString(\"TOTAL_CLIE\")";
__ref._total_cliente /*String*/  = __ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE");
RDebugUtils.currentLine=5373982;
 //BA.debugLineNum = 5373982;BA.debugLine="MONTO_COMPRA = c.GetString(\"CAT_CL_MTOCOMPRA\")";
__ref._monto_compra /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_MTOCOMPRA");
RDebugUtils.currentLine=5373983;
 //BA.debugLineNum = 5373983;BA.debugLine="Label20.Text = c.GetString(\"CAT_CL_CP\")";
__ref._label20 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CP")));
 };
RDebugUtils.currentLine=5373985;
 //BA.debugLineNum = 5373985;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5373986;
 //BA.debugLineNum = 5373986;BA.debugLine="s.Close";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5373987;
 //BA.debugLineNum = 5373987;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
__ref._btadmin /*anywheresoftware.b4a.objects.Serial.BluetoothAdmin*/ .Initialize(ba,"BlueTeeth");
RDebugUtils.currentLine=5373988;
 //BA.debugLineNum = 5373988;BA.debugLine="cmp20.Initialize(\"Printer\")";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Initialize("Printer");
RDebugUtils.currentLine=5373989;
 //BA.debugLineNum = 5373989;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._server /*String*/ );
RDebugUtils.currentLine=5373990;
 //BA.debugLineNum = 5373990;BA.debugLine="End Sub";
return "";
}
public String  _bt_qr_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "bt_qr_click", false))
	 {return ((String) Debug.delegate(ba, "bt_qr_click", null));}
RDebugUtils.currentLine=6291456;
 //BA.debugLineNum = 6291456;BA.debugLine="Sub BT_QR_Click";
RDebugUtils.currentLine=6291457;
 //BA.debugLineNum = 6291457;BA.debugLine="sc.isportrait = True";
__ref._sc /*ice.zxing.b4aZXingLib*/ .isportrait = __c.True;
RDebugUtils.currentLine=6291458;
 //BA.debugLineNum = 6291458;BA.debugLine="sc.timeoutDuration = 45";
__ref._sc /*ice.zxing.b4aZXingLib*/ .timeoutDuration = (int) (45);
RDebugUtils.currentLine=6291459;
 //BA.debugLineNum = 6291459;BA.debugLine="sc.theViewFinderXfactor = 0.7";
__ref._sc /*ice.zxing.b4aZXingLib*/ .theViewFinderXfactor = 0.7;
RDebugUtils.currentLine=6291460;
 //BA.debugLineNum = 6291460;BA.debugLine="sc.theViewFinderYfactor = 0.5";
__ref._sc /*ice.zxing.b4aZXingLib*/ .theViewFinderYfactor = 0.5;
RDebugUtils.currentLine=6291461;
 //BA.debugLineNum = 6291461;BA.debugLine="sc.theResultColor = Colors.Green";
__ref._sc /*ice.zxing.b4aZXingLib*/ .theResultColor = __c.Colors.Green;
RDebugUtils.currentLine=6291462;
 //BA.debugLineNum = 6291462;BA.debugLine="sc.mustVibrate = True";
__ref._sc /*ice.zxing.b4aZXingLib*/ .mustVibrate = __c.True;
RDebugUtils.currentLine=6291463;
 //BA.debugLineNum = 6291463;BA.debugLine="sc.BeginScan(\"sc\")";
__ref._sc /*ice.zxing.b4aZXingLib*/ .BeginScan(ba,"sc");
RDebugUtils.currentLine=6291464;
 //BA.debugLineNum = 6291464;BA.debugLine="End Sub";
return "";
}
public String  _calc_ean_checksum(keymon.lat.medicomed.c_cliente __ref,String _number) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "calc_ean_checksum", false))
	 {return ((String) Debug.delegate(ba, "calc_ean_checksum", new Object[] {_number}));}
int _i = 0;
char _co = '\0';
int _soma = 0;
int _n = 0;
float _digit = 0f;
RDebugUtils.currentLine=6553600;
 //BA.debugLineNum = 6553600;BA.debugLine="Sub calc_ean_checksum(number As String) As String";
RDebugUtils.currentLine=6553601;
 //BA.debugLineNum = 6553601;BA.debugLine="Dim i As Int";
_i = 0;
RDebugUtils.currentLine=6553602;
 //BA.debugLineNum = 6553602;BA.debugLine="Dim cO As Char";
_co = '\0';
RDebugUtils.currentLine=6553603;
 //BA.debugLineNum = 6553603;BA.debugLine="Dim soma As Int";
_soma = 0;
RDebugUtils.currentLine=6553604;
 //BA.debugLineNum = 6553604;BA.debugLine="Dim n As Int";
_n = 0;
RDebugUtils.currentLine=6553605;
 //BA.debugLineNum = 6553605;BA.debugLine="Dim digit As Float";
_digit = 0f;
RDebugUtils.currentLine=6553606;
 //BA.debugLineNum = 6553606;BA.debugLine="soma = 0";
_soma = (int) (0);
RDebugUtils.currentLine=6553607;
 //BA.debugLineNum = 6553607;BA.debugLine="For i=0 To number.Length - 1";
{
final int step7 = 1;
final int limit7 = (int) (_number.length()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
RDebugUtils.currentLine=6553608;
 //BA.debugLineNum = 6553608;BA.debugLine="digit = number.SubString2(i,i+1)";
_digit = (float)(Double.parseDouble(_number.substring(_i,(int) (_i+1))));
RDebugUtils.currentLine=6553609;
 //BA.debugLineNum = 6553609;BA.debugLine="n= digit * ((i Mod 2) * 2 + 1)";
_n = (int) (_digit*((_i%2)*2+1));
RDebugUtils.currentLine=6553610;
 //BA.debugLineNum = 6553610;BA.debugLine="soma=soma+n";
_soma = (int) (_soma+_n);
 }
};
RDebugUtils.currentLine=6553612;
 //BA.debugLineNum = 6553612;BA.debugLine="Return number & ( ( 10 - ( soma Mod 10 )) Mod 10";
if (true) return _number+BA.NumberToString(((10-(_soma%10))%10));
RDebugUtils.currentLine=6553613;
 //BA.debugLineNum = 6553613;BA.debugLine="End Sub";
return "";
}
public String  _cb_factura_checkedchange(keymon.lat.medicomed.c_cliente __ref,boolean _checked) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "cb_factura_checkedchange", false))
	 {return ((String) Debug.delegate(ba, "cb_factura_checkedchange", new Object[] {_checked}));}
RDebugUtils.currentLine=7405568;
 //BA.debugLineNum = 7405568;BA.debugLine="Private Sub cb_factura_CheckedChange(Checked As Bo";
RDebugUtils.currentLine=7405570;
 //BA.debugLineNum = 7405570;BA.debugLine="If Checked Then p_cbFactura.Color = Colors.Green";
if (_checked) { 
__ref._p_cbfactura /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(__c.Colors.Green);}
else {
__ref._p_cbfactura /*anywheresoftware.b4a.objects.PanelWrapper*/ .setColor(__c.Colors.Red);};
RDebugUtils.currentLine=7405571;
 //BA.debugLineNum = 7405571;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
RDebugUtils.currentLine=5242880;
 //BA.debugLineNum = 5242880;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=5242881;
 //BA.debugLineNum = 5242881;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=5242882;
 //BA.debugLineNum = 5242882;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=5242883;
 //BA.debugLineNum = 5242883;BA.debugLine="Private p_cliente As Panel";
_p_cliente = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=5242884;
 //BA.debugLineNum = 5242884;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new keymon.lat.medicomed.dbrequestmanager();
RDebugUtils.currentLine=5242885;
 //BA.debugLineNum = 5242885;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=5242886;
 //BA.debugLineNum = 5242886;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
RDebugUtils.currentLine=5242888;
 //BA.debugLineNum = 5242888;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=5242889;
 //BA.debugLineNum = 5242889;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=5242890;
 //BA.debugLineNum = 5242890;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=5242891;
 //BA.debugLineNum = 5242891;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=5242892;
 //BA.debugLineNum = 5242892;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=5242893;
 //BA.debugLineNum = 5242893;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=5242894;
 //BA.debugLineNum = 5242894;BA.debugLine="Dim total_cliente As String";
_total_cliente = "";
RDebugUtils.currentLine=5242895;
 //BA.debugLineNum = 5242895;BA.debugLine="Dim m_lat, m_lon As String";
_m_lat = "";
_m_lon = "";
RDebugUtils.currentLine=5242896;
 //BA.debugLineNum = 5242896;BA.debugLine="Dim btAdmin As BluetoothAdmin";
_btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin();
RDebugUtils.currentLine=5242897;
 //BA.debugLineNum = 5242897;BA.debugLine="Dim cmp20 As Serial";
_cmp20 = new anywheresoftware.b4a.objects.Serial();
RDebugUtils.currentLine=5242898;
 //BA.debugLineNum = 5242898;BA.debugLine="Dim printer As TextWriter";
_printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
RDebugUtils.currentLine=5242899;
 //BA.debugLineNum = 5242899;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=5242900;
 //BA.debugLineNum = 5242900;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=5242901;
 //BA.debugLineNum = 5242901;BA.debugLine="Dim TAMANO As Int";
_tamano = 0;
RDebugUtils.currentLine=5242902;
 //BA.debugLineNum = 5242902;BA.debugLine="Dim ESPACIO As Int";
_espacio = 0;
RDebugUtils.currentLine=5242903;
 //BA.debugLineNum = 5242903;BA.debugLine="Dim BLANCO As String";
_blanco = "";
RDebugUtils.currentLine=5242904;
 //BA.debugLineNum = 5242904;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=5242905;
 //BA.debugLineNum = 5242905;BA.debugLine="Dim tipo_venta As String = \"PREVENTA\"";
_tipo_venta = "PREVENTA";
RDebugUtils.currentLine=5242906;
 //BA.debugLineNum = 5242906;BA.debugLine="Dim MAC_IMPRESORA As String";
_mac_impresora = "";
RDebugUtils.currentLine=5242908;
 //BA.debugLineNum = 5242908;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242909;
 //BA.debugLineNum = 5242909;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242910;
 //BA.debugLineNum = 5242910;BA.debugLine="Dim DD As Cursor";
_dd = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242911;
 //BA.debugLineNum = 5242911;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242912;
 //BA.debugLineNum = 5242912;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=5242913;
 //BA.debugLineNum = 5242913;BA.debugLine="Dim la_cuenta As Label";
_la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242914;
 //BA.debugLineNum = 5242914;BA.debugLine="Dim La_nombre As Label";
_la_nombre = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242915;
 //BA.debugLineNum = 5242915;BA.debugLine="Dim la_Calle As Label";
_la_calle = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242916;
 //BA.debugLineNum = 5242916;BA.debugLine="Dim la_numero As Label";
_la_numero = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242917;
 //BA.debugLineNum = 5242917;BA.debugLine="Dim la_nint As Label";
_la_nint = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242918;
 //BA.debugLineNum = 5242918;BA.debugLine="Dim la_edo As Label";
_la_edo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242919;
 //BA.debugLineNum = 5242919;BA.debugLine="Dim la_pob As Label";
_la_pob = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242920;
 //BA.debugLineNum = 5242920;BA.debugLine="Dim la_col As Label";
_la_col = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242921;
 //BA.debugLineNum = 5242921;BA.debugLine="Dim la_cp As Label";
_la_cp = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242922;
 //BA.debugLineNum = 5242922;BA.debugLine="Dim la_zona As Label";
_la_zona = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242923;
 //BA.debugLineNum = 5242923;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242924;
 //BA.debugLineNum = 5242924;BA.debugLine="Dim la_saldotot As Label";
_la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242925;
 //BA.debugLineNum = 5242925;BA.debugLine="Dim la_saldooper As Label";
_la_saldooper = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242927;
 //BA.debugLineNum = 5242927;BA.debugLine="Dim Tels As Button";
_tels = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242928;
 //BA.debugLineNum = 5242928;BA.debugLine="Dim Label10 As Label";
_label10 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242929;
 //BA.debugLineNum = 5242929;BA.debugLine="Dim Label11 As Label";
_label11 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242931;
 //BA.debugLineNum = 5242931;BA.debugLine="Dim Tar As Button";
_tar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242933;
 //BA.debugLineNum = 5242933;BA.debugLine="Dim la_comm As Label";
_la_comm = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242934;
 //BA.debugLineNum = 5242934;BA.debugLine="Dim la_actdte As Label";
_la_actdte = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242935;
 //BA.debugLineNum = 5242935;BA.debugLine="Dim la_usuario As Label";
_la_usuario = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242936;
 //BA.debugLineNum = 5242936;BA.debugLine="Dim la_resultado As Label";
_la_resultado = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242937;
 //BA.debugLineNum = 5242937;BA.debugLine="Dim l_entre1 As Label";
_l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242938;
 //BA.debugLineNum = 5242938;BA.debugLine="Dim l_entre2 As Label";
_l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242939;
 //BA.debugLineNum = 5242939;BA.debugLine="Dim l_atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242940;
 //BA.debugLineNum = 5242940;BA.debugLine="Dim l_atiende2 As Label";
_l_atiende2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242941;
 //BA.debugLineNum = 5242941;BA.debugLine="Dim DATOS As Button";
_datos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242942;
 //BA.debugLineNum = 5242942;BA.debugLine="Dim Guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242943;
 //BA.debugLineNum = 5242943;BA.debugLine="Dim NUEVO As Button";
_nuevo = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242946;
 //BA.debugLineNum = 5242946;BA.debugLine="Dim l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242947;
 //BA.debugLineNum = 5242947;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242948;
 //BA.debugLineNum = 5242948;BA.debugLine="Dim S2 As Cursor";
_s2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242949;
 //BA.debugLineNum = 5242949;BA.debugLine="Private s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=5242950;
 //BA.debugLineNum = 5242950;BA.debugLine="Dim res As String";
_res = "";
RDebugUtils.currentLine=5242951;
 //BA.debugLineNum = 5242951;BA.debugLine="Private HIST As Button";
_hist = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242952;
 //BA.debugLineNum = 5242952;BA.debugLine="Private MONTO_COMPRA As String";
_monto_compra = "";
RDebugUtils.currentLine=5242953;
 //BA.debugLineNum = 5242953;BA.debugLine="Private META As String";
_meta = "";
RDebugUtils.currentLine=5242954;
 //BA.debugLineNum = 5242954;BA.debugLine="Private META2 As String";
_meta2 = "";
RDebugUtils.currentLine=5242955;
 //BA.debugLineNum = 5242955;BA.debugLine="Private VERIFICA As String";
_verifica = "";
RDebugUtils.currentLine=5242956;
 //BA.debugLineNum = 5242956;BA.debugLine="Private L_QR As Label";
_l_qr = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242957;
 //BA.debugLineNum = 5242957;BA.debugLine="Private BT_QR As Button";
_bt_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242959;
 //BA.debugLineNum = 5242959;BA.debugLine="Dim CODIGO As String";
_codigo = "";
RDebugUtils.currentLine=5242961;
 //BA.debugLineNum = 5242961;BA.debugLine="Private b_mapa As Button";
_b_mapa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242962;
 //BA.debugLineNum = 5242962;BA.debugLine="Dim CUANTOS As String";
_cuantos = "";
RDebugUtils.currentLine=5242963;
 //BA.debugLineNum = 5242963;BA.debugLine="Private B_IMP As Button";
_b_imp = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242964;
 //BA.debugLineNum = 5242964;BA.debugLine="Dim Toggla As Toggle";
_toggla = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=5242965;
 //BA.debugLineNum = 5242965;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=5242966;
 //BA.debugLineNum = 5242966;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=5242967;
 //BA.debugLineNum = 5242967;BA.debugLine="Private I_COMPRA As EditText";
_i_compra = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=5242968;
 //BA.debugLineNum = 5242968;BA.debugLine="Private B_GUARDA_C As Button";
_b_guarda_c = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242969;
 //BA.debugLineNum = 5242969;BA.debugLine="Private b_venta As Button";
_b_venta = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242970;
 //BA.debugLineNum = 5242970;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
RDebugUtils.currentLine=5242971;
 //BA.debugLineNum = 5242971;BA.debugLine="Private LA_GPS As Label";
_la_gps = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242972;
 //BA.debugLineNum = 5242972;BA.debugLine="Private B_E_NEXT As Button";
_b_e_next = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242973;
 //BA.debugLineNum = 5242973;BA.debugLine="Private E_RES_E As EditText";
_e_res_e = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=5242974;
 //BA.debugLineNum = 5242974;BA.debugLine="Private t_tenc As Label";
_t_tenc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242975;
 //BA.debugLineNum = 5242975;BA.debugLine="Private Panel2 As Panel";
_panel2 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=5242976;
 //BA.debugLineNum = 5242976;BA.debugLine="Private CONTADOR_E As String";
_contador_e = "";
RDebugUtils.currentLine=5242977;
 //BA.debugLineNum = 5242977;BA.debugLine="Private HR_RES1 As String";
_hr_res1 = "";
RDebugUtils.currentLine=5242978;
 //BA.debugLineNum = 5242978;BA.debugLine="Private HR_RES2 As String";
_hr_res2 = "";
RDebugUtils.currentLine=5242979;
 //BA.debugLineNum = 5242979;BA.debugLine="Private HR_RES3 As String";
_hr_res3 = "";
RDebugUtils.currentLine=5242980;
 //BA.debugLineNum = 5242980;BA.debugLine="Private EXISTE As String";
_existe = "";
RDebugUtils.currentLine=5242981;
 //BA.debugLineNum = 5242981;BA.debugLine="Private TELEFONO As String";
_telefono = "";
RDebugUtils.currentLine=5242983;
 //BA.debugLineNum = 5242983;BA.debugLine="Private RB1 As RadioButton";
_rb1 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=5242984;
 //BA.debugLineNum = 5242984;BA.debugLine="Private RB2 As RadioButton";
_rb2 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=5242985;
 //BA.debugLineNum = 5242985;BA.debugLine="Private RB3 As RadioButton";
_rb3 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=5242986;
 //BA.debugLineNum = 5242986;BA.debugLine="Private RB4 As RadioButton";
_rb4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=5242987;
 //BA.debugLineNum = 5242987;BA.debugLine="Private RB5 As RadioButton";
_rb5 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=5242989;
 //BA.debugLineNum = 5242989;BA.debugLine="Private stay_hh As String";
_stay_hh = "";
RDebugUtils.currentLine=5242990;
 //BA.debugLineNum = 5242990;BA.debugLine="Private stay_mi As String";
_stay_mi = "";
RDebugUtils.currentLine=5242991;
 //BA.debugLineNum = 5242991;BA.debugLine="Private stay_ss As String";
_stay_ss = "";
RDebugUtils.currentLine=5242993;
 //BA.debugLineNum = 5242993;BA.debugLine="Private LA_GEO As Label";
_la_geo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5242994;
 //BA.debugLineNum = 5242994;BA.debugLine="Dim result As Int";
_result = 0;
RDebugUtils.currentLine=5242995;
 //BA.debugLineNum = 5242995;BA.debugLine="Private cercavalor As String";
_cercavalor = "";
RDebugUtils.currentLine=5242996;
 //BA.debugLineNum = 5242996;BA.debugLine="Private LA_RUTA As String";
_la_ruta = "";
RDebugUtils.currentLine=5242998;
 //BA.debugLineNum = 5242998;BA.debugLine="Private b_like As Button";
_b_like = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5242999;
 //BA.debugLineNum = 5242999;BA.debugLine="Private B_GPS As Button";
_b_gps = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243000;
 //BA.debugLineNum = 5243000;BA.debugLine="Dim sc As JhsIceZxing1";
_sc = new ice.zxing.b4aZXingLib();
RDebugUtils.currentLine=5243001;
 //BA.debugLineNum = 5243001;BA.debugLine="Dim CODIGO As String";
_codigo = "";
RDebugUtils.currentLine=5243002;
 //BA.debugLineNum = 5243002;BA.debugLine="Private cb_factura As CheckBox";
_cb_factura = new anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper();
RDebugUtils.currentLine=5243003;
 //BA.debugLineNum = 5243003;BA.debugLine="Private p_cbFactura As Panel";
_p_cbfactura = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=5243004;
 //BA.debugLineNum = 5243004;BA.debugLine="Dim venimosDeTicketsDia As Boolean = False";
_venimosdeticketsdia = __c.False;
RDebugUtils.currentLine=5243005;
 //BA.debugLineNum = 5243005;BA.debugLine="Private p_abono As Panel";
_p_abono = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=5243006;
 //BA.debugLineNum = 5243006;BA.debugLine="Private et_abono As EditText";
_et_abono = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=5243007;
 //BA.debugLineNum = 5243007;BA.debugLine="Private b_abono As Button";
_b_abono = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243008;
 //BA.debugLineNum = 5243008;BA.debugLine="Private b_cancelar As Button";
_b_cancelar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243009;
 //BA.debugLineNum = 5243009;BA.debugLine="Private b_abono1 As Button";
_b_abono1 = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243010;
 //BA.debugLineNum = 5243010;BA.debugLine="Private Label20 As Label";
_label20 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5243011;
 //BA.debugLineNum = 5243011;BA.debugLine="Private l_calle1 As Label";
_l_calle1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5243012;
 //BA.debugLineNum = 5243012;BA.debugLine="Private l_ubicacion2 As Label";
_l_ubicacion2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=5243014;
 //BA.debugLineNum = 5243014;BA.debugLine="Dim dentroDeGeocerca As Boolean = False";
_dentrodegeocerca = __c.False;
RDebugUtils.currentLine=5243015;
 //BA.debugLineNum = 5243015;BA.debugLine="Dim b_inicioFinVenta As Button";
_b_iniciofinventa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243016;
 //BA.debugLineNum = 5243016;BA.debugLine="Dim precision As Int = 0";
_precision = (int) (0);
RDebugUtils.currentLine=5243017;
 //BA.debugLineNum = 5243017;BA.debugLine="Dim motivoNoVenta, motivoNoVisita As String";
_motivonoventa = "";
_motivonovisita = "";
RDebugUtils.currentLine=5243018;
 //BA.debugLineNum = 5243018;BA.debugLine="Dim usuario As String = \"\"";
_usuario = "";
RDebugUtils.currentLine=5243019;
 //BA.debugLineNum = 5243019;BA.debugLine="Dim Id_Almacen As String";
_id_almacen = "";
RDebugUtils.currentLine=5243020;
 //BA.debugLineNum = 5243020;BA.debugLine="Dim ruta_tienda As String";
_ruta_tienda = "";
RDebugUtils.currentLine=5243022;
 //BA.debugLineNum = 5243022;BA.debugLine="Private b_clinteSinVenta As Button";
_b_clintesinventa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243023;
 //BA.debugLineNum = 5243023;BA.debugLine="Private b_clienteVenta As Button";
_b_clienteventa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243024;
 //BA.debugLineNum = 5243024;BA.debugLine="Private p_monto_venta As Panel";
_p_monto_venta = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=5243025;
 //BA.debugLineNum = 5243025;BA.debugLine="Private et_monto_venta As EditText";
_et_monto_venta = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=5243026;
 //BA.debugLineNum = 5243026;BA.debugLine="Private b_can_monto_venta As Button";
_b_can_monto_venta = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243027;
 //BA.debugLineNum = 5243027;BA.debugLine="Private b_gu_monto_venta As Button";
_b_gu_monto_venta = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=5243028;
 //BA.debugLineNum = 5243028;BA.debugLine="End Sub";
return "";
}
public String  _datos_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "datos_click", false))
	 {return ((String) Debug.delegate(ba, "datos_click", null));}
RDebugUtils.currentLine=5963776;
 //BA.debugLineNum = 5963776;BA.debugLine="Sub DATOS_Click";
RDebugUtils.currentLine=5963777;
 //BA.debugLineNum = 5963777;BA.debugLine="B4XPages.ShowPage(\"telefonos\")";
_b4xpages._showpage /*String*/ (ba,"telefonos");
RDebugUtils.currentLine=5963778;
 //BA.debugLineNum = 5963778;BA.debugLine="End Sub";
return "";
}
public String  _gest_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "gest_click", false))
	 {return ((String) Debug.delegate(ba, "gest_click", null));}
RDebugUtils.currentLine=5636096;
 //BA.debugLineNum = 5636096;BA.debugLine="Sub gest_Click";
RDebugUtils.currentLine=5636097;
 //BA.debugLineNum = 5636097;BA.debugLine="B4XPages.MainPage.tipo_venta = \"PREVENTA\"";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._tipo_venta /*String*/  = "PREVENTA";
RDebugUtils.currentLine=5636102;
 //BA.debugLineNum = 5636102;BA.debugLine="B4XPages.ShowPage(\"productos\")";
_b4xpages._showpage /*String*/ (ba,"productos");
RDebugUtils.currentLine=5636103;
 //BA.debugLineNum = 5636103;BA.debugLine="End Sub";
return "";
}
public String  _hist_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "hist_click", false))
	 {return ((String) Debug.delegate(ba, "hist_click", null));}
RDebugUtils.currentLine=6225920;
 //BA.debugLineNum = 6225920;BA.debugLine="Sub HIST_Click";
RDebugUtils.currentLine=6225921;
 //BA.debugLineNum = 6225921;BA.debugLine="B4XPages.ShowPage(\"Historico\")";
_b4xpages._showpage /*String*/ (ba,"Historico");
RDebugUtils.currentLine=6225922;
 //BA.debugLineNum = 6225922;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(keymon.lat.medicomed.c_cliente __ref,keymon.lat.medicomed.httpjob _job) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "jobdone", false))
	 {return ((String) Debug.delegate(ba, "jobdone", new Object[] {_job}));}
keymon.lat.medicomed.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
RDebugUtils.currentLine=7536640;
 //BA.debugLineNum = 7536640;BA.debugLine="Sub JobDone(Job As HttpJob)";
RDebugUtils.currentLine=7536641;
 //BA.debugLineNum = 7536641;BA.debugLine="Log(Job.Success)";
__c.LogImpl("37536641",BA.ObjectToString(_job._success /*boolean*/ ),0);
RDebugUtils.currentLine=7536642;
 //BA.debugLineNum = 7536642;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
RDebugUtils.currentLine=7536645;
 //BA.debugLineNum = 7536645;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("37536645","JobDone: '"+BA.ObjectToString(__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
RDebugUtils.currentLine=7536646;
 //BA.debugLineNum = 7536646;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=7536647;
 //BA.debugLineNum = 7536647;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=7536648;
 //BA.debugLineNum = 7536648;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_pedido";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_pedidosPendientes_head_")>-1) { 
RDebugUtils.currentLine=7536649;
 //BA.debugLineNum = 7536649;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
RDebugUtils.currentLine=7536650;
 //BA.debugLineNum = 7536650;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
RDebugUtils.currentLine=7536651;
 //BA.debugLineNum = 7536651;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("37536651",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
RDebugUtils.currentLine=7536652;
 //BA.debugLineNum = 7536652;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update P";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update PEDIDO_CLIENTE SET pc_envio_ok = ? WHERE PC_CLIENTE = ? AND pc_envio_ok <> 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente}));
RDebugUtils.currentLine=7536653;
 //BA.debugLineNum = 7536653;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group12 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen12 = group12.getSize()
;int index12 = 0;
;
for (; index12 < groupLen12;index12++){
_records = (Object[])(group12.Get(index12));
RDebugUtils.currentLine=7536654;
 //BA.debugLineNum = 7536654;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_k = BA.ObjectToString(group13.Get(index13));
RDebugUtils.currentLine=7536655;
 //BA.debugLineNum = 7536655;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("37536655",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
RDebugUtils.currentLine=7536661;
 //BA.debugLineNum = 7536661;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=7536662;
 //BA.debugLineNum = 7536662;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=7536663;
 //BA.debugLineNum = 7536663;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_pedido";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_pedidosPendientes_prods_")>-1) { 
RDebugUtils.currentLine=7536664;
 //BA.debugLineNum = 7536664;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
RDebugUtils.currentLine=7536665;
 //BA.debugLineNum = 7536665;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+25));
RDebugUtils.currentLine=7536666;
 //BA.debugLineNum = 7536666;BA.debugLine="Log($\"Cliente2:${cliente}\"$)";
__c.LogImpl("37536666",("Cliente2:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
RDebugUtils.currentLine=7536667;
 //BA.debugLineNum = 7536667;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group25 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen25 = group25.getSize()
;int index25 = 0;
;
for (; index25 < groupLen25;index25++){
_records = (Object[])(group25.Get(index25));
RDebugUtils.currentLine=7536668;
 //BA.debugLineNum = 7536668;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group26 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen26 = group26.getSize()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_k = BA.ObjectToString(group26.Get(index26));
RDebugUtils.currentLine=7536669;
 //BA.debugLineNum = 7536669;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("37536669",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
RDebugUtils.currentLine=7536675;
 //BA.debugLineNum = 7536675;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=7536676;
 //BA.debugLineNum = 7536676;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=7536677;
 //BA.debugLineNum = 7536677;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_abonos";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_abonosPendientes_")>-1) { 
RDebugUtils.currentLine=7536678;
 //BA.debugLineNum = 7536678;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
RDebugUtils.currentLine=7536679;
 //BA.debugLineNum = 7536679;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+18));
RDebugUtils.currentLine=7536680;
 //BA.debugLineNum = 7536680;BA.debugLine="Log($\"Cliente2:${cliente}\"$)";
__c.LogImpl("37536680",("Cliente2:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
RDebugUtils.currentLine=7536681;
 //BA.debugLineNum = 7536681;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE A";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE ABONOS set a_enviado = 1  where a_cliente = '"+__c.SmartStringFormatter("",(Object)(_cliente))+"'"));
RDebugUtils.currentLine=7536682;
 //BA.debugLineNum = 7536682;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group39 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen39 = group39.getSize()
;int index39 = 0;
;
for (; index39 < groupLen39;index39++){
_records = (Object[])(group39.Get(index39));
RDebugUtils.currentLine=7536683;
 //BA.debugLineNum = 7536683;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group40 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen40 = group40.getSize()
;int index40 = 0;
;
for (; index40 < groupLen40;index40++){
_k = BA.ObjectToString(group40.Get(index40));
RDebugUtils.currentLine=7536684;
 //BA.debugLineNum = 7536684;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("37536684",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
RDebugUtils.currentLine=7536689;
 //BA.debugLineNum = 7536689;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=7536690;
 //BA.debugLineNum = 7536690;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=7536691;
 //BA.debugLineNum = 7536691;BA.debugLine="If resultado.Tag= \"mandaBitacora\" Then";
if ((_resultado.Tag /*Object*/ ).equals((Object)("mandaBitacora"))) { 
RDebugUtils.currentLine=7536692;
 //BA.debugLineNum = 7536692;BA.debugLine="Log(\"mandaBitacora\")";
__c.LogImpl("37536692","mandaBitacora",0);
 };
 };
RDebugUtils.currentLine=7536695;
 //BA.debugLineNum = 7536695;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=7536696;
 //BA.debugLineNum = 7536696;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=7536697;
 //BA.debugLineNum = 7536697;BA.debugLine="If resultado.Tag= \"ventaNoVenta\" Then";
if ((_resultado.Tag /*Object*/ ).equals((Object)("ventaNoVenta"))) { 
RDebugUtils.currentLine=7536698;
 //BA.debugLineNum = 7536698;BA.debugLine="Log(\"ventaNoVenta\")";
__c.LogImpl("37536698","ventaNoVenta",0);
 };
 };
RDebugUtils.currentLine=7536701;
 //BA.debugLineNum = 7536701;BA.debugLine="Job.Release";
_job._release /*String*/ (null);
 };
RDebugUtils.currentLine=7536704;
 //BA.debugLineNum = 7536704;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(keymon.lat.medicomed.c_cliente __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=5570560;
 //BA.debugLineNum = 5570560;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=5570562;
 //BA.debugLineNum = 5570562;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientes(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "mandapendientes", false))
	 {return ((String) Debug.delegate(ba, "mandapendientes", null));}
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _ab = null;
RDebugUtils.currentLine=7471104;
 //BA.debugLineNum = 7471104;BA.debugLine="Sub mandaPendientes";
RDebugUtils.currentLine=7471106;
 //BA.debugLineNum = 7471106;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT PC_CLI";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT, PC_COSTO_SIN, PC_RUTA, PC_ALMACEN, PC_FACTURA FROM PEDIDO_CLIENTE where pc_envio_ok <> 1")));
RDebugUtils.currentLine=7471108;
 //BA.debugLineNum = 7471108;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=7471109;
 //BA.debugLineNum = 7471109;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step3 = 1;
final int limit3 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit3 ;_i = _i + step3 ) {
RDebugUtils.currentLine=7471110;
 //BA.debugLineNum = 7471110;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=7471111;
 //BA.debugLineNum = 7471111;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=7471117;
 //BA.debugLineNum = 7471117;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=7471118;
 //BA.debugLineNum = 7471118;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=7471119;
 //BA.debugLineNum = 7471119;BA.debugLine="cmd.Name = \"insert_pedidos_MEDI\"";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "insert_pedidos_MEDI";
RDebugUtils.currentLine=7471120;
 //BA.debugLineNum = 7471120;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"P";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Parameters /*Object[]*/  = new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_FECHA")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_USER")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_NOART")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_MONTO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_LON")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_LAT")),(Object)(__ref._almacen /*String*/ ),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._principal /*keymon.lat.medicomed.c_principal*/ ._l_ruta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_COSTO_SIN")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_FACTURA"))};
RDebugUtils.currentLine=7471121;
 //BA.debugLineNum = 7471121;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_pedidosPe";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executecommand /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(Object)(("ins_pedidosPendientes_head_"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PC_CLIENTE")))+"")));
 }
};
 };
RDebugUtils.currentLine=7471126;
 //BA.debugLineNum = 7471126;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT PC_ENV";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PC_ENVIO_OK, PE_CEDIS, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO FROM  pedido_cliente left join PEDIDO where pc_cliente = pe_cliente and pc_envio_ok <> 1")));
RDebugUtils.currentLine=7471128;
 //BA.debugLineNum = 7471128;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=7471129;
 //BA.debugLineNum = 7471129;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step15 = 1;
final int limit15 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit15 ;_i = _i + step15 ) {
RDebugUtils.currentLine=7471130;
 //BA.debugLineNum = 7471130;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=7471131;
 //BA.debugLineNum = 7471131;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=7471138;
 //BA.debugLineNum = 7471138;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=7471139;
 //BA.debugLineNum = 7471139;BA.debugLine="cmd.Name = \"insert_pedido_MEDI\"";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "insert_pedido_MEDI";
RDebugUtils.currentLine=7471140;
 //BA.debugLineNum = 7471140;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"P";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Parameters /*Object[]*/  = new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CEDIS")),(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_COSTO_TOT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_COSTOU")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PRONOMBRE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CLIENTE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FECHA")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_USUARIO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_RUTA")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_COSTO_SIN")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_DESC")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO"))};
RDebugUtils.currentLine=7471141;
 //BA.debugLineNum = 7471141;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_pedidosPe";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executecommand /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(Object)(("ins_pedidosPendientes_prods_"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CLIENTE")))+"")));
 }
};
 };
RDebugUtils.currentLine=7471146;
 //BA.debugLineNum = 7471146;BA.debugLine="Dim ab As Cursor = B4XPages.MainPage.skmt.ExecQue";
_ab = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_ab = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT * from ABONOS where a_enviado is null"))));
RDebugUtils.currentLine=7471148;
 //BA.debugLineNum = 7471148;BA.debugLine="If ab.RowCount > 0 Then";
if (_ab.getRowCount()>0) { 
RDebugUtils.currentLine=7471149;
 //BA.debugLineNum = 7471149;BA.debugLine="For i=0 To ab.RowCount -1";
{
final int step26 = 1;
final int limit26 = (int) (_ab.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit26 ;_i = _i + step26 ) {
RDebugUtils.currentLine=7471150;
 //BA.debugLineNum = 7471150;BA.debugLine="ab.Position = i";
_ab.setPosition(_i);
RDebugUtils.currentLine=7471151;
 //BA.debugLineNum = 7471151;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=7471152;
 //BA.debugLineNum = 7471152;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=7471153;
 //BA.debugLineNum = 7471153;BA.debugLine="cmd.Name = \"insert_abono_MEDI\"";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "insert_abono_MEDI";
RDebugUtils.currentLine=7471154;
 //BA.debugLineNum = 7471154;BA.debugLine="cmd.Parameters = Array As Object( ab.GetString(";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Parameters /*Object[]*/  = new Object[]{(Object)(_ab.GetString("a_usuario")),(Object)(_ab.GetString("a_ruta")),(Object)(_ab.GetString("a_cliente")),(Object)(_ab.GetString("a_abono")),(Object)(_ab.GetString("a_fecha"))};
RDebugUtils.currentLine=7471155;
 //BA.debugLineNum = 7471155;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_abonosPen";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executecommand /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(Object)(("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+"")));
RDebugUtils.currentLine=7471156;
 //BA.debugLineNum = 7471156;BA.debugLine="Log($\"ins_abonosPendientes_${ab.GetString(\"a_cl";
__c.LogImpl("37471156",("ins_abonosPendientes_"+__c.SmartStringFormatter("",(Object)(_ab.GetString("a_cliente")))+""),0);
 }
};
 };
RDebugUtils.currentLine=7471159;
 //BA.debugLineNum = 7471159;BA.debugLine="ab.Close";
_ab.Close();
RDebugUtils.currentLine=7471176;
 //BA.debugLineNum = 7471176;BA.debugLine="End Sub";
return "";
}
public String  _mods(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "mods", false))
	 {return ((String) Debug.delegate(ba, "mods", null));}
RDebugUtils.currentLine=5177344;
 //BA.debugLineNum = 5177344;BA.debugLine="Sub MODS 'ignore";
RDebugUtils.currentLine=5177346;
 //BA.debugLineNum = 5177346;BA.debugLine="End Sub";
return "";
}
public String  _nuevo_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "nuevo_click", false))
	 {return ((String) Debug.delegate(ba, "nuevo_click", null));}
RDebugUtils.currentLine=6160384;
 //BA.debugLineNum = 6160384;BA.debugLine="Sub NUEVO_Click";
RDebugUtils.currentLine=6160385;
 //BA.debugLineNum = 6160385;BA.debugLine="B4XPages.ShowPage(\"NuevoCliente\")";
_b4xpages._showpage /*String*/ (ba,"NuevoCliente");
RDebugUtils.currentLine=6160386;
 //BA.debugLineNum = 6160386;BA.debugLine="End Sub";
return "";
}
public String  _p_abono_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "p_abono_click", false))
	 {return ((String) Debug.delegate(ba, "p_abono_click", null));}
RDebugUtils.currentLine=7602176;
 //BA.debugLineNum = 7602176;BA.debugLine="Private Sub p_abono_Click";
RDebugUtils.currentLine=7602178;
 //BA.debugLineNum = 7602178;BA.debugLine="End Sub";
return "";
}
public String  _p_cliente_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "p_cliente_click", false))
	 {return ((String) Debug.delegate(ba, "p_cliente_click", null));}
RDebugUtils.currentLine=7340032;
 //BA.debugLineNum = 7340032;BA.debugLine="Private Sub p_cliente_Click";
RDebugUtils.currentLine=7340034;
 //BA.debugLineNum = 7340034;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(keymon.lat.medicomed.c_cliente __ref,boolean _success) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "printer_connected", false))
	 {return ((String) Debug.delegate(ba, "printer_connected", new Object[] {_success}));}
RDebugUtils.currentLine=6750208;
 //BA.debugLineNum = 6750208;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
RDebugUtils.currentLine=6750209;
 //BA.debugLineNum = 6750209;BA.debugLine="If Success Then";
if (_success) { 
RDebugUtils.currentLine=6750210;
 //BA.debugLineNum = 6750210;BA.debugLine="B_IMP.Enabled = True";
__ref._b_imp /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);
 }else {
RDebugUtils.currentLine=6750212;
 //BA.debugLineNum = 6750212;BA.debugLine="B_IMP.Enabled = False";
__ref._b_imp /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);
RDebugUtils.currentLine=6750213;
 //BA.debugLineNum = 6750213;BA.debugLine="If Msgbox2(\"\", \"Printer Error\",\"Reprint\",\"Cancel";
if (__c.Msgbox2(BA.ObjectToCharSequence(""),BA.ObjectToCharSequence("Printer Error"),"Reprint","Cancel","",(android.graphics.Bitmap)(__c.Null),ba)==__c.DialogResponse.POSITIVE) { 
RDebugUtils.currentLine=6750214;
 //BA.debugLineNum = 6750214;BA.debugLine="StartPrinter";
__ref._startprinter /*String*/ (null);
 };
 };
RDebugUtils.currentLine=6750217;
 //BA.debugLineNum = 6750217;BA.debugLine="End Sub";
return "";
}
public String  _startprinter(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "startprinter", false))
	 {return ((String) Debug.delegate(ba, "startprinter", null));}
int _resimp = 0;
int _i = 0;
RDebugUtils.currentLine=6815744;
 //BA.debugLineNum = 6815744;BA.debugLine="Sub StartPrinter";
RDebugUtils.currentLine=6815745;
 //BA.debugLineNum = 6815745;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=6815746;
 //BA.debugLineNum = 6815746;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=6815747;
 //BA.debugLineNum = 6815747;BA.debugLine="Dim resimp As Int";
_resimp = 0;
RDebugUtils.currentLine=6815748;
 //BA.debugLineNum = 6815748;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
RDebugUtils.currentLine=6815749;
 //BA.debugLineNum = 6815749;BA.debugLine="PairedDevices.Initialize";
__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=6815750;
 //BA.debugLineNum = 6815750;BA.debugLine="Try";
try {RDebugUtils.currentLine=6815751;
 //BA.debugLineNum = 6815751;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/  = __ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .GetPairedDevices();
 } 
       catch (Exception e9) {
			ba.setLastException(e9);RDebugUtils.currentLine=6815753;
 //BA.debugLineNum = 6815753;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
RDebugUtils.currentLine=6815754;
 //BA.debugLineNum = 6815754;BA.debugLine="printer.Close";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .Close();
RDebugUtils.currentLine=6815755;
 //BA.debugLineNum = 6815755;BA.debugLine="cmp20.Disconnect";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Disconnect();
 };
RDebugUtils.currentLine=6815757;
 //BA.debugLineNum = 6815757;BA.debugLine="If PairedDevices.Size = 0 Then";
if (__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .getSize()==0) { 
RDebugUtils.currentLine=6815758;
 //BA.debugLineNum = 6815758;BA.debugLine="Msgbox(\"Error Connecting to Printer - Printer No";
__c.Msgbox(BA.ObjectToCharSequence("Error Connecting to Printer - Printer Not Found"),BA.ObjectToCharSequence(""),ba);
RDebugUtils.currentLine=6815759;
 //BA.debugLineNum = 6815759;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=6815761;
 //BA.debugLineNum = 6815761;BA.debugLine="If PairedDevices.Size = 1 Then";
if (__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .getSize()==1) { 
RDebugUtils.currentLine=6815762;
 //BA.debugLineNum = 6815762;BA.debugLine="Try";
try {RDebugUtils.currentLine=6815763;
 //BA.debugLineNum = 6815763;BA.debugLine="cmp20.ConnectInsecure(btAdmin,PairedDevices.Get";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .ConnectInsecure(ba,__ref._btadmin /*anywheresoftware.b4a.objects.Serial.BluetoothAdmin*/ ,BA.ObjectToString(__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .Get(__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .GetKeyAt((int) (0)))),(int) (1));
 } 
       catch (Exception e21) {
			ba.setLastException(e21);RDebugUtils.currentLine=6815765;
 //BA.debugLineNum = 6815765;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'Ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
RDebugUtils.currentLine=6815766;
 //BA.debugLineNum = 6815766;BA.debugLine="printer.Close";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .Close();
RDebugUtils.currentLine=6815767;
 //BA.debugLineNum = 6815767;BA.debugLine="cmp20.Disconnect";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Disconnect();
 };
 }else {
RDebugUtils.currentLine=6815770;
 //BA.debugLineNum = 6815770;BA.debugLine="L.Initialize";
__ref._l /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=6815771;
 //BA.debugLineNum = 6815771;BA.debugLine="For i = 0 To PairedDevices.Size - 1";
{
final int step27 = 1;
final int limit27 = (int) (__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .getSize()-1);
_i = (int) (0) ;
for (;_i <= limit27 ;_i = _i + step27 ) {
RDebugUtils.currentLine=6815772;
 //BA.debugLineNum = 6815772;BA.debugLine="L.Add(PairedDevices.GetKeyAt(i))";
__ref._l /*anywheresoftware.b4a.objects.collections.List*/ .Add(__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .GetKeyAt(_i));
 }
};
RDebugUtils.currentLine=6815774;
 //BA.debugLineNum = 6815774;BA.debugLine="resimp = InputList(L, \"Choose device\", -1) 'Igno";
_resimp = __c.InputList(__ref._l /*anywheresoftware.b4a.objects.collections.List*/ ,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
RDebugUtils.currentLine=6815775;
 //BA.debugLineNum = 6815775;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
RDebugUtils.currentLine=6815776;
 //BA.debugLineNum = 6815776;BA.debugLine="cmp20.Connect(PairedDevices.Get(L.Get(resimp)))";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Connect(ba,BA.ObjectToString(__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .Get(__ref._l /*anywheresoftware.b4a.objects.collections.List*/ .Get(_resimp))));
 };
 };
RDebugUtils.currentLine=6815779;
 //BA.debugLineNum = 6815779;BA.debugLine="End Sub";
return "";
}
public String  _rb1_checkedchange(keymon.lat.medicomed.c_cliente __ref,boolean _checked) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "rb1_checkedchange", false))
	 {return ((String) Debug.delegate(ba, "rb1_checkedchange", new Object[] {_checked}));}
RDebugUtils.currentLine=7077888;
 //BA.debugLineNum = 7077888;BA.debugLine="Sub RB1_CheckedChange(Checked As Boolean)";
RDebugUtils.currentLine=7077889;
 //BA.debugLineNum = 7077889;BA.debugLine="If RB1.Checked = True Then";
if (__ref._rb1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==__c.True) { 
RDebugUtils.currentLine=7077890;
 //BA.debugLineNum = 7077890;BA.debugLine="E_RES_E.Text = \"CENTRAL DE ABASTOS\"";
__ref._e_res_e /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("CENTRAL DE ABASTOS"));
 };
RDebugUtils.currentLine=7077892;
 //BA.debugLineNum = 7077892;BA.debugLine="End Sub";
return "";
}
public String  _rb2_checkedchange(keymon.lat.medicomed.c_cliente __ref,boolean _checked) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "rb2_checkedchange", false))
	 {return ((String) Debug.delegate(ba, "rb2_checkedchange", new Object[] {_checked}));}
RDebugUtils.currentLine=7143424;
 //BA.debugLineNum = 7143424;BA.debugLine="Sub RB2_CheckedChange(Checked As Boolean)";
RDebugUtils.currentLine=7143425;
 //BA.debugLineNum = 7143425;BA.debugLine="If RB2.Checked = True Then";
if (__ref._rb2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==__c.True) { 
RDebugUtils.currentLine=7143426;
 //BA.debugLineNum = 7143426;BA.debugLine="E_RES_E.Text = \"AUTOSERVICIO\"";
__ref._e_res_e /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("AUTOSERVICIO"));
 };
RDebugUtils.currentLine=7143428;
 //BA.debugLineNum = 7143428;BA.debugLine="End Sub";
return "";
}
public String  _rb3_checkedchange(keymon.lat.medicomed.c_cliente __ref,boolean _checked) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "rb3_checkedchange", false))
	 {return ((String) Debug.delegate(ba, "rb3_checkedchange", new Object[] {_checked}));}
RDebugUtils.currentLine=7208960;
 //BA.debugLineNum = 7208960;BA.debugLine="Sub RB3_CheckedChange(Checked As Boolean)";
RDebugUtils.currentLine=7208961;
 //BA.debugLineNum = 7208961;BA.debugLine="If RB3.Checked = True Then";
if (__ref._rb3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==__c.True) { 
RDebugUtils.currentLine=7208962;
 //BA.debugLineNum = 7208962;BA.debugLine="E_RES_E.Text = \"CLUB DE PRECIO\"";
__ref._e_res_e /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("CLUB DE PRECIO"));
 };
RDebugUtils.currentLine=7208964;
 //BA.debugLineNum = 7208964;BA.debugLine="End Sub";
return "";
}
public String  _rb4_checkedchange(keymon.lat.medicomed.c_cliente __ref,boolean _checked) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "rb4_checkedchange", false))
	 {return ((String) Debug.delegate(ba, "rb4_checkedchange", new Object[] {_checked}));}
RDebugUtils.currentLine=7274496;
 //BA.debugLineNum = 7274496;BA.debugLine="Sub RB4_CheckedChange(Checked As Boolean)";
RDebugUtils.currentLine=7274497;
 //BA.debugLineNum = 7274497;BA.debugLine="If RB4.Checked = True Then";
if (__ref._rb4 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==__c.True) { 
RDebugUtils.currentLine=7274498;
 //BA.debugLineNum = 7274498;BA.debugLine="E_RES_E.Text = \"DIRECTO PEDEGREE\"";
__ref._e_res_e /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence("DIRECTO PEDEGREE"));
 };
RDebugUtils.currentLine=7274500;
 //BA.debugLineNum = 7274500;BA.debugLine="End Sub";
return "";
}
public void  _sc_result(keymon.lat.medicomed.c_cliente __ref,String _atype,String _values,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) throws Exception{
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "sc_result", false))
	 {Debug.delegate(ba, "sc_result", new Object[] {_atype,_values,_image}); return;}
ResumableSub_sc_result rsub = new ResumableSub_sc_result(this,__ref,_atype,_values,_image);
rsub.resume(ba, null);
}
public static class ResumableSub_sc_result extends BA.ResumableSub {
public ResumableSub_sc_result(keymon.lat.medicomed.c_cliente parent,keymon.lat.medicomed.c_cliente __ref,String _atype,String _values,anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image) {
this.parent = parent;
this.__ref = __ref;
this._atype = _atype;
this._values = _values;
this._image = _image;
this.__ref = parent;
}
keymon.lat.medicomed.c_cliente __ref;
keymon.lat.medicomed.c_cliente parent;
String _atype;
String _values;
anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _image;
int _resultado = 0;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_cliente";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=6356995;
 //BA.debugLineNum = 6356995;BA.debugLine="CODIGO = Values";
__ref._codigo /*String*/  = _values;
RDebugUtils.currentLine=6356996;
 //BA.debugLineNum = 6356996;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COUN";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM kmt_info WHERE CAT_CL_NUM_SERIEFISICO = ?",new String[]{__ref._codigo /*String*/ })));
RDebugUtils.currentLine=6356997;
 //BA.debugLineNum = 6356997;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=6356998;
 //BA.debugLineNum = 6356998;BA.debugLine="If DD.GetString(\"CUANTOS\") > 0 Then";
if (true) break;

case 1:
//if
this.state = 16;
if ((double)(Double.parseDouble(__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 16;
RDebugUtils.currentLine=6356999;
 //BA.debugLineNum = 6356999;BA.debugLine="MsgboxAsync(\"Código ya asignado\", \"AVISO\")";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Código ya asignado"),BA.ObjectToCharSequence("AVISO"),ba);
 if (true) break;

case 5:
//C
this.state = 6;
RDebugUtils.currentLine=6357001;
 //BA.debugLineNum = 6357001;BA.debugLine="If CODIGO.Length = 7 Then";
if (true) break;

case 6:
//if
this.state = 15;
if (__ref._codigo /*String*/ .length()==7) { 
this.state = 8;
}else {
this.state = 14;
}if (true) break;

case 8:
//C
this.state = 9;
RDebugUtils.currentLine=6357002;
 //BA.debugLineNum = 6357002;BA.debugLine="Msgbox2Async(\"El código \"& CODIGO & \" es correc";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("El código "+__ref._codigo /*String*/ +" es correcto?"),BA.ObjectToCharSequence("Title"),"Yes","Cancel","No",(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(parent.__c.Null)),ba,parent.__c.False);
RDebugUtils.currentLine=6357003;
 //BA.debugLineNum = 6357003;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_cliente", "sc_result"), null);
this.state = 17;
return;
case 17:
//C
this.state = 9;
_resultado = (Integer) result[1];
;
RDebugUtils.currentLine=6357004;
 //BA.debugLineNum = 6357004;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 9:
//if
this.state = 12;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 11;
}if (true) break;

case 11:
//C
this.state = 12;
RDebugUtils.currentLine=6357005;
 //BA.debugLineNum = 6357005;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE k";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE kmt_info set CAT_CL_NUM_SERIEFISICO = ?, CAT_CL_LONG = ?, CAT_CL_LAT =? where CAT_CL_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._codigo /*String*/ ),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=6357006;
 //BA.debugLineNum = 6357006;BA.debugLine="L_QR.TEXT =CODIGO";
__ref._l_qr /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._codigo /*String*/ ));
RDebugUtils.currentLine=6357007;
 //BA.debugLineNum = 6357007;BA.debugLine="L_QR.TextColor = Colors.Blue";
__ref._l_qr /*anywheresoftware.b4a.objects.LabelWrapper*/ .setTextColor(parent.__c.Colors.Blue);
RDebugUtils.currentLine=6357008;
 //BA.debugLineNum = 6357008;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert i";
parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into HIST_CODIGO_BARRAS(CODIGOKMTS, CODIGOB, LAT, LON) VALUES (?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._codigo /*String*/ ),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
 if (true) break;

case 12:
//C
this.state = 15;
;
 if (true) break;

case 14:
//C
this.state = 15;
RDebugUtils.currentLine=6357011;
 //BA.debugLineNum = 6357011;BA.debugLine="MsgboxAsync(\"Código No Valido\", \"AVISO\")";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Código No Valido"),BA.ObjectToCharSequence("AVISO"),ba);
 if (true) break;

case 15:
//C
this.state = 16;
;
 if (true) break;

case 16:
//C
this.state = -1;
;
RDebugUtils.currentLine=6357014;
 //BA.debugLineNum = 6357014;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=6357015;
 //BA.debugLineNum = 6357015;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _sc_timedout(keymon.lat.medicomed.c_cliente __ref,boolean _timedout) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "sc_timedout", false))
	 {return ((String) Debug.delegate(ba, "sc_timedout", new Object[] {_timedout}));}
RDebugUtils.currentLine=6422528;
 //BA.debugLineNum = 6422528;BA.debugLine="Sub sc_timedout(timedOut As Boolean)";
RDebugUtils.currentLine=6422529;
 //BA.debugLineNum = 6422529;BA.debugLine="Log(\"timedOut \" & timedOut)";
__c.LogImpl("36422529","timedOut "+BA.ObjectToString(_timedout),0);
RDebugUtils.currentLine=6422530;
 //BA.debugLineNum = 6422530;BA.debugLine="End Sub";
return "";
}
public String  _sc_usercancelled(keymon.lat.medicomed.c_cliente __ref,boolean _usercancelled) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "sc_usercancelled", false))
	 {return ((String) Debug.delegate(ba, "sc_usercancelled", new Object[] {_usercancelled}));}
RDebugUtils.currentLine=6488064;
 //BA.debugLineNum = 6488064;BA.debugLine="Sub sc_usercancelled(userCancelled As Boolean)";
RDebugUtils.currentLine=6488065;
 //BA.debugLineNum = 6488065;BA.debugLine="Log(\"userCancelled \" & userCancelled)";
__c.LogImpl("36488065","userCancelled "+BA.ObjectToString(_usercancelled),0);
RDebugUtils.currentLine=6488066;
 //BA.debugLineNum = 6488066;BA.debugLine="End Sub";
return "";
}
public String  _tar_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "tar_click", false))
	 {return ((String) Debug.delegate(ba, "tar_click", null));}
RDebugUtils.currentLine=5832704;
 //BA.debugLineNum = 5832704;BA.debugLine="Sub Tar_Click";
RDebugUtils.currentLine=5832705;
 //BA.debugLineNum = 5832705;BA.debugLine="B4XPages.ShowPage(\"Nota\")";
_b4xpages._showpage /*String*/ (ba,"Nota");
RDebugUtils.currentLine=5832706;
 //BA.debugLineNum = 5832706;BA.debugLine="End Sub";
return "";
}
public String  _tar_longclick(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "tar_longclick", false))
	 {return ((String) Debug.delegate(ba, "tar_longclick", null));}
RDebugUtils.currentLine=5898240;
 //BA.debugLineNum = 5898240;BA.debugLine="Sub Tar_LongClick";
RDebugUtils.currentLine=5898241;
 //BA.debugLineNum = 5898241;BA.debugLine="p_abono.Visible = True";
__ref._p_abono /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=5898242;
 //BA.debugLineNum = 5898242;BA.debugLine="End Sub";
return "";
}
public String  _tels_click(keymon.lat.medicomed.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "tels_click", false))
	 {return ((String) Debug.delegate(ba, "tels_click", null));}
RDebugUtils.currentLine=5701632;
 //BA.debugLineNum = 5701632;BA.debugLine="Sub Tels_Click";
RDebugUtils.currentLine=5701633;
 //BA.debugLineNum = 5701633;BA.debugLine="B4XPages.ShowPage(\"NoVenta\")";
_b4xpages._showpage /*String*/ (ba,"NoVenta");
RDebugUtils.currentLine=5701634;
 //BA.debugLineNum = 5701634;BA.debugLine="End Sub";
return "";
}
}