package reparto_intmex.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 BA(_ba, this, htSubs, "reparto_intmex.keymon.lat.c_cliente");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_intmex.keymon.lat.c_cliente.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 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_intmex.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.IME _ime = 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_intmex.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 anywheresoftware.b4a.objects.PanelWrapper _p_credito = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_acred = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancred = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_montoacredito = null;
public anywheresoftware.b4a.objects.LabelWrapper _label16 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_limite = null;
public String _almacen = "";
public String _fechaprev = "";
public String _rutaprev = "";
public String _rutarep = "";
public String _montopagare = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_abono = null;
public b4a.example3.customlistview _clv_abonos = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_abono = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cancelar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_abono = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_montoabonostotal = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _h = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _j = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _b = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_folio = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_saldo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_cxc = null;
public reparto_intmex.keymon.lat.b4xcombobox _cb_tipopago = null;
public String _itemselect = "";
public b4a.example.dateutils _dateutils = null;
public reparto_intmex.keymon.lat.main _main = null;
public reparto_intmex.keymon.lat.appupdater _appupdater = null;
public reparto_intmex.keymon.lat.starter _starter = null;
public reparto_intmex.keymon.lat.foto _foto = null;
public reparto_intmex.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_intmex.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_intmex.keymon.lat.subs _subs = null;
public reparto_intmex.keymon.lat.tracker _tracker = null;
public reparto_intmex.keymon.lat.newinst2 _newinst2 = null;
public reparto_intmex.keymon.lat.b4xpages _b4xpages = null;
public reparto_intmex.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_intmex.keymon.lat.httputils2service _httputils2service = null;
public reparto_intmex.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _activity_pause(boolean _userclosed) throws Exception{
 //BA.debugLineNum = 341;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
 //BA.debugLineNum = 343;BA.debugLine="End Sub";
return "";
}
public void  _b_abono_click() throws Exception{
ResumableSub_b_abono_Click rsub = new ResumableSub_b_abono_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_b_abono_Click extends BA.ResumableSub {
public ResumableSub_b_abono_Click(reparto_intmex.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_intmex.keymon.lat.c_cliente parent;
anywheresoftware.b4a.sql.SQL.CursorWrapper _con = null;
int _consecutivo = 0;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d5 = null;
int _resultado = 0;
int step10;
int limit10;

@Override
public void resume(BA ba, Object[] result) throws Exception{

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

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 1357;BA.debugLine="If et_abono.Text <> \"\" Then";
if (true) break;

case 1:
//if
this.state = 28;
if ((parent._et_abono.getText()).equals("") == false) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 1358;BA.debugLine="If et_abono.text > l_montoabonostotal.text Then";
if (true) break;

case 4:
//if
this.state = 27;
if ((double)(Double.parseDouble(parent._et_abono.getText()))>(double)(Double.parseDouble(parent._l_montoabonostotal.getText()))) { 
this.state = 6;
}else {
this.state = 8;
}if (true) break;

case 6:
//C
this.state = 27;
 //BA.debugLineNum = 1359;BA.debugLine="MsgboxAsync(\"El monto a abonar no puede ser may";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("El monto a abonar no puede ser mayor que el monto total"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 8:
//C
this.state = 9;
 //BA.debugLineNum = 1361;BA.debugLine="If et_abono.Text <> \"\" And et_abono.Text > 0 Th";
if (true) break;

case 9:
//if
this.state = 26;
if ((parent._et_abono.getText()).equals("") == false && (double)(Double.parseDouble(parent._et_abono.getText()))>0) { 
this.state = 11;
}if (true) break;

case 11:
//C
this.state = 12;
 //BA.debugLineNum = 1362;BA.debugLine="If itemselect <> \"SELECCIONA UNA OPCION\" Then";
if (true) break;

case 12:
//if
this.state = 25;
if ((parent._itemselect).equals("SELECCIONA UNA OPCION") == false) { 
this.state = 14;
}else {
this.state = 24;
}if (true) break;

case 14:
//C
this.state = 15;
 //BA.debugLineNum = 1372;BA.debugLine="Dim con As Cursor = Starter.skmt.ExecQuery(\"S";
_con = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_con = (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 ABONOS WHERE a_cliente in (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1373;BA.debugLine="Private consecutivo As Int = con.RowCount +1";
_consecutivo = (int) (_con.getRowCount()+1);
 //BA.debugLineNum = 1375;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT NOTA, SALD";
parent._d = (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 NOTA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE in (SELECT CUENTA FROM CUENTAA) AND SALDO_PENDIENTE <> 0")));
 //BA.debugLineNum = 1377;BA.debugLine="For i = 0 To d.RowCount - 1";
if (true) break;

case 15:
//for
this.state = 18;
step10 = 1;
limit10 = (int) (parent._d.getRowCount()-1);
_i = (int) (0) ;
this.state = 29;
if (true) break;

case 29:
//C
this.state = 18;
if ((step10 > 0 && _i <= limit10) || (step10 < 0 && _i >= limit10)) this.state = 17;
if (true) break;

case 30:
//C
this.state = 29;
_i = ((int)(0 + _i + step10)) ;
if (true) break;

case 17:
//C
this.state = 30;
 //BA.debugLineNum = 1378;BA.debugLine="d.Position = i";
parent._d.setPosition(_i);
 //BA.debugLineNum = 1379;BA.debugLine="Log(d.GetString(\"NOTA\"))";
parent.__c.LogImpl("89568280",parent._d.GetString("NOTA"),0);
 //BA.debugLineNum = 1380;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
parent.__c.LogImpl("89568281",parent._d.GetString("SALDO_PENDIENTE"),0);
 if (true) break;
if (true) break;

case 18:
//C
this.state = 19;
;
 //BA.debugLineNum = 1385;BA.debugLine="Dim d5 As Cursor= Starter.skmt.ExecQuery(\"SEL";
_d5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d5 = (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")));
 //BA.debugLineNum = 1387;BA.debugLine="d5.Position = 0";
_d5.setPosition((int) (0));
 //BA.debugLineNum = 1393;BA.debugLine="Msgbox2Async($\"¿Seguro que quieres realizar u";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence(("¿Seguro que quieres realizar un abono de $"+parent.__c.SmartStringFormatter("",(Object)(parent._et_abono.getText()))+" para este cliente?")),BA.ObjectToCharSequence("Guardar Abono"),"Guardar","Cancelar","",(anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper(), (android.graphics.Bitmap)(parent.__c.Null)),ba,parent.__c.True);
 //BA.debugLineNum = 1394;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 31;
return;
case 31:
//C
this.state = 19;
_resultado = (Integer) result[0];
;
 //BA.debugLineNum = 1395;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 19:
//if
this.state = 22;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 21;
}if (true) break;

case 21:
//C
this.state = 22;
 //BA.debugLineNum = 1396;BA.debugLine="p_abono.Visible = False";
parent._p_abono.setVisible(parent.__c.False);
 //BA.debugLineNum = 1397;BA.debugLine="Starter.skmt.ExecNonQuery($\"INSERT INTO ABON";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("INSERT INTO ABONOS(a_usuario, a_ruta, a_cliente, a_abono, a_fecha, TIPO_PAGO, CONSECUTIVO, NUM_TICKET, RUTA_REP) VALUES ('"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeusuariodebd /*String*/ (ba)))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traeruta /*String*/ (ba,parent._subs._traecliente /*String*/ (ba))))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._traecliente /*String*/ (ba)))+"' ,'"+parent.__c.SmartStringFormatter("",(Object)(parent._et_abono.getText()))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._subs._fechakmt /*String*/ (ba,BA.NumberToString(parent.__c.DateTime.getNow()))))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._itemselect))+"', '"+parent.__c.SmartStringFormatter("",(Object)(_consecutivo))+"', '"+parent.__c.SmartStringFormatter("",(Object)(parent._d.GetString("NOTA")))+"' , '"+parent.__c.SmartStringFormatter("",(Object)(_d5.GetString("RUTAA")))+"')"));
 //BA.debugLineNum = 1398;BA.debugLine="ToastMessageShow(\"Abono guardado\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Abono guardado"),parent.__c.False);
 if (true) break;

case 22:
//C
this.state = 25;
;
 //BA.debugLineNum = 1414;BA.debugLine="d.Close";
parent._d.Close();
 //BA.debugLineNum = 1415;BA.debugLine="d5.Close";
_d5.Close();
 if (true) break;

case 24:
//C
this.state = 25;
 //BA.debugLineNum = 1417;BA.debugLine="MsgboxAsync(\"Por favor selecciona un metodo d";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor selecciona un metodo de pago"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 25:
//C
this.state = 26;
;
 if (true) break;

case 26:
//C
this.state = 27;
;
 if (true) break;

case 27:
//C
this.state = 28;
;
 if (true) break;

case 28:
//C
this.state = -1;
;
 //BA.debugLineNum = 1422;BA.debugLine="ime.HideKeyboard";
parent._ime.HideKeyboard(ba);
 //BA.debugLineNum = 1423;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _msgbox_result(int _resultado) throws Exception{
}
public String  _b_acred_click() throws Exception{
 //BA.debugLineNum = 1086;BA.debugLine="Private Sub b_acred_Click";
 //BA.debugLineNum = 1087;BA.debugLine="If et_montoacredito.Text > l_total.Text Then";
if ((double)(Double.parseDouble(_et_montoacredito.getText()))>(double)(Double.parseDouble(_l_total.getText()))) { 
 //BA.debugLineNum = 1088;BA.debugLine="MsgboxAsync(\"El monto del pagare no puede ser ma";
__c.MsgboxAsync(BA.ObjectToCharSequence("El monto del pagare no puede ser mayor a la venta"),BA.ObjectToCharSequence("Atención"),ba);
 }else {
 //BA.debugLineNum = 1090;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 1091;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1092;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1093;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1095;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cue";
_c = (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")));
 //BA.debugLineNum = 1096;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1097;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 1098;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1100;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from us";
_c = (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")));
 //BA.debugLineNum = 1101;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1102;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1103;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1105;BA.debugLine="c=Starter.skmt.ExecQuery(\"select ID_ALMACEN from";
_c = (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 ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 1106;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1107;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 1108;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1110;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_FECHA from";
_c = (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_FECHA from HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 1111;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1112;BA.debugLine="fechaprev = c.GetString(\"HVD_FECHA\")";
_fechaprev = _c.GetString("HVD_FECHA");
 //BA.debugLineNum = 1113;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1115;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_RUTA fro";
_c = (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)")));
 //BA.debugLineNum = 1116;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1117;BA.debugLine="rutaprev = c.GetString(\"CAT_CL_RUTA\")";
_rutaprev = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 1118;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1120;BA.debugLine="c=Starter.skmt.ExecQuery(\"select RUTAA from RUTA";
_c = (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")));
 //BA.debugLineNum = 1121;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1122;BA.debugLine="rutarep = c.GetString(\"RUTAA\")";
_rutarep = _c.GetString("RUTAA");
 //BA.debugLineNum = 1123;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1124;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  PAGARES";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  PAGARES (PA_ALMACEN, PA_RUTA_REP, PA_RUTAPREV, PA_FECHA_PREV, PA_CAPTURA, PA_MONTO, PA_USUARIO, PA_CLIENTE) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_almacen),(Object)(_rutarep),(Object)(_rutaprev),(Object)(_fechaprev),(Object)((_sdate)),(Object)(_et_montoacredito.getText()),(Object)(_usuario),(Object)(_cuenta)}));
 //BA.debugLineNum = 1125;BA.debugLine="et_montoacredito.Text = \"\"";
_et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1126;BA.debugLine="p_credito.Visible = False";
_p_credito.setVisible(__c.False);
 //BA.debugLineNum = 1127;BA.debugLine="Guardado";
_guardado();
 };
 //BA.debugLineNum = 1129;BA.debugLine="End Sub";
return "";
}
public String  _b_cancelar_click() throws Exception{
 //BA.debugLineNum = 1306;BA.debugLine="Private Sub b_cancelar_Click";
 //BA.debugLineNum = 1307;BA.debugLine="et_abono.Text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1308;BA.debugLine="p_abono.Visible = False";
_p_abono.setVisible(__c.False);
 //BA.debugLineNum = 1309;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 1310;BA.debugLine="End Sub";
return "";
}
public String  _b_cancred_click() throws Exception{
 //BA.debugLineNum = 1131;BA.debugLine="Private Sub b_cancred_Click";
 //BA.debugLineNum = 1132;BA.debugLine="et_montoacredito.Text = \"\"";
_et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1133;BA.debugLine="p_credito.Visible = False";
_p_credito.setVisible(__c.False);
 //BA.debugLineNum = 1134;BA.debugLine="End Sub";
return "";
}
public String  _b_cxc_click() throws Exception{
anywheresoftware.b4a.objects.collections.List _items = null;
double _total = 0;
int _i = 0;
 //BA.debugLineNum = 1198;BA.debugLine="Private Sub b_cxc_Click";
 //BA.debugLineNum = 1199;BA.debugLine="h = Starter.skmt.ExecQuery(\"SELECT CUENTA from CU";
_h = (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")));
 //BA.debugLineNum = 1200;BA.debugLine="h.Position = 0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 1201;BA.debugLine="Log(h.GetString(\"CUENTA\"))";
__c.LogImpl("89306115",_h.GetString("CUENTA"),0);
 //BA.debugLineNum = 1204;BA.debugLine="Dim Items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 1205;BA.debugLine="Items.Initialize";
_items.Initialize();
 //BA.debugLineNum = 1207;BA.debugLine="Items.Add(\"SELECCIONA UNA OPCION\")";
_items.Add((Object)("SELECCIONA UNA OPCION"));
 //BA.debugLineNum = 1208;BA.debugLine="Items.Add(\"TRANSFERENCIA\")";
_items.Add((Object)("TRANSFERENCIA"));
 //BA.debugLineNum = 1209;BA.debugLine="Items.Add(\"EFECTIVO\")";
_items.Add((Object)("EFECTIVO"));
 //BA.debugLineNum = 1210;BA.debugLine="Items.Add(\"CHEQUE\")";
_items.Add((Object)("CHEQUE"));
 //BA.debugLineNum = 1212;BA.debugLine="cb_tipopago.SetItems(Items)";
_cb_tipopago._setitems /*String*/ (_items);
 //BA.debugLineNum = 1214;BA.debugLine="itemselect= \"SELECCIONA UNA OPCION\"";
_itemselect = "SELECCIONA UNA OPCION";
 //BA.debugLineNum = 1216;BA.debugLine="j = Starter.skmt.ExecQuery2(\"SELECT a_abono FROM";
_j = (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 a_abono FROM ABONOS WHERE a_cliente = ?",new String[]{_h.GetString("CUENTA")})));
 //BA.debugLineNum = 1217;BA.debugLine="j.position = 0";
_j.setPosition((int) (0));
 //BA.debugLineNum = 1218;BA.debugLine="Log(j.RowCount)";
__c.LogImpl("89306132",BA.NumberToString(_j.getRowCount()),0);
 //BA.debugLineNum = 1219;BA.debugLine="If j.RowCount = 0 Then";
if (_j.getRowCount()==0) { 
 //BA.debugLineNum = 1220;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1221;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1222;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1223;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1224;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1225;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT CUENTA FROM C";
_f = (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")));
 //BA.debugLineNum = 1226;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1227;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT NOTA, SALDO_";
_d = (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 NOTA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE = ? AND SALDO_PENDIENTE <> 0",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1228;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1229;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step25 = 1;
final int limit25 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit25 ;_i = _i + step25 ) {
 //BA.debugLineNum = 1230;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1231;BA.debugLine="clv_abonos.Add(CreateListItem(d.GetString(\"NOTA";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_d.GetString("NOTA"),"$ "+_d.GetString("SALDO_PENDIENTE")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1232;BA.debugLine="Log(d.GetString(\"NOTA\"))";
__c.LogImpl("89306146",_d.GetString("NOTA"),0);
 //BA.debugLineNum = 1233;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
__c.LogImpl("89306147",_d.GetString("SALDO_PENDIENTE"),0);
 //BA.debugLineNum = 1234;BA.debugLine="total = total + d.GetString(\"SALDO_PENDIENTE\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("SALDO_PENDIENTE")));
 //BA.debugLineNum = 1235;BA.debugLine="Log(total)";
__c.LogImpl("89306149",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1237;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1238;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT  a_abono FRO";
_d = (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  a_abono FROM ABONOS WHERE a_cliente = ? ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1239;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1240;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step36 = 1;
final int limit36 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit36 ;_i = _i + step36 ) {
 //BA.debugLineNum = 1241;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1242;BA.debugLine="clv_abonos.Add(CreateListItem(\"ABONO\",\"$ \" & d";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem("ABONO","$ "+_d.GetString("a_abono")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1243;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1244;BA.debugLine="Log(total)";
__c.LogImpl("89306158",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1247;BA.debugLine="l_montoabonostotal.Text = NumberFormat2(total,0,";
_l_montoabonostotal.setText(BA.ObjectToCharSequence(__c.NumberFormat2(_total,(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 1248;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1249;BA.debugLine="f.Close";
_f.Close();
 }else if(_j.getRowCount()>0) { 
 //BA.debugLineNum = 1251;BA.debugLine="p_abono.Visible = True";
_p_abono.setVisible(__c.True);
 //BA.debugLineNum = 1252;BA.debugLine="p_abono.Height = Root.Height";
_p_abono.setHeight(_root.getHeight());
 //BA.debugLineNum = 1253;BA.debugLine="p_abono.Width = Root.Width";
_p_abono.setWidth(_root.getWidth());
 //BA.debugLineNum = 1254;BA.debugLine="et_abono.text = \"\"";
_et_abono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1255;BA.debugLine="Dim total As Double = 0";
_total = 0;
 //BA.debugLineNum = 1256;BA.debugLine="f = Starter.skmt.ExecQuery(\"SELECT CUENTA FROM C";
_f = (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")));
 //BA.debugLineNum = 1257;BA.debugLine="f.Position = 0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 1258;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT NOTA, SALDO_";
_d = (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 NOTA, SALDO_PENDIENTE FROM ABONOSP WHERE CLIENTE = ? AND SALDO_PENDIENTE <> 0",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1259;BA.debugLine="clv_abonos.Clear";
_clv_abonos._clear();
 //BA.debugLineNum = 1260;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step56 = 1;
final int limit56 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit56 ;_i = _i + step56 ) {
 //BA.debugLineNum = 1261;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1262;BA.debugLine="clv_abonos.Add(CreateListItem(d.GetString(\"NOTA";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_d.GetString("NOTA"),"$ "+_d.GetString("SALDO_PENDIENTE")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1263;BA.debugLine="Log(d.GetString(\"NOTA\"))";
__c.LogImpl("89306177",_d.GetString("NOTA"),0);
 //BA.debugLineNum = 1264;BA.debugLine="Log(d.GetString(\"SALDO_PENDIENTE\"))";
__c.LogImpl("89306178",_d.GetString("SALDO_PENDIENTE"),0);
 //BA.debugLineNum = 1265;BA.debugLine="total = total + d.GetString(\"SALDO_PENDIENTE\")";
_total = _total+(double)(Double.parseDouble(_d.GetString("SALDO_PENDIENTE")));
 //BA.debugLineNum = 1266;BA.debugLine="Log(total)";
__c.LogImpl("89306180",BA.NumberToString(_total),0);
 }
};
 //BA.debugLineNum = 1268;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1269;BA.debugLine="d = Starter.skmt.ExecQuery2(\"SELECT  a_abono FRO";
_d = (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  a_abono FROM ABONOS WHERE a_cliente = ? ",new String[]{_f.GetString("CUENTA")})));
 //BA.debugLineNum = 1270;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 1271;BA.debugLine="For i = 0 To d.RowCount - 1";
{
final int step67 = 1;
final int limit67 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit67 ;_i = _i + step67 ) {
 //BA.debugLineNum = 1272;BA.debugLine="d.Position = i";
_d.setPosition(_i);
 //BA.debugLineNum = 1273;BA.debugLine="clv_abonos.Add(CreateListItem(\"ABONO\",\"$ \" & d";
_clv_abonos._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem("ABONO","$ "+_d.GetString("a_abono")).getObject())),(Object)(_i));
 //BA.debugLineNum = 1274;BA.debugLine="total = total - d.GetString(\"a_abono\")";
_total = _total-(double)(Double.parseDouble(_d.GetString("a_abono")));
 //BA.debugLineNum = 1275;BA.debugLine="Log(total)";
__c.LogImpl("89306189",BA.NumberToString(_total),0);
 }
};
 };
 //BA.debugLineNum = 1278;BA.debugLine="l_montoabonostotal.Text = NumberFormat2(total,0,";
_l_montoabonostotal.setText(BA.ObjectToCharSequence(__c.NumberFormat2(_total,(int) (0),(int) (2),(int) (2),__c.False)));
 //BA.debugLineNum = 1279;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 1280;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 1283;BA.debugLine="h.Close";
_h.Close();
 //BA.debugLineNum = 1284;BA.debugLine="j.Close";
_j.Close();
 //BA.debugLineNum = 1285;BA.debugLine="End Sub";
return "";
}
public String  _b_imp_click() throws Exception{
 //BA.debugLineNum = 529;BA.debugLine="Sub B_IMP_Click";
 //BA.debugLineNum = 943;BA.debugLine="Guardado";
_guardado();
 //BA.debugLineNum = 944;BA.debugLine="End Sub";
return "";
}
public String  _b_noentrega_click() throws Exception{
 //BA.debugLineNum = 479;BA.debugLine="Sub b_noEntrega_Click";
 //BA.debugLineNum = 481;BA.debugLine="B4XPages.ShowPage(\"noVenta\")";
_b4xpages._showpage /*String*/ (ba,"noVenta");
 //BA.debugLineNum = 482;BA.debugLine="End Sub";
return "";
}
public String  _b_paso2_click() throws Exception{
 //BA.debugLineNum = 1018;BA.debugLine="Sub B_PASO2_Click";
 //BA.debugLineNum = 1019;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 1020;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1021;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1022;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
_c = (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")));
 //BA.debugLineNum = 1023;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1024;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 1025;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu";
_c = (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")));
 //BA.debugLineNum = 1026;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1027;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 1028;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 1029;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)");
 //BA.debugLineNum = 1030;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)(_cuenta),(Object)(_sdate+_stime),(Object)(_usuario),(Object)("PASO"),(Object)("PASO ESPERA"),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
 //BA.debugLineNum = 1036;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 1038;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
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 = "";
String _cabonos = "";
 //BA.debugLineNum = 144;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 145;BA.debugLine="banderaimp = 0";
_banderaimp = (int) (0);
 //BA.debugLineNum = 146;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_principal,_root.getWidth());
 //BA.debugLineNum = 147;BA.debugLine="Starter.skmt.Initialize(Starter.ruta,\"kmt.db\", Tr";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(_starter._ruta /*String*/ ,"kmt.db",__c.True);
 //BA.debugLineNum = 148;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 149;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO,CA";
_c = (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)")));
 //BA.debugLineNum = 150;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
_s = (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)")));
 //BA.debugLineNum = 151;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 152;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 153;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 154;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 155;BA.debugLine="NOMBRE = c.GetString(\"CAT_CL_NOMBRE\")";
_nombre = _c.GetString("CAT_CL_NOMBRE");
 //BA.debugLineNum = 156;BA.debugLine="LONGITUD = c.GetString(\"CAT_CL_LONG\")";
_longitud = _c.GetString("CAT_CL_LONG");
 //BA.debugLineNum = 157;BA.debugLine="LATITUD = c.GetString(\"CAT_CL_LAT\")";
_latitud = _c.GetString("CAT_CL_LAT");
 //BA.debugLineNum = 158;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT")));
 //BA.debugLineNum = 159;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 160;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
 //BA.debugLineNum = 161;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
_la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
 //BA.debugLineNum = 162;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 163;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 164;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENDE1")!= null && (_c.GetString("CAT_CL_ATIENDE1")).equals("null") == false) { 
 //BA.debugLineNum = 165;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 }else {
 //BA.debugLineNum = 167;BA.debugLine="l_atiende.Text = \" \"";
_l_atiende.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 169;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENTE2")!= null && (_c.GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { 
 //BA.debugLineNum = 170;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
 }else {
 //BA.debugLineNum = 172;BA.debugLine="l_atiende2.Text = \" \"";
_l_atiende2.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 174;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 175;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
 //BA.debugLineNum = 177;BA.debugLine="CREDITO = C.GetString(\"CAT_CL_BCREDITO\")";
_credito = _c.GetString("CAT_CL_BCREDITO");
 //BA.debugLineNum = 180;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));
 //BA.debugLineNum = 181;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
_l_cant.setText(BA.ObjectToCharSequence(_cym.Get((Object)("cantidad"))));
 //BA.debugLineNum = 182;BA.debugLine="l_total.Text = Round2(cym.Get(\"monto\"), 2)";
_l_total.setText(BA.ObjectToCharSequence(__c.Round2((double)(BA.ObjectToNumber(_cym.Get((Object)("monto")))),(int) (2))));
 //BA.debugLineNum = 190;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)");
 //BA.debugLineNum = 191;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)"))));
 //BA.debugLineNum = 193;BA.debugLine="Private cuenta0 As String = 0";
_cuenta0 = BA.NumberToString(0);
 //BA.debugLineNum = 194;BA.debugLine="Private arti As String = 0";
_arti = BA.NumberToString(0);
 //BA.debugLineNum = 195;BA.debugLine="If vc.RowCount > 0 Then";
if (_vc.getRowCount()>0) { 
 //BA.debugLineNum = 196;BA.debugLine="For i = 0 To vc.RowCount - 1";
{
final int step41 = 1;
final int limit41 = (int) (_vc.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit41 ;_i = _i + step41 ) {
 //BA.debugLineNum = 197;BA.debugLine="vc.Position = i";
_vc.setPosition(_i);
 //BA.debugLineNum = 200;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"))))));
 //BA.debugLineNum = 205;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")))));
 }
};
 };
 //BA.debugLineNum = 211;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")));
 //BA.debugLineNum = 212;BA.debugLine="Private Cuenta1 As String = 0";
_cuenta1 = BA.NumberToString(0);
 //BA.debugLineNum = 213;BA.debugLine="Private arti1 As String = 0";
_arti1 = BA.NumberToString(0);
 //BA.debugLineNum = 214;BA.debugLine="If vc2.RowCount > 0 Then";
if (_vc2.getRowCount()>0) { 
 //BA.debugLineNum = 215;BA.debugLine="For i = 0 To vc2.RowCount - 1";
{
final int step51 = 1;
final int limit51 = (int) (_vc2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit51 ;_i = _i + step51 ) {
 //BA.debugLineNum = 216;BA.debugLine="vc2.Position = i";
_vc2.setPosition(_i);
 //BA.debugLineNum = 217;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)));
 //BA.debugLineNum = 218;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")))+"'"))));
 //BA.debugLineNum = 219;BA.debugLine="If vc3.RowCount > 0 Then";
if (_vc3.getRowCount()>0) { 
 //BA.debugLineNum = 220;BA.debugLine="vc3.Position = 0";
_vc3.setPosition((int) (0));
 //BA.debugLineNum = 221;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));
 //BA.debugLineNum = 222;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")))));
 };
 }
};
 };
 //BA.debugLineNum = 228;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)))+"'"))));
 //BA.debugLineNum = 229;BA.debugLine="Private Cuenta2 As String = 0";
_cuenta2 = BA.NumberToString(0);
 //BA.debugLineNum = 230;BA.debugLine="Private arti2 As String = 0";
_arti2 = BA.NumberToString(0);
 //BA.debugLineNum = 231;BA.debugLine="If vc4.RowCount > 0 Then";
if (_vc4.getRowCount()>0) { 
 //BA.debugLineNum = 233;BA.debugLine="For i = 0 To vc4.RowCount - 1";
{
final int step66 = 1;
final int limit66 = (int) (_vc4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit66 ;_i = _i + step66 ) {
 //BA.debugLineNum = 234;BA.debugLine="vc4.Position = i";
_vc4.setPosition(_i);
 //BA.debugLineNum = 235;BA.debugLine="If vc4.GetString(\"HVD_PROID\") <> vc4.GetString(";
if ((_vc4.GetString("HVD_PROID")).equals(_vc4.GetString("HVD_CODPROMO")) == false) { 
 //BA.debugLineNum = 236;BA.debugLine="If vc4.GetString(\"HVD_RECHAZO\") = 0 Then";
if ((_vc4.GetString("HVD_RECHAZO")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 237;BA.debugLine="Cuenta2 = Cuenta2 + vc4.GetString(\"HVD_COSTO_";
_cuenta2 = BA.NumberToString((double)(Double.parseDouble(_cuenta2))+(double)(Double.parseDouble(_vc4.GetString("HVD_COSTO_TOT"))));
 //BA.debugLineNum = 238;BA.debugLine="arti2 = arti2 + vc4.GetString(\"HVD_CANT\")";
_arti2 = BA.NumberToString((double)(Double.parseDouble(_arti2))+(double)(Double.parseDouble(_vc4.GetString("HVD_CANT"))));
 }else {
 //BA.debugLineNum = 240;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")))+"'"))));
 //BA.debugLineNum = 241;BA.debugLine="If vc5.RowCount > 0 Then";
if (_vc5.getRowCount()>0) { 
 //BA.debugLineNum = 242;BA.debugLine="vc5.Position= 0";
_vc5.setPosition((int) (0));
 //BA.debugLineNum = 244;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"))))));
 //BA.debugLineNum = 245;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")))));
 };
 };
 };
 }
};
 };
 //BA.debugLineNum = 253;BA.debugLine="Subs.centraPanel(p_credito, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_credito,_root.getWidth());
 //BA.debugLineNum = 254;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)"))));
 //BA.debugLineNum = 255;BA.debugLine="Private Cuenta3 As String = 0";
_cuenta3 = BA.NumberToString(0);
 //BA.debugLineNum = 256;BA.debugLine="Private arti3 As String = 0";
_arti3 = BA.NumberToString(0);
 //BA.debugLineNum = 257;BA.debugLine="If c4.RowCount > 0 Then";
if (_c4.getRowCount()>0) { 
 //BA.debugLineNum = 258;BA.debugLine="For i = 0 To c4.RowCount -1";
{
final int step88 = 1;
final int limit88 = (int) (_c4.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit88 ;_i = _i + step88 ) {
 //BA.debugLineNum = 259;BA.debugLine="c4.Position = i";
_c4.setPosition(_i);
 //BA.debugLineNum = 260;BA.debugLine="arti3 = arti3 + c4.GetString(\"PE_CANT\")";
_arti3 = BA.NumberToString((double)(Double.parseDouble(_arti3))+(double)(Double.parseDouble(_c4.GetString("PE_CANT"))));
 //BA.debugLineNum = 261;BA.debugLine="Cuenta3 = Cuenta3 + c4.GetString(\"PE_COSTO_TOT\"";
_cuenta3 = BA.NumberToString((double)(Double.parseDouble(_cuenta3))+(double)(Double.parseDouble(_c4.GetString("PE_COSTO_TOT"))));
 }
};
 };
 //BA.debugLineNum = 264;BA.debugLine="Log(cuenta0)";
__c.LogImpl("87798904",_cuenta0,0);
 //BA.debugLineNum = 265;BA.debugLine="Log(Cuenta1)";
__c.LogImpl("87798905",_cuenta1,0);
 //BA.debugLineNum = 266;BA.debugLine="Log(Cuenta2)";
__c.LogImpl("87798906",_cuenta2,0);
 //BA.debugLineNum = 267;BA.debugLine="Log(Cuenta3)";
__c.LogImpl("87798907",_cuenta3,0);
 //BA.debugLineNum = 269;BA.debugLine="l_total.Text = NumberFormat2((cuenta0 + Cuenta1 +";
_l_total.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)));
 //BA.debugLineNum = 270;BA.debugLine="L_CANT.Text = NumberFormat2((arti + arti1 +arti2";
_l_cant.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)));
 //BA.debugLineNum = 275;BA.debugLine="c = Starter.skmt.ExecQuery2(\"select CAT_VA_VALOR";
_c = (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"})));
 //BA.debugLineNum = 276;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 277;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 278;BA.debugLine="Starter.MAC_IMPRESORA = c.GetString(\"CAT_VA_VALO";
_starter._mac_impresora /*String*/  = _c.GetString("CAT_VA_VALOR");
 };
 //BA.debugLineNum = 280;BA.debugLine="If Starter.MAC_IMPRESORA = \"\" Then Starter.MAC_IM";
if ((_starter._mac_impresora /*String*/ ).equals("")) { 
_starter._mac_impresora /*String*/  = "0";};
 //BA.debugLineNum = 282;BA.debugLine="Printer1.Initialize(Me, \"Printer1\")";
_printer1._initialize /*String*/ (ba,this,"Printer1");
 //BA.debugLineNum = 284;BA.debugLine="If Printer1.IsConnected = False Then";
if (_printer1._isconnected /*boolean*/ ()==__c.False) { 
 }else {
 //BA.debugLineNum = 288;BA.debugLine="Printer1.DisConnect";
_printer1._disconnect /*String*/ ();
 //BA.debugLineNum = 289;BA.debugLine="Printer1.Connect";
_printer1._connect /*boolean*/ ();
 //BA.debugLineNum = 290;BA.debugLine="Log(\"2\")";
__c.LogImpl("87798930","2",0);
 };
 //BA.debugLineNum = 320;BA.debugLine="c=Starter.skmt.ExecQuery(\"select ID_ALMACEN from";
_c = (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 ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 321;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 322;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 323;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 326;BA.debugLine="If almacen = \"3\" Or almacen = 3 Or almacen = \"5\"";
if ((_almacen).equals("3") || (_almacen).equals(BA.NumberToString(3)) || (_almacen).equals("5") || (_almacen).equals(BA.NumberToString(5))) { 
 //BA.debugLineNum = 327;BA.debugLine="Tar.Visible = False";
_tar.setVisible(__c.False);
 //BA.debugLineNum = 328;BA.debugLine="Log(\"SI AQUI\")";
__c.LogImpl("87798968","SI AQUI",0);
 //BA.debugLineNum = 329;BA.debugLine="b = Starter.skmt.ExecQuery(\"select COUNT(*) AS C";
_b = (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 COUNT(*) AS CLIENTE FROM ABONOSP WHERE CLIENTE IN (Select CUENTA from cuentaa)")));
 //BA.debugLineNum = 330;BA.debugLine="b.Position = 0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 331;BA.debugLine="Dim cabonos As String = b.GetString(\"CLIENTE\")";
_cabonos = _b.GetString("CLIENTE");
 //BA.debugLineNum = 332;BA.debugLine="If cabonos = 0 Then";
if ((_cabonos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 333;BA.debugLine="b_cxc.Visible = False";
_b_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 335;BA.debugLine="b_cxc.Visible = True";
_b_cxc.setVisible(__c.True);
 };
 };
 //BA.debugLineNum = 339;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
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_intmex.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_intmex.keymon.lat.c_cliente parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
 //BA.debugLineNum = 487;BA.debugLine="If p_credito.Visible Then";
if (true) break;

case 1:
//if
this.state = 6;
if (parent._p_credito.getVisible()) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 6;
 //BA.debugLineNum = 488;BA.debugLine="et_montoacredito.Text = \"\"";
parent._et_montoacredito.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 489;BA.debugLine="p_credito.Visible = False";
parent._p_credito.setVisible(parent.__c.False);
 //BA.debugLineNum = 490;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 5:
//C
this.state = 6;
 //BA.debugLineNum = 492;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
parent._b4xpages._showpage /*String*/ (ba,"Clientes");
 //BA.debugLineNum = 493;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 6:
//C
this.state = -1;
;
 //BA.debugLineNum = 496;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 105;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 106;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 108;BA.debugLine="g.Initialize(\"GPS\")";
_g.Initialize("GPS");
 //BA.debugLineNum = 110;BA.debugLine="Root.LoadLayout(\"cliente\")";
_root.LoadLayout("cliente",ba);
 //BA.debugLineNum = 111;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_CODIGO, C";
_c = (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)")));
 //BA.debugLineNum = 112;BA.debugLine="s=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
_s = (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)")));
 //BA.debugLineNum = 113;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 114;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 115;BA.debugLine="la_cuenta.Text = c.GetString(\"CAT_CL_CODIGO\")";
_la_cuenta.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")));
 //BA.debugLineNum = 116;BA.debugLine="La_nombre.Text = c.GetString(\"CAT_CL_NOMBRE\")";
_la_nombre.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 //BA.debugLineNum = 117;BA.debugLine="la_Calle.Text = c.GetString(\"CAT_CL_CALLE\") & c.G";
_la_calle.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE")+_c.GetString("CAT_CL_NOEXT")));
 //BA.debugLineNum = 118;BA.debugLine="la_col.Text = c.GetString(\"CAT_CL_COLONIA\")";
_la_col.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_COLONIA")));
 //BA.debugLineNum = 119;BA.debugLine="la_edo.Text = c.GetString(\"CAT_CL_EDO\")";
_la_edo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EDO")));
 //BA.debugLineNum = 120;BA.debugLine="la_cp.Text = c.GetString(\"CAT_CL_CP\")";
_la_cp.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CP")));
 //BA.debugLineNum = 121;BA.debugLine="l_entre1.Text = c.GetString(\"CAT_CL_CALLE1\")";
_l_entre1.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE1")));
 //BA.debugLineNum = 122;BA.debugLine="l_entre2.Text = c.GetString(\"CAT_CL_CALLE2\")";
_l_entre2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CALLE2")));
 //BA.debugLineNum = 123;BA.debugLine="If c.GetString(\"CAT_CL_ATIENDE1\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENDE1")!= null && (_c.GetString("CAT_CL_ATIENDE1")).equals("null") == false) { 
 //BA.debugLineNum = 124;BA.debugLine="l_atiende.Text = c.GetString(\"CAT_CL_ATIENDE1\")";
_l_atiende.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENDE1")));
 }else {
 //BA.debugLineNum = 126;BA.debugLine="l_atiende.Text = \" \"";
_l_atiende.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 128;BA.debugLine="If c.GetString(\"CAT_CL_ATIENTE2\") <> Null And c.G";
if (_c.GetString("CAT_CL_ATIENTE2")!= null && (_c.GetString("CAT_CL_ATIENTE2")).equals("NULL") == false) { 
 //BA.debugLineNum = 129;BA.debugLine="l_atiende2.Text = c.GetString(\"CAT_CL_ATIENTE2\")";
_l_atiende2.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_ATIENTE2")));
 //BA.debugLineNum = 130;BA.debugLine="Log(\"|\"&c.GetString(\"CAT_CL_ATIENTE2\")&\"|\")";
__c.LogImpl("87733273","|"+_c.GetString("CAT_CL_ATIENTE2")+"|",0);
 }else {
 //BA.debugLineNum = 132;BA.debugLine="l_atiende2.Text = \" \"";
_l_atiende2.setText(BA.ObjectToCharSequence(" "));
 };
 //BA.debugLineNum = 134;BA.debugLine="la_saldotot.Text = c.GetString(\"CAT_CL_TELEFONO\")";
_la_saldotot.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_TELEFONO")));
 //BA.debugLineNum = 135;BA.debugLine="la_saldooper.Text = c.GetString(\"CAT_CL_EMAIL\")";
_la_saldooper.setText(BA.ObjectToCharSequence(_c.GetString("CAT_CL_EMAIL")));
 //BA.debugLineNum = 137;BA.debugLine="btAdmin.Initialize(\"BlueTeeth\")";
_btadmin.Initialize(ba,"BlueTeeth");
 //BA.debugLineNum = 138;BA.debugLine="cmp20.Initialize(\"Printer\")";
_cmp20.Initialize("Printer");
 //BA.debugLineNum = 139;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
_reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
 //BA.debugLineNum = 140;BA.debugLine="End Sub";
return "";
}
public String  _cb_tipopago_selectedindexchanged(int _index) throws Exception{
 //BA.debugLineNum = 1447;BA.debugLine="Private Sub cb_tipopago_SelectedIndexChanged (Inde";
 //BA.debugLineNum = 1448;BA.debugLine="itemselect = cb_tipopago.SelectedItem";
_itemselect = _cb_tipopago._getselecteditem /*String*/ ();
 //BA.debugLineNum = 1449;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 4;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
 //BA.debugLineNum = 5;BA.debugLine="Dim clie_id As String";
_clie_id = "";
 //BA.debugLineNum = 6;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 7;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 8;BA.debugLine="Dim cuenta As String";
_cuenta = "";
 //BA.debugLineNum = 9;BA.debugLine="Dim btAdmin As BluetoothAdmin";
_btadmin = new anywheresoftware.b4a.objects.Serial.BluetoothAdmin();
 //BA.debugLineNum = 10;BA.debugLine="Dim cmp20 As Serial";
_cmp20 = new anywheresoftware.b4a.objects.Serial();
 //BA.debugLineNum = 11;BA.debugLine="Dim printer As TextWriter";
_printer = new anywheresoftware.b4a.objects.streams.File.TextWriterWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 13;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 14;BA.debugLine="Dim TAMANO As Int";
_tamano = 0;
 //BA.debugLineNum = 15;BA.debugLine="Dim ESPACIO As Int";
_espacio = 0;
 //BA.debugLineNum = 16;BA.debugLine="Dim BLANCO As String";
_blanco = "";
 //BA.debugLineNum = 17;BA.debugLine="Dim impresoraConectada As Boolean = False";
_impresoraconectada = __c.False;
 //BA.debugLineNum = 18;BA.debugLine="Dim LONGITUD As String";
_longitud = "";
 //BA.debugLineNum = 19;BA.debugLine="Dim LATITUD As String";
_latitud = "";
 //BA.debugLineNum = 20;BA.debugLine="Dim NOMBRE As String";
_nombre = "";
 //BA.debugLineNum = 21;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Dim la_cuenta As Label";
_la_cuenta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim La_nombre As Label";
_la_nombre = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Dim la_Calle As Label";
_la_calle = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim la_numero As Label";
_la_numero = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim la_nint As Label";
_la_nint = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 29;BA.debugLine="Dim la_edo As Label";
_la_edo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim la_pob As Label";
_la_pob = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 31;BA.debugLine="Dim la_col As Label";
_la_col = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Dim la_cp As Label";
_la_cp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Dim la_zona As Label";
_la_zona = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 34;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 35;BA.debugLine="Dim la_saldotot As Label";
_la_saldotot = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 36;BA.debugLine="Dim la_saldooper As Label";
_la_saldooper = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 37;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new reparto_intmex.keymon.lat.dbrequestmanager();
 //BA.debugLineNum = 38;BA.debugLine="Dim b_noEntrega As Button";
_b_noentrega = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Dim Label10 As Label";
_label10 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 40;BA.debugLine="Dim Label11 As Label";
_label11 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 41;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 42;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
 //BA.debugLineNum = 43;BA.debugLine="Dim Tar As Button";
_tar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 44;BA.debugLine="Private L_QR As Label";
_l_qr = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 45;BA.debugLine="Private BT_QR As Button";
_bt_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Dim Printer1 As EscPosPrinter";
_printer1 = new reparto_intmex.keymon.lat.escposprinter();
 //BA.debugLineNum = 47;BA.debugLine="Dim la_comm As Label";
_la_comm = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 48;BA.debugLine="Dim la_actdte As Label";
_la_actdte = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 49;BA.debugLine="Dim la_usuario As Label";
_la_usuario = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 50;BA.debugLine="Dim la_resultado As Label";
_la_resultado = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 51;BA.debugLine="Dim l_entre1 As Label";
_l_entre1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 52;BA.debugLine="Dim l_entre2 As Label";
_l_entre2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 53;BA.debugLine="Dim l_atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 54;BA.debugLine="Dim l_atiende2 As Label";
_l_atiende2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 55;BA.debugLine="Dim DATOS As Button";
_datos = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 56;BA.debugLine="Dim Guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 57;BA.debugLine="Dim NUEVO As Button";
_nuevo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 58;BA.debugLine="Private l_total As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 59;BA.debugLine="Private HIST As Button";
_hist = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 60;BA.debugLine="Dim PASA_IMP As String";
_pasa_imp = "";
 //BA.debugLineNum = 61;BA.debugLine="Private B_IMP As Button";
_b_imp = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 62;BA.debugLine="Dim total_cliente As String";
_total_cliente = "";
 //BA.debugLineNum = 63;BA.debugLine="Dim CREDITO As String";
_credito = "";
 //BA.debugLineNum = 64;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 65;BA.debugLine="Private B_PASO2 As Button";
_b_paso2 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 66;BA.debugLine="Private L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 67;BA.debugLine="Dim errorImpresora As Int = 0";
_errorimpresora = (int) (0);
 //BA.debugLineNum = 68;BA.debugLine="Dim banderaimp As Int";
_banderaimp = 0;
 //BA.debugLineNum = 69;BA.debugLine="Private l_credi As Label";
_l_credi = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 70;BA.debugLine="Private l_pagare As Label";
_l_pagare = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 71;BA.debugLine="Private l_montopag As Label";
_l_montopag = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 72;BA.debugLine="Private l_efectivo As Label";
_l_efectivo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 73;BA.debugLine="Private l_montoefec As Label";
_l_montoefec = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 74;BA.debugLine="Private p_credito As Panel";
_p_credito = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 75;BA.debugLine="Private b_acred As Button";
_b_acred = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 76;BA.debugLine="Private b_cancred As Button";
_b_cancred = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 77;BA.debugLine="Private et_montoacredito As EditText";
_et_montoacredito = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 78;BA.debugLine="Private Label16 As Label";
_label16 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 79;BA.debugLine="Private l_limite As Label";
_l_limite = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 80;BA.debugLine="Dim almacen As String";
_almacen = "";
 //BA.debugLineNum = 81;BA.debugLine="Dim fechaprev As String";
_fechaprev = "";
 //BA.debugLineNum = 82;BA.debugLine="Dim rutaprev As String";
_rutaprev = "";
 //BA.debugLineNum = 83;BA.debugLine="Dim rutarep As String";
_rutarep = "";
 //BA.debugLineNum = 84;BA.debugLine="Dim montopagare As String";
_montopagare = "";
 //BA.debugLineNum = 85;BA.debugLine="Private p_abono As Panel";
_p_abono = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 86;BA.debugLine="Private clv_abonos As CustomListView";
_clv_abonos = new b4a.example3.customlistview();
 //BA.debugLineNum = 87;BA.debugLine="Private et_abono As EditText";
_et_abono = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 88;BA.debugLine="Private b_cancelar As Button";
_b_cancelar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 89;BA.debugLine="Private b_abono As Button";
_b_abono = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 90;BA.debugLine="Private l_montoabonostotal As Label";
_l_montoabonostotal = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 91;BA.debugLine="Dim h, j,b, f As Cursor";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_j = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_b = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 92;BA.debugLine="Private l_folio As Label";
_l_folio = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 93;BA.debugLine="Private l_saldo As Label";
_l_saldo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 94;BA.debugLine="Private b_cxc As Button";
_b_cxc = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 95;BA.debugLine="Private cb_tipopago As B4XComboBox";
_cb_tipopago = new reparto_intmex.keymon.lat.b4xcombobox();
 //BA.debugLineNum = 96;BA.debugLine="Dim itemselect As String";
_itemselect = "";
 //BA.debugLineNum = 97;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(String _mostrar,String _mostrar1) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
 //BA.debugLineNum = 1292;BA.debugLine="Sub CreateListItem(mostrar As String, mostrar1 As";
 //BA.debugLineNum = 1293;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 1294;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, 1, 10)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (1),(int) (10));
 //BA.debugLineNum = 1295;BA.debugLine="p.LoadLayout(\"folioabono\")";
_p.LoadLayout("folioabono",ba);
 //BA.debugLineNum = 1296;BA.debugLine="p.Height= 32dip";
_p.setHeight(__c.DipToCurrent((int) (32)));
 //BA.debugLineNum = 1297;BA.debugLine="p.Width = 80dip";
_p.setWidth(__c.DipToCurrent((int) (80)));
 //BA.debugLineNum = 1299;BA.debugLine="l_folio.Text = mostrar";
_l_folio.setText(BA.ObjectToCharSequence(_mostrar));
 //BA.debugLineNum = 1300;BA.debugLine="l_saldo.Text = mostrar1";
_l_saldo.setText(BA.ObjectToCharSequence(_mostrar1));
 //BA.debugLineNum = 1303;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
 //BA.debugLineNum = 1304;BA.debugLine="End Sub";
return null;
}
public String  _datos_click() throws Exception{
 //BA.debugLineNum = 503;BA.debugLine="Sub DATOS_Click";
 //BA.debugLineNum = 505;BA.debugLine="End Sub";
return "";
}
public void  _gest_click() throws Exception{
ResumableSub_gest_Click rsub = new ResumableSub_gest_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_gest_Click extends BA.ResumableSub {
public ResumableSub_gest_Click(reparto_intmex.keymon.lat.c_cliente parent) {
this.parent = parent;
}
reparto_intmex.keymon.lat.c_cliente parent;
int _result = 0;

@Override
public void resume(BA ba, Object[] result) throws Exception{

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

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 362;BA.debugLine="If CREDITO = 1 Then";
if (true) break;

case 1:
//if
this.state = 14;
if ((parent._credito).equals(BA.NumberToString(1))) { 
this.state = 3;
}else {
this.state = 13;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 363;BA.debugLine="Msgbox2Async(\"Forma de pago\",\"EL CLIENTE PUEDE T";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Forma de pago"),BA.ObjectToCharSequence("EL CLIENTE PUEDE TENER CREDITO"),"Parcial","Total","Efectivo",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
 //BA.debugLineNum = 364;BA.debugLine="Wait For Msgbox_Result (Result As Int)";
parent.__c.WaitFor("msgbox_result", ba, this, null);
this.state = 15;
return;
case 15:
//C
this.state = 4;
_result = (Integer) result[0];
;
 //BA.debugLineNum = 365;BA.debugLine="If Result= DialogResponse.POSITIVE Then";
if (true) break;

case 4:
//if
this.state = 11;
if (_result==parent.__c.DialogResponse.POSITIVE) { 
this.state = 6;
}else if(_result==parent.__c.DialogResponse.NEGATIVE) { 
this.state = 8;
}else if(_result==parent.__c.DialogResponse.CANCEL) { 
this.state = 10;
}if (true) break;

case 6:
//C
this.state = 11;
 //BA.debugLineNum = 366;BA.debugLine="Log(1)";
parent.__c.LogImpl("88060934",BA.NumberToString(1),0);
 //BA.debugLineNum = 367;BA.debugLine="p_credito.Visible = True";
parent._p_credito.setVisible(parent.__c.True);
 //BA.debugLineNum = 369;BA.debugLine="c=Starter.skmt.ExecQuery(\"select sum(HVD_COSTO_";
parent._c = (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 sum(HVD_COSTO_TOT) AS MONTO from HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND HVD_RECHAZO = 0 AND HVD_PARCIAL = 0")));
 //BA.debugLineNum = 370;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 371;BA.debugLine="montopagare = c.GetString(\"MONTO\")";
parent._montopagare = parent._c.GetString("MONTO");
 //BA.debugLineNum = 372;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 373;BA.debugLine="l_limite.Text = \"Monto de la venta: $\" & l_tota";
parent._l_limite.setText(BA.ObjectToCharSequence("Monto de la venta: $"+parent._l_total.getText()));
 if (true) break;

case 8:
//C
this.state = 11;
 //BA.debugLineNum = 375;BA.debugLine="Log(2)";
parent.__c.LogImpl("88060943",BA.NumberToString(2),0);
 //BA.debugLineNum = 376;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 //BA.debugLineNum = 377;BA.debugLine="banderaimp = 1";
parent._banderaimp = (int) (1);
 if (true) break;

case 10:
//C
this.state = 11;
 //BA.debugLineNum = 379;BA.debugLine="Log(3)";
parent.__c.LogImpl("88060947",BA.NumberToString(3),0);
 //BA.debugLineNum = 380;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
parent.__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 381;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
parent.__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 382;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
parent._sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 383;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
parent._stime = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 385;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cu";
parent._c = (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")));
 //BA.debugLineNum = 386;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 387;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
parent._cuenta = parent._c.GetString("CUENTA");
 //BA.debugLineNum = 388;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 390;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from u";
parent._c = (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")));
 //BA.debugLineNum = 391;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 392;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
parent._usuario = parent._c.GetString("USUARIO");
 //BA.debugLineNum = 393;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 395;BA.debugLine="c=Starter.skmt.ExecQuery(\"select ID_ALMACEN fro";
parent._c = (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 ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 396;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 397;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
parent._almacen = parent._c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 398;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 400;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_FECHA from";
parent._c = (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 HVD_FECHA from HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 //BA.debugLineNum = 401;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 402;BA.debugLine="fechaprev = c.GetString(\"HVD_FECHA\")";
parent._fechaprev = parent._c.GetString("HVD_FECHA");
 //BA.debugLineNum = 403;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 405;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_RUTA fr";
parent._c = (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)")));
 //BA.debugLineNum = 406;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 407;BA.debugLine="rutaprev = c.GetString(\"CAT_CL_RUTA\")";
parent._rutaprev = parent._c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 408;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 410;BA.debugLine="c=Starter.skmt.ExecQuery(\"select RUTAA from RUT";
parent._c = (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")));
 //BA.debugLineNum = 411;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 412;BA.debugLine="rutarep = c.GetString(\"RUTAA\")";
parent._rutarep = parent._c.GetString("RUTAA");
 //BA.debugLineNum = 413;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 415;BA.debugLine="c=Starter.skmt.ExecQuery(\"select sum(HVD_COSTO_";
parent._c = (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 sum(HVD_COSTO_TOT) AS MONTO from HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND HVD_RECHAZO = 0 AND HVD_PARCIAL = 0")));
 //BA.debugLineNum = 416;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 417;BA.debugLine="montopagare = c.GetString(\"MONTO\")";
parent._montopagare = parent._c.GetString("MONTO");
 //BA.debugLineNum = 418;BA.debugLine="c.Close";
parent._c.Close();
 //BA.debugLineNum = 419;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  PAGARE";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  PAGARES (PA_ALMACEN, PA_RUTA_REP, PA_RUTAPREV, PA_FECHA_PREV, PA_CAPTURA, PA_MONTO, PA_USUARIO, PA_CLIENTE) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(parent._almacen),(Object)(parent._rutarep),(Object)(parent._rutaprev),(Object)(parent._fechaprev),(Object)((parent._sdate)),(Object)(parent._montopagare),(Object)(parent._usuario),(Object)(parent._cuenta)}));
 //BA.debugLineNum = 420;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 //BA.debugLineNum = 421;BA.debugLine="banderaimp = 1";
parent._banderaimp = (int) (1);
 if (true) break;

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

case 13:
//C
this.state = 14;
 //BA.debugLineNum = 424;BA.debugLine="B_IMP_Click";
parent._b_imp_click();
 //BA.debugLineNum = 425;BA.debugLine="banderaimp = 1";
parent._banderaimp = (int) (1);
 if (true) break;

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

            }
        }
    }
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 345;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 348;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 349;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 350;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 351;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 352;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM HIST_GPS\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
 //BA.debugLineNum = 353;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)(_sdate+_stime),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
 //BA.debugLineNum = 354;BA.debugLine="End Sub";
return "";
}
public String  _guardado() throws Exception{
String _ruta = "";
String _rutapre = "";
String _rutaactualizar = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null;
 //BA.debugLineNum = 430;BA.debugLine="Sub Guardado";
 //BA.debugLineNum = 431;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 432;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 433;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 434;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 435;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
_c = (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")));
 //BA.debugLineNum = 436;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 437;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
_cuenta = _c.GetString("CUENTA");
 //BA.debugLineNum = 438;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from usu";
_c = (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")));
 //BA.debugLineNum = 439;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 440;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 441;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 442;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM RUT";
_d = (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")));
 //BA.debugLineNum = 443;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 444;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = _d.GetString("RUTAA");
 //BA.debugLineNum = 445;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 446;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA FR";
_d = (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)")));
 //BA.debugLineNum = 447;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 448;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUTA\"";
_rutapre = _d.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 449;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 453;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
_fechaprev = _subs._traefechaprev /*String*/ (ba);
 //BA.debugLineNum = 456;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
 //BA.debugLineNum = 457;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)")));
 //BA.debugLineNum = 458;BA.debugLine="If rut.RowCount > 0 Then";
if (_rut.getRowCount()>0) { 
 //BA.debugLineNum = 459;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
 //BA.debugLineNum = 460;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 };
 //BA.debugLineNum = 463;BA.debugLine="Starter.skmt.ExecNonQuery($\"DELETE FROM NOVENTA W";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa) AND NV_RUTA ='"+__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' "));
 //BA.debugLineNum = 464;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,NV_RUTA) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cuenta),(Object)(_sdate+" "+_stime),(Object)(_usuario),(Object)("ENTREGA"),(Object)("ENTREGA COMPLETA"),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar)}));
 //BA.debugLineNum = 465;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[]{_la_cuenta.getText(),_usuario,_sdate+" "+_stime,_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,_fechaprev,"ENTREGADO"}));
 //BA.debugLineNum = 466;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 2, HORAENT = '"+__c.SmartStringFormatter("",(Object)(_sdate+" "+_stime))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"' "));
 //BA.debugLineNum = 467;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS SET";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_ESTATUS = 1 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
 //BA.debugLineNum = 468;BA.debugLine="mandaPendientesreparto";
_mandapendientesreparto();
 //BA.debugLineNum = 475;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 477;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click() throws Exception{
 //BA.debugLineNum = 507;BA.debugLine="Sub Guardar_Click";
 //BA.debugLineNum = 512;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 514;BA.debugLine="End Sub";
return "";
}
public String  _hist_click() throws Exception{
 //BA.debugLineNum = 520;BA.debugLine="Sub HIST_Click";
 //BA.debugLineNum = 524;BA.debugLine="B4XPages.MainPage.detalleVenta.prodsMap.Initializ";
_b4xpages._mainpage /*reparto_intmex.keymon.lat.b4xmainpage*/ (ba)._detalleventa /*reparto_intmex.keymon.lat.c_detalleventa*/ ._prodsmap /*anywheresoftware.b4a.objects.collections.Map*/ .Initialize();
 //BA.debugLineNum = 526;BA.debugLine="B4XPages.ShowPage(\"DetalleVenta\")";
_b4xpages._showpage /*String*/ (ba,"DetalleVenta");
 //BA.debugLineNum = 527;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 100;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 101;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 102;BA.debugLine="End Sub";
return null;
}
public String  _jobdone(reparto_intmex.keymon.lat.httpjob _job) throws Exception{
reparto_intmex.keymon.lat.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
 //BA.debugLineNum = 1061;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 1062;BA.debugLine="Log(Job.Success)";
__c.LogImpl("89043969",BA.ObjectToString(_job._success /*boolean*/ ),0);
 //BA.debugLineNum = 1063;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
 //BA.debugLineNum = 1066;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("89043973","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*reparto_intmex.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*reparto_intmex.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
 //BA.debugLineNum = 1067;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1068;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*reparto_intmex.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1069;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_REPARTOPendientes_head_")>-1) { 
 //BA.debugLineNum = 1070;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
 //BA.debugLineNum = 1071;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
 //BA.debugLineNum = 1072;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("89043979",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
 //BA.debugLineNum = 1073;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"}));
 //BA.debugLineNum = 1074;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));
 //BA.debugLineNum = 1075;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));
 //BA.debugLineNum = 1076;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("89043983",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 1081;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 1084;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 356;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
 //BA.debugLineNum = 358;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientesreparto() throws Exception{
 //BA.debugLineNum = 1041;BA.debugLine="Sub mandaPendientesreparto";
 //BA.debugLineNum = 1057;BA.debugLine="End Sub";
return "";
}
public String  _nuevo_click() throws Exception{
 //BA.debugLineNum = 516;BA.debugLine="Sub NUEVO_Click";
 //BA.debugLineNum = 517;BA.debugLine="StartActivity(MAPA_CLIENTE)";
__c.StartActivity(ba,(Object)(_mapa_cliente.getObject()));
 //BA.debugLineNum = 518;BA.debugLine="End Sub";
return "";
}
public String  _p_abono_click() throws Exception{
 //BA.debugLineNum = 1288;BA.debugLine="Private Sub p_abono_Click";
 //BA.debugLineNum = 1290;BA.debugLine="End Sub";
return "";
}
public String  _p_credito_click() throws Exception{
 //BA.debugLineNum = 1136;BA.debugLine="Private Sub p_credito_Click";
 //BA.debugLineNum = 1138;BA.debugLine="End Sub";
return "";
}
public String  _printer_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 967;BA.debugLine="Sub Printer_Connected (Success As Boolean)";
 //BA.debugLineNum = 968;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 969;BA.debugLine="B_IMP.Enabled = True";
_b_imp.setEnabled(__c.True);
 //BA.debugLineNum = 970;BA.debugLine="PASA_IMP = \"1\"";
_pasa_imp = "1";
 }else {
 //BA.debugLineNum = 972;BA.debugLine="B_IMP.Enabled = False";
_b_imp.setEnabled(__c.False);
 //BA.debugLineNum = 973;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) { 
 //BA.debugLineNum = 974;BA.debugLine="StartPrinter";
_startprinter();
 };
 };
 //BA.debugLineNum = 977;BA.debugLine="End Sub";
return "";
}
public String  _printer1_connected(boolean _success) throws Exception{
 //BA.debugLineNum = 946;BA.debugLine="Sub Printer1_Connected (Success As Boolean)";
 //BA.debugLineNum = 948;BA.debugLine="If Success Then";
if (_success) { 
 //BA.debugLineNum = 949;BA.debugLine="ToastMessageShow(\"Impresora conectada\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Impresora conectada"),__c.False);
 //BA.debugLineNum = 950;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")}));
 //BA.debugLineNum = 951;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*/ )}));
 //BA.debugLineNum = 952;BA.debugLine="LogColor(\"Impresora conectada\", Colors.Green)";
__c.LogImpl("88716294","Impresora conectada",__c.Colors.Green);
 //BA.debugLineNum = 954;BA.debugLine="impresoraConectada = True";
_impresoraconectada = __c.True;
 }else {
 //BA.debugLineNum = 958;BA.debugLine="LogColor(\"Error conectando la impresora\", Colors";
__c.LogImpl("88716300","Error conectando la impresora",__c.Colors.Red);
 //BA.debugLineNum = 959;BA.debugLine="errorImpresora = errorImpresora + 1";
_errorimpresora = (int) (_errorimpresora+1);
 //BA.debugLineNum = 960;BA.debugLine="If errorImpresora > 1 Then";
if (_errorimpresora>1) { 
 //BA.debugLineNum = 961;BA.debugLine="Starter.MAC_IMPRESORA = \"0\"";
_starter._mac_impresora /*String*/  = "0";
 //BA.debugLineNum = 962;BA.debugLine="errorImpresora = 0";
_errorimpresora = (int) (0);
 };
 };
 //BA.debugLineNum = 965;BA.debugLine="End Sub";
return "";
}
public String  _startprinter() throws Exception{
int _resimp = 0;
int _i = 0;
 //BA.debugLineNum = 979;BA.debugLine="Sub StartPrinter";
 //BA.debugLineNum = 980;BA.debugLine="Dim PairedDevices As Map";
_paireddevices = new anywheresoftware.b4a.objects.collections.Map();
 //BA.debugLineNum = 981;BA.debugLine="Dim L As List";
_l = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 982;BA.debugLine="Dim resimp As Int";
_resimp = 0;
 //BA.debugLineNum = 983;BA.debugLine="ToastMessageShow(\"Printing.....\",True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Printing....."),__c.True);
 //BA.debugLineNum = 984;BA.debugLine="PairedDevices.Initialize";
_paireddevices.Initialize();
 //BA.debugLineNum = 985;BA.debugLine="Try";
try { //BA.debugLineNum = 986;BA.debugLine="PairedDevices = cmp20.GetPairedDevices";
_paireddevices = _cmp20.GetPairedDevices();
 } 
       catch (Exception e9) {
			ba.setLastException(e9); //BA.debugLineNum = 988;BA.debugLine="Msgbox(\"Getting Paired Devices\",\"Printer Error\")";
__c.Msgbox(BA.ObjectToCharSequence("Getting Paired Devices"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 989;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 990;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 //BA.debugLineNum = 992;BA.debugLine="If PairedDevices.Size = 0 Then";
if (_paireddevices.getSize()==0) { 
 //BA.debugLineNum = 993;BA.debugLine="Msgbox(\"Error Connecting to Printer - Printer No";
__c.Msgbox(BA.ObjectToCharSequence("Error Connecting to Printer - Printer Not Found"),BA.ObjectToCharSequence(""),ba);
 //BA.debugLineNum = 994;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 996;BA.debugLine="If PairedDevices.Size = 1 Then";
if (_paireddevices.getSize()==1) { 
 //BA.debugLineNum = 997;BA.debugLine="Try";
try { //BA.debugLineNum = 999;BA.debugLine="cmp20.ConnectInsecure(btAdmin,PairedDevices.Get";
_cmp20.ConnectInsecure(ba,_btadmin,BA.ObjectToString(_paireddevices.Get(_paireddevices.GetKeyAt((int) (0)))),(int) (1));
 } 
       catch (Exception e21) {
			ba.setLastException(e21); //BA.debugLineNum = 1002;BA.debugLine="Msgbox(\"Connecting\",\"Printer Error\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Connecting"),BA.ObjectToCharSequence("Printer Error"),ba);
 //BA.debugLineNum = 1003;BA.debugLine="printer.Close";
_printer.Close();
 //BA.debugLineNum = 1004;BA.debugLine="cmp20.Disconnect";
_cmp20.Disconnect();
 };
 }else {
 //BA.debugLineNum = 1007;BA.debugLine="L.Initialize";
_l.Initialize();
 //BA.debugLineNum = 1008;BA.debugLine="For i = 0 To PairedDevices.Size - 1";
{
final int step27 = 1;
final int limit27 = (int) (_paireddevices.getSize()-1);
_i = (int) (0) ;
for (;_i <= limit27 ;_i = _i + step27 ) {
 //BA.debugLineNum = 1009;BA.debugLine="L.Add(PairedDevices.GetKeyAt(i))";
_l.Add(_paireddevices.GetKeyAt(_i));
 }
};
 //BA.debugLineNum = 1011;BA.debugLine="resimp = InputList(L, \"Choose device\", -1) 'igno";
_resimp = __c.InputList(_l,BA.ObjectToCharSequence("Choose device"),(int) (-1),ba);
 //BA.debugLineNum = 1012;BA.debugLine="If resimp <> DialogResponse.CANCEL Then";
if (_resimp!=__c.DialogResponse.CANCEL) { 
 //BA.debugLineNum = 1013;BA.debugLine="cmp20.Connect(PairedDevices.Get(L.Get(resimp)))";
_cmp20.Connect(ba,BA.ObjectToString(_paireddevices.Get(_l.Get(_resimp))));
 };
 };
 //BA.debugLineNum = 1016;BA.debugLine="End Sub";
return "";
}
public String  _tar_click() throws Exception{
 //BA.debugLineNum = 498;BA.debugLine="Sub Tar_Click";
 //BA.debugLineNum = 500;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 //BA.debugLineNum = 501;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED"))
	return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
	return _jobdone((reparto_intmex.keymon.lat.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
