package SHARK2.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, "SHARK2.keymon.com.mx.c_pedidos");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", SHARK2.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 SHARK2.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_pedido = null;
public b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(SHARK2.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=17170432;
 //BA.debugLineNum = 17170432;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=17170433;
 //BA.debugLineNum = 17170433;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=17170434;
 //BA.debugLineNum = 17170434;BA.debugLine="End Sub";
return null;
}
public String  _b4xpage_appear(SHARK2.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=17301504;
 //BA.debugLineNum = 17301504;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=17301505;
 //BA.debugLineNum = 17301505;BA.debugLine="tgl.Initialize";
__ref._tgl /*com.rootsoft.togglelibrary.ToggleLibrary*/ .Initialize(ba);
RDebugUtils.currentLine=17301506;
 //BA.debugLineNum = 17301506;BA.debugLine="BONSABOR = 0";
__ref._bonsabor /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=17301507;
 //BA.debugLineNum = 17301507;BA.debugLine="BONSABOR2 = 0";
__ref._bonsabor2 /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=17301508;
 //BA.debugLineNum = 17301508;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=17301509;
 //BA.debugLineNum = 17301509;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=17301510;
 //BA.debugLineNum = 17301510;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=17301512;
 //BA.debugLineNum = 17301512;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=17301513;
 //BA.debugLineNum = 17301513;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select  ID_ALMACEN from CAT_ALMACEN")));
RDebugUtils.currentLine=17301514;
 //BA.debugLineNum = 17301514;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301515;
 //BA.debugLineNum = 17301515;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
__ref._almacen /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("ID_ALMACEN");
RDebugUtils.currentLine=17301516;
 //BA.debugLineNum = 17301516;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301517;
 //BA.debugLineNum = 17301517;BA.debugLine="i_fotol.Visible = False";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=17301518;
 //BA.debugLineNum = 17301518;BA.debugLine="sb.Initialize";
__ref._sb /*anywheresoftware.b4a.keywords.StringBuilderWrapper*/ .Initialize();
RDebugUtils.currentLine=17301519;
 //BA.debugLineNum = 17301519;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=17301520;
 //BA.debugLineNum = 17301520;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(__ref._ruta /*String*/ ,"kmt.db",__c.True);
RDebugUtils.currentLine=17301521;
 //BA.debugLineNum = 17301521;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_GP";
__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 /*SHARK2.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 CAT_GUNAPROD where CAT_GP_NOMBRE In (Select PDESC from PROID)")));
RDebugUtils.currentLine=17301522;
 //BA.debugLineNum = 17301522;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301523;
 //BA.debugLineNum = 17301523;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=17301524;
 //BA.debugLineNum = 17301524;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=17301525;
 //BA.debugLineNum = 17301525;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=17301526;
 //BA.debugLineNum = 17301526;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=17301527;
 //BA.debugLineNum = 17301527;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=17301528;
 //BA.debugLineNum = 17301528;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=17301529;
 //BA.debugLineNum = 17301529;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=17301530;
 //BA.debugLineNum = 17301530;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=17301531;
 //BA.debugLineNum = 17301531;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=17301532;
 //BA.debugLineNum = 17301532;BA.debugLine="cambio = c.GetString(\"CAT_GP_DEV\")";
__ref._cambio /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_DEV");
RDebugUtils.currentLine=17301533;
 //BA.debugLineNum = 17301533;BA.debugLine="preciosin = c.GetString(\"CAT_GP_IMP2\")";
__ref._preciosin /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_IMP2");
RDebugUtils.currentLine=17301534;
 //BA.debugLineNum = 17301534;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=17301535;
 //BA.debugLineNum = 17301535;BA.debugLine="cambio = \"0\"";
__ref._cambio /*String*/  = "0";
RDebugUtils.currentLine=17301537;
 //BA.debugLineNum = 17301537;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 /*SHARK2.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=17301538;
 //BA.debugLineNum = 17301538;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301539;
 //BA.debugLineNum = 17301539;BA.debugLine="If e.GetString(\"CUANTOS\") = 0 Then";
if ((__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17301540;
 //BA.debugLineNum = 17301540;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=17301541;
 //BA.debugLineNum = 17301541;BA.debugLine="DESC_PROMO.Visible = True";
__ref._desc_promo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=17301542;
 //BA.debugLineNum = 17301542;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 /*SHARK2.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=17301543;
 //BA.debugLineNum = 17301543;BA.debugLine="CC.Position =0";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301544;
 //BA.debugLineNum = 17301544;BA.debugLine="If CC.GetString(\"CUANTOS\") = 0 Then";
if ((__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17301545;
 //BA.debugLineNum = 17301545;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=17301547;
 //BA.debugLineNum = 17301547;BA.debugLine="CC.Close";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301548;
 //BA.debugLineNum = 17301548;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 /*SHARK2.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=17301549;
 //BA.debugLineNum = 17301549;BA.debugLine="CC.Position =0";
__ref._cc /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301551;
 //BA.debugLineNum = 17301551;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 /*SHARK2.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=17301552;
 //BA.debugLineNum = 17301552;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301553;
 //BA.debugLineNum = 17301553;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17301554;
 //BA.debugLineNum = 17301554;BA.debugLine="HCCP_CANT = 0";
__ref._hccp_cant /*String*/  = BA.NumberToString(0);
 }else {
RDebugUtils.currentLine=17301556;
 //BA.debugLineNum = 17301556;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301557;
 //BA.debugLineNum = 17301557;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 /*SHARK2.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=17301558;
 //BA.debugLineNum = 17301558;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301559;
 //BA.debugLineNum = 17301559;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
__ref._hccp_cant /*String*/  = __ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HCCP_CANT");
RDebugUtils.currentLine=17301560;
 //BA.debugLineNum = 17301560;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=17301562;
 //BA.debugLineNum = 17301562;BA.debugLine="BONSABOR = HCCP_CANT";
__ref._bonsabor /*String*/  = __ref._hccp_cant /*String*/ ;
RDebugUtils.currentLine=17301563;
 //BA.debugLineNum = 17301563;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 /*SHARK2.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=17301564;
 //BA.debugLineNum = 17301564;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301565;
 //BA.debugLineNum = 17301565;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17301566;
 //BA.debugLineNum = 17301566;BA.debugLine="HCCP_CANT = 0";
__ref._hccp_cant /*String*/  = BA.NumberToString(0);
 }else {
RDebugUtils.currentLine=17301568;
 //BA.debugLineNum = 17301568;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301569;
 //BA.debugLineNum = 17301569;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 /*SHARK2.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=17301570;
 //BA.debugLineNum = 17301570;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301571;
 //BA.debugLineNum = 17301571;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
__ref._hccp_cant /*String*/  = __ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HCCP_CANT");
RDebugUtils.currentLine=17301572;
 //BA.debugLineNum = 17301572;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=17301574;
 //BA.debugLineNum = 17301574;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 /*SHARK2.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 CAT_GUNAPROD where CAT_GP_CLASIF = ?) ",new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_NOMBRE")})));
RDebugUtils.currentLine=17301575;
 //BA.debugLineNum = 17301575;BA.debugLine="DD.Position =0";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301576;
 //BA.debugLineNum = 17301576;BA.debugLine="BONSABOR2 = DD.GetString(\"CUANTOS\")";
__ref._bonsabor2 /*String*/  = __ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS");
RDebugUtils.currentLine=17301577;
 //BA.debugLineNum = 17301577;BA.debugLine="DD.Close";
__ref._dd /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301578;
 //BA.debugLineNum = 17301578;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=17301579;
 //BA.debugLineNum = 17301579;BA.debugLine="If HCCP_CANT = 0 Then";
if ((__ref._hccp_cant /*String*/ ).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17301580;
 //BA.debugLineNum = 17301580;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=17301581;
 //BA.debugLineNum = 17301581;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=17301582;
 //BA.debugLineNum = 17301582;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=17301584;
 //BA.debugLineNum = 17301584;BA.debugLine="l_bodega.Text = TOTAL_PROMO";
__ref._l_bodega /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._total_promo /*String*/ ));
 }}
;
 };
 }else {
RDebugUtils.currentLine=17301588;
 //BA.debugLineNum = 17301588;BA.debugLine="DESC_PROMO.Visible = False";
__ref._desc_promo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=17301590;
 //BA.debugLineNum = 17301590;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301591;
 //BA.debugLineNum = 17301591;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 /*SHARK2.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=17301592;
 //BA.debugLineNum = 17301592;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17301593;
 //BA.debugLineNum = 17301593;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=17301594;
 //BA.debugLineNum = 17301594;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17301595;
 //BA.debugLineNum = 17301595;BA.debugLine="Terminar.Visible = True";
__ref._terminar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=17301596;
 //BA.debugLineNum = 17301596;BA.debugLine="guardar.Visible = True";
__ref._guardar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=17301597;
 //BA.debugLineNum = 17301597;BA.debugLine="cantidad.Visible = True";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=17301598;
 //BA.debugLineNum = 17301598;BA.debugLine="If cambio = \"1\" Then";
if ((__ref._cambio /*String*/ ).equals("1")) { 
RDebugUtils.currentLine=17301599;
 //BA.debugLineNum = 17301599;BA.debugLine="nopromo.Visible = True";
__ref._nopromo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
 }else {
RDebugUtils.currentLine=17301601;
 //BA.debugLineNum = 17301601;BA.debugLine="nopromo.Visible = False";
__ref._nopromo /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
 };
RDebugUtils.currentLine=17301603;
 //BA.debugLineNum = 17301603;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
RDebugUtils.currentLine=17301604;
 //BA.debugLineNum = 17301604;BA.debugLine="out = File.OpenOutput(ruta, \"1.jpg\", False)";
_out = __c.File.OpenOutput(__ref._ruta /*String*/ ,"1.jpg",__c.False);
RDebugUtils.currentLine=17301605;
 //BA.debugLineNum = 17301605;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=17301606;
 //BA.debugLineNum = 17301606;BA.debugLine="out.Close";
_out.Close();
RDebugUtils.currentLine=17301607;
 //BA.debugLineNum = 17301607;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=17301608;
 //BA.debugLineNum = 17301608;BA.debugLine="TOT_ART_PROMO = \"0\"";
__ref._tot_art_promo /*String*/  = "0";
RDebugUtils.currentLine=17301609;
 //BA.debugLineNum = 17301609;BA.debugLine="TOT_ART_PROMOR = \"0\"";
__ref._tot_art_promor /*String*/  = "0";
RDebugUtils.currentLine=17301610;
 //BA.debugLineNum = 17301610;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=17301611;
 //BA.debugLineNum = 17301611;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=17301612;
 //BA.debugLineNum = 17301612;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else 
{RDebugUtils.currentLine=17301613;
 //BA.debugLineNum = 17301613;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=17301614;
 //BA.debugLineNum = 17301614;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=17301615;
 //BA.debugLineNum = 17301615;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }}
;
 }else {
RDebugUtils.currentLine=17301618;
 //BA.debugLineNum = 17301618;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=17301619;
 //BA.debugLineNum = 17301619;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 };
RDebugUtils.currentLine=17301621;
 //BA.debugLineNum = 17301621;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(SHARK2.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(SHARK2.keymon.com.mx.c_pedidos parent,SHARK2.keymon.com.mx.c_pedidos __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
SHARK2.keymon.com.mx.c_pedidos __ref;
SHARK2.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=17563651;
 //BA.debugLineNum = 17563651;BA.debugLine="Msgbox(\"Presione Boton Terminar.\",\"ADVERTENCIA\")";
parent.__c.Msgbox(BA.ObjectToCharSequence("Presione Boton Terminar."),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
RDebugUtils.currentLine=17563652;
 //BA.debugLineNum = 17563652;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=17563653;
 //BA.debugLineNum = 17563653;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(SHARK2.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=17235968;
 //BA.debugLineNum = 17235968;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=17235969;
 //BA.debugLineNum = 17235969;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=17235971;
 //BA.debugLineNum = 17235971;BA.debugLine="Root.LoadLayout(\"pedido\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("pedido",ba);
RDebugUtils.currentLine=17235972;
 //BA.debugLineNum = 17235972;BA.debugLine="i_fotol.Visible = False";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=17235974;
 //BA.debugLineNum = 17235974;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=17235975;
 //BA.debugLineNum = 17235975;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=17235976;
 //BA.debugLineNum = 17235976;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=17235979;
 //BA.debugLineNum = 17235979;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(SHARK2.keymon.com.mx.c_pedidos __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_pedidos";
RDebugUtils.currentLine=17104896;
 //BA.debugLineNum = 17104896;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=17104897;
 //BA.debugLineNum = 17104897;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=17104898;
 //BA.debugLineNum = 17104898;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=17104900;
 //BA.debugLineNum = 17104900;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=17104901;
 //BA.debugLineNum = 17104901;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=17104902;
 //BA.debugLineNum = 17104902;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=17104903;
 //BA.debugLineNum = 17104903;BA.debugLine="Private t3 As Timer";
_t3 = new anywheresoftware.b4a.objects.Timer();
RDebugUtils.currentLine=17104904;
 //BA.debugLineNum = 17104904;BA.debugLine="Dim p As Phone";
_p = new anywheresoftware.b4a.phone.Phone();
RDebugUtils.currentLine=17104905;
 //BA.debugLineNum = 17104905;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
RDebugUtils.currentLine=17104907;
 //BA.debugLineNum = 17104907;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104908;
 //BA.debugLineNum = 17104908;BA.debugLine="Dim e As Cursor";
_e = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104909;
 //BA.debugLineNum = 17104909;BA.debugLine="Dim f As Cursor";
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104910;
 //BA.debugLineNum = 17104910;BA.debugLine="Dim h As Cursor";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104911;
 //BA.debugLineNum = 17104911;BA.debugLine="Dim CC As Cursor";
_cc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104912;
 //BA.debugLineNum = 17104912;BA.debugLine="Dim DD As Cursor";
_dd = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104913;
 //BA.debugLineNum = 17104913;BA.debugLine="Dim l_tipo As Label";
_l_tipo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104914;
 //BA.debugLineNum = 17104914;BA.debugLine="Dim l_sub As Label";
_l_sub = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104915;
 //BA.debugLineNum = 17104915;BA.debugLine="Dim l_marca As Label";
_l_marca = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104916;
 //BA.debugLineNum = 17104916;BA.debugLine="Dim l_desc As Label";
_l_desc = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104917;
 //BA.debugLineNum = 17104917;BA.debugLine="Dim l_precio As Label";
_l_precio = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104918;
 //BA.debugLineNum = 17104918;BA.debugLine="Dim l_bodega As Label";
_l_bodega = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104919;
 //BA.debugLineNum = 17104919;BA.debugLine="Dim cantidad As EditText";
_cantidad = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=17104920;
 //BA.debugLineNum = 17104920;BA.debugLine="Dim guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17104921;
 //BA.debugLineNum = 17104921;BA.debugLine="Dim Terminar As Button";
_terminar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17104922;
 //BA.debugLineNum = 17104922;BA.debugLine="Dim img_prod As ImageView";
_img_prod = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=17104923;
 //BA.debugLineNum = 17104923;BA.debugLine="Dim IMG_PASO() As Byte";
_img_paso = new byte[(int) (0)];
;
RDebugUtils.currentLine=17104924;
 //BA.debugLineNum = 17104924;BA.debugLine="Dim L_PROID As Label";
_l_proid = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104925;
 //BA.debugLineNum = 17104925;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=17104926;
 //BA.debugLineNum = 17104926;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=17104927;
 //BA.debugLineNum = 17104927;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=17104929;
 //BA.debugLineNum = 17104929;BA.debugLine="Dim t_venta As Label";
_t_venta = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=17104930;
 //BA.debugLineNum = 17104930;BA.debugLine="Dim PROMO_C As String";
_promo_c = "";
RDebugUtils.currentLine=17104931;
 //BA.debugLineNum = 17104931;BA.debugLine="Dim i_fotol As ImageView";
_i_fotol = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=17104932;
 //BA.debugLineNum = 17104932;BA.debugLine="Private DESC_PROMO As Button";
_desc_promo = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17104933;
 //BA.debugLineNum = 17104933;BA.debugLine="Private nopromo As Button";
_nopromo = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=17104934;
 //BA.debugLineNum = 17104934;BA.debugLine="Dim TOT_ART_PROMO As String";
_tot_art_promo = "";
RDebugUtils.currentLine=17104935;
 //BA.debugLineNum = 17104935;BA.debugLine="Dim cambio As String";
_cambio = "";
RDebugUtils.currentLine=17104936;
 //BA.debugLineNum = 17104936;BA.debugLine="Dim COSTO_TOT As String";
_costo_tot = "";
RDebugUtils.currentLine=17104937;
 //BA.debugLineNum = 17104937;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
RDebugUtils.currentLine=17104938;
 //BA.debugLineNum = 17104938;BA.debugLine="Dim preciosin As String";
_preciosin = "";
RDebugUtils.currentLine=17104939;
 //BA.debugLineNum = 17104939;BA.debugLine="Dim cl_ruta As String";
_cl_ruta = "";
RDebugUtils.currentLine=17104940;
 //BA.debugLineNum = 17104940;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=17104941;
 //BA.debugLineNum = 17104941;BA.debugLine="Dim TOT_ART_PROMOR As String";
_tot_art_promor = "";
RDebugUtils.currentLine=17104942;
 //BA.debugLineNum = 17104942;BA.debugLine="Dim PROMO_CR As String";
_promo_cr = "";
RDebugUtils.currentLine=17104943;
 //BA.debugLineNum = 17104943;BA.debugLine="Dim TOTAL_PROMO As String";
_total_promo = "";
RDebugUtils.currentLine=17104944;
 //BA.debugLineNum = 17104944;BA.debugLine="Dim HCCP_CANT As String";
_hccp_cant = "";
RDebugUtils.currentLine=17104945;
 //BA.debugLineNum = 17104945;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=17104946;
 //BA.debugLineNum = 17104946;BA.debugLine="Dim precio_Cero As String";
_precio_cero = "";
RDebugUtils.currentLine=17104947;
 //BA.debugLineNum = 17104947;BA.debugLine="Private BONSABOR As String";
_bonsabor = "";
RDebugUtils.currentLine=17104948;
 //BA.debugLineNum = 17104948;BA.debugLine="Private BONSABOR2 As String";
_bonsabor2 = "";
RDebugUtils.currentLine=17104949;
 //BA.debugLineNum = 17104949;BA.debugLine="Dim cmd As DBCommand";
_cmd = new SHARK2.keymon.com.mx.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=17104950;
 //BA.debugLineNum = 17104950;BA.debugLine="Private p_pedido As Panel";
_p_pedido = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=17104951;
 //BA.debugLineNum = 17104951;BA.debugLine="End Sub";
return "";
}
public String  _desc_promo_click(SHARK2.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=17760256;
 //BA.debugLineNum = 17760256;BA.debugLine="Sub DESC_PROMO_Click";
RDebugUtils.currentLine=17760257;
 //BA.debugLineNum = 17760257;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=17760258;
 //BA.debugLineNum = 17760258;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*SHARK2.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=17760259;
 //BA.debugLineNum = 17760259;BA.debugLine="B4XPages.ShowPage(\"detalle_promo\")";
_b4xpages._showpage /*String*/ (ba,"detalle_promo");
RDebugUtils.currentLine=17760260;
 //BA.debugLineNum = 17760260;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(SHARK2.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=17432576;
 //BA.debugLineNum = 17432576;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=17432579;
 //BA.debugLineNum = 17432579;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click(SHARK2.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=17367040;
 //BA.debugLineNum = 17367040;BA.debugLine="Sub guardar_Click";
RDebugUtils.currentLine=17367041;
 //BA.debugLineNum = 17367041;BA.debugLine="If cantidad.Text = \"\" Then";
if ((__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
RDebugUtils.currentLine=17367042;
 //BA.debugLineNum = 17367042;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else 
{RDebugUtils.currentLine=17367043;
 //BA.debugLineNum = 17367043;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=17367044;
 //BA.debugLineNum = 17367044;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else 
{RDebugUtils.currentLine=17367045;
 //BA.debugLineNum = 17367045;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=17367046;
 //BA.debugLineNum = 17367046;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=17367047;
 //BA.debugLineNum = 17367047;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=17367048;
 //BA.debugLineNum = 17367048;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 /*SHARK2.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=17367049;
 //BA.debugLineNum = 17367049;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367050;
 //BA.debugLineNum = 17367050;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17367051;
 //BA.debugLineNum = 17367051;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=17367053;
 //BA.debugLineNum = 17367053;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 /*SHARK2.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=17367054;
 //BA.debugLineNum = 17367054;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367055;
 //BA.debugLineNum = 17367055;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=17367056;
 //BA.debugLineNum = 17367056;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
__ref._costo_tot /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("COSTO_TOT");
RDebugUtils.currentLine=17367057;
 //BA.debugLineNum = 17367057;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367058;
 //BA.debugLineNum = 17367058;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 /*SHARK2.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=17367059;
 //BA.debugLineNum = 17367059;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367060;
 //BA.debugLineNum = 17367060;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17367061;
 //BA.debugLineNum = 17367061;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
__ref._tot_art_promor /*String*/  = "0";
 }else {
RDebugUtils.currentLine=17367063;
 //BA.debugLineNum = 17367063;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 /*SHARK2.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=17367064;
 //BA.debugLineNum = 17367064;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367065;
 //BA.debugLineNum = 17367065;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=17367067;
 //BA.debugLineNum = 17367067;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367068;
 //BA.debugLineNum = 17367068;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=17367069;
 //BA.debugLineNum = 17367069;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=17367070;
 //BA.debugLineNum = 17367070;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=17367071;
 //BA.debugLineNum = 17367071;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
_b4xpages._mainpage /*SHARK2.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=17367072;
 //BA.debugLineNum = 17367072;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 /*SHARK2.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=17367073;
 //BA.debugLineNum = 17367073;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=17367074;
 //BA.debugLineNum = 17367074;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=17367075;
 //BA.debugLineNum = 17367075;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17367076;
 //BA.debugLineNum = 17367076;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*SHARK2.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=17367079;
 //BA.debugLineNum = 17367079;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367080;
 //BA.debugLineNum = 17367080;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 /*SHARK2.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=17367081;
 //BA.debugLineNum = 17367081;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=17367082;
 //BA.debugLineNum = 17367082;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=17367083;
 //BA.debugLineNum = 17367083;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17367084;
 //BA.debugLineNum = 17367084;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*SHARK2.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=17367087;
 //BA.debugLineNum = 17367087;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367088;
 //BA.debugLineNum = 17367088;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17367089;
 //BA.debugLineNum = 17367089;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17367090;
 //BA.debugLineNum = 17367090;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17367091;
 //BA.debugLineNum = 17367091;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17367092;
 //BA.debugLineNum = 17367092;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367093;
 //BA.debugLineNum = 17367093;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17367094;
 //BA.debugLineNum = 17367094;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367095;
 //BA.debugLineNum = 17367095;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=17367096;
 //BA.debugLineNum = 17367096;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367097;
 //BA.debugLineNum = 17367097;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=17367098;
 //BA.debugLineNum = 17367098;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367099;
 //BA.debugLineNum = 17367099;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17367100;
 //BA.debugLineNum = 17367100;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367101;
 //BA.debugLineNum = 17367101;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17367102;
 //BA.debugLineNum = 17367102;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 /*SHARK2.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=17367104;
 //BA.debugLineNum = 17367104;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367105;
 //BA.debugLineNum = 17367105;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=17367106;
 //BA.debugLineNum = 17367106;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 /*SHARK2.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=17367109;
 //BA.debugLineNum = 17367109;BA.debugLine="If f.RowCount>0 Then";
if (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=17367110;
 //BA.debugLineNum = 17367110;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=17367111;
 //BA.debugLineNum = 17367111;BA.debugLine="f.Position=i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17367112;
 //BA.debugLineNum = 17367112;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=17367113;
 //BA.debugLineNum = 17367113;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=17367114;
 //BA.debugLineNum = 17367114;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367116;
 //BA.debugLineNum = 17367116;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*SHARK2.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=17367117;
 //BA.debugLineNum = 17367117;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
 };
RDebugUtils.currentLine=17367120;
 //BA.debugLineNum = 17367120;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=17367122;
 //BA.debugLineNum = 17367122;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367123;
 //BA.debugLineNum = 17367123;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17367124;
 //BA.debugLineNum = 17367124;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update c";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17367126;
 //BA.debugLineNum = 17367126;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=17367129;
 //BA.debugLineNum = 17367129;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=17367130;
 //BA.debugLineNum = 17367130;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else 
{RDebugUtils.currentLine=17367131;
 //BA.debugLineNum = 17367131;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=17367132;
 //BA.debugLineNum = 17367132;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=17367133;
 //BA.debugLineNum = 17367133;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=17367134;
 //BA.debugLineNum = 17367134;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17367135;
 //BA.debugLineNum = 17367135;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367136;
 //BA.debugLineNum = 17367136;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17367137;
 //BA.debugLineNum = 17367137;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367138;
 //BA.debugLineNum = 17367138;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17367139;
 //BA.debugLineNum = 17367139;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17367140;
 //BA.debugLineNum = 17367140;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17367141;
 //BA.debugLineNum = 17367141;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=17367142;
 //BA.debugLineNum = 17367142;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367143;
 //BA.debugLineNum = 17367143;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=17367144;
 //BA.debugLineNum = 17367144;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367145;
 //BA.debugLineNum = 17367145;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17367146;
 //BA.debugLineNum = 17367146;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367147;
 //BA.debugLineNum = 17367147;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17367150;
 //BA.debugLineNum = 17367150;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 /*SHARK2.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=17367151;
 //BA.debugLineNum = 17367151;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367152;
 //BA.debugLineNum = 17367152;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=17367153;
 //BA.debugLineNum = 17367153;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 /*SHARK2.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=17367154;
 //BA.debugLineNum = 17367154;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=17367155;
 //BA.debugLineNum = 17367155;BA.debugLine="F.Position =i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17367156;
 //BA.debugLineNum = 17367156;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select CA";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=17367157;
 //BA.debugLineNum = 17367157;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367158;
 //BA.debugLineNum = 17367158;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17367159;
 //BA.debugLineNum = 17367159;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
RDebugUtils.currentLine=17367161;
 //BA.debugLineNum = 17367161;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=17367163;
 //BA.debugLineNum = 17367163;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367165;
 //BA.debugLineNum = 17367165;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17367166;
 //BA.debugLineNum = 17367166;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17367167;
 //BA.debugLineNum = 17367167;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=17367168;
 //BA.debugLineNum = 17367168;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 /*SHARK2.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=17367169;
 //BA.debugLineNum = 17367169;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367170;
 //BA.debugLineNum = 17367170;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.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=17367171;
 //BA.debugLineNum = 17367171;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.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=17367172;
 //BA.debugLineNum = 17367172;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=17367173;
 //BA.debugLineNum = 17367173;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else {
RDebugUtils.currentLine=17367175;
 //BA.debugLineNum = 17367175;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17367176;
 //BA.debugLineNum = 17367176;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17367177;
 //BA.debugLineNum = 17367177;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17367178;
 //BA.debugLineNum = 17367178;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17367179;
 //BA.debugLineNum = 17367179;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367180;
 //BA.debugLineNum = 17367180;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17367181;
 //BA.debugLineNum = 17367181;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367182;
 //BA.debugLineNum = 17367182;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=17367183;
 //BA.debugLineNum = 17367183;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367184;
 //BA.debugLineNum = 17367184;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=17367185;
 //BA.debugLineNum = 17367185;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17367186;
 //BA.debugLineNum = 17367186;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17367187;
 //BA.debugLineNum = 17367187;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367188;
 //BA.debugLineNum = 17367188;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17367189;
 //BA.debugLineNum = 17367189;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17367190;
 //BA.debugLineNum = 17367190;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17367191;
 //BA.debugLineNum = 17367191;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 /*SHARK2.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=17367192;
 //BA.debugLineNum = 17367192;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17367193;
 //BA.debugLineNum = 17367193;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.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=17367194;
 //BA.debugLineNum = 17367194;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.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=17367195;
 //BA.debugLineNum = 17367195;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=17367196;
 //BA.debugLineNum = 17367196;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=17367197;
 //BA.debugLineNum = 17367197;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }}}}
;
RDebugUtils.currentLine=17367199;
 //BA.debugLineNum = 17367199;BA.debugLine="End Sub";
return "";
}
public String  _i_fotol_click(SHARK2.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=17694720;
 //BA.debugLineNum = 17694720;BA.debugLine="Sub i_fotol_Click";
RDebugUtils.currentLine=17694721;
 //BA.debugLineNum = 17694721;BA.debugLine="i_fotol.Visible = False";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=17694723;
 //BA.debugLineNum = 17694723;BA.debugLine="End Sub";
return "";
}
public String  _img_prod_click(SHARK2.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=17629184;
 //BA.debugLineNum = 17629184;BA.debugLine="Sub img_prod_Click";
RDebugUtils.currentLine=17629185;
 //BA.debugLineNum = 17629185;BA.debugLine="i_fotol.Visible = True";
__ref._i_fotol /*anywheresoftware.b4a.objects.ImageViewWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=17629186;
 //BA.debugLineNum = 17629186;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=17629188;
 //BA.debugLineNum = 17629188;BA.debugLine="End Sub";
return "";
}
public String  _nopromo_click(SHARK2.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=17825792;
 //BA.debugLineNum = 17825792;BA.debugLine="Sub nopromo_Click";
RDebugUtils.currentLine=17825793;
 //BA.debugLineNum = 17825793;BA.debugLine="If cantidad.Text = \"\" Then";
if ((__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
RDebugUtils.currentLine=17825794;
 //BA.debugLineNum = 17825794;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=17825795;
 //BA.debugLineNum = 17825795;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=17825796;
 //BA.debugLineNum = 17825796;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else {
RDebugUtils.currentLine=17825798;
 //BA.debugLineNum = 17825798;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17825799;
 //BA.debugLineNum = 17825799;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17825800;
 //BA.debugLineNum = 17825800;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17825801;
 //BA.debugLineNum = 17825801;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17825802;
 //BA.debugLineNum = 17825802;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17825803;
 //BA.debugLineNum = 17825803;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17825804;
 //BA.debugLineNum = 17825804;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17825805;
 //BA.debugLineNum = 17825805;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17825806;
 //BA.debugLineNum = 17825806;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17825807;
 //BA.debugLineNum = 17825807;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17825808;
 //BA.debugLineNum = 17825808;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17825809;
 //BA.debugLineNum = 17825809;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=17825810;
 //BA.debugLineNum = 17825810;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }}
;
RDebugUtils.currentLine=17825812;
 //BA.debugLineNum = 17825812;BA.debugLine="End Sub";
return "";
}
public String  _p_pedido_click(SHARK2.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=17891328;
 //BA.debugLineNum = 17891328;BA.debugLine="Private Sub p_pedido_Click";
RDebugUtils.currentLine=17891330;
 //BA.debugLineNum = 17891330;BA.debugLine="End Sub";
return "";
}
public String  _terminar_click(SHARK2.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=17498112;
 //BA.debugLineNum = 17498112;BA.debugLine="Sub Terminar_Click";
RDebugUtils.currentLine=17498113;
 //BA.debugLineNum = 17498113;BA.debugLine="If cantidad.Text = \"\" Then";
if ((__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("")) { 
RDebugUtils.currentLine=17498114;
 //BA.debugLineNum = 17498114;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else 
{RDebugUtils.currentLine=17498115;
 //BA.debugLineNum = 17498115;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=17498116;
 //BA.debugLineNum = 17498116;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else 
{RDebugUtils.currentLine=17498117;
 //BA.debugLineNum = 17498117;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=17498118;
 //BA.debugLineNum = 17498118;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=17498119;
 //BA.debugLineNum = 17498119;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=17498120;
 //BA.debugLineNum = 17498120;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 /*SHARK2.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=17498121;
 //BA.debugLineNum = 17498121;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498122;
 //BA.debugLineNum = 17498122;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17498123;
 //BA.debugLineNum = 17498123;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=17498125;
 //BA.debugLineNum = 17498125;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 /*SHARK2.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=17498126;
 //BA.debugLineNum = 17498126;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498127;
 //BA.debugLineNum = 17498127;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=17498128;
 //BA.debugLineNum = 17498128;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
__ref._costo_tot /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("COSTO_TOT");
RDebugUtils.currentLine=17498129;
 //BA.debugLineNum = 17498129;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498130;
 //BA.debugLineNum = 17498130;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 /*SHARK2.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=17498131;
 //BA.debugLineNum = 17498131;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498132;
 //BA.debugLineNum = 17498132;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=17498133;
 //BA.debugLineNum = 17498133;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
__ref._tot_art_promor /*String*/  = "0";
 }else {
RDebugUtils.currentLine=17498135;
 //BA.debugLineNum = 17498135;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 /*SHARK2.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=17498136;
 //BA.debugLineNum = 17498136;BA.debugLine="C.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498137;
 //BA.debugLineNum = 17498137;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=17498139;
 //BA.debugLineNum = 17498139;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498140;
 //BA.debugLineNum = 17498140;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=17498141;
 //BA.debugLineNum = 17498141;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=17498142;
 //BA.debugLineNum = 17498142;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=17498146;
 //BA.debugLineNum = 17498146;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
_b4xpages._mainpage /*SHARK2.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=17498147;
 //BA.debugLineNum = 17498147;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 /*SHARK2.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=17498148;
 //BA.debugLineNum = 17498148;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=17498149;
 //BA.debugLineNum = 17498149;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=17498150;
 //BA.debugLineNum = 17498150;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17498151;
 //BA.debugLineNum = 17498151;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*SHARK2.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=17498154;
 //BA.debugLineNum = 17498154;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498155;
 //BA.debugLineNum = 17498155;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 /*SHARK2.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=17498156;
 //BA.debugLineNum = 17498156;BA.debugLine="If D.RowCount>0 Then";
if (__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=17498157;
 //BA.debugLineNum = 17498157;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=17498158;
 //BA.debugLineNum = 17498158;BA.debugLine="D.Position=i";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17498159;
 //BA.debugLineNum = 17498159;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*SHARK2.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=17498162;
 //BA.debugLineNum = 17498162;BA.debugLine="D.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498163;
 //BA.debugLineNum = 17498163;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17498164;
 //BA.debugLineNum = 17498164;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17498165;
 //BA.debugLineNum = 17498165;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17498166;
 //BA.debugLineNum = 17498166;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17498167;
 //BA.debugLineNum = 17498167;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498168;
 //BA.debugLineNum = 17498168;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17498169;
 //BA.debugLineNum = 17498169;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498170;
 //BA.debugLineNum = 17498170;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=17498171;
 //BA.debugLineNum = 17498171;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498172;
 //BA.debugLineNum = 17498172;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=17498173;
 //BA.debugLineNum = 17498173;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498174;
 //BA.debugLineNum = 17498174;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17498175;
 //BA.debugLineNum = 17498175;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498176;
 //BA.debugLineNum = 17498176;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17498178;
 //BA.debugLineNum = 17498178;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 /*SHARK2.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=17498180;
 //BA.debugLineNum = 17498180;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498181;
 //BA.debugLineNum = 17498181;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=17498182;
 //BA.debugLineNum = 17498182;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 /*SHARK2.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=17498185;
 //BA.debugLineNum = 17498185;BA.debugLine="If f.RowCount>0 Then";
if (__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=17498186;
 //BA.debugLineNum = 17498186;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=17498187;
 //BA.debugLineNum = 17498187;BA.debugLine="f.Position=i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17498188;
 //BA.debugLineNum = 17498188;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=17498189;
 //BA.debugLineNum = 17498189;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=17498190;
 //BA.debugLineNum = 17498190;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498191;
 //BA.debugLineNum = 17498191;BA.debugLine="Log(111)";
__c.LogImpl("517498191",BA.NumberToString(111),0);
RDebugUtils.currentLine=17498192;
 //BA.debugLineNum = 17498192;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17498193;
 //BA.debugLineNum = 17498193;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
 };
RDebugUtils.currentLine=17498196;
 //BA.debugLineNum = 17498196;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=17498198;
 //BA.debugLineNum = 17498198;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498199;
 //BA.debugLineNum = 17498199;BA.debugLine="Log(222)";
__c.LogImpl("517498199",BA.NumberToString(222),0);
RDebugUtils.currentLine=17498200;
 //BA.debugLineNum = 17498200;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17498201;
 //BA.debugLineNum = 17498201;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update c";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17498203;
 //BA.debugLineNum = 17498203;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=17498206;
 //BA.debugLineNum = 17498206;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=17498207;
 //BA.debugLineNum = 17498207;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else 
{RDebugUtils.currentLine=17498208;
 //BA.debugLineNum = 17498208;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=17498209;
 //BA.debugLineNum = 17498209;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
RDebugUtils.currentLine=17498210;
 //BA.debugLineNum = 17498210;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=17498211;
 //BA.debugLineNum = 17498211;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17498212;
 //BA.debugLineNum = 17498212;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498213;
 //BA.debugLineNum = 17498213;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17498214;
 //BA.debugLineNum = 17498214;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498215;
 //BA.debugLineNum = 17498215;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17498216;
 //BA.debugLineNum = 17498216;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17498217;
 //BA.debugLineNum = 17498217;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17498218;
 //BA.debugLineNum = 17498218;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=17498219;
 //BA.debugLineNum = 17498219;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498220;
 //BA.debugLineNum = 17498220;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=17498221;
 //BA.debugLineNum = 17498221;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498222;
 //BA.debugLineNum = 17498222;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17498223;
 //BA.debugLineNum = 17498223;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498224;
 //BA.debugLineNum = 17498224;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17498226;
 //BA.debugLineNum = 17498226;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 /*SHARK2.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=17498227;
 //BA.debugLineNum = 17498227;BA.debugLine="e.Position =0";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498228;
 //BA.debugLineNum = 17498228;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=17498229;
 //BA.debugLineNum = 17498229;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 /*SHARK2.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=17498230;
 //BA.debugLineNum = 17498230;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=17498231;
 //BA.debugLineNum = 17498231;BA.debugLine="F.Position =i";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=17498232;
 //BA.debugLineNum = 17498232;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select CA";
__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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_DP_IDPROD")})));
RDebugUtils.currentLine=17498233;
 //BA.debugLineNum = 17498233;BA.debugLine="h.Position=0";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498234;
 //BA.debugLineNum = 17498234;BA.debugLine="Log(333)";
__c.LogImpl("517498234",BA.NumberToString(333),0);
RDebugUtils.currentLine=17498235;
 //BA.debugLineNum = 17498235;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17498236;
 //BA.debugLineNum = 17498236;BA.debugLine="h.Close";
__ref._h /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }
};
RDebugUtils.currentLine=17498238;
 //BA.debugLineNum = 17498238;BA.debugLine="f.Close";
__ref._f /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=17498240;
 //BA.debugLineNum = 17498240;BA.debugLine="e.Close";
__ref._e /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498241;
 //BA.debugLineNum = 17498241;BA.debugLine="Log(444)";
__c.LogImpl("517498241",BA.NumberToString(444),0);
RDebugUtils.currentLine=17498242;
 //BA.debugLineNum = 17498242;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17498243;
 //BA.debugLineNum = 17498243;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17498244;
 //BA.debugLineNum = 17498244;BA.debugLine="cantidad.Text = \"\"";
__ref._cantidad /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=17498245;
 //BA.debugLineNum = 17498245;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 /*SHARK2.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=17498246;
 //BA.debugLineNum = 17498246;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498247;
 //BA.debugLineNum = 17498247;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.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=17498248;
 //BA.debugLineNum = 17498248;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.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=17498249;
 //BA.debugLineNum = 17498249;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=17498250;
 //BA.debugLineNum = 17498250;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else {
RDebugUtils.currentLine=17498252;
 //BA.debugLineNum = 17498252;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=17498253;
 //BA.debugLineNum = 17498253;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=17498254;
 //BA.debugLineNum = 17498254;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=17498255;
 //BA.debugLineNum = 17498255;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=17498256;
 //BA.debugLineNum = 17498256;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498257;
 //BA.debugLineNum = 17498257;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=17498258;
 //BA.debugLineNum = 17498258;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498259;
 //BA.debugLineNum = 17498259;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")));
RDebugUtils.currentLine=17498260;
 //BA.debugLineNum = 17498260;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498261;
 //BA.debugLineNum = 17498261;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=17498262;
 //BA.debugLineNum = 17498262;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=17498263;
 //BA.debugLineNum = 17498263;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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=17498264;
 //BA.debugLineNum = 17498264;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498265;
 //BA.debugLineNum = 17498265;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=17498266;
 //BA.debugLineNum = 17498266;BA.debugLine="Log(555)";
__c.LogImpl("517498266",BA.NumberToString(555),0);
RDebugUtils.currentLine=17498267;
 //BA.debugLineNum = 17498267;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
RDebugUtils.currentLine=17498268;
 //BA.debugLineNum = 17498268;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod 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=17498269;
 //BA.debugLineNum = 17498269;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 /*SHARK2.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=17498270;
 //BA.debugLineNum = 17498270;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=17498271;
 //BA.debugLineNum = 17498271;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.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=17498272;
 //BA.debugLineNum = 17498272;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*SHARK2.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 /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.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=17498273;
 //BA.debugLineNum = 17498273;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=17498274;
 //BA.debugLineNum = 17498274;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.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=17498275;
 //BA.debugLineNum = 17498275;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }}}}
;
RDebugUtils.currentLine=17498277;
 //BA.debugLineNum = 17498277;BA.debugLine="End Sub";
return "";
}
}