package gunav2.keymon.com.mx;


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

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

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public String _ruta = "";
public anywheresoftware.b4a.sql.SQL _skmt = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _cancela = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guarda = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_1 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_2 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_3 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_comm = null;
public String _motivo = "";
public String _cuenta = "";
public String _usuario = "";
public String _sdate = "";
public String _stime = "";
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_4 = null;
public String _stay_hh = "";
public String _stay_mi = "";
public String _stay_ss = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_noventa = null;
public String _tipo_venta = "";
public gunav2.keymon.com.mx.c_bitacora _bitacora = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = 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_noventa __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=65208320;
 //BA.debugLineNum = 65208320;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=65208321;
 //BA.debugLineNum = 65208321;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=65208322;
 //BA.debugLineNum = 65208322;BA.debugLine="End Sub";
return null;
}
public String  _b4xpage_appear(gunav2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
RDebugUtils.currentLine=65339392;
 //BA.debugLineNum = 65339392;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=65339393;
 //BA.debugLineNum = 65339393;BA.debugLine="Panel1.Height = Root.Height";
__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setHeight(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight());
RDebugUtils.currentLine=65339394;
 //BA.debugLineNum = 65339394;BA.debugLine="Panel1.Width = Root.Width";
__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ .setWidth(__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=65339395;
 //BA.debugLineNum = 65339395;BA.debugLine="Subs.centraPanel(Panel1, Root.Width)";
_subs._centrapanel /*String*/ (ba,__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getWidth());
RDebugUtils.currentLine=65339396;
 //BA.debugLineNum = 65339396;BA.debugLine="Subs.centraPanelV(Panel1, Root.Height)";
_subs._centrapanelv /*String*/ (ba,__ref._panel1 /*anywheresoftware.b4a.objects.PanelWrapper*/ ,__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .getHeight());
RDebugUtils.currentLine=65339397;
 //BA.debugLineNum = 65339397;BA.debugLine="e_comm.Text=\"\"";
__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=65339398;
 //BA.debugLineNum = 65339398;BA.debugLine="tgl.Initialize";
__ref._tgl /*com.rootsoft.togglelibrary.ToggleLibrary*/ .Initialize(ba);
RDebugUtils.currentLine=65339399;
 //BA.debugLineNum = 65339399;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=65339400;
 //BA.debugLineNum = 65339400;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=65339401;
 //BA.debugLineNum = 65339401;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=65339403;
 //BA.debugLineNum = 65339403;BA.debugLine="r_1.Checked = False";
__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=65339404;
 //BA.debugLineNum = 65339404;BA.debugLine="r_2.Checked = False";
__ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=65339405;
 //BA.debugLineNum = 65339405;BA.debugLine="r_3.Checked = False";
__ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=65339406;
 //BA.debugLineNum = 65339406;BA.debugLine="r_4.Checked = False";
__ref._r_4 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=65339407;
 //BA.debugLineNum = 65339407;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(gunav2.keymon.com.mx.c_noventa __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=65273856;
 //BA.debugLineNum = 65273856;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=65273857;
 //BA.debugLineNum = 65273857;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=65273859;
 //BA.debugLineNum = 65273859;BA.debugLine="Root.LoadLayout(\"noventa\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("noventa",ba);
RDebugUtils.currentLine=65273861;
 //BA.debugLineNum = 65273861;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=65273863;
 //BA.debugLineNum = 65273863;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=65273864;
 //BA.debugLineNum = 65273864;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__ref._ruta /*String*/ ,"kmt.db");
 };
RDebugUtils.currentLine=65273867;
 //BA.debugLineNum = 65273867;BA.debugLine="bitacora.Initialize(\"bitacora\", \"bitacora\", Root,";
__ref._bitacora /*gunav2.keymon.com.mx.c_bitacora*/ ._initialize /*Object*/ (null,ba,(Object)("bitacora"),"bitacora",__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ ,_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ ,_starter._reqmanager /*gunav2.keymon.com.mx.dbrequestmanager*/ );
RDebugUtils.currentLine=65273868;
 //BA.debugLineNum = 65273868;BA.debugLine="End Sub";
return "";
}
public String  _cancela_click(gunav2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "cancela_click", false))
	 {return ((String) Debug.delegate(ba, "cancela_click", null));}
RDebugUtils.currentLine=65470464;
 //BA.debugLineNum = 65470464;BA.debugLine="Sub CANCELA_Click";
RDebugUtils.currentLine=65470465;
 //BA.debugLineNum = 65470465;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=65470466;
 //BA.debugLineNum = 65470466;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(gunav2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
RDebugUtils.currentLine=65142784;
 //BA.debugLineNum = 65142784;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=65142785;
 //BA.debugLineNum = 65142785;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=65142786;
 //BA.debugLineNum = 65142786;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=65142788;
 //BA.debugLineNum = 65142788;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=65142789;
 //BA.debugLineNum = 65142789;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=65142790;
 //BA.debugLineNum = 65142790;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=65142791;
 //BA.debugLineNum = 65142791;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=65142793;
 //BA.debugLineNum = 65142793;BA.debugLine="Dim CANCELA As Button";
_cancela = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=65142794;
 //BA.debugLineNum = 65142794;BA.debugLine="Dim GUARDA As Button";
_guarda = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=65142795;
 //BA.debugLineNum = 65142795;BA.debugLine="Dim r_1 As RadioButton";
_r_1 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=65142796;
 //BA.debugLineNum = 65142796;BA.debugLine="Dim r_2 As RadioButton";
_r_2 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=65142797;
 //BA.debugLineNum = 65142797;BA.debugLine="Dim r_3 As RadioButton";
_r_3 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=65142798;
 //BA.debugLineNum = 65142798;BA.debugLine="Dim e_comm As EditText";
_e_comm = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=65142799;
 //BA.debugLineNum = 65142799;BA.debugLine="Dim motivo As String";
_motivo = "";
RDebugUtils.currentLine=65142800;
 //BA.debugLineNum = 65142800;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=65142801;
 //BA.debugLineNum = 65142801;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=65142802;
 //BA.debugLineNum = 65142802;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=65142804;
 //BA.debugLineNum = 65142804;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=65142805;
 //BA.debugLineNum = 65142805;BA.debugLine="Dim r_4 As RadioButton";
_r_4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=65142807;
 //BA.debugLineNum = 65142807;BA.debugLine="Private stay_hh As String";
_stay_hh = "";
RDebugUtils.currentLine=65142808;
 //BA.debugLineNum = 65142808;BA.debugLine="Private stay_mi As String";
_stay_mi = "";
RDebugUtils.currentLine=65142809;
 //BA.debugLineNum = 65142809;BA.debugLine="Private stay_ss As String";
_stay_ss = "";
RDebugUtils.currentLine=65142810;
 //BA.debugLineNum = 65142810;BA.debugLine="Private p_NoVenta As Panel";
_p_noventa = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=65142811;
 //BA.debugLineNum = 65142811;BA.debugLine="Dim tipo_venta = Subs.traeTipoVentaDeBD";
_tipo_venta = _subs._traetipoventadebd /*String*/ (ba);
RDebugUtils.currentLine=65142812;
 //BA.debugLineNum = 65142812;BA.debugLine="Dim bitacora As C_Bitacora";
_bitacora = new gunav2.keymon.com.mx.c_bitacora();
RDebugUtils.currentLine=65142813;
 //BA.debugLineNum = 65142813;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=65142814;
 //BA.debugLineNum = 65142814;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(gunav2.keymon.com.mx.c_noventa __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=65404928;
 //BA.debugLineNum = 65404928;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=65404931;
 //BA.debugLineNum = 65404931;BA.debugLine="End Sub";
return "";
}
public String  _guarda_click(gunav2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "guarda_click", false))
	 {return ((String) Debug.delegate(ba, "guarda_click", null));}
int _i = 0;
RDebugUtils.currentLine=65536000;
 //BA.debugLineNum = 65536000;BA.debugLine="Sub GUARDA_Click";
RDebugUtils.currentLine=65536001;
 //BA.debugLineNum = 65536001;BA.debugLine="If r_1.Checked Then";
if (__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
RDebugUtils.currentLine=65536002;
 //BA.debugLineNum = 65536002;BA.debugLine="motivo = \"CERRADO\"";
__ref._motivo /*String*/  = "CERRADO";
 }else 
{RDebugUtils.currentLine=65536003;
 //BA.debugLineNum = 65536003;BA.debugLine="Else If r_2.Checked Then";
if (__ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
RDebugUtils.currentLine=65536004;
 //BA.debugLineNum = 65536004;BA.debugLine="motivo = \"NO COMPRA\"";
__ref._motivo /*String*/  = "NO COMPRA";
 }else 
{RDebugUtils.currentLine=65536005;
 //BA.debugLineNum = 65536005;BA.debugLine="Else If r_3.Checked Then";
if (__ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
RDebugUtils.currentLine=65536006;
 //BA.debugLineNum = 65536006;BA.debugLine="motivo = \"CON PRODUCTO\"";
__ref._motivo /*String*/  = "CON PRODUCTO";
 }else {
RDebugUtils.currentLine=65536008;
 //BA.debugLineNum = 65536008;BA.debugLine="motivo = \"NO ESTA EL ENCARGADO\"";
__ref._motivo /*String*/  = "NO ESTA EL ENCARGADO";
 }}}
;
RDebugUtils.currentLine=65536010;
 //BA.debugLineNum = 65536010;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=65536011;
 //BA.debugLineNum = 65536011;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=65536012;
 //BA.debugLineNum = 65536012;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=65536013;
 //BA.debugLineNum = 65536013;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CUENTA";
__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=65536014;
 //BA.debugLineNum = 65536014;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=65536015;
 //BA.debugLineNum = 65536015;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=65536016;
 //BA.debugLineNum = 65536016;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
__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=65536017;
 //BA.debugLineNum = 65536017;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=65536018;
 //BA.debugLineNum = 65536018;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=65536019;
 //BA.debugLineNum = 65536019;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PRO";
__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) ")));
RDebugUtils.currentLine=65536020;
 //BA.debugLineNum = 65536020;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=65536021;
 //BA.debugLineNum = 65536021;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step21 = 1;
final int limit21 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit21 ;_i = _i + step21 ) {
RDebugUtils.currentLine=65536022;
 //BA.debugLineNum = 65536022;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=65536023;
 //BA.debugLineNum = 65536023;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2($\"update $";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2(("update "+__c.SmartStringFormatter("",(Object)(_subs._traetablaprods /*String*/ (ba,__ref._tipo_venta /*String*/ )))+" set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?"),anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID"))}));
 }
};
 };
RDebugUtils.currentLine=65536027;
 //BA.debugLineNum = 65536027;BA.debugLine="If B4XPages.MainPage.cliente.IsInitialized Then";
if (_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ .IsInitialized /*boolean*/ ()) { 
RDebugUtils.currentLine=65536028;
 //BA.debugLineNum = 65536028;BA.debugLine="B4XPages.MainPage.cliente.motivoNoVenta = motivo";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ ._motivonoventa /*String*/  = __ref._motivo /*String*/ ;
RDebugUtils.currentLine=65536030;
 //BA.debugLineNum = 65536030;BA.debugLine="Starter.enVenta = False";
_starter._enventa /*boolean*/  = __c.False;
 };
RDebugUtils.currentLine=65536033;
 //BA.debugLineNum = 65536033;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where pc_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=65536034;
 //BA.debugLineNum = 65536034;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido where pe_cliente in (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=65536036;
 //BA.debugLineNum = 65536036;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cuenta /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._motivo /*String*/ ),(Object)(__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
RDebugUtils.currentLine=65536037;
 //BA.debugLineNum = 65536037;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_i";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info3 set gestion = 3  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
RDebugUtils.currentLine=65536038;
 //BA.debugLineNum = 65536038;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=65536039;
 //BA.debugLineNum = 65536039;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=65536040;
 //BA.debugLineNum = 65536040;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_OUT = ?  where HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
RDebugUtils.currentLine=65536043;
 //BA.debugLineNum = 65536043;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\" Select (subs";
__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 (substr(HSS_OUT,1,2) - substr(HSS_IN,1,2)) - Case when  (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) < 0 Then 1 Else 0 end HORAS_TOTALES, "+"Case when  (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) < 0 Then (substr(HSS_OUT,3,2) + 60 - substr(HSS_IN,3,2)) "+"	Else (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) End - Case when  (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) < 0 Then 1 Else 0 end  MINUTOS_TOTALES, "+"Case when  (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) < 0 Then (substr(HSS_OUT,5,2) + 60 - substr(HSS_IN,5,2)) "+"	Else (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) end SEGUNDOS_TOTALES "+"	from HIST_STAY_STORE where HSS_CODIGO In (Select cuenta from cuentaa) ")));
RDebugUtils.currentLine=65536049;
 //BA.debugLineNum = 65536049;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=65536050;
 //BA.debugLineNum = 65536050;BA.debugLine="stay_hh = c.GetString(\"HORAS_TOTALES\") * 60 * 60";
__ref._stay_hh /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HORAS_TOTALES")))*60*60);
RDebugUtils.currentLine=65536051;
 //BA.debugLineNum = 65536051;BA.debugLine="stay_mi = c.GetString(\"MINUTOS_TOTALES\") * 60";
__ref._stay_mi /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("MINUTOS_TOTALES")))*60);
RDebugUtils.currentLine=65536052;
 //BA.debugLineNum = 65536052;BA.debugLine="stay_ss = c.GetString(\"SEGUNDOS_TOTALES\")";
__ref._stay_ss /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("SEGUNDOS_TOTALES");
RDebugUtils.currentLine=65536053;
 //BA.debugLineNum = 65536053;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_TOT = ?  where HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)((double)(Double.parseDouble(__ref._stay_hh /*String*/ ))+(double)(Double.parseDouble(__ref._stay_mi /*String*/ ))+(double)(Double.parseDouble(__ref._stay_ss /*String*/ )))}));
RDebugUtils.currentLine=65536054;
 //BA.debugLineNum = 65536054;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_FIN = ?  ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
RDebugUtils.currentLine=65536055;
 //BA.debugLineNum = 65536055;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
RDebugUtils.currentLine=65536056;
 //BA.debugLineNum = 65536056;BA.debugLine="bitacora.mandaBitacora(Subs.fechanormal(DateTime.";
__ref._bitacora /*gunav2.keymon.com.mx.c_bitacora*/ ._mandabitacora /*String*/ (null,_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),__ref._usuario /*String*/ ,_subs._traealmacen /*String*/ (ba),_subs._traerutabitacora /*String*/ (ba),"NO VENTA",_subs._traecliente /*String*/ (ba),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ,BA.NumberToString(2),__ref._motivo /*String*/ ,BA.ObjectToString(__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()),_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*gunav2.keymon.com.mx.c_cliente*/ ._bitacora /*gunav2.keymon.com.mx.c_bitacora*/ ._banderageocerca /*String*/ );
RDebugUtils.currentLine=65536057;
 //BA.debugLineNum = 65536057;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
RDebugUtils.currentLine=65536058;
 //BA.debugLineNum = 65536058;BA.debugLine="End Sub";
return "";
}
}