package gunav2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class c_pedidos extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "gunav2.keymon.com.mx.c_pedidos");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.c_pedidos.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _ruta = "";
public anywheresoftware.b4a.sql.SQL _skmt = null;
public anywheresoftware.b4a.objects.Timer _t3 = null;
public anywheresoftware.b4a.phone.Phone _p = null;
public anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _e = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _h = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _cc = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _dd = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tipo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_sub = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_marca = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_desc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_precio = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_bodega = null;
public anywheresoftware.b4a.objects.EditTextWrapper _cantidad = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guardar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _terminar = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _img_prod = null;
public byte[] _img_paso = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_proid = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public anywheresoftware.b4a.objects.LabelWrapper _t_venta = null;
public String _promo_c = "";
public anywheresoftware.b4a.objects.ImageViewWrapper _i_fotol = null;
public anywheresoftware.b4a.objects.ButtonWrapper _desc_promo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _nopromo = null;
public String _tot_art_promo = "";
public String _cambio = "";
public String _costo_tot = "";
public String _almacen = "";
public String _preciosin = "";
public String _cl_ruta = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public String _tot_art_promor = "";
public String _promo_cr = "";
public String _total_promo = "";
public String _hccp_cant = "";
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public String _precio_cero = "";
public String _bonsabor = "";
public String _bonsabor2 = "";
public gunav2.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_pedido = null;
public String _tipo_venta = "";
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(gunav2.keymon.com.mx.c_pedidos __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=78118912;
 //BA.debugLineNum = 78118912;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=78118913;
 //BA.debugLineNum = 78118913;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=78118914;
 //BA.debugLineNum = 78118914;BA.debugLine="End Sub";
return null;
}
public String  _gps_locationchanged(gunav2.keymon.com.mx.c_pedidos __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=78381056;
 //BA.debugLineNum = 78381056;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=78381059;
 //BA.debugLineNum = 78381059;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
RDebugUtils.currentLine=78249984;
 //BA.debugLineNum = 78249984;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=78249985;
 //BA.debugLineNum = 78249985;BA.debugLine="tgl.Initialize";
__ref._tgl /*com.rootsoft.togglelibrary.ToggleLibrary*/ .Initialize(ba);
RDebugUtils.currentLine=78249986;
 //BA.debugLineNum = 78249986;BA.debugLine="BONSABOR = 0";
__ref._bonsabor /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=78249987;
 //BA.debugLineNum = 78249987;BA.debugLine="BONSABOR2 = 0";
__ref._bonsabor2 /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=78249988;
 //BA.debugLineNum = 78249988;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=78249989;
 //BA.debugLineNum = 78249989;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=78249990;
 //BA.debugLineNum = 78249990;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=78249992;
 //BA.debugLineNum = 78249992;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=78249993;
 //BA.debugLineNum = 78249993;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select  ID_AL";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select  ID_ALMACEN from CAT_ALMACEN")));
RDebugUtils.currentLine=78249994;
 //BA.debugLineNum = 78249994;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78249995;
 //BA.debugLineNum = 78249995;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
__ref._almacen /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("ID_ALMACEN");
RDebugUtils.currentLine=78249996;
 //BA.debugLineNum = 78249996;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78249997;
 //BA.debugLineNum = 78249997;BA.debugLine="i_fotol.Visible = False";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=78249998;
 //BA.debugLineNum = 78249998;BA.debugLine="sb.Initialize";
__ref._sb /*anywheresoftware.b4a.keywords.StringBuilderWrapper*/ .Initialize();
RDebugUtils.currentLine=78249999;
 //BA.debugLineNum = 78249999;BA.debugLine="p.Shell(\"ping -c1 -W1 177.244.63.54\",Null, sb,Nul";
__ref._p /*anywheresoftware.b4a.phone.Phone*/ .Shell("ping -c1 -W1 177.244.63.54",(String[])(__c.Null),(java.lang.StringBuilder)(__ref._sb /*anywheresoftware.b4a.keywords.StringBuilderWrapper*/ .getObject()),(java.lang.StringBuilder)(__c.Null));
RDebugUtils.currentLine=78250000;
 //BA.debugLineNum = 78250000;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(__ref._ruta /*String*/ ,"kmt.db",__c.True);
RDebugUtils.currentLine=78250001;
 //BA.debugLineNum = 78250001;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select CAT_G";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("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 "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" where CAT_GP_NOMBRE In (Select PDESC from PROID)"))));
RDebugUtils.currentLine=78250002;
 //BA.debugLineNum = 78250002;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250003;
 //BA.debugLineNum = 78250003;BA.debugLine="L_PROID.Text = c.GetString(\"CAT_GP_ID\")";
__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID")));
RDebugUtils.currentLine=78250004;
 //BA.debugLineNum = 78250004;BA.debugLine="l_tipo.Text = c.GetString(\"CAT_GP_TIPO\")";
__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_TIPO")));
RDebugUtils.currentLine=78250005;
 //BA.debugLineNum = 78250005;BA.debugLine="l_sub.Text = c.GetString(\"CAT_GP_SUBTIPO\")";
__ref._l_sub /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_SUBTIPO")));
RDebugUtils.currentLine=78250006;
 //BA.debugLineNum = 78250006;BA.debugLine="l_marca.Text = c.GetString(\"CAT_GP_CLASIF\")";
__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_CLASIF")));
RDebugUtils.currentLine=78250007;
 //BA.debugLineNum = 78250007;BA.debugLine="l_desc.Text = c.GetString(\"CAT_GP_NOMBRE\")";
__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")));
RDebugUtils.currentLine=78250008;
 //BA.debugLineNum = 78250008;BA.debugLine="l_precio.Text = c.GetDouble(\"CAT_GP_PRECIO\")";
__ref._l_precio /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetDouble("CAT_GP_PRECIO")));
RDebugUtils.currentLine=78250009;
 //BA.debugLineNum = 78250009;BA.debugLine="l_bodega.Text = c.GetString(\"CAT_GP_ALMACEN\")";
__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ALMACEN")));
RDebugUtils.currentLine=78250010;
 //BA.debugLineNum = 78250010;BA.debugLine="IMG_PASO = c.GetBlob(\"CAT_GP_IMG\")";
__ref._img_paso /*byte[]*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetBlob("CAT_GP_IMG");
RDebugUtils.currentLine=78250011;
 //BA.debugLineNum = 78250011;BA.debugLine="PROMO_C = c.GetString(\"CAT_GP_STS\")";
__ref._promo_c /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_STS");
RDebugUtils.currentLine=78250012;
 //BA.debugLineNum = 78250012;BA.debugLine="cambio = c.GetString(\"CAT_GP_DEV\")";
__ref._cambio /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_DEV");
RDebugUtils.currentLine=78250013;
 //BA.debugLineNum = 78250013;BA.debugLine="preciosin = c.GetString(\"CAT_GP_IMP2\")";
__ref._preciosin /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_IMP2");
RDebugUtils.currentLine=78250014;
 //BA.debugLineNum = 78250014;BA.debugLine="PROMO_CR = c.GetString(\"CAT_GP_IMP1\")";
__ref._promo_cr /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_IMP1");
RDebugUtils.currentLine=78250015;
 //BA.debugLineNum = 78250015;BA.debugLine="cambio = \"0\"";
__ref._cambio /*String*/  = "0";
RDebugUtils.currentLine=78250017;
 //BA.debugLineNum = 78250017;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery2(\"select count";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) as CUANTOS FROM pedido WHERE PE_CEDIS = ? AND PE_CLIENTE  IN (Select cuenta from cuentaa) ",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID")})));
RDebugUtils.currentLine=78250018;
 //BA.debugLineNum = 78250018;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250019;
 //BA.debugLineNum = 78250019;BA.debugLine="If e.GetString(\"CUANTOS\") = 0 Then";
if ((__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78250020;
 //BA.debugLineNum = 78250020;BA.debugLine="If l_marca.text = \"PROMOS\" And l_tipo.Text =\"PRO";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS")) { 
RDebugUtils.currentLine=78250021;
 //BA.debugLineNum = 78250021;BA.debugLine="DESC_PROMO.Visible = True";
__ref._desc_promo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=78250022;
 //BA.debugLineNum = 78250022;BA.debugLine="CC=B4XPages.MainPage.skmt.ExecQuery2(\"select co";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) as CUANTOS FROM PROMOS_COMP WHERE CAT_PA_ID = ?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID")})));
RDebugUtils.currentLine=78250023;
 //BA.debugLineNum = 78250023;BA.debugLine="CC.Position =0";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250024;
 //BA.debugLineNum = 78250024;BA.debugLine="If CC.GetString(\"CUANTOS\") = 0 Then";
if ((__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78250025;
 //BA.debugLineNum = 78250025;BA.debugLine="l_bodega.Text = \"0\" ' se modifica a cero para";
__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("0"));
 }else {
RDebugUtils.currentLine=78250027;
 //BA.debugLineNum = 78250027;BA.debugLine="CC.Close";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78250028;
 //BA.debugLineNum = 78250028;BA.debugLine="CC=B4XPages.MainPage.skmt.ExecQuery2(\"select C";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_PA_MAXPROM, CAT_PA_MAXPROMREC, CAT_PA_MAXPROMCLIE FROM PROMOS_COMP WHERE CAT_PA_ID = ?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID")})));
RDebugUtils.currentLine=78250029;
 //BA.debugLineNum = 78250029;BA.debugLine="CC.Position =0";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250031;
 //BA.debugLineNum = 78250031;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT C";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_CLIENTE_CANT_PROMOS WHERE HCCP_CLIENTE IN (Select cuenta from cuentaa) AND HCCP_PROMO =?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID")})));
RDebugUtils.currentLine=78250032;
 //BA.debugLineNum = 78250032;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250033;
 //BA.debugLineNum = 78250033;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78250034;
 //BA.debugLineNum = 78250034;BA.debugLine="HCCP_CANT = 0";
__ref._hccp_cant /*String*/  = BA.NumberToString(0);
 }else {
RDebugUtils.currentLine=78250036;
 //BA.debugLineNum = 78250036;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78250037;
 //BA.debugLineNum = 78250037;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT HCCP_CANT FROM HIST_CLIENTE_CANT_PROMOS WHERE HCCP_CLIENTE IN (Select cuenta from cuentaa) AND HCCP_PROMO =?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_ID")})));
RDebugUtils.currentLine=78250038;
 //BA.debugLineNum = 78250038;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250039;
 //BA.debugLineNum = 78250039;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
__ref._hccp_cant /*String*/  = __ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HCCP_CANT");
RDebugUtils.currentLine=78250040;
 //BA.debugLineNum = 78250040;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=78250042;
 //BA.debugLineNum = 78250042;BA.debugLine="BONSABOR = HCCP_CANT";
__ref._bonsabor /*String*/  = __ref._hccp_cant /*String*/ ;
RDebugUtils.currentLine=78250043;
 //BA.debugLineNum = 78250043;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT C";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select cuenta from cuentaa) AND HVD_PRONOMBRE =?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")})));
RDebugUtils.currentLine=78250044;
 //BA.debugLineNum = 78250044;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250045;
 //BA.debugLineNum = 78250045;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78250046;
 //BA.debugLineNum = 78250046;BA.debugLine="HCCP_CANT = 0";
__ref._hccp_cant /*String*/  = BA.NumberToString(0);
 }else {
RDebugUtils.currentLine=78250048;
 //BA.debugLineNum = 78250048;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78250049;
 //BA.debugLineNum = 78250049;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT SUM(HVD_CANT) AS HCCP_CANT FROM HIST_VENTAS WHERE HVD_CLIENTE IN (Select cuenta from cuentaa) AND HVD_PRONOMBRE =?",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")})));
RDebugUtils.currentLine=78250050;
 //BA.debugLineNum = 78250050;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250051;
 //BA.debugLineNum = 78250051;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
__ref._hccp_cant /*String*/  = __ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HCCP_CANT");
RDebugUtils.currentLine=78250052;
 //BA.debugLineNum = 78250052;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=78250054;
 //BA.debugLineNum = 78250054;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2($\"Select";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("Select COUNT(*) AS CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN  (Select cuenta from cuentaa) AND  PE_PROID IN (select CAT_GP_ID   from "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" where CAT_GP_CLASIF = ?) "),new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")})));
RDebugUtils.currentLine=78250055;
 //BA.debugLineNum = 78250055;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250056;
 //BA.debugLineNum = 78250056;BA.debugLine="BONSABOR2 = DD.GetString(\"CUANTOS\")";
__ref._bonsabor2 /*String*/  = __ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS");
RDebugUtils.currentLine=78250057;
 //BA.debugLineNum = 78250057;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78250058;
 //BA.debugLineNum = 78250058;BA.debugLine="TOTAL_PROMO = CC.GetString(\"CAT_PA_MAXPROMCLIE";
__ref._total_promo /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_PA_MAXPROMCLIE")))-(double)(Double.parseDouble(__ref._hccp_cant /*String*/ )));
RDebugUtils.currentLine=78250059;
 //BA.debugLineNum = 78250059;BA.debugLine="If HCCP_CANT = 0 Then";
if ((__ref._hccp_cant /*String*/ ).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78250060;
 //BA.debugLineNum = 78250060;BA.debugLine="l_bodega.Text = CC.GetString(\"CAT_PA_MAXPROM\"";
__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_PA_MAXPROM")));
 }else 
{RDebugUtils.currentLine=78250061;
 //BA.debugLineNum = 78250061;BA.debugLine="Else IF TOTAL_PROMO > CC.GetString(\"CAT_PA_MAX";
if ((double)(Double.parseDouble(__ref._total_promo /*String*/ ))>(double)(Double.parseDouble(__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_PA_MAXPROMREC")))) { 
RDebugUtils.currentLine=78250062;
 //BA.debugLineNum = 78250062;BA.debugLine="l_bodega.Text = 	CC.GetString(\"CAT_PA_MAXPROM";
__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_PA_MAXPROMREC")));
 }else {
RDebugUtils.currentLine=78250064;
 //BA.debugLineNum = 78250064;BA.debugLine="l_bodega.Text = TOTAL_PROMO";
__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._total_promo /*String*/ ));
 }}
;
 };
 }else {
RDebugUtils.currentLine=78250068;
 //BA.debugLineNum = 78250068;BA.debugLine="DESC_PROMO.Visible = False";
__ref._desc_promo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=78250070;
 //BA.debugLineNum = 78250070;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78250071;
 //BA.debugLineNum = 78250071;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CASE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78250072;
 //BA.debugLineNum = 78250072;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78250073;
 //BA.debugLineNum = 78250073;BA.debugLine="t_venta.Text = c.GetString(\"TOTAL_CLIE\")";
__ref._t_venta /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")));
RDebugUtils.currentLine=78250074;
 //BA.debugLineNum = 78250074;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78250075;
 //BA.debugLineNum = 78250075;BA.debugLine="Terminar.Visible = True";
__ref._terminar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=78250076;
 //BA.debugLineNum = 78250076;BA.debugLine="guardar.Visible = True";
__ref._guardar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=78250077;
 //BA.debugLineNum = 78250077;BA.debugLine="cantidad.Visible = True";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=78250078;
 //BA.debugLineNum = 78250078;BA.debugLine="If cambio = \"1\" Then";
if ((__ref._cambio /*String*/ ).equals("1")) { 
RDebugUtils.currentLine=78250079;
 //BA.debugLineNum = 78250079;BA.debugLine="nopromo.Visible = True";
__ref._nopromo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
 }else {
RDebugUtils.currentLine=78250081;
 //BA.debugLineNum = 78250081;BA.debugLine="nopromo.Visible = False";
__ref._nopromo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=78250083;
 //BA.debugLineNum = 78250083;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
RDebugUtils.currentLine=78250084;
 //BA.debugLineNum = 78250084;BA.debugLine="out = File.OpenOutput(ruta, \"1.jpg\", False)";
_out = __c.File.OpenOutput(__ref._ruta /*String*/ ,"1.jpg",__c.False);
RDebugUtils.currentLine=78250085;
 //BA.debugLineNum = 78250085;BA.debugLine="out.WriteBytes(IMG_PASO, 0, IMG_PASO.Length)";
_out.WriteBytes(__ref._img_paso /*byte[]*/ ,(int) (0),__ref._img_paso /*byte[]*/ .length);
RDebugUtils.currentLine=78250086;
 //BA.debugLineNum = 78250086;BA.debugLine="out.Close";
_out.Close();
RDebugUtils.currentLine=78250087;
 //BA.debugLineNum = 78250087;BA.debugLine="img_prod.Bitmap = LoadBitmap(ruta,\"1.jpg\")";
__ref._img_prod /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__ref._ruta /*String*/ ,"1.jpg").getObject()));
RDebugUtils.currentLine=78250088;
 //BA.debugLineNum = 78250088;BA.debugLine="TOT_ART_PROMO = \"0\"";
__ref._tot_art_promo /*String*/  = "0";
RDebugUtils.currentLine=78250089;
 //BA.debugLineNum = 78250089;BA.debugLine="TOT_ART_PROMOR = \"0\"";
__ref._tot_art_promor /*String*/  = "0";
RDebugUtils.currentLine=78250090;
 //BA.debugLineNum = 78250090;BA.debugLine="If l_marca.text = \"PROMOS\" And l_tipo.Text =\"PRO";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("0")) { 
RDebugUtils.currentLine=78250091;
 //BA.debugLineNum = 78250091;BA.debugLine="Msgbox(\"ALERTA\",\"EL CLIENTE NO PUEDE TENER ESTA";
__c.Msgbox(BA.ObjectToCharSequence("ALERTA"),BA.ObjectToCharSequence("EL CLIENTE NO PUEDE TENER ESTA PROMOCION"),ba);
RDebugUtils.currentLine=78250092;
 //BA.debugLineNum = 78250092;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else 
{RDebugUtils.currentLine=78250093;
 //BA.debugLineNum = 78250093;BA.debugLine="ELSE IF l_marca.text = \"PROMOS\" And l_tipo.Text";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROUNI1") && (__ref._bonsabor /*String*/ ).equals("1") == false && (__ref._bonsabor2 /*String*/ ).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78250094;
 //BA.debugLineNum = 78250094;BA.debugLine="Msgbox(\"ALERTA\",\"EL CLIENTE NO PUEDE TENER ESTA";
__c.Msgbox(BA.ObjectToCharSequence("ALERTA"),BA.ObjectToCharSequence("EL CLIENTE NO PUEDE TENER ESTA PROMOCION"),ba);
RDebugUtils.currentLine=78250095;
 //BA.debugLineNum = 78250095;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }}
;
 }else {
RDebugUtils.currentLine=78250098;
 //BA.debugLineNum = 78250098;BA.debugLine="Msgbox(\"ALERTA\",\"EL CLIENTE YA COMPRO ESTE PRODU";
__c.Msgbox(BA.ObjectToCharSequence("ALERTA"),BA.ObjectToCharSequence("EL CLIENTE YA COMPRO ESTE PRODUCTO REVISAR NOTA"),ba);
RDebugUtils.currentLine=78250099;
 //BA.debugLineNum = 78250099;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 };
RDebugUtils.currentLine=78250101;
 //BA.debugLineNum = 78250101;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(gunav2.keymon.com.mx.c_pedidos parent,gunav2.keymon.com.mx.c_pedidos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
gunav2.keymon.com.mx.c_pedidos __ref;
gunav2.keymon.com.mx.c_pedidos parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="c_pedidos";

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = -1;
RDebugUtils.currentLine=78512131;
 //BA.debugLineNum = 78512131;BA.debugLine="Msgbox(\"Presione Boton Terminar.\",\"ADVERTENCIA\")";
parent.__c.Msgbox(BA.ObjectToCharSequence("Presione Boton Terminar."),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
RDebugUtils.currentLine=78512132;
 //BA.debugLineNum = 78512132;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=78512133;
 //BA.debugLineNum = 78512133;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(gunav2.keymon.com.mx.c_pedidos __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=78184448;
 //BA.debugLineNum = 78184448;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=78184449;
 //BA.debugLineNum = 78184449;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=78184451;
 //BA.debugLineNum = 78184451;BA.debugLine="Root.LoadLayout(\"pedido\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("pedido",ba);
RDebugUtils.currentLine=78184452;
 //BA.debugLineNum = 78184452;BA.debugLine="i_fotol.Visible = False";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=78184454;
 //BA.debugLineNum = 78184454;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=78184455;
 //BA.debugLineNum = 78184455;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=78184456;
 //BA.debugLineNum = 78184456;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__ref._ruta /*String*/ ,"kmt.db");
 };
RDebugUtils.currentLine=78184459;
 //BA.debugLineNum = 78184459;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
RDebugUtils.currentLine=78053376;
 //BA.debugLineNum = 78053376;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=78053377;
 //BA.debugLineNum = 78053377;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=78053378;
 //BA.debugLineNum = 78053378;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=78053380;
 //BA.debugLineNum = 78053380;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=78053381;
 //BA.debugLineNum = 78053381;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=78053382;
 //BA.debugLineNum = 78053382;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=78053383;
 //BA.debugLineNum = 78053383;BA.debugLine="Private t3 As Timer";
_t3 = new anywheresoftware.b4a.objects.Timer();
RDebugUtils.currentLine=78053384;
 //BA.debugLineNum = 78053384;BA.debugLine="Dim p As Phone";
_p = new anywheresoftware.b4a.phone.Phone();
RDebugUtils.currentLine=78053385;
 //BA.debugLineNum = 78053385;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
RDebugUtils.currentLine=78053387;
 //BA.debugLineNum = 78053387;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053388;
 //BA.debugLineNum = 78053388;BA.debugLine="Dim e As Cursor";
_e = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053389;
 //BA.debugLineNum = 78053389;BA.debugLine="Dim f As Cursor";
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053390;
 //BA.debugLineNum = 78053390;BA.debugLine="Dim h As Cursor";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053391;
 //BA.debugLineNum = 78053391;BA.debugLine="Dim CC As Cursor";
_cc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053392;
 //BA.debugLineNum = 78053392;BA.debugLine="Dim DD As Cursor";
_dd = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053393;
 //BA.debugLineNum = 78053393;BA.debugLine="Dim l_tipo As Label";
_l_tipo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053394;
 //BA.debugLineNum = 78053394;BA.debugLine="Dim l_sub As Label";
_l_sub = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053395;
 //BA.debugLineNum = 78053395;BA.debugLine="Dim l_marca As Label";
_l_marca = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053396;
 //BA.debugLineNum = 78053396;BA.debugLine="Dim l_desc As Label";
_l_desc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053397;
 //BA.debugLineNum = 78053397;BA.debugLine="Dim l_precio As Label";
_l_precio = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053398;
 //BA.debugLineNum = 78053398;BA.debugLine="Dim l_bodega As Label";
_l_bodega = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053399;
 //BA.debugLineNum = 78053399;BA.debugLine="Dim cantidad As EditText";
_cantidad = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=78053400;
 //BA.debugLineNum = 78053400;BA.debugLine="Dim guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=78053401;
 //BA.debugLineNum = 78053401;BA.debugLine="Dim Terminar As Button";
_terminar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=78053402;
 //BA.debugLineNum = 78053402;BA.debugLine="Dim img_prod As ImageView";
_img_prod = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=78053403;
 //BA.debugLineNum = 78053403;BA.debugLine="Dim IMG_PASO() As Byte";
_img_paso = new byte[(int) (0)];
;
RDebugUtils.currentLine=78053404;
 //BA.debugLineNum = 78053404;BA.debugLine="Dim L_PROID As Label";
_l_proid = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053405;
 //BA.debugLineNum = 78053405;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=78053406;
 //BA.debugLineNum = 78053406;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=78053407;
 //BA.debugLineNum = 78053407;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=78053409;
 //BA.debugLineNum = 78053409;BA.debugLine="Dim t_venta As Label";
_t_venta = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=78053410;
 //BA.debugLineNum = 78053410;BA.debugLine="Dim PROMO_C As String";
_promo_c = "";
RDebugUtils.currentLine=78053411;
 //BA.debugLineNum = 78053411;BA.debugLine="Dim i_fotol As ImageView";
_i_fotol = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=78053412;
 //BA.debugLineNum = 78053412;BA.debugLine="Private DESC_PROMO As Button";
_desc_promo = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=78053413;
 //BA.debugLineNum = 78053413;BA.debugLine="Private nopromo As Button";
_nopromo = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=78053414;
 //BA.debugLineNum = 78053414;BA.debugLine="Dim TOT_ART_PROMO As String";
_tot_art_promo = "";
RDebugUtils.currentLine=78053415;
 //BA.debugLineNum = 78053415;BA.debugLine="Dim cambio As String";
_cambio = "";
RDebugUtils.currentLine=78053416;
 //BA.debugLineNum = 78053416;BA.debugLine="Dim COSTO_TOT As String";
_costo_tot = "";
RDebugUtils.currentLine=78053417;
 //BA.debugLineNum = 78053417;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
RDebugUtils.currentLine=78053418;
 //BA.debugLineNum = 78053418;BA.debugLine="Dim preciosin As String";
_preciosin = "";
RDebugUtils.currentLine=78053419;
 //BA.debugLineNum = 78053419;BA.debugLine="Dim cl_ruta As String";
_cl_ruta = "";
RDebugUtils.currentLine=78053420;
 //BA.debugLineNum = 78053420;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=78053421;
 //BA.debugLineNum = 78053421;BA.debugLine="Dim TOT_ART_PROMOR As String";
_tot_art_promor = "";
RDebugUtils.currentLine=78053422;
 //BA.debugLineNum = 78053422;BA.debugLine="Dim PROMO_CR As String";
_promo_cr = "";
RDebugUtils.currentLine=78053423;
 //BA.debugLineNum = 78053423;BA.debugLine="Dim TOTAL_PROMO As String";
_total_promo = "";
RDebugUtils.currentLine=78053424;
 //BA.debugLineNum = 78053424;BA.debugLine="Dim HCCP_CANT As String";
_hccp_cant = "";
RDebugUtils.currentLine=78053425;
 //BA.debugLineNum = 78053425;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=78053426;
 //BA.debugLineNum = 78053426;BA.debugLine="Dim precio_Cero As String";
_precio_cero = "";
RDebugUtils.currentLine=78053427;
 //BA.debugLineNum = 78053427;BA.debugLine="Private BONSABOR As String";
_bonsabor = "";
RDebugUtils.currentLine=78053428;
 //BA.debugLineNum = 78053428;BA.debugLine="Private BONSABOR2 As String";
_bonsabor2 = "";
RDebugUtils.currentLine=78053429;
 //BA.debugLineNum = 78053429;BA.debugLine="Dim cmd As DBCommand";
_cmd = new gunav2.keymon.com.mx.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=78053430;
 //BA.debugLineNum = 78053430;BA.debugLine="Private p_pedido As Panel";
_p_pedido = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=78053431;
 //BA.debugLineNum = 78053431;BA.debugLine="dim tipo_venta as string = Subs.traeTipoVentaDeBD";
_tipo_venta = _subs._traetipoventadebd /*String*/ (ba);
RDebugUtils.currentLine=78053432;
 //BA.debugLineNum = 78053432;BA.debugLine="End Sub";
return "";
}
public String  _desc_promo_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "desc_promo_click", false))
	 {return ((String) Debug.delegate(ba, "desc_promo_click", null));}
RDebugUtils.currentLine=78708736;
 //BA.debugLineNum = 78708736;BA.debugLine="Sub DESC_PROMO_Click";
RDebugUtils.currentLine=78708737;
 //BA.debugLineNum = 78708737;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=78708738;
 //BA.debugLineNum = 78708738;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78708739;
 //BA.debugLineNum = 78708739;BA.debugLine="B4XPages.ShowPage(\"detalle_promo\")";
_b4xpages._showpage /*String*/ (ba,"detalle_promo");
RDebugUtils.currentLine=78708740;
 //BA.debugLineNum = 78708740;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "guardar_click", false))
	 {return ((String) Debug.delegate(ba, "guardar_click", null));}
int _i = 0;
RDebugUtils.currentLine=78315520;
 //BA.debugLineNum = 78315520;BA.debugLine="Sub guardar_Click";
RDebugUtils.currentLine=78315521;
 //BA.debugLineNum = 78315521;BA.debugLine="If cantidad.Text = \"\" Then";
if ((__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
RDebugUtils.currentLine=78315522;
 //BA.debugLineNum = 78315522;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else 
{RDebugUtils.currentLine=78315523;
 //BA.debugLineNum = 78315523;BA.debugLine="ELSE If cantidad.Text > l_bodega.Text Then";
if ((double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))>(double)(Double.parseDouble(__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))) { 
RDebugUtils.currentLine=78315524;
 //BA.debugLineNum = 78315524;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else 
{RDebugUtils.currentLine=78315525;
 //BA.debugLineNum = 78315525;BA.debugLine="Else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (double)(Double.parseDouble(__ref._promo_c /*String*/ ))>0 && (double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))>0) { 
RDebugUtils.currentLine=78315526;
 //BA.debugLineNum = 78315526;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=78315527;
 //BA.debugLineNum = 78315527;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78315528;
 //BA.debugLineNum = 78315528;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select count";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78315529;
 //BA.debugLineNum = 78315529;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315530;
 //BA.debugLineNum = 78315530;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78315531;
 //BA.debugLineNum = 78315531;BA.debugLine="Msgbox(\"No tiene venta el cliente para la promo";
__c.Msgbox(BA.ObjectToCharSequence("No tiene venta el cliente para la promo"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else {
RDebugUtils.currentLine=78315533;
 //BA.debugLineNum = 78315533;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78315534;
 //BA.debugLineNum = 78315534;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315535;
 //BA.debugLineNum = 78315535;BA.debugLine="TOT_ART_PROMO = C.GetString(\"TOT_ART_PROMO\")";
__ref._tot_art_promo /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOT_ART_PROMO");
RDebugUtils.currentLine=78315536;
 //BA.debugLineNum = 78315536;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
__ref._costo_tot /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("COSTO_TOT");
RDebugUtils.currentLine=78315537;
 //BA.debugLineNum = 78315537;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315538;
 //BA.debugLineNum = 78315538;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78315539;
 //BA.debugLineNum = 78315539;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315540;
 //BA.debugLineNum = 78315540;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78315541;
 //BA.debugLineNum = 78315541;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
__ref._tot_art_promor /*String*/  = "0";
 }else {
RDebugUtils.currentLine=78315543;
 //BA.debugLineNum = 78315543;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78315544;
 //BA.debugLineNum = 78315544;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315545;
 //BA.debugLineNum = 78315545;BA.debugLine="TOT_ART_PROMOR = C.GetString(\"TOT_ART_PROMO\")";
__ref._tot_art_promor /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOT_ART_PROMO");
 };
RDebugUtils.currentLine=78315547;
 //BA.debugLineNum = 78315547;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315548;
 //BA.debugLineNum = 78315548;BA.debugLine="PROMO_C = PROMO_C * cantidad.Text";
__ref._promo_c /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._promo_c /*String*/ ))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())));
RDebugUtils.currentLine=78315549;
 //BA.debugLineNum = 78315549;BA.debugLine="PROMO_CR = PROMO_CR * cantidad.Text";
__ref._promo_cr /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._promo_cr /*String*/ ))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())));
RDebugUtils.currentLine=78315550;
 //BA.debugLineNum = 78315550;BA.debugLine="If  TOT_ART_PROMO = PROMO_C And TOT_ART_PROMOR";
if ((__ref._tot_art_promo /*String*/ ).equals(__ref._promo_c /*String*/ ) && (__ref._tot_art_promor /*String*/ ).equals(__ref._promo_cr /*String*/ )) { 
RDebugUtils.currentLine=78315551;
 //BA.debugLineNum = 78315551;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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))",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78315552;
 //BA.debugLineNum = 78315552;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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")));
RDebugUtils.currentLine=78315553;
 //BA.debugLineNum = 78315553;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=78315554;
 //BA.debugLineNum = 78315554;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step34 = 1;
final int limit34 = (int) (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit34 ;_i = _i + step34 ) {
RDebugUtils.currentLine=78315555;
 //BA.debugLineNum = 78315555;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78315556;
 //BA.debugLineNum = 78315556;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD"))}));
 }
};
 };
RDebugUtils.currentLine=78315559;
 //BA.debugLineNum = 78315559;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315560;
 //BA.debugLineNum = 78315560;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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")));
RDebugUtils.currentLine=78315561;
 //BA.debugLineNum = 78315561;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=78315562;
 //BA.debugLineNum = 78315562;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step42 = 1;
final int limit42 = (int) (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit42 ;_i = _i + step42 ) {
RDebugUtils.currentLine=78315563;
 //BA.debugLineNum = 78315563;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78315564;
 //BA.debugLineNum = 78315564;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD"))}));
 }
};
 };
RDebugUtils.currentLine=78315567;
 //BA.debugLineNum = 78315567;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315568;
 //BA.debugLineNum = 78315568;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78315569;
 //BA.debugLineNum = 78315569;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78315570;
 //BA.debugLineNum = 78315570;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78315571;
 //BA.debugLineNum = 78315571;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78315572;
 //BA.debugLineNum = 78315572;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315573;
 //BA.debugLineNum = 78315573;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78315574;
 //BA.debugLineNum = 78315574;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315575;
 //BA.debugLineNum = 78315575;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=78315576;
 //BA.debugLineNum = 78315576;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315577;
 //BA.debugLineNum = 78315577;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
__ref._cl_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=78315578;
 //BA.debugLineNum = 78315578;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315579;
 //BA.debugLineNum = 78315579;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78315580;
 //BA.debugLineNum = 78315580;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315581;
 //BA.debugLineNum = 78315581;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78315582;
 //BA.debugLineNum = 78315582;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select cou";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) and CAT_DP_TIPO = 0 ")));
RDebugUtils.currentLine=78315584;
 //BA.debugLineNum = 78315584;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315585;
 //BA.debugLineNum = 78315585;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=78315586;
 //BA.debugLineNum = 78315586;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CA";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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 ")));
RDebugUtils.currentLine=78315589;
 //BA.debugLineNum = 78315589;BA.debugLine="If f.RowCount>0 Then";
if (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=78315590;
 //BA.debugLineNum = 78315590;BA.debugLine="For i=0 To f.RowCount -1";
{
final int step67 = 1;
final int limit67 = (int) (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit67 ;_i = _i + step67 ) {
RDebugUtils.currentLine=78315591;
 //BA.debugLineNum = 78315591;BA.debugLine="f.Position=i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78315592;
 //BA.debugLineNum = 78315592;BA.debugLine="precio_Cero = f.GetString(\"CAT_DP_PRECIO\")";
__ref._precio_cero /*String*/  = __ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO");
RDebugUtils.currentLine=78315593;
 //BA.debugLineNum = 78315593;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2($\"selec";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select CAT_GP_NOMBRE from "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" where CAT_GP_ID = ? "),new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=78315594;
 //BA.debugLineNum = 78315594;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315596;
 //BA.debugLineNum = 78315596;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)((double)(Double.parseDouble(__ref._precio_cero /*String*/ ))*(double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))),(Object)(__ref._precio_cero /*String*/ ),(Object)((double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))),(Object)(__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")),(Object)(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ )}));
RDebugUtils.currentLine=78315597;
 //BA.debugLineNum = 78315597;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
 };
RDebugUtils.currentLine=78315600;
 //BA.debugLineNum = 78315600;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=78315602;
 //BA.debugLineNum = 78315602;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315603;
 //BA.debugLineNum = 78315603;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(0),(Object)(0),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78315604;
 //BA.debugLineNum = 78315604;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
 }else {
RDebugUtils.currentLine=78315606;
 //BA.debugLineNum = 78315606;BA.debugLine="Msgbox(\"Tiene \" & TOT_ART_PROMO & \" \" & TOT_AR";
__c.Msgbox(BA.ObjectToCharSequence("Tiene "+__ref._tot_art_promo /*String*/ +" "+__ref._tot_art_promor /*String*/ +" y necesita "+__ref._promo_c /*String*/ +" "+__ref._promo_cr /*String*/ +" Para la Promo. "),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 };
 };
RDebugUtils.currentLine=78315609;
 //BA.debugLineNum = 78315609;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=78315610;
 //BA.debugLineNum = 78315610;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else 
{RDebugUtils.currentLine=78315611;
 //BA.debugLineNum = 78315611;BA.debugLine="else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._promo_c /*String*/ ).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78315612;
 //BA.debugLineNum = 78315612;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=78315613;
 //BA.debugLineNum = 78315613;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78315614;
 //BA.debugLineNum = 78315614;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78315615;
 //BA.debugLineNum = 78315615;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315616;
 //BA.debugLineNum = 78315616;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78315617;
 //BA.debugLineNum = 78315617;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315618;
 //BA.debugLineNum = 78315618;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78315619;
 //BA.debugLineNum = 78315619;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78315620;
 //BA.debugLineNum = 78315620;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78315621;
 //BA.debugLineNum = 78315621;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=78315622;
 //BA.debugLineNum = 78315622;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315623;
 //BA.debugLineNum = 78315623;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
__ref._cl_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=78315624;
 //BA.debugLineNum = 78315624;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315625;
 //BA.debugLineNum = 78315625;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78315626;
 //BA.debugLineNum = 78315626;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315627;
 //BA.debugLineNum = 78315627;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78315630;
 //BA.debugLineNum = 78315630;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) ")));
RDebugUtils.currentLine=78315631;
 //BA.debugLineNum = 78315631;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315632;
 //BA.debugLineNum = 78315632;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=78315633;
 //BA.debugLineNum = 78315633;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_DP_IDPROD, CAT_DP_PZAS, CAT_DP_PRECIO FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID)")));
RDebugUtils.currentLine=78315634;
 //BA.debugLineNum = 78315634;BA.debugLine="For i =0 To f.RowCount -1";
{
final int step108 = 1;
final int limit108 = (int) (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit108 ;_i = _i + step108 ) {
RDebugUtils.currentLine=78315635;
 //BA.debugLineNum = 78315635;BA.debugLine="F.Position =i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78315636;
 //BA.debugLineNum = 78315636;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2($\"select C";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select CAT_GP_NOMBRE from "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" where CAT_GP_ID = ? "),new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=78315637;
 //BA.debugLineNum = 78315637;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315638;
 //BA.debugLineNum = 78315638;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)((double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))*(double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))),(Object)(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)((double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))),(Object)(__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")),(Object)(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78315639;
 //BA.debugLineNum = 78315639;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
RDebugUtils.currentLine=78315641;
 //BA.debugLineNum = 78315641;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=78315643;
 //BA.debugLineNum = 78315643;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315645;
 //BA.debugLineNum = 78315645;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(0),(Object)(0),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78315646;
 //BA.debugLineNum = 78315646;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78315647;
 //BA.debugLineNum = 78315647;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=78315648;
 //BA.debugLineNum = 78315648;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78315649;
 //BA.debugLineNum = 78315649;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315650;
 //BA.debugLineNum = 78315650;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78315651;
 //BA.debugLineNum = 78315651;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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 (?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(__ref._almacen /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE_SIN"))}));
RDebugUtils.currentLine=78315652;
 //BA.debugLineNum = 78315652;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78315653;
 //BA.debugLineNum = 78315653;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else {
RDebugUtils.currentLine=78315655;
 //BA.debugLineNum = 78315655;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78315656;
 //BA.debugLineNum = 78315656;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78315657;
 //BA.debugLineNum = 78315657;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78315658;
 //BA.debugLineNum = 78315658;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78315659;
 //BA.debugLineNum = 78315659;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315660;
 //BA.debugLineNum = 78315660;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78315661;
 //BA.debugLineNum = 78315661;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315662;
 //BA.debugLineNum = 78315662;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=78315663;
 //BA.debugLineNum = 78315663;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315664;
 //BA.debugLineNum = 78315664;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
__ref._cl_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=78315665;
 //BA.debugLineNum = 78315665;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78315666;
 //BA.debugLineNum = 78315666;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78315667;
 //BA.debugLineNum = 78315667;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315668;
 //BA.debugLineNum = 78315668;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78315669;
 //BA.debugLineNum = 78315669;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)((double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))*(double)(Double.parseDouble(__ref._l_precio /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))),(Object)(__ref._l_precio /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(__ref._preciosin /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78315670;
 //BA.debugLineNum = 78315670;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78315671;
 //BA.debugLineNum = 78315671;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78315672;
 //BA.debugLineNum = 78315672;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78315673;
 //BA.debugLineNum = 78315673;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78315674;
 //BA.debugLineNum = 78315674;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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 (?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(__ref._almacen /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE_SIN"))}));
RDebugUtils.currentLine=78315675;
 //BA.debugLineNum = 78315675;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78315676;
 //BA.debugLineNum = 78315676;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())}));
RDebugUtils.currentLine=78315677;
 //BA.debugLineNum = 78315677;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }}}}
;
RDebugUtils.currentLine=78315679;
 //BA.debugLineNum = 78315679;BA.debugLine="End Sub";
return "";
}
public String  _i_fotol_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "i_fotol_click", false))
	 {return ((String) Debug.delegate(ba, "i_fotol_click", null));}
RDebugUtils.currentLine=78643200;
 //BA.debugLineNum = 78643200;BA.debugLine="Sub i_fotol_Click";
RDebugUtils.currentLine=78643201;
 //BA.debugLineNum = 78643201;BA.debugLine="i_fotol.Visible = False";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=78643203;
 //BA.debugLineNum = 78643203;BA.debugLine="End Sub";
return "";
}
public String  _img_prod_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "img_prod_click", false))
	 {return ((String) Debug.delegate(ba, "img_prod_click", null));}
RDebugUtils.currentLine=78577664;
 //BA.debugLineNum = 78577664;BA.debugLine="Sub img_prod_Click";
RDebugUtils.currentLine=78577665;
 //BA.debugLineNum = 78577665;BA.debugLine="i_fotol.Visible = True";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=78577666;
 //BA.debugLineNum = 78577666;BA.debugLine="i_fotol.Bitmap = LoadBitmap(ruta,\"1.jpg\")";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__ref._ruta /*String*/ ,"1.jpg").getObject()));
RDebugUtils.currentLine=78577668;
 //BA.debugLineNum = 78577668;BA.debugLine="End Sub";
return "";
}
public String  _nopromo_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "nopromo_click", false))
	 {return ((String) Debug.delegate(ba, "nopromo_click", null));}
RDebugUtils.currentLine=78774272;
 //BA.debugLineNum = 78774272;BA.debugLine="Sub nopromo_Click";
RDebugUtils.currentLine=78774273;
 //BA.debugLineNum = 78774273;BA.debugLine="If cantidad.Text = \"\" Then";
if ((__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
RDebugUtils.currentLine=78774274;
 //BA.debugLineNum = 78774274;BA.debugLine="Msgbox(\"Cantidad no puede ser 0\",\"Cantidad\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Cantidad no puede ser 0"),BA.ObjectToCharSequence("Cantidad"),ba);
 }else 
{RDebugUtils.currentLine=78774275;
 //BA.debugLineNum = 78774275;BA.debugLine="Else If cantidad.Text > l_bodega.Text Then";
if ((double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))>(double)(Double.parseDouble(__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))) { 
RDebugUtils.currentLine=78774276;
 //BA.debugLineNum = 78774276;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else {
RDebugUtils.currentLine=78774278;
 //BA.debugLineNum = 78774278;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78774279;
 //BA.debugLineNum = 78774279;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78774280;
 //BA.debugLineNum = 78774280;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78774281;
 //BA.debugLineNum = 78774281;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78774282;
 //BA.debugLineNum = 78774282;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78774283;
 //BA.debugLineNum = 78774283;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78774284;
 //BA.debugLineNum = 78774284;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78774285;
 //BA.debugLineNum = 78774285;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78774286;
 //BA.debugLineNum = 78774286;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78774287;
 //BA.debugLineNum = 78774287;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("COACALCO"),(Object)(0),(Object)(0),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78774288;
 //BA.debugLineNum = 78774288;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78774289;
 //BA.debugLineNum = 78774289;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=78774290;
 //BA.debugLineNum = 78774290;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }}
;
RDebugUtils.currentLine=78774292;
 //BA.debugLineNum = 78774292;BA.debugLine="End Sub";
return "";
}
public String  _p_pedido_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "p_pedido_click", false))
	 {return ((String) Debug.delegate(ba, "p_pedido_click", null));}
RDebugUtils.currentLine=78839808;
 //BA.debugLineNum = 78839808;BA.debugLine="Private Sub p_pedido_Click";
RDebugUtils.currentLine=78839810;
 //BA.debugLineNum = 78839810;BA.debugLine="End Sub";
return "";
}
public String  _terminar_click(gunav2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
if (Debug.shouldDelegate(ba, "terminar_click", false))
	 {return ((String) Debug.delegate(ba, "terminar_click", null));}
int _i = 0;
RDebugUtils.currentLine=78446592;
 //BA.debugLineNum = 78446592;BA.debugLine="Sub Terminar_Click";
RDebugUtils.currentLine=78446593;
 //BA.debugLineNum = 78446593;BA.debugLine="If cantidad.Text = \"\" Then";
if ((__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
RDebugUtils.currentLine=78446594;
 //BA.debugLineNum = 78446594;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else 
{RDebugUtils.currentLine=78446595;
 //BA.debugLineNum = 78446595;BA.debugLine="ELSE If cantidad.Text > l_bodega.Text Then";
if ((double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))>(double)(Double.parseDouble(__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))) { 
RDebugUtils.currentLine=78446596;
 //BA.debugLineNum = 78446596;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else 
{RDebugUtils.currentLine=78446597;
 //BA.debugLineNum = 78446597;BA.debugLine="Else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (double)(Double.parseDouble(__ref._promo_c /*String*/ ))>0 && (double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))>0) { 
RDebugUtils.currentLine=78446598;
 //BA.debugLineNum = 78446598;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=78446599;
 //BA.debugLineNum = 78446599;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78446600;
 //BA.debugLineNum = 78446600;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select count";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78446601;
 //BA.debugLineNum = 78446601;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446602;
 //BA.debugLineNum = 78446602;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78446603;
 //BA.debugLineNum = 78446603;BA.debugLine="Msgbox(\"No tiene venta el cliente para la promo";
__c.Msgbox(BA.ObjectToCharSequence("No tiene venta el cliente para la promo"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else {
RDebugUtils.currentLine=78446605;
 //BA.debugLineNum = 78446605;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78446606;
 //BA.debugLineNum = 78446606;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446607;
 //BA.debugLineNum = 78446607;BA.debugLine="TOT_ART_PROMO = C.GetString(\"TOT_ART_PROMO\")";
__ref._tot_art_promo /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOT_ART_PROMO");
RDebugUtils.currentLine=78446608;
 //BA.debugLineNum = 78446608;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
__ref._costo_tot /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("COSTO_TOT");
RDebugUtils.currentLine=78446609;
 //BA.debugLineNum = 78446609;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446610;
 //BA.debugLineNum = 78446610;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78446611;
 //BA.debugLineNum = 78446611;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446612;
 //BA.debugLineNum = 78446612;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78446613;
 //BA.debugLineNum = 78446613;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
__ref._tot_art_promor /*String*/  = "0";
 }else {
RDebugUtils.currentLine=78446615;
 //BA.debugLineNum = 78446615;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78446616;
 //BA.debugLineNum = 78446616;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446617;
 //BA.debugLineNum = 78446617;BA.debugLine="TOT_ART_PROMOR = C.GetString(\"TOT_ART_PROMO\")";
__ref._tot_art_promor /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOT_ART_PROMO");
 };
RDebugUtils.currentLine=78446619;
 //BA.debugLineNum = 78446619;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446620;
 //BA.debugLineNum = 78446620;BA.debugLine="PROMO_C = PROMO_C * cantidad.Text";
__ref._promo_c /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._promo_c /*String*/ ))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())));
RDebugUtils.currentLine=78446621;
 //BA.debugLineNum = 78446621;BA.debugLine="PROMO_CR = PROMO_CR * cantidad.Text";
__ref._promo_cr /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._promo_cr /*String*/ ))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())));
RDebugUtils.currentLine=78446622;
 //BA.debugLineNum = 78446622;BA.debugLine="If  TOT_ART_PROMO = PROMO_C And TOT_ART_PROMOR";
if ((__ref._tot_art_promo /*String*/ ).equals(__ref._promo_c /*String*/ ) && (__ref._tot_art_promor /*String*/ ).equals(__ref._promo_cr /*String*/ )) { 
RDebugUtils.currentLine=78446626;
 //BA.debugLineNum = 78446626;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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))",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78446627;
 //BA.debugLineNum = 78446627;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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")));
RDebugUtils.currentLine=78446628;
 //BA.debugLineNum = 78446628;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=78446629;
 //BA.debugLineNum = 78446629;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step34 = 1;
final int limit34 = (int) (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit34 ;_i = _i + step34 ) {
RDebugUtils.currentLine=78446630;
 //BA.debugLineNum = 78446630;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78446631;
 //BA.debugLineNum = 78446631;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD"))}));
 }
};
 };
RDebugUtils.currentLine=78446634;
 //BA.debugLineNum = 78446634;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446635;
 //BA.debugLineNum = 78446635;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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")));
RDebugUtils.currentLine=78446636;
 //BA.debugLineNum = 78446636;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=78446637;
 //BA.debugLineNum = 78446637;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step42 = 1;
final int limit42 = (int) (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit42 ;_i = _i + step42 ) {
RDebugUtils.currentLine=78446638;
 //BA.debugLineNum = 78446638;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78446639;
 //BA.debugLineNum = 78446639;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD"))}));
 }
};
 };
RDebugUtils.currentLine=78446642;
 //BA.debugLineNum = 78446642;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446643;
 //BA.debugLineNum = 78446643;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78446644;
 //BA.debugLineNum = 78446644;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78446645;
 //BA.debugLineNum = 78446645;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78446646;
 //BA.debugLineNum = 78446646;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78446647;
 //BA.debugLineNum = 78446647;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446648;
 //BA.debugLineNum = 78446648;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78446649;
 //BA.debugLineNum = 78446649;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446650;
 //BA.debugLineNum = 78446650;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=78446651;
 //BA.debugLineNum = 78446651;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446652;
 //BA.debugLineNum = 78446652;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
__ref._cl_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=78446653;
 //BA.debugLineNum = 78446653;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446654;
 //BA.debugLineNum = 78446654;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78446655;
 //BA.debugLineNum = 78446655;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446656;
 //BA.debugLineNum = 78446656;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78446658;
 //BA.debugLineNum = 78446658;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select cou";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) and CAT_DP_TIPO = 0 ")));
RDebugUtils.currentLine=78446660;
 //BA.debugLineNum = 78446660;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446661;
 //BA.debugLineNum = 78446661;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=78446662;
 //BA.debugLineNum = 78446662;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CA";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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 ")));
RDebugUtils.currentLine=78446665;
 //BA.debugLineNum = 78446665;BA.debugLine="If f.RowCount>0 Then";
if (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=78446666;
 //BA.debugLineNum = 78446666;BA.debugLine="For i=0 To f.RowCount -1";
{
final int step67 = 1;
final int limit67 = (int) (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit67 ;_i = _i + step67 ) {
RDebugUtils.currentLine=78446667;
 //BA.debugLineNum = 78446667;BA.debugLine="f.Position=i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78446668;
 //BA.debugLineNum = 78446668;BA.debugLine="precio_Cero = f.GetString(\"CAT_DP_PRECIO\")";
__ref._precio_cero /*String*/  = __ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO");
RDebugUtils.currentLine=78446669;
 //BA.debugLineNum = 78446669;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2($\"selec";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select CAT_GP_NOMBRE from "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" where CAT_GP_ID = ? "),new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=78446670;
 //BA.debugLineNum = 78446670;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446671;
 //BA.debugLineNum = 78446671;BA.debugLine="Log(111)";
__c.LogImpl("078446671",BA.NumberToString(111),0);
RDebugUtils.currentLine=78446672;
 //BA.debugLineNum = 78446672;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)((double)(Double.parseDouble(__ref._precio_cero /*String*/ ))*(double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))),(Object)(__ref._precio_cero /*String*/ ),(Object)((double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))),(Object)(__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")),(Object)(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78446673;
 //BA.debugLineNum = 78446673;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
 };
RDebugUtils.currentLine=78446676;
 //BA.debugLineNum = 78446676;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=78446678;
 //BA.debugLineNum = 78446678;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446679;
 //BA.debugLineNum = 78446679;BA.debugLine="Log(222)";
__c.LogImpl("078446679",BA.NumberToString(222),0);
RDebugUtils.currentLine=78446680;
 //BA.debugLineNum = 78446680;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(0),(Object)(0),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78446681;
 //BA.debugLineNum = 78446681;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
 }else {
RDebugUtils.currentLine=78446683;
 //BA.debugLineNum = 78446683;BA.debugLine="Msgbox(\"Tiene \" & TOT_ART_PROMO & \" \" & TOT_AR";
__c.Msgbox(BA.ObjectToCharSequence("Tiene "+__ref._tot_art_promo /*String*/ +" "+__ref._tot_art_promor /*String*/ +" y necesita "+__ref._promo_c /*String*/ +" "+__ref._promo_cr /*String*/ +" Para la Promo. "),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 };
 };
RDebugUtils.currentLine=78446686;
 //BA.debugLineNum = 78446686;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=78446687;
 //BA.debugLineNum = 78446687;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else 
{RDebugUtils.currentLine=78446688;
 //BA.debugLineNum = 78446688;BA.debugLine="else If l_marca.text = \"PROMOS\" And l_tipo.Text =";
if ((__ref._l_marca /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._l_tipo /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()).equals("PROMOS") && (__ref._promo_c /*String*/ ).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=78446689;
 //BA.debugLineNum = 78446689;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=78446690;
 //BA.debugLineNum = 78446690;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78446691;
 //BA.debugLineNum = 78446691;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78446692;
 //BA.debugLineNum = 78446692;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446693;
 //BA.debugLineNum = 78446693;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78446694;
 //BA.debugLineNum = 78446694;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446695;
 //BA.debugLineNum = 78446695;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78446696;
 //BA.debugLineNum = 78446696;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78446697;
 //BA.debugLineNum = 78446697;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78446698;
 //BA.debugLineNum = 78446698;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=78446699;
 //BA.debugLineNum = 78446699;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446700;
 //BA.debugLineNum = 78446700;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
__ref._cl_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=78446701;
 //BA.debugLineNum = 78446701;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446702;
 //BA.debugLineNum = 78446702;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78446703;
 //BA.debugLineNum = 78446703;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446704;
 //BA.debugLineNum = 78446704;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78446706;
 //BA.debugLineNum = 78446706;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID) ")));
RDebugUtils.currentLine=78446707;
 //BA.debugLineNum = 78446707;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446708;
 //BA.debugLineNum = 78446708;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=78446709;
 //BA.debugLineNum = 78446709;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_DP_IDPROD, CAT_DP_PZAS, CAT_DP_PRECIO FROM CAT_DETALLES_PAQ WHERE CAT_DP_ID IN (Select PROIDID from PROIDID)")));
RDebugUtils.currentLine=78446710;
 //BA.debugLineNum = 78446710;BA.debugLine="For i =0 To f.RowCount -1";
{
final int step110 = 1;
final int limit110 = (int) (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit110 ;_i = _i + step110 ) {
RDebugUtils.currentLine=78446711;
 //BA.debugLineNum = 78446711;BA.debugLine="F.Position =i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=78446712;
 //BA.debugLineNum = 78446712;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2($\"select C";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2(("select CAT_GP_NOMBRE from "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" where CAT_GP_ID = ? "),new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=78446713;
 //BA.debugLineNum = 78446713;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446714;
 //BA.debugLineNum = 78446714;BA.debugLine="Log(333)";
__c.LogImpl("078446714",BA.NumberToString(333),0);
RDebugUtils.currentLine=78446715;
 //BA.debugLineNum = 78446715;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)((double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))*(double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))),(Object)(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PRECIO")),(Object)((double)(Double.parseDouble(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))),(Object)(__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")),(Object)(__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78446716;
 //BA.debugLineNum = 78446716;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
RDebugUtils.currentLine=78446718;
 //BA.debugLineNum = 78446718;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=78446720;
 //BA.debugLineNum = 78446720;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446721;
 //BA.debugLineNum = 78446721;BA.debugLine="Log(444)";
__c.LogImpl("078446721",BA.NumberToString(444),0);
RDebugUtils.currentLine=78446722;
 //BA.debugLineNum = 78446722;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(0),(Object)(0),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78446723;
 //BA.debugLineNum = 78446723;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78446724;
 //BA.debugLineNum = 78446724;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=78446725;
 //BA.debugLineNum = 78446725;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78446726;
 //BA.debugLineNum = 78446726;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446727;
 //BA.debugLineNum = 78446727;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78446728;
 //BA.debugLineNum = 78446728;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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 (?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(__ref._almacen /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE_SIN"))}));
RDebugUtils.currentLine=78446729;
 //BA.debugLineNum = 78446729;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78446730;
 //BA.debugLineNum = 78446730;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else {
RDebugUtils.currentLine=78446732;
 //BA.debugLineNum = 78446732;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=78446733;
 //BA.debugLineNum = 78446733;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=78446734;
 //BA.debugLineNum = 78446734;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=78446735;
 //BA.debugLineNum = 78446735;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=78446736;
 //BA.debugLineNum = 78446736;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446737;
 //BA.debugLineNum = 78446737;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=78446738;
 //BA.debugLineNum = 78446738;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446739;
 //BA.debugLineNum = 78446739;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=78446740;
 //BA.debugLineNum = 78446740;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446741;
 //BA.debugLineNum = 78446741;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
__ref._cl_ruta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=78446742;
 //BA.debugLineNum = 78446742;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=78446743;
 //BA.debugLineNum = 78446743;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=78446744;
 //BA.debugLineNum = 78446744;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446745;
 //BA.debugLineNum = 78446745;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=78446746;
 //BA.debugLineNum = 78446746;BA.debugLine="Log(555)";
__c.LogImpl("078446746",BA.NumberToString(555),0);
RDebugUtils.currentLine=78446747;
 //BA.debugLineNum = 78446747;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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(?,?,?,?,?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)((double)(Double.parseDouble(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()))*(double)(Double.parseDouble(__ref._l_precio /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()))),(Object)(__ref._l_precio /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_desc /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(__ref._preciosin /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=78446748;
 //BA.debugLineNum = 78446748;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update ${";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen - ? where cat_gp_id = ? "),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText())}));
RDebugUtils.currentLine=78446749;
 //BA.debugLineNum = 78446749;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("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)")));
RDebugUtils.currentLine=78446750;
 //BA.debugLineNum = 78446750;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=78446751;
 //BA.debugLineNum = 78446751;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78446752;
 //BA.debugLineNum = 78446752;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("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 (?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(__ref._almacen /*String*/ ),(Object)(__ref._cl_ruta /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE_SIN"))}));
RDebugUtils.currentLine=78446753;
 //BA.debugLineNum = 78446753;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=78446754;
 //BA.debugLineNum = 78446754;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._l_proid /*anywheresoftware.b4a.objects.LabelWrapper*/ .getText()),(Object)(__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())}));
RDebugUtils.currentLine=78446755;
 //BA.debugLineNum = 78446755;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }}}}
;
RDebugUtils.currentLine=78446757;
 //BA.debugLineNum = 78446757;BA.debugLine="End Sub";
return "";
}
}