package gunav2.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 _dev,RemoteObject _futuro) throws Exception{
try {
		Debug.PushSubsStack("actualizaProducto (subs) ","subs",4,_ba,subs.mostCurrent,1762);
if (RapidSub.canDelegate("actualizaproducto")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","actualizaproducto", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _dev, _futuro);}
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("dev", _dev);
Debug.locals.put("futuro", _futuro);
 BA.debugLineNum = 1762;BA.debugLine="Sub actualizaProducto(cedis As String, costoU As S";
Debug.ShouldStop(2);
 BA.debugLineNum = 1763;BA.debugLine="If nombre.Length < 6 Then ToastMessageShow(\"(actu";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("<",_nombre.runMethod(true,"length"),BA.numberCast(double.class, 6))) { 
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("(actualizaProducto) El nombre del producto no es valido "),_nombre))),(Object)(subs.mostCurrent.__c.getField(true,"True")));};
 BA.debugLineNum = 1764;BA.debugLine="precioSin = NumberFormat2(precioSin, 1, 2, 2, Fal";
Debug.ShouldStop(8);
_preciosin = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _preciosin)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("precioSin", _preciosin);
 BA.debugLineNum = 1765;BA.debugLine="costoU = NumberFormat2(costoU, 1, 2, 2, False)";
Debug.ShouldStop(16);
_costou = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _costou)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("costoU", _costou);
 BA.debugLineNum = 1766;BA.debugLine="LogColor($\"actualizaProducto, c=${clienteId}, p=$";
Debug.ShouldStop(32);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693252",(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 = 1769;BA.debugLine="If dev = 0 Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",_dev,BA.NumberToString(0))) { 
 BA.debugLineNum = 1770;BA.debugLine="Private c As Cursor=Starter.skmt.ExecQuery($\"sel";
Debug.ShouldStop(512);
_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._starter._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_CEDIS <> 'DUR' AND PE_FUTURO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_futuro))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1771;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1773;BA.debugLine="c.Position = 0";
Debug.ShouldStop(4096);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1774;BA.debugLine="Private antCant As Int = 0";
Debug.ShouldStop(8192);
_antcant = BA.numberCast(int.class, 0);Debug.locals.put("antCant", _antcant);Debug.locals.put("antCant", _antcant);
 BA.debugLineNum = 1775;BA.debugLine="If IsNumber(c.GetInt(\"PE_CANT\")) Then antCant=c";
Debug.ShouldStop(16384);
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 = 1776;BA.debugLine="Private difCant As Int = cant - antCant";
Debug.ShouldStop(32768);
_difcant = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cant),_antcant}, "-",1, 0));Debug.locals.put("difCant", _difcant);Debug.locals.put("difCant", _difcant);
 BA.debugLineNum = 1777;BA.debugLine="Starter.skmt.ExecNonQuery($\"update pedido set p";
Debug.ShouldStop(65536);
subs.mostCurrent._starter._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)((subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cant),BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")))))),RemoteObject.createImmutable(", pe_folio = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipoventa))),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_FUTURO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_futuro))),RemoteObject.createImmutable("' ")))));
 BA.debugLineNum = 1778;BA.debugLine="If cedis <> \"DUR\" Then Starter.skmt.ExecNonQuer";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("!",_cedis,BA.ObjectToString("DUR"))) { 
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_tipoventa)))),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("' ")))));};
 BA.debugLineNum = 1779;BA.debugLine="If cant = 0 Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",_cant,BA.NumberToString(0))) { 
 BA.debugLineNum = 1780;BA.debugLine="LogColor($\"BORRAMOS PRODUCTO - ${prodId}\"$, Co";
Debug.ShouldStop(524288);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693266",(RemoteObject.concat(RemoteObject.createImmutable("BORRAMOS PRODUCTO - "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 1781;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedido";
Debug.ShouldStop(1048576);
subs.mostCurrent._starter._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_FUTURO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_futuro))),RemoteObject.createImmutable("' ")))));
 BA.debugLineNum = 1782;BA.debugLine="Log($\"Borramos pe_cedis='${cedis}' and pe_proi";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693268",(RemoteObject.concat(RemoteObject.createImmutable("Borramos 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("'"))),0);
 BA.debugLineNum = 1783;BA.debugLine="Private pe As Cursor = Starter.skmt.ExecQuery(";
Debug.ShouldStop(4194304);
_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._starter._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 = 1784;BA.debugLine="pe.Position=0";
Debug.ShouldStop(8388608);
_pe.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1785;BA.debugLine="If pe.GetString(\"cuantosPedidos\") = 0 Then";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",_pe.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantosPedidos"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 1786;BA.debugLine="Log(\"######    delete from pedido_cliente - \"";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693272",RemoteObject.concat(RemoteObject.createImmutable("######    delete from pedido_cliente - "),_traecliente(_ba),RemoteObject.createImmutable("|"),_clienteid),0);
 BA.debugLineNum = 1787;BA.debugLine="Log($\"delete from pedido_cliente where PC_CLI";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693273",(RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'"))),0);
 BA.debugLineNum = 1788;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedid";
Debug.ShouldStop(134217728);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'")))));
 };
 };
 }else {
 BA.debugLineNum = 1794;BA.debugLine="If cant > 0 Then guardaProductoSinGestion(cedis";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _cant),BA.numberCast(double.class, 0))) { 
_guardaproductosingestion(_ba,_cedis,_costou,_cant,_nombre,_prodid,_clienteid,_fecha,_usuario,_rutav,_preciosin,_tipoventa,_futuro);};
 };
 BA.debugLineNum = 1796;BA.debugLine="c.Close";
Debug.ShouldStop(8);
_c.runVoidMethod ("Close");
 }else 
{ BA.debugLineNum = 1797;BA.debugLine="Else If dev = 1 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",_dev,BA.NumberToString(1))) { 
 BA.debugLineNum = 1798;BA.debugLine="Private c As Cursor=Starter.skmt.ExecQuery($\"sel";
Debug.ShouldStop(32);
_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._starter._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_CEDIS = 'DUR' AND PE_FUTURO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_futuro))),RemoteObject.createImmutable("' "))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1799;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1801;BA.debugLine="c.Position = 0";
Debug.ShouldStop(256);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1802;BA.debugLine="Private antCant As Int = 0";
Debug.ShouldStop(512);
_antcant = BA.numberCast(int.class, 0);Debug.locals.put("antCant", _antcant);Debug.locals.put("antCant", _antcant);
 BA.debugLineNum = 1803;BA.debugLine="If IsNumber(c.GetInt(\"PE_CANT\")) Then antCant=c";
Debug.ShouldStop(1024);
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 = 1804;BA.debugLine="Private difCant As Int = cant - antCant";
Debug.ShouldStop(2048);
_difcant = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cant),_antcant}, "-",1, 0));Debug.locals.put("difCant", _difcant);Debug.locals.put("difCant", _difcant);
 BA.debugLineNum = 1805;BA.debugLine="Starter.skmt.ExecNonQuery($\"update pedido set p";
Debug.ShouldStop(4096);
subs.mostCurrent._starter._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)((subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cant),BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")))))),RemoteObject.createImmutable(", pe_folio = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tipoventa))),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_FUTURO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_futuro))),RemoteObject.createImmutable("' ")))));
 BA.debugLineNum = 1806;BA.debugLine="If cedis <> \"DUR\" Then Starter.skmt.ExecNonQuer";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("!",_cedis,BA.ObjectToString("DUR"))) { 
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_tipoventa)))),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("' ")))));};
 BA.debugLineNum = 1807;BA.debugLine="If cant = 0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("=",_cant,BA.NumberToString(0))) { 
 BA.debugLineNum = 1808;BA.debugLine="LogColor($\"BORRAMOS PRODUCTO - ${prodId}\"$, Co";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693294",(RemoteObject.concat(RemoteObject.createImmutable("BORRAMOS PRODUCTO - "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable(""))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 1809;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedido";
Debug.ShouldStop(65536);
subs.mostCurrent._starter._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_FUTURO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_futuro))),RemoteObject.createImmutable("' ")))));
 BA.debugLineNum = 1810;BA.debugLine="Log($\"Borramos pe_cedis='${cedis}' and pe_proi";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693296",(RemoteObject.concat(RemoteObject.createImmutable("Borramos 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("'"))),0);
 BA.debugLineNum = 1811;BA.debugLine="Private pe As Cursor = Starter.skmt.ExecQuery(";
Debug.ShouldStop(262144);
_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._starter._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 = 1812;BA.debugLine="pe.Position=0";
Debug.ShouldStop(524288);
_pe.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1813;BA.debugLine="If pe.GetString(\"cuantosPedidos\") = 0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean("=",_pe.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantosPedidos"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 1814;BA.debugLine="Log(\"######    delete from pedido_cliente - \"";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693300",RemoteObject.concat(RemoteObject.createImmutable("######    delete from pedido_cliente - "),_traecliente(_ba),RemoteObject.createImmutable("|"),_clienteid),0);
 BA.debugLineNum = 1815;BA.debugLine="Log($\"delete from pedido_cliente where PC_CLI";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048693301",(RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'"))),0);
 BA.debugLineNum = 1816;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedid";
Debug.ShouldStop(8388608);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'")))));
 };
 };
 }else {
 BA.debugLineNum = 1822;BA.debugLine="If cant > 0 Then guardaProductoSinGestion(cedis";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _cant),BA.numberCast(double.class, 0))) { 
_guardaproductosingestion(_ba,_cedis,_costou,_cant,_nombre,_prodid,_clienteid,_fecha,_usuario,_rutav,_preciosin,_tipoventa,_futuro);};
 };
 BA.debugLineNum = 1824;BA.debugLine="c.Close";
Debug.ShouldStop(-2147483648);
_c.runVoidMethod ("Close");
 }}
;
 BA.debugLineNum = 1827;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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",4,_ba,subs.mostCurrent,1293);
if (RapidSub.canDelegate("agregacolumna")) { return gunav2.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 = 1293;BA.debugLine="Sub agregaColumna(tabla As String, columna As Stri";
Debug.ShouldStop(4096);
 BA.debugLineNum = 1294;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
Debug.ShouldStop(8192);
try { BA.debugLineNum = 1295;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exe";
Debug.ShouldStop(16384);
_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 = 1296;BA.debugLine="c.Position = 0";
Debug.ShouldStop(32768);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1297;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fCol"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 1298;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"ALTER TAB";
Debug.ShouldStop(131072);
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 = 1299;BA.debugLine="Log($\"Columna \"${columna} ${tipo}\", agregada a";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047513606",(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 = 1303;BA.debugLine="Try";
Debug.ShouldStop(4194304);
try { BA.debugLineNum = 1304;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"ALTER TAB";
Debug.ShouldStop(8388608);
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 = 1305;BA.debugLine="Log($\"Columna \"${columna} ${tipo}\", agregada a";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047513612",(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 = 1307;BA.debugLine="Log(LastException)";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047513614",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 };
 BA.debugLineNum = 1309;BA.debugLine="Log(2)";
Debug.ShouldStop(268435456);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047513616",BA.NumberToString(2),0);
 };
 BA.debugLineNum = 1311;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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",4,_ba,subs.mostCurrent,2178);
if (RapidSub.canDelegate("alcanzanlosvariablesparapromo")) { return gunav2.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 = 2178;BA.debugLine="Sub alcanzanLosVariablesParaPromo(promoMap As Map,";
Debug.ShouldStop(2);
 BA.debugLineNum = 2179;BA.debugLine="Private thisLog As Boolean = False 'Si es verdade";
Debug.ShouldStop(4);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 2180;BA.debugLine="If thisLog Then LogColor(\"Inventario inicial: \"&i";
Debug.ShouldStop(8);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049676290",RemoteObject.concat(RemoteObject.createImmutable("Inventario inicial: "),_inventariosinfijos),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Gray"));};
 BA.debugLineNum = 2181;BA.debugLine="Private totalProdsVariables As Int = 0";
Debug.ShouldStop(16);
_totalprodsvariables = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables", _totalprodsvariables);Debug.locals.put("totalProdsVariables", _totalprodsvariables);
 BA.debugLineNum = 2182;BA.debugLine="Private totalProdsVariables2 As Int = 0";
Debug.ShouldStop(32);
_totalprodsvariables2 = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables2", _totalprodsvariables2);Debug.locals.put("totalProdsVariables2", _totalprodsvariables2);
 BA.debugLineNum = 2184;BA.debugLine="Private prodsVariables As List = promoMap.get(\"pr";
Debug.ShouldStop(128);
_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 = 2185;BA.debugLine="Private prodsVariables2 As List = promoMap.get(\"p";
Debug.ShouldStop(256);
_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 = 2186;BA.debugLine="For p = 0 To prodsVariables.Size - 1";
Debug.ShouldStop(512);
{
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 = 2187;BA.debugLine="Private t As String = prodsVariables.Get(p) 'Obt";
Debug.ShouldStop(1024);
_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 = 2189;BA.debugLine="If inventarioSinFijos.ContainsKey(t) Then 'Si ex";
Debug.ShouldStop(4096);
if (_inventariosinfijos.runMethod(true,"ContainsKey",(Object)((_t))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 2190;BA.debugLine="Private p2 As String = inventarioSinFijos.Get(t";
Debug.ShouldStop(8192);
_p2 = BA.ObjectToString(_inventariosinfijos.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("p2", _p2);Debug.locals.put("p2", _p2);
 BA.debugLineNum = 2192;BA.debugLine="totalProdsVariables = totalProdsVariables + p2";
Debug.ShouldStop(32768);
_totalprodsvariables = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalprodsvariables,BA.numberCast(double.class, _p2)}, "+",1, 0));Debug.locals.put("totalProdsVariables", _totalprodsvariables);
 BA.debugLineNum = 2194;BA.debugLine="If thisLog Then Log($\"prod ${t}, hay: ${p2}\"$)";
Debug.ShouldStop(131072);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049676304",(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 = 2197;BA.debugLine="For p = 0 To prodsVariables2.Size - 1";
Debug.ShouldStop(1048576);
{
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 = 2198;BA.debugLine="Private t As String = prodsVariables2.Get(p) 'Ob";
Debug.ShouldStop(2097152);
_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 = 2199;BA.debugLine="If inventarioSinFijos.ContainsKey(t) Then 'Si ex";
Debug.ShouldStop(4194304);
if (_inventariosinfijos.runMethod(true,"ContainsKey",(Object)((_t))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 2200;BA.debugLine="Private p2 As String = inventarioSinFijos.Get(t";
Debug.ShouldStop(8388608);
_p2 = BA.ObjectToString(_inventariosinfijos.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("p2", _p2);Debug.locals.put("p2", _p2);
 BA.debugLineNum = 2201;BA.debugLine="totalProdsVariables2 = totalProdsVariables2 + p";
Debug.ShouldStop(16777216);
_totalprodsvariables2 = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalprodsvariables2,BA.numberCast(double.class, _p2)}, "+",1, 0));Debug.locals.put("totalProdsVariables2", _totalprodsvariables2);
 BA.debugLineNum = 2202;BA.debugLine="If thisLog Then Log($\"prod ${t}, hay: ${p2}\"$)";
Debug.ShouldStop(33554432);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049676312",(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 = 2205;BA.debugLine="If thisLog Then Log(\"Total prods variables=\" & to";
Debug.ShouldStop(268435456);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049676315",RemoteObject.concat(RemoteObject.createImmutable("Total prods variables="),_totalprodsvariables,RemoteObject.createImmutable(", requeridos="),_promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariablesRequeridos"))))),0);};
 BA.debugLineNum = 2206;BA.debugLine="If thisLog Then Log(\"Total prods variables2=\" & t";
Debug.ShouldStop(536870912);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049676316",RemoteObject.concat(RemoteObject.createImmutable("Total prods variables2="),_totalprodsvariables2,RemoteObject.createImmutable(", requeridos2="),_promomap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("prodsVariables2Requeridos"))))),0);};
 BA.debugLineNum = 2207;BA.debugLine="Private res As Boolean = False";
Debug.ShouldStop(1073741824);
_res = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res", _res);Debug.locals.put("res", _res);
 BA.debugLineNum = 2208;BA.debugLine="Private res1 As Boolean = False";
Debug.ShouldStop(-2147483648);
_res1 = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res1", _res1);Debug.locals.put("res1", _res1);
 BA.debugLineNum = 2209;BA.debugLine="Private res2 As Boolean = False";
Debug.ShouldStop(1);
_res2 = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res2", _res2);Debug.locals.put("res2", _res2);
 BA.debugLineNum = 2214;BA.debugLine="If totalProdsVariables > 0 And totalProdsVariable";
Debug.ShouldStop(32);
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 = 2215;BA.debugLine="res1 = True 'Si el total de inventario de produc";
Debug.ShouldStop(64);
_res1 = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res1", _res1);
 };
 BA.debugLineNum = 2217;BA.debugLine="If promoMap.Get(\"prodsVariablesRequeridos\").As (I";
Debug.ShouldStop(256);
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 = 2218;BA.debugLine="If totalProdsVariables2 > 0 And totalProdsVariabl";
Debug.ShouldStop(512);
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 = 2219;BA.debugLine="res2 = True 'Si el total de inventario de produc";
Debug.ShouldStop(1024);
_res2 = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res2", _res2);
 };
 BA.debugLineNum = 2221;BA.debugLine="If promoMap.Get(\"prodsVariables2Requeridos\").As(I";
Debug.ShouldStop(4096);
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 = 2222;BA.debugLine="If res1 And res2 Then 'Solo si son verdadero los";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean(".",_res1) && RemoteObject.solveBoolean(".",_res2)) { 
 BA.debugLineNum = 2223;BA.debugLine="res = True";
Debug.ShouldStop(16384);
_res = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("res", _res);
 }else {
 BA.debugLineNum = 2225;BA.debugLine="res = False";
Debug.ShouldStop(65536);
_res = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("res", _res);
 };
 BA.debugLineNum = 2228;BA.debugLine="Return res";
Debug.ShouldStop(524288);
if (true) return _res;
 BA.debugLineNum = 2229;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _bitacora(RemoteObject _ba,RemoteObject _fechab,RemoteObject _usuariob,RemoteObject _almacenb,RemoteObject _rutab,RemoteObject _eventob,RemoteObject _clienteb,RemoteObject _iniciob,RemoteObject _finb,RemoteObject _latitudb,RemoteObject _longitudb,RemoteObject _precision,RemoteObject _motivonoventa,RemoteObject _motivonovisita,RemoteObject _ban_geob) throws Exception{
try {
		Debug.PushSubsStack("bitacora (subs) ","subs",4,_ba,subs.mostCurrent,1415);
if (RapidSub.canDelegate("bitacora")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","bitacora", _ba, _fechab, _usuariob, _almacenb, _rutab, _eventob, _clienteb, _iniciob, _finb, _latitudb, _longitudb, _precision, _motivonoventa, _motivonovisita, _ban_geob);}
;
Debug.locals.put("fechab", _fechab);
Debug.locals.put("usuariob", _usuariob);
Debug.locals.put("almacenb", _almacenb);
Debug.locals.put("rutab", _rutab);
Debug.locals.put("eventob", _eventob);
Debug.locals.put("clienteb", _clienteb);
Debug.locals.put("iniciob", _iniciob);
Debug.locals.put("finb", _finb);
Debug.locals.put("latitudb", _latitudb);
Debug.locals.put("longitudb", _longitudb);
Debug.locals.put("precision", _precision);
Debug.locals.put("motivonoventa", _motivonoventa);
Debug.locals.put("motivonovisita", _motivonovisita);
Debug.locals.put("BAN_GEOB", _ban_geob);
 BA.debugLineNum = 1415;BA.debugLine="Sub bitacora(fechab As String, usuariob As String,";
Debug.ShouldStop(64);
 BA.debugLineNum = 1457;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borraarribade100errores(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraArribaDe100Errores (subs) ","subs",4,_ba,subs.mostCurrent,434);
if (RapidSub.canDelegate("borraarribade100errores")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borraarribade100errores", _ba);}
;
 BA.debugLineNum = 434;BA.debugLine="Sub borraArribaDe100Errores 'ignore";
Debug.ShouldStop(131072);
 BA.debugLineNum = 435;BA.debugLine="revisaBD";
Debug.ShouldStop(262144);
_revisabd(_ba);
 BA.debugLineNum = 436;BA.debugLine="LogColor(\"Borramos BD de log\", Colors.Magenta)";
Debug.ShouldStop(524288);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044826626",BA.ObjectToString("Borramos BD de log"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 437;BA.debugLine="errorLog.ExecNonQuery(\"DELETE FROM errores WHERE";
Debug.ShouldStop(1048576);
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 = 438;BA.debugLine="errorLog.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(2097152);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 439;BA.debugLine="Log(\"Borramos mas de 100 de errorLog\")";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044826629",RemoteObject.createImmutable("Borramos mas de 100 de errorLog"),0);
 BA.debugLineNum = 440;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
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",4,_ba,subs.mostCurrent,443);
if (RapidSub.canDelegate("borraarribade600renglonesbitacora")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borraarribade600renglonesbitacora", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 443;BA.debugLine="Sub borraArribaDe600RenglonesBitacora 'ignore";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 444;BA.debugLine="revisaBD";
Debug.ShouldStop(134217728);
_revisabd(_ba);
 BA.debugLineNum = 445;BA.debugLine="If Starter.logger Then LogColor(\"Recortamos la ta";
Debug.ShouldStop(268435456);
if (subs.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044892162",BA.ObjectToString("Recortamos la tabla de la Bitacora, limite de 600"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));};
 BA.debugLineNum = 446;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(536870912);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 447;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select fech";
Debug.ShouldStop(1073741824);
_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 fecha from bitacora"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 448;BA.debugLine="c.Position = 0";
Debug.ShouldStop(-2147483648);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 449;BA.debugLine="If c.RowCount > 650 Then";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 650))) { 
 BA.debugLineNum = 450;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
Debug.ShouldStop(2);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM bitacora WHERE fecha NOT in (SELECT fecha FROM bitacora ORDER BY fecha desc LIMIT 599 )")));
 BA.debugLineNum = 451;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(4);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 };
 BA.debugLineNum = 454;BA.debugLine="c.Close";
Debug.ShouldStop(32);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 455;BA.debugLine="End Sub";
Debug.ShouldStop(64);
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",4,_ba,subs.mostCurrent,318);
if (RapidSub.canDelegate("borralogdb")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borralogdb", _ba);}
;
 BA.debugLineNum = 318;BA.debugLine="Sub borraLogDB 'ignore";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 319;BA.debugLine="LogColor(\"Borramos BD de log\", Colors.Magenta)";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044630017",BA.ObjectToString("Borramos BD de log"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 320;BA.debugLine="kmt.ExecNonQuery(\"delete from bitacora\")";
Debug.ShouldStop(-2147483648);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from bitacora")));
 BA.debugLineNum = 321;BA.debugLine="kmt.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(1);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 322;BA.debugLine="End Sub";
Debug.ShouldStop(2);
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",4,_ba,subs.mostCurrent,193);
if (RapidSub.canDelegate("borramosarchivogps")) { return gunav2.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 = 193;BA.debugLine="Sub borramosArchivoGPS 'ignore";
Debug.ShouldStop(1);
 BA.debugLineNum = 194;BA.debugLine="Dim out As OutputStream = File.OpenOutput(File.Di";
Debug.ShouldStop(2);
_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,"getDirRootExternal")),(Object)(BA.ObjectToString("gps.txt")),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("out", _out);Debug.locals.put("out", _out);
 BA.debugLineNum = 195;BA.debugLine="Dim s As String = \"\"";
Debug.ShouldStop(4);
_s = BA.ObjectToString("");Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 196;BA.debugLine="Dim t() As Byte = s.GetBytes(\"UTF-8\")";
Debug.ShouldStop(8);
_t = _s.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF-8")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 197;BA.debugLine="out.WriteBytes(t, 0, t.Length)";
Debug.ShouldStop(16);
_out.runVoidMethod ("WriteBytes",(Object)(_t),(Object)(BA.numberCast(int.class, 0)),(Object)(_t.getField(true,"length")));
 BA.debugLineNum = 198;BA.debugLine="out.Close";
Debug.ShouldStop(32);
_out.runVoidMethod ("Close");
 BA.debugLineNum = 199;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borrapedidoclienteactual(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("borraPedidoClienteActual (subs) ","subs",4,_ba,subs.mostCurrent,722);
if (RapidSub.canDelegate("borrapedidoclienteactual")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","borrapedidoclienteactual", _ba);}
RemoteObject _thisc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 722;BA.debugLine="Sub borraPedidoClienteActual As String";
Debug.ShouldStop(131072);
 BA.debugLineNum = 736;BA.debugLine="Private thisC As Cursor";
Debug.ShouldStop(-2147483648);
_thisc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("thisC", _thisc);
 BA.debugLineNum = 738;BA.debugLine="thisC=Starter.skmt.ExecQuery(\"select PE_PROID, PE";
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_PROID, PE_CANT, PE_FOLIO FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> 'DUR'"))));Debug.locals.put("thisC", _thisc);
 BA.debugLineNum = 739;BA.debugLine="If thisC.RowCount>0 Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean(">",_thisc.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 740;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 = 741;BA.debugLine="thisC.Position = i";
Debug.ShouldStop(16);
_thisc.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 743;BA.debugLine="Starter.skmt.ExecNonQuery($\"update ${traeTablaP";
Debug.ShouldStop(64);
subs.mostCurrent._starter._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 = 744;BA.debugLine="LogColor($\"update ${traeTablaProds(thisC.GetStr";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046202902",(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 = 748;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_cli";
Debug.ShouldStop(2048);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 749;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido whe";
Debug.ShouldStop(4096);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)")));
 BA.debugLineNum = 750;BA.debugLine="Starter.skmt.ExecNonQuery(\"UPDATE kmt_info set ge";
Debug.ShouldStop(8192);
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 = 751;BA.debugLine="Return 1";
Debug.ShouldStop(16384);
if (true) return BA.NumberToString(1);
 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  _buscadbusuario(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("buscaDBUsuario (subs) ","subs",4,_ba,subs.mostCurrent,596);
if (RapidSub.canDelegate("buscadbusuario")) { return gunav2.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 = 596;BA.debugLine="Sub buscaDBUsuario As String 'ignore";
Debug.ShouldStop(524288);
 BA.debugLineNum = 597;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(1048576);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 598;BA.debugLine="Private usuario As String = \"SinUsuario\"";
Debug.ShouldStop(2097152);
_usuario = BA.ObjectToString("SinUsuario");Debug.locals.put("usuario", _usuario);Debug.locals.put("usuario", _usuario);
 BA.debugLineNum = 599;BA.debugLine="c=kmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(4194304);
_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 = 600;BA.debugLine="c.Position=0";
Debug.ShouldStop(8388608);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 601;BA.debugLine="If c.RowCount > 0 Then usuario = c.GetString(\"USU";
Debug.ShouldStop(16777216);
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 = 602;BA.debugLine="Return usuario";
Debug.ShouldStop(33554432);
if (true) return _usuario;
 BA.debugLineNum = 603;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango (subs) ","subs",4,_ba,subs.mostCurrent,2232);
if (RapidSub.canDelegate("calculatotalconpromoxrango")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango", _ba, _idcliente);}
RemoteObject _totalparcial = RemoteObject.createImmutable("");
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2232;BA.debugLine="Sub calculaTotalConPromoXRango(idCliente As String";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 2240;BA.debugLine="Private totalParcial As String = 0";
Debug.ShouldStop(-2147483648);
_totalparcial = BA.NumberToString(0);Debug.locals.put("totalParcial", _totalparcial);Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2241;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(1);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2242;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(2);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 *, ifnull(pe_reccant, 'N') as RECANT from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2243;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2244;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(8);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2246;BA.debugLine="cx.Position = i";
Debug.ShouldStop(32);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2247;BA.debugLine="Log(\"***************************************\")";
Debug.ShouldStop(64);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049741839",RemoteObject.createImmutable("***************************************"),0);
 BA.debugLineNum = 2248;BA.debugLine="If cx.getstring(\"RECANT\") = \"N\" Then ' Sin prod";
Debug.ShouldStop(128);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),BA.ObjectToString("N"))) { 
 BA.debugLineNum = 2249;BA.debugLine="totalParcial = cx.getstring(\"PE_COSTO_TOT\")";
Debug.ShouldStop(256);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else 
{ BA.debugLineNum = 2250;BA.debugLine="else if cx.getstring(\"RECANT\") = cx.getstring(\"";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))))) { 
 BA.debugLineNum = 2251;BA.debugLine="totalParcial = cx.getstring(\"PE_RECALCULOTOT\")";
Debug.ShouldStop(1024);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULOTOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else {
 BA.debugLineNum = 2253;BA.debugLine="totalParcial = ((cx.getstring(\"PE_CANT\") - cx.";
Debug.ShouldStop(4096);
_totalparcial = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0)),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))}, "+",1, 0));Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2254;BA.debugLine="Log($\"${((cx.getstring(\"PE_CANT\") - cx.getstri";
Debug.ShouldStop(8192);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049741846",(RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(" + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))))),RemoteObject.createImmutable(" "))),0);
 }}
;
 BA.debugLineNum = 2256;BA.debugLine="Log($\"Total:${total} + Total Parcial: ${totalPa";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049741848",(RemoteObject.concat(RemoteObject.createImmutable("Total:"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(" + Total Parcial: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalparcial))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2257;BA.debugLine="total = total + totalParcial";
Debug.ShouldStop(65536);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),BA.numberCast(double.class, _totalparcial)}, "+",1, 0));Debug.locals.put("total", _total);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2260;BA.debugLine="cx.Close";
Debug.ShouldStop(524288);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2261;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(1048576);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2262;BA.debugLine="Log($\"Total con promocXrango = ${total}\"$)";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049741854",(RemoteObject.concat(RemoteObject.createImmutable("Total con promocXrango = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2263;BA.debugLine="Return total";
Debug.ShouldStop(4194304);
if (true) return _total;
 BA.debugLineNum = 2264;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango1(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango1 (subs) ","subs",4,_ba,subs.mostCurrent,2267);
if (RapidSub.canDelegate("calculatotalconpromoxrango1")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango1", _ba, _idcliente);}
RemoteObject _totalparcial = RemoteObject.createImmutable("");
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2267;BA.debugLine="Sub calculaTotalConPromoXRango1(idCliente As Strin";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 2275;BA.debugLine="Private totalParcial As String = 0";
Debug.ShouldStop(4);
_totalparcial = BA.NumberToString(0);Debug.locals.put("totalParcial", _totalparcial);Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2276;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(8);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2277;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(16);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 *, ifnull(pe_reccant, 'N') as RECANT from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("' and PE_FUTURO = '1' "))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2278;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2279;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(64);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2281;BA.debugLine="cx.Position = i";
Debug.ShouldStop(256);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2283;BA.debugLine="If cx.getstring(\"RECANT\") = \"N\" Then ' Sin prod";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),BA.ObjectToString("N"))) { 
 BA.debugLineNum = 2284;BA.debugLine="totalParcial = cx.getstring(\"PE_COSTO_TOT\")";
Debug.ShouldStop(2048);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else 
{ BA.debugLineNum = 2285;BA.debugLine="else if cx.getstring(\"RECANT\") = cx.getstring(\"";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))))) { 
 BA.debugLineNum = 2286;BA.debugLine="totalParcial = cx.getstring(\"PE_RECALCULOTOT\")";
Debug.ShouldStop(8192);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULOTOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else {
 BA.debugLineNum = 2288;BA.debugLine="totalParcial = ((cx.getstring(\"PE_CANT\") - cx.";
Debug.ShouldStop(32768);
_totalparcial = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0)),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))}, "+",1, 0));Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2289;BA.debugLine="Log($\"${((cx.getstring(\"PE_CANT\") - cx.getstri";
Debug.ShouldStop(65536);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049807382",(RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(" + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))))),RemoteObject.createImmutable(" "))),0);
 }}
;
 BA.debugLineNum = 2292;BA.debugLine="total = total + totalParcial";
Debug.ShouldStop(524288);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),BA.numberCast(double.class, _totalparcial)}, "+",1, 0));Debug.locals.put("total", _total);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2295;BA.debugLine="cx.Close";
Debug.ShouldStop(4194304);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2296;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(8388608);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2298;BA.debugLine="Return total";
Debug.ShouldStop(33554432);
if (true) return _total;
 BA.debugLineNum = 2299;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango2(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango2 (subs) ","subs",4,_ba,subs.mostCurrent,2303);
if (RapidSub.canDelegate("calculatotalconpromoxrango2")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango2", _ba, _idcliente);}
RemoteObject _totalparcial = RemoteObject.createImmutable("");
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2303;BA.debugLine="Sub calculaTotalConPromoXRango2(idCliente As Strin";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 2311;BA.debugLine="Private totalParcial As String = 0";
Debug.ShouldStop(64);
_totalparcial = BA.NumberToString(0);Debug.locals.put("totalParcial", _totalparcial);Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2312;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(128);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2313;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(256);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 *, ifnull(pe_reccant, 'N') as RECANT from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("' and PE_FUTURO = '0'  "))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2314;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2315;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(1024);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2317;BA.debugLine="cx.Position = i";
Debug.ShouldStop(4096);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2318;BA.debugLine="Log(\"***************************************\")";
Debug.ShouldStop(8192);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049872911",RemoteObject.createImmutable("***************************************"),0);
 BA.debugLineNum = 2319;BA.debugLine="If cx.getstring(\"RECANT\") = \"N\" Then ' Sin prod";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),BA.ObjectToString("N"))) { 
 BA.debugLineNum = 2320;BA.debugLine="totalParcial = cx.getstring(\"PE_COSTO_TOT\")";
Debug.ShouldStop(32768);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else 
{ BA.debugLineNum = 2321;BA.debugLine="else if cx.getstring(\"RECANT\") = cx.getstring(\"";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))))) { 
 BA.debugLineNum = 2322;BA.debugLine="totalParcial = cx.getstring(\"PE_RECALCULOTOT\")";
Debug.ShouldStop(131072);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULOTOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else {
 BA.debugLineNum = 2324;BA.debugLine="totalParcial = ((cx.getstring(\"PE_CANT\") - cx.";
Debug.ShouldStop(524288);
_totalparcial = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0)),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))}, "+",1, 0));Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2325;BA.debugLine="Log($\"${((cx.getstring(\"PE_CANT\") - cx.getstri";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049872918",(RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(" + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))))),RemoteObject.createImmutable(" "))),0);
 }}
;
 BA.debugLineNum = 2327;BA.debugLine="Log($\"Total:${total} + Total Parcial: ${totalPa";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049872920",(RemoteObject.concat(RemoteObject.createImmutable("Total:"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(" + Total Parcial: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalparcial))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2328;BA.debugLine="total = total + totalParcial";
Debug.ShouldStop(8388608);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),BA.numberCast(double.class, _totalparcial)}, "+",1, 0));Debug.locals.put("total", _total);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2331;BA.debugLine="cx.Close";
Debug.ShouldStop(67108864);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2332;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(134217728);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2333;BA.debugLine="Log($\"Total con promocXrango = ${total}\"$)";
Debug.ShouldStop(268435456);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049872926",(RemoteObject.concat(RemoteObject.createImmutable("Total con promocXrango = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2334;BA.debugLine="Return total";
Debug.ShouldStop(536870912);
if (true) return _total;
 BA.debugLineNum = 2335;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango3(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango3 (subs) ","subs",4,_ba,subs.mostCurrent,2338);
if (RapidSub.canDelegate("calculatotalconpromoxrango3")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango3", _ba, _idcliente);}
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
RemoteObject _precioprom = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2338;BA.debugLine="Sub calculaTotalConPromoXRango3(idCliente As Strin";
Debug.ShouldStop(2);
 BA.debugLineNum = 2347;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(1024);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2348;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(2048);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 * from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("' and PE_FUTURO = '0' AND PE_PROID <> PE_CEDIS "))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2349;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2350;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(8192);
{
final int step4 = 1;
final int limit4 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2352;BA.debugLine="cx.Position = i";
Debug.ShouldStop(32768);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2353;BA.debugLine="Log(\"***************************************\")";
Debug.ShouldStop(65536);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049938447",RemoteObject.createImmutable("***************************************"),0);
 BA.debugLineNum = 2355;BA.debugLine="Dim precioprom As Cursor = Starter.skmt.ExecQue";
Debug.ShouldStop(262144);
_precioprom = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_precioprom = 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 CAT_GP_PRECIO FROM CAT_GUNAPROD WHERE CAT_GP_NOMBRE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PRONOMBRE")))))),RemoteObject.createImmutable("' "))))));Debug.locals.put("precioprom", _precioprom);Debug.locals.put("precioprom", _precioprom);
 BA.debugLineNum = 2356;BA.debugLine="If precioprom.RowCount > 0 Then";
Debug.ShouldStop(524288);
if (RemoteObject.solveBoolean(">",_precioprom.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2357;BA.debugLine="precioprom.Position = 0";
Debug.ShouldStop(1048576);
_precioprom.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2358;BA.debugLine="Log (precioprom.GETSTRING(\"CAT_GP_PRECIO\"))";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049938452",_precioprom.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO"))),0);
 BA.debugLineNum = 2359;BA.debugLine="Log (cx.GETSTRING(\"PE_CANT\"))";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049938453",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))),0);
 BA.debugLineNum = 2360;BA.debugLine="Log (cx.GETSTRING(\"PE_PRONOMBRE\"))";
Debug.ShouldStop(8388608);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049938454",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PRONOMBRE"))),0);
 BA.debugLineNum = 2362;BA.debugLine="total = total + ((cx.GETSTRING(\"PE_CANT\")*prec";
Debug.ShouldStop(33554432);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _precioprom.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO"))))}, "*",0, 0)))}, "+",1, 0));Debug.locals.put("total", _total);
 };
 BA.debugLineNum = 2366;BA.debugLine="Log($\"Total:${total} \"$)";
Debug.ShouldStop(536870912);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049938460",(RemoteObject.concat(RemoteObject.createImmutable("Total:"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(" "))),0);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2370;BA.debugLine="cx.Close";
Debug.ShouldStop(2);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2371;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(4);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2372;BA.debugLine="Log($\"Total con promocXrango = ${total}\"$)";
Debug.ShouldStop(8);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049938466",(RemoteObject.concat(RemoteObject.createImmutable("Total con promocXrango = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2373;BA.debugLine="Return total";
Debug.ShouldStop(16);
if (true) return _total;
 BA.debugLineNum = 2374;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango4(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango4 (subs) ","subs",4,_ba,subs.mostCurrent,2377);
if (RapidSub.canDelegate("calculatotalconpromoxrango4")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango4", _ba, _idcliente);}
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
RemoteObject _precioprom = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2377;BA.debugLine="Sub calculaTotalConPromoXRango4(idCliente As Strin";
Debug.ShouldStop(256);
 BA.debugLineNum = 2386;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(131072);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2387;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(262144);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 * from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("' and PE_FUTURO = '1' AND PE_PROID <> PE_CEDIS "))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2388;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(524288);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2389;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(1048576);
{
final int step4 = 1;
final int limit4 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2391;BA.debugLine="cx.Position = i";
Debug.ShouldStop(4194304);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2394;BA.debugLine="Dim precioprom As Cursor = Starter.skmt.ExecQue";
Debug.ShouldStop(33554432);
_precioprom = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_precioprom = 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 CAT_GP_PRECIO FROM CAT_GUNAPROD WHERE CAT_GP_NOMBRE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PRONOMBRE")))))),RemoteObject.createImmutable("' "))))));Debug.locals.put("precioprom", _precioprom);Debug.locals.put("precioprom", _precioprom);
 BA.debugLineNum = 2395;BA.debugLine="If precioprom.RowCount > 0 Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean(">",_precioprom.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2396;BA.debugLine="precioprom.Position = 0";
Debug.ShouldStop(134217728);
_precioprom.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2402;BA.debugLine="total = total + ((cx.GETSTRING(\"PE_CANT\")*prec";
Debug.ShouldStop(2);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _precioprom.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO"))))}, "*",0, 0)))}, "+",1, 0));Debug.locals.put("total", _total);
 };
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2410;BA.debugLine="cx.Close";
Debug.ShouldStop(512);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2411;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(1024);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2413;BA.debugLine="Return total";
Debug.ShouldStop(4096);
if (true) return _total;
 BA.debugLineNum = 2414;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango5(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango5 (subs) ","subs",4,_ba,subs.mostCurrent,2417);
if (RapidSub.canDelegate("calculatotalconpromoxrango5")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango5", _ba, _idcliente);}
RemoteObject _totalparcial = RemoteObject.createImmutable("");
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2417;BA.debugLine="Sub calculaTotalConPromoXRango5(idCliente As Strin";
Debug.ShouldStop(65536);
 BA.debugLineNum = 2425;BA.debugLine="Private totalParcial As String = 0";
Debug.ShouldStop(16777216);
_totalparcial = BA.NumberToString(0);Debug.locals.put("totalParcial", _totalparcial);Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2426;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(33554432);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2427;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(67108864);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 *, ifnull(pe_reccant, 'N') as RECANT from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("' and PE_PROID IN (SELECT CAT_GP_ID FROM CAT_GUNAPROD WHERE CAT_GP_TIPO = 'CIGARRO')"))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2428;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2429;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(268435456);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2431;BA.debugLine="cx.Position = i";
Debug.ShouldStop(1073741824);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2433;BA.debugLine="If cx.getstring(\"RECANT\") = \"N\" Then ' Sin prod";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),BA.ObjectToString("N"))) { 
 BA.debugLineNum = 2434;BA.debugLine="totalParcial = cx.getstring(\"PE_COSTO_TOT\")";
Debug.ShouldStop(2);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else 
{ BA.debugLineNum = 2435;BA.debugLine="else if cx.getstring(\"RECANT\") = cx.getstring(\"";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))))) { 
 BA.debugLineNum = 2436;BA.debugLine="totalParcial = cx.getstring(\"PE_RECALCULOTOT\")";
Debug.ShouldStop(8);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULOTOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else {
 BA.debugLineNum = 2438;BA.debugLine="totalParcial = ((cx.getstring(\"PE_CANT\") - cx.";
Debug.ShouldStop(32);
_totalparcial = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0)),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))}, "+",1, 0));Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2439;BA.debugLine="Log($\"${((cx.getstring(\"PE_CANT\") - cx.getstri";
Debug.ShouldStop(64);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050069526",(RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(" + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))))),RemoteObject.createImmutable(" "))),0);
 }}
;
 BA.debugLineNum = 2442;BA.debugLine="total = total + totalParcial";
Debug.ShouldStop(512);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),BA.numberCast(double.class, _totalparcial)}, "+",1, 0));Debug.locals.put("total", _total);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2445;BA.debugLine="cx.Close";
Debug.ShouldStop(4096);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2446;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(8192);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2448;BA.debugLine="Return total";
Debug.ShouldStop(32768);
if (true) return _total;
 BA.debugLineNum = 2449;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _calculatotalconpromoxrango6(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("calculaTotalConPromoXRango6 (subs) ","subs",4,_ba,subs.mostCurrent,2453);
if (RapidSub.canDelegate("calculatotalconpromoxrango6")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","calculatotalconpromoxrango6", _ba, _idcliente);}
RemoteObject _totalparcial = RemoteObject.createImmutable("");
RemoteObject _total = RemoteObject.createImmutable("");
RemoteObject _cx = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 2453;BA.debugLine="Sub calculaTotalConPromoXRango6(idCliente As Strin";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 2461;BA.debugLine="Private totalParcial As String = 0";
Debug.ShouldStop(268435456);
_totalparcial = BA.NumberToString(0);Debug.locals.put("totalParcial", _totalparcial);Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2462;BA.debugLine="Private total As String = 0";
Debug.ShouldStop(536870912);
_total = BA.NumberToString(0);Debug.locals.put("total", _total);Debug.locals.put("total", _total);
 BA.debugLineNum = 2463;BA.debugLine="Private cx As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(1073741824);
_cx = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cx = 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 *, ifnull(pe_reccant, 'N') as RECANT from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("' AND PE_PROID IN (SELECT CAT_GP_ID FROM CAT_GUNAPROD WHERE CAT_GP_TIPO = 'PARTNERSHIP') "))))));Debug.locals.put("cx", _cx);Debug.locals.put("cx", _cx);
 BA.debugLineNum = 2464;BA.debugLine="If cx.RowCount > 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean(">",_cx.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2465;BA.debugLine="For i = 0 To cx.RowCount - 1";
Debug.ShouldStop(1);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_cx.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 = 2467;BA.debugLine="cx.Position = i";
Debug.ShouldStop(4);
_cx.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2468;BA.debugLine="Log(\"***************************************\")";
Debug.ShouldStop(8);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050135055",RemoteObject.createImmutable("***************************************"),0);
 BA.debugLineNum = 2469;BA.debugLine="If cx.getstring(\"RECANT\") = \"N\" Then ' Sin prod";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),BA.ObjectToString("N"))) { 
 BA.debugLineNum = 2470;BA.debugLine="totalParcial = cx.getstring(\"PE_COSTO_TOT\")";
Debug.ShouldStop(32);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else 
{ BA.debugLineNum = 2471;BA.debugLine="else if cx.getstring(\"RECANT\") = cx.getstring(\"";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("RECANT"))),_cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))))) { 
 BA.debugLineNum = 2472;BA.debugLine="totalParcial = cx.getstring(\"PE_RECALCULOTOT\")";
Debug.ShouldStop(128);
_totalparcial = _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULOTOT")));Debug.locals.put("totalParcial", _totalparcial);
 }else {
 BA.debugLineNum = 2474;BA.debugLine="totalParcial = ((cx.getstring(\"PE_CANT\") - cx.";
Debug.ShouldStop(512);
_totalparcial = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0)),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))}, "+",1, 0));Debug.locals.put("totalParcial", _totalparcial);
 BA.debugLineNum = 2475;BA.debugLine="Log($\"${((cx.getstring(\"PE_CANT\") - cx.getstri";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050135062",(RemoteObject.concat(RemoteObject.createImmutable(""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "-",1, 0)),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTOU"))))}, "*",0, 0))))),RemoteObject.createImmutable(" + "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECALCULO")))),BA.numberCast(double.class, _cx.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_RECCANT"))))}, "*",0, 0))))),RemoteObject.createImmutable(" "))),0);
 }}
;
 BA.debugLineNum = 2477;BA.debugLine="Log($\"Total:${total} + Total Parcial: ${totalPa";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050135064",(RemoteObject.concat(RemoteObject.createImmutable("Total:"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(" + Total Parcial: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalparcial))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2478;BA.debugLine="total = total + totalParcial";
Debug.ShouldStop(8192);
_total = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _total),BA.numberCast(double.class, _totalparcial)}, "+",1, 0));Debug.locals.put("total", _total);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 2481;BA.debugLine="cx.Close";
Debug.ShouldStop(65536);
_cx.runVoidMethod ("Close");
 BA.debugLineNum = 2482;BA.debugLine="total = NumberFormat2(total, 1, 2, 2, False)";
Debug.ShouldStop(131072);
_total = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _total)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("total", _total);
 BA.debugLineNum = 2483;BA.debugLine="Log($\"Total con promocXrango = ${total}\"$)";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050135070",(RemoteObject.concat(RemoteObject.createImmutable("Total con promocXrango = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_total))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 2484;BA.debugLine="Return total";
Debug.ShouldStop(524288);
if (true) return _total;
 BA.debugLineNum = 2485;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centraedittext(RemoteObject _ba,RemoteObject _elemento,RemoteObject _anchoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraEditText (subs) ","subs",4,_ba,subs.mostCurrent,591);
if (RapidSub.canDelegate("centraedittext")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centraedittext", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 591;BA.debugLine="Sub centraEditText(elemento As EditText, anchoElem";
Debug.ShouldStop(16384);
 BA.debugLineNum = 592;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(32768);
_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 = 593;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
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",4,_ba,subs.mostCurrent,572);
if (RapidSub.canDelegate("centraetiqueta")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centraetiqueta", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 572;BA.debugLine="Sub centraEtiqueta(elemento As Label, anchoElement";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 573;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(268435456);
_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 = 574;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _centralistview(RemoteObject _ba,RemoteObject _elemento,RemoteObject _anchoelementosuperior) throws Exception{
try {
		Debug.PushSubsStack("centraListView (subs) ","subs",4,_ba,subs.mostCurrent,52);
if (RapidSub.canDelegate("centralistview")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centralistview", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 52;BA.debugLine="Sub centraListView(elemento As ListView, anchoElem";
Debug.ShouldStop(524288);
 BA.debugLineNum = 53;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 = 54;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
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",4,_ba,subs.mostCurrent,577);
if (RapidSub.canDelegate("centrapanel")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centrapanel", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 577;BA.debugLine="Sub centraPanel(elemento As Panel, anchoElementoSu";
Debug.ShouldStop(1);
 BA.debugLineNum = 578;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(2);
_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 = 579;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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",4,_ba,subs.mostCurrent,582);
if (RapidSub.canDelegate("centrapanelv")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centrapanelv", _ba, _elemento, _altoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("altoElementoSuperior", _altoelementosuperior);
 BA.debugLineNum = 582;BA.debugLine="Sub centraPanelV(elemento As Panel, altoElementoSu";
Debug.ShouldStop(32);
 BA.debugLineNum = 583;BA.debugLine="elemento.Top = Round(altoElementoSuperior/2)-(ele";
Debug.ShouldStop(64);
_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 = 584;BA.debugLine="End Sub";
Debug.ShouldStop(128);
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",4,_ba,subs.mostCurrent,587);
if (RapidSub.canDelegate("centraprogressbar")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","centraprogressbar", _ba, _elemento, _anchoelementosuperior);}
;
Debug.locals.put("elemento", _elemento);
Debug.locals.put("anchoElementoSuperior", _anchoelementosuperior);
 BA.debugLineNum = 587;BA.debugLine="Sub centraProgressBar(elemento As ProgressBar, anc";
Debug.ShouldStop(1024);
 BA.debugLineNum = 588;BA.debugLine="elemento.Left = Round(anchoElementoSuperior/2)-(e";
Debug.ShouldStop(2048);
_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 = 589;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
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",4,_ba,subs.mostCurrent,58);
if (RapidSub.canDelegate("compress")) { return gunav2.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 = 58;BA.debugLine="Sub compress(str As String) As String 'ignore";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 60;BA.debugLine="Dim compressed() As Byte = GZip.compress(str)";
Debug.ShouldStop(134217728);
_compressed = subs._gzip.runMethod(false,"compress",(Object)(_str));Debug.locals.put("compressed", _compressed);Debug.locals.put("compressed", _compressed);
 BA.debugLineNum = 63;BA.debugLine="Dim base64 As String = su.EncodeBase64(compressed";
Debug.ShouldStop(1073741824);
_base64 = subs._su.runMethod(true,"EncodeBase64",(Object)(_compressed));Debug.locals.put("base64", _base64);Debug.locals.put("base64", _base64);
 BA.debugLineNum = 64;BA.debugLine="Log($\"Comprimido: ${base64.Length}\"$)";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043319302",(RemoteObject.concat(RemoteObject.createImmutable("Comprimido: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_base64.runMethod(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 66;BA.debugLine="Return base64";
Debug.ShouldStop(2);
if (true) return _base64;
 BA.debugLineNum = 67;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _copiadb(RemoteObject _ba,RemoteObject _result) throws Exception{
try {
		Debug.PushSubsStack("copiaDB (subs) ","subs",4,_ba,subs.mostCurrent,530);
if (RapidSub.canDelegate("copiadb")) { return gunav2.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 = 530;BA.debugLine="Sub copiaDB(result As Boolean) 'ignore";
Debug.ShouldStop(131072);
 BA.debugLineNum = 531;BA.debugLine="ToastMessageShow(\"copiaDB\", False)";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("copiaDB")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 532;BA.debugLine="If result Then";
Debug.ShouldStop(524288);
if (_result.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 533;BA.debugLine="Dim p As String";
Debug.ShouldStop(1048576);
_p = RemoteObject.createImmutable("");Debug.locals.put("p", _p);
 BA.debugLineNum = 534;BA.debugLine="If File.ExternalWritable Then";
Debug.ShouldStop(2097152);
if (subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getExternalWritable").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 535;BA.debugLine="p = File.DirRootExternal";
Debug.ShouldStop(4194304);
_p = subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirRootExternal");Debug.locals.put("p", _p);
 }else {
 BA.debugLineNum = 538;BA.debugLine="p = File.DirInternal";
Debug.ShouldStop(33554432);
_p = subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");Debug.locals.put("p", _p);
 };
 BA.debugLineNum = 541;BA.debugLine="Dim theDir As String";
Debug.ShouldStop(268435456);
_thedir = RemoteObject.createImmutable("");Debug.locals.put("theDir", _thedir);
 BA.debugLineNum = 542;BA.debugLine="Try";
Debug.ShouldStop(536870912);
try { BA.debugLineNum = 543;BA.debugLine="File.MakeDir(File.DirRootExternal,\"kmts\")";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("MakeDir",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirRootExternal")),(Object)(RemoteObject.createImmutable("kmts")));
 BA.debugLineNum = 544;BA.debugLine="theDir = \"/kmts\"";
Debug.ShouldStop(-2147483648);
_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 = 546;BA.debugLine="theDir = \"\"";
Debug.ShouldStop(2);
_thedir = BA.ObjectToString("");Debug.locals.put("theDir", _thedir);
 };
 BA.debugLineNum = 548;BA.debugLine="Try";
Debug.ShouldStop(8);
try { BA.debugLineNum = 549;BA.debugLine="File.Copy(File.DirInternal,\"kmt.db\",File.DirRoo";
Debug.ShouldStop(16);
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,"getDirRootExternal"),_thedir)),(Object)(RemoteObject.createImmutable("cedex_kmt.db")));
 BA.debugLineNum = 550;BA.debugLine="File.Copy(File.DirInternal,\"errorLog.db\",File.D";
Debug.ShouldStop(32);
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,"getDirRootExternal"),_thedir)),(Object)(RemoteObject.createImmutable("cedex_errorLog.db")));
 BA.debugLineNum = 551;BA.debugLine="ToastMessageShow(\"BD copiada!\", False)";
Debug.ShouldStop(64);
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 = 553;BA.debugLine="ToastMessageShow(\"No se pudo hacer la copia: \"&";
Debug.ShouldStop(256);
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 = 555;BA.debugLine="Log(\"rootExternal=\"&p)";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045219865",RemoteObject.concat(RemoteObject.createImmutable("rootExternal="),_p),0);
 BA.debugLineNum = 556;BA.debugLine="Log(\"File.DirInternal=\"&File.DirInternal)";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045219866",RemoteObject.concat(RemoteObject.createImmutable("File.DirInternal="),subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),0);
 BA.debugLineNum = 557;BA.debugLine="Log(\"File.DirRootExternal=\"&File.DirRootExternal";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045219867",RemoteObject.concat(RemoteObject.createImmutable("File.DirRootExternal="),subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirRootExternal")),0);
 }else {
 BA.debugLineNum = 559;BA.debugLine="ToastMessageShow(\"Sin permisos\", False)";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Sin permisos")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 };
 BA.debugLineNum = 561;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
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",4,_ba,subs.mostCurrent,1244);
if (RapidSub.canDelegate("cuantosvariablestengobd")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","cuantosvariablestengobd", _ba, _promo);}
;
Debug.locals.put("promo", _promo);
 BA.debugLineNum = 1244;BA.debugLine="Sub cuantosVariablesTengoBD(promo As String) As St";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 1255;BA.debugLine="End Sub";
Debug.ShouldStop(64);
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",4,_ba,subs.mostCurrent,468);
if (RapidSub.canDelegate("dameerroresjson")) { return gunav2.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 = 468;BA.debugLine="Sub dameErroresJSON(SQL As SQL, maxErrores As Int,";
Debug.ShouldStop(524288);
 BA.debugLineNum = 469;BA.debugLine="Log(\"dameErroresJSON\")";
Debug.ShouldStop(1048576);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045023233",RemoteObject.createImmutable("dameErroresJSON"),0);
 BA.debugLineNum = 470;BA.debugLine="Private j As JSONGenerator";
Debug.ShouldStop(2097152);
_j = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser.JSONGenerator");Debug.locals.put("j", _j);
 BA.debugLineNum = 471;BA.debugLine="Private lim As String";
Debug.ShouldStop(4194304);
_lim = RemoteObject.createImmutable("");Debug.locals.put("lim", _lim);
 BA.debugLineNum = 472;BA.debugLine="Private cur As ResultSet";
Debug.ShouldStop(8388608);
_cur = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");Debug.locals.put("cur", _cur);
 BA.debugLineNum = 473;BA.debugLine="Private l As List";
Debug.ShouldStop(16777216);
_l = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("l", _l);
 BA.debugLineNum = 474;BA.debugLine="Private i As Int = 0";
Debug.ShouldStop(33554432);
_i = BA.numberCast(int.class, 0);Debug.locals.put("i", _i);Debug.locals.put("i", _i);
 BA.debugLineNum = 475;BA.debugLine="l.Initialize";
Debug.ShouldStop(67108864);
_l.runVoidMethod ("Initialize");
 BA.debugLineNum = 476;BA.debugLine="Dim m, m2 As Map";
Debug.ShouldStop(134217728);
_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 = 477;BA.debugLine="m2.Initialize";
Debug.ShouldStop(268435456);
_m2.runVoidMethod ("Initialize");
 BA.debugLineNum = 478;BA.debugLine="If maxErrores = 0 Then lim = \"\" Else lim = \"limit";
Debug.ShouldStop(536870912);
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 = 479;BA.debugLine="cur = SQL.ExecQuery(\"select * from errores order";
Debug.ShouldStop(1073741824);
_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 = 480;BA.debugLine="Do While cur.NextRow";
Debug.ShouldStop(-2147483648);
while (_cur.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 481;BA.debugLine="m.Initialize";
Debug.ShouldStop(1);
_m.runVoidMethod ("Initialize");
 BA.debugLineNum = 482;BA.debugLine="m.Put(\"fecha\", cur.GetString(\"fecha\"))";
Debug.ShouldStop(2);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("fecha"))),(Object)((_cur.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fecha"))))));
 BA.debugLineNum = 483;BA.debugLine="m.Put(\"error\", cur.GetString(\"error\"))";
Debug.ShouldStop(4);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("error"))),(Object)((_cur.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("error"))))));
 BA.debugLineNum = 484;BA.debugLine="m2.Put(i,m)";
Debug.ShouldStop(8);
_m2.runVoidMethod ("Put",(Object)((_i)),(Object)((_m.getObject())));
 BA.debugLineNum = 485;BA.debugLine="i = i + 1";
Debug.ShouldStop(16);
_i = RemoteObject.solve(new RemoteObject[] {_i,RemoteObject.createImmutable(1)}, "+",1, 1);Debug.locals.put("i", _i);
 }
;
 BA.debugLineNum = 487;BA.debugLine="cur.Close";
Debug.ShouldStop(64);
_cur.runVoidMethod ("Close");
 BA.debugLineNum = 488;BA.debugLine="j.Initialize(m2)";
Debug.ShouldStop(128);
_j.runVoidMethod ("Initialize",(Object)(_m2));
 BA.debugLineNum = 489;BA.debugLine="Log(j.ToString)";
Debug.ShouldStop(256);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045023253",_j.runMethod(true,"ToString"),0);
 BA.debugLineNum = 490;BA.debugLine="If comprimido Then";
Debug.ShouldStop(512);
if (_comprimido.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 491;BA.debugLine="Return compress(j.ToString)";
Debug.ShouldStop(1024);
if (true) return _compress(_ba,_j.runMethod(true,"ToString"));
 }else {
 BA.debugLineNum = 493;BA.debugLine="Return j.ToString";
Debug.ShouldStop(4096);
if (true) return _j.runMethod(true,"ToString");
 };
 BA.debugLineNum = 495;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
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",4,_ba,subs.mostCurrent,149);
if (RapidSub.canDelegate("dameruta")) { return gunav2.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 = 149;BA.debugLine="Sub dameRuta(inicioRuta As String, origenRuta As S";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 151;BA.debugLine="Dim fechaInicio As String";
Debug.ShouldStop(4194304);
_fechainicio = RemoteObject.createImmutable("");Debug.locals.put("fechaInicio", _fechainicio);
 BA.debugLineNum = 152;BA.debugLine="Try 'incioRuta es numero";
Debug.ShouldStop(8388608);
try { BA.debugLineNum = 153;BA.debugLine="inicioRuta = inicioRuta * 1";
Debug.ShouldStop(16777216);
_inicioruta = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _inicioruta),RemoteObject.createImmutable(1)}, "*",0, 0));Debug.locals.put("inicioRuta", _inicioruta);
 BA.debugLineNum = 155;BA.debugLine="fechaInicio = fechaKMT(DateTime.Now - (DateTime.";
Debug.ShouldStop(67108864);
_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 = 157;BA.debugLine="fechaInicio = fechaInicioHoy";
Debug.ShouldStop(268435456);
_fechainicio = _fechainiciohoy(_ba);Debug.locals.put("fechaInicio", _fechainicio);
 };
 BA.debugLineNum = 160;BA.debugLine="If subsLogs Then Log(\"fechaInicio: \"&fechaInicio&";
Debug.ShouldStop(-2147483648);
if (subs._subslogs.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043778059",RemoteObject.concat(RemoteObject.createImmutable("fechaInicio: "),_fechainicio,RemoteObject.createImmutable(" | rutaHrsAtras="),subs._rutahrsatras),0);};
 BA.debugLineNum = 161;BA.debugLine="Dim c As Cursor";
Debug.ShouldStop(1);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 162;BA.debugLine="If kmt.IsInitialized = False Then kmt.Initialize(";
Debug.ShouldStop(2);
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 = 163;BA.debugLine="If subsLogs Then Log(\"select FECHA, LAT, LON from";
Debug.ShouldStop(4);
if (subs._subslogs.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043778062",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 = 164;BA.debugLine="c = kmt.ExecQuery(\"select FECHA, LAT, LON from \"&";
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.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 = 165;BA.debugLine="c.Position = 0";
Debug.ShouldStop(16);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 166;BA.debugLine="Dim ruta2 As String = \"\"";
Debug.ShouldStop(32);
_ruta2 = BA.ObjectToString("");Debug.locals.put("ruta2", _ruta2);Debug.locals.put("ruta2", _ruta2);
 BA.debugLineNum = 167;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 168;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(128);
{
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 = 169;BA.debugLine="c.Position=i";
Debug.ShouldStop(256);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 170;BA.debugLine="ruta2=ruta2&CRLF&c.GetString(\"LAT\")&\",\"&c.GetSt";
Debug.ShouldStop(512);
_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 = 171;BA.debugLine="B4XPages.MainPage.fechaRuta = c.GetString(\"FECH";
Debug.ShouldStop(1024);
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 = 174;BA.debugLine="c.Close";
Debug.ShouldStop(8192);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 175;BA.debugLine="Return compress(ruta2)";
Debug.ShouldStop(16384);
if (true) return _compress(_ba,_ruta2);
 BA.debugLineNum = 176;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
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",4,_ba,subs.mostCurrent,606);
if (RapidSub.canDelegate("dameusuariodedb")) { return gunav2.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 = 606;BA.debugLine="Sub dameUsuarioDeDB As String 'ignore";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 607;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(1073741824);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 608;BA.debugLine="Private u As String = \"SinUsuario\"";
Debug.ShouldStop(-2147483648);
_u = BA.ObjectToString("SinUsuario");Debug.locals.put("u", _u);Debug.locals.put("u", _u);
 BA.debugLineNum = 609;BA.debugLine="If Not(kmt.IsInitialized) Then revisaBD";
Debug.ShouldStop(1);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._kmt.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
_revisabd(_ba);};
 BA.debugLineNum = 610;BA.debugLine="c=kmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(2);
_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 = 611;BA.debugLine="c.Position=0";
Debug.ShouldStop(4);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 612;BA.debugLine="If c.RowCount > 0 Then u = c.GetString(\"USUARIO\")";
Debug.ShouldStop(8);
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 = 613;BA.debugLine="c.Close";
Debug.ShouldStop(16);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 614;BA.debugLine="Return u";
Debug.ShouldStop(32);
if (true) return _u;
 BA.debugLineNum = 615;BA.debugLine="End Sub";
Debug.ShouldStop(64);
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",4,_ba,subs.mostCurrent,70);
if (RapidSub.canDelegate("decompress")) { return gunav2.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 = 70;BA.debugLine="Sub decompress(base64 As String) As String 'ignore";
Debug.ShouldStop(32);
 BA.debugLineNum = 71;BA.debugLine="Dim decompressedbytes() As Byte = su.DecodeBase64";
Debug.ShouldStop(64);
_decompressedbytes = subs._su.runMethod(false,"DecodeBase64",(Object)(_base64));Debug.locals.put("decompressedbytes", _decompressedbytes);Debug.locals.put("decompressedbytes", _decompressedbytes);
 BA.debugLineNum = 73;BA.debugLine="Dim bc As ByteConverter";
Debug.ShouldStop(256);
_bc = RemoteObject.createNew ("anywheresoftware.b4a.agraham.byteconverter.ByteConverter");Debug.locals.put("bc", _bc);
 BA.debugLineNum = 74;BA.debugLine="Dim uncompressed As String = bc.StringFromBytes(d";
Debug.ShouldStop(512);
_uncompressed = _bc.runMethod(true,"StringFromBytes",(Object)(_decompressedbytes),(Object)(RemoteObject.createImmutable("UTF8")));Debug.locals.put("uncompressed", _uncompressed);Debug.locals.put("uncompressed", _uncompressed);
 BA.debugLineNum = 75;BA.debugLine="Log($\"Descomprimido: ${uncompressed.Length}\"$)";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043384837",(RemoteObject.concat(RemoteObject.createImmutable("Descomprimido: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_uncompressed.runMethod(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 77;BA.debugLine="Return uncompressed";
Debug.ShouldStop(4096);
if (true) return _uncompressed;
 BA.debugLineNum = 78;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
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",4,_ba,subs.mostCurrent,186);
if (RapidSub.canDelegate("deleteerrorlog_db")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","deleteerrorlog_db", _ba);}
;
 BA.debugLineNum = 186;BA.debugLine="Sub deleteErrorLog_DB 'ignore";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 187;BA.debugLine="errorLog.ExecNonQuery(\"delete from errores\")";
Debug.ShouldStop(67108864);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from errores")));
 BA.debugLineNum = 188;BA.debugLine="errorLog.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(134217728);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 189;BA.debugLine="ToastMessageShow(\"BD Errores Borrada\", False)";
Debug.ShouldStop(268435456);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("BD Errores Borrada")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 190;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _deletefolder(RemoteObject _ba,RemoteObject _folder) throws Exception{
try {
		Debug.PushSubsStack("deleteFolder (subs) ","subs",4,_ba,subs.mostCurrent,1913);
if (RapidSub.canDelegate("deletefolder")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","deletefolder", _ba, _folder);}
RemoteObject _f = RemoteObject.createImmutable("");
;
Debug.locals.put("folder", _folder);
 BA.debugLineNum = 1913;BA.debugLine="Sub deleteFolder(folder As String)";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 1914;BA.debugLine="Log(\"Borrando \" & folder)";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049217537",RemoteObject.concat(RemoteObject.createImmutable("Borrando "),_folder),0);
 BA.debugLineNum = 1915;BA.debugLine="For Each f As String In File.ListFiles(folder)";
Debug.ShouldStop(67108864);
{
final RemoteObject group2 = subs.mostCurrent.__c.getField(false,"File").runMethod(false,"ListFiles",(Object)(_folder));
final int groupLen2 = group2.runMethod(true,"getSize").<Integer>get()
;int index2 = 0;
;
for (; index2 < groupLen2;index2++){
_f = BA.ObjectToString(group2.runMethod(false,"Get",index2));Debug.locals.put("f", _f);
Debug.locals.put("f", _f);
 BA.debugLineNum = 1916;BA.debugLine="Log(f)";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049217539",_f,0);
 BA.debugLineNum = 1917;BA.debugLine="If File.IsDirectory(folder, f) Then";
Debug.ShouldStop(268435456);
if (subs.mostCurrent.__c.getField(false,"File").runMethod(true,"IsDirectory",(Object)(_folder),(Object)(_f)).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1918;BA.debugLine="deleteFolder(File.Combine(folder, f))";
Debug.ShouldStop(536870912);
_deletefolder(_ba,subs.mostCurrent.__c.getField(false,"File").runMethod(true,"Combine",(Object)(_folder),(Object)(_f)));
 BA.debugLineNum = 1919;BA.debugLine="Log($\"Borramos ${File.Combine(folder, f)}\"$)";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049217542",(RemoteObject.concat(RemoteObject.createImmutable("Borramos "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent.__c.getField(false,"File").runMethod(true,"Combine",(Object)(_folder),(Object)(_f))))),RemoteObject.createImmutable(""))),0);
 };
 BA.debugLineNum = 1921;BA.debugLine="File.Delete(folder, f)";
Debug.ShouldStop(1);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("Delete",(Object)(_folder),(Object)(_f));
 }
}Debug.locals.put("f", _f);
;
 BA.debugLineNum = 1923;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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",4,_ba,subs.mostCurrent,179);
if (RapidSub.canDelegate("deletegps_db")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","deletegps_db", _ba);}
;
 BA.debugLineNum = 179;BA.debugLine="Sub deleteGPS_DB 'ignore";
Debug.ShouldStop(262144);
 BA.debugLineNum = 180;BA.debugLine="kmt.ExecNonQuery(\"delete from RUTA_GPS\")";
Debug.ShouldStop(524288);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from RUTA_GPS")));
 BA.debugLineNum = 181;BA.debugLine="kmt.ExecNonQuery(\"vacuum;\")";
Debug.ShouldStop(1048576);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("vacuum;")));
 BA.debugLineNum = 182;BA.debugLine="ToastMessageShow(\"Borramos BD Coords GPS\", False)";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Borramos BD Coords GPS")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 183;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _enviawhatsappmsg(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("enviaWhatsappMsg (subs) ","subs",4,_ba,subs.mostCurrent,1925);
if (RapidSub.canDelegate("enviawhatsappmsg")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","enviawhatsappmsg", _ba);}
;
 BA.debugLineNum = 1925;BA.debugLine="Sub enviaWhatsappMsg()";
Debug.ShouldStop(16);
 BA.debugLineNum = 1960;BA.debugLine="End Sub";
Debug.ShouldStop(128);
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",4,_ba,subs.mostCurrent,277);
if (RapidSub.canDelegate("fechainiciohoy")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","fechainiciohoy", _ba);}
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _h = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 277;BA.debugLine="Sub fechaInicioHoy As String 'ignore";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 278;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat";
Debug.ShouldStop(2097152);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 279;BA.debugLine="DateTime.DateFormat=\"yyMMdd\"";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yyMMdd"));
 BA.debugLineNum = 280;BA.debugLine="Private h As String = DateTime.Date(DateTime.Now";
Debug.ShouldStop(8388608);
_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 = 281;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 282;BA.debugLine="Log(\"Hoy=\"&h)";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044367877",RemoteObject.concat(RemoteObject.createImmutable("Hoy="),_h),0);
 BA.debugLineNum = 283;BA.debugLine="Return h";
Debug.ShouldStop(67108864);
if (true) return _h;
 BA.debugLineNum = 284;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
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",4,_ba,subs.mostCurrent,81);
if (RapidSub.canDelegate("fechakmt")) { return gunav2.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 = 81;BA.debugLine="Sub fechaKMT(fecha As String) As String 'ignore";
Debug.ShouldStop(65536);
 BA.debugLineNum = 83;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat  '";
Debug.ShouldStop(262144);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 84;BA.debugLine="DateTime.DateFormat=\"yyMMddHHmmss\"";
Debug.ShouldStop(524288);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yyMMddHHmmss"));
 BA.debugLineNum = 85;BA.debugLine="Dim nuevaFecha As String=DateTime.Date(fecha)";
Debug.ShouldStop(1048576);
_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 = 86;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig d";
Debug.ShouldStop(2097152);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 88;BA.debugLine="Return nuevaFecha";
Debug.ShouldStop(8388608);
if (true) return _nuevafecha;
 BA.debugLineNum = 89;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
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",4,_ba,subs.mostCurrent,498);
if (RapidSub.canDelegate("fechakmt2ticks")) { return gunav2.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 = 498;BA.debugLine="Sub fechaKMT2Ticks(fKMT As String) As Long 'ignore";
Debug.ShouldStop(131072);
 BA.debugLineNum = 499;BA.debugLine="Try";
Debug.ShouldStop(262144);
try { BA.debugLineNum = 500;BA.debugLine="If fKMT.Length = 12 Then";
Debug.ShouldStop(524288);
if (RemoteObject.solveBoolean("=",_fkmt.runMethod(true,"length"),BA.numberCast(double.class, 12))) { 
 BA.debugLineNum = 501;BA.debugLine="Private parteFecha As String = fKMT.SubString2(";
Debug.ShouldStop(1048576);
_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 = 502;BA.debugLine="Private parteHora As String = fKMT.SubString(6)";
Debug.ShouldStop(2097152);
_partehora = _fkmt.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 6)));Debug.locals.put("parteHora", _partehora);Debug.locals.put("parteHora", _partehora);
 BA.debugLineNum = 503;BA.debugLine="Private OrigFormat As String = DateTime.DateFor";
Debug.ShouldStop(4194304);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 504;BA.debugLine="DateTime.DateFormat=\"yymmdd\"";
Debug.ShouldStop(8388608);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yymmdd"));
 BA.debugLineNum = 505;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 506;BA.debugLine="Private ticks As Long = DateTime.DateTimeParse(";
Debug.ShouldStop(33554432);
_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 = 507;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 508;BA.debugLine="Return ticks";
Debug.ShouldStop(134217728);
Debug.CheckDeviceExceptions();if (true) return _ticks;
 }else {
 BA.debugLineNum = 510;BA.debugLine="Log(\"Formato de fecha incorrecto, debe de ser '";
Debug.ShouldStop(536870912);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045088780",RemoteObject.concat(RemoteObject.createImmutable("Formato de fecha incorrecto, debe de ser 'YYMMDDHHMMSS', no '"),_fkmt,RemoteObject.createImmutable("' largo="),_fkmt.runMethod(true,"length")),0);
 BA.debugLineNum = 511;BA.debugLine="Return 0";
Debug.ShouldStop(1073741824);
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 = 514;BA.debugLine="Log(LastException)";
Debug.ShouldStop(2);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045088784",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 BA.debugLineNum = 515;BA.debugLine="LogColor($\"Fecha dada: ${fKMT}, Parte Fecha: ${p";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","045088785",(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 = 516;BA.debugLine="Return 0";
Debug.ShouldStop(8);
if (true) return BA.numberCast(long.class, 0);
 };
 BA.debugLineNum = 518;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable(0L);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _fechanormal(RemoteObject _ba,RemoteObject _fecha) throws Exception{
try {
		Debug.PushSubsStack("fechanormal (subs) ","subs",4,_ba,subs.mostCurrent,214);
if (RapidSub.canDelegate("fechanormal")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","fechanormal", _ba, _fecha);}
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _nuevafecha = RemoteObject.createImmutable("");
;
Debug.locals.put("fecha", _fecha);
 BA.debugLineNum = 214;BA.debugLine="Sub fechanormal(fecha As String) As String 'ignore";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 216;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat  '";
Debug.ShouldStop(8388608);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 217;BA.debugLine="DateTime.DateFormat = \"YYYY/MM/dd HH:mm:ss\"";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("YYYY/MM/dd HH:mm:ss"));
 BA.debugLineNum = 218;BA.debugLine="Dim nuevaFecha As String=DateTime.Date(fecha)";
Debug.ShouldStop(33554432);
_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 = 219;BA.debugLine="DateTime.DateFormat = OrigFormat  'return to orig";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 221;BA.debugLine="Return nuevaFecha";
Debug.ShouldStop(268435456);
if (true) return _nuevafecha;
 BA.debugLineNum = 222;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _getphnid(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("getPhnId (subs) ","subs",4,_ba,subs.mostCurrent,23);
if (RapidSub.canDelegate("getphnid")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","getphnid", _ba);}
RemoteObject _t = RemoteObject.createImmutable("");
RemoteObject _s = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 23;BA.debugLine="Sub getPhnId As String 'ignore";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 25;BA.debugLine="devModel = phn.Model";
Debug.ShouldStop(16777216);
subs._devmodel = subs._phn.runMethod(true,"getModel");
 BA.debugLineNum = 26;BA.debugLine="If devModel.Length <= 3 Then 'Si phn.Model esta e";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("k",subs._devmodel.runMethod(true,"length"),BA.numberCast(double.class, 3))) { 
 BA.debugLineNum = 27;BA.debugLine="Dim t As String = phn.GetSettings(\"android_id\")";
Debug.ShouldStop(67108864);
_t = subs._phn.runMethod(true,"GetSettings",(Object)(RemoteObject.createImmutable("android_id")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 28;BA.debugLine="devModel = t";
Debug.ShouldStop(134217728);
subs._devmodel = _t;
 };
 BA.debugLineNum = 30;BA.debugLine="If devModel.Length >= 3 Then 'Si tenemos valor pa";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean("g",subs._devmodel.runMethod(true,"length"),BA.numberCast(double.class, 3))) { 
 BA.debugLineNum = 31;BA.debugLine="File.WriteString(File.DirInternal, \"phnId.txt\",";
Debug.ShouldStop(1073741824);
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 = 33;BA.debugLine="Else If devModel.Length < 3 Then ' Si no tenemos";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("<",subs._devmodel.runMethod(true,"length"),BA.numberCast(double.class, 3))) { 
 BA.debugLineNum = 34;BA.debugLine="Dim s As String = File.ReadString(File.DirIntern";
Debug.ShouldStop(2);
_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 = 35;BA.debugLine="devModel = s";
Debug.ShouldStop(4);
subs._devmodel = _s;
 }}
;
 BA.debugLineNum = 39;BA.debugLine="Return devModel";
Debug.ShouldStop(64);
if (true) return subs._devmodel;
 BA.debugLineNum = 40;BA.debugLine="End Sub";
Debug.ShouldStop(128);
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",4,_ba,subs.mostCurrent,225);
if (RapidSub.canDelegate("getssid")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","getssid", _ba);}
;
 BA.debugLineNum = 225;BA.debugLine="Sub getSSID  'ignore";
Debug.ShouldStop(1);
 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  _guardaappinfo(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("guardaAppInfo (subs) ","subs",4,_ba,subs.mostCurrent,1314);
if (RapidSub.canDelegate("guardaappinfo")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaappinfo", _ba);}
;
 BA.debugLineNum = 1314;BA.debugLine="Sub guardaAppInfo 'ignore";
Debug.ShouldStop(2);
 BA.debugLineNum = 1315;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(4);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).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 = 1316;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"insert into";
Debug.ShouldStop(8);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).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 = 1317;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"insert into";
Debug.ShouldStop(16);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).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 = 1318;BA.debugLine="End Sub";
Debug.ShouldStop(32);
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",4,_ba,subs.mostCurrent,120);
if (RapidSub.canDelegate("guardainfoenarchivo")) { return gunav2.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 = 120;BA.debugLine="Sub guardaInfoEnArchivo(coords As String) 'ignore";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 122;BA.debugLine="Dim OrigFormat As String=DateTime.DateFormat  'sa";
Debug.ShouldStop(33554432);
_origformat = subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 123;BA.debugLine="DateTime.DateFormat=\"MMM-dd HH:mm:ss\"";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MMM-dd HH:mm:ss"));
 BA.debugLineNum = 124;BA.debugLine="Dim lastUpdate As String=DateTime.Date(DateTime.N";
Debug.ShouldStop(134217728);
_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 = 125;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig d";
Debug.ShouldStop(268435456);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 127;BA.debugLine="Dim ubic As String = coords&\",\"&lastUpdate";
Debug.ShouldStop(1073741824);
_ubic = RemoteObject.concat(_coords,RemoteObject.createImmutable(","),_lastupdate);Debug.locals.put("ubic", _ubic);Debug.locals.put("ubic", _ubic);
 BA.debugLineNum = 128;BA.debugLine="Dim out As OutputStream = File.OpenOutput(File.Di";
Debug.ShouldStop(-2147483648);
_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,"getDirRootExternal")),(Object)(BA.ObjectToString("gps.txt")),(Object)(subs.mostCurrent.__c.getField(true,"True")));Debug.locals.put("out", _out);Debug.locals.put("out", _out);
 BA.debugLineNum = 129;BA.debugLine="Dim s As String = ubic & CRLF";
Debug.ShouldStop(1);
_s = RemoteObject.concat(_ubic,subs.mostCurrent.__c.getField(true,"CRLF"));Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 130;BA.debugLine="Dim t() As Byte = s.GetBytes(\"UTF-8\")";
Debug.ShouldStop(2);
_t = _s.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF-8")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 131;BA.debugLine="out.WriteBytes(t, 0, t.Length)";
Debug.ShouldStop(4);
_out.runVoidMethod ("WriteBytes",(Object)(_t),(Object)(BA.numberCast(int.class, 0)),(Object)(_t.getField(true,"length")));
 BA.debugLineNum = 132;BA.debugLine="out.Close";
Debug.ShouldStop(8);
_out.runVoidMethod ("Close");
 BA.debugLineNum = 133;BA.debugLine="End Sub";
Debug.ShouldStop(16);
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",4,_ba,subs.mostCurrent,136);
if (RapidSub.canDelegate("guardainfoenbd")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardainfoenbd", _ba, _coords);}
RemoteObject _latlon = null;
;
Debug.locals.put("coords", _coords);
 BA.debugLineNum = 136;BA.debugLine="Sub guardaInfoEnBD(coords As String) 'ignore";
Debug.ShouldStop(128);
 BA.debugLineNum = 137;BA.debugLine="Log(\"Guardamos ubicacion en BD - \"&coords)";
Debug.ShouldStop(256);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043712513",RemoteObject.concat(RemoteObject.createImmutable("Guardamos ubicacion en BD - "),_coords),0);
 BA.debugLineNum = 138;BA.debugLine="Try";
Debug.ShouldStop(512);
try { BA.debugLineNum = 139;BA.debugLine="Dim latlon() As String = Regex.Split(\"\\|\", coord";
Debug.ShouldStop(1024);
_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 = 140;BA.debugLine="If latlon.Length < 2 Then latlon = Regex.Split(\"";
Debug.ShouldStop(2048);
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 = 141;BA.debugLine="If subsLogs Then Log(\"LatLon=\"&latlon)";
Debug.ShouldStop(4096);
if (subs._subslogs.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043712517",RemoteObject.concat(RemoteObject.createImmutable("LatLon="),_latlon),0);};
 BA.debugLineNum = 142;BA.debugLine="kmt.ExecNonQuery2(\"INSERT INTO RUTA_GPS(FECHA, L";
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[] {(_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 = 144;BA.debugLine="LogColor(LastException, Colors.red)";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043712520",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 146;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
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",4,_ba,subs.mostCurrent,861);
if (RapidSub.canDelegate("guardaproducto")) { return gunav2.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 = 861;BA.debugLine="Sub guardaProducto(cedis As String, costoU As Stri";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 862;BA.debugLine="LogColor(\"guardaProducto: \"&prodId&\", cant=\"&cant";
Debug.ShouldStop(536870912);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046792705",RemoteObject.concat(RemoteObject.createImmutable("guardaProducto: "),_prodid,RemoteObject.createImmutable(", cant="),_cant,RemoteObject.createImmutable(" - TV:"),_tipoventa),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 863;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(1073741824);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 864;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(-2147483648);
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),(_traerutabitacora(_ba)),(_preciosin),(_tipoventa)})))));
 BA.debugLineNum = 865;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${t";
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)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),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 = 866;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(pe";
Debug.ShouldStop(2);
_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 = 867;BA.debugLine="c.Position=0";
Debug.ShouldStop(4);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 868;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(8);
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 = 869;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert into";
Debug.ShouldStop(16);
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 = 870;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_i";
Debug.ShouldStop(32);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 871;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaproductosin(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costotot,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _rutav,RemoteObject _preciosin,RemoteObject _tipov,RemoteObject _precio2,RemoteObject _query) throws Exception{
try {
		Debug.PushSubsStack("guardaProductoSin (subs) ","subs",4,_ba,subs.mostCurrent,626);
if (RapidSub.canDelegate("guardaproductosin")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproductosin", _ba, _cedis, _costotot, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipov, _precio2, _query);}
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoTot", _costotot);
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("tipoV", _tipov);
Debug.locals.put("precio2", _precio2);
Debug.locals.put("query", _query);
 BA.debugLineNum = 626;BA.debugLine="Sub guardaProductoSin(cedis As String, costoTot As";
Debug.ShouldStop(131072);
 BA.debugLineNum = 639;BA.debugLine="ToastMessageShow(\"guardaProdSin\", False)";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("guardaProdSin")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 640;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
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 _futuro) throws Exception{
try {
		Debug.PushSubsStack("guardaProductoSinGestion (subs) ","subs",4,_ba,subs.mostCurrent,1833);
if (RapidSub.canDelegate("guardaproductosingestion")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproductosingestion", _ba, _cedis, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _rutav, _preciosin, _tipoventa, _futuro);}
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("futuro", _futuro);
 BA.debugLineNum = 1833;BA.debugLine="Sub guardaProductoSinGestion(cedis As String, cost";
Debug.ShouldStop(256);
 BA.debugLineNum = 1834;BA.debugLine="If nombre.Length < 6 Then ToastMessageShow(\"(guar";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("<",_nombre.runMethod(true,"length"),BA.numberCast(double.class, 6))) { 
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("(guardaProductoSinGestion) El nombre del producto no es valido "),_nombre))),(Object)(subs.mostCurrent.__c.getField(true,"True")));};
 BA.debugLineNum = 1835;BA.debugLine="precioSin = NumberFormat2(precioSin, 1, 2, 2, Fal";
Debug.ShouldStop(1024);
_preciosin = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _preciosin)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("precioSin", _preciosin);
 BA.debugLineNum = 1836;BA.debugLine="costoU = NumberFormat2(costoU, 1, 2, 2, False)";
Debug.ShouldStop(2048);
_costou = subs.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, _costou)),(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("costoU", _costou);
 BA.debugLineNum = 1838;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(8192);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1841;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO PEDIDO (P";
Debug.ShouldStop(65536);
subs.mostCurrent._starter._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_FUTURO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {13},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),(_futuro)})))));
 BA.debugLineNum = 1843;BA.debugLine="If cedis <> \"DUR\" Then Starter.skmt.ExecNonQuery2";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("!",_cedis,BA.ObjectToString("DUR"))) { 
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_tipoventa)))),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 = 1844;BA.debugLine="c=Starter.skmt.ExecQuery(\"select sum(pe_costo_tot";
Debug.ShouldStop(524288);
_c = 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 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 = 1845;BA.debugLine="c.Position=0";
Debug.ShouldStop(1048576);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1848;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedido_cl";
Debug.ShouldStop(8388608);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1849;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into pedido_cl";
Debug.ShouldStop(16777216);
subs.mostCurrent._starter._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[] {10},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),(_rutav),(_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 1850;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardaproductox(RemoteObject _ba,RemoteObject _cedis,RemoteObject _costotot,RemoteObject _costou,RemoteObject _cant,RemoteObject _nombre,RemoteObject _prodid,RemoteObject _clienteid,RemoteObject _fecha,RemoteObject _usuario,RemoteObject _tipov,RemoteObject _precio2,RemoteObject _query) throws Exception{
try {
		Debug.PushSubsStack("guardaProductoX (subs) ","subs",4,_ba,subs.mostCurrent,618);
if (RapidSub.canDelegate("guardaproductox")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardaproductox", _ba, _cedis, _costotot, _costou, _cant, _nombre, _prodid, _clienteid, _fecha, _usuario, _tipov, _precio2, _query);}
;
Debug.locals.put("cedis", _cedis);
Debug.locals.put("costoTot", _costotot);
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("tipoV", _tipov);
Debug.locals.put("precio2", _precio2);
Debug.locals.put("query", _query);
 BA.debugLineNum = 618;BA.debugLine="Sub guardaProductoX(cedis As String, costoTot As S";
Debug.ShouldStop(512);
 BA.debugLineNum = 624;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardavariable(RemoteObject _ba,RemoteObject _nombre,RemoteObject _valor) throws Exception{
try {
		Debug.PushSubsStack("guardaVariable (subs) ","subs",4,_ba,subs.mostCurrent,1890);
if (RapidSub.canDelegate("guardavariable")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","guardavariable", _ba, _nombre, _valor);}
;
Debug.locals.put("nombre", _nombre);
Debug.locals.put("valor", _valor);
 BA.debugLineNum = 1890;BA.debugLine="Sub guardaVariable(nombre As String, valor As Stri";
Debug.ShouldStop(2);
 BA.debugLineNum = 1891;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete from";
Debug.ShouldStop(4);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_nombre))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1892;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"insert into";
Debug.ShouldStop(8);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_nombre))),RemoteObject.createImmutable("', '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_valor))),RemoteObject.createImmutable("')")))));
 BA.debugLineNum = 1893;BA.debugLine="End Sub";
Debug.ShouldStop(16);
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",4,_ba,subs.mostCurrent,852);
if (RapidSub.canDelegate("haypedido")) { return gunav2.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 = 852;BA.debugLine="Sub hayPedido As Boolean";
Debug.ShouldStop(524288);
 BA.debugLineNum = 853;BA.debugLine="Private thisC As Cursor=B4XPages.MainPage.skmt.Ex";
Debug.ShouldStop(1048576);
_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 = 854;BA.debugLine="thisC.Position=0";
Debug.ShouldStop(2097152);
_thisc.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 855;BA.debugLine="Private hay As Boolean = False";
Debug.ShouldStop(4194304);
_hay = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("hay", _hay);Debug.locals.put("hay", _hay);
 BA.debugLineNum = 856;BA.debugLine="If thisC.GetInt(\"hayPedido\") > 0 Then hay = True";
Debug.ShouldStop(8388608);
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 = 858;BA.debugLine="Return hay";
Debug.ShouldStop(33554432);
if (true) return _hay;
 BA.debugLineNum = 859;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _importabddesdewhatsapp(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("importaBDDesdeWhatsApp (subs) ","subs",4,_ba,subs.mostCurrent,1708);
if (RapidSub.canDelegate("importabddesdewhatsapp")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","importabddesdewhatsapp", _ba);}
RemoteObject _xmldata = RemoteObject.createImmutable("");
RemoteObject _outstr = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
RemoteObject _instr = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
RemoteObject _a = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1708;BA.debugLine="Sub importaBDDesdeWhatsApp";
Debug.ShouldStop(2048);
 BA.debugLineNum = 1710;BA.debugLine="Log(\"Revisamos intent de importar desde whatsapp\"";
Debug.ShouldStop(8192);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048562178",RemoteObject.createImmutable("Revisamos intent de importar desde whatsapp"),0);
 BA.debugLineNum = 1711;BA.debugLine="Log(B4XPages.MainPage.intentUsado)";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048562179",BA.ObjectToString(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_intentusado" /*RemoteObject*/ )),0);
 BA.debugLineNum = 1712;BA.debugLine="Log(in)";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048562180",BA.ObjectToString(subs._in),0);
 BA.debugLineNum = 1713;BA.debugLine="If Not(in.IsInitialized) Then in = B4XPages.GetNa";
Debug.ShouldStop(65536);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._in.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
subs._in = subs.mostCurrent._b4xpages.runMethod(false,"_getnativeparent" /*RemoteObject*/ ,_ba,(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba)))).runMethod(false,"GetStartingIntent");};
 BA.debugLineNum = 1714;BA.debugLine="If Not(B4XPages.MainPage.intentUsado) And in <> N";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean(".",subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_intentusado" /*RemoteObject*/ )))) && RemoteObject.solveBoolean("N",subs._in)) { 
 BA.debugLineNum = 1716;BA.debugLine="LogColor(\"Importamos base de datos desde Whatsap";
Debug.ShouldStop(524288);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048562184",BA.ObjectToString("Importamos base de datos desde Whatsapp."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 1717;BA.debugLine="B4XPages.MainPage.intentUsado = True";
Debug.ShouldStop(1048576);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).setField ("_intentusado" /*RemoteObject*/ ,subs.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 1719;BA.debugLine="If in.GetData <> Null Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("N",subs._in.runMethod(true,"GetData"))) { 
 BA.debugLineNum = 1720;BA.debugLine="Dim XmlData As String";
Debug.ShouldStop(8388608);
_xmldata = RemoteObject.createImmutable("");Debug.locals.put("XmlData", _xmldata);
 BA.debugLineNum = 1721;BA.debugLine="XmlData = in.GetData";
Debug.ShouldStop(16777216);
_xmldata = subs._in.runMethod(true,"GetData");Debug.locals.put("XmlData", _xmldata);
 BA.debugLineNum = 1722;BA.debugLine="Try";
Debug.ShouldStop(33554432);
try { BA.debugLineNum = 1723;BA.debugLine="Dim OutStr As OutputStream = File.OpenOutput(F";
Debug.ShouldStop(67108864);
_outstr = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
_outstr = subs.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(subs.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("kmt.db")),(Object)(subs.mostCurrent.__c.getField(true,"False")));Debug.locals.put("OutStr", _outstr);Debug.locals.put("OutStr", _outstr);
 BA.debugLineNum = 1724;BA.debugLine="Dim InStr As InputStream = File.OpenInput(\"Con";
Debug.ShouldStop(134217728);
_instr = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
_instr = subs.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(BA.ObjectToString("ContentDir")),(Object)(_xmldata));Debug.locals.put("InStr", _instr);Debug.locals.put("InStr", _instr);
 BA.debugLineNum = 1725;BA.debugLine="File.Copy2(InStr,OutStr)";
Debug.ShouldStop(268435456);
subs.mostCurrent.__c.getField(false,"File").runVoidMethod ("Copy2",(Object)((_instr.getObject())),(Object)((_outstr.getObject())));
 BA.debugLineNum = 1726;BA.debugLine="LogColor(\"BD copiada a interna.\", Colors.Blue)";
Debug.ShouldStop(536870912);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048562194",BA.ObjectToString("BD copiada a interna."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 1727;BA.debugLine="OutStr.Close";
Debug.ShouldStop(1073741824);
_outstr.runVoidMethod ("Close");
 BA.debugLineNum = 1728;BA.debugLine="If in.As(String).Contains(\"whatsapp\") Then Toa";
Debug.ShouldStop(-2147483648);
if ((BA.ObjectToString(subs._in)).runMethod(true,"contains",(Object)(RemoteObject.createImmutable("whatsapp"))).<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("BD cargada desde Whatsapp")),(Object)(subs.mostCurrent.__c.getField(true,"False")));};
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e19) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e19.toString()); BA.debugLineNum = 1730;BA.debugLine="Log(LastException)";
Debug.ShouldStop(2);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048562198",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 };
 BA.debugLineNum = 1735;BA.debugLine="Private a As Cursor = Starter.skmt.ExecQuery($\"";
Debug.ShouldStop(64);
_a = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_a = 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 CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'APP_NAME'")))));Debug.locals.put("a", _a);Debug.locals.put("a", _a);
 BA.debugLineNum = 1736;BA.debugLine="If a.RowCount > 0 Then";
Debug.ShouldStop(128);
if (RemoteObject.solveBoolean(">",_a.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1737;BA.debugLine="a.Position = 0";
Debug.ShouldStop(256);
_a.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1738;BA.debugLine="ToastMessageShow($\"BD de \"${a.GetString(\"CAT_V";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence((RemoteObject.concat(RemoteObject.createImmutable("BD de \""),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_a.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")))))),RemoteObject.createImmutable("\" cargada."))))),(Object)(subs.mostCurrent.__c.getField(true,"True")));
 };
 BA.debugLineNum = 1740;BA.debugLine="a = Starter.skmt.ExecQuery($\"select * from usua";
Debug.ShouldStop(2048);
_a = 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 * from usuarioa")))));Debug.locals.put("a", _a);
 BA.debugLineNum = 1741;BA.debugLine="If a.RowCount > 0 Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(">",_a.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1742;BA.debugLine="a.Position = 0";
Debug.ShouldStop(8192);
_a.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1743;BA.debugLine="B4XPages.MainPage.user.Text = a.GetString(\"USU";
Debug.ShouldStop(16384);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_user" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_a.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO")))));
 BA.debugLineNum = 1744;BA.debugLine="B4XPages.MainPage.pass.Text = a.GetString(\"PAS";
Debug.ShouldStop(32768);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_pass" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_a.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PASS")))));
 };
 };
 };
 BA.debugLineNum = 1748;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _iniciaactividad(RemoteObject _ba,RemoteObject _ia) throws Exception{
try {
		Debug.PushSubsStack("iniciaActividad (subs) ","subs",4,_ba,subs.mostCurrent,1516);
if (RapidSub.canDelegate("iniciaactividad")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","iniciaactividad", _ba, _ia);}
;
Debug.locals.put("ia", _ia);
 BA.debugLineNum = 1516;BA.debugLine="Sub iniciaActividad(ia As String)";
Debug.ShouldStop(2048);
 BA.debugLineNum = 1517;BA.debugLine="If ia <> \"\" And ia <> Null Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("!",_ia,BA.ObjectToString("")) && RemoteObject.solveBoolean("N",_ia)) { 
 BA.debugLineNum = 1519;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete fro";
Debug.ShouldStop(16384);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("ULTIMOMODULO"))})))));
 BA.debugLineNum = 1520;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(32768);
subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)")),(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {RemoteObject.createImmutable(("ULTIMOMODULO")),(_ia)})))));
 BA.debugLineNum = 1521;BA.debugLine="B4XPages.ShowPage(ia)";
Debug.ShouldStop(65536);
subs.mostCurrent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,_ba,(Object)(_ia));
 };
 BA.debugLineNum = 1524;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _insertarenglonespruebaenerrorlog(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("insertaRenglonesPruebaEnErrorLog (subs) ","subs",4,_ba,subs.mostCurrent,458);
if (RapidSub.canDelegate("insertarenglonespruebaenerrorlog")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","insertarenglonespruebaenerrorlog", _ba);}
int _x = 0;
;
 BA.debugLineNum = 458;BA.debugLine="Sub insertaRenglonesPruebaEnErrorLog 'ignore";
Debug.ShouldStop(512);
 BA.debugLineNum = 459;BA.debugLine="revisaBD";
Debug.ShouldStop(1024);
_revisabd(_ba);
 BA.debugLineNum = 460;BA.debugLine="Log(\"insertamos 50 renglones a errorLog\")";
Debug.ShouldStop(2048);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044957698",RemoteObject.createImmutable("insertamos 50 renglones a errorLog"),0);
 BA.debugLineNum = 461;BA.debugLine="For x = 1 To 50";
Debug.ShouldStop(4096);
{
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 = 462;BA.debugLine="errorLog.ExecNonQuery2(\"INSERT INTO errores(fech";
Debug.ShouldStop(8192);
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 = 463;BA.debugLine="Log(x)";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044957701",BA.NumberToString(_x),0);
 }
}Debug.locals.put("x", _x);
;
 BA.debugLineNum = 465;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
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",4,_ba,subs.mostCurrent,520);
if (RapidSub.canDelegate("installapk")) { return gunav2.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 = 520;BA.debugLine="Sub InstallAPK(dir As String, apk As String) 'igno";
Debug.ShouldStop(128);
 BA.debugLineNum = 521;BA.debugLine="If File.Exists(dir, apk) Then";
Debug.ShouldStop(256);
if (subs.mostCurrent.__c.getField(false,"File").runMethod(true,"Exists",(Object)(_dir),(Object)(_apk)).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 522;BA.debugLine="Dim i As Intent";
Debug.ShouldStop(512);
_i = RemoteObject.createNew ("anywheresoftware.b4a.objects.IntentWrapper");Debug.locals.put("i", _i);
 BA.debugLineNum = 523;BA.debugLine="i.Initialize(i.ACTION_VIEW, \"file://\" & File.Com";
Debug.ShouldStop(1024);
_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 = 524;BA.debugLine="i.SetType(\"application/vnd.android.package-archi";
Debug.ShouldStop(2048);
_i.runVoidMethod ("SetType",(Object)(RemoteObject.createImmutable("application/vnd.android.package-archive")));
 BA.debugLineNum = 525;BA.debugLine="StartActivity(i)";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("StartActivity",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)((_i.getObject())));
 };
 BA.debugLineNum = 527;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _invsuficientepromoesp(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("InvSuficientePromoEsp (subs) ","subs",4,_ba,subs.mostCurrent,1374);
if (RapidSub.canDelegate("invsuficientepromoesp")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","invsuficientepromoesp", _ba);}
RemoteObject _y = RemoteObject.createImmutable(false);
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
int _i = 0;
;
 BA.debugLineNum = 1374;BA.debugLine="Sub InvSuficientePromoEsp As Boolean";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 1375;BA.debugLine="Private y As Boolean = False";
Debug.ShouldStop(1073741824);
_y = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("y", _y);Debug.locals.put("y", _y);
 BA.debugLineNum = 1376;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
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 CAT_DP_IDPROD, CAT_DP_PZAS, ifnull(CAT_GP_ALMACEN, 0) As CAT_GP_ALMACEN from CAT_DETALLES_PAQ left JOIN "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),RemoteObject.createImmutable(" ON CAT_DP_IDPROD = CAT_GP_ID WHERE CAT_DP_ID IN (SELECT DISTINCT CAT_PE_IDPROMO FROM CAT_PROMO_ESP)"))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1377;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1378;BA.debugLine="For i = 0 To c.RowCount - 1";
Debug.ShouldStop(2);
{
final int step4 = 1;
final int limit4 = RemoteObject.solve(new RemoteObject[] {_c.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 = 1379;BA.debugLine="c.Position = i";
Debug.ShouldStop(4);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 1380;BA.debugLine="If c.GetString(\"CAT_GP_ALMACEN\") >= c.GetString";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("g",BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN")))),BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))))) { 
 BA.debugLineNum = 1381;BA.debugLine="y = True";
Debug.ShouldStop(16);
_y = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("y", _y);
 }else {
 BA.debugLineNum = 1385;BA.debugLine="y = False";
Debug.ShouldStop(256);
_y = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("y", _y);
 BA.debugLineNum = 1388;BA.debugLine="Exit";
Debug.ShouldStop(2048);
if (true) break;
 };
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 1392;BA.debugLine="c.Close";
Debug.ShouldStop(32768);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1393;BA.debugLine="Return y";
Debug.ShouldStop(65536);
if (true) return _y;
 BA.debugLineNum = 1394;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable(false);
}
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",4,_ba,subs.mostCurrent,233);
if (RapidSub.canDelegate("json2map")) { return gunav2.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 = 233;BA.debugLine="Sub JSON2Map(theJson As String) As Map 'ignore";
Debug.ShouldStop(256);
 BA.debugLineNum = 235;BA.debugLine="Try";
Debug.ShouldStop(1024);
try { BA.debugLineNum = 236;BA.debugLine="Private json As JSONParser";
Debug.ShouldStop(2048);
_json = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser");Debug.locals.put("json", _json);
 BA.debugLineNum = 237;BA.debugLine="json.Initialize(theJson)";
Debug.ShouldStop(4096);
_json.runVoidMethod ("Initialize",(Object)(_thejson));
 BA.debugLineNum = 238;BA.debugLine="Return json.NextObject";
Debug.ShouldStop(8192);
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 = 240;BA.debugLine="Log(LastException)";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044236807",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 BA.debugLineNum = 241;BA.debugLine="log2DB(\"JSON2Map: \"&LastException)";
Debug.ShouldStop(65536);
_log2db(_ba,RemoteObject.concat(RemoteObject.createImmutable("JSON2Map: "),subs.mostCurrent.__c.runMethod(false,"LastException",_ba)));
 BA.debugLineNum = 242;BA.debugLine="Private m As Map = CreateMap(\"title\":\"Error gene";
Debug.ShouldStop(131072);
_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 = 243;BA.debugLine="Return m";
Debug.ShouldStop(262144);
if (true) return _m;
 };
 BA.debugLineNum = 245;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
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",4,_ba,subs.mostCurrent,287);
if (RapidSub.canDelegate("log2db")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","log2db", _ba, _texto);}
;
Debug.locals.put("texto", _texto);
 BA.debugLineNum = 287;BA.debugLine="Sub log2DB(texto As String) 'ignore";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 288;BA.debugLine="LogColor(fechaKMT(DateTime.Now)&\" - log2BD: '\"&te";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044433409",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 = 289;BA.debugLine="kmt.ExecNonQuery2(\"INSERT INTO bitacora(fecha, te";
Debug.ShouldStop(1);
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 = 290;BA.debugLine="End Sub";
Debug.ShouldStop(2);
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",4,_ba,subs.mostCurrent,2488);
if (RapidSub.canDelegate("logjobdoneresultados")) { return gunav2.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 = 2488;BA.debugLine="Sub logJobDoneResultados(resultado As DBResult)";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 2489;BA.debugLine="For Each records() As Object In resultado.Rows";
Debug.ShouldStop(16777216);
{
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 = 2490;BA.debugLine="LogColor($\"====== ${resultado.Tag} - REGISTROS =";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050200578",(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 = 2491;BA.debugLine="For Each k As String In resultado.Columns.Keys";
Debug.ShouldStop(67108864);
{
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 = 2492;BA.debugLine="LogColor(k & \" = \" & records(resultado.Columns.";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","050200580",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 = 2495;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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",4,_ba,subs.mostCurrent,248);
if (RapidSub.canDelegate("map2json")) { return gunav2.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 = 248;BA.debugLine="Sub map2JSON(m As Map) As String 'ignore";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 251;BA.debugLine="Dim jg As JSONGenerator";
Debug.ShouldStop(67108864);
_jg = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser.JSONGenerator");Debug.locals.put("jg", _jg);
 BA.debugLineNum = 252;BA.debugLine="jg.Initialize(m)";
Debug.ShouldStop(134217728);
_jg.runVoidMethod ("Initialize",(Object)(_m));
 BA.debugLineNum = 253;BA.debugLine="Dim t As String = jg.ToString";
Debug.ShouldStop(268435456);
_t = _jg.runMethod(true,"ToString");Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 254;BA.debugLine="Return t";
Debug.ShouldStop(536870912);
if (true) return _t;
 BA.debugLineNum = 255;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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",4,_ba,subs.mostCurrent,293);
if (RapidSub.canDelegate("masdexxmins")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","masdexxmins", _ba, _hora, _mins);}
;
Debug.locals.put("hora", _hora);
Debug.locals.put("mins", _mins);
 BA.debugLineNum = 293;BA.debugLine="Sub masDeXXMins(hora As Int, mins As Int) As Boole";
Debug.ShouldStop(16);
 BA.debugLineNum = 294;BA.debugLine="If (hora + mins * DateTime.TicksPerMinute) < Date";
Debug.ShouldStop(32);
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 = 295;BA.debugLine="Return True";
Debug.ShouldStop(64);
if (true) return subs.mostCurrent.__c.getField(true,"True");
 }else {
 BA.debugLineNum = 297;BA.debugLine="Return False";
Debug.ShouldStop(256);
if (true) return subs.mostCurrent.__c.getField(true,"False");
 };
 BA.debugLineNum = 299;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
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",4,_ba,subs.mostCurrent,302);
if (RapidSub.canDelegate("masdexxminskmt")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","masdexxminskmt", _ba, _hora, _mins);}
;
Debug.locals.put("hora", _hora);
Debug.locals.put("mins", _mins);
 BA.debugLineNum = 302;BA.debugLine="Sub masDeXXMinsKMT(hora As String, mins As Int) As";
Debug.ShouldStop(8192);
 BA.debugLineNum = 303;BA.debugLine="Try";
Debug.ShouldStop(16384);
try { BA.debugLineNum = 305;BA.debugLine="If fechaKMT2Ticks(hora) + mins * DateTime.TicksP";
Debug.ShouldStop(65536);
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 = 307;BA.debugLine="Return True";
Debug.ShouldStop(262144);
Debug.CheckDeviceExceptions();if (true) return subs.mostCurrent.__c.getField(true,"True");
 }else {
 BA.debugLineNum = 310;BA.debugLine="Return False";
Debug.ShouldStop(2097152);
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 = 313;BA.debugLine="Log(LastException)";
Debug.ShouldStop(16777216);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044564491",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 };
 BA.debugLineNum = 315;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
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",4,_ba,subs.mostCurrent,92);
if (RapidSub.canDelegate("notihigh")) { return gunav2.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 = 92;BA.debugLine="Sub notiHigh(title As String, body As String, acti";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 93;BA.debugLine="Private notif As Notification";
Debug.ShouldStop(268435456);
_notif = RemoteObject.createNew ("anywheresoftware.b4a.objects.NotificationWrapper");Debug.locals.put("notif", _notif);
 BA.debugLineNum = 94;BA.debugLine="notif.Initialize2(notif.IMPORTANCE_HIGH)";
Debug.ShouldStop(536870912);
_notif.runVoidMethod ("Initialize2",(Object)(_notif.getField(true,"IMPORTANCE_HIGH")));
 BA.debugLineNum = 95;BA.debugLine="notif.Icon = \"icon\"";
Debug.ShouldStop(1073741824);
_notif.runVoidMethod ("setIcon",BA.ObjectToString("icon"));
 BA.debugLineNum = 96;BA.debugLine="notif.Vibrate = False";
Debug.ShouldStop(-2147483648);
_notif.runVoidMethod ("setVibrate",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 97;BA.debugLine="notif.Sound = False";
Debug.ShouldStop(1);
_notif.runVoidMethod ("setSound",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 98;BA.debugLine="notif.AutoCancel = True";
Debug.ShouldStop(2);
_notif.runVoidMethod ("setAutoCancel",subs.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 99;BA.debugLine="Log(\"notiHigh: \"&title)";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043515911",RemoteObject.concat(RemoteObject.createImmutable("notiHigh: "),_title),0);
 BA.debugLineNum = 100;BA.debugLine="notif.SetInfo(title, body, activity)";
Debug.ShouldStop(8);
_notif.runVoidMethod ("SetInfoNew",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)(BA.ObjectToCharSequence(_title)),(Object)(BA.ObjectToCharSequence(_body)),(Object)(_activity));
 BA.debugLineNum = 102;BA.debugLine="notif.Notify(777)";
Debug.ShouldStop(32);
_notif.runVoidMethod ("Notify",(Object)(BA.numberCast(int.class, 777)));
 BA.debugLineNum = 103;BA.debugLine="End Sub";
Debug.ShouldStop(64);
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",4,_ba,subs.mostCurrent,106);
if (RapidSub.canDelegate("notilowreturn")) { return gunav2.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 = 106;BA.debugLine="Sub notiLowReturn(title As String, Body As String,";
Debug.ShouldStop(512);
 BA.debugLineNum = 107;BA.debugLine="Private notification As Notification";
Debug.ShouldStop(1024);
_notification = RemoteObject.createNew ("anywheresoftware.b4a.objects.NotificationWrapper");Debug.locals.put("notification", _notification);
 BA.debugLineNum = 108;BA.debugLine="notification.Initialize2(notification.IMPORTANCE_";
Debug.ShouldStop(2048);
_notification.runVoidMethod ("Initialize2",(Object)(_notification.getField(true,"IMPORTANCE_LOW")));
 BA.debugLineNum = 109;BA.debugLine="Log(\"notiLowReturn: \"&title)";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","043581443",RemoteObject.concat(RemoteObject.createImmutable("notiLowReturn: "),_title),0);
 BA.debugLineNum = 110;BA.debugLine="notification.Icon = \"icon\"";
Debug.ShouldStop(8192);
_notification.runVoidMethod ("setIcon",BA.ObjectToString("icon"));
 BA.debugLineNum = 111;BA.debugLine="notification.Sound = False";
Debug.ShouldStop(16384);
_notification.runVoidMethod ("setSound",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 112;BA.debugLine="notification.Vibrate = False";
Debug.ShouldStop(32768);
_notification.runVoidMethod ("setVibrate",subs.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 113;BA.debugLine="notification.SetInfo(title, Body, Main)";
Debug.ShouldStop(65536);
_notification.runVoidMethod ("SetInfoNew",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)(BA.ObjectToCharSequence(_title)),(Object)(BA.ObjectToCharSequence(_body)),(Object)((subs.mostCurrent._main.getObject())));
 BA.debugLineNum = 114;BA.debugLine="notification.Notify(id)";
Debug.ShouldStop(131072);
_notification.runVoidMethod ("Notify",(Object)(_id));
 BA.debugLineNum = 116;BA.debugLine="Return notification";
Debug.ShouldStop(524288);
if (true) return _notification;
 BA.debugLineNum = 117;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
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",4,_ba,subs.mostCurrent,564);
if (RapidSub.canDelegate("panelvisible")) { return gunav2.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 = 564;BA.debugLine="Sub panelVisible(panel As Panel, top As Int, left";
Debug.ShouldStop(524288);
 BA.debugLineNum = 565;BA.debugLine="panel.BringToFront";
Debug.ShouldStop(1048576);
_panel.runVoidMethod ("BringToFront");
 BA.debugLineNum = 566;BA.debugLine="panel.Visible = True";
Debug.ShouldStop(2097152);
_panel.runMethod(true,"setVisible",subs.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 567;BA.debugLine="panel.Top = top";
Debug.ShouldStop(4194304);
_panel.runMethod(true,"setTop",_top);
 BA.debugLineNum = 568;BA.debugLine="panel.Left = left";
Debug.ShouldStop(8388608);
_panel.runMethod(true,"setLeft",_left);
 BA.debugLineNum = 569;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _parsehttperror(RemoteObject _ba,RemoteObject _error) throws Exception{
try {
		Debug.PushSubsStack("parseHTTPError (subs) ","subs",4,_ba,subs.mostCurrent,1695);
if (RapidSub.canDelegate("parsehttperror")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","parsehttperror", _ba, _error);}
RemoteObject _nuevoerror = RemoteObject.createImmutable("");
RemoteObject _inicio = RemoteObject.createImmutable(0);
RemoteObject _final = RemoteObject.createImmutable(0);
;
Debug.locals.put("error", _error);
 BA.debugLineNum = 1695;BA.debugLine="Sub parseHTTPError(error As String) As String";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 1696;BA.debugLine="Private nuevoError As String = error";
Debug.ShouldStop(-2147483648);
_nuevoerror = _error;Debug.locals.put("nuevoError", _nuevoerror);Debug.locals.put("nuevoError", _nuevoerror);
 BA.debugLineNum = 1697;BA.debugLine="Private inicio As Int = error.IndexOf(\"<title>\")";
Debug.ShouldStop(1);
_inicio = _error.runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("<title>")));Debug.locals.put("inicio", _inicio);Debug.locals.put("inicio", _inicio);
 BA.debugLineNum = 1698;BA.debugLine="Private final As Int = error.IndexOf(\"</title>\")";
Debug.ShouldStop(2);
_final = _error.runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("</title>")));Debug.locals.put("final", _final);Debug.locals.put("final", _final);
 BA.debugLineNum = 1699;BA.debugLine="Log(\"|\" & inicio & \"|\" & final & \"|\")";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048496644",RemoteObject.concat(RemoteObject.createImmutable("|"),_inicio,RemoteObject.createImmutable("|"),_final,RemoteObject.createImmutable("|")),0);
 BA.debugLineNum = 1700;BA.debugLine="If inicio > 0 And final > 0 Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean(">",_inicio,BA.numberCast(double.class, 0)) && RemoteObject.solveBoolean(">",_final,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1701;BA.debugLine="nuevoError = error.SubString2(inicio + 17, final";
Debug.ShouldStop(16);
_nuevoerror = _error.runMethod(true,"substring",(Object)(RemoteObject.solve(new RemoteObject[] {_inicio,RemoteObject.createImmutable(17)}, "+",1, 1)),(Object)(_final));Debug.locals.put("nuevoError", _nuevoerror);
 };
 BA.debugLineNum = 1704;BA.debugLine="Return nuevoError";
Debug.ShouldStop(128);
if (true) return _nuevoerror;
 BA.debugLineNum = 1705;BA.debugLine="End Sub";
Debug.ShouldStop(256);
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",4,_ba,subs.mostCurrent,708);
if (RapidSub.canDelegate("pedidoguardado")) { return gunav2.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 = 708;BA.debugLine="Sub pedidoGuardado As Boolean";
Debug.ShouldStop(8);
 BA.debugLineNum = 709;BA.debugLine="Private guardado As Boolean = False";
Debug.ShouldStop(16);
_guardado = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("guardado", _guardado);Debug.locals.put("guardado", _guardado);
 BA.debugLineNum = 710;BA.debugLine="Private g As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(32);
_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_info3 where CAT_CL_CODIGO in (Select CUENTA from cuentaa)"))));Debug.locals.put("g", _g);Debug.locals.put("g", _g);
 BA.debugLineNum = 711;BA.debugLine="If g.RowCount > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_g.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 712;BA.debugLine="g.Position=0";
Debug.ShouldStop(128);
_g.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 713;BA.debugLine="If g.GetString(\"gestion\") = \"2\" Or g.GetString(\"";
Debug.ShouldStop(256);
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 = 716;BA.debugLine="Return guardado";
Debug.ShouldStop(2048);
if (true) return _guardado;
 BA.debugLineNum = 717;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
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",4,_ba,subs.mostCurrent,1074);
if (RapidSub.canDelegate("procesapromocion")) { return gunav2.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 = 1074;BA.debugLine="Sub procesaPromocion(idPromo As String, cliente As";
Debug.ShouldStop(131072);
 BA.debugLineNum = 1075;BA.debugLine="Private thisLog As Boolean = True  'Si es verdade";
Debug.ShouldStop(262144);
_thislog = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1076;BA.debugLine="Private inicioContador As String = DateTime.Now";
Debug.ShouldStop(524288);
_iniciocontador = BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"));Debug.locals.put("inicioContador", _iniciocontador);Debug.locals.put("inicioContador", _iniciocontador);
 BA.debugLineNum = 1077;BA.debugLine="If thisLog Then LogColor($\"********* Iniciamos re";
Debug.ShouldStop(1048576);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120387",(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 = 1079;BA.debugLine="Private pm As Map = traePromo(idPromo, cliente)";
Debug.ShouldStop(4194304);
_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 = 1080;BA.debugLine="If thisLog Then LogColor(pm, Colors.Blue)";
Debug.ShouldStop(8388608);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120390",BA.ObjectToString(_pm),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1081;BA.debugLine="If pm.Get(\"resultado\") = \"ok\" Then 'Si encontramo";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("resultado")))),RemoteObject.createImmutable(("ok")))) { 
 BA.debugLineNum = 1083;BA.debugLine="If thisLog Then LogColor($\"Promociones permitida";
Debug.ShouldStop(67108864);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120393",(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 = 1084;BA.debugLine="If thisLog Then Log(\"Promos vendidas: \" & traePr";
Debug.ShouldStop(134217728);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120394",RemoteObject.concat(RemoteObject.createImmutable("Promos vendidas: "),_traepromosvendidas(_ba,_idpromo,_cliente)),0);};
 BA.debugLineNum = 1085;BA.debugLine="If traePromosVendidas(idPromo, cliente) >= traeM";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean("g",_traepromosvendidas(_ba,_idpromo,_cliente),BA.numberCast(double.class, _traemaxpromos(_ba,_pm)))) { 
 BA.debugLineNum = 1086;BA.debugLine="If thisLog Then LogColor(\"Ya se vendieron las p";
Debug.ShouldStop(536870912);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120396",BA.ObjectToString("Ya se vendieron las promos PERMITIDAS para el cliente"),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 1087;BA.debugLine="Return CreateMap(\"status\":\"ko\", \"mp\":pm)";
Debug.ShouldStop(1073741824);
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 = 1090;BA.debugLine="Private inventarioSinFijos As Map = restaFijosPr";
Debug.ShouldStop(2);
_inventariosinfijos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_inventariosinfijos = _restafijospromo(_ba,_pm);Debug.locals.put("inventarioSinFijos", _inventariosinfijos);Debug.locals.put("inventarioSinFijos", _inventariosinfijos);
 BA.debugLineNum = 1091;BA.debugLine="If thisLog Then LogColor(\"inventariosfijos=\"&inv";
Debug.ShouldStop(4);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120401",RemoteObject.concat(RemoteObject.createImmutable("inventariosfijos="),_inventariosinfijos),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));};
 BA.debugLineNum = 1093;BA.debugLine="If inventarioSinFijos.Get(\"resultado\") = \"ok\" Th";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",_inventariosinfijos.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("resultado")))),RemoteObject.createImmutable(("ok")))) { 
 BA.debugLineNum = 1095;BA.debugLine="Private pv As Boolean =  alcanzanLosVariablesPa";
Debug.ShouldStop(64);
_pv = _alcanzanlosvariablesparapromo(_ba,_pm,_inventariosinfijos);Debug.locals.put("pv", _pv);Debug.locals.put("pv", _pv);
 BA.debugLineNum = 1096;BA.debugLine="If thisLog Then Log(\"Alcanzan los variables? --";
Debug.ShouldStop(128);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120406",RemoteObject.concat(RemoteObject.createImmutable("Alcanzan los variables? --> "),_pv),0);};
 BA.debugLineNum = 1097;BA.debugLine="If pv Then Return CreateMap(\"status\":\"ok\", \"mp\"";
Debug.ShouldStop(256);
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 = 1099;BA.debugLine="If thisLog Then LogColor(\"NO HAY INVENTARIO SUF";
Debug.ShouldStop(1024);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120409",RemoteObject.concat(RemoteObject.createImmutable("NO HAY INVENTARIO SUFICIENTE "),_idpromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 1100;BA.debugLine="Return CreateMap(\"status\":\"ko\", \"mp\":pm)";
Debug.ShouldStop(2048);
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 = 1106;BA.debugLine="LogColor(\"TIEMPO DE PROCESO ESTA PROMO: \" & ((Dat";
Debug.ShouldStop(131072);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047120416",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 = 1107;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
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="Dim skmt As SQL";
subs._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 //BA.debugLineNum = 18;BA.debugLine="Dim in As Intent";
subs._in = RemoteObject.createNew ("anywheresoftware.b4a.objects.IntentWrapper");
 //BA.debugLineNum = 19;BA.debugLine="Dim intentUsado As Boolean = False";
subs._intentusado = subs.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 20;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _restafijospromo(RemoteObject _ba,RemoteObject _promomap) throws Exception{
try {
		Debug.PushSubsStack("restaFijosPromo (subs) ","subs",4,_ba,subs.mostCurrent,973);
if (RapidSub.canDelegate("restafijospromo")) { return gunav2.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 = 973;BA.debugLine="Sub restaFijosPromo(promoMap As Map) As Map 'ignor";
Debug.ShouldStop(4096);
 BA.debugLineNum = 974;BA.debugLine="Private thisLog As Boolean = False 'Si es verdade";
Debug.ShouldStop(8192);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 975;BA.debugLine="Private inventariosDisponiblesParaEstaPromo As Ma";
Debug.ShouldStop(16384);
_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 = 976;BA.debugLine="If thisLog Then LogColor(inventariosDisponiblesPa";
Debug.ShouldStop(32768);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923779",BA.ObjectToString(_inventariosdisponiblesparaestapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 977;BA.debugLine="If thisLog Then LogColor(\"Inventario inicial ante";
Debug.ShouldStop(65536);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923780",RemoteObject.concat(RemoteObject.createImmutable("Inventario inicial antes de FIJOS: "),_inventariosdisponiblesparaestapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Gray"));};
 BA.debugLineNum = 978;BA.debugLine="Private i As Int";
Debug.ShouldStop(131072);
_i = RemoteObject.createImmutable(0);Debug.locals.put("i", _i);
 BA.debugLineNum = 979;BA.debugLine="Private prodsmap As Map = promoMap.Get(\"productos";
Debug.ShouldStop(262144);
_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 = 980;BA.debugLine="Private prodsFijos As List = promoMap.get(\"prodsF";
Debug.ShouldStop(524288);
_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 = 981;BA.debugLine="For p = 0 To prodsFijos.Size - 1";
Debug.ShouldStop(1048576);
{
final int step8 = 1;
final int limit8 = RemoteObject.solve(new RemoteObject[] {_prodsfijos.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
for (;(step8 > 0 && _p <= limit8) || (step8 < 0 && _p >= limit8) ;_p = ((int)(0 + _p + step8))  ) {
Debug.locals.put("p", _p);
 BA.debugLineNum = 982;BA.debugLine="Private t As String = prodsFijos.Get(p) 'Obtenem";
Debug.ShouldStop(2097152);
_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 = 983;BA.debugLine="Private p2 As Map = prodsmap.Get(t) 'Obtenemos u";
Debug.ShouldStop(4194304);
_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 = 984;BA.debugLine="If thisLog Then Log($\"T: ${t}, prod ${p2.Get(\"id";
Debug.ShouldStop(8388608);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923787",(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 = 985;BA.debugLine="If thisLog Then Log(\"inventariosDisponiblesParaE";
Debug.ShouldStop(16777216);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923788",RemoteObject.concat(RemoteObject.createImmutable("inventariosDisponiblesParaEstaPromo="),_inventariosdisponiblesparaestapromo),0);};
 BA.debugLineNum = 986;BA.debugLine="If inventariosDisponiblesParaEstaPromo.ContainsK";
Debug.ShouldStop(33554432);
if (_inventariosdisponiblesparaestapromo.runMethod(true,"ContainsKey",(Object)((_t))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 987;BA.debugLine="i = inventariosDisponiblesParaEstaPromo.get(t)";
Debug.ShouldStop(67108864);
_i = BA.numberCast(int.class, _inventariosdisponiblesparaestapromo.runMethod(false,"Get",(Object)((_t))));Debug.locals.put("i", _i);
 BA.debugLineNum = 988;BA.debugLine="If thisLog Then Log($\"Nuevo inventario de ${t}:";
Debug.ShouldStop(134217728);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923791",(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 = 989;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(t, $\"${";
Debug.ShouldStop(268435456);
_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 = 990;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"result";
Debug.ShouldStop(536870912);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("ok"))));
 }else {
 BA.debugLineNum = 992;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"result";
Debug.ShouldStop(-2147483648);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("No hay suficiente producto para la promocion."))));
 BA.debugLineNum = 993;BA.debugLine="LogColor(\"Sin suficiente inventario fijo: \" & t";
Debug.ShouldStop(1);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923796",RemoteObject.concat(RemoteObject.createImmutable("Sin suficiente inventario fijo: "),_t),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 994;BA.debugLine="Exit";
Debug.ShouldStop(2);
if (true) break;
 };
 BA.debugLineNum = 996;BA.debugLine="If i - p2.Get(\"piezas\") < 0 Then";
Debug.ShouldStop(8);
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 = 997;BA.debugLine="inventariosDisponiblesParaEstaPromo.Put(\"result";
Debug.ShouldStop(16);
_inventariosdisponiblesparaestapromo.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("No hay suficiente producto para la promocion."))));
 BA.debugLineNum = 998;BA.debugLine="Exit";
Debug.ShouldStop(32);
if (true) break;
 };
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1001;BA.debugLine="If prodsFijos.Size = 0 Then inventariosDisponible";
Debug.ShouldStop(256);
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 = 1002;BA.debugLine="If thisLog Then LogColor(\"Inventario final depues";
Debug.ShouldStop(512);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046923805",RemoteObject.concat(RemoteObject.createImmutable("Inventario final depues de FIJOS: "),_inventariosdisponiblesparaestapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1003;BA.debugLine="Return inventariosDisponiblesParaEstaPromo";
Debug.ShouldStop(1024);
if (true) return _inventariosdisponiblesparaestapromo;
 BA.debugLineNum = 1004;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
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",4,_ba,subs.mostCurrent,202);
if (RapidSub.canDelegate("revisabd")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisabd", _ba);}
;
 BA.debugLineNum = 202;BA.debugLine="Sub revisaBD 'ignore";
Debug.ShouldStop(512);
 BA.debugLineNum = 204;BA.debugLine="If Not(File.Exists(Starter.ruta, \"kmt.db\")) Then";
Debug.ShouldStop(2048);
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()) { 
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 = 205;BA.debugLine="If Not(kmt.IsInitialized) Then kmt.Initialize(Sta";
Debug.ShouldStop(4096);
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 = 206;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUTA";
Debug.ShouldStop(8192);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS RUTA_GPS(FECHA INTEGER, LAT TEXT, LON TEXT)")));
 BA.debugLineNum = 208;BA.debugLine="kmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS bita";
Debug.ShouldStop(32768);
subs._kmt.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS bitacora(fecha INTEGER, texto TEXT)")));
 BA.debugLineNum = 210;BA.debugLine="If Not(errorLog.IsInitialized) Then errorLog.Init";
Debug.ShouldStop(131072);
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 = 211;BA.debugLine="errorLog.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS";
Debug.ShouldStop(262144);
subs._errorlog.runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS errores(fecha INTEGER, error TEXT)")));
 BA.debugLineNum = 212;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
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",4,_ba,subs.mostCurrent,365);
if (RapidSub.canDelegate("revisaflp")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisaflp", _ba);}
RemoteObject _todobienflp = RemoteObject.createImmutable(false);
;
 BA.debugLineNum = 365;BA.debugLine="Sub revisaFLP 'ignore";
Debug.ShouldStop(4096);
 BA.debugLineNum = 366;BA.debugLine="LogColor(\"**** **** Revisamos FLP **** ****\", Col";
Debug.ShouldStop(8192);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044761089",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 = 367;BA.debugLine="Private todoBienFLP As Boolean = True";
Debug.ShouldStop(16384);
_todobienflp = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("todoBienFLP", _todobienflp);Debug.locals.put("todoBienFLP", _todobienflp);
 BA.debugLineNum = 368;BA.debugLine="Try";
Debug.ShouldStop(32768);
try { BA.debugLineNum = 369;BA.debugLine="If Not(Tracker.FLP.IsInitialized) Then";
Debug.ShouldStop(65536);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 370;BA.debugLine="log2DB(\"revisaFLP: No esta inicializado ... 'Re";
Debug.ShouldStop(131072);
_log2db(_ba,RemoteObject.createImmutable("revisaFLP: No esta inicializado ... 'Reinicializando FLP'"));
 BA.debugLineNum = 371;BA.debugLine="Tracker.FLP.Initialize(\"flp\")";
Debug.ShouldStop(262144);
subs.mostCurrent._tracker._flp /*RemoteObject*/ .runVoidMethod ("Initialize",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)(RemoteObject.createImmutable("flp")));
 BA.debugLineNum = 372;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(524288);
_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 = 375;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsInitialized) ---";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044761098",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 = 377;BA.debugLine="Try";
Debug.ShouldStop(16777216);
try { BA.debugLineNum = 378;BA.debugLine="If Tracker.FLP.IsInitialized Then";
Debug.ShouldStop(33554432);
if (subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 379;BA.debugLine="Try";
Debug.ShouldStop(67108864);
try { BA.debugLineNum = 380;BA.debugLine="If Not(Tracker.FLP.IsConnected) Then";
Debug.ShouldStop(134217728);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(true,"IsConnected"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 381;BA.debugLine="log2DB(\"revisaFLP: No esta conectado ... 'Rec";
Debug.ShouldStop(268435456);
_log2db(_ba,RemoteObject.createImmutable("revisaFLP: No esta conectado ... 'Reconectando FLP'"));
 BA.debugLineNum = 383;BA.debugLine="CallSubDelayed(Tracker,\"StartFLP\")";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("CallSubDelayed",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)((subs.mostCurrent._tracker.getObject())),(Object)(RemoteObject.createImmutable("StartFLP")));
 BA.debugLineNum = 384;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(-2147483648);
_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 = 387;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsConnected) -->";
Debug.ShouldStop(4);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044761110",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 = 389;BA.debugLine="Try";
Debug.ShouldStop(16);
try { BA.debugLineNum = 390;BA.debugLine="If Tracker.FLP.IsConnected And _ 					Tracker.";
Debug.ShouldStop(32);
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 = 393;BA.debugLine="log2DB(\"revisaFLP: 'No se esta actualizando,";
Debug.ShouldStop(256);
_log2db(_ba,RemoteObject.createImmutable("revisaFLP: 'No se esta actualizando, lo reiniciamos ...'"));
 BA.debugLineNum = 394;BA.debugLine="StartService(Tracker)";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("StartService",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba),(Object)((subs.mostCurrent._tracker.getObject())));
 BA.debugLineNum = 395;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(1024);
_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 = 398;BA.debugLine="LogColor(\"If FLP.IsConnectctd and FLP.getLKL.I";
Debug.ShouldStop(8192);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044761121",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 = 401;BA.debugLine="If todoBienFLP Then LogColor(\" +++ +++ Sin error";
Debug.ShouldStop(65536);
if (_todobienflp.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044761124",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 = 403;BA.debugLine="LogColor(\"If Tracker.FLP.IsInitialized --> \"&Las";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044761126",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 = 406;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisaforzaractualizacion(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("revisaForzarActualizacion (subs) ","subs",4,_ba,subs.mostCurrent,1666);
if (RapidSub.canDelegate("revisaforzaractualizacion")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisaforzaractualizacion", _ba);}
RemoteObject _ra = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _nuevaversion = RemoteObject.createImmutable("");
RemoteObject _forzaractualizacion = RemoteObject.createImmutable(0);
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
;
 BA.debugLineNum = 1666;BA.debugLine="Sub revisaForzarActualizacion As Map";
Debug.ShouldStop(2);
 BA.debugLineNum = 1667;BA.debugLine="Private ra As ResultSet = Starter.skmt.ExecQuery(";
Debug.ShouldStop(4);
_ra = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_ra = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.createImmutable("select * from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'VERSION_NUEVA' or CAT_VA_DESCRIPCION = 'FORZAR_ACTUALIZACION'")))));Debug.locals.put("ra", _ra);Debug.locals.put("ra", _ra);
 BA.debugLineNum = 1668;BA.debugLine="Private nuevaVersion As String = \"\"";
Debug.ShouldStop(8);
_nuevaversion = BA.ObjectToString("");Debug.locals.put("nuevaVersion", _nuevaversion);Debug.locals.put("nuevaVersion", _nuevaversion);
 BA.debugLineNum = 1669;BA.debugLine="Private forzarActualizacion As Int = 2";
Debug.ShouldStop(16);
_forzaractualizacion = BA.numberCast(int.class, 2);Debug.locals.put("forzarActualizacion", _forzaractualizacion);Debug.locals.put("forzarActualizacion", _forzaractualizacion);
 BA.debugLineNum = 1670;BA.debugLine="Private m As Map";
Debug.ShouldStop(32);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 1671;BA.debugLine="m.Initialize";
Debug.ShouldStop(64);
_m.runVoidMethod ("Initialize");
 BA.debugLineNum = 1672;BA.debugLine="Do While ra.NextRow";
Debug.ShouldStop(128);
while (_ra.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1673;BA.debugLine="If ra.GetString(\"CAT_VA_DESCRIPCION\") = \"VERSION";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",_ra.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_DESCRIPCION"))),BA.ObjectToString("VERSION_NUEVA"))) { 
_nuevaversion = _ra.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")));Debug.locals.put("nuevaVersion", _nuevaversion);};
 BA.debugLineNum = 1674;BA.debugLine="If ra.GetString(\"CAT_VA_DESCRIPCION\") = \"FORZAR_";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("=",_ra.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_DESCRIPCION"))),BA.ObjectToString("FORZAR_ACTUALIZACION"))) { 
_forzaractualizacion = _ra.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")));Debug.locals.put("forzarActualizacion", _forzaractualizacion);};
 }
;
 BA.debugLineNum = 1678;BA.debugLine="If nuevaVersion <> Application.VersionName And fo";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("!",_nuevaversion,subs.mostCurrent.__c.getField(false,"Application").runMethod(true,"getVersionName")) && RemoteObject.solveBoolean("=",_forzaractualizacion,BA.numberCast(double.class, 1))) { 
 BA.debugLineNum = 1679;BA.debugLine="m.Put(\"forzar\", 1)";
Debug.ShouldStop(16384);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("forzar"))),(Object)(RemoteObject.createImmutable((1))));
 BA.debugLineNum = 1680;BA.debugLine="m.Put(\"nuevaVersion\", nuevaVersion)";
Debug.ShouldStop(32768);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("nuevaVersion"))),(Object)((_nuevaversion)));
 }else 
{ BA.debugLineNum = 1681;BA.debugLine="else if forzarActualizacion = 2 Then 'Si no exist";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",_forzaractualizacion,BA.numberCast(double.class, 2))) { 
 BA.debugLineNum = 1682;BA.debugLine="m.Put(\"forzar\", 2)";
Debug.ShouldStop(131072);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("forzar"))),(Object)(RemoteObject.createImmutable((2))));
 BA.debugLineNum = 1683;BA.debugLine="m.Put(\"nuevaVersion\", \"Recargar\")";
Debug.ShouldStop(262144);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("nuevaVersion"))),(Object)((RemoteObject.createImmutable("Recargar"))));
 }else {
 BA.debugLineNum = 1685;BA.debugLine="m.Put(\"forzar\", 0)";
Debug.ShouldStop(1048576);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("forzar"))),(Object)(RemoteObject.createImmutable((0))));
 BA.debugLineNum = 1686;BA.debugLine="m.Put(\"nuevaVersion\", nuevaVersion)";
Debug.ShouldStop(2097152);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("nuevaVersion"))),(Object)((_nuevaversion)));
 }}
;
 BA.debugLineNum = 1688;BA.debugLine="If nuevaVersion = \"\" Or nuevaVersion = Null Or nu";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",_nuevaversion,BA.ObjectToString("")) || RemoteObject.solveBoolean("n",_nuevaversion) || RemoteObject.solveBoolean("=",_nuevaversion,BA.ObjectToString("null"))) { 
 BA.debugLineNum = 1689;BA.debugLine="m.Put(\"forzar\", 0)";
Debug.ShouldStop(16777216);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("forzar"))),(Object)(RemoteObject.createImmutable((0))));
 BA.debugLineNum = 1690;BA.debugLine="m.Put(\"nuevaVersion\", \"\")";
Debug.ShouldStop(33554432);
_m.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("nuevaVersion"))),(Object)((RemoteObject.createImmutable(""))));
 };
 BA.debugLineNum = 1692;BA.debugLine="Return m";
Debug.ShouldStop(134217728);
if (true) return _m;
 BA.debugLineNum = 1693;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisaimpreso(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("revisaImpreso (subs) ","subs",4,_ba,subs.mostCurrent,1906);
if (RapidSub.canDelegate("revisaimpreso")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisaimpreso", _ba);}
RemoteObject _impreso = RemoteObject.createImmutable(false);
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1906;BA.debugLine="Sub revisaImpreso As Boolean 'ignore";
Debug.ShouldStop(131072);
 BA.debugLineNum = 1907;BA.debugLine="Private impreso As Boolean = False";
Debug.ShouldStop(262144);
_impreso = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("impreso", _impreso);Debug.locals.put("impreso", _impreso);
 BA.debugLineNum = 1908;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"sel";
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._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select idCliente from ticket_impreso where idCliente in (select cuenta from cuentaa)"))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1909;BA.debugLine="If c.RowCount > 0 Then impreso = True";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
_impreso = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("impreso", _impreso);};
 BA.debugLineNum = 1910;BA.debugLine="Return impreso";
Debug.ShouldStop(2097152);
if (true) return _impreso;
 BA.debugLineNum = 1911;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable(false);
}
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",4,_ba,subs.mostCurrent,1153);
if (RapidSub.canDelegate("revisamaxpromosprodsfijosporinventario")) { return gunav2.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 = 1153;BA.debugLine="Sub revisaMaxPromosProdsFijosPorInventario(pm As M";
Debug.ShouldStop(1);
 BA.debugLineNum = 1154;BA.debugLine="Private thisLog As Boolean = False";
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="Private invFijoXpromo As Map";
Debug.ShouldStop(4);
_invfijoxpromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("invFijoXpromo", _invfijoxpromo);
 BA.debugLineNum = 1156;BA.debugLine="Private t As List";
Debug.ShouldStop(8);
_t = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("t", _t);
 BA.debugLineNum = 1157;BA.debugLine="t.Initialize";
Debug.ShouldStop(16);
_t.runVoidMethod ("Initialize");
 BA.debugLineNum = 1158;BA.debugLine="t.Add(traeMaxPromos(pm)) ' Agregamos a la lista l";
Debug.ShouldStop(32);
_t.runVoidMethod ("Add",(Object)((_traemaxpromos(_ba,_pm))));
 BA.debugLineNum = 1159;BA.debugLine="invFijoXpromo.Initialize";
Debug.ShouldStop(64);
_invfijoxpromo.runVoidMethod ("Initialize");
 BA.debugLineNum = 1160;BA.debugLine="If thisLog Then LogColor($\"pm=${pm}\"$, Colors.Blu";
Debug.ShouldStop(128);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251463",(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 = 1161;BA.debugLine="Private invDispParaPromo As Map = traemosInventar";
Debug.ShouldStop(256);
_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 = 1162;BA.debugLine="If thisLog Then Log($\"invDispParaPromo=${invDispP";
Debug.ShouldStop(512);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251465",(RemoteObject.concat(RemoteObject.createImmutable("invDispParaPromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1163;BA.debugLine="Private prodsFijosPiezas As List = pm.Get(\"prodsF";
Debug.ShouldStop(1024);
_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 = 1164;BA.debugLine="Private idProdsFijos As List = pm.Get(\"prodsFijos";
Debug.ShouldStop(2048);
_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 = 1165;BA.debugLine="For p = 0 To idProdsFijos.Size -1 'Generamos una";
Debug.ShouldStop(4096);
{
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 = 1166;BA.debugLine="If thisLog Then Log($\"id=${idProdsFijos.Get(p)},";
Debug.ShouldStop(8192);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251469",(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 = 1167;BA.debugLine="If thisLog Then Log($\"${(invDispParaPromo.Get(id";
Debug.ShouldStop(16384);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251470",(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 = 1168;BA.debugLine="Private x() As String = Regex.Split(\"\\.\", $\"${(i";
Debug.ShouldStop(32768);
_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 = 1169;BA.debugLine="If thisLog Then Log(x(0))";
Debug.ShouldStop(65536);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251472",_x.getArrayElement(true,BA.numberCast(int.class, 0)),0);};
 BA.debugLineNum = 1170;BA.debugLine="t.Add(x(0).As(Int)) 'Solo guardamos la parte del";
Debug.ShouldStop(131072);
_t.runVoidMethod ("Add",(Object)(((BA.numberCast(int.class, _x.getArrayElement(true,BA.numberCast(int.class, 0)))))));
 }
}Debug.locals.put("p", _p);
;
 BA.debugLineNum = 1172;BA.debugLine="t.Sort(True) 'Ordenamos la lista para que en el l";
Debug.ShouldStop(524288);
_t.runVoidMethod ("Sort",(Object)(subs.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 1173;BA.debugLine="If thisLog Then LogColor($\"prodsFijos=${idProdsFi";
Debug.ShouldStop(1048576);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251476",(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 = 1174;BA.debugLine="If thisLog Then LogColor($\"prodsFijosPiezasReq=${";
Debug.ShouldStop(2097152);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251477",(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 = 1175;BA.debugLine="If thisLog Then LogColor($\"invFijoXpromo=${invFij";
Debug.ShouldStop(4194304);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251478",(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 = 1176;BA.debugLine="LogColor(\"Max promos de prodsFijos POR inventario";
Debug.ShouldStop(8388608);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047251479",RemoteObject.concat(RemoteObject.createImmutable("Max promos de prodsFijos POR inventario = "),_t.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0)))),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 1177;BA.debugLine="Return t.Get(0) 'Regresamos el resultado mas pequ";
Debug.ShouldStop(16777216);
if (true) return BA.numberCast(int.class, _t.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))));
 BA.debugLineNum = 1178;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
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",4,_ba,subs.mostCurrent,1110);
if (RapidSub.canDelegate("revisamaxpromosprodsfijosporinventario2")) { return gunav2.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 = 1110;BA.debugLine="Sub revisaMaxPromosProdsFijosPorInventario2(pm As";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 1111;BA.debugLine="Private thisLog As Boolean = False";
Debug.ShouldStop(4194304);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1112;BA.debugLine="If thisLog Then Log($\"pm=${pm}\"$)";
Debug.ShouldStop(8388608);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185922",(RemoteObject.concat(RemoteObject.createImmutable("pm="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pm.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1114;BA.debugLine="Private invDispParaPromo As Map = traemosInventar";
Debug.ShouldStop(33554432);
_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 = 1115;BA.debugLine="If thisLog Then Log($\"invDispParaPromo=${invDispP";
Debug.ShouldStop(67108864);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185925",(RemoteObject.concat(RemoteObject.createImmutable("invDispParaPromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 1116;BA.debugLine="Private maxPromos As String = traeMaxPromos(pm)";
Debug.ShouldStop(134217728);
_maxpromos = BA.NumberToString(_traemaxpromos(_ba,_pm));Debug.locals.put("maxPromos", _maxpromos);Debug.locals.put("maxPromos", _maxpromos);
 BA.debugLineNum = 1117;BA.debugLine="Private maxPromosFijosXinv As Int = 1";
Debug.ShouldStop(268435456);
_maxpromosfijosxinv = BA.numberCast(int.class, 1);Debug.locals.put("maxPromosFijosXinv", _maxpromosfijosxinv);Debug.locals.put("maxPromosFijosXinv", _maxpromosfijosxinv);
 BA.debugLineNum = 1118;BA.debugLine="Private fpf2, pdp2 As Int";
Debug.ShouldStop(536870912);
_fpf2 = RemoteObject.createImmutable(0);Debug.locals.put("fpf2", _fpf2);
_pdp2 = RemoteObject.createImmutable(0);Debug.locals.put("pdp2", _pdp2);
 BA.debugLineNum = 1119;BA.debugLine="Private salir As Boolean = False";
Debug.ShouldStop(1073741824);
_salir = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("salir", _salir);Debug.locals.put("salir", _salir);
 BA.debugLineNum = 1120;BA.debugLine="Private pf As List = pm.Get(\"prodsFijos\")";
Debug.ShouldStop(-2147483648);
_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 = 1121;BA.debugLine="Private pfp As List = pm.Get(\"prodsFijosPiezas\")";
Debug.ShouldStop(1);
_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 = 1122;BA.debugLine="If thisLog Then Log($\"maxPromos=${maxPromos}, pro";
Debug.ShouldStop(2);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185932",(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 = 1123;BA.debugLine="If thisLog Then LogColor($\"InvFijo disponible=${i";
Debug.ShouldStop(4);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185933",(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 = 1124;BA.debugLine="Private invFijoXpromo As Map";
Debug.ShouldStop(8);
_invfijoxpromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("invFijoXpromo", _invfijoxpromo);
 BA.debugLineNum = 1125;BA.debugLine="invFijoXpromo.Initialize";
Debug.ShouldStop(16);
_invfijoxpromo.runVoidMethod ("Initialize");
 BA.debugLineNum = 1126;BA.debugLine="For p = 0 To pf.Size -1 'Generamos mapa con los p";
Debug.ShouldStop(32);
{
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 = 1127;BA.debugLine="invFijoXpromo.Put(pf.Get(p), pfp.Get(p))";
Debug.ShouldStop(64);
_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 = 1129;BA.debugLine="If thisLog Then LogColor(\"Inv req. de prods fijos";
Debug.ShouldStop(256);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185939",RemoteObject.concat(RemoteObject.createImmutable("Inv req. de prods fijos x promo"),_invfijoxpromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));};
 BA.debugLineNum = 1130;BA.debugLine="For i = 1 To maxPromos 'Revisamos cuantas promoci";
Debug.ShouldStop(512);
{
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 = 1131;BA.debugLine="If thisLog Then LogColor(\"Prods para promo \" & (";
Debug.ShouldStop(1024);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185941",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 = 1132;BA.debugLine="For q = 0 To pf.Size - 1";
Debug.ShouldStop(2048);
{
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 = 1133;BA.debugLine="Private q2 As String = pf.Get(q)";
Debug.ShouldStop(4096);
_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 = 1134;BA.debugLine="If thisLog Then Log(\"q=\"&q2)";
Debug.ShouldStop(8192);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185944",RemoteObject.concat(RemoteObject.createImmutable("q="),_q2),0);};
 BA.debugLineNum = 1136;BA.debugLine="fpf2 = pfp.Get(q) * i 'Multiplicamos las piezas";
Debug.ShouldStop(32768);
_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 = 1137;BA.debugLine="pdp2 = invDispParaPromo.Get(q2)";
Debug.ShouldStop(65536);
_pdp2 = BA.numberCast(int.class, _invdispparapromo.runMethod(false,"Get",(Object)((_q2))));Debug.locals.put("pdp2", _pdp2);
 BA.debugLineNum = 1138;BA.debugLine="If thisLog Then Log($\"pf=${q2}, Actual=${(i)},";
Debug.ShouldStop(131072);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185948",(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 = 1139;BA.debugLine="If pdp2 - fpf2 < 0 Then 'Si el inventario es ne";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("<",RemoteObject.solve(new RemoteObject[] {_pdp2,_fpf2}, "-",1, 1),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1140;BA.debugLine="salir=True";
Debug.ShouldStop(524288);
_salir = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("salir", _salir);
 BA.debugLineNum = 1141;BA.debugLine="Exit";
Debug.ShouldStop(1048576);
if (true) break;
 };
 }
}Debug.locals.put("q", _q);
;
 BA.debugLineNum = 1144;BA.debugLine="If salir Then Exit";
Debug.ShouldStop(8388608);
if (_salir.<Boolean>get().booleanValue()) { 
if (true) break;};
 BA.debugLineNum = 1145;BA.debugLine="maxPromosFijosXinv = i";
Debug.ShouldStop(16777216);
_maxpromosfijosxinv = BA.numberCast(int.class, _i);Debug.locals.put("maxPromosFijosXinv", _maxpromosfijosxinv);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 1147;BA.debugLine="If thisLog Then LogColor(\"InvFijo requerido x pro";
Debug.ShouldStop(67108864);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185957",RemoteObject.concat(RemoteObject.createImmutable("InvFijo requerido x promo="),_invfijoxpromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 1148;BA.debugLine="LogColor(\"Maximo de promociones de prodsFijos POR";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047185958",RemoteObject.concat(RemoteObject.createImmutable("Maximo de promociones de prodsFijos POR inventario = "),_maxpromosfijosxinv),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 1149;BA.debugLine="Return maxPromosFijosXinv";
Debug.ShouldStop(268435456);
if (true) return _maxpromosfijosxinv;
 BA.debugLineNum = 1150;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
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",4,_ba,subs.mostCurrent,2103);
if (RapidSub.canDelegate("revisamaxpromosprodsvariablesporinventario")) { return gunav2.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 = 2103;BA.debugLine="Sub revisaMaxPromosProdsVariablesPorInventario(pm";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 2104;BA.debugLine="Private thisLog As Boolean = False";
Debug.ShouldStop(8388608);
_thislog = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 2105;BA.debugLine="If thisLog Then Log(\"============================";
Debug.ShouldStop(16777216);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610754",RemoteObject.createImmutable("======================================================"),0);};
 BA.debugLineNum = 2106;BA.debugLine="If thisLog Then Log(\"============================";
Debug.ShouldStop(33554432);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610755",RemoteObject.createImmutable("======================================================"),0);};
 BA.debugLineNum = 2107;BA.debugLine="Private invFijoXpromo As Map";
Debug.ShouldStop(67108864);
_invfijoxpromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("invFijoXpromo", _invfijoxpromo);
 BA.debugLineNum = 2108;BA.debugLine="invFijoXpromo.Initialize";
Debug.ShouldStop(134217728);
_invfijoxpromo.runVoidMethod ("Initialize");
 BA.debugLineNum = 2109;BA.debugLine="Private totalProdsVariablesDisponibles As Int = 0";
Debug.ShouldStop(268435456);
_totalprodsvariablesdisponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);
 BA.debugLineNum = 2110;BA.debugLine="Private totalProdsVariables2Disponibles As Int =";
Debug.ShouldStop(536870912);
_totalprodsvariables2disponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);
 BA.debugLineNum = 2111;BA.debugLine="If thisLog Then LogColor($\"pm=${pm}\"$, Colors.Blu";
Debug.ShouldStop(1073741824);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610760",(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 = 2112;BA.debugLine="Private invDispParaPromo As Map = traemosInventar";
Debug.ShouldStop(-2147483648);
_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 = 2113;BA.debugLine="If thisLog Then Log($\"invDispParaPromo=${invDispP";
Debug.ShouldStop(1);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610762",(RemoteObject.concat(RemoteObject.createImmutable("invDispParaPromo="),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_invdispparapromo.getObject()))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 2114;BA.debugLine="Private maxPromos As String = traeMaxPromos(pm)";
Debug.ShouldStop(2);
_maxpromos = BA.NumberToString(_traemaxpromos(_ba,_pm));Debug.locals.put("maxPromos", _maxpromos);Debug.locals.put("maxPromos", _maxpromos);
 BA.debugLineNum = 2115;BA.debugLine="Private maxPromosXFijos As Int = revisaMaxPromosP";
Debug.ShouldStop(4);
_maxpromosxfijos = _revisamaxpromosprodsfijosporinventario(_ba,_pm);Debug.locals.put("maxPromosXFijos", _maxpromosxfijos);Debug.locals.put("maxPromosXFijos", _maxpromosxfijos);
 BA.debugLineNum = 2116;BA.debugLine="Private idProdsVariables As List = pm.Get(\"prodsV";
Debug.ShouldStop(8);
_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 = 2117;BA.debugLine="Private idProdsVariables2 As List = pm.Get(\"prods";
Debug.ShouldStop(16);
_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 = 2118;BA.debugLine="Private prodsVariablesRequeridos As Int = pm.Get(";
Debug.ShouldStop(32);
_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 = 2119;BA.debugLine="Private prodsVariables2Requeridos As Int = pm.Get";
Debug.ShouldStop(64);
_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 = 2120;BA.debugLine="Private prodsFijosPiezas As List = pm.Get(\"prodsF";
Debug.ShouldStop(128);
_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 = 2121;BA.debugLine="Private idProdsFijos As List = pm.Get(\"prodsFijos";
Debug.ShouldStop(256);
_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 = 2122;BA.debugLine="For p = 0 To idProdsFijos.Size -1 'Generamos mapa";
Debug.ShouldStop(512);
{
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 = 2123;BA.debugLine="invFijoXpromo.Put(idProdsFijos.Get(p), prodsFijo";
Debug.ShouldStop(1024);
_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 = 2124;BA.debugLine="Private idEsteProd As String = idProdsFijos.Get(";
Debug.ShouldStop(2048);
_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 = 2125;BA.debugLine="Private invEsteProd As Int = invDispParaPromo.Ge";
Debug.ShouldStop(4096);
_investeprod = BA.numberCast(int.class, _invdispparapromo.runMethod(false,"Get",(Object)((_idesteprod))));Debug.locals.put("invEsteProd", _investeprod);Debug.locals.put("invEsteProd", _investeprod);
 BA.debugLineNum = 2126;BA.debugLine="Private pzasReqEsteProd As Int = prodsFijosPieza";
Debug.ShouldStop(8192);
_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 = 2127;BA.debugLine="If thisLog Then Log($\"id=${idEsteProd}, inv=${in";
Debug.ShouldStop(16384);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610776",(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 = 2130;BA.debugLine="If thisLog Then LogColor($\"MaxPromos=${maxPromos}";
Debug.ShouldStop(131072);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610779",(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 = 2131;BA.debugLine="If thisLog Then LogColor($\"prodsFijos=${idProdsFi";
Debug.ShouldStop(262144);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610780",(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 = 2132;BA.debugLine="If thisLog Then LogColor($\"prodsFijosPiezasReq=${";
Debug.ShouldStop(524288);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610781",(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 = 2133;BA.debugLine="If thisLog Then LogColor($\"prodsVariables=${idPro";
Debug.ShouldStop(1048576);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610782",(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 = 2134;BA.debugLine="If thisLog Then LogColor($\"prodsVariables2=${idPr";
Debug.ShouldStop(2097152);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610783",(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 = 2135;BA.debugLine="If thisLog Then LogColor($\"invFijoXpromo=${invFij";
Debug.ShouldStop(4194304);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610784",(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 = 2136;BA.debugLine="If thisLog Then Log($\"Prods variables disponibles";
Debug.ShouldStop(8388608);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610785",(RemoteObject.concat(RemoteObject.createImmutable("Prods variables disponibles = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalprodsvariablesdisponibles))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 2137;BA.debugLine="If thisLog Then Log($\"Prods variables2 disponible";
Debug.ShouldStop(16777216);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610786",(RemoteObject.concat(RemoteObject.createImmutable("Prods variables2 disponibles = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalprodsvariables2disponibles))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 2138;BA.debugLine="Private maxPromosXVariables As Int = 0";
Debug.ShouldStop(33554432);
_maxpromosxvariables = BA.numberCast(int.class, 0);Debug.locals.put("maxPromosXVariables", _maxpromosxvariables);Debug.locals.put("maxPromosXVariables", _maxpromosxvariables);
 BA.debugLineNum = 2139;BA.debugLine="Private maxPromosXVariables2 As Int = 0";
Debug.ShouldStop(67108864);
_maxpromosxvariables2 = BA.numberCast(int.class, 0);Debug.locals.put("maxPromosXVariables2", _maxpromosxvariables2);Debug.locals.put("maxPromosXVariables2", _maxpromosxvariables2);
 BA.debugLineNum = 2140;BA.debugLine="For x = 1 To maxPromosXFijos";
Debug.ShouldStop(134217728);
{
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 = 2141;BA.debugLine="If thisLog Then Log(\"===========================";
Debug.ShouldStop(268435456);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610790",RemoteObject.createImmutable("====================================================="),0);};
 BA.debugLineNum = 2142;BA.debugLine="If thisLog Then Log(\"===========================";
Debug.ShouldStop(536870912);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610791",RemoteObject.createImmutable("====================================================="),0);};
 BA.debugLineNum = 2143;BA.debugLine="For i = 0 To idProdsFijos.Size - 1";
Debug.ShouldStop(1073741824);
{
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 = 2144;BA.debugLine="If thisLog Then Log($\"FIJO - ${idProdsFijos.Get";
Debug.ShouldStop(-2147483648);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610793",(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 = 2145;BA.debugLine="invDispParaPromo.Put(idProdsFijos.Get(i), invDi";
Debug.ShouldStop(1);
_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 = 2147;BA.debugLine="If thisLog Then LogColor(\"Inv disponible despues";
Debug.ShouldStop(4);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610796",RemoteObject.concat(RemoteObject.createImmutable("Inv disponible despues de restar fijos = "),_invdispparapromo),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));};
 BA.debugLineNum = 2149;BA.debugLine="totalProdsVariablesDisponibles = 0";
Debug.ShouldStop(16);
_totalprodsvariablesdisponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariablesDisponibles", _totalprodsvariablesdisponibles);
 BA.debugLineNum = 2150;BA.debugLine="totalProdsVariables2Disponibles = 0";
Debug.ShouldStop(32);
_totalprodsvariables2disponibles = BA.numberCast(int.class, 0);Debug.locals.put("totalProdsVariables2Disponibles", _totalprodsvariables2disponibles);
 BA.debugLineNum = 2151;BA.debugLine="For i = 0 To idProdsVariables.Size - 1 'Obtenemo";
Debug.ShouldStop(64);
{
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 = 2152;BA.debugLine="If invDispParaPromo.ContainsKey(idProdsVariable";
Debug.ShouldStop(128);
if (_invdispparapromo.runMethod(true,"ContainsKey",(Object)(_idprodsvariables.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 2153;BA.debugLine="totalProdsVariablesDisponibles = totalProdsVar";
Debug.ShouldStop(256);
_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 = 2156;BA.debugLine="For i = 0 To idProdsVariables2.Size - 1 'Obtenem";
Debug.ShouldStop(2048);
{
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 = 2157;BA.debugLine="If invDispParaPromo.ContainsKey(idProdsVariable";
Debug.ShouldStop(4096);
if (_invdispparapromo.runMethod(true,"ContainsKey",(Object)(_idprodsvariables2.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 2158;BA.debugLine="totalProdsVariables2Disponibles = totalProdsVa";
Debug.ShouldStop(8192);
_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 = 2162;BA.debugLine="If thisLog Then Log($\"Var disponibles -  var req";
Debug.ShouldStop(131072);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610811",(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 = 2163;BA.debugLine="totalProdsVariablesDisponibles = totalProdsVaria";
Debug.ShouldStop(262144);
_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 = 2164;BA.debugLine="totalProdsVariables2Disponibles = totalProdsVari";
Debug.ShouldStop(524288);
_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 = 2165;BA.debugLine="If thisLog Then Log(\"prodsVariables disponibles";
Debug.ShouldStop(1048576);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610814",RemoteObject.concat(RemoteObject.createImmutable("prodsVariables disponibles despues de promo = "),_totalprodsvariablesdisponibles),0);};
 BA.debugLineNum = 2166;BA.debugLine="If thisLog Then Log(\"prodsVariables2 disponibles";
Debug.ShouldStop(2097152);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610815",RemoteObject.concat(RemoteObject.createImmutable("prodsVariables2 disponibles despues de promo = "),_totalprodsvariables2disponibles),0);};
 BA.debugLineNum = 2167;BA.debugLine="If totalProdsVariablesDisponibles < 0 Then Exit";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("<",_totalprodsvariablesdisponibles,BA.numberCast(double.class, 0))) { 
if (true) break;};
 BA.debugLineNum = 2168;BA.debugLine="If totalProdsVariables2Disponibles < 0 Then Exit";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("<",_totalprodsvariables2disponibles,BA.numberCast(double.class, 0))) { 
if (true) break;};
 BA.debugLineNum = 2169;BA.debugLine="maxPromosXVariables = x";
Debug.ShouldStop(16777216);
_maxpromosxvariables = BA.numberCast(int.class, _x);Debug.locals.put("maxPromosXVariables", _maxpromosxvariables);
 }
}Debug.locals.put("x", _x);
;
 BA.debugLineNum = 2172;BA.debugLine="If thisLog Then LogColor(\"Max promos de prodsVari";
Debug.ShouldStop(134217728);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","049610821",RemoteObject.concat(RemoteObject.createImmutable("Max promos de prodsVariables POR inventario = "),_maxpromosxvariables),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 2173;BA.debugLine="Return maxPromosXVariables";
Debug.ShouldStop(268435456);
if (true) return _maxpromosxvariables;
 BA.debugLineNum = 2174;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisapro2265(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("revisaPRO2265 (subs) ","subs",4,_ba,subs.mostCurrent,1632);
if (RapidSub.canDelegate("revisapro2265")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisapro2265", _ba, _idcliente);}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _x = RemoteObject.createImmutable(false);
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 1632;BA.debugLine="Sub revisaPRO2265(idCliente As String) As Boolean";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 1633;BA.debugLine="Private r As ResultSet = Starter.skmt.ExecQuery($";
Debug.ShouldStop(1);
_r = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from HIST_PRO2265 where H_IDCLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 1634;BA.debugLine="Private x As Boolean = False";
Debug.ShouldStop(2);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1635;BA.debugLine="Do While r.NextRow";
Debug.ShouldStop(4);
while (_r.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1636;BA.debugLine="x = True";
Debug.ShouldStop(8);
_x = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("x", _x);
 }
;
 BA.debugLineNum = 1638;BA.debugLine="Log($\">>>>  revisaPRO2265 ${idCliente} = ${x}\"$)";
Debug.ShouldStop(32);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048234502",(RemoteObject.concat(RemoteObject.createImmutable(">>>>  revisaPRO2265 "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable(" = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_x))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 1639;BA.debugLine="Return x";
Debug.ShouldStop(64);
if (true) return _x;
 BA.debugLineNum = 1640;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisapro3054(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("revisaPRO3054 (subs) ","subs",4,_ba,subs.mostCurrent,1643);
if (RapidSub.canDelegate("revisapro3054")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisapro3054", _ba, _idcliente);}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _x = RemoteObject.createImmutable(false);
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 1643;BA.debugLine="Sub revisaPRO3054(idCliente As String) As Boolean";
Debug.ShouldStop(1024);
 BA.debugLineNum = 1644;BA.debugLine="Private r As ResultSet = Starter.skmt.ExecQuery($";
Debug.ShouldStop(2048);
_r = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from HIST_PRO3054 where H_IDCLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 1645;BA.debugLine="Private x As Boolean = False";
Debug.ShouldStop(4096);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1646;BA.debugLine="Do While r.NextRow";
Debug.ShouldStop(8192);
while (_r.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1647;BA.debugLine="x = True";
Debug.ShouldStop(16384);
_x = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("x", _x);
 }
;
 BA.debugLineNum = 1649;BA.debugLine="Log($\">>>>  revisaPRO3054 ${idCliente} = ${x}\"$)";
Debug.ShouldStop(65536);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048300038",(RemoteObject.concat(RemoteObject.createImmutable(">>>>  revisaPRO3054 "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable(" = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_x))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 1650;BA.debugLine="Return x";
Debug.ShouldStop(131072);
if (true) return _x;
 BA.debugLineNum = 1651;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisapro3055(RemoteObject _ba,RemoteObject _idcliente) throws Exception{
try {
		Debug.PushSubsStack("revisaPRO3055 (subs) ","subs",4,_ba,subs.mostCurrent,1654);
if (RapidSub.canDelegate("revisapro3055")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisapro3055", _ba, _idcliente);}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _x = RemoteObject.createImmutable(false);
;
Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 1654;BA.debugLine="Sub revisaPRO3055(idCliente As String) As Boolean";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 1655;BA.debugLine="Private r As ResultSet = Starter.skmt.ExecQuery($";
Debug.ShouldStop(4194304);
_r = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from HIST_PRO3055 where H_IDCLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 1656;BA.debugLine="Private x As Boolean = False";
Debug.ShouldStop(8388608);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1657;BA.debugLine="Do While r.NextRow";
Debug.ShouldStop(16777216);
while (_r.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1658;BA.debugLine="x = True";
Debug.ShouldStop(33554432);
_x = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("x", _x);
 }
;
 BA.debugLineNum = 1660;BA.debugLine="Log($\">>>>  revisaPRO3055 ${idCliente} = ${x}\"$)";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048365574",(RemoteObject.concat(RemoteObject.createImmutable(">>>>  revisaPRO3055 "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable(" = "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_x))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 1661;BA.debugLine="Return x";
Debug.ShouldStop(268435456);
if (true) return _x;
 BA.debugLineNum = 1662;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisaprodfueradepromo(RemoteObject _ba,RemoteObject _prodid) throws Exception{
try {
		Debug.PushSubsStack("revisaProdFueraDePromo (subs) ","subs",4,_ba,subs.mostCurrent,1863);
if (RapidSub.canDelegate("revisaprodfueradepromo")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisaprodfueradepromo", _ba, _prodid);}
RemoteObject _fueradepromo = RemoteObject.createImmutable(false);
RemoteObject _p = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("prodId", _prodid);
 BA.debugLineNum = 1863;BA.debugLine="Sub revisaProdFueraDePromo(prodId As String) As Bo";
Debug.ShouldStop(64);
 BA.debugLineNum = 1864;BA.debugLine="Private fueraDePromo As Boolean = False";
Debug.ShouldStop(128);
_fueradepromo = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("fueraDePromo", _fueradepromo);Debug.locals.put("fueraDePromo", _fueradepromo);
 BA.debugLineNum = 1865;BA.debugLine="Private p As Cursor = Starter.skmt.ExecQuery($\"se";
Debug.ShouldStop(256);
_p = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_p = 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 PE_CEDIS from PEDIDO where PE_PROID = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("' and PE_CEDIS in (select id_almacen from CAT_ALMACEN) and PE_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_cliente" /*RemoteObject*/ ).getField(false,"_la_cuenta" /*RemoteObject*/ ).runMethod(true,"getText")))),RemoteObject.createImmutable("'"))))));Debug.locals.put("p", _p);Debug.locals.put("p", _p);
 BA.debugLineNum = 1866;BA.debugLine="Log(\"rowcount: \" & p.RowCount)";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048889859",RemoteObject.concat(RemoteObject.createImmutable("rowcount: "),_p.runMethod(true,"getRowCount")),0);
 BA.debugLineNum = 1867;BA.debugLine="If p.RowCount > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",_p.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1868;BA.debugLine="p.Position = 0";
Debug.ShouldStop(2048);
_p.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1869;BA.debugLine="Log($\"|${p.GetString(\"PE_CEDIS\")}|${prodId}|\"$)";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048889862",(RemoteObject.concat(RemoteObject.createImmutable("|"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_p.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CEDIS")))))),RemoteObject.createImmutable("|"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable("|"))),0);
 BA.debugLineNum = 1870;BA.debugLine="fueraDePromo = True";
Debug.ShouldStop(8192);
_fueradepromo = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("fueraDePromo", _fueradepromo);
 };
 BA.debugLineNum = 1872;BA.debugLine="Return fueraDePromo";
Debug.ShouldStop(32768);
if (true) return _fueradepromo;
 BA.debugLineNum = 1873;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisapromoprocterpro3009(RemoteObject _ba,RemoteObject _prodsmap1) throws Exception{
try {
		Debug.PushSubsStack("revisaPromoProcterPRO3009 (subs) ","subs",4,_ba,subs.mostCurrent,1527);
if (RapidSub.canDelegate("revisapromoprocterpro3009")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisapromoprocterpro3009", _ba, _prodsmap1);}
RemoteObject _almacenes = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _idregalo = RemoteObject.createImmutable("");
RemoteObject _newprodsmap = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _monto = RemoteObject.createImmutable("");
RemoteObject _invregalo = RemoteObject.createImmutable(0);
RemoteObject _totalregalos = RemoteObject.createImmutable(0);
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _m1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _m2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _r2 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _cs = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
RemoteObject _pe = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("prodsMap1", _prodsmap1);
 BA.debugLineNum = 1527;BA.debugLine="Sub revisaPromoProcterPRO3009(prodsMap1 As Map)";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 1528;BA.debugLine="Log(\"entramos a promo Procter\")";
Debug.ShouldStop(8388608);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103425",RemoteObject.createImmutable("entramos a promo Procter"),0);
 BA.debugLineNum = 1529;BA.debugLine="Dim almacenes As List";
Debug.ShouldStop(16777216);
_almacenes = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("almacenes", _almacenes);
 BA.debugLineNum = 1530;BA.debugLine="almacenes.Initialize2(Array As String(\"3\", \"17\",";
Debug.ShouldStop(33554432);
_almacenes.runVoidMethod ("Initialize2",(Object)(subs.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {8},new Object[] {BA.ObjectToString("3"),BA.ObjectToString("17"),BA.ObjectToString("37"),BA.ObjectToString("31"),BA.ObjectToString("68"),BA.ObjectToString("71"),BA.ObjectToString("33"),RemoteObject.createImmutable("80")})))));
 BA.debugLineNum = 1531;BA.debugLine="Log(\"Posicion de almacen: \" & almacenes.IndexOf(t";
Debug.ShouldStop(67108864);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103428",RemoteObject.concat(RemoteObject.createImmutable("Posicion de almacen: "),_almacenes.runMethod(true,"IndexOf",(Object)((_traealmacen(_ba))))),0);
 BA.debugLineNum = 1533;BA.debugLine="If almacenes.IndexOf(traeAlmacen) >= 0 Then ' Si";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean("g",_almacenes.runMethod(true,"IndexOf",(Object)((_traealmacen(_ba)))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1534;BA.debugLine="Private idRegalo As String = \"PYG1016\"";
Debug.ShouldStop(536870912);
_idregalo = BA.ObjectToString("PYG1016");Debug.locals.put("idRegalo", _idregalo);Debug.locals.put("idRegalo", _idregalo);
 BA.debugLineNum = 1535;BA.debugLine="Private newProdsMap As Map = prodsMap1";
Debug.ShouldStop(1073741824);
_newprodsmap = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_newprodsmap = _prodsmap1;Debug.locals.put("newProdsMap", _newprodsmap);Debug.locals.put("newProdsMap", _newprodsmap);
 BA.debugLineNum = 1536;BA.debugLine="Private monto As String = 0";
Debug.ShouldStop(-2147483648);
_monto = BA.NumberToString(0);Debug.locals.put("monto", _monto);Debug.locals.put("monto", _monto);
 BA.debugLineNum = 1537;BA.debugLine="Private invRegalo As Int = 0";
Debug.ShouldStop(1);
_invregalo = BA.numberCast(int.class, 0);Debug.locals.put("invRegalo", _invregalo);Debug.locals.put("invRegalo", _invregalo);
 BA.debugLineNum = 1538;BA.debugLine="Private totalRegalos As Int = 0";
Debug.ShouldStop(2);
_totalregalos = BA.numberCast(int.class, 0);Debug.locals.put("totalRegalos", _totalregalos);Debug.locals.put("totalRegalos", _totalregalos);
 BA.debugLineNum = 1539;BA.debugLine="Private r As ResultSet = Starter.skmt.ExecQuery(";
Debug.ShouldStop(4);
_r = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select ifnull(cat_gp_almacen, 0) as CAT_GP_ALMACEN from "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),RemoteObject.createImmutable(" where cat_gp_id = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idregalo))),RemoteObject.createImmutable("'"))))));Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 1540;BA.debugLine="Do While r.NextRow";
Debug.ShouldStop(8);
while (_r.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1541;BA.debugLine="Log(r.GetString(\"CAT_GP_ALMACEN\"))";
Debug.ShouldStop(16);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103438",_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN"))),0);
 BA.debugLineNum = 1542;BA.debugLine="If r.GetString(\"CAT_GP_ALMACEN\") > 0 Then invRe";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN")))),BA.numberCast(double.class, 0))) { 
_invregalo = BA.numberCast(int.class, _r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN"))));Debug.locals.put("invRegalo", _invregalo);};
 }
;
 BA.debugLineNum = 1544;BA.debugLine="Log(\"INV REGALO: \" & invRegalo)";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103441",RemoteObject.concat(RemoteObject.createImmutable("INV REGALO: "),_invregalo),0);
 BA.debugLineNum = 1545;BA.debugLine="r = Starter.skmt.ExecQuery($\"select pe_proid fro";
Debug.ShouldStop(256);
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select pe_proid from pedido where pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idregalo))),RemoteObject.createImmutable("' and pe_cedis = 'PRO3009' and pe_cant = 1 and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("' "))))));Debug.locals.put("r", _r);
 BA.debugLineNum = 1546;BA.debugLine="If r.RowCount > 0 Then totalRegalos = r.RowCount";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean(">",_r.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
_totalregalos = _r.runMethod(true,"getRowCount");Debug.locals.put("totalRegalos", _totalregalos);};
 BA.debugLineNum = 1547;BA.debugLine="Log($\"TOTAL REGALOS: ${totalRegalos}\"$)";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103444",(RemoteObject.concat(RemoteObject.createImmutable("TOTAL REGALOS: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_totalregalos))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 1548;BA.debugLine="If prodsMap1.ContainsKey(\"PYG1014\") Then ' Calcu";
Debug.ShouldStop(2048);
if (_prodsmap1.runMethod(true,"ContainsKey",(Object)((RemoteObject.createImmutable("PYG1014")))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1549;BA.debugLine="Private m1 As Map = prodsMap1.Get(\"PYG1014\")";
Debug.ShouldStop(4096);
_m1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m1 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _prodsmap1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("PYG1014")))));Debug.locals.put("m1", _m1);Debug.locals.put("m1", _m1);
 BA.debugLineNum = 1550;BA.debugLine="monto = monto + m1.Get(\"cant\") * m1.Get(\"precio";
Debug.ShouldStop(8192);
_monto = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _monto),BA.numberCast(double.class, _m1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant"))))),BA.numberCast(double.class, _m1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("precio")))))}, "+*",1, 0));Debug.locals.put("monto", _monto);
 };
 BA.debugLineNum = 1552;BA.debugLine="If prodsMap1.ContainsKey(\"PYG1025\") Then  ' Calc";
Debug.ShouldStop(32768);
if (_prodsmap1.runMethod(true,"ContainsKey",(Object)((RemoteObject.createImmutable("PYG1025")))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 1553;BA.debugLine="Private m2 As Map = prodsMap1.Get(\"PYG1025\")";
Debug.ShouldStop(65536);
_m2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _prodsmap1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("PYG1025")))));Debug.locals.put("m2", _m2);Debug.locals.put("m2", _m2);
 BA.debugLineNum = 1554;BA.debugLine="monto = monto + m2.Get(\"cant\") * m2.Get(\"precio";
Debug.ShouldStop(131072);
_monto = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _monto),BA.numberCast(double.class, _m2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant"))))),BA.numberCast(double.class, _m2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("precio")))))}, "+*",1, 0));Debug.locals.put("monto", _monto);
 };
 BA.debugLineNum = 1556;BA.debugLine="Private r2 As ResultSet = Starter.skmt.ExecQuery";
Debug.ShouldStop(524288);
_r2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select ifnull(sum(pe_costo_tot),0) as monto from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("' and PE_PROID in (\"PYG1014\", \"PYG1025\")"))))));Debug.locals.put("r2", _r2);Debug.locals.put("r2", _r2);
 BA.debugLineNum = 1557;BA.debugLine="Do While r2.NextRow";
Debug.ShouldStop(1048576);
while (_r2.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1558;BA.debugLine="monto = monto + r2.GetString(\"monto\")";
Debug.ShouldStop(2097152);
_monto = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _monto),BA.numberCast(double.class, _r2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("monto"))))}, "+",1, 0));Debug.locals.put("monto", _monto);
 }
;
 BA.debugLineNum = 1560;BA.debugLine="Log($\"Monto: ${monto}\"$)";
Debug.ShouldStop(8388608);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103457",(RemoteObject.concat(RemoteObject.createImmutable("Monto: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_monto))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 1562;BA.debugLine="Log(\"prodsMap.Size: \" & prodsMap1.Size)";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103459",RemoteObject.concat(RemoteObject.createImmutable("prodsMap.Size: "),_prodsmap1.runMethod(true,"getSize")),0);
 BA.debugLineNum = 1563;BA.debugLine="If prodsMap1.Size > 0 Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean(">",_prodsmap1.runMethod(true,"getSize"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1564;BA.debugLine="If monto > 149 Then";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _monto),BA.numberCast(double.class, 149))) { 
 BA.debugLineNum = 1565;BA.debugLine="Log(\"Mas de 149\")";
Debug.ShouldStop(268435456);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103462",RemoteObject.createImmutable("Mas de 149"),0);
 BA.debugLineNum = 1566;BA.debugLine="If invRegalo > 0 Then";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean(">",_invregalo,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1567;BA.debugLine="Log(\"Hay inventario para regalo\")";
Debug.ShouldStop(1073741824);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103464",RemoteObject.createImmutable("Hay inventario para regalo"),0);
 BA.debugLineNum = 1568;BA.debugLine="If totalRegalos = 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",_totalregalos,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1569;BA.debugLine="guardaProducto(\"PRO3009\", 1, 1, traeProdNomb";
Debug.ShouldStop(1);
_guardaproducto(_ba,BA.ObjectToString("PRO3009"),BA.NumberToString(1),BA.NumberToString(1),_traeprodnombre(_ba,_idregalo),_idregalo,_traecliente(_ba),_traefecha(_ba),_traeusuariodebd(_ba),_traeruta(_ba),BA.NumberToString(0),subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ));
 BA.debugLineNum = 1571;BA.debugLine="Private cs As CSBuilder";
Debug.ShouldStop(4);
_cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs", _cs);
 BA.debugLineNum = 1572;BA.debugLine="cs.Initialize";
Debug.ShouldStop(8);
_cs.runVoidMethod ("Initialize");
 BA.debugLineNum = 1573;BA.debugLine="Msgbox(cs.Color(Colors.red).append(\"PRO3009:";
Debug.ShouldStop(16);
subs.mostCurrent.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence(_cs.runMethod(false,"Color",(Object)(subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("PRO3009:")))).runMethod(false,"Pop").runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(" En la compra de $150 de la linea Oral B Procter & Gamble se agrega 1 Salvo Multiusuos 500 ml.")))).runMethod(false,"Color",(Object)(subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(" con precio de $1.00")))).runMethod(false,"PopAll").getObject())),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("Producto de regalo agregado"))),_ba);
 };
 }else {
 BA.debugLineNum = 1576;BA.debugLine="LogColor(\"NO hay inventario para regalo PRO30";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103473",BA.ObjectToString("NO hay inventario para regalo PRO3009 Procter & Gamble."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 }else {
 BA.debugLineNum = 1579;BA.debugLine="Log(\"Menos de 149\")";
Debug.ShouldStop(1024);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103476",RemoteObject.createImmutable("Menos de 149"),0);
 BA.debugLineNum = 1580;BA.debugLine="If totalRegalos > 0 Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean(">",_totalregalos,BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1581;BA.debugLine="Log(\"Quitamos regalo\")";
Debug.ShouldStop(4096);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103478",RemoteObject.createImmutable("Quitamos regalo"),0);
 BA.debugLineNum = 1582;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedid";
Debug.ShouldStop(8192);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido where pe_cedis = 'PRO3009' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idregalo))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("' and pe_cant = 1 ")))));
 BA.debugLineNum = 1583;BA.debugLine="Log($\"Borramos pe_cedis='PRO3009' and pe_proi";
Debug.ShouldStop(16384);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103480",(RemoteObject.concat(RemoteObject.createImmutable("Borramos pe_cedis='PRO3009' and pe_proid='"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idregalo))),RemoteObject.createImmutable("' and pe_cliente='"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'"))),0);
 BA.debugLineNum = 1584;BA.debugLine="Private pe As Cursor = Starter.skmt.ExecQuery";
Debug.ShouldStop(32768);
_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._starter._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 = 1585;BA.debugLine="pe.Position=0";
Debug.ShouldStop(65536);
_pe.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1586;BA.debugLine="If pe.GetString(\"cuantosPedidos\") = 0 Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",_pe.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantosPedidos"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 1587;BA.debugLine="Log(\"######    delete from pedido_cliente -";
Debug.ShouldStop(262144);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103484",RemoteObject.concat(RemoteObject.createImmutable("######    delete from pedido_cliente - "),_traecliente(_ba),RemoteObject.createImmutable("|"),_traecliente(_ba)),0);
 BA.debugLineNum = 1588;BA.debugLine="Log($\"delete from pedido_cliente where PC_CL";
Debug.ShouldStop(524288);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103485",(RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'"))),0);
 BA.debugLineNum = 1589;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedi";
Debug.ShouldStop(1048576);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traecliente(_ba)))),RemoteObject.createImmutable("'")))));
 };
 BA.debugLineNum = 1591;BA.debugLine="ToastMessageShow(\"Quitamos regalo PRO3009\", F";
Debug.ShouldStop(4194304);
subs.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Quitamos regalo PRO3009")),(Object)(subs.mostCurrent.__c.getField(true,"False")));
 };
 };
 };
 }else {
 BA.debugLineNum = 1596;BA.debugLine="LogColor(\"El almacen actual NO esta en la lista";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048103493",BA.ObjectToString("El almacen actual NO esta en la lista para la promo de Procter & Gamble."),subs.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 };
 BA.debugLineNum = 1599;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisauug(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("revisaUUG (subs) ","subs",4,_ba,subs.mostCurrent,347);
if (RapidSub.canDelegate("revisauug")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","revisauug", _ba);}
RemoteObject _daa = RemoteObject.createImmutable(0);
;
 BA.debugLineNum = 347;BA.debugLine="Sub revisaUUG 'ignore";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 348;BA.debugLine="Try";
Debug.ShouldStop(134217728);
try { BA.debugLineNum = 350;BA.debugLine="If Tracker.FLP.GetLastKnownLocation.IsInitialize";
Debug.ShouldStop(536870912);
if (subs.mostCurrent._tracker._flp /*RemoteObject*/ .runMethod(false,"GetLastKnownLocation").runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 351;BA.debugLine="Dim daa As Int = Tracker.UUGCoords.DistanceTo(T";
Debug.ShouldStop(1073741824);
_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 = 352;BA.debugLine="If Starter.Logger Then LogColor($\"**** UUC \"${f";
Debug.ShouldStop(-2147483648);
if (subs.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044695557",(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 = 353;BA.debugLine="If daa > 40 And Tracker.FLP.GetLastKnownLocatio";
Debug.ShouldStop(1);
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 = 354;BA.debugLine="kmt.ExecNonQuery2(\"INSERT INTO RUTA_GPS(fecha,";
Debug.ShouldStop(2);
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 = 355;BA.debugLine="If Starter.Logger Then Log(\"++++ Distancia a a";
Debug.ShouldStop(4);
if (subs.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044695560",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 = 357;BA.debugLine="Tracker.UUGCoords = Tracker.FLP.GetLastKnownLoc";
Debug.ShouldStop(16);
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 = 360;BA.debugLine="LogColor(\"If Tracker.FLP.GetLastKnownLocation.Is";
Debug.ShouldStop(128);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","044695565",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 = 362;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _setdivider(RemoteObject _ba,RemoteObject _lv,RemoteObject _color,RemoteObject _height) throws Exception{
try {
		Debug.PushSubsStack("SetDivider (subs) ","subs",4,_ba,subs.mostCurrent,42);
if (RapidSub.canDelegate("setdivider")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","setdivider", _ba, _lv, _color, _height);}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.agraham.reflection.Reflection");
RemoteObject _cd = RemoteObject.declareNull("anywheresoftware.b4a.objects.drawable.ColorDrawable");
;
Debug.locals.put("lv", _lv);
Debug.locals.put("Color", _color);
Debug.locals.put("Height", _height);
 BA.debugLineNum = 42;BA.debugLine="Sub SetDivider(lv As ListView, Color As Int, Heigh";
Debug.ShouldStop(512);
 BA.debugLineNum = 43;BA.debugLine="Dim r As Reflector";
Debug.ShouldStop(1024);
_r = RemoteObject.createNew ("anywheresoftware.b4a.agraham.reflection.Reflection");Debug.locals.put("r", _r);
 BA.debugLineNum = 44;BA.debugLine="r.Target = lv";
Debug.ShouldStop(2048);
_r.setField ("Target",(_lv.getObject()));
 BA.debugLineNum = 45;BA.debugLine="Dim CD As ColorDrawable";
Debug.ShouldStop(4096);
_cd = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.ColorDrawable");Debug.locals.put("CD", _cd);
 BA.debugLineNum = 46;BA.debugLine="CD.Initialize(Color, 0)";
Debug.ShouldStop(8192);
_cd.runVoidMethod ("Initialize",(Object)(_color),(Object)(BA.numberCast(int.class, 0)));
 BA.debugLineNum = 47;BA.debugLine="r.RunMethod4(\"setDivider\", Array As Object(CD), A";
Debug.ShouldStop(16384);
_r.runVoidMethod ("RunMethod4",(Object)(BA.ObjectToString("setDivider")),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_cd.getObject())})),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("android.graphics.drawable.Drawable")})));
 BA.debugLineNum = 48;BA.debugLine="r.RunMethod2(\"setDividerHeight\", Height, \"java.la";
Debug.ShouldStop(32768);
_r.runVoidMethod ("RunMethod2",(Object)(BA.ObjectToString("setDividerHeight")),(Object)(BA.NumberToString(_height)),(Object)(RemoteObject.createImmutable("java.lang.int")));
 BA.debugLineNum = 49;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",4,_ba,subs.mostCurrent,755);
if (RapidSub.canDelegate("totalpedido")) { return gunav2.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 = 755;BA.debugLine="Sub totalPedido As String";
Debug.ShouldStop(262144);
 BA.debugLineNum = 756;BA.debugLine="Private cT As Cursor = Starter.skmt.ExecQuery($\"s";
Debug.ShouldStop(524288);
_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("' AND PE_CEDIS <> 'DUR'"))))));Debug.locals.put("cT", _ct);Debug.locals.put("cT", _ct);
 BA.debugLineNum = 757;BA.debugLine="Private pTotal As String = \"0\"";
Debug.ShouldStop(1048576);
_ptotal = BA.ObjectToString("0");Debug.locals.put("pTotal", _ptotal);Debug.locals.put("pTotal", _ptotal);
 BA.debugLineNum = 758;BA.debugLine="If cT.RowCount > 0 Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean(">",_ct.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 759;BA.debugLine="cT.Position = 0";
Debug.ShouldStop(4194304);
_ct.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 761;BA.debugLine="Private tempT As String = cT.GetLong(\"total\")";
Debug.ShouldStop(16777216);
_tempt = BA.NumberToString(_ct.runMethod(true,"GetLong",(Object)(RemoteObject.createImmutable("total"))));Debug.locals.put("tempT", _tempt);Debug.locals.put("tempT", _tempt);
 BA.debugLineNum = 762;BA.debugLine="If tempT <> \"null\" And tempT <> Null Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("!",_tempt,BA.ObjectToString("null")) && RemoteObject.solveBoolean("N",_tempt)) { 
 BA.debugLineNum = 764;BA.debugLine="pTotal = tempT";
Debug.ShouldStop(134217728);
_ptotal = _tempt;Debug.locals.put("pTotal", _ptotal);
 };
 };
 BA.debugLineNum = 768;BA.debugLine="cT.Close";
Debug.ShouldStop(-2147483648);
_ct.runVoidMethod ("Close");
 BA.debugLineNum = 769;BA.debugLine="Return pTotal";
Debug.ShouldStop(1);
if (true) return _ptotal;
 BA.debugLineNum = 770;BA.debugLine="End Sub";
Debug.ShouldStop(2);
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",4,_ba,subs.mostCurrent,643);
if (RapidSub.canDelegate("traealmacen")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traealmacen", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _a = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 643;BA.debugLine="Sub traeAlmacen As String 'ignore";
Debug.ShouldStop(4);
 BA.debugLineNum = 644;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(8);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 645;BA.debugLine="Private a As String = \"NA\"";
Debug.ShouldStop(16);
_a = BA.ObjectToString("NA");Debug.locals.put("a", _a);Debug.locals.put("a", _a);
 BA.debugLineNum = 646;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select  ID_AL";
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  ID_ALMACEN from CAT_ALMACEN"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 647;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 648;BA.debugLine="c.Position = 0";
Debug.ShouldStop(128);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 649;BA.debugLine="a = C.GetString(\"ID_ALMACEN\")";
Debug.ShouldStop(256);
_a = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("ID_ALMACEN")));Debug.locals.put("a", _a);
 };
 BA.debugLineNum = 651;BA.debugLine="c.Close";
Debug.ShouldStop(1024);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 652;BA.debugLine="Return a";
Debug.ShouldStop(2048);
if (true) return _a;
 BA.debugLineNum = 653;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
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",4,_ba,subs.mostCurrent,819);
if (RapidSub.canDelegate("traecliente")) { return gunav2.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 = 819;BA.debugLine="Sub traeCliente As String 'ignore";
Debug.ShouldStop(262144);
 BA.debugLineNum = 820;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(524288);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 821;BA.debugLine="Private cl As String";
Debug.ShouldStop(1048576);
_cl = RemoteObject.createImmutable("");Debug.locals.put("cl", _cl);
 BA.debugLineNum = 822;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENTA";
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.createImmutable("Select CUENTA from cuentaa"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 823;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 824;BA.debugLine="c.Position=0";
Debug.ShouldStop(8388608);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 825;BA.debugLine="cl = c.GetString(\"CUENTA\")";
Debug.ShouldStop(16777216);
_cl = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA")));Debug.locals.put("cl", _cl);
 };
 BA.debugLineNum = 827;BA.debugLine="c.Close";
Debug.ShouldStop(67108864);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 829;BA.debugLine="Return cl";
Debug.ShouldStop(268435456);
if (true) return _cl;
 BA.debugLineNum = 830;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
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",4,_ba,subs.mostCurrent,832);
if (RapidSub.canDelegate("traefecha")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traefecha", _ba);}
RemoteObject _sdate = RemoteObject.createImmutable("");
RemoteObject _stime = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 832;BA.debugLine="Sub traeFecha As String 'ignore";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 833;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(1);
subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 834;BA.debugLine="Private sDate As String =DateTime.Date(DateTime.N";
Debug.ShouldStop(2);
_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 = 835;BA.debugLine="Private sTime As String =DateTime.Time(DateTime.N";
Debug.ShouldStop(4);
_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 = 836;BA.debugLine="Return sDate & sTime";
Debug.ShouldStop(8);
if (true) return RemoteObject.concat(_sdate,_stime);
 BA.debugLineNum = 837;BA.debugLine="End Sub";
Debug.ShouldStop(16);
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",4,_ba,subs.mostCurrent,1980);
if (RapidSub.canDelegate("traeinventario")) { return gunav2.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 = 1980;BA.debugLine="Sub traeinventario(id As String) As String";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 1981;BA.debugLine="Dim c As Cursor";
Debug.ShouldStop(268435456);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1982;BA.debugLine="Dim inventario As String = \"0\"";
Debug.ShouldStop(536870912);
_inventario = BA.ObjectToString("0");Debug.locals.put("inventario", _inventario);Debug.locals.put("inventario", _inventario);
 BA.debugLineNum = 1983;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_G";
Debug.ShouldStop(1073741824);
_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)((_traetablaprods(_ba,subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*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 = 1985;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1986;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1987;BA.debugLine="inventario = c.GetString(\"CAT_GP_ALMACEN\")";
Debug.ShouldStop(4);
_inventario = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN")));Debug.locals.put("inventario", _inventario);
 };
 BA.debugLineNum = 1989;BA.debugLine="c.Close";
Debug.ShouldStop(16);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1990;BA.debugLine="Return inventario";
Debug.ShouldStop(32);
if (true) return _inventario;
 BA.debugLineNum = 1991;BA.debugLine="End Sub";
Debug.ShouldStop(64);
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",4,_ba,subs.mostCurrent,1029);
if (RapidSub.canDelegate("traemaxpromos")) { return gunav2.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 = 1029;BA.debugLine="Sub traeMaxPromos(pm As Map) As Int";
Debug.ShouldStop(16);
 BA.debugLineNum = 1030;BA.debugLine="Private thisLog As Boolean = True 'Si es verdader";
Debug.ShouldStop(32);
_thislog = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("thisLog", _thislog);Debug.locals.put("thisLog", _thislog);
 BA.debugLineNum = 1031;BA.debugLine="Private maxPromos As List";
Debug.ShouldStop(64);
_maxpromos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("maxPromos", _maxpromos);
 BA.debugLineNum = 1032;BA.debugLine="Private vendidas As Int = 0";
Debug.ShouldStop(128);
_vendidas = BA.numberCast(int.class, 0);Debug.locals.put("vendidas", _vendidas);Debug.locals.put("vendidas", _vendidas);
 BA.debugLineNum = 1033;BA.debugLine="maxPromos.Initialize";
Debug.ShouldStop(256);
_maxpromos.runVoidMethod ("Initialize");
 BA.debugLineNum = 1035;BA.debugLine="If thisLog Then Log(pm)";
Debug.ShouldStop(1024);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046989318",BA.ObjectToString(_pm),0);};
 BA.debugLineNum = 1036;BA.debugLine="If pm.Get(\"historico\") = \"1\" Then maxPromos.Add(p";
Debug.ShouldStop(2048);
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 = 1037;BA.debugLine="maxPromos.Add(pm.Get(\"maxPromos\")) 'Agregamos max";
Debug.ShouldStop(4096);
_maxpromos.runVoidMethod ("Add",(Object)(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("maxPromos"))))));
 BA.debugLineNum = 1038;BA.debugLine="maxPromos.Add(pm.Get(\"maxXcliente\")) 'Agregamos m";
Debug.ShouldStop(8192);
_maxpromos.runVoidMethod ("Add",(Object)(_pm.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("maxXcliente"))))));
 BA.debugLineNum = 1039;BA.debugLine="If thisLog Then Log(maxPromos)";
Debug.ShouldStop(16384);
if (_thislog.<Boolean>get().booleanValue()) { 
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046989322",BA.ObjectToString(_maxpromos),0);};
 BA.debugLineNum = 1040;BA.debugLine="maxPromos.Sort(True)";
Debug.ShouldStop(32768);
_maxpromos.runVoidMethod ("Sort",(Object)(subs.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 1042;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_FUTUR";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ),BA.ObjectToString("PREVENTA_FUTURA"))) { 
 BA.debugLineNum = 1043;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exe";
Debug.ShouldStop(262144);
_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 = ? AND PE_FUTURO = '1' ")),(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);
 }else {
 BA.debugLineNum = 1045;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exe";
Debug.ShouldStop(1048576);
_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 = ? AND PE_FUTURO = '0'  ")),(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 = 1047;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1048;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8388608);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1049;BA.debugLine="vendidas = c.GetInt(\"vendidas\")";
Debug.ShouldStop(16777216);
_vendidas = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("vendidas")));Debug.locals.put("vendidas", _vendidas);
 };
 BA.debugLineNum = 1055;BA.debugLine="Return maxPromos.Get(0) - vendidas 'Regresamos el";
Debug.ShouldStop(1073741824);
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 = 1056;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traemontoprod(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("TraeMontoProd (subs) ","subs",4,_ba,subs.mostCurrent,1321);
if (RapidSub.canDelegate("traemontoprod")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traemontoprod", _ba);}
RemoteObject _x = RemoteObject.createImmutable(false);
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _c2 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1321;BA.debugLine="Sub TraeMontoProd As Boolean";
Debug.ShouldStop(256);
 BA.debugLineNum = 1322;BA.debugLine="Private x As Boolean = False";
Debug.ShouldStop(512);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1323;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(1024);
_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.createImmutable("SELECT ifnull( SUM (PE_COSTO_TOT),0) As suma FROM PEDIDO JOIN CAT_PROMO_ESP ON CAT_PE_ID = PE_PROID WHERE PE_CLIENTE IN (Select CUENTA FROM CUENTAA)"))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1324;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1325;BA.debugLine="c.Position = 0";
Debug.ShouldStop(4096);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1326;BA.debugLine="Private c2 As Cursor = B4XPages.MainPage.skmt.Ex";
Debug.ShouldStop(8192);
_c2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_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 DISTINCT CAT_PE_MONTO FROM CAT_PROMO_ESP"))));Debug.locals.put("c2", _c2);Debug.locals.put("c2", _c2);
 BA.debugLineNum = 1327;BA.debugLine="If c2.RowCount > 0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",_c2.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1328;BA.debugLine="c2.Position = 0";
Debug.ShouldStop(32768);
_c2.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1329;BA.debugLine="If c.GetString(\"suma\") >= c2.GetString(\"CAT_PE";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("g",BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("suma")))),BA.numberCast(double.class, _c2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PE_MONTO")))))) { 
 BA.debugLineNum = 1330;BA.debugLine="x = True";
Debug.ShouldStop(131072);
_x = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("x", _x);
 }else {
 BA.debugLineNum = 1333;BA.debugLine="x = False";
Debug.ShouldStop(1048576);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);
 };
 };
 };
 BA.debugLineNum = 1338;BA.debugLine="Return x";
Debug.ShouldStop(33554432);
if (true) return _x;
 BA.debugLineNum = 1339;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traemontoprod2(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("TraeMontoProd2 (subs) ","subs",4,_ba,subs.mostCurrent,1343);
if (RapidSub.canDelegate("traemontoprod2")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traemontoprod2", _ba);}
RemoteObject _x = RemoteObject.createImmutable(false);
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _c2 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1343;BA.debugLine="Sub TraeMontoProd2 As Boolean";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 1345;BA.debugLine="Private x As Boolean = False";
Debug.ShouldStop(1);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1347;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(4);
_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.createImmutable("SELECT ifnull( SUM (PE_COSTO_TOT),0) As suma FROM PEDIDO JOIN CAT_PROMO_ESP ON CAT_PE_ID = PE_PROID WHERE PE_CLIENTE IN (Select CUENTA FROM CUENTAA)"))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1349;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1351;BA.debugLine="c.Position = 0";
Debug.ShouldStop(64);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1353;BA.debugLine="Private c2 As Cursor = B4XPages.MainPage.skmt.Ex";
Debug.ShouldStop(256);
_c2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_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 DISTINCT CAT_PE_MONTO FROM CAT_PROMO_ESP"))));Debug.locals.put("c2", _c2);Debug.locals.put("c2", _c2);
 BA.debugLineNum = 1355;BA.debugLine="If c2.RowCount > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",_c2.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1357;BA.debugLine="c2.Position = 0";
Debug.ShouldStop(4096);
_c2.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1359;BA.debugLine="If c.GetString(\"suma\") >= 350 And c.GetString(\"";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("g",BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("suma")))),BA.numberCast(double.class, 350)) && RemoteObject.solveBoolean("k",BA.numberCast(double.class, _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("suma")))),BA.numberCast(double.class, 499.99))) { 
 BA.debugLineNum = 1361;BA.debugLine="x = True";
Debug.ShouldStop(65536);
_x = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("x", _x);
 }else {
 BA.debugLineNum = 1364;BA.debugLine="x = False";
Debug.ShouldStop(524288);
_x = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("x", _x);
 };
 };
 };
 BA.debugLineNum = 1370;BA.debugLine="Return x";
Debug.ShouldStop(33554432);
if (true) return _x;
 BA.debugLineNum = 1372;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable(false);
}
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",4,_ba,subs.mostCurrent,952);
if (RapidSub.canDelegate("traemosinventariodisponibleparapromo")) { return gunav2.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 = 952;BA.debugLine="Sub traemosInventarioDisponibleParaPromo(promo As";
Debug.ShouldStop(8388608);
 BA.debugLineNum = 953;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(16777216);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 954;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery2($\"SELECT CA";
Debug.ShouldStop(33554432);
_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)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),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 = 957;BA.debugLine="Private prods As Map";
Debug.ShouldStop(268435456);
_prods = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("prods", _prods);
 BA.debugLineNum = 958;BA.debugLine="prods.Initialize";
Debug.ShouldStop(536870912);
_prods.runVoidMethod ("Initialize");
 BA.debugLineNum = 959;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 960;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(-2147483648);
{
final int step6 = 1;
final int limit6 = RemoteObject.solve(new RemoteObject[] {_c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step6 > 0 && _i <= limit6) || (step6 < 0 && _i >= limit6) ;_i = ((int)(0 + _i + step6))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 961;BA.debugLine="c.Position=i";
Debug.ShouldStop(1);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 962;BA.debugLine="prods.Put(c.GetString(\"CAT_GP_ID\"), c.GetString";
Debug.ShouldStop(2);
_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 = 967;BA.debugLine="Return prods";
Debug.ShouldStop(64);
if (true) return _prods;
 BA.debugLineNum = 968;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traenombrecliente(RemoteObject _ba,RemoteObject _id) throws Exception{
try {
		Debug.PushSubsStack("traeNombreCliente (subs) ","subs",4,_ba,subs.mostCurrent,1506);
if (RapidSub.canDelegate("traenombrecliente")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traenombrecliente", _ba, _id);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _n = RemoteObject.createImmutable("");
;
Debug.locals.put("id", _id);
 BA.debugLineNum = 1506;BA.debugLine="Sub traeNombreCliente(id As String) As String";
Debug.ShouldStop(2);
 BA.debugLineNum = 1507;BA.debugLine="Private c As ResultSet = B4XPages.MainPage.skmt.E";
Debug.ShouldStop(4);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_CL_NOMBRE from kmt_info3 where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_id))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1508;BA.debugLine="Private n As String = \"N/A\"";
Debug.ShouldStop(8);
_n = BA.ObjectToString("N/A");Debug.locals.put("n", _n);Debug.locals.put("n", _n);
 BA.debugLineNum = 1509;BA.debugLine="Do While c.NextRow";
Debug.ShouldStop(16);
while (_c.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1510;BA.debugLine="n = c.GetString(\"CAT_CL_NOMBRE\")";
Debug.ShouldStop(32);
_n = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE")));Debug.locals.put("n", _n);
 }
;
 BA.debugLineNum = 1512;BA.debugLine="Return n";
Debug.ShouldStop(128);
if (true) return _n;
 BA.debugLineNum = 1513;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeprodiddebd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeProdIdDeBD (subs) ","subs",4,_ba,subs.mostCurrent,1259);
if (RapidSub.canDelegate("traeprodiddebd")) { return gunav2.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 = 1259;BA.debugLine="Sub traeProdIdDeBD As Map 'ignore";
Debug.ShouldStop(1024);
 BA.debugLineNum = 1260;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(2048);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1261;BA.debugLine="Private m As Map";
Debug.ShouldStop(4096);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 1262;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_G";
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 CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_TIPO, CAT_GP_SUBTIPO from "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),RemoteObject.createImmutable(" where CAT_GP_NOMBRE In (Select PDESC from PROID)"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1263;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1264;BA.debugLine="c.Position = 0";
Debug.ShouldStop(32768);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1265;BA.debugLine="m = CreateMap(\"id\":c.GetString(\"CAT_GP_ID\"), \"no";
Debug.ShouldStop(65536);
_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 = 1267;BA.debugLine="m = CreateMap(\"id\":\"N/A\", \"nombre\":\"N/A\", \"tipo\"";
Debug.ShouldStop(262144);
_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 = 1269;BA.debugLine="c.Close";
Debug.ShouldStop(1048576);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1270;BA.debugLine="Return m";
Debug.ShouldStop(2097152);
if (true) return _m;
 BA.debugLineNum = 1271;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
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",4,_ba,subs.mostCurrent,656);
if (RapidSub.canDelegate("traeprodnombre")) { return gunav2.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 = 656;BA.debugLine="Sub traeProdNombre(id As String) As String";
Debug.ShouldStop(32768);
 BA.debugLineNum = 657;BA.debugLine="Private h As Cursor";
Debug.ShouldStop(65536);
_h = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("h", _h);
 BA.debugLineNum = 658;BA.debugLine="Private n As String";
Debug.ShouldStop(131072);
_n = RemoteObject.createImmutable("");Debug.locals.put("n", _n);
 BA.debugLineNum = 659;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2($\"select CAT_";
Debug.ShouldStop(262144);
_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)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),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 = 660;BA.debugLine="If h.RowCount > 0 Then";
Debug.ShouldStop(524288);
if (RemoteObject.solveBoolean(">",_h.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 661;BA.debugLine="h.Position = 0";
Debug.ShouldStop(1048576);
_h.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 662;BA.debugLine="n = h.GetString(\"CAT_GP_NOMBRE\")";
Debug.ShouldStop(2097152);
_n = _h.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")));Debug.locals.put("n", _n);
 };
 BA.debugLineNum = 665;BA.debugLine="h.Close";
Debug.ShouldStop(16777216);
_h.runVoidMethod ("Close");
 BA.debugLineNum = 666;BA.debugLine="If n = Null Or n=\"\" Then n = \"N/A\"";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("n",_n) || RemoteObject.solveBoolean("=",_n,BA.ObjectToString(""))) { 
_n = BA.ObjectToString("N/A");Debug.locals.put("n", _n);};
 BA.debugLineNum = 668;BA.debugLine="Return n";
Debug.ShouldStop(134217728);
if (true) return _n;
 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  _traepromo(RemoteObject _ba,RemoteObject _promo,RemoteObject _cliente) throws Exception{
try {
		Debug.PushSubsStack("traePromo (subs) ","subs",4,_ba,subs.mostCurrent,2013);
if (RapidSub.canDelegate("traepromo")) { return gunav2.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 = 2013;BA.debugLine="Sub traePromo(promo As String, cliente As String)";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 2014;BA.debugLine="Private inicioContador As String = DateTime.Now";
Debug.ShouldStop(536870912);
_iniciocontador = BA.NumberToString(subs.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"));Debug.locals.put("inicioContador", _iniciocontador);Debug.locals.put("inicioContador", _iniciocontador);
 BA.debugLineNum = 2015;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(1073741824);
_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 = 2016;BA.debugLine="Private siHistorico As String = 0";
Debug.ShouldStop(-2147483648);
_sihistorico = BA.NumberToString(0);Debug.locals.put("siHistorico", _sihistorico);Debug.locals.put("siHistorico", _sihistorico);
 BA.debugLineNum = 2017;BA.debugLine="Private promoMap As Map";
Debug.ShouldStop(1);
_promomap = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("promoMap", _promomap);
 BA.debugLineNum = 2018;BA.debugLine="Private prodsFijos, prodsFijosPrecios, prodsFijos";
Debug.ShouldStop(2);
_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 = 2019;BA.debugLine="promoMap.Initialize";
Debug.ShouldStop(4);
_promomap.runVoidMethod ("Initialize");
 BA.debugLineNum = 2020;BA.debugLine="prodsFijos.Initialize";
Debug.ShouldStop(8);
_prodsfijos.runVoidMethod ("Initialize");
 BA.debugLineNum = 2021;BA.debugLine="prodsFijosPrecios.Initialize";
Debug.ShouldStop(16);
_prodsfijosprecios.runVoidMethod ("Initialize");
 BA.debugLineNum = 2022;BA.debugLine="prodsFijosPiezas.Initialize";
Debug.ShouldStop(32);
_prodsfijospiezas.runVoidMethod ("Initialize");
 BA.debugLineNum = 2023;BA.debugLine="prodsVariables.Initialize";
Debug.ShouldStop(64);
_prodsvariables.runVoidMethod ("Initialize");
 BA.debugLineNum = 2024;BA.debugLine="prodsVariables2.Initialize";
Debug.ShouldStop(128);
_prodsvariables2.runVoidMethod ("Initialize");
 BA.debugLineNum = 2025;BA.debugLine="prodsVariablesPrecios.Initialize";
Debug.ShouldStop(256);
_prodsvariablesprecios.runVoidMethod ("Initialize");
 BA.debugLineNum = 2026;BA.debugLine="prodsVariablesPrecios2.Initialize";
Debug.ShouldStop(512);
_prodsvariablesprecios2.runVoidMethod ("Initialize");
 BA.debugLineNum = 2027;BA.debugLine="c.Position = 0";
Debug.ShouldStop(1024);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2028;BA.debugLine="If c.RowCount > 0 Then promoMap = CreateMap(\"id\":";
Debug.ShouldStop(2048);
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 = 2029;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
Debug.ShouldStop(4096);
_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 = 2030;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8192);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2031;BA.debugLine="If c.GetString(\"hist\") > 0 Then siHistorico = 1";
Debug.ShouldStop(16384);
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 = 2032;BA.debugLine="promoMap.Put(\"historico\", siHistorico)";
Debug.ShouldStop(32768);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("historico"))),(Object)((_sihistorico)));
 BA.debugLineNum = 2033;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"Select * fr";
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 * from CAT_DETALLES_PAQ where CAT_DP_ID = '"),_promo,RemoteObject.createImmutable("'")))));Debug.locals.put("c", _c);
 BA.debugLineNum = 2034;BA.debugLine="c.Position = 0";
Debug.ShouldStop(131072);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2035;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2036;BA.debugLine="Private prods, tipos As Map";
Debug.ShouldStop(524288);
_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 = 2037;BA.debugLine="prods.Initialize";
Debug.ShouldStop(1048576);
_prods.runVoidMethod ("Initialize");
 BA.debugLineNum = 2038;BA.debugLine="tipos.Initialize";
Debug.ShouldStop(2097152);
_tipos.runVoidMethod ("Initialize");
 BA.debugLineNum = 2039;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(4194304);
{
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 = 2040;BA.debugLine="c.Position=i";
Debug.ShouldStop(8388608);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 2041;BA.debugLine="prods.Put(c.GetString(\"CAT_DP_IDPROD\"), CreateM";
Debug.ShouldStop(16777216);
_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 = 2042;BA.debugLine="tipos.Put(c.GetString(\"CAT_DP_IDPROD\"), c.GetSt";
Debug.ShouldStop(33554432);
_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 = 2043;BA.debugLine="If c.GetString(\"CAT_DP_TIPO\") = \"0\" Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))),BA.ObjectToString("0"))) { 
 BA.debugLineNum = 2044;BA.debugLine="prodsFijos.Add(c.GetString(\"CAT_DP_IDPROD\"))";
Debug.ShouldStop(134217728);
_prodsfijos.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))));
 BA.debugLineNum = 2045;BA.debugLine="prodsFijosPrecios.Add(c.GetString(\"CAT_DP_PREC";
Debug.ShouldStop(268435456);
_prodsfijosprecios.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))))));
 BA.debugLineNum = 2046;BA.debugLine="prodsFijosPiezas.Add(c.GetString(\"CAT_DP_PZAS\"";
Debug.ShouldStop(536870912);
_prodsfijospiezas.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS"))))));
 };
 BA.debugLineNum = 2048;BA.debugLine="If c.GetString(\"CAT_DP_TIPO\") = \"1\" Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))),BA.ObjectToString("1"))) { 
 BA.debugLineNum = 2049;BA.debugLine="prodsVariables.Add(c.GetString(\"CAT_DP_IDPROD\"";
Debug.ShouldStop(1);
_prodsvariables.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))));
 BA.debugLineNum = 2050;BA.debugLine="prodsVariablesPrecios.Add(c.GetString(\"CAT_DP_";
Debug.ShouldStop(2);
_prodsvariablesprecios.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))))));
 };
 BA.debugLineNum = 2052;BA.debugLine="If c.GetString(\"CAT_DP_TIPO\") = \"2\" Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_TIPO"))),BA.ObjectToString("2"))) { 
 BA.debugLineNum = 2054;BA.debugLine="prodsVariables2.Add(c.GetString(\"CAT_DP_IDPROD";
Debug.ShouldStop(32);
_prodsvariables2.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))));
 BA.debugLineNum = 2055;BA.debugLine="prodsVariablesPrecios2.Add(c.GetString(\"CAT_DP";
Debug.ShouldStop(64);
_prodsvariablesprecios2.runVoidMethod ("Add",(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))))));
 };
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 2060;BA.debugLine="promoMap.Put(\"productos\", prods) 'Mapa con los p";
Debug.ShouldStop(2048);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("productos"))),(Object)((_prods.getObject())));
 BA.debugLineNum = 2061;BA.debugLine="promoMap.Put(\"tipos\", tipos) 'Mapa con los produ";
Debug.ShouldStop(4096);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("tipos"))),(Object)((_tipos.getObject())));
 BA.debugLineNum = 2062;BA.debugLine="promoMap.Put(\"prodsFijos\", prodsFijos) 'Lista de";
Debug.ShouldStop(8192);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijos"))),(Object)((_prodsfijos.getObject())));
 BA.debugLineNum = 2063;BA.debugLine="promoMap.Put(\"prodsVariables\", prodsVariables) '";
Debug.ShouldStop(16384);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables"))),(Object)((_prodsvariables.getObject())));
 BA.debugLineNum = 2064;BA.debugLine="promoMap.Put(\"prodsVariables2\", prodsVariables2)";
Debug.ShouldStop(32768);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables2"))),(Object)((_prodsvariables2.getObject())));
 BA.debugLineNum = 2065;BA.debugLine="promoMap.Put(\"prodsFijosCant\", prodsFijos.Size)";
Debug.ShouldStop(65536);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijosCant"))),(Object)((_prodsfijos.runMethod(true,"getSize"))));
 BA.debugLineNum = 2066;BA.debugLine="promoMap.Put(\"prodsFijosPrecios\", prodsFijosPrec";
Debug.ShouldStop(131072);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijosPrecios"))),(Object)((_prodsfijosprecios.getObject())));
 BA.debugLineNum = 2067;BA.debugLine="promoMap.Put(\"prodsFijosPiezas\", prodsFijosPieza";
Debug.ShouldStop(262144);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsFijosPiezas"))),(Object)((_prodsfijospiezas.getObject())));
 BA.debugLineNum = 2068;BA.debugLine="promoMap.Put(\"prodsVariablesCant\", prodsVariable";
Debug.ShouldStop(524288);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesCant"))),(Object)((_prodsvariables.runMethod(true,"getSize"))));
 BA.debugLineNum = 2069;BA.debugLine="promoMap.Put(\"prodsVariables2Cant\", prodsVariabl";
Debug.ShouldStop(1048576);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables2Cant"))),(Object)((_prodsvariables2.runMethod(true,"getSize"))));
 BA.debugLineNum = 2070;BA.debugLine="promoMap.Put(\"prodsVariablesPrecios\", prodsVaria";
Debug.ShouldStop(2097152);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesPrecios"))),(Object)((_prodsvariablesprecios.getObject())));
 BA.debugLineNum = 2071;BA.debugLine="promoMap.Put(\"prodsVariablesPrecios2\", prodsVari";
Debug.ShouldStop(4194304);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesPrecios2"))),(Object)((_prodsvariablesprecios2.getObject())));
 BA.debugLineNum = 2072;BA.debugLine="promoMap.Put(\"resultado\", \"ok\")";
Debug.ShouldStop(8388608);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("ok"))));
 }else {
 BA.debugLineNum = 2074;BA.debugLine="promoMap.Put(\"resultado\", \"No hay datos de la pr";
Debug.ShouldStop(33554432);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("resultado"))),(Object)((RemoteObject.createImmutable("No hay datos de la promoción."))));
 };
 BA.debugLineNum = 2076;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery2($\"Select CA";
Debug.ShouldStop(134217728);
_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 = 2077;BA.debugLine="c.Position = 0";
Debug.ShouldStop(268435456);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2078;BA.debugLine="Private pvr As String = 0";
Debug.ShouldStop(536870912);
_pvr = BA.NumberToString(0);Debug.locals.put("pvr", _pvr);Debug.locals.put("pvr", _pvr);
 BA.debugLineNum = 2079;BA.debugLine="Private pvr2 As String = 0";
Debug.ShouldStop(1073741824);
_pvr2 = BA.NumberToString(0);Debug.locals.put("pvr2", _pvr2);Debug.locals.put("pvr2", _pvr2);
 BA.debugLineNum = 2080;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 2081;BA.debugLine="c.Position = 0";
Debug.ShouldStop(1);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2082;BA.debugLine="pvr = c.GetString(\"CAT_GP_STS\")";
Debug.ShouldStop(2);
_pvr = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_STS")));Debug.locals.put("pvr", _pvr);
 BA.debugLineNum = 2083;BA.debugLine="pvr2 = c.GetString(\"CAT_GP_IMP1\")";
Debug.ShouldStop(4);
_pvr2 = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_IMP1")));Debug.locals.put("pvr2", _pvr2);
 BA.debugLineNum = 2084;BA.debugLine="If pvr = Null Or pvr = \"null\" Then pvr = 0";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("n",_pvr) || RemoteObject.solveBoolean("=",_pvr,BA.ObjectToString("null"))) { 
_pvr = BA.NumberToString(0);Debug.locals.put("pvr", _pvr);};
 BA.debugLineNum = 2085;BA.debugLine="If pvr2 = Null Or pvr2 = \"null\" Then pvr2 = 0";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("n",_pvr2) || RemoteObject.solveBoolean("=",_pvr2,BA.ObjectToString("null"))) { 
_pvr2 = BA.NumberToString(0);Debug.locals.put("pvr2", _pvr2);};
 BA.debugLineNum = 2086;BA.debugLine="promoMap.Put(\"prodsVariablesRequeridos\", pvr) 'C";
Debug.ShouldStop(32);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariablesRequeridos"))),(Object)((_pvr)));
 BA.debugLineNum = 2087;BA.debugLine="promoMap.Put(\"prodsVariables2Requeridos\", pvr2)";
Debug.ShouldStop(64);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("prodsVariables2Requeridos"))),(Object)((_pvr2)));
 BA.debugLineNum = 2088;BA.debugLine="promoMap.put(\"descripcion\", c.GetString(\"CAT_GP_";
Debug.ShouldStop(128);
_promomap.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("descripcion"))),(Object)((_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE"))))));
 };
 BA.debugLineNum = 2090;BA.debugLine="c.Close";
Debug.ShouldStop(512);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 2095;BA.debugLine="Return promoMap";
Debug.ShouldStop(16384);
if (true) return _promomap;
 BA.debugLineNum = 2096;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traepromoiddebd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traePromoIdDeBD (subs) ","subs",4,_ba,subs.mostCurrent,1276);
if (RapidSub.canDelegate("traepromoiddebd")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traepromoiddebd", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
;
 BA.debugLineNum = 1276;BA.debugLine="Sub traePromoIdDeBD As Map 'ignore";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 1277;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(268435456);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1278;BA.debugLine="Private m As Map";
Debug.ShouldStop(536870912);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 1280;BA.debugLine="Log(\"ENTRE\")";
Debug.ShouldStop(-2147483648);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047448068",RemoteObject.createImmutable("ENTRE"),0);
 BA.debugLineNum = 1281;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)((_traetablaprods(_ba,_traetipoventadebd(_ba))))),RemoteObject.createImmutable(" where CAT_GP_NOMBRE In (Select PDESC from PROID) and CAT_GP_TIPO = 'PROMOS'"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 1282;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1283;BA.debugLine="c.Position = 0";
Debug.ShouldStop(4);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1284;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 = 1286;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 = 1288;BA.debugLine="c.Close";
Debug.ShouldStop(128);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1290;BA.debugLine="Return m";
Debug.ShouldStop(512);
if (true) return _m;
 BA.debugLineNum = 1291;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
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",4,_ba,subs.mostCurrent,1059);
if (RapidSub.canDelegate("traepromosvendidas")) { return gunav2.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 = 1059;BA.debugLine="Sub traePromosVendidas(promo As String, cliente As";
Debug.ShouldStop(4);
 BA.debugLineNum = 1060;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(8);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 1061;BA.debugLine="Private pv As Int = 0";
Debug.ShouldStop(16);
_pv = BA.numberCast(int.class, 0);Debug.locals.put("pv", _pv);Debug.locals.put("pv", _pv);
 BA.debugLineNum = 1062;BA.debugLine="If B4XPages.MainPage.tipo_venta = \"PREVENTA_FUTUR";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,_ba).getField(true,"_tipo_venta" /*RemoteObject*/ ),BA.ObjectToString("PREVENTA_FUTURA"))) { 
 BA.debugLineNum = 1063;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select PE_C";
Debug.ShouldStop(64);
_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("' AND PE_FUTURO = '1' "))))));Debug.locals.put("c", _c);
 }else {
 BA.debugLineNum = 1065;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select PE_C";
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,"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("' AND PE_FUTURO = '0' "))))));Debug.locals.put("c", _c);
 };
 BA.debugLineNum = 1067;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1068;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2048);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1069;BA.debugLine="pv = c.GetInt(\"PE_CANT\")";
Debug.ShouldStop(4096);
_pv = _c.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("PE_CANT")));Debug.locals.put("pv", _pv);
 };
 BA.debugLineNum = 1071;BA.debugLine="Return pv";
Debug.ShouldStop(16384);
if (true) return _pv;
 BA.debugLineNum = 1072;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeruta(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeRuta (subs) ","subs",4,_ba,subs.mostCurrent,673);
if (RapidSub.canDelegate("traeruta")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeruta", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _r = RemoteObject.createImmutable("");
RemoteObject _idcliente = RemoteObject.createImmutable("");
RemoteObject _elcc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 673;BA.debugLine="Sub traeRuta As String 'ignore";
Debug.ShouldStop(1);
 BA.debugLineNum = 674;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(2);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 675;BA.debugLine="Private r As String = \"0\"";
Debug.ShouldStop(4);
_r = BA.ObjectToString("0");Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 676;BA.debugLine="Private idCliente As String = \"\"";
Debug.ShouldStop(8);
_idcliente = BA.ObjectToString("");Debug.locals.put("idCliente", _idcliente);Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 677;BA.debugLine="Try";
Debug.ShouldStop(16);
try { BA.debugLineNum = 678;BA.debugLine="Private elCc As Cursor = Starter.skmt.ExecQuery(";
Debug.ShouldStop(32);
_elcc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_elcc = 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 CUENTA from CUENTAA")))));Debug.locals.put("elCc", _elcc);Debug.locals.put("elCc", _elcc);
 BA.debugLineNum = 679;BA.debugLine="If elCc.RowCount > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_elcc.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 680;BA.debugLine="elCc.Position = 0";
Debug.ShouldStop(128);
_elcc.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 681;BA.debugLine="idCliente = elCc.GetString(\"CUENTA\")";
Debug.ShouldStop(256);
_idcliente = _elcc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA")));Debug.locals.put("idCliente", _idcliente);
 BA.debugLineNum = 682;BA.debugLine="Log(\"|\"&elCc.GetString(\"CUENTA\")&\"|\")";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046071817",RemoteObject.concat(RemoteObject.createImmutable("|"),_elcc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))),RemoteObject.createImmutable("|")),0);
 };
 BA.debugLineNum = 685;BA.debugLine="If idCliente <> \"\" Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("!",_idcliente,BA.ObjectToString(""))) { 
 BA.debugLineNum = 687;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery($\"select d";
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,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select distinct CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idcliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);
 }else {
 BA.debugLineNum = 690;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select di";
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 distinct CAT_CL_RUTA from kmt_info3 where CAT_CL_RUTA not in (select * from ruta_suplencia)"))));Debug.locals.put("c", _c);
 };
 BA.debugLineNum = 693;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 695;BA.debugLine="c.Position=0";
Debug.ShouldStop(4194304);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 696;BA.debugLine="r = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(8388608);
_r = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("r", _r);
 };
 BA.debugLineNum = 698;BA.debugLine="c.Close";
Debug.ShouldStop(33554432);
_c.runVoidMethod ("Close");
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e22) {
			BA.rdebugUtils.runVoidMethod("setLastException",BA.rdebugUtils.runMethod(false, "processBAFromBA", _ba), e22.toString()); BA.debugLineNum = 700;BA.debugLine="Log(LastException)";
Debug.ShouldStop(134217728);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","046071835",BA.ObjectToString(subs.mostCurrent.__c.runMethod(false,"LastException",_ba)),0);
 };
 BA.debugLineNum = 703;BA.debugLine="Return r";
Debug.ShouldStop(1073741824);
if (true) return _r;
 BA.debugLineNum = 704;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
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",4,_ba,subs.mostCurrent,773);
if (RapidSub.canDelegate("traeruta2")) { return gunav2.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 = 773;BA.debugLine="Sub traeRuta2 (cliente As String) As String 'ignor";
Debug.ShouldStop(16);
 BA.debugLineNum = 774;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(32);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 775;BA.debugLine="Private r As String";
Debug.ShouldStop(64);
_r = RemoteObject.createImmutable("");Debug.locals.put("r", _r);
 BA.debugLineNum = 776;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_C";
Debug.ShouldStop(128);
_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_info3 where CAT_CL_CODIGO = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cliente))),RemoteObject.createImmutable("'"))))));Debug.locals.put("c", _c);
 BA.debugLineNum = 777;BA.debugLine="r = \"0\"";
Debug.ShouldStop(256);
_r = BA.ObjectToString("0");Debug.locals.put("r", _r);
 BA.debugLineNum = 778;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 779;BA.debugLine="c.Position=0";
Debug.ShouldStop(1024);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 780;BA.debugLine="r = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(2048);
_r = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("r", _r);
 };
 BA.debugLineNum = 782;BA.debugLine="c.Close";
Debug.ShouldStop(8192);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 783;BA.debugLine="Return r";
Debug.ShouldStop(16384);
if (true) return _r;
 BA.debugLineNum = 784;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traerutabitacora(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeRutaBitacora (subs) ","subs",4,_ba,subs.mostCurrent,786);
if (RapidSub.canDelegate("traerutabitacora")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traerutabitacora", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _r = RemoteObject.createImmutable("");
;
 BA.debugLineNum = 786;BA.debugLine="Sub traeRutaBitacora As String 'ignore";
Debug.ShouldStop(131072);
 BA.debugLineNum = 787;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(262144);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 788;BA.debugLine="Private r As String";
Debug.ShouldStop(524288);
_r = RemoteObject.createImmutable("");Debug.locals.put("r", _r);
 BA.debugLineNum = 789;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_CL";
Debug.ShouldStop(1048576);
_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 CAT_CL_RUTA from kmt_info3 WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 790;BA.debugLine="r = \"0\"";
Debug.ShouldStop(2097152);
_r = BA.ObjectToString("0");Debug.locals.put("r", _r);
 BA.debugLineNum = 791;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 792;BA.debugLine="c.Position=0";
Debug.ShouldStop(8388608);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 793;BA.debugLine="r = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(16777216);
_r = _c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")));Debug.locals.put("r", _r);
 };
 BA.debugLineNum = 795;BA.debugLine="c.Close";
Debug.ShouldStop(67108864);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 796;BA.debugLine="Return r";
Debug.ShouldStop(134217728);
if (true) return _r;
 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  _traerutassup(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeRutasSup (subs) ","subs",4,_ba,subs.mostCurrent,800);
if (RapidSub.canDelegate("traerutassup")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traerutassup", _ba);}
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _rutas = RemoteObject.createImmutable("");
int _i = 0;
;
 BA.debugLineNum = 800;BA.debugLine="Sub traeRutasSup As String";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 801;BA.debugLine="Dim c As Cursor";
Debug.ShouldStop(1);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 802;BA.debugLine="Dim rutas As String";
Debug.ShouldStop(2);
_rutas = RemoteObject.createImmutable("");Debug.locals.put("rutas", _rutas);
 BA.debugLineNum = 803;BA.debugLine="rutas = \"\"";
Debug.ShouldStop(4);
_rutas = BA.ObjectToString("");Debug.locals.put("rutas", _rutas);
 BA.debugLineNum = 805;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT CAT_";
Debug.ShouldStop(16);
_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 CAT_CL_RUTA FROM kmt_info3"))));Debug.locals.put("c", _c);
 BA.debugLineNum = 807;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 808;BA.debugLine="For i = 0 To c.RowCount - 1";
Debug.ShouldStop(128);
{
final int step6 = 1;
final int limit6 = RemoteObject.solve(new RemoteObject[] {_c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step6 > 0 && _i <= limit6) || (step6 < 0 && _i >= limit6) ;_i = ((int)(0 + _i + step6))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 809;BA.debugLine="c.Position = i";
Debug.ShouldStop(256);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 810;BA.debugLine="rutas = rutas & c.GetString(\"CAT_CL_RUTA\") & \",";
Debug.ShouldStop(512);
_rutas = RemoteObject.concat(_rutas,_c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))),RemoteObject.createImmutable(", "));Debug.locals.put("rutas", _rutas);
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 812;BA.debugLine="If rutas.Length > 0 Then rutas = rutas.SubString";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean(">",_rutas.runMethod(true,"length"),BA.numberCast(double.class, 0))) { 
_rutas = _rutas.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 0)),(Object)(RemoteObject.solve(new RemoteObject[] {_rutas.runMethod(true,"length"),RemoteObject.createImmutable(2)}, "-",1, 1)));Debug.locals.put("rutas", _rutas);};
 };
 BA.debugLineNum = 815;BA.debugLine="c.Close";
Debug.ShouldStop(16384);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 816;BA.debugLine="Return rutas";
Debug.ShouldStop(32768);
if (true) return _rutas;
 BA.debugLineNum = 817;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
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",4,_ba,subs.mostCurrent,1853);
if (RapidSub.canDelegate("traetablaprods")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetablaprods", _ba, _tipoventa);}
RemoteObject _tablaprods = RemoteObject.createImmutable("");
;
Debug.locals.put("tipoventa", _tipoventa);
 BA.debugLineNum = 1853;BA.debugLine="Sub traeTablaProds(tipoventa As String) As String";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 1854;BA.debugLine="Log(tipoventa)";
Debug.ShouldStop(536870912);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048824321",_tipoventa,0);
 BA.debugLineNum = 1855;BA.debugLine="Private tablaProds As String = \"cat_gunaprod2\"";
Debug.ShouldStop(1073741824);
_tablaprods = BA.ObjectToString("cat_gunaprod2");Debug.locals.put("tablaProds", _tablaprods);Debug.locals.put("tablaProds", _tablaprods);
 BA.debugLineNum = 1856;BA.debugLine="If tipoventa = \"ABORDO\" Or tipoventa = \"PREVENTA\"";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("ABORDO")) || RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("PREVENTA")) || RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("PREVENTA_FUTURA")) || RemoteObject.solveBoolean("=",_tipoventa,BA.ObjectToString("MAYOREO"))) { 
_tablaprods = BA.ObjectToString("cat_gunaprod");Debug.locals.put("tablaProds", _tablaprods);};
 BA.debugLineNum = 1858;BA.debugLine="Return tablaProds";
Debug.ShouldStop(2);
if (true) return _tablaprods;
 BA.debugLineNum = 1859;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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",4,_ba,subs.mostCurrent,1967);
if (RapidSub.canDelegate("traetipocliente")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetipocliente", _ba);}
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _tc = RemoteObject.createImmutable(0);
;
 BA.debugLineNum = 1967;BA.debugLine="Sub traeTipoCliente As Int";
Debug.ShouldStop(16384);
 BA.debugLineNum = 1968;BA.debugLine="Private x As Cursor";
Debug.ShouldStop(32768);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("x", _x);
 BA.debugLineNum = 1969;BA.debugLine="Private tc As Int = 3";
Debug.ShouldStop(65536);
_tc = BA.numberCast(int.class, 3);Debug.locals.put("tc", _tc);Debug.locals.put("tc", _tc);
 BA.debugLineNum = 1970;BA.debugLine="x = Starter.skmt.ExecQuery($\"select IFNULL(cat_cl";
Debug.ShouldStop(131072);
_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,3) AS CAT_CL_TIPOCLIENTE from kmt_info3 where cat_cl_codigo in (select cuenta from cuentaa)")))));Debug.locals.put("x", _x);
 BA.debugLineNum = 1971;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1972;BA.debugLine="x.Position = 0";
Debug.ShouldStop(524288);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1974;BA.debugLine="tc = x.GetInt(\"CAT_CL_TIPOCLIENTE\")";
Debug.ShouldStop(2097152);
_tc = _x.runMethod(true,"GetInt",(Object)(RemoteObject.createImmutable("CAT_CL_TIPOCLIENTE")));Debug.locals.put("tc", _tc);
 };
 BA.debugLineNum = 1977;BA.debugLine="Return tc";
Debug.ShouldStop(16777216);
if (true) return _tc;
 BA.debugLineNum = 1978;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable(0);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetipoventadebd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTipoVentaDeBD (subs) ","subs",4,_ba,subs.mostCurrent,1876);
if (RapidSub.canDelegate("traetipoventadebd")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traetipoventadebd", _ba);}
RemoteObject _tipoventa = RemoteObject.createImmutable("");
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
;
 BA.debugLineNum = 1876;BA.debugLine="Sub traeTipoVentaDeBD As String";
Debug.ShouldStop(524288);
 BA.debugLineNum = 1877;BA.debugLine="Private tipoVenta As String = \"PREVENTA\"";
Debug.ShouldStop(1048576);
_tipoventa = BA.ObjectToString("PREVENTA");Debug.locals.put("tipoVenta", _tipoventa);Debug.locals.put("tipoVenta", _tipoventa);
 BA.debugLineNum = 1878;BA.debugLine="Private r As ResultSet = Starter.skmt.ExecQuery(\"";
Debug.ShouldStop(2097152);
_r = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select * from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'TIPO_VENTA'  "))));Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 1879;BA.debugLine="Do While r.NextRow";
Debug.ShouldStop(4194304);
while (_r.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1880;BA.debugLine="tipoVenta = r.GetString(\"CAT_VA_VALOR\").As(Strin";
Debug.ShouldStop(8388608);
_tipoventa = (_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")))).runMethod(true,"toUpperCase");Debug.locals.put("tipoVenta", _tipoventa);
 }
;
 BA.debugLineNum = 1882;BA.debugLine="If Starter.idCliente = \"0\" Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",subs.mostCurrent._starter._idcliente /*RemoteObject*/ ,BA.ObjectToString("0"))) { 
 BA.debugLineNum = 1883;BA.debugLine="tipoVenta = \"ABORDO\"";
Debug.ShouldStop(67108864);
_tipoventa = BA.ObjectToString("ABORDO");Debug.locals.put("tipoVenta", _tipoventa);
 };
 BA.debugLineNum = 1886;BA.debugLine="Return tipoVenta";
Debug.ShouldStop(536870912);
if (true) return _tipoventa;
 BA.debugLineNum = 1887;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traetotalesclienteactual(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeTotalesClienteActual (subs) ","subs",4,_ba,subs.mostCurrent,1994);
if (RapidSub.canDelegate("traetotalesclienteactual")) { return gunav2.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 = 1994;BA.debugLine="Sub traeTotalesClienteActual As Map";
Debug.ShouldStop(512);
 BA.debugLineNum = 1995;BA.debugLine="Private m As Map";
Debug.ShouldStop(1024);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 1996;BA.debugLine="m.Initialize";
Debug.ShouldStop(2048);
_m.runVoidMethod ("Initialize");
 BA.debugLineNum = 1997;BA.debugLine="Private c_prodsX As Cursor=B4XPages.MainPage.skmt";
Debug.ShouldStop(4096);
_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 = 1998;BA.debugLine="c_prodsX.Position=0";
Debug.ShouldStop(8192);
_c_prodsx.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 2000;BA.debugLine="m = CreateMap(\"productos\": c_prodsX.GetString(\"ca";
Debug.ShouldStop(32768);
_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 = 2001;BA.debugLine="Return m";
Debug.ShouldStop(65536);
if (true) return _m;
 BA.debugLineNum = 2002;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeusarintentbdwa(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeUsarIntentBDWA (subs) ","subs",4,_ba,subs.mostCurrent,1751);
if (RapidSub.canDelegate("traeusarintentbdwa")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traeusarintentbdwa", _ba);}
RemoteObject _bdwa = RemoteObject.createImmutable(false);
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1751;BA.debugLine="Sub traeUsarIntentBDWA As Boolean 'ignore";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 1752;BA.debugLine="Private BDWA As Boolean = False";
Debug.ShouldStop(8388608);
_bdwa = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("BDWA", _bdwa);Debug.locals.put("BDWA", _bdwa);
 BA.debugLineNum = 1753;BA.debugLine="Private x As Cursor = Starter.skmt.ExecQuery($\"se";
Debug.ShouldStop(16777216);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_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 CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'IMPORTAR_BD_WA'")))));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 1754;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1755;BA.debugLine="x.Position = 0";
Debug.ShouldStop(67108864);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1756;BA.debugLine="If x.GetString(\"CAT_VA_VALOR\") = \"true\" Then BDW";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean("=",_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR"))),BA.ObjectToString("true"))) { 
_bdwa = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("BDWA", _bdwa);};
 };
 BA.debugLineNum = 1759;BA.debugLine="Return BDWA";
Debug.ShouldStop(1073741824);
if (true) return _bdwa;
 BA.debugLineNum = 1760;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traeusuariodebd(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("traeUsuarioDeBD (subs) ","subs",4,_ba,subs.mostCurrent,840);
if (RapidSub.canDelegate("traeusuariodebd")) { return gunav2.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 = 840;BA.debugLine="Sub traeUsuarioDeBD As String 'ignore";
Debug.ShouldStop(128);
 BA.debugLineNum = 841;BA.debugLine="Private c As Cursor";
Debug.ShouldStop(256);
_c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");Debug.locals.put("c", _c);
 BA.debugLineNum = 842;BA.debugLine="Private u As String = \"SinUsuario\"";
Debug.ShouldStop(512);
_u = BA.ObjectToString("SinUsuario");Debug.locals.put("u", _u);Debug.locals.put("u", _u);
 BA.debugLineNum = 843;BA.debugLine="If Not(kmt.IsInitialized) Then revisaBD";
Debug.ShouldStop(1024);
if (subs.mostCurrent.__c.runMethod(true,"Not",(Object)(subs._kmt.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
_revisabd(_ba);};
 BA.debugLineNum = 844;BA.debugLine="c=kmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(2048);
_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 = 845;BA.debugLine="c.Position=0";
Debug.ShouldStop(4096);
_c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 846;BA.debugLine="If c.RowCount > 0 Then u = c.GetString(\"USUARIO\")";
Debug.ShouldStop(8192);
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 = 847;BA.debugLine="c.Close";
Debug.ShouldStop(16384);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 848;BA.debugLine="Return u";
Debug.ShouldStop(32768);
if (true) return _u;
 BA.debugLineNum = 849;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _traevariable(RemoteObject _ba,RemoteObject _nombre) throws Exception{
try {
		Debug.PushSubsStack("traeVariable (subs) ","subs",4,_ba,subs.mostCurrent,1896);
if (RapidSub.canDelegate("traevariable")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","traevariable", _ba, _nombre);}
RemoteObject _valor = RemoteObject.createImmutable("");
RemoteObject _lavc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
Debug.locals.put("nombre", _nombre);
 BA.debugLineNum = 1896;BA.debugLine="Sub traeVariable(nombre As String) As String";
Debug.ShouldStop(128);
 BA.debugLineNum = 1897;BA.debugLine="Private valor As String = \"\"";
Debug.ShouldStop(256);
_valor = BA.ObjectToString("");Debug.locals.put("valor", _valor);Debug.locals.put("valor", _valor);
 BA.debugLineNum = 1898;BA.debugLine="Private laVc As Cursor = Starter.skmt.ExecQuery($";
Debug.ShouldStop(512);
_lavc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_lavc = 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 CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_nombre))),RemoteObject.createImmutable("'"))))));Debug.locals.put("laVc", _lavc);Debug.locals.put("laVc", _lavc);
 BA.debugLineNum = 1899;BA.debugLine="If laVc.RowCount > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",_lavc.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1900;BA.debugLine="laVc.Position = 0";
Debug.ShouldStop(2048);
_lavc.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 1901;BA.debugLine="valor = laVc.GetString(\"CAT_VA_VALOR\")";
Debug.ShouldStop(4096);
_valor = _lavc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")));Debug.locals.put("valor", _valor);
 };
 BA.debugLineNum = 1903;BA.debugLine="Return valor";
Debug.ShouldStop(16384);
if (true) return _valor;
 BA.debugLineNum = 1904;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _validapromoprocterpro3009(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("validaPromoProcterPRO3009 (subs) ","subs",4,_ba,subs.mostCurrent,1602);
if (RapidSub.canDelegate("validapromoprocterpro3009")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","validapromoprocterpro3009", _ba);}
RemoteObject _idregalo = RemoteObject.createImmutable("");
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
RemoteObject _monto = RemoteObject.createImmutable("");
RemoteObject _r2 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
;
 BA.debugLineNum = 1602;BA.debugLine="Sub validaPromoProcterPRO3009";
Debug.ShouldStop(2);
 BA.debugLineNum = 1603;BA.debugLine="Private idRegalo As String = \"PYG1016\"";
Debug.ShouldStop(4);
_idregalo = BA.ObjectToString("PYG1016");Debug.locals.put("idRegalo", _idregalo);Debug.locals.put("idRegalo", _idregalo);
 BA.debugLineNum = 1604;BA.debugLine="Private r As ResultSet = Starter.skmt.ExecQuery($";
Debug.ShouldStop(8);
_r = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select pe_cliente from pedido where pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idregalo))),RemoteObject.createImmutable("' and pe_cedis = 'PRO3009'"))))));Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 1606;BA.debugLine="Do While r.NextRow";
Debug.ShouldStop(32);
while (_r.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1607;BA.debugLine="Private monto As String = 0";
Debug.ShouldStop(64);
_monto = BA.NumberToString(0);Debug.locals.put("monto", _monto);Debug.locals.put("monto", _monto);
 BA.debugLineNum = 1608;BA.debugLine="Private r2 As ResultSet = Starter.skmt.ExecQuery";
Debug.ShouldStop(128);
_r2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_r2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select ifnull(sum(pe_costo_tot),0) as monto from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE")))))),RemoteObject.createImmutable("' and PE_PROID in (\"PYG1014\", \"PYG1025\")"))))));Debug.locals.put("r2", _r2);Debug.locals.put("r2", _r2);
 BA.debugLineNum = 1609;BA.debugLine="Do While r2.NextRow";
Debug.ShouldStop(256);
while (_r2.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1610;BA.debugLine="Log($\"Cliente: ${r.GetString(\"PE_CLIENTE\")}, mo";
Debug.ShouldStop(512);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","048168968",(RemoteObject.concat(RemoteObject.createImmutable("Cliente: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE")))))),RemoteObject.createImmutable(", monto: "),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("monto")))))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 1613;BA.debugLine="If r2.GetString(\"monto\") < 150 Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("<",BA.numberCast(double.class, _r2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("monto")))),BA.numberCast(double.class, 150))) { 
 BA.debugLineNum = 1614;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedido";
Debug.ShouldStop(8192);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido where pe_cedis = 'PRO3009' and pe_proid = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_idregalo))),RemoteObject.createImmutable("' and pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE")))))),RemoteObject.createImmutable("' and pe_cant = 1 ")))));
 BA.debugLineNum = 1616;BA.debugLine="Msgbox($\"Regalo de la promoción PRO3009 borrad";
Debug.ShouldStop(32768);
subs.mostCurrent.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence((RemoteObject.createImmutable("Regalo de la promoción PRO3009 borrado por no cumplir con los requisitos mínimos.")))),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("Regalo Borrado"))),_ba);
 };
 }
;
 BA.debugLineNum = 1620;BA.debugLine="r2 = Starter.skmt.ExecQuery($\"select count(pe_pr";
Debug.ShouldStop(524288);
_r2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), subs.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select count(pe_proid) as cuantos from pedido where pe_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE")))))),RemoteObject.createImmutable("'"))))));Debug.locals.put("r2", _r2);
 BA.debugLineNum = 1621;BA.debugLine="Do While r2.NextRow";
Debug.ShouldStop(1048576);
while (_r2.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 1623;BA.debugLine="If r2.GetString(\"cuantos\") = 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("=",_r2.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantos"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 1624;BA.debugLine="Starter.skmt.ExecNonQuery($\"delete from pedido";
Debug.ShouldStop(8388608);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("delete from pedido_cliente where pc_cliente = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE")))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 1625;BA.debugLine="Starter.skmt.ExecNonQuery($\"update kmt_info3 s";
Debug.ShouldStop(16777216);
subs.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update kmt_info3 set gestion = 0 where cat_cl_codigo = '"),subs.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_r.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CLIENTE")))))),RemoteObject.createImmutable("'")))));
 };
 }
;
 }
;
 BA.debugLineNum = 1629;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _vendidopromoesp(RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("vendidoPromoEsp (subs) ","subs",4,_ba,subs.mostCurrent,1396);
if (RapidSub.canDelegate("vendidopromoesp")) { return gunav2.keymon.com.mx.subs.remoteMe.runUserSub(false, "subs","vendidopromoesp", _ba);}
RemoteObject _w = RemoteObject.createImmutable(false);
RemoteObject _c = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
;
 BA.debugLineNum = 1396;BA.debugLine="Sub vendidoPromoEsp As Boolean";
Debug.ShouldStop(524288);
 BA.debugLineNum = 1397;BA.debugLine="Private w As Boolean = False";
Debug.ShouldStop(1048576);
_w = subs.mostCurrent.__c.getField(true,"False");Debug.locals.put("w", _w);Debug.locals.put("w", _w);
 BA.debugLineNum = 1398;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
Debug.ShouldStop(2097152);
_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.createImmutable("select HP_CLIENTE, HP_CODIGO_PROMOCION from HIST_PROMOS WHERE HP_CODIGO_PROMOCION IN (SELECT DISTINCT CAT_PE_IDPROMO FROM CAT_PROMO_ESP) AND HP_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1399;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1400;BA.debugLine="w = True";
Debug.ShouldStop(8388608);
_w = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("w", _w);
 };
 BA.debugLineNum = 1402;BA.debugLine="Log(w)";
Debug.ShouldStop(33554432);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047841286",BA.ObjectToString(_w),0);
 BA.debugLineNum = 1403;BA.debugLine="c.Close";
Debug.ShouldStop(67108864);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1404;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,"ExecQuery",(Object)(RemoteObject.createImmutable("select PE_PROID from PEDIDO WHERE PE_PROID IN (SELECT DISTINCT CAT_PE_IDPROMO FROM CAT_PROMO_ESP) AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)"))));Debug.locals.put("c", _c);Debug.locals.put("c", _c);
 BA.debugLineNum = 1405;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean(">",_c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 1406;BA.debugLine="w = True";
Debug.ShouldStop(536870912);
_w = subs.mostCurrent.__c.getField(true,"True");Debug.locals.put("w", _w);
 };
 BA.debugLineNum = 1408;BA.debugLine="c.Close";
Debug.ShouldStop(-2147483648);
_c.runVoidMethod ("Close");
 BA.debugLineNum = 1409;BA.debugLine="Log(w)";
Debug.ShouldStop(1);
subs.mostCurrent.__c.runVoidMethod ("LogImpl","047841293",BA.ObjectToString(_w),0);
 BA.debugLineNum = 1410;BA.debugLine="Return w";
Debug.ShouldStop(2);
if (true) return _w;
 BA.debugLineNum = 1411;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}