package SHARK2.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, "SHARK2.keymon.com.mx.c_nota");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", SHARK2.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.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 anywheresoftware.b4a.objects.collections.List _vamoaver = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _j3 = null;
public b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(SHARK2.keymon.com.mx.c_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=11927552;
 //BA.debugLineNum = 11927552;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=11927553;
 //BA.debugLineNum = 11927553;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=11927554;
 //BA.debugLineNum = 11927554;BA.debugLine="End Sub";
return null;
}
public String  _activity_pause(SHARK2.keymon.com.mx.c_nota __ref,boolean _userclosed) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
RDebugUtils.currentLine=12189696;
 //BA.debugLineNum = 12189696;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
RDebugUtils.currentLine=12189698;
 //BA.debugLineNum = 12189698;BA.debugLine="End Sub";
return "";
}
public String  _actualizartotalespantalla(SHARK2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
if (Debug.shouldDelegate(ba, "actualizartotalespantalla", false))
	 {return ((String) Debug.delegate(ba, "actualizartotalespantalla", null));}
anywheresoftware.b4a.sql.SQL.CursorWrapper _res = null;
RDebugUtils.currentLine=12124160;
 //BA.debugLineNum = 12124160;BA.debugLine="Private Sub ActualizarTotalesPantalla";
RDebugUtils.currentLine=12124162;
 //BA.debugLineNum = 12124162;BA.debugLine="Dim res As Cursor = B4XPages.MainPage.skmt.ExecQu";
_res = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_res = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT IFNULL(SUM(PE_CANT),0) AS PC_NOART, SUM(IFNULL(PE_COSTO_TOT,0)) AS PC_MONTO FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM cuentaa) AND PE_PROID NOT IN (SELECT CAT_PA_ID FROM PROMOS_COMP)")));
RDebugUtils.currentLine=12124164;
 //BA.debugLineNum = 12124164;BA.debugLine="If res.RowCount > 0 Then";
if (_res.getRowCount()>0) { 
RDebugUtils.currentLine=12124165;
 //BA.debugLineNum = 12124165;BA.debugLine="res.Position = 0";
_res.setPosition((int) (0));
RDebugUtils.currentLine=12124166;
 //BA.debugLineNum = 12124166;BA.debugLine="L_CANT.Text = res.GetString(\"PC_NOART\")";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(_res.GetString("PC_NOART")));
RDebugUtils.currentLine=12124167;
 //BA.debugLineNum = 12124167;BA.debugLine="L_TOTAL.Text = \"$\" & NumberFormat2(res.GetDouble";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("$"+__c.NumberFormat2(_res.GetDouble("PC_MONTO"),(int) (1),(int) (2),(int) (2),__c.False)));
 }else {
RDebugUtils.currentLine=12124169;
 //BA.debugLineNum = 12124169;BA.debugLine="L_CANT.Text = \"0\"";
__ref._l_cant /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("0"));
RDebugUtils.currentLine=12124170;
 //BA.debugLineNum = 12124170;BA.debugLine="L_TOTAL.Text = \"$0.00\"";
__ref._l_total /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("$0.00"));
 };
RDebugUtils.currentLine=12124172;
 //BA.debugLineNum = 12124172;BA.debugLine="res.Close";
_res.Close();
RDebugUtils.currentLine=12124175;
 //BA.debugLineNum = 12124175;BA.debugLine="If Subs.pedidoGuardado Then borra.Enabled = False";
if (_subs._pedidoguardado /*boolean*/ (ba)) { 
__ref._borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.False);}
else {
__ref._borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(__c.True);};
RDebugUtils.currentLine=12124176;
 //BA.debugLineNum = 12124176;BA.debugLine="End Sub";
return "";
}
public String  _b_desc_click(SHARK2.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=12582912;
 //BA.debugLineNum = 12582912;BA.debugLine="Sub b_desc_Click";
RDebugUtils.currentLine=12582913;
 //BA.debugLineNum = 12582913;BA.debugLine="If DESCUENTO = \"MENOS\" Then";
if ((__ref._descuento /*String*/ ).equals("MENOS")) { 
RDebugUtils.currentLine=12582914;
 //BA.debugLineNum = 12582914;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=12582915;
 //BA.debugLineNum = 12582915;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=12582916;
 //BA.debugLineNum = 12582916;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=12582917;
 //BA.debugLineNum = 12582917;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=12582918;
 //BA.debugLineNum = 12582918;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12582919;
 //BA.debugLineNum = 12582919;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=12582920;
 //BA.debugLineNum = 12582920;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12582921;
 //BA.debugLineNum = 12582921;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=12582922;
 //BA.debugLineNum = 12582922;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12582923;
 //BA.debugLineNum = 12582923;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=12582924;
 //BA.debugLineNum = 12582924;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12582925;
 //BA.debugLineNum = 12582925;BA.debugLine="result =  Msgbox2(\"Seguro que desea dar descuent";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea dar descuento del 5%?"),BA.ObjectToCharSequence("Dar descuento"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=12582926;
 //BA.debugLineNum = 12582926;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=12582927;
 //BA.debugLineNum = 12582927;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE ped";
_b4xpages._mainpage /*SHARK2.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=12582928;
 //BA.debugLineNum = 12582928;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_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=12582929;
 //BA.debugLineNum = 12582929;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12582930;
 //BA.debugLineNum = 12582930;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=12582931;
 //BA.debugLineNum = 12582931;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert in";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=12582932;
 //BA.debugLineNum = 12582932;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12582933;
 //BA.debugLineNum = 12582933;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }else 
{RDebugUtils.currentLine=12582935;
 //BA.debugLineNum = 12582935;BA.debugLine="ELSE IF DESCUENTO = \"MAS\" Then";
if ((__ref._descuento /*String*/ ).equals("MAS")) { 
RDebugUtils.currentLine=12582936;
 //BA.debugLineNum = 12582936;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=12582937;
 //BA.debugLineNum = 12582937;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=12582938;
 //BA.debugLineNum = 12582938;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=12582939;
 //BA.debugLineNum = 12582939;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CUENT";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CUENTA from cuentaa")));
RDebugUtils.currentLine=12582940;
 //BA.debugLineNum = 12582940;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12582941;
 //BA.debugLineNum = 12582941;BA.debugLine="clie_id = c.GetString(\"CUENTA\")";
__ref._clie_id /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=12582942;
 //BA.debugLineNum = 12582942;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12582943;
 //BA.debugLineNum = 12582943;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select USUAR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=12582944;
 //BA.debugLineNum = 12582944;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12582945;
 //BA.debugLineNum = 12582945;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=12582946;
 //BA.debugLineNum = 12582946;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12582947;
 //BA.debugLineNum = 12582947;BA.debugLine="result =  Msgbox2(\"Seguro que desea CANCELAR el";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea CANCELAR el descuento?"),BA.ObjectToCharSequence("Cancelar descuento"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=12582948;
 //BA.debugLineNum = 12582948;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=12582949;
 //BA.debugLineNum = 12582949;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE ped";
_b4xpages._mainpage /*SHARK2.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=12582950;
 //BA.debugLineNum = 12582950;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select sum(";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select sum(pe_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=12582951;
 //BA.debugLineNum = 12582951;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12582952;
 //BA.debugLineNum = 12582952;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE In (select cuenta from cuentaa)");
RDebugUtils.currentLine=12582953;
 //BA.debugLineNum = 12582953;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"insert in";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into pedido_cliente(PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT) VALUES (?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._clie_id /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CANT_CLIE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TOTAL_CLIE")),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ )}));
RDebugUtils.currentLine=12582954;
 //BA.debugLineNum = 12582954;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12582955;
 //BA.debugLineNum = 12582955;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 }}
;
RDebugUtils.currentLine=12582958;
 //BA.debugLineNum = 12582958;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(SHARK2.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));}
String _query = "";
String _almacenactual = "";
int _i = 0;
String _idprod = "";
String _nomprod = "";
String _factual = "";
String _presname = "";
String _cantpres = "";
int _uvmval = 0;
String _cedisfila = "";
String _dirigidafila = "";
int _cantpzs = 0;
anywheresoftware.b4a.objects.CSBuilder _cstitulo = null;
anywheresoftware.b4a.objects.CSBuilder _csdetalle = null;
anywheresoftware.b4a.objects.collections.Map _datosidentificadores = null;
RDebugUtils.currentLine=12058624;
 //BA.debugLineNum = 12058624;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=12058626;
 //BA.debugLineNum = 12058626;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=12058627;
 //BA.debugLineNum = 12058627;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=12058628;
 //BA.debugLineNum = 12058628;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=12058632;
 //BA.debugLineNum = 12058632;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT ID_A";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT ID_ALMACEN FROM CAT_ALMACEN")));
RDebugUtils.currentLine=12058633;
 //BA.debugLineNum = 12058633;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=12058634;
 //BA.debugLineNum = 12058634;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=12058635;
 //BA.debugLineNum = 12058635;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
__ref._almacen /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("ID_ALMACEN");
 };
RDebugUtils.currentLine=12058637;
 //BA.debugLineNum = 12058637;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12058640;
 //BA.debugLineNum = 12058640;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 130dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (130)));
RDebugUtils.currentLine=12058643;
 //BA.debugLineNum = 12058643;BA.debugLine="ListView1.TwoLinesLayout.Label.Height = 45dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setHeight(__c.DipToCurrent((int) (45)));
RDebugUtils.currentLine=12058644;
 //BA.debugLineNum = 12058644;BA.debugLine="ListView1.TwoLinesLayout.Label.TextSize = 18";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setTextSize((float) (18));
RDebugUtils.currentLine=12058645;
 //BA.debugLineNum = 12058645;BA.debugLine="ListView1.TwoLinesLayout.Label.Typeface = Typefac";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setTypeface(__c.Typeface.DEFAULT_BOLD);
RDebugUtils.currentLine=12058646;
 //BA.debugLineNum = 12058646;BA.debugLine="ListView1.TwoLinesLayout.Label.TextColor = Colors";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setTextColor(__c.Colors.RGB((int) (150),(int) (0),(int) (0)));
RDebugUtils.currentLine=12058647;
 //BA.debugLineNum = 12058647;BA.debugLine="ListView1.TwoLinesLayout.Label.Gravity = Gravity.";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label.setGravity(__c.Gravity.CENTER_VERTICAL);
RDebugUtils.currentLine=12058650;
 //BA.debugLineNum = 12058650;BA.debugLine="ListView1.TwoLinesLayout.SecondLabel.Height = 80d";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel.setHeight(__c.DipToCurrent((int) (80)));
RDebugUtils.currentLine=12058651;
 //BA.debugLineNum = 12058651;BA.debugLine="ListView1.TwoLinesLayout.SecondLabel.Top = 45dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel.setTop(__c.DipToCurrent((int) (45)));
RDebugUtils.currentLine=12058652;
 //BA.debugLineNum = 12058652;BA.debugLine="ListView1.TwoLinesLayout.SecondLabel.TextSize = 1";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel.setTextSize((float) (14));
RDebugUtils.currentLine=12058656;
 //BA.debugLineNum = 12058656;BA.debugLine="Dim query As String = \"SELECT PE_PRONOMBRE, PE_CO";
_query = "SELECT PE_PRONOMBRE, PE_COSTO_TOT, PE_CANT, PE_FOLIO, PE_CEDIS, "+"PE_PRESENTACION, PE_CANTC, PE_UVM, PE_PROID, PE_DIRIGIDA "+"FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM cuentaa) "+"ORDER BY PE_CEDIS,PE_COSTO_TOT, PE_PRONOMBRE";
RDebugUtils.currentLine=12058661;
 //BA.debugLineNum = 12058661;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(query)";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(_query)));
RDebugUtils.currentLine=12058662;
 //BA.debugLineNum = 12058662;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=12058663;
 //BA.debugLineNum = 12058663;BA.debugLine="vamoaver.Initialize";
__ref._vamoaver /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=12058711;
 //BA.debugLineNum = 12058711;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=12058712;
 //BA.debugLineNum = 12058712;BA.debugLine="Dim almacenActual As String = Subs.traeAlmacen '";
_almacenactual = _subs._traealmacen /*String*/ (ba);
RDebugUtils.currentLine=12058714;
 //BA.debugLineNum = 12058714;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=12058715;
 //BA.debugLineNum = 12058715;BA.debugLine="c.Position = i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=12058718;
 //BA.debugLineNum = 12058718;BA.debugLine="Dim idProd As String = c.GetString(\"PE_PROID\")";
_idprod = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID");
RDebugUtils.currentLine=12058719;
 //BA.debugLineNum = 12058719;BA.debugLine="Dim nomProd As String = c.GetString(\"PE_PRONOMB";
_nomprod = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PRONOMBRE");
RDebugUtils.currentLine=12058720;
 //BA.debugLineNum = 12058720;BA.debugLine="Dim fActual As String = c.GetString(\"PE_FOLIO\")";
_factual = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO");
RDebugUtils.currentLine=12058721;
 //BA.debugLineNum = 12058721;BA.debugLine="Dim presName As String = c.GetString(\"PE_PRESEN";
_presname = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PRESENTACION");
RDebugUtils.currentLine=12058722;
 //BA.debugLineNum = 12058722;BA.debugLine="Dim cantPres As String = c.GetString(\"PE_CANTC\"";
_cantpres = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANTC");
RDebugUtils.currentLine=12058723;
 //BA.debugLineNum = 12058723;BA.debugLine="Dim uvmVal As Int = c.GetInt(\"PE_UVM\")";
_uvmval = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetInt("PE_UVM");
RDebugUtils.currentLine=12058724;
 //BA.debugLineNum = 12058724;BA.debugLine="Dim cedisFila As String = c.GetString(\"PE_CEDIS";
_cedisfila = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CEDIS");
RDebugUtils.currentLine=12058725;
 //BA.debugLineNum = 12058725;BA.debugLine="Dim dirigidaFila As String = c.GetString(\"PE_DI";
_dirigidafila = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_DIRIGIDA");
RDebugUtils.currentLine=12058726;
 //BA.debugLineNum = 12058726;BA.debugLine="Dim cantPzs As Int = c.GetInt(\"PE_CANT\")";
_cantpzs = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetInt("PE_CANT");
RDebugUtils.currentLine=12058728;
 //BA.debugLineNum = 12058728;BA.debugLine="If cantPres = \"\" Or cantPres = \"null\" Then cant";
if ((_cantpres).equals("") || (_cantpres).equals("null")) { 
_cantpres = "0";};
RDebugUtils.currentLine=12058732;
 //BA.debugLineNum = 12058732;BA.debugLine="Dim csTitulo As CSBuilder";
_cstitulo = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=12058733;
 //BA.debugLineNum = 12058733;BA.debugLine="csTitulo.Initialize";
_cstitulo.Initialize();
RDebugUtils.currentLine=12058735;
 //BA.debugLineNum = 12058735;BA.debugLine="If cedisFila <> almacenActual Then";
if ((_cedisfila).equals(_almacenactual) == false) { 
RDebugUtils.currentLine=12058737;
 //BA.debugLineNum = 12058737;BA.debugLine="csTitulo.Color(Colors.RGB(0, 150, 136)).Typefa";
_cstitulo.Color(__c.Colors.RGB((int) (0),(int) (150),(int) (136))).Typeface(__c.Typeface.DEFAULT_BOLD).Append(BA.ObjectToCharSequence(_nomprod+" (PROMO)")).PopAll();
 }else {
RDebugUtils.currentLine=12058740;
 //BA.debugLineNum = 12058740;BA.debugLine="csTitulo.Color(Colors.RGB(150, 0, 0)).Typeface";
_cstitulo.Color(__c.Colors.RGB((int) (150),(int) (0),(int) (0))).Typeface(__c.Typeface.DEFAULT_BOLD).Append(BA.ObjectToCharSequence(_nomprod)).PopAll();
 };
RDebugUtils.currentLine=12058744;
 //BA.debugLineNum = 12058744;BA.debugLine="Dim csDetalle As CSBuilder";
_csdetalle = new anywheresoftware.b4a.objects.CSBuilder();
RDebugUtils.currentLine=12058745;
 //BA.debugLineNum = 12058745;BA.debugLine="csDetalle.Initialize";
_csdetalle.Initialize();
RDebugUtils.currentLine=12058748;
 //BA.debugLineNum = 12058748;BA.debugLine="If uvmVal > 1 Then";
if (_uvmval>1) { 
RDebugUtils.currentLine=12058749;
 //BA.debugLineNum = 12058749;BA.debugLine="csDetalle.Color(Colors.Blue).Size(17).Append(p";
_csdetalle.Color(__c.Colors.Blue).Size((int) (17)).Append(BA.ObjectToCharSequence(_presname.toUpperCase()+": "+BA.NumberToString((_cantpzs/(double)_uvmval)))).Pop().Pop().Append(BA.ObjectToCharSequence(__c.CRLF));
RDebugUtils.currentLine=12058750;
 //BA.debugLineNum = 12058750;BA.debugLine="csDetalle.Size(6).Append(CRLF).Pop";
_csdetalle.Size((int) (6)).Append(BA.ObjectToCharSequence(__c.CRLF)).Pop();
 };
RDebugUtils.currentLine=12058754;
 //BA.debugLineNum = 12058754;BA.debugLine="csDetalle.Color(Colors.DarkGray).Size(13).Appen";
_csdetalle.Color(__c.Colors.DarkGray).Size((int) (13)).Append(BA.ObjectToCharSequence("Piezas: ")).Color(__c.Colors.Black).Append(BA.ObjectToCharSequence("#"+BA.NumberToString(_cantpzs))).Pop();
RDebugUtils.currentLine=12058755;
 //BA.debugLineNum = 12058755;BA.debugLine="csDetalle.Append(\"  |  \").Color(Colors.DarkGray";
_csdetalle.Append(BA.ObjectToCharSequence("  |  ")).Color(__c.Colors.DarkGray).Append(BA.ObjectToCharSequence("Subtotal: ")).Color(((int)0xff008000)).Append(BA.ObjectToCharSequence("$"+__c.NumberFormat2(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetDouble("PE_COSTO_TOT"),(int) (1),(int) (2),(int) (2),__c.False))).PopAll();
RDebugUtils.currentLine=12058758;
 //BA.debugLineNum = 12058758;BA.debugLine="Dim datosIdentificadores As Map = CreateMap(\"id";
_datosidentificadores = new anywheresoftware.b4a.objects.collections.Map();
_datosidentificadores = __c.createMap(new Object[] {(Object)("id"),(Object)(_idprod),(Object)("nombre"),(Object)(_nomprod),(Object)("cedis"),(Object)(_cedisfila),(Object)("pres"),(Object)(_presname),(Object)("uvm"),(Object)(_uvmval),(Object)("dir"),(Object)(_dirigidafila),(Object)("folio"),(Object)(_factual),(Object)("cant"),(Object)(_cantpzs)});
RDebugUtils.currentLine=12058762;
 //BA.debugLineNum = 12058762;BA.debugLine="ListView1.AddTwoLines2(csTitulo, csDetalle, dat";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines2(BA.ObjectToCharSequence(_cstitulo.getObject()),BA.ObjectToCharSequence(_csdetalle.getObject()),(Object)(_datosidentificadores.getObject()));
RDebugUtils.currentLine=12058764;
 //BA.debugLineNum = 12058764;BA.debugLine="vamoaver.Add(fActual)";
__ref._vamoaver /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_factual));
 }
};
 };
RDebugUtils.currentLine=12058767;
 //BA.debugLineNum = 12058767;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12058770;
 //BA.debugLineNum = 12058770;BA.debugLine="ActualizarTotalesPantalla";
__ref._actualizartotalespantalla /*String*/ (null);
RDebugUtils.currentLine=12058771;
 //BA.debugLineNum = 12058771;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(SHARK2.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(SHARK2.keymon.com.mx.c_nota parent,SHARK2.keymon.com.mx.c_nota __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
SHARK2.keymon.com.mx.c_nota __ref;
SHARK2.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=12386307;
 //BA.debugLineNum = 12386307;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
parent._b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=12386308;
 //BA.debugLineNum = 12386308;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
RDebugUtils.currentLine=12386309;
 //BA.debugLineNum = 12386309;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(SHARK2.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=11993088;
 //BA.debugLineNum = 11993088;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=11993089;
 //BA.debugLineNum = 11993089;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=11993090;
 //BA.debugLineNum = 11993090;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=11993091;
 //BA.debugLineNum = 11993091;BA.debugLine="Root.LoadLayout(\"nota\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("nota",ba);
RDebugUtils.currentLine=11993092;
 //BA.debugLineNum = 11993092;BA.debugLine="borra.Visible = True";
__ref._borra /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setVisible(__c.True);
RDebugUtils.currentLine=11993093;
 //BA.debugLineNum = 11993093;BA.debugLine="Titulo.Text = \"Pedido Actual\"";
__ref._titulo /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Pedido Actual"));
RDebugUtils.currentLine=11993100;
 //BA.debugLineNum = 11993100;BA.debugLine="End Sub";
return "";
}
public String  _borra_click(SHARK2.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;
String _tablainventario = "";
RDebugUtils.currentLine=12451840;
 //BA.debugLineNum = 12451840;BA.debugLine="Sub borra_Click";
RDebugUtils.currentLine=12451841;
 //BA.debugLineNum = 12451841;BA.debugLine="Log(\"Entre al btn borrar\")";
__c.LogImpl("512451841","Entre al btn borrar",0);
RDebugUtils.currentLine=12451842;
 //BA.debugLineNum = 12451842;BA.debugLine="result =  Msgbox2(\"Seguro que desa borrar el pedi";
__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=12451843;
 //BA.debugLineNum = 12451843;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=12451844;
 //BA.debugLineNum = 12451844;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) ")));
RDebugUtils.currentLine=12451845;
 //BA.debugLineNum = 12451845;BA.debugLine="Log($\"select PE_PROID,PE_CANT FROM PEDIDO where";
__c.LogImpl("512451845",("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa)"),0);
RDebugUtils.currentLine=12451846;
 //BA.debugLineNum = 12451846;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=12451847;
 //BA.debugLineNum = 12451847;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step7 = 1;
final int limit7 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
RDebugUtils.currentLine=12451850;
 //BA.debugLineNum = 12451850;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=12451852;
 //BA.debugLineNum = 12451852;BA.debugLine="Dim tablaInventario As String";
_tablainventario = "";
RDebugUtils.currentLine=12451854;
 //BA.debugLineNum = 12451854;BA.debugLine="If c.GetString(\"PE_FOLIO\") = \"PREVENTA_CONTADO";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("PREVENTA_CONTADO") || (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("ABORDO")) { 
RDebugUtils.currentLine=12451855;
 //BA.debugLineNum = 12451855;BA.debugLine="tablaInventario = \"CAT_GUNAPROD\"";
_tablainventario = "CAT_GUNAPROD";
RDebugUtils.currentLine=12451856;
 //BA.debugLineNum = 12451856;BA.debugLine="Log(\"1\")";
__c.LogImpl("512451856","1",0);
 }else 
{RDebugUtils.currentLine=12451857;
 //BA.debugLineNum = 12451857;BA.debugLine="Else If c.GetString(\"PE_FOLIO\") = \"VENTA\" Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("VENTA")) { 
RDebugUtils.currentLine=12451858;
 //BA.debugLineNum = 12451858;BA.debugLine="tablaInventario = \"CAT_GUNAPROD2\"";
_tablainventario = "CAT_GUNAPROD2";
RDebugUtils.currentLine=12451859;
 //BA.debugLineNum = 12451859;BA.debugLine="Log(2)";
__c.LogImpl("512451859",BA.NumberToString(2),0);
 }else 
{RDebugUtils.currentLine=12451860;
 //BA.debugLineNum = 12451860;BA.debugLine="Else If c.GetString(\"PE_FOLIO\") = \"RECARGA\" Th";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("RECARGA")) { 
RDebugUtils.currentLine=12451861;
 //BA.debugLineNum = 12451861;BA.debugLine="tablaInventario = \"CAT_GUNAPROD\"";
_tablainventario = "CAT_GUNAPROD";
RDebugUtils.currentLine=12451862;
 //BA.debugLineNum = 12451862;BA.debugLine="Log(3)";
__c.LogImpl("512451862",BA.NumberToString(3),0);
 }else 
{RDebugUtils.currentLine=12451863;
 //BA.debugLineNum = 12451863;BA.debugLine="Else If c.GetString(\"PE_FOLIO\") = \"PREVENTA_CR";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")).equals("PREVENTA_CREDITO")) { 
RDebugUtils.currentLine=12451864;
 //BA.debugLineNum = 12451864;BA.debugLine="tablaInventario = \"CAT_GUNAPROD4\"";
_tablainventario = "CAT_GUNAPROD4";
RDebugUtils.currentLine=12451865;
 //BA.debugLineNum = 12451865;BA.debugLine="Log(4)";
__c.LogImpl("512451865",BA.NumberToString(4),0);
 }}}}
;
RDebugUtils.currentLine=12451867;
 //BA.debugLineNum = 12451867;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_tablainventario))+" 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=12451868;
 //BA.debugLineNum = 12451868;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT I";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  INVENT_X_ENVIAR (ALMACEN , PROID , CANTIDAD ) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._almacen /*String*/ ),(Object)(__ref._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=12451871;
 //BA.debugLineNum = 12451871;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=12451872;
 //BA.debugLineNum = 12451872;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=12451873;
 //BA.debugLineNum = 12451873;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 0  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=12451874;
 //BA.debugLineNum = 12451874;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
RDebugUtils.currentLine=12451876;
 //BA.debugLineNum = 12451876;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(SHARK2.keymon.com.mx.c_nota __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_nota";
RDebugUtils.currentLine=11862016;
 //BA.debugLineNum = 11862016;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=11862017;
 //BA.debugLineNum = 11862017;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=11862018;
 //BA.debugLineNum = 11862018;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=11862020;
 //BA.debugLineNum = 11862020;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=11862021;
 //BA.debugLineNum = 11862021;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=11862022;
 //BA.debugLineNum = 11862022;BA.debugLine="Dim clie_id As String";
_clie_id = "";
RDebugUtils.currentLine=11862023;
 //BA.debugLineNum = 11862023;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=11862024;
 //BA.debugLineNum = 11862024;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=11862026;
 //BA.debugLineNum = 11862026;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=11862027;
 //BA.debugLineNum = 11862027;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=11862028;
 //BA.debugLineNum = 11862028;BA.debugLine="Dim Regresar As Button";
_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11862030;
 //BA.debugLineNum = 11862030;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=11862031;
 //BA.debugLineNum = 11862031;BA.debugLine="Dim L_CANT As Label";
_l_cant = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862032;
 //BA.debugLineNum = 11862032;BA.debugLine="Dim L_TOTAL As Label";
_l_total = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862033;
 //BA.debugLineNum = 11862033;BA.debugLine="Dim borra As Button";
_borra = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11862034;
 //BA.debugLineNum = 11862034;BA.debugLine="Dim Existe As String";
_existe = "";
RDebugUtils.currentLine=11862035;
 //BA.debugLineNum = 11862035;BA.debugLine="Dim result As String";
_result = "";
RDebugUtils.currentLine=11862037;
 //BA.debugLineNum = 11862037;BA.debugLine="Dim DESC As String";
_desc = "";
RDebugUtils.currentLine=11862039;
 //BA.debugLineNum = 11862039;BA.debugLine="Private Titulo As Label";
_titulo = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=11862040;
 //BA.debugLineNum = 11862040;BA.debugLine="Private b_desc As Button";
_b_desc = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=11862041;
 //BA.debugLineNum = 11862041;BA.debugLine="Dim DESCUENTO As String";
_descuento = "";
RDebugUtils.currentLine=11862042;
 //BA.debugLineNum = 11862042;BA.debugLine="Dim folio As String";
_folio = "";
RDebugUtils.currentLine=11862043;
 //BA.debugLineNum = 11862043;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=11862044;
 //BA.debugLineNum = 11862044;BA.debugLine="Private almacen As String";
_almacen = "";
RDebugUtils.currentLine=11862045;
 //BA.debugLineNum = 11862045;BA.debugLine="Private p_nota As Panel";
_p_nota = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=11862046;
 //BA.debugLineNum = 11862046;BA.debugLine="Dim vamoaver As List";
_vamoaver = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=11862047;
 //BA.debugLineNum = 11862047;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=11862048;
 //BA.debugLineNum = 11862048;BA.debugLine="Dim j3 As Cursor";
_j3 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=11862049;
 //BA.debugLineNum = 11862049;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(SHARK2.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=12255232;
 //BA.debugLineNum = 12255232;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=12255235;
 //BA.debugLineNum = 12255235;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(SHARK2.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}));}
anywheresoftware.b4a.objects.collections.Map _datos = null;
String _idprod = "";
String _nom = "";
String _presname = "";
int _uvmval = 0;
String _cedis = "";
String _folioactual = "";
int _cantregresar = 0;
String _tablainv = "";
int _j = 0;
String _qdelete = "";
RDebugUtils.currentLine=12517376;
 //BA.debugLineNum = 12517376;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=12517378;
 //BA.debugLineNum = 12517378;BA.debugLine="Dim datos As Map = Value";
_datos = new anywheresoftware.b4a.objects.collections.Map();
_datos = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_value));
RDebugUtils.currentLine=12517380;
 //BA.debugLineNum = 12517380;BA.debugLine="Dim idProd As String = datos.Get(\"id\")";
_idprod = BA.ObjectToString(_datos.Get((Object)("id")));
RDebugUtils.currentLine=12517381;
 //BA.debugLineNum = 12517381;BA.debugLine="Dim nom As String = datos.Get(\"nombre\")";
_nom = BA.ObjectToString(_datos.Get((Object)("nombre")));
RDebugUtils.currentLine=12517382;
 //BA.debugLineNum = 12517382;BA.debugLine="Dim presName As String = datos.Get(\"pres\")";
_presname = BA.ObjectToString(_datos.Get((Object)("pres")));
RDebugUtils.currentLine=12517383;
 //BA.debugLineNum = 12517383;BA.debugLine="Dim uvmVal As Int = datos.Get(\"uvm\")";
_uvmval = (int)(BA.ObjectToNumber(_datos.Get((Object)("uvm"))));
RDebugUtils.currentLine=12517384;
 //BA.debugLineNum = 12517384;BA.debugLine="Dim cedis As String = datos.Get(\"cedis\")";
_cedis = BA.ObjectToString(_datos.Get((Object)("cedis")));
RDebugUtils.currentLine=12517385;
 //BA.debugLineNum = 12517385;BA.debugLine="Dim folioActual As String = datos.Get(\"folio\")";
_folioactual = BA.ObjectToString(_datos.Get((Object)("folio")));
RDebugUtils.currentLine=12517386;
 //BA.debugLineNum = 12517386;BA.debugLine="Dim cantRegresar As Int = datos.Get(\"cant\")";
_cantregresar = (int)(BA.ObjectToNumber(_datos.Get((Object)("cant"))));
RDebugUtils.currentLine=12517387;
 //BA.debugLineNum = 12517387;BA.debugLine="Log(folioActual)";
__c.LogImpl("512517387",_folioactual,0);
RDebugUtils.currentLine=12517388;
 //BA.debugLineNum = 12517388;BA.debugLine="Log(cedis)";
__c.LogImpl("512517388",_cedis,0);
RDebugUtils.currentLine=12517390;
 //BA.debugLineNum = 12517390;BA.debugLine="result = Msgbox2(\"¿Seguro que desea borrar \" & no";
__ref._result /*String*/  = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("¿Seguro que desea borrar "+_nom+" ("+_presname+")?"),BA.ObjectToCharSequence("Borrar Artículo"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
RDebugUtils.currentLine=12517392;
 //BA.debugLineNum = 12517392;BA.debugLine="If result = DialogResponse.POSITIVE Then";
if ((__ref._result /*String*/ ).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
RDebugUtils.currentLine=12517394;
 //BA.debugLineNum = 12517394;BA.debugLine="Dim tablaInv As String";
_tablainv = "";
RDebugUtils.currentLine=12517398;
 //BA.debugLineNum = 12517398;BA.debugLine="If folioActual = \"PREVENTA_CONTADO\" Or folioActu";
if ((_folioactual).equals("PREVENTA_CONTADO") || (_folioactual).equals("ABORDO")) { 
RDebugUtils.currentLine=12517399;
 //BA.debugLineNum = 12517399;BA.debugLine="tablaInv = \"CAT_GUNAPROD\"";
_tablainv = "CAT_GUNAPROD";
RDebugUtils.currentLine=12517400;
 //BA.debugLineNum = 12517400;BA.debugLine="Log(\"1\")";
__c.LogImpl("512517400","1",0);
 }else 
{RDebugUtils.currentLine=12517401;
 //BA.debugLineNum = 12517401;BA.debugLine="Else If folioActual = \"VENTA\" Then";
if ((_folioactual).equals("VENTA")) { 
RDebugUtils.currentLine=12517402;
 //BA.debugLineNum = 12517402;BA.debugLine="tablaInv = \"CAT_GUNAPROD2\"";
_tablainv = "CAT_GUNAPROD2";
RDebugUtils.currentLine=12517403;
 //BA.debugLineNum = 12517403;BA.debugLine="Log(2)";
__c.LogImpl("512517403",BA.NumberToString(2),0);
 }else 
{RDebugUtils.currentLine=12517404;
 //BA.debugLineNum = 12517404;BA.debugLine="Else If folioActual = \"RECARGA\" Then";
if ((_folioactual).equals("RECARGA")) { 
RDebugUtils.currentLine=12517405;
 //BA.debugLineNum = 12517405;BA.debugLine="tablaInv = \"CAT_GUNAPROD\"";
_tablainv = "CAT_GUNAPROD";
RDebugUtils.currentLine=12517406;
 //BA.debugLineNum = 12517406;BA.debugLine="Log(3)";
__c.LogImpl("512517406",BA.NumberToString(3),0);
 }else 
{RDebugUtils.currentLine=12517407;
 //BA.debugLineNum = 12517407;BA.debugLine="Else If folioActual = \"PREVENTA_CREDITO\" Then";
if ((_folioactual).equals("PREVENTA_CREDITO")) { 
RDebugUtils.currentLine=12517408;
 //BA.debugLineNum = 12517408;BA.debugLine="tablaInv = \"CAT_GUNAPROD4\"";
_tablainv = "CAT_GUNAPROD4";
RDebugUtils.currentLine=12517409;
 //BA.debugLineNum = 12517409;BA.debugLine="Log(4)";
__c.LogImpl("512517409",BA.NumberToString(4),0);
 }}}}
;
RDebugUtils.currentLine=12517412;
 //BA.debugLineNum = 12517412;BA.debugLine="If cedis <> Subs.traeAlmacen Then";
if ((_cedis).equals(_subs._traealmacen /*String*/ (ba)) == false) { 
RDebugUtils.currentLine=12517415;
 //BA.debugLineNum = 12517415;BA.debugLine="j3 = B4XPages.MainPage.skmt.ExecQuery2(\"SELECT";
__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 /*SHARK2.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_PRONOMBRE = ? and PE_CEDIS = ?) AND PE_FOLIO = ?",new String[]{_nom,_cedis,_folioactual})));
RDebugUtils.currentLine=12517416;
 //BA.debugLineNum = 12517416;BA.debugLine="Log(j3.RowCount)";
__c.LogImpl("512517416",BA.NumberToString(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()),0);
RDebugUtils.currentLine=12517417;
 //BA.debugLineNum = 12517417;BA.debugLine="If j3.RowCount > 0 Then";
if (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=12517418;
 //BA.debugLineNum = 12517418;BA.debugLine="Log(\"Soy promo\")";
__c.LogImpl("512517418","Soy promo",0);
RDebugUtils.currentLine=12517419;
 //BA.debugLineNum = 12517419;BA.debugLine="For j = 0 To j3.RowCount -1";
{
final int step32 = 1;
final int limit32 = (int) (__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_j = (int) (0) ;
for (;_j <= limit32 ;_j = _j + step32 ) {
RDebugUtils.currentLine=12517420;
 //BA.debugLineNum = 12517420;BA.debugLine="Log(\"aqui tronare?\")";
__c.LogImpl("512517420","aqui tronare?",0);
RDebugUtils.currentLine=12517422;
 //BA.debugLineNum = 12517422;BA.debugLine="j3.Position = j";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_j);
RDebugUtils.currentLine=12517423;
 //BA.debugLineNum = 12517423;BA.debugLine="Log(j3.GetString(\"PE_CANT\"))";
__c.LogImpl("512517423",__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT"),0);
RDebugUtils.currentLine=12517424;
 //BA.debugLineNum = 12517424;BA.debugLine="Log($\"update ${tablaInv} set CAT_GP_ALMACEN =";
__c.LogImpl("512517424",("update "+__c.SmartStringFormatter("",(Object)(_tablainv))+" 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")))+"'"),0);
RDebugUtils.currentLine=12517425;
 //BA.debugLineNum = 12517425;BA.debugLine="If vamoaver.Get(Position) = \"PREVENTA_CREDITO";
if ((__ref._vamoaver /*anywheresoftware.b4a.objects.collections.List*/ .Get(_position)).equals((Object)("PREVENTA_CREDITO"))) { 
RDebugUtils.currentLine=12517426;
 //BA.debugLineNum = 12517426;BA.debugLine="Starter.skmt.ExecNonQuery($\"update CAT_GUNAP";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update CAT_GUNAPROD4 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=12517427;
 //BA.debugLineNum = 12517427;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete";
_b4xpages._mainpage /*SHARK2.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)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
 }else {
RDebugUtils.currentLine=12517429;
 //BA.debugLineNum = 12517429;BA.debugLine="Starter.skmt.ExecNonQuery($\"update ${tablaIn";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update "+__c.SmartStringFormatter("",(Object)(_tablainv))+" 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=12517430;
 //BA.debugLineNum = 12517430;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"delete";
_b4xpages._mainpage /*SHARK2.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)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_FOLIO")))+"' AND PE_PROID = '"+__c.SmartStringFormatter("",(Object)(__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID")))+"'"));
 };
 }
};
 };
RDebugUtils.currentLine=12517435;
 //BA.debugLineNum = 12517435;BA.debugLine="j3.Close";
__ref._j3 /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=12517437;
 //BA.debugLineNum = 12517437;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 }else {
RDebugUtils.currentLine=12517441;
 //BA.debugLineNum = 12517441;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery($\"UPDATE ${";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE "+__c.SmartStringFormatter("",(Object)(_tablainv))+" SET CAT_GP_ALMACEN = CAT_GP_ALMACEN + "+__c.SmartStringFormatter("",(Object)(_cantregresar))+" WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_idprod))+"'"));
RDebugUtils.currentLine=12517448;
 //BA.debugLineNum = 12517448;BA.debugLine="Dim qDelete As String = \"DELETE FROM PEDIDO WHE";
_qdelete = "DELETE FROM PEDIDO WHERE PE_PROID = ? AND PE_PRESENTACION = ? "+"AND PE_UVM = ? AND PE_CEDIS = ? "+"AND PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA) AND PE_FOLIO = ?";
RDebugUtils.currentLine=12517452;
 //BA.debugLineNum = 12517452;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(qDelete, A";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(_qdelete,anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_idprod),(Object)(_presname),(Object)(_uvmval),(Object)(_cedis),(Object)(_folioactual)}));
RDebugUtils.currentLine=12517454;
 //BA.debugLineNum = 12517454;BA.debugLine="LogColor(\"Borrado exitoso de Nota: \" & nom & \"";
__c.LogImpl("512517454","Borrado exitoso de Nota: "+_nom+" ("+_presname+")",__c.Colors.Blue);
RDebugUtils.currentLine=12517457;
 //BA.debugLineNum = 12517457;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*String*/ (null);
 };
 };
RDebugUtils.currentLine=12517461;
 //BA.debugLineNum = 12517461;BA.debugLine="End Sub";
return "";
}
public String  _p_nota_click(SHARK2.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=12648448;
 //BA.debugLineNum = 12648448;BA.debugLine="Private Sub p_nota_Click";
RDebugUtils.currentLine=12648450;
 //BA.debugLineNum = 12648450;BA.debugLine="End Sub";
return "";
}
public String  _regresar_click(SHARK2.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=12320768;
 //BA.debugLineNum = 12320768;BA.debugLine="Sub Regresar_Click";
RDebugUtils.currentLine=12320769;
 //BA.debugLineNum = 12320769;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=12320770;
 //BA.debugLineNum = 12320770;BA.debugLine="End Sub";
return "";
}
}