package reparto_mazapa.keymon.lat;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class c_noventa_subs_0 {


public static RemoteObject  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,38);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_noventa","b4xpage_appear", __ref);}
 BA.debugLineNum = 38;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(32);
 BA.debugLineNum = 39;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
Debug.ShouldStop(64);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref),(Object)(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_server" /*RemoteObject*/ )));
 BA.debugLineNum = 40;BA.debugLine="e_comm.Text=\"\"";
Debug.ShouldStop(128);
__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 41;BA.debugLine="r_1.Checked = False";
Debug.ShouldStop(256);
__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 42;BA.debugLine="r_2.Checked = False";
Debug.ShouldStop(512);
__ref.getField(false,"_r_2" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 43;BA.debugLine="r_3.Checked = False";
Debug.ShouldStop(1024);
__ref.getField(false,"_r_3" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 44;BA.debugLine="r_4.Checked = False";
Debug.ShouldStop(2048);
__ref.getField(false,"_r_4" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 45;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,29);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_noventa","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 29;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 30;BA.debugLine="Root = Root1";
Debug.ShouldStop(536870912);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 32;BA.debugLine="Root.LoadLayout(\"no_venta\")";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("no_venta")),__ref.getField(false, "ba"));
 BA.debugLineNum = 33;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
Debug.ShouldStop(1);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref),(Object)(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_server" /*RemoteObject*/ )));
 BA.debugLineNum = 34;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _cancela_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("CANCELA_Click (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,52);
if (RapidSub.canDelegate("cancela_click")) { return __ref.runUserSub(false, "c_noventa","cancela_click", __ref);}
 BA.debugLineNum = 52;BA.debugLine="Sub CANCELA_Click";
Debug.ShouldStop(524288);
 BA.debugLineNum = 53;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(1048576);
c_noventa._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 54;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
c_noventa._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_noventa._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_noventa._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_noventa._xui);
 //BA.debugLineNum = 4;BA.debugLine="Dim g As GPS";
c_noventa._g = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");__ref.setField("_g",c_noventa._g);
 //BA.debugLineNum = 5;BA.debugLine="Dim c As Cursor";
c_noventa._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_noventa._c);
 //BA.debugLineNum = 6;BA.debugLine="Dim COMENTARIO As String";
c_noventa._comentario = RemoteObject.createImmutable("");__ref.setField("_comentario",c_noventa._comentario);
 //BA.debugLineNum = 7;BA.debugLine="Dim CANCELA As Button";
c_noventa._cancela = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_cancela",c_noventa._cancela);
 //BA.debugLineNum = 8;BA.debugLine="Dim GUARDA As Button";
c_noventa._guarda = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_guarda",c_noventa._guarda);
 //BA.debugLineNum = 9;BA.debugLine="Dim r_1 As RadioButton";
c_noventa._r_1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper");__ref.setField("_r_1",c_noventa._r_1);
 //BA.debugLineNum = 10;BA.debugLine="Dim r_2 As RadioButton";
c_noventa._r_2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper");__ref.setField("_r_2",c_noventa._r_2);
 //BA.debugLineNum = 11;BA.debugLine="Dim r_3 As RadioButton";
c_noventa._r_3 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper");__ref.setField("_r_3",c_noventa._r_3);
 //BA.debugLineNum = 12;BA.debugLine="Dim e_comm As EditText";
c_noventa._e_comm = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_e_comm",c_noventa._e_comm);
 //BA.debugLineNum = 13;BA.debugLine="Dim motivo As String";
c_noventa._motivo = RemoteObject.createImmutable("");__ref.setField("_motivo",c_noventa._motivo);
 //BA.debugLineNum = 14;BA.debugLine="Dim cuenta As String";
c_noventa._cuenta = RemoteObject.createImmutable("");__ref.setField("_cuenta",c_noventa._cuenta);
 //BA.debugLineNum = 15;BA.debugLine="Dim usuario As String";
c_noventa._usuario = RemoteObject.createImmutable("");__ref.setField("_usuario",c_noventa._usuario);
 //BA.debugLineNum = 16;BA.debugLine="Dim sDate,sTime As String";
c_noventa._sdate = RemoteObject.createImmutable("");__ref.setField("_sdate",c_noventa._sdate);
c_noventa._stime = RemoteObject.createImmutable("");__ref.setField("_stime",c_noventa._stime);
 //BA.debugLineNum = 17;BA.debugLine="Dim r_4 As RadioButton";
c_noventa._r_4 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper");__ref.setField("_r_4",c_noventa._r_4);
 //BA.debugLineNum = 18;BA.debugLine="Private p_principal As Panel";
c_noventa._p_principal = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_principal",c_noventa._p_principal);
 //BA.debugLineNum = 19;BA.debugLine="Dim d As Cursor";
c_noventa._d = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_d",c_noventa._d);
 //BA.debugLineNum = 20;BA.debugLine="Dim reqManager As DBRequestManager";
c_noventa._reqmanager = RemoteObject.createNew ("reparto_mazapa.keymon.lat.dbrequestmanager");__ref.setField("_reqmanager",c_noventa._reqmanager);
 //BA.debugLineNum = 21;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _gps_locationchanged(RemoteObject __ref,RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,47);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "c_noventa","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 47;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(16384);
 BA.debugLineNum = 50;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _guarda_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("GUARDA_Click (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,56);
if (RapidSub.canDelegate("guarda_click")) { __ref.runUserSub(false, "c_noventa","guarda_click", __ref); return;}
ResumableSub_GUARDA_Click rsub = new ResumableSub_GUARDA_Click(null,__ref);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_GUARDA_Click extends BA.ResumableSub {
public ResumableSub_GUARDA_Click(reparto_mazapa.keymon.lat.c_noventa parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_noventa parent;
RemoteObject _rutaactualizar = RemoteObject.createImmutable("");
RemoteObject _rut = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _estecliente = RemoteObject.createImmutable("");
RemoteObject _rv = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i2 = 0;
int _i = 0;
RemoteObject _ruta = RemoteObject.createImmutable("");
RemoteObject _rutapre = RemoteObject.createImmutable("");
RemoteObject _fechaprev = RemoteObject.createImmutable("");
RemoteObject _resultado = RemoteObject.createImmutable(0);
RemoteObject _mandamapa = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int step36;
int limit36;
int step43;
int limit43;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("GUARDA_Click (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,56);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

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

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 57;BA.debugLine="If r_1.Checked = False And r_2.Checked = False An";
Debug.ShouldStop(16777216);
if (true) break;

case 1:
//if
this.state = 51;
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethod(true,"getChecked"),parent.__c.getField(true,"False")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_r_2" /*RemoteObject*/ ).runMethod(true,"getChecked"),parent.__c.getField(true,"False")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_r_3" /*RemoteObject*/ ).runMethod(true,"getChecked"),parent.__c.getField(true,"False")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_r_4" /*RemoteObject*/ ).runMethod(true,"getChecked"),parent.__c.getField(true,"False"))) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 51;
 BA.debugLineNum = 58;BA.debugLine="MsgboxAsync(\"Selecciona un motivo de rechazo\",\"A";
Debug.ShouldStop(33554432);
parent.__c.runVoidMethod ("MsgboxAsync",(Object)(BA.ObjectToCharSequence("Selecciona un motivo de rechazo")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("Atención"))),__ref.getField(false, "ba"));
 if (true) break;

case 5:
//C
this.state = 6;
 BA.debugLineNum = 61;BA.debugLine="If r_1.Checked Then";
Debug.ShouldStop(268435456);
if (true) break;

case 6:
//if
this.state = 15;
if (__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
this.state = 8;
}else 
{ BA.debugLineNum = 63;BA.debugLine="Else If r_2.Checked Then";
Debug.ShouldStop(1073741824);
if (__ref.getField(false,"_r_2" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
this.state = 10;
}else 
{ BA.debugLineNum = 65;BA.debugLine="Else If r_3.Checked Then";
Debug.ShouldStop(1);
if (__ref.getField(false,"_r_3" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
this.state = 12;
}else {
this.state = 14;
}}}
if (true) break;

case 8:
//C
this.state = 15;
 BA.debugLineNum = 62;BA.debugLine="motivo = \"CERRADO\"";
Debug.ShouldStop(536870912);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("CERRADO"));
 if (true) break;

case 10:
//C
this.state = 15;
 BA.debugLineNum = 64;BA.debugLine="motivo = \"NO PIDIO\"";
Debug.ShouldStop(-2147483648);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("NO PIDIO"));
 if (true) break;

case 12:
//C
this.state = 15;
 BA.debugLineNum = 66;BA.debugLine="motivo = \"CANCELA\"";
Debug.ShouldStop(2);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("CANCELA"));
 if (true) break;

case 14:
//C
this.state = 15;
 BA.debugLineNum = 68;BA.debugLine="motivo = \"NO ESTA EL ENCARGADO\"";
Debug.ShouldStop(8);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("NO ESTA EL ENCARGADO"));
 if (true) break;
;
 BA.debugLineNum = 71;BA.debugLine="If motivo <> \"CERRADO\"  Or motivo = \"CERRADO\" Th";
Debug.ShouldStop(64);

case 15:
//if
this.state = 50;
if (RemoteObject.solveBoolean("!",__ref.getField(true,"_motivo" /*RemoteObject*/ ),BA.ObjectToString("CERRADO")) || RemoteObject.solveBoolean("=",__ref.getField(true,"_motivo" /*RemoteObject*/ ),BA.ObjectToString("CERRADO"))) { 
this.state = 17;
}else {
this.state = 49;
}if (true) break;

case 17:
//C
this.state = 18;
 BA.debugLineNum = 72;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(128);
parent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 73;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
Debug.ShouldStop(256);
parent.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 74;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(512);
__ref.setField ("_sdate" /*RemoteObject*/ ,parent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(parent.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 75;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(1024);
__ref.setField ("_stime" /*RemoteObject*/ ,parent.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(parent.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 76;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cu";
Debug.ShouldStop(2048);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CUENTA from cuentaa"))));
 BA.debugLineNum = 77;BA.debugLine="c.Position = 0";
Debug.ShouldStop(4096);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 78;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
Debug.ShouldStop(8192);
__ref.setField ("_cuenta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 79;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from u";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select usuario from usuarioa"))));
 BA.debugLineNum = 80;BA.debugLine="c.Position = 0";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 81;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(65536);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 82;BA.debugLine="c.Close";
Debug.ShouldStop(131072);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 83;BA.debugLine="Dim rutaactualizar As String";
Debug.ShouldStop(262144);
_rutaactualizar = RemoteObject.createImmutable("");Debug.locals.put("rutaactualizar", _rutaactualizar);
 BA.debugLineNum = 84;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SEL";
Debug.ShouldStop(524288);
_rut = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_rut = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)"))));Debug.locals.put("rut", _rut);Debug.locals.put("rut", _rut);
 BA.debugLineNum = 85;BA.debugLine="If rut.RowCount > 0 Then";
Debug.ShouldStop(1048576);
if (true) break;

case 18:
//if
this.state = 21;
if (RemoteObject.solveBoolean(">",_rut.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 20;
}if (true) break;

case 20:
//C
this.state = 21;
 BA.debugLineNum = 86;BA.debugLine="rut.Position = 0";
Debug.ShouldStop(2097152);
_rut.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 87;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(4194304);
_rutaactualizar = _rut.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("rutaactualizar", _rutaactualizar);
 if (true) break;

case 21:
//C
this.state = 22;
;
 BA.debugLineNum = 91;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_NUM_REGIST";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select HVD_NUM_REGISTRO, HVD_CLIENTE, HVD_PRONOMBRE, HVD_CANT, HVD_COSTO_TOT, HVD_FECHA, HVD_PROID, CAT_GP_PRECIO from HIST_VENTAS2 join CAT_GUNAPROD on CAT_GP_ID = HVD_PROID WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_PRONOMBRE asc"))));
 BA.debugLineNum = 92;BA.debugLine="If c.RowCount > 0 Then 'Si  hay pedido en HIST_";
Debug.ShouldStop(134217728);
if (true) break;

case 22:
//if
this.state = 37;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 24;
}if (true) break;

case 24:
//C
this.state = 25;
 BA.debugLineNum = 95;BA.debugLine="Private esteCliente As String = Subs.traeClien";
Debug.ShouldStop(1073741824);
_estecliente = parent._subs.runMethod(true,"_traecliente" /*RemoteObject*/ ,__ref.getField(false, "ba"));Debug.locals.put("esteCliente", _estecliente);Debug.locals.put("esteCliente", _estecliente);
 BA.debugLineNum = 96;BA.debugLine="Private rv As Cursor = Starter.skmt.ExecQuery(";
Debug.ShouldStop(-2147483648);
_rv = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_rv = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from REPARTO where REP_CLIENTE = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_estecliente))),RemoteObject.createImmutable("' and REP_CLI_ORIG <> '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_estecliente))),RemoteObject.createImmutable("' and REP_RECHAZO = 0"))))));Debug.locals.put("rv", _rv);Debug.locals.put("rv", _rv);
 BA.debugLineNum = 97;BA.debugLine="If rv.RowCount > 0 Then 'Si tenemos venta en e";
Debug.ShouldStop(1);
if (true) break;

case 25:
//if
this.state = 32;
if (RemoteObject.solveBoolean(">",_rv.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 27;
}if (true) break;

case 27:
//C
this.state = 28;
 BA.debugLineNum = 98;BA.debugLine="For i2=0 To rv.RowCount - 1";
Debug.ShouldStop(2);
if (true) break;

case 28:
//for
this.state = 31;
step36 = 1;
limit36 = RemoteObject.solve(new RemoteObject[] {_rv.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i2 = 0 ;
Debug.locals.put("i2", _i2);
this.state = 52;
if (true) break;

case 52:
//C
this.state = 31;
if ((step36 > 0 && _i2 <= limit36) || (step36 < 0 && _i2 >= limit36)) this.state = 30;
if (true) break;

case 53:
//C
this.state = 52;
_i2 = ((int)(0 + _i2 + step36)) ;
Debug.locals.put("i2", _i2);
if (true) break;

case 30:
//C
this.state = 53;
 BA.debugLineNum = 99;BA.debugLine="rv.Position = i2";
Debug.ShouldStop(4);
_rv.runMethod(true,"setPosition",BA.numberCast(int.class, _i2));
 BA.debugLineNum = 100;BA.debugLine="Log($\"Actualizamos REPARTO - cliente=${rv.Ge";
Debug.ShouldStop(8);
parent.__c.runVoidMethod ("LogImpl","316449580",(RemoteObject.concat(RemoteObject.createImmutable("Actualizamos REPARTO - cliente="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rv.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLIENTE")))))),RemoteObject.createImmutable(", cliente orignal="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rv.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG")))))),RemoteObject.createImmutable(", le agregamos "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rv.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CANT")))))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 101;BA.debugLine="Starter.skmt.ExecNonQuery($\"update REPARTO s";
Debug.ShouldStop(16);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update REPARTO set REP_CANT = REP_CANT + "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rv.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CANT")))))),RemoteObject.createImmutable(" where REP_RECHAZO = '1' and REP_CLIENTE = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rv.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG")))))),RemoteObject.createImmutable("' and REP_CLI_ORIG = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rv.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG")))))),RemoteObject.createImmutable("'")))));
 if (true) break;
if (true) break;

case 31:
//C
this.state = 32;
Debug.locals.put("i2", _i2);
;
 if (true) break;

case 32:
//C
this.state = 33;
;
 BA.debugLineNum = 105;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from reparto";
Debug.ShouldStop(256);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from reparto where REP_CLIENTE IN (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 106;BA.debugLine="For i=0 To c.RowCount - 1 'Insertamos los prod";
Debug.ShouldStop(512);
if (true) break;

case 33:
//for
this.state = 36;
step43 = 1;
limit43 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
Debug.locals.put("i", _i);
this.state = 54;
if (true) break;

case 54:
//C
this.state = 36;
if ((step43 > 0 && _i <= limit43) || (step43 < 0 && _i >= limit43)) this.state = 35;
if (true) break;

case 55:
//C
this.state = 54;
_i = ((int)(0 + _i + step43)) ;
Debug.locals.put("i", _i);
if (true) break;

case 35:
//C
this.state = 55;
 BA.debugLineNum = 107;BA.debugLine="c.Position=i";
Debug.ShouldStop(1024);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 108;BA.debugLine="Log($\"REGISTRO= ${c.GetString(\"HVD_NUM_REGIST";
Debug.ShouldStop(2048);
parent.__c.runVoidMethod ("LogImpl","316449588",(RemoteObject.concat(RemoteObject.createImmutable("REGISTRO= "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_NUM_REGISTRO")))))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 109;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repar";
Debug.ShouldStop(4096);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_PRODREGISTRO, REP_CLI_ORIG) VALUES (?,?,?,?,?,1,?,?,?,?) ")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {9},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CLIENTE"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_COSTO_TOT"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_FECHA"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PROID"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_NUM_REGISTRO"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CLIENTE")))})))));
 BA.debugLineNum = 110;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repar";
Debug.ShouldStop(8192);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_PRODREGISTRO, REP_CLI_ORIG) VALUES (?,?,?,?,?,0,?,?,?,?) ")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {9},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CLIENTE"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE"))),BA.NumberToString(0),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_COSTO_TOT"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_FECHA"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PROID"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_NUM_REGISTRO"))),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CLIENTE")))})))));
 BA.debugLineNum = 111;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapr";
Debug.ShouldStop(16384);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_nombre = ?")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE"))))})))));
 if (true) break;
if (true) break;

case 36:
//C
this.state = 37;
Debug.locals.put("i", _i);
;
 if (true) break;

case 37:
//C
this.state = 38;
;
 BA.debugLineNum = 116;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVENTA";
Debug.ShouldStop(524288);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON,NV_FOTO) VALUES(?,?,?,?,?,?,?,?) ")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {8},new Object[] {(__ref.getField(true,"_cuenta" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_motivo" /*RemoteObject*/ )),(__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethod(true,"getText")),(parent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(parent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ )),(_rutaactualizar)})))));
 BA.debugLineNum = 117;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set";
Debug.ShouldStop(1048576);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 3, HORAENT = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),RemoteObject.createImmutable(" "),__ref.getField(true,"_stime" /*RemoteObject*/ ))))),RemoteObject.createImmutable("' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_rutaactualizar))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 118;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS S";
Debug.ShouldStop(2097152);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("update HIST_VENTAS SET HVD_RECHAZO = 1, HVD_RECHAZOCANT = HVD_CANT, HVD_RECHAZOCANTC = CANTC, BCAJAS = 0 , CANTC = 0 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 BA.debugLineNum = 119;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
Debug.ShouldStop(4194304);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.createImmutable("update HIST_VENTAS set HVD_RECHAZO = 2,  HVD_RECHAZOCANT = HVD_RECHAZOCANT  WHERE HVD_PROID = HVD_CODPROMO and HVD_CLIENTE in (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 120;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM PEDIDO W";
Debug.ShouldStop(8388608);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 BA.debugLineNum = 121;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM R";
Debug.ShouldStop(16777216);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT RUTAA FROM RUTAA"))));
 BA.debugLineNum = 122;BA.debugLine="d.Position = 0";
Debug.ShouldStop(33554432);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 123;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
Debug.ShouldStop(67108864);
_ruta = __ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RUTAA")));Debug.locals.put("ruta", _ruta);Debug.locals.put("ruta", _ruta);
 BA.debugLineNum = 124;BA.debugLine="d.Close";
Debug.ShouldStop(134217728);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 125;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA";
Debug.ShouldStop(268435456);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)"))));
 BA.debugLineNum = 126;BA.debugLine="d.Position = 0";
Debug.ShouldStop(536870912);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 127;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUT";
Debug.ShouldStop(1073741824);
_rutapre = __ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("rutapre", _rutapre);Debug.locals.put("rutapre", _rutapre);
 BA.debugLineNum = 128;BA.debugLine="d.Close";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 129;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FR";
Debug.ShouldStop(1);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));
 BA.debugLineNum = 130;BA.debugLine="d.Position = 0";
Debug.ShouldStop(2);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 131;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
Debug.ShouldStop(4);
_fechaprev = parent._subs.runMethod(true,"_traefechaprev" /*RemoteObject*/ ,__ref.getField(false, "ba"));Debug.locals.put("fechaprev", _fechaprev);Debug.locals.put("fechaprev", _fechaprev);
 BA.debugLineNum = 132;BA.debugLine="d.Close";
Debug.ShouldStop(8);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 133;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CUENTA FROM";
Debug.ShouldStop(16);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT CUENTA FROM CUENTAA"))));
 BA.debugLineNum = 134;BA.debugLine="d.Position = 0";
Debug.ShouldStop(32);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 135;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPARTO";
Debug.ShouldStop(64);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0)")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {12},new Object[] {__ref.getField(true,"_cuenta" /*RemoteObject*/ ),__ref.getField(true,"_usuario" /*RemoteObject*/ ),RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),RemoteObject.createImmutable(" "),__ref.getField(true,"_stime" /*RemoteObject*/ )),parent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ ),parent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ ),parent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_almacen" /*RemoteObject*/ ),_ruta,_rutapre,_fechaprev,__ref.getField(true,"_motivo" /*RemoteObject*/ ),__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethod(true,"getText"),RemoteObject.createImmutable("NO ENTREGADO")})))));
 BA.debugLineNum = 137;BA.debugLine="Msgbox2Async(\"Pedido rechazado\",\"Atención\",\"Ok\"";
Debug.ShouldStop(256);
parent.__c.runVoidMethod ("Msgbox2Async",(Object)(BA.ObjectToCharSequence("Pedido rechazado")),(Object)(BA.ObjectToCharSequence("Atención")),(Object)(BA.ObjectToString("Ok")),(Object)(BA.ObjectToString("")),(Object)(BA.ObjectToString("")),(Object)(parent.__c.runMethod(false,"LoadBitmap",(Object)(parent.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(RemoteObject.createImmutable("alert2.png")))),__ref.getField(false, "ba"),(Object)(parent.__c.getField(true,"False")));
 BA.debugLineNum = 138;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
Debug.ShouldStop(512);
parent.__c.runVoidMethod ("WaitFor","msgbox_result", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_noventa", "guarda_click"), null);
this.state = 56;
return;
case 56:
//C
this.state = 38;
_resultado = (RemoteObject) result.getArrayElement(true,RemoteObject.createImmutable(1));Debug.locals.put("resultado", _resultado);
;
 BA.debugLineNum = 139;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
Debug.ShouldStop(1024);
if (true) break;

case 38:
//if
this.state = 47;
if (RemoteObject.solveBoolean("=",_resultado,BA.numberCast(double.class, parent.__c.getField(false,"DialogResponse").getField(true,"POSITIVE")))) { 
this.state = 40;
}if (true) break;

case 40:
//C
this.state = 41;
 BA.debugLineNum = 140;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQue";
Debug.ShouldStop(2048);
_mandamapa = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_mandamapa = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT * FROM kmt_info WHERE gestion = 0 and CAT_CL_CODIGO <> 63403"))));Debug.locals.put("mandamapa", _mandamapa);Debug.locals.put("mandamapa", _mandamapa);
 BA.debugLineNum = 141;BA.debugLine="If mandamapa.RowCount > 0 Then";
Debug.ShouldStop(4096);
if (true) break;

case 41:
//if
this.state = 46;
if (RemoteObject.solveBoolean(">",_mandamapa.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 43;
}else 
{ BA.debugLineNum = 143;BA.debugLine="Else If mandamapa.RowCount = 0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("=",_mandamapa.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 45;
}}
if (true) break;

case 43:
//C
this.state = 46;
 BA.debugLineNum = 142;BA.debugLine="StartActivity(MAPA_RUTAS)";
Debug.ShouldStop(8192);
parent.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((parent._mapa_rutas.getObject())));
 if (true) break;

case 45:
//C
this.state = 46;
 BA.debugLineNum = 144;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(32768);
parent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 if (true) break;

case 46:
//C
this.state = 47;
;
 if (true) break;

case 47:
//C
this.state = 50;
;
 if (true) break;

case 49:
//C
this.state = 50;
 BA.debugLineNum = 148;BA.debugLine="COMENTARIO = e_comm.Text";
Debug.ShouldStop(524288);
__ref.setField ("_comentario" /*RemoteObject*/ ,__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethod(true,"getText"));
 if (true) break;

case 50:
//C
this.state = 51;
;
 if (true) break;

case 51:
//C
this.state = -1;
;
 BA.debugLineNum = 153;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _msgbox_result(RemoteObject __ref,RemoteObject _resultado) throws Exception{
}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,24);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_noventa","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 24;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 25;BA.debugLine="Return Me";
Debug.ShouldStop(16777216);
if (true) return __ref;
 BA.debugLineNum = 26;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _jobdone(RemoteObject __ref,RemoteObject _job) throws Exception{
try {
		Debug.PushSubsStack("JobDone (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,176);
if (RapidSub.canDelegate("jobdone")) { return __ref.runUserSub(false, "c_noventa","jobdone", __ref, _job);}
RemoteObject _resultado = RemoteObject.declareNull("reparto_mazapa.keymon.lat.dbrequestmanager._dbresult");
RemoteObject _cliente = RemoteObject.createImmutable("");
RemoteObject _records = null;
RemoteObject _k = RemoteObject.createImmutable("");
Debug.locals.put("Job", _job);
 BA.debugLineNum = 176;BA.debugLine="Sub JobDone(Job As HttpJob)";
Debug.ShouldStop(32768);
 BA.debugLineNum = 177;BA.debugLine="Log(Job.Success)";
Debug.ShouldStop(65536);
c_noventa.__c.runVoidMethod ("LogImpl","316580609",BA.ObjectToString(_job.getField(true,"_success" /*RemoteObject*/ )),0);
 BA.debugLineNum = 178;BA.debugLine="If Job.Success = False Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_success" /*RemoteObject*/ ),c_noventa.__c.getField(true,"False"))) { 
 }else {
 BA.debugLineNum = 181;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
Debug.ShouldStop(1048576);
c_noventa.__c.runVoidMethod ("LogImpl","316580613",RemoteObject.concat(RemoteObject.createImmutable("JobDone: '"),__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job)).getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable("' - Registros: "),__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job)).getField(false,"Rows" /*RemoteObject*/ ).runMethod(true,"getSize")),c_noventa.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 182;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 183;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
Debug.ShouldStop(4194304);
_resultado = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("resultado", _resultado);Debug.locals.put("resultado", _resultado);
 BA.debugLineNum = 184;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean(">",(BA.ObjectToString(_resultado.getField(false,"Tag" /*RemoteObject*/ ))).runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("ins_REPARTOPendientes_head_"))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 185;BA.debugLine="Private cliente As String= resultado.Tag";
Debug.ShouldStop(16777216);
_cliente = BA.ObjectToString(_resultado.getField(false,"Tag" /*RemoteObject*/ ));Debug.locals.put("cliente", _cliente);Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 186;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
Debug.ShouldStop(33554432);
_cliente = _cliente.runMethod(true,"substring",(Object)(RemoteObject.solve(new RemoteObject[] {_cliente.runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("_"))),RemoteObject.createImmutable(24)}, "+",1, 1)));Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 187;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
Debug.ShouldStop(67108864);
c_noventa.__c.runVoidMethod ("LogImpl","316580619",(RemoteObject.concat(RemoteObject.createImmutable("Cliente1:"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 188;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update REPARTO_GEO";
Debug.ShouldStop(134217728);
c_noventa._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update REPARTO_GEO SET ENVIO = ? WHERE CLIENTE = ? AND ENVIO <> ?")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {3},new Object[] {BA.ObjectToString("1"),_cliente,RemoteObject.createImmutable("1")})))));
 BA.debugLineNum = 189;BA.debugLine="For Each records() As Object In resultado.Rows";
Debug.ShouldStop(268435456);
{
final RemoteObject group12 = _resultado.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen12 = group12.runMethod(true,"getSize").<Integer>get()
;int index12 = 0;
;
for (; index12 < groupLen12;index12++){
_records = (group12.runMethod(false,"Get",index12));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 190;BA.debugLine="For Each k As String In resultado.Columns.Key";
Debug.ShouldStop(536870912);
{
final RemoteObject group13 = _resultado.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Keys");
final int groupLen13 = group13.runMethod(true,"getSize").<Integer>get()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_k = BA.ObjectToString(group13.runMethod(false,"Get",index13));Debug.locals.put("k", _k);
Debug.locals.put("k", _k);
 BA.debugLineNum = 191;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
Debug.ShouldStop(1073741824);
c_noventa.__c.runVoidMethod ("LogImpl","316580623",RemoteObject.concat(_resultado.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(": "),_k,RemoteObject.createImmutable(": "),_records.getArrayElement(false,BA.numberCast(int.class, _resultado.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((_k)))))),0);
 }
}Debug.locals.put("k", _k);
;
 }
}Debug.locals.put("records", _records);
;
 };
 };
 BA.debugLineNum = 196;BA.debugLine="Job.Release";
Debug.ShouldStop(8);
_job.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_release" /*RemoteObject*/ );
 };
 BA.debugLineNum = 199;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _mandapendientesreparto(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("mandaPendientesreparto (c_noventa) ","c_noventa",10,__ref.getField(false, "ba"),__ref,156);
if (RapidSub.canDelegate("mandapendientesreparto")) { return __ref.runUserSub(false, "c_noventa","mandapendientesreparto", __ref);}
int _i = 0;
RemoteObject _cmd = RemoteObject.declareNull("reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand");
 BA.debugLineNum = 156;BA.debugLine="Sub mandaPendientesreparto";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 157;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT  CLIENTE, USUARI";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_noventa._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT  CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO FROM REPARTO_GEO where ENVIO <> 1"))));
 BA.debugLineNum = 158;BA.debugLine="Log($\"REPARTO_Cliente PENDIENTE: ${c.RowCount}\"$)";
Debug.ShouldStop(536870912);
c_noventa.__c.runVoidMethod ("LogImpl","316515074",(RemoteObject.concat(RemoteObject.createImmutable("REPARTO_Cliente PENDIENTE: "),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 159;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 160;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(-2147483648);
{
final int step4 = 1;
final int limit4 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step4 > 0 && _i <= limit4) || (step4 < 0 && _i >= limit4) ;_i = ((int)(0 + _i + step4))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 161;BA.debugLine="c.Position=i";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 163;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(4);
_cmd = RemoteObject.createNew ("reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 164;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(8);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 165;BA.debugLine="cmd.Name = \"insert_REPARTO_MAZAPA\"";
Debug.ShouldStop(16);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("insert_REPARTO_MAZAPA"));
 BA.debugLineNum = 166;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"C";
Debug.ShouldStop(32);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {12},new Object[] {(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CLIENTE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("FECHA_PUNTEO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("LATITUD")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("LONGITUD")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("ALMACEN")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RUTA_REPARTO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RUTA_PREV")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("FECHA_PREVENTA")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("MOTIVO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("COMENTARIO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TIPO"))))}));
 BA.debugLineNum = 167;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_REPARTOPe";
Debug.ShouldStop(64);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)(((RemoteObject.concat(RemoteObject.createImmutable("ins_REPARTOPendientes_head_"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CLIENTE")))))),RemoteObject.createImmutable(""))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 171;BA.debugLine="c.Close";
Debug.ShouldStop(1024);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 172;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}