package medicomed.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 BA(_ba, this, htSubs, "medicomed.keymon.com.mx.c_pedidos");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", medicomed.keymon.com.mx.c_pedidos.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 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 medicomed.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_pedido = null;
public b4a.example.dateutils _dateutils = null;
public medicomed.keymon.com.mx.main _main = null;
public medicomed.keymon.com.mx.starter _starter = null;
public medicomed.keymon.com.mx.appupdater _appupdater = null;
public medicomed.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public medicomed.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public medicomed.keymon.com.mx.subs _subs = null;
public medicomed.keymon.com.mx.notificationservice _notificationservice = null;
public medicomed.keymon.com.mx.pendientes _pendientes = null;
public medicomed.keymon.com.mx.tracker _tracker = null;
public medicomed.keymon.com.mx.newinst2 _newinst2 = null;
public medicomed.keymon.com.mx.b4xpages _b4xpages = null;
public medicomed.keymon.com.mx.b4xcollections _b4xcollections = null;
public medicomed.keymon.com.mx.httputils2service _httputils2service = null;
public medicomed.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _out = null;
 //BA.debugLineNum = 79;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 80;BA.debugLine="tgl.Initialize";
_tgl.Initialize(ba);
 //BA.debugLineNum = 81;BA.debugLine="BONSABOR = 0";
_bonsabor = BA.NumberToString(0);
 //BA.debugLineNum = 82;BA.debugLine="BONSABOR2 = 0";
_bonsabor2 = BA.NumberToString(0);
 //BA.debugLineNum = 83;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
 //BA.debugLineNum = 84;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
 //BA.debugLineNum = 85;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
 //BA.debugLineNum = 87;BA.debugLine="cantidad.Text = \"\"";
_cantidad.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 88;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select  ID_AL";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select  ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 89;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 90;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 91;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 92;BA.debugLine="i_fotol.Visible = False";
_i_fotol.setVisible(__c.False);
 //BA.debugLineNum = 93;BA.debugLine="sb.Initialize";
_sb.Initialize();
 //BA.debugLineNum = 94;BA.debugLine="p.Shell(\"ping -c1 -W1 177.244.63.54\",Null, sb,Nul";
_p.Shell("ping -c1 -W1 177.244.63.54",(String[])(__c.Null),(java.lang.StringBuilder)(_sb.getObject()),(java.lang.StringBuilder)(__c.Null));
 //BA.debugLineNum = 95;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
_skmt.Initialize(_ruta,"kmt.db",__c.True);
 //BA.debugLineNum = 96;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_GP";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 97;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 98;BA.debugLine="L_PROID.Text = c.GetString(\"CAT_GP_ID\")";
_l_proid.setText(BA.ObjectToCharSequence(_c.GetString("CAT_GP_ID")));
 //BA.debugLineNum = 99;BA.debugLine="l_tipo.Text = c.GetString(\"CAT_GP_TIPO\")";
_l_tipo.setText(BA.ObjectToCharSequence(_c.GetString("CAT_GP_TIPO")));
 //BA.debugLineNum = 100;BA.debugLine="l_sub.Text = c.GetString(\"CAT_GP_SUBTIPO\")";
_l_sub.setText(BA.ObjectToCharSequence(_c.GetString("CAT_GP_SUBTIPO")));
 //BA.debugLineNum = 101;BA.debugLine="l_marca.Text = c.GetString(\"CAT_GP_CLASIF\")";
_l_marca.setText(BA.ObjectToCharSequence(_c.GetString("CAT_GP_CLASIF")));
 //BA.debugLineNum = 102;BA.debugLine="l_desc.Text = c.GetString(\"CAT_GP_NOMBRE\")";
_l_desc.setText(BA.ObjectToCharSequence(_c.GetString("CAT_GP_NOMBRE")));
 //BA.debugLineNum = 103;BA.debugLine="l_precio.Text = c.GetDouble(\"CAT_GP_PRECIO\")";
_l_precio.setText(BA.ObjectToCharSequence(_c.GetDouble("CAT_GP_PRECIO")));
 //BA.debugLineNum = 104;BA.debugLine="l_bodega.Text = c.GetString(\"CAT_GP_ALMACEN\")";
_l_bodega.setText(BA.ObjectToCharSequence(_c.GetString("CAT_GP_ALMACEN")));
 //BA.debugLineNum = 105;BA.debugLine="IMG_PASO = c.GetBlob(\"CAT_GP_IMG\")";
_img_paso = _c.GetBlob("CAT_GP_IMG");
 //BA.debugLineNum = 106;BA.debugLine="PROMO_C = c.GetString(\"CAT_GP_STS\")";
_promo_c = _c.GetString("CAT_GP_STS");
 //BA.debugLineNum = 107;BA.debugLine="cambio = c.GetString(\"CAT_GP_DEV\")";
_cambio = _c.GetString("CAT_GP_DEV");
 //BA.debugLineNum = 108;BA.debugLine="preciosin = c.GetString(\"CAT_GP_IMP2\")";
_preciosin = _c.GetString("CAT_GP_IMP2");
 //BA.debugLineNum = 109;BA.debugLine="PROMO_CR = c.GetString(\"CAT_GP_IMP1\")";
_promo_cr = _c.GetString("CAT_GP_IMP1");
 //BA.debugLineNum = 110;BA.debugLine="cambio = \"0\"";
_cambio = "0";
 //BA.debugLineNum = 112;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery2(\"select count";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_ID")})));
 //BA.debugLineNum = 113;BA.debugLine="e.Position =0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 114;BA.debugLine="If e.GetString(\"CUANTOS\") = 0 Then";
if ((_e.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 115;BA.debugLine="If l_marca.text = \"PROMOS\" And l_tipo.Text =\"PRO";
if ((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS")) { 
 //BA.debugLineNum = 116;BA.debugLine="DESC_PROMO.Visible = True";
_desc_promo.setVisible(__c.True);
 //BA.debugLineNum = 117;BA.debugLine="CC=B4XPages.MainPage.skmt.ExecQuery2(\"select co";
_cc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) as CUANTOS FROM PROMOS_COMP WHERE CAT_PA_ID = ?",new String[]{_c.GetString("CAT_GP_ID")})));
 //BA.debugLineNum = 118;BA.debugLine="CC.Position =0";
_cc.setPosition((int) (0));
 //BA.debugLineNum = 119;BA.debugLine="If CC.GetString(\"CUANTOS\") = 0 Then";
if ((_cc.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 120;BA.debugLine="l_bodega.Text = \"0\" ' se modifica a cero para";
_l_bodega.setText(BA.ObjectToCharSequence("0"));
 }else {
 //BA.debugLineNum = 122;BA.debugLine="CC.Close";
_cc.Close();
 //BA.debugLineNum = 123;BA.debugLine="CC=B4XPages.MainPage.skmt.ExecQuery2(\"select C";
_cc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_ID")})));
 //BA.debugLineNum = 124;BA.debugLine="CC.Position =0";
_cc.setPosition((int) (0));
 //BA.debugLineNum = 126;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT C";
_dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_ID")})));
 //BA.debugLineNum = 127;BA.debugLine="DD.Position =0";
_dd.setPosition((int) (0));
 //BA.debugLineNum = 128;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((_dd.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 129;BA.debugLine="HCCP_CANT = 0";
_hccp_cant = BA.NumberToString(0);
 }else {
 //BA.debugLineNum = 131;BA.debugLine="DD.Close";
_dd.Close();
 //BA.debugLineNum = 132;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
_dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_ID")})));
 //BA.debugLineNum = 133;BA.debugLine="DD.Position =0";
_dd.setPosition((int) (0));
 //BA.debugLineNum = 134;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
_hccp_cant = _dd.GetString("HCCP_CANT");
 //BA.debugLineNum = 135;BA.debugLine="DD.Close";
_dd.Close();
 };
 //BA.debugLineNum = 137;BA.debugLine="BONSABOR = HCCP_CANT";
_bonsabor = _hccp_cant;
 //BA.debugLineNum = 138;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT C";
_dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_NOMBRE")})));
 //BA.debugLineNum = 139;BA.debugLine="DD.Position =0";
_dd.setPosition((int) (0));
 //BA.debugLineNum = 140;BA.debugLine="If DD.GetString(\"CUANTOS\")  = 0 Then";
if ((_dd.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 141;BA.debugLine="HCCP_CANT = 0";
_hccp_cant = BA.NumberToString(0);
 }else {
 //BA.debugLineNum = 143;BA.debugLine="DD.Close";
_dd.Close();
 //BA.debugLineNum = 144;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
_dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_NOMBRE")})));
 //BA.debugLineNum = 145;BA.debugLine="DD.Position =0";
_dd.setPosition((int) (0));
 //BA.debugLineNum = 146;BA.debugLine="HCCP_CANT = DD.GetString(\"HCCP_CANT\")";
_hccp_cant = _dd.GetString("HCCP_CANT");
 //BA.debugLineNum = 147;BA.debugLine="DD.Close";
_dd.Close();
 };
 //BA.debugLineNum = 149;BA.debugLine="DD=B4XPages.MainPage.skmt.ExecQuery2(\"Select C";
_dd = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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[]{_c.GetString("CAT_GP_NOMBRE")})));
 //BA.debugLineNum = 150;BA.debugLine="DD.Position =0";
_dd.setPosition((int) (0));
 //BA.debugLineNum = 151;BA.debugLine="BONSABOR2 = DD.GetString(\"CUANTOS\")";
_bonsabor2 = _dd.GetString("CUANTOS");
 //BA.debugLineNum = 152;BA.debugLine="DD.Close";
_dd.Close();
 //BA.debugLineNum = 153;BA.debugLine="TOTAL_PROMO = CC.GetString(\"CAT_PA_MAXPROMCLIE";
_total_promo = BA.NumberToString((double)(Double.parseDouble(_cc.GetString("CAT_PA_MAXPROMCLIE")))-(double)(Double.parseDouble(_hccp_cant)));
 //BA.debugLineNum = 154;BA.debugLine="If HCCP_CANT = 0 Then";
if ((_hccp_cant).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 155;BA.debugLine="l_bodega.Text = CC.GetString(\"CAT_PA_MAXPROM\"";
_l_bodega.setText(BA.ObjectToCharSequence(_cc.GetString("CAT_PA_MAXPROM")));
 }else if((double)(Double.parseDouble(_total_promo))>(double)(Double.parseDouble(_cc.GetString("CAT_PA_MAXPROMREC")))) { 
 //BA.debugLineNum = 157;BA.debugLine="l_bodega.Text = 	CC.GetString(\"CAT_PA_MAXPROM";
_l_bodega.setText(BA.ObjectToCharSequence(_cc.GetString("CAT_PA_MAXPROMREC")));
 }else {
 //BA.debugLineNum = 159;BA.debugLine="l_bodega.Text = TOTAL_PROMO";
_l_bodega.setText(BA.ObjectToCharSequence(_total_promo));
 };
 };
 }else {
 //BA.debugLineNum = 163;BA.debugLine="DESC_PROMO.Visible = False";
_desc_promo.setVisible(__c.False);
 };
 //BA.debugLineNum = 165;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 166;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CASE";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 167;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 168;BA.debugLine="t_venta.Text = c.GetString(\"TOTAL_CLIE\")";
_t_venta.setText(BA.ObjectToCharSequence(_c.GetString("TOTAL_CLIE")));
 //BA.debugLineNum = 169;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 170;BA.debugLine="Terminar.Visible = True";
_terminar.setVisible(__c.True);
 //BA.debugLineNum = 171;BA.debugLine="guardar.Visible = True";
_guardar.setVisible(__c.True);
 //BA.debugLineNum = 172;BA.debugLine="cantidad.Visible = True";
_cantidad.setVisible(__c.True);
 //BA.debugLineNum = 173;BA.debugLine="If cambio = \"1\" Then";
if ((_cambio).equals("1")) { 
 //BA.debugLineNum = 174;BA.debugLine="nopromo.Visible = True";
_nopromo.setVisible(__c.True);
 }else {
 //BA.debugLineNum = 176;BA.debugLine="nopromo.Visible = False";
_nopromo.setVisible(__c.False);
 };
 //BA.debugLineNum = 178;BA.debugLine="Dim out As OutputStream";
_out = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
 //BA.debugLineNum = 179;BA.debugLine="out = File.OpenOutput(ruta, \"1.jpg\", False)";
_out = __c.File.OpenOutput(_ruta,"1.jpg",__c.False);
 //BA.debugLineNum = 180;BA.debugLine="out.WriteBytes(IMG_PASO, 0, IMG_PASO.Length)";
_out.WriteBytes(_img_paso,(int) (0),_img_paso.length);
 //BA.debugLineNum = 181;BA.debugLine="out.Close";
_out.Close();
 //BA.debugLineNum = 182;BA.debugLine="img_prod.Bitmap = LoadBitmap(ruta,\"1.jpg\")";
_img_prod.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(_ruta,"1.jpg").getObject()));
 //BA.debugLineNum = 183;BA.debugLine="TOT_ART_PROMO = \"0\"";
_tot_art_promo = "0";
 //BA.debugLineNum = 184;BA.debugLine="TOT_ART_PROMOR = \"0\"";
_tot_art_promor = "0";
 //BA.debugLineNum = 185;BA.debugLine="If l_marca.text = \"PROMOS\" And l_tipo.Text =\"PRO";
if ((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS") && (_l_bodega.getText()).equals("0")) { 
 //BA.debugLineNum = 186;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);
 //BA.debugLineNum = 187;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else if((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS") && (_l_proid.getText()).equals("PROUNI1") && (_bonsabor).equals("1") == false && (_bonsabor2).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 189;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);
 //BA.debugLineNum = 190;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 };
 }else {
 //BA.debugLineNum = 193;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);
 //BA.debugLineNum = 194;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 };
 //BA.debugLineNum = 196;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
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(medicomed.keymon.com.mx.c_pedidos parent) {
this.parent = parent;
}
medicomed.keymon.com.mx.c_pedidos parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{

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

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 64;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 65;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 67;BA.debugLine="Root.LoadLayout(\"pedido\")";
_root.LoadLayout("pedido",ba);
 //BA.debugLineNum = 68;BA.debugLine="i_fotol.Visible = False";
_i_fotol.setVisible(__c.False);
 //BA.debugLineNum = 70;BA.debugLine="ruta = File.DirInternal";
_ruta = __c.File.getDirInternal();
 //BA.debugLineNum = 71;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(_ruta,"kmt.db")==__c.False) { 
 //BA.debugLineNum = 72;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",_ruta,"kmt.db");
 };
 //BA.debugLineNum = 75;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 5;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
 //BA.debugLineNum = 6;BA.debugLine="Dim ruta As String";
_ruta = "";
 //BA.debugLineNum = 7;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
 //BA.debugLineNum = 8;BA.debugLine="Private t3 As Timer";
_t3 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 9;BA.debugLine="Dim p As Phone";
_p = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 10;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 13;BA.debugLine="Dim e As Cursor";
_e = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 14;BA.debugLine="Dim f As Cursor";
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 15;BA.debugLine="Dim h As Cursor";
_h = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Dim CC As Cursor";
_cc = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim DD As Cursor";
_dd = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Dim l_tipo As Label";
_l_tipo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim l_sub As Label";
_l_sub = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim l_marca As Label";
_l_marca = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Dim l_desc As Label";
_l_desc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim l_precio As Label";
_l_precio = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Dim l_bodega As Label";
_l_bodega = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Dim cantidad As EditText";
_cantidad = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim guardar As Button";
_guardar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Dim Terminar As Button";
_terminar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Dim img_prod As ImageView";
_img_prod = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim IMG_PASO() As Byte";
_img_paso = new byte[(int) (0)];
;
 //BA.debugLineNum = 29;BA.debugLine="Dim L_PROID As Label";
_l_proid = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim clie_id As String";
_clie_id = "";
 //BA.debugLineNum = 31;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 32;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 34;BA.debugLine="Dim t_venta As Label";
_t_venta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 35;BA.debugLine="Dim PROMO_C As String";
_promo_c = "";
 //BA.debugLineNum = 36;BA.debugLine="Dim i_fotol As ImageView";
_i_fotol = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 37;BA.debugLine="Private DESC_PROMO As Button";
_desc_promo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 38;BA.debugLine="Private nopromo As Button";
_nopromo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Dim TOT_ART_PROMO As String";
_tot_art_promo = "";
 //BA.debugLineNum = 40;BA.debugLine="Dim cambio As String";
_cambio = "";
 //BA.debugLineNum = 41;BA.debugLine="Dim COSTO_TOT As String";
_costo_tot = "";
 //BA.debugLineNum = 42;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
 //BA.debugLineNum = 43;BA.debugLine="Dim preciosin As String";
_preciosin = "";
 //BA.debugLineNum = 44;BA.debugLine="Dim cl_ruta As String";
_cl_ruta = "";
 //BA.debugLineNum = 45;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Dim TOT_ART_PROMOR As String";
_tot_art_promor = "";
 //BA.debugLineNum = 47;BA.debugLine="Dim PROMO_CR As String";
_promo_cr = "";
 //BA.debugLineNum = 48;BA.debugLine="Dim TOTAL_PROMO As String";
_total_promo = "";
 //BA.debugLineNum = 49;BA.debugLine="Dim HCCP_CANT As String";
_hccp_cant = "";
 //BA.debugLineNum = 50;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
 //BA.debugLineNum = 51;BA.debugLine="Dim precio_Cero As String";
_precio_cero = "";
 //BA.debugLineNum = 52;BA.debugLine="Private BONSABOR As String";
_bonsabor = "";
 //BA.debugLineNum = 53;BA.debugLine="Private BONSABOR2 As String";
_bonsabor2 = "";
 //BA.debugLineNum = 54;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 55;BA.debugLine="Private p_pedido As Panel";
_p_pedido = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 56;BA.debugLine="End Sub";
return "";
}
public String  _desc_promo_click() throws Exception{
 //BA.debugLineNum = 548;BA.debugLine="Sub DESC_PROMO_Click";
 //BA.debugLineNum = 549;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
 //BA.debugLineNum = 550;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 551;BA.debugLine="B4XPages.ShowPage(\"detalle_promo\")";
_b4xpages._showpage /*String*/ (ba,"detalle_promo");
 //BA.debugLineNum = 552;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 359;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 362;BA.debugLine="End Sub";
return "";
}
public String  _guardar_click() throws Exception{
int _i = 0;
 //BA.debugLineNum = 198;BA.debugLine="Sub guardar_Click";
 //BA.debugLineNum = 199;BA.debugLine="If cantidad.Text = \"\" Then";
if ((_cantidad.getText()).equals("")) { 
 //BA.debugLineNum = 200;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else if((double)(Double.parseDouble(_cantidad.getText()))>(double)(Double.parseDouble(_l_bodega.getText()))) { 
 //BA.debugLineNum = 202;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else if((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS") && (double)(Double.parseDouble(_promo_c))>0 && (double)(Double.parseDouble(_cantidad.getText()))>0) { 
 //BA.debugLineNum = 204;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
 //BA.debugLineNum = 205;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 206;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select count";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 207;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 208;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((_c.GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 209;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 {
 //BA.debugLineNum = 211;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 212;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 213;BA.debugLine="TOT_ART_PROMO = C.GetString(\"TOT_ART_PROMO\")";
_tot_art_promo = _c.GetString("TOT_ART_PROMO");
 //BA.debugLineNum = 214;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
_costo_tot = _c.GetString("COSTO_TOT");
 //BA.debugLineNum = 215;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 216;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 217;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 218;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((_c.GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 219;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
_tot_art_promor = "0";
 }else {
 //BA.debugLineNum = 221;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 222;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 223;BA.debugLine="TOT_ART_PROMOR = C.GetString(\"TOT_ART_PROMO\")";
_tot_art_promor = _c.GetString("TOT_ART_PROMO");
 };
 //BA.debugLineNum = 225;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 226;BA.debugLine="PROMO_C = PROMO_C * cantidad.Text";
_promo_c = BA.NumberToString((double)(Double.parseDouble(_promo_c))*(double)(Double.parseDouble(_cantidad.getText())));
 //BA.debugLineNum = 227;BA.debugLine="PROMO_CR = PROMO_CR * cantidad.Text";
_promo_cr = BA.NumberToString((double)(Double.parseDouble(_promo_cr))*(double)(Double.parseDouble(_cantidad.getText())));
 //BA.debugLineNum = 228;BA.debugLine="If  TOT_ART_PROMO = PROMO_C And TOT_ART_PROMOR";
if ((_tot_art_promo).equals(_promo_c) && (_tot_art_promor).equals(_promo_cr)) { 
 //BA.debugLineNum = 229;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText())}));
 //BA.debugLineNum = 230;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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")));
 //BA.debugLineNum = 231;BA.debugLine="If D.RowCount>0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 232;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step34 = 1;
final int limit34 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit34 ;_i = _i + step34 ) {
 //BA.debugLineNum = 233;BA.debugLine="D.Position=i";
_d.setPosition(_i);
 //BA.debugLineNum = 234;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*medicomed.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)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(_d.GetString("CAT_DP_IDPROD"))}));
 }
};
 };
 //BA.debugLineNum = 237;BA.debugLine="D.Close";
_d.Close();
 //BA.debugLineNum = 238;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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")));
 //BA.debugLineNum = 239;BA.debugLine="If D.RowCount>0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 240;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step42 = 1;
final int limit42 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit42 ;_i = _i + step42 ) {
 //BA.debugLineNum = 241;BA.debugLine="D.Position=i";
_d.setPosition(_i);
 //BA.debugLineNum = 242;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*medicomed.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)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(_d.GetString("CAT_DP_IDPROD"))}));
 }
};
 };
 //BA.debugLineNum = 245;BA.debugLine="D.Close";
_d.Close();
 //BA.debugLineNum = 246;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 247;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 248;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 249;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 250;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 251;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 252;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 253;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 254;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 255;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
_cl_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 256;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 257;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 258;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 259;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 260;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select cou";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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 ")));
 //BA.debugLineNum = 262;BA.debugLine="e.Position =0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 263;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_e.GetString("CUANTOS")))>0) { 
 //BA.debugLineNum = 264;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CA";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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 ")));
 //BA.debugLineNum = 267;BA.debugLine="If f.RowCount>0 Then";
if (_f.getRowCount()>0) { 
 //BA.debugLineNum = 268;BA.debugLine="For i=0 To f.RowCount -1";
{
final int step67 = 1;
final int limit67 = (int) (_f.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit67 ;_i = _i + step67 ) {
 //BA.debugLineNum = 269;BA.debugLine="f.Position=i";
_f.setPosition(_i);
 //BA.debugLineNum = 270;BA.debugLine="precio_Cero = f.GetString(\"CAT_DP_PRECIO\")";
_precio_cero = _f.GetString("CAT_DP_PRECIO");
 //BA.debugLineNum = 271;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select";
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{_f.GetString("CAT_DP_IDPROD")})));
 //BA.debugLineNum = 272;BA.debugLine="h.Position=0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 274;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)((double)(Double.parseDouble(_precio_cero))*(double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(_cantidad.getText()))),(Object)(_precio_cero),(Object)((double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(_cantidad.getText()))),(Object)(_h.GetString("CAT_GP_NOMBRE")),(Object)(_f.GetString("CAT_DP_IDPROD")),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta)}));
 //BA.debugLineNum = 275;BA.debugLine="h.Close";
_h.Close();
 }
};
 };
 //BA.debugLineNum = 278;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 280;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 281;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)(0),(Object)(0),(Object)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 282;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update c";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 }else {
 //BA.debugLineNum = 284;BA.debugLine="Msgbox(\"Tiene \" & TOT_ART_PROMO & \" \" & TOT_AR";
__c.Msgbox(BA.ObjectToCharSequence("Tiene "+_tot_art_promo+" "+_tot_art_promor+" y necesita "+_promo_c+" "+_promo_cr+" Para la Promo. "),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 };
 };
 //BA.debugLineNum = 287;BA.debugLine="cantidad.Text = \"\"";
_cantidad.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 288;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else if((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS") && (_promo_c).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 290;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
 //BA.debugLineNum = 291;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 292;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 293;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 294;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 295;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 296;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 297;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 298;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 299;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 300;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 301;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
_cl_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 302;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 303;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 304;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 305;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 308;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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) ")));
 //BA.debugLineNum = 309;BA.debugLine="e.Position =0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 310;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_e.GetString("CUANTOS")))>0) { 
 //BA.debugLineNum = 311;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 312;BA.debugLine="For i =0 To f.RowCount -1";
{
final int step108 = 1;
final int limit108 = (int) (_f.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit108 ;_i = _i + step108 ) {
 //BA.debugLineNum = 313;BA.debugLine="F.Position =i";
_f.setPosition(_i);
 //BA.debugLineNum = 314;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select CA";
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{_f.GetString("CAT_DP_IDPROD")})));
 //BA.debugLineNum = 315;BA.debugLine="h.Position=0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 316;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)((double)(Double.parseDouble(_f.GetString("CAT_DP_PRECIO")))*(double)(Double.parseDouble(_cantidad.getText()))*(double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))),(Object)(_f.GetString("CAT_DP_PRECIO")),(Object)((double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(_cantidad.getText()))),(Object)(_h.GetString("CAT_GP_NOMBRE")),(Object)(_f.GetString("CAT_DP_IDPROD")),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 317;BA.debugLine="h.Close";
_h.Close();
 }
};
 //BA.debugLineNum = 319;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 321;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 323;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)(0),(Object)(0),(Object)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 324;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 325;BA.debugLine="cantidad.Text = \"\"";
_cantidad.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 326;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 327;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 328;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
 //BA.debugLineNum = 329;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*medicomed.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)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_c.GetString("CANT_CLIE")),(Object)(_c.GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_almacen),(Object)(_cl_ruta),(Object)(_c.GetString("TOTAL_CLIE_SIN"))}));
 //BA.debugLineNum = 330;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*medicomed.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)");
 //BA.debugLineNum = 331;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 }else {
 //BA.debugLineNum = 333;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 334;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 335;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 336;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 337;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 338;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 339;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 340;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 341;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 342;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
_cl_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 343;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 344;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 345;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 346;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 347;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_almacen),(Object)((double)(Double.parseDouble(_cantidad.getText()))*(double)(Double.parseDouble(_l_precio.getText()))),(Object)(_l_precio.getText()),(Object)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_preciosin),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 348;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 349;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 350;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 351;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
 //BA.debugLineNum = 352;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*medicomed.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)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_c.GetString("CANT_CLIE")),(Object)(_c.GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_almacen),(Object)(_cl_ruta),(Object)(_c.GetString("TOTAL_CLIE_SIN"))}));
 //BA.debugLineNum = 353;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*medicomed.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)");
 //BA.debugLineNum = 354;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_almacen),(Object)(_l_proid.getText()),(Object)(_cantidad.getText())}));
 //BA.debugLineNum = 355;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 };
 //BA.debugLineNum = 357;BA.debugLine="End Sub";
return "";
}
public String  _i_fotol_click() throws Exception{
 //BA.debugLineNum = 543;BA.debugLine="Sub i_fotol_Click";
 //BA.debugLineNum = 544;BA.debugLine="i_fotol.Visible = False";
_i_fotol.setVisible(__c.False);
 //BA.debugLineNum = 546;BA.debugLine="End Sub";
return "";
}
public String  _img_prod_click() throws Exception{
 //BA.debugLineNum = 538;BA.debugLine="Sub img_prod_Click";
 //BA.debugLineNum = 539;BA.debugLine="i_fotol.Visible = True";
_i_fotol.setVisible(__c.True);
 //BA.debugLineNum = 540;BA.debugLine="i_fotol.Bitmap = LoadBitmap(ruta,\"1.jpg\")";
_i_fotol.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(_ruta,"1.jpg").getObject()));
 //BA.debugLineNum = 542;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 59;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 60;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 61;BA.debugLine="End Sub";
return null;
}
public String  _nopromo_click() throws Exception{
 //BA.debugLineNum = 554;BA.debugLine="Sub nopromo_Click";
 //BA.debugLineNum = 555;BA.debugLine="If cantidad.Text = \"\" Then";
if ((_cantidad.getText()).equals("")) { 
 //BA.debugLineNum = 556;BA.debugLine="Msgbox(\"Cantidad no puede ser 0\",\"Cantidad\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Cantidad no puede ser 0"),BA.ObjectToCharSequence("Cantidad"),ba);
 }else if((double)(Double.parseDouble(_cantidad.getText()))>(double)(Double.parseDouble(_l_bodega.getText()))) { 
 //BA.debugLineNum = 558;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else {
 //BA.debugLineNum = 560;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 561;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 562;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 563;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 564;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 565;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 566;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 567;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 568;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 569;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 570;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 571;BA.debugLine="cantidad.Text = \"\"";
_cantidad.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 572;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 };
 //BA.debugLineNum = 574;BA.debugLine="End Sub";
return "";
}
public String  _p_pedido_click() throws Exception{
 //BA.debugLineNum = 576;BA.debugLine="Private Sub p_pedido_Click";
 //BA.debugLineNum = 578;BA.debugLine="End Sub";
return "";
}
public String  _terminar_click() throws Exception{
int _i = 0;
 //BA.debugLineNum = 364;BA.debugLine="Sub Terminar_Click";
 //BA.debugLineNum = 365;BA.debugLine="If cantidad.Text = \"\" Then";
if ((_cantidad.getText()).equals("")) { 
 //BA.debugLineNum = 366;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else if((double)(Double.parseDouble(_cantidad.getText()))>(double)(Double.parseDouble(_l_bodega.getText()))) { 
 //BA.debugLineNum = 368;BA.debugLine="Msgbox(\"Exede la existencia\", \"ADVERTENCIA\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Exede la existencia"),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 }else if((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS") && (double)(Double.parseDouble(_promo_c))>0 && (double)(Double.parseDouble(_cantidad.getText()))>0) { 
 //BA.debugLineNum = 370;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
 //BA.debugLineNum = 371;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 372;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select count";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 373;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 374;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((_c.GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 375;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 {
 //BA.debugLineNum = 377;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 378;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 379;BA.debugLine="TOT_ART_PROMO = C.GetString(\"TOT_ART_PROMO\")";
_tot_art_promo = _c.GetString("TOT_ART_PROMO");
 //BA.debugLineNum = 380;BA.debugLine="COSTO_TOT = C.GetString(\"COSTO_TOT\")";
_costo_tot = _c.GetString("COSTO_TOT");
 //BA.debugLineNum = 381;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 382;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select coun";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 383;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 384;BA.debugLine="If c.GetString(\"CUANTOSD\") = 0 Then";
if ((_c.GetString("CUANTOSD")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 385;BA.debugLine="TOT_ART_PROMOR = \"0\" 'Msgbox(\"No tiene venta e";
_tot_art_promor = "0";
 }else {
 //BA.debugLineNum = 387;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select sum";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 388;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 389;BA.debugLine="TOT_ART_PROMOR = C.GetString(\"TOT_ART_PROMO\")";
_tot_art_promor = _c.GetString("TOT_ART_PROMO");
 };
 //BA.debugLineNum = 391;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 392;BA.debugLine="PROMO_C = PROMO_C * cantidad.Text";
_promo_c = BA.NumberToString((double)(Double.parseDouble(_promo_c))*(double)(Double.parseDouble(_cantidad.getText())));
 //BA.debugLineNum = 393;BA.debugLine="PROMO_CR = PROMO_CR * cantidad.Text";
_promo_cr = BA.NumberToString((double)(Double.parseDouble(_promo_cr))*(double)(Double.parseDouble(_cantidad.getText())));
 //BA.debugLineNum = 394;BA.debugLine="If  TOT_ART_PROMO = PROMO_C And TOT_ART_PROMOR";
if ((_tot_art_promo).equals(_promo_c) && (_tot_art_promor).equals(_promo_cr)) { 
 //BA.debugLineNum = 398;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE P";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText())}));
 //BA.debugLineNum = 399;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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")));
 //BA.debugLineNum = 400;BA.debugLine="If D.RowCount>0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 401;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step34 = 1;
final int limit34 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit34 ;_i = _i + step34 ) {
 //BA.debugLineNum = 402;BA.debugLine="D.Position=i";
_d.setPosition(_i);
 //BA.debugLineNum = 403;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*medicomed.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)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(_d.GetString("CAT_DP_IDPROD"))}));
 }
};
 };
 //BA.debugLineNum = 406;BA.debugLine="D.Close";
_d.Close();
 //BA.debugLineNum = 407;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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")));
 //BA.debugLineNum = 408;BA.debugLine="If D.RowCount>0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 409;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step42 = 1;
final int limit42 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit42 ;_i = _i + step42 ) {
 //BA.debugLineNum = 410;BA.debugLine="D.Position=i";
_d.setPosition(_i);
 //BA.debugLineNum = 411;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE";
_b4xpages._mainpage /*medicomed.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)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO")),(Object)(_d.GetString("CAT_DP_PRECIO_SIMPTOS")),(Object)(_d.GetString("CAT_DP_IDPROD"))}));
 }
};
 };
 //BA.debugLineNum = 414;BA.debugLine="D.Close";
_d.Close();
 //BA.debugLineNum = 415;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 416;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 417;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 418;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 419;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 420;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 421;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 422;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 423;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 424;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
_cl_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 425;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 426;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 427;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 428;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 430;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select cou";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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 ")));
 //BA.debugLineNum = 432;BA.debugLine="e.Position =0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 433;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_e.GetString("CUANTOS")))>0) { 
 //BA.debugLineNum = 434;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CA";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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 ")));
 //BA.debugLineNum = 437;BA.debugLine="If f.RowCount>0 Then";
if (_f.getRowCount()>0) { 
 //BA.debugLineNum = 438;BA.debugLine="For i=0 To f.RowCount -1";
{
final int step67 = 1;
final int limit67 = (int) (_f.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit67 ;_i = _i + step67 ) {
 //BA.debugLineNum = 439;BA.debugLine="f.Position=i";
_f.setPosition(_i);
 //BA.debugLineNum = 440;BA.debugLine="precio_Cero = f.GetString(\"CAT_DP_PRECIO\")";
_precio_cero = _f.GetString("CAT_DP_PRECIO");
 //BA.debugLineNum = 441;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select";
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{_f.GetString("CAT_DP_IDPROD")})));
 //BA.debugLineNum = 442;BA.debugLine="h.Position=0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 443;BA.debugLine="Log(111)";
__c.LogImpl("763701071",BA.NumberToString(111),0);
 //BA.debugLineNum = 444;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)((double)(Double.parseDouble(_precio_cero))*(double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(_cantidad.getText()))),(Object)(_precio_cero),(Object)((double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(_cantidad.getText()))),(Object)(_h.GetString("CAT_GP_NOMBRE")),(Object)(_f.GetString("CAT_DP_IDPROD")),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 445;BA.debugLine="h.Close";
_h.Close();
 }
};
 };
 //BA.debugLineNum = 448;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 450;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 451;BA.debugLine="Log(222)";
__c.LogImpl("763701079",BA.NumberToString(222),0);
 //BA.debugLineNum = 452;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)(0),(Object)(0),(Object)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 453;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update c";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 }else {
 //BA.debugLineNum = 455;BA.debugLine="Msgbox(\"Tiene \" & TOT_ART_PROMO & \" \" & TOT_AR";
__c.Msgbox(BA.ObjectToCharSequence("Tiene "+_tot_art_promo+" "+_tot_art_promor+" y necesita "+_promo_c+" "+_promo_cr+" Para la Promo. "),BA.ObjectToCharSequence("ADVERTENCIA"),ba);
 };
 };
 //BA.debugLineNum = 458;BA.debugLine="cantidad.Text = \"\"";
_cantidad.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 459;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else if((_l_marca.getText()).equals("PROMOS") && (_l_tipo.getText()).equals("PROMOS") && (_promo_c).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 461;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROIDID");
 //BA.debugLineNum = 462;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROIDID VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 463;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 464;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 465;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 466;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 467;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 468;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 469;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 470;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 471;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 472;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
_cl_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 473;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 474;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 475;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 476;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 478;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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) ")));
 //BA.debugLineNum = 479;BA.debugLine="e.Position =0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 480;BA.debugLine="If e.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_e.GetString("CUANTOS")))>0) { 
 //BA.debugLineNum = 481;BA.debugLine="F=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 482;BA.debugLine="For i =0 To f.RowCount -1";
{
final int step110 = 1;
final int limit110 = (int) (_f.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit110 ;_i = _i + step110 ) {
 //BA.debugLineNum = 483;BA.debugLine="F.Position =i";
_f.setPosition(_i);
 //BA.debugLineNum = 484;BA.debugLine="h=B4XPages.MainPage.skmt.ExecQuery2(\"select CA";
_h = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_GP_NOMBRE from CAT_GUNAPROD where CAT_GP_ID = ? ",new String[]{_f.GetString("CAT_DP_IDPROD")})));
 //BA.debugLineNum = 485;BA.debugLine="h.Position=0";
_h.setPosition((int) (0));
 //BA.debugLineNum = 486;BA.debugLine="Log(333)";
__c.LogImpl("763701114",BA.NumberToString(333),0);
 //BA.debugLineNum = 487;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)((double)(Double.parseDouble(_f.GetString("CAT_DP_PRECIO")))*(double)(Double.parseDouble(_cantidad.getText()))*(double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))),(Object)(_f.GetString("CAT_DP_PRECIO")),(Object)((double)(Double.parseDouble(_f.GetString("CAT_DP_PZAS")))*(double)(Double.parseDouble(_cantidad.getText()))),(Object)(_h.GetString("CAT_GP_NOMBRE")),(Object)(_f.GetString("CAT_DP_IDPROD")),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 488;BA.debugLine="h.Close";
_h.Close();
 }
};
 //BA.debugLineNum = 490;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 492;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 493;BA.debugLine="Log(444)";
__c.LogImpl("763701121",BA.NumberToString(444),0);
 //BA.debugLineNum = 494;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_l_proid.getText()),(Object)(0),(Object)(0),(Object)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 495;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 496;BA.debugLine="cantidad.Text = \"\"";
_cantidad.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 497;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 498;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 499;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
 //BA.debugLineNum = 500;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*medicomed.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)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_c.GetString("CANT_CLIE")),(Object)(_c.GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_almacen),(Object)(_cl_ruta),(Object)(_c.GetString("TOTAL_CLIE_SIN"))}));
 //BA.debugLineNum = 501;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*medicomed.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)");
 //BA.debugLineNum = 502;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 }else {
 //BA.debugLineNum = 504;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 505;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 506;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 507;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
 //BA.debugLineNum = 508;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 509;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
_clie_id = _c.GetString("CUENTA");
 //BA.debugLineNum = 510;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 511;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 512;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 513;BA.debugLine="cl_ruta = c.GetString(\"CAT_CL_RUTA\")";
_cl_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 514;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 515;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 516;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 517;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 518;BA.debugLine="Log(555)";
__c.LogImpl("763701146",BA.NumberToString(555),0);
 //BA.debugLineNum = 519;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_almacen),(Object)((double)(Double.parseDouble(_cantidad.getText()))*(double)(Double.parseDouble(_l_precio.getText()))),(Object)(_l_precio.getText()),(Object)(_cantidad.getText()),(Object)(_l_desc.getText()),(Object)(_l_proid.getText()),(Object)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_cl_ruta),(Object)(_preciosin),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/ )}));
 //BA.debugLineNum = 520;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update cat";
_b4xpages._mainpage /*medicomed.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)(_cantidad.getText()),(Object)(_l_proid.getText())}));
 //BA.debugLineNum = 521;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(p";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.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)")));
 //BA.debugLineNum = 522;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 523;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
 //BA.debugLineNum = 524;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert int";
_b4xpages._mainpage /*medicomed.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)(_clie_id),(Object)(_sdate+_stime),(Object)(_usuario),(Object)(_c.GetString("CANT_CLIE")),(Object)(_c.GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_almacen),(Object)(_cl_ruta),(Object)(_c.GetString("TOTAL_CLIE_SIN"))}));
 //BA.debugLineNum = 525;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*medicomed.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)");
 //BA.debugLineNum = 526;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.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)(_almacen),(Object)(_l_proid.getText()),(Object)(_cantidad.getText())}));
 //BA.debugLineNum = 527;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 };
 //BA.debugLineNum = 529;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED"))
	return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
