package reparto_mazapa.keymon.lat;


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, "reparto_mazapa.keymon.lat.c_cliente");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_mazapa.keymon.lat.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.gps.GPS _g = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public String _cuenta = "";
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 boolean _impresoraconectada = false;
public String _longitud = "";
public String _latitud = "";
public String _nombre = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = 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 reparto_mazapa.keymon.lat.dbrequestmanager _reqmanager = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_noentrega = null;
public anywheresoftware.b4a.objects.LabelWrapper _label10 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label11 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public anywheresoftware.b4a.objects.ButtonWrapper _tar = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_qr = null;
public anywheresoftware.b4a.objects.ButtonWrapper _bt_qr = null;
public reparto_mazapa.keymon.lat.escposprinter _printer1 = 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.objects.ButtonWrapper _hist = null;
public String _pasa_imp = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_imp = null;
public String _total_cliente = "";
public String _credito = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_paso2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public int _errorimpresora = 0;
public int _banderaimp = 0;
public anywheresoftware.b4a.objects.LabelWrapper _l_credi = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pagare = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montopag = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_efectivo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montoefec = null;
public long _distance = 0L;
public anywheresoftware.b4a.objects.ButtonWrapper _b_visitasinentrega = null;
public b4a.example.dateutils _dateutils = null;
public reparto_mazapa.keymon.lat.main _main = null;
public reparto_mazapa.keymon.lat.appupdater _appupdater = null;
public reparto_mazapa.keymon.lat.tracker _tracker = null;
public reparto_mazapa.keymon.lat.starter _starter = null;
public reparto_mazapa.keymon.lat.subs _subs = null;
public reparto_mazapa.keymon.lat.firebasemessaging _firebasemessaging = null;
public reparto_mazapa.keymon.lat.foto _foto = null;
public reparto_mazapa.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_mazapa.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_mazapa.keymon.lat.newinst2 _newinst2 = null;
public reparto_mazapa.keymon.lat.b4xpages _b4xpages = null;
public reparto_mazapa.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_mazapa.keymon.lat.httputils2service _httputils2service = null;
public reparto_mazapa.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(reparto_mazapa.keymon.lat.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=3604480;
 //BA.debugLineNum = 3604480;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=3604481;
 //BA.debugLineNum = 3604481;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=3604482;
 //BA.debugLineNum = 3604482;BA.debugLine="End Sub";
return null;
}
public String  _activity_pause(reparto_mazapa.keymon.lat.c_cliente __ref,boolean _userclosed) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
RDebugUtils.currentLine=3801088;
 //BA.debugLineNum = 3801088;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
RDebugUtils.currentLine=3801090;
 //BA.debugLineNum = 3801090;BA.debugLine="End Sub";
return "";
}
public String  _b_imp_click(reparto_mazapa.keymon.lat.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));}
RDebugUtils.currentLine=4587520;
 //BA.debugLineNum = 4587520;BA.debugLine="Sub B_IMP_Click";
RDebugUtils.currentLine=4587934;
 //BA.debugLineNum = 4587934;BA.debugLine="Guardado";
__ref._guardado /*void*/ (null);
RDebugUtils.currentLine=4587935;
 //BA.debugLineNum = 4587935;BA.debugLine="End Sub";
return "";
}
public void  _guardado(reparto_mazapa.keymon.lat.c_cliente __ref) throws Exception{
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "guardado", false))
	 {Debug.delegate(ba, "guardado", null); return;}
ResumableSub_Guardado rsub = new ResumableSub_Guardado(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_Guardado extends BA.ResumableSub {
public ResumableSub_Guardado(reparto_mazapa.keymon.lat.c_cliente parent,reparto_mazapa.keymon.lat.c_cliente __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_cliente __ref;
reparto_mazapa.keymon.lat.c_cliente parent;
String _ruta = "";
String _rutapre = "";
String _fechaprev = "";
String _rutaactualizar = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null;
int _resultado = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null;

@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=4063233;
 //BA.debugLineNum = 4063233;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=4063234;
 //BA.debugLineNum = 4063234;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
parent.__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=4063235;
 //BA.debugLineNum = 4063235;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=4063236;
 //BA.debugLineNum = 4063236;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=4063237;
 //BA.debugLineNum = 4063237;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
__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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
RDebugUtils.currentLine=4063238;
 //BA.debugLineNum = 4063238;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=4063239;
 //BA.debugLineNum = 4063239;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=4063240;
 //BA.debugLineNum = 4063240;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu";
__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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
RDebugUtils.currentLine=4063241;
 //BA.debugLineNum = 4063241;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=4063242;
 //BA.debugLineNum = 4063242;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=4063243;
 //BA.debugLineNum = 4063243;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=4063244;
 //BA.debugLineNum = 4063244;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA")));
RDebugUtils.currentLine=4063245;
 //BA.debugLineNum = 4063245;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=4063246;
 //BA.debugLineNum = 4063246;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = __ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTAA");
RDebugUtils.currentLine=4063247;
 //BA.debugLineNum = 4063247;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=4063248;
 //BA.debugLineNum = 4063248;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA FR";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=4063249;
 //BA.debugLineNum = 4063249;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=4063250;
 //BA.debugLineNum = 4063250;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUTA\"";
_rutapre = __ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=4063251;
 //BA.debugLineNum = 4063251;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=4063255;
 //BA.debugLineNum = 4063255;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
_fechaprev = parent._subs._traefechaprev /*String*/ (ba);
RDebugUtils.currentLine=4063258;
 //BA.debugLineNum = 4063258;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
RDebugUtils.currentLine=4063259;
 //BA.debugLineNum = 4063259;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_rut = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rut = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=4063260;
 //BA.debugLineNum = 4063260;BA.debugLine="If rut.RowCount > 0 Then";
if (true) break;

case 1:
//if
this.state = 4;
if (_rut.getRowCount()>0) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=4063261;
 //BA.debugLineNum = 4063261;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
RDebugUtils.currentLine=4063262;
 //BA.debugLineNum = 4063262;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 if (true) break;

case 4:
//C
this.state = 5;
;
RDebugUtils.currentLine=4063266;
 //BA.debugLineNum = 4063266;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVENTA (";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON,NV_RUTA) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cuenta /*String*/ ),(Object)(__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)("ENTREGA"),(Object)("ENTREGA COMPLETA"),(Object)(parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar)}));
RDebugUtils.currentLine=4063267;
 //BA.debugLineNum = 4063267;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPARTO_G";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText(),__ref._usuario /*String*/ ,__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,_fechaprev,"ENTREGADO"}));
RDebugUtils.currentLine=4063268;
 //BA.debugLineNum = 4063268;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set g";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 2, HORAENT = '"+parent.__c.SmartStringFormatter("",(Object)(__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+parent.__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' "));
RDebugUtils.currentLine=4063269;
 //BA.debugLineNum = 4063269;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS SET";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_ESTATUS = 1 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=4063270;
 //BA.debugLineNum = 4063270;BA.debugLine="mandaPendientesreparto";
__ref._mandapendientesreparto /*String*/ (null);
RDebugUtils.currentLine=4063272;
 //BA.debugLineNum = 4063272;BA.debugLine="Msgbox2Async(\"Pedido entregado\",\"Atención\",\"Ok\",\"";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Pedido entregado"),BA.ObjectToCharSequence("Atención"),"Ok","","",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
RDebugUtils.currentLine=4063273;
 //BA.debugLineNum = 4063273;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_cliente", "guardado"), null);
this.state = 15;
return;
case 15:
//C
this.state = 5;
_resultado = (Integer) result[1];
;
RDebugUtils.currentLine=4063274;
 //BA.debugLineNum = 4063274;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

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

case 7:
//C
this.state = 8;
RDebugUtils.currentLine=4063275;
 //BA.debugLineNum = 4063275;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQuery";
_mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0 and CAT_CL_CODIGO <> 63403")));
RDebugUtils.currentLine=4063276;
 //BA.debugLineNum = 4063276;BA.debugLine="If mandamapa.RowCount > 0 Then";
if (true) break;

case 8:
//if
this.state = 13;
if (_mandamapa.getRowCount()>0) { 
this.state = 10;
}else 
{RDebugUtils.currentLine=4063278;
 //BA.debugLineNum = 4063278;BA.debugLine="Else If mandamapa.RowCount = 0 Then";
if (_mandamapa.getRowCount()==0) { 
this.state = 12;
}}
if (true) break;

case 10:
//C
this.state = 13;
RDebugUtils.currentLine=4063277;
 //BA.debugLineNum = 4063277;BA.debugLine="StartActivity(MAPA_RUTAS)";
parent.__c.StartActivity(ba,(Object)(parent._mapa_rutas.getObject()));
 if (true) break;

case 12:
//C
this.state = 13;
RDebugUtils.currentLine=4063279;
 //BA.debugLineNum = 4063279;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
 if (true) break;

case 13:
//C
this.state = 14;
;
 if (true) break;

case 14:
//C
this.state = -1;
;
RDebugUtils.currentLine=4063283;
 //BA.debugLineNum = 4063283;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_noentrega_click(reparto_mazapa.keymon.lat.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_noentrega_click", false))
	 {return ((String) Debug.delegate(ba, "b_noentrega_click", null));}
RDebugUtils.currentLine=4128768;
 //BA.debugLineNum = 4128768;BA.debugLine="Sub b_noEntrega_Click";
RDebugUtils.currentLine=4128770;
 //BA.debugLineNum = 4128770;BA.debugLine="B4XPages.ShowPage(\"noVenta\")";
_b4xpages._showpage /*String*/ (ba,"noVenta");
RDebugUtils.currentLine=4128771;
 //BA.debugLineNum = 4128771;BA.debugLine="End Sub";
return "";
}
public String  _b_paso2_click(reparto_mazapa.keymon.lat.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_paso2_click", false))
	 {return ((String) Debug.delegate(ba, "b_paso2_click", null));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null;
RDebugUtils.currentLine=4849664;
 //BA.debugLineNum = 4849664;BA.debugLine="Sub B_PASO2_Click";
RDebugUtils.currentLine=4849665;
 //BA.debugLineNum = 4849665;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=4849666;
 //BA.debugLineNum = 4849666;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=4849667;
 //BA.debugLineNum = 4849667;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=4849668;
 //BA.debugLineNum = 4849668;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
RDebugUtils.currentLine=4849669;
 //BA.debugLineNum = 4849669;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=4849670;
 //BA.debugLineNum = 4849670;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=4849671;
 //BA.debugLineNum = 4849671;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
RDebugUtils.currentLine=4849672;
 //BA.debugLineNum = 4849672;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=4849673;
 //BA.debugLineNum = 4849673;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=4849674;
 //BA.debugLineNum = 4849674;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=4849675;
 //BA.debugLineNum = 4849675;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM NOVENTA WH";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)");
RDebugUtils.currentLine=4849676;
 //BA.debugLineNum = 4849676;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  NOVENTA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cuenta /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)("PASO"),(Object)("PASO ESPERA"),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
RDebugUtils.currentLine=4849678;
 //BA.debugLineNum = 4849678;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQuery(";
_mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0")));
RDebugUtils.currentLine=4849679;
 //BA.debugLineNum = 4849679;BA.debugLine="If mandamapa.RowCount > 0 Then";
if (_mandamapa.getRowCount()>0) { 
RDebugUtils.currentLine=4849680;
 //BA.debugLineNum = 4849680;BA.debugLine="StartActivity(MAPA_RUTAS)";
__c.StartActivity(ba,(Object)(_mapa_rutas.getObject()));
 }else 
{RDebugUtils.currentLine=4849681;
 //BA.debugLineNum = 4849681;BA.debugLine="Else If mandamapa.RowCount = 0 Then";
if (_mandamapa.getRowCount()==0) { 
RDebugUtils.currentLine=4849682;
 //BA.debugLineNum = 4849682;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }}
;
RDebugUtils.currentLine=4849684;
 //BA.debugLineNum = 4849684;BA.debugLine="End Sub";
return "";
}
public String  _b_visitasinentrega_click(reparto_mazapa.keymon.lat.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "b_visitasinentrega_click", false))
	 {return ((String) Debug.delegate(ba, "b_visitasinentrega_click", null));}
String _ruta = "";
String _rutapre = "";
String _fechaprev = "";
String _rutaactualizar = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null;
RDebugUtils.currentLine=5046272;
 //BA.debugLineNum = 5046272;BA.debugLine="Private Sub b_visitasinentrega_Click";
RDebugUtils.currentLine=5046274;
 //BA.debugLineNum = 5046274;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=5046275;
 //BA.debugLineNum = 5046275;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=5046276;
 //BA.debugLineNum = 5046276;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=5046277;
 //BA.debugLineNum = 5046277;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=5046278;
 //BA.debugLineNum = 5046278;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
RDebugUtils.currentLine=5046279;
 //BA.debugLineNum = 5046279;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5046280;
 //BA.debugLineNum = 5046280;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=5046281;
 //BA.debugLineNum = 5046281;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
RDebugUtils.currentLine=5046282;
 //BA.debugLineNum = 5046282;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5046283;
 //BA.debugLineNum = 5046283;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=5046284;
 //BA.debugLineNum = 5046284;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5046285;
 //BA.debugLineNum = 5046285;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA")));
RDebugUtils.currentLine=5046286;
 //BA.debugLineNum = 5046286;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5046287;
 //BA.debugLineNum = 5046287;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = __ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTAA");
RDebugUtils.currentLine=5046288;
 //BA.debugLineNum = 5046288;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5046289;
 //BA.debugLineNum = 5046289;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA FR";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=5046290;
 //BA.debugLineNum = 5046290;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=5046291;
 //BA.debugLineNum = 5046291;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUTA\"";
_rutapre = __ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=5046292;
 //BA.debugLineNum = 5046292;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=5046296;
 //BA.debugLineNum = 5046296;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
_fechaprev = _subs._traefechaprev /*String*/ (ba);
RDebugUtils.currentLine=5046299;
 //BA.debugLineNum = 5046299;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
RDebugUtils.currentLine=5046300;
 //BA.debugLineNum = 5046300;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SELEC";
_rut = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rut = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=5046301;
 //BA.debugLineNum = 5046301;BA.debugLine="If rut.RowCount > 0 Then";
if (_rut.getRowCount()>0) { 
RDebugUtils.currentLine=5046302;
 //BA.debugLineNum = 5046302;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
RDebugUtils.currentLine=5046303;
 //BA.debugLineNum = 5046303;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 };
RDebugUtils.currentLine=5046307;
 //BA.debugLineNum = 5046307;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPARTO_G";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__ref._la_cuenta /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText(),__ref._usuario /*String*/ ,__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,_fechaprev,"VISITA PENDIENTE"}));
RDebugUtils.currentLine=5046308;
 //BA.debugLineNum = 5046308;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
RDebugUtils.currentLine=5046309;
 //BA.debugLineNum = 5046309;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_mazapa.keymon.lat.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));}
anywheresoftware.b4a.objects.collections.Map _cym = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc = null;
String _cuenta0 = "";
String _arti = "";
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc2 = null;
String _cuenta1 = "";
String _arti1 = "";
float _preu = 0f;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc4 = null;
String _cuenta2 = "";
String _arti2 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _vc5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c4 = null;
String _cuenta3 = "";
String _arti3 = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _pag = null;
float _pagaremonto = 0f;
float _pagaremonto2 = 0f;
anywheresoftware.b4a.gps.LocationWrapper _ubicacionactual = null;
anywheresoftware.b4a.gps.LocationWrapper _l2 = null;
RDebugUtils.currentLine=3735552;
 //BA.debugLineNum = 3735552;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=3735553;
 //BA.debugLineNum = 3735553;BA.debugLine="banderaimp = 0";
__ref._banderaimp /*int*/  = (int) (0);
RDebugUtils.currentLine=3735554;
 //BA.debugLineNum = 3735554;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,__ref._p_principal /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=3735555;
 //BA.debugLineNum = 3735555;BA.debugLine="Starter.skmt.Initialize(Starter.ruta,\"kmt.db\", Tr";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(_starter._ruta /*String*/ ,"kmt.db",__c.True);
RDebugUtils.currentLine=3735556;
 //BA.debugLineNum = 3735556;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
RDebugUtils.currentLine=3735557;
 //BA.debugLineNum = 3735557;BA.debugLine="Tar.Visible = False";
__ref._tar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735558;
 //BA.debugLineNum = 3735558;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735559;
 //BA.debugLineNum = 3735559;BA.debugLine="b_noEntrega.Visible = False";
__ref._b_noentrega /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735560;
 //BA.debugLineNum = 3735560;BA.debugLine="HIST.Visible = False";
__ref._hist /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735561;
 //BA.debugLineNum = 3735561;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO,CA";
__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)(_starter._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_BCREDITO  from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=3735562;
 //BA.debugLineNum = 3735562;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
__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)(_starter._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=3735563;
 //BA.debugLineNum = 3735563;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3735564;
 //BA.debugLineNum = 3735564;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3735565;
 //BA.debugLineNum = 3735565;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=3735566;
 //BA.debugLineNum = 3735566;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=3735567;
 //BA.debugLineNum = 3735567;BA.debugLine="NOMBRE = c.GetString(\"CAT_CL_NOMBRE\")";
__ref._nombre /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_NOMBRE");
RDebugUtils.currentLine=3735568;
 //BA.debugLineNum = 3735568;BA.debugLine="LONGITUD = c.GetString(\"CAT_CL_LONG\")";
__ref._longitud /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_LONG");
RDebugUtils.currentLine=3735569;
 //BA.debugLineNum = 3735569;BA.debugLine="LATITUD = c.GetString(\"CAT_CL_LAT\")";
__ref._latitud /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_LAT");
RDebugUtils.currentLine=3735570;
 //BA.debugLineNum = 3735570;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G";
__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=3735571;
 //BA.debugLineNum = 3735571;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=3735572;
 //BA.debugLineNum = 3735572;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=3735573;
 //BA.debugLineNum = 3735573;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
__ref._la_cp /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CP")));
RDebugUtils.currentLine=3735574;
 //BA.debugLineNum = 3735574;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
__ref._l_entre1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE1")));
RDebugUtils.currentLine=3735575;
 //BA.debugLineNum = 3735575;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
__ref._l_entre2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE2")));
RDebugUtils.currentLine=3735576;
 //BA.debugLineNum = 3735576;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENDE1")!= null && (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENDE1")).equals("null") == false) { 
RDebugUtils.currentLine=3735577;
 //BA.debugLineNum = 3735577;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")));
 }else {
RDebugUtils.currentLine=3735579;
 //BA.debugLineNum = 3735579;BA.debugLine="l_atiende.Text = \" \"";
__ref._l_atiende /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(" "));
 };
RDebugUtils.currentLine=3735581;
 //BA.debugLineNum = 3735581;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")!= null && (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { 
RDebugUtils.currentLine=3735582;
 //BA.debugLineNum = 3735582;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")));
 }else {
RDebugUtils.currentLine=3735584;
 //BA.debugLineNum = 3735584;BA.debugLine="l_atiende2.Text = \" \"";
__ref._l_atiende2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(" "));
 };
RDebugUtils.currentLine=3735586;
 //BA.debugLineNum = 3735586;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=3735587;
 //BA.debugLineNum = 3735587;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=3735589;
 //BA.debugLineNum = 3735589;BA.debugLine="CREDITO = C.GetString(\"CAT_CL_BCREDITO\")";
__ref._credito /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_BCREDITO");
RDebugUtils.currentLine=3735592;
 //BA.debugLineNum = 3735592;BA.debugLine="Private cym As Map = Subs.traeCantYMonto2(Subs.tr";
_cym = new anywheresoftware.b4a.objects.collections.Map();
_cym = _subs._traecantymonto2 /*anywheresoftware.b4a.objects.collections.Map*/ (ba,_subs._traecliente /*String*/ (ba));
RDebugUtils.currentLine=3735593;
 //BA.debugLineNum = 3735593;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
RDebugUtils.currentLine=3735594;
 //BA.debugLineNum = 3735594;BA.debugLine="l_total.Text = Round2(cym.Get(\"monto\"), 2)";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2))));
RDebugUtils.currentLine=3735602;
 //BA.debugLineNum = 3735602;BA.debugLine="Starter.skmt.ExecNonQuery(\"UPDATE HIST_VENTAS set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE HIST_VENTAS set ESPROMO = 1  where HVD_CODPROMO = HVD_PROID AND HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=3735603;
 //BA.debugLineNum = 3735603;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery($\"s";
_vc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID,HVD_COSTO_TOT, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT from HIST_VENTAS where BCAJAS = 0 and HVD_CODPROMO ='"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"' and HVD_CLIENTE in (select cuenta from cuentaa)"))));
RDebugUtils.currentLine=3735605;
 //BA.debugLineNum = 3735605;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
RDebugUtils.currentLine=3735606;
 //BA.debugLineNum = 3735606;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
RDebugUtils.currentLine=3735607;
 //BA.debugLineNum = 3735607;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
RDebugUtils.currentLine=3735608;
 //BA.debugLineNum = 3735608;BA.debugLine="For i = 0 To vc.RowCount - 1";
{
final int step45 = 1;
final int limit45 = (int) (_vc.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit45 ;_i = _i + step45 ) {
RDebugUtils.currentLine=3735609;
 //BA.debugLineNum = 3735609;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
RDebugUtils.currentLine=3735612;
 //BA.debugLineNum = 3735612;BA.debugLine="cuenta0 = cuenta0 + ((vc.GetString(\"HVD_CANT\")";
_cuenta0 = BA.NumberToString((double)(Double.parseDouble(_cuenta0))+(((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc.GetString("HVD_CANT"))))));
RDebugUtils.currentLine=3735617;
 //BA.debugLineNum = 3735617;BA.debugLine="arti = arti + (vc.GetString(\"HVD_CANT\") - vc.Ge";
_arti = BA.NumberToString((double)(Double.parseDouble(_arti))+((double)(Double.parseDouble(_vc.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc.GetString("HVD_RECHAZOCANT")))));
 }
};
 };
RDebugUtils.currentLine=3735623;
 //BA.debugLineNum = 3735623;BA.debugLine="Private vc2 As Cursor = Starter.skmt.ExecQuery(\"s";
_vc2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_PROID, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 1")));
RDebugUtils.currentLine=3735624;
 //BA.debugLineNum = 3735624;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
RDebugUtils.currentLine=3735625;
 //BA.debugLineNum = 3735625;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
RDebugUtils.currentLine=3735626;
 //BA.debugLineNum = 3735626;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
RDebugUtils.currentLine=3735627;
 //BA.debugLineNum = 3735627;BA.debugLine="For i = 0 To vc2.RowCount - 1";
{
final int step55 = 1;
final int limit55 = (int) (_vc2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit55 ;_i = _i + step55 ) {
RDebugUtils.currentLine=3735628;
 //BA.debugLineNum = 3735628;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
RDebugUtils.currentLine=3735629;
 //BA.debugLineNum = 3735629;BA.debugLine="Dim preu As Float = NumberFormat2(vc2.GetString";
_preu = (float)(Double.parseDouble(__c.NumberFormat2((double)(Double.parseDouble(_vc2.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc2.GetString("CANTC"))),(int) (0),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=3735630;
 //BA.debugLineNum = 3735630;BA.debugLine="Private vc3 As Cursor = Starter.skmt.ExecQuery(";
_vc3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PRECIOCONVER, CONVERSION from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc2.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=3735631;
 //BA.debugLineNum = 3735631;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
RDebugUtils.currentLine=3735632;
 //BA.debugLineNum = 3735632;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
RDebugUtils.currentLine=3735633;
 //BA.debugLineNum = 3735633;BA.debugLine="Cuenta1 = Cuenta1 + ((vc2.GetString(\"CANTC\")-(";
_cuenta1 = BA.NumberToString((double)(Double.parseDouble(_cuenta1))+(((double)(Double.parseDouble(_vc2.GetString("CANTC")))-((double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))/(double)(double)(Double.parseDouble(_vc3.GetString("CONVERSION")))))*_preu));
RDebugUtils.currentLine=3735634;
 //BA.debugLineNum = 3735634;BA.debugLine="arti1 = arti1 + (vc2.GetString(\"HVD_CANT\") - v";
_arti1 = BA.NumberToString((double)(Double.parseDouble(_arti1))+((double)(Double.parseDouble(_vc2.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc2.GetString("HVD_RECHAZOCANT")))));
 };
 }
};
 };
RDebugUtils.currentLine=3735640;
 //BA.debugLineNum = 3735640;BA.debugLine="Private vc4 As Cursor = Starter.skmt.ExecQuery($\"";
_vc4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select HVD_PROID,HVD_PRONOMBRE,HVD_COSTO_TOT, HVD_CANT, IFNULL(HVD_RECHAZOCANT, 0) AS HVD_RECHAZOCANT, CANTC,HVD_COSTO_TOT, HVD_RECHAZO, HVD_CODPROMO from HIST_VENTAS where HVD_CLIENTE in (select cuenta from cuentaa) AND BCAJAS = 0 and HVD_CODPROMO <> '"+__c.SmartStringFormatter("",(Object)(_subs._traealmacen /*String*/ (ba)))+"'"))));
RDebugUtils.currentLine=3735641;
 //BA.debugLineNum = 3735641;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
RDebugUtils.currentLine=3735642;
 //BA.debugLineNum = 3735642;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
RDebugUtils.currentLine=3735643;
 //BA.debugLineNum = 3735643;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
RDebugUtils.currentLine=3735645;
 //BA.debugLineNum = 3735645;BA.debugLine="For i = 0 To vc4.RowCount - 1";
{
final int step70 = 1;
final int limit70 = (int) (_vc4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit70 ;_i = _i + step70 ) {
RDebugUtils.currentLine=3735646;
 //BA.debugLineNum = 3735646;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
RDebugUtils.currentLine=3735647;
 //BA.debugLineNum = 3735647;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
RDebugUtils.currentLine=3735648;
 //BA.debugLineNum = 3735648;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=3735649;
 //BA.debugLineNum = 3735649;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_COSTO_";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
RDebugUtils.currentLine=3735650;
 //BA.debugLineNum = 3735650;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_CANT\")";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_CANT"))));
 }else {
RDebugUtils.currentLine=3735652;
 //BA.debugLineNum = 3735652;BA.debugLine="Private vc5 As Cursor = Starter.skmt.ExecQuer";
_vc5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_vc5 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_PRECIO from CAT_GUNAPROD where CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_vc4.GetString("HVD_PROID")))+"'"))));
RDebugUtils.currentLine=3735653;
 //BA.debugLineNum = 3735653;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
RDebugUtils.currentLine=3735654;
 //BA.debugLineNum = 3735654;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
RDebugUtils.currentLine=3735656;
 //BA.debugLineNum = 3735656;BA.debugLine="Cuenta2 = Cuenta2 +((vc4.GetString(\"HVD_CANT";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT"))))*((double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT")))/(double)(double)(Double.parseDouble(_vc4.GetString("HVD_CANT"))))));
RDebugUtils.currentLine=3735657;
 //BA.debugLineNum = 3735657;BA.debugLine="arti2 = arti2 +(vc4.GetString(\"HVD_CANT\")- v";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+((double)(Double.parseDouble(_vc4.GetString("HVD_CANT")))-(double)(Double.parseDouble(_vc4.GetString("HVD_RECHAZOCANT")))));
 };
 };
 };
 }
};
 };
RDebugUtils.currentLine=3735666;
 //BA.debugLineNum = 3735666;BA.debugLine="Private c4 As Cursor = Starter.skmt.ExecQuery($\"S";
_c4 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c4 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT IFNULL(PE_CANT,0) AS PE_CANT, iFNULL(PE_COSTO_TOT,0) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));
RDebugUtils.currentLine=3735667;
 //BA.debugLineNum = 3735667;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
RDebugUtils.currentLine=3735668;
 //BA.debugLineNum = 3735668;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
RDebugUtils.currentLine=3735669;
 //BA.debugLineNum = 3735669;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
RDebugUtils.currentLine=3735670;
 //BA.debugLineNum = 3735670;BA.debugLine="For i = 0 To c4.RowCount -1";
{
final int step91 = 1;
final int limit91 = (int) (_c4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit91 ;_i = _i + step91 ) {
RDebugUtils.currentLine=3735671;
 //BA.debugLineNum = 3735671;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
RDebugUtils.currentLine=3735672;
 //BA.debugLineNum = 3735672;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
RDebugUtils.currentLine=3735673;
 //BA.debugLineNum = 3735673;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_TOT\"";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
RDebugUtils.currentLine=3735676;
 //BA.debugLineNum = 3735676;BA.debugLine="Log(cuenta0)";
__c.LogImpl("33735676",_cuenta0,0);
RDebugUtils.currentLine=3735677;
 //BA.debugLineNum = 3735677;BA.debugLine="Log(Cuenta1)";
__c.LogImpl("33735677",_cuenta1,0);
RDebugUtils.currentLine=3735678;
 //BA.debugLineNum = 3735678;BA.debugLine="Log(Cuenta2)";
__c.LogImpl("33735678",_cuenta2,0);
RDebugUtils.currentLine=3735679;
 //BA.debugLineNum = 3735679;BA.debugLine="Log(Cuenta3)";
__c.LogImpl("33735679",_cuenta3,0);
RDebugUtils.currentLine=3735681;
 //BA.debugLineNum = 3735681;BA.debugLine="l_total.Text = NumberFormat2((cuenta0 + Cuenta1 +";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3))),(int) (0),(int) (2),(int) (2),__c.True)));
RDebugUtils.currentLine=3735682;
 //BA.debugLineNum = 3735682;BA.debugLine="L_CANT.Text = NumberFormat2((arti + arti1 +arti2";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_arti))+(double)(Double.parseDouble(_arti1))+(double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_arti3))),(int) (0),(int) (0),(int) (0),__c.True)));
RDebugUtils.currentLine=3735687;
 //BA.debugLineNum = 3735687;BA.debugLine="c = Starter.skmt.ExecQuery2(\"select CAT_VA_VALOR";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"MACIMP"})));
RDebugUtils.currentLine=3735688;
 //BA.debugLineNum = 3735688;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=3735689;
 //BA.debugLineNum = 3735689;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3735690;
 //BA.debugLineNum = 3735690;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO";
_starter._mac_impresora /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_VA_VALOR");
 };
RDebugUtils.currentLine=3735692;
 //BA.debugLineNum = 3735692;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM";
if ((_starter._mac_impresora /*String*/ ).equals("")) { 
_starter._mac_impresora /*String*/  = "0";};
RDebugUtils.currentLine=3735694;
 //BA.debugLineNum = 3735694;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")";
__ref._printer1 /*reparto_mazapa.keymon.lat.escposprinter*/ ._initialize /*String*/ (null,ba,this,"Printer1");
RDebugUtils.currentLine=3735696;
 //BA.debugLineNum = 3735696;BA.debugLine="If Printer1.IsConnected = False Then";
if (__ref._printer1 /*reparto_mazapa.keymon.lat.escposprinter*/ ._isconnected /*boolean*/ (null)==__c.False) { 
 }else {
RDebugUtils.currentLine=3735700;
 //BA.debugLineNum = 3735700;BA.debugLine="Printer1.DisConnect";
__ref._printer1 /*reparto_mazapa.keymon.lat.escposprinter*/ ._disconnect /*String*/ (null);
RDebugUtils.currentLine=3735701;
 //BA.debugLineNum = 3735701;BA.debugLine="Printer1.Connect";
__ref._printer1 /*reparto_mazapa.keymon.lat.escposprinter*/ ._connect /*boolean*/ (null);
RDebugUtils.currentLine=3735702;
 //BA.debugLineNum = 3735702;BA.debugLine="Log(\"2\")";
__c.LogImpl("33735702","2",0);
 };
RDebugUtils.currentLine=3735705;
 //BA.debugLineNum = 3735705;BA.debugLine="Dim pag As Cursor = Starter.skmt.ExecQuery(\"selec";
_pag = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_pag = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * FROM PAGARES WHERE TMP_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=3735706;
 //BA.debugLineNum = 3735706;BA.debugLine="If pag.RowCount > 0 Then";
if (_pag.getRowCount()>0) { 
RDebugUtils.currentLine=3735707;
 //BA.debugLineNum = 3735707;BA.debugLine="pag.Position = 0";
_pag.setPosition((int) (0));
RDebugUtils.currentLine=3735708;
 //BA.debugLineNum = 3735708;BA.debugLine="l_credi.Visible = True";
__ref._l_credi /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735709;
 //BA.debugLineNum = 3735709;BA.debugLine="l_pagare.Visible = True";
__ref._l_pagare /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735710;
 //BA.debugLineNum = 3735710;BA.debugLine="l_montoefec.Visible = True";
__ref._l_montoefec /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735711;
 //BA.debugLineNum = 3735711;BA.debugLine="l_efectivo.Visible = True";
__ref._l_efectivo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735712;
 //BA.debugLineNum = 3735712;BA.debugLine="l_montopag.Visible = True";
__ref._l_montopag /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735713;
 //BA.debugLineNum = 3735713;BA.debugLine="l_montopag.Text = pag.GetString(\"TMP_MONTO_PAGAR";
__ref._l_montopag /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_pag.GetString("TMP_MONTO_PAGARE")));
RDebugUtils.currentLine=3735714;
 //BA.debugLineNum = 3735714;BA.debugLine="Dim PAGAREMONTO As Float = cuenta0 + Cuenta1 + C";
_pagaremonto = (float) ((double)(Double.parseDouble(_cuenta0))+(double)(Double.parseDouble(_cuenta1))+(double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_cuenta3)));
RDebugUtils.currentLine=3735715;
 //BA.debugLineNum = 3735715;BA.debugLine="Dim PAGAREMONTO2 As Float = pag.GetString(\"TMP_M";
_pagaremonto2 = (float)(Double.parseDouble(_pag.GetString("TMP_MONTO_PAGARE")));
RDebugUtils.currentLine=3735717;
 //BA.debugLineNum = 3735717;BA.debugLine="If PAGAREMONTO - PAGAREMONTO2 < 0 Then";
if (_pagaremonto-_pagaremonto2<0) { 
RDebugUtils.currentLine=3735718;
 //BA.debugLineNum = 3735718;BA.debugLine="l_montoefec.Text = 0";
__ref._l_montoefec /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
 }else {
RDebugUtils.currentLine=3735720;
 //BA.debugLineNum = 3735720;BA.debugLine="l_montoefec.Text = PAGAREMONTO - PAGAREMONTO2";
__ref._l_montoefec /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_pagaremonto-_pagaremonto2));
 };
 }else 
{RDebugUtils.currentLine=3735722;
 //BA.debugLineNum = 3735722;BA.debugLine="Else If pag.RowCount = 0 Then";
if (_pag.getRowCount()==0) { 
RDebugUtils.currentLine=3735723;
 //BA.debugLineNum = 3735723;BA.debugLine="l_credi.Visible = False";
__ref._l_credi /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735724;
 //BA.debugLineNum = 3735724;BA.debugLine="l_pagare.Visible = False";
__ref._l_pagare /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735725;
 //BA.debugLineNum = 3735725;BA.debugLine="l_montoefec.Visible = False";
__ref._l_montoefec /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735726;
 //BA.debugLineNum = 3735726;BA.debugLine="l_efectivo.Visible = False";
__ref._l_efectivo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735727;
 //BA.debugLineNum = 3735727;BA.debugLine="l_montopag.Visible = False";
__ref._l_montopag /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
 }}
;
RDebugUtils.currentLine=3735730;
 //BA.debugLineNum = 3735730;BA.debugLine="Starter.distanciaGeo = \"\"";
_starter._distanciageo /*String*/  = "";
RDebugUtils.currentLine=3735731;
 //BA.debugLineNum = 3735731;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT HABILITADO FRO";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT HABILITADO FROM GPS")));
RDebugUtils.currentLine=3735732;
 //BA.debugLineNum = 3735732;BA.debugLine="If c.RowCount = 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()==0) { 
RDebugUtils.currentLine=3735733;
 //BA.debugLineNum = 3735733;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO GPS VALU";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO GPS VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 };
RDebugUtils.currentLine=3735735;
 //BA.debugLineNum = 3735735;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT HABILITADO FRO";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT HABILITADO FROM GPS")));
RDebugUtils.currentLine=3735736;
 //BA.debugLineNum = 3735736;BA.debugLine="If c.RowCount >  0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=3735737;
 //BA.debugLineNum = 3735737;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3735738;
 //BA.debugLineNum = 3735738;BA.debugLine="If c.GetString(\"HABILITADO\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HABILITADO")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=3735739;
 //BA.debugLineNum = 3735739;BA.debugLine="Starter.distanciaGeo = \"500000000000\"";
_starter._distanciageo /*String*/  = "500000000000";
RDebugUtils.currentLine=3735740;
 //BA.debugLineNum = 3735740;BA.debugLine="Log(\"Esto es la distancia si esta desactivada l";
__c.LogImpl("33735740","Esto es la distancia si esta desactivada la Geo: "+_starter._distanciageo /*String*/ ,0);
 }else 
{RDebugUtils.currentLine=3735741;
 //BA.debugLineNum = 3735741;BA.debugLine="Else If c.GetString(\"HABILITADO\") = 1 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HABILITADO")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=3735742;
 //BA.debugLineNum = 3735742;BA.debugLine="Starter.distanciaGeo = \"50\"";
_starter._distanciageo /*String*/  = "50";
RDebugUtils.currentLine=3735743;
 //BA.debugLineNum = 3735743;BA.debugLine="Log(\"Esto es la distancia si esta activada la G";
__c.LogImpl("33735743","Esto es la distancia si esta activada la Geo: "+_starter._distanciageo /*String*/ ,0);
 }}
;
 }else {
 };
RDebugUtils.currentLine=3735749;
 //BA.debugLineNum = 3735749;BA.debugLine="Private ubicacionActual, l2 As Location";
_ubicacionactual = new anywheresoftware.b4a.gps.LocationWrapper();
_l2 = new anywheresoftware.b4a.gps.LocationWrapper();
RDebugUtils.currentLine=3735750;
 //BA.debugLineNum = 3735750;BA.debugLine="ubicacionActual.Initialize2(B4XPages.MainPage.lat";
_ubicacionactual.Initialize2(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ );
RDebugUtils.currentLine=3735751;
 //BA.debugLineNum = 3735751;BA.debugLine="l2.Initialize2(LATITUD, LONGITUD)";
_l2.Initialize2(__ref._latitud /*String*/ ,__ref._longitud /*String*/ );
RDebugUtils.currentLine=3735752;
 //BA.debugLineNum = 3735752;BA.debugLine="distance = ubicacionActual.DistanceTo(l2)";
__ref._distance /*long*/  = (long) (_ubicacionactual.DistanceTo((android.location.Location)(_l2.getObject())));
RDebugUtils.currentLine=3735754;
 //BA.debugLineNum = 3735754;BA.debugLine="If distance < Starter.distanciaGeo Then";
if (__ref._distance /*long*/ <(double)(Double.parseDouble(_starter._distanciageo /*String*/ ))) { 
RDebugUtils.currentLine=3735755;
 //BA.debugLineNum = 3735755;BA.debugLine="Tar.Visible = True";
__ref._tar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735756;
 //BA.debugLineNum = 3735756;BA.debugLine="gest.Visible = True";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735757;
 //BA.debugLineNum = 3735757;BA.debugLine="b_noEntrega.Visible = True";
__ref._b_noentrega /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735758;
 //BA.debugLineNum = 3735758;BA.debugLine="HIST.Visible = True";
__ref._hist /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
 }else {
RDebugUtils.currentLine=3735760;
 //BA.debugLineNum = 3735760;BA.debugLine="Tar.Visible = False";
__ref._tar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735761;
 //BA.debugLineNum = 3735761;BA.debugLine="gest.Visible = False";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735762;
 //BA.debugLineNum = 3735762;BA.debugLine="b_noEntrega.Visible = False";
__ref._b_noentrega /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=3735763;
 //BA.debugLineNum = 3735763;BA.debugLine="HIST.Visible = False";
__ref._hist /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=3735765;
 //BA.debugLineNum = 3735765;BA.debugLine="Log(distance)";
__c.LogImpl("33735765",BA.NumberToString(__ref._distance /*long*/ ),0);
RDebugUtils.currentLine=3735766;
 //BA.debugLineNum = 3735766;BA.debugLine="Tar.Visible = True";
__ref._tar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735767;
 //BA.debugLineNum = 3735767;BA.debugLine="gest.Visible = True";
__ref._gest /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735768;
 //BA.debugLineNum = 3735768;BA.debugLine="b_noEntrega.Visible = True";
__ref._b_noentrega /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735769;
 //BA.debugLineNum = 3735769;BA.debugLine="HIST.Visible = True";
__ref._hist /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=3735770;
 //BA.debugLineNum = 3735770;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(reparto_mazapa.keymon.lat.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(reparto_mazapa.keymon.lat.c_cliente parent,reparto_mazapa.keymon.lat.c_cliente __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_cliente __ref;
reparto_mazapa.keymon.lat.c_cliente parent;

@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=4194307;
 //BA.debugLineNum = 4194307;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
parent._b4xpages._showpage /*String*/ (ba,"Clientes");
RDebugUtils.currentLine=4194308;
 //BA.debugLineNum = 4194308;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=4194309;
 //BA.debugLineNum = 4194309;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(reparto_mazapa.keymon.lat.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=3670016;
 //BA.debugLineNum = 3670016;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=3670017;
 //BA.debugLineNum = 3670017;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=3670019;
 //BA.debugLineNum = 3670019;BA.debugLine="g.Initialize(\"GPS\")";
__ref._g /*anywheresoftware.b4a.gps.GPS*/ .Initialize("GPS");
RDebugUtils.currentLine=3670021;
 //BA.debugLineNum = 3670021;BA.debugLine="Root.LoadLayout(\"cliente\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("cliente",ba);
RDebugUtils.currentLine=3670022;
 //BA.debugLineNum = 3670022;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO, C";
__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)(_starter._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  from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=3670023;
 //BA.debugLineNum = 3670023;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
__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)(_starter._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=3670024;
 //BA.debugLineNum = 3670024;BA.debugLine="s.Position=0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3670025;
 //BA.debugLineNum = 3670025;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3670026;
 //BA.debugLineNum = 3670026;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=3670027;
 //BA.debugLineNum = 3670027;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=3670028;
 //BA.debugLineNum = 3670028;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G";
__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=3670029;
 //BA.debugLineNum = 3670029;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=3670030;
 //BA.debugLineNum = 3670030;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=3670031;
 //BA.debugLineNum = 3670031;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
__ref._la_cp /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CP")));
RDebugUtils.currentLine=3670032;
 //BA.debugLineNum = 3670032;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
__ref._l_entre1 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE1")));
RDebugUtils.currentLine=3670033;
 //BA.debugLineNum = 3670033;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
__ref._l_entre2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_CALLE2")));
RDebugUtils.currentLine=3670034;
 //BA.debugLineNum = 3670034;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENDE1")!= null && (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENDE1")).equals("null") == false) { 
RDebugUtils.currentLine=3670035;
 //BA.debugLineNum = 3670035;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")));
 }else {
RDebugUtils.currentLine=3670037;
 //BA.debugLineNum = 3670037;BA.debugLine="l_atiende.Text = \" \"";
__ref._l_atiende /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(" "));
 };
RDebugUtils.currentLine=3670039;
 //BA.debugLineNum = 3670039;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")!= null && (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { 
RDebugUtils.currentLine=3670040;
 //BA.debugLineNum = 3670040;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=3670041;
 //BA.debugLineNum = 3670041;BA.debugLine="Log(\"|\"&c.GetString(\"CAT_CL_ATIENTE2\")&\"|\")";
__c.LogImpl("33670041","|"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_ATIENTE2")+"|",0);
 }else {
RDebugUtils.currentLine=3670043;
 //BA.debugLineNum = 3670043;BA.debugLine="l_atiende2.Text = \" \"";
__ref._l_atiende2 /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(" "));
 };
RDebugUtils.currentLine=3670045;
 //BA.debugLineNum = 3670045;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=3670046;
 //BA.debugLineNum = 3670046;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=3670048;
 //BA.debugLineNum = 3670048;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
__ref._btadmin /*anywheresoftware.b4a.objects.Serial.BluetoothAdmin*/ .Initialize(ba,"BlueTeeth");
RDebugUtils.currentLine=3670049;
 //BA.debugLineNum = 3670049;BA.debugLine="cmp20.Initialize(\"Printer\")";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Initialize("Printer");
RDebugUtils.currentLine=3670050;
 //BA.debugLineNum = 3670050;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
RDebugUtils.currentLine=3670051;
 //BA.debugLineNum = 3670051;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_mazapa.keymon.lat.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
RDebugUtils.currentLine=3538944;
 //BA.debugLineNum = 3538944;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=3538945;
 //BA.debugLineNum = 3538945;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=3538946;
 //BA.debugLineNum = 3538946;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=3538947;
 //BA.debugLineNum = 3538947;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=3538948;
 //BA.debugLineNum = 3538948;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=3538949;
 //BA.debugLineNum = 3538949;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=3538950;
 //BA.debugLineNum = 3538950;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=3538951;
 //BA.debugLineNum = 3538951;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=3538952;
 //BA.debugLineNum = 3538952;BA.debugLine="Dim btAdmin As BluetoothAdmin";
_btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin();
RDebugUtils.currentLine=3538953;
 //BA.debugLineNum = 3538953;BA.debugLine="Dim cmp20 As Serial";
_cmp20 = new anywheresoftware.b4a.objects.Serial();
RDebugUtils.currentLine=3538954;
 //BA.debugLineNum = 3538954;BA.debugLine="Dim printer As TextWriter";
_printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
RDebugUtils.currentLine=3538955;
 //BA.debugLineNum = 3538955;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=3538956;
 //BA.debugLineNum = 3538956;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=3538957;
 //BA.debugLineNum = 3538957;BA.debugLine="Dim TAMANO As Int";
_tamano = 0;
RDebugUtils.currentLine=3538958;
 //BA.debugLineNum = 3538958;BA.debugLine="Dim ESPACIO As Int";
_espacio = 0;
RDebugUtils.currentLine=3538959;
 //BA.debugLineNum = 3538959;BA.debugLine="Dim BLANCO As String";
_blanco = "";
RDebugUtils.currentLine=3538960;
 //BA.debugLineNum = 3538960;BA.debugLine="Dim impresoraConectada As Boolean = False";
_impresoraconectada = __c.False;
RDebugUtils.currentLine=3538961;
 //BA.debugLineNum = 3538961;BA.debugLine="Dim LONGITUD As String";
_longitud = "";
RDebugUtils.currentLine=3538962;
 //BA.debugLineNum = 3538962;BA.debugLine="Dim LATITUD As String";
_latitud = "";
RDebugUtils.currentLine=3538963;
 //BA.debugLineNum = 3538963;BA.debugLine="Dim NOMBRE As String";
_nombre = "";
RDebugUtils.currentLine=3538964;
 //BA.debugLineNum = 3538964;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=3538965;
 //BA.debugLineNum = 3538965;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=3538966;
 //BA.debugLineNum = 3538966;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=3538967;
 //BA.debugLineNum = 3538967;BA.debugLine="Dim la_cuenta As Label";
_la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538968;
 //BA.debugLineNum = 3538968;BA.debugLine="Dim La_nombre As Label";
_la_nombre = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538969;
 //BA.debugLineNum = 3538969;BA.debugLine="Dim la_Calle As Label";
_la_calle = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538970;
 //BA.debugLineNum = 3538970;BA.debugLine="Dim la_numero As Label";
_la_numero = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538971;
 //BA.debugLineNum = 3538971;BA.debugLine="Dim la_nint As Label";
_la_nint = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538972;
 //BA.debugLineNum = 3538972;BA.debugLine="Dim la_edo As Label";
_la_edo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538973;
 //BA.debugLineNum = 3538973;BA.debugLine="Dim la_pob As Label";
_la_pob = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538974;
 //BA.debugLineNum = 3538974;BA.debugLine="Dim la_col As Label";
_la_col = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538975;
 //BA.debugLineNum = 3538975;BA.debugLine="Dim la_cp As Label";
_la_cp = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538976;
 //BA.debugLineNum = 3538976;BA.debugLine="Dim la_zona As Label";
_la_zona = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538977;
 //BA.debugLineNum = 3538977;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3538978;
 //BA.debugLineNum = 3538978;BA.debugLine="Dim la_saldotot As Label";
_la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538979;
 //BA.debugLineNum = 3538979;BA.debugLine="Dim la_saldooper As Label";
_la_saldooper = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538980;
 //BA.debugLineNum = 3538980;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new reparto_mazapa.keymon.lat.dbrequestmanager();
RDebugUtils.currentLine=3538981;
 //BA.debugLineNum = 3538981;BA.debugLine="Dim b_noEntrega As Button";
_b_noentrega = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3538982;
 //BA.debugLineNum = 3538982;BA.debugLine="Dim Label10 As Label";
_label10 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538983;
 //BA.debugLineNum = 3538983;BA.debugLine="Dim Label11 As Label";
_label11 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538984;
 //BA.debugLineNum = 3538984;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=3538985;
 //BA.debugLineNum = 3538985;BA.debugLine="Dim Tar As Button";
_tar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3538986;
 //BA.debugLineNum = 3538986;BA.debugLine="Private L_QR As Label";
_l_qr = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538987;
 //BA.debugLineNum = 3538987;BA.debugLine="Private BT_QR As Button";
_bt_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3538988;
 //BA.debugLineNum = 3538988;BA.debugLine="Dim Printer1 As EscPosPrinter";
_printer1 = new reparto_mazapa.keymon.lat.escposprinter();
RDebugUtils.currentLine=3538989;
 //BA.debugLineNum = 3538989;BA.debugLine="Dim la_comm As Label";
_la_comm = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538990;
 //BA.debugLineNum = 3538990;BA.debugLine="Dim la_actdte As Label";
_la_actdte = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538991;
 //BA.debugLineNum = 3538991;BA.debugLine="Dim la_usuario As Label";
_la_usuario = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538992;
 //BA.debugLineNum = 3538992;BA.debugLine="Dim la_resultado As Label";
_la_resultado = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538993;
 //BA.debugLineNum = 3538993;BA.debugLine="Dim l_entre1 As Label";
_l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538994;
 //BA.debugLineNum = 3538994;BA.debugLine="Dim l_entre2 As Label";
_l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538995;
 //BA.debugLineNum = 3538995;BA.debugLine="Dim l_atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538996;
 //BA.debugLineNum = 3538996;BA.debugLine="Dim l_atiende2 As Label";
_l_atiende2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3538997;
 //BA.debugLineNum = 3538997;BA.debugLine="Dim DATOS As Button";
_datos = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3538998;
 //BA.debugLineNum = 3538998;BA.debugLine="Dim Guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3538999;
 //BA.debugLineNum = 3538999;BA.debugLine="Dim NUEVO As Button";
_nuevo = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3539000;
 //BA.debugLineNum = 3539000;BA.debugLine="Private l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539001;
 //BA.debugLineNum = 3539001;BA.debugLine="Private HIST As Button";
_hist = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3539002;
 //BA.debugLineNum = 3539002;BA.debugLine="Dim PASA_IMP As String";
_pasa_imp = "";
RDebugUtils.currentLine=3539003;
 //BA.debugLineNum = 3539003;BA.debugLine="Private B_IMP As Button";
_b_imp = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3539004;
 //BA.debugLineNum = 3539004;BA.debugLine="Dim total_cliente As String";
_total_cliente = "";
RDebugUtils.currentLine=3539005;
 //BA.debugLineNum = 3539005;BA.debugLine="Dim CREDITO As String";
_credito = "";
RDebugUtils.currentLine=3539006;
 //BA.debugLineNum = 3539006;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=3539007;
 //BA.debugLineNum = 3539007;BA.debugLine="Private B_PASO2 As Button";
_b_paso2 = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3539008;
 //BA.debugLineNum = 3539008;BA.debugLine="Private L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539009;
 //BA.debugLineNum = 3539009;BA.debugLine="Dim errorImpresora As Int = 0";
_errorimpresora = (int) (0);
RDebugUtils.currentLine=3539010;
 //BA.debugLineNum = 3539010;BA.debugLine="Dim banderaimp As Int";
_banderaimp = 0;
RDebugUtils.currentLine=3539011;
 //BA.debugLineNum = 3539011;BA.debugLine="Private l_credi As Label";
_l_credi = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539012;
 //BA.debugLineNum = 3539012;BA.debugLine="Private l_pagare As Label";
_l_pagare = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539013;
 //BA.debugLineNum = 3539013;BA.debugLine="Private l_montopag As Label";
_l_montopag = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539014;
 //BA.debugLineNum = 3539014;BA.debugLine="Private l_efectivo As Label";
_l_efectivo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539015;
 //BA.debugLineNum = 3539015;BA.debugLine="Private l_montoefec As Label";
_l_montoefec = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=3539016;
 //BA.debugLineNum = 3539016;BA.debugLine="Dim distance As Long";
_distance = 0L;
RDebugUtils.currentLine=3539017;
 //BA.debugLineNum = 3539017;BA.debugLine="Private b_visitasinentrega As Button";
_b_visitasinentrega = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=3539018;
 //BA.debugLineNum = 3539018;BA.debugLine="End Sub";
return "";
}
public String  _datos_click(reparto_mazapa.keymon.lat.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=4325376;
 //BA.debugLineNum = 4325376;BA.debugLine="Sub DATOS_Click";
RDebugUtils.currentLine=4325378;
 //BA.debugLineNum = 4325378;BA.debugLine="End Sub";
return "";
}
public String  _gest_click(reparto_mazapa.keymon.lat.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=3997696;
 //BA.debugLineNum = 3997696;BA.debugLine="Sub gest_Click";
RDebugUtils.currentLine=3997697;
 //BA.debugLineNum = 3997697;BA.debugLine="B_IMP_Click";
__ref._b_imp_click /*String*/ (null);
RDebugUtils.currentLine=3997698;
 //BA.debugLineNum = 3997698;BA.debugLine="banderaimp = 1";
__ref._banderaimp /*int*/  = (int) (1);
RDebugUtils.currentLine=3997699;
 //BA.debugLineNum = 3997699;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(reparto_mazapa.keymon.lat.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;
String _habi = "";
RDebugUtils.currentLine=3866624;
 //BA.debugLineNum = 3866624;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=3866626;
 //BA.debugLineNum = 3866626;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=3866627;
 //BA.debugLineNum = 3866627;BA.debugLine="B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude());
RDebugUtils.currentLine=3866628;
 //BA.debugLineNum = 3866628;BA.debugLine="B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLongitude());
RDebugUtils.currentLine=3866629;
 //BA.debugLineNum = 3866629;BA.debugLine="Log(\"Coords set to: \" & B4XPages.MainPage.lat_gp";
__c.LogImpl("33866629","Coords set to: "+_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ +" and "+_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,0);
 };
RDebugUtils.currentLine=3866632;
 //BA.debugLineNum = 3866632;BA.debugLine="If LATITUD.Length < 5 Then";
if (__ref._latitud /*String*/ .length()<5) { 
 }else {
RDebugUtils.currentLine=3866637;
 //BA.debugLineNum = 3866637;BA.debugLine="Dim l1, l2 As Location";
_l1 = new anywheresoftware.b4a.gps.LocationWrapper();
_l2 = new anywheresoftware.b4a.gps.LocationWrapper();
RDebugUtils.currentLine=3866638;
 //BA.debugLineNum = 3866638;BA.debugLine="l1.Initialize2(B4XPages.MainPage.lat_gps, B4XPag";
_l1.Initialize2(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ );
RDebugUtils.currentLine=3866639;
 //BA.debugLineNum = 3866639;BA.debugLine="Log($\"Coordenadas de la tienda - lat:${LATITUD},";
__c.LogImpl("33866639",("Coordenadas de la tienda - lat:"+__c.SmartStringFormatter("",(Object)(__ref._latitud /*String*/ ))+", lon:"+__c.SmartStringFormatter("",(Object)(__ref._longitud /*String*/ ))+""),0);
RDebugUtils.currentLine=3866640;
 //BA.debugLineNum = 3866640;BA.debugLine="l2.Initialize2(LATITUD, LONGITUD)";
_l2.Initialize2(__ref._latitud /*String*/ ,__ref._longitud /*String*/ );
RDebugUtils.currentLine=3866645;
 //BA.debugLineNum = 3866645;BA.debugLine="distance =    l1.DistanceTo(l2)  'the result is";
__ref._distance /*long*/  = (long) (_l1.DistanceTo((android.location.Location)(_l2.getObject())));
RDebugUtils.currentLine=3866647;
 //BA.debugLineNum = 3866647;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT HABILITADO FR";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT HABILITADO FROM GPS")));
RDebugUtils.currentLine=3866648;
 //BA.debugLineNum = 3866648;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=3866649;
 //BA.debugLineNum = 3866649;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=3866650;
 //BA.debugLineNum = 3866650;BA.debugLine="Dim habi As String = c.GetString(\"HABILITADO\")";
_habi = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HABILITADO");
 };
RDebugUtils.currentLine=3866664;
 //BA.debugLineNum = 3866664;BA.debugLine="Log(\"DISTANCIA \"&distance)";
__c.LogImpl("33866664","DISTANCIA "+BA.NumberToString(__ref._distance /*long*/ ),0);
 };
RDebugUtils.currentLine=3866667;
 //BA.debugLineNum = 3866667;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=3866668;
 //BA.debugLineNum = 3866668;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=3866669;
 //BA.debugLineNum = 3866669;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=3866670;
 //BA.debugLineNum = 3866670;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=3866671;
 //BA.debugLineNum = 3866671;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM HIST_GPS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
RDebugUtils.currentLine=3866672;
 //BA.debugLineNum = 3866672;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  HIST_GPS";
_starter._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 /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
RDebugUtils.currentLine=3866673;
 //BA.debugLineNum = 3866673;BA.debugLine="CallSubDelayed(Tracker, \"CreateLocationRequest\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"CreateLocationRequest");
RDebugUtils.currentLine=3866674;
 //BA.debugLineNum = 3866674;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientesreparto(reparto_mazapa.keymon.lat.c_cliente __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "mandapendientesreparto", false))
	 {return ((String) Debug.delegate(ba, "mandapendientesreparto", null));}
int _i = 0;
reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand _cmd = null;
RDebugUtils.currentLine=4915200;
 //BA.debugLineNum = 4915200;BA.debugLine="Sub mandaPendientesreparto";
RDebugUtils.currentLine=4915201;
 //BA.debugLineNum = 4915201;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT  CLIENTE, 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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT  CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO FROM REPARTO_GEO where ENVIO <> 1")));
RDebugUtils.currentLine=4915202;
 //BA.debugLineNum = 4915202;BA.debugLine="Log($\"REPARTO_Cliente PENDIENTE: ${c.RowCount}\"$)";
__c.LogImpl("34915202",("REPARTO_Cliente PENDIENTE: "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()))+""),0);
RDebugUtils.currentLine=4915203;
 //BA.debugLineNum = 4915203;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=4915204;
 //BA.debugLineNum = 4915204;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step4 = 1;
final int limit4 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
RDebugUtils.currentLine=4915205;
 //BA.debugLineNum = 4915205;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=4915207;
 //BA.debugLineNum = 4915207;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=4915208;
 //BA.debugLineNum = 4915208;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
RDebugUtils.currentLine=4915210;
 //BA.debugLineNum = 4915210;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"C";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CLIENTE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("FECHA_PUNTEO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("LATITUD")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("LONGITUD")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("ALMACEN")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTA_REPARTO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTA_PREV")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("FECHA_PREVENTA")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("MOTIVO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("COMENTARIO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TIPO"))};
RDebugUtils.currentLine=4915211;
 //BA.debugLineNum = 4915211;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_REPARTOPe";
__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._executecommand /*String*/ (null,_cmd,(Object)(("ins_REPARTOPendientes_head_"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CLIENTE")))+"")));
 }
};
 };
RDebugUtils.currentLine=4915215;
 //BA.debugLineNum = 4915215;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=4915216;
 //BA.debugLineNum = 4915216;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click(reparto_mazapa.keymon.lat.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));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null;
RDebugUtils.currentLine=4390912;
 //BA.debugLineNum = 4390912;BA.debugLine="Sub Guardar_Click";
RDebugUtils.currentLine=4390913;
 //BA.debugLineNum = 4390913;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQuery(";
_mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0 AND cat_cl_codigo <> 63403")));
RDebugUtils.currentLine=4390914;
 //BA.debugLineNum = 4390914;BA.debugLine="If mandamapa.RowCount > 0 Then";
if (_mandamapa.getRowCount()>0) { 
RDebugUtils.currentLine=4390915;
 //BA.debugLineNum = 4390915;BA.debugLine="StartActivity(MAPA_RUTAS)";
__c.StartActivity(ba,(Object)(_mapa_rutas.getObject()));
 }else 
{RDebugUtils.currentLine=4390916;
 //BA.debugLineNum = 4390916;BA.debugLine="Else If mandamapa.RowCount = 0 Then";
if (_mandamapa.getRowCount()==0) { 
RDebugUtils.currentLine=4390917;
 //BA.debugLineNum = 4390917;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }}
;
RDebugUtils.currentLine=4390919;
 //BA.debugLineNum = 4390919;BA.debugLine="End Sub";
return "";
}
public String  _hist_click(reparto_mazapa.keymon.lat.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=4521984;
 //BA.debugLineNum = 4521984;BA.debugLine="Sub HIST_Click";
RDebugUtils.currentLine=4521988;
 //BA.debugLineNum = 4521988;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Initializ";
_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_mazapa.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=4521990;
 //BA.debugLineNum = 4521990;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")";
_b4xpages._showpage /*String*/ (ba,"DetalleVenta");
RDebugUtils.currentLine=4521991;
 //BA.debugLineNum = 4521991;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(reparto_mazapa.keymon.lat.c_cliente __ref,reparto_mazapa.keymon.lat.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}));}
reparto_mazapa.keymon.lat.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
RDebugUtils.currentLine=4980736;
 //BA.debugLineNum = 4980736;BA.debugLine="Sub JobDone(Job As HttpJob)";
RDebugUtils.currentLine=4980737;
 //BA.debugLineNum = 4980737;BA.debugLine="Log(Job.Success)";
__c.LogImpl("34980737",BA.ObjectToString(_job._success /*boolean*/ ),0);
RDebugUtils.currentLine=4980738;
 //BA.debugLineNum = 4980738;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
RDebugUtils.currentLine=4980741;
 //BA.debugLineNum = 4980741;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("34980741","JobDone: '"+BA.ObjectToString(__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (null,_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (null,_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
RDebugUtils.currentLine=4980742;
 //BA.debugLineNum = 4980742;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=4980743;
 //BA.debugLineNum = 4980743;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=4980744;
 //BA.debugLineNum = 4980744;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_REPARTOPendientes_head_")>-1) { 
RDebugUtils.currentLine=4980745;
 //BA.debugLineNum = 4980745;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
RDebugUtils.currentLine=4980746;
 //BA.debugLineNum = 4980746;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
RDebugUtils.currentLine=4980747;
 //BA.debugLineNum = 4980747;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("34980747",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
RDebugUtils.currentLine=4980748;
 //BA.debugLineNum = 4980748;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update REPARTO_GEO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update REPARTO_GEO SET ENVIO = ? WHERE CLIENTE = ? AND ENVIO <> ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente,"1"}));
RDebugUtils.currentLine=4980749;
 //BA.debugLineNum = 4980749;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=4980750;
 //BA.debugLineNum = 4980750;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=4980751;
 //BA.debugLineNum = 4980751;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("34980751",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=4980756;
 //BA.debugLineNum = 4980756;BA.debugLine="Job.Release";
_job._release /*String*/ (null);
 };
RDebugUtils.currentLine=4980759;
 //BA.debugLineNum = 4980759;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(reparto_mazapa.keymon.lat.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=3932160;
 //BA.debugLineNum = 3932160;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=3932162;
 //BA.debugLineNum = 3932162;BA.debugLine="End Sub";
return "";
}
public String  _nuevo_click(reparto_mazapa.keymon.lat.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=4456448;
 //BA.debugLineNum = 4456448;BA.debugLine="Sub NUEVO_Click";
RDebugUtils.currentLine=4456449;
 //BA.debugLineNum = 4456449;BA.debugLine="StartActivity(MAPA_CLIENTE)";
__c.StartActivity(ba,(Object)(_mapa_cliente.getObject()));
RDebugUtils.currentLine=4456450;
 //BA.debugLineNum = 4456450;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(reparto_mazapa.keymon.lat.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=4718592;
 //BA.debugLineNum = 4718592;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
RDebugUtils.currentLine=4718593;
 //BA.debugLineNum = 4718593;BA.debugLine="If Success Then";
if (_success) { 
RDebugUtils.currentLine=4718594;
 //BA.debugLineNum = 4718594;BA.debugLine="B_IMP.Enabled = True";
__ref._b_imp /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);
RDebugUtils.currentLine=4718595;
 //BA.debugLineNum = 4718595;BA.debugLine="PASA_IMP = \"1\"";
__ref._pasa_imp /*String*/  = "1";
 }else {
RDebugUtils.currentLine=4718597;
 //BA.debugLineNum = 4718597;BA.debugLine="B_IMP.Enabled = False";
__ref._b_imp /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);
RDebugUtils.currentLine=4718598;
 //BA.debugLineNum = 4718598;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=4718599;
 //BA.debugLineNum = 4718599;BA.debugLine="StartPrinter";
__ref._startprinter /*String*/ (null);
 };
 };
RDebugUtils.currentLine=4718602;
 //BA.debugLineNum = 4718602;BA.debugLine="End Sub";
return "";
}
public String  _startprinter(reparto_mazapa.keymon.lat.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=4784128;
 //BA.debugLineNum = 4784128;BA.debugLine="Sub StartPrinter";
RDebugUtils.currentLine=4784129;
 //BA.debugLineNum = 4784129;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=4784130;
 //BA.debugLineNum = 4784130;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=4784131;
 //BA.debugLineNum = 4784131;BA.debugLine="Dim resimp As Int";
_resimp = 0;
RDebugUtils.currentLine=4784132;
 //BA.debugLineNum = 4784132;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
RDebugUtils.currentLine=4784133;
 //BA.debugLineNum = 4784133;BA.debugLine="PairedDevices.Initialize";
__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
RDebugUtils.currentLine=4784134;
 //BA.debugLineNum = 4784134;BA.debugLine="Try";
try {RDebugUtils.currentLine=4784135;
 //BA.debugLineNum = 4784135;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=4784137;
 //BA.debugLineNum = 4784137;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
RDebugUtils.currentLine=4784138;
 //BA.debugLineNum = 4784138;BA.debugLine="printer.Close";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .Close();
RDebugUtils.currentLine=4784139;
 //BA.debugLineNum = 4784139;BA.debugLine="cmp20.Disconnect";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Disconnect();
 };
RDebugUtils.currentLine=4784141;
 //BA.debugLineNum = 4784141;BA.debugLine="If PairedDevices.Size = 0 Then";
if (__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .getSize()==0) { 
RDebugUtils.currentLine=4784142;
 //BA.debugLineNum = 4784142;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=4784143;
 //BA.debugLineNum = 4784143;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=4784145;
 //BA.debugLineNum = 4784145;BA.debugLine="If PairedDevices.Size = 1 Then";
if (__ref._paireddevices /*anywheresoftware.b4a.objects.collections.Map*/ .getSize()==1) { 
RDebugUtils.currentLine=4784146;
 //BA.debugLineNum = 4784146;BA.debugLine="Try";
try {RDebugUtils.currentLine=4784148;
 //BA.debugLineNum = 4784148;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=4784151;
 //BA.debugLineNum = 4784151;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
RDebugUtils.currentLine=4784152;
 //BA.debugLineNum = 4784152;BA.debugLine="printer.Close";
__ref._printer /*anywheresoftware.b4a.objects.streams.File.TextWriterWrapper*/ .Close();
RDebugUtils.currentLine=4784153;
 //BA.debugLineNum = 4784153;BA.debugLine="cmp20.Disconnect";
__ref._cmp20 /*anywheresoftware.b4a.objects.Serial*/ .Disconnect();
 };
 }else {
RDebugUtils.currentLine=4784156;
 //BA.debugLineNum = 4784156;BA.debugLine="L.Initialize";
__ref._l /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=4784157;
 //BA.debugLineNum = 4784157;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=4784158;
 //BA.debugLineNum = 4784158;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=4784160;
 //BA.debugLineNum = 4784160;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=4784161;
 //BA.debugLineNum = 4784161;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
RDebugUtils.currentLine=4784162;
 //BA.debugLineNum = 4784162;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=4784165;
 //BA.debugLineNum = 4784165;BA.debugLine="End Sub";
return "";
}
public String  _printer1_connected(reparto_mazapa.keymon.lat.c_cliente __ref,boolean _success) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_cliente";
if (Debug.shouldDelegate(ba, "printer1_connected", false))
	 {return ((String) Debug.delegate(ba, "printer1_connected", new Object[] {_success}));}
RDebugUtils.currentLine=4653056;
 //BA.debugLineNum = 4653056;BA.debugLine="Sub Printer1_Connected (Success As Boolean)";
RDebugUtils.currentLine=4653058;
 //BA.debugLineNum = 4653058;BA.debugLine="If Success Then";
if (_success) { 
RDebugUtils.currentLine=4653059;
 //BA.debugLineNum = 4653059;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False);
RDebugUtils.currentLine=4653060;
 //BA.debugLineNum = 4653060;BA.debugLine="Starter.skmt.ExecNonQuery2(\"delete from CAT_VARI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MACIMP")}));
RDebugUtils.currentLine=4653061;
 //BA.debugLineNum = 4653061;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_VARI";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MACIMP"),(Object)(_starter._mac_impresora /*String*/ )}));
RDebugUtils.currentLine=4653062;
 //BA.debugLineNum = 4653062;BA.debugLine="LogColor(\"Impresora conectada\", Colors.Green)";
__c.LogImpl("34653062","Impresora conectada",__c.Colors.Green);
RDebugUtils.currentLine=4653064;
 //BA.debugLineNum = 4653064;BA.debugLine="impresoraConectada = True";
__ref._impresoraconectada /*boolean*/  = __c.True;
 }else {
RDebugUtils.currentLine=4653068;
 //BA.debugLineNum = 4653068;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors";
__c.LogImpl("34653068","Error conectando la impresora",__c.Colors.Red);
RDebugUtils.currentLine=4653069;
 //BA.debugLineNum = 4653069;BA.debugLine="errorImpresora = errorImpresora + 1";
__ref._errorimpresora /*int*/  = (int) (__ref._errorimpresora /*int*/ +1);
RDebugUtils.currentLine=4653070;
 //BA.debugLineNum = 4653070;BA.debugLine="If errorImpresora > 1 Then";
if (__ref._errorimpresora /*int*/ >1) { 
RDebugUtils.currentLine=4653071;
 //BA.debugLineNum = 4653071;BA.debugLine="Starter.MAC_IMPRESORA = \"0\"";
_starter._mac_impresora /*String*/  = "0";
RDebugUtils.currentLine=4653072;
 //BA.debugLineNum = 4653072;BA.debugLine="errorImpresora = 0";
__ref._errorimpresora /*int*/  = (int) (0);
 };
 };
RDebugUtils.currentLine=4653075;
 //BA.debugLineNum = 4653075;BA.debugLine="End Sub";
return "";
}
public String  _tar_click(reparto_mazapa.keymon.lat.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=4259840;
 //BA.debugLineNum = 4259840;BA.debugLine="Sub Tar_Click";
RDebugUtils.currentLine=4259842;
 //BA.debugLineNum = 4259842;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
RDebugUtils.currentLine=4259843;
 //BA.debugLineNum = 4259843;BA.debugLine="End Sub";
return "";
}
}