package keymon.lat.medicomed;

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",8,__ref.getField(false, "ba"),__ref,51);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_noventa","b4xpage_appear", __ref);}
 BA.debugLineNum = 51;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(262144);
 BA.debugLineNum = 52;BA.debugLine="e_comm.Text=\"\"";
Debug.ShouldStop(524288);
__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 53;BA.debugLine="tgl.Initialize";
Debug.ShouldStop(1048576);
__ref.getField(false,"_tgl" /*RemoteObject*/ ).runVoidMethod ("Initialize",__ref.getField(false, "ba"));
 BA.debugLineNum = 54;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
Debug.ShouldStop(2097152);
if (c_noventa.__c.runMethod(true,"Not",(Object)(c_noventa._starter._gps /*RemoteObject*/ .runMethod(true,"getGPSEnabled"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 55;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
Debug.ShouldStop(4194304);
c_noventa.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Es necesario tener el GPS encendido")),(Object)(c_noventa.__c.getField(true,"True")));
 BA.debugLineNum = 56;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
Debug.ShouldStop(8388608);
c_noventa.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((c_noventa._starter._gps /*RemoteObject*/ .runMethod(false,"getLocationSettingsIntent"))));
 };
 BA.debugLineNum = 58;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
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",8,__ref.getField(false, "ba"),__ref,36);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_noventa","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 36;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(8);
 BA.debugLineNum = 37;BA.debugLine="Root = Root1";
Debug.ShouldStop(16);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 39;BA.debugLine="Root.LoadLayout(\"noventa\")";
Debug.ShouldStop(64);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("noventa")),__ref.getField(false, "ba"));
 BA.debugLineNum = 40;BA.debugLine="ruta = File.DirInternal";
Debug.ShouldStop(128);
__ref.setField ("_ruta" /*RemoteObject*/ ,c_noventa.__c.getField(false,"File").runMethod(true,"getDirInternal"));
 BA.debugLineNum = 42;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
Debug.ShouldStop(512);
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 = 43;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
Debug.ShouldStop(1024);
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 = 46;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
Debug.ShouldStop(8192);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.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 = 47;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
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",8,__ref.getField(false, "ba"),__ref,65);
if (RapidSub.canDelegate("cancela_click")) { return __ref.runUserSub(false, "c_noventa","cancela_click", __ref);}
 BA.debugLineNum = 65;BA.debugLine="Sub CANCELA_Click";
Debug.ShouldStop(1);
 BA.debugLineNum = 66;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(2);
c_noventa._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 67;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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="Dim reqManager As DBRequestManager";
c_noventa._reqmanager = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager");__ref.setField("_reqmanager",c_noventa._reqmanager);
 //BA.debugLineNum = 28;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",8,__ref.getField(false, "ba"),__ref,60);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "c_noventa","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 60;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 63;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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",8,__ref.getField(false, "ba"),__ref,68);
if (RapidSub.canDelegate("guarda_click")) { return __ref.runUserSub(false, "c_noventa","guarda_click", __ref);}
int _i = 0;
 BA.debugLineNum = 68;BA.debugLine="Sub GUARDA_Click";
Debug.ShouldStop(8);
 BA.debugLineNum = 69;BA.debugLine="If r_1.Checked Then";
Debug.ShouldStop(16);
if (__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 70;BA.debugLine="motivo = \"CERRADO\"";
Debug.ShouldStop(32);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("CERRADO"));
 }else 
{ BA.debugLineNum = 71;BA.debugLine="Else If r_2.Checked Then";
Debug.ShouldStop(64);
if (__ref.getField(false,"_r_2" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 72;BA.debugLine="motivo = \"NO COMPRA\"";
Debug.ShouldStop(128);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("NO COMPRA"));
 }else 
{ BA.debugLineNum = 73;BA.debugLine="Else If r_3.Checked Then";
Debug.ShouldStop(256);
if (__ref.getField(false,"_r_3" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 74;BA.debugLine="motivo = \"CON PRODUCTO\"";
Debug.ShouldStop(512);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("CON PRODUCTO"));
 }else 
{ BA.debugLineNum = 75;BA.debugLine="Else If r_4.Checked Then";
Debug.ShouldStop(1024);
if (__ref.getField(false,"_r_4" /*RemoteObject*/ ).runMethod(true,"getChecked").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 76;BA.debugLine="motivo = \"NO ESTA EL ENCARGADO\"";
Debug.ShouldStop(2048);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("NO ESTA EL ENCARGADO"));
 }else {
 BA.debugLineNum = 78;BA.debugLine="motivo = \"Cerrado permanente.\"";
Debug.ShouldStop(8192);
__ref.setField ("_motivo" /*RemoteObject*/ ,BA.ObjectToString("Cerrado permanente."));
 }}}}
;
 BA.debugLineNum = 81;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(65536);
c_noventa.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 82;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(131072);
__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 = 83;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(262144);
__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 = 84;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CUENTA";
Debug.ShouldStop(524288);
__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 = 85;BA.debugLine="c.Position = 0";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 86;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
Debug.ShouldStop(2097152);
__ref.setField ("_cuenta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 87;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
Debug.ShouldStop(4194304);
__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 = 88;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 89;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(16777216);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 90;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PRO";
Debug.ShouldStop(33554432);
__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 = 91;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 92;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(134217728);
{
final int step23 = 1;
final int limit23 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step23 > 0 && _i <= limit23) || (step23 < 0 && _i >= limit23) ;_i = ((int)(0 + _i + step23))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 93;BA.debugLine="c.Position=i";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 94;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update ca";
Debug.ShouldStop(536870912);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod 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 = 98;BA.debugLine="If B4XPages.MainPage.cliente.IsInitialized Then";
Debug.ShouldStop(2);
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 = 99;BA.debugLine="B4XPages.MainPage.cliente.motivoNoVenta = motivo";
Debug.ShouldStop(4);
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 = 100;BA.debugLine="Subs.bitacora(Subs.fechanormal(DateTime.Now), us";
Debug.ShouldStop(8);
c_noventa._subs.runVoidMethod ("_bitacora" /*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)(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(Object)(c_noventa._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(c_noventa._subs.runMethod(true,"_traeruta" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(BA.ObjectToString("No Venta")),(Object)(c_noventa._subs.runMethod(true,"_traecliente" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(BA.ObjectToString("")),(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(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_cliente" /*RemoteObject*/ ).getField(true,"_precision" /*RemoteObject*/ ))),(Object)(__ref.getField(true,"_motivo" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_e_comm" /*RemoteObject*/ ).runMethod(true,"getText")));
 BA.debugLineNum = 101;BA.debugLine="Starter.enVenta = False";
Debug.ShouldStop(16);
c_noventa._starter._enventa /*RemoteObject*/  = c_noventa.__c.getField(true,"False");
 };
 BA.debugLineNum = 104;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(128);
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 = 105;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(256);
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 = 107;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(1024);
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,NV_ENVIO) VALUES(?,?,?,?,?,?,?,0) ")),(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 = 108;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_i";
Debug.ShouldStop(2048);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 3  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 109;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
Debug.ShouldStop(4096);
c_noventa.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 110;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(8192);
__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 = 111;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
Debug.ShouldStop(16384);
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 = 114;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\" Select (subs";
Debug.ShouldStop(131072);
__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 = 120;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 121;BA.debugLine="stay_hh = c.GetString(\"HORAS_TOTALES\") * 60 * 60";
Debug.ShouldStop(16777216);
__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 = 122;BA.debugLine="stay_mi = c.GetString(\"MINUTOS_TOTALES\") * 60";
Debug.ShouldStop(33554432);
__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 = 123;BA.debugLine="stay_ss = c.GetString(\"SEGUNDOS_TOTALES\")";
Debug.ShouldStop(67108864);
__ref.setField ("_stay_ss" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("SEGUNDOS_TOTALES"))));
 BA.debugLineNum = 125;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
Debug.ShouldStop(268435456);
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 = 126;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
Debug.ShouldStop(536870912);
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 = 127;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
Debug.ShouldStop(1073741824);
c_noventa.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HH:mm:ss"));
 BA.debugLineNum = 129;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update PEDI";
Debug.ShouldStop(1);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update PEDIDO_INICIO_FINAL set PIF_HORA_FINAL = ? where PIF_CLIENTE = ? and PIF_HORA_FINAL = 0")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow")),(__ref.getField(true,"_cuenta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 130;BA.debugLine="LogColor($\"actualizamos \"${cuenta},  hora_final=$";
Debug.ShouldStop(2);
c_noventa.__c.runVoidMethod ("LogImpl","310420286",(RemoteObject.concat(RemoteObject.createImmutable("actualizamos \""),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(true,"_cuenta" /*RemoteObject*/ )))),RemoteObject.createImmutable(",  hora_final="),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_noventa.__c.getField(false,"DateTime").runMethod(true,"getNow")))),RemoteObject.createImmutable(""))),c_noventa.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 132;BA.debugLine="Subs.bitacora(Subs.fechanormal(DateTime.Now), usu";
Debug.ShouldStop(8);
c_noventa._subs.runVoidMethod ("_bitacora" /*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)(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(Object)(c_noventa._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))),(Object)(c_noventa._subs.runMethod(true,"_traeruta" /*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)(BA.ObjectToString("")),(Object)(BA.ObjectToString(__ref.getField(false,"_r_1" /*RemoteObject*/ ).runMethod(true,"getChecked"))));
 BA.debugLineNum = 134;BA.debugLine="mandaPendientesnoventa";
Debug.ShouldStop(32);
__ref.runClassMethod (keymon.lat.medicomed.c_noventa.class, "_mandapendientesnoventa" /*RemoteObject*/ );
 BA.debugLineNum = 135;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(64);
c_noventa._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 BA.debugLineNum = 136;BA.debugLine="End Sub";
Debug.ShouldStop(128);
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",8,__ref.getField(false, "ba"),__ref,31);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_noventa","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 31;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 32;BA.debugLine="Return Me";
Debug.ShouldStop(-2147483648);
if (true) return __ref;
 BA.debugLineNum = 33;BA.debugLine="End Sub";
Debug.ShouldStop(1);
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",8,__ref.getField(false, "ba"),__ref,170);
if (RapidSub.canDelegate("jobdone")) { return __ref.runUserSub(false, "c_noventa","jobdone", __ref, _job);}
RemoteObject _resultado = RemoteObject.declareNull("keymon.lat.medicomed.dbrequestmanager._dbresult");
RemoteObject _cliente = RemoteObject.createImmutable("");
RemoteObject _records = null;
RemoteObject _k = RemoteObject.createImmutable("");
Debug.locals.put("Job", _job);
 BA.debugLineNum = 170;BA.debugLine="Sub JobDone(Job As HttpJob)";
Debug.ShouldStop(512);
 BA.debugLineNum = 171;BA.debugLine="Log(Job.Success)";
Debug.ShouldStop(1024);
c_noventa.__c.runVoidMethod ("LogImpl","310551297",BA.ObjectToString(_job.getField(true,"_success" /*RemoteObject*/ )),0);
 BA.debugLineNum = 172;BA.debugLine="If Job.Success = False Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_success" /*RemoteObject*/ ),c_noventa.__c.getField(true,"False"))) { 
 }else {
 BA.debugLineNum = 175;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
Debug.ShouldStop(16384);
c_noventa.__c.runVoidMethod ("LogImpl","310551301",RemoteObject.concat(RemoteObject.createImmutable("JobDone: '"),__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job)).getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable("' - Registros: "),__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job)).getField(false,"Rows" /*RemoteObject*/ ).runMethod(true,"getSize")),c_noventa.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 176;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(32768);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 177;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
Debug.ShouldStop(65536);
_resultado = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("resultado", _resultado);Debug.locals.put("resultado", _resultado);
 BA.debugLineNum = 178;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_NOVENT";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean(">",(BA.ObjectToString(_resultado.getField(false,"Tag" /*RemoteObject*/ ))).runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("ins_NOVENTAPendientes_head_"))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 179;BA.debugLine="Private cliente As String= resultado.Tag";
Debug.ShouldStop(262144);
_cliente = BA.ObjectToString(_resultado.getField(false,"Tag" /*RemoteObject*/ ));Debug.locals.put("cliente", _cliente);Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 180;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
Debug.ShouldStop(524288);
_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 = 181;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
Debug.ShouldStop(1048576);
c_noventa.__c.runVoidMethod ("LogImpl","310551307",(RemoteObject.concat(RemoteObject.createImmutable("Cliente1:"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 182;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update N";
Debug.ShouldStop(2097152);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update NOVENTA SET NV_ENVIO = ? WHERE NV_CLIENTE = ? AND NV_ENVIO <> 1")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {BA.ObjectToString("1"),_cliente})))));
 BA.debugLineNum = 183;BA.debugLine="For Each records() As Object In resultado.Rows";
Debug.ShouldStop(4194304);
{
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 = 184;BA.debugLine="For Each k As String In resultado.Columns.Key";
Debug.ShouldStop(8388608);
{
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 = 185;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
Debug.ShouldStop(16777216);
c_noventa.__c.runVoidMethod ("LogImpl","310551311",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 = 193;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 194;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
Debug.ShouldStop(2);
_resultado = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("resultado", _resultado);Debug.locals.put("resultado", _resultado);
 BA.debugLineNum = 195;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_NOVENT";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean(">",(BA.ObjectToString(_resultado.getField(false,"Tag" /*RemoteObject*/ ))).runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("ins_NOVENTAcerradoper_head_"))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 196;BA.debugLine="Private cliente As String= resultado.Tag";
Debug.ShouldStop(8);
_cliente = BA.ObjectToString(_resultado.getField(false,"Tag" /*RemoteObject*/ ));Debug.locals.put("cliente", _cliente);Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 197;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
Debug.ShouldStop(16);
_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 = 198;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
Debug.ShouldStop(32);
c_noventa.__c.runVoidMethod ("LogImpl","310551324",(RemoteObject.concat(RemoteObject.createImmutable("Cliente1:"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 199;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update N";
Debug.ShouldStop(64);
c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update NOVENTA SET NV_ENVIO = ? WHERE NV_CLIENTE = ? AND NV_ENVIO <> 1")),(Object)(c_noventa.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {BA.ObjectToString("1"),_cliente})))));
 BA.debugLineNum = 200;BA.debugLine="For Each records() As Object In resultado.Rows";
Debug.ShouldStop(128);
{
final RemoteObject group26 = _resultado.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen26 = group26.runMethod(true,"getSize").<Integer>get()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_records = (group26.runMethod(false,"Get",index26));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 201;BA.debugLine="For Each k As String In resultado.Columns.Key";
Debug.ShouldStop(256);
{
final RemoteObject group27 = _resultado.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Keys");
final int groupLen27 = group27.runMethod(true,"getSize").<Integer>get()
;int index27 = 0;
;
for (; index27 < groupLen27;index27++){
_k = BA.ObjectToString(group27.runMethod(false,"Get",index27));Debug.locals.put("k", _k);
Debug.locals.put("k", _k);
 BA.debugLineNum = 202;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
Debug.ShouldStop(512);
c_noventa.__c.runVoidMethod ("LogImpl","310551328",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 = 207;BA.debugLine="Job.Release";
Debug.ShouldStop(16384);
_job.runClassMethod (keymon.lat.medicomed.httpjob.class, "_release" /*RemoteObject*/ );
 };
 BA.debugLineNum = 210;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _mandapendientesnoventa(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("mandaPendientesnoventa (c_noventa) ","c_noventa",8,__ref.getField(false, "ba"),__ref,138);
if (RapidSub.canDelegate("mandapendientesnoventa")) { return __ref.runUserSub(false, "c_noventa","mandapendientesnoventa", __ref);}
int _i = 0;
RemoteObject _cmd = RemoteObject.declareNull("keymon.lat.medicomed.dbrequestmanager._dbcommand");
 BA.debugLineNum = 138;BA.debugLine="Sub mandaPendientesnoventa";
Debug.ShouldStop(512);
 BA.debugLineNum = 139;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT  NV_CL";
Debug.ShouldStop(1024);
__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  NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_NOMBRE, NV_DIRECCION FROM NOVENTA where NV_ENVIO <> 1"))));
 BA.debugLineNum = 140;BA.debugLine="Log($\"NOVENYA_Cliente PENDIENTE: ${c.RowCount}\"$)";
Debug.ShouldStop(2048);
c_noventa.__c.runVoidMethod ("LogImpl","310485762",(RemoteObject.concat(RemoteObject.createImmutable("NOVENYA_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 = 141;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 142;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(8192);
{
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 = 143;BA.debugLine="c.Position=i";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 144;BA.debugLine="Log(c.GetString(\"NV_MOTIVO\"))";
Debug.ShouldStop(32768);
c_noventa.__c.runVoidMethod ("LogImpl","310485766",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_MOTIVO"))),0);
 BA.debugLineNum = 145;BA.debugLine="If c.GetString(\"NV_MOTIVO\") = \"Cerrado permanen";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_MOTIVO"))),BA.ObjectToString("Cerrado permanente."))) { 
 BA.debugLineNum = 146;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(131072);
_cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 147;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(262144);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 148;BA.debugLine="cmd.Name = \"insert_clientescerrados_MEDI\"";
Debug.ShouldStop(524288);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("insert_clientescerrados_MEDI"));
 BA.debugLineNum = 149;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
Debug.ShouldStop(1048576);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_FECHA")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_USER")))),RemoteObject.createImmutable(("CERRADO PERMANENTE")),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_LAT")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_LON")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_NOMBRE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_DIRECCION")))),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_principal" /*RemoteObject*/ ).getField(true,"_almacen" /*RemoteObject*/ )),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_principal" /*RemoteObject*/ ).getField(false,"_l_ruta" /*RemoteObject*/ ).runMethod(true,"getText"))}));
 BA.debugLineNum = 150;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_NOVENTAc";
Debug.ShouldStop(2097152);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)(((RemoteObject.concat(RemoteObject.createImmutable("ins_NOVENTAcerradoper_head_"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE")))))),RemoteObject.createImmutable(""))))));
 BA.debugLineNum = 152;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(8388608);
_cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 153;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(16777216);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 154;BA.debugLine="cmd.Name = \"insert_noventa_MEDI\"";
Debug.ShouldStop(33554432);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("insert_noventa_MEDI"));
 BA.debugLineNum = 155;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
Debug.ShouldStop(67108864);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_FECHA")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_USER")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_MOTIVO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_COMM")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_LAT")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_LON")))),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_principal" /*RemoteObject*/ ).getField(true,"_almacen" /*RemoteObject*/ )),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_principal" /*RemoteObject*/ ).getField(false,"_l_ruta" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_NOMBRE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_DIRECCION"))))}));
 BA.debugLineNum = 156;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_NOVENTAP";
Debug.ShouldStop(134217728);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)(((RemoteObject.concat(RemoteObject.createImmutable("ins_NOVENTAPendientes_head_"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE")))))),RemoteObject.createImmutable(""))))));
 }else {
 BA.debugLineNum = 158;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(536870912);
_cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 159;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(1073741824);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 160;BA.debugLine="cmd.Name = \"insert_noventa_MEDI\"";
Debug.ShouldStop(-2147483648);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("insert_noventa_MEDI"));
 BA.debugLineNum = 161;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
Debug.ShouldStop(1);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_FECHA")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_USER")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_MOTIVO")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_COMM")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_LAT")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_LON")))),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_principal" /*RemoteObject*/ ).getField(true,"_almacen" /*RemoteObject*/ )),(c_noventa._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_principal" /*RemoteObject*/ ).getField(false,"_l_ruta" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_NOMBRE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_DIRECCION"))))}));
 BA.debugLineNum = 162;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_NOVENTAP";
Debug.ShouldStop(2);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)(((RemoteObject.concat(RemoteObject.createImmutable("ins_NOVENTAPendientes_head_"),c_noventa.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("NV_CLIENTE")))))),RemoteObject.createImmutable(""))))));
 };
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 166;BA.debugLine="c.Close";
Debug.ShouldStop(32);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 167;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}