package SHARK2.keymon.com.mx;

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

public class c_pedidos_subs_0 {


public static RemoteObject  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,79);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_pedidos","b4xpage_appear", __ref);}
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
 BA.debugLineNum = 79;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(16384);
 BA.debugLineNum = 80;BA.debugLine="tgl.Initialize";
Debug.ShouldStop(32768);
__ref.getField(false,"_tgl" /*RemoteObject*/ ).runVoidMethod ("Initialize",__ref.getField(false, "ba"));
 BA.debugLineNum = 81;BA.debugLine="BONSABOR = 0";
Debug.ShouldStop(65536);
__ref.setField ("_bonsabor" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 82;BA.debugLine="BONSABOR2 = 0";
Debug.ShouldStop(131072);
__ref.setField ("_bonsabor2" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 83;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
Debug.ShouldStop(262144);
if (c_pedidos.__c.runMethod(true,"Not",(Object)(c_pedidos._starter._gps /*RemoteObject*/ .runMethod(true,"getGPSEnabled"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 84;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
Debug.ShouldStop(524288);
c_pedidos.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Es necesario tener el GPS encendido")),(Object)(c_pedidos.__c.getField(true,"True")));
 BA.debugLineNum = 85;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
Debug.ShouldStop(1048576);
c_pedidos.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((c_pedidos._starter._gps /*RemoteObject*/ .runMethod(false,"getLocationSettingsIntent"))));
 };
 BA.debugLineNum = 87;BA.debugLine="cantidad.Text = \"\"";
Debug.ShouldStop(4194304);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 88;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select  ID_AL";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select  ID_ALMACEN from CAT_ALMACEN"))));
 BA.debugLineNum = 89;BA.debugLine="C.Position =0";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 90;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
Debug.ShouldStop(33554432);
__ref.setField ("_almacen" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("ID_ALMACEN"))));
 BA.debugLineNum = 91;BA.debugLine="C.Close";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 92;BA.debugLine="i_fotol.Visible = False";
Debug.ShouldStop(134217728);
__ref.getField(false,"_i_fotol" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"False"));
 BA.debugLineNum = 93;BA.debugLine="sb.Initialize";
Debug.ShouldStop(268435456);
__ref.getField(false,"_sb" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 94;BA.debugLine="p.Shell(\"ping -c1 -W1 177.244.63.54\",Null, sb,Nul";
Debug.ShouldStop(536870912);
__ref.getField(false,"_p" /*RemoteObject*/ ).runVoidMethod ("Shell",(Object)(BA.ObjectToString("ping -c1 -W1 177.244.63.54")),(Object)((c_pedidos.__c.getField(false,"Null"))),(Object)((__ref.getField(false,"_sb" /*RemoteObject*/ ).getObject())),(Object)((c_pedidos.__c.getField(false,"Null"))));
 BA.debugLineNum = 95;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("Initialize",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(BA.ObjectToString("kmt.db")),(Object)(c_pedidos.__c.getField(true,"True")));
 BA.debugLineNum = 96;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_GP";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_DEV  from CAT_GUNAPROD where CAT_GP_NOMBRE In (Select PDESC from PROID)"))));
 BA.debugLineNum = 97;BA.debugLine="c.Position=0";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 98;BA.debugLine="L_PROID.Text = c.GetString(\"CAT_GP_ID\")";
Debug.ShouldStop(2);
__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))));
 BA.debugLineNum = 99;BA.debugLine="l_tipo.Text = c.GetString(\"CAT_GP_TIPO\")";
Debug.ShouldStop(4);
__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_TIPO")))));
 BA.debugLineNum = 100;BA.debugLine="l_sub.Text = c.GetString(\"CAT_GP_SUBTIPO\")";
Debug.ShouldStop(8);
__ref.getField(false,"_l_sub" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_SUBTIPO")))));
 BA.debugLineNum = 101;BA.debugLine="l_marca.Text = c.GetString(\"CAT_GP_CLASIF\")";
Debug.ShouldStop(16);
__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_CLASIF")))));
 BA.debugLineNum = 102;BA.debugLine="l_desc.Text = c.GetString(\"CAT_GP_NOMBRE\")";
Debug.ShouldStop(32);
__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))));
 BA.debugLineNum = 103;BA.debugLine="l_precio.Text = c.GetDouble(\"CAT_GP_PRECIO\")";
Debug.ShouldStop(64);
__ref.getField(false,"_l_precio" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetDouble",(Object)(RemoteObject.createImmutable("CAT_GP_PRECIO")))));
 BA.debugLineNum = 104;BA.debugLine="l_bodega.Text = c.GetString(\"CAT_GP_ALMACEN\")";
Debug.ShouldStop(128);
__ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ALMACEN")))));
 BA.debugLineNum = 105;BA.debugLine="IMG_PASO = c.GetBlob(\"CAT_GP_IMG\")";
Debug.ShouldStop(256);
__ref.setField ("_img_paso" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(false,"GetBlob",(Object)(RemoteObject.createImmutable("CAT_GP_IMG"))));
 BA.debugLineNum = 106;BA.debugLine="PROMO_C = c.GetString(\"CAT_GP_STS\")";
Debug.ShouldStop(512);
__ref.setField ("_promo_c" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_STS"))));
 BA.debugLineNum = 107;BA.debugLine="cambio = c.GetString(\"CAT_GP_DEV\")";
Debug.ShouldStop(1024);
__ref.setField ("_cambio" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_DEV"))));
 BA.debugLineNum = 108;BA.debugLine="preciosin = c.GetString(\"CAT_GP_IMP2\")";
Debug.ShouldStop(2048);
__ref.setField ("_preciosin" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_IMP2"))));
 BA.debugLineNum = 109;BA.debugLine="PROMO_CR = c.GetString(\"CAT_GP_IMP1\")";
Debug.ShouldStop(4096);
__ref.setField ("_promo_cr" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_IMP1"))));
 BA.debugLineNum = 110;BA.debugLine="cambio = \"0\"";
Debug.ShouldStop(8192);
__ref.setField ("_cambio" /*RemoteObject*/ ,BA.ObjectToString("0"));
 BA.debugLineNum = 112;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery2(\"select count";
Debug.ShouldStop(32768);
__ref.getField(false,"_e" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select count(*) as CUANTOS FROM pedido WHERE PE_CEDIS = ? AND PE_CLIENTE  IN (Select cuenta from cuentaa) ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))}))));
 BA.debugLineNum = 113;BA.debugLine="e.Position =0";
Debug.ShouldStop(65536);
__ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 114;BA.debugLine="If e.GetString(\"CUANTOS\") = 0 Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 115;BA.debugLine="If l_marca.text = \"PROMOS\" And l_tipo.Text =\"PRO";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS"))) { 
 BA.debugLineNum = 116;BA.debugLine="DESC_PROMO.Visible = True";
Debug.ShouldStop(524288);
__ref.getField(false,"_desc_promo" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"True"));
 BA.debugLineNum = 117;BA.debugLine="CC=B4XPages.MainPage.skmt.ExecQuery2(\"select co";
Debug.ShouldStop(1048576);
__ref.getField(false,"_cc" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select count(*) as CUANTOS FROM PROMOS_COMP WHERE CAT_PA_ID = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))}))));
 BA.debugLineNum = 118;BA.debugLine="CC.Position =0";
Debug.ShouldStop(2097152);
__ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 119;BA.debugLine="If CC.GetString(\"CUANTOS\") = 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 120;BA.debugLine="l_bodega.Text = \"0\" ' se modifica a cero para";
Debug.ShouldStop(8388608);
__ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("0"));
 }else {
 BA.debugLineNum = 122;BA.debugLine="CC.Close";
Debug.ShouldStop(33554432);
__ref.getField(false,"_cc" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 123;BA.debugLine="CC=B4XPages.MainPage.skmt.ExecQuery2(\"select C";
Debug.ShouldStop(67108864);
__ref.getField(false,"_cc" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_PA_MAXPROM, CAT_PA_MAXPROMREC, CAT_PA_MAXPROMCLIE FROM PROMOS_COMP WHERE CAT_PA_ID = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))}))));
 BA.debugLineNum = 124;BA.debugLine="CC.Position =0";
Debug.ShouldStop(134217728);
__ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 126;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT C";
Debug.ShouldStop(536870912);
__ref.getField(false,"_dd" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("SELECT COUNT(*) AS CUANTOS FROM HIST_CLIENTE_CANT_PROMOS WHERE HCCP_CLIENTE IN (Select cuenta from cuentaa) AND HCCP_PROMO =?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))}))));
 BA.debugLineNum = 127;BA.debugLine="DD.Position =0";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 128;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 129;BA.debugLine="HCCP_CANT = 0";
Debug.ShouldStop(1);
__ref.setField ("_hccp_cant" /*RemoteObject*/ ,BA.NumberToString(0));
 }else {
 BA.debugLineNum = 131;BA.debugLine="DD.Close";
Debug.ShouldStop(4);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 132;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
Debug.ShouldStop(8);
__ref.getField(false,"_dd" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("SELECT HCCP_CANT FROM HIST_CLIENTE_CANT_PROMOS WHERE HCCP_CLIENTE IN (Select cuenta from cuentaa) AND HCCP_PROMO =?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_ID")))}))));
 BA.debugLineNum = 133;BA.debugLine="DD.Position =0";
Debug.ShouldStop(16);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 134;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
Debug.ShouldStop(32);
__ref.setField ("_hccp_cant" /*RemoteObject*/ ,__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HCCP_CANT"))));
 BA.debugLineNum = 135;BA.debugLine="DD.Close";
Debug.ShouldStop(64);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 137;BA.debugLine="BONSABOR = HCCP_CANT";
Debug.ShouldStop(256);
__ref.setField ("_bonsabor" /*RemoteObject*/ ,__ref.getField(true,"_hccp_cant" /*RemoteObject*/ ));
 BA.debugLineNum = 138;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT C";
Debug.ShouldStop(512);
__ref.getField(false,"_dd" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("SELECT COUNT(*) AS CUANTOS FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select cuenta from cuentaa) AND HVD_PRONOMBRE =?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))}))));
 BA.debugLineNum = 139;BA.debugLine="DD.Position =0";
Debug.ShouldStop(1024);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 140;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 141;BA.debugLine="HCCP_CANT = 0";
Debug.ShouldStop(4096);
__ref.setField ("_hccp_cant" /*RemoteObject*/ ,BA.NumberToString(0));
 }else {
 BA.debugLineNum = 143;BA.debugLine="DD.Close";
Debug.ShouldStop(16384);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 144;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
Debug.ShouldStop(32768);
__ref.getField(false,"_dd" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("SELECT SUM(HVD_CANT) AS HCCP_CANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select cuenta from cuentaa) AND HVD_PRONOMBRE =?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))}))));
 BA.debugLineNum = 145;BA.debugLine="DD.Position =0";
Debug.ShouldStop(65536);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 146;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
Debug.ShouldStop(131072);
__ref.setField ("_hccp_cant" /*RemoteObject*/ ,__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HCCP_CANT"))));
 BA.debugLineNum = 147;BA.debugLine="DD.Close";
Debug.ShouldStop(262144);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 149;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"Select C";
Debug.ShouldStop(1048576);
__ref.getField(false,"_dd" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("Select COUNT(*) AS CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN  (Select cuenta from cuentaa) AND  PE_PROID IN (select CAT_GP_ID   from CAT_GUNAPROD where CAT_GP_CLASIF = ?) ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))}))));
 BA.debugLineNum = 150;BA.debugLine="DD.Position =0";
Debug.ShouldStop(2097152);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 151;BA.debugLine="BONSABOR2 = DD.GetString(\"CUANTOS\")";
Debug.ShouldStop(4194304);
__ref.setField ("_bonsabor2" /*RemoteObject*/ ,__ref.getField(false,"_dd" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))));
 BA.debugLineNum = 152;BA.debugLine="DD.Close";
Debug.ShouldStop(8388608);
__ref.getField(false,"_dd" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 153;BA.debugLine="TOTAL_PROMO = CC.GetString(\"CAT_PA_MAXPROMCLIE";
Debug.ShouldStop(16777216);
__ref.setField ("_total_promo" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROMCLIE")))),BA.numberCast(double.class, __ref.getField(true,"_hccp_cant" /*RemoteObject*/ ))}, "-",1, 0)));
 BA.debugLineNum = 154;BA.debugLine="If HCCP_CANT = 0 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_hccp_cant" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 155;BA.debugLine="l_bodega.Text = CC.GetString(\"CAT_PA_MAXPROM\"";
Debug.ShouldStop(67108864);
__ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROM")))));
 }else 
{ BA.debugLineNum = 156;BA.debugLine="Else IF TOTAL_PROMO > CC.GetString(\"CAT_PA_MAX";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(true,"_total_promo" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROMREC")))))) { 
 BA.debugLineNum = 157;BA.debugLine="l_bodega.Text = 	CC.GetString(\"CAT_PA_MAXPROM";
Debug.ShouldStop(268435456);
__ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_cc" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_PA_MAXPROMREC")))));
 }else {
 BA.debugLineNum = 159;BA.debugLine="l_bodega.Text = TOTAL_PROMO";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(true,"_total_promo" /*RemoteObject*/ )));
 }}
;
 };
 }else {
 BA.debugLineNum = 163;BA.debugLine="DESC_PROMO.Visible = False";
Debug.ShouldStop(4);
__ref.getField(false,"_desc_promo" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"False"));
 };
 BA.debugLineNum = 165;BA.debugLine="c.Close";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 166;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CASE";
Debug.ShouldStop(32);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CASE WHEN pe_costo_tot is null then 0 else  sum( pe_costo_tot ) end as TOTAL_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 167;BA.debugLine="c.Position=0";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 168;BA.debugLine="t_venta.Text = c.GetString(\"TOTAL_CLIE\")";
Debug.ShouldStop(128);
__ref.getField(false,"_t_venta" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))));
 BA.debugLineNum = 169;BA.debugLine="c.Close";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 170;BA.debugLine="Terminar.Visible = True";
Debug.ShouldStop(512);
__ref.getField(false,"_terminar" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"True"));
 BA.debugLineNum = 171;BA.debugLine="guardar.Visible = True";
Debug.ShouldStop(1024);
__ref.getField(false,"_guardar" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"True"));
 BA.debugLineNum = 172;BA.debugLine="cantidad.Visible = True";
Debug.ShouldStop(2048);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"True"));
 BA.debugLineNum = 173;BA.debugLine="If cambio = \"1\" Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_cambio" /*RemoteObject*/ ),BA.ObjectToString("1"))) { 
 BA.debugLineNum = 174;BA.debugLine="nopromo.Visible = True";
Debug.ShouldStop(8192);
__ref.getField(false,"_nopromo" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"True"));
 }else {
 BA.debugLineNum = 176;BA.debugLine="nopromo.Visible = False";
Debug.ShouldStop(32768);
__ref.getField(false,"_nopromo" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"False"));
 };
 BA.debugLineNum = 178;BA.debugLine="Dim out As OutputStream";
Debug.ShouldStop(131072);
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");Debug.locals.put("out", _out);
 BA.debugLineNum = 179;BA.debugLine="out = File.OpenOutput(ruta, \"1.jpg\", False)";
Debug.ShouldStop(262144);
_out = c_pedidos.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(BA.ObjectToString("1.jpg")),(Object)(c_pedidos.__c.getField(true,"False")));Debug.locals.put("out", _out);
 BA.debugLineNum = 180;BA.debugLine="out.WriteBytes(IMG_PASO, 0, IMG_PASO.Length)";
Debug.ShouldStop(524288);
_out.runVoidMethod ("WriteBytes",(Object)(__ref.getField(false,"_img_paso" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)(__ref.getField(false,"_img_paso" /*RemoteObject*/ ).getField(true,"length")));
 BA.debugLineNum = 181;BA.debugLine="out.Close";
Debug.ShouldStop(1048576);
_out.runVoidMethod ("Close");
 BA.debugLineNum = 182;BA.debugLine="img_prod.Bitmap = LoadBitmap(ruta,\"1.jpg\")";
Debug.ShouldStop(2097152);
__ref.getField(false,"_img_prod" /*RemoteObject*/ ).runMethod(false,"setBitmap",(c_pedidos.__c.runMethod(false,"LoadBitmap",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("1.jpg"))).getObject()));
 BA.debugLineNum = 183;BA.debugLine="TOT_ART_PROMO = \"0\"";
Debug.ShouldStop(4194304);
__ref.setField ("_tot_art_promo" /*RemoteObject*/ ,BA.ObjectToString("0"));
 BA.debugLineNum = 184;BA.debugLine="TOT_ART_PROMOR = \"0\"";
Debug.ShouldStop(8388608);
__ref.setField ("_tot_art_promor" /*RemoteObject*/ ,BA.ObjectToString("0"));
 BA.debugLineNum = 185;BA.debugLine="If l_marca.text = \"PROMOS\" And l_tipo.Text =\"PRO";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("0"))) { 
 BA.debugLineNum = 186;BA.debugLine="Msgbox(\"ALERTA\",\"EL CLIENTE NO PUEDE TENER ESTA";
Debug.ShouldStop(33554432);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("ALERTA")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("EL CLIENTE NO PUEDE TENER ESTA PROMOCION"))),__ref.getField(false, "ba"));
 BA.debugLineNum = 187;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(67108864);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }else 
{ BA.debugLineNum = 188;BA.debugLine="ELSE IF l_marca.text = \"PROMOS\" And l_tipo.Text";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROUNI1")) && RemoteObject.solveBoolean("!",__ref.getField(true,"_bonsabor" /*RemoteObject*/ ),BA.ObjectToString("1")) && RemoteObject.solveBoolean("=",__ref.getField(true,"_bonsabor2" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 189;BA.debugLine="Msgbox(\"ALERTA\",\"EL CLIENTE NO PUEDE TENER ESTA";
Debug.ShouldStop(268435456);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("ALERTA")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("EL CLIENTE NO PUEDE TENER ESTA PROMOCION"))),__ref.getField(false, "ba"));
 BA.debugLineNum = 190;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(536870912);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }}
;
 }else {
 BA.debugLineNum = 193;BA.debugLine="Msgbox(\"ALERTA\",\"EL CLIENTE YA COMPRO ESTE PRODU";
Debug.ShouldStop(1);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("ALERTA")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("EL CLIENTE YA COMPRO ESTE PRODUCTO REVISAR NOTA"))),__ref.getField(false, "ba"));
 BA.debugLineNum = 194;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(2);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 };
 BA.debugLineNum = 196;BA.debugLine="End Sub";
Debug.ShouldStop(8);
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_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,531);
if (RapidSub.canDelegate("b4xpage_closerequest")) { return __ref.runUserSub(false, "c_pedidos","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(SHARK2.keymon.com.mx.c_pedidos parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
SHARK2.keymon.com.mx.c_pedidos parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,531);
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 = 534;BA.debugLine="Msgbox(\"Presione Boton Terminar.\",\"ADVERTENCIA\")";
Debug.ShouldStop(2097152);
parent.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Presione Boton Terminar.")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 BA.debugLineNum = 535;BA.debugLine="Return False";
Debug.ShouldStop(4194304);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.__c.getField(true,"False")));return;};
 BA.debugLineNum = 536;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
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_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,64);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_pedidos","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 64;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 65;BA.debugLine="Root = Root1";
Debug.ShouldStop(1);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 67;BA.debugLine="Root.LoadLayout(\"pedido\")";
Debug.ShouldStop(4);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("pedido")),__ref.getField(false, "ba"));
 BA.debugLineNum = 68;BA.debugLine="i_fotol.Visible = False";
Debug.ShouldStop(8);
__ref.getField(false,"_i_fotol" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"False"));
 BA.debugLineNum = 70;BA.debugLine="ruta = File.DirInternal";
Debug.ShouldStop(32);
__ref.setField ("_ruta" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"File").runMethod(true,"getDirInternal"));
 BA.debugLineNum = 71;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",c_pedidos.__c.getField(false,"File").runMethod(true,"Exists",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db"))),c_pedidos.__c.getField(true,"False"))) { 
 BA.debugLineNum = 72;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
Debug.ShouldStop(128);
c_pedidos.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(c_pedidos.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db")));
 };
 BA.debugLineNum = 75;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
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_pedidos._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_pedidos._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_pedidos._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_pedidos._xui);
 //BA.debugLineNum = 5;BA.debugLine="Dim g As GPS";
c_pedidos._g = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");__ref.setField("_g",c_pedidos._g);
 //BA.debugLineNum = 6;BA.debugLine="Dim ruta As String";
c_pedidos._ruta = RemoteObject.createImmutable("");__ref.setField("_ruta",c_pedidos._ruta);
 //BA.debugLineNum = 7;BA.debugLine="Dim skmt As SQL";
c_pedidos._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");__ref.setField("_skmt",c_pedidos._skmt);
 //BA.debugLineNum = 8;BA.debugLine="Private t3 As Timer";
c_pedidos._t3 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");__ref.setField("_t3",c_pedidos._t3);
 //BA.debugLineNum = 9;BA.debugLine="Dim p As Phone";
c_pedidos._p = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");__ref.setField("_p",c_pedidos._p);
 //BA.debugLineNum = 10;BA.debugLine="Dim sb As StringBuilder";
c_pedidos._sb = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");__ref.setField("_sb",c_pedidos._sb);
 //BA.debugLineNum = 12;BA.debugLine="Dim c As Cursor";
c_pedidos._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_pedidos._c);
 //BA.debugLineNum = 13;BA.debugLine="Dim e As Cursor";
c_pedidos._e = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_e",c_pedidos._e);
 //BA.debugLineNum = 14;BA.debugLine="Dim f As Cursor";
c_pedidos._f = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_f",c_pedidos._f);
 //BA.debugLineNum = 15;BA.debugLine="Dim h As Cursor";
c_pedidos._h = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_h",c_pedidos._h);
 //BA.debugLineNum = 16;BA.debugLine="Dim CC As Cursor";
c_pedidos._cc = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_cc",c_pedidos._cc);
 //BA.debugLineNum = 17;BA.debugLine="Dim DD As Cursor";
c_pedidos._dd = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_dd",c_pedidos._dd);
 //BA.debugLineNum = 18;BA.debugLine="Dim l_tipo As Label";
c_pedidos._l_tipo = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_tipo",c_pedidos._l_tipo);
 //BA.debugLineNum = 19;BA.debugLine="Dim l_sub As Label";
c_pedidos._l_sub = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_sub",c_pedidos._l_sub);
 //BA.debugLineNum = 20;BA.debugLine="Dim l_marca As Label";
c_pedidos._l_marca = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_marca",c_pedidos._l_marca);
 //BA.debugLineNum = 21;BA.debugLine="Dim l_desc As Label";
c_pedidos._l_desc = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_desc",c_pedidos._l_desc);
 //BA.debugLineNum = 22;BA.debugLine="Dim l_precio As Label";
c_pedidos._l_precio = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_precio",c_pedidos._l_precio);
 //BA.debugLineNum = 23;BA.debugLine="Dim l_bodega As Label";
c_pedidos._l_bodega = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_bodega",c_pedidos._l_bodega);
 //BA.debugLineNum = 24;BA.debugLine="Dim cantidad As EditText";
c_pedidos._cantidad = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_cantidad",c_pedidos._cantidad);
 //BA.debugLineNum = 25;BA.debugLine="Dim guardar As Button";
c_pedidos._guardar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_guardar",c_pedidos._guardar);
 //BA.debugLineNum = 26;BA.debugLine="Dim Terminar As Button";
c_pedidos._terminar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_terminar",c_pedidos._terminar);
 //BA.debugLineNum = 27;BA.debugLine="Dim img_prod As ImageView";
c_pedidos._img_prod = RemoteObject.createNew ("anywheresoftware.b4a.objects.ImageViewWrapper");__ref.setField("_img_prod",c_pedidos._img_prod);
 //BA.debugLineNum = 28;BA.debugLine="Dim IMG_PASO() As Byte";
c_pedidos._img_paso = RemoteObject.createNewArray ("byte", new int[] {0}, new Object[]{});__ref.setField("_img_paso",c_pedidos._img_paso);
 //BA.debugLineNum = 29;BA.debugLine="Dim L_PROID As Label";
c_pedidos._l_proid = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_proid",c_pedidos._l_proid);
 //BA.debugLineNum = 30;BA.debugLine="Dim clie_id As String";
c_pedidos._clie_id = RemoteObject.createImmutable("");__ref.setField("_clie_id",c_pedidos._clie_id);
 //BA.debugLineNum = 31;BA.debugLine="Dim sDate,sTime As String";
c_pedidos._sdate = RemoteObject.createImmutable("");__ref.setField("_sdate",c_pedidos._sdate);
c_pedidos._stime = RemoteObject.createImmutable("");__ref.setField("_stime",c_pedidos._stime);
 //BA.debugLineNum = 32;BA.debugLine="Dim usuario As String";
c_pedidos._usuario = RemoteObject.createImmutable("");__ref.setField("_usuario",c_pedidos._usuario);
 //BA.debugLineNum = 34;BA.debugLine="Dim t_venta As Label";
c_pedidos._t_venta = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_t_venta",c_pedidos._t_venta);
 //BA.debugLineNum = 35;BA.debugLine="Dim PROMO_C As String";
c_pedidos._promo_c = RemoteObject.createImmutable("");__ref.setField("_promo_c",c_pedidos._promo_c);
 //BA.debugLineNum = 36;BA.debugLine="Dim i_fotol As ImageView";
c_pedidos._i_fotol = RemoteObject.createNew ("anywheresoftware.b4a.objects.ImageViewWrapper");__ref.setField("_i_fotol",c_pedidos._i_fotol);
 //BA.debugLineNum = 37;BA.debugLine="Private DESC_PROMO As Button";
c_pedidos._desc_promo = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_desc_promo",c_pedidos._desc_promo);
 //BA.debugLineNum = 38;BA.debugLine="Private nopromo As Button";
c_pedidos._nopromo = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_nopromo",c_pedidos._nopromo);
 //BA.debugLineNum = 39;BA.debugLine="Dim TOT_ART_PROMO As String";
c_pedidos._tot_art_promo = RemoteObject.createImmutable("");__ref.setField("_tot_art_promo",c_pedidos._tot_art_promo);
 //BA.debugLineNum = 40;BA.debugLine="Dim cambio As String";
c_pedidos._cambio = RemoteObject.createImmutable("");__ref.setField("_cambio",c_pedidos._cambio);
 //BA.debugLineNum = 41;BA.debugLine="Dim COSTO_TOT As String";
c_pedidos._costo_tot = RemoteObject.createImmutable("");__ref.setField("_costo_tot",c_pedidos._costo_tot);
 //BA.debugLineNum = 42;BA.debugLine="Dim ALMACEN As String";
c_pedidos._almacen = RemoteObject.createImmutable("");__ref.setField("_almacen",c_pedidos._almacen);
 //BA.debugLineNum = 43;BA.debugLine="Dim preciosin As String";
c_pedidos._preciosin = RemoteObject.createImmutable("");__ref.setField("_preciosin",c_pedidos._preciosin);
 //BA.debugLineNum = 44;BA.debugLine="Dim cl_ruta As String";
c_pedidos._cl_ruta = RemoteObject.createImmutable("");__ref.setField("_cl_ruta",c_pedidos._cl_ruta);
 //BA.debugLineNum = 45;BA.debugLine="Dim d As Cursor";
c_pedidos._d = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_d",c_pedidos._d);
 //BA.debugLineNum = 46;BA.debugLine="Dim TOT_ART_PROMOR As String";
c_pedidos._tot_art_promor = RemoteObject.createImmutable("");__ref.setField("_tot_art_promor",c_pedidos._tot_art_promor);
 //BA.debugLineNum = 47;BA.debugLine="Dim PROMO_CR As String";
c_pedidos._promo_cr = RemoteObject.createImmutable("");__ref.setField("_promo_cr",c_pedidos._promo_cr);
 //BA.debugLineNum = 48;BA.debugLine="Dim TOTAL_PROMO As String";
c_pedidos._total_promo = RemoteObject.createImmutable("");__ref.setField("_total_promo",c_pedidos._total_promo);
 //BA.debugLineNum = 49;BA.debugLine="Dim HCCP_CANT As String";
c_pedidos._hccp_cant = RemoteObject.createImmutable("");__ref.setField("_hccp_cant",c_pedidos._hccp_cant);
 //BA.debugLineNum = 50;BA.debugLine="Dim tgl As Toggle";
c_pedidos._tgl = RemoteObject.createNew ("com.rootsoft.togglelibrary.ToggleLibrary");__ref.setField("_tgl",c_pedidos._tgl);
 //BA.debugLineNum = 51;BA.debugLine="Dim precio_Cero As String";
c_pedidos._precio_cero = RemoteObject.createImmutable("");__ref.setField("_precio_cero",c_pedidos._precio_cero);
 //BA.debugLineNum = 52;BA.debugLine="Private BONSABOR As String";
c_pedidos._bonsabor = RemoteObject.createImmutable("");__ref.setField("_bonsabor",c_pedidos._bonsabor);
 //BA.debugLineNum = 53;BA.debugLine="Private BONSABOR2 As String";
c_pedidos._bonsabor2 = RemoteObject.createImmutable("");__ref.setField("_bonsabor2",c_pedidos._bonsabor2);
 //BA.debugLineNum = 54;BA.debugLine="Dim cmd As DBCommand";
c_pedidos._cmd = RemoteObject.createNew ("SHARK2.keymon.com.mx.dbrequestmanager._dbcommand");__ref.setField("_cmd",c_pedidos._cmd);
 //BA.debugLineNum = 55;BA.debugLine="Private p_pedido As Panel";
c_pedidos._p_pedido = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_pedido",c_pedidos._p_pedido);
 //BA.debugLineNum = 56;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _desc_promo_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("DESC_PROMO_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,548);
if (RapidSub.canDelegate("desc_promo_click")) { return __ref.runUserSub(false, "c_pedidos","desc_promo_click", __ref);}
 BA.debugLineNum = 548;BA.debugLine="Sub DESC_PROMO_Click";
Debug.ShouldStop(8);
 BA.debugLineNum = 549;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(16);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from PROIDID")));
 BA.debugLineNum = 550;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
Debug.ShouldStop(32);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PROIDID VALUES (?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 551;BA.debugLine="B4XPages.ShowPage(\"detalle_promo\")";
Debug.ShouldStop(64);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("detalle_promo")));
 BA.debugLineNum = 552;BA.debugLine="End Sub";
Debug.ShouldStop(128);
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_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,359);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "c_pedidos","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 359;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(64);
 BA.debugLineNum = 362;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("guardar_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,198);
if (RapidSub.canDelegate("guardar_click")) { return __ref.runUserSub(false, "c_pedidos","guardar_click", __ref);}
int _i = 0;
 BA.debugLineNum = 198;BA.debugLine="Sub guardar_Click";
Debug.ShouldStop(32);
 BA.debugLineNum = 199;BA.debugLine="If cantidad.Text = \"\" Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString(""))) { 
 BA.debugLineNum = 200;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(128);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }else 
{ BA.debugLineNum = 201;BA.debugLine="ELSE If cantidad.Text > l_bodega.Text Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"getText")))) { 
 BA.debugLineNum = 202;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
Debug.ShouldStop(512);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Exede la existencia")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 }else 
{ BA.debugLineNum = 203;BA.debugLine="Else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(true,"_promo_c" /*RemoteObject*/ )),BA.numberCast(double.class, 0)) && RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 204;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(2048);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from PROIDID")));
 BA.debugLineNum = 205;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(4096);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PROIDID VALUES (?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 206;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select count";
Debug.ShouldStop(8192);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select count(*) as CUANTOSD from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND CAT_DP_TIPO = 1)"))));
 BA.debugLineNum = 207;BA.debugLine="c.Position =0";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 208;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
Debug.ShouldStop(32768);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOSD"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 209;BA.debugLine="Msgbox(\"No tiene venta el cliente para la promo";
Debug.ShouldStop(65536);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("No tiene venta el cliente para la promo")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 }else {
 BA.debugLineNum = 211;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(";
Debug.ShouldStop(262144);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select sum(pe_cant) As TOT_ART_PROMO, sum(PE_COSTO_TOT) as COSTO_TOT from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND CAT_DP_PRECIO > 1)"))));
 BA.debugLineNum = 212;BA.debugLine="C.Position =0";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 213;BA.debugLine="TOT_ART_PROMO = C.GetString(\"TOT_ART_PROMO\")";
Debug.ShouldStop(1048576);
__ref.setField ("_tot_art_promo" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOT_ART_PROMO"))));
 BA.debugLineNum = 214;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
Debug.ShouldStop(2097152);
__ref.setField ("_costo_tot" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("COSTO_TOT"))));
 BA.debugLineNum = 215;BA.debugLine="C.Close";
Debug.ShouldStop(4194304);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 216;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select count(*) as CUANTOSD from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND (CAT_DP_PRECIO = 0.01 or CAT_DP_PRECIO = 1 OR CAT_DP_PRECIO = 0) AND CAT_DP_TIPO = 1)"))));
 BA.debugLineNum = 217;BA.debugLine="c.Position =0";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 218;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOSD"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 219;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
Debug.ShouldStop(67108864);
__ref.setField ("_tot_art_promor" /*RemoteObject*/ ,BA.ObjectToString("0"));
 }else {
 BA.debugLineNum = 221;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select sum(pe_cant) As TOT_ART_PROMO, sum(PE_COSTO_TOT) as COSTO_TOT from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND (CAT_DP_PRECIO = 0.01 or CAT_DP_PRECIO = 1 OR CAT_DP_PRECIO = 0) AND CAT_DP_TIPO = 1)"))));
 BA.debugLineNum = 222;BA.debugLine="C.Position =0";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 223;BA.debugLine="TOT_ART_PROMOR = C.GetString(\"TOT_ART_PROMO\")";
Debug.ShouldStop(1073741824);
__ref.setField ("_tot_art_promor" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOT_ART_PROMO"))));
 };
 BA.debugLineNum = 225;BA.debugLine="C.Close";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 226;BA.debugLine="PROMO_C = PROMO_C * cantidad.Text";
Debug.ShouldStop(2);
__ref.setField ("_promo_c" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_promo_c" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)));
 BA.debugLineNum = 227;BA.debugLine="PROMO_CR = PROMO_CR * cantidad.Text";
Debug.ShouldStop(4);
__ref.setField ("_promo_cr" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_promo_cr" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)));
 BA.debugLineNum = 228;BA.debugLine="If  TOT_ART_PROMO = PROMO_C And TOT_ART_PROMOR";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_tot_art_promo" /*RemoteObject*/ ),__ref.getField(true,"_promo_c" /*RemoteObject*/ )) && RemoteObject.solveBoolean("=",__ref.getField(true,"_tot_art_promor" /*RemoteObject*/ ),__ref.getField(true,"_promo_cr" /*RemoteObject*/ ))) { 
 BA.debugLineNum = 229;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
Debug.ShouldStop(16);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE PEDIDO SET PE_CEDIS = (?) WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID))")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 230;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
Debug.ShouldStop(32);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_ID, CAT_DP_PRECIO, CAT_DP_PRECIO_SIMPTOS, CAT_DP_IDPROD FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) AND CAT_DP_PRECIO > 1"))));
 BA.debugLineNum = 231;BA.debugLine="If D.RowCount>0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 232;BA.debugLine="For i=0 To D.RowCount -1";
Debug.ShouldStop(128);
{
final int step34 = 1;
final int limit34 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step34 > 0 && _i <= limit34) || (step34 < 0 && _i >= limit34) ;_i = ((int)(0 + _i + step34))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 233;BA.debugLine="D.Position=i";
Debug.ShouldStop(256);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 234;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
Debug.ShouldStop(512);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE PEDIDO SET PE_COSTOU = (?), PE_COSTO_TOT = PE_CANT * (?) , PE_COSTO_SIN = (?) WHERE PE_PROID = (?) And PE_CEDIS In (Select PROIDID from PROIDID) AND  PE_CLIENTE IN (Select CUENTA from cuentaa) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {4},new Object[] {(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO_SIMPTOS")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 237;BA.debugLine="D.Close";
Debug.ShouldStop(4096);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 238;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
Debug.ShouldStop(8192);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_ID, CAT_DP_PRECIO, CAT_DP_PRECIO_SIMPTOS, CAT_DP_IDPROD FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) AND (CAT_DP_PRECIO = 0.01 or CAT_DP_PRECIO = 1 OR CAT_DP_PRECIO = 0) AND CAT_DP_TIPO = 1"))));
 BA.debugLineNum = 239;BA.debugLine="If D.RowCount>0 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 240;BA.debugLine="For i=0 To D.RowCount -1";
Debug.ShouldStop(32768);
{
final int step42 = 1;
final int limit42 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step42 > 0 && _i <= limit42) || (step42 < 0 && _i >= limit42) ;_i = ((int)(0 + _i + step42))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 241;BA.debugLine="D.Position=i";
Debug.ShouldStop(65536);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 242;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
Debug.ShouldStop(131072);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE PEDIDO SET PE_COSTOU = (?), PE_COSTO_TOT = PE_CANT * (?) , PE_COSTO_SIN = (?) WHERE PE_PROID = (?) And PE_CEDIS In (Select PROIDID from PROIDID) AND  PE_CLIENTE IN (Select CUENTA from cuentaa) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {4},new Object[] {(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO_SIMPTOS")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 245;BA.debugLine="D.Close";
Debug.ShouldStop(1048576);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 246;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(2097152);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 247;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(4194304);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 248;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(8388608);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 249;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 250;BA.debugLine="c.Position=0";
Debug.ShouldStop(33554432);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 251;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(67108864);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 252;BA.debugLine="c.Close";
Debug.ShouldStop(134217728);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 253;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))));
 BA.debugLineNum = 254;BA.debugLine="c.Position=0";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 255;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(1073741824);
__ref.setField ("_cl_ruta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))));
 BA.debugLineNum = 256;BA.debugLine="c.Close";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 257;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 258;BA.debugLine="c.Position=0";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 259;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(4);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 260;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select cou";
Debug.ShouldStop(8);
__ref.getField(false,"_e" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) and CAT_DP_TIPO = 0 "))));
 BA.debugLineNum = 262;BA.debugLine="e.Position =0";
Debug.ShouldStop(32);
__ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 263;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS")))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 264;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CA";
Debug.ShouldStop(128);
__ref.getField(false,"_f" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_IDPROD, CAT_DP_PZAS,CAT_DP_PRECIO FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) and CAT_DP_TIPO = 0 "))));
 BA.debugLineNum = 267;BA.debugLine="If f.RowCount>0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 268;BA.debugLine="For i=0 To f.RowCount -1";
Debug.ShouldStop(2048);
{
final int step67 = 1;
final int limit67 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step67 > 0 && _i <= limit67) || (step67 < 0 && _i >= limit67) ;_i = ((int)(0 + _i + step67))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 269;BA.debugLine="f.Position=i";
Debug.ShouldStop(4096);
__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 270;BA.debugLine="precio_Cero = f.GetString(\"CAT_DP_PRECIO\")";
Debug.ShouldStop(8192);
__ref.setField ("_precio_cero" /*RemoteObject*/ ,__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))));
 BA.debugLineNum = 271;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select";
Debug.ShouldStop(16384);
__ref.getField(false,"_h" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))}))));
 BA.debugLineNum = 272;BA.debugLine="h.Position=0";
Debug.ShouldStop(32768);
__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 274;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
Debug.ShouldStop(131072);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA) VALUES(?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_precio_cero" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "**",0, 0)),(__ref.getField(true,"_precio_cero" /*RemoteObject*/ )),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)),(__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))),(__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 275;BA.debugLine="h.Close";
Debug.ShouldStop(262144);
__ref.getField(false,"_h" /*RemoteObject*/ ).runVoidMethod ("Close");
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 278;BA.debugLine="f.Close";
Debug.ShouldStop(2097152);
__ref.getField(false,"_f" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 280;BA.debugLine="e.Close";
Debug.ShouldStop(8388608);
__ref.getField(false,"_e" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 281;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
Debug.ShouldStop(16777216);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 282;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update c";
Debug.ShouldStop(33554432);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 }else {
 BA.debugLineNum = 284;BA.debugLine="Msgbox(\"Tiene \" & TOT_ART_PROMO & \" \" & TOT_AR";
Debug.ShouldStop(134217728);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Tiene "),__ref.getField(true,"_tot_art_promo" /*RemoteObject*/ ),RemoteObject.createImmutable(" "),__ref.getField(true,"_tot_art_promor" /*RemoteObject*/ ),RemoteObject.createImmutable(" y necesita "),__ref.getField(true,"_promo_c" /*RemoteObject*/ ),RemoteObject.createImmutable(" "),__ref.getField(true,"_promo_cr" /*RemoteObject*/ ),RemoteObject.createImmutable(" Para la Promo. ")))),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 };
 };
 BA.debugLineNum = 287;BA.debugLine="cantidad.Text = \"\"";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 288;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(-2147483648);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }else 
{ BA.debugLineNum = 289;BA.debugLine="else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(true,"_promo_c" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 290;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(2);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from PROIDID")));
 BA.debugLineNum = 291;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(4);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PROIDID VALUES (?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 292;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
Debug.ShouldStop(8);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 293;BA.debugLine="c.Position=0";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 294;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(32);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 295;BA.debugLine="c.Close";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 296;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(128);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 297;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(256);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 298;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(512);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 299;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
Debug.ShouldStop(1024);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))));
 BA.debugLineNum = 300;BA.debugLine="c.Position=0";
Debug.ShouldStop(2048);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 301;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(4096);
__ref.setField ("_cl_ruta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))));
 BA.debugLineNum = 302;BA.debugLine="c.Close";
Debug.ShouldStop(8192);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 303;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 304;BA.debugLine="c.Position=0";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 305;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(65536);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 308;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count";
Debug.ShouldStop(524288);
__ref.getField(false,"_e" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) "))));
 BA.debugLineNum = 309;BA.debugLine="e.Position =0";
Debug.ShouldStop(1048576);
__ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 310;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS")))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 311;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
Debug.ShouldStop(4194304);
__ref.getField(false,"_f" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_IDPROD, CAT_DP_PZAS, CAT_DP_PRECIO FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID)"))));
 BA.debugLineNum = 312;BA.debugLine="For i =0 To f.RowCount -1";
Debug.ShouldStop(8388608);
{
final int step108 = 1;
final int limit108 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step108 > 0 && _i <= limit108) || (step108 < 0 && _i >= limit108) ;_i = ((int)(0 + _i + step108))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 313;BA.debugLine="F.Position =i";
Debug.ShouldStop(16777216);
__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 314;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select CA";
Debug.ShouldStop(33554432);
__ref.getField(false,"_h" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))}))));
 BA.debugLineNum = 315;BA.debugLine="h.Position=0";
Debug.ShouldStop(67108864);
__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 316;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
Debug.ShouldStop(134217728);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS"))))}, "**",0, 0)),(__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)),(__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))),(__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 317;BA.debugLine="h.Close";
Debug.ShouldStop(268435456);
__ref.getField(false,"_h" /*RemoteObject*/ ).runVoidMethod ("Close");
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 319;BA.debugLine="f.Close";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_f" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 321;BA.debugLine="e.Close";
Debug.ShouldStop(1);
__ref.getField(false,"_e" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 323;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(4);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 324;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
Debug.ShouldStop(8);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 325;BA.debugLine="cantidad.Text = \"\"";
Debug.ShouldStop(16);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 326;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
Debug.ShouldStop(32);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 327;BA.debugLine="c.Position=0";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 328;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(128);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 329;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
Debug.ShouldStop(256);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 330;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
Debug.ShouldStop(512);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 331;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(1024);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }else {
 BA.debugLineNum = 333;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(4096);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 334;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(8192);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 335;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(16384);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 336;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 337;BA.debugLine="c.Position=0";
Debug.ShouldStop(65536);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 338;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(131072);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 339;BA.debugLine="c.Close";
Debug.ShouldStop(262144);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 340;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))));
 BA.debugLineNum = 341;BA.debugLine="c.Position=0";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 342;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(2097152);
__ref.setField ("_cl_ruta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))));
 BA.debugLineNum = 343;BA.debugLine="c.Close";
Debug.ShouldStop(4194304);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 344;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 345;BA.debugLine="c.Position=0";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 346;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(33554432);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 347;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(67108864);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN, PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {12},new Object[] {(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_l_precio" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)),(__ref.getField(false,"_l_precio" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(__ref.getField(true,"_preciosin" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 348;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
Debug.ShouldStop(134217728);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 349;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 350;BA.debugLine="c.Position=0";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 351;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(1073741824);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 352;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
Debug.ShouldStop(-2147483648);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 353;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
Debug.ShouldStop(1);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 354;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(2);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 355;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(4);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }}}}
;
 BA.debugLineNum = 357;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _i_fotol_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("i_fotol_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,543);
if (RapidSub.canDelegate("i_fotol_click")) { return __ref.runUserSub(false, "c_pedidos","i_fotol_click", __ref);}
 BA.debugLineNum = 543;BA.debugLine="Sub i_fotol_Click";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 544;BA.debugLine="i_fotol.Visible = False";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_i_fotol" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"False"));
 BA.debugLineNum = 546;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _img_prod_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("img_prod_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,538);
if (RapidSub.canDelegate("img_prod_click")) { return __ref.runUserSub(false, "c_pedidos","img_prod_click", __ref);}
 BA.debugLineNum = 538;BA.debugLine="Sub img_prod_Click";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 539;BA.debugLine="i_fotol.Visible = True";
Debug.ShouldStop(67108864);
__ref.getField(false,"_i_fotol" /*RemoteObject*/ ).runMethod(true,"setVisible",c_pedidos.__c.getField(true,"True"));
 BA.debugLineNum = 540;BA.debugLine="i_fotol.Bitmap = LoadBitmap(ruta,\"1.jpg\")";
Debug.ShouldStop(134217728);
__ref.getField(false,"_i_fotol" /*RemoteObject*/ ).runMethod(false,"setBitmap",(c_pedidos.__c.runMethod(false,"LoadBitmap",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("1.jpg"))).getObject()));
 BA.debugLineNum = 542;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
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_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,59);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_pedidos","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 59;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 60;BA.debugLine="Return Me";
Debug.ShouldStop(134217728);
if (true) return __ref;
 BA.debugLineNum = 61;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _nopromo_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("nopromo_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,554);
if (RapidSub.canDelegate("nopromo_click")) { return __ref.runUserSub(false, "c_pedidos","nopromo_click", __ref);}
 BA.debugLineNum = 554;BA.debugLine="Sub nopromo_Click";
Debug.ShouldStop(512);
 BA.debugLineNum = 555;BA.debugLine="If cantidad.Text = \"\" Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString(""))) { 
 BA.debugLineNum = 556;BA.debugLine="Msgbox(\"Cantidad no puede ser 0\",\"Cantidad\") 'ig";
Debug.ShouldStop(2048);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Cantidad no puede ser 0")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("Cantidad"))),__ref.getField(false, "ba"));
 }else 
{ BA.debugLineNum = 557;BA.debugLine="Else If cantidad.Text > l_bodega.Text Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"getText")))) { 
 BA.debugLineNum = 558;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
Debug.ShouldStop(8192);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Exede la existencia")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 }else {
 BA.debugLineNum = 560;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(32768);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 561;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(65536);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 562;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(131072);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 563;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
Debug.ShouldStop(262144);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 564;BA.debugLine="c.Position=0";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 565;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(1048576);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 566;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
Debug.ShouldStop(2097152);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 567;BA.debugLine="c.Position=0";
Debug.ShouldStop(4194304);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 568;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(8388608);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 569;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(16777216);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {RemoteObject.createImmutable(("COACALCO")),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 570;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
Debug.ShouldStop(33554432);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 571;BA.debugLine="cantidad.Text = \"\"";
Debug.ShouldStop(67108864);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 572;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
Debug.ShouldStop(134217728);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Productos")));
 }}
;
 BA.debugLineNum = 574;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _p_pedido_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("p_pedido_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,576);
if (RapidSub.canDelegate("p_pedido_click")) { return __ref.runUserSub(false, "c_pedidos","p_pedido_click", __ref);}
 BA.debugLineNum = 576;BA.debugLine="Private Sub p_pedido_Click";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 578;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _terminar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("Terminar_Click (c_pedidos) ","c_pedidos",13,__ref.getField(false, "ba"),__ref,364);
if (RapidSub.canDelegate("terminar_click")) { return __ref.runUserSub(false, "c_pedidos","terminar_click", __ref);}
int _i = 0;
 BA.debugLineNum = 364;BA.debugLine="Sub Terminar_Click";
Debug.ShouldStop(2048);
 BA.debugLineNum = 365;BA.debugLine="If cantidad.Text = \"\" Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString(""))) { 
 BA.debugLineNum = 366;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(8192);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 }else 
{ BA.debugLineNum = 367;BA.debugLine="ELSE If cantidad.Text > l_bodega.Text Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_l_bodega" /*RemoteObject*/ ).runMethod(true,"getText")))) { 
 BA.debugLineNum = 368;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
Debug.ShouldStop(32768);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Exede la existencia")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 }else 
{ BA.debugLineNum = 369;BA.debugLine="Else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(true,"_promo_c" /*RemoteObject*/ )),BA.numberCast(double.class, 0)) && RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 370;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(131072);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from PROIDID")));
 BA.debugLineNum = 371;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(262144);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PROIDID VALUES (?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 372;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select count";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select count(*) as CUANTOSD from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND CAT_DP_TIPO = 1)"))));
 BA.debugLineNum = 373;BA.debugLine="c.Position =0";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 374;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOSD"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 375;BA.debugLine="Msgbox(\"No tiene venta el cliente para la promo";
Debug.ShouldStop(4194304);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("No tiene venta el cliente para la promo")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 }else {
 BA.debugLineNum = 377;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select sum(pe_cant) As TOT_ART_PROMO, sum(PE_COSTO_TOT) as COSTO_TOT from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND CAT_DP_PRECIO > 1)"))));
 BA.debugLineNum = 378;BA.debugLine="C.Position =0";
Debug.ShouldStop(33554432);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 379;BA.debugLine="TOT_ART_PROMO = C.GetString(\"TOT_ART_PROMO\")";
Debug.ShouldStop(67108864);
__ref.setField ("_tot_art_promo" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOT_ART_PROMO"))));
 BA.debugLineNum = 380;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
Debug.ShouldStop(134217728);
__ref.setField ("_costo_tot" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("COSTO_TOT"))));
 BA.debugLineNum = 381;BA.debugLine="C.Close";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 382;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select count(*) as CUANTOSD from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND (CAT_DP_PRECIO = 0.01 or CAT_DP_PRECIO = 1 OR CAT_DP_PRECIO = 0) AND CAT_DP_TIPO = 1)"))));
 BA.debugLineNum = 383;BA.debugLine="c.Position =0";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 384;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOSD"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 385;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
Debug.ShouldStop(1);
__ref.setField ("_tot_art_promor" /*RemoteObject*/ ,BA.ObjectToString("0"));
 }else {
 BA.debugLineNum = 387;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select sum(pe_cant) As TOT_ART_PROMO, sum(PE_COSTO_TOT) as COSTO_TOT from pedido where PE_CLIENTE IN (Select CUENTA from cuentaa)  and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID) AND (CAT_DP_PRECIO = 0.01 or CAT_DP_PRECIO = 1 OR CAT_DP_PRECIO = 0) AND CAT_DP_TIPO = 1)"))));
 BA.debugLineNum = 388;BA.debugLine="C.Position =0";
Debug.ShouldStop(8);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 389;BA.debugLine="TOT_ART_PROMOR = C.GetString(\"TOT_ART_PROMO\")";
Debug.ShouldStop(16);
__ref.setField ("_tot_art_promor" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOT_ART_PROMO"))));
 };
 BA.debugLineNum = 391;BA.debugLine="C.Close";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 392;BA.debugLine="PROMO_C = PROMO_C * cantidad.Text";
Debug.ShouldStop(128);
__ref.setField ("_promo_c" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_promo_c" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)));
 BA.debugLineNum = 393;BA.debugLine="PROMO_CR = PROMO_CR * cantidad.Text";
Debug.ShouldStop(256);
__ref.setField ("_promo_cr" /*RemoteObject*/ ,BA.NumberToString(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_promo_cr" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)));
 BA.debugLineNum = 394;BA.debugLine="If  TOT_ART_PROMO = PROMO_C And TOT_ART_PROMOR";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_tot_art_promo" /*RemoteObject*/ ),__ref.getField(true,"_promo_c" /*RemoteObject*/ )) && RemoteObject.solveBoolean("=",__ref.getField(true,"_tot_art_promor" /*RemoteObject*/ ),__ref.getField(true,"_promo_cr" /*RemoteObject*/ ))) { 
 BA.debugLineNum = 398;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
Debug.ShouldStop(8192);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE PEDIDO SET PE_CEDIS = (?) WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) and pe_proid In (Select cat_dp_idprod from CAT_DETALLES_PAQ WHERE CAT_DP_ID In (Select PROIDID from PROIDID))")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 399;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
Debug.ShouldStop(16384);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_ID, CAT_DP_PRECIO, CAT_DP_PRECIO_SIMPTOS, CAT_DP_IDPROD FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) AND CAT_DP_PRECIO > 1"))));
 BA.debugLineNum = 400;BA.debugLine="If D.RowCount>0 Then";
Debug.ShouldStop(32768);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 401;BA.debugLine="For i=0 To D.RowCount -1";
Debug.ShouldStop(65536);
{
final int step34 = 1;
final int limit34 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step34 > 0 && _i <= limit34) || (step34 < 0 && _i >= limit34) ;_i = ((int)(0 + _i + step34))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 402;BA.debugLine="D.Position=i";
Debug.ShouldStop(131072);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 403;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
Debug.ShouldStop(262144);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE PEDIDO SET PE_COSTOU = (?), PE_COSTO_TOT = PE_CANT * (?) , PE_COSTO_SIN = (?) WHERE PE_PROID = (?) And PE_CEDIS In (Select PROIDID from PROIDID) AND  PE_CLIENTE IN (Select CUENTA from cuentaa) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {4},new Object[] {(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO_SIMPTOS")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 406;BA.debugLine="D.Close";
Debug.ShouldStop(2097152);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 407;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
Debug.ShouldStop(4194304);
__ref.getField(false,"_d" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_ID, CAT_DP_PRECIO, CAT_DP_PRECIO_SIMPTOS, CAT_DP_IDPROD FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) AND (CAT_DP_PRECIO = 0.01 or CAT_DP_PRECIO = 1 OR CAT_DP_PRECIO = 0) AND CAT_DP_TIPO = 1"))));
 BA.debugLineNum = 408;BA.debugLine="If D.RowCount>0 Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 409;BA.debugLine="For i=0 To D.RowCount -1";
Debug.ShouldStop(16777216);
{
final int step42 = 1;
final int limit42 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step42 > 0 && _i <= limit42) || (step42 < 0 && _i >= limit42) ;_i = ((int)(0 + _i + step42))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 410;BA.debugLine="D.Position=i";
Debug.ShouldStop(33554432);
__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 411;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
Debug.ShouldStop(67108864);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE PEDIDO SET PE_COSTOU = (?), PE_COSTO_TOT = PE_CANT * (?) , PE_COSTO_SIN = (?) WHERE PE_PROID = (?) And PE_CEDIS In (Select PROIDID from PROIDID) AND  PE_CLIENTE IN (Select CUENTA from cuentaa) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {4},new Object[] {(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO_SIMPTOS")))),(__ref.getField(false,"_d" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD"))))})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 414;BA.debugLine="D.Close";
Debug.ShouldStop(536870912);
__ref.getField(false,"_d" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 415;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(1073741824);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 416;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(-2147483648);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 417;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(1);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 418;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 419;BA.debugLine="c.Position=0";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 420;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(8);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 421;BA.debugLine="c.Close";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 422;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
Debug.ShouldStop(32);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))));
 BA.debugLineNum = 423;BA.debugLine="c.Position=0";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 424;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(128);
__ref.setField ("_cl_ruta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))));
 BA.debugLineNum = 425;BA.debugLine="c.Close";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 426;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
Debug.ShouldStop(512);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 427;BA.debugLine="c.Position=0";
Debug.ShouldStop(1024);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 428;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(2048);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 430;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select cou";
Debug.ShouldStop(8192);
__ref.getField(false,"_e" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) and CAT_DP_TIPO = 0 "))));
 BA.debugLineNum = 432;BA.debugLine="e.Position =0";
Debug.ShouldStop(32768);
__ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 433;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS")))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 434;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CA";
Debug.ShouldStop(131072);
__ref.getField(false,"_f" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_IDPROD, CAT_DP_PZAS,CAT_DP_PRECIO FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) and CAT_DP_TIPO = 0 "))));
 BA.debugLineNum = 437;BA.debugLine="If f.RowCount>0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 438;BA.debugLine="For i=0 To f.RowCount -1";
Debug.ShouldStop(2097152);
{
final int step67 = 1;
final int limit67 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step67 > 0 && _i <= limit67) || (step67 < 0 && _i >= limit67) ;_i = ((int)(0 + _i + step67))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 439;BA.debugLine="f.Position=i";
Debug.ShouldStop(4194304);
__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 440;BA.debugLine="precio_Cero = f.GetString(\"CAT_DP_PRECIO\")";
Debug.ShouldStop(8388608);
__ref.setField ("_precio_cero" /*RemoteObject*/ ,__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO"))));
 BA.debugLineNum = 441;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select";
Debug.ShouldStop(16777216);
__ref.getField(false,"_h" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))}))));
 BA.debugLineNum = 442;BA.debugLine="h.Position=0";
Debug.ShouldStop(33554432);
__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 443;BA.debugLine="Log(111)";
Debug.ShouldStop(67108864);
c_pedidos.__c.runVoidMethod ("LogImpl","517498191",BA.NumberToString(111),0);
 BA.debugLineNum = 444;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
Debug.ShouldStop(134217728);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_precio_cero" /*RemoteObject*/ )),BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "**",0, 0)),(__ref.getField(true,"_precio_cero" /*RemoteObject*/ )),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)),(__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))),(__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 445;BA.debugLine="h.Close";
Debug.ShouldStop(268435456);
__ref.getField(false,"_h" /*RemoteObject*/ ).runVoidMethod ("Close");
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 448;BA.debugLine="f.Close";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_f" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 450;BA.debugLine="e.Close";
Debug.ShouldStop(2);
__ref.getField(false,"_e" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 451;BA.debugLine="Log(222)";
Debug.ShouldStop(4);
c_pedidos.__c.runVoidMethod ("LogImpl","517498199",BA.NumberToString(222),0);
 BA.debugLineNum = 452;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
Debug.ShouldStop(8);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 453;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update c";
Debug.ShouldStop(16);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 }else {
 BA.debugLineNum = 455;BA.debugLine="Msgbox(\"Tiene \" & TOT_ART_PROMO & \" \" & TOT_AR";
Debug.ShouldStop(64);
c_pedidos.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Tiene "),__ref.getField(true,"_tot_art_promo" /*RemoteObject*/ ),RemoteObject.createImmutable(" "),__ref.getField(true,"_tot_art_promor" /*RemoteObject*/ ),RemoteObject.createImmutable(" y necesita "),__ref.getField(true,"_promo_c" /*RemoteObject*/ ),RemoteObject.createImmutable(" "),__ref.getField(true,"_promo_cr" /*RemoteObject*/ ),RemoteObject.createImmutable(" Para la Promo. ")))),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("ADVERTENCIA"))),__ref.getField(false, "ba"));
 };
 };
 BA.debugLineNum = 458;BA.debugLine="cantidad.Text = \"\"";
Debug.ShouldStop(512);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 459;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(1024);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 }else 
{ BA.debugLineNum = 460;BA.debugLine="else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_l_marca" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(false,"_l_tipo" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("PROMOS")) && RemoteObject.solveBoolean("=",__ref.getField(true,"_promo_c" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 461;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(4096);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from PROIDID")));
 BA.debugLineNum = 462;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(8192);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO PROIDID VALUES (?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 463;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 464;BA.debugLine="c.Position=0";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 465;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(65536);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 466;BA.debugLine="c.Close";
Debug.ShouldStop(131072);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 467;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(262144);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 468;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(524288);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 469;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(1048576);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 470;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
Debug.ShouldStop(2097152);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))));
 BA.debugLineNum = 471;BA.debugLine="c.Position=0";
Debug.ShouldStop(4194304);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 472;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(8388608);
__ref.setField ("_cl_ruta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))));
 BA.debugLineNum = 473;BA.debugLine="c.Close";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 474;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
Debug.ShouldStop(33554432);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 475;BA.debugLine="c.Position=0";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 476;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(134217728);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 478;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count";
Debug.ShouldStop(536870912);
__ref.getField(false,"_e" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) "))));
 BA.debugLineNum = 479;BA.debugLine="e.Position =0";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 480;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_e" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS")))),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 481;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
Debug.ShouldStop(1);
__ref.getField(false,"_f" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_DP_IDPROD, CAT_DP_PZAS, CAT_DP_PRECIO FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID)"))));
 BA.debugLineNum = 482;BA.debugLine="For i =0 To f.RowCount -1";
Debug.ShouldStop(2);
{
final int step110 = 1;
final int limit110 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step110 > 0 && _i <= limit110) || (step110 < 0 && _i >= limit110) ;_i = ((int)(0 + _i + step110))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 483;BA.debugLine="F.Position =i";
Debug.ShouldStop(4);
__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 484;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select CA";
Debug.ShouldStop(8);
__ref.getField(false,"_h" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))}))));
 BA.debugLineNum = 485;BA.debugLine="h.Position=0";
Debug.ShouldStop(16);
__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 486;BA.debugLine="Log(333)";
Debug.ShouldStop(32);
c_pedidos.__c.runVoidMethod ("LogImpl","517498234",BA.NumberToString(333),0);
 BA.debugLineNum = 487;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
Debug.ShouldStop(64);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS"))))}, "**",0, 0)),(__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PRECIO")))),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_PZAS")))),BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)),(__ref.getField(false,"_h" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_NOMBRE")))),(__ref.getField(false,"_f" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_DP_IDPROD")))),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 488;BA.debugLine="h.Close";
Debug.ShouldStop(128);
__ref.getField(false,"_h" /*RemoteObject*/ ).runVoidMethod ("Close");
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 490;BA.debugLine="f.Close";
Debug.ShouldStop(512);
__ref.getField(false,"_f" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 492;BA.debugLine="e.Close";
Debug.ShouldStop(2048);
__ref.getField(false,"_e" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 493;BA.debugLine="Log(444)";
Debug.ShouldStop(4096);
c_pedidos.__c.runVoidMethod ("LogImpl","517498241",BA.NumberToString(444),0);
 BA.debugLineNum = 494;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(8192);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {11},new Object[] {(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 495;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
Debug.ShouldStop(16384);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 496;BA.debugLine="cantidad.Text = \"\"";
Debug.ShouldStop(32768);
__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 497;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
Debug.ShouldStop(65536);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 498;BA.debugLine="c.Position=0";
Debug.ShouldStop(131072);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 499;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(262144);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 500;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
Debug.ShouldStop(524288);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 501;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
Debug.ShouldStop(1048576);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 502;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(2097152);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 }else {
 BA.debugLineNum = 504;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(8388608);
c_pedidos.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 505;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(16777216);
__ref.setField ("_sdate" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 506;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(33554432);
__ref.setField ("_stime" /*RemoteObject*/ ,c_pedidos.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(c_pedidos.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 507;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("Select CUENTA from cuentaa"))));
 BA.debugLineNum = 508;BA.debugLine="c.Position=0";
Debug.ShouldStop(134217728);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 509;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
Debug.ShouldStop(268435456);
__ref.setField ("_clie_id" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA"))));
 BA.debugLineNum = 510;BA.debugLine="c.Close";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 511;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)"))));
 BA.debugLineNum = 512;BA.debugLine="c.Position=0";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 513;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
Debug.ShouldStop(1);
__ref.setField ("_cl_ruta" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA"))));
 BA.debugLineNum = 514;BA.debugLine="c.Close";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 515;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 516;BA.debugLine="c.Position=0";
Debug.ShouldStop(8);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 517;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(16);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 BA.debugLineNum = 518;BA.debugLine="Log(555)";
Debug.ShouldStop(32);
c_pedidos.__c.runVoidMethod ("LogImpl","517498266",BA.NumberToString(555),0);
 BA.debugLineNum = 519;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(64);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  PEDIDO (PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO,PE_RUTA,PE_COSTO_SIN,PE_FOLIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {12},new Object[] {(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),BA.numberCast(double.class, __ref.getField(false,"_l_precio" /*RemoteObject*/ ).runMethod(true,"getText"))}, "*",0, 0)),(__ref.getField(false,"_l_precio" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_desc" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(__ref.getField(true,"_preciosin" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_tipo_venta" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 520;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
Debug.ShouldStop(128);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 521;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, SUM(PE_COSTO_SIN) AS TOTAL_CLIE_SIN FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)"))));
 BA.debugLineNum = 522;BA.debugLine="c.Position=0";
Debug.ShouldStop(512);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 523;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(1024);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)")));
 BA.debugLineNum = 524;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
Debug.ShouldStop(2048);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT,PC_ALMACEN,PC_RUTA,PC_COSTO_SIN) VALUES (?,?,?,?,?,?,?,?,?,?)")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {10},new Object[] {(__ref.getField(true,"_clie_id" /*RemoteObject*/ )),(RemoteObject.concat(__ref.getField(true,"_sdate" /*RemoteObject*/ ),__ref.getField(true,"_stime" /*RemoteObject*/ ))),(__ref.getField(true,"_usuario" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CANT_CLIE")))),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE")))),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lon_gps" /*RemoteObject*/ )),(c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(true,"_lat_gps" /*RemoteObject*/ )),(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(__ref.getField(true,"_cl_ruta" /*RemoteObject*/ )),(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("TOTAL_CLIE_SIN"))))})))));
 BA.debugLineNum = 525;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
Debug.ShouldStop(4096);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)")));
 BA.debugLineNum = 526;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(8192);
c_pedidos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ")),(Object)(c_pedidos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(__ref.getField(true,"_almacen" /*RemoteObject*/ )),(__ref.getField(false,"_l_proid" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_cantidad" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 527;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(16384);
c_pedidos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 }}}}
;
 BA.debugLineNum = 529;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}