package SHARK2.keymon.com.mx;

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

public class subs_subs_0 {


public static RemoteObject  _actualizaproducto(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa,RemoteObject _cantc,RemoteObject _bcajas) throws Exception{
try {
		Debug.PushSubsStack("actualizaProducto (subs) ","subs",30,_ba,subs.mostCurrent,844);
if (RapidSub.canDelegate("actualizaproducto")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","actualizaproducto", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _cantc, _bcajas);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _antcant = RemoteObject.createImmutable(0);
RemoteObject _difcant = RemoteObject.createImmutable(0);
RemoteObject _pe = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
Debug.locals.put("cantc", _cantc);
Debug.locals.put("bcajas", _bcajas);
 BA.debugLineNum = 844;BA.debugLine="Sub actualizaProducto(cedis As String, costoU As S";
Debug.ShouldStop(2048);
 BA.debugLineNum = 845;BA.debugLine="Log(\"Entramos a actualiza producto\")";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539976961",RemoteObject.createImmutable("Entramos a actualiza producto"),0);
 BA.debugLineNum = 846;BA.debugLine="Private c As Cursor=B4XPages.MainPage.skmt.ExecQu";
Debug.ShouldStop(8192);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from pedido where pe_cedis = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable("' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable("' AND PE_FOLIO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 848;BA.debugLine="LogColor($\"actualizaProducto, c=${clienteId}, p=$";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539976964",(RemoteObject.concat(RemoteObject.createImmutable("actualizaProducto, c="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable(", p="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable(", nombre="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_nombre))),RemoteObject.createImmutable(", cant="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cant))),RemoteObject.createImmutable(", cedis="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable(", tipo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipoventa))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 849;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 850;BA.debugLine="Log(\"----->1<--------------\")";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539976966",RemoteObject.createImmutable("----->1<--------------"),0);
 BA.debugLineNum = 851;BA.debugLine="c.Position=0";
Debug.ShouldStop(262144);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 852;BA.debugLine="Private antCant As Int = 0";
Debug.ShouldStop(524288);
_antcant = BA.numberCast(int.class, 0);Debug.locals.put("antCant", _antcant);Debug.locals.put("antCant", _antcant);
 BA.debugLineNum = 853;BA.debugLine="If IsNumber(c.GetInt(\"PE_CANT\")) Then antCant=c.";
Debug.ShouldStop(1048576);
if (subs.mostCurrent.__c.runMethod(true,"IsNumber",(Object)(BA.NumberToString(_c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")))))).<Boolean>get().booleanValue()) { 
_antcant = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")));Debug.locals.put("antCant", _antcant);};
 BA.debugLineNum = 854;BA.debugLine="Private difCant As Int = cant - antCant";
Debug.ShouldStop(2097152);
_difcant = RemoteObject.solve(new RemoteObject[] {_cant,_antcant}, "-",1, 1);Debug.locals.put("difCant", _difcant);Debug.locals.put("difCant", _difcant);
 BA.debugLineNum = 855;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update ped";
Debug.ShouldStop(4194304);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update pedido set pe_cant = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cant))),RemoteObject.createImmutable(", pe_costo_tot = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {_cant,BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(", PE_CANTC = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cantc))),RemoteObject.createImmutable(", PE_BCAJAS = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_bcajas))),RemoteObject.createImmutable(" where pe_cedis = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable("' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable("' AND PE_FOLIO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 856;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"VENTA\" Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ),BA.ObjectToString("VENTA"))) { 
 BA.debugLineNum = 857;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update ${";
Debug.ShouldStop(16777216);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' ")))));
 }else {
 BA.debugLineNum = 859;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update CA";
Debug.ShouldStop(67108864);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update CAT_GUNAPROD set cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' ")))));
 BA.debugLineNum = 860;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update CA";
Debug.ShouldStop(134217728);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update CAT_GUNAPROD4 set cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' ")))));
 };
 BA.debugLineNum = 864;BA.debugLine="If cant = 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",_cant,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 865;BA.debugLine="Log(\"BORRAMOS PROD\")";
Debug.ShouldStop(1);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539976981",RemoteObject.createImmutable("BORRAMOS PROD"),0);
 BA.debugLineNum = 866;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete fr";
Debug.ShouldStop(2);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido where pe_cedis = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable("' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable("' AND PE_FOLIO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 867;BA.debugLine="Private pe As Cursor = B4XPages.MainPage.skmt.E";
Debug.ShouldStop(4);
_pe = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_pe = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(pe_cliente) as cuantosPedidos from pedido where pe_cliente In (select cuenta from cuentaa)"))));Debug.locals.put("pe", _pe);Debug.locals.put("pe", _pe);
 BA.debugLineNum = 868;BA.debugLine="pe.Position=0";
Debug.ShouldStop(8);
_pe.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 869;BA.debugLine="If pe.GetString(\"cuantosPedidos\") = 0 Then B4XP";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",_pe.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantosPedidos"))),BA.NumberToString(0))) { 
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));};
 };
 }else {
 BA.debugLineNum = 872;BA.debugLine="Log(\"----->2<--------------\")";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539976988",RemoteObject.createImmutable("----->2<--------------"),0);
 BA.debugLineNum = 874;BA.debugLine="If cant <> 0 Then guardaProductoSinGestion(cedis";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("!",_cant,BA.numberCast(double.class, 0))) { 
_guardaproductosingestion(_ba,_cedis,_costou,BA.NumberToString(_cant),_nombre,_prodid,_clienteid,_fecha,_usuario,_rutav,_preciosin,_tipoventa,_cantc,_bcajas);};
 };
 BA.debugLineNum = 876;BA.debugLine="c.Close";
Debug.ShouldStop(2048);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 877;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _actualizaproducto2(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa,RemoteObject _cantc,RemoteObject _bcajas) throws Exception{
try {
		Debug.PushSubsStack("actualizaProducto2 (subs) ","subs",30,_ba,subs.mostCurrent,895);
if (RapidSub.canDelegate("actualizaproducto2")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","actualizaproducto2", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _cantc, _bcajas);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _antcant = RemoteObject.createImmutable(0);
RemoteObject _difcant = RemoteObject.createImmutable(0);
RemoteObject _pe = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
Debug.locals.put("cantc", _cantc);
Debug.locals.put("bcajas", _bcajas);
 BA.debugLineNum = 895;BA.debugLine="Sub actualizaProducto2(cedis As String, costoU As";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 896;BA.debugLine="Private c As Cursor=B4XPages.MainPage.skmt.ExecQu";
Debug.ShouldStop(-2147483648);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from pedido where pe_cedis = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable("' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable("' AND PE_FOLIO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 898;BA.debugLine="LogColor($\"actualizaProducto, c=${clienteId}, p=$";
Debug.ShouldStop(2);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540108035",(RemoteObject.concat(RemoteObject.createImmutable("actualizaProducto, c="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable(", p="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable(", nombre="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_nombre))),RemoteObject.createImmutable(", cant="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cant))),RemoteObject.createImmutable(", cedis="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable(", tipo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipoventa))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 900;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 901;BA.debugLine="c.Position=0";
Debug.ShouldStop(16);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 902;BA.debugLine="Private antCant As Int = 0";
Debug.ShouldStop(32);
_antcant = BA.numberCast(int.class, 0);Debug.locals.put("antCant", _antcant);Debug.locals.put("antCant", _antcant);
 BA.debugLineNum = 903;BA.debugLine="If IsNumber(c.GetInt(\"PE_CANT\")) Then antCant=c.";
Debug.ShouldStop(64);
if (subs.mostCurrent.__c.runMethod(true,"IsNumber",(Object)(BA.NumberToString(_c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")))))).<Boolean>get().booleanValue()) { 
_antcant = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")));Debug.locals.put("antCant", _antcant);};
 BA.debugLineNum = 904;BA.debugLine="Private difCant As Int = cant - antCant";
Debug.ShouldStop(128);
_difcant = RemoteObject.solve(new RemoteObject[] {_cant,_antcant}, "-",1, 1);Debug.locals.put("difCant", _difcant);Debug.locals.put("difCant", _difcant);
 BA.debugLineNum = 905;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update ped";
Debug.ShouldStop(256);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update pedido set pe_cant = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cant))),RemoteObject.createImmutable(", pe_costo_tot = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cantc),BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(", PE_CANTC = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cantc))),RemoteObject.createImmutable(", PE_BCAJAS = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_bcajas))),RemoteObject.createImmutable(" where pe_cedis = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable("' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable("' AND PE_FOLIO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 907;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"VENTA\" Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ),BA.ObjectToString("VENTA"))) { 
 BA.debugLineNum = 908;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update ${";
Debug.ShouldStop(2048);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' ")))));
 }else {
 BA.debugLineNum = 910;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update CA";
Debug.ShouldStop(8192);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update CAT_GUNAPROD set cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' ")))));
 BA.debugLineNum = 911;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update CA";
Debug.ShouldStop(16384);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update CAT_GUNAPROD4 set cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' ")))));
 };
 BA.debugLineNum = 914;BA.debugLine="If cant = 0 Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",_cant,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 915;BA.debugLine="Log(\"BORRAMOS PROD\")";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540108052",RemoteObject.createImmutable("BORRAMOS PROD"),0);
 BA.debugLineNum = 916;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete fr";
Debug.ShouldStop(524288);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido where pe_cedis = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cedis))),RemoteObject.createImmutable("' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_clienteid))),RemoteObject.createImmutable("' AND PE_FOLIO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 917;BA.debugLine="Private pe As Cursor = B4XPages.MainPage.skmt.E";
Debug.ShouldStop(1048576);
_pe = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_pe = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(pe_cliente) as cuantosPedidos from pedido where pe_cliente In (select cuenta from cuentaa)"))));Debug.locals.put("pe", _pe);Debug.locals.put("pe", _pe);
 BA.debugLineNum = 918;BA.debugLine="pe.Position=0";
Debug.ShouldStop(2097152);
_pe.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 919;BA.debugLine="If pe.GetString(\"cuantosPedidos\") = 0 Then B4XP";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("=",_pe.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantosPedidos"))),BA.NumberToString(0))) { 
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));};
 };
 }else {
 BA.debugLineNum = 923;BA.debugLine="If cant <> 0 Then guardaProductoSinGestion2(cedi";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("!",_cant,BA.numberCast(double.class, 0))) { 
_guardaproductosingestion2(_ba,_cedis,_costou,BA.NumberToString(_cant),_nombre,_prodid,_clienteid,_fecha,_usuario,_rutav,_preciosin,_tipoventa,_cantc,_bcajas);};
 };
 BA.debugLineNum = 925;BA.debugLine="c.Close";
Debug.ShouldStop(268435456);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 926;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _actualizaproductodinamico(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa,RemoteObject _cantc,RemoteObject _bcajas,RemoteObject _dirigida,RemoteObject _uvm,RemoteObject _presentacion) throws Exception{
try {
		Debug.PushSubsStack("actualizaProductoDinamico (subs) ","subs",30,_ba,subs.mostCurrent,1777);
if (RapidSub.canDelegate("actualizaproductodinamico")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","actualizaproductodinamico", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _cantc, _bcajas, _dirigida, _uvm, _presentacion);}
RemoteObject _qbusqueda = RemoteObject.createImmutable("");
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _tablainventario = RemoteObject.createImmutable("");
RemoteObject _antcant = RemoteObject.createImmutable(0);
RemoteObject _difcant = RemoteObject.createImmutable(0);
RemoteObject _nuevocostotot = RemoteObject.createImmutable(0f);
RemoteObject _qupdate = RemoteObject.createImmutable("");
RemoteObject _qdelete = RemoteObject.createImmutable("");
RemoteObject _totalrestante = RemoteObject.createImmutable(0);
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
Debug.locals.put("cantc", _cantc);
Debug.locals.put("bcajas", _bcajas);
Debug.locals.put("dirigida", _dirigida);
Debug.locals.put("uvm", _uvm);
Debug.locals.put("presentacion", _presentacion);
 BA.debugLineNum = 1777;BA.debugLine="Sub actualizaProductoDinamico(cedis As String, cos";
Debug.ShouldStop(65536);
 BA.debugLineNum = 1778;BA.debugLine="Log(\"--- Iniciando Actualización Dinámica ---\")";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","542074113",RemoteObject.createImmutable("--- Iniciando Actualización Dinámica ---"),0);
 BA.debugLineNum = 1781;BA.debugLine="Dim qBusqueda As String = \"SELECT PE_CANT, PE_COS";
Debug.ShouldStop(1048576);
_qbusqueda = RemoteObject.concat(RemoteObject.createImmutable("SELECT PE_CANT, PE_COSTOU FROM pedido WHERE pe_cedis = ? "),RemoteObject.createImmutable("AND pe_proid = ? AND pe_cliente = ? AND PE_FOLIO = ? "),RemoteObject.createImmutable("AND PE_DIRIGIDA = ? AND PE_PRESENTACION = ? AND PE_UVM = ?"));Debug.locals.put("qBusqueda", _qbusqueda);Debug.locals.put("qBusqueda", _qbusqueda);
 BA.debugLineNum = 1785;BA.debugLine="Dim c As Cursor = B4XPages.MainPage.skmt.ExecQuer";
Debug.ShouldStop(16777216);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(_qbusqueda),(Object)(RemoteObject.createNewArray("String",new int[] {7},new Object[] {_cedis,_prodid,_clienteid,_tipoventa,_dirigida,_presentacion,BA.NumberToString(_uvm)}))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1789;BA.debugLine="Dim tablaInventario As String = Starter.tabla";
Debug.ShouldStop(268435456);
_tablainventario = subs.mostCurrent._starter._tabla /*RemoteObject*/ ;Debug.locals.put("tablaInventario", _tablainventario);Debug.locals.put("tablaInventario", _tablainventario);
 BA.debugLineNum = 1792;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1794;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1795;BA.debugLine="Dim antCant As Int = c.GetInt(\"PE_CANT\")";
Debug.ShouldStop(4);
_antcant = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")));Debug.locals.put("antCant", _antcant);Debug.locals.put("antCant", _antcant);
 BA.debugLineNum = 1796;BA.debugLine="Dim difCant As Int = cant - antCant";
Debug.ShouldStop(8);
_difcant = RemoteObject.solve(new RemoteObject[] {_cant,_antcant}, "-",1, 1);Debug.locals.put("difCant", _difcant);Debug.locals.put("difCant", _difcant);
 BA.debugLineNum = 1798;BA.debugLine="If cant > 0 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_cant,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1800;BA.debugLine="Dim nuevoCostoTot As Float = (cant / uvm) * cos";
Debug.ShouldStop(128);
_nuevocostotot = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_cant,_uvm}, "/",0, 0)),_costou}, "*",0, 0));Debug.locals.put("nuevoCostoTot", _nuevocostotot);Debug.locals.put("nuevoCostoTot", _nuevocostotot);
 BA.debugLineNum = 1802;BA.debugLine="Dim qUpdate As String = \"UPDATE pedido SET pe_c";
Debug.ShouldStop(512);
_qupdate = RemoteObject.concat(RemoteObject.createImmutable("UPDATE pedido SET pe_cant = ?, pe_costo_tot = ?, PE_CANTC = ?, PE_BCAJAS = ? "),RemoteObject.createImmutable("WHERE pe_cedis = ? AND pe_proid = ? AND pe_cliente = ? AND PE_FOLIO = ? "),RemoteObject.createImmutable("AND PE_PRESENTACION = ? AND PE_UVM = ?"));Debug.locals.put("qUpdate", _qupdate);Debug.locals.put("qUpdate", _qupdate);
 BA.debugLineNum = 1806;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(qUpdate, A";
Debug.ShouldStop(8192);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(_qupdate),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(_cant),(_nuevocostotot),(_cantc),(_bcajas),(_cedis),(_prodid),(_clienteid),(_tipoventa),(_presentacion),(_uvm)})))));
 BA.debugLineNum = 1810;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE ${";
Debug.ShouldStop(131072);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("UPDATE "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tablainventario))),RemoteObject.createImmutable(" SET cat_gp_almacen = cat_gp_almacen - ("),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_difcant))),RemoteObject.createImmutable(") WHERE cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("'")))));
 }else {
 BA.debugLineNum = 1813;BA.debugLine="Dim qDelete As String = \"DELETE FROM pedido WHE";
Debug.ShouldStop(1048576);
_qdelete = RemoteObject.concat(RemoteObject.createImmutable("DELETE FROM pedido WHERE pe_cedis = ? AND pe_proid = ? AND pe_cliente = ? "),RemoteObject.createImmutable("AND PE_FOLIO = ? AND PE_PRESENTACION = ? AND PE_UVM = ?"));Debug.locals.put("qDelete", _qdelete);Debug.locals.put("qDelete", _qdelete);
 BA.debugLineNum = 1816;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(qDelete, A";
Debug.ShouldStop(8388608);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(_qdelete),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {6},new Object[] {(_cedis),(_prodid),(_clienteid),(_tipoventa),(_presentacion),(_uvm)})))));
 BA.debugLineNum = 1819;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE ${";
Debug.ShouldStop(67108864);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("UPDATE "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tablainventario))),RemoteObject.createImmutable(" SET cat_gp_almacen = cat_gp_almacen + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_antcant))),RemoteObject.createImmutable(" WHERE cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1822;BA.debugLine="Dim totalRestante As Int = B4XPages.MainPage.sk";
Debug.ShouldStop(536870912);
_totalrestante = BA.numberCast(int.class, subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(true,"ExecQuerySingleResult",(Object)(RemoteObject.concat(RemoteObject.createImmutable("SELECT count(*) FROM pedido WHERE pe_cliente = '"),_clienteid,RemoteObject.createImmutable("'")))));Debug.locals.put("totalRestante", _totalrestante);Debug.locals.put("totalRestante", _totalrestante);
 BA.debugLineNum = 1823;BA.debugLine="If totalRestante = 0 Then";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean("=",_totalrestante,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1824;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FR";
Debug.ShouldStop(-2147483648);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("DELETE FROM pedido_cliente WHERE PC_CLIENTE = '"),_clienteid,RemoteObject.createImmutable("'"))));
 };
 };
 }else {
 BA.debugLineNum = 1829;BA.debugLine="If cant > 0 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",_cant,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1830;BA.debugLine="guardaProductoSinGestionDinamico(cedis, costoU,";
Debug.ShouldStop(32);
_guardaproductosingestiondinamico(_ba,_cedis,_costou,_cant,_nombre,_prodid,_clienteid,_fecha,_usuario,_rutav,_preciosin,_tipoventa,_cantc,_bcajas,_dirigida,_uvm,_presentacion);
 };
 };
 BA.debugLineNum = 1833;BA.debugLine="c.Close";
Debug.ShouldStop(256);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1834;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _actualizatet(RemoteObject _ba,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("actualizaTET (subs) ","subs",30,_ba,subs.mostCurrent,1523);
if (RapidSub.canDelegate("actualizatet")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","actualizatet", _ba, _cliente);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _total = RemoteObject.createImmutable(0L);
int _i = 0;
RemoteObject _subtotal = RemoteObject.createImmutable(0L);
;
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 1523;BA.debugLine="Sub actualizaTET(cliente As String)";
Debug.ShouldStop(262144);
 BA.debugLineNum = 1524;BA.debugLine="Dim c As Cursor = B4XPages.MainPage.skmt.Execquer";
Debug.ShouldStop(524288);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select * from PEDIDO_INICIO_FINAL where PIF_CLIENTE = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {_cliente}))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1525;BA.debugLine="Dim total As Long = 0";
Debug.ShouldStop(1048576);
_total = BA.numberCast(long.class, 0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 1526;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1527;BA.debugLine="c.Position=0";
Debug.ShouldStop(4194304);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1528;BA.debugLine="For i = 0 To c.RowCount-1";
Debug.ShouldStop(8388608);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step5 > 0 && _i <= limit5) || (step5 < 0 && _i >= limit5) ;_i = ((int)(0 + _i + step5))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1529;BA.debugLine="c.Position=i";
Debug.ShouldStop(16777216);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 1531;BA.debugLine="Dim subtotal As Long = c.GetString(\"PIF_HORA_FI";
Debug.ShouldStop(67108864);
_subtotal = BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PIF_HORA_FINAL")))),BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PIF_HORA_INICIO"))))}, "-",1, 0));Debug.locals.put("subtotal", _subtotal);Debug.locals.put("subtotal", _subtotal);
 BA.debugLineNum = 1532;BA.debugLine="total = total + subtotal";
Debug.ShouldStop(134217728);
_total = RemoteObject.solve(new RemoteObject[] {_total,_subtotal}, "+",1, 2);Debug.locals.put("total", _total);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1536;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update PED";
Debug.ShouldStop(-2147483648);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update PEDIDO_CLIENTE set PC_TIEMPO_TIENDA = ? where PC_CLIENTE = ?")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {BA.NumberToString((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_total,RemoteObject.createImmutable(1000)}, "/",0, 0)),RemoteObject.createImmutable(60)}, "/",0, 0))),_cliente})))));
 };
 BA.debugLineNum = 1538;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _agregacolumna(RemoteObject _ba,RemoteObject _tabla,RemoteObject _columna,RemoteObject _tipo) throws Exception{
try {
		Debug.PushSubsStack("agregaColumna (subs) ","subs",30,_ba,subs.mostCurrent,1675);
if (RapidSub.canDelegate("agregacolumna")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","agregacolumna", _ba, _tabla, _columna, _tipo);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("tabla", _tabla);
Debug.locals.put("columna", _columna);
Debug.locals.put("tipo", _tipo);
 BA.debugLineNum = 1675;BA.debugLine="Sub agregaColumna(tabla As String, columna As Stri";
Debug.ShouldStop(1024);
 BA.debugLineNum = 1676;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
Debug.ShouldStop(2048);
try { BA.debugLineNum = 1677;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exe";
Debug.ShouldStop(4096);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("SELECT COUNT(*) AS fCol FROM pragma_table_info('"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tabla))),RemoteObject.createImmutable("') WHERE name='"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_columna))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1678;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8192);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1679;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fCol"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 1680;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"ALTER TAB";
Debug.ShouldStop(32768);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("ALTER TABLE "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tabla))),RemoteObject.createImmutable(" ADD COLUMN "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_columna))),RemoteObject.createImmutable(" "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipo))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 1681;BA.debugLine="Log($\"Columna \"${columna} ${tipo}\", agregada a";
Debug.ShouldStop(65536);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541811974",(RemoteObject.concat(RemoteObject.createImmutable("Columna \""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_columna))),RemoteObject.createImmutable(" "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipo))),RemoteObject.createImmutable("\", agregada a \""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tabla))),RemoteObject.createImmutable("\"."))),0);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e9) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e9.toString()); BA.debugLineNum = 1684;BA.debugLine="Try";
Debug.ShouldStop(524288);
try { BA.debugLineNum = 1685;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"ALTER TAB";
Debug.ShouldStop(1048576);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("ALTER TABLE "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tabla))),RemoteObject.createImmutable(" ADD COLUMN "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_columna))),RemoteObject.createImmutable(" "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipo))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 1686;BA.debugLine="Log($\"Columna \"${columna} ${tipo}\", agregada a";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541811979",(RemoteObject.concat(RemoteObject.createImmutable("Columna \""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_columna))),RemoteObject.createImmutable(" "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipo))),RemoteObject.createImmutable("\", agregada a \""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tabla))),RemoteObject.createImmutable("\".."))),0);
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e13) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e13.toString()); BA.debugLineNum = 1688;BA.debugLine="Log(LastException)";
Debug.ShouldStop(8388608);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541811981",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 };
 };
 BA.debugLineNum = 1691;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _alcanzanlosvariablesparapromo(RemoteObject _ba,RemoteObject _promomap,RemoteObject _inventariosinfijos) throws Exception{
try {
		Debug.PushSubsStack("alcanzanLosVariablesParaPromo (subs) ","subs",30,_ba,subs.mostCurrent,1153);
if (RapidSub.canDelegate("alcanzanlosvariablesparapromo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","alcanzanlosvariablesparapromo", _ba, _promomap, _inventariosinfijos);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _totalprodsvariables = RemoteObject.createImmutable(0);
RemoteObject _totalprodsvariables2 = RemoteObject.createImmutable(0);
RemoteObject _prodsvariables = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsvariables2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
int _p = 0;
RemoteObject _t = RemoteObject.createImmutable("");
RemoteObject _p2 = RemoteObject.createImmutable("");
RemoteObject _res = RemoteObject.createImmutable(false);
RemoteObject _res1 = RemoteObject.createImmutable(false);
RemoteObject _res2 = RemoteObject.createImmutable(false);
;
Debug.locals.put("promoMap", _promomap);
Debug.locals.put("inventarioSinFijos", _inventariosinfijos);
 BA.debugLineNum = 1153;BA.debugLine="Sub alcanzanLosVariablesParaPromo(promoMap As Map,";
Debug.ShouldStop(1);
 BA.debugLineNum = 1154;BA.debugLine="Private thisLog As Boolean = False 'Si es verdade";
Debug.ShouldStop(2);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1155;BA.debugLine="If thisLog Then LogColor(\"Inventario inicial: \"&i";
Debug.ShouldStop(4);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540697858",RemoteObject.concat(RemoteObject.createImmutable("Inventario inicial: "),_inventariosinfijos),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Gray"));};
 BA.debugLineNum = 1156;BA.debugLine="Private totalProdsVariables As Int = 0";
Debug.ShouldStop(8);
_totalprodsvariables = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables", _totalprodsvariables);Debug.locals.put("totalProdsVariables", _totalprodsvariables);
 BA.debugLineNum = 1157;BA.debugLine="Private totalProdsVariables2 As Int = 0";
Debug.ShouldStop(16);
_totalprodsvariables2 = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables2", _totalprodsvariables2);Debug.locals.put("totalProdsVariables2", _totalprodsvariables2);
 BA.debugLineNum = 1159;BA.debugLine="Private prodsVariables As List = promoMap.get(\"pr";
Debug.ShouldStop(64);
_prodsvariables = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_prodsvariables = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables")))));Debug.locals.put("prodsVariables", _prodsvariables);Debug.locals.put("prodsVariables", _prodsvariables);
 BA.debugLineNum = 1160;BA.debugLine="Private prodsVariables2 As List = promoMap.get(\"p";
Debug.ShouldStop(128);
_prodsvariables2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_prodsvariables2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2")))));Debug.locals.put("prodsVariables2", _prodsvariables2);Debug.locals.put("prodsVariables2", _prodsvariables2);
 BA.debugLineNum = 1161;BA.debugLine="For p = 0 To prodsVariables.Size - 1";
Debug.ShouldStop(256);
{
final int step7 = 1;
final int limit7 = RemoteObject.solve(new RemoteObject[] {_prodsvariables.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step7 > 0 && _p <= limit7) || (step7 < 0 && _p >= limit7) ;_p = ((int)(0 + _p + step7))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 1162;BA.debugLine="Private t As String = prodsVariables.Get(p) 'Obt";
Debug.ShouldStop(512);
_t = BA.ObjectToString(_prodsvariables.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 1164;BA.debugLine="If inventarioSinFijos.ContainsKey(t) Then 'Si ex";
Debug.ShouldStop(2048);
if (_inventariosinfijos.runMethod(true,"ContainsKey",(Object)((_t))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1165;BA.debugLine="Private p2 As String = inventarioSinFijos.Get(t";
Debug.ShouldStop(4096);
_p2 = BA.ObjectToString(_inventariosinfijos.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("p2", _p2);Debug.locals.put("p2", _p2);
 BA.debugLineNum = 1167;BA.debugLine="totalProdsVariables = totalProdsVariables + p2";
Debug.ShouldStop(16384);
_totalprodsvariables = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalprodsvariables,BA.numberCast(double.class, _p2)}, "+",1, 0));Debug.locals.put("totalProdsVariables", _totalprodsvariables);
 BA.debugLineNum = 1169;BA.debugLine="If thisLog Then Log($\"prod ${t}, hay: ${p2}\"$)";
Debug.ShouldStop(65536);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540697872",(RemoteObject.concat(RemoteObject.createImmutable("prod "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_t))),RemoteObject.createImmutable(", hay: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_p2))),RemoteObject.createImmutable(""))),0);};
 };
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1172;BA.debugLine="For p = 0 To prodsVariables2.Size - 1";
Debug.ShouldStop(524288);
{
final int step15 = 1;
final int limit15 = RemoteObject.solve(new RemoteObject[] {_prodsvariables2.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step15 > 0 && _p <= limit15) || (step15 < 0 && _p >= limit15) ;_p = ((int)(0 + _p + step15))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 1173;BA.debugLine="Private t As String = prodsVariables2.Get(p) 'Ob";
Debug.ShouldStop(1048576);
_t = BA.ObjectToString(_prodsvariables2.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 1174;BA.debugLine="If inventarioSinFijos.ContainsKey(t) Then 'Si ex";
Debug.ShouldStop(2097152);
if (_inventariosinfijos.runMethod(true,"ContainsKey",(Object)((_t))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1175;BA.debugLine="Private p2 As String = inventarioSinFijos.Get(t";
Debug.ShouldStop(4194304);
_p2 = BA.ObjectToString(_inventariosinfijos.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("p2", _p2);Debug.locals.put("p2", _p2);
 BA.debugLineNum = 1176;BA.debugLine="totalProdsVariables2 = totalProdsVariables2 + p";
Debug.ShouldStop(8388608);
_totalprodsvariables2 = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalprodsvariables2,BA.numberCast(double.class, _p2)}, "+",1, 0));Debug.locals.put("totalProdsVariables2", _totalprodsvariables2);
 BA.debugLineNum = 1177;BA.debugLine="If thisLog Then Log($\"prod ${t}, hay: ${p2}\"$)";
Debug.ShouldStop(16777216);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540697880",(RemoteObject.concat(RemoteObject.createImmutable("prod "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_t))),RemoteObject.createImmutable(", hay: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_p2))),RemoteObject.createImmutable(""))),0);};
 };
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1180;BA.debugLine="If thisLog Then Log(\"Total prods variables=\" & to";
Debug.ShouldStop(134217728);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540697883",RemoteObject.concat(RemoteObject.createImmutable("Total prods variables="),_totalprodsvariables,RemoteObject.createImmutable(", requeridos="),_promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariablesRequeridos"))))),0);};
 BA.debugLineNum = 1181;BA.debugLine="If thisLog Then Log(\"Total prods variables2=\" & t";
Debug.ShouldStop(268435456);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540697884",RemoteObject.concat(RemoteObject.createImmutable("Total prods variables2="),_totalprodsvariables2,RemoteObject.createImmutable(", requeridos2="),_promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2Requeridos"))))),0);};
 BA.debugLineNum = 1182;BA.debugLine="Private res As Boolean = False";
Debug.ShouldStop(536870912);
_res = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res", _res);Debug.locals.put("res", _res);
 BA.debugLineNum = 1183;BA.debugLine="Private res1 As Boolean = False";
Debug.ShouldStop(1073741824);
_res1 = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res1", _res1);Debug.locals.put("res1", _res1);
 BA.debugLineNum = 1184;BA.debugLine="Private res2 As Boolean = False";
Debug.ShouldStop(-2147483648);
_res2 = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res2", _res2);Debug.locals.put("res2", _res2);
 BA.debugLineNum = 1189;BA.debugLine="If totalProdsVariables > 0 And totalProdsVariable";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",_totalprodsvariables,BA.numberCast(double.class, 0)) && RemoteObject.solveBoolean("g",_totalprodsvariables,BA.numberCast(double.class, _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariablesRequeridos"))))))) { 
 BA.debugLineNum = 1190;BA.debugLine="res1 = True 'Si el total de inventario de produc";
Debug.ShouldStop(32);
_res1 = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res1", _res1);
 };
 BA.debugLineNum = 1192;BA.debugLine="If promoMap.Get(\"prodsVariablesRequeridos\").As (I";
Debug.ShouldStop(128);
if (RemoteObject.solveBoolean("=",(BA.numberCast(int.class, _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariablesRequeridos")))))),BA.numberCast(double.class, 0))) { 
_res1 = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res1", _res1);};
 BA.debugLineNum = 1193;BA.debugLine="If totalProdsVariables2 > 0 And totalProdsVariabl";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean(">",_totalprodsvariables2,BA.numberCast(double.class, 0)) && RemoteObject.solveBoolean("g",_totalprodsvariables2,BA.numberCast(double.class, _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2Requeridos"))))))) { 
 BA.debugLineNum = 1194;BA.debugLine="res2 = True 'Si el total de inventario de produc";
Debug.ShouldStop(512);
_res2 = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res2", _res2);
 };
 BA.debugLineNum = 1196;BA.debugLine="If promoMap.Get(\"prodsVariables2Requeridos\").As(I";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",(BA.numberCast(int.class, _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2Requeridos")))))),BA.numberCast(double.class, 0))) { 
_res2 = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res2", _res2);};
 BA.debugLineNum = 1197;BA.debugLine="If res1 And res2 Then 'Solo si son verdadero los";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(".",_res1) && RemoteObject.solveBoolean(".",_res2)) { 
 BA.debugLineNum = 1198;BA.debugLine="res = True";
Debug.ShouldStop(8192);
_res = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res", _res);
 }else {
 BA.debugLineNum = 1200;BA.debugLine="res = False";
Debug.ShouldStop(32768);
_res = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res", _res);
 };
 BA.debugLineNum = 1203;BA.debugLine="Return res";
Debug.ShouldStop(262144);
if (true) return _res;
 BA.debugLineNum = 1204;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borraarribade100errores(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraArribaDe100Errores (subs) ","subs",30,_ba,subs.mostCurrent,510);
if (RapidSub.canDelegate("borraarribade100errores")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borraarribade100errores", _ba);}
;
 BA.debugLineNum = 510;BA.debugLine="Sub borraArribaDe100Errores 'ignore";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 511;BA.debugLine="revisaBD";
Debug.ShouldStop(1073741824);
_revisabd(_ba);
 BA.debugLineNum = 512;BA.debugLine="LogColor(\"Borramos BD de log\", Colors.Magenta)";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538404098",BA.ObjectToString("Borramos BD de log"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 513;BA.debugLine="errorLog.ExecNonQuery(\"DELETE FROM errores WHERE";
Debug.ShouldStop(1);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM errores WHERE fecha NOT in (SELECT fecha FROM errores ORDER BY fecha desc LIMIT 99 )")));
 BA.debugLineNum = 514;BA.debugLine="errorLog.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(2);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 515;BA.debugLine="Log(\"Borramos mas de 100 de errorLog\")";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538404101",RemoteObject.createImmutable("Borramos mas de 100 de errorLog"),0);
 BA.debugLineNum = 516;BA.debugLine="End Sub";
Debug.ShouldStop(8);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borraarribade600renglonesbitacora(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraArribaDe600RenglonesBitacora (subs) ","subs",30,_ba,subs.mostCurrent,519);
if (RapidSub.canDelegate("borraarribade600renglonesbitacora")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borraarribade600renglonesbitacora", _ba);}
;
 BA.debugLineNum = 519;BA.debugLine="Sub borraArribaDe600RenglonesBitacora 'ignore";
Debug.ShouldStop(64);
 BA.debugLineNum = 520;BA.debugLine="revisaBD";
Debug.ShouldStop(128);
_revisabd(_ba);
 BA.debugLineNum = 521;BA.debugLine="LogColor(\"Borramos BD de log\", Colors.Magenta)";
Debug.ShouldStop(256);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538469634",BA.ObjectToString("Borramos BD de log"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 522;BA.debugLine="kmt.ExecNonQuery(\"DELETE FROM bitacora WHERE fech";
Debug.ShouldStop(512);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM bitacora WHERE fecha NOT in (SELECT fecha FROM bitacora ORDER BY fecha desc LIMIT 599 )")));
 BA.debugLineNum = 523;BA.debugLine="kmt.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(1024);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 524;BA.debugLine="Log(\"Borramos mas de 600 de bitacora\")";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538469637",RemoteObject.createImmutable("Borramos mas de 600 de bitacora"),0);
 BA.debugLineNum = 525;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borralogdb(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraLogDB (subs) ","subs",30,_ba,subs.mostCurrent,394);
if (RapidSub.canDelegate("borralogdb")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borralogdb", _ba);}
;
 BA.debugLineNum = 394;BA.debugLine="Sub borraLogDB 'ignore";
Debug.ShouldStop(512);
 BA.debugLineNum = 395;BA.debugLine="LogColor(\"Borramos BD de log\", Colors.Magenta)";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538207489",BA.ObjectToString("Borramos BD de log"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 396;BA.debugLine="kmt.ExecNonQuery(\"delete from bitacora\")";
Debug.ShouldStop(2048);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from bitacora")));
 BA.debugLineNum = 397;BA.debugLine="kmt.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(4096);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 398;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borramosarchivogps(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borramosArchivoGPS (subs) ","subs",30,_ba,subs.mostCurrent,224);
if (RapidSub.canDelegate("borramosarchivogps")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borramosarchivogps", _ba);}
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
RemoteObject _s = RemoteObject.createImmutable("");
RemoteObject _t = null;
;
 BA.debugLineNum = 224;BA.debugLine="Sub borramosArchivoGPS 'ignore";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 225;BA.debugLine="Dim out As OutputStream = File.OpenOutput(File.Di";
Debug.ShouldStop(1);
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
_out = subs.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("gps.txt")),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("out", _out);Debug.locals.put("out", _out);
 BA.debugLineNum = 226;BA.debugLine="Dim s As String = \"\"";
Debug.ShouldStop(2);
_s = BA.ObjectToString("");Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 227;BA.debugLine="Dim t() As Byte = s.GetBytes(\"UTF-8\")";
Debug.ShouldStop(4);
_t = _s.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF-8")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 228;BA.debugLine="out.WriteBytes(t, 0, t.Length)";
Debug.ShouldStop(8);
_out.runVoidMethod ("WriteBytes",(Object)(_t),(Object)(BA.numberCast(int.class, 0)),(Object)(_t.getField(true,"length")));
 BA.debugLineNum = 229;BA.debugLine="out.Close";
Debug.ShouldStop(16);
_out.runVoidMethod ("Close");
 BA.debugLineNum = 230;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borrapedidoclienteactual(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraPedidoClienteActual (subs) ","subs",30,_ba,subs.mostCurrent,1554);
if (RapidSub.canDelegate("borrapedidoclienteactual")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borrapedidoclienteactual", _ba);}
RemoteObject _thisc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 1554;BA.debugLine="Sub borraPedidoClienteActual As String";
Debug.ShouldStop(131072);
 BA.debugLineNum = 1568;BA.debugLine="Private thisC As Cursor";
Debug.ShouldStop(-2147483648);
_thisc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("thisC", _thisc);
 BA.debugLineNum = 1570;BA.debugLine="thisC=Starter.skmt.ExecQuery(\"select PE_PRONOMBRE";
Debug.ShouldStop(2);
_thisc = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select PE_PRONOMBRE, PE_PROID, PE_CANT, PE_FOLIO FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) "))));Debug.locals.put("thisC", _thisc);
 BA.debugLineNum = 1571;BA.debugLine="If thisC.RowCount>0 Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean(">",_thisc.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1572;BA.debugLine="For i=0 To thisC.RowCount -1";
Debug.ShouldStop(8);
{
final int step4 = 1;
final int limit4 = RemoteObject.solve(new RemoteObject[] {_thisc.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 = 1573;BA.debugLine="thisC.Position = i";
Debug.ShouldStop(16);
_thisc.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 1584;BA.debugLine="If thisC.GetString(\"PE_FOLIO\") = \"VENTA\" Then";
Debug.ShouldStop(32768);
if (RemoteObject.solveBoolean("=",_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_FOLIO"))),BA.ObjectToString("VENTA"))) { 
 BA.debugLineNum = 1585;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update $";
Debug.ShouldStop(65536);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_FOLIO"))))))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))))),RemoteObject.createImmutable(" where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID")))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1586;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete f";
Debug.ShouldStop(131072);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("delete from pedido where  pe_cedis in (select pe_cedis from pedido where pe_pronombre = ?) and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PRONOMBRE"))),_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_FOLIO")))})))));
 }else {
 BA.debugLineNum = 1588;BA.debugLine="Starter.skmt.ExecNonQuery($\"update CAT_GUNAPRO";
Debug.ShouldStop(524288);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update CAT_GUNAPROD set cat_gp_almacen = cat_gp_almacen + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))))),RemoteObject.createImmutable(" where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID")))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1589;BA.debugLine="Starter.skmt.ExecNonQuery($\"update CAT_GUNAPRO";
Debug.ShouldStop(1048576);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update CAT_GUNAPROD4 set cat_gp_almacen = cat_gp_almacen + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))))),RemoteObject.createImmutable(" where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID")))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1590;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete f";
Debug.ShouldStop(2097152);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("delete from pedido where  pe_cedis in (select pe_cedis from pedido where pe_pronombre = ?) and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PRONOMBRE"))),_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_FOLIO")))})))));
 };
 BA.debugLineNum = 1593;BA.debugLine="LogColor($\"update ${traeTablaProds(thisC.GetStr";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541484327",(RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_FOLIO"))))))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))))),RemoteObject.createImmutable(" where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID")))))),RemoteObject.createImmutable("'"))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 1597;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_cli";
Debug.ShouldStop(268435456);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 1598;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido whe";
Debug.ShouldStop(536870912);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 1599;BA.debugLine="Starter.skmt.ExecNonQuery(\"UPDATE kmt_info set ge";
Debug.ShouldStop(1073741824);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 1600;BA.debugLine="Return 1";
Debug.ShouldStop(-2147483648);
if (true) return BA.NumberToString(1);
 BA.debugLineNum = 1601;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borrapedidocredito(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraPedidoCredito (subs) ","subs",30,_ba,subs.mostCurrent,1603);
if (RapidSub.canDelegate("borrapedidocredito")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borrapedidocredito", _ba);}
RemoteObject _cpedidos = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
RemoteObject _productoid = RemoteObject.createImmutable("");
RemoteObject _cantidad = RemoteObject.createImmutable(0);
RemoteObject _pcli = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1603;BA.debugLine="Sub borraPedidoCredito As String";
Debug.ShouldStop(4);
 BA.debugLineNum = 1604;BA.debugLine="Dim cPedidos As Cursor";
Debug.ShouldStop(8);
_cpedidos = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("cPedidos", _cpedidos);
 BA.debugLineNum = 1605;BA.debugLine="cPedidos = Starter.skmt.ExecQuery(\"SELECT PE_PROI";
Debug.ShouldStop(16);
_cpedidos = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT PE_PROID, PE_CANT FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'"))));Debug.locals.put("cPedidos", _cpedidos);
 BA.debugLineNum = 1607;BA.debugLine="If cPedidos.RowCount > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_cpedidos.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1608;BA.debugLine="For i = 0 To cPedidos.RowCount - 1";
Debug.ShouldStop(128);
{
final int step4 = 1;
final int limit4 = RemoteObject.solve(new RemoteObject[] {_cpedidos.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 = 1609;BA.debugLine="cPedidos.Position = i";
Debug.ShouldStop(256);
_cpedidos.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 1610;BA.debugLine="Dim productoId As String = cPedidos.GetString(\"";
Debug.ShouldStop(512);
_productoid = _cpedidos.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID")));Debug.locals.put("productoId", _productoid);Debug.locals.put("productoId", _productoid);
 BA.debugLineNum = 1611;BA.debugLine="Dim cantidad As Int = cPedidos.GetInt(\"PE_CANT\"";
Debug.ShouldStop(1024);
_cantidad = _cpedidos.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")));Debug.locals.put("cantidad", _cantidad);Debug.locals.put("cantidad", _cantidad);
 BA.debugLineNum = 1613;BA.debugLine="Starter.skmt.ExecNonQuery2(\"UPDATE CAT_GUNAPROD";
Debug.ShouldStop(4096);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE CAT_GUNAPROD SET CAT_GP_ALMACEN = CAT_GP_ALMACEN + ? WHERE CAT_GP_ID = ?")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {BA.NumberToString(_cantidad),_productoid})))));
 BA.debugLineNum = 1614;BA.debugLine="Starter.skmt.ExecNonQuery2(\"UPDATE CAT_GUNAPROD";
Debug.ShouldStop(8192);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE CAT_GUNAPROD4 SET CAT_GP_ALMACEN = CAT_GP_ALMACEN + ? WHERE CAT_GP_ID = ?")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {BA.NumberToString(_cantidad),_productoid})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 1618;BA.debugLine="cPedidos.Close";
Debug.ShouldStop(131072);
_cpedidos.runVoidMethod ("Close");
 BA.debugLineNum = 1620;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM PEDIDO WHE";
Debug.ShouldStop(524288);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = 'PREVENTA_CREDITO'")));
 BA.debugLineNum = 1622;BA.debugLine="Log(\"Pedidos a crédito borrados correctamente.\")";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541549843",RemoteObject.createImmutable("Pedidos a crédito borrados correctamente."),0);
 BA.debugLineNum = 1623;BA.debugLine="Return \"1\"";
Debug.ShouldStop(4194304);
if (true) return BA.ObjectToString("1");
 BA.debugLineNum = 1625;BA.debugLine="Dim pCli As Cursor = Starter.skmt.ExecQuery(\"sele";
Debug.ShouldStop(16777216);
_pcli = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_pcli = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select PE_CLIENTE, PE_FECHA, PE_CEDIS, sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));Debug.locals.put("pCli", _pcli);Debug.locals.put("pCli", _pcli);
 BA.debugLineNum = 1626;BA.debugLine="If pCli.RowCount > 0 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean(">",_pcli.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1627;BA.debugLine="pCli.Position = 0";
Debug.ShouldStop(67108864);
_pcli.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1628;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
Debug.ShouldStop(134217728);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {9},new Object[] {_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE"))),_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_FECHA"))),_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_USUARIO"))),_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE"))),_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE"))),subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lon_gps" /*RemoteObject*/ ),subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lat_gps" /*RemoteObject*/ ),_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CEDIS"))),_pcli.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN")))})))));
 }else {
 BA.debugLineNum = 1630;BA.debugLine="Starter.skmt.ExecNonQuery(\"UPDATE KMT_INFO SET G";
Debug.ShouldStop(536870912);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE KMT_INFO SET GESTION = 0 WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
 };
 BA.debugLineNum = 1632;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _buscadbusuario(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("buscaDBUsuario (subs) ","subs",30,_ba,subs.mostCurrent,662);
if (RapidSub.canDelegate("buscadbusuario")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","buscadbusuario", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _usuario = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 662;BA.debugLine="Sub buscaDBUsuario As String 'ignore";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 663;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(4194304);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 664;BA.debugLine="Private usuario As String = \"SinUsuario\"";
Debug.ShouldStop(8388608);
_usuario = BA.ObjectToString("SinUsuario");Debug.locals.put("usuario", _usuario);Debug.locals.put("usuario", _usuario);
 BA.debugLineNum = 665;BA.debugLine="c=kmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(16777216);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs._kmt.runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 666;BA.debugLine="c.Position=0";
Debug.ShouldStop(33554432);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 667;BA.debugLine="If c.RowCount > 0 Then usuario = c.GetString(\"USU";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
_usuario = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO")));Debug.locals.put("usuario", _usuario);};
 BA.debugLineNum = 668;BA.debugLine="Return usuario";
Debug.ShouldStop(134217728);
if (true) return _usuario;
 BA.debugLineNum = 669;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centraboton(RemoteObject _ba,RemoteObject _elemento,RemoteObject _anchoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraBoton (subs) ","subs",30,_ba,subs.mostCurrent,84);
if (RapidSub.canDelegate("centraboton")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centraboton", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 84;BA.debugLine="Sub centraBoton(elemento As Button, anchoElementoS";
Debug.ShouldStop(524288);
 BA.debugLineNum = 85;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(1048576);
_elemento.runMethod(true,"setLeft",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.runMethod(true,"Round",(Object)(RemoteObject.solve(new RemoteObject[] {_anchoelementosuperior,RemoteObject.createImmutable(2)}, "/",0, 0))),(RemoteObject.solve(new RemoteObject[] {_elemento.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0))}, "-",1, 0)));
 BA.debugLineNum = 86;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centraetiqueta(RemoteObject _ba,RemoteObject _elemento,RemoteObject _anchoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraEtiqueta (subs) ","subs",30,_ba,subs.mostCurrent,642);
if (RapidSub.canDelegate("centraetiqueta")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centraetiqueta", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 642;BA.debugLine="Sub centraEtiqueta(elemento As Label, anchoElement";
Debug.ShouldStop(2);
 BA.debugLineNum = 643;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(4);
_elemento.runMethod(true,"setLeft",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.runMethod(true,"Round",(Object)(RemoteObject.solve(new RemoteObject[] {_anchoelementosuperior,RemoteObject.createImmutable(2)}, "/",0, 0))),(RemoteObject.solve(new RemoteObject[] {_elemento.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0))}, "-",1, 0)));
 BA.debugLineNum = 644;BA.debugLine="End Sub";
Debug.ShouldStop(8);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centrapanel(RemoteObject _ba,RemoteObject _elemento,RemoteObject _anchoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraPanel (subs) ","subs",30,_ba,subs.mostCurrent,647);
if (RapidSub.canDelegate("centrapanel")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centrapanel", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 647;BA.debugLine="Sub centraPanel(elemento As Panel, anchoElementoSu";
Debug.ShouldStop(64);
 BA.debugLineNum = 648;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(128);
_elemento.runMethod(true,"setLeft",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.runMethod(true,"Round",(Object)(RemoteObject.solve(new RemoteObject[] {_anchoelementosuperior,RemoteObject.createImmutable(2)}, "/",0, 0))),(RemoteObject.solve(new RemoteObject[] {_elemento.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0))}, "-",1, 0)));
 BA.debugLineNum = 649;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centrapanelv(RemoteObject _ba,RemoteObject _elemento,RemoteObject _altoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraPanelV (subs) ","subs",30,_ba,subs.mostCurrent,652);
if (RapidSub.canDelegate("centrapanelv")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centrapanelv", _ba, _elemento, _altoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("altoElementoSuperior", _altoelementosuperior);
 BA.debugLineNum = 652;BA.debugLine="Sub centraPanelV(elemento As Panel, altoElementoSu";
Debug.ShouldStop(2048);
 BA.debugLineNum = 653;BA.debugLine="elemento.Top = Round(altoElementoSuperior/2)-(ele";
Debug.ShouldStop(4096);
_elemento.runMethod(true,"setTop",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.runMethod(true,"Round",(Object)(RemoteObject.solve(new RemoteObject[] {_altoelementosuperior,RemoteObject.createImmutable(2)}, "/",0, 0))),(RemoteObject.solve(new RemoteObject[] {_elemento.runMethod(true,"getHeight"),RemoteObject.createImmutable(2)}, "/",0, 0))}, "-",1, 0)));
 BA.debugLineNum = 654;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centraprogressbar(RemoteObject _ba,RemoteObject _elemento,RemoteObject _anchoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraProgressBar (subs) ","subs",30,_ba,subs.mostCurrent,657);
if (RapidSub.canDelegate("centraprogressbar")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centraprogressbar", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 657;BA.debugLine="Sub centraProgressBar(elemento As ProgressBar, anc";
Debug.ShouldStop(65536);
 BA.debugLineNum = 658;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(131072);
_elemento.runMethod(true,"setLeft",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.runMethod(true,"Round",(Object)(RemoteObject.solve(new RemoteObject[] {_anchoelementosuperior,RemoteObject.createImmutable(2)}, "/",0, 0))),(RemoteObject.solve(new RemoteObject[] {_elemento.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0))}, "-",1, 0)));
 BA.debugLineNum = 659;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _compress(RemoteObject _ba,RemoteObject _str) throws Exception{
try {
		Debug.PushSubsStack("compress (subs) ","subs",30,_ba,subs.mostCurrent,89);
if (RapidSub.canDelegate("compress")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","compress", _ba, _str);}
RemoteObject _compressed = null;
RemoteObject _base64 = RemoteObject.createImmutable("");
;
Debug.locals.put("str", _str);
 BA.debugLineNum = 89;BA.debugLine="Sub compress(str As String) As String 'ignore";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 91;BA.debugLine="Dim compressed() As Byte = GZip.compress(str)";
Debug.ShouldStop(67108864);
_compressed = subs._gzip.runMethod(false,"compress",(Object)(_str));Debug.locals.put("compressed", _compressed);Debug.locals.put("compressed", _compressed);
 BA.debugLineNum = 94;BA.debugLine="Dim base64 As String = su.EncodeBase64(compressed";
Debug.ShouldStop(536870912);
_base64 = subs._su.runMethod(true,"EncodeBase64",(Object)(_compressed));Debug.locals.put("base64", _base64);Debug.locals.put("base64", _base64);
 BA.debugLineNum = 95;BA.debugLine="Log($\"Comprimido: ${base64.Length}\"$)";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","536962310",(RemoteObject.concat(RemoteObject.createImmutable("Comprimido: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_base64.runMethod(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 97;BA.debugLine="Return base64";
Debug.ShouldStop(1);
if (true) return _base64;
 BA.debugLineNum = 98;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _copiadb(RemoteObject _ba,RemoteObject _result) throws Exception{
try {
		Debug.PushSubsStack("copiaDB (subs) ","subs",30,_ba,subs.mostCurrent,600);
if (RapidSub.canDelegate("copiadb")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","copiadb", _ba, _result);}
RemoteObject _p = RemoteObject.createImmutable("");
RemoteObject _thedir = RemoteObject.createImmutable("");
;
Debug.locals.put("result", _result);
 BA.debugLineNum = 600;BA.debugLine="Sub copiaDB(result As Boolean) 'ignore";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 601;BA.debugLine="ToastMessageShow(\"copiaDB\", False)";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("copiaDB")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 602;BA.debugLine="If result Then";
Debug.ShouldStop(33554432);
if (_result.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 603;BA.debugLine="Dim p As String";
Debug.ShouldStop(67108864);
_p = RemoteObject.createImmutable("");Debug.locals.put("p", _p);
 BA.debugLineNum = 604;BA.debugLine="If File.ExternalWritable Then";
Debug.ShouldStop(134217728);
if (subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getExternalWritable").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 605;BA.debugLine="p = File.DirInternal";
Debug.ShouldStop(268435456);
_p = subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");Debug.locals.put("p", _p);
 }else {
 BA.debugLineNum = 608;BA.debugLine="p = File.DirInternal";
Debug.ShouldStop(-2147483648);
_p = subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");Debug.locals.put("p", _p);
 };
 BA.debugLineNum = 611;BA.debugLine="Dim theDir As String";
Debug.ShouldStop(4);
_thedir = RemoteObject.createImmutable("");Debug.locals.put("theDir", _thedir);
 BA.debugLineNum = 612;BA.debugLine="Try";
Debug.ShouldStop(8);
try { BA.debugLineNum = 613;BA.debugLine="File.MakeDir(File.DirInternal,\"kmts\")";
Debug.ShouldStop(16);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("MakeDir",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("kmts")));
 BA.debugLineNum = 614;BA.debugLine="theDir = \"/kmts\"";
Debug.ShouldStop(32);
_thedir = BA.ObjectToString("/kmts");Debug.locals.put("theDir", _thedir);
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e14) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e14.toString()); BA.debugLineNum = 616;BA.debugLine="theDir = \"\"";
Debug.ShouldStop(128);
_thedir = BA.ObjectToString("");Debug.locals.put("theDir", _thedir);
 };
 BA.debugLineNum = 618;BA.debugLine="Try";
Debug.ShouldStop(512);
try { BA.debugLineNum = 619;BA.debugLine="File.Copy(File.DirInternal,\"kmt.db\",File.DirInt";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("kmt.db")),(Object)(RemoteObject.concat(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal"),_thedir)),(Object)(RemoteObject.createImmutable("cedex_kmt.db")));
 BA.debugLineNum = 620;BA.debugLine="File.Copy(File.DirInternal,\"errorLog.db\",File.D";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("errorLog.db")),(Object)(RemoteObject.concat(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal"),_thedir)),(Object)(RemoteObject.createImmutable("cedex_errorLog.db")));
 BA.debugLineNum = 621;BA.debugLine="ToastMessageShow(\"BD copiada!\", False)";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("BD copiada!")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e21) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e21.toString()); BA.debugLineNum = 623;BA.debugLine="ToastMessageShow(\"No se pudo hacer la copia: \"&";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("No se pudo hacer la copia: "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)))),(Object)(subs.mostCurrent.__c.getField(true,"True")));
 };
 BA.debugLineNum = 625;BA.debugLine="Log(\"rootExternal=\"&p)";
Debug.ShouldStop(65536);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538797337",RemoteObject.concat(RemoteObject.createImmutable("rootExternal="),_p),0);
 BA.debugLineNum = 626;BA.debugLine="Log(\"File.DirInternal=\"&File.DirInternal)";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538797338",RemoteObject.concat(RemoteObject.createImmutable("File.DirInternal="),subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),0);
 BA.debugLineNum = 627;BA.debugLine="Log(\"File.DirInternal=\"&File.DirInternal)";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538797339",RemoteObject.concat(RemoteObject.createImmutable("File.DirInternal="),subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),0);
 }else {
 BA.debugLineNum = 629;BA.debugLine="ToastMessageShow(\"Sin permisos\", False)";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Sin permisos")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 };
 BA.debugLineNum = 631;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _cuantosvariablestengobd(RemoteObject _ba,RemoteObject _promo) throws Exception{
try {
		Debug.PushSubsStack("cuantosVariablesTengoBD (subs) ","subs",30,_ba,subs.mostCurrent,1487);
if (RapidSub.canDelegate("cuantosvariablestengobd")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","cuantosvariablestengobd", _ba, _promo);}
;
Debug.locals.put("promo", _promo);
 BA.debugLineNum = 1487;BA.debugLine="Sub cuantosVariablesTengoBD(promo As String) As St";
Debug.ShouldStop(16384);
 BA.debugLineNum = 1498;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _dameerroresjson(RemoteObject _ba,RemoteObject _sql,RemoteObject _maxerrores,RemoteObject _comprimido) throws Exception{
try {
		Debug.PushSubsStack("dameErroresJSON (subs) ","subs",30,_ba,subs.mostCurrent,538);
if (RapidSub.canDelegate("dameerroresjson")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","dameerroresjson", _ba, _sql, _maxerrores, _comprimido);}
RemoteObject _j = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser.JSONGenerator");
RemoteObject _lim = RemoteObject.createImmutable("");
RemoteObject _cur = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _l = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _i = RemoteObject.createImmutable(0);
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _m2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
;
Debug.locals.put("SQL", _sql);
Debug.locals.put("maxErrores", _maxerrores);
Debug.locals.put("comprimido", _comprimido);
 BA.debugLineNum = 538;BA.debugLine="Sub dameErroresJSON(SQL As SQL, maxErrores As Int,";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 539;BA.debugLine="Log(\"dameErroresJSON\")";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538600705",RemoteObject.createImmutable("dameErroresJSON"),0);
 BA.debugLineNum = 540;BA.debugLine="Private j As JSONGenerator";
Debug.ShouldStop(134217728);
_j = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser.JSONGenerator");Debug.locals.put("j", _j);
 BA.debugLineNum = 541;BA.debugLine="Private lim As String";
Debug.ShouldStop(268435456);
_lim = RemoteObject.createImmutable("");Debug.locals.put("lim", _lim);
 BA.debugLineNum = 542;BA.debugLine="Private cur As ResultSet";
Debug.ShouldStop(536870912);
_cur = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");Debug.locals.put("cur", _cur);
 BA.debugLineNum = 543;BA.debugLine="Private l As List";
Debug.ShouldStop(1073741824);
_l = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("l", _l);
 BA.debugLineNum = 544;BA.debugLine="Private i As Int = 0";
Debug.ShouldStop(-2147483648);
_i = BA.numberCast(int.class, 0);Debug.locals.put("i", _i);Debug.locals.put("i", _i);
 BA.debugLineNum = 545;BA.debugLine="l.Initialize";
Debug.ShouldStop(1);
_l.runVoidMethod ("Initialize");
 BA.debugLineNum = 546;BA.debugLine="Dim m, m2 As Map";
Debug.ShouldStop(2);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
_m2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m2", _m2);
 BA.debugLineNum = 547;BA.debugLine="m2.Initialize";
Debug.ShouldStop(4);
_m2.runVoidMethod ("Initialize");
 BA.debugLineNum = 548;BA.debugLine="If maxErrores = 0 Then lim = \"\" Else lim = \"limit";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",_maxerrores,BA.numberCast(double.class, 0))) { 
_lim = BA.ObjectToString("");Debug.locals.put("lim", _lim);}
else {
_lim = RemoteObject.concat(RemoteObject.createImmutable("limit "),_maxerrores);Debug.locals.put("lim", _lim);};
 BA.debugLineNum = 549;BA.debugLine="cur = SQL.ExecQuery(\"select * from errores order";
Debug.ShouldStop(16);
_cur = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), _sql.runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("select * from errores order by fecha desc "),_lim))));Debug.locals.put("cur", _cur);
 BA.debugLineNum = 550;BA.debugLine="Do While cur.NextRow";
Debug.ShouldStop(32);
while (_cur.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 551;BA.debugLine="m.Initialize";
Debug.ShouldStop(64);
_m.runVoidMethod ("Initialize");
 BA.debugLineNum = 552;BA.debugLine="m.Put(\"fecha\", cur.GetString(\"fecha\"))";
Debug.ShouldStop(128);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("fecha"))),(Object)((_cur.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fecha"))))));
 BA.debugLineNum = 553;BA.debugLine="m.Put(\"error\", cur.GetString(\"error\"))";
Debug.ShouldStop(256);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("error"))),(Object)((_cur.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("error"))))));
 BA.debugLineNum = 554;BA.debugLine="m2.Put(i,m)";
Debug.ShouldStop(512);
_m2.runVoidMethod ("Put",(Object)((_i)),(Object)((_m.getObject())));
 BA.debugLineNum = 555;BA.debugLine="i = i + 1";
Debug.ShouldStop(1024);
_i = RemoteObject.solve(new RemoteObject[] {_i,RemoteObject.createImmutable(1)}, "+",1, 1);Debug.locals.put("i", _i);
 }
;
 BA.debugLineNum = 557;BA.debugLine="cur.Close";
Debug.ShouldStop(4096);
_cur.runVoidMethod ("Close");
 BA.debugLineNum = 558;BA.debugLine="j.Initialize(m2)";
Debug.ShouldStop(8192);
_j.runVoidMethod ("Initialize",(Object)(_m2));
 BA.debugLineNum = 559;BA.debugLine="Log(j.ToString)";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538600725",_j.runMethod(true,"ToString"),0);
 BA.debugLineNum = 560;BA.debugLine="If comprimido Then";
Debug.ShouldStop(32768);
if (_comprimido.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 561;BA.debugLine="Return compress(j.ToString)";
Debug.ShouldStop(65536);
if (true) return _compress(_ba,_j.runMethod(true,"ToString"));
 }else {
 BA.debugLineNum = 563;BA.debugLine="Return j.ToString";
Debug.ShouldStop(262144);
if (true) return _j.runMethod(true,"ToString");
 };
 BA.debugLineNum = 565;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _dameruta(RemoteObject _ba,RemoteObject _inicioruta,RemoteObject _origenruta) throws Exception{
try {
		Debug.PushSubsStack("dameRuta (subs) ","subs",30,_ba,subs.mostCurrent,180);
if (RapidSub.canDelegate("dameruta")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","dameruta", _ba, _inicioruta, _origenruta);}
RemoteObject _fechainicio = RemoteObject.createImmutable("");
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _ruta2 = RemoteObject.createImmutable("");
int _i = 0;
;
Debug.locals.put("inicioRuta", _inicioruta);
Debug.locals.put("origenRuta", _origenruta);
 BA.debugLineNum = 180;BA.debugLine="Sub dameRuta(inicioRuta As String, origenRuta As S";
Debug.ShouldStop(524288);
 BA.debugLineNum = 182;BA.debugLine="Dim fechaInicio As String";
Debug.ShouldStop(2097152);
_fechainicio = RemoteObject.createImmutable("");Debug.locals.put("fechaInicio", _fechainicio);
 BA.debugLineNum = 183;BA.debugLine="Try 'incioRuta es numero";
Debug.ShouldStop(4194304);
try { BA.debugLineNum = 184;BA.debugLine="inicioRuta = inicioRuta * 1";
Debug.ShouldStop(8388608);
_inicioruta = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _inicioruta),RemoteObject.createImmutable(1)}, "*",0, 0));Debug.locals.put("inicioRuta", _inicioruta);
 BA.debugLineNum = 186;BA.debugLine="fechaInicio = fechaKMT(DateTime.Now - (DateTime.";
Debug.ShouldStop(33554432);
_fechainicio = _fechakmt(_ba,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),(RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.getField(false,"DateTime").getField(true,"TicksPerHour"),BA.numberCast(double.class, _inicioruta)}, "*",0, 0))}, "-",1, 0)));Debug.locals.put("fechaInicio", _fechainicio);
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e6) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e6.toString()); BA.debugLineNum = 188;BA.debugLine="fechaInicio = fechaInicioHoy";
Debug.ShouldStop(134217728);
_fechainicio = _fechainiciohoy(_ba);Debug.locals.put("fechaInicio", _fechainicio);
 };
 BA.debugLineNum = 191;BA.debugLine="If subsLogs Then Log(\"fechaInicio: \"&fechaInicio&";
Debug.ShouldStop(1073741824);
if (subs._subslogs.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537421067",RemoteObject.concat(RemoteObject.createImmutable("fechaInicio: "),_fechainicio,RemoteObject.createImmutable(" | rutaHrsAtras="),subs._rutahrsatras),0);};
 BA.debugLineNum = 192;BA.debugLine="Dim c As Cursor";
Debug.ShouldStop(-2147483648);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 193;BA.debugLine="If kmt.IsInitialized = False Then kmt.Initialize(";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("=",subs._kmt.runMethod(true,"IsInitialized"),subs.mostCurrent.__c.getField(true,"False"))) { 
subs._kmt.runVoidMethod ("Initialize",(Object)(subs.mostCurrent._starter._ruta /*RemoteObject*/ ),(Object)(BA.ObjectToString("kmt.db")),(Object)(subs.mostCurrent.__c.getField(true,"True")));};
 BA.debugLineNum = 194;BA.debugLine="If subsLogs Then Log(\"select FECHA, LAT, LON from";
Debug.ShouldStop(2);
if (subs._subslogs.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537421070",RemoteObject.concat(RemoteObject.createImmutable("select FECHA, LAT, LON from "),_origenruta,RemoteObject.createImmutable(" where FECHA > "),_fechainicio,RemoteObject.createImmutable(" order by FECHA desc limit "),subs._rutamaxpoints),0);};
 BA.debugLineNum = 195;BA.debugLine="c = kmt.ExecQuery(\"select FECHA, LAT, LON from \"&";
Debug.ShouldStop(4);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs._kmt.runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("select FECHA, LAT, LON from "),_origenruta,RemoteObject.createImmutable(" where FECHA > "),_fechainicio,RemoteObject.createImmutable(" order by FECHA desc limit "),subs._rutamaxpoints))));Debug.locals.put("c", _c);
 BA.debugLineNum = 196;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 197;BA.debugLine="Dim ruta2 As String = \"\"";
Debug.ShouldStop(16);
_ruta2 = BA.ObjectToString("");Debug.locals.put("ruta2", _ruta2);Debug.locals.put("ruta2", _ruta2);
 BA.debugLineNum = 198;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 199;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(64);
{
final int step16 = 1;
final int limit16 = RemoteObject.solve(new RemoteObject[] {_c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step16 > 0 && _i <= limit16) || (step16 < 0 && _i >= limit16) ;_i = ((int)(0 + _i + step16))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 200;BA.debugLine="c.Position=i";
Debug.ShouldStop(128);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 201;BA.debugLine="ruta2=ruta2&CRLF&c.GetString(\"LAT\")&\",\"&c.GetSt";
Debug.ShouldStop(256);
_ruta2 = RemoteObject.concat(_ruta2,subs.mostCurrent.__c.getField(true,"CRLF"),_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("LAT"))),RemoteObject.createImmutable(","),_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("LON"))),RemoteObject.createImmutable(","),_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("FECHA"))));Debug.locals.put("ruta2", _ruta2);
 BA.debugLineNum = 202;BA.debugLine="B4XPages.MainPage.fechaRuta = c.GetString(\"FECH";
Debug.ShouldStop(512);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).setField ("_fecharuta" /*RemoteObject*/ ,_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("FECHA"))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 205;BA.debugLine="c.Close";
Debug.ShouldStop(4096);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 206;BA.debugLine="Return compress(ruta2)";
Debug.ShouldStop(8192);
if (true) return _compress(_ba,_ruta2);
 BA.debugLineNum = 207;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _dameusuariodedb(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("dameUsuarioDeDB (subs) ","subs",30,_ba,subs.mostCurrent,672);
if (RapidSub.canDelegate("dameusuariodedb")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","dameusuariodedb", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _u = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 672;BA.debugLine="Sub dameUsuarioDeDB As String 'ignore";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 673;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(1);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 674;BA.debugLine="Private u As String = \"SinUsuario\"";
Debug.ShouldStop(2);
_u = BA.ObjectToString("SinUsuario");Debug.locals.put("u", _u);Debug.locals.put("u", _u);
 BA.debugLineNum = 675;BA.debugLine="If Not(kmt.IsInitialized) Then revisaBD";
Debug.ShouldStop(4);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._kmt.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
_revisabd(_ba);};
 BA.debugLineNum = 676;BA.debugLine="c=kmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(8);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs._kmt.runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 677;BA.debugLine="c.Position=0";
Debug.ShouldStop(16);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 678;BA.debugLine="If c.RowCount > 0 Then u = c.GetString(\"USUARIO\")";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
_u = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO")));Debug.locals.put("u", _u);};
 BA.debugLineNum = 679;BA.debugLine="c.Close";
Debug.ShouldStop(64);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 680;BA.debugLine="Return u";
Debug.ShouldStop(128);
if (true) return _u;
 BA.debugLineNum = 681;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _decompress(RemoteObject _ba,RemoteObject _base64) throws Exception{
try {
		Debug.PushSubsStack("decompress (subs) ","subs",30,_ba,subs.mostCurrent,101);
if (RapidSub.canDelegate("decompress")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","decompress", _ba, _base64);}
RemoteObject _decompressedbytes = null;
RemoteObject _bc = RemoteObject.declareNull("anywheresoftware.b4a.agraham.byteconverter.ByteConverter");
RemoteObject _uncompressed = RemoteObject.createImmutable("");
;
Debug.locals.put("base64", _base64);
 BA.debugLineNum = 101;BA.debugLine="Sub decompress(base64 As String) As String 'ignore";
Debug.ShouldStop(16);
 BA.debugLineNum = 102;BA.debugLine="Dim decompressedbytes() As Byte = su.DecodeBase64";
Debug.ShouldStop(32);
_decompressedbytes = subs._su.runMethod(false,"DecodeBase64",(Object)(_base64));Debug.locals.put("decompressedbytes", _decompressedbytes);Debug.locals.put("decompressedbytes", _decompressedbytes);
 BA.debugLineNum = 104;BA.debugLine="Dim bc As ByteConverter";
Debug.ShouldStop(128);
_bc = RemoteObject.createNew ("anywheresoftware.b4a.agraham.byteconverter.ByteConverter");Debug.locals.put("bc", _bc);
 BA.debugLineNum = 105;BA.debugLine="Dim uncompressed As String = bc.StringFromBytes(d";
Debug.ShouldStop(256);
_uncompressed = _bc.runMethod(true,"StringFromBytes",(Object)(_decompressedbytes),(Object)(RemoteObject.createImmutable("UTF8")));Debug.locals.put("uncompressed", _uncompressed);Debug.locals.put("uncompressed", _uncompressed);
 BA.debugLineNum = 106;BA.debugLine="Log($\"Descomprimido: ${uncompressed.Length}\"$)";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537027845",(RemoteObject.concat(RemoteObject.createImmutable("Descomprimido: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_uncompressed.runMethod(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 108;BA.debugLine="Return uncompressed";
Debug.ShouldStop(2048);
if (true) return _uncompressed;
 BA.debugLineNum = 109;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _deleteerrorlog_db(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("deleteErrorLog_DB (subs) ","subs",30,_ba,subs.mostCurrent,217);
if (RapidSub.canDelegate("deleteerrorlog_db")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","deleteerrorlog_db", _ba);}
;
 BA.debugLineNum = 217;BA.debugLine="Sub deleteErrorLog_DB 'ignore";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 218;BA.debugLine="errorLog.ExecNonQuery(\"delete from errores\")";
Debug.ShouldStop(33554432);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from errores")));
 BA.debugLineNum = 219;BA.debugLine="errorLog.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(67108864);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 220;BA.debugLine="ToastMessageShow(\"BD Errores Borrada\", False)";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("BD Errores Borrada")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 221;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _deletegps_db(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("deleteGPS_DB (subs) ","subs",30,_ba,subs.mostCurrent,210);
if (RapidSub.canDelegate("deletegps_db")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","deletegps_db", _ba);}
;
 BA.debugLineNum = 210;BA.debugLine="Sub deleteGPS_DB 'ignore";
Debug.ShouldStop(131072);
 BA.debugLineNum = 211;BA.debugLine="kmt.ExecNonQuery(\"delete from RUTA_GPS\")";
Debug.ShouldStop(262144);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from RUTA_GPS")));
 BA.debugLineNum = 212;BA.debugLine="kmt.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(524288);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 213;BA.debugLine="ToastMessageShow(\"Borramos BD Coords GPS\", False)";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Borramos BD Coords GPS")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 214;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _fechainiciohoy(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("fechaInicioHoy (subs) ","subs",30,_ba,subs.mostCurrent,353);
if (RapidSub.canDelegate("fechainiciohoy")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","fechainiciohoy", _ba);}
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _h = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 353;BA.debugLine="Sub fechaInicioHoy As String 'ignore";
Debug.ShouldStop(1);
 BA.debugLineNum = 354;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat";
Debug.ShouldStop(2);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 355;BA.debugLine="DateTime.DateFormat=\"yyMMdd\"";
Debug.ShouldStop(4);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yyMMdd"));
 BA.debugLineNum = 356;BA.debugLine="Private h As String = DateTime.Date(DateTime.Now";
Debug.ShouldStop(8);
_h = RemoteObject.concat(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))),RemoteObject.createImmutable("000000"));Debug.locals.put("h", _h);Debug.locals.put("h", _h);
 BA.debugLineNum = 357;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig";
Debug.ShouldStop(16);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 358;BA.debugLine="Log(\"Hoy=\"&h)";
Debug.ShouldStop(32);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537945349",RemoteObject.concat(RemoteObject.createImmutable("Hoy="),_h),0);
 BA.debugLineNum = 359;BA.debugLine="Return h";
Debug.ShouldStop(64);
if (true) return _h;
 BA.debugLineNum = 360;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _fechakmt(RemoteObject _ba,RemoteObject _fecha) throws Exception{
try {
		Debug.PushSubsStack("fechaKMT (subs) ","subs",30,_ba,subs.mostCurrent,112);
if (RapidSub.canDelegate("fechakmt")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","fechakmt", _ba, _fecha);}
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _nuevafecha = RemoteObject.createImmutable("");
;
Debug.locals.put("fecha", _fecha);
 BA.debugLineNum = 112;BA.debugLine="Sub fechaKMT(fecha As String) As String 'ignore";
Debug.ShouldStop(32768);
 BA.debugLineNum = 114;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat  '";
Debug.ShouldStop(131072);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 115;BA.debugLine="DateTime.DateFormat=\"yyMMddHHmmss\"";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yyMMddHHmmss"));
 BA.debugLineNum = 116;BA.debugLine="Dim nuevaFecha As String=DateTime.Date(fecha)";
Debug.ShouldStop(524288);
_nuevafecha = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(BA.numberCast(long.class, _fecha)));Debug.locals.put("nuevaFecha", _nuevafecha);Debug.locals.put("nuevaFecha", _nuevafecha);
 BA.debugLineNum = 117;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig d";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 119;BA.debugLine="Return nuevaFecha";
Debug.ShouldStop(4194304);
if (true) return _nuevafecha;
 BA.debugLineNum = 120;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _fechakmt2ticks(RemoteObject _ba,RemoteObject _fkmt) throws Exception{
try {
		Debug.PushSubsStack("fechaKMT2Ticks (subs) ","subs",30,_ba,subs.mostCurrent,568);
if (RapidSub.canDelegate("fechakmt2ticks")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","fechakmt2ticks", _ba, _fkmt);}
RemoteObject _partefecha = RemoteObject.createImmutable("");
RemoteObject _partehora = RemoteObject.createImmutable("");
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _ticks = RemoteObject.createImmutable(0L);
;
Debug.locals.put("fKMT", _fkmt);
 BA.debugLineNum = 568;BA.debugLine="Sub fechaKMT2Ticks(fKMT As String) As Long 'ignore";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 569;BA.debugLine="Try";
Debug.ShouldStop(16777216);
try { BA.debugLineNum = 570;BA.debugLine="If fKMT.Length = 12 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",_fkmt.runMethod(true,"length"),BA.numberCast(double.class, 12))) { 
 BA.debugLineNum = 571;BA.debugLine="Private parteFecha As String = fKMT.SubString2(";
Debug.ShouldStop(67108864);
_partefecha = _fkmt.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 6)));Debug.locals.put("parteFecha", _partefecha);Debug.locals.put("parteFecha", _partefecha);
 BA.debugLineNum = 572;BA.debugLine="Private parteHora As String = fKMT.SubString(6)";
Debug.ShouldStop(134217728);
_partehora = _fkmt.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 6)));Debug.locals.put("parteHora", _partehora);Debug.locals.put("parteHora", _partehora);
 BA.debugLineNum = 573;BA.debugLine="Private OrigFormat As String = DateTime.DateFor";
Debug.ShouldStop(268435456);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 574;BA.debugLine="DateTime.DateFormat=\"yymmdd\"";
Debug.ShouldStop(536870912);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yymmdd"));
 BA.debugLineNum = 575;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 576;BA.debugLine="Private ticks As Long = DateTime.DateTimeParse(";
Debug.ShouldStop(-2147483648);
_ticks = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"DateTimeParse",(Object)(_partefecha),(Object)(_partehora));Debug.locals.put("ticks", _ticks);Debug.locals.put("ticks", _ticks);
 BA.debugLineNum = 577;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig";
Debug.ShouldStop(1);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 578;BA.debugLine="Return ticks";
Debug.ShouldStop(2);
Debug.CheckDeviceExceptions();if (true) return _ticks;
 }else {
 BA.debugLineNum = 580;BA.debugLine="Log(\"Formato de fecha incorrecto, debe de ser '";
Debug.ShouldStop(8);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538666252",RemoteObject.concat(RemoteObject.createImmutable("Formato de fecha incorrecto, debe de ser 'YYMMDDHHMMSS', no '"),_fkmt,RemoteObject.createImmutable("' largo="),_fkmt.runMethod(true,"length")),0);
 BA.debugLineNum = 581;BA.debugLine="Return 0";
Debug.ShouldStop(16);
Debug.CheckDeviceExceptions();if (true) return BA.numberCast(long.class, 0);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e16) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e16.toString()); BA.debugLineNum = 584;BA.debugLine="Log(LastException)";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538666256",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 BA.debugLineNum = 585;BA.debugLine="LogColor($\"Fecha dada: ${fKMT}, Parte Fecha: ${p";
Debug.ShouldStop(256);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538666257",(RemoteObject.concat(RemoteObject.createImmutable("Fecha dada: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_fkmt))),RemoteObject.createImmutable(", Parte Fecha: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_partefecha))),RemoteObject.createImmutable(", Parte Hora: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_partehora))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 586;BA.debugLine="Return 0";
Debug.ShouldStop(512);
if (true) return BA.numberCast(long.class, 0);
 };
 BA.debugLineNum = 588;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable(0L);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _getphnid(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("getPhnId (subs) ","subs",30,_ba,subs.mostCurrent,20);
if (RapidSub.canDelegate("getphnid")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","getphnid", _ba);}
RemoteObject _t = RemoteObject.createImmutable("");
RemoteObject _s = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 20;BA.debugLine="Sub getPhnId As String 'ignore";
Debug.ShouldStop(524288);
 BA.debugLineNum = 22;BA.debugLine="devModel = phn.Model";
Debug.ShouldStop(2097152);
subs._devmodel = subs._phn.runMethod(true,"getModel");
 BA.debugLineNum = 23;BA.debugLine="If devModel.Length <= 3 Then 'Si phn.Model esta e";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("k",subs._devmodel.runMethod(true,"length"),BA.numberCast(double.class, 3))) { 
 BA.debugLineNum = 24;BA.debugLine="Dim t As String = phn.GetSettings(\"android_id\")";
Debug.ShouldStop(8388608);
_t = subs._phn.runMethod(true,"GetSettings",(Object)(RemoteObject.createImmutable("android_id")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 25;BA.debugLine="devModel = t";
Debug.ShouldStop(16777216);
subs._devmodel = _t;
 };
 BA.debugLineNum = 27;BA.debugLine="If devModel.Length >= 3 Then 'Si tenemos valor pa";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("g",subs._devmodel.runMethod(true,"length"),BA.numberCast(double.class, 3))) { 
 BA.debugLineNum = 28;BA.debugLine="File.WriteString(File.DirInternal, \"phnId.txt\",";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("WriteString",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("phnId.txt")),(Object)(subs._devmodel));
 }else 
{ BA.debugLineNum = 30;BA.debugLine="Else If devModel.Length < 3 Then ' Si no tenemos";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean("<",subs._devmodel.runMethod(true,"length"),BA.numberCast(double.class, 3))) { 
 BA.debugLineNum = 31;BA.debugLine="Dim s As String = File.ReadString(File.DirIntern";
Debug.ShouldStop(1073741824);
_s = subs.mostCurrent.__c.getField(false,"File").runMethod(true,"ReadString",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("phnId.txt")));Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 32;BA.debugLine="devModel = s";
Debug.ShouldStop(-2147483648);
subs._devmodel = _s;
 }}
;
 BA.debugLineNum = 36;BA.debugLine="Return devModel";
Debug.ShouldStop(8);
if (true) return subs._devmodel;
 BA.debugLineNum = 37;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _getssid(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("getSSID (subs) ","subs",30,_ba,subs.mostCurrent,301);
if (RapidSub.canDelegate("getssid")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","getssid", _ba);}
;
 BA.debugLineNum = 301;BA.debugLine="Sub getSSID  'ignore";
Debug.ShouldStop(4096);
 BA.debugLineNum = 306;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaappinfo(RemoteObject _ba,RemoteObject _skmt) throws Exception{
try {
		Debug.PushSubsStack("guardaAppInfo (subs) ","subs",30,_ba,subs.mostCurrent,1704);
if (RapidSub.canDelegate("guardaappinfo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaappinfo", _ba, _skmt);}
;
Debug.locals.put("skmt", _skmt);
 BA.debugLineNum = 1704;BA.debugLine="Sub guardaAppInfo(skmt As SQL)";
Debug.ShouldStop(128);
 BA.debugLineNum = 1705;BA.debugLine="skmt.ExecNonQuery(\"delete from CAT_VARIABLES wher";
Debug.ShouldStop(256);
_skmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'EMPRESA' or CAT_VA_DESCRIPCION = 'APP_NAME' or CAT_VA_DESCRIPCION = 'APP_VERSION'")));
 BA.debugLineNum = 1706;BA.debugLine="skmt.ExecNonQuery($\"insert into CAT_VARIABLES (CA";
Debug.ShouldStop(512);
_skmt.runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('APP_NAME', '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent.__c.getField(false,"Application").runMethod(true,"getLabelName")))),RemoteObject.createImmutable("')")))));
 BA.debugLineNum = 1707;BA.debugLine="skmt.ExecNonQuery($\"insert into CAT_VARIABLES (CA";
Debug.ShouldStop(1024);
_skmt.runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('APP_VERSION', '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent.__c.getField(false,"Application").runMethod(true,"getVersionName")))),RemoteObject.createImmutable("')")))));
 BA.debugLineNum = 1708;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaclientehorainicio(RemoteObject _ba,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("guardaClienteHoraInicio (subs) ","subs",30,_ba,subs.mostCurrent,1517);
if (RapidSub.canDelegate("guardaclientehorainicio")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaclientehorainicio", _ba, _cliente);}
;
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 1517;BA.debugLine="Sub guardaClienteHoraInicio(cliente As String)";
Debug.ShouldStop(4096);
 BA.debugLineNum = 1518;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert into";
Debug.ShouldStop(8192);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into PEDIDO_INICIO_FINAL(PIF_CLIENTE, PIF_HORA_INICIO, PIF_HORA_FINAL) VALUES(?,?,?) ")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(_cliente),(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")),RemoteObject.createImmutable((0))})))));
 BA.debugLineNum = 1520;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardainfoenarchivo(RemoteObject _ba,RemoteObject _coords) throws Exception{
try {
		Debug.PushSubsStack("guardaInfoEnArchivo (subs) ","subs",30,_ba,subs.mostCurrent,151);
if (RapidSub.canDelegate("guardainfoenarchivo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardainfoenarchivo", _ba, _coords);}
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _lastupdate = RemoteObject.createImmutable("");
RemoteObject _ubic = RemoteObject.createImmutable("");
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
RemoteObject _s = RemoteObject.createImmutable("");
RemoteObject _t = null;
;
Debug.locals.put("coords", _coords);
 BA.debugLineNum = 151;BA.debugLine="Sub guardaInfoEnArchivo(coords As String) 'ignore";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 153;BA.debugLine="Dim OrigFormat As String=DateTime.DateFormat  'sa";
Debug.ShouldStop(16777216);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 154;BA.debugLine="DateTime.DateFormat=\"MMM-dd HH:mm:ss\"";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MMM-dd HH:mm:ss"));
 BA.debugLineNum = 155;BA.debugLine="Dim lastUpdate As String=DateTime.Date(DateTime.N";
Debug.ShouldStop(67108864);
_lastupdate = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("lastUpdate", _lastupdate);Debug.locals.put("lastUpdate", _lastupdate);
 BA.debugLineNum = 156;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig d";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 158;BA.debugLine="Dim ubic As String = coords&\",\"&lastUpdate";
Debug.ShouldStop(536870912);
_ubic = RemoteObject.concat(_coords,RemoteObject.createImmutable(","),_lastupdate);Debug.locals.put("ubic", _ubic);Debug.locals.put("ubic", _ubic);
 BA.debugLineNum = 159;BA.debugLine="Dim out As OutputStream = File.OpenOutput(File.Di";
Debug.ShouldStop(1073741824);
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
_out = subs.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("gps.txt")),(Object)(subs.mostCurrent.__c.getField(true,"True")));Debug.locals.put("out", _out);Debug.locals.put("out", _out);
 BA.debugLineNum = 160;BA.debugLine="Dim s As String = ubic & CRLF";
Debug.ShouldStop(-2147483648);
_s = RemoteObject.concat(_ubic,subs.mostCurrent.__c.getField(true,"CRLF"));Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 161;BA.debugLine="Dim t() As Byte = s.GetBytes(\"UTF-8\")";
Debug.ShouldStop(1);
_t = _s.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF-8")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 162;BA.debugLine="out.WriteBytes(t, 0, t.Length)";
Debug.ShouldStop(2);
_out.runVoidMethod ("WriteBytes",(Object)(_t),(Object)(BA.numberCast(int.class, 0)),(Object)(_t.getField(true,"length")));
 BA.debugLineNum = 163;BA.debugLine="out.Close";
Debug.ShouldStop(4);
_out.runVoidMethod ("Close");
 BA.debugLineNum = 164;BA.debugLine="End Sub";
Debug.ShouldStop(8);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardainfoenbd(RemoteObject _ba,RemoteObject _coords) throws Exception{
try {
		Debug.PushSubsStack("guardaInfoEnBD (subs) ","subs",30,_ba,subs.mostCurrent,167);
if (RapidSub.canDelegate("guardainfoenbd")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardainfoenbd", _ba, _coords);}
RemoteObject _latlon = null;
;
Debug.locals.put("coords", _coords);
 BA.debugLineNum = 167;BA.debugLine="Sub guardaInfoEnBD(coords As String) 'ignore";
Debug.ShouldStop(64);
 BA.debugLineNum = 168;BA.debugLine="Log(\"Guardamos ubicacion en BD - \"&coords)";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537355521",RemoteObject.concat(RemoteObject.createImmutable("Guardamos ubicacion en BD - "),_coords),0);
 BA.debugLineNum = 169;BA.debugLine="Try";
Debug.ShouldStop(256);
try { BA.debugLineNum = 170;BA.debugLine="Dim latlon() As String = Regex.Split(\"\\|\", coord";
Debug.ShouldStop(512);
_latlon = subs.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString("\\|")),(Object)(_coords));Debug.locals.put("latlon", _latlon);Debug.locals.put("latlon", _latlon);
 BA.debugLineNum = 171;BA.debugLine="If latlon.Length < 2 Then latlon = Regex.Split(\"";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("<",_latlon.getField(true,"length"),BA.numberCast(double.class, 2))) { 
_latlon = subs.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(",")),(Object)(_coords));Debug.locals.put("latlon", _latlon);};
 BA.debugLineNum = 172;BA.debugLine="If subsLogs Then Log(\"LatLon=\"&latlon)";
Debug.ShouldStop(2048);
if (subs._subslogs.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537355525",RemoteObject.concat(RemoteObject.createImmutable("LatLon="),_latlon),0);};
 BA.debugLineNum = 173;BA.debugLine="kmt.ExecNonQuery2(\"INSERT INTO RUTA_GPS(FECHA, L";
Debug.ShouldStop(4096);
subs._kmt.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO RUTA_GPS(FECHA, LAT, LON) VALUES (?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(_latlon.getArrayElement(true,BA.numberCast(int.class, 2))),(_latlon.getArrayElement(true,BA.numberCast(int.class, 0))),(_latlon.getArrayElement(true,BA.numberCast(int.class, 1)))})))));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e8) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e8.toString()); BA.debugLineNum = 175;BA.debugLine="LogColor(LastException, Colors.red)";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537355528",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 177;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaproducto(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa) throws Exception{
try {
		Debug.PushSubsStack("guardaProducto (subs) ","subs",30,_ba,subs.mostCurrent,813);
if (RapidSub.canDelegate("guardaproducto")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproducto", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
 BA.debugLineNum = 813;BA.debugLine="Sub guardaProducto(cedis As String, costoU As Stri";
Debug.ShouldStop(4096);
 BA.debugLineNum = 815;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(16384);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 816;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(32768);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {12},new Object[] {(_cedis),((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cant),BA.numberCast(double.class, _costou)}, "*",0, 0))),(_costou),(_cant),(_nombre),(_prodid),(_clienteid),(_fecha),(_usuario),(_rutav),(_preciosin),(_tipoventa)})))));
 BA.debugLineNum = 817;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${S";
Debug.ShouldStop(65536);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 BA.debugLineNum = 818;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(pe";
Debug.ShouldStop(131072);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 819;BA.debugLine="c.Position=0";
Debug.ShouldStop(262144);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 820;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(524288);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 821;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert into";
Debug.ShouldStop(1048576);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {9},new Object[] {(_clienteid),(_fecha),(_usuario),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lon_gps" /*RemoteObject*/ )),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lat_gps" /*RemoteObject*/ )),(_cedis),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 822;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_i";
Debug.ShouldStop(2097152);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 823;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaproductosingestion(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa,RemoteObject _cantc,RemoteObject _bcajas) throws Exception{
try {
		Debug.PushSubsStack("guardaProductoSinGestion (subs) ","subs",30,_ba,subs.mostCurrent,828);
if (RapidSub.canDelegate("guardaproductosingestion")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproductosingestion", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _cantc, _bcajas);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
Debug.locals.put("cantc", _cantc);
Debug.locals.put("bcajas", _bcajas);
 BA.debugLineNum = 828;BA.debugLine="Sub guardaProductoSinGestion(cedis As String, cost";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 830;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(536870912);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 831;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(1073741824);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN,PE_FOLIO,PE_ENVIO_OK,PE_CANTC,PE_BCAJAS) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0,?,?) ")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {14},new Object[] {(_cedis),((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cant),BA.numberCast(double.class, _costou)}, "*",0, 0))),(_costou),(_cant),(_nombre),(_prodid),(_clienteid),(_fecha),(_usuario),(_rutav),(_preciosin),(_tipoventa),(_cantc),(_bcajas)})))));
 BA.debugLineNum = 832;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"VENTA\" Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ),BA.ObjectToString("VENTA"))) { 
 BA.debugLineNum = 833;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
Debug.ShouldStop(1);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 }else {
 BA.debugLineNum = 835;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update CA";
Debug.ShouldStop(4);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.createImmutable("update CAT_GUNAPROD set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 BA.debugLineNum = 836;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update CA";
Debug.ShouldStop(8);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.createImmutable("update CAT_GUNAPROD4 set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 };
 BA.debugLineNum = 838;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(pe";
Debug.ShouldStop(32);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 839;BA.debugLine="c.Position=0";
Debug.ShouldStop(64);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 840;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(128);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 841;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert into";
Debug.ShouldStop(256);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {9},new Object[] {(_clienteid),(_fecha),(_usuario),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lon_gps" /*RemoteObject*/ )),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lat_gps" /*RemoteObject*/ )),(_cedis),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 842;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaproductosingestion2(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa,RemoteObject _cantc,RemoteObject _bcajas) throws Exception{
try {
		Debug.PushSubsStack("guardaProductoSinGestion2 (subs) ","subs",30,_ba,subs.mostCurrent,879);
if (RapidSub.canDelegate("guardaproductosingestion2")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproductosingestion2", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _cantc, _bcajas);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
Debug.locals.put("cantc", _cantc);
Debug.locals.put("bcajas", _bcajas);
 BA.debugLineNum = 879;BA.debugLine="Sub guardaProductoSinGestion2(cedis As String, cos";
Debug.ShouldStop(16384);
 BA.debugLineNum = 881;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(65536);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 882;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(131072);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN,PE_FOLIO,PE_ENVIO_OK,PE_CANTC,PE_BCAJAS) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0,?,?) ")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {14},new Object[] {(_cedis),((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cantc),BA.numberCast(double.class, _costou)}, "*",0, 0))),(_costou),(_cant),(_nombre),(_prodid),(_clienteid),(_fecha),(_usuario),(_rutav),(_preciosin),(_tipoventa),(_cantc),(_bcajas)})))));
 BA.debugLineNum = 883;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"VENTA\" Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ),BA.ObjectToString("VENTA"))) { 
 BA.debugLineNum = 884;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
Debug.ShouldStop(524288);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 }else {
 BA.debugLineNum = 886;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update CA";
Debug.ShouldStop(2097152);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.createImmutable("update CAT_GUNAPROD set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 BA.debugLineNum = 887;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update CA";
Debug.ShouldStop(4194304);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.createImmutable("update CAT_GUNAPROD4 set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "))),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_cant),(_prodid)})))));
 };
 BA.debugLineNum = 889;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(pe";
Debug.ShouldStop(16777216);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 890;BA.debugLine="c.Position=0";
Debug.ShouldStop(33554432);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 891;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(67108864);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 892;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert into";
Debug.ShouldStop(134217728);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {9},new Object[] {(_clienteid),(_fecha),(_usuario),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lon_gps" /*RemoteObject*/ )),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lat_gps" /*RemoteObject*/ )),(_cedis),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 893;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaproductosingestiondinamico(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipoventa,RemoteObject _cantc,RemoteObject _bcajas,RemoteObject _dirigida,RemoteObject _uvm,RemoteObject _presentacion) throws Exception{
try {
		Debug.PushSubsStack("guardaProductoSinGestionDinamico (subs) ","subs",30,_ba,subs.mostCurrent,1837);
if (RapidSub.canDelegate("guardaproductosingestiondinamico")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproductosingestiondinamico", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _cantc, _bcajas, _dirigida, _uvm, _presentacion);}
RemoteObject _costototal = RemoteObject.createImmutable(0f);
RemoteObject _query = RemoteObject.createImmutable("");
RemoteObject _tablainventario = RemoteObject.createImmutable("");
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoU", _costou);
Debug.locals.put("cant", _cant);
Debug.locals.put("nombre", _nombre);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("clienteId", _clienteid);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("rutaV", _rutav);
Debug.locals.put("precioSin", _preciosin);
Debug.locals.put("tipoVenta", _tipoventa);
Debug.locals.put("cantc", _cantc);
Debug.locals.put("bcajas", _bcajas);
Debug.locals.put("dirigida", _dirigida);
Debug.locals.put("uvm", _uvm);
Debug.locals.put("presentacion", _presentacion);
 BA.debugLineNum = 1837;BA.debugLine="Sub guardaProductoSinGestionDinamico(cedis As Stri";
Debug.ShouldStop(4096);
 BA.debugLineNum = 1839;BA.debugLine="Dim costoTotal As Float = (cant / uvm) * costoU";
Debug.ShouldStop(16384);
_costototal = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_cant,_uvm}, "/",0, 0)),_costou}, "*",0, 0));Debug.locals.put("costoTotal", _costototal);Debug.locals.put("costoTotal", _costototal);
 BA.debugLineNum = 1841;BA.debugLine="Dim query As String = \"INSERT INTO PEDIDO (PE_CED";
Debug.ShouldStop(65536);
_query = RemoteObject.concat(RemoteObject.createImmutable("INSERT INTO PEDIDO (PE_CEDIS, PE_COSTO_TOT, PE_COSTOU, PE_CANT, PE_PRONOMBRE, PE_PROID, "),RemoteObject.createImmutable("PE_CLIENTE, PE_FECHA, PE_USUARIO, PE_RUTA, PE_COSTO_SIN, PE_FOLIO, PE_ENVIO_OK, "),RemoteObject.createImmutable("PE_CANTC, PE_BCAJAS, PE_DIRIGIDA, PE_UVM, PE_PRESENTACION) "),RemoteObject.createImmutable("VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0,?,?,?,?,?)"));Debug.locals.put("query", _query);Debug.locals.put("query", _query);
 BA.debugLineNum = 1846;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(query, Array";
Debug.ShouldStop(2097152);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(_query),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {17},new Object[] {(_cedis),(_costototal),(_costou),(_cant),(_nombre),(_prodid),(_clienteid),(_fecha),(_usuario),(_rutav),(_preciosin),(_tipoventa),(_cantc),(_bcajas),(_dirigida),(_uvm),(_presentacion)})))));
 BA.debugLineNum = 1850;BA.debugLine="Dim tablaInventario As String = Starter.tabla";
Debug.ShouldStop(33554432);
_tablainventario = subs.mostCurrent._starter._tabla /*RemoteObject*/ ;Debug.locals.put("tablaInventario", _tablainventario);Debug.locals.put("tablaInventario", _tablainventario);
 BA.debugLineNum = 1853;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE ${ta";
Debug.ShouldStop(268435456);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("UPDATE "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tablainventario))),RemoteObject.createImmutable(" SET cat_gp_almacen = cat_gp_almacen - "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cant))),RemoteObject.createImmutable(" WHERE cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1856;BA.debugLine="SincronizarTotalesEncabezado(clienteId, fecha, us";
Debug.ShouldStop(-2147483648);
_sincronizartotalesencabezado(_ba,_clienteid,_fecha,_usuario,_cedis);
 BA.debugLineNum = 1857;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _haypedido(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("hayPedido (subs) ","subs",30,_ba,subs.mostCurrent,1663);
if (RapidSub.canDelegate("haypedido")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","haypedido", _ba);}
RemoteObject _thisc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _hay = RemoteObject.createImmutable(false);
;
 BA.debugLineNum = 1663;BA.debugLine="Sub hayPedido As Boolean";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 1664;BA.debugLine="Private thisC As Cursor=B4XPages.MainPage.skmt.Ex";
Debug.ShouldStop(-2147483648);
_thisc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_thisc = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select count(PE_CLIENTE) as hayPedido from PEDIDO where PE_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'"))))));Debug.locals.put("thisC", _thisc);Debug.locals.put("thisC", _thisc);
 BA.debugLineNum = 1665;BA.debugLine="thisC.Position=0";
Debug.ShouldStop(1);
_thisc.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1666;BA.debugLine="Private hay As Boolean = False";
Debug.ShouldStop(2);
_hay = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("hay", _hay);Debug.locals.put("hay", _hay);
 BA.debugLineNum = 1667;BA.debugLine="If thisC.GetInt(\"hayPedido\") > 0 Then hay = True";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean(">",_thisc.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("hayPedido"))),BA.numberCast(double.class, 0))) { 
_hay = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("hay", _hay);};
 BA.debugLineNum = 1669;BA.debugLine="Return hay";
Debug.ShouldStop(16);
if (true) return _hay;
 BA.debugLineNum = 1670;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _insertarenglonespruebaenerrorlog(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("insertaRenglonesPruebaEnErrorLog (subs) ","subs",30,_ba,subs.mostCurrent,528);
if (RapidSub.canDelegate("insertarenglonespruebaenerrorlog")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","insertarenglonespruebaenerrorlog", _ba);}
int _x = 0;
;
 BA.debugLineNum = 528;BA.debugLine="Sub insertaRenglonesPruebaEnErrorLog 'ignore";
Debug.ShouldStop(32768);
 BA.debugLineNum = 529;BA.debugLine="revisaBD";
Debug.ShouldStop(65536);
_revisabd(_ba);
 BA.debugLineNum = 530;BA.debugLine="Log(\"insertamos 50 renglones a errorLog\")";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538535170",RemoteObject.createImmutable("insertamos 50 renglones a errorLog"),0);
 BA.debugLineNum = 531;BA.debugLine="For x = 1 To 50";
Debug.ShouldStop(262144);
{
final int step3 = 1;
final int limit3 = 50;
_x = 1 ;
for (;(step3 > 0 && _x <= limit3) || (step3 < 0 && _x >= limit3) ;_x = ((int)(0 + _x + step3))  ) {
Debug.locals.put("x", _x);
 BA.debugLineNum = 532;BA.debugLine="errorLog.ExecNonQuery2(\"INSERT INTO errores(fech";
Debug.ShouldStop(524288);
subs._errorlog.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO errores(fecha, error) VALUES (?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_fechakmt(_ba,BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")))),(RemoteObject.createImmutable("abc"))})))));
 BA.debugLineNum = 533;BA.debugLine="Log(x)";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538535173",BA.NumberToString(_x),0);
 }
}Debug.locals.put("x", _x);
;
 BA.debugLineNum = 535;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _installapk(RemoteObject _ba,RemoteObject _dir,RemoteObject _apk) throws Exception{
try {
		Debug.PushSubsStack("InstallAPK (subs) ","subs",30,_ba,subs.mostCurrent,590);
if (RapidSub.canDelegate("installapk")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","installapk", _ba, _dir, _apk);}
RemoteObject _i = RemoteObject.declareNull("anywheresoftware.b4a.objects.IntentWrapper");
;
Debug.locals.put("dir", _dir);
Debug.locals.put("apk", _apk);
 BA.debugLineNum = 590;BA.debugLine="Sub InstallAPK(dir As String, apk As String) 'igno";
Debug.ShouldStop(8192);
 BA.debugLineNum = 591;BA.debugLine="If File.Exists(dir, apk) Then";
Debug.ShouldStop(16384);
if (subs.mostCurrent.__c.getField(false,"File").runMethod(true,"Exists",(Object)(_dir),(Object)(_apk)).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 592;BA.debugLine="Dim i As Intent";
Debug.ShouldStop(32768);
_i = RemoteObject.createNew ("anywheresoftware.b4a.objects.IntentWrapper");Debug.locals.put("i", _i);
 BA.debugLineNum = 593;BA.debugLine="i.Initialize(i.ACTION_VIEW, \"file://\" & File.Com";
Debug.ShouldStop(65536);
_i.runVoidMethod ("Initialize",(Object)(_i.getField(true,"ACTION_VIEW")),(Object)(RemoteObject.concat(RemoteObject.createImmutable("file://"),subs.mostCurrent.__c.getField(false,"File").runMethod(true,"Combine",(Object)(_dir),(Object)(_apk)))));
 BA.debugLineNum = 594;BA.debugLine="i.SetType(\"application/vnd.android.package-archi";
Debug.ShouldStop(131072);
_i.runVoidMethod ("SetType",(Object)(RemoteObject.createImmutable("application/vnd.android.package-archive")));
 BA.debugLineNum = 595;BA.debugLine="StartActivity(i)";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("StartActivity",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)((_i.getObject())));
 };
 BA.debugLineNum = 597;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _json2map(RemoteObject _ba,RemoteObject _thejson) throws Exception{
try {
		Debug.PushSubsStack("JSON2Map (subs) ","subs",30,_ba,subs.mostCurrent,309);
if (RapidSub.canDelegate("json2map")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","json2map", _ba, _thejson);}
RemoteObject _json = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
;
Debug.locals.put("theJson", _thejson);
 BA.debugLineNum = 309;BA.debugLine="Sub JSON2Map(theJson As String) As Map 'ignore";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 311;BA.debugLine="Try";
Debug.ShouldStop(4194304);
try { BA.debugLineNum = 312;BA.debugLine="Private json As JSONParser";
Debug.ShouldStop(8388608);
_json = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser");Debug.locals.put("json", _json);
 BA.debugLineNum = 313;BA.debugLine="json.Initialize(theJson)";
Debug.ShouldStop(16777216);
_json.runVoidMethod ("Initialize",(Object)(_thejson));
 BA.debugLineNum = 314;BA.debugLine="Return json.NextObject";
Debug.ShouldStop(33554432);
Debug.CheckDeviceExceptions();if (true) return _json.runMethod(false,"NextObject");
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e6) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e6.toString()); BA.debugLineNum = 316;BA.debugLine="Log(LastException)";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537814279",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 BA.debugLineNum = 317;BA.debugLine="log2DB(\"JSON2Map: \"&LastException)";
Debug.ShouldStop(268435456);
_log2db(_ba,RemoteObject.concat(RemoteObject.createImmutable("JSON2Map: "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)));
 BA.debugLineNum = 318;BA.debugLine="Private m As Map = CreateMap(\"title\":\"Error gene";
Debug.ShouldStop(536870912);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m = subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("title")),RemoteObject.createImmutable(("Error generating JSON")),RemoteObject.createImmutable(("t")),RemoteObject.createImmutable(("Error")),RemoteObject.createImmutable(("Message")),(subs.mostCurrent.__c.runMethod(false,"LastException",_ba).getObject()),RemoteObject.createImmutable(("text")),(subs.mostCurrent.__c.runMethod(false,"LastException",_ba).getObject())}));Debug.locals.put("m", _m);Debug.locals.put("m", _m);
 BA.debugLineNum = 319;BA.debugLine="Return m";
Debug.ShouldStop(1073741824);
if (true) return _m;
 };
 BA.debugLineNum = 321;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _log2db(RemoteObject _ba,RemoteObject _texto) throws Exception{
try {
		Debug.PushSubsStack("log2DB (subs) ","subs",30,_ba,subs.mostCurrent,363);
if (RapidSub.canDelegate("log2db")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","log2db", _ba, _texto);}
;
Debug.locals.put("texto", _texto);
 BA.debugLineNum = 363;BA.debugLine="Sub log2DB(texto As String) 'ignore";
Debug.ShouldStop(1024);
 BA.debugLineNum = 364;BA.debugLine="LogColor(fechaKMT(DateTime.Now)&\" - log2BD: '\"&te";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538010881",RemoteObject.concat(_fechakmt(_ba,BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))),RemoteObject.createImmutable(" - log2BD: '"),_texto,RemoteObject.createImmutable("'")),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"LightGray"));
 BA.debugLineNum = 365;BA.debugLine="kmt.ExecNonQuery2(\"INSERT INTO bitacora(fecha, te";
Debug.ShouldStop(4096);
subs._kmt.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO bitacora(fecha, texto) VALUES (?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(_fechakmt(_ba,BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")))),(_texto)})))));
 BA.debugLineNum = 366;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _logjobdoneresultados(RemoteObject _ba,RemoteObject _resultado) throws Exception{
try {
		Debug.PushSubsStack("logJobDoneResultados (subs) ","subs",30,_ba,subs.mostCurrent,1694);
if (RapidSub.canDelegate("logjobdoneresultados")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","logjobdoneresultados", _ba, _resultado);}
RemoteObject _records = null;
RemoteObject _k = RemoteObject.createImmutable("");
;
Debug.locals.put("resultado", _resultado);
 BA.debugLineNum = 1694;BA.debugLine="Sub logJobDoneResultados(resultado As DBResult)";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 1695;BA.debugLine="For Each records() As Object In resultado.Rows";
Debug.ShouldStop(1073741824);
{
final RemoteObject group1 = _resultado.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen1 = group1.runMethod(true,"getSize").<Integer>get()
;int index1 = 0;
;
for (; index1 < groupLen1;index1++){
_records = (group1.runMethod(false,"Get",index1));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 1696;BA.debugLine="LogColor($\"====== ${resultado.Tag} - REGISTROS =";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541877506",(RemoteObject.concat(RemoteObject.createImmutable("====== "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_resultado.getField(false,"Tag" /*RemoteObject*/ ))),RemoteObject.createImmutable(" - REGISTROS = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_resultado.getField(false,"Rows" /*RemoteObject*/ ).runMethod(true,"getSize")))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 215)),(Object)(BA.numberCast(int.class, 37)),(Object)(BA.numberCast(int.class, 0))));
 BA.debugLineNum = 1697;BA.debugLine="For Each k As String In resultado.Columns.Keys";
Debug.ShouldStop(1);
{
final RemoteObject group3 = _resultado.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Keys");
final int groupLen3 = group3.runMethod(true,"getSize").<Integer>get()
;int index3 = 0;
;
for (; index3 < groupLen3;index3++){
_k = BA.ObjectToString(group3.runMethod(false,"Get",index3));Debug.locals.put("k", _k);
Debug.locals.put("k", _k);
 BA.debugLineNum = 1698;BA.debugLine="LogColor(k & \" = \" & records(resultado.Columns.";
Debug.ShouldStop(2);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541877508",RemoteObject.concat(_k,RemoteObject.createImmutable(" = "),_records.getArrayElement(false,BA.numberCast(int.class, _resultado.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((_k)))))),subs.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 215)),(Object)(BA.numberCast(int.class, 37)),(Object)(BA.numberCast(int.class, 0))));
 }
}Debug.locals.put("k", _k);
;
 }
}Debug.locals.put("records", _records);
;
 BA.debugLineNum = 1701;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _map2json(RemoteObject _ba,RemoteObject _m) throws Exception{
try {
		Debug.PushSubsStack("map2JSON (subs) ","subs",30,_ba,subs.mostCurrent,324);
if (RapidSub.canDelegate("map2json")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","map2json", _ba, _m);}
RemoteObject _jg = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser.JSONGenerator");
RemoteObject _t = RemoteObject.createImmutable("");
;
Debug.locals.put("m", _m);
 BA.debugLineNum = 324;BA.debugLine="Sub map2JSON(m As Map) As String 'ignore";
Debug.ShouldStop(8);
 BA.debugLineNum = 327;BA.debugLine="Dim jg As JSONGenerator";
Debug.ShouldStop(64);
_jg = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser.JSONGenerator");Debug.locals.put("jg", _jg);
 BA.debugLineNum = 328;BA.debugLine="jg.Initialize(m)";
Debug.ShouldStop(128);
_jg.runVoidMethod ("Initialize",(Object)(_m));
 BA.debugLineNum = 329;BA.debugLine="Dim t As String = jg.ToString";
Debug.ShouldStop(256);
_t = _jg.runMethod(true,"ToString");Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 330;BA.debugLine="Return t";
Debug.ShouldStop(512);
if (true) return _t;
 BA.debugLineNum = 331;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _masdexxmins(RemoteObject _ba,RemoteObject _hora,RemoteObject _mins) throws Exception{
try {
		Debug.PushSubsStack("masDeXXMins (subs) ","subs",30,_ba,subs.mostCurrent,369);
if (RapidSub.canDelegate("masdexxmins")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","masdexxmins", _ba, _hora, _mins);}
;
Debug.locals.put("hora", _hora);
Debug.locals.put("mins", _mins);
 BA.debugLineNum = 369;BA.debugLine="Sub masDeXXMins(hora As Int, mins As Int) As Boole";
Debug.ShouldStop(65536);
 BA.debugLineNum = 370;BA.debugLine="If (hora + mins * DateTime.TicksPerMinute) < Date";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("<",(RemoteObject.solve(new RemoteObject[] {_hora,_mins,subs.mostCurrent.__c.getField(false,"DateTime").getField(true,"TicksPerMinute")}, "+*",1, 2)),subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))) { 
 BA.debugLineNum = 371;BA.debugLine="Return True";
Debug.ShouldStop(262144);
if (true) return subs.mostCurrent.__c.getField(true,"True");
 }else {
 BA.debugLineNum = 373;BA.debugLine="Return False";
Debug.ShouldStop(1048576);
if (true) return subs.mostCurrent.__c.getField(true,"False");
 };
 BA.debugLineNum = 375;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _masdexxminskmt(RemoteObject _ba,RemoteObject _hora,RemoteObject _mins) throws Exception{
try {
		Debug.PushSubsStack("masDeXXMinsKMT (subs) ","subs",30,_ba,subs.mostCurrent,378);
if (RapidSub.canDelegate("masdexxminskmt")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","masdexxminskmt", _ba, _hora, _mins);}
;
Debug.locals.put("hora", _hora);
Debug.locals.put("mins", _mins);
 BA.debugLineNum = 378;BA.debugLine="Sub masDeXXMinsKMT(hora As String, mins As Int) As";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 379;BA.debugLine="Try";
Debug.ShouldStop(67108864);
try { BA.debugLineNum = 381;BA.debugLine="If fechaKMT2Ticks(hora) + mins * DateTime.TicksP";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean("<",RemoteObject.solve(new RemoteObject[] {_fechakmt2ticks(_ba,_hora),_mins,subs.mostCurrent.__c.getField(false,"DateTime").getField(true,"TicksPerMinute")}, "+*",1, 2),subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))) { 
 BA.debugLineNum = 383;BA.debugLine="Return True";
Debug.ShouldStop(1073741824);
Debug.CheckDeviceExceptions();if (true) return subs.mostCurrent.__c.getField(true,"True");
 }else {
 BA.debugLineNum = 386;BA.debugLine="Return False";
Debug.ShouldStop(2);
Debug.CheckDeviceExceptions();if (true) return subs.mostCurrent.__c.getField(true,"False");
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e8) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e8.toString()); BA.debugLineNum = 389;BA.debugLine="Log(LastException)";
Debug.ShouldStop(16);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538141963",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 };
 BA.debugLineNum = 391;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _notihigh(RemoteObject _ba,RemoteObject _title,RemoteObject _body,RemoteObject _activity) throws Exception{
try {
		Debug.PushSubsStack("notiHigh (subs) ","subs",30,_ba,subs.mostCurrent,123);
if (RapidSub.canDelegate("notihigh")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","notihigh", _ba, _title, _body, _activity);}
RemoteObject _notif = RemoteObject.declareNull("anywheresoftware.b4a.objects.NotificationWrapper");
;
Debug.locals.put("title", _title);
Debug.locals.put("body", _body);
Debug.locals.put("activity", _activity);
 BA.debugLineNum = 123;BA.debugLine="Sub notiHigh(title As String, body As String, acti";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 124;BA.debugLine="Private notif As Notification";
Debug.ShouldStop(134217728);
_notif = RemoteObject.createNew ("anywheresoftware.b4a.objects.NotificationWrapper");Debug.locals.put("notif", _notif);
 BA.debugLineNum = 125;BA.debugLine="notif.Initialize2(notif.IMPORTANCE_HIGH)";
Debug.ShouldStop(268435456);
_notif.runVoidMethod ("Initialize2",(Object)(_notif.getField(true,"IMPORTANCE_HIGH")));
 BA.debugLineNum = 126;BA.debugLine="notif.Icon = \"icon\"";
Debug.ShouldStop(536870912);
_notif.runVoidMethod ("setIcon",BA.ObjectToString("icon"));
 BA.debugLineNum = 127;BA.debugLine="notif.Vibrate = False";
Debug.ShouldStop(1073741824);
_notif.runVoidMethod ("setVibrate",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 128;BA.debugLine="notif.Sound = False";
Debug.ShouldStop(-2147483648);
_notif.runVoidMethod ("setSound",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 129;BA.debugLine="notif.AutoCancel = True";
Debug.ShouldStop(1);
_notif.runVoidMethod ("setAutoCancel",subs.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 130;BA.debugLine="Log(\"notiHigh: \"&title)";
Debug.ShouldStop(2);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537158919",RemoteObject.concat(RemoteObject.createImmutable("notiHigh: "),_title),0);
 BA.debugLineNum = 131;BA.debugLine="notif.SetInfo(title, body, activity)";
Debug.ShouldStop(4);
_notif.runVoidMethod ("SetInfoNew",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)(BA.ObjectToCharSequence(_title)),(Object)(BA.ObjectToCharSequence(_body)),(Object)(_activity));
 BA.debugLineNum = 133;BA.debugLine="notif.Notify(777)";
Debug.ShouldStop(16);
_notif.runVoidMethod ("Notify",(Object)(BA.numberCast(int.class, 777)));
 BA.debugLineNum = 134;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _notilowreturn(RemoteObject _ba,RemoteObject _title,RemoteObject _body,RemoteObject _id) throws Exception{
try {
		Debug.PushSubsStack("notiLowReturn (subs) ","subs",30,_ba,subs.mostCurrent,137);
if (RapidSub.canDelegate("notilowreturn")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","notilowreturn", _ba, _title, _body, _id);}
RemoteObject _notification = RemoteObject.declareNull("anywheresoftware.b4a.objects.NotificationWrapper");
;
Debug.locals.put("title", _title);
Debug.locals.put("Body", _body);
Debug.locals.put("id", _id);
 BA.debugLineNum = 137;BA.debugLine="Sub notiLowReturn(title As String, Body As String,";
Debug.ShouldStop(256);
 BA.debugLineNum = 138;BA.debugLine="Private notification As Notification";
Debug.ShouldStop(512);
_notification = RemoteObject.createNew ("anywheresoftware.b4a.objects.NotificationWrapper");Debug.locals.put("notification", _notification);
 BA.debugLineNum = 139;BA.debugLine="notification.Initialize2(notification.IMPORTANCE_";
Debug.ShouldStop(1024);
_notification.runVoidMethod ("Initialize2",(Object)(_notification.getField(true,"IMPORTANCE_LOW")));
 BA.debugLineNum = 140;BA.debugLine="Log(\"notiLowReturn: \"&title)";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537224451",RemoteObject.concat(RemoteObject.createImmutable("notiLowReturn: "),_title),0);
 BA.debugLineNum = 141;BA.debugLine="notification.Icon = \"icon\"";
Debug.ShouldStop(4096);
_notification.runVoidMethod ("setIcon",BA.ObjectToString("icon"));
 BA.debugLineNum = 142;BA.debugLine="notification.Sound = False";
Debug.ShouldStop(8192);
_notification.runVoidMethod ("setSound",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 143;BA.debugLine="notification.Vibrate = False";
Debug.ShouldStop(16384);
_notification.runVoidMethod ("setVibrate",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 144;BA.debugLine="notification.SetInfo(title, Body, Main)";
Debug.ShouldStop(32768);
_notification.runVoidMethod ("SetInfoNew",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)(BA.ObjectToCharSequence(_title)),(Object)(BA.ObjectToCharSequence(_body)),(Object)((subs.mostCurrent._main.getObject())));
 BA.debugLineNum = 145;BA.debugLine="notification.Notify(id)";
Debug.ShouldStop(65536);
_notification.runVoidMethod ("Notify",(Object)(_id));
 BA.debugLineNum = 147;BA.debugLine="Return notification";
Debug.ShouldStop(262144);
if (true) return _notification;
 BA.debugLineNum = 148;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _panelvisible(RemoteObject _ba,RemoteObject _panel,RemoteObject _top,RemoteObject _left) throws Exception{
try {
		Debug.PushSubsStack("panelVisible (subs) ","subs",30,_ba,subs.mostCurrent,634);
if (RapidSub.canDelegate("panelvisible")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","panelvisible", _ba, _panel, _top, _left);}
;
Debug.locals.put("panel", _panel);
Debug.locals.put("top", _top);
Debug.locals.put("left", _left);
 BA.debugLineNum = 634;BA.debugLine="Sub panelVisible(panel As Panel, top As Int, left";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 635;BA.debugLine="panel.BringToFront";
Debug.ShouldStop(67108864);
_panel.runVoidMethod ("BringToFront");
 BA.debugLineNum = 636;BA.debugLine="panel.Visible = True";
Debug.ShouldStop(134217728);
_panel.runMethod(true,"setVisible",subs.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 637;BA.debugLine="panel.Top = top";
Debug.ShouldStop(268435456);
_panel.runMethod(true,"setTop",_top);
 BA.debugLineNum = 638;BA.debugLine="panel.Left = left";
Debug.ShouldStop(536870912);
_panel.runMethod(true,"setLeft",_left);
 BA.debugLineNum = 639;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _pedidoguardado(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("pedidoGuardado (subs) ","subs",30,_ba,subs.mostCurrent,1651);
if (RapidSub.canDelegate("pedidoguardado")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","pedidoguardado", _ba);}
RemoteObject _guardado = RemoteObject.createImmutable(false);
RemoteObject _g = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1651;BA.debugLine="Sub pedidoGuardado As Boolean";
Debug.ShouldStop(262144);
 BA.debugLineNum = 1652;BA.debugLine="Private guardado As Boolean = False";
Debug.ShouldStop(524288);
_guardado = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("guardado", _guardado);Debug.locals.put("guardado", _guardado);
 BA.debugLineNum = 1653;BA.debugLine="Private g As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(1048576);
_g = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_g = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select gestion from kmt_info where CAT_CL_CODIGO in (Select CUENTA from cuentaa)"))));Debug.locals.put("g", _g);Debug.locals.put("g", _g);
 BA.debugLineNum = 1654;BA.debugLine="If g.RowCount > 0 Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean(">",_g.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1655;BA.debugLine="g.Position=0";
Debug.ShouldStop(4194304);
_g.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1656;BA.debugLine="If g.GetString(\"gestion\") = \"2\" Or g.GetString(\"";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",_g.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("gestion"))),BA.ObjectToString("2")) || RemoteObject.solveBoolean("=",_g.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("gestion"))),BA.ObjectToString("3"))) { 
_guardado = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("guardado", _guardado);};
 };
 BA.debugLineNum = 1659;BA.debugLine="Return guardado";
Debug.ShouldStop(67108864);
if (true) return _guardado;
 BA.debugLineNum = 1660;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _procesapromocion(RemoteObject _ba,RemoteObject _idpromo,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("procesaPromocion (subs) ","subs",30,_ba,subs.mostCurrent,1302);
if (RapidSub.canDelegate("procesapromocion")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","procesapromocion", _ba, _idpromo, _cliente);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _iniciocontador = RemoteObject.createImmutable("");
RemoteObject _pm = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _inventariosinfijos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _pv = RemoteObject.createImmutable(false);
;
Debug.locals.put("idPromo", _idpromo);
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 1302;BA.debugLine="Sub procesaPromocion(idPromo As String, cliente As";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 1303;BA.debugLine="Private thisLog As Boolean = True  'Si es verdade";
Debug.ShouldStop(4194304);
_thislog = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1304;BA.debugLine="Private inicioContador As String = DateTime.Now";
Debug.ShouldStop(8388608);
_iniciocontador = BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"));Debug.locals.put("inicioContador", _iniciocontador);Debug.locals.put("inicioContador", _iniciocontador);
 BA.debugLineNum = 1305;BA.debugLine="If thisLog Then LogColor($\"********* Iniciamos re";
Debug.ShouldStop(16777216);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894467",(RemoteObject.concat(RemoteObject.createImmutable("********* Iniciamos revision de Promo "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idpromo))),RemoteObject.createImmutable(" *********"))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));};
 BA.debugLineNum = 1307;BA.debugLine="Private pm As Map = traePromo(idPromo, cliente)";
Debug.ShouldStop(67108864);
_pm = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_pm = _traepromo(_ba,_idpromo,_cliente);Debug.locals.put("pm", _pm);Debug.locals.put("pm", _pm);
 BA.debugLineNum = 1308;BA.debugLine="If thisLog Then LogColor(pm, Colors.Blue)";
Debug.ShouldStop(134217728);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894470",BA.ObjectToString(_pm),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1309;BA.debugLine="If pm.Get(\"resultado\") = \"ok\" Then 'Si encontramo";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean("=",_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("resultado")))),RemoteObject.createImmutable(("ok")))) { 
 BA.debugLineNum = 1311;BA.debugLine="If thisLog Then LogColor($\"Promociones permitida";
Debug.ShouldStop(1073741824);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894473",(RemoteObject.concat(RemoteObject.createImmutable("Promociones permitidas="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traemaxpromos(_ba,_pm)))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1312;BA.debugLine="If thisLog Then Log(\"Promos vendidas: \" & traePr";
Debug.ShouldStop(-2147483648);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894474",RemoteObject.concat(RemoteObject.createImmutable("Promos vendidas: "),_traepromosvendidas(_ba,_idpromo,_cliente)),0);};
 BA.debugLineNum = 1313;BA.debugLine="If traePromosVendidas(idPromo, cliente) >= traeM";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("g",_traepromosvendidas(_ba,_idpromo,_cliente),BA.numberCast(double.class, _traemaxpromos(_ba,_pm)))) { 
 BA.debugLineNum = 1314;BA.debugLine="If thisLog Then LogColor(\"Ya se vendieron las p";
Debug.ShouldStop(2);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894476",BA.ObjectToString("Ya se vendieron las promos PERMITIDAS para el cliente"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 1315;BA.debugLine="Return CreateMap(\"status\":\"ko\", \"mp\":pm)";
Debug.ShouldStop(4);
if (true) return subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("status")),RemoteObject.createImmutable(("ko")),RemoteObject.createImmutable(("mp")),(_pm.getObject())}));
 };
 BA.debugLineNum = 1318;BA.debugLine="Private inventarioSinFijos As Map = restaFijosPr";
Debug.ShouldStop(32);
_inventariosinfijos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_inventariosinfijos = _restafijospromo(_ba,_pm);Debug.locals.put("inventarioSinFijos", _inventariosinfijos);Debug.locals.put("inventarioSinFijos", _inventariosinfijos);
 BA.debugLineNum = 1319;BA.debugLine="If thisLog Then LogColor(\"inventariosfijos=\"&inv";
Debug.ShouldStop(64);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894481",RemoteObject.concat(RemoteObject.createImmutable("inventariosfijos="),_inventariosinfijos),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));};
 BA.debugLineNum = 1321;BA.debugLine="If inventarioSinFijos.Get(\"resultado\") = \"ok\" Th";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",_inventariosinfijos.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("resultado")))),RemoteObject.createImmutable(("ok")))) { 
 BA.debugLineNum = 1323;BA.debugLine="Private pv As Boolean =  alcanzanLosVariablesPa";
Debug.ShouldStop(1024);
_pv = _alcanzanlosvariablesparapromo(_ba,_pm,_inventariosinfijos);Debug.locals.put("pv", _pv);Debug.locals.put("pv", _pv);
 BA.debugLineNum = 1324;BA.debugLine="If thisLog Then Log(\"Alcanzan los variables? --";
Debug.ShouldStop(2048);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894486",RemoteObject.concat(RemoteObject.createImmutable("Alcanzan los variables? --> "),_pv),0);};
 BA.debugLineNum = 1325;BA.debugLine="If pv Then Return CreateMap(\"status\":\"ok\", \"mp\"";
Debug.ShouldStop(4096);
if (_pv.<Boolean>get().booleanValue()) { 
if (true) return subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("status")),RemoteObject.createImmutable(("ok")),RemoteObject.createImmutable(("mp")),(_pm.getObject())}));}
else {
if (true) return subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("status")),RemoteObject.createImmutable(("ko")),RemoteObject.createImmutable(("mp")),(_pm.getObject())}));};
 }else {
 BA.debugLineNum = 1327;BA.debugLine="If thisLog Then LogColor(\"NO HAY INVENTARIO SUF";
Debug.ShouldStop(16384);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894489",RemoteObject.concat(RemoteObject.createImmutable("NO HAY INVENTARIO SUFICIENTE "),_idpromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 1328;BA.debugLine="Return CreateMap(\"status\":\"ko\", \"mp\":pm)";
Debug.ShouldStop(32768);
if (true) return subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("status")),RemoteObject.createImmutable(("ko")),RemoteObject.createImmutable(("mp")),(_pm.getObject())}));
 };
 };
 BA.debugLineNum = 1334;BA.debugLine="LogColor(\"TIEMPO DE PROCESO ESTA PROMO: \" & ((Dat";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540894496",RemoteObject.concat(RemoteObject.createImmutable("TIEMPO DE PROCESO ESTA PROMO: "),(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),BA.numberCast(double.class, _iniciocontador)}, "-",1, 0)),RemoteObject.createImmutable(1000)}, "/",0, 0))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 1335;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 3;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 6;BA.debugLine="Public GZip As GZipStrings 		'Usa la libreria Com";
subs._gzip = RemoteObject.createNew ("de.donmanfred.GZipStringswrapper");
 //BA.debugLineNum = 7;BA.debugLine="Private su As StringUtils 		'Usa la libreria Stri";
subs._su = RemoteObject.createNew ("anywheresoftware.b4a.objects.StringUtils");
 //BA.debugLineNum = 8;BA.debugLine="Dim phn As Phone";
subs._phn = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");
 //BA.debugLineNum = 9;BA.debugLine="Dim devModel As String";
subs._devmodel = RemoteObject.createImmutable("");
 //BA.debugLineNum = 10;BA.debugLine="Dim kmt, errorLog As SQL 'Requiere la libreria \"S";
subs._kmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
subs._errorlog = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 //BA.debugLineNum = 12;BA.debugLine="Dim ssid As String  'ignore";
subs._ssid = RemoteObject.createImmutable("");
 //BA.debugLineNum = 13;BA.debugLine="Dim rutaMaxPoints As Int = 3000";
subs._rutamaxpoints = BA.numberCast(int.class, 3000);
 //BA.debugLineNum = 14;BA.debugLine="Dim rutaHrsAtras As Int = 48";
subs._rutahrsatras = BA.numberCast(int.class, 48);
 //BA.debugLineNum = 16;BA.debugLine="Private subsLogs As Boolean = False";
subs._subslogs = subs.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 17;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _restafijospromo(RemoteObject _ba,RemoteObject _promomap) throws Exception{
try {
		Debug.PushSubsStack("restaFijosPromo (subs) ","subs",30,_ba,subs.mostCurrent,1117);
if (RapidSub.canDelegate("restafijospromo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","restafijospromo", _ba, _promomap);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _inventariosdisponiblesparaestapromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _i = RemoteObject.createImmutable(0);
RemoteObject _prodsmap = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _prodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
int _p = 0;
RemoteObject _t = RemoteObject.createImmutable("");
RemoteObject _p2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
;
Debug.locals.put("promoMap", _promomap);
 BA.debugLineNum = 1117;BA.debugLine="Sub restaFijosPromo(promoMap As Map) As Map 'ignor";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 1118;BA.debugLine="Private thisLog As Boolean = True 'Si es verdader";
Debug.ShouldStop(536870912);
_thislog = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1119;BA.debugLine="Private inventariosDisponiblesParaEstaPromo As Ma";
Debug.ShouldStop(1073741824);
_inventariosdisponiblesparaestapromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_inventariosdisponiblesparaestapromo = _traemosinventariodisponibleparapromo(_ba,BA.ObjectToString(_promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id"))))));Debug.locals.put("inventariosDisponiblesParaEstaPromo", _inventariosdisponiblesparaestapromo);Debug.locals.put("inventariosDisponiblesParaEstaPromo", _inventariosdisponiblesparaestapromo);
 BA.debugLineNum = 1120;BA.debugLine="If thisLog Then LogColor(\"InvDisponible: \" & inve";
Debug.ShouldStop(-2147483648);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632323",RemoteObject.concat(RemoteObject.createImmutable("InvDisponible: "),_inventariosdisponiblesparaestapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 1121;BA.debugLine="If thisLog Then LogColor(\"Inventario inicial ante";
Debug.ShouldStop(1);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632324",RemoteObject.concat(RemoteObject.createImmutable("Inventario inicial antes de FIJOS: "),_inventariosdisponiblesparaestapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Gray"));};
 BA.debugLineNum = 1122;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"resultad";
Debug.ShouldStop(2);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("ko"))));
 BA.debugLineNum = 1123;BA.debugLine="Private i As Int";
Debug.ShouldStop(4);
_i = RemoteObject.createImmutable(0);Debug.locals.put("i", _i);
 BA.debugLineNum = 1124;BA.debugLine="Private prodsmap As Map = promoMap.Get(\"productos";
Debug.ShouldStop(8);
_prodsmap = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_prodsmap = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("productos")))));Debug.locals.put("prodsmap", _prodsmap);Debug.locals.put("prodsmap", _prodsmap);
 BA.debugLineNum = 1125;BA.debugLine="Private prodsFijos As List = promoMap.get(\"prodsF";
Debug.ShouldStop(16);
_prodsfijos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_prodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijos")))));Debug.locals.put("prodsFijos", _prodsfijos);Debug.locals.put("prodsFijos", _prodsfijos);
 BA.debugLineNum = 1126;BA.debugLine="For p = 0 To prodsFijos.Size - 1";
Debug.ShouldStop(32);
{
final int step9 = 1;
final int limit9 = RemoteObject.solve(new RemoteObject[] {_prodsfijos.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step9 > 0 && _p <= limit9) || (step9 < 0 && _p >= limit9) ;_p = ((int)(0 + _p + step9))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 1127;BA.debugLine="Private t As String = prodsFijos.Get(p) 'Obtenem";
Debug.ShouldStop(64);
_t = BA.ObjectToString(_prodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 1128;BA.debugLine="Private p2 As Map = prodsmap.Get(t) 'Obtenemos u";
Debug.ShouldStop(128);
_p2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_p2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _prodsmap.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("p2", _p2);Debug.locals.put("p2", _p2);
 BA.debugLineNum = 1129;BA.debugLine="If thisLog Then Log($\"T: ${t}, prod ${p2.Get(\"id";
Debug.ShouldStop(256);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632332",(RemoteObject.concat(RemoteObject.createImmutable("T: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_t))),RemoteObject.createImmutable(", prod "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_p2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("idProducto")))))),RemoteObject.createImmutable(", piezas: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_p2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("piezas")))))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1130;BA.debugLine="If thisLog Then Log(\"inventariosDisponiblesParaE";
Debug.ShouldStop(512);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632333",RemoteObject.concat(RemoteObject.createImmutable("inventariosDisponiblesParaEstaPromo="),_inventariosdisponiblesparaestapromo),0);};
 BA.debugLineNum = 1131;BA.debugLine="If inventariosDisponiblesParaEstaPromo.ContainsK";
Debug.ShouldStop(1024);
if (_inventariosdisponiblesparaestapromo.runMethod(true,"ContainsKey",(Object)((_t))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1132;BA.debugLine="i = inventariosDisponiblesParaEstaPromo.get(t)";
Debug.ShouldStop(2048);
_i = BA.numberCast(int.class, _inventariosdisponiblesparaestapromo.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("i", _i);
 BA.debugLineNum = 1133;BA.debugLine="If thisLog Then Log($\"Nuevo inventario de ${t}:";
Debug.ShouldStop(4096);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632336",(RemoteObject.concat(RemoteObject.createImmutable("Nuevo inventario de "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_t))),RemoteObject.createImmutable(": "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_i))),RemoteObject.createImmutable("-"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijosPiezas")))))).runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))),RemoteObject.createImmutable(" = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.0")),(Object)((RemoteObject.solve(new RemoteObject[] {_i,BA.numberCast(double.class, (RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijosPiezas")))))).runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))}, "-",1, 0)))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1134;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(t, $\"${";
Debug.ShouldStop(8192);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)((_t)),(Object)(((RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.solve(new RemoteObject[] {_i,BA.numberCast(double.class, (RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijosPiezas")))))).runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))}, "-",1, 0)))),RemoteObject.createImmutable(""))))));
 BA.debugLineNum = 1135;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"result";
Debug.ShouldStop(16384);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("ok"))));
 }else {
 BA.debugLineNum = 1137;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"result";
Debug.ShouldStop(65536);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("No hay suficiente producto para la promocion."))));
 BA.debugLineNum = 1138;BA.debugLine="LogColor(\"Sin suficiente inventario fijo: \" & t";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632341",RemoteObject.concat(RemoteObject.createImmutable("Sin suficiente inventario fijo: "),_t),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 1139;BA.debugLine="Exit";
Debug.ShouldStop(262144);
if (true) break;
 };
 BA.debugLineNum = 1141;BA.debugLine="If i - p2.Get(\"piezas\") < 0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean("<",RemoteObject.solve(new RemoteObject[] {_i,BA.numberCast(double.class, _p2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("piezas")))))}, "-",1, 0),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1142;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"result";
Debug.ShouldStop(2097152);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("No hay suficiente producto para la promocion."))));
 BA.debugLineNum = 1143;BA.debugLine="Exit";
Debug.ShouldStop(4194304);
if (true) break;
 };
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1146;BA.debugLine="If prodsFijos.Size = 0 Then inventariosDisponible";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",_prodsfijos.runMethod(true,"getSize"),BA.numberCast(double.class, 0))) { 
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("ok"))));};
 BA.debugLineNum = 1147;BA.debugLine="If thisLog Then LogColor(\"Inventario final depues";
Debug.ShouldStop(67108864);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540632350",RemoteObject.concat(RemoteObject.createImmutable("Inventario final depues de FIJOS: "),_inventariosdisponiblesparaestapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1148;BA.debugLine="Return inventariosDisponiblesParaEstaPromo";
Debug.ShouldStop(134217728);
if (true) return _inventariosdisponiblesparaestapromo;
 BA.debugLineNum = 1149;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisabd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("revisaBD (subs) ","subs",30,_ba,subs.mostCurrent,233);
if (RapidSub.canDelegate("revisabd")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisabd", _ba);}
;
 BA.debugLineNum = 233;BA.debugLine="Sub revisaBD 'ignore";
Debug.ShouldStop(256);
 BA.debugLineNum = 237;BA.debugLine="If Not(File.Exists(Starter.ruta, \"kmt.db\")) Then";
Debug.ShouldStop(4096);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"Exists",(Object)(subs.mostCurrent._starter._ruta /*RemoteObject*/ ),(Object)(RemoteObject.createImmutable("kmt.db"))))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 238;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", Starter.ruta";
Debug.ShouldStop(8192);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(subs.mostCurrent._starter._ruta /*RemoteObject*/ ),(Object)(RemoteObject.createImmutable("kmt.db")));
 BA.debugLineNum = 239;BA.debugLine="LogColor(\"copiamos kmt.db de \"&File.DirAssets &";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683206",RemoteObject.concat(RemoteObject.createImmutable("copiamos kmt.db de "),subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirAssets"),RemoteObject.createImmutable(" a "),subs.mostCurrent._starter._ruta /*RemoteObject*/ ),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));
 };
 BA.debugLineNum = 241;BA.debugLine="If Not(kmt.IsInitialized) Then kmt.Initialize(Sta";
Debug.ShouldStop(65536);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._kmt.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
subs._kmt.runVoidMethod ("Initialize",(Object)(subs.mostCurrent._starter._ruta /*RemoteObject*/ ),(Object)(BA.ObjectToString("kmt.db")),(Object)(subs.mostCurrent.__c.getField(true,"True")));};
 BA.debugLineNum = 242;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUTA";
Debug.ShouldStop(131072);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS RUTA_GPS(FECHA INTEGER, LAT TEXT, LON TEXT)")));
 BA.debugLineNum = 244;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS bita";
Debug.ShouldStop(524288);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS bitacora(fecha INTEGER, texto TEXT)")));
 BA.debugLineNum = 246;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ABON";
Debug.ShouldStop(2097152);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS ABONOSP(NOTA TEXT, CLIENTE TEXT, SALDO_PENDIENTE TEXT)")));
 BA.debugLineNum = 247;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CLIE";
Debug.ShouldStop(4194304);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS CLIENTE_NUEVO(CN_ID_CLIENTE TEXT, CN_NOMBRE TEXT, CN_enviado text)")));
 BA.debugLineNum = 248;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUTA";
Debug.ShouldStop(8388608);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS RUTA_SUPLENCIA(RS_RUTA TEXT)")));
 BA.debugLineNum = 249;BA.debugLine="Try 'Si no existe la columna PC_ENVIO_OK la agreg";
Debug.ShouldStop(16777216);
try { BA.debugLineNum = 250;BA.debugLine="kmt.ExecQuery(\"select count(PC_ENVIO_OK) from PE";
Debug.ShouldStop(33554432);
subs._kmt.runVoidMethod ("ExecQuery",(Object)(RemoteObject.createImmutable("select count(PC_ENVIO_OK) from PEDIDO_CLIENTE")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e14) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e14.toString()); BA.debugLineNum = 252;BA.debugLine="Try";
Debug.ShouldStop(134217728);
try { BA.debugLineNum = 253;BA.debugLine="kmt.ExecNonQuery(\"ALTER TABLE PEDIDO_CLIENTE AD";
Debug.ShouldStop(268435456);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE PEDIDO_CLIENTE ADD COLUMN PC_ENVIO_OK INTEGER")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e17) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e17.toString()); BA.debugLineNum = 255;BA.debugLine="LogColor(\"No pudimos agregar la columna PC_ENVI";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683222",BA.ObjectToString("No pudimos agregar la columna PC_ENVIO_OK."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 256;BA.debugLine="LogColor(LastException, Colors.Red)";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683223",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 };
 BA.debugLineNum = 260;BA.debugLine="Try 'Si no existe la columna CAT_CL_DIAS_VISITA l";
Debug.ShouldStop(8);
try { BA.debugLineNum = 261;BA.debugLine="kmt.ExecQuery(\"select count(CAT_CL_DIAS_VISITA)";
Debug.ShouldStop(16);
subs._kmt.runVoidMethod ("ExecQuery",(Object)(RemoteObject.createImmutable("select count(CAT_CL_DIAS_VISITA) from kmt_info2")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e24) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e24.toString()); BA.debugLineNum = 263;BA.debugLine="Try";
Debug.ShouldStop(64);
try { BA.debugLineNum = 264;BA.debugLine="kmt.ExecNonQuery(\"ALTER TABLE kmt_info2 ADD COL";
Debug.ShouldStop(128);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE kmt_info2 ADD COLUMN CAT_CL_DIAS_VISITA TEXT")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e27) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e27.toString()); BA.debugLineNum = 266;BA.debugLine="LogColor(\"No pudimos agregar la columna CAT_CL_";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683233",BA.ObjectToString("No pudimos agregar la columna CAT_CL_DIAS_VISITA."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 267;BA.debugLine="LogColor(LastException, Colors.Red)";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683234",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 };
 BA.debugLineNum = 271;BA.debugLine="Try 'Si no existe la columna PC_ENVIO_OK la agreg";
Debug.ShouldStop(16384);
try { BA.debugLineNum = 272;BA.debugLine="kmt.ExecQuery(\"select count(PC_TIEMPO_TIENDA) fr";
Debug.ShouldStop(32768);
subs._kmt.runVoidMethod ("ExecQuery",(Object)(RemoteObject.createImmutable("select count(PC_TIEMPO_TIENDA) from PEDIDO_CLIENTE")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e34) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e34.toString()); BA.debugLineNum = 274;BA.debugLine="Try";
Debug.ShouldStop(131072);
try { BA.debugLineNum = 275;BA.debugLine="kmt.ExecNonQuery(\"ALTER TABLE PEDIDO_CLIENTE AD";
Debug.ShouldStop(262144);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE PEDIDO_CLIENTE ADD COLUMN PC_TIEMPO_TIENDA FLOAT")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e37) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e37.toString()); BA.debugLineNum = 277;BA.debugLine="LogColor(\"No pudimos agregar la columna PC_TIEM";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683244",BA.ObjectToString("No pudimos agregar la columna PC_TIEMPO_TIENDA."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 278;BA.debugLine="LogColor(LastException, Colors.Red)";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683245",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 };
 BA.debugLineNum = 281;BA.debugLine="Try 'Si no existe la columna PC_FACTURA la agrega";
Debug.ShouldStop(16777216);
try { BA.debugLineNum = 282;BA.debugLine="kmt.ExecQuery(\"select count(PC_FACTURA) from PED";
Debug.ShouldStop(33554432);
subs._kmt.runVoidMethod ("ExecQuery",(Object)(RemoteObject.createImmutable("select count(PC_FACTURA) from PEDIDO_CLIENTE")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e44) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e44.toString()); BA.debugLineNum = 284;BA.debugLine="Try";
Debug.ShouldStop(134217728);
try { BA.debugLineNum = 285;BA.debugLine="kmt.ExecNonQuery(\"ALTER TABLE PEDIDO_CLIENTE AD";
Debug.ShouldStop(268435456);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE PEDIDO_CLIENTE ADD COLUMN PC_FACTURA INTEGER")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e47) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e47.toString()); BA.debugLineNum = 287;BA.debugLine="LogColor(\"No pudimos agregar la columna PC_FACT";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683254",BA.ObjectToString("No pudimos agregar la columna PC_FACTURA."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 288;BA.debugLine="LogColor(LastException, Colors.Red)";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","537683255",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 };
 BA.debugLineNum = 291;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS bita";
Debug.ShouldStop(4);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS bitacora(fecha INTEGER, texto TEXT)")));
 BA.debugLineNum = 293;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS PEDI";
Debug.ShouldStop(16);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS PEDIDO_INICIO_FINAL(PIF_CLIENTE TEXT, PIF_HORA_INICIO LONG, PIF_HORA_FINAL LONG)")));
 BA.debugLineNum = 296;BA.debugLine="If Not(errorLog.IsInitialized) Then errorLog.Init";
Debug.ShouldStop(128);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._errorlog.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
subs._errorlog.runVoidMethod ("Initialize",(Object)(subs.mostCurrent._starter._ruta /*RemoteObject*/ ),(Object)(BA.ObjectToString("errorLog.db")),(Object)(subs.mostCurrent.__c.getField(true,"True")));};
 BA.debugLineNum = 297;BA.debugLine="errorLog.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS";
Debug.ShouldStop(256);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS errores(fecha INTEGER, error TEXT)")));
 BA.debugLineNum = 298;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisaflp(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("revisaFLP (subs) ","subs",30,_ba,subs.mostCurrent,441);
if (RapidSub.canDelegate("revisaflp")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisaflp", _ba);}
RemoteObject _todobienflp = RemoteObject.createImmutable(false);
;
 BA.debugLineNum = 441;BA.debugLine="Sub revisaFLP 'ignore";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 442;BA.debugLine="LogColor(\"**** **** Revisamos FLP **** ****\", Col";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538338561",BA.ObjectToString("**** **** Revisamos FLP **** ****"),subs.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 78)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 227))));
 BA.debugLineNum = 443;BA.debugLine="Private todoBienFLP As Boolean = True";
Debug.ShouldStop(67108864);
_todobienflp = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("todoBienFLP", _todobienflp);Debug.locals.put("todoBienFLP", _todobienflp);
 BA.debugLineNum = 444;BA.debugLine="Try";
Debug.ShouldStop(134217728);
try { BA.debugLineNum = 445;BA.debugLine="If Not(Tracker.FLP.IsInitialized) Then";
Debug.ShouldStop(268435456);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 446;BA.debugLine="log2DB(\"revisaFLP: No esta inicializado ... 'Re";
Debug.ShouldStop(536870912);
_log2db(_ba,RemoteObject.createImmutable("revisaFLP: No esta inicializado ... 'Reinicializando FLP'"));
 BA.debugLineNum = 447;BA.debugLine="Tracker.FLP.Initialize(\"flp\")";
Debug.ShouldStop(1073741824);
subs.mostCurrent._tracker._flp /*RemoteObject*/ .runVoidMethod ("Initialize",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)(RemoteObject.createImmutable("flp")));
 BA.debugLineNum = 448;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(-2147483648);
_todobienflp = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("todoBienFLP", _todobienflp);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e10) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e10.toString()); BA.debugLineNum = 451;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsInitialized) ---";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538338570",RemoteObject.concat(RemoteObject.createImmutable("If Not(Tracker.FLP.IsInitialized) --- "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 453;BA.debugLine="Try";
Debug.ShouldStop(16);
try { BA.debugLineNum = 454;BA.debugLine="If Tracker.FLP.IsInitialized Then";
Debug.ShouldStop(32);
if (subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 455;BA.debugLine="Try";
Debug.ShouldStop(64);
try { BA.debugLineNum = 456;BA.debugLine="If Not(Tracker.FLP.IsConnected) Then";
Debug.ShouldStop(128);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsConnected"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 457;BA.debugLine="log2DB(\"revisaFLP: No esta conectado ... 'Rec";
Debug.ShouldStop(256);
_log2db(_ba,RemoteObject.createImmutable("revisaFLP: No esta conectado ... 'Reconectando FLP'"));
 BA.debugLineNum = 459;BA.debugLine="CallSubDelayed(Tracker,\"StartFLP\")";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("CallSubDelayed",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)((subs.mostCurrent._tracker.getObject())),(Object)(RemoteObject.createImmutable("StartFLP")));
 BA.debugLineNum = 460;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(2048);
_todobienflp = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("todoBienFLP", _todobienflp);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e21) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e21.toString()); BA.debugLineNum = 463;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsConnected) -->";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538338582",RemoteObject.concat(RemoteObject.createImmutable("If Not(Tracker.FLP.IsConnected) --> "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 465;BA.debugLine="Try";
Debug.ShouldStop(65536);
try { BA.debugLineNum = 466;BA.debugLine="If Tracker.FLP.IsConnected And _ 					Tracker.";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean(".",subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsConnected")) && RemoteObject.solveBoolean(".",subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"IsInitialized")) && RemoteObject.solveBoolean(">",subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"DistanceTo",(Object)((subs.mostCurrent._tracker._uugcoords /*RemoteObject*/ .getObject()))),BA.numberCast(double.class, 500))) { 
 BA.debugLineNum = 469;BA.debugLine="log2DB(\"revisaFLP: 'No se esta actualizando,";
Debug.ShouldStop(1048576);
_log2db(_ba,RemoteObject.createImmutable("revisaFLP: 'No se esta actualizando, lo reiniciamos ...'"));
 BA.debugLineNum = 470;BA.debugLine="StartService(Tracker)";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("StartService",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)((subs.mostCurrent._tracker.getObject())));
 BA.debugLineNum = 471;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(4194304);
_todobienflp = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("todoBienFLP", _todobienflp);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e30) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e30.toString()); BA.debugLineNum = 474;BA.debugLine="LogColor(\"If FLP.IsConnectctd and FLP.getLKL.I";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538338593",RemoteObject.concat(RemoteObject.createImmutable("If FLP.IsConnectctd and FLP.getLKL.IsInitialized --> "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 };
 BA.debugLineNum = 477;BA.debugLine="If todoBienFLP Then LogColor(\" +++ +++ Sin error";
Debug.ShouldStop(268435456);
if (_todobienflp.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538338596",BA.ObjectToString(" +++ +++ Sin errores en FLP"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));};
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e35) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e35.toString()); BA.debugLineNum = 479;BA.debugLine="LogColor(\"If Tracker.FLP.IsInitialized --> \"&Las";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538338598",RemoteObject.concat(RemoteObject.createImmutable("If Tracker.FLP.IsInitialized --> "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 482;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisamaxpromosprodsfijosporinventario(RemoteObject _ba,RemoteObject _pm) throws Exception{
try {
		Debug.PushSubsStack("revisaMaxPromosProdsFijosPorInventario (subs) ","subs",30,_ba,subs.mostCurrent,1381);
if (RapidSub.canDelegate("revisamaxpromosprodsfijosporinventario")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisamaxpromosprodsfijosporinventario", _ba, _pm);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _invfijoxpromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _t = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _invdispparapromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _prodsfijospiezas = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _idprodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
int _p = 0;
RemoteObject _x = null;
;
Debug.locals.put("pm", _pm);
 BA.debugLineNum = 1381;BA.debugLine="Sub revisaMaxPromosProdsFijosPorInventario(pm As M";
Debug.ShouldStop(16);
 BA.debugLineNum = 1382;BA.debugLine="Private thisLog As Boolean = False";
Debug.ShouldStop(32);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1383;BA.debugLine="Private invFijoXpromo As Map";
Debug.ShouldStop(64);
_invfijoxpromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("invFijoXpromo", _invfijoxpromo);
 BA.debugLineNum = 1384;BA.debugLine="Private t As List";
Debug.ShouldStop(128);
_t = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("t", _t);
 BA.debugLineNum = 1385;BA.debugLine="t.Initialize";
Debug.ShouldStop(256);
_t.runVoidMethod ("Initialize");
 BA.debugLineNum = 1386;BA.debugLine="t.Add(traeMaxPromos(pm)) ' Agregamos a la lista l";
Debug.ShouldStop(512);
_t.runVoidMethod ("Add",(Object)((_traemaxpromos(_ba,_pm))));
 BA.debugLineNum = 1387;BA.debugLine="invFijoXpromo.Initialize";
Debug.ShouldStop(1024);
_invfijoxpromo.runVoidMethod ("Initialize");
 BA.debugLineNum = 1388;BA.debugLine="If thisLog Then LogColor($\"pm=${pm}\"$, Colors.Blu";
Debug.ShouldStop(2048);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025543",(RemoteObject.concat(RemoteObject.createImmutable("pm="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pm.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1389;BA.debugLine="Private invDispParaPromo As Map = traemosInventar";
Debug.ShouldStop(4096);
_invdispparapromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_invdispparapromo = _traemosinventariodisponibleparapromo(_ba,BA.ObjectToString(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id"))))));Debug.locals.put("invDispParaPromo", _invdispparapromo);Debug.locals.put("invDispParaPromo", _invdispparapromo);
 BA.debugLineNum = 1390;BA.debugLine="If thisLog Then Log($\"invDispParaPromo=${invDispP";
Debug.ShouldStop(8192);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025545",(RemoteObject.concat(RemoteObject.createImmutable("invDispParaPromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1391;BA.debugLine="Private prodsFijosPiezas As List = pm.Get(\"prodsF";
Debug.ShouldStop(16384);
_prodsfijospiezas = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_prodsfijospiezas = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijosPiezas")))));Debug.locals.put("prodsFijosPiezas", _prodsfijospiezas);Debug.locals.put("prodsFijosPiezas", _prodsfijospiezas);
 BA.debugLineNum = 1392;BA.debugLine="Private idProdsFijos As List = pm.Get(\"prodsFijos";
Debug.ShouldStop(32768);
_idprodsfijos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_idprodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijos")))));Debug.locals.put("idProdsFijos", _idprodsfijos);Debug.locals.put("idProdsFijos", _idprodsfijos);
 BA.debugLineNum = 1393;BA.debugLine="For p = 0 To idProdsFijos.Size -1 'Generamos una";
Debug.ShouldStop(65536);
{
final int step12 = 1;
final int limit12 = RemoteObject.solve(new RemoteObject[] {_idprodsfijos.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step12 > 0 && _p <= limit12) || (step12 < 0 && _p >= limit12) ;_p = ((int)(0 + _p + step12))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 1394;BA.debugLine="If thisLog Then Log($\"id=${idProdsFijos.Get(p)},";
Debug.ShouldStop(131072);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025549",(RemoteObject.concat(RemoteObject.createImmutable("id="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))),RemoteObject.createImmutable(", inv="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_invdispparapromo.runMethod(false,"Get",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))))),RemoteObject.createImmutable(", pzas="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1395;BA.debugLine="If thisLog Then Log($\"${(invDispParaPromo.Get(id";
Debug.ShouldStop(262144);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025550",(RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _invdispparapromo.runMethod(false,"Get",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p)))))),BA.numberCast(double.class, _prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))}, "/",0, 0))))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1396;BA.debugLine="Private x() As String = Regex.Split(\"\\.\", $\"${(i";
Debug.ShouldStop(524288);
_x = subs.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString("\\.")),(Object)((RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _invdispparapromo.runMethod(false,"Get",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p)))))),BA.numberCast(double.class, _prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))))}, "/",0, 0))))),RemoteObject.createImmutable("")))));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1397;BA.debugLine="If thisLog Then Log(x(0))";
Debug.ShouldStop(1048576);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025552",_x.getArrayElement(true,BA.numberCast(int.class, 0)),0);};
 BA.debugLineNum = 1398;BA.debugLine="t.Add(x(0).As(Int)) 'Solo guardamos la parte del";
Debug.ShouldStop(2097152);
_t.runVoidMethod ("Add",(Object)(((BA.numberCast(int.class, _x.getArrayElement(true,BA.numberCast(int.class, 0)))))));
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1400;BA.debugLine="t.Sort(True) 'Ordenamos la lista para que en el l";
Debug.ShouldStop(8388608);
_t.runVoidMethod ("Sort",(Object)(subs.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 1401;BA.debugLine="If thisLog Then LogColor($\"prodsFijos=${idProdsFi";
Debug.ShouldStop(16777216);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025556",(RemoteObject.concat(RemoteObject.createImmutable("prodsFijos="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idprodsfijos.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1402;BA.debugLine="If thisLog Then LogColor($\"prodsFijosPiezasReq=${";
Debug.ShouldStop(33554432);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025557",(RemoteObject.concat(RemoteObject.createImmutable("prodsFijosPiezasReq="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodsfijospiezas.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1403;BA.debugLine="If thisLog Then LogColor($\"invFijoXpromo=${invFij";
Debug.ShouldStop(67108864);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541025558",(RemoteObject.concat(RemoteObject.createImmutable("invFijoXpromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invfijoxpromo.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1405;BA.debugLine="Return t.Get(0) 'Regresamos el resultado mas pequ";
Debug.ShouldStop(268435456);
if (true) return BA.numberCast(int.class, _t.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))));
 BA.debugLineNum = 1406;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisamaxpromosprodsfijosporinventario2(RemoteObject _ba,RemoteObject _pm) throws Exception{
try {
		Debug.PushSubsStack("revisaMaxPromosProdsFijosPorInventario2 (subs) ","subs",30,_ba,subs.mostCurrent,1338);
if (RapidSub.canDelegate("revisamaxpromosprodsfijosporinventario2")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisamaxpromosprodsfijosporinventario2", _ba, _pm);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _invdispparapromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _maxpromos = RemoteObject.createImmutable("");
RemoteObject _maxpromosfijosxinv = RemoteObject.createImmutable(0);
RemoteObject _fpf2 = RemoteObject.createImmutable(0);
RemoteObject _pdp2 = RemoteObject.createImmutable(0);
RemoteObject _salir = RemoteObject.createImmutable(false);
RemoteObject _pf = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _pfp = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _invfijoxpromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
int _p = 0;
int _i = 0;
int _q = 0;
RemoteObject _q2 = RemoteObject.createImmutable("");
;
Debug.locals.put("pm", _pm);
 BA.debugLineNum = 1338;BA.debugLine="Sub revisaMaxPromosProdsFijosPorInventario2(pm As";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 1339;BA.debugLine="Private thisLog As Boolean = False";
Debug.ShouldStop(67108864);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1340;BA.debugLine="If thisLog Then Log($\"pm=${pm}\"$)";
Debug.ShouldStop(134217728);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960002",(RemoteObject.concat(RemoteObject.createImmutable("pm="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pm.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1342;BA.debugLine="Private invDispParaPromo As Map = traemosInventar";
Debug.ShouldStop(536870912);
_invdispparapromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_invdispparapromo = _traemosinventariodisponibleparapromo(_ba,BA.ObjectToString(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id"))))));Debug.locals.put("invDispParaPromo", _invdispparapromo);Debug.locals.put("invDispParaPromo", _invdispparapromo);
 BA.debugLineNum = 1343;BA.debugLine="If thisLog Then Log($\"invDispParaPromo=${invDispP";
Debug.ShouldStop(1073741824);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960005",(RemoteObject.concat(RemoteObject.createImmutable("invDispParaPromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1344;BA.debugLine="Private maxPromos As String = traeMaxPromos(pm)";
Debug.ShouldStop(-2147483648);
_maxpromos = BA.NumberToString(_traemaxpromos(_ba,_pm));Debug.locals.put("maxPromos", _maxpromos);Debug.locals.put("maxPromos", _maxpromos);
 BA.debugLineNum = 1345;BA.debugLine="Private maxPromosFijosXinv As Int = 1";
Debug.ShouldStop(1);
_maxpromosfijosxinv = BA.numberCast(int.class, 1);Debug.locals.put("maxPromosFijosXinv", _maxpromosfijosxinv);Debug.locals.put("maxPromosFijosXinv", _maxpromosfijosxinv);
 BA.debugLineNum = 1346;BA.debugLine="Private fpf2, pdp2 As Int";
Debug.ShouldStop(2);
_fpf2 = RemoteObject.createImmutable(0);Debug.locals.put("fpf2", _fpf2);
_pdp2 = RemoteObject.createImmutable(0);Debug.locals.put("pdp2", _pdp2);
 BA.debugLineNum = 1347;BA.debugLine="Private salir As Boolean = False";
Debug.ShouldStop(4);
_salir = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("salir", _salir);Debug.locals.put("salir", _salir);
 BA.debugLineNum = 1348;BA.debugLine="Private pf As List = pm.Get(\"prodsFijos\")";
Debug.ShouldStop(8);
_pf = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_pf = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijos")))));Debug.locals.put("pf", _pf);Debug.locals.put("pf", _pf);
 BA.debugLineNum = 1349;BA.debugLine="Private pfp As List = pm.Get(\"prodsFijosPiezas\")";
Debug.ShouldStop(16);
_pfp = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_pfp = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijosPiezas")))));Debug.locals.put("pfp", _pfp);Debug.locals.put("pfp", _pfp);
 BA.debugLineNum = 1350;BA.debugLine="If thisLog Then Log($\"maxPromos=${maxPromos}, pro";
Debug.ShouldStop(32);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960012",(RemoteObject.concat(RemoteObject.createImmutable("maxPromos="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_maxpromos))),RemoteObject.createImmutable(", prodsFijos="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pf.getObject()))),RemoteObject.createImmutable(", piezas="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pfp.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1351;BA.debugLine="If thisLog Then LogColor($\"InvFijo disponible=${i";
Debug.ShouldStop(64);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960013",(RemoteObject.concat(RemoteObject.createImmutable("InvFijo disponible="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1352;BA.debugLine="Private invFijoXpromo As Map";
Debug.ShouldStop(128);
_invfijoxpromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("invFijoXpromo", _invfijoxpromo);
 BA.debugLineNum = 1353;BA.debugLine="invFijoXpromo.Initialize";
Debug.ShouldStop(256);
_invfijoxpromo.runVoidMethod ("Initialize");
 BA.debugLineNum = 1354;BA.debugLine="For p = 0 To pf.Size -1 'Generamos mapa con los p";
Debug.ShouldStop(512);
{
final int step15 = 1;
final int limit15 = RemoteObject.solve(new RemoteObject[] {_pf.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step15 > 0 && _p <= limit15) || (step15 < 0 && _p >= limit15) ;_p = ((int)(0 + _p + step15))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 1355;BA.debugLine="invFijoXpromo.Put(pf.Get(p), pfp.Get(p))";
Debug.ShouldStop(1024);
_invfijoxpromo.runVoidMethod ("Put",(Object)(_pf.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p)))),(Object)(_pfp.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p)))));
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1357;BA.debugLine="If thisLog Then LogColor(\"Inv req. de prods fijos";
Debug.ShouldStop(4096);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960019",RemoteObject.concat(RemoteObject.createImmutable("Inv req. de prods fijos x promo"),_invfijoxpromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));};
 BA.debugLineNum = 1358;BA.debugLine="For i = 1 To maxPromos 'Revisamos cuantas promoci";
Debug.ShouldStop(8192);
{
final int step19 = 1;
final int limit19 = (int)(Double.parseDouble(_maxpromos.<String>get()));
_i = 1 ;
for (;(step19 > 0 && _i <= limit19) || (step19 < 0 && _i >= limit19) ;_i = ((int)(0 + _i + step19))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1359;BA.debugLine="If thisLog Then LogColor(\"Prods para promo \" & (";
Debug.ShouldStop(16384);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960021",RemoteObject.concat(RemoteObject.createImmutable("Prods para promo "),(RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(1)}, "+",1, 1))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));};
 BA.debugLineNum = 1360;BA.debugLine="For q = 0 To pf.Size - 1";
Debug.ShouldStop(32768);
{
final int step21 = 1;
final int limit21 = RemoteObject.solve(new RemoteObject[] {_pf.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_q = 0 ;
for (;(step21 > 0 && _q <= limit21) || (step21 < 0 && _q >= limit21) ;_q = ((int)(0 + _q + step21))  ) {
Debug.locals.put("q", _q);
 BA.debugLineNum = 1361;BA.debugLine="Private q2 As String = pf.Get(q)";
Debug.ShouldStop(65536);
_q2 = BA.ObjectToString(_pf.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _q))));Debug.locals.put("q2", _q2);Debug.locals.put("q2", _q2);
 BA.debugLineNum = 1362;BA.debugLine="If thisLog Then Log(\"q=\"&q2)";
Debug.ShouldStop(131072);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960024",RemoteObject.concat(RemoteObject.createImmutable("q="),_q2),0);};
 BA.debugLineNum = 1364;BA.debugLine="fpf2 = pfp.Get(q) * i 'Multiplicamos las piezas";
Debug.ShouldStop(524288);
_fpf2 = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _pfp.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _q)))),RemoteObject.createImmutable(_i)}, "*",0, 0));Debug.locals.put("fpf2", _fpf2);
 BA.debugLineNum = 1365;BA.debugLine="pdp2 = invDispParaPromo.Get(q2)";
Debug.ShouldStop(1048576);
_pdp2 = BA.numberCast(int.class, _invdispparapromo.runMethod(false,"Get",(Object)((_q2))));Debug.locals.put("pdp2", _pdp2);
 BA.debugLineNum = 1366;BA.debugLine="If thisLog Then Log($\"pf=${q2}, Actual=${(i)},";
Debug.ShouldStop(2097152);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960028",(RemoteObject.concat(RemoteObject.createImmutable("pf="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_q2))),RemoteObject.createImmutable(", Actual="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(RemoteObject.createImmutable(((_i))))),RemoteObject.createImmutable(", max promos: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pdp2))),RemoteObject.createImmutable("-"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_fpf2))),RemoteObject.createImmutable("="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.solve(new RemoteObject[] {_pdp2,_fpf2}, "-",1, 1)))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1367;BA.debugLine="If pdp2 - fpf2 < 0 Then 'Si el inventario es ne";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("<",RemoteObject.solve(new RemoteObject[] {_pdp2,_fpf2}, "-",1, 1),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1368;BA.debugLine="salir=True";
Debug.ShouldStop(8388608);
_salir = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("salir", _salir);
 BA.debugLineNum = 1369;BA.debugLine="Exit";
Debug.ShouldStop(16777216);
if (true) break;
 };
 }
}Debug.locals.put("q", _q);
;
 BA.debugLineNum = 1372;BA.debugLine="If salir Then Exit";
Debug.ShouldStop(134217728);
if (_salir.<Boolean>get().booleanValue()) { 
if (true) break;};
 BA.debugLineNum = 1373;BA.debugLine="maxPromosFijosXinv = i";
Debug.ShouldStop(268435456);
_maxpromosfijosxinv = BA.numberCast(int.class, _i);Debug.locals.put("maxPromosFijosXinv", _maxpromosfijosxinv);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1375;BA.debugLine="If thisLog Then LogColor(\"InvFijo requerido x pro";
Debug.ShouldStop(1073741824);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960037",RemoteObject.concat(RemoteObject.createImmutable("InvFijo requerido x promo="),_invfijoxpromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1376;BA.debugLine="LogColor(\"Maximo de promociones de prodsFijos POR";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540960038",RemoteObject.concat(RemoteObject.createImmutable("Maximo de promociones de prodsFijos POR inventario = "),_maxpromosfijosxinv),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 1377;BA.debugLine="Return maxPromosFijosXinv";
Debug.ShouldStop(1);
if (true) return _maxpromosfijosxinv;
 BA.debugLineNum = 1378;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisamaxpromosprodsvariablesporinventario(RemoteObject _ba,RemoteObject _pm) throws Exception{
try {
		Debug.PushSubsStack("revisaMaxPromosProdsVariablesPorInventario (subs) ","subs",30,_ba,subs.mostCurrent,1413);
if (RapidSub.canDelegate("revisamaxpromosprodsvariablesporinventario")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisamaxpromosprodsvariablesporinventario", _ba, _pm);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _invfijoxpromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _totalprodsvariablesdisponibles = RemoteObject.createImmutable(0);
RemoteObject _totalprodsvariables2disponibles = RemoteObject.createImmutable(0);
RemoteObject _invdispparapromo = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _maxpromos = RemoteObject.createImmutable("");
RemoteObject _maxpromosxfijos = RemoteObject.createImmutable(0);
RemoteObject _idprodsvariables = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _idprodsvariables2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsvariablesrequeridos = RemoteObject.createImmutable(0);
RemoteObject _prodsvariables2requeridos = RemoteObject.createImmutable(0);
RemoteObject _prodsfijospiezas = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _idprodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
int _p = 0;
RemoteObject _idesteprod = RemoteObject.createImmutable("");
RemoteObject _investeprod = RemoteObject.createImmutable(0);
RemoteObject _pzasreqesteprod = RemoteObject.createImmutable(0);
RemoteObject _maxpromosxvariables = RemoteObject.createImmutable(0);
RemoteObject _maxpromosxvariables2 = RemoteObject.createImmutable(0);
int _x = 0;
int _i = 0;
;
Debug.locals.put("pm", _pm);
 BA.debugLineNum = 1413;BA.debugLine="Sub revisaMaxPromosProdsVariablesPorInventario(pm";
Debug.ShouldStop(16);
 BA.debugLineNum = 1414;BA.debugLine="Private thisLog As Boolean = False";
Debug.ShouldStop(32);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1415;BA.debugLine="If thisLog Then Log(\"============================";
Debug.ShouldStop(64);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091074",RemoteObject.createImmutable("======================================================"),0);};
 BA.debugLineNum = 1416;BA.debugLine="If thisLog Then Log(\"============================";
Debug.ShouldStop(128);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091075",RemoteObject.createImmutable("======================================================"),0);};
 BA.debugLineNum = 1417;BA.debugLine="Private invFijoXpromo As Map";
Debug.ShouldStop(256);
_invfijoxpromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("invFijoXpromo", _invfijoxpromo);
 BA.debugLineNum = 1418;BA.debugLine="invFijoXpromo.Initialize";
Debug.ShouldStop(512);
_invfijoxpromo.runVoidMethod ("Initialize");
 BA.debugLineNum = 1419;BA.debugLine="Private totalProdsVariablesDisponibles As Int = 0";
Debug.ShouldStop(1024);
_totalprodsvariablesdisponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);
 BA.debugLineNum = 1420;BA.debugLine="Private totalProdsVariables2Disponibles As Int =";
Debug.ShouldStop(2048);
_totalprodsvariables2disponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);
 BA.debugLineNum = 1421;BA.debugLine="If thisLog Then LogColor($\"pm=${pm}\"$, Colors.Blu";
Debug.ShouldStop(4096);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091080",(RemoteObject.concat(RemoteObject.createImmutable("pm="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pm.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1422;BA.debugLine="Private invDispParaPromo As Map = traemosInventar";
Debug.ShouldStop(8192);
_invdispparapromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_invdispparapromo = _traemosinventariodisponibleparapromo(_ba,BA.ObjectToString(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id"))))));Debug.locals.put("invDispParaPromo", _invdispparapromo);Debug.locals.put("invDispParaPromo", _invdispparapromo);
 BA.debugLineNum = 1423;BA.debugLine="If thisLog Then Log($\"invDispParaPromo=${invDispP";
Debug.ShouldStop(16384);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091082",(RemoteObject.concat(RemoteObject.createImmutable("invDispParaPromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1424;BA.debugLine="Private maxPromos As String = traeMaxPromos(pm)";
Debug.ShouldStop(32768);
_maxpromos = BA.NumberToString(_traemaxpromos(_ba,_pm));Debug.locals.put("maxPromos", _maxpromos);Debug.locals.put("maxPromos", _maxpromos);
 BA.debugLineNum = 1425;BA.debugLine="Private maxPromosXFijos As Int = revisaMaxPromosP";
Debug.ShouldStop(65536);
_maxpromosxfijos = _revisamaxpromosprodsfijosporinventario(_ba,_pm);Debug.locals.put("maxPromosXFijos", _maxpromosxfijos);Debug.locals.put("maxPromosXFijos", _maxpromosxfijos);
 BA.debugLineNum = 1426;BA.debugLine="Private idProdsVariables As List = pm.Get(\"prodsV";
Debug.ShouldStop(131072);
_idprodsvariables = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_idprodsvariables = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables")))));Debug.locals.put("idProdsVariables", _idprodsvariables);Debug.locals.put("idProdsVariables", _idprodsvariables);
 BA.debugLineNum = 1427;BA.debugLine="Private idProdsVariables2 As List = pm.Get(\"prods";
Debug.ShouldStop(262144);
_idprodsvariables2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_idprodsvariables2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2")))));Debug.locals.put("idProdsVariables2", _idprodsvariables2);Debug.locals.put("idProdsVariables2", _idprodsvariables2);
 BA.debugLineNum = 1428;BA.debugLine="Private prodsVariablesRequeridos As Int = pm.Get(";
Debug.ShouldStop(524288);
_prodsvariablesrequeridos = BA.numberCast(int.class, _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariablesRequeridos")))));Debug.locals.put("prodsVariablesRequeridos", _prodsvariablesrequeridos);Debug.locals.put("prodsVariablesRequeridos", _prodsvariablesrequeridos);
 BA.debugLineNum = 1429;BA.debugLine="Private prodsVariables2Requeridos As Int = pm.Get";
Debug.ShouldStop(1048576);
_prodsvariables2requeridos = BA.numberCast(int.class, _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2Requeridos")))));Debug.locals.put("prodsVariables2Requeridos", _prodsvariables2requeridos);Debug.locals.put("prodsVariables2Requeridos", _prodsvariables2requeridos);
 BA.debugLineNum = 1430;BA.debugLine="Private prodsFijosPiezas As List = pm.Get(\"prodsF";
Debug.ShouldStop(2097152);
_prodsfijospiezas = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_prodsfijospiezas = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijosPiezas")))));Debug.locals.put("prodsFijosPiezas", _prodsfijospiezas);Debug.locals.put("prodsFijosPiezas", _prodsfijospiezas);
 BA.debugLineNum = 1431;BA.debugLine="Private idProdsFijos As List = pm.Get(\"prodsFijos";
Debug.ShouldStop(4194304);
_idprodsfijos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_idprodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsFijos")))));Debug.locals.put("idProdsFijos", _idprodsfijos);Debug.locals.put("idProdsFijos", _idprodsfijos);
 BA.debugLineNum = 1432;BA.debugLine="For p = 0 To idProdsFijos.Size -1 'Generamos mapa";
Debug.ShouldStop(8388608);
{
final int step19 = 1;
final int limit19 = RemoteObject.solve(new RemoteObject[] {_idprodsfijos.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step19 > 0 && _p <= limit19) || (step19 < 0 && _p >= limit19) ;_p = ((int)(0 + _p + step19))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 1433;BA.debugLine="invFijoXpromo.Put(idProdsFijos.Get(p), prodsFijo";
Debug.ShouldStop(16777216);
_invfijoxpromo.runVoidMethod ("Put",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p)))),(Object)(_prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p)))));
 BA.debugLineNum = 1434;BA.debugLine="Private idEsteProd As String = idProdsFijos.Get(";
Debug.ShouldStop(33554432);
_idesteprod = BA.ObjectToString(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("idEsteProd", _idesteprod);Debug.locals.put("idEsteProd", _idesteprod);
 BA.debugLineNum = 1435;BA.debugLine="Private invEsteProd As Int = invDispParaPromo.Ge";
Debug.ShouldStop(67108864);
_investeprod = BA.numberCast(int.class, _invdispparapromo.runMethod(false,"Get",(Object)((_idesteprod))));Debug.locals.put("invEsteProd", _investeprod);Debug.locals.put("invEsteProd", _investeprod);
 BA.debugLineNum = 1436;BA.debugLine="Private pzasReqEsteProd As Int = prodsFijosPieza";
Debug.ShouldStop(134217728);
_pzasreqesteprod = BA.numberCast(int.class, _prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("pzasReqEsteProd", _pzasreqesteprod);Debug.locals.put("pzasReqEsteProd", _pzasreqesteprod);
 BA.debugLineNum = 1437;BA.debugLine="If thisLog Then Log($\"id=${idEsteProd}, inv=${in";
Debug.ShouldStop(268435456);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091096",(RemoteObject.concat(RemoteObject.createImmutable("id="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idesteprod))),RemoteObject.createImmutable(", inv="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_investeprod))),RemoteObject.createImmutable(", pzas="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pzasreqesteprod))),RemoteObject.createImmutable(""))),0);};
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1440;BA.debugLine="If thisLog Then LogColor($\"MaxPromos=${maxPromos}";
Debug.ShouldStop(-2147483648);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091099",(RemoteObject.concat(RemoteObject.createImmutable("MaxPromos="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_maxpromos))),RemoteObject.createImmutable(", promosXFijos="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_maxpromosxfijos))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1441;BA.debugLine="If thisLog Then LogColor($\"prodsFijos=${idProdsFi";
Debug.ShouldStop(1);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091100",(RemoteObject.concat(RemoteObject.createImmutable("prodsFijos="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idprodsfijos.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1442;BA.debugLine="If thisLog Then LogColor($\"prodsFijosPiezasReq=${";
Debug.ShouldStop(2);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091101",(RemoteObject.concat(RemoteObject.createImmutable("prodsFijosPiezasReq="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodsfijospiezas.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1443;BA.debugLine="If thisLog Then LogColor($\"prodsVariables=${idPro";
Debug.ShouldStop(4);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091102",(RemoteObject.concat(RemoteObject.createImmutable("prodsVariables="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idprodsvariables.getObject()))),RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Variables Req="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodsvariablesrequeridos))),RemoteObject.createImmutable(" "))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1444;BA.debugLine="If thisLog Then LogColor($\"prodsVariables2=${idPr";
Debug.ShouldStop(8);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091103",(RemoteObject.concat(RemoteObject.createImmutable("prodsVariables2="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idprodsvariables2.getObject()))),RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Variables2 Req="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodsvariables2requeridos))),RemoteObject.createImmutable(" "))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1445;BA.debugLine="If thisLog Then LogColor($\"invFijoXpromo=${invFij";
Debug.ShouldStop(16);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091104",(RemoteObject.concat(RemoteObject.createImmutable("invFijoXpromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invfijoxpromo.getObject()))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1446;BA.debugLine="If thisLog Then Log($\"Prods variables disponibles";
Debug.ShouldStop(32);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091105",(RemoteObject.concat(RemoteObject.createImmutable("Prods variables disponibles = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalprodsvariablesdisponibles))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1447;BA.debugLine="If thisLog Then Log($\"Prods variables2 disponible";
Debug.ShouldStop(64);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091106",(RemoteObject.concat(RemoteObject.createImmutable("Prods variables2 disponibles = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalprodsvariables2disponibles))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1448;BA.debugLine="Private maxPromosXVariables As Int = 0";
Debug.ShouldStop(128);
_maxpromosxvariables = BA.numberCast(int.class, 0);Debug.locals.put("maxPromosXVariables", _maxpromosxvariables);Debug.locals.put("maxPromosXVariables", _maxpromosxvariables);
 BA.debugLineNum = 1449;BA.debugLine="Private maxPromosXVariables2 As Int = 0";
Debug.ShouldStop(256);
_maxpromosxvariables2 = BA.numberCast(int.class, 0);Debug.locals.put("maxPromosXVariables2", _maxpromosxvariables2);Debug.locals.put("maxPromosXVariables2", _maxpromosxvariables2);
 BA.debugLineNum = 1450;BA.debugLine="For x = 1 To maxPromosXFijos";
Debug.ShouldStop(512);
{
final int step36 = 1;
final int limit36 = _maxpromosxfijos.<Integer>get().intValue();
_x = 1 ;
for (;(step36 > 0 && _x <= limit36) || (step36 < 0 && _x >= limit36) ;_x = ((int)(0 + _x + step36))  ) {
Debug.locals.put("x", _x);
 BA.debugLineNum = 1451;BA.debugLine="If thisLog Then Log(\"===========================";
Debug.ShouldStop(1024);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091110",RemoteObject.createImmutable("====================================================="),0);};
 BA.debugLineNum = 1452;BA.debugLine="If thisLog Then Log(\"===========================";
Debug.ShouldStop(2048);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091111",RemoteObject.createImmutable("====================================================="),0);};
 BA.debugLineNum = 1453;BA.debugLine="For i = 0 To idProdsFijos.Size - 1";
Debug.ShouldStop(4096);
{
final int step39 = 1;
final int limit39 = RemoteObject.solve(new RemoteObject[] {_idprodsfijos.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step39 > 0 && _i <= limit39) || (step39 < 0 && _i >= limit39) ;_i = ((int)(0 + _i + step39))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1454;BA.debugLine="If thisLog Then Log($\"FIJO - ${idProdsFijos.Get";
Debug.ShouldStop(8192);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091113",(RemoteObject.concat(RemoteObject.createImmutable("FIJO - "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))),RemoteObject.createImmutable(", "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_invdispparapromo.runMethod(false,"Get",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))))),RemoteObject.createImmutable(" - "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.solve(new RemoteObject[] {(BA.numberCast(int.class, _prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))),(RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(1)}, "+",1, 1))}, "*",0, 1)))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1455;BA.debugLine="invDispParaPromo.Put(idProdsFijos.Get(i), invDi";
Debug.ShouldStop(16384);
_invdispparapromo.runVoidMethod ("Put",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i)))),(Object)((RemoteObject.solve(new RemoteObject[] {(BA.numberCast(int.class, _invdispparapromo.runMethod(false,"Get",(Object)(_idprodsfijos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))))),(BA.numberCast(int.class, _prodsfijospiezas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))),(RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(1)}, "+",1, 1))}, "-*",1, 1))));
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1457;BA.debugLine="If thisLog Then LogColor(\"Inv disponible despues";
Debug.ShouldStop(65536);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091116",RemoteObject.concat(RemoteObject.createImmutable("Inv disponible despues de restar fijos = "),_invdispparapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1459;BA.debugLine="totalProdsVariablesDisponibles = 0";
Debug.ShouldStop(262144);
_totalprodsvariablesdisponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);
 BA.debugLineNum = 1460;BA.debugLine="totalProdsVariables2Disponibles = 0";
Debug.ShouldStop(524288);
_totalprodsvariables2disponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);
 BA.debugLineNum = 1461;BA.debugLine="For i = 0 To idProdsVariables.Size - 1 'Obtenemo";
Debug.ShouldStop(1048576);
{
final int step46 = 1;
final int limit46 = RemoteObject.solve(new RemoteObject[] {_idprodsvariables.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step46 > 0 && _i <= limit46) || (step46 < 0 && _i >= limit46) ;_i = ((int)(0 + _i + step46))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1462;BA.debugLine="If invDispParaPromo.ContainsKey(idProdsVariable";
Debug.ShouldStop(2097152);
if (_invdispparapromo.runMethod(true,"ContainsKey",(Object)(_idprodsvariables.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1463;BA.debugLine="totalProdsVariablesDisponibles = totalProdsVar";
Debug.ShouldStop(4194304);
_totalprodsvariablesdisponibles = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalprodsvariablesdisponibles,BA.numberCast(double.class, _invdispparapromo.runMethod(false,"Get",(Object)(_idprodsvariables.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))))}, "+",1, 0));Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);
 };
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1466;BA.debugLine="For i = 0 To idProdsVariables2.Size - 1 'Obtenem";
Debug.ShouldStop(33554432);
{
final int step51 = 1;
final int limit51 = RemoteObject.solve(new RemoteObject[] {_idprodsvariables2.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step51 > 0 && _i <= limit51) || (step51 < 0 && _i >= limit51) ;_i = ((int)(0 + _i + step51))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1467;BA.debugLine="If invDispParaPromo.ContainsKey(idProdsVariable";
Debug.ShouldStop(67108864);
if (_invdispparapromo.runMethod(true,"ContainsKey",(Object)(_idprodsvariables2.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1468;BA.debugLine="totalProdsVariables2Disponibles = totalProdsVa";
Debug.ShouldStop(134217728);
_totalprodsvariables2disponibles = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalprodsvariables2disponibles,BA.numberCast(double.class, _invdispparapromo.runMethod(false,"Get",(Object)(_idprodsvariables2.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))))}, "+",1, 0));Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);
 };
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1472;BA.debugLine="If thisLog Then Log($\"Var disponibles -  var req";
Debug.ShouldStop(-2147483648);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091131",(RemoteObject.concat(RemoteObject.createImmutable("Var disponibles -  var requeridos : "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalprodsvariablesdisponibles))),RemoteObject.createImmutable(" - "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.solve(new RemoteObject[] {_prodsvariablesrequeridos,RemoteObject.createImmutable(_x)}, "*",0, 1)))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1473;BA.debugLine="totalProdsVariablesDisponibles = totalProdsVaria";
Debug.ShouldStop(1);
_totalprodsvariablesdisponibles = RemoteObject.solve(new RemoteObject[] {_totalprodsvariablesdisponibles,(RemoteObject.solve(new RemoteObject[] {_prodsvariablesrequeridos,RemoteObject.createImmutable(_x)}, "*",0, 1))}, "-",1, 1);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);
 BA.debugLineNum = 1474;BA.debugLine="totalProdsVariables2Disponibles = totalProdsVari";
Debug.ShouldStop(2);
_totalprodsvariables2disponibles = RemoteObject.solve(new RemoteObject[] {_totalprodsvariables2disponibles,(RemoteObject.solve(new RemoteObject[] {_prodsvariables2requeridos,RemoteObject.createImmutable(_x)}, "*",0, 1))}, "-",1, 1);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);
 BA.debugLineNum = 1475;BA.debugLine="If thisLog Then Log(\"prodsVariables disponibles";
Debug.ShouldStop(4);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091134",RemoteObject.concat(RemoteObject.createImmutable("prodsVariables disponibles despues de promo = "),_totalprodsvariablesdisponibles),0);};
 BA.debugLineNum = 1476;BA.debugLine="If thisLog Then Log(\"prodsVariables2 disponibles";
Debug.ShouldStop(8);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091135",RemoteObject.concat(RemoteObject.createImmutable("prodsVariables2 disponibles despues de promo = "),_totalprodsvariables2disponibles),0);};
 BA.debugLineNum = 1477;BA.debugLine="If totalProdsVariablesDisponibles < 0 Then Exit";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("<",_totalprodsvariablesdisponibles,BA.numberCast(double.class, 0))) { 
if (true) break;};
 BA.debugLineNum = 1478;BA.debugLine="If totalProdsVariables2Disponibles < 0 Then Exit";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean("<",_totalprodsvariables2disponibles,BA.numberCast(double.class, 0))) { 
if (true) break;};
 BA.debugLineNum = 1479;BA.debugLine="maxPromosXVariables = x";
Debug.ShouldStop(64);
_maxpromosxvariables = BA.numberCast(int.class, _x);Debug.locals.put("maxPromosXVariables", _maxpromosxvariables);
 }
}Debug.locals.put("x", _x);
;
 BA.debugLineNum = 1482;BA.debugLine="If thisLog Then LogColor(\"Max promos de prodsVari";
Debug.ShouldStop(512);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541091141",RemoteObject.concat(RemoteObject.createImmutable("Max promos de prodsVariables POR inventario = "),_maxpromosxvariables),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 1483;BA.debugLine="Return maxPromosXVariables";
Debug.ShouldStop(1024);
if (true) return _maxpromosxvariables;
 BA.debugLineNum = 1484;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisauug(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("revisaUUG (subs) ","subs",30,_ba,subs.mostCurrent,423);
if (RapidSub.canDelegate("revisauug")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisauug", _ba);}
RemoteObject _daa = RemoteObject.createImmutable(0);
;
 BA.debugLineNum = 423;BA.debugLine="Sub revisaUUG 'ignore";
Debug.ShouldStop(64);
 BA.debugLineNum = 424;BA.debugLine="Try";
Debug.ShouldStop(128);
try { BA.debugLineNum = 426;BA.debugLine="If Tracker.FLP.GetLastKnownLocation.IsInitialize";
Debug.ShouldStop(512);
if (subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 427;BA.debugLine="Dim daa As Int = Tracker.UUGCoords.DistanceTo(T";
Debug.ShouldStop(1024);
_daa = BA.numberCast(int.class, subs.mostCurrent._tracker._uugcoords /*RemoteObject*/ .runMethod(true,"DistanceTo",(Object)((subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").getObject()))));Debug.locals.put("daa", _daa);Debug.locals.put("daa", _daa);
 BA.debugLineNum = 428;BA.debugLine="If Starter.Logger Then LogColor($\"**** UUC \"${f";
Debug.ShouldStop(2048);
if (subs.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538273029",(RemoteObject.concat(RemoteObject.createImmutable("**** UUC \""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_fechakmt(_ba,BA.NumberToString(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getTime")))))),RemoteObject.createImmutable("|"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.2")),(Object)((subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy")))),RemoteObject.createImmutable("|"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.8")),(Object)((subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getLatitude")))),RemoteObject.createImmutable("|"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.8")),(Object)((subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getLongitude")))),RemoteObject.createImmutable("|"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.2")),(Object)((subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getSpeed")))),RemoteObject.createImmutable("|"))),subs.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 255)),(Object)(BA.numberCast(int.class, 112)),(Object)(BA.numberCast(int.class, 35))));};
 BA.debugLineNum = 429;BA.debugLine="If daa > 40 And Tracker.FLP.GetLastKnownLocatio";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(">",_daa,BA.numberCast(double.class, 40)) && RemoteObject.solveBoolean("<",subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy"),BA.numberCast(double.class, 35))) { 
 BA.debugLineNum = 430;BA.debugLine="kmt.ExecNonQuery2(\"INSERT INTO RUTA_GPS(fecha,";
Debug.ShouldStop(8192);
subs._kmt.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO RUTA_GPS(fecha, lat, lon) VALUES (?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(_fechakmt(_ba,BA.NumberToString(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getTime")))),(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getLatitude")),(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getLongitude"))})))));
 BA.debugLineNum = 431;BA.debugLine="If Starter.Logger Then Log(\"++++ Distancia a a";
Debug.ShouldStop(16384);
if (subs.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538273032",RemoteObject.concat(RemoteObject.createImmutable("++++ Distancia a anterior="),_daa,RemoteObject.createImmutable("|"),RemoteObject.createImmutable("Precision="),subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy")),0);};
 };
 BA.debugLineNum = 433;BA.debugLine="Tracker.UUGCoords = Tracker.FLP.GetLastKnownLoc";
Debug.ShouldStop(65536);
subs.mostCurrent._tracker._uugcoords /*RemoteObject*/  = subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation");
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e12) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e12.toString()); BA.debugLineNum = 436;BA.debugLine="LogColor(\"If Tracker.FLP.GetLastKnownLocation.Is";
Debug.ShouldStop(524288);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","538273037",RemoteObject.concat(RemoteObject.createImmutable("If Tracker.FLP.GetLastKnownLocation.IsInitialized --> "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 438;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _sincronizartotalesencabezado(RemoteObject _ba,RemoteObject _idclie,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _cedis) throws Exception{
try {
		Debug.PushSubsStack("SincronizarTotalesEncabezado (subs) ","subs",30,_ba,subs.mostCurrent,1859);
if (RapidSub.canDelegate("sincronizartotalesencabezado")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","sincronizartotalesencabezado", _ba, _idclie, _fecha, _usuario, _cedis);}
RemoteObject _res = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("idClie", _idclie);
Debug.locals.put("fecha", _fecha);
Debug.locals.put("usuario", _usuario);
Debug.locals.put("cedis", _cedis);
 BA.debugLineNum = 1859;BA.debugLine="Private Sub SincronizarTotalesEncabezado(idClie As";
Debug.ShouldStop(4);
 BA.debugLineNum = 1861;BA.debugLine="Dim res As Cursor = B4XPages.MainPage.skmt.ExecQu";
Debug.ShouldStop(16);
_res = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_res = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("SELECT SUM(pe_costo_tot) as TOTAL, SUM(PE_CANT) as CANT FROM PEDIDO WHERE PE_CLIENTE = '"),_idclie,RemoteObject.createImmutable("'")))));Debug.locals.put("res", _res);Debug.locals.put("res", _res);
 BA.debugLineNum = 1862;BA.debugLine="res.Position = 0";
Debug.ShouldStop(32);
_res.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1865;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
Debug.ShouldStop(256);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("DELETE FROM pedido_cliente WHERE PC_CLIENTE = '"),_idclie,RemoteObject.createImmutable("'"))));
 BA.debugLineNum = 1867;BA.debugLine="If res.GetInt(\"CANT\") > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",_res.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("CANT"))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1869;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(4096);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO, PC_LON, PC_LAT, PC_ALMACEN) VALUES (?,?,?,?,?,?,?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {8},new Object[] {(_idclie),(_fecha),(_usuario),(_res.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT")))),(_res.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL")))),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lon_gps" /*RemoteObject*/ )),(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_lat_gps" /*RemoteObject*/ )),(_cedis)})))));
 };
 BA.debugLineNum = 1872;BA.debugLine="res.Close";
Debug.ShouldStop(32768);
_res.runVoidMethod ("Close");
 BA.debugLineNum = 1873;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _totalpedido(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("totalPedido (subs) ","subs",30,_ba,subs.mostCurrent,737);
if (RapidSub.canDelegate("totalpedido")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","totalpedido", _ba);}
RemoteObject _ct = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _ptotal = RemoteObject.createImmutable("");
RemoteObject _tempt = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 737;BA.debugLine="Sub totalPedido As String";
Debug.ShouldStop(1);
 BA.debugLineNum = 738;BA.debugLine="Private cT As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(2);
_ct = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_ct = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select sum(PE_COSTO_TOT) as total from PEDIDO where PE_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'"))))));Debug.locals.put("cT", _ct);Debug.locals.put("cT", _ct);
 BA.debugLineNum = 739;BA.debugLine="Private pTotal As String = \"0\"";
Debug.ShouldStop(4);
_ptotal = BA.ObjectToString("0");Debug.locals.put("pTotal", _ptotal);Debug.locals.put("pTotal", _ptotal);
 BA.debugLineNum = 740;BA.debugLine="If cT.RowCount > 0 Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean(">",_ct.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 741;BA.debugLine="cT.Position = 0";
Debug.ShouldStop(16);
_ct.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 743;BA.debugLine="Private tempT As String = cT.GetLong(\"total\")";
Debug.ShouldStop(64);
_tempt = BA.NumberToString(_ct.runMethod(true,"GetLong",(Object)(RemoteObject.createImmutable("total"))));Debug.locals.put("tempT", _tempt);Debug.locals.put("tempT", _tempt);
 BA.debugLineNum = 744;BA.debugLine="If tempT <> \"null\" And tempT <> Null Then";
Debug.ShouldStop(128);
if (RemoteObject.solveBoolean("!",_tempt,BA.ObjectToString("null")) && RemoteObject.solveBoolean("N",_tempt)) { 
 BA.debugLineNum = 746;BA.debugLine="pTotal = tempT";
Debug.ShouldStop(512);
_ptotal = _tempt;Debug.locals.put("pTotal", _ptotal);
 };
 };
 BA.debugLineNum = 750;BA.debugLine="cT.Close";
Debug.ShouldStop(8192);
_ct.runVoidMethod ("Close");
 BA.debugLineNum = 751;BA.debugLine="Return pTotal";
Debug.ShouldStop(16384);
if (true) return _ptotal;
 BA.debugLineNum = 752;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traealmacen(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeAlmacen (subs) ","subs",30,_ba,subs.mostCurrent,709);
if (RapidSub.canDelegate("traealmacen")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traealmacen", _ba);}
RemoteObject _c2 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _b = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 709;BA.debugLine="Sub traeAlmacen As String 'ignore";
Debug.ShouldStop(16);
 BA.debugLineNum = 710;BA.debugLine="Private c2 As Cursor";
Debug.ShouldStop(32);
_c2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c2", _c2);
 BA.debugLineNum = 711;BA.debugLine="Private b As String";
Debug.ShouldStop(64);
_b = RemoteObject.createImmutable("");Debug.locals.put("b", _b);
 BA.debugLineNum = 712;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery(\"select ID_AL";
Debug.ShouldStop(128);
_c2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select ID_ALMACEN from CAT_ALMACEN"))));Debug.locals.put("c2", _c2);
 BA.debugLineNum = 713;BA.debugLine="Log(c2.RowCount)";
Debug.ShouldStop(256);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539321604",BA.NumberToString(_c2.runMethod(true,"getRowCount")),0);
 BA.debugLineNum = 714;BA.debugLine="c2.Position = 0";
Debug.ShouldStop(512);
_c2.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 715;BA.debugLine="b = c2.GetString(\"ID_ALMACEN\")";
Debug.ShouldStop(1024);
_b = _c2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("ID_ALMACEN")));Debug.locals.put("b", _b);
 BA.debugLineNum = 716;BA.debugLine="Log(\"Esto es almacen !!!!!!! \" &c2.GetString(\"ID_";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","539321607",RemoteObject.concat(RemoteObject.createImmutable("Esto es almacen !!!!!!! "),_c2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("ID_ALMACEN"))),RemoteObject.createImmutable(" Esto es almacen !!!!!!!")),0);
 BA.debugLineNum = 717;BA.debugLine="Return b";
Debug.ShouldStop(4096);
if (true) return _b;
 BA.debugLineNum = 718;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traecliente(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeCliente (subs) ","subs",30,_ba,subs.mostCurrent,782);
if (RapidSub.canDelegate("traecliente")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traecliente", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _cl = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 782;BA.debugLine="Sub traeCliente As String 'ignore";
Debug.ShouldStop(8192);
 BA.debugLineNum = 783;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(16384);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 784;BA.debugLine="Private cl As String";
Debug.ShouldStop(32768);
_cl = RemoteObject.createImmutable("");Debug.locals.put("cl", _cl);
 BA.debugLineNum = 785;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENTA";
Debug.ShouldStop(65536);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 786;BA.debugLine="c.Position=0";
Debug.ShouldStop(131072);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 787;BA.debugLine="cl = c.GetString(\"CUENTA\")";
Debug.ShouldStop(262144);
_cl = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA")));Debug.locals.put("cl", _cl);
 BA.debugLineNum = 788;BA.debugLine="c.Close";
Debug.ShouldStop(524288);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 789;BA.debugLine="Return cl";
Debug.ShouldStop(1048576);
if (true) return _cl;
 BA.debugLineNum = 790;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traefecha(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeFecha (subs) ","subs",30,_ba,subs.mostCurrent,792);
if (RapidSub.canDelegate("traefecha")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traefecha", _ba);}
RemoteObject _sdate = RemoteObject.createImmutable("");
RemoteObject _stime = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 792;BA.debugLine="Sub traeFecha As String 'ignore";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 793;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 794;BA.debugLine="Private sDate As String =DateTime.Date(DateTime.N";
Debug.ShouldStop(33554432);
_sdate = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sDate", _sdate);Debug.locals.put("sDate", _sdate);
 BA.debugLineNum = 795;BA.debugLine="Private sTime As String =DateTime.Time(DateTime.N";
Debug.ShouldStop(67108864);
_stime = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sTime", _stime);Debug.locals.put("sTime", _stime);
 BA.debugLineNum = 796;BA.debugLine="Return sDate & sTime";
Debug.ShouldStop(134217728);
if (true) return RemoteObject.concat(_sdate,_stime);
 BA.debugLineNum = 797;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeinventario(RemoteObject _ba,RemoteObject _id) throws Exception{
try {
		Debug.PushSubsStack("traeinventario (subs) ","subs",30,_ba,subs.mostCurrent,1710);
if (RapidSub.canDelegate("traeinventario")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeinventario", _ba, _id);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _inventario = RemoteObject.createImmutable("");
;
Debug.locals.put("id", _id);
 BA.debugLineNum = 1710;BA.debugLine="Sub traeinventario(id As String) As String";
Debug.ShouldStop(8192);
 BA.debugLineNum = 1711;BA.debugLine="Dim c As Cursor";
Debug.ShouldStop(16384);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1712;BA.debugLine="Dim inventario As String = \"0\"";
Debug.ShouldStop(32768);
_inventario = BA.ObjectToString("0");Debug.locals.put("inventario", _inventario);Debug.locals.put("inventario", _inventario);
 BA.debugLineNum = 1713;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_G";
Debug.ShouldStop(65536);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_GP_ALMACEN from "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" where CAT_GP_ID = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_id))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1715;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1716;BA.debugLine="c.Position = 0";
Debug.ShouldStop(524288);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1717;BA.debugLine="inventario = c.GetString(\"CAT_GP_ALMACEN\")";
Debug.ShouldStop(1048576);
_inventario = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN")));Debug.locals.put("inventario", _inventario);
 };
 BA.debugLineNum = 1719;BA.debugLine="c.Close";
Debug.ShouldStop(4194304);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1720;BA.debugLine="Return inventario";
Debug.ShouldStop(8388608);
if (true) return _inventario;
 BA.debugLineNum = 1721;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traemaxpromos(RemoteObject _ba,RemoteObject _pm) throws Exception{
try {
		Debug.PushSubsStack("traeMaxPromos (subs) ","subs",30,_ba,subs.mostCurrent,1207);
if (RapidSub.canDelegate("traemaxpromos")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traemaxpromos", _ba, _pm);}
RemoteObject _thislog = RemoteObject.createImmutable(false);
RemoteObject _maxpromos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _vendidas = RemoteObject.createImmutable(0);
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("pm", _pm);
 BA.debugLineNum = 1207;BA.debugLine="Sub traeMaxPromos(pm As Map) As Int";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 1264;BA.debugLine="Private thisLog As Boolean = False 'Si es verdade";
Debug.ShouldStop(32768);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1265;BA.debugLine="Private maxPromos As List";
Debug.ShouldStop(65536);
_maxpromos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("maxPromos", _maxpromos);
 BA.debugLineNum = 1266;BA.debugLine="Private vendidas As Int = 0";
Debug.ShouldStop(131072);
_vendidas = BA.numberCast(int.class, 0);Debug.locals.put("vendidas", _vendidas);Debug.locals.put("vendidas", _vendidas);
 BA.debugLineNum = 1267;BA.debugLine="maxPromos.Initialize";
Debug.ShouldStop(262144);
_maxpromos.runVoidMethod ("Initialize");
 BA.debugLineNum = 1269;BA.debugLine="If thisLog Then Log(pm)";
Debug.ShouldStop(1048576);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540763454",BA.ObjectToString(_pm),0);};
 BA.debugLineNum = 1270;BA.debugLine="If pm.Get(\"historico\") = \"1\" Then maxPromos.Add(p";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean("=",_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("historico")))),RemoteObject.createImmutable(("1")))) { 
_maxpromos.runVoidMethod ("Add",(Object)(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("maxRecurrente"))))));};
 BA.debugLineNum = 1271;BA.debugLine="maxPromos.Add(pm.Get(\"maxPromos\")) 'Agregamos max";
Debug.ShouldStop(4194304);
_maxpromos.runVoidMethod ("Add",(Object)(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("maxPromos"))))));
 BA.debugLineNum = 1272;BA.debugLine="maxPromos.Add(pm.Get(\"maxXcliente\")) 'Agregamos m";
Debug.ShouldStop(8388608);
_maxpromos.runVoidMethod ("Add",(Object)(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("maxXcliente"))))));
 BA.debugLineNum = 1273;BA.debugLine="maxPromos.Sort(True)";
Debug.ShouldStop(16777216);
_maxpromos.runVoidMethod ("Sort",(Object)(subs.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 1276;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(134217728);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select sum(PE_CANT) as vendidas from PEDIDO where PE_PROID = ? and PE_CLIENTE = ? ")),(Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {(BA.ObjectToString(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id")))))).runMethod(true,"trim"),_traecliente(_ba).runMethod(true,"trim")}))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1277;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1278;BA.debugLine="c.Position = 0";
Debug.ShouldStop(536870912);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1279;BA.debugLine="vendidas = c.GetInt(\"vendidas\")";
Debug.ShouldStop(1073741824);
_vendidas = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("vendidas")));Debug.locals.put("vendidas", _vendidas);
 };
 BA.debugLineNum = 1286;BA.debugLine="Return maxPromos.Get(0) - vendidas 'Regresamos el";
Debug.ShouldStop(32);
if (true) return BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _maxpromos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0)))),_vendidas}, "-",1, 0));
 BA.debugLineNum = 1288;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traemosinventariodisponibleparapromo(RemoteObject _ba,RemoteObject _promo) throws Exception{
try {
		Debug.PushSubsStack("traemosInventarioDisponibleParaPromo (subs) ","subs",30,_ba,subs.mostCurrent,1094);
if (RapidSub.canDelegate("traemosinventariodisponibleparapromo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traemosinventariodisponibleparapromo", _ba, _promo);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _prods = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
int _i = 0;
;
Debug.locals.put("promo", _promo);
 BA.debugLineNum = 1094;BA.debugLine="Sub traemosInventarioDisponibleParaPromo(promo As";
Debug.ShouldStop(32);
 BA.debugLineNum = 1095;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(64);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1096;BA.debugLine="Log(\"ESTAMOS VIENDO INVENTARIO\")";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","540566786",RemoteObject.createImmutable("ESTAMOS VIENDO INVENTARIO"),0);
 BA.debugLineNum = 1097;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery2($\"SELECT CA";
Debug.ShouldStop(256);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("SELECT CAT_GP_ID, CAT_GP_ALMACEN FROM "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" WHERE CAT_GP_ID IN (select CAT_DP_IDPROD FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID = ?)")))),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {_promo}))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1100;BA.debugLine="Private prods As Map";
Debug.ShouldStop(2048);
_prods = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("prods", _prods);
 BA.debugLineNum = 1101;BA.debugLine="prods.Initialize";
Debug.ShouldStop(4096);
_prods.runVoidMethod ("Initialize");
 BA.debugLineNum = 1102;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1104;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(32768);
{
final int step7 = 1;
final int limit7 = RemoteObject.solve(new RemoteObject[] {_c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step7 > 0 && _i <= limit7) || (step7 < 0 && _i >= limit7) ;_i = ((int)(0 + _i + step7))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1105;BA.debugLine="c.Position=i";
Debug.ShouldStop(65536);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 1106;BA.debugLine="prods.Put(c.GetString(\"CAT_GP_ID\"), c.GetString";
Debug.ShouldStop(131072);
_prods.runVoidMethod ("Put",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID"))))),(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN"))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 1111;BA.debugLine="Return prods";
Debug.ShouldStop(4194304);
if (true) return _prods;
 BA.debugLineNum = 1112;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeprodiddebd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeProdIdDeBD (subs) ","subs",30,_ba,subs.mostCurrent,1502);
if (RapidSub.canDelegate("traeprodiddebd")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeprodiddebd", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
;
 BA.debugLineNum = 1502;BA.debugLine="Sub traeProdIdDeBD As Map 'ignore";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 1503;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(1073741824);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1504;BA.debugLine="Private m As Map";
Debug.ShouldStop(-2147483648);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 1505;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_G";
Debug.ShouldStop(1);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_TIPO,CAT_GP_SUBTIPO  from "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" where CAT_GP_NOMBRE In (Select PDESC from PROID)"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1506;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1507;BA.debugLine="c.Position = 0";
Debug.ShouldStop(4);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1508;BA.debugLine="m = CreateMap(\"id\":c.GetString(\"CAT_GP_ID\"), \"no";
Debug.ShouldStop(8);
_m = subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("id")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))),RemoteObject.createImmutable(("nombre")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))),RemoteObject.createImmutable(("tipo")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_TIPO")))),RemoteObject.createImmutable(("subtipo")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_SUBTIPO"))))}));Debug.locals.put("m", _m);
 }else {
 BA.debugLineNum = 1510;BA.debugLine="m = CreateMap(\"id\":\"N/A\", \"nombre\":\"N/A\", \"tipo\"";
Debug.ShouldStop(32);
_m = subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("id")),RemoteObject.createImmutable(("N/A")),RemoteObject.createImmutable(("nombre")),RemoteObject.createImmutable(("N/A")),RemoteObject.createImmutable(("tipo")),RemoteObject.createImmutable(("N/A")),RemoteObject.createImmutable(("subtipo")),(RemoteObject.createImmutable("N/A"))}));Debug.locals.put("m", _m);
 };
 BA.debugLineNum = 1512;BA.debugLine="c.Close";
Debug.ShouldStop(128);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1513;BA.debugLine="Return m";
Debug.ShouldStop(256);
if (true) return _m;
 BA.debugLineNum = 1514;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeprodnombre(RemoteObject _ba,RemoteObject _id) throws Exception{
try {
		Debug.PushSubsStack("traeProdNombre (subs) ","subs",30,_ba,subs.mostCurrent,721);
if (RapidSub.canDelegate("traeprodnombre")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeprodnombre", _ba, _id);}
RemoteObject _h = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _n = RemoteObject.createImmutable("");
;
Debug.locals.put("id", _id);
 BA.debugLineNum = 721;BA.debugLine="Sub traeProdNombre(id As String) As String";
Debug.ShouldStop(65536);
 BA.debugLineNum = 722;BA.debugLine="Private h As Cursor";
Debug.ShouldStop(131072);
_h = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("h", _h);
 BA.debugLineNum = 723;BA.debugLine="Private n As String";
Debug.ShouldStop(262144);
_n = RemoteObject.createImmutable("");Debug.locals.put("n", _n);
 BA.debugLineNum = 724;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2($\"select CAT_";
Debug.ShouldStop(524288);
_h = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_GP_NOMBRE from "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" where CAT_GP_ID = ? ")))),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {_id.runMethod(true,"trim")}))));Debug.locals.put("h", _h);
 BA.debugLineNum = 725;BA.debugLine="If h.RowCount > 0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean(">",_h.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 726;BA.debugLine="h.Position = 0";
Debug.ShouldStop(2097152);
_h.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 727;BA.debugLine="n = h.GetString(\"CAT_GP_NOMBRE\")";
Debug.ShouldStop(4194304);
_n = _h.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")));Debug.locals.put("n", _n);
 };
 BA.debugLineNum = 730;BA.debugLine="h.Close";
Debug.ShouldStop(33554432);
_h.runVoidMethod ("Close");
 BA.debugLineNum = 731;BA.debugLine="If n = Null Or n=\"\" Then n = \"N/A\"";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("n",_n) || RemoteObject.solveBoolean("=",_n,BA.ObjectToString(""))) { 
_n = BA.ObjectToString("N/A");Debug.locals.put("n", _n);};
 BA.debugLineNum = 733;BA.debugLine="Return n";
Debug.ShouldStop(268435456);
if (true) return _n;
 BA.debugLineNum = 734;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traepromo(RemoteObject _ba,RemoteObject _promo,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("traePromo (subs) ","subs",30,_ba,subs.mostCurrent,1008);
if (RapidSub.canDelegate("traepromo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traepromo", _ba, _promo, _cliente);}
RemoteObject _iniciocontador = RemoteObject.createImmutable("");
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _sihistorico = RemoteObject.createImmutable("");
RemoteObject _promomap = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _prodsfijos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsfijosprecios = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsfijospiezas = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsvariables = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsvariables2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsvariablesprecios = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prodsvariablesprecios2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _prods = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _tipos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
int _i = 0;
RemoteObject _pvr = RemoteObject.createImmutable("");
RemoteObject _pvr2 = RemoteObject.createImmutable("");
;
Debug.locals.put("promo", _promo);
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 1008;BA.debugLine="Sub traePromo(promo As String, cliente As String)";
Debug.ShouldStop(32768);
 BA.debugLineNum = 1009;BA.debugLine="Private inicioContador As String = DateTime.Now";
Debug.ShouldStop(65536);
_iniciocontador = BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"));Debug.locals.put("inicioContador", _iniciocontador);Debug.locals.put("inicioContador", _iniciocontador);
 BA.debugLineNum = 1010;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(131072);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("Select * from promos_comp where cat_pa_id = '"),_promo,RemoteObject.createImmutable("'")))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1011;BA.debugLine="Private siHistorico As String = 0";
Debug.ShouldStop(262144);
_sihistorico = BA.NumberToString(0);Debug.locals.put("siHistorico", _sihistorico);Debug.locals.put("siHistorico", _sihistorico);
 BA.debugLineNum = 1012;BA.debugLine="Private promoMap As Map";
Debug.ShouldStop(524288);
_promomap = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("promoMap", _promomap);
 BA.debugLineNum = 1013;BA.debugLine="Private prodsFijos, prodsFijosPrecios, prodsFijos";
Debug.ShouldStop(1048576);
_prodsfijos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsFijos", _prodsfijos);
_prodsfijosprecios = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsFijosPrecios", _prodsfijosprecios);
_prodsfijospiezas = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsFijosPiezas", _prodsfijospiezas);
_prodsvariables = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsVariables", _prodsvariables);
_prodsvariables2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsVariables2", _prodsvariables2);
_prodsvariablesprecios = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsVariablesPrecios", _prodsvariablesprecios);
_prodsvariablesprecios2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("prodsVariablesPrecios2", _prodsvariablesprecios2);
 BA.debugLineNum = 1014;BA.debugLine="promoMap.Initialize";
Debug.ShouldStop(2097152);
_promomap.runVoidMethod ("Initialize");
 BA.debugLineNum = 1015;BA.debugLine="prodsFijos.Initialize";
Debug.ShouldStop(4194304);
_prodsfijos.runVoidMethod ("Initialize");
 BA.debugLineNum = 1016;BA.debugLine="prodsFijosPrecios.Initialize";
Debug.ShouldStop(8388608);
_prodsfijosprecios.runVoidMethod ("Initialize");
 BA.debugLineNum = 1017;BA.debugLine="prodsFijosPiezas.Initialize";
Debug.ShouldStop(16777216);
_prodsfijospiezas.runVoidMethod ("Initialize");
 BA.debugLineNum = 1018;BA.debugLine="prodsVariables.Initialize";
Debug.ShouldStop(33554432);
_prodsvariables.runVoidMethod ("Initialize");
 BA.debugLineNum = 1019;BA.debugLine="prodsVariables2.Initialize";
Debug.ShouldStop(67108864);
_prodsvariables2.runVoidMethod ("Initialize");
 BA.debugLineNum = 1020;BA.debugLine="prodsVariablesPrecios.Initialize";
Debug.ShouldStop(134217728);
_prodsvariablesprecios.runVoidMethod ("Initialize");
 BA.debugLineNum = 1021;BA.debugLine="prodsVariablesPrecios2.Initialize";
Debug.ShouldStop(268435456);
_prodsvariablesprecios2.runVoidMethod ("Initialize");
 BA.debugLineNum = 1022;BA.debugLine="c.Position = 0";
Debug.ShouldStop(536870912);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1023;BA.debugLine="If c.RowCount > 0 Then promoMap = CreateMap(\"id\":";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
_promomap = subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("id")),(_promo),RemoteObject.createImmutable(("maxXcliente")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROMCLIE")))),RemoteObject.createImmutable(("maxRecurrente")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROMREC")))),RemoteObject.createImmutable(("maxPromos")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROM"))))}));Debug.locals.put("promoMap", _promomap);};
 BA.debugLineNum = 1024;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
Debug.ShouldStop(-2147483648);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("Select count(*) as hist from HIST_PROMOS where HP_CLIENTE = '"),_cliente,RemoteObject.createImmutable("' and HP_CODIGO_PROMOCION = '"),_promo,RemoteObject.createImmutable("'")))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1025;BA.debugLine="c.Position = 0";
Debug.ShouldStop(1);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1026;BA.debugLine="If c.GetString(\"hist\") > 0 Then siHistorico = 1";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("hist")))),BA.numberCast(double.class, 0))) { 
_sihistorico = BA.NumberToString(1);Debug.locals.put("siHistorico", _sihistorico);};
 BA.debugLineNum = 1027;BA.debugLine="promoMap.Put(\"historico\", siHistorico)";
Debug.ShouldStop(4);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("historico"))),(Object)((_sihistorico)));
 BA.debugLineNum = 1028;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select * fr";
Debug.ShouldStop(8);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.concat(RemoteObject.createImmutable("Select * from CAT_DETALLES_PAQ where CAT_DP_ID = '"),_promo,RemoteObject.createImmutable("'")))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1029;BA.debugLine="c.Position = 0";
Debug.ShouldStop(16);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1030;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1031;BA.debugLine="Private prods, tipos As Map";
Debug.ShouldStop(64);
_prods = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("prods", _prods);
_tipos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("tipos", _tipos);
 BA.debugLineNum = 1032;BA.debugLine="prods.Initialize";
Debug.ShouldStop(128);
_prods.runVoidMethod ("Initialize");
 BA.debugLineNum = 1033;BA.debugLine="tipos.Initialize";
Debug.ShouldStop(256);
_tipos.runVoidMethod ("Initialize");
 BA.debugLineNum = 1034;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(512);
{
final int step26 = 1;
final int limit26 = RemoteObject.solve(new RemoteObject[] {_c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step26 > 0 && _i <= limit26) || (step26 < 0 && _i >= limit26) ;_i = ((int)(0 + _i + step26))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 1035;BA.debugLine="c.Position=i";
Debug.ShouldStop(1024);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 1036;BA.debugLine="prods.Put(c.GetString(\"CAT_DP_IDPROD\"), CreateM";
Debug.ShouldStop(2048);
_prods.runVoidMethod ("Put",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))),(Object)((subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("idProducto")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))),RemoteObject.createImmutable(("precioSimptos")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO_SIMPTOS")))),RemoteObject.createImmutable(("precio")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),RemoteObject.createImmutable(("almacen")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_ALMACEN")))),RemoteObject.createImmutable(("tipo")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO")))),RemoteObject.createImmutable(("piezas")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),RemoteObject.createImmutable(("usuario")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_USUARIO")))),RemoteObject.createImmutable(("regalo")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_REGALO")))),RemoteObject.createImmutable(("clasif")),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_CLASIF"))))})).getObject())));
 BA.debugLineNum = 1037;BA.debugLine="tipos.Put(c.GetString(\"CAT_DP_IDPROD\"), c.GetSt";
Debug.ShouldStop(4096);
_tipos.runVoidMethod ("Put",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))),(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))))));
 BA.debugLineNum = 1038;BA.debugLine="If c.GetString(\"CAT_DP_TIPO\") = \"0\" Then";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))),BA.ObjectToString("0"))) { 
 BA.debugLineNum = 1039;BA.debugLine="prodsFijos.Add(c.GetString(\"CAT_DP_IDPROD\"))";
Debug.ShouldStop(16384);
_prodsfijos.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))));
 BA.debugLineNum = 1040;BA.debugLine="prodsFijosPrecios.Add(c.GetString(\"CAT_DP_PREC";
Debug.ShouldStop(32768);
_prodsfijosprecios.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))))));
 BA.debugLineNum = 1041;BA.debugLine="prodsFijosPiezas.Add(c.GetString(\"CAT_DP_PZAS\"";
Debug.ShouldStop(65536);
_prodsfijospiezas.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS"))))));
 };
 BA.debugLineNum = 1043;BA.debugLine="If c.GetString(\"CAT_DP_TIPO\") = \"1\" Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))),BA.ObjectToString("1"))) { 
 BA.debugLineNum = 1044;BA.debugLine="prodsVariables.Add(c.GetString(\"CAT_DP_IDPROD\"";
Debug.ShouldStop(524288);
_prodsvariables.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))));
 BA.debugLineNum = 1045;BA.debugLine="prodsVariablesPrecios.Add(c.GetString(\"CAT_DP_";
Debug.ShouldStop(1048576);
_prodsvariablesprecios.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))))));
 };
 BA.debugLineNum = 1047;BA.debugLine="If c.GetString(\"CAT_DP_TIPO\") = \"2\" Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))),BA.ObjectToString("2"))) { 
 BA.debugLineNum = 1049;BA.debugLine="prodsVariables2.Add(c.GetString(\"CAT_DP_IDPROD";
Debug.ShouldStop(16777216);
_prodsvariables2.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))));
 BA.debugLineNum = 1050;BA.debugLine="prodsVariablesPrecios2.Add(c.GetString(\"CAT_DP";
Debug.ShouldStop(33554432);
_prodsvariablesprecios2.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))))));
 };
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1055;BA.debugLine="promoMap.Put(\"productos\", prods) 'Mapa con los p";
Debug.ShouldStop(1073741824);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("productos"))),(Object)((_prods.getObject())));
 BA.debugLineNum = 1056;BA.debugLine="promoMap.Put(\"tipos\", tipos) 'Mapa con los produ";
Debug.ShouldStop(-2147483648);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("tipos"))),(Object)((_tipos.getObject())));
 BA.debugLineNum = 1057;BA.debugLine="promoMap.Put(\"prodsFijos\", prodsFijos) 'Lista de";
Debug.ShouldStop(1);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijos"))),(Object)((_prodsfijos.getObject())));
 BA.debugLineNum = 1058;BA.debugLine="promoMap.Put(\"prodsVariables\", prodsVariables) '";
Debug.ShouldStop(2);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables"))),(Object)((_prodsvariables.getObject())));
 BA.debugLineNum = 1059;BA.debugLine="promoMap.Put(\"prodsVariables2\", prodsVariables2)";
Debug.ShouldStop(4);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables2"))),(Object)((_prodsvariables2.getObject())));
 BA.debugLineNum = 1060;BA.debugLine="promoMap.Put(\"prodsFijosCant\", prodsFijos.Size)";
Debug.ShouldStop(8);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijosCant"))),(Object)((_prodsfijos.runMethod(true,"getSize"))));
 BA.debugLineNum = 1061;BA.debugLine="promoMap.Put(\"prodsFijosPrecios\", prodsFijosPrec";
Debug.ShouldStop(16);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijosPrecios"))),(Object)((_prodsfijosprecios.getObject())));
 BA.debugLineNum = 1062;BA.debugLine="promoMap.Put(\"prodsFijosPiezas\", prodsFijosPieza";
Debug.ShouldStop(32);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijosPiezas"))),(Object)((_prodsfijospiezas.getObject())));
 BA.debugLineNum = 1063;BA.debugLine="promoMap.Put(\"prodsVariablesCant\", prodsVariable";
Debug.ShouldStop(64);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesCant"))),(Object)((_prodsvariables.runMethod(true,"getSize"))));
 BA.debugLineNum = 1064;BA.debugLine="promoMap.Put(\"prodsVariables2Cant\", prodsVariabl";
Debug.ShouldStop(128);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables2Cant"))),(Object)((_prodsvariables2.runMethod(true,"getSize"))));
 BA.debugLineNum = 1065;BA.debugLine="promoMap.Put(\"prodsVariablesPrecios\", prodsVaria";
Debug.ShouldStop(256);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesPrecios"))),(Object)((_prodsvariablesprecios.getObject())));
 BA.debugLineNum = 1066;BA.debugLine="promoMap.Put(\"prodsVariablesPrecios2\", prodsVari";
Debug.ShouldStop(512);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesPrecios2"))),(Object)((_prodsvariablesprecios2.getObject())));
 BA.debugLineNum = 1067;BA.debugLine="promoMap.Put(\"resultado\", \"ok\")";
Debug.ShouldStop(1024);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("ok"))));
 }else {
 BA.debugLineNum = 1069;BA.debugLine="promoMap.Put(\"resultado\", \"No hay datos de la pr";
Debug.ShouldStop(4096);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("No hay datos de la promoción."))));
 };
 BA.debugLineNum = 1071;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery2($\"Select CA";
Debug.ShouldStop(16384);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("Select CAT_GP_STS, CAT_GP_IMP1, CAT_GP_NOMBRE from "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._starter._tabla /*RemoteObject*/ ))),RemoteObject.createImmutable(" where CAT_GP_ID = ?")))),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {_promo}))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1072;BA.debugLine="c.Position = 0";
Debug.ShouldStop(32768);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1073;BA.debugLine="Private pvr As String = 0";
Debug.ShouldStop(65536);
_pvr = BA.NumberToString(0);Debug.locals.put("pvr", _pvr);Debug.locals.put("pvr", _pvr);
 BA.debugLineNum = 1074;BA.debugLine="Private pvr2 As String = 0";
Debug.ShouldStop(131072);
_pvr2 = BA.NumberToString(0);Debug.locals.put("pvr2", _pvr2);Debug.locals.put("pvr2", _pvr2);
 BA.debugLineNum = 1075;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1076;BA.debugLine="c.Position = 0";
Debug.ShouldStop(524288);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1077;BA.debugLine="pvr = c.GetString(\"CAT_GP_STS\")";
Debug.ShouldStop(1048576);
_pvr = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_STS")));Debug.locals.put("pvr", _pvr);
 BA.debugLineNum = 1078;BA.debugLine="pvr2 = c.GetString(\"CAT_GP_IMP1\")";
Debug.ShouldStop(2097152);
_pvr2 = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_IMP1")));Debug.locals.put("pvr2", _pvr2);
 BA.debugLineNum = 1079;BA.debugLine="If pvr = Null Or pvr = \"null\" Then pvr = 0";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("n",_pvr) || RemoteObject.solveBoolean("=",_pvr,BA.ObjectToString("null"))) { 
_pvr = BA.NumberToString(0);Debug.locals.put("pvr", _pvr);};
 BA.debugLineNum = 1080;BA.debugLine="If pvr2 = Null Or pvr2 = \"null\" Then pvr2 = 0";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("n",_pvr2) || RemoteObject.solveBoolean("=",_pvr2,BA.ObjectToString("null"))) { 
_pvr2 = BA.NumberToString(0);Debug.locals.put("pvr2", _pvr2);};
 BA.debugLineNum = 1081;BA.debugLine="promoMap.Put(\"prodsVariablesRequeridos\", pvr) 'C";
Debug.ShouldStop(16777216);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesRequeridos"))),(Object)((_pvr)));
 BA.debugLineNum = 1082;BA.debugLine="promoMap.Put(\"prodsVariables2Requeridos\", pvr2)";
Debug.ShouldStop(33554432);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables2Requeridos"))),(Object)((_pvr2)));
 BA.debugLineNum = 1083;BA.debugLine="promoMap.put(\"descripcion\", c.GetString(\"CAT_GP_";
Debug.ShouldStop(67108864);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("descripcion"))),(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE"))))));
 };
 BA.debugLineNum = 1085;BA.debugLine="c.Close";
Debug.ShouldStop(268435456);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1090;BA.debugLine="Return promoMap";
Debug.ShouldStop(2);
if (true) return _promomap;
 BA.debugLineNum = 1091;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traepromosvendidas(RemoteObject _ba,RemoteObject _promo,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("traePromosVendidas (subs) ","subs",30,_ba,subs.mostCurrent,1291);
if (RapidSub.canDelegate("traepromosvendidas")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traepromosvendidas", _ba, _promo, _cliente);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _pv = RemoteObject.createImmutable(0);
;
Debug.locals.put("promo", _promo);
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 1291;BA.debugLine="Sub traePromosVendidas(promo As String, cliente As";
Debug.ShouldStop(1024);
 BA.debugLineNum = 1292;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(2048);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1293;BA.debugLine="Private pv As Int = 0";
Debug.ShouldStop(4096);
_pv = BA.numberCast(int.class, 0);Debug.locals.put("pv", _pv);Debug.locals.put("pv", _pv);
 BA.debugLineNum = 1294;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select PE_CA";
Debug.ShouldStop(8192);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select PE_CANT from PEDIDO where PE_PROID = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_promo))),RemoteObject.createImmutable("' and PE_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1295;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1296;BA.debugLine="c.Position = 0";
Debug.ShouldStop(32768);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1297;BA.debugLine="pv = c.GetInt(\"PE_CANT\")";
Debug.ShouldStop(65536);
_pv = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")));Debug.locals.put("pv", _pv);
 };
 BA.debugLineNum = 1299;BA.debugLine="Return pv";
Debug.ShouldStop(262144);
if (true) return _pv;
 BA.debugLineNum = 1300;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeruta(RemoteObject _ba,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("traeRuta (subs) ","subs",30,_ba,subs.mostCurrent,755);
if (RapidSub.canDelegate("traeruta")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeruta", _ba, _cliente);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _r = RemoteObject.createImmutable("");
;
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 755;BA.debugLine="Sub traeRuta (cliente As String) As String 'ignore";
Debug.ShouldStop(262144);
 BA.debugLineNum = 756;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(524288);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 757;BA.debugLine="Private r As String";
Debug.ShouldStop(1048576);
_r = RemoteObject.createImmutable("");Debug.locals.put("r", _r);
 BA.debugLineNum = 758;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_C";
Debug.ShouldStop(2097152);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable("' UNION ALL select CAT_CL_RUTA from kmt_info2 where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 759;BA.debugLine="r = \"0\"";
Debug.ShouldStop(4194304);
_r = BA.ObjectToString("0");Debug.locals.put("r", _r);
 BA.debugLineNum = 760;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 761;BA.debugLine="c.Position=0";
Debug.ShouldStop(16777216);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 762;BA.debugLine="r = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(33554432);
_r = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("r", _r);
 };
 BA.debugLineNum = 764;BA.debugLine="c.Close";
Debug.ShouldStop(134217728);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 765;BA.debugLine="Return r";
Debug.ShouldStop(268435456);
if (true) return _r;
 BA.debugLineNum = 766;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeruta2(RemoteObject _ba,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("traeRuta2 (subs) ","subs",30,_ba,subs.mostCurrent,769);
if (RapidSub.canDelegate("traeruta2")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeruta2", _ba, _cliente);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _r = RemoteObject.createImmutable("");
;
Debug.locals.put("cliente", _cliente);
 BA.debugLineNum = 769;BA.debugLine="Sub traeRuta2 (cliente As String) As String 'ignor";
Debug.ShouldStop(1);
 BA.debugLineNum = 770;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(2);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 771;BA.debugLine="Private r As String";
Debug.ShouldStop(4);
_r = RemoteObject.createImmutable("");Debug.locals.put("r", _r);
 BA.debugLineNum = 772;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_C";
Debug.ShouldStop(8);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable("' UNION ALL select CAT_CL_RUTA from kmt_info2 where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 773;BA.debugLine="r = \"0\"";
Debug.ShouldStop(16);
_r = BA.ObjectToString("0");Debug.locals.put("r", _r);
 BA.debugLineNum = 774;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 775;BA.debugLine="c.Position=0";
Debug.ShouldStop(64);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 776;BA.debugLine="r = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(128);
_r = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("r", _r);
 };
 BA.debugLineNum = 778;BA.debugLine="c.Close";
Debug.ShouldStop(512);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 779;BA.debugLine="Return r";
Debug.ShouldStop(1024);
if (true) return _r;
 BA.debugLineNum = 780;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetablaprods(RemoteObject _ba,RemoteObject _tipoventa) throws Exception{
try {
		Debug.PushSubsStack("traeTablaProds (subs) ","subs",30,_ba,subs.mostCurrent,1634);
if (RapidSub.canDelegate("traetablaprods")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetablaprods", _ba, _tipoventa);}
RemoteObject _tablaprods = RemoteObject.createImmutable("");
;
Debug.locals.put("tipoventa", _tipoventa);
 BA.debugLineNum = 1634;BA.debugLine="Sub traeTablaProds(tipoventa As String) As String";
Debug.ShouldStop(2);
 BA.debugLineNum = 1635;BA.debugLine="Private tablaProds As String = \"cat_gunaprod2\"";
Debug.ShouldStop(4);
_tablaprods = BA.ObjectToString("cat_gunaprod2");Debug.locals.put("tablaProds", _tablaprods);Debug.locals.put("tablaProds", _tablaprods);
 BA.debugLineNum = 1637;BA.debugLine="If tipoventa = \"ABORDO\" Or tipoventa = \"PREVENTA_";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("ABORDO")) || RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("PREVENTA_CONTADO"))) { 
 BA.debugLineNum = 1638;BA.debugLine="tablaProds = \"cat_gunaprod\"";
Debug.ShouldStop(32);
_tablaprods = BA.ObjectToString("cat_gunaprod");Debug.locals.put("tablaProds", _tablaprods);
 }else 
{ BA.debugLineNum = 1639;BA.debugLine="Else If tipoventa = \"RECARGA\" Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("RECARGA"))) { 
 BA.debugLineNum = 1640;BA.debugLine="tablaProds = \"cat_gunaprod3\"";
Debug.ShouldStop(128);
_tablaprods = BA.ObjectToString("cat_gunaprod3");Debug.locals.put("tablaProds", _tablaprods);
 }else 
{ BA.debugLineNum = 1641;BA.debugLine="Else If tipoventa = \"PREVENTA_CREDITO\" Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("PREVENTA_CREDITO"))) { 
 BA.debugLineNum = 1642;BA.debugLine="tablaProds = \"cat_gunaprod4\"";
Debug.ShouldStop(512);
_tablaprods = BA.ObjectToString("cat_gunaprod4");Debug.locals.put("tablaProds", _tablaprods);
 }}}
;
 BA.debugLineNum = 1645;BA.debugLine="LogColor($\"Tipo= ${tipoventa}, tabla=${tablaProds";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","541615371",(RemoteObject.concat(RemoteObject.createImmutable("Tipo= "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipoventa))),RemoteObject.createImmutable(", tabla="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tablaprods))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 200)),(Object)(BA.numberCast(int.class, 136)),(Object)(BA.numberCast(int.class, 0))));
 BA.debugLineNum = 1646;BA.debugLine="Return tablaProds";
Debug.ShouldStop(8192);
if (true) return _tablaprods;
 BA.debugLineNum = 1647;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetipocliente(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTipoCliente (subs) ","subs",30,_ba,subs.mostCurrent,43);
if (RapidSub.canDelegate("traetipocliente")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetipocliente", _ba);}
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _tc = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 43;BA.debugLine="Sub traeTipoCliente As String";
Debug.ShouldStop(1024);
 BA.debugLineNum = 44;BA.debugLine="Private x As Cursor";
Debug.ShouldStop(2048);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("x", _x);
 BA.debugLineNum = 45;BA.debugLine="Private tc As String = \"DETALLE\"";
Debug.ShouldStop(4096);
_tc = BA.ObjectToString("DETALLE");Debug.locals.put("tc", _tc);Debug.locals.put("tc", _tc);
 BA.debugLineNum = 46;BA.debugLine="x = Starter.skmt.ExecQuery($\"select IFNULL(CAT_CL";
Debug.ShouldStop(8192);
_x = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.createImmutable("select IFNULL(CAT_CL_TIPOCLIENTE,\"DETALLE\") AS CAT_CL_TIPOCLIENTE from kmt_info where cat_cl_codigo in (select cuenta from cuentaa)")))));Debug.locals.put("x", _x);
 BA.debugLineNum = 47;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 48;BA.debugLine="x.Position = 0";
Debug.ShouldStop(32768);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 49;BA.debugLine="If x.GetString(\"CAT_CL_TIPOCLIENTE\") = \"null\" Or";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE"))),BA.ObjectToString("null")) || RemoteObject.solveBoolean("n",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE"))))) { 
 BA.debugLineNum = 50;BA.debugLine="tc = \"DETALLE\"";
Debug.ShouldStop(131072);
_tc = BA.ObjectToString("DETALLE");Debug.locals.put("tc", _tc);
 }else {
 BA.debugLineNum = 52;BA.debugLine="tc = x.GetString(\"CAT_CL_TIPOCLIENTE\")";
Debug.ShouldStop(524288);
_tc = _x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE")));Debug.locals.put("tc", _tc);
 };
 };
 BA.debugLineNum = 57;BA.debugLine="Return tc";
Debug.ShouldStop(16777216);
if (true) return _tc;
 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  _traetipocliente2(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTipoCliente2 (subs) ","subs",30,_ba,subs.mostCurrent,60);
if (RapidSub.canDelegate("traetipocliente2")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetipocliente2", _ba);}
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _tc = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 60;BA.debugLine="Sub traeTipoCliente2 As String";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 61;BA.debugLine="Private x As Cursor";
Debug.ShouldStop(268435456);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("x", _x);
 BA.debugLineNum = 62;BA.debugLine="Private tc As String = \"DETALLE\"";
Debug.ShouldStop(536870912);
_tc = BA.ObjectToString("DETALLE");Debug.locals.put("tc", _tc);Debug.locals.put("tc", _tc);
 BA.debugLineNum = 63;BA.debugLine="x = Starter.skmt.ExecQuery($\"select IFNULL(CAT_CL";
Debug.ShouldStop(1073741824);
_x = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.createImmutable("select IFNULL(CAT_CL_TIPOCLIENTE,\"DETALLE\") AS CAT_CL_TIPOCLIENTE from kmt_info where cat_cl_codigo in (select cuenta from cuentaa)")))));Debug.locals.put("x", _x);
 BA.debugLineNum = 64;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 65;BA.debugLine="x.Position = 0";
Debug.ShouldStop(1);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 66;BA.debugLine="Log(\"aQUI\")";
Debug.ShouldStop(2);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","536831238",RemoteObject.createImmutable("aQUI"),0);
 BA.debugLineNum = 67;BA.debugLine="Log(x.GetString(\"CAT_CL_TIPOCLIENTE\"))";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","536831239",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE"))),0);
 BA.debugLineNum = 68;BA.debugLine="If x.GetString(\"CAT_CL_TIPOCLIENTE\") = \"null\" Or";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE"))),BA.ObjectToString("null")) || RemoteObject.solveBoolean("n",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE")))) || RemoteObject.solveBoolean("=",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE"))),BA.NumberToString(0)) || RemoteObject.solveBoolean("=",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE"))),BA.ObjectToString("0"))) { 
 BA.debugLineNum = 69;BA.debugLine="tc = \"DETALLE\"";
Debug.ShouldStop(16);
_tc = BA.ObjectToString("DETALLE");Debug.locals.put("tc", _tc);
 BA.debugLineNum = 70;BA.debugLine="Log(\"Aqui\")";
Debug.ShouldStop(32);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","536831242",RemoteObject.createImmutable("Aqui"),0);
 }else {
 BA.debugLineNum = 72;BA.debugLine="tc = x.GetString(\"CAT_CL_TIPOCLIENTE\")";
Debug.ShouldStop(128);
_tc = _x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE")));Debug.locals.put("tc", _tc);
 BA.debugLineNum = 73;BA.debugLine="Log(\"Aqui2\")";
Debug.ShouldStop(256);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","536831245",RemoteObject.createImmutable("Aqui2"),0);
 };
 };
 BA.debugLineNum = 79;BA.debugLine="Log(tc)";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","536831251",_tc,0);
 BA.debugLineNum = 80;BA.debugLine="Return tc";
Debug.ShouldStop(32768);
if (true) return _tc;
 BA.debugLineNum = 81;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalcliente(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalCliente (subs) ","subs",30,_ba,subs.mostCurrent,930);
if (RapidSub.canDelegate("traetotalcliente")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetotalcliente", _ba);}
RemoteObject _sumatotal = RemoteObject.createImmutable(0);
RemoteObject _cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 930;BA.debugLine="Sub traeTotalCliente As Double";
Debug.ShouldStop(2);
 BA.debugLineNum = 931;BA.debugLine="Private sumaTotal As Double";
Debug.ShouldStop(4);
_sumatotal = RemoteObject.createImmutable(0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 932;BA.debugLine="Private cursorprueba As Cursor = B4XPages.MainPag";
Debug.ShouldStop(8);
_cursorprueba = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select  PE_COSTO_TOT from pedido where PE_CLIENTE <> 0 "))));Debug.locals.put("cursorprueba", _cursorprueba);Debug.locals.put("cursorprueba", _cursorprueba);
 BA.debugLineNum = 933;BA.debugLine="For i= 0 To cursorprueba.RowCount -1";
Debug.ShouldStop(16);
{
final int step3 = 1;
final int limit3 = RemoteObject.solve(new RemoteObject[] {_cursorprueba.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step3 > 0 && _i <= limit3) || (step3 < 0 && _i >= limit3) ;_i = ((int)(0 + _i + step3))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 934;BA.debugLine="cursorprueba.Position = i";
Debug.ShouldStop(32);
_cursorprueba.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 936;BA.debugLine="sumaTotal =  sumaTotal +  cursorprueba.GetString";
Debug.ShouldStop(128);
_sumatotal = RemoteObject.solve(new RemoteObject[] {_sumatotal,BA.numberCast(double.class, _cursorprueba.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT"))))}, "+",1, 0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 937;BA.debugLine="sumaTotal = NumberFormat2(sumaTotal, 0, 2, 2, Fa";
Debug.ShouldStop(256);
_sumatotal = BA.numberCast(double.class, subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(_sumatotal),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False"))));Debug.locals.put("sumaTotal", _sumatotal);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 940;BA.debugLine="cursorprueba.Close";
Debug.ShouldStop(2048);
_cursorprueba.runVoidMethod ("Close");
 BA.debugLineNum = 941;BA.debugLine="Return sumaTotal";
Debug.ShouldStop(4096);
if (true) return _sumatotal;
 BA.debugLineNum = 942;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalclienteabordo(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalClienteabordo (subs) ","subs",30,_ba,subs.mostCurrent,944);
if (RapidSub.canDelegate("traetotalclienteabordo")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetotalclienteabordo", _ba);}
RemoteObject _sumatotal = RemoteObject.createImmutable(0);
RemoteObject _cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 944;BA.debugLine="Sub traeTotalClienteabordo As Double";
Debug.ShouldStop(32768);
 BA.debugLineNum = 945;BA.debugLine="Private sumaTotal As Double";
Debug.ShouldStop(65536);
_sumatotal = RemoteObject.createImmutable(0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 946;BA.debugLine="Private cursorprueba As Cursor = B4XPages.MainPag";
Debug.ShouldStop(131072);
_cursorprueba = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("Select  PE_COSTO_TOT from pedido where PE_FOLIO = ? AND PE_CLIENTE = 0")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("ABORDO")}))));Debug.locals.put("cursorprueba", _cursorprueba);Debug.locals.put("cursorprueba", _cursorprueba);
 BA.debugLineNum = 947;BA.debugLine="For i= 0 To cursorprueba.RowCount -1";
Debug.ShouldStop(262144);
{
final int step3 = 1;
final int limit3 = RemoteObject.solve(new RemoteObject[] {_cursorprueba.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step3 > 0 && _i <= limit3) || (step3 < 0 && _i >= limit3) ;_i = ((int)(0 + _i + step3))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 948;BA.debugLine="cursorprueba.Position = i";
Debug.ShouldStop(524288);
_cursorprueba.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 950;BA.debugLine="sumaTotal =  sumaTotal +  cursorprueba.GetString";
Debug.ShouldStop(2097152);
_sumatotal = RemoteObject.solve(new RemoteObject[] {_sumatotal,BA.numberCast(double.class, _cursorprueba.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT"))))}, "+",1, 0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 951;BA.debugLine="sumaTotal = NumberFormat2(sumaTotal, 0, 2, 2, Fa";
Debug.ShouldStop(4194304);
_sumatotal = BA.numberCast(double.class, subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(_sumatotal),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False"))));Debug.locals.put("sumaTotal", _sumatotal);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 954;BA.debugLine="cursorprueba.Close";
Debug.ShouldStop(33554432);
_cursorprueba.runVoidMethod ("Close");
 BA.debugLineNum = 955;BA.debugLine="Return sumaTotal";
Debug.ShouldStop(67108864);
if (true) return _sumatotal;
 BA.debugLineNum = 956;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalclientepreventa(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalClientepreventa (subs) ","subs",30,_ba,subs.mostCurrent,958);
if (RapidSub.canDelegate("traetotalclientepreventa")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetotalclientepreventa", _ba);}
RemoteObject _sumatotal = RemoteObject.createImmutable(0);
RemoteObject _cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 958;BA.debugLine="Sub traeTotalClientepreventa As Double";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 959;BA.debugLine="Private sumaTotal As Double";
Debug.ShouldStop(1073741824);
_sumatotal = RemoteObject.createImmutable(0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 960;BA.debugLine="Private cursorprueba As Cursor = B4XPages.MainPag";
Debug.ShouldStop(-2147483648);
_cursorprueba = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("Select  PE_COSTO_TOT from pedido where PE_FOLIO = ? AND PE_CLIENTE <> 0")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("PREVENTA_CONTADO")}))));Debug.locals.put("cursorprueba", _cursorprueba);Debug.locals.put("cursorprueba", _cursorprueba);
 BA.debugLineNum = 961;BA.debugLine="For i= 0 To cursorprueba.RowCount -1";
Debug.ShouldStop(1);
{
final int step3 = 1;
final int limit3 = RemoteObject.solve(new RemoteObject[] {_cursorprueba.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step3 > 0 && _i <= limit3) || (step3 < 0 && _i >= limit3) ;_i = ((int)(0 + _i + step3))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 962;BA.debugLine="cursorprueba.Position = i";
Debug.ShouldStop(2);
_cursorprueba.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 964;BA.debugLine="sumaTotal =  sumaTotal +  cursorprueba.GetString";
Debug.ShouldStop(8);
_sumatotal = RemoteObject.solve(new RemoteObject[] {_sumatotal,BA.numberCast(double.class, _cursorprueba.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT"))))}, "+",1, 0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 965;BA.debugLine="sumaTotal = NumberFormat2(sumaTotal, 0, 2, 2, Fa";
Debug.ShouldStop(16);
_sumatotal = BA.numberCast(double.class, subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(_sumatotal),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False"))));Debug.locals.put("sumaTotal", _sumatotal);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 968;BA.debugLine="cursorprueba.Close";
Debug.ShouldStop(128);
_cursorprueba.runVoidMethod ("Close");
 BA.debugLineNum = 969;BA.debugLine="Return sumaTotal";
Debug.ShouldStop(256);
if (true) return _sumatotal;
 BA.debugLineNum = 970;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalclientepreventaparacredito(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalClientepreventaparacredito (subs) ","subs",30,_ba,subs.mostCurrent,972);
if (RapidSub.canDelegate("traetotalclientepreventaparacredito")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetotalclientepreventaparacredito", _ba);}
RemoteObject _sumatotal = RemoteObject.createImmutable(0);
RemoteObject _cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 972;BA.debugLine="Sub traeTotalClientepreventaparacredito As Double";
Debug.ShouldStop(2048);
 BA.debugLineNum = 973;BA.debugLine="Private sumaTotal As Double";
Debug.ShouldStop(4096);
_sumatotal = RemoteObject.createImmutable(0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 974;BA.debugLine="Private cursorprueba As Cursor = B4XPages.MainPag";
Debug.ShouldStop(8192);
_cursorprueba = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("Select  PE_COSTO_TOT from pedido where PE_FOLIO = ? AND PE_CLIENTE <> 0 AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("PREVENTA")}))));Debug.locals.put("cursorprueba", _cursorprueba);Debug.locals.put("cursorprueba", _cursorprueba);
 BA.debugLineNum = 975;BA.debugLine="For i= 0 To cursorprueba.RowCount -1";
Debug.ShouldStop(16384);
{
final int step3 = 1;
final int limit3 = RemoteObject.solve(new RemoteObject[] {_cursorprueba.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step3 > 0 && _i <= limit3) || (step3 < 0 && _i >= limit3) ;_i = ((int)(0 + _i + step3))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 976;BA.debugLine="cursorprueba.Position = i";
Debug.ShouldStop(32768);
_cursorprueba.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 978;BA.debugLine="sumaTotal =  sumaTotal +  cursorprueba.GetString";
Debug.ShouldStop(131072);
_sumatotal = RemoteObject.solve(new RemoteObject[] {_sumatotal,BA.numberCast(double.class, _cursorprueba.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT"))))}, "+",1, 0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 979;BA.debugLine="sumaTotal = NumberFormat2(sumaTotal, 0, 2, 2, Fa";
Debug.ShouldStop(262144);
_sumatotal = BA.numberCast(double.class, subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(_sumatotal),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False"))));Debug.locals.put("sumaTotal", _sumatotal);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 982;BA.debugLine="cursorprueba.Close";
Debug.ShouldStop(2097152);
_cursorprueba.runVoidMethod ("Close");
 BA.debugLineNum = 983;BA.debugLine="Return sumaTotal";
Debug.ShouldStop(4194304);
if (true) return _sumatotal;
 BA.debugLineNum = 984;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalclienteventa(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalClienteventa (subs) ","subs",30,_ba,subs.mostCurrent,986);
if (RapidSub.canDelegate("traetotalclienteventa")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetotalclienteventa", _ba);}
RemoteObject _sumatotal = RemoteObject.createImmutable(0);
RemoteObject _cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 986;BA.debugLine="Sub traeTotalClienteventa As Double";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 987;BA.debugLine="Private sumaTotal As Double";
Debug.ShouldStop(67108864);
_sumatotal = RemoteObject.createImmutable(0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 988;BA.debugLine="Private cursorprueba As Cursor = B4XPages.MainPag";
Debug.ShouldStop(134217728);
_cursorprueba = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cursorprueba = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("Select  PE_COSTO_TOT from pedido where PE_FOLIO = ? AND PE_CLIENTE <> 0")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("VENTA")}))));Debug.locals.put("cursorprueba", _cursorprueba);Debug.locals.put("cursorprueba", _cursorprueba);
 BA.debugLineNum = 989;BA.debugLine="For i= 0 To cursorprueba.RowCount -1";
Debug.ShouldStop(268435456);
{
final int step3 = 1;
final int limit3 = RemoteObject.solve(new RemoteObject[] {_cursorprueba.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step3 > 0 && _i <= limit3) || (step3 < 0 && _i >= limit3) ;_i = ((int)(0 + _i + step3))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 990;BA.debugLine="cursorprueba.Position = i";
Debug.ShouldStop(536870912);
_cursorprueba.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 992;BA.debugLine="sumaTotal =  sumaTotal +  cursorprueba.GetString";
Debug.ShouldStop(-2147483648);
_sumatotal = RemoteObject.solve(new RemoteObject[] {_sumatotal,BA.numberCast(double.class, _cursorprueba.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT"))))}, "+",1, 0);Debug.locals.put("sumaTotal", _sumatotal);
 BA.debugLineNum = 993;BA.debugLine="sumaTotal = NumberFormat2(sumaTotal, 0, 2, 2, Fa";
Debug.ShouldStop(1);
_sumatotal = BA.numberCast(double.class, subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(_sumatotal),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False"))));Debug.locals.put("sumaTotal", _sumatotal);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 996;BA.debugLine="cursorprueba.Close";
Debug.ShouldStop(8);
_cursorprueba.runVoidMethod ("Close");
 BA.debugLineNum = 997;BA.debugLine="Return sumaTotal";
Debug.ShouldStop(16);
if (true) return _sumatotal;
 BA.debugLineNum = 998;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalesclienteactual(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalesClienteActual (subs) ","subs",30,_ba,subs.mostCurrent,1541);
if (RapidSub.canDelegate("traetotalesclienteactual")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetotalesclienteactual", _ba);}
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _c_prodsx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1541;BA.debugLine="Sub traeTotalesClienteActual As Map";
Debug.ShouldStop(16);
 BA.debugLineNum = 1542;BA.debugLine="Private m As Map";
Debug.ShouldStop(32);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 1543;BA.debugLine="m.Initialize";
Debug.ShouldStop(64);
_m.runVoidMethod ("Initialize");
 BA.debugLineNum = 1544;BA.debugLine="Private c_prodsX As Cursor=B4XPages.MainPage.skmt";
Debug.ShouldStop(128);
_c_prodsx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_c_prodsx = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select ifnull(sum(PE_CANT), 0) as cantProds, ifnull(sum(PE_COSTO_TOT), 0) as costoTotal FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_PRONOMBRE asc"))));Debug.locals.put("c_prodsX", _c_prodsx);Debug.locals.put("c_prodsX", _c_prodsx);
 BA.debugLineNum = 1545;BA.debugLine="c_prodsX.Position=0";
Debug.ShouldStop(256);
_c_prodsx.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1547;BA.debugLine="m = CreateMap(\"productos\": c_prodsX.GetString(\"ca";
Debug.ShouldStop(1024);
_m = subs.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("productos")),(_c_prodsx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cantProds")))),RemoteObject.createImmutable(("monto")),(_c_prodsx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("costoTotal"))))}));Debug.locals.put("m", _m);
 BA.debugLineNum = 1548;BA.debugLine="Return m";
Debug.ShouldStop(2048);
if (true) return _m;
 BA.debugLineNum = 1549;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeusuariodebd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeUsuarioDeBD (subs) ","subs",30,_ba,subs.mostCurrent,800);
if (RapidSub.canDelegate("traeusuariodebd")) { return SHARK2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeusuariodebd", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _u = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 800;BA.debugLine="Sub traeUsuarioDeBD As String 'ignore";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 801;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(1);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 802;BA.debugLine="Private u As String = \"SinUsuario\"";
Debug.ShouldStop(2);
_u = BA.ObjectToString("SinUsuario");Debug.locals.put("u", _u);Debug.locals.put("u", _u);
 BA.debugLineNum = 803;BA.debugLine="If Not(kmt.IsInitialized) Then revisaBD";
Debug.ShouldStop(4);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._kmt.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
_revisabd(_ba);};
 BA.debugLineNum = 804;BA.debugLine="c=kmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(8);
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), subs._kmt.runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 805;BA.debugLine="c.Position=0";
Debug.ShouldStop(16);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 806;BA.debugLine="If c.RowCount > 0 Then u = c.GetString(\"USUARIO\")";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
_u = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO")));Debug.locals.put("u", _u);};
 BA.debugLineNum = 807;BA.debugLine="c.Close";
Debug.ShouldStop(64);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 808;BA.debugLine="Return u";
Debug.ShouldStop(128);
if (true) return _u;
 BA.debugLineNum = 809;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}