package gunav2.keymon.com.mx;


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

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

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.sql.SQL _skmt = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _clie_id = "";
public String _sdate = "";
public String _stime = "";
public String _usuario = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public String _ruta = "";
public anywheresoftware.b4a.objects.ButtonWrapper _regresar = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cant = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total = null;
public anywheresoftware.b4a.objects.ButtonWrapper _borra = null;
public String _existe = "";
public String _result = "";
public String _desc = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _j3 = null;
public anywheresoftware.b4a.objects.LabelWrapper _titulo = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_desc = null;
public String _descuento = "";
public String _folio = "";
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_nota = null;
public String _tipo_venta = "";
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel3 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_futuro = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_preventa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_descacor = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_descpre = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ocul = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_desct = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(gunav2.keymon.com.mx.c_nota __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=76546048;
 //BA.debugLineNum = 76546048;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=76546049;
 //BA.debugLineNum = 76546049;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=76546050;
 //BA.debugLineNum = 76546050;BA.debugLine="End Sub";
return null;
}
public String  _gps_locationchanged(gunav2.keymon.com.mx.c_nota __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=76808192;
 //BA.debugLineNum = 76808192;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=76808195;
 //BA.debugLineNum = 76808195;BA.debugLine="End Sub";
return "";
}
public String  _activity_pause(gunav2.keymon.com.mx.c_nota __ref,boolean _userclosed) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
RDebugUtils.currentLine=76742656;
 //BA.debugLineNum = 76742656;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
RDebugUtils.currentLine=76742658;
 //BA.debugLineNum = 76742658;BA.debugLine="End Sub";
return "";
}
public String  _b_desc_click(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "b_desc_click", false))
	 {return ((String) Debug.delegate(ba, "b_desc_click", null));}
RDebugUtils.currentLine=77135872;
 //BA.debugLineNum = 77135872;BA.debugLine="Sub b_desc_Click";
RDebugUtils.currentLine=77135873;
 //BA.debugLineNum = 77135873;BA.debugLine="If DESCUENTO = \"MENOS\" Then";
if ((__ref._descuento /*String*/ ).equals("MENOS")) { 
RDebugUtils.currentLine=77135874;
 //BA.debugLineNum = 77135874;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77135875;
 //BA.debugLineNum = 77135875;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77135876;
 //BA.debugLineNum = 77135876;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77135877;
 //BA.debugLineNum = 77135877;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77135878;
 //BA.debugLineNum = 77135878;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77135879;
 //BA.debugLineNum = 77135879;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77135880;
 //BA.debugLineNum = 77135880;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77135881;
 //BA.debugLineNum = 77135881;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77135882;
 //BA.debugLineNum = 77135882;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77135883;
 //BA.debugLineNum = 77135883;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77135884;
 //BA.debugLineNum = 77135884;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77135885;
 //BA.debugLineNum = 77135885;BA.debugLine="result =  Msgbox2(\"Seguro que desa dar descuento";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desa dar descuento del 5%?"),BA.ObjectToCharSequence("Dar descuento"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77135886;
 //BA.debugLineNum = 77135886;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77135887;
 //BA.debugLineNum = 77135887;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE ped";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE pedido SET PE_COSTO_TOT = PE_COSTO_TOT * .95, PE_DESC = 5 WHERE PE_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77135888;
 //BA.debugLineNum = 77135888;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77135889;
 //BA.debugLineNum = 77135889;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77135890;
 //BA.debugLineNum = 77135890;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77135891;
 //BA.debugLineNum = 77135891;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert in";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77135892;
 //BA.debugLineNum = 77135892;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77135893;
 //BA.debugLineNum = 77135893;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else 
{RDebugUtils.currentLine=77135895;
 //BA.debugLineNum = 77135895;BA.debugLine="ELSE IF DESCUENTO = \"MAS\" Then";
if ((__ref._descuento /*String*/ ).equals("MAS")) { 
RDebugUtils.currentLine=77135896;
 //BA.debugLineNum = 77135896;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77135897;
 //BA.debugLineNum = 77135897;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77135898;
 //BA.debugLineNum = 77135898;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77135899;
 //BA.debugLineNum = 77135899;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77135900;
 //BA.debugLineNum = 77135900;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77135901;
 //BA.debugLineNum = 77135901;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77135902;
 //BA.debugLineNum = 77135902;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77135903;
 //BA.debugLineNum = 77135903;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77135904;
 //BA.debugLineNum = 77135904;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77135905;
 //BA.debugLineNum = 77135905;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77135906;
 //BA.debugLineNum = 77135906;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77135907;
 //BA.debugLineNum = 77135907;BA.debugLine="result =  Msgbox2(\"Seguro que desa CANCELAR el d";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desa CANCELAR el descuento?"),BA.ObjectToCharSequence("Cancelar descuento"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77135908;
 //BA.debugLineNum = 77135908;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77135909;
 //BA.debugLineNum = 77135909;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE ped";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE pedido SET PE_COSTO_TOT = PE_COSTO_TOT / .95, PE_DESC = 0 WHERE PE_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77135910;
 //BA.debugLineNum = 77135910;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77135911;
 //BA.debugLineNum = 77135911;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77135912;
 //BA.debugLineNum = 77135912;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77135913;
 //BA.debugLineNum = 77135913;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert in";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77135914;
 //BA.debugLineNum = 77135914;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77135915;
 //BA.debugLineNum = 77135915;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }}
;
RDebugUtils.currentLine=77135918;
 //BA.debugLineNum = 77135918;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
anywheresoftware.b4a.objects.drawable.ColorDrawable _cd = null;
int _i = 0;
String _nombre = "";
String _cantidad = "";
String _folioitem = "";
String _cedis = "";
double _precio = 0;
int _colortitulo = 0;
anywheresoftware.b4a.objects.CSBuilder _cs = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s3 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _s5 = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _future = null;
RDebugUtils.currentLine=76677120;
 //BA.debugLineNum = 76677120;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=76677123;
 //BA.debugLineNum = 76677123;BA.debugLine="b_desc.Visible = False";
__ref._b_desc /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76677125;
 //BA.debugLineNum = 76677125;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=76677126;
 //BA.debugLineNum = 76677126;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=76677127;
 //BA.debugLineNum = 76677127;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=76677130;
 //BA.debugLineNum = 76677130;BA.debugLine="p_nota.Height = Root.Height * 0.9";
__ref._p_nota /*anywheresoftware.b4a.objects.PanelWrapper*/ .setHeight((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.9));
RDebugUtils.currentLine=76677131;
 //BA.debugLineNum = 76677131;BA.debugLine="p_nota.Width = Root.Width * 0.9";
__ref._p_nota /*anywheresoftware.b4a.objects.PanelWrapper*/ .setWidth((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth()*0.9));
RDebugUtils.currentLine=76677132;
 //BA.debugLineNum = 76677132;BA.debugLine="Panel1.Visible = True";
__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=76677136;
 //BA.debugLineNum = 76677136;BA.debugLine="ListView1.Color = Colors.White";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setColor(__c.Colors.White);
RDebugUtils.currentLine=76677139;
 //BA.debugLineNum = 76677139;BA.debugLine="Dim cd As ColorDrawable";
_cd = new anywheresoftware.b4a.objects.drawable.ColorDrawable();
RDebugUtils.currentLine=76677140;
 //BA.debugLineNum = 76677140;BA.debugLine="cd.Initialize(Colors.White, 0)";
_cd.Initialize(__c.Colors.White,(int) (0));
RDebugUtils.currentLine=76677141;
 //BA.debugLineNum = 76677141;BA.debugLine="ListView1.SingleLineLayout.Background = cd";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Background = (android.graphics.drawable.Drawable)(_cd.getObject());
RDebugUtils.currentLine=76677144;
 //BA.debugLineNum = 76677144;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=76677145;
 //BA.debugLineNum = 76677145;BA.debugLine="ListView1.Height = Root.Height * 0.55";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .setHeight((int) (__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight()*0.55));
RDebugUtils.currentLine=76677146;
 //BA.debugLineNum = 76677146;BA.debugLine="ListView1.SingleLineLayout.ItemHeight = 110dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().setItemHeight(__c.DipToCurrent((int) (110)));
RDebugUtils.currentLine=76677147;
 //BA.debugLineNum = 76677147;BA.debugLine="ListView1.SingleLineLayout.Label.Left = 15dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Label.setLeft(__c.DipToCurrent((int) (15)));
RDebugUtils.currentLine=76677148;
 //BA.debugLineNum = 76677148;BA.debugLine="ListView1.SingleLineLayout.Label.Width = ListView";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getSingleLineLayout().Label.setWidth((int) (__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getWidth()-__c.DipToCurrent((int) (30))));
RDebugUtils.currentLine=76677152;
 //BA.debugLineNum = 76677152;BA.debugLine="Dim c As Cursor = B4XPages.MainPage.skmt.ExecQuer";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PE_PRONOMBRE, PE_COSTO_TOT, PE_CANT, PE_FOLIO, PE_CEDIS, IFNULL(PE_RECALCULOTOT,0) AS PE_RECALCULOTOT FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) order by PE_CEDIS desc")));
RDebugUtils.currentLine=76677154;
 //BA.debugLineNum = 76677154;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=76677155;
 //BA.debugLineNum = 76677155;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step20 = 1;
final int limit20 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit20 ;_i = _i + step20 ) {
RDebugUtils.currentLine=76677156;
 //BA.debugLineNum = 76677156;BA.debugLine="c.Position = i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=76677158;
 //BA.debugLineNum = 76677158;BA.debugLine="Dim Nombre As String = c.GetString(\"PE_PRONOMBR";
_nombre = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PRONOMBRE");
RDebugUtils.currentLine=76677159;
 //BA.debugLineNum = 76677159;BA.debugLine="Dim Cantidad As String = c.GetString(\"PE_CANT\")";
_cantidad = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT");
RDebugUtils.currentLine=76677160;
 //BA.debugLineNum = 76677160;BA.debugLine="Dim FolioItem As String = c.GetString(\"PE_FOLIO";
_folioitem = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO");
RDebugUtils.currentLine=76677161;
 //BA.debugLineNum = 76677161;BA.debugLine="Dim Cedis As String = c.GetString(\"PE_CEDIS\")";
_cedis = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CEDIS");
RDebugUtils.currentLine=76677163;
 //BA.debugLineNum = 76677163;BA.debugLine="Dim Precio As Double = IIf(c.GetDouble(\"PE_RECA";
_precio = (double)(BA.ObjectToNumber(((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetDouble("PE_RECALCULOTOT")==0) ? ((Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetDouble("PE_COSTO_TOT"))) : ((Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetDouble("PE_RECALCULOTOT"))))));
RDebugUtils.currentLine=76677166;
 //BA.debugLineNum = 76677166;BA.debugLine="If c.GetString(\"PE_FOLIO\") = \"PREVENTA_FUTURA\"";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("PREVENTA_FUTURA")) { 
RDebugUtils.currentLine=76677167;
 //BA.debugLineNum = 76677167;BA.debugLine="Dim ColorTitulo As Int = Colors.Red";
_colortitulo = __c.Colors.Red;
 }else {
RDebugUtils.currentLine=76677169;
 //BA.debugLineNum = 76677169;BA.debugLine="Dim ColorTitulo As Int = Colors.Black";
_colortitulo = __c.Colors.Black;
 };
RDebugUtils.currentLine=76677171;
 //BA.debugLineNum = 76677171;BA.debugLine="If Cedis.Contains(\"PRO\") Or Not(IsNumber(Cedis)";
if (_cedis.contains("PRO") || __c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=76677173;
 //BA.debugLineNum = 76677173;BA.debugLine="If c.GetString(\"PE_FOLIO\") = \"PREVENTA_FUTURA\"";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("PREVENTA_FUTURA")) { 
RDebugUtils.currentLine=76677175;
 //BA.debugLineNum = 76677175;BA.debugLine="ColorTitulo = Colors.RGB(166, 0, 0) ' Azul Fu";
_colortitulo = __c.Colors.RGB((int) (166),(int) (0),(int) (0));
 }else {
RDebugUtils.currentLine=76677177;
 //BA.debugLineNum = 76677177;BA.debugLine="ColorTitulo = Colors.RGB(0, 70, 180) ' Azul F";
_colortitulo = __c.Colors.RGB((int) (0),(int) (70),(int) (180));
 };
 };
RDebugUtils.currentLine=76677181;
 //BA.debugLineNum = 76677181;BA.debugLine="Dim cs As CSBuilder";
_cs = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=76677182;
 //BA.debugLineNum = 76677182;BA.debugLine="cs.Initialize";
_cs.Initialize();
RDebugUtils.currentLine=76677184;
 //BA.debugLineNum = 76677184;BA.debugLine="cs.Size(19).Typeface(Typeface.DEFAULT_BOLD).Col";
_cs.Size((int) (19)).Typeface(__c.Typeface.DEFAULT_BOLD).Color(_colortitulo).Append(BA.ObjectToCharSequence(_nombre)).Pop().Pop();
RDebugUtils.currentLine=76677185;
 //BA.debugLineNum = 76677185;BA.debugLine="cs.Append(CRLF)";
_cs.Append(BA.ObjectToCharSequence(__c.CRLF));
RDebugUtils.currentLine=76677188;
 //BA.debugLineNum = 76677188;BA.debugLine="cs.Size(15).Color(Colors.RGB(50, 50, 50)).Appen";
_cs.Size((int) (15)).Color(__c.Colors.RGB((int) (50),(int) (50),(int) (50))).Append(BA.ObjectToCharSequence(" Cant: ")).Color(__c.Colors.Black).Append(BA.ObjectToCharSequence(_cantidad)).Append(BA.ObjectToCharSequence("   "));
RDebugUtils.currentLine=76677189;
 //BA.debugLineNum = 76677189;BA.debugLine="cs.Color(Colors.RGB(50, 50, 50)).Append(\"Total:";
_cs.Color(__c.Colors.RGB((int) (50),(int) (50),(int) (50))).Append(BA.ObjectToCharSequence("Total: ")).Color(__c.Colors.RGB((int) (0),(int) (120),(int) (0))).Typeface(__c.Typeface.DEFAULT_BOLD).Append(BA.ObjectToCharSequence("$"+__c.NumberFormat2(_precio,(int) (1),(int) (2),(int) (2),__c.True))).Pop().Pop().Pop();
RDebugUtils.currentLine=76677190;
 //BA.debugLineNum = 76677190;BA.debugLine="cs.Append(CRLF)";
_cs.Append(BA.ObjectToCharSequence(__c.CRLF));
RDebugUtils.currentLine=76677193;
 //BA.debugLineNum = 76677193;BA.debugLine="cs.Size(13).Color(Colors.RGB(100, 100, 100)).Ap";
_cs.Size((int) (13)).Color(__c.Colors.RGB((int) (100),(int) (100),(int) (100))).Append(BA.ObjectToCharSequence(" Folio: "+_folioitem+" | "+_cedis)).PopAll();
RDebugUtils.currentLine=76677195;
 //BA.debugLineNum = 76677195;BA.debugLine="ListView1.AddSingleLine(cs)";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence(_cs.getObject()));
 }
};
 };
RDebugUtils.currentLine=76677198;
 //BA.debugLineNum = 76677198;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=76677200;
 //BA.debugLineNum = 76677200;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as EXISTE from pedido_cliente WHERE pc_cliente IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=76677201;
 //BA.debugLineNum = 76677201;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=76677202;
 //BA.debugLineNum = 76677202;BA.debugLine="Existe = C.GetString(\"EXISTE\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE");
RDebugUtils.currentLine=76677203;
 //BA.debugLineNum = 76677203;BA.debugLine="L_CANT.Text = 0";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(0));
RDebugUtils.currentLine=76677204;
 //BA.debugLineNum = 76677204;BA.debugLine="If Existe <> 0 Then";
if ((__ref._existe /*String*/ ).equals(BA.NumberToString(0)) == false) { 
RDebugUtils.currentLine=76677205;
 //BA.debugLineNum = 76677205;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select SUM(P";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select SUM(PE_CANT) AS PE_CANT from pedido where pe_cliente in (Select CUENTA from cuentaa) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP ) ")));
RDebugUtils.currentLine=76677206;
 //BA.debugLineNum = 76677206;BA.debugLine="C.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=76677207;
 //BA.debugLineNum = 76677207;BA.debugLine="L_CANT.Text = c.GetString(\"PE_CANT\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")));
RDebugUtils.currentLine=76677209;
 //BA.debugLineNum = 76677209;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=76677210;
 //BA.debugLineNum = 76677210;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select SUM(I";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select SUM(IFNULL(PE_DESC,0)) AS DESCUENTO FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=76677211;
 //BA.debugLineNum = 76677211;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=76677212;
 //BA.debugLineNum = 76677212;BA.debugLine="DESC = c.GetString(\"DESCUENTO\")";
__ref._desc /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("DESCUENTO");
RDebugUtils.currentLine=76677213;
 //BA.debugLineNum = 76677213;BA.debugLine="b_desc.Visible = False";
__ref._b_desc /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76677216;
 //BA.debugLineNum = 76677216;BA.debugLine="Private s3 As Cursor=B4XPages.MainPage.skmt.Exec";
_s3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s3 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select * FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) and PE_RECALCULO <> ? OR PE_RECALCULO <> ? OR PE_RECALCULO IS NOT NULL",new String[]{"","null"})));
RDebugUtils.currentLine=76677217;
 //BA.debugLineNum = 76677217;BA.debugLine="LogColor(s3.RowCount,Colors.Yellow)";
__c.LogImpl("076677217",BA.NumberToString(_s3.getRowCount()),__c.Colors.Yellow);
RDebugUtils.currentLine=76677218;
 //BA.debugLineNum = 76677218;BA.debugLine="If s3.RowCount > 0 Then";
if (_s3.getRowCount()>0) { 
RDebugUtils.currentLine=76677219;
 //BA.debugLineNum = 76677219;BA.debugLine="Private s As Cursor=B4XPages.MainPage.skmt.Exec";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select iFNULL(sum(pe_costo_tot),0) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) and (PE_RECALCULO = ? or PE_RECALCULO = ? or PE_RECALCULO IS NULL)",new String[]{"","null"})));
RDebugUtils.currentLine=76677220;
 //BA.debugLineNum = 76677220;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
RDebugUtils.currentLine=76677221;
 //BA.debugLineNum = 76677221;BA.debugLine="Private s5 As Cursor = B4XPages.MainPage.skmt.E";
_s5 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s5 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select iFNULL(sum(PE_RECALCULOTOT),0) as TOTAL_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa) and (PE_RECALCULO <> ? or PE_RECALCULO <> ? OR PE_RECALCULO IS NOT NULL)",new String[]{"","null"})));
RDebugUtils.currentLine=76677222;
 //BA.debugLineNum = 76677222;BA.debugLine="s5.Position = 0";
_s5.setPosition((int) (0));
RDebugUtils.currentLine=76677223;
 //BA.debugLineNum = 76677223;BA.debugLine="L_TOTAL.Text =NumberFormat2(s.GetString(\"TOTAL_";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2((double)(Double.parseDouble(_s.GetString("TOTAL_CLIE")))+(double)(Double.parseDouble(_s5.GetString("TOTAL_CLIE"))),(int) (0),(int) (2),(int) (2),__c.True)));
RDebugUtils.currentLine=76677224;
 //BA.debugLineNum = 76677224;BA.debugLine="s.Close";
_s.Close();
 }else 
{RDebugUtils.currentLine=76677225;
 //BA.debugLineNum = 76677225;BA.debugLine="Else If s3.RowCount = 0 Then";
if (_s3.getRowCount()==0) { 
RDebugUtils.currentLine=76677226;
 //BA.debugLineNum = 76677226;BA.debugLine="Private s As Cursor=B4XPages.MainPage.skmt.Exec";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select iFNULL(sum(pe_costo_tot),0) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=76677227;
 //BA.debugLineNum = 76677227;BA.debugLine="s.Position=0";
_s.setPosition((int) (0));
RDebugUtils.currentLine=76677228;
 //BA.debugLineNum = 76677228;BA.debugLine="L_TOTAL.Text =NumberFormat2(s.GetString(\"TOTAL_";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2((double)(Double.parseDouble(_s.GetString("TOTAL_CLIE"))),(int) (0),(int) (2),(int) (2),__c.True)));
RDebugUtils.currentLine=76677229;
 //BA.debugLineNum = 76677229;BA.debugLine="s.Close";
_s.Close();
 }}
;
RDebugUtils.currentLine=76677232;
 //BA.debugLineNum = 76677232;BA.debugLine="L_TOTAL.text = Subs.calculaTotalConPromoXRango(S";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_subs._calculatotalconpromoxrango /*String*/ (ba,_subs._traecliente /*String*/ (ba))));
 };
RDebugUtils.currentLine=76677238;
 //BA.debugLineNum = 76677238;BA.debugLine="L_TOTAL.Text = Subs.calculaTotalConPromoXRango(Su";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_subs._calculatotalconpromoxrango /*String*/ (ba,_subs._traecliente /*String*/ (ba))));
RDebugUtils.currentLine=76677240;
 //BA.debugLineNum = 76677240;BA.debugLine="Dim future As Cursor = B4XPages.MainPage.skmt.Exe";
_future = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_future = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"VENTAFUTURA"})));
RDebugUtils.currentLine=76677241;
 //BA.debugLineNum = 76677241;BA.debugLine="If future.RowCount > 0 Then";
if (_future.getRowCount()>0) { 
RDebugUtils.currentLine=76677242;
 //BA.debugLineNum = 76677242;BA.debugLine="future.Position = 0";
_future.setPosition((int) (0));
RDebugUtils.currentLine=76677243;
 //BA.debugLineNum = 76677243;BA.debugLine="If future.GetInt(\"CAT_VA_VALOR\") = 1 Then";
if (_future.GetInt("CAT_VA_VALOR")==1) { 
RDebugUtils.currentLine=76677244;
 //BA.debugLineNum = 76677244;BA.debugLine="Panel3.Visible = True";
__ref._panel3 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=76677245;
 //BA.debugLineNum = 76677245;BA.debugLine="l_ocul.Visible = False";
__ref._l_ocul /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76677246;
 //BA.debugLineNum = 76677246;BA.debugLine="l_desct.Visible = False";
__ref._l_desct /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76677247;
 //BA.debugLineNum = 76677247;BA.debugLine="l_descacor.Text = NumberFormat2( (Subs.calculaT";
__ref._l_descacor /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_subs._calculatotalconpromoxrango4 /*String*/ (ba,_subs._traecliente /*String*/ (ba))))-(double)(Double.parseDouble(_subs._calculatotalconpromoxrango1 /*String*/ (ba,_subs._traecliente /*String*/ (ba))))),(int) (0),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=76677248;
 //BA.debugLineNum = 76677248;BA.debugLine="l_descpre.Text = NumberFormat2( (Subs.calculaTo";
__ref._l_descpre /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_subs._calculatotalconpromoxrango3 /*String*/ (ba,_subs._traecliente /*String*/ (ba))))-(double)(Double.parseDouble(_subs._calculatotalconpromoxrango2 /*String*/ (ba,_subs._traecliente /*String*/ (ba))))),(int) (0),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=76677249;
 //BA.debugLineNum = 76677249;BA.debugLine="L_PREVENTA.Text = Subs.calculaTotalConPromoXRan";
__ref._l_preventa /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_subs._calculatotalconpromoxrango2 /*String*/ (ba,_subs._traecliente /*String*/ (ba))));
RDebugUtils.currentLine=76677250;
 //BA.debugLineNum = 76677250;BA.debugLine="L_FUTURO.Text = Subs.calculaTotalConPromoXRango";
__ref._l_futuro /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_subs._calculatotalconpromoxrango1 /*String*/ (ba,_subs._traecliente /*String*/ (ba))));
 }else 
{RDebugUtils.currentLine=76677251;
 //BA.debugLineNum = 76677251;BA.debugLine="Else If future.GetInt(\"CAT_VA_VALOR\") = 0 Then";
if (_future.GetInt("CAT_VA_VALOR")==0) { 
RDebugUtils.currentLine=76677252;
 //BA.debugLineNum = 76677252;BA.debugLine="Panel3.Visible = False";
__ref._panel3 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=76677253;
 //BA.debugLineNum = 76677253;BA.debugLine="l_ocul.Visible = True";
__ref._l_ocul /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=76677254;
 //BA.debugLineNum = 76677254;BA.debugLine="l_desct.Visible = True";
__ref._l_desct /*anywheresoftware.b4a.objects.LabelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=76677255;
 //BA.debugLineNum = 76677255;BA.debugLine="l_desct.Text = NumberFormat2( (Subs.calculaTota";
__ref._l_desct /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.NumberFormat2(((double)(Double.parseDouble(_subs._calculatotalconpromoxrango3 /*String*/ (ba,_subs._traecliente /*String*/ (ba))))-(double)(Double.parseDouble(_subs._calculatotalconpromoxrango2 /*String*/ (ba,_subs._traecliente /*String*/ (ba))))),(int) (0),(int) (2),(int) (2),__c.False)));
RDebugUtils.currentLine=76677256;
 //BA.debugLineNum = 76677256;BA.debugLine="L_PREVENTA.Text = Subs.calculaTotalConPromoXRan";
__ref._l_preventa /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_subs._calculatotalconpromoxrango2 /*String*/ (ba,_subs._traecliente /*String*/ (ba))));
RDebugUtils.currentLine=76677257;
 //BA.debugLineNum = 76677257;BA.debugLine="L_FUTURO.Text = Subs.calculaTotalConPromoXRango";
__ref._l_futuro /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_subs._calculatotalconpromoxrango1 /*String*/ (ba,_subs._traecliente /*String*/ (ba))));
 }}
;
 };
RDebugUtils.currentLine=76677261;
 //BA.debugLineNum = 76677261;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(gunav2.keymon.com.mx.c_nota parent,gunav2.keymon.com.mx.c_nota __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
gunav2.keymon.com.mx.c_nota __ref;
gunav2.keymon.com.mx.c_nota parent;

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

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = -1;
RDebugUtils.currentLine=76939267;
 //BA.debugLineNum = 76939267;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=76939268;
 //BA.debugLineNum = 76939268;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=76939269;
 //BA.debugLineNum = 76939269;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(gunav2.keymon.com.mx.c_nota __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=76611584;
 //BA.debugLineNum = 76611584;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=76611585;
 //BA.debugLineNum = 76611585;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=76611586;
 //BA.debugLineNum = 76611586;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=76611587;
 //BA.debugLineNum = 76611587;BA.debugLine="Root.LoadLayout(\"nota\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("nota",ba);
RDebugUtils.currentLine=76611588;
 //BA.debugLineNum = 76611588;BA.debugLine="borra.Visible = True";
__ref._borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=76611589;
 //BA.debugLineNum = 76611589;BA.debugLine="Titulo.Text = \"Pedido Actual\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido Actual"));
RDebugUtils.currentLine=76611596;
 //BA.debugLineNum = 76611596;BA.debugLine="End Sub";
return "";
}
public String  _borra_click(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "borra_click", false))
	 {return ((String) Debug.delegate(ba, "borra_click", null));}
int _i = 0;
RDebugUtils.currentLine=77004800;
 //BA.debugLineNum = 77004800;BA.debugLine="Sub borra_Click";
RDebugUtils.currentLine=77004805;
 //BA.debugLineNum = 77004805;BA.debugLine="If Not(Subs.revisaImpreso) Then";
if (__c.Not(_subs._revisaimpreso /*boolean*/ (ba))) { 
RDebugUtils.currentLine=77004807;
 //BA.debugLineNum = 77004807;BA.debugLine="result =  Msgbox2(\"Seguro que desa borrar el pe";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desa borrar el pedido?"),BA.ObjectToCharSequence("Cancelar pedido"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77004808;
 //BA.debugLineNum = 77004808;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77004809;
 //BA.debugLineNum = 77004809;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE_";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> 'DUR'")));
RDebugUtils.currentLine=77004810;
 //BA.debugLineNum = 77004810;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77004811;
 //BA.debugLineNum = 77004811;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step6 = 1;
final int limit6 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit6 ;_i = _i + step6 ) {
RDebugUtils.currentLine=77004812;
 //BA.debugLineNum = 77004812;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=77004813;
 //BA.debugLineNum = 77004813;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"updat";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?"),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID"))}));
RDebugUtils.currentLine=77004814;
 //BA.debugLineNum = 77004814;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
 }
};
 };
RDebugUtils.currentLine=77004817;
 //BA.debugLineNum = 77004817;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fr";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=77004818;
 //BA.debugLineNum = 77004818;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fr";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=77004819;
 //BA.debugLineNum = 77004819;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE km";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77004820;
 //BA.debugLineNum = 77004820;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77004826;
 //BA.debugLineNum = 77004826;BA.debugLine="Log(\"Aqui\")";
__c.LogImpl("077004826","Aqui",0);
RDebugUtils.currentLine=77004827;
 //BA.debugLineNum = 77004827;BA.debugLine="Log(Subs.traeAlmacen)";
__c.LogImpl("077004827",_subs._traealmacen /*String*/ (ba),0);
RDebugUtils.currentLine=77004828;
 //BA.debugLineNum = 77004828;BA.debugLine="If Subs.traeAlmacen = 94 Then";
if ((_subs._traealmacen /*String*/ (ba)).equals(BA.NumberToString(94))) { 
RDebugUtils.currentLine=77004829;
 //BA.debugLineNum = 77004829;BA.debugLine="Log(\"Aqui\")";
__c.LogImpl("077004829","Aqui",0);
RDebugUtils.currentLine=77004831;
 //BA.debugLineNum = 77004831;BA.debugLine="result =  Msgbox2(\"Seguro que desa borrar el p";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desa borrar el pedido?"),BA.ObjectToCharSequence("Cancelar pedido"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77004832;
 //BA.debugLineNum = 77004832;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77004833;
 //BA.debugLineNum = 77004833;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> 'DUR'")));
RDebugUtils.currentLine=77004834;
 //BA.debugLineNum = 77004834;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77004835;
 //BA.debugLineNum = 77004835;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step26 = 1;
final int limit26 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit26 ;_i = _i + step26 ) {
RDebugUtils.currentLine=77004836;
 //BA.debugLineNum = 77004836;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=77004837;
 //BA.debugLineNum = 77004837;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"upda";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?"),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID"))}));
RDebugUtils.currentLine=77004838;
 //BA.debugLineNum = 77004838;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSER";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
 }
};
 };
RDebugUtils.currentLine=77004841;
 //BA.debugLineNum = 77004841;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete f";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=77004842;
 //BA.debugLineNum = 77004842;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete f";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=77004843;
 //BA.debugLineNum = 77004843;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE k";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77004844;
 //BA.debugLineNum = 77004844;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info3 se";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info3 set CONFIRMADO = 0  WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77004845;
 //BA.debugLineNum = 77004845;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update CODIGOS_CRED";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update CODIGOS_CREDITO set BANDERA = 0  WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77004846;
 //BA.debugLineNum = 77004846;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77004852;
 //BA.debugLineNum = 77004852;BA.debugLine="Log(\"aqui\")";
__c.LogImpl("077004852","aqui",0);
RDebugUtils.currentLine=77004853;
 //BA.debugLineNum = 77004853;BA.debugLine="ToastMessageShow(\"La venta ya esta impresa, no";
__c.ToastMessageShow(BA.ObjectToCharSequence("La venta ya esta impresa, no se puede modificar!!"),__c.True);
RDebugUtils.currentLine=77004854;
 //BA.debugLineNum = 77004854;BA.debugLine="B4XPages.MainPage.cliente.p_transparenteTicketI";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ ._p_transparenteticketimpreso /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=77004855;
 //BA.debugLineNum = 77004855;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
 };
 };
RDebugUtils.currentLine=77004900;
 //BA.debugLineNum = 77004900;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
RDebugUtils.currentLine=76480512;
 //BA.debugLineNum = 76480512;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=76480513;
 //BA.debugLineNum = 76480513;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=76480514;
 //BA.debugLineNum = 76480514;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=76480516;
 //BA.debugLineNum = 76480516;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=76480517;
 //BA.debugLineNum = 76480517;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=76480518;
 //BA.debugLineNum = 76480518;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=76480519;
 //BA.debugLineNum = 76480519;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=76480520;
 //BA.debugLineNum = 76480520;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=76480522;
 //BA.debugLineNum = 76480522;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=76480523;
 //BA.debugLineNum = 76480523;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=76480524;
 //BA.debugLineNum = 76480524;BA.debugLine="Dim Regresar As Button";
_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=76480526;
 //BA.debugLineNum = 76480526;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=76480527;
 //BA.debugLineNum = 76480527;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480528;
 //BA.debugLineNum = 76480528;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480529;
 //BA.debugLineNum = 76480529;BA.debugLine="Dim borra As Button";
_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=76480530;
 //BA.debugLineNum = 76480530;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=76480531;
 //BA.debugLineNum = 76480531;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=76480533;
 //BA.debugLineNum = 76480533;BA.debugLine="Dim DESC As String";
_desc = "";
RDebugUtils.currentLine=76480534;
 //BA.debugLineNum = 76480534;BA.debugLine="Dim c2, j3 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_j3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=76480535;
 //BA.debugLineNum = 76480535;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480536;
 //BA.debugLineNum = 76480536;BA.debugLine="Private b_desc As Button";
_b_desc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=76480537;
 //BA.debugLineNum = 76480537;BA.debugLine="Dim DESCUENTO As String";
_descuento = "";
RDebugUtils.currentLine=76480538;
 //BA.debugLineNum = 76480538;BA.debugLine="Dim folio As String";
_folio = "";
RDebugUtils.currentLine=76480539;
 //BA.debugLineNum = 76480539;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=76480540;
 //BA.debugLineNum = 76480540;BA.debugLine="Private almacen As String";
_almacen = "";
RDebugUtils.currentLine=76480541;
 //BA.debugLineNum = 76480541;BA.debugLine="Private p_nota As Panel";
_p_nota = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=76480542;
 //BA.debugLineNum = 76480542;BA.debugLine="Dim tipo_venta As String = Subs.traeTipoVentaDeBD";
_tipo_venta = _subs._traetipoventadebd /*String*/ (ba);
RDebugUtils.currentLine=76480543;
 //BA.debugLineNum = 76480543;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=76480544;
 //BA.debugLineNum = 76480544;BA.debugLine="Private Panel3 As Panel";
_panel3 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=76480545;
 //BA.debugLineNum = 76480545;BA.debugLine="Private L_FUTURO As Label";
_l_futuro = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480546;
 //BA.debugLineNum = 76480546;BA.debugLine="Private L_PREVENTA As Label";
_l_preventa = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480547;
 //BA.debugLineNum = 76480547;BA.debugLine="Private l_descacor As Label";
_l_descacor = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480548;
 //BA.debugLineNum = 76480548;BA.debugLine="Private l_descpre As Label";
_l_descpre = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480549;
 //BA.debugLineNum = 76480549;BA.debugLine="Private l_ocul As Label";
_l_ocul = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480550;
 //BA.debugLineNum = 76480550;BA.debugLine="Private l_desct As Label";
_l_desct = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=76480551;
 //BA.debugLineNum = 76480551;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(gunav2.keymon.com.mx.c_nota __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
String[] _x = null;
String _nom = "";
int _i = 0;
String _palabrafinal = "";
String _cedis = "";
String _foliu = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _cx = null;
int _j = 0;
RDebugUtils.currentLine=77070336;
 //BA.debugLineNum = 77070336;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=77070337;
 //BA.debugLineNum = 77070337;BA.debugLine="Log(Subs.traeTablaProds(tipo_venta))";
__c.LogImpl("077070337",_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ ),0);
RDebugUtils.currentLine=77070338;
 //BA.debugLineNum = 77070338;BA.debugLine="Log(Value)";
__c.LogImpl("077070338",BA.ObjectToString(_value),0);
RDebugUtils.currentLine=77070339;
 //BA.debugLineNum = 77070339;BA.debugLine="Private X() As String = Regex.Split(\" \", Value)";
_x = __c.Regex.Split(" ",BA.ObjectToString(_value));
RDebugUtils.currentLine=77070340;
 //BA.debugLineNum = 77070340;BA.debugLine="Private nom As String = \"\"";
_nom = "";
RDebugUtils.currentLine=77070342;
 //BA.debugLineNum = 77070342;BA.debugLine="For i = 0 To X.Length - 1";
{
final int step5 = 1;
final int limit5 = (int) (_x.length-1);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
RDebugUtils.currentLine=77070343;
 //BA.debugLineNum = 77070343;BA.debugLine="If Not(X(i).Contains(CRLF)) Then";
if (__c.Not(_x[_i].contains(__c.CRLF))) { 
RDebugUtils.currentLine=77070345;
 //BA.debugLineNum = 77070345;BA.debugLine="nom = nom & \" \" & X(i)";
_nom = _nom+" "+_x[_i];
 }else {
RDebugUtils.currentLine=77070349;
 //BA.debugLineNum = 77070349;BA.debugLine="Dim palabraFinal As String = X(i).Replace(CRLF,";
_palabrafinal = _x[_i].replace(__c.CRLF,"");
RDebugUtils.currentLine=77070352;
 //BA.debugLineNum = 77070352;BA.debugLine="nom = nom & \" \" & palabraFinal";
_nom = _nom+" "+_palabrafinal;
RDebugUtils.currentLine=77070354;
 //BA.debugLineNum = 77070354;BA.debugLine="Exit";
if (true) break;
 };
 }
};
RDebugUtils.currentLine=77070357;
 //BA.debugLineNum = 77070357;BA.debugLine="nom = nom.Trim";
_nom = _nom.trim();
RDebugUtils.currentLine=77070358;
 //BA.debugLineNum = 77070358;BA.debugLine="Private cedis As String = X(X.Length-1)";
_cedis = _x[(int) (_x.length-1)];
RDebugUtils.currentLine=77070359;
 //BA.debugLineNum = 77070359;BA.debugLine="Private foliu As String = X(X.Length-3)";
_foliu = _x[(int) (_x.length-3)];
RDebugUtils.currentLine=77070360;
 //BA.debugLineNum = 77070360;BA.debugLine="Log(nom)";
__c.LogImpl("077070360",_nom,0);
RDebugUtils.currentLine=77070361;
 //BA.debugLineNum = 77070361;BA.debugLine="Log(cedis)";
__c.LogImpl("077070361",_cedis,0);
RDebugUtils.currentLine=77070362;
 //BA.debugLineNum = 77070362;BA.debugLine="Log(foliu)";
__c.LogImpl("077070362",_foliu,0);
RDebugUtils.currentLine=77070363;
 //BA.debugLineNum = 77070363;BA.debugLine="Dim cx As Cursor = B4XPages.MainPage.skmt.ExecQue";
_cx = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cx = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE, PE_CEDIS/1 AS is_numeric FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and is_numeric > 0 and pe_cliente in (Select CUENTA from cuentaa) and PE_RECALCULO > 0"))));
RDebugUtils.currentLine=77070364;
 //BA.debugLineNum = 77070364;BA.debugLine="Log(\"Recalculados: \" & cx.RowCount)";
__c.LogImpl("077070364","Recalculados: "+BA.NumberToString(_cx.getRowCount()),0);
RDebugUtils.currentLine=77070365;
 //BA.debugLineNum = 77070365;BA.debugLine="If cx.RowCount > 0 Then ' Si hay recalculo (produ";
if (_cx.getRowCount()>0) { 
RDebugUtils.currentLine=77070366;
 //BA.debugLineNum = 77070366;BA.debugLine="result =  Msgbox2(\"Si se borra este producto, se";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Si se borra este producto, se va a borrar el pedido COMPLETO, ¿desea continuar?"),BA.ObjectToCharSequence("Borrar pedido completo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070367;
 //BA.debugLineNum = 77070367;BA.debugLine="If result = DialogResponse.NEGATIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.NEGATIVE))) { 
RDebugUtils.currentLine=77070368;
 //BA.debugLineNum = 77070368;BA.debugLine="Return";
if (true) return "";
 }else {
RDebugUtils.currentLine=77070370;
 //BA.debugLineNum = 77070370;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido w";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=77070371;
 //BA.debugLineNum = 77070371;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from pedido_c";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=77070372;
 //BA.debugLineNum = 77070372;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
RDebugUtils.currentLine=77070373;
 //BA.debugLineNum = 77070373;BA.debugLine="Return";
if (true) return "";
 };
 };
RDebugUtils.currentLine=77070376;
 //BA.debugLineNum = 77070376;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT HABI";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT HABILITADA FROM IMPRESORA")));
RDebugUtils.currentLine=77070377;
 //BA.debugLineNum = 77070377;BA.debugLine="If c.RowCount >  0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070378;
 //BA.debugLineNum = 77070378;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070379;
 //BA.debugLineNum = 77070379;BA.debugLine="If c.GetString(\"HABILITADA\") = 1 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HABILITADA")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=77070380;
 //BA.debugLineNum = 77070380;BA.debugLine="If Not(Subs.revisaImpreso) Then";
if (__c.Not(_subs._revisaimpreso /*boolean*/ (ba))) { 
RDebugUtils.currentLine=77070381;
 //BA.debugLineNum = 77070381;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar est";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070382;
 //BA.debugLineNum = 77070382;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77070383;
 //BA.debugLineNum = 77070383;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select P";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' and pe_cliente in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=77070384;
 //BA.debugLineNum = 77070384;BA.debugLine="Log($\"select PE_PROID,PE_CANT, PE_FOLIO, PE_C";
__c.LogImpl("077070384",("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' and pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=77070385;
 //BA.debugLineNum = 77070385;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("077070385",BA.NumberToString(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070386;
 //BA.debugLineNum = 77070386;BA.debugLine="Log(\"AQUI ESTOY\")";
__c.LogImpl("077070386","AQUI ESTOY",0);
RDebugUtils.currentLine=77070387;
 //BA.debugLineNum = 77070387;BA.debugLine="Log(cedis)";
__c.LogImpl("077070387",_cedis,0);
RDebugUtils.currentLine=77070388;
 //BA.debugLineNum = 77070388;BA.debugLine="Log(foliu)";
__c.LogImpl("077070388",_foliu,0);
RDebugUtils.currentLine=77070389;
 //BA.debugLineNum = 77070389;BA.debugLine="Log(nom)";
__c.LogImpl("077070389",_nom,0);
RDebugUtils.currentLine=77070391;
 //BA.debugLineNum = 77070391;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070394;
 //BA.debugLineNum = 77070394;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
RDebugUtils.currentLine=77070401;
 //BA.debugLineNum = 77070401;BA.debugLine="If Not(IsNumber(cedis)) Then";
if (__c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=77070402;
 //BA.debugLineNum = 77070402;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SELE";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_CEDIS = ?)",new String[]{_cedis})));
RDebugUtils.currentLine=77070403;
 //BA.debugLineNum = 77070403;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("077070403",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070404;
 //BA.debugLineNum = 77070404;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070405;
 //BA.debugLineNum = 77070405;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("077070405","Soy promo",0);
RDebugUtils.currentLine=77070406;
 //BA.debugLineNum = 77070406;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step54 = 1;
final int limit54 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit54 ;_j = _j + step54 ) {
RDebugUtils.currentLine=77070407;
 //BA.debugLineNum = 77070407;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("077070407","aqui tronare?",0);
RDebugUtils.currentLine=77070408;
 //BA.debugLineNum = 77070408;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=77070410;
 //BA.debugLineNum = 77070410;BA.debugLine="Log(nom)";
__c.LogImpl("077070410",_nom,0);
RDebugUtils.currentLine=77070411;
 //BA.debugLineNum = 77070411;BA.debugLine="If cedis <> \"DUR\" Then";
if ((_cedis).equals("DUR") == false) { 
RDebugUtils.currentLine=77070413;
 //BA.debugLineNum = 77070413;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"upd";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070414;
 //BA.debugLineNum = 77070414;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"del";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070415;
 //BA.debugLineNum = 77070415;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"del";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 }else {
RDebugUtils.currentLine=77070417;
 //BA.debugLineNum = 77070417;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"del";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 };
 }
};
 };
RDebugUtils.currentLine=77070421;
 //BA.debugLineNum = 77070421;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=77070423;
 //BA.debugLineNum = 77070423;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070424;
 //BA.debugLineNum = 77070424;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nom),(Object)(_cedis),(Object)(_foliu)}));
 };
RDebugUtils.currentLine=77070426;
 //BA.debugLineNum = 77070426;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77070428;
 //BA.debugLineNum = 77070428;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77070429;
 //BA.debugLineNum = 77070429;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77070430;
 //BA.debugLineNum = 77070430;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77070431;
 //BA.debugLineNum = 77070431;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77070432;
 //BA.debugLineNum = 77070432;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070433;
 //BA.debugLineNum = 77070433;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77070434;
 //BA.debugLineNum = 77070434;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select US";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77070435;
 //BA.debugLineNum = 77070435;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070436;
 //BA.debugLineNum = 77070436;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77070437;
 //BA.debugLineNum = 77070437;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select su";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77070438;
 //BA.debugLineNum = 77070438;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070439;
 //BA.debugLineNum = 77070439;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=77070440;
 //BA.debugLineNum = 77070440;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070441;
 //BA.debugLineNum = 77070441;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77070442;
 //BA.debugLineNum = 77070442;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=77070444;
 //BA.debugLineNum = 77070444;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070445;
 //BA.debugLineNum = 77070445;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=77070447;
 //BA.debugLineNum = 77070447;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77070451;
 //BA.debugLineNum = 77070451;BA.debugLine="If Subs.traeAlmacen = 94 Then";
if ((_subs._traealmacen /*String*/ (ba)).equals(BA.NumberToString(94))) { 
RDebugUtils.currentLine=77070452;
 //BA.debugLineNum = 77070452;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar es";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070453;
 //BA.debugLineNum = 77070453;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77070454;
 //BA.debugLineNum = 77070454;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' and pe_cliente in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=77070455;
 //BA.debugLineNum = 77070455;BA.debugLine="Log($\"select PE_PROID,PE_CANT, PE_FOLIO, PE_";
__c.LogImpl("077070455",("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' and pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=77070456;
 //BA.debugLineNum = 77070456;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("077070456",BA.NumberToString(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070457;
 //BA.debugLineNum = 77070457;BA.debugLine="Log(\"AQUI ESTOY\")";
__c.LogImpl("077070457","AQUI ESTOY",0);
RDebugUtils.currentLine=77070458;
 //BA.debugLineNum = 77070458;BA.debugLine="Log(cedis)";
__c.LogImpl("077070458",_cedis,0);
RDebugUtils.currentLine=77070459;
 //BA.debugLineNum = 77070459;BA.debugLine="Log(foliu)";
__c.LogImpl("077070459",_foliu,0);
RDebugUtils.currentLine=77070460;
 //BA.debugLineNum = 77070460;BA.debugLine="Log(nom)";
__c.LogImpl("077070460",_nom,0);
RDebugUtils.currentLine=77070462;
 //BA.debugLineNum = 77070462;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070465;
 //BA.debugLineNum = 77070465;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
RDebugUtils.currentLine=77070472;
 //BA.debugLineNum = 77070472;BA.debugLine="If Not(IsNumber(cedis)) Then";
if (__c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=77070473;
 //BA.debugLineNum = 77070473;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SEL";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_CEDIS = ?)",new String[]{_cedis})));
RDebugUtils.currentLine=77070474;
 //BA.debugLineNum = 77070474;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("077070474",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070475;
 //BA.debugLineNum = 77070475;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070476;
 //BA.debugLineNum = 77070476;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("077070476","Soy promo",0);
RDebugUtils.currentLine=77070477;
 //BA.debugLineNum = 77070477;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step112 = 1;
final int limit112 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit112 ;_j = _j + step112 ) {
RDebugUtils.currentLine=77070478;
 //BA.debugLineNum = 77070478;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("077070478","aqui tronare?",0);
RDebugUtils.currentLine=77070479;
 //BA.debugLineNum = 77070479;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=77070481;
 //BA.debugLineNum = 77070481;BA.debugLine="Log(nom)";
__c.LogImpl("077070481",_nom,0);
RDebugUtils.currentLine=77070482;
 //BA.debugLineNum = 77070482;BA.debugLine="If cedis <> \"DUR\" Then";
if ((_cedis).equals("DUR") == false) { 
RDebugUtils.currentLine=77070484;
 //BA.debugLineNum = 77070484;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"up";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070485;
 //BA.debugLineNum = 77070485;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"de";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070486;
 //BA.debugLineNum = 77070486;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"de";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 }else {
RDebugUtils.currentLine=77070488;
 //BA.debugLineNum = 77070488;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"de";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 };
 }
};
 };
RDebugUtils.currentLine=77070492;
 //BA.debugLineNum = 77070492;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=77070494;
 //BA.debugLineNum = 77070494;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"updat";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070495;
 //BA.debugLineNum = 77070495;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delet";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nom),(Object)(_cedis),(Object)(_foliu)}));
 };
RDebugUtils.currentLine=77070497;
 //BA.debugLineNum = 77070497;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77070499;
 //BA.debugLineNum = 77070499;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77070500;
 //BA.debugLineNum = 77070500;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77070501;
 //BA.debugLineNum = 77070501;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77070502;
 //BA.debugLineNum = 77070502;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select C";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77070503;
 //BA.debugLineNum = 77070503;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070504;
 //BA.debugLineNum = 77070504;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77070505;
 //BA.debugLineNum = 77070505;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select U";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77070506;
 //BA.debugLineNum = 77070506;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070507;
 //BA.debugLineNum = 77070507;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77070508;
 //BA.debugLineNum = 77070508;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select s";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77070509;
 //BA.debugLineNum = 77070509;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070510;
 //BA.debugLineNum = 77070510;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=77070511;
 //BA.debugLineNum = 77070511;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070512;
 //BA.debugLineNum = 77070512;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"inser";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77070513;
 //BA.debugLineNum = 77070513;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=77070515;
 //BA.debugLineNum = 77070515;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070516;
 //BA.debugLineNum = 77070516;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=77070518;
 //BA.debugLineNum = 77070518;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info3";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info3 set CONFIRMADO = 0  WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77070519;
 //BA.debugLineNum = 77070519;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update CODIGOS_CR";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update CODIGOS_CREDITO set BANDERA = 0  WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77070520;
 //BA.debugLineNum = 77070520;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77070523;
 //BA.debugLineNum = 77070523;BA.debugLine="Log(\"aqui\")";
__c.LogImpl("077070523","aqui",0);
RDebugUtils.currentLine=77070524;
 //BA.debugLineNum = 77070524;BA.debugLine="B4XPages.MainPage.cliente.p_transparenteTicke";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ ._p_transparenteticketimpreso /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=77070525;
 //BA.debugLineNum = 77070525;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=77070526;
 //BA.debugLineNum = 77070526;BA.debugLine="ToastMessageShow(\"La venta ya esta impresa, n";
__c.ToastMessageShow(BA.ObjectToCharSequence("La venta ya esta impresa, no se puede modificar!!"),__c.True);
 };
 };
 }else 
{RDebugUtils.currentLine=77070529;
 //BA.debugLineNum = 77070529;BA.debugLine="Else If c.GetString(\"HABILITADA\") = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HABILITADA")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=77070530;
 //BA.debugLineNum = 77070530;BA.debugLine="If Not(Subs.revisaImpreso) Then";
if (__c.Not(_subs._revisaimpreso /*boolean*/ (ba))) { 
RDebugUtils.currentLine=77070531;
 //BA.debugLineNum = 77070531;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar est";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070532;
 //BA.debugLineNum = 77070532;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77070533;
 //BA.debugLineNum = 77070533;BA.debugLine="Private X() As String = Regex.Split(\" \", Valu";
_x = __c.Regex.Split(" ",BA.ObjectToString(_value));
RDebugUtils.currentLine=77070534;
 //BA.debugLineNum = 77070534;BA.debugLine="Log(X)";
__c.LogImpl("077070534",BA.ObjectToString(_x),0);
RDebugUtils.currentLine=77070535;
 //BA.debugLineNum = 77070535;BA.debugLine="Log(X.Length)";
__c.LogImpl("077070535",BA.NumberToString(_x.length),0);
RDebugUtils.currentLine=77070536;
 //BA.debugLineNum = 77070536;BA.debugLine="Private nom As String = \"\"";
_nom = "";
RDebugUtils.currentLine=77070537;
 //BA.debugLineNum = 77070537;BA.debugLine="For i = 0 To X.Length -1";
{
final int step169 = 1;
final int limit169 = (int) (_x.length-1);
_i = (int) (0) ;
for (;_i <= limit169 ;_i = _i + step169 ) {
RDebugUtils.currentLine=77070539;
 //BA.debugLineNum = 77070539;BA.debugLine="If X(i).Contains(CRLF) Then";
if (_x[_i].contains(__c.CRLF)) { 
 };
RDebugUtils.currentLine=77070542;
 //BA.debugLineNum = 77070542;BA.debugLine="If Not(X(i).Contains(CRLF)) Then";
if (__c.Not(_x[_i].contains(__c.CRLF))) { 
RDebugUtils.currentLine=77070543;
 //BA.debugLineNum = 77070543;BA.debugLine="nom = nom & \" \" & X(i)";
_nom = _nom+" "+_x[_i];
 }else {
RDebugUtils.currentLine=77070545;
 //BA.debugLineNum = 77070545;BA.debugLine="Exit";
if (true) break;
 };
 }
};
RDebugUtils.currentLine=77070550;
 //BA.debugLineNum = 77070550;BA.debugLine="nom = nom.Trim";
_nom = _nom.trim();
RDebugUtils.currentLine=77070551;
 //BA.debugLineNum = 77070551;BA.debugLine="If X(X.Length-1) <> \".01\" Then";
if ((_x[(int) (_x.length-1)]).equals(".01") == false) { 
RDebugUtils.currentLine=77070552;
 //BA.debugLineNum = 77070552;BA.debugLine="Private cedis As String = X(X.Length-1)";
_cedis = _x[(int) (_x.length-1)];
 }else {
RDebugUtils.currentLine=77070554;
 //BA.debugLineNum = 77070554;BA.debugLine="Private cedis As String = (X(X.Length-2) &\"";
_cedis = (_x[(int) (_x.length-2)]+" "+_x[(int) (_x.length-1)]);
 };
RDebugUtils.currentLine=77070556;
 //BA.debugLineNum = 77070556;BA.debugLine="Log(nom)";
__c.LogImpl("077070556",_nom,0);
RDebugUtils.currentLine=77070557;
 //BA.debugLineNum = 77070557;BA.debugLine="Log(cedis)";
__c.LogImpl("077070557",_cedis,0);
RDebugUtils.currentLine=77070558;
 //BA.debugLineNum = 77070558;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select P";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=77070559;
 //BA.debugLineNum = 77070559;BA.debugLine="Log($\"select PE_PROID,PE_CANT, PE_FOLIO, PE_C";
__c.LogImpl("077070559",("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=77070560;
 //BA.debugLineNum = 77070560;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("077070560",BA.NumberToString(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070561;
 //BA.debugLineNum = 77070561;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070571;
 //BA.debugLineNum = 77070571;BA.debugLine="If Not(IsNumber(cedis)) Then";
if (__c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=77070572;
 //BA.debugLineNum = 77070572;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SELE";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_CEDIS = ?)",new String[]{_cedis})));
RDebugUtils.currentLine=77070573;
 //BA.debugLineNum = 77070573;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("077070573",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070574;
 //BA.debugLineNum = 77070574;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070575;
 //BA.debugLineNum = 77070575;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("077070575","Soy promo",0);
RDebugUtils.currentLine=77070576;
 //BA.debugLineNum = 77070576;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step195 = 1;
final int limit195 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit195 ;_j = _j + step195 ) {
RDebugUtils.currentLine=77070577;
 //BA.debugLineNum = 77070577;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("077070577","aqui tronare?",0);
RDebugUtils.currentLine=77070578;
 //BA.debugLineNum = 77070578;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=77070580;
 //BA.debugLineNum = 77070580;BA.debugLine="If cedis <> \"DUR\" Then";
if ((_cedis).equals("DUR") == false) { 
RDebugUtils.currentLine=77070581;
 //BA.debugLineNum = 77070581;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"upd";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070582;
 //BA.debugLineNum = 77070582;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"del";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070583;
 //BA.debugLineNum = 77070583;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"del";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 }else {
RDebugUtils.currentLine=77070585;
 //BA.debugLineNum = 77070585;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"del";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 };
 }
};
 };
RDebugUtils.currentLine=77070589;
 //BA.debugLineNum = 77070589;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=77070591;
 //BA.debugLineNum = 77070591;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070592;
 //BA.debugLineNum = 77070592;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nom),(Object)(_cedis),(Object)(_foliu)}));
 };
RDebugUtils.currentLine=77070594;
 //BA.debugLineNum = 77070594;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77070596;
 //BA.debugLineNum = 77070596;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77070597;
 //BA.debugLineNum = 77070597;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77070598;
 //BA.debugLineNum = 77070598;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77070599;
 //BA.debugLineNum = 77070599;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77070600;
 //BA.debugLineNum = 77070600;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070601;
 //BA.debugLineNum = 77070601;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77070602;
 //BA.debugLineNum = 77070602;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select US";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77070603;
 //BA.debugLineNum = 77070603;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070604;
 //BA.debugLineNum = 77070604;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77070605;
 //BA.debugLineNum = 77070605;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select su";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77070606;
 //BA.debugLineNum = 77070606;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070607;
 //BA.debugLineNum = 77070607;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=77070608;
 //BA.debugLineNum = 77070608;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070609;
 //BA.debugLineNum = 77070609;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77070610;
 //BA.debugLineNum = 77070610;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=77070612;
 //BA.debugLineNum = 77070612;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070613;
 //BA.debugLineNum = 77070613;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=77070615;
 //BA.debugLineNum = 77070615;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77070618;
 //BA.debugLineNum = 77070618;BA.debugLine="If Subs.traeAlmacen = 94 Then";
if ((_subs._traealmacen /*String*/ (ba)).equals(BA.NumberToString(94))) { 
RDebugUtils.currentLine=77070619;
 //BA.debugLineNum = 77070619;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar es";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070620;
 //BA.debugLineNum = 77070620;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77070621;
 //BA.debugLineNum = 77070621;BA.debugLine="Private X() As String = Regex.Split(\" \", Val";
_x = __c.Regex.Split(" ",BA.ObjectToString(_value));
RDebugUtils.currentLine=77070622;
 //BA.debugLineNum = 77070622;BA.debugLine="Log(X)";
__c.LogImpl("077070622",BA.ObjectToString(_x),0);
RDebugUtils.currentLine=77070623;
 //BA.debugLineNum = 77070623;BA.debugLine="Log(X.Length)";
__c.LogImpl("077070623",BA.NumberToString(_x.length),0);
RDebugUtils.currentLine=77070624;
 //BA.debugLineNum = 77070624;BA.debugLine="Private nom As String = \"\"";
_nom = "";
RDebugUtils.currentLine=77070625;
 //BA.debugLineNum = 77070625;BA.debugLine="For i = 0 To X.Length -1";
{
final int step242 = 1;
final int limit242 = (int) (_x.length-1);
_i = (int) (0) ;
for (;_i <= limit242 ;_i = _i + step242 ) {
RDebugUtils.currentLine=77070627;
 //BA.debugLineNum = 77070627;BA.debugLine="If X(i).Contains(CRLF) Then";
if (_x[_i].contains(__c.CRLF)) { 
 };
RDebugUtils.currentLine=77070630;
 //BA.debugLineNum = 77070630;BA.debugLine="If Not(X(i).Contains(CRLF)) Then";
if (__c.Not(_x[_i].contains(__c.CRLF))) { 
RDebugUtils.currentLine=77070631;
 //BA.debugLineNum = 77070631;BA.debugLine="nom = nom & \" \" & X(i)";
_nom = _nom+" "+_x[_i];
 }else {
RDebugUtils.currentLine=77070633;
 //BA.debugLineNum = 77070633;BA.debugLine="Exit";
if (true) break;
 };
 }
};
RDebugUtils.currentLine=77070638;
 //BA.debugLineNum = 77070638;BA.debugLine="nom = nom.Trim";
_nom = _nom.trim();
RDebugUtils.currentLine=77070639;
 //BA.debugLineNum = 77070639;BA.debugLine="If X(X.Length-1) <> \".01\" Then";
if ((_x[(int) (_x.length-1)]).equals(".01") == false) { 
RDebugUtils.currentLine=77070640;
 //BA.debugLineNum = 77070640;BA.debugLine="Private cedis As String = X(X.Length-1)";
_cedis = _x[(int) (_x.length-1)];
 }else {
RDebugUtils.currentLine=77070642;
 //BA.debugLineNum = 77070642;BA.debugLine="Private cedis As String = (X(X.Length-2) &\"";
_cedis = (_x[(int) (_x.length-2)]+" "+_x[(int) (_x.length-1)]);
 };
RDebugUtils.currentLine=77070644;
 //BA.debugLineNum = 77070644;BA.debugLine="Log(nom)";
__c.LogImpl("077070644",_nom,0);
RDebugUtils.currentLine=77070645;
 //BA.debugLineNum = 77070645;BA.debugLine="Log(cedis)";
__c.LogImpl("077070645",_cedis,0);
RDebugUtils.currentLine=77070646;
 //BA.debugLineNum = 77070646;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=77070647;
 //BA.debugLineNum = 77070647;BA.debugLine="Log($\"select PE_PROID,PE_CANT, PE_FOLIO, PE_";
__c.LogImpl("077070647",("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=77070648;
 //BA.debugLineNum = 77070648;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("077070648",BA.NumberToString(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070649;
 //BA.debugLineNum = 77070649;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070659;
 //BA.debugLineNum = 77070659;BA.debugLine="If Not(IsNumber(cedis)) Then";
if (__c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=77070660;
 //BA.debugLineNum = 77070660;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SEL";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_CEDIS = ?)",new String[]{_cedis})));
RDebugUtils.currentLine=77070661;
 //BA.debugLineNum = 77070661;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("077070661",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070662;
 //BA.debugLineNum = 77070662;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070663;
 //BA.debugLineNum = 77070663;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("077070663","Soy promo",0);
RDebugUtils.currentLine=77070664;
 //BA.debugLineNum = 77070664;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step268 = 1;
final int limit268 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit268 ;_j = _j + step268 ) {
RDebugUtils.currentLine=77070665;
 //BA.debugLineNum = 77070665;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("077070665","aqui tronare?",0);
RDebugUtils.currentLine=77070666;
 //BA.debugLineNum = 77070666;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=77070668;
 //BA.debugLineNum = 77070668;BA.debugLine="If cedis <> \"DUR\" Then";
if ((_cedis).equals("DUR") == false) { 
RDebugUtils.currentLine=77070669;
 //BA.debugLineNum = 77070669;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"up";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070670;
 //BA.debugLineNum = 77070670;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"de";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070671;
 //BA.debugLineNum = 77070671;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"de";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 }else {
RDebugUtils.currentLine=77070673;
 //BA.debugLineNum = 77070673;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"de";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_cedis= ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cedis),(Object)(_foliu)}));
 };
 }
};
 };
RDebugUtils.currentLine=77070677;
 //BA.debugLineNum = 77070677;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=77070679;
 //BA.debugLineNum = 77070679;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"updat";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070680;
 //BA.debugLineNum = 77070680;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delet";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nom),(Object)(_cedis),(Object)(_foliu)}));
 };
RDebugUtils.currentLine=77070682;
 //BA.debugLineNum = 77070682;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77070684;
 //BA.debugLineNum = 77070684;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77070685;
 //BA.debugLineNum = 77070685;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77070686;
 //BA.debugLineNum = 77070686;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77070687;
 //BA.debugLineNum = 77070687;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select C";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77070688;
 //BA.debugLineNum = 77070688;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070689;
 //BA.debugLineNum = 77070689;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77070690;
 //BA.debugLineNum = 77070690;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select U";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77070691;
 //BA.debugLineNum = 77070691;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070692;
 //BA.debugLineNum = 77070692;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77070693;
 //BA.debugLineNum = 77070693;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select s";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77070694;
 //BA.debugLineNum = 77070694;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070695;
 //BA.debugLineNum = 77070695;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=77070696;
 //BA.debugLineNum = 77070696;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070697;
 //BA.debugLineNum = 77070697;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"inser";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77070698;
 //BA.debugLineNum = 77070698;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=77070700;
 //BA.debugLineNum = 77070700;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070701;
 //BA.debugLineNum = 77070701;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=77070703;
 //BA.debugLineNum = 77070703;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info3";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info3 set CONFIRMADO = 0  WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77070704;
 //BA.debugLineNum = 77070704;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update CODIGOS_CR";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update CODIGOS_CREDITO set BANDERA = 0  WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77070705;
 //BA.debugLineNum = 77070705;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77070708;
 //BA.debugLineNum = 77070708;BA.debugLine="Log(\"aqui\")";
__c.LogImpl("077070708","aqui",0);
RDebugUtils.currentLine=77070709;
 //BA.debugLineNum = 77070709;BA.debugLine="B4XPages.MainPage.cliente.p_transparenteTicke";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ ._p_transparenteticketimpreso /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=77070710;
 //BA.debugLineNum = 77070710;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=77070711;
 //BA.debugLineNum = 77070711;BA.debugLine="ToastMessageShow(\"La venta ya esta impresa, n";
__c.ToastMessageShow(BA.ObjectToCharSequence("La venta ya esta impresa, no se puede modificar!!"),__c.True);
 };
 };
 }}
;
 }else 
{RDebugUtils.currentLine=77070715;
 //BA.debugLineNum = 77070715;BA.debugLine="Else If c.RowCount =  0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()==0) { 
RDebugUtils.currentLine=77070716;
 //BA.debugLineNum = 77070716;BA.debugLine="If Not(Subs.revisaImpreso) Then";
if (__c.Not(_subs._revisaimpreso /*boolean*/ (ba))) { 
RDebugUtils.currentLine=77070717;
 //BA.debugLineNum = 77070717;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar este";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070718;
 //BA.debugLineNum = 77070718;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77070719;
 //BA.debugLineNum = 77070719;BA.debugLine="Private X() As String = Regex.Split(\" \", Value";
_x = __c.Regex.Split(" ",BA.ObjectToString(_value));
RDebugUtils.currentLine=77070720;
 //BA.debugLineNum = 77070720;BA.debugLine="Log(X)";
__c.LogImpl("077070720",BA.ObjectToString(_x),0);
RDebugUtils.currentLine=77070721;
 //BA.debugLineNum = 77070721;BA.debugLine="Log(X.Length)";
__c.LogImpl("077070721",BA.NumberToString(_x.length),0);
RDebugUtils.currentLine=77070722;
 //BA.debugLineNum = 77070722;BA.debugLine="Private nom As String = \"\"";
_nom = "";
RDebugUtils.currentLine=77070723;
 //BA.debugLineNum = 77070723;BA.debugLine="For i = 0 To X.Length -1";
{
final int step325 = 1;
final int limit325 = (int) (_x.length-1);
_i = (int) (0) ;
for (;_i <= limit325 ;_i = _i + step325 ) {
RDebugUtils.currentLine=77070725;
 //BA.debugLineNum = 77070725;BA.debugLine="If X(i).Contains(CRLF) Then";
if (_x[_i].contains(__c.CRLF)) { 
 };
RDebugUtils.currentLine=77070728;
 //BA.debugLineNum = 77070728;BA.debugLine="If Not(X(i).Contains(CRLF)) Then";
if (__c.Not(_x[_i].contains(__c.CRLF))) { 
RDebugUtils.currentLine=77070729;
 //BA.debugLineNum = 77070729;BA.debugLine="nom = nom & \" \" & X(i)";
_nom = _nom+" "+_x[_i];
 }else {
RDebugUtils.currentLine=77070731;
 //BA.debugLineNum = 77070731;BA.debugLine="Exit";
if (true) break;
 };
 }
};
RDebugUtils.currentLine=77070736;
 //BA.debugLineNum = 77070736;BA.debugLine="nom = nom.Trim";
_nom = _nom.trim();
RDebugUtils.currentLine=77070737;
 //BA.debugLineNum = 77070737;BA.debugLine="Private cedis As String = X(X.Length-1)";
_cedis = _x[(int) (_x.length-1)];
RDebugUtils.currentLine=77070738;
 //BA.debugLineNum = 77070738;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select PE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=77070739;
 //BA.debugLineNum = 77070739;BA.debugLine="Log($\"select PE_PROID,PE_CANT, PE_FOLIO, PE_CE";
__c.LogImpl("077070739",("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO where pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=77070740;
 //BA.debugLineNum = 77070740;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("077070740",BA.NumberToString(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070741;
 //BA.debugLineNum = 77070741;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070744;
 //BA.debugLineNum = 77070744;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
RDebugUtils.currentLine=77070751;
 //BA.debugLineNum = 77070751;BA.debugLine="If Not(IsNumber(cedis)) Then";
if (__c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=77070752;
 //BA.debugLineNum = 77070752;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SELEC";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_CEDIS = ?)",new String[]{_cedis})));
RDebugUtils.currentLine=77070753;
 //BA.debugLineNum = 77070753;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("077070753",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070754;
 //BA.debugLineNum = 77070754;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070755;
 //BA.debugLineNum = 77070755;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("077070755","Soy promo",0);
RDebugUtils.currentLine=77070756;
 //BA.debugLineNum = 77070756;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step346 = 1;
final int limit346 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit346 ;_j = _j + step346 ) {
RDebugUtils.currentLine=77070757;
 //BA.debugLineNum = 77070757;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("077070757","aqui tronare?",0);
RDebugUtils.currentLine=77070758;
 //BA.debugLineNum = 77070758;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=77070759;
 //BA.debugLineNum = 77070759;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"updat";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070760;
 //BA.debugLineNum = 77070760;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delet";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
 }
};
 };
RDebugUtils.currentLine=77070764;
 //BA.debugLineNum = 77070764;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=77070766;
 //BA.debugLineNum = 77070766;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070767;
 //BA.debugLineNum = 77070767;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nom),(Object)(_cedis),(Object)(_foliu)}));
 };
RDebugUtils.currentLine=77070769;
 //BA.debugLineNum = 77070769;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77070771;
 //BA.debugLineNum = 77070771;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77070772;
 //BA.debugLineNum = 77070772;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77070773;
 //BA.debugLineNum = 77070773;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77070774;
 //BA.debugLineNum = 77070774;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUE";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77070775;
 //BA.debugLineNum = 77070775;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070776;
 //BA.debugLineNum = 77070776;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77070777;
 //BA.debugLineNum = 77070777;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77070778;
 //BA.debugLineNum = 77070778;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070779;
 //BA.debugLineNum = 77070779;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77070780;
 //BA.debugLineNum = 77070780;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77070781;
 //BA.debugLineNum = 77070781;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070782;
 //BA.debugLineNum = 77070782;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=77070783;
 //BA.debugLineNum = 77070783;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete f";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070784;
 //BA.debugLineNum = 77070784;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77070785;
 //BA.debugLineNum = 77070785;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE k";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=77070787;
 //BA.debugLineNum = 77070787;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete f";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070788;
 //BA.debugLineNum = 77070788;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE k";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=77070790;
 //BA.debugLineNum = 77070790;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77070793;
 //BA.debugLineNum = 77070793;BA.debugLine="If Subs.traeAlmacen = 94 Then";
if ((_subs._traealmacen /*String*/ (ba)).equals(BA.NumberToString(94))) { 
RDebugUtils.currentLine=77070794;
 //BA.debugLineNum = 77070794;BA.debugLine="result =  Msgbox2(\"Seguro que desea borrar est";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea borrar este articulo?"),BA.ObjectToCharSequence("Borrar Articulo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=77070795;
 //BA.debugLineNum = 77070795;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=77070796;
 //BA.debugLineNum = 77070796;BA.debugLine="Private X() As String = Regex.Split(\" \", Valu";
_x = __c.Regex.Split(" ",BA.ObjectToString(_value));
RDebugUtils.currentLine=77070797;
 //BA.debugLineNum = 77070797;BA.debugLine="Log(X)";
__c.LogImpl("077070797",BA.ObjectToString(_x),0);
RDebugUtils.currentLine=77070798;
 //BA.debugLineNum = 77070798;BA.debugLine="Log(X.Length)";
__c.LogImpl("077070798",BA.NumberToString(_x.length),0);
RDebugUtils.currentLine=77070799;
 //BA.debugLineNum = 77070799;BA.debugLine="Private nom As String = \"\"";
_nom = "";
RDebugUtils.currentLine=77070800;
 //BA.debugLineNum = 77070800;BA.debugLine="For i = 0 To X.Length -1";
{
final int step388 = 1;
final int limit388 = (int) (_x.length-1);
_i = (int) (0) ;
for (;_i <= limit388 ;_i = _i + step388 ) {
RDebugUtils.currentLine=77070802;
 //BA.debugLineNum = 77070802;BA.debugLine="If X(i).Contains(CRLF) Then";
if (_x[_i].contains(__c.CRLF)) { 
 };
RDebugUtils.currentLine=77070805;
 //BA.debugLineNum = 77070805;BA.debugLine="If Not(X(i).Contains(CRLF)) Then";
if (__c.Not(_x[_i].contains(__c.CRLF))) { 
RDebugUtils.currentLine=77070806;
 //BA.debugLineNum = 77070806;BA.debugLine="nom = nom & \" \" & X(i)";
_nom = _nom+" "+_x[_i];
 }else {
RDebugUtils.currentLine=77070808;
 //BA.debugLineNum = 77070808;BA.debugLine="Exit";
if (true) break;
 };
 }
};
RDebugUtils.currentLine=77070813;
 //BA.debugLineNum = 77070813;BA.debugLine="nom = nom.Trim";
_nom = _nom.trim();
RDebugUtils.currentLine=77070814;
 //BA.debugLineNum = 77070814;BA.debugLine="Private cedis As String = X(X.Length-1)";
_cedis = _x[(int) (_x.length-1)];
RDebugUtils.currentLine=77070815;
 //BA.debugLineNum = 77070815;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"select P";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS, PE_PRONOMBRE FROM PEDIDO where (pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' or pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+" ') AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"))));
RDebugUtils.currentLine=77070816;
 //BA.debugLineNum = 77070816;BA.debugLine="Log($\"select PE_PROID,PE_CANT, PE_FOLIO, PE_C";
__c.LogImpl("077070816",("select PE_PROID,PE_CANT, PE_FOLIO, PE_CEDIS FROM PEDIDO where pe_pronombre = '"+__c.SmartStringFormatter("",(Object)(_nom))+"' AND PE_CEDIS = '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=77070817;
 //BA.debugLineNum = 77070817;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("077070817",BA.NumberToString(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070818;
 //BA.debugLineNum = 77070818;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070821;
 //BA.debugLineNum = 77070821;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")),(Object)((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))*-1)}));
RDebugUtils.currentLine=77070828;
 //BA.debugLineNum = 77070828;BA.debugLine="If Not(IsNumber(cedis)) Then";
if (__c.Not(__c.IsNumber(_cedis))) { 
RDebugUtils.currentLine=77070829;
 //BA.debugLineNum = 77070829;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SELE";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT PE_CEDIS, PE_CANT,PE_PROID, PE_PRONOMBRE, PE_FOLIO FROM PEDIDO WHERE PE_CEDIS IN (SELECT PE_CEDIS FROM PEDIDO WHERE PE_CEDIS = ?)",new String[]{_cedis})));
RDebugUtils.currentLine=77070830;
 //BA.debugLineNum = 77070830;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("077070830",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=77070831;
 //BA.debugLineNum = 77070831;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=77070832;
 //BA.debugLineNum = 77070832;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("077070832","Soy promo",0);
RDebugUtils.currentLine=77070833;
 //BA.debugLineNum = 77070833;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step409 = 1;
final int limit409 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit409 ;_j = _j + step409 ) {
RDebugUtils.currentLine=77070834;
 //BA.debugLineNum = 77070834;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("077070834","aqui tronare?",0);
RDebugUtils.currentLine=77070835;
 //BA.debugLineNum = 77070835;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=77070836;
 //BA.debugLineNum = 77070836;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"upda";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070837;
 //BA.debugLineNum = 77070837;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"dele";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("delete from pedido where pe_cedis= '"+__c.SmartStringFormatter("",(Object)(_cedis))+"' and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = '"+__c.SmartStringFormatter("",(Object)(_foliu))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
 }
};
 };
RDebugUtils.currentLine=77070841;
 //BA.debugLineNum = 77070841;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else {
RDebugUtils.currentLine=77070843;
 //BA.debugLineNum = 77070843;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"update";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")))+" where cat_gp_id = '"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
RDebugUtils.currentLine=77070844;
 //BA.debugLineNum = 77070844;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from pedido where pe_pronombre = ? and pe_cedis = ? and pe_cliente in (Select CUENTA from cuentaa) AND PE_FOLIO = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_nom),(Object)(_cedis),(Object)(_foliu)}));
 };
RDebugUtils.currentLine=77070846;
 //BA.debugLineNum = 77070846;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=77070848;
 //BA.debugLineNum = 77070848;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=77070849;
 //BA.debugLineNum = 77070849;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=77070850;
 //BA.debugLineNum = 77070850;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=77070851;
 //BA.debugLineNum = 77070851;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CU";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=77070852;
 //BA.debugLineNum = 77070852;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070853;
 //BA.debugLineNum = 77070853;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=77070854;
 //BA.debugLineNum = 77070854;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select US";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=77070855;
 //BA.debugLineNum = 77070855;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070856;
 //BA.debugLineNum = 77070856;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=77070857;
 //BA.debugLineNum = 77070857;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select su";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_costo_tot) as TOTAL_CLIE, SUM(PE_CANT) AS CANT_CLIE, count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")));
RDebugUtils.currentLine=77070858;
 //BA.debugLineNum = 77070858;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=77070859;
 //BA.debugLineNum = 77070859;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))>0) { 
RDebugUtils.currentLine=77070860;
 //BA.debugLineNum = 77070860;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070861;
 //BA.debugLineNum = 77070861;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=77070862;
 //BA.debugLineNum = 77070862;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 2  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=77070864;
 //BA.debugLineNum = 77070864;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=77070865;
 //BA.debugLineNum = 77070865;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=77070867;
 //BA.debugLineNum = 77070867;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info3 s";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info3 set CONFIRMADO = 0  WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77070868;
 //BA.debugLineNum = 77070868;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update CODIGOS_CRE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update CODIGOS_CREDITO set BANDERA = 0  WHERE CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=77070869;
 //BA.debugLineNum = 77070869;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else {
RDebugUtils.currentLine=77070872;
 //BA.debugLineNum = 77070872;BA.debugLine="Log(\"aqui\")";
__c.LogImpl("077070872","aqui",0);
RDebugUtils.currentLine=77070873;
 //BA.debugLineNum = 77070873;BA.debugLine="B4XPages.MainPage.cliente.p_transparenteTicket";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ ._p_transparenteticketimpreso /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=77070874;
 //BA.debugLineNum = 77070874;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=77070875;
 //BA.debugLineNum = 77070875;BA.debugLine="ToastMessageShow(\"La venta ya esta impresa, no";
__c.ToastMessageShow(BA.ObjectToCharSequence("La venta ya esta impresa, no se puede modificar!!"),__c.True);
 };
 };
 }}
;
RDebugUtils.currentLine=77070879;
 //BA.debugLineNum = 77070879;BA.debugLine="End Sub";
return "";
}
public String  _p_nota_click(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "p_nota_click", false))
	 {return ((String) Debug.delegate(ba, "p_nota_click", null));}
RDebugUtils.currentLine=77201408;
 //BA.debugLineNum = 77201408;BA.debugLine="Private Sub p_nota_Click";
RDebugUtils.currentLine=77201410;
 //BA.debugLineNum = 77201410;BA.debugLine="End Sub";
return "";
}
public String  _regresar_click(gunav2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "regresar_click", false))
	 {return ((String) Debug.delegate(ba, "regresar_click", null));}
RDebugUtils.currentLine=76873728;
 //BA.debugLineNum = 76873728;BA.debugLine="Sub Regresar_Click";
RDebugUtils.currentLine=76873729;
 //BA.debugLineNum = 76873729;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=76873730;
 //BA.debugLineNum = 76873730;BA.debugLine="End Sub";
return "";
}
}