package gunav2.keymon.com.mx;

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",6,__ref.getField(false, "ba"),__ref,55);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_noventa","b4xpage_appear", __ref);}
 BA.debugLineNum = 55;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 56;BA.debugLine="Panel1.Height = Root.Height";
Debug.ShouldStop(8388608);
__ref.getField(false,"_panel1" /*RemoteObject*/ ).runMethod(true,"setHeight",__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getHeight"));
 BA.debugLineNum = 57;BA.debugLine="Panel1.Width = Root.Width";
Debug.ShouldStop(16777216);
__ref.getField(false,"_panel1" /*RemoteObject*/ ).runMethod(true,"setWidth",__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"));
 BA.debugLineNum = 58;BA.debugLine="Subs.centraPanel(Panel1, Root.Width)";
Debug.ShouldStop(33554432);
c_noventa._subs.runVoidMethod ("_centrapanel" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_panel1" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 59;BA.debugLine="Subs.centraPanelV(Panel1, Root.Height)";
Debug.ShouldStop(67108864);
c_noventa._subs.runVoidMethod ("_centrapanelv" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_panel1" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getHeight")));
 BA.debugLineNum = 60;BA.debugLine="e_comm.Text=\"\"";
Debug.ShouldStop(134217728);
__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 61;BA.debugLine="tgl.Initialize";
Debug.ShouldStop(268435456);
__ref.getField(false,"_tgl" /*RemoteObject*/ ).runVoidMethod ("Initialize",__ref.getField(false, "ba"));
 BA.debugLineNum = 62;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
Debug.ShouldStop(536870912);
if (c_noventa.__c.runMethod(true,"Not",(Object)(c_noventa._starter._gps /*RemoteObject*/ .runMethod(true,"getGPSEnabled"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 63;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
Debug.ShouldStop(1073741824);
c_noventa.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Es necesario tener el GPS encendido")),(Object)(c_noventa.__c.getField(true,"True")));
 BA.debugLineNum = 64;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
Debug.ShouldStop(-2147483648);
c_noventa.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((c_noventa._starter._gps /*RemoteObject*/ .runMethod(false,"getLocationSettingsIntent"))));
 };
 BA.debugLineNum = 66;BA.debugLine="r_1.Checked = False";
Debug.ShouldStop(2);
__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 67;BA.debugLine="r_2.Checked = False";
Debug.ShouldStop(4);
__ref.getField(false,"_r_2" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 68;BA.debugLine="r_3.Checked = False";
Debug.ShouldStop(8);
__ref.getField(false,"_r_3" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 69;BA.debugLine="r_4.Checked = False";
Debug.ShouldStop(16);
__ref.getField(false,"_r_4" /*RemoteObject*/ ).runMethodAndSync(true,"setChecked",c_noventa.__c.getField(true,"False"));
 BA.debugLineNum = 70;BA.debugLine="End Sub";
Debug.ShouldStop(32);
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",6,__ref.getField(false, "ba"),__ref,39);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_noventa","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 39;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(64);
 BA.debugLineNum = 40;BA.debugLine="Root = Root1";
Debug.ShouldStop(128);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 42;BA.debugLine="Root.LoadLayout(\"noventa\")";
Debug.ShouldStop(512);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("noventa")),__ref.getField(false, "ba"));
 BA.debugLineNum = 44;BA.debugLine="ruta = File.DirInternal";
Debug.ShouldStop(2048);
__ref.setField ("_ruta" /*RemoteObject*/ ,c_noventa.__c.getField(false,"File").runMethod(true,"getDirInternal"));
 BA.debugLineNum = 46;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("=",c_noventa.__c.getField(false,"File").runMethod(true,"Exists",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db"))),c_noventa.__c.getField(true,"False"))) { 
 BA.debugLineNum = 47;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
Debug.ShouldStop(16384);
c_noventa.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(c_noventa.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db")));
 };
 BA.debugLineNum = 50;BA.debugLine="bitacora.Initialize(\"bitacora\", \"bitacora\", Root,";
Debug.ShouldStop(131072);
__ref.getField(false,"_bitacora" /*RemoteObject*/ ).runClassMethod (gunav2.keymon.com.mx.c_bitacora.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable(("bitacora"))),(Object)(BA.ObjectToString("bitacora")),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ )),(Object)(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ )),(Object)(c_noventa._starter._reqmanager /*RemoteObject*/ ));
 BA.debugLineNum = 51;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
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",6,__ref.getField(false, "ba"),__ref,77);
if (RapidSub.canDelegate("cancela_click")) { return __ref.runUserSub(false, "c_noventa","cancela_click", __ref);}
 BA.debugLineNum = 77;BA.debugLine="Sub CANCELA_Click";
Debug.ShouldStop(4096);
 BA.debugLineNum = 78;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(8192);
c_noventa._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 79;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
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 = 5;BA.debugLine="Dim g As GPS";
c_noventa._g = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");__ref.setField("_g",c_noventa._g);
 //BA.debugLineNum = 6;BA.debugLine="Dim ruta As String";
c_noventa._ruta = RemoteObject.createImmutable("");__ref.setField("_ruta",c_noventa._ruta);
 //BA.debugLineNum = 7;BA.debugLine="Dim skmt As SQL";
c_noventa._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");__ref.setField("_skmt",c_noventa._skmt);
 //BA.debugLineNum = 8;BA.debugLine="Dim c As Cursor";
c_noventa._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_noventa._c);
 //BA.debugLineNum = 10;BA.debugLine="Dim CANCELA As Button";
c_noventa._cancela = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_cancela",c_noventa._cancela);
 //BA.debugLineNum = 11;BA.debugLine="Dim GUARDA As Button";
c_noventa._guarda = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_guarda",c_noventa._guarda);
 //BA.debugLineNum = 12;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 = 13;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 = 14;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 = 15;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 = 16;BA.debugLine="Dim motivo As String";
c_noventa._motivo = RemoteObject.createImmutable("");__ref.setField("_motivo",c_noventa._motivo);
 //BA.debugLineNum = 17;BA.debugLine="Dim cuenta As String";
c_noventa._cuenta = RemoteObject.createImmutable("");__ref.setField("_cuenta",c_noventa._cuenta);
 //BA.debugLineNum = 18;BA.debugLine="Dim usuario As String";
c_noventa._usuario = RemoteObject.createImmutable("");__ref.setField("_usuario",c_noventa._usuario);
 //BA.debugLineNum = 19;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 = 21;BA.debugLine="Dim tgl As Toggle";
c_noventa._tgl = RemoteObject.createNew ("com.rootsoft.togglelibrary.ToggleLibrary");__ref.setField("_tgl",c_noventa._tgl);
 //BA.debugLineNum = 22;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 = 24;BA.debugLine="Private stay_hh As String";
c_noventa._stay_hh = RemoteObject.createImmutable("");__ref.setField("_stay_hh",c_noventa._stay_hh);
 //BA.debugLineNum = 25;BA.debugLine="Private stay_mi As String";
c_noventa._stay_mi = RemoteObject.createImmutable("");__ref.setField("_stay_mi",c_noventa._stay_mi);
 //BA.debugLineNum = 26;BA.debugLine="Private stay_ss As String";
c_noventa._stay_ss = RemoteObject.createImmutable("");__ref.setField("_stay_ss",c_noventa._stay_ss);
 //BA.debugLineNum = 27;BA.debugLine="Private p_NoVenta As Panel";
c_noventa._p_noventa = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_noventa",c_noventa._p_noventa);
 //BA.debugLineNum = 28;BA.debugLine="Dim tipo_venta = Subs.traeTipoVentaDeBD";
c_noventa._tipo_venta = c_noventa._subs.runMethod(true,"_traetipoventadebd" /*RemoteObject*/ ,__ref.getField(false, "ba"));__ref.setField("_tipo_venta",c_noventa._tipo_venta);
 //BA.debugLineNum = 29;BA.debugLine="Dim bitacora As C_Bitacora";
c_noventa._bitacora = RemoteObject.createNew ("gunav2.keymon.com.mx.c_bitacora");__ref.setField("_bitacora",c_noventa._bitacora);
 //BA.debugLineNum = 30;BA.debugLine="Private Panel1 As Panel";
c_noventa._panel1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_panel1",c_noventa._panel1);
 //BA.debugLineNum = 31;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",6,__ref.getField(false, "ba"),__ref,72);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "c_noventa","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 72;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(128);
 BA.debugLineNum = 75;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guarda_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("GUARDA_Click (c_noventa) ","c_noventa",6,__ref.getField(false, "ba"),__ref,81);
if (RapidSub.canDelegate("guarda_click")) { return __ref.runUserSub(false, "c_noventa","guarda_click", __ref);}
int _i = 0;
 BA.debugLineNum = 81;BA.debugLine="Sub GUARDA_Click";
Debug.ShouldStop(65536);
 BA.debugLineNum = 82;BA.debugLine="If r_1.Checked Then";
Debug.ShouldStop(131072);
if (__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 83;BA.debugLine="motivo = \"CERRADO\"";
Debug.ShouldStop(262144);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("CERRADO"));
 }else 
{ BA.debugLineNum = 84;BA.debugLine="Else If r_2.Checked Then";
Debug.ShouldStop(524288);
if (__ref.getField(false,"_r_2" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 85;BA.debugLine="motivo = \"NO COMPRA\"";
Debug.ShouldStop(1048576);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("NO COMPRA"));
 }else 
{ BA.debugLineNum = 86;BA.debugLine="Else If r_3.Checked Then";
Debug.ShouldStop(2097152);
if (__ref.getField(false,"_r_3" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 87;BA.debugLine="motivo = \"CON PRODUCTO\"";
Debug.ShouldStop(4194304);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("CON PRODUCTO"));
 }else {
 BA.debugLineNum = 89;BA.debugLine="motivo = \"NO ESTA EL ENCARGADO\"";
Debug.ShouldStop(16777216);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("NO ESTA EL ENCARGADO"));
 }}}
;
 BA.debugLineNum = 91;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(67108864);
c_noventa.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 92;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(134217728);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_noventa.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 93;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(268435456);
__ref.setField ("_stime" /*RemoteObject*/ ,c_noventa.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 94;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CUENTA";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CUENTA from cuentaa"))));
 BA.debugLineNum = 95;BA.debugLine="c.Position = 0";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 96;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
Debug.ShouldStop(-2147483648);
__ref.setField ("_cuenta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 97;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select usuario from usuarioa"))));
 BA.debugLineNum = 98;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 99;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(4);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 100;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PRO";
Debug.ShouldStop(8);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) "))));
 BA.debugLineNum = 101;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 102;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(32);
{
final int step21 = 1;
final int limit21 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step21 > 0 && _i <= limit21) || (step21 < 0 && _i >= limit21) ;_i = ((int)(0 + _i + step21))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 103;BA.debugLine="c.Position=i";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 104;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update $";
Debug.ShouldStop(128);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_noventa._subs.runMethod(true,"_traetablaprods" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(true,"_tipo_venta" /*RemoteObject*/ )))))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?")))),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID"))))})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 108;BA.debugLine="If B4XPages.MainPage.cliente.IsInitialized Then";
Debug.ShouldStop(2048);
if (c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_cliente" /*RemoteObject*/ ).runMethod(true,"IsInitialized" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 109;BA.debugLine="B4XPages.MainPage.cliente.motivoNoVenta = motivo";
Debug.ShouldStop(4096);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_cliente" /*RemoteObject*/ ).setField ("_motivonoventa" /*RemoteObject*/ ,__ref.getField(true,"_motivo" /*RemoteObject*/ ));
 BA.debugLineNum = 111;BA.debugLine="Starter.enVenta = False";
Debug.ShouldStop(16384);
c_noventa._starter._enventa /*RemoteObject*/  = c_noventa.__c.getField(true,"False");
 };
 BA.debugLineNum = 114;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(131072);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 115;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(262144);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 117;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(1048576);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {7},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")),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 118;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_i";
Debug.ShouldStop(2097152);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info3 set gestion = 3  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 119;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
Debug.ShouldStop(4194304);
c_noventa.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 120;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(8388608);
__ref.setField ("_stime" /*RemoteObject*/ ,c_noventa.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 121;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
Debug.ShouldStop(16777216);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE HIST_STAY_STORE set HSS_OUT = ?  where HSS_CODIGO In (select cuenta from cuentaa)")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(true,"_stime" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 124;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\" Select (subs";
Debug.ShouldStop(134217728);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable(" Select (substr(HSS_OUT,1,2) - substr(HSS_IN,1,2)) - Case when  (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) < 0 Then 1 Else 0 end HORAS_TOTALES, "),RemoteObject.createImmutable("Case when  (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) < 0 Then (substr(HSS_OUT,3,2) + 60 - substr(HSS_IN,3,2)) "),RemoteObject.createImmutable("	Else (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) End - Case when  (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) < 0 Then 1 Else 0 end  MINUTOS_TOTALES, "),RemoteObject.createImmutable("Case when  (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) < 0 Then (substr(HSS_OUT,5,2) + 60 - substr(HSS_IN,5,2)) "),RemoteObject.createImmutable("	Else (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) end SEGUNDOS_TOTALES "),RemoteObject.createImmutable("	from HIST_STAY_STORE where HSS_CODIGO In (Select cuenta from cuentaa) ")))));
 BA.debugLineNum = 130;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 131;BA.debugLine="stay_hh = c.GetString(\"HORAS_TOTALES\") * 60 * 60";
Debug.ShouldStop(4);
__ref.setField ("_stay_hh" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HORAS_TOTALES")))),RemoteObject.createImmutable(60),RemoteObject.createImmutable(60)}, "**",0, 0)));
 BA.debugLineNum = 132;BA.debugLine="stay_mi = c.GetString(\"MINUTOS_TOTALES\") * 60";
Debug.ShouldStop(8);
__ref.setField ("_stay_mi" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("MINUTOS_TOTALES")))),RemoteObject.createImmutable(60)}, "*",0, 0)));
 BA.debugLineNum = 133;BA.debugLine="stay_ss = c.GetString(\"SEGUNDOS_TOTALES\")";
Debug.ShouldStop(16);
__ref.setField ("_stay_ss" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("SEGUNDOS_TOTALES"))));
 BA.debugLineNum = 134;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
Debug.ShouldStop(32);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE HIST_STAY_STORE set HSS_TOT = ?  where HSS_CODIGO In (select cuenta from cuentaa)")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_stay_hh" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(true,"_stay_mi" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(true,"_stay_ss" /*RemoteObject*/ ))}, "++",2, 0))})))));
 BA.debugLineNum = 135;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
Debug.ShouldStop(64);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE HIST_STAY_OUT set HSO_FIN = ?  ")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(true,"_stime" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 136;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
Debug.ShouldStop(128);
c_noventa.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HH:mm:ss"));
 BA.debugLineNum = 137;BA.debugLine="bitacora.mandaBitacora(Subs.fechanormal(DateTime.";
Debug.ShouldStop(256);
__ref.getField(false,"_bitacora" /*RemoteObject*/ ).runClassMethod (gunav2.keymon.com.mx.c_bitacora.class, "_mandabitacora" /*RemoteObject*/ ,(Object)(c_noventa._subs.runMethod(true,"_fechanormal" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.NumberToString(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow"))))),(Object)(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(Object)(c_noventa._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(c_noventa._subs.runMethod(true,"_traerutabitacora" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(BA.ObjectToString("NO VENTA")),(Object)(c_noventa._subs.runMethod(true,"_traecliente" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(c_noventa._subs.runMethod(true,"_fechanormal" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.NumberToString(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow"))))),(Object)(c_noventa._subs.runMethod(true,"_fechanormal" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.NumberToString(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow"))))),(Object)(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(Object)(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ )),(Object)(BA.NumberToString(2)),(Object)(__ref.getField(true,"_motivo" /*RemoteObject*/ )),(Object)(BA.ObjectToString(__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethod(true,"getChecked"))),(Object)(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_cliente" /*RemoteObject*/ ).getField(false,"_bitacora" /*RemoteObject*/ ).getField(true,"_banderageocerca" /*RemoteObject*/ )));
 BA.debugLineNum = 138;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(512);
c_noventa._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 BA.debugLineNum = 139;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (c_noventa) ","c_noventa",6,__ref.getField(false, "ba"),__ref,34);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_noventa","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 34;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(2);
 BA.debugLineNum = 35;BA.debugLine="Return Me";
Debug.ShouldStop(4);
if (true) return __ref;
 BA.debugLineNum = 36;BA.debugLine="End Sub";
Debug.ShouldStop(8);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}