package reparto_izca.keymon.lat;

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

public class c_historico_subs_0 {


public static RemoteObject  _b_guardar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_guardar_Click (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,592);
if (RapidSub.canDelegate("b_guardar_click")) { return __ref.runUserSub(false, "c_historico","b_guardar_click", __ref);}
 BA.debugLineNum = 592;BA.debugLine="Private Sub b_guardar_Click";
Debug.ShouldStop(32768);
 BA.debugLineNum = 594;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_prodmas_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_prodMas_Click (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,383);
if (RapidSub.canDelegate("b_prodmas_click")) { return __ref.runUserSub(false, "c_historico","b_prodmas_click", __ref);}
RemoteObject _index = RemoteObject.createImmutable(0);
RemoteObject _pnl0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _pnl = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _lacant = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _estetag = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _maxprods = RemoteObject.createImmutable("");
RemoteObject _cym = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
 BA.debugLineNum = 383;BA.debugLine="Sub b_prodMas_Click";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 384;BA.debugLine="etCantHasFocus = False";
Debug.ShouldStop(-2147483648);
__ref.setField ("_etcanthasfocus" /*RemoteObject*/ ,c_historico.__c.getField(true,"False"));
 BA.debugLineNum = 386;BA.debugLine="LogColor(\"b_prodMas_Click\", Colors.Magenta)";
Debug.ShouldStop(2);
c_historico.__c.runVoidMethod ("LogImpl","822216707",BA.ObjectToString("b_prodMas_Click"),c_historico.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 387;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
Debug.ShouldStop(4);
_index = __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(true,"_getitemfromview",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), c_historico.__c.runMethod(false,"Sender",__ref.getField(false, "ba"))));Debug.locals.put("index", _index);Debug.locals.put("index", _index);
 BA.debugLineNum = 388;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
Debug.ShouldStop(8);
_pnl0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_pnl0 = __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_getpanel",(Object)(_index));Debug.locals.put("pnl0", _pnl0);Debug.locals.put("pnl0", _pnl0);
 BA.debugLineNum = 389;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
Debug.ShouldStop(16);
_pnl = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_pnl = _pnl0.runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 0)));Debug.locals.put("pnl", _pnl);Debug.locals.put("pnl", _pnl);
 BA.debugLineNum = 390;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(3)";
Debug.ShouldStop(32);
_lacant = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_lacant = _pnl.runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 2))).runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 3)));Debug.locals.put("laCant", _lacant);Debug.locals.put("laCant", _lacant);
 BA.debugLineNum = 394;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.Ta";
Debug.ShouldStop(512);
_estetag = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_estetag = c_historico.__c.runMethod(false, "ArrayToList", (Object)(c_historico.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString("\\|")),(Object)(BA.ObjectToString(_lacant.runMethod(false,"getTag"))))));Debug.locals.put("esteTag", _estetag);Debug.locals.put("esteTag", _estetag);
 BA.debugLineNum = 395;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|LC_TAG:\"&laCant.Tag&";
Debug.ShouldStop(1024);
c_historico.__c.runVoidMethod ("LogImpl","822216716",RemoteObject.concat(RemoteObject.createImmutable("LC_TEXT:"),_lacant.runMethod(true,"getText"),RemoteObject.createImmutable("|LC_TAG:"),_lacant.runMethod(false,"getTag"),RemoteObject.createImmutable("|ET:"),_estetag),0);
 BA.debugLineNum = 396;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",_lacant.runMethod(true,"getText"),BA.ObjectToString(""))) { 
_lacant.runMethod(true,"setText",BA.ObjectToCharSequence(0));};
 BA.debugLineNum = 398;BA.debugLine="Private maxProds as string = esteTag.Get(1) + est";
Debug.ShouldStop(8192);
_maxprods = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1)))),BA.numberCast(double.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 4))))}, "+",1, 0));Debug.locals.put("maxProds", _maxprods);Debug.locals.put("maxProds", _maxprods);
 BA.debugLineNum = 400;BA.debugLine="LogColor($\"++++++++++++++++++++++++++   ${esteTag";
Debug.ShouldStop(32768);
c_historico.__c.runVoidMethod ("LogImpl","822216721",(RemoteObject.concat(RemoteObject.createImmutable("++++++++++++++++++++++++++   "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_estetag.getObject()))),RemoteObject.createImmutable(""))),c_historico.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 402;BA.debugLine="If laCant.Text + 1 <= maxProds Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("k",RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _lacant.runMethod(true,"getText")),RemoteObject.createImmutable(1)}, "+",1, 0),BA.numberCast(double.class, _maxprods))) { 
 BA.debugLineNum = 403;BA.debugLine="Log($\"NuevaCant = ${laCant.Text + 1}\"$)";
Debug.ShouldStop(262144);
c_historico.__c.runVoidMethod ("LogImpl","822216724",(RemoteObject.concat(RemoteObject.createImmutable("NuevaCant = "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _lacant.runMethod(true,"getText")),RemoteObject.createImmutable(1)}, "+",1, 0)))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 404;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text + 1}\"$";
Debug.ShouldStop(524288);
_lacant.runMethod(true,"setText",BA.ObjectToCharSequence((RemoteObject.concat(RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.0")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _lacant.runMethod(true,"getText")),RemoteObject.createImmutable(1)}, "+",1, 0)))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 405;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunaprod";
Debug.ShouldStop(1048576);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - 1 where cat_gp_id = ?")),(Object)(c_historico.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2)))})))));
 BA.debugLineNum = 406;BA.debugLine="Subs.prodVenta(esteTag.Get(5), esteTag.Get(2))";
Debug.ShouldStop(2097152);
c_historico._subs.runVoidMethod ("_prodventa" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 5))))),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))))));
 BA.debugLineNum = 407;BA.debugLine="Private cym As Map = Subs.traemosCantYMonto(clv_";
Debug.ShouldStop(4194304);
_cym = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_cym = c_historico._subs.runMethod(false,"_traemoscantymonto" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_clv_pedido" /*RemoteObject*/ )));Debug.locals.put("cym", _cym);Debug.locals.put("cym", _cym);
 BA.debugLineNum = 408;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
Debug.ShouldStop(8388608);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(_cym.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cantidad"))))));
 BA.debugLineNum = 409;BA.debugLine="L_TOTAL.Text = Round2(cym.Get(\"monto\"), 2)";
Debug.ShouldStop(16777216);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, _cym.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("monto")))))),(Object)(BA.numberCast(int.class, 2)))));
 };
 BA.debugLineNum = 426;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_prodmenos_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_prodMenos_Click (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,340);
if (RapidSub.canDelegate("b_prodmenos_click")) { return __ref.runUserSub(false, "c_historico","b_prodmenos_click", __ref);}
RemoteObject _index = RemoteObject.createImmutable(0);
RemoteObject _pnl0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _pnl = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _lacant = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _estetag = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _preciou = RemoteObject.createImmutable(0f);
RemoteObject _cym = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
 BA.debugLineNum = 340;BA.debugLine="Sub b_prodMenos_Click";
Debug.ShouldStop(524288);
 BA.debugLineNum = 341;BA.debugLine="etCantHasFocus = False";
Debug.ShouldStop(1048576);
__ref.setField ("_etcanthasfocus" /*RemoteObject*/ ,c_historico.__c.getField(true,"False"));
 BA.debugLineNum = 342;BA.debugLine="Log(\"etCantHasFocus=\" & etCantHasFocus)";
Debug.ShouldStop(2097152);
c_historico.__c.runVoidMethod ("LogImpl","822151170",RemoteObject.concat(RemoteObject.createImmutable("etCantHasFocus="),__ref.getField(true,"_etcanthasfocus" /*RemoteObject*/ )),0);
 BA.debugLineNum = 343;BA.debugLine="LogColor(\"b_prodMenos_Click\", Colors.Magenta)";
Debug.ShouldStop(4194304);
c_historico.__c.runVoidMethod ("LogImpl","822151171",BA.ObjectToString("b_prodMenos_Click"),c_historico.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 344;BA.debugLine="Dim index As Int = clv_pedido.GetItemFromView(Sen";
Debug.ShouldStop(8388608);
_index = __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(true,"_getitemfromview",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), c_historico.__c.runMethod(false,"Sender",__ref.getField(false, "ba"))));Debug.locals.put("index", _index);Debug.locals.put("index", _index);
 BA.debugLineNum = 345;BA.debugLine="Dim pnl0 As B4XView = clv_pedido.GetPanel(index)";
Debug.ShouldStop(16777216);
_pnl0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_pnl0 = __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_getpanel",(Object)(_index));Debug.locals.put("pnl0", _pnl0);Debug.locals.put("pnl0", _pnl0);
 BA.debugLineNum = 346;BA.debugLine="Dim pnl As B4XView = pnl0.GetView(0)";
Debug.ShouldStop(33554432);
_pnl = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_pnl = _pnl0.runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 0)));Debug.locals.put("pnl", _pnl);Debug.locals.put("pnl", _pnl);
 BA.debugLineNum = 347;BA.debugLine="Dim laCant As B4XView = pnl.GetView(2).GetView(3)";
Debug.ShouldStop(67108864);
_lacant = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_lacant = _pnl.runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 2))).runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 3)));Debug.locals.put("laCant", _lacant);Debug.locals.put("laCant", _lacant);
 BA.debugLineNum = 349;BA.debugLine="Dim esteTag As List = Regex.Split(\"\\|\", laCant.Ta";
Debug.ShouldStop(268435456);
_estetag = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_estetag = c_historico.__c.runMethod(false, "ArrayToList", (Object)(c_historico.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString("\\|")),(Object)(BA.ObjectToString(_lacant.runMethod(false,"getTag"))))));Debug.locals.put("esteTag", _estetag);Debug.locals.put("esteTag", _estetag);
 BA.debugLineNum = 350;BA.debugLine="Log(\"LC_TEXT:\"&laCant.Text&\"|PROMO:\"&esteTag.Get(";
Debug.ShouldStop(536870912);
c_historico.__c.runVoidMethod ("LogImpl","822151178",RemoteObject.concat(RemoteObject.createImmutable("LC_TEXT:"),_lacant.runMethod(true,"getText"),RemoteObject.createImmutable("|PROMO:"),_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3))),RemoteObject.createImmutable("|LC_TAG:"),_lacant.runMethod(false,"getTag"),RemoteObject.createImmutable("|ET:"),_estetag),0);
 BA.debugLineNum = 351;BA.debugLine="If esteTag.Get(3) <> \"1\" Then 'Si es PROMO entonc";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean("!",_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3))),RemoteObject.createImmutable(("1")))) { 
 BA.debugLineNum = 352;BA.debugLine="Log(\"ES PROMO\")";
Debug.ShouldStop(-2147483648);
c_historico.__c.runVoidMethod ("LogImpl","822151180",RemoteObject.createImmutable("ES PROMO"),0);
 BA.debugLineNum = 353;BA.debugLine="result =  Msgbox2(\"Si se modifica una promoción,";
Debug.ShouldStop(1);
__ref.setField ("_result" /*RemoteObject*/ ,BA.NumberToString(c_historico.__c.runMethodAndSync(true,"Msgbox2",(Object)(BA.ObjectToCharSequence("Si se modifica una promoción, la promoción se rompe y solo quedarán los productos sueltos, ¿seguro que desea continuar?")),(Object)(BA.ObjectToCharSequence("Modificar Promoción")),(Object)(BA.ObjectToString("Si")),(Object)(BA.ObjectToString("")),(Object)(BA.ObjectToString("No")),(Object)((c_historico.__c.runMethod(false,"LoadBitmap",(Object)(c_historico.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(RemoteObject.createImmutable("alert2.png"))).getObject())),__ref.getField(false, "ba"))));
 BA.debugLineNum = 354;BA.debugLine="If result = DialogResponse.POSITIVE Then 'Quitam";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_result" /*RemoteObject*/ ),BA.NumberToString(c_historico.__c.getField(false,"DialogResponse").getField(true,"POSITIVE")))) { 
 BA.debugLineNum = 355;BA.debugLine="prodsMap.Remove(esteTag.Get(3))";
Debug.ShouldStop(4);
__ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runVoidMethod ("Remove",(Object)(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3)))));
 BA.debugLineNum = 356;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
Debug.ShouldStop(8);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update HIST_VENTAS set HVD_RECHAZO = 1 WHERE HVD_PROID = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3))))),RemoteObject.createImmutable("' and HVD_cliente in (Select CUENTA from cuentaa)")))));
 BA.debugLineNum = 357;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
Debug.ShouldStop(16);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update HIST_VENTAS set HVD_CODPROMO = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),RemoteObject.createImmutable("' WHERE HVD_cliente in (Select CUENTA from cuentaa) AND HVD_CODPROMO = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 358;BA.debugLine="LogColor(prodsMap, Colors.red)";
Debug.ShouldStop(32);
c_historico.__c.runVoidMethod ("LogImpl","822151186",BA.ObjectToString(__ref.getField(false,"_prodsmap" /*RemoteObject*/ )),c_historico.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 359;BA.debugLine="reconstruirPedido = True";
Debug.ShouldStop(64);
__ref.setField ("_reconstruirpedido" /*RemoteObject*/ ,c_historico.__c.getField(true,"True"));
 BA.debugLineNum = 360;BA.debugLine="promoABorrar = esteTag.Get(3)";
Debug.ShouldStop(128);
__ref.setField ("_promoaborrar" /*RemoteObject*/ ,BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3)))));
 BA.debugLineNum = 361;BA.debugLine="B4XPage_Appear";
Debug.ShouldStop(256);
__ref.runClassMethod (reparto_izca.keymon.lat.c_historico.class, "_b4xpage_appear" /*RemoteObject*/ );
 };
 }else {
 BA.debugLineNum = 364;BA.debugLine="If laCant.Text = \"\" Then laCant.Text = 0";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",_lacant.runMethod(true,"getText"),BA.ObjectToString(""))) { 
_lacant.runMethod(true,"setText",BA.ObjectToCharSequence(0));};
 BA.debugLineNum = 365;BA.debugLine="laCant.Text = $\"$1.0{laCant.Text-1}\"$";
Debug.ShouldStop(4096);
_lacant.runMethod(true,"setText",BA.ObjectToCharSequence((RemoteObject.concat(RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.0")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _lacant.runMethod(true,"getText")),RemoteObject.createImmutable(1)}, "-",1, 0)))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 366;BA.debugLine="If laCant.Text < 0 Then laCant.Text = 0";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("<",BA.numberCast(double.class, _lacant.runMethod(true,"getText")),BA.numberCast(double.class, 0))) { 
_lacant.runMethod(true,"setText",BA.ObjectToCharSequence(0));};
 BA.debugLineNum = 367;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunaprod";
Debug.ShouldStop(16384);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + 1 where cat_gp_id = ?")),(Object)(c_historico.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2)))})))));
 };
 BA.debugLineNum = 369;BA.debugLine="Dim preciou As Float = esteTag.Get(0)/esteTag.Get";
Debug.ShouldStop(65536);
_preciou = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0)))),BA.numberCast(double.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1))))}, "/",0, 0));Debug.locals.put("preciou", _preciou);Debug.locals.put("preciou", _preciou);
 BA.debugLineNum = 370;BA.debugLine="Log(\"PU: \" & preciou)";
Debug.ShouldStop(131072);
c_historico.__c.runVoidMethod ("LogImpl","822151198",RemoteObject.concat(RemoteObject.createImmutable("PU: "),_preciou),0);
 BA.debugLineNum = 376;BA.debugLine="Subs.prodRechazo(esteTag.Get(5), esteTag.Get(2))";
Debug.ShouldStop(8388608);
c_historico._subs.runVoidMethod ("_prodrechazo" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 5))))),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))))));
 BA.debugLineNum = 377;BA.debugLine="Private cym As Map = Subs.traemosCantYMonto(clv_p";
Debug.ShouldStop(16777216);
_cym = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_cym = c_historico._subs.runMethod(false,"_traemoscantymonto" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_clv_pedido" /*RemoteObject*/ )));Debug.locals.put("cym", _cym);Debug.locals.put("cym", _cym);
 BA.debugLineNum = 378;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
Debug.ShouldStop(33554432);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(_cym.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cantidad"))))));
 BA.debugLineNum = 379;BA.debugLine="L_TOTAL.Text = Round2(cym.Get(\"monto\"), 2)";
Debug.ShouldStop(67108864);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, _cym.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("monto")))))),(Object)(BA.numberCast(int.class, 2)))));
 BA.debugLineNum = 381;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_regresar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_regresar_Click (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,185);
if (RapidSub.canDelegate("b_regresar_click")) { return __ref.runUserSub(false, "c_historico","b_regresar_click", __ref);}
 BA.debugLineNum = 185;BA.debugLine="Sub b_regresar_Click";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 186;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(33554432);
c_historico._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 187;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,59);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_historico","b4xpage_appear", __ref);}
int _i = 0;
RemoteObject _oc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _cant2 = RemoteObject.createImmutable(0);
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _bgcolor = RemoteObject.createImmutable(0);
RemoteObject _textcolor = RemoteObject.createImmutable(0);
RemoteObject _vc = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _cantco = RemoteObject.createImmutable(0);
RemoteObject _cco = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _cym = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
 BA.debugLineNum = 59;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 60;BA.debugLine="Subs.centraPanel(p_principal, Root.Width)";
Debug.ShouldStop(134217728);
c_historico._subs.runVoidMethod ("_centrapanel" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_p_principal" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 64;BA.debugLine="L_CANT.Text =\"\"";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 65;BA.debugLine="L_TOTAL.Text=\"\"";
Debug.ShouldStop(1);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 66;BA.debugLine="c=Starter.skmt.ExecQuery(\"select count(*) as EXIS";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as EXISTE from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 "))));
 BA.debugLineNum = 67;BA.debugLine="C.Position=0";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 68;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
Debug.ShouldStop(8);
__ref.setField ("_existe" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("EXISTE"))));
 BA.debugLineNum = 69;BA.debugLine="C.Close";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 71;BA.debugLine="c=Starter.skmt.ExecQuery(\"select hvd_num_registro";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select hvd_num_registro, HVD_CLIENTE, HVD_PRONOMBRE, HVD_PROID, HVD_CANT, HVD_COSTO_TOT, HVD_CODPROMO from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 and hvd_cant > 0 order by HVD_CODPROMO desc, HVD_PRONOMBRE asc"))));
 BA.debugLineNum = 72;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(128);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 73;BA.debugLine="clv_pedido.Clear";
Debug.ShouldStop(256);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runVoidMethod ("_clear");
 BA.debugLineNum = 74;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
Debug.ShouldStop(512);
c_historico._subs.runVoidMethod ("_setdivider" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(c_historico.__c.getField(false,"Colors").getField(true,"LightGray")),(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 75;BA.debugLine="clv_pedido.GetBase.SetLayoutAnimated(100, 0dip, 6";
Debug.ShouldStop(1024);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_getbase").runVoidMethod ("SetLayoutAnimated",(Object)(BA.numberCast(int.class, 100)),(Object)(c_historico.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 0)))),(Object)(c_historico.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60)))),(Object)(RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"),RemoteObject.createImmutable(50)}, "-",1, 1)),(Object)(BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getHeight"),RemoteObject.createImmutable(0.62)}, "*",0, 0))));
 BA.debugLineNum = 76;BA.debugLine="clv_pedido.Base_Resize(clv_pedido.GetBase.Width,";
Debug.ShouldStop(2048);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runVoidMethod ("_base_resize",(Object)(BA.numberCast(double.class, __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_getbase").runMethod(true,"getWidth"))),(Object)(BA.numberCast(double.class, __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_getbase").runMethod(true,"getHeight"))));
 BA.debugLineNum = 78;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 80;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(32768);
{
final int step15 = 1;
final int limit15 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step15 > 0 && _i <= limit15) || (step15 < 0 && _i >= limit15) ;_i = ((int)(0 + _i + step15))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 81;BA.debugLine="c.Position=i";
Debug.ShouldStop(65536);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 83;BA.debugLine="Private oc As Cursor = Starter.skmt.ExecQuery($";
Debug.ShouldStop(262144);
_oc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_oc = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select HVD_CANT from HIST_VENTAS2 WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) and hvd_proid = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PROID")))))),RemoteObject.createImmutable("' and HVD_NUM_REGISTRO = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_NUM_REGISTRO")))))),RemoteObject.createImmutable("'"))))));Debug.locals.put("oc", _oc);Debug.locals.put("oc", _oc);
 BA.debugLineNum = 84;BA.debugLine="Private cant2 As Int = 0";
Debug.ShouldStop(524288);
_cant2 = BA.numberCast(int.class, 0);Debug.locals.put("cant2", _cant2);Debug.locals.put("cant2", _cant2);
 BA.debugLineNum = 85;BA.debugLine="If oc.RowCount > 0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean(">",_oc.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 86;BA.debugLine="oc.Position = 0";
Debug.ShouldStop(2097152);
_oc.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 87;BA.debugLine="cant2 = oc.GetString(\"HVD_CANT\")";
Debug.ShouldStop(4194304);
_cant2 = BA.numberCast(int.class, _oc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT"))));Debug.locals.put("cant2", _cant2);
 };
 BA.debugLineNum = 89;BA.debugLine="oc.Close";
Debug.ShouldStop(16777216);
_oc.runVoidMethod ("Close");
 BA.debugLineNum = 90;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(33554432);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 91;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(67108864);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 92;BA.debugLine="label1.TextSize = 12";
Debug.ShouldStop(134217728);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 12));
 BA.debugLineNum = 93;BA.debugLine="label1.TextColor = Colors.black";
Debug.ShouldStop(268435456);
_label1.runMethod(true,"setTextColor",c_historico.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 94;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(536870912);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 95;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(1073741824);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 96;BA.debugLine="label2.TextSize = 12";
Debug.ShouldStop(-2147483648);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 12));
 BA.debugLineNum = 97;BA.debugLine="label2.TextColor = Colors.black";
Debug.ShouldStop(1);
_label2.runMethod(true,"setTextColor",c_historico.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 98;BA.debugLine="Private bgColor, textColor As Int";
Debug.ShouldStop(2);
_bgcolor = RemoteObject.createImmutable(0);Debug.locals.put("bgColor", _bgcolor);
_textcolor = RemoteObject.createImmutable(0);Debug.locals.put("textColor", _textcolor);
 BA.debugLineNum = 99;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
Debug.ShouldStop(4);
_bgcolor = c_historico.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 177)),(Object)(BA.numberCast(int.class, 200)),(Object)(BA.numberCast(int.class, 249)));Debug.locals.put("bgColor", _bgcolor);
 BA.debugLineNum = 100;BA.debugLine="textColor = Colors.black";
Debug.ShouldStop(8);
_textcolor = c_historico.__c.getField(false,"Colors").getField(true,"Black");Debug.locals.put("textColor", _textcolor);
 BA.debugLineNum = 101;BA.debugLine="If c.GetString(\"HVD_CODPROMO\") <> \"1\" Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("!",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CODPROMO"))),BA.ObjectToString("1"))) { 
 BA.debugLineNum = 103;BA.debugLine="bgColor = Colors.White";
Debug.ShouldStop(64);
_bgcolor = c_historico.__c.getField(false,"Colors").getField(true,"White");Debug.locals.put("bgColor", _bgcolor);
 };
 BA.debugLineNum = 107;BA.debugLine="clv_pedido.Add(CreateListItem(c.GetString(\"HVD_";
Debug.ShouldStop(1024);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runVoidMethod ("_add",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.runClassMethod (reparto_izca.keymon.lat.c_historico.class, "_createlistitem" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE")))),(Object)(c_historico._subs.runMethod(true,"_traeprecio" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PROID")))),(Object)(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CODPROMO")))))),(Object)(BA.numberCast(int.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT"))))),(Object)(BA.numberCast(int.class, 0)),(Object)(__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_asview").runMethod(true,"getWidth")),(Object)(c_historico.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 50)))),(Object)(__ref.getField(false,"_bmp" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PROID")))),(Object)(_bgcolor),(Object)(_textcolor),(Object)(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CODPROMO")))),(Object)(c_historico._subs.runMethod(true,"_traecliente" /*RemoteObject*/ ,__ref.getField(false, "ba")))).getObject()),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE"))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 112;BA.debugLine="Private vc As Cursor = Starter.skmt.ExecQuery(\"se";
Debug.ShouldStop(32768);
_vc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_vc = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select * from REPARTO where REP_CLIENTE in (select cuenta from cuentaa) and REP_RECHAZO = '0' and REP_CANT > 0 order by REP_PRONOMBRE"))));Debug.locals.put("vc", _vc);Debug.locals.put("vc", _vc);
 BA.debugLineNum = 113;BA.debugLine="Log($\"VENTA: ${vc.RowCount}\"$)";
Debug.ShouldStop(65536);
c_historico.__c.runVoidMethod ("LogImpl","821692470",(RemoteObject.concat(RemoteObject.createImmutable("VENTA: "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_vc.runMethod(true,"getRowCount")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 114;BA.debugLine="If vc.RowCount > 0 Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean(">",_vc.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 117;BA.debugLine="textColor = Colors.RGB(0,87,142)";
Debug.ShouldStop(1048576);
_textcolor = c_historico.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 87)),(Object)(BA.numberCast(int.class, 142)));Debug.locals.put("textColor", _textcolor);
 BA.debugLineNum = 118;BA.debugLine="For i=0 To vc.RowCount -1";
Debug.ShouldStop(2097152);
{
final int step45 = 1;
final int limit45 = RemoteObject.solve(new RemoteObject[] {_vc.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step45 > 0 && _i <= limit45) || (step45 < 0 && _i >= limit45) ;_i = ((int)(0 + _i + step45))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 119;BA.debugLine="vc.Position = i";
Debug.ShouldStop(4194304);
_vc.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 120;BA.debugLine="Private cantCO As Int = 0";
Debug.ShouldStop(8388608);
_cantco = BA.numberCast(int.class, 0);Debug.locals.put("cantCO", _cantco);Debug.locals.put("cantCO", _cantco);
 BA.debugLineNum = 122;BA.debugLine="Private cco As Cursor = Starter.skmt.ExecQuery(";
Debug.ShouldStop(33554432);
_cco = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_cco = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select * from REPARTO where REP_CLIENTE = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG")))))),RemoteObject.createImmutable("' and REP_CLI_ORIG = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG")))))),RemoteObject.createImmutable("' and REP_PRODID='"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_PRODID")))))),RemoteObject.createImmutable("' and REP_RECHAZO = '1' and REP_CANT > 0"))))));Debug.locals.put("cco", _cco);Debug.locals.put("cco", _cco);
 BA.debugLineNum = 124;BA.debugLine="If cco.RowCount > 0 Then";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean(">",_cco.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 125;BA.debugLine="cco.Position = 0";
Debug.ShouldStop(268435456);
_cco.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 126;BA.debugLine="cantCO = cco.GetString(\"REP_CANT\") + vc.GetStr";
Debug.ShouldStop(536870912);
_cantco = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cco.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CANT")))),BA.numberCast(double.class, _vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CANT"))))}, "+",1, 0));Debug.locals.put("cantCO", _cantco);
 };
 BA.debugLineNum = 128;BA.debugLine="cantCO = Subs.traeCantidadRechazada(vc.GetStrin";
Debug.ShouldStop(-2147483648);
_cantco = c_historico._subs.runMethod(true,"_traecantidadrechazada" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG")))),(Object)(_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_PRODID")))));Debug.locals.put("cantCO", _cantco);
 BA.debugLineNum = 131;BA.debugLine="clv_pedido.Add(CreateListItem(vc.GetString(\"REP";
Debug.ShouldStop(4);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runVoidMethod ("_add",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.runClassMethod (reparto_izca.keymon.lat.c_historico.class, "_createlistitem" /*RemoteObject*/ ,(Object)(_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_PRONOMBRE")))),(Object)(c_historico._subs.runMethod(true,"_traeprecio" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_PRODID")))),(Object)(c_historico._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),(Object)(BA.numberCast(int.class, _vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CANT"))))),(Object)(_cantco),(Object)(__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_asview").runMethod(true,"getWidth")),(Object)(c_historico.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 50)))),(Object)(__ref.getField(false,"_bmp" /*RemoteObject*/ )),(Object)(_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_PRODID")))),(Object)(_bgcolor),(Object)(_textcolor),(Object)(BA.NumberToString(1)),(Object)(_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_CLI_ORIG"))))).getObject()),(Object)((_vc.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("REP_PRONOMBRE"))))));
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 133;BA.debugLine="cco.Close";
Debug.ShouldStop(16);
_cco.runVoidMethod ("Close");
 BA.debugLineNum = 134;BA.debugLine="vc.Close";
Debug.ShouldStop(32);
_vc.runVoidMethod ("Close");
 };
 BA.debugLineNum = 137;BA.debugLine="If Existe <> 0 Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("!",__ref.getField(true,"_existe" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 138;BA.debugLine="c = Starter.skmt.ExecQuery(\"select SUM(HVD_CANT)";
Debug.ShouldStop(512);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select SUM(HVD_CANT) AS PC_NOART, SUM(HVD_COSTO_TOT) AS PC_MONTO from HIST_VENTAS where HVD_CLIENTE in (Select CUENTA from cuentaa) and HVD_RECHAZO = 0 "))));
 BA.debugLineNum = 139;BA.debugLine="C.Position=0";
Debug.ShouldStop(1024);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 140;BA.debugLine="L_CANT.Text = c.GetString(\"PC_NOART\")";
Debug.ShouldStop(2048);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_NOART")))));
 BA.debugLineNum = 141;BA.debugLine="L_TOTAL.Text = Round2(c.GetString(\"PC_MONTO\"), 2";
Debug.ShouldStop(4096);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PC_MONTO"))))),(Object)(BA.numberCast(int.class, 2)))));
 };
 BA.debugLineNum = 143;BA.debugLine="c=Starter.skmt.ExecQuery(\"select count(*) as EXIS";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as EXISTE from PEDIDO  WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 144;BA.debugLine="c.Position=0";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 145;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
Debug.ShouldStop(65536);
__ref.setField ("_existe" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("EXISTE"))));
 BA.debugLineNum = 146;BA.debugLine="c.Close";
Debug.ShouldStop(131072);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 149;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
Debug.ShouldStop(1048576);
c_historico._subs.runVoidMethod ("_setdivider" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(c_historico.__c.getField(false,"Colors").getField(true,"LightGray")),(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 167;BA.debugLine="If Existe <> 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("!",__ref.getField(true,"_existe" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 168;BA.debugLine="c=Starter.skmt.ExecQuery(\"select SUM(PE_CANT) AS";
Debug.ShouldStop(128);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select SUM(PE_CANT) AS PE_CANT, SUM(PE_COSTO_TOT) AS PE_COSTO_TOT FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 169;BA.debugLine="C.Position=0";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 170;BA.debugLine="L_CANT.Text = L_CANT.Text + c.GetString(\"PE_CANT";
Debug.ShouldStop(512);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT"))))}, "+",1, 0)));
 BA.debugLineNum = 171;BA.debugLine="L_TOTAL.Text = Round2(L_TOTAL.Text  + c.GetStrin";
Debug.ShouldStop(1024);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round2",(Object)(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_COSTO_TOT"))))}, "+",1, 0)),(Object)(BA.numberCast(int.class, 2)))));
 };
 BA.debugLineNum = 175;BA.debugLine="Private cym As Map = Subs.traemosCantYMonto(clv_p";
Debug.ShouldStop(16384);
_cym = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_cym = c_historico._subs.runMethod(false,"_traemoscantymonto" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_clv_pedido" /*RemoteObject*/ )));Debug.locals.put("cym", _cym);Debug.locals.put("cym", _cym);
 BA.debugLineNum = 176;BA.debugLine="L_CANT.Text = cym.Get(\"cantidad\")";
Debug.ShouldStop(32768);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(_cym.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cantidad"))))));
 BA.debugLineNum = 177;BA.debugLine="L_TOTAL.Text = Round2(cym.Get(\"monto\"), 2)";
Debug.ShouldStop(65536);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, _cym.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("monto")))))),(Object)(BA.numberCast(int.class, 2)))));
 BA.debugLineNum = 178;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_closerequest(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,189);
if (RapidSub.canDelegate("b4xpage_closerequest")) { return __ref.runUserSub(false, "c_historico","b4xpage_closerequest", __ref);}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(null,__ref);
rsub.remoteResumableSub = anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSubForFilter();
rsub.resume(null, null);
return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.Common.ResumableSubWrapper"), rsub.remoteResumableSub);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(reparto_izca.keymon.lat.c_historico parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_izca.keymon.lat.c_historico parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,189);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,RemoteObject.createImmutable(null));return;}
case 0:
//C
this.state = -1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 192;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(-2147483648);
parent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 BA.debugLineNum = 194;BA.debugLine="Return False";
Debug.ShouldStop(2);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.__c.getField(true,"False")));return;};
 BA.debugLineNum = 195;BA.debugLine="End Sub";
Debug.ShouldStop(4);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,48);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_historico","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 48;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(32768);
 BA.debugLineNum = 49;BA.debugLine="Root = Root1";
Debug.ShouldStop(65536);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 51;BA.debugLine="g.Initialize(\"GPS\")";
Debug.ShouldStop(262144);
__ref.getField(false,"_g" /*RemoteObject*/ ).runVoidMethod ("Initialize",(Object)(RemoteObject.createImmutable("GPS")));
 BA.debugLineNum = 52;BA.debugLine="Root.LoadLayout(\"historico\")";
Debug.ShouldStop(524288);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("historico")),__ref.getField(false, "ba"));
 BA.debugLineNum = 53;BA.debugLine="b_borra.Visible = False";
Debug.ShouldStop(1048576);
__ref.getField(false,"_b_borra" /*RemoteObject*/ ).runMethod(true,"setVisible",c_historico.__c.getField(true,"False"));
 BA.debugLineNum = 54;BA.debugLine="Titulo.Text = \"Pedido\"";
Debug.ShouldStop(2097152);
__ref.getField(false,"_titulo" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("Pedido"));
 BA.debugLineNum = 55;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
c_historico._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_historico._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_historico._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_historico._xui);
 //BA.debugLineNum = 4;BA.debugLine="Dim g As GPS";
c_historico._g = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");__ref.setField("_g",c_historico._g);
 //BA.debugLineNum = 5;BA.debugLine="Dim clie_id As String";
c_historico._clie_id = RemoteObject.createImmutable("");__ref.setField("_clie_id",c_historico._clie_id);
 //BA.debugLineNum = 6;BA.debugLine="Dim sDate,sTime As String";
c_historico._sdate = RemoteObject.createImmutable("");__ref.setField("_sdate",c_historico._sdate);
c_historico._stime = RemoteObject.createImmutable("");__ref.setField("_stime",c_historico._stime);
 //BA.debugLineNum = 7;BA.debugLine="Dim usuario As String";
c_historico._usuario = RemoteObject.createImmutable("");__ref.setField("_usuario",c_historico._usuario);
 //BA.debugLineNum = 8;BA.debugLine="Dim c As Cursor";
c_historico._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_historico._c);
 //BA.debugLineNum = 10;BA.debugLine="Dim b_regresar As Button";
c_historico._b_regresar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_regresar",c_historico._b_regresar);
 //BA.debugLineNum = 11;BA.debugLine="Dim ListView1 As ListView";
c_historico._listview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_listview1",c_historico._listview1);
 //BA.debugLineNum = 12;BA.debugLine="Dim L_CANT As Label";
c_historico._l_cant = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_cant",c_historico._l_cant);
 //BA.debugLineNum = 13;BA.debugLine="Dim L_TOTAL As Label";
c_historico._l_total = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_total",c_historico._l_total);
 //BA.debugLineNum = 14;BA.debugLine="Dim b_borra As Button";
c_historico._b_borra = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_borra",c_historico._b_borra);
 //BA.debugLineNum = 15;BA.debugLine="Dim Existe As String";
c_historico._existe = RemoteObject.createImmutable("");__ref.setField("_existe",c_historico._existe);
 //BA.debugLineNum = 16;BA.debugLine="Dim result As String";
c_historico._result = RemoteObject.createImmutable("");__ref.setField("_result",c_historico._result);
 //BA.debugLineNum = 18;BA.debugLine="Dim cuantos As String";
c_historico._cuantos = RemoteObject.createImmutable("");__ref.setField("_cuantos",c_historico._cuantos);
 //BA.debugLineNum = 19;BA.debugLine="Dim nombre_prod As String";
c_historico._nombre_prod = RemoteObject.createImmutable("");__ref.setField("_nombre_prod",c_historico._nombre_prod);
 //BA.debugLineNum = 20;BA.debugLine="Dim cuantos_pedido As String";
c_historico._cuantos_pedido = RemoteObject.createImmutable("");__ref.setField("_cuantos_pedido",c_historico._cuantos_pedido);
 //BA.debugLineNum = 21;BA.debugLine="Private Titulo As Label";
c_historico._titulo = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_titulo",c_historico._titulo);
 //BA.debugLineNum = 22;BA.debugLine="Private P1 As Panel";
c_historico._p1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p1",c_historico._p1);
 //BA.debugLineNum = 23;BA.debugLine="Private lv2 As ListView";
c_historico._lv2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_lv2",c_historico._lv2);
 //BA.debugLineNum = 24;BA.debugLine="Private p_principal As Panel";
c_historico._p_principal = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_principal",c_historico._p_principal);
 //BA.debugLineNum = 25;BA.debugLine="Dim clv_pedido As CustomListView";
c_historico._clv_pedido = RemoteObject.createNew ("b4a.example3.customlistview");__ref.setField("_clv_pedido",c_historico._clv_pedido);
 //BA.debugLineNum = 26;BA.debugLine="Private p_prods As Panel";
c_historico._p_prods = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_prods",c_historico._p_prods);
 //BA.debugLineNum = 27;BA.debugLine="Private l_prodX As Label";
c_historico._l_prodx = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_prodx",c_historico._l_prodx);
 //BA.debugLineNum = 28;BA.debugLine="Private l_pCant As Label";
c_historico._l_pcant = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_pcant",c_historico._l_pcant);
 //BA.debugLineNum = 29;BA.debugLine="Private et_pCant As EditText";
c_historico._et_pcant = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_et_pcant",c_historico._et_pcant);
 //BA.debugLineNum = 30;BA.debugLine="Dim bmp As Bitmap";
c_historico._bmp = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper");__ref.setField("_bmp",c_historico._bmp);
 //BA.debugLineNum = 31;BA.debugLine="Dim etCantHasFocus As Boolean = False";
c_historico._etcanthasfocus = c_historico.__c.getField(true,"False");__ref.setField("_etcanthasfocus",c_historico._etcanthasfocus);
 //BA.debugLineNum = 32;BA.debugLine="Dim totalProds As Int = 0";
c_historico._totalprods = BA.numberCast(int.class, 0);__ref.setField("_totalprods",c_historico._totalprods);
 //BA.debugLineNum = 33;BA.debugLine="Dim totalCompra As Int = 0";
c_historico._totalcompra = BA.numberCast(int.class, 0);__ref.setField("_totalcompra",c_historico._totalcompra);
 //BA.debugLineNum = 34;BA.debugLine="Dim prodsMap As Map";
c_historico._prodsmap = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");__ref.setField("_prodsmap",c_historico._prodsmap);
 //BA.debugLineNum = 35;BA.debugLine="Dim reconstruirPedido As Boolean = False";
c_historico._reconstruirpedido = c_historico.__c.getField(true,"False");__ref.setField("_reconstruirpedido",c_historico._reconstruirpedido);
 //BA.debugLineNum = 36;BA.debugLine="Dim promoABorrar As String";
c_historico._promoaborrar = RemoteObject.createImmutable("");__ref.setField("_promoaborrar",c_historico._promoaborrar);
 //BA.debugLineNum = 37;BA.debugLine="Private b_guardar As Button";
c_historico._b_guardar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_guardar",c_historico._b_guardar);
 //BA.debugLineNum = 38;BA.debugLine="Private b_prodMas As Button";
c_historico._b_prodmas = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_prodmas",c_historico._b_prodmas);
 //BA.debugLineNum = 39;BA.debugLine="Private b_prodMenos As Button";
c_historico._b_prodmenos = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_prodmenos",c_historico._b_prodmenos);
 //BA.debugLineNum = 40;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _createlistitem(RemoteObject __ref,RemoteObject _text,RemoteObject _preciou,RemoteObject _inv,RemoteObject _inv2,RemoteObject _width,RemoteObject _height,RemoteObject _img,RemoteObject _prodid,RemoteObject _bc,RemoteObject _tc,RemoteObject _promo,RemoteObject _cliente_original) throws Exception{
try {
		Debug.PushSubsStack("CreateListItem (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,310);
if (RapidSub.canDelegate("createlistitem")) { return __ref.runUserSub(false, "c_historico","createlistitem", __ref, _text, _preciou, _inv, _inv2, _width, _height, _img, _prodid, _bc, _tc, _promo, _cliente_original);}
RemoteObject _p = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _cs = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
Debug.locals.put("Text", _text);
Debug.locals.put("precioU", _preciou);
Debug.locals.put("inv", _inv);
Debug.locals.put("inv2", _inv2);
Debug.locals.put("Width", _width);
Debug.locals.put("Height", _height);
Debug.locals.put("img", _img);
Debug.locals.put("prodId", _prodid);
Debug.locals.put("bc", _bc);
Debug.locals.put("tc", _tc);
Debug.locals.put("promo", _promo);
Debug.locals.put("cliente_original", _cliente_original);
 BA.debugLineNum = 310;BA.debugLine="Sub CreateListItem(Text As String, precioU As Stri";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 311;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
Debug.ShouldStop(4194304);
_p = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_p = __ref.getField(false,"_xui" /*RemoteObject*/ ).runMethod(false,"CreatePanel",__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("")));Debug.locals.put("p", _p);Debug.locals.put("p", _p);
 BA.debugLineNum = 312;BA.debugLine="Private cs As CSBuilder";
Debug.ShouldStop(8388608);
_cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs", _cs);
 BA.debugLineNum = 313;BA.debugLine="cs.Initialize";
Debug.ShouldStop(16777216);
_cs.runVoidMethod ("Initialize");
 BA.debugLineNum = 314;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, Width, Height)";
Debug.ShouldStop(33554432);
_p.runVoidMethod ("SetLayoutAnimated",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(_width),(Object)(_height));
 BA.debugLineNum = 315;BA.debugLine="p.LoadLayout(\"prodItem\")";
Debug.ShouldStop(67108864);
_p.runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("prodItem")),__ref.getField(false, "ba"));
 BA.debugLineNum = 316;BA.debugLine="p_prods.Color = bc";
Debug.ShouldStop(134217728);
__ref.getField(false,"_p_prods" /*RemoteObject*/ ).runVoidMethod ("setColor",_bc);
 BA.debugLineNum = 317;BA.debugLine="l_prodX.TextColor = tc";
Debug.ShouldStop(268435456);
__ref.getField(false,"_l_prodx" /*RemoteObject*/ ).runMethod(true,"setTextColor",_tc);
 BA.debugLineNum = 318;BA.debugLine="precioU = $\"$1.2{precioU}\"$";
Debug.ShouldStop(536870912);
_preciou = (RemoteObject.concat(RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.2")),(Object)((_preciou))),RemoteObject.createImmutable("")));Debug.locals.put("precioU", _preciou);
 BA.debugLineNum = 319;BA.debugLine="l_prodX.Text = Text&CRLF&\"Cant: \" & inv2 & \"   $\"";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_l_prodx" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(RemoteObject.concat(_text,c_historico.__c.getField(true,"CRLF"),RemoteObject.createImmutable("Cant: "),_inv2,RemoteObject.createImmutable("   $"),_preciou)));
 BA.debugLineNum = 320;BA.debugLine="If promo <> \"1\" And precioU = 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("!",_promo,BA.ObjectToString("1")) && RemoteObject.solveBoolean("=",_preciou,BA.NumberToString(0))) { 
 BA.debugLineNum = 321;BA.debugLine="l_prodX.Text = cs.Color(Colors.RGB(123,0,0)).app";
Debug.ShouldStop(1);
__ref.getField(false,"_l_prodx" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(_cs.runMethod(false,"Color",(Object)(c_historico.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 123)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(_text,c_historico.__c.getField(true,"CRLF"),RemoteObject.createImmutable("Cant: "),_inv2,RemoteObject.createImmutable("   $"),_preciou)))).runMethod(false,"PopAll").getObject()));
 };
 BA.debugLineNum = 323;BA.debugLine="l_prodX.Tag = $\"ID: ${prodId}${CRLF}${Text}${CRLF";
Debug.ShouldStop(4);
__ref.getField(false,"_l_prodx" /*RemoteObject*/ ).runMethod(false,"setTag",((RemoteObject.concat(RemoteObject.createImmutable("ID: "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_prodid))),RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico.__c.getField(true,"CRLF")))),RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_text))),RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Precio: $"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.2")),(Object)((_preciou))),RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Inv: "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_inv))),RemoteObject.createImmutable(" pzs")))));
 BA.debugLineNum = 325;BA.debugLine="l_pCant.Tag = Round2(precioU,2)&\"|\"&inv&\"|\"&prodI";
Debug.ShouldStop(16);
__ref.getField(false,"_l_pcant" /*RemoteObject*/ ).runMethod(false,"setTag",(RemoteObject.concat(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, _preciou)),(Object)(BA.numberCast(int.class, 2))),RemoteObject.createImmutable("|"),_inv,RemoteObject.createImmutable("|"),_prodid,RemoteObject.createImmutable("|"),_promo,RemoteObject.createImmutable("|"),_inv2,RemoteObject.createImmutable("|"),_cliente_original)));
 BA.debugLineNum = 326;BA.debugLine="et_pCant.Tag = Round2(precioU,2)&\"|\"&inv&\"|\"&prod";
Debug.ShouldStop(32);
__ref.getField(false,"_et_pcant" /*RemoteObject*/ ).runMethod(false,"setTag",(RemoteObject.concat(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, _preciou)),(Object)(BA.numberCast(int.class, 2))),RemoteObject.createImmutable("|"),_inv,RemoteObject.createImmutable("|"),_prodid,RemoteObject.createImmutable("|"),_promo,RemoteObject.createImmutable("|"),_inv2,RemoteObject.createImmutable("|"),_cliente_original)));
 BA.debugLineNum = 327;BA.debugLine="p_prods.Tag = l_pCant.tag";
Debug.ShouldStop(64);
__ref.getField(false,"_p_prods" /*RemoteObject*/ ).runMethod(false,"setTag",__ref.getField(false,"_l_pcant" /*RemoteObject*/ ).runMethod(false,"getTag"));
 BA.debugLineNum = 329;BA.debugLine="l_pCant.Text = inv";
Debug.ShouldStop(256);
__ref.getField(false,"_l_pcant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(_inv));
 BA.debugLineNum = 333;BA.debugLine="l_pCant.BringToFront";
Debug.ShouldStop(4096);
__ref.getField(false,"_l_pcant" /*RemoteObject*/ ).runVoidMethod ("BringToFront");
 BA.debugLineNum = 334;BA.debugLine="et_pCant.SendToBack";
Debug.ShouldStop(8192);
__ref.getField(false,"_et_pcant" /*RemoteObject*/ ).runVoidMethod ("SendToBack");
 BA.debugLineNum = 337;BA.debugLine="Return p";
Debug.ShouldStop(65536);
if (true) return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.PanelWrapper"), _p.getObject());
 BA.debugLineNum = 338;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _cuentaprods(RemoteObject __ref,RemoteObject _accion) throws Exception{
try {
		Debug.PushSubsStack("cuentaProds (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,428);
if (RapidSub.canDelegate("cuentaprods")) { return __ref.runUserSub(false, "c_historico","cuentaprods", __ref, _accion);}
RemoteObject _cantrechazada = RemoteObject.createImmutable(0);
int _i = 0;
RemoteObject _p0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _p = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _cant1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper");
RemoteObject _estetag = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _esteprod = RemoteObject.createImmutable("");
RemoteObject _estacant = RemoteObject.createImmutable(0);
RemoteObject _estacantoriginal = RemoteObject.createImmutable(0);
RemoteObject _estecliente = RemoteObject.createImmutable("");
RemoteObject _esteprodnombre = RemoteObject.createImmutable("");
RemoteObject _esteclienteoriginal = RemoteObject.createImmutable(0);
RemoteObject _fechareparto = RemoteObject.createImmutable("");
RemoteObject _maxprods = RemoteObject.createImmutable("");
RemoteObject _esteprecio = RemoteObject.createImmutable("");
RemoteObject _rr = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _bgcolor = RemoteObject.createImmutable(0);
RemoteObject _textcolor = RemoteObject.createImmutable(0);
RemoteObject _newpromo = RemoteObject.createImmutable("");
RemoteObject _newprecio = RemoteObject.createImmutable("");
RemoteObject _pr = RemoteObject.createImmutable("");
RemoteObject _pr1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _cantidad1 = RemoteObject.createImmutable("");
RemoteObject _totalfinal = RemoteObject.createImmutable("");
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _cantidady = RemoteObject.createImmutable("");
RemoteObject _preciou = RemoteObject.createImmutable("");
RemoteObject _costototalhist = RemoteObject.createImmutable("");
RemoteObject _z = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _cantidad2 = RemoteObject.createImmutable("");
Debug.locals.put("accion", _accion);
 BA.debugLineNum = 428;BA.debugLine="Sub cuentaProds(accion As String)";
Debug.ShouldStop(2048);
 BA.debugLineNum = 430;BA.debugLine="Log(\"*********************************************";
Debug.ShouldStop(8192);
c_historico.__c.runVoidMethod ("LogImpl","822282242",RemoteObject.createImmutable("*******************************************************"),0);
 BA.debugLineNum = 431;BA.debugLine="Private cantRechazada As Int = 0";
Debug.ShouldStop(16384);
_cantrechazada = BA.numberCast(int.class, 0);Debug.locals.put("cantRechazada", _cantrechazada);Debug.locals.put("cantRechazada", _cantrechazada);
 BA.debugLineNum = 432;BA.debugLine="If Not(reconstruirPedido) Then";
Debug.ShouldStop(32768);
if (c_historico.__c.runMethod(true,"Not",(Object)(__ref.getField(true,"_reconstruirpedido" /*RemoteObject*/ ))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 433;BA.debugLine="Log(\"***********  CUENTAPRODS - NO RECONSTRUIR\")";
Debug.ShouldStop(65536);
c_historico.__c.runVoidMethod ("LogImpl","822282245",RemoteObject.createImmutable("***********  CUENTAPRODS - NO RECONSTRUIR"),0);
 BA.debugLineNum = 434;BA.debugLine="prodsMap.Initialize";
Debug.ShouldStop(131072);
__ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 435;BA.debugLine="For i = 0 To clv_pedido.GetSize - 1";
Debug.ShouldStop(262144);
{
final int step6 = 1;
final int limit6 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(true,"_getsize"),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 = 436;BA.debugLine="Private p0 As B4XView = clv_pedido.GetPanel(i)";
Debug.ShouldStop(524288);
_p0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_p0 = __ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_getpanel",(Object)(BA.numberCast(int.class, _i)));Debug.locals.put("p0", _p0);Debug.locals.put("p0", _p0);
 BA.debugLineNum = 437;BA.debugLine="Private p As B4XView = p0.GetView(0)";
Debug.ShouldStop(1048576);
_p = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_p = _p0.runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 0)));Debug.locals.put("p", _p);Debug.locals.put("p", _p);
 BA.debugLineNum = 438;BA.debugLine="Private cant1 As B4XView = p.GetView(2).GetView";
Debug.ShouldStop(2097152);
_cant1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
_cant1 = _p.runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 2))).runMethod(false,"GetView",(Object)(BA.numberCast(int.class, 3)));Debug.locals.put("cant1", _cant1);Debug.locals.put("cant1", _cant1);
 BA.debugLineNum = 439;BA.debugLine="If cant1.Text = \"\" Then cant1.Text = 0";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("=",_cant1.runMethod(true,"getText"),BA.ObjectToString(""))) { 
_cant1.runMethod(true,"setText",BA.ObjectToCharSequence(0));};
 BA.debugLineNum = 441;BA.debugLine="Private esteTag As List = Regex.Split(\"\\|\", can";
Debug.ShouldStop(16777216);
_estetag = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_estetag = c_historico.__c.runMethod(false, "ArrayToList", (Object)(c_historico.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString("\\|")),(Object)(BA.ObjectToString(_cant1.runMethod(false,"getTag"))))));Debug.locals.put("esteTag", _estetag);Debug.locals.put("esteTag", _estetag);
 BA.debugLineNum = 442;BA.debugLine="Log(\"-------------------------------------\")";
Debug.ShouldStop(33554432);
c_historico.__c.runVoidMethod ("LogImpl","822282254",RemoteObject.createImmutable("-------------------------------------"),0);
 BA.debugLineNum = 443;BA.debugLine="Log($\"ET: ${esteTag}\"$)";
Debug.ShouldStop(67108864);
c_historico.__c.runVoidMethod ("LogImpl","822282255",(RemoteObject.concat(RemoteObject.createImmutable("ET: "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_estetag.getObject()))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 444;BA.debugLine="Private esteProd As String = esteTag.Get(2)";
Debug.ShouldStop(134217728);
_esteprod = BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))));Debug.locals.put("esteProd", _esteprod);Debug.locals.put("esteProd", _esteprod);
 BA.debugLineNum = 445;BA.debugLine="Private estaCant As Int = cant1.Text";
Debug.ShouldStop(268435456);
_estacant = BA.numberCast(int.class, _cant1.runMethod(true,"getText"));Debug.locals.put("estaCant", _estacant);Debug.locals.put("estaCant", _estacant);
 BA.debugLineNum = 446;BA.debugLine="Private estaCantOriginal As Int = esteTag.Get(1";
Debug.ShouldStop(536870912);
_estacantoriginal = BA.numberCast(int.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1))));Debug.locals.put("estaCantOriginal", _estacantoriginal);Debug.locals.put("estaCantOriginal", _estacantoriginal);
 BA.debugLineNum = 447;BA.debugLine="Private esteCliente = Subs.traeCliente";
Debug.ShouldStop(1073741824);
_estecliente = c_historico._subs.runMethod(true,"_traecliente" /*RemoteObject*/ ,__ref.getField(false, "ba"));Debug.locals.put("esteCliente", _estecliente);Debug.locals.put("esteCliente", _estecliente);
 BA.debugLineNum = 448;BA.debugLine="Private esteProdNombre = Subs.traeNombre(estePr";
Debug.ShouldStop(-2147483648);
_esteprodnombre = c_historico._subs.runMethod(true,"_traenombre" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(_esteprod));Debug.locals.put("esteProdNombre", _esteprodnombre);Debug.locals.put("esteProdNombre", _esteprodnombre);
 BA.debugLineNum = 449;BA.debugLine="Private esteClienteOriginal As Int = esteTag.Ge";
Debug.ShouldStop(1);
_esteclienteoriginal = BA.numberCast(int.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 5))));Debug.locals.put("esteClienteOriginal", _esteclienteoriginal);Debug.locals.put("esteClienteOriginal", _esteclienteoriginal);
 BA.debugLineNum = 450;BA.debugLine="Private fechaReparto As String = Subs.traeFecha";
Debug.ShouldStop(2);
_fechareparto = c_historico._subs.runMethod(true,"_traefechareparto" /*RemoteObject*/ ,__ref.getField(false, "ba"));Debug.locals.put("fechaReparto", _fechareparto);Debug.locals.put("fechaReparto", _fechareparto);
 BA.debugLineNum = 451;BA.debugLine="Private maxProds = Subs.traeMaxCantidad(esteTag";
Debug.ShouldStop(4);
_maxprods = BA.NumberToString(c_historico._subs.runMethod(true,"_traemaxcantidad" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 5))))),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2)))))));Debug.locals.put("maxProds", _maxprods);Debug.locals.put("maxProds", _maxprods);
 BA.debugLineNum = 453;BA.debugLine="If cant1.Text > maxProds Then cant1.Text = maxP";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _cant1.runMethod(true,"getText")),BA.numberCast(double.class, _maxprods))) { 
_cant1.runMethod(true,"setText",BA.ObjectToCharSequence(_maxprods));};
 BA.debugLineNum = 455;BA.debugLine="cantRechazada = esteTag.Get(4) - cant1.Text";
Debug.ShouldStop(64);
_cantrechazada = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 4)))),BA.numberCast(double.class, _cant1.runMethod(true,"getText"))}, "-",1, 0));Debug.locals.put("cantRechazada", _cantrechazada);
 BA.debugLineNum = 458;BA.debugLine="Log($\"${Subs.traeCantidadRechazada(esteClienteO";
Debug.ShouldStop(512);
c_historico.__c.runVoidMethod ("LogImpl","822282270",(RemoteObject.concat(RemoteObject.createImmutable(""),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico._subs.runMethod(true,"_traecantidadrechazada" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.NumberToString(_esteclienteoriginal)),(Object)(_esteprod))))),RemoteObject.createImmutable(", "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico._subs.runMethod(true,"_traecantidadvendida" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.NumberToString(_esteclienteoriginal)),(Object)(_esteprod))))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 461;BA.debugLine="LogColor($\"cantRechazada = ${cantRechazada}\"$,";
Debug.ShouldStop(4096);
c_historico.__c.runVoidMethod ("LogImpl","822282273",(RemoteObject.concat(RemoteObject.createImmutable("cantRechazada = "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cantrechazada))),RemoteObject.createImmutable(""))),c_historico.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 462;BA.debugLine="Private estePrecio As String = 0";
Debug.ShouldStop(8192);
_esteprecio = BA.NumberToString(0);Debug.locals.put("estePrecio", _esteprecio);Debug.locals.put("estePrecio", _esteprecio);
 BA.debugLineNum = 463;BA.debugLine="If Subs.traePrecio(esteProd, 1) <> Null Then es";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("N",c_historico._subs.runMethod(true,"_traeprecio" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(_esteprod),(Object)(BA.NumberToString(1))))) { 
_esteprecio = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, c_historico._subs.runMethod(true,"_traeprecio" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(_esteprod),(Object)(c_historico._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),_cantrechazada}, "*",0, 0));Debug.locals.put("estePrecio", _esteprecio);};
 BA.debugLineNum = 468;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update HIST_VENTAS";
Debug.ShouldStop(524288);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update HIST_VENTAS set HVD_PARCIAL = 1, HVD_CANT = ? WHERE HVD_PROID = ? and HVD_CLIENTE in (Select CUENTA from cuentaa)")),(Object)(c_historico.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {_cant1.runMethod(true,"getText"),_esteprod})))));
 BA.debugLineNum = 469;BA.debugLine="Private rr As Cursor = Starter.skmt.ExecQuery($";
Debug.ShouldStop(1048576);
_rr = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_rr = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select count(REP_CLIENTE) as hayRechazo from REPARTO where rep_prodid = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_esteprod))),RemoteObject.createImmutable("' and REP_CLIENTE in (Select CUENTA from cuentaa)"))))));Debug.locals.put("rr", _rr);Debug.locals.put("rr", _rr);
 BA.debugLineNum = 470;BA.debugLine="rr.Position = 0";
Debug.ShouldStop(2097152);
_rr.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 472;BA.debugLine="If rr.GetString(\"hayRechazo\") = 0 Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",_rr.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("hayRechazo"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 473;BA.debugLine="Log(\"INSERTAMOS EN REPARTO\")";
Debug.ShouldStop(16777216);
c_historico.__c.runVoidMethod ("LogImpl","822282285",RemoteObject.createImmutable("INSERTAMOS EN REPARTO"),0);
 BA.debugLineNum = 474;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repart";
Debug.ShouldStop(33554432);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_CLI_ORIG)  VALUES (?,?,?,?,?,1,?,?,?) ")),(Object)(c_historico.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {8},new Object[] {_estecliente,_esteprodnombre,BA.NumberToString(0),_esteprecio,_fechareparto,_esteprod,_esteprecio,_estecliente})))));
 BA.debugLineNum = 475;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repart";
Debug.ShouldStop(67108864);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_CLI_ORIG)  VALUES (?,?,?,?,?,0,?,?,?) ")),(Object)(c_historico.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {8},new Object[] {_estecliente,_esteprodnombre,BA.NumberToString(_cantrechazada),BA.NumberToString(0),_fechareparto,_esteprod,_esteprecio,_estecliente})))));
 }else 
{ BA.debugLineNum = 476;BA.debugLine="Else if esteClienteOriginal = \"0\" Then 'Actuali";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean("=",_esteclienteoriginal,BA.numberCast(double.class, "0"))) { 
 }else {
 BA.debugLineNum = 480;BA.debugLine="Log($\"Actualizamos REP_CANT RECHAZO = ${cantRe";
Debug.ShouldStop(-2147483648);
c_historico.__c.runVoidMethod ("LogImpl","822282292",(RemoteObject.concat(RemoteObject.createImmutable("Actualizamos REP_CANT RECHAZO = "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_cantrechazada))),RemoteObject.createImmutable(""))),0);
 }}
;
 BA.debugLineNum = 485;BA.debugLine="If cant1.Text > 0 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, _cant1.runMethod(true,"getText")),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 488;BA.debugLine="Private m As Map";
Debug.ShouldStop(128);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m", _m);
 BA.debugLineNum = 489;BA.debugLine="m=CreateMap(\"cant\":cant1.Text, \"cant2\":esteTag";
Debug.ShouldStop(256);
_m = c_historico.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("cant")),(_cant1.runMethod(true,"getText")),RemoteObject.createImmutable(("cant2")),_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 4))),RemoteObject.createImmutable(("precio")),_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(("promo")),_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 3))),RemoteObject.createImmutable(("nombre")),(c_historico._subs.runMethod(true,"_traenombre" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))))))),RemoteObject.createImmutable(("cli_orig")),_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 5)))}));Debug.locals.put("m", _m);
 BA.debugLineNum = 491;BA.debugLine="prodsMap.Put(esteTag.Get(2), m)";
Debug.ShouldStop(1024);
__ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runVoidMethod ("Put",(Object)(_estetag.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2)))),(Object)((_m.getObject())));
 };
 BA.debugLineNum = 493;BA.debugLine="Log(\"-------------------------------------\")";
Debug.ShouldStop(4096);
c_historico.__c.runVoidMethod ("LogImpl","822282305",RemoteObject.createImmutable("-------------------------------------"),0);
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 496;BA.debugLine="Private bgColor, textColor As Int";
Debug.ShouldStop(32768);
_bgcolor = RemoteObject.createImmutable(0);Debug.locals.put("bgColor", _bgcolor);
_textcolor = RemoteObject.createImmutable(0);Debug.locals.put("textColor", _textcolor);
 BA.debugLineNum = 498;BA.debugLine="If reconstruirPedido Then";
Debug.ShouldStop(131072);
if (__ref.getField(true,"_reconstruirpedido" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 499;BA.debugLine="Log(\"***********  CUENTAPRODS - SI RECONSTRUIR\")";
Debug.ShouldStop(262144);
c_historico.__c.runVoidMethod ("LogImpl","822282311",RemoteObject.createImmutable("***********  CUENTAPRODS - SI RECONSTRUIR"),0);
 BA.debugLineNum = 500;BA.debugLine="Private newPromo, newPrecio As String";
Debug.ShouldStop(524288);
_newpromo = RemoteObject.createImmutable("");Debug.locals.put("newPromo", _newpromo);
_newprecio = RemoteObject.createImmutable("");Debug.locals.put("newPrecio", _newprecio);
 BA.debugLineNum = 501;BA.debugLine="clv_pedido.Clear";
Debug.ShouldStop(1048576);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runVoidMethod ("_clear");
 BA.debugLineNum = 502;BA.debugLine="Log(\"Usamos PRODSMAP\")";
Debug.ShouldStop(2097152);
c_historico.__c.runVoidMethod ("LogImpl","822282314",RemoteObject.createImmutable("Usamos PRODSMAP"),0);
 BA.debugLineNum = 503;BA.debugLine="For Each pr As String In prodsMap.Keys";
Debug.ShouldStop(4194304);
{
final RemoteObject group53 = __ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runMethod(false,"Keys");
final int groupLen53 = group53.runMethod(true,"getSize").<Integer>get()
;int index53 = 0;
;
for (; index53 < groupLen53;index53++){
_pr = BA.ObjectToString(group53.runMethod(false,"Get",index53));Debug.locals.put("pr", _pr);
Debug.locals.put("pr", _pr);
 BA.debugLineNum = 504;BA.debugLine="Private pr1 As Map = prodsMap.Get(pr)";
Debug.ShouldStop(8388608);
_pr1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_pr1 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((_pr))));Debug.locals.put("pr1", _pr1);Debug.locals.put("pr1", _pr1);
 BA.debugLineNum = 505;BA.debugLine="Log(\"PPP: \" & pr & \"|PromoABorrar=\" & promoABor";
Debug.ShouldStop(16777216);
c_historico.__c.runVoidMethod ("LogImpl","822282317",RemoteObject.concat(RemoteObject.createImmutable("PPP: "),_pr,RemoteObject.createImmutable("|PromoABorrar="),__ref.getField(true,"_promoaborrar" /*RemoteObject*/ ),RemoteObject.createImmutable("|"),_pr1),0);
 BA.debugLineNum = 506;BA.debugLine="bgColor = Colors.RGB(177, 200, 249)'azul";
Debug.ShouldStop(33554432);
_bgcolor = c_historico.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 177)),(Object)(BA.numberCast(int.class, 200)),(Object)(BA.numberCast(int.class, 249)));Debug.locals.put("bgColor", _bgcolor);
 BA.debugLineNum = 507;BA.debugLine="textColor = Colors.black";
Debug.ShouldStop(67108864);
_textcolor = c_historico.__c.getField(false,"Colors").getField(true,"Black");Debug.locals.put("textColor", _textcolor);
 BA.debugLineNum = 508;BA.debugLine="newPromo = pr1.Get(\"promo\")";
Debug.ShouldStop(134217728);
_newpromo = BA.ObjectToString(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("promo")))));Debug.locals.put("newPromo", _newpromo);
 BA.debugLineNum = 509;BA.debugLine="newPrecio = pr1.Get(\"precio\")";
Debug.ShouldStop(268435456);
_newprecio = BA.ObjectToString(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("precio")))));Debug.locals.put("newPrecio", _newprecio);
 BA.debugLineNum = 510;BA.debugLine="Log(\"AAA: \" & newPromo & \"|\" & promoABorrar)";
Debug.ShouldStop(536870912);
c_historico.__c.runVoidMethod ("LogImpl","822282322",RemoteObject.concat(RemoteObject.createImmutable("AAA: "),_newpromo,RemoteObject.createImmutable("|"),__ref.getField(true,"_promoaborrar" /*RemoteObject*/ )),0);
 BA.debugLineNum = 511;BA.debugLine="If newPromo = promoABorrar Then";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean("=",_newpromo,__ref.getField(true,"_promoaborrar" /*RemoteObject*/ ))) { 
 BA.debugLineNum = 512;BA.debugLine="newPromo = 1";
Debug.ShouldStop(-2147483648);
_newpromo = BA.NumberToString(1);Debug.locals.put("newPromo", _newpromo);
 BA.debugLineNum = 513;BA.debugLine="newPrecio = Subs.traePrecio(pr, False) * pr1.G";
Debug.ShouldStop(1);
_newprecio = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, c_historico._subs.runMethod(true,"_traeprecio" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(_pr),(Object)(BA.ObjectToString(c_historico.__c.getField(true,"False"))))),BA.numberCast(double.class, _pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant")))))}, "*",0, 0));Debug.locals.put("newPrecio", _newprecio);
 BA.debugLineNum = 515;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
Debug.ShouldStop(4);
c_historico._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update HIST_VENTAS set HVD_COSTO_TOT = "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_newprecio))),RemoteObject.createImmutable(", HVD_CODPROMO = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((c_historico._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),RemoteObject.createImmutable("' WHERE HVD_PRONOMBRE = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nombre")))))),RemoteObject.createImmutable("' and HVD_cliente in (Select CUENTA from cuentaa)")))));
 BA.debugLineNum = 516;BA.debugLine="LogColor(\"CAMBIAMOS PROMO: \" & newPromo, Color";
Debug.ShouldStop(8);
c_historico.__c.runVoidMethod ("LogImpl","822282328",RemoteObject.concat(RemoteObject.createImmutable("CAMBIAMOS PROMO: "),_newpromo),c_historico.__c.getField(false,"Colors").getField(true,"Magenta"));
 };
 BA.debugLineNum = 518;BA.debugLine="If newPromo <> \"1\" Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean("!",_newpromo,BA.ObjectToString("1"))) { 
 BA.debugLineNum = 520;BA.debugLine="bgColor = Colors.White";
Debug.ShouldStop(128);
_bgcolor = c_historico.__c.getField(false,"Colors").getField(true,"White");Debug.locals.put("bgColor", _bgcolor);
 };
 BA.debugLineNum = 522;BA.debugLine="Log($\"CLI: ${pr1.Get(\"nombre\")}, ${newPrecio},";
Debug.ShouldStop(512);
c_historico.__c.runVoidMethod ("LogImpl","822282334",(RemoteObject.concat(RemoteObject.createImmutable("CLI: "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nombre")))))),RemoteObject.createImmutable(", "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_newprecio))),RemoteObject.createImmutable(", "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant")))))),RemoteObject.createImmutable(", "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant2")))))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 523;BA.debugLine="clv_pedido.Add(CreateListItem(pr1.Get(\"nombre\")";
Debug.ShouldStop(1024);
__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runVoidMethod ("_add",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.runClassMethod (reparto_izca.keymon.lat.c_historico.class, "_createlistitem" /*RemoteObject*/ ,(Object)(BA.ObjectToString(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nombre")))))),(Object)(_newprecio),(Object)(BA.numberCast(int.class, _pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant")))))),(Object)(BA.numberCast(int.class, _pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cant2")))))),(Object)(__ref.getField(false,"_clv_pedido" /*RemoteObject*/ ).runMethod(false,"_asview").runMethod(true,"getWidth")),(Object)(c_historico.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 50)))),(Object)(__ref.getField(false,"_bmp" /*RemoteObject*/ )),(Object)(_pr),(Object)(_bgcolor),(Object)(_textcolor),(Object)(_newpromo),(Object)(BA.ObjectToString(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("cli_orig"))))))).getObject()),(Object)(_pr1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nombre"))))));
 BA.debugLineNum = 524;BA.debugLine="reconstruirPedido = False";
Debug.ShouldStop(2048);
__ref.setField ("_reconstruirpedido" /*RemoteObject*/ ,c_historico.__c.getField(true,"False"));
 }
}Debug.locals.put("pr", _pr);
;
 BA.debugLineNum = 526;BA.debugLine="promoABorrar = \"\"";
Debug.ShouldStop(8192);
__ref.setField ("_promoaborrar" /*RemoteObject*/ ,BA.ObjectToString(""));
 };
 BA.debugLineNum = 528;BA.debugLine="Log($\"Total Prods: ${totalProds}, Total Compra: $";
Debug.ShouldStop(32768);
c_historico.__c.runVoidMethod ("LogImpl","822282340",(RemoteObject.concat(RemoteObject.createImmutable("Total Prods: "),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(true,"_totalprods" /*RemoteObject*/ )))),RemoteObject.createImmutable(", Total Compra: $"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.2")),(Object)((__ref.getField(true,"_totalcompra" /*RemoteObject*/ )))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 529;BA.debugLine="LogColor(\"prodsMap=\" & prodsMap, Colors.Green)";
Debug.ShouldStop(65536);
c_historico.__c.runVoidMethod ("LogImpl","822282341",RemoteObject.concat(RemoteObject.createImmutable("prodsMap="),__ref.getField(false,"_prodsmap" /*RemoteObject*/ )),c_historico.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 532;BA.debugLine="LogColor(prodsMap, Colors.Blue)";
Debug.ShouldStop(524288);
c_historico.__c.runVoidMethod ("LogImpl","822282344",BA.ObjectToString(__ref.getField(false,"_prodsmap" /*RemoteObject*/ )),c_historico.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 533;BA.debugLine="c = Starter.skmt.ExecQuery($\"SELECT sum(HVD_CANT)";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.createImmutable("SELECT sum(HVD_CANT) as CANTIDAD FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")))));
 BA.debugLineNum = 534;BA.debugLine="Dim cantidad1 As String = 0";
Debug.ShouldStop(2097152);
_cantidad1 = BA.NumberToString(0);Debug.locals.put("cantidad1", _cantidad1);Debug.locals.put("cantidad1", _cantidad1);
 BA.debugLineNum = 535;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 536;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 537;BA.debugLine="cantidad1 = c.GetString(\"CANTIDAD\")";
Debug.ShouldStop(16777216);
_cantidad1 = __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANTIDAD")));Debug.locals.put("cantidad1", _cantidad1);
 BA.debugLineNum = 538;BA.debugLine="L_CANT.Text = Round(cantidad1)";
Debug.ShouldStop(33554432);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round",(Object)(BA.numberCast(double.class, _cantidad1)))));
 };
 BA.debugLineNum = 540;BA.debugLine="c.Close";
Debug.ShouldStop(134217728);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 542;BA.debugLine="Dim totalfinal As String = 0";
Debug.ShouldStop(536870912);
_totalfinal = BA.NumberToString(0);Debug.locals.put("totalfinal", _totalfinal);Debug.locals.put("totalfinal", _totalfinal);
 BA.debugLineNum = 543;BA.debugLine="For Each pr As String In prodsMap.Keys";
Debug.ShouldStop(1073741824);
{
final RemoteObject group88 = __ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runMethod(false,"Keys");
final int groupLen88 = group88.runMethod(true,"getSize").<Integer>get()
;int index88 = 0;
;
for (; index88 < groupLen88;index88++){
_pr = BA.ObjectToString(group88.runMethod(false,"Get",index88));Debug.locals.put("pr", _pr);
Debug.locals.put("pr", _pr);
 BA.debugLineNum = 544;BA.debugLine="Private pr1 As Map = prodsMap.Get(pr)";
Debug.ShouldStop(-2147483648);
_pr1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_pr1 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_prodsmap" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((_pr))));Debug.locals.put("pr1", _pr1);Debug.locals.put("pr1", _pr1);
 BA.debugLineNum = 546;BA.debugLine="Dim x As Cursor = Starter.skmt.ExecQuery($\"SELEC";
Debug.ShouldStop(2);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_x = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("SELECT CAT_GP_PRECIO FROM CAT_GUNAPROD WHERE CAT_GP_ID = '"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pr))),RemoteObject.createImmutable("'"))))));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 547;BA.debugLine="c = Starter.skmt.ExecQuery($\"SELECT HVD_CANT FRO";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("SELECT HVD_CANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND HVD_PROID ='"),c_historico.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_pr))),RemoteObject.createImmutable("' "))))));
 BA.debugLineNum = 548;BA.debugLine="Dim cantidady As String = 0";
Debug.ShouldStop(8);
_cantidady = BA.NumberToString(0);Debug.locals.put("cantidady", _cantidady);Debug.locals.put("cantidady", _cantidady);
 BA.debugLineNum = 549;BA.debugLine="If c.RowCount >0 Then";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 550;BA.debugLine="c.Position = 0";
Debug.ShouldStop(32);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 551;BA.debugLine="cantidady = c.GetString(\"HVD_CANT\")";
Debug.ShouldStop(64);
_cantidady = __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT")));Debug.locals.put("cantidady", _cantidady);
 };
 BA.debugLineNum = 554;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 555;BA.debugLine="x.Position = 0";
Debug.ShouldStop(1024);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 557;BA.debugLine="Dim preciou As String = x.GetString(\"CAT_GP_PRE";
Debug.ShouldStop(4096);
_preciou = _x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO")));Debug.locals.put("preciou", _preciou);Debug.locals.put("preciou", _preciou);
 BA.debugLineNum = 558;BA.debugLine="Dim costototalhist  As String = preciou * canti";
Debug.ShouldStop(8192);
_costototalhist = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _preciou),BA.numberCast(double.class, _cantidady)}, "*",0, 0));Debug.locals.put("costototalhist", _costototalhist);Debug.locals.put("costototalhist", _costototalhist);
 };
 BA.debugLineNum = 561;BA.debugLine="totalfinal = totalfinal + costototalhist";
Debug.ShouldStop(65536);
_totalfinal = BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _totalfinal),BA.numberCast(double.class, _costototalhist)}, "+",1, 0));Debug.locals.put("totalfinal", _totalfinal);
 BA.debugLineNum = 562;BA.debugLine="x.Close";
Debug.ShouldStop(131072);
_x.runVoidMethod ("Close");
 }
}Debug.locals.put("pr", _pr);
;
 BA.debugLineNum = 564;BA.debugLine="L_TOTAL.Text = Round2(totalfinal, 2)";
Debug.ShouldStop(524288);
__ref.getField(false,"_l_total" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round2",(Object)(BA.numberCast(double.class, _totalfinal)),(Object)(BA.numberCast(int.class, 2)))));
 BA.debugLineNum = 565;BA.debugLine="c.Close";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 567;BA.debugLine="c = Starter.skmt.ExecQuery(\"select COUNT(*) AS CU";
Debug.ShouldStop(4194304);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select COUNT(*) AS CUANTOS from REPARTO where REP_CLIENTE in (select cuenta from cuentaa) and REP_RECHAZO = '0' and REP_CANT > 0 order by REP_PRONOMBRE"))));
 BA.debugLineNum = 568;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 569;BA.debugLine="c.Position = 0";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 570;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS")))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 572;BA.debugLine="Dim z As Cursor = Starter.skmt.ExecQuery($\"sele";
Debug.ShouldStop(134217728);
_z = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_z = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_historico._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.createImmutable("select SUM(REP_CANT) AS CANTIDAD , SUM(REP_PRECIO) AS PRECIO from REPARTO where REP_CLIENTE in (select cuenta from cuentaa) and REP_RECHAZO = '0' and REP_CANT > 0 order by REP_PRONOMBRE")))));Debug.locals.put("z", _z);Debug.locals.put("z", _z);
 BA.debugLineNum = 573;BA.debugLine="Dim cantidad2 As String = 0";
Debug.ShouldStop(268435456);
_cantidad2 = BA.NumberToString(0);Debug.locals.put("cantidad2", _cantidad2);Debug.locals.put("cantidad2", _cantidad2);
 BA.debugLineNum = 575;BA.debugLine="If z.RowCount > 0 Then";
Debug.ShouldStop(1073741824);
if (RemoteObject.solveBoolean(">",_z.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 576;BA.debugLine="z.Position = 0";
Debug.ShouldStop(-2147483648);
_z.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 577;BA.debugLine="cantidad2= z.GetString(\"CANTIDAD\")";
Debug.ShouldStop(1);
_cantidad2 = _z.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANTIDAD")));Debug.locals.put("cantidad2", _cantidad2);
 BA.debugLineNum = 580;BA.debugLine="L_CANT.Text = Round((cantidad1 + cantidad2))";
Debug.ShouldStop(8);
__ref.getField(false,"_l_cant" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(c_historico.__c.runMethod(true,"Round",(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _cantidad1),BA.numberCast(double.class, _cantidad2)}, "+",1, 0))))));
 };
 BA.debugLineNum = 582;BA.debugLine="z.Close";
Debug.ShouldStop(32);
_z.runVoidMethod ("Close");
 };
 };
 BA.debugLineNum = 590;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _gps_locationchanged(RemoteObject __ref,RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,180);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "c_historico","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 180;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(524288);
 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  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,43);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_historico","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 43;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(1024);
 BA.debugLineNum = 44;BA.debugLine="Return Me";
Debug.ShouldStop(2048);
if (true) return __ref;
 BA.debugLineNum = 45;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _l_pcant_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("l_pCant_Click (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,597);
if (RapidSub.canDelegate("l_pcant_click")) { return __ref.runUserSub(false, "c_historico","l_pcant_click", __ref);}
 BA.debugLineNum = 597;BA.debugLine="Private Sub l_pCant_Click";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 599;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _listview1_itemlongclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("ListView1_ItemLongClick (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,197);
if (RapidSub.canDelegate("listview1_itemlongclick")) { return __ref.runUserSub(false, "c_historico","listview1_itemlongclick", __ref, _position, _value);}
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 197;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
Debug.ShouldStop(16);
 BA.debugLineNum = 241;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _lv2_itemclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("lv2_ItemClick (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,243);
if (RapidSub.canDelegate("lv2_itemclick")) { return __ref.runUserSub(false, "c_historico","lv2_itemclick", __ref, _position, _value);}
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 243;BA.debugLine="Sub lv2_ItemClick (Position As Int, Value As Objec";
Debug.ShouldStop(262144);
 BA.debugLineNum = 304;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _p_prods_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("p_prods_Click (c_historico) ","c_historico",13,__ref.getField(false, "ba"),__ref,601);
if (RapidSub.canDelegate("p_prods_click")) { return __ref.runUserSub(false, "c_historico","p_prods_click", __ref);}
 BA.debugLineNum = 601;BA.debugLine="Sub p_prods_Click";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 602;BA.debugLine="Log(Sender.As(Panel).tag)";
Debug.ShouldStop(33554432);
c_historico.__c.runVoidMethod ("LogImpl","822478849",BA.ObjectToString((RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.PanelWrapper"), c_historico.__c.runMethod(false,"Sender",__ref.getField(false, "ba")))).runMethod(false,"getTag")),0);
 BA.debugLineNum = 603;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}